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ACA,YACA,eACA,YACA,eACA,kBACA,eACA,kBACA,eACA,YACA,eACA,YACA,eACA,eACA,kBACA,eACA,kBACA,cACA,iBACA,cACA,iBACA,eACA,kBACA,eACA,kBACA,eACA,kBACA,eACA,kBACA,YACA,eACA,YACA,eACA,kBACA,eACA,kBACA,eACA,kBACA,eACA,YACA,eACA,WACA,cACA,YACA,eACA,YACA,eACA,aACA,gBACA,YACA,eACA,YACA,eACA,kBACA,cACA,iBACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,kBACA,qBACA,kBACA,qBACA,WACA,cACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,eACA,kBACA,YACA,eACA,YACA,eACA,WACA,eACA,kBACA,cACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,WACA,gBACA,mBACA,cACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,kBACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,kBACA,eACA,YACA,eACA,gBACA,mBACA,aACA,gBACA,YACA,eACA,YACA,eACA,kBACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,WACA,cACA,YACA,eACA,YACA,eACA,YACA,iBACA,oBACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,aACA,gBACA,YACA,eACA,YACA,eACA,YACA,eACA,eACA,kBACA,aACA,gBACA,YACA,eACA,aACA,gBACA,aACA,kBACA,qBACA,gBACA,eACA,kBACA,YACA,eACA,YACA,eACA,YACA,iBACA,oBACA,eACA,YACA,eACA,iBACA,oBACA,YACA,eACA,cACA,iBACA,cACA,iBACA,eACA,kBACA,eACA,mBAIA,cACA,WACA,WACA,CACA,cACA,cACA,8CACA,gCACAhiH,EAEA,WACA,CACAukV,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CAACN,EAAQ,CAACD,EAAMQ,IAChB,CAKE,2DAEF,CAACV,EAAO,CAACE,EAAMI,IACf,CACE,+DAEF,CAACN,EAAO,CAACE,EAAMK,IACf,CACE,gDAEF,CAAC,CAACL,EAAMK,IACR,CACE,kEAEF,CAAC,CAACL,EAAMI,IACR,CACE,kCAEF,CAACN,EAAO,CAACG,EAAQ,aAGnB55I,OAAQ,CACN,CACE,8BAEF,CAACzoJ,EAAS,CAACmiS,EAAM8B,aACjB,CACE,6CAEF,CAACjkS,EAAS,CAACmiS,EAAM,UACjB,CACE,uBACA,sEACA,0BACA,yCACA,+BAEF,CAACA,EAAMniS,GACP,CACE,iCAEF,CAACA,EAASmiS,IAGZ9wL,GAAI,CACF,CAEE,mCAEF,CAAC8wL,EAAMniS,GACP,CACE,4BACA,wDACA,8CAEF,CAACmiS,EAAM,CAACniS,EAAS0jS,GAAWC,KAC5B,CAAC,sCACD,CACE,CAACxB,EAAM,WACP,CAACniS,EAAS0jS,GAAWC,KAEvB,CAEE,sDACA,wBAEF,CACE,CAAC3jS,EAAS,KAAM,KAChB,CAACmiS,EAAM,QAET,CACE,0BACA,yCAEF,CACE,CAACA,EAAM,UACP,CAACniS,EAAS,KAAM,MAElB,CAEE,kDAEF,CAACA,EAASmiS,GACV,CAEE,+EACA,8BACA,+BACA,kBAEF,CAACA,EAAMniS,GACP,CACE,cAEF,CAACA,EAAS,CAACmiS,EAAMhgG,KACjB,CACE,6DAEF,CAACniM,EAAS,CAACmiS,EAAM,YACjB,CACE,mFAEF,CAACniS,EAAS,CAACmiS,EAAMhiG,EAAU,QAC3B,CACE,kBACA,wCAEF,CAACngM,EAAS,CAACmiS,EAAM,UACjB,CAEE,qBAEF,CAACniS,EAAS,CAACmiS,EAAMjiG,EAAS,SAC1B,CACE,6BAEF,CAAC,CAACiiG,EAAM,eAAgBniS,GACxB,CAEE,mDACA,2BAGA,wCACA,yBACA,4BACA,8SAEA,2BACA,oBACA,6EACA,kBAEF,CAACmiS,EAAM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useDeprecatedSynchronousErrorHandling","isRoot","errorThrown","error","captureError","err","i0","DisplayFormAnalytics","DisplayFormSettings","Settings","constructor","super","this","pageFormControlFullWidth","pageFormControls","pageFormControlsTitle","pageFormControlsTitleKey","processSecondaryEvent","processUpdater","checkPageFormForceAsValid","DisplayFormProcessErrorType","DisplayFormComponent","activatedRoute","injector","routingState","toastService","translatePipe","translateService","changeDetectorRef","fbPage","fbCategory","fbEventName","pageTitle","pageTitleKey","pageSubTitle","pageSubTitleKey","pageCtaLabel","pageCtaLabelKey","pageSecondaryCtaLabel","pageOnForwardCtaPath","ngOnInit","checkForConfigViaData","formAutomaticCreateMode","buildFormFromConfig","clearForm","ngOnDestroy","forEach","controlConfig","undefined","inputOptions","initialValue","snapshot","data","pageConfig","setUpAnalytics","displayFormAnalytics","shown","analyticsAttributes","dismiss","submit","processControlAndUpdateFormPatch","patchInitialValues","control","type","key","Date","toISOString","split","dateArgs","toString","Number","controls","displayForm","FormGroup","statusChanges","pipe","take","subscribe","status","setTimeout","Object","keys","length","patchValue","emitEvent","detectChanges","reset","handleMoveBackward","popAndNavigateTo","pageOnBackCtaPath","handleMoveForward","bridgeExitOverride","IsRunningIOS","IsRunningAndroid","MessageBusInternalService","sendOutgoingHubEvent","event","MessageBusOutgoingEventKey","ROUTE","path","handleShowError","result","errorType","MODAL","processErrorMessage","errorMessage","processErrorMessageTitle","errorMessageTitle","showProcessError","BANNER","instant","link","transient","processing","doesControlHaveError","get","touched","invalid","handleBackClick","handleCtaClick","results","defaultErrorMessage","defaultErrorTitle","next","handleSecondaryCtaClick","handleLinkClick","navigateTo","_DisplayFormComponent","_angular_core__WEBPACK_IMPORTED_MODULE_7__","selectors","CardTypes","CardComponent","elRef","EventEmitter","cardType","Promo","isPromoCard","Action","isActionCard","Info","isInfoCard","hostClass","ActiveProduct","isActiveProductCard","invertedColor","hasCardBanner","nativeElement","lastElementChild","localName","handleCloseCard","closeCard","emit","handleCardAction","cardAction","_CardComponent","_angular_core__WEBPACK_IMPORTED_MODULE_0__","CardHeaderComponent","_CardHeaderComponent","CardBodyComponent","_CardBodyComponent","CardFooterComponent","_CardFooterComponent","CardBannerComponent","_CardBannerComponent","moment","symbolMap","numberMap","defineLocale","months","monthsShort","weekdays","weekdaysShort","weekdaysMin","longDateFormat","LT","LTS","L","LL","LLL","LLLL","calendar","sameDay","nextDay","nextWeek","lastDay","lastWeek","sameElse","relativeTime","future","past","s","ss","m","mm","h","hh","d","dd","M","MM","y","yy","preparse","string","replace","match","postformat","meridiemParse","meridiemHour","hour","meridiem","minute","isLower","week","dow","doy","factory","require","LoadingBarComponent_ng_container_0_div_1_Template","rf","ctx","ɵngcc0","ctx_r2","diameter","LoadingBarComponent_ng_container_0_div_2_Template","progress_r1","ngIf","ctx_r3","color","height","LoadingBarComponent_ng_container_0_Template","ctx_r0","includeSpinner","includeBar","LoadingBarState","state","action","value","requests","disabled","stream$","Subject","_value$","timer$","state$","of","latencyThreshold","timer","map","t","assign","_increment","tap","value$","asObservable","startWith","switchMap","shareReplay","start","stop","complete","disable","set","increment","rnd","stat","Math","random","LOADING_BAR_CONFIG","InjectionToken","LoadingBarService","platformId","zone","refs","streams$","combineLatest","runInZone","source","Observable","observer","run","e","v","max","progress$","useRef","id","isPlatformBrowser","ɵfac","PLATFORM_ID","ɵprov","ɵɵdefineInjectable","ɵɵinject","NgZone","token","providedIn","__decorate","__param","Inject","Optional","__metadata","LoadingBarComponent","loader","fixed","ref","ɵcmp","hostVars","hostBindings","inputs","decls","vars","consts","template","dependencies","ɵngcc1","styles","changeDetection","Input","prototype","String","LoadingBarModule","ɵmod","ɵinj","imports","CommonModule","LinkedAccountService","savingsService","awsApiWrapperService","static","account","verifiableBank","banks","find","bank","isLinkedAccountVerifiable","Boolean","LinkedBankStatus","LINK_VERIFY_DEPOSIT","isSameOrAfter","micro_meta","micro_deposit_initiated_ts","local","businessAdd","startOf","createAccount","requestBody","clearSavingsCache","from","post","headers","body","resendDeposits","bankId","patch","verifyAccount","request","amounts","unlinkAccount","del","_LinkedAccountService","core","UiTemplateContentType","UiTemplateContentFormType","UiTemplateContentGroupRadioDisplayStyle","UiTemplateContentCdnUrlComponent","httpClient","fullPath","_UiTemplateContentCdnUrlComponent","UiTemplateContentTitleTextComponent","_UiTemplateContentTitleTextComponent","UiContentDisplayItemComponent","MicroUtilDebugLogger","viewContainerRef","CellSeparatorType","allowVerboseDebugMode","logPrefix","getMethodOrNoop","contentControl","contentTypeName","logForDebugging","bind","CDN_CONTENT","CUSTOM_COMPONENT","component","componentRef","createComponent","afterComponentCreated","GROUP_CELL","LIST_ITEM","TITLE_TEXT","SELECT_AMOUNT","GROUP_RADIO","_UiContentDisplayItemComponent","UiContentDisplayComponent","_UiContentDisplayComponent","UiTemplateContentGroupRadioComponent","_UiTemplateContentGroupRadioComponent","CurrencySelectComponent","fb","group","currencyInputAmount","Validators","required","suppressKeyboardInput","formInput","sub","onChangeSubs","unsubscribe","form","fcGroup","childFormGroup","fcName","formInputValue","adjustInputValue","by","newValue","markAsTouched","writeValue","updateValueAndValidity","setValue","onAdd","onRemove","registerOnChange","onChange","valueChanges","push","registerOnTouched","onTouched","setDisabledState","enable","validate","quantity","mustBePositive","_CurrencySelectComponent","provide","NG_VALUE_ACCESSOR","multi","useExisting","NG_VALIDATORS","UiTemplateContentSelectAmountComponent","localFormControlName","groupName","localFormGroup","FormControl","amountChanged","formValuesChanged","name","_UiTemplateContentSelectAmountComponent","UiContentDisplayFormComponent","_UiContentDisplayFormComponent","MicroUiTemplateContentModule","_MicroUiTemplateContentModule","BrightsideUiModule","MicroCoreUtilityModule","MicroUiMoleculeModule","TranslateModule","UiTemplateNavType","UiTemplateAction","UiTemplateLifecycleHook","UiTemplateBaseComponent","router","Subscription","checkAndValidateDataFromActivatedRoute","checkForFlagsBasedOnData","startWatchingQueryParams","_sub","ngOnChanges","changes","isFirstChange","templateDataChanged","hasDataDefined","hasHooksDefined","hooks","shouldWatchQueryParams","add","queryParams","throttleTime","queryParamsChanged","modals","templateData","templatedData","runLifeCycleEvent","templateDataInitLoaded","checkForDeveloperSettingsFromData","developer","message","optionalParams","console","log","lifeCycle","hookFn","templateDisplayName","routeTo","routeInfo","actionKey","hasRoutingLocked","warn","route","options","navLeftIcon","shouldReverseExitAnimation","navigate","relativeTo","queryParamsHandling","entryAt","getTime","then","routeWorked","catch","finally","markForCheck","executeAction","hasActionLocked","actionFnResponse","_UiTemplateBaseComponent","StateSubject","BehaviorSubject","update","Store","isReady","initialize","unsubscriber","isStateEqualWith","checkWithState","currentState","getState","newPossibleState","DeepMerge","deepEqual","setState","conditions","preparedNewState","pendingUpdatedKeys","conditionCheck","triggeringKeys","filter","includes","manualConditionRunner","withKey$","distinctUntilChanged","a","b","takeUntil","UiTemplateStateHandlerService","addLastChange","_changeLog","updatedAt","toTimeString","with","_lastUpdateWith","destroy","_initial","_conditions","isNotEmpty","checkObj","updateWithInterface","details","initial","updateWith","stateConditions","updateWithPartial","partialState","_UiTemplateStateHandlerService","UiTemplateStateKey","UiTemplateStateComponent","stateUnsubscriber","templateStateChanged","_templateDataChanged","_checkForConditionalChanges","pendingState","setUpdateStateForKey","updateStateKey","updateStateValue","setUpdateStateWith","Ot","_UiTemplateStateComponent","UiTemplateActionHandler","actions","uiComponent","updateUiComponent","updateActions","lastExecutedActionKey","clear","UiTemplateFlyerComponent","event_name","resetFromDataAction","updateActionsFromData","fromDataActions","fromDataAction","updateFooterFromData","fromDataFooter","cta1Label","cta2Label","trackingDetail","fromDataTrackingDetail","infoText","confirmBox","UiFooterType","DEFAULT","targetModalId","modal","fromDataActiveModal","animationTriggerName","viewName","content","fromDataContent","header","fromDataHeader","media","fromDataMedia","navType","fromDataNavigation","_UiTemplateFlyerComponent","PageTransitionAnimationTriggers","UiTemplateHalfSheetComponent","ROW","formValueChanged","change","CHILD_MODAL","_UiTemplateHalfSheetComponent","MicroUiTemplatePageModule","_MicroUiTemplatePageModule","UiTemplatePageTransitionService","ReactiveFormsModule","RouterModule","UiTemplatePageTransitionComponent","suffixes","weekdaysParseExact","isPM","input","test","dayOfMonthOrdinalParse","ordinal","number","TermsComponent","msService","closeEvent","$event","leaveTermsUpdate","termsAccepted","put","redirectCompleted","resp","MessageBusEventUtil","standard","exitFeature","_TermsComponent","moduleRoutes","children","redirectTo","MicroTermsUpdateModule","_MicroTermsUpdateModule","FirebaseService","useClass","FirebaseAnalyticsService","TranslateService","MicroUtilTranslationService","BrightsideUiServicesModule","forChild","SharedDesktopModule","SharedDisplayModule","SharedLegalDocumentsModule","HasTermsUpdateGuard","mobileStateService","canLoad","segments","redirect","canActivate","_HasTermsUpdateGuard","monthsParseExact","l","ll","lll","llll","hm","period","getMainCarrier","getSentryCarrier","GLOBAL_OBJ","carrier","__SENTRY__","version","SDK_VERSION","DEFAULT_STATE","UiFooterDefaultComponent","UiBaseDataMoleculeComponent","schemaValidationConfig","directInputValues","uiOnDirectInputsFromDataObject","_UiFooterDefaultComponent","exports","hookCallback","some","apply","arguments","isArray","Array","call","isObject","hasOwnProp","hasOwnProperty","isObjectEmpty","obj","getOwnPropertyNames","k","isUndefined","isNumber","isDate","arr","fn","i","res","arrLen","extend","valueOf","createUTC","format","locale","strict","createLocalOrUTC","utc","getParsingFlags","_pf","empty","unusedTokens","unusedInput","overflow","charsLeftOver","nullInput","invalidEra","invalidMonth","invalidFormat","userInvalidated","iso","parsedDateParts","era","rfc2822","weekdayMismatch","isValid","flags","parsedParts","isNowValid","_d","isNaN","invalidWeekday","_strict","bigHour","isFrozen","_isValid","createInvalid","NaN","fun","len","momentProperties","updateInProgress","copyConfig","to","prop","val","momentPropertiesLen","_isAMomentObject","_i","_f","_l","_tzm","_isUTC","_offset","_locale","Moment","updateOffset","isMoment","msg","suppressDeprecationWarnings","deprecate","firstTime","deprecationHandler","arg","args","argLen","slice","join","Error","stack","deprecations","deprecateSimple","isFunction","Function","mergeConfigs","parentConfig","childConfig","Locale","zeroFill","targetLength","forceSign","absNumber","abs","pow","substr","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","padded","callback","func","localeData","removeFormattingTokens","formatMoment","expandFormat","makeFormatFunction","array","mom","output","invalidDate","replaceLongDateFormatTokens","lastIndex","aliases","D","dates","date","days","day","weekday","E","isoweekdays","isoweekday","DDD","dayofyears","dayofyear","hours","ms","milliseconds","millisecond","minutes","month","Q","quarters","quarter","seconds","second","gg","weekyears","weekyear","GG","isoweekyears","isoweekyear","w","weeks","W","isoweeks","isoweek","years","year","normalizeUnits","units","toLowerCase","normalizeObjectUnits","inputObject","normalizedProp","normalizedInput","priorities","isoWeekday","dayOfYear","weekYear","isoWeekYear","isoWeek","regexes","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchWord","match1to2NoLeadingZero","match1to2HasZero","addRegexToken","regex","strictRegex","isStrict","getParseRegexForToken","RegExp","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","absFloor","ceil","floor","toInt","argumentForCoercion","coercedNumber","isFinite","tokens","addParseToken","tokenLen","addWeekParseToken","_w","addTimeToArrayFromToken","_a","isLeapYear","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","daysInYear","parseTwoDigitYear","parseInt","indexOf","getSetYear","makeGetSet","unit","keepTime","set$1","isUTC","getUTCMilliseconds","getMilliseconds","getUTCSeconds","getSeconds","getUTCMinutes","getMinutes","getUTCHours","getHours","getUTCDate","getDate","getUTCDay","getDay","getUTCMonth","getMonth","getUTCFullYear","getFullYear","setUTCMilliseconds","setMilliseconds","setUTCSeconds","setSeconds","setUTCMinutes","setMinutes","setUTCHours","setHours","setUTCDate","setDate","setUTCFullYear","setFullYear","daysInMonth","modMonth","mod","n","x","o","monthsShortRegex","monthsRegex","monthsParse","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","handleStrictParse","monthName","ii","llc","toLocaleLowerCase","_monthsParse","_longMonthsParse","_shortMonthsParse","setMonth","min","setUTCMonth","getSetMonth","computeMonthsParse","cmpLenRev","shortP","longP","shortPieces","longPieces","mixedPieces","sort","_monthsRegex","_monthsShortRegex","_monthsStrictRegex","_monthsShortStrictRegex","createDate","createUTCDate","UTC","firstWeekOffset","fwd","dayOfYearFromWeeks","resYear","resDayOfYear","weekOfYear","resWeek","weekOffset","weeksInYear","weekOffsetNext","shiftWeekdays","ws","concat","weekdaysMinRegex","weekdaysShortRegex","weekdaysRegex","weekdaysParse","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","handleStrictParse$1","weekdayName","_weekdaysParse","_shortWeekdaysParse","_minWeekdaysParse","computeWeekdaysParse","minp","shortp","longp","minPieces","_weekdaysRegex","_weekdaysShortRegex","_weekdaysMinRegex","_weekdaysStrictRegex","_weekdaysShortStrictRegex","_weekdaysMinStrictRegex","hFormat","lowercase","matchMeridiem","_meridiemParse","kFormat","kInput","_isPm","_meridiem","pos","pos1","pos2","getSetHour","globalLocale","baseConfig","ww","locales","localeFamilies","commonPrefix","arr1","arr2","minl","normalizeLocale","loadLocale","oldLocale","module","isLocaleNameSane","_abbr","aliasedRequire","getSetGlobalLocale","values","getLocale","abbr","_config","parentLocale","chooseLocale","names","j","checkOverflow","_overflowDayOfYear","_overflowWeeks","_overflowWeekday","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","obsOffsets","UT","GMT","EDT","EST","CDT","CST","MDT","MST","PDT","PST","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","exec","isoDatesLen","isoTimesLen","configFromStringAndFormat","untruncateYear","yearStr","configFromRFC2822","parsedArray","preprocessRFC2822","extractFromRFC2822Strings","monthStr","dayStr","hourStr","minuteStr","secondStr","checkWeekday","weekdayStr","parsedInput","calculateOffset","obsOffset","militaryOffset","numOffset","defaults","c","configFromArray","currentDate","expectedWeekday","yearToUse","currentDateArray","nowValue","now","_useUTC","dayOfYearFromWeekInfo","temp","weekdayOverflow","curWeek","createLocal","_week","_dayOfYear","_nextDay","ISO_8601","RFC_2822","skipped","stringLength","totalParsedInputLength","meridiemFixWrap","isPm","erasConvertYear","prepareConfig","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","score","configFromInput","configFromString","createFromInputFallback","configFromObject","createFromConfig","prototypeMin","other","prototypeMax","pickBy","moments","ordering","Duration","duration","isDurationValid","unitHasDecimal","orderLen","parseFloat","_milliseconds","_days","_months","_data","_bubble","isDuration","absRound","round","offset","separator","utcOffset","sign","offsetFromString","chunkOffset","matcher","parts","matches","cloneWithOffset","model","diff","clone","setTime","getDateOffset","getTimezoneOffset","isUtc","aspNetRegex","isoRegex","createDuration","ret","diffRes","parseIso","momentsDifference","base","isBefore","positiveMomentsDifference","inp","isAfter","createAdder","direction","tmp","addSubtract","isAdding","createInvalid$1","subtract","isString","isMomentInput","isNumberOrStringArray","arrayTest","dataTypeTest","item","isMomentInputObject","objectTest","propertyTest","properties","propertyLen","monthDiff","wholeMonthDiff","anchor","newLocaleData","defaultFormat","defaultFormatUtc","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","matchEraAbbr","erasAbbrRegex","computeErasParse","erasName","erasAbbr","erasNarrow","abbrPieces","namePieces","narrowPieces","eras","narrow","_erasRegex","_erasNameRegex","_erasAbbrRegex","_erasNarrowRegex","addWeekYearFormatToken","getter","getSetWeekYearHelper","weeksTarget","setWeekAll","dayOfYearData","matchEraName","erasNameRegex","matchEraNarrow","erasNarrowRegex","erasParse","matchEraYearOrdinal","_eraYearOrdinalRegex","eraYearOrdinalParse","_dayOfMonthOrdinalParse","_ordinalParse","_dayOfMonthOrdinalParseLenient","getSetDayOfMonth","getSetMinute","getSetMillisecond","getSetSecond","parseMs","proto","preParsePostFormat","calendar$1","time","formats","isCalendarSpec","sod","calendarFormat","asFloat","that","zoneDelta","endOf","startOfDate","inputString","withoutSuffix","humanize","fromNow","toNow","stringGet","invalidAt","localInput","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrBefore","isValid$2","parsingFlags","stringSet","prioritized","getPrioritizedUnits","unitsObj","u","priority","prioritizedLen","toArray","toObject","toDate","keepOffset","inspect","prefix","isLocal","Symbol","for","toJSON","unix","creationData","eraName","getEraName","since","until","eraNarrow","getEraNarrow","eraAbbr","getEraAbbr","eraYear","getEraYear","dir","getIsLeapYear","getSetWeekYear","getSetISOWeekYear","getSetQuarter","getDaysInMonth","getSetWeek","isoWeeks","getSetISOWeek","getWeeksInYear","weekInfo","weeksInWeekYear","getWeeksInWeekYear","isoWeeksInYear","getISOWeeksInYear","isoWeeksInISOWeekYear","getISOWeeksInISOWeekYear","getSetDayOfWeek","parseWeekday","getSetLocaleDayOfWeek","getSetISODayOfWeek","parseIsoWeekday","getSetDayOfYear","getSetOffset","keepLocalTime","keepMinutes","localAdjust","_changeInProgress","setOffsetToUTC","setOffsetToLocal","parseZone","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDST","isDaylightSavingTime","isUtcOffset","zoneAbbr","getZoneAbbr","zoneName","getZoneName","getSetZone","isDSTShifted","isDaylightSavingTimeShifted","_isDSTShifted","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","proto$1","get$1","index","field","setter","listMonthsImpl","out","listWeekdaysImpl","localeSorted","shift","_calendar","_longDateFormat","formatUpper","toUpperCase","tok","_invalidDate","_ordinal","isFuture","_relativeTime","pastFuture","localeEras","_eras","localeErasParse","localeErasConvertYear","localeMonths","isFormat","standalone","localeMonthsShort","_monthsShort","localeMonthsParse","_monthsParseExact","localeWeek","firstDayOfYear","localeFirstDayOfYear","firstDayOfWeek","localeFirstDayOfWeek","localeWeekdays","_weekdays","localeWeekdaysMin","_weekdaysMin","localeWeekdaysShort","_weekdaysShort","localeWeekdaysParse","_weekdaysParseExact","_fullWeekdaysParse","localeIsPM","charAt","localeMeridiem","langData","mathAbs","addSubtract$1","absCeil","daysToMonths","monthsToDays","makeAs","alias","as","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","valueOf$1","makeGetter","thresholds","substituteTimeAgo","abs$1","toISOString$1","totalSign","ymSign","daysSign","hmsSign","total","toFixed","proto$2","isValid$1","add$1","subtract$1","bubble","monthsFromDays","clone$1","get$2","argWithSuffix","argThresholds","withSuffix","th","relativeTime$1","posNegDuration","toIsoString","setHookCallback","createUnix","listMonths","listWeekdays","createInZone","listMonthsShort","listWeekdaysMin","updateLocale","tmpLocale","listLocales","listWeekdaysShort","relativeTimeRounding","getSetRelativeTimeRounding","roundingFunction","relativeTimeThreshold","getSetRelativeTimeThreshold","threshold","limit","getCalendarFormat","myMoment","HTML5_FMT","DATETIME_LOCAL","DATETIME_LOCAL_SECONDS","DATETIME_LOCAL_MS","TIME","TIME_SECONDS","TIME_MS","GoToBrightsideDesktopComponent","_GoToBrightsideDesktopComponent","mapTo","plural","translate","createOperatorSubscriber","destination","onNext","onComplete","onError","onFinalize","OperatorSubscriber","Subscriber","shouldUnsubscribe","_next","_error","_complete","closed","VgBufferingModule","VgCoreModule","predicate","thisArg","operate","subscriber","TranslateLoader","TranslateFakeLoader","getTranslation","MissingTranslationHandler","FakeMissingTranslationHandler","handle","params","equals","o1","o2","keySet","t1","create","isDefined","mergeDeep","target","Ie","TranslateParser","TranslateDefaultParser","templateMatcher","interpolate","expr","interpolateString","interpolateFunction","getValue","substring","r","TranslateCompiler","TranslateFakeCompiler","compile","compileTranslations","translations","TranslateStore","currentLang","defaultLang","langs","onTranslationChange","onLangChange","onDefaultLangChange","USE_STORE","USE_DEFAULT_LANG","DEFAULT_LANGUAGE","USE_EXTEND","store","currentLoader","compiler","parser","missingTranslationHandler","useDefaultLang","isolate","defaultLanguage","pending","_onTranslationChange","_onLangChange","_onDefaultLangChange","_langs","_translations","_translationRequests","setDefaultLang","_defaultLang","_currentLang","retrieveTranslations","changeDefaultLang","getDefaultLang","use","changeLang","loadingTranslations","updateLangs","setTranslation","shouldMerge","getLangs","addLangs","getParsedResult","interpolateParams","observables","isObservable","sources","forkJoin","concatMap","getStreamOnTranslationChange","defer","stream","reloadLang","resetLang","getBrowserLang","window","navigator","browserLang","languages","language","browserLanguage","userLanguage","getBrowserCultureLang","browserCultureLang","TranslatePipe","_ref","lastKey","lastParams","updateValue","onTranslation","transform","query","validArgs","JSON","parse","SyntaxError","_dispose","ɵpipe","pure","ngModule","providers","useValue","ToastComponent","resetToasts","toasts","toastSubscription","toastObs","toast","removeToast","ToastDelay","closing","fade","cssClass","classes","ToastType","Success","Warning","InfoBlue","emitLinkClicked","toastToDeliver","_ToastComponent","VgControlsModule","CreditModalComponent","analytics","handleClick","boolToSend","logEvent","getFBInfo","extra","analyticsData","_CreditModalComponent","_angular_core__WEBPACK_IMPORTED_MODULE_2__","last","popResultSelector","pop","popScheduler","isScheduler","popNumber","defaultValue","base64VLQ","util","ArraySet","MappingList","SourceMapGenerator","aArgs","_file","getArg","_sourceRoot","_skipValidation","_sources","_names","_mappings","_sourcesContents","_version","fromSourceMap","aSourceMapConsumer","sourceRoot","generator","file","eachMapping","mapping","newMapping","generated","line","generatedLine","column","generatedColumn","relative","original","originalLine","originalColumn","addMapping","sourceFile","sourceContentFor","setSourceContent","_validateMapping","has","aSourceFile","aSourceContent","toSetString","applySourceMap","aSourceMapPath","newSources","newNames","unsortedForEach","originalPositionFor","aGenerated","aOriginal","aSource","aName","stringify","_serializeMappings","nameIdx","sourceIdx","previousGeneratedColumn","previousGeneratedLine","previousOriginalColumn","previousOriginalLine","previousName","previousSource","mappings","compareByGeneratedPositionsInflated","encode","_generateSourcesContent","aSources","aSourceRoot","sourcesContent","observableFactory","innerFrom","aDefaultValue","urlRegexp","dataUrlRegexp","urlParse","aUrl","scheme","auth","host","port","urlGenerate","aParsedUrl","url","normalize","aPath","part","isAbsolute","up","splice","aRoot","aPathUrl","aRootUrl","joined","level","lastIndexOf","supportsNullProto","identity","isProtoString","charCodeAt","strcmp","aStr1","aStr2","aStr","fromSetString","compareByOriginalPositions","mappingA","mappingB","onlyCompareOriginal","cmp","compareByGeneratedPositionsDeflated","onlyCompareGenerated","isArrayLike","getOwnPropertySymbols","propertyIsEnumerable","SuppressedError","globalThis","global","self","__esModule","default","defineProperty","locked","Map","addToLocked","unshift","isLocked","lock","Promise","unlock","delete","getInstance","instance","__awaiter","throw","done","__generator","label","sent","trys","ops","return","iterator","TypeError","getItem","localStorage","removeItem","setItem","keySync","getItemSync","clearSync","removeItemSync","setItemSync","acquiredIatSet","Set","storageHandler","acquireLock","releaseLock","releaseLock__private__","waitForSomethingToChange","refreshLockWhileAcquired","waiters","p","iat","timeoutKey","timeAcquired","timeRefreshed","lockCorrector","removeEventListener","removeFromWaiting","clearTimeout","addEventListener","addToWaiting","notifyWaiters","timeoutInSeconds","error_description","setPrototypeOf","appState","popup","mfa_token","f","g","audience","scope","crypto","getRandomValues","Uint8Array","btoa","clientId","URLSearchParams","client_id","reduce","Dt","decodeURIComponent","atob","_","fetch","ok","json","_x","I","AbortController","signal","race","abort","_x3","S","timeout","fetchUrl","fetchOptions","useFormData","MessageChannel","port1","onmessage","close","postMessage","port2","_x6","O","_x13","baseUrl","auth0Client","_ref9","method","_T","trim","C","suffix","toKey","z","remove","allKeys","startsWith","P","enclosedCache","cache","keyManifest","nowProvider","setIdToken","_this","getIdTokenCacheKey","id_token","decodedToken","getIdToken","_this2","_this3","getCacheKeys","matchExistingCacheKey","expiresAt","refresh_token","_this4","wrapCacheEntry","_this5","resolve","_this6","expires_in","_this7","fromKey","Z","storage","cookieDomain","storageKey","save","daysUntilExpire","K","R","__assign","encodeURIComponent","expires","toUTCString","domain","secure","sameSite","document","cookie","getAll","U","X","location","protocol","N","J","sessionStorage","V","F","fromCharCode","Uint16Array","buffer","Blob","URL","createObjectURL","Worker","A","B","manifestKey","createManifestKeyFrom","_this8","_this9","size","$","memory","localstorage","q","openUrl","onRedirect","ee","te","userCache","defaultOptions","authorizationParams","useRefreshTokensFallback","_releaseLockOnPageHide","_this10","subtle","cacheLocation","httpTimeoutMs","httpTimeoutInSeconds","cookieStorage","legacySameSiteCookie","orgHintCookieName","isAuthenticatedCookieName","sessionCheckExpiryDays","useCookiesForTransactions","useRefreshTokens","transactionManager","cacheManager","domainUrl","tokenIssuer","issuer","worker","workerUrl","_url","_authorizeUrl","_verifyIdToken","_this11","__raw","encoded","payload","signature","claims","user","iss","alg","aud","azp","nonce","max_age","auth_time","exp","leeway","nbf","organization","org_id","org_name","_processOrgHint","_prepareAuthorizeUrl","_ref7","digest","TextEncoder","response_type","response_mode","redirect_uri","code_challenge","code_challenge_method","_this12","code_verifier","loginWithPopup","screenX","innerWidth","screenY","innerHeight","open","_this13","origin","href","authorizeTimeoutInSeconds","setInterval","clearInterval","response","fromPayload","_requestToken","grant_type","code","nonceIn","getUser","_this14","_getIdTokenFromCache","getIdTokenClaims","_this15","loginWithRedirect","fragment","_this16","handleRedirectCallback","_this17","checkSession","_this18","getTokenSilently","cacheMode","_this19","_getTokenSilently","detailedResponse","access_token","_this20","_getEntryFromCache","_ref8","_getTokenUsingRefreshToken","_getTokenFromIFrame","oauthTokenScope","getTokenWithPopup","_this21","isAuthenticated","_this22","_buildLogoutUrl","logoutParams","federated","logout","_this23","prompt","_this24","crossOriginIsolated","createElement","setAttribute","style","display","contains","removeChild","appendChild","_this25","_saveEntryInCache","_this26","_this27","_this28","T","_x19","_this29","Auth0ClientFactory","configFactory","Auth0Client","env","VERSION","full","Auth0ClientService","AuthConfigService","AuthClientConfig","AbstractNavigator","Router","navigateByUrl","replaceState","i1","AuthState","isLoadingSubject$","refresh$","accessToken$","ReplaySubject","errorSubject$","isLoading$","accessTokenTrigger$","scan","acc","current","previous","isAuthenticatedTrigger$","loading","merge","mergeMap","isAuthenticated$","user$","authenticated","idTokenClaims$","error$","setIsLoading","isLoading","refresh","setAccessToken","accessToken","setError","AuthService","authState","appStateSubject$","ngUnsubscribe$","appState$","checkSessionOrCallback$","isCallback","iif","condition","trueResult","falseResult","shouldHandleCallback","catchError","errorPath","getAccessTokenSilently","client","throwError","getAccessTokenWithPopup","withLatestFrom","project","otherValues","hasValue","ready","every","noop","search","searchParams","skipRedirectCallback","AuthGuard","redirectIfUnauthenticated","canActivateChild","childRoute","loggedIn","AuthModule","useFactory","createClient","deps","makeSession","startingTime","timestampInSeconds","session","sid","uuid4","init","timestamp","started","errors","ignoreDuration","sessionToJSON","dropUndefinedKeys","did","abnormal_mechanism","attrs","release","environment","ip_address","ipAddress","user_agent","userAgent","updateSession","email","username","closeSession","ActionCellComponent","onActionCellClick","actionCellClick","_ActionCellComponent","UiNavigationExitBackComponent","bsHubService","UiNavigationExitType","infoLabel","exitActionHandler","NONE","exitActionTrigger","skipActionEmit","observers","dispatch","fromBack","_UiNavigationExitBackComponent","translator","words","correctGrammaticalCase","wordKey","word","CONSOLE_LEVELS","originalConsoleMethods","consoleSandbox","wrappedFuncs","wrappedLevels","originalConsoleMethod","logger","getGlobalSingleton","makeLogger","enabled","isEnabled","DEBUG_BUILD","defaultConfig","keyPrefix","capacityInBytes","itemMaxSize","defaultTTL","defaultPriority","warningThreshold","currentSizeKey","getByteLength","str","charCode","getCurrentTime","getCurrentSizeKey","CacheErrorCode","NoCacheItem","NullNextNode","NullPreviousNode","assert","createAssertionFunction","ConsoleLogger","StorageCacheCommon","keyValueStorage","sanitizeConfig","getModuleName","configure","getCurrentCacheSize","getStorage","debug","cacheItemOptions","prefixedKey","fillCacheItem","byteSize","removeCacheItem","isCacheFull","validKeys","clearInvalidAndGetRemainingKeys","sizeToPop","popOutItems","setCacheItem","cached","isExpired","updateVisitedTime","getAllKeys","getAllCacheKeys","text","itemSize","decreaseCurrentSizeInBytes","removeItemError","increaseCurrentSizeInBytes","visitedTime","amount","setItemErr","spaceItemNeed","cacheThresholdSpace","cur","items","remainedSize","remainingKeys","omitSizeKey","StorageCache","getLocalStorageWithFallback","KeyValueStorage","createInstance","Cache","BsCacheService","production","reject","_BsCacheService","processRelativeTime","stringToByteArray$1","base64","byteToCharMap_","charToByteMap_","byteToCharMapWebSafe_","charToByteMapWebSafe_","ENCODED_VALS_BASE","ENCODED_VALS","ENCODED_VALS_WEBSAFE","HAS_NATIVE_SUPPORT","encodeByteArray","webSafe","init_","byteToCharMap","byte1","haveByte2","byte2","haveByte3","byte3","outByte3","outByte4","encodeString","decodeString","bytes","c1","c2","c3","byteArrayToString","decodeStringToByteArray","charToByteMap","byte4","DecodeBase64StringError","base64urlEncodeWithoutPadding","utf8Bytes","base64Encode","base64Decode","getDefaults","getGlobal","__FIREBASE_DEFAULTS__","process","defaultsJsonString","getDefaultsFromEnvVariable","decoded","getDefaultsFromCookie","info","getDefaultAppConfig","Deferred","promise","wrapCallback","isBrowserExtension","runtime","chrome","browser","isIndexedDBAvailable","indexedDB","validateIndexedDBOpenable","preExist","DB_CHECK_NAME","onsuccess","deleteDatabase","onupgradeneeded","onerror","areCookiesEnabled","cookieEnabled","FirebaseError","customData","captureStackTrace","ErrorFactory","service","serviceName","fullCode","replaceTemplate","PATTERN","aKeys","bKeys","aProp","bProp","thing","DEFAULT_INTERVAL_MILLIS","DEFAULT_BACKOFF_FACTOR","MAX_VALUE_MILLIS","RANDOM_FACTOR","calculateBackoffMillis","backoffCount","intervalMillis","backoffFactor","currBaseValue","randomWait","getModularInstance","_delegate","States","resolvedSyncPromise","SyncPromise","rejectedSyncPromise","reason","PENDING","RESOLVED","REJECTED","executor","__init","__init2","__init3","__init4","_state","_handlers","_resolve","_reject","onfulfilled","onrejected","_executeHandlers","onfinally","isRejected","_setResult","isThenable","_value","cachedHandlers","handler","VgOverlayPlayModule","NgxMaskModule","configValue","NEW_CONFIG","INITIAL_CONFIG","initialConfig","_configFactory","MaskApplierService","_NgxMaskModule","initConfig","STACKTRACE_FRAME_LIMIT","UNKNOWN_FUNCTION","WEBPACK_ERROR_REGEXP","STRIP_FRAME_REGEXP","createStackParser","parsers","sortedParsers","skipFirstLines","framesToPop","frames","lines","cleanedLine","frame","stripSentryFramesAndReverse","localStack","getLastStackFrame","function","reverse","filename","stackParserFromStackParserOptions","stackParser","defaultFunctionName","getFunctionName","getFramesFromEvent","exception","stacktrace","scheduler","PlatformNotSupportedError","AmplifyError","AmplifyErrorCode","PlatformNotSupported","LoanStatus","LoansService","apiCache","bsCacheService","currencyPipe","_bsApi","_route","listen","getPayrollAccountStatus","groomCardData","startingData","case_type","DesktopCardCaseType","LOAN_DASHBOARD","defaultSegment","seg","DesktopSegmentType","partnerName","queryParamMap","loanPayload","toPromise","loan","loans","isTaken","LOAN_PROCESS_PENDING","LOAN_PENDING","ACCOUNT_CREATED","LOAN_APPROVED","LOAN_FUNDED","LOAN_PROCESS_ERROR","LOAN_OFFERED","APPLICATION_TECHNICAL_ISSUE","USER_ACTION_REQUIRED","APPLICATION_REVIEW","LOAN_ACCEPTED","dynamicValue","remainingBalance","kvmap","ctaPath","keyval","loanState","vendor","consent","cardtype","getLoanLink","force","refreshItem","getPayrollSchedule","_LoansService","EXTERNAL_SAVINGS_ICON","ExternalSavingsService","savingsAccountService","linkedAccountService","accounts","SavingsAccountType","BRIGHTSIDE","acct","prev","curr","balance","SavingsTransactionStatus","CANCELED","SCHEDULED","POSTED","FinicityTransactionStatus","SHADOW","LINKING","LinkedAccountStatus","UNVERIFIED_ELIGIBLE","UNVERIFIED_NEW","ACTIVE","groups","tfgroup","LinkedAccountType","TRANSFER_FUNDS","getSavingsAccounts","includeAccountNumber","allAccounts","getBrightsideAccount","getExternalAccounts","bsAccount","extAccts","_getBrightsideAccount","getSavingsAccount","_getExternalAccounts","getSavingsAch","achDetails","accountName","institutionName","lastFourAccountNumber","account_number","last_four_accnum","icon","mapped","EXTERNAL","branding","getAccountFromTypeAndId","getSavingsTotalBalance","getSavingsTotalBalanceFromAccounts","hasBrightsideSavingsAccount","hasFunctionalSavingsAccount","hasExternalSavingsAccount","hasInternalOrExternalSavingsAccount","getAccountTransactions","getBrightsideSavingsTransactions","getExternalSavingsTransactions","_getBrightsideSavingsTransactions","filterCategory","getSavingsTransactions","_getExternalSavingsTransactions","transactions","tx","is_credit","createdDate","transaction_date","_getBrightsideTxStatusFromLabel","transactionId","merchant","transactionDateStr","_getExternalTxStatusFromStatus","getAccountBalance","_getAchLinkedBanks","getLinkedBanks","getAchLinkedBanks","bank_name","accountType","account_class","last_four","institutionLogo","bank_logo","_getLinkedStatusFromLinkedBank","_getExternalAccountsAsLinked","TRACK_BALANCE","institutionLoginId","_getLinkedStatusFromFinicityStatus","getLinkedAccountGroups","hasAccount","achAccts","_deleteExternalAccount","institutionId","unlinkExternalAccount","acctToDelete","_ExternalSavingsService","SavingsCardDataService","extSavingsService","featureFlagSvc","bsApi","handleBannerSideAffect","infoBlue","helixAccount","savingsAccount","segment","availableBalance","groomSpendingCard","helixSpendingAccount","spendingAccount","_SavingsCardDataService","CashFlowGroomerFunction","card","fsIntroRoutePath","CardService","savingsCardDataService","loansSvc","creditSvc","cards","SAVINGS","CONTEST","SPENDING","CASH_FLOW","expandable","products","financialTools","groomDesktopFinancialToolCardData","waysWeCanHelp","moreForYouToExplore","cardToasts","EligibleProduct","payrollSavings","CREDIT_SCORE","getDesktopHomeCards","getActivatedCards","getHomeCards","getProducts","responses","active","convertCardsToDesktopCards","convertHomeCardsToDesktopCards","getDesktopExploreCards","exploreCards","convertExploreCardsToDesktopCards","mobileState","home","getHomeBlockCards","baseCards","baseCardTypes","addTheseOn","explore","rtnArry","getExploreCards","getCardMap","EMERGENCY_CASH","CREDIT_CARD_REFI","getServiceMap","activatedCards","creditScore","groomingFunction","groomingService","getCards","_CardService","noCreditData","creditSyncing","monthsShortWithDots","monthsShortWithoutDots","monthsStrictRegex","monthsShortStrictRegex","longMonthsParse","shortMonthsParse","UiMoleculeMediaType","UiMediaComponent","_UiMediaComponent","VgStates","VG_ENDED","VG_PAUSED","VG_PLAYING","VG_LOADING","VgApiService","medias","playerReadyEvent","isPlayerReady","onPlayerReady","fsAPI","getDefaultMedia","getMasterMedia","master","vgMaster","isMasterDefined","getMediaById","play","pause","$$getAllProperties","currentTime","$$setAllProperties","volume","playbackRate","rate","canPlay","canPlayThrough","isMetadataLoaded","isWaiting","isCompleted","isLive","isMaster","buffered","subscriptions","textTracks","seekTime","byPercent","$$seek","addTextTrack","$$addTextTrack","property","left","registerElement","elem","videogularElement","registerMedia","unregisterMedia","VgControlsHiddenService","isHiddenSubject","isHidden","hidden","VgUtilsService","elementZIndex","zIndex","tags","getElementsByTagName","getComputedStyle","orientation","isIpadOS","maxTouchPoints","platform","VgFullscreenApiService","nativeFullscreen","isFullscreen","onChangeFullscreen","APIs","w3","element","exit","onchange","newWebkit","oldWebkit","moz","ios","polyfill","isiOSDevice","isAvailable","fsElemDispatcher","fsChangeSubscription","fromEvent","onFullscreenChange","toggleFullscreen","isMobileDevice","enterElementInFullScreen","VgEvents","VG_ABORT","VG_CAN_PLAY","VG_CAN_PLAY_THROUGH","VG_DURATION_CHANGE","VG_EMPTIED","VG_ENCRYPTED","VG_ERROR","VG_LOADED_DATA","VG_LOADED_METADATA","VG_LOAD_START","VG_PAUSE","VG_PLAY","VG_PROGRESS","VG_RATE_CHANGE","VG_SEEK","VG_SEEKED","VG_SEEKING","VG_STALLED","VG_SUSPEND","VG_TIME_UPDATE","VG_VOLUME_CHANGE","VG_WAITING","VG_LOAD","VG_ENTER","VG_EXIT","VG_START_ADS","VG_END_ADS","VgMediaDirective","api","end","isBufferDetected","checkInterval","currentPlayPos","lastPlayPos","playAtferSync","bufferDetected","vgMedia","nodeName","durationChange","emptied","encrypted","ended","loadedData","loadedMetadata","loadStart","playing","progress","rateChange","seeked","seeking","stalled","suspend","timeUpdate","volumeChange","waiting","startAds","endAds","mutation","domObs","MutationObserver","mutations","observe","childList","attributes","disconnect","mutationObs","onMutation","canPlayObs","onCanPlay","canPlayThroughObs","onCanPlayThrough","loadedMetadataObs","onLoadMetadata","waitingObs","onWait","progressObs","onProgress","endedObs","playingObs","onStartPlaying","playObs","onPlay","pauseObs","onPause","timeUpdateObs","onTimeUpdate","volumeChangeObs","onVolumeChange","errorObs","prepareSync","canPlayAll","canPlayAllSubscription","readyState","syncSubscription","startSync","mut","attributeName","src","loadMedia","removedNodes","stopBufferCheck","load","playPromise","Infinity","specifiedDuration","startBufferCheck","bufferCheck","checkBufferSubscription","mode","newTrack","ɵdir","_c0","VgPlayerComponent","controlsHidden","isNativeFullscreen","areControlsHidden","onMediaReady","ngAfterContentInit","onHideControls","fsState","getZIndex","contentQueries","dirIndex","_t","outputs","features","ngContentSelectors","encapsulation","services","InputComponent","ngControl","valueAccessor","togglePassword","isPassword","ngAfterViewInit","autoFocus","el","focus","isDisabled","inputModelChange","onFocus","hasFocus","isFocused","onBlur","showHidePassword","hidePass","infoClicked","emitInfoClicked","_InputComponent","_angular_core__WEBPACK_IMPORTED_MODULE_1__","trigger","minHeight","visibility","opacity","transition","animate","gbl","msCrypto","getRandomByte","randomUUID","typedArray","getFirstException","getEventDescription","event_id","eventId","firstException","addExceptionTypeValue","addExceptionMechanism","newMechanism","currentMechanism","mechanism","handled","mergedData","checkOrSetAlreadyCaught","isAlreadyCaptured","__sentry_captured__","addNonEnumerableProperty","ParagraphComponent","_ParagraphComponent","aValue","digit","vlq","toVLQSigned","VLQ_BASE","aIndex","aOutParam","continuation","strLen","decode","VLQ_BASE_SHIFT","fromVLQSigned","shifted","rest","TRACEPARENT_REGEXP","propagationContextFromHeaders","sentryTrace","baggage","traceparentData","extractTraceparentData","traceparent","parentSampled","traceId","parentSpanId","dynamicSamplingContext","baggageHeaderToDynamicSamplingContext","generateTraceId","spanId","generateSpanId","virtualSpanId","sampled","dsc","generateSentryTraceHeader","sampledString","GenericBrowserDomAdapter","ɵDomAdapter","supportsDOMEvents","BrowserDomAdapter","ɵsetRootDomAdapter","onAndCancel","evt","listener","dispatchEvent","node","parentNode","tagName","doc","getDefaultDocument","createHtmlDocument","implementation","createHTMLDocument","isElementNode","nodeType","Node","ELEMENT_NODE","isShadowRoot","DocumentFragment","getGlobalEventTarget","getBaseHref","getBaseElementHref","baseElement","querySelector","getAttribute","relativePath","urlParsingNode","pathName","pathname","resetBaseElement","getUserAgent","getCookie","ɵparseCookieValue","TRANSITION_ID","SERVER_TRANSITION_PROVIDERS","APP_INITIALIZER","appInitializerFactory","transitionId","ApplicationInitStatus","donePromise","dom","ɵgetDOM","querySelectorAll","DOCUMENT","Injector","BrowserXhr","build","XMLHttpRequest","EVENT_MANAGER_PLUGINS","EventManager","plugins","_zone","_eventNameToPlugin","manager","_plugins","eventName","_findPluginFor","addGlobalEventListener","getZone","plugin","supports","EventManagerPlugin","_doc","SharedStylesHost","_stylesSet","addStyles","additions","onStylesAdded","getAllStyles","DomSharedStylesHost","_hostNodes","head","_addStylesToHost","styleNodes","styleEl","textContent","addHost","hostNode","removeHost","removeStyle","styleNode","NAMESPACE_URIS","svg","xhtml","xlink","xml","xmlns","math","COMPONENT_REGEX","COMPONENT_VARIABLE","HOST_ATTR","CONTENT_ATTR","flattenStyles","compId","flat","decoratePreventDefault","eventHandler","preventDefault","returnValue","DomRendererFactory2","eventManager","sharedStylesHost","appId","rendererByCompId","defaultRenderer","DefaultDomRenderer2","createRenderer","ViewEncapsulation","Emulated","renderer","EmulatedEncapsulationDomRenderer2","applyToHost","ShadowDom","ShadowDomRenderer","begin","APP_ID","destroyNode","namespace","createElementNS","createComment","createText","createTextNode","parent","newChild","isTemplateNode","insertBefore","refChild","oldChild","selectRootElement","selectorOrNode","preserveContent","nextSibling","namespaceUri","setAttributeNS","removeAttribute","removeAttributeNS","addClass","classList","removeClass","setStyle","RendererStyleFlags2","DashCase","Important","setProperty","removeProperty","nodeValue","contentAttr","shimContentAttribute","componentShortId","hostAttr","shimHostAttribute","hostEl","shadowRoot","attachShadow","nodeOrShadowRoot","DomEventsPlugin","MODIFIER_KEYS","_keyMap","Del","Esc","Left","Right","Up","Down","Menu","Scroll","Win","MODIFIER_KEY_GETTERS","alt","altKey","ctrlKey","meta","metaKey","shiftKey","KeyEventsPlugin","parseEventName","parsedEvent","outsideHandler","eventCallback","fullKey","runOutsideAngular","domEventName","_normalizeKey","codeIX","modifierName","fullKeyCode","keycode","modifierGetter","matchEventFullKeyCode","runGuarded","keyName","platformBrowser","createPlatformFactory","platformCore","ɵPLATFORM_BROWSER_ID","PLATFORM_INITIALIZER","initDomAdapter","makeCurrent","_document","ɵsetDocument","BROWSER_MODULE_PROVIDERS_MARKER","TESTABILITY_PROVIDERS","ɵTESTABILITY_GETTER","BrowserGetTestability","addToWindow","registry","ɵglobal","getAngularTestability","findInAncestors","testability","findTestabilityInTree","getAllAngularTestabilities","getAllTestabilities","getAllAngularRootElements","getAllRootElements","frameworkStabilizers","testabilities","count","didWork","decrement","didWork_","whenStable","getTestability","parentElement","ɵTESTABILITY","Testability","TestabilityRegistry","BROWSER_MODULE_PROVIDERS","ɵINJECTOR_SCOPE","ErrorHandler","errorHandler","RendererFactory2","XhrFactory","BrowserModule","providersAlreadyPresent","ApplicationModule","Title","getTitle","title","setTitle","newTitle","createTitle","DomSanitizer","DomSanitizerImpl","sanitize","SecurityContext","HTML","ɵallowSanitizationBypassAndThrow","ɵunwrapSafeValue","ɵ_sanitizeHtml","STYLE","SCRIPT","ɵ_sanitizeUrl","RESOURCE_URL","ɵXSS_SECURITY_URL","bypassSecurityTrustHtml","ɵbypassSanitizationTrustHtml","bypassSecurityTrustStyle","ɵbypassSanitizationTrustStyle","bypassSecurityTrustScript","ɵbypassSanitizationTrustScript","bypassSecurityTrustUrl","ɵbypassSanitizationTrustUrl","bypassSecurityTrustResourceUrl","ɵbypassSanitizationTrustResourceUrl","domSanitizerImplFactory","timeoutProvider","delegate","ModalComponent","sizeClass","modalWidth","heightClass","modalHeight","_closeModal","closeModal","_ModalComponent","_DOM","getDOM","setRootDomAdapter","adapter","DomAdapter","PlatformLocation","historyGo","relativePosition","useBrowserPlatformLocation","BrowserPlatformLocation","LOCATION_INITIALIZED","_init","_history","history","getBaseHrefFromDOM","onPopState","onHashChange","hostname","hash","newPath","pushState","supportsState","forward","back","go","createBrowserPlatformLocation","joinWithSlash","slashes","endsWith","stripTrailingSlash","pathEndIdx","normalizeQueryParams","LocationStrategy","inject","PathLocationStrategy","APP_BASE_HREF","_platformLocation","_removeListenerFns","_baseHref","prepareExternalUrl","internal","includeHash","externalUrl","HashLocationStrategy","Location","locationStrategy","_subject","_urlChangeListeners","_urlChangeSubscription","_locationStrategy","baseHref","_basePath","_stripOrigin","_stripIndexHtml","ev","isCurrentPathEqualTo","_stripBasePath","basePath","_notifyUrlChangeListeners","onUrlChange","fnIndex","onThrow","onReturn","createLocation","CURRENCIES_EN","ADP","AFN","ALL","AMD","AOA","ARS","AUD","AZN","BAM","BBD","BDT","BHD","BIF","BMD","BND","BOB","BRL","BSD","BWP","BYN","BYR","BZD","CAD","CHF","CLF","CLP","CNY","COP","CRC","CUC","CUP","CZK","DJF","DKK","DOP","EGP","ESP","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GNF","GTQ","GYD","HKD","HNL","HRK","HUF","IDR","ILS","INR","IQD","IRR","ISK","ITL","JMD","JOD","JPY","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LTL","LUF","LVL","LYD","MGA","MGF","MMK","MNT","MRO","MUR","MXN","MYR","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PHP","PKR","PLN","PYG","RON","RSD","RUB","RWF","SBD","SEK","SGD","SHP","SLE","SLL","SOS","SRD","SSP","STD","STN","SYP","THB","TMM","TND","TOP","TRL","TRY","TTD","TWD","TZS","UAH","UGX","USD","UYI","UYU","UYW","UZS","VEF","VND","VUV","XAF","XCD","XOF","XPF","XXX","YER","ZAR","ZMK","ZMW","ZWD","NumberFormatStyle","Decimal","Percent","Currency","Scientific","FormStyle","Format","Standalone","TranslationWidth","Narrow","Abbreviated","Wide","Short","FormatWidth","Medium","Long","Full","NumberSymbol","Group","List","PercentSign","PlusSign","MinusSign","Exponential","SuperscriptingExponent","PerMille","TimeSeparator","CurrencyDecimal","CurrencyGroup","getLocaleDateFormat","width","getLastDefinedValue","ɵfindLocaleData","ɵLocaleDataIndex","DateFormat","getLocaleTimeFormat","TimeFormat","getLocaleDateTimeFormat","dateTimeFormatData","DateTimeFormat","getLocaleNumberSymbol","symbol","NumberSymbols","checkFullData","ExtraData","LocaleId","extractTime","DEFAULT_NB_OF_CURRENCY_DIGITS","ISO8601_DATE_REGEX","NAMED_FORMATS","DATE_FORMATS_SPLIT","ZoneWidth","ShortGMT","Extended","DateType","FullYear","Month","Hours","Minutes","Seconds","FractionalSeconds","Day","TranslationType","DayPeriods","Days","Months","Eras","formatDate","timezone","parsedNb","isoStringToDate","tzHour","tzMin","dateSetter","timeSetter","getNamedFormat","dateTimezoneOffset","timezoneToOffset","convertTimezoneToLocal","reverseValue","addDateMinutes","dateFormatter","getDateFormatter","DATE_FORMATS","formatter","dateStrGetter","dateGetter","weekNumberingYearGetter","weekGetter","timeZoneGetter","newDate","localeId","getLocaleId","formatValue","shortTime","shortDate","formatDateTime","mediumTime","mediumDate","longTime","longDate","fullTime","fullDate","opt_values","padNumber","num","digits","minusSign","negWrap","neg","strNum","getDatePart","formatFractionalSeconds","localeMinus","extended","getDateTranslation","getLocaleMonthNames","formStyle","MonthsFormat","MonthsStandalone","getLocaleDayNames","DaysFormat","DaysStandalone","currentHours","currentMinutes","rules","getLocaleExtraDayPeriodRules","rule","dayPeriods","getLocaleExtraDayPeriods","findIndex","afterFrom","beforeTo","getLocaleDayPeriods","amPm","DayPeriodsFormat","DayPeriodsStandalone","getLocaleEraNames","erasData","JANUARY","THURSDAY","getThursdayThisWeek","datetime","monthBased","nbDaysBefore1stDayOfMonth","today","thisThurs","firstThurs","getFirstThursdayOfYear","fallback","requestedTimezoneOffset","NUMBER_FORMAT_REGEXP","MAX_DIGITS","DECIMAL_SEP","ZERO_CHAR","PATTERN_SEP","GROUP_SEP","DIGIT_CHAR","CURRENCY_CHAR","formatCurrency","currency","currencyCode","digitsInfo","pattern","parseNumberFormat","minInt","minFrac","maxFrac","posPre","posSuf","negPre","negSuf","gSize","lgSize","patternParts","positive","negative","positiveParts","integer","fraction","ch","trunkLen","getLocaleNumberFormat","NumberFormats","getNumberOfCurrencyDigits","formatNumberToLocaleString","groupSymbol","decimalSymbol","isPercent","formattedText","isZero","parsedNumber","parseNumber","integerLen","zeros","numStr","exponent","toPercent","fractionLen","minFraction","maxFraction","minIntPart","minFractionPart","maxFractionPart","parseIntAutoRadix","roundNumber","fractionSize","roundAt","dropTrailingZeros","minLen","carry","reduceRight","decimals","parseCookieValue","cookieStr","eqIndex","cookieName","cookieValue","NgClass","_iterableDiffers","_keyValueDiffers","_ngEl","_renderer","_iterableDiffer","_keyValueDiffer","_initialClasses","_rawClass","klass","_removeClasses","_applyClasses","ngClass","ɵisListLikeIterable","ngDoCheck","iterableChanges","_applyIterableChanges","keyValueChanges","_applyKeyValueChanges","forEachAddedItem","record","_toggleClass","currentValue","forEachChangedItem","forEachRemovedItem","previousValue","ɵstringify","rawClassVal","NgForOfContext","$implicit","ngForOf","first","even","odd","NgForOf","_viewContainer","_template","_differs","_ngForOf","_ngForOfDirty","_differ","ngForTrackBy","_trackByFn","ngForTemplate","_applyChanges","viewContainer","forEachOperation","adjustedPreviousIndex","currentIndex","previousIndex","createEmbeddedView","view","move","applyViewChange","ilen","forEachIdentityChange","NgIf","templateRef","_context","NgIfContext","_thenTemplateRef","_elseTemplateRef","_thenViewRef","_elseViewRef","_updateView","ngIfThen","assertTemplate","ngIfElse","SwitchView","_viewContainerRef","_templateRef","_created","enforceState","created","NgSwitch","_defaultUsed","_caseCount","_lastCaseCheckIndex","_lastCasesMatched","ngSwitch","_ngSwitch","_updateDefaultCases","_addCase","_addDefault","_defaultViews","_matchCase","useDefault","NgSwitchCase","_view","ngSwitchCase","NgSwitchDefault","NgStyle","_ngStyle","ngStyle","_setStyle","nameAndUnit","NgTemplateOutlet","_viewRef","ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector","invalidPipeArgumentError","ɵRuntimeError","ngDevMode","SubscribableStrategy","createSubscription","async","updateLatestValue","dispose","subscription","PromiseStrategy","_promiseStrategy","_subscribableStrategy","AsyncPipe","_latestValue","_subscription","_obj","_strategy","_subscribe","_selectStrategy","_updateLatestValue","ɵisPromise","ɵisSubscribable","LowerCasePipe","unicodeWordMatch","TitleCasePipe","txt","UpperCasePipe","DATE_PIPE_DEFAULT_TIMEZONE","DATE_PIPE_DEFAULT_OPTIONS","DatePipe","defaultTimezone","LOCALE_ID","CurrencyPipe","_defaultCurrencyCode","isValue","getCurrencySymbol","getLocaleCurrencies","Currencies","symbolNarrow","strToNumber","DEFAULT_CURRENCY_CODE","SlicePipe","PLATFORM_BROWSER_ID","PLATFORM_SERVER_ID","isPlatformServer","ViewportScroller","BrowserViewportScroller","setOffset","getScrollPosition","supportsScrolling","pageXOffset","pageYOffset","scrollToPosition","position","scrollTo","scrollToAnchor","elSelected","findAnchorFromDocument","documentResult","getElementById","getElementsByName","createTreeWalker","createShadowRoot","treeWalker","NodeFilter","SHOW_ELEMENT","currentNode","nextNode","scrollToElement","setHistoryScrollRestoration","scrollRestoration","supportScrollRestoration","rect","getBoundingClientRect","top","scrollRestorationDescriptor","getScrollRestorationProperty","getPrototypeOf","writable","getOwnPropertyDescriptor","BsHubService","Hub","_BsHubService","numbersPast","numbersFuture","verbalNumber","lift","operator","observable","observerOrNext","isSubscriber","isObserver","isSubscription","SafeSubscriber","_trySubscribe","sink","promiseCtor","getPromiseCtor","Symbol_observable","operations","pipeFromArray","UiHeaderType","MicroCoreUtilTrackingDirective","onClick","dontLog","isDismissButton","custom","isClickable","secondaryCta","cleanEventName","eventNameArray","cleanCustomParams","customParams","error_view","dismissedCta","isInputElement","_MicroCoreUtilTrackingDirective","monthsShortDot","EMPTY","seen","isIterable","Symbol_iterator","VgHlsDirective","API","vgHlsHeaders","onGetBitrates","crossorigin","preload","vgFor","autoStartLoad","xhrSetup","xhr","withCredentials","setRequestHeader","createPlayer","hls","startLoad","vgHls","destroyPlayer","Hls","isSupported","video","on","Events","MANIFEST_PARSED","_event","videoList","qualityIndex","bitrate","mediaType","levels","LEVEL_LOADED","live","loadSource","attachMedia","setBitrate","nextLevel","exportAs","VgStreamingModule","fill","replacementFactory","wrapped","markFunctionWrapped","configurable","getOriginalFunction","__sentry_original__","convertToPlainObject","isError","getOwnProperties","isEvent","newObj","serializeEventTarget","currentTarget","CustomEvent","isInstanceOf","detail","isElement","htmlTreeAsString","extractedProps","extractExceptionKeysForMessage","maxLength","firstKey","truncate","includedKeys","serialized","inputValue","_dropUndefinedKeys","memoizationMap","isPojo","isPlainObject","memoVal","lastDigit","last2Digits","HrModalComponent","button","_elementRef","dismissed","_HrModalComponent","resultSelector","innerSubscriber","isComplete","checkComplete","innerIndex","outerIndex","innerValue","delayWhen","delayDurationSelector","subscriptionDelay","ignoreElements","delay","due","asyncScheduler","REGEX_NEWLINE","isSourceNode","SourceNode","aLine","aColumn","aChunks","sourceContents","fromStringWithSourceMap","aGeneratedCode","aRelativePath","remainingLines","shiftNextLine","lastGeneratedLine","lastGeneratedColumn","lastMapping","nextLine","addMappingWithCode","aChunk","chunk","prepend","walk","aFn","aSep","newChildren","replaceRight","aPattern","aReplacement","lastChild","walkSourceContents","toStringWithSourceMap","sourceMappingActive","lastOriginalSource","lastOriginalLine","lastOriginalColumn","lastOriginalName","idx","sourceContent","depth","maxProperties","visit","ERROR","normalizeToSize","object","maxSize","normalized","jsonSize","utf8Length","encodeURI","memo","memoBuilder","hasWeakSet","WeakSet","inner","memoize","unmemoize","stringified","stringifyValue","_events","isVueViewModel","isSyntheticEvent","objName","getConstructorName","__sentry_skip_normalization__","remainingDepth","__sentry_override_normalization_depth__","valueWithToJSON","numAdded","visitable","visitKey","NoEndpointId","Unknown","NetworkError","onUnhandledError","onStoppedNotification","useDeprecatedNextContext","safeAdd","lsw","md5cmn","bitRotateLeft","cnt","md5ff","md5gg","md5hh","md5ii","binlMD5","olda","oldb","oldc","oldd","binl2rstr","length32","rstr2binl","length8","rstr2hex","hexTab","str2rstrUTF8","unescape","rawMD5","rstrMD5","rawHMACMD5","rstrHMACMD5","bkey","ipad","opad","md5","raw","hexHMACMD5","hexMD5","define","isPromise","BillboardArticleComponent","_BillboardArticleComponent","HowWeHelpComponent","titleCase","companyService","appOnClick","stopPropagation","introVideoClicked","company","iconPath","one","two","four","five","three","six","displayMe","_HowWeHelpComponent","METRICS_SPAN_FIELD","getMetricSummaryJsonForSpan","span","exportKey","summary","MaskService","_formElement","applyMask","maskExpression","maskIsShown","showMaskTyped","showMaskInInput","formControlResult","getSymbol","selStart","newInputValue","hiddenInput","actualResult","actualValue","selEnd","shiftTypedSymbols","getActualValue","thousandSeparator","decimalMarker","dropSpecialCharacters","maskSpecialCharacters","hideInput","prefNmask","applyValueChanges","activeElement","clearIfNotMatchFn","maskAvailablePatterns","compare","_checkSymbolMask","symbolToReplace","currSymbol","replaceSymbol","inputVal","shownMaskExpression","_checkForIp","_checkForCpfCnpj","placeHolderCharacter","clearIfNotMatch","formElementProperty","checkSpecialCharAmount","mask","_findSpecialChar","removeMask","_removeMask","_removeSuffix","_removePrefix","cpf","cnpj","writingValue","_checkSymbols","specialCharactersForRemove","_regExpForRemove","_retrieveSeparatorValue","separatorPrecision","_retrieveSeparatorPrecision","separatorValue","isNumberValue","_checkPrecision","maskExpretion","separatorExpression","_MaskService","RequiredLegalDocumentsComponent","legalDocumentsService","docsSubmitted","displayDocsRequiredModal","displayGeneralError","confirmCheckbox","requiredTrue","requiredDocs$","requiredDocuments","documentsKey","getRequiredDocuments","closeButtonRoute","showCloseButton","showBackbutton","docsSubmittedResponse","onSubmit","acceptRequiredDocuments","handleCloseClick","routeToPath","closeButtonEvent","success","termsSubmittedEvent","refetchDocuments","confirmDataForm","closeError","hideGeneralError","handleDocClick","downloadUrl","sendOutgoing","EXTERNAL_LINK","bridgeSetting","chatIcon","emitBackButtonEvent","backButtonEvent","_RequiredLegalDocumentsComponent","_angular_core__WEBPACK_IMPORTED_MODULE_5__","LegalDocumentsService","argsArgArrayOrObject","combineLatestInit","valueTransform","maybeSchedule","remainingFirstValues","hasFirstValue","createObject","mapOneOrManyArgs","execute","executeSchedule","MenuComponent","elementRef","targetElement","clickedInside","hasAttribute","toggle","_MenuComponent","UiHeaderMenuComponent","MENU","hide","handleMenuItemSelect","menuItem","menuItemUpdateStateWithHandler","state_menu","menuItemActionHandler","handleMenuToggleOpenClose","actionMenu","_UiHeaderMenuComponent","DisplayMessageComponent","pageTitleImage","pageSecondaryCtaLabelKey","isTemplateFullScreen","pageIsFullScreen","pageOnForwardCtaData","_DisplayMessageComponent","_angular_core__WEBPACK_IMPORTED_MODULE_3__","CHECKBOX_VALUE_ACCESSOR","forwardRef","CheckboxComponent","cd","checkbox","readonly","checked","updateModel","addValue","removeValue","onModelChange","checkboxChanged","handleChange","isChecked","onModelTouched","focused","_CheckboxComponent","safeJoin","delimiter","stringMatchesSomePattern","testString","patterns","requireExactStringMatch","isMatchingPattern","isRegExp","ClickStyleDirective","_ClickStyleDirective","SCOPE_SPAN_FIELD","_setSpanForScope","_getSpanForScope","isAsyncIterable","asyncIterator","root","__webpack_require__","__WEBPACK_AMD_DEFINE_FACTORY__","StackFrame","FIREFOX_SAFARI_STACK_REGEXP","CHROME_IE_STACK_REGEXP","SAFARI_NATIVE_CODE_REGEXP","parseOpera","parseV8OrIE","parseFFOrSafari","extractLocation","urlLike","sanitizedLine","locationParts","functionName","fileName","lineNumber","columnNumber","functionNameRegex","parseOpera9","parseOpera11","parseOpera10","lineRE","argsRaw","functionCall","hasError","thrownError","_throwIfClosed","defaultIfEmpty","relativeTimeMr","remainingCompletions","remainingEmissions","sourceIndex","_arrayLikeToArray","DIGITS","parseDigit","character","parseDigits","_step","_iterator","_createForOfIteratorHelperLoose","allowArrayLike","it","_unsupportedIterableToArray","AnchorComponent","prefixIconName","hasPrefix","suffixIconName","hasSuffix","_AnchorComponent","SharedDisplayCompleteComponent","SharedDisplayCampaignComponent","_SharedDisplayCompleteComponent","SharedDisplayFormSettings","pageAdditionalInformation","pageCalloutInformation","pageConfirmCheckText","pageHeaderIconName","pageCellRedirectPath","pageSecondaryCtaEvent","pageOnBackCtaEvent","pageSubTitleColor","pageSubTitleStyle","cellClicked","pageFormForceAsValid","pageFormControlsObservable","getCellRedirectRoute","controlKey","SharedDisplayChoiceStyle","SharedDisplayFormChoiceComponent","questions","choice","changesDebounces","updateFormOnChange","actionClickResponder","clickResponder","noopFunction","question","updateWithValue","foundMapping","choiceValueMapping","CHECKBOX","currentVal","formGroup","storeValue","hasValueAlready","choiceVal","selectedChoices","gr","handleActionCellClick","click","_SharedDisplayFormChoiceComponent","SharedDisplayFormFileComponent","inputSupportMultiple","cellDetails","supportMultiple","inputSupportedFiles","supportedFiles","cellClick","_SharedDisplayFormFileComponent","SharedDisplayHalfsheetComponent","sendIncomingEventAndDismiss","triggerCode","builder","halfsheetConfigAndReturnStandardEvent","dismissModal","displayAnalytics","showHalfsheet","halfSheetSettings","internalHubEvent","onPrimaryClick","primaryCta","onSecondaryClick","_SharedDisplayHalfsheetComponent","SharedDisplayFormComponent","show","setUpHalfSheetListener","updateSharedConfig","hubWatchers","hubWatcher","extractControlsWithDisplayRules","displayRuleControlConfigs","sharedFormControls","setUpFormWatcher","latestValues","isFormValid","formReadyToCheck","valid","forceValid","displayRuleCheckDebounces","checkControlsAgainstDisplayRules","cleanControlsAgainstDisplayRules","addHubListenerWithEventFilter","channel","MessageBusEventChannel","INTERNAL","filterByEvents","SHOW_HALFSHEET","callbackListener","halfSheetEventData","setupStaticFormControls","addCheckboxControl","addKeyboardSpacer","formControlConfig","insertCheckboxControl","setupAsyncFormControls","formControls","addControl","displayRuleMapping","showIfTrue","latestVal","formKey","objKey","hideIfTrue","generateWrappedFunctionValueUpdate","updatedTotal","sendInternalHubEvent","handleFormCellClick","handleFormActionCellClick","redirectPath","handleLanguageSelectChange","option","MessageBusInternalEventKey","CHANGED_LANGUAGE","showLanguageSelect","_SharedDisplayFormComponent","DisplayReviewSettings","pageAddActionText","pageDisplayCells","pageDisplayQuestionAnswer","pageEmptyText","pageExtraModal","pageOnAddActionCtaPath","pageSecondaryCtaPath","pageShowAsFlipped","pageExtraInfoListDetail","SharedDisplayReviewComponent","displayReviewAnalytics","handleCellClick","cell","onClickPath","handleCloseAction","handleAddAction","_SharedDisplayReviewComponent","SharedDisplayWaitingSettings","triggerWaitingStatusCheck","SharedDisplayWaitingComponent","_SharedDisplayWaitingComponent","SharedDisplayContentArraySettings","pageContentArray","pageContentArrayKey","SharedDisplayContentListComponent","setUpConfirmCheckbox","checkboxForm","controlConfirmCheckbox","_SharedDisplayContentListComponent","_SharedDisplayModule","SelectDropDownModule","ICON_NAME_UNSELECTED","UseThisForStandaloneOrThat","DELETE_HALF_SHEET_CONFIG","subText","MessageBusHalfsheetStyle","WARNING","SIZE_HALF_SHEET_CONFIG","PRIMARY","SIZE_HALF_SHEET_CONFIG_NO_CAPTURE","_putFileIntoCache","SAVE_FILE","docKey","docValue","_buildFileStringAndPutToCache","retry","reader","FileReader","readAsBinaryString","onload","showAndReactToFileSizeHalfSheet","INCOMING","MessageBusIncomingEventKey","HALF_SHEET","fileInput","SharedDisplayFormDocumentUtil","getSetting","selected","emphasize","unselected","deleteHalfSheet","removeSelectedDocument","startDocumentUploadCapture","responseSubscriber","fileAsBase64","files","startDocumentUploadPicker","SharedDisplayFormUtil","ExtractValuesAndMapToType","specialMapping","keyMapping","hasSpecialMapping","hasKeyMapping","buildingObj","nextKey","specialInsertKey","keyInsertObj","newVal","attribute","SharedDisplayFormFileActionResponder","targetControlConfig","DocumentUploadMarkControlFilled","iconNameRight","originalLabelSubLeft","labelSubLeft","DocumentUploadAddRemoveActionEvent","originalActionEvent","markAsDirty","markAsUntouched","getSymbolIterator","getFlowStep","flow","phase","campaign","survey","apiCall","faIntro","OnboardingSurveyStep","settings","canSkipQuestions","questionSettings","isAnOnboardingCampaign","isAnOnboardingRedirect","isAnOnboardingApiCall","mapFlowStepFromString","step","OnboardingFlowStepType","API_CALL","COMPLETE","CAMPAIGN","REDIRECT","SURVEY","FAINTRO","UNKNOWN","TEMPLATE","CampaignEventStatus","OnboardingFlowStepStatus","onboardingStatusFromCampaignStatus","SKIPPED","SUCCESS","FAILED","NEUTRAL","OnboardingCampaignType","FlowManagerService","translateSvc","removeItemStatic","storeOnboardingResponse","fetchOnboardingResponse","onboardingAlreadyActive","enterOnboarding","exitOnboarding","storePostOnboarding","postEndpoint","clearPostOnboarding","buildStepDetails","flowStep","isAnOnboardingSurvey","buildStepSurvey","isAnOnboardingTemplate","buildStepTemplate","isAnOnboardingFaIntro","QuestionsSettings","surveyType","fbSubCategory","textBody","cta","executeGet","API_BASIC","BASE_PATH","executePost","executePut","UpdateOwner","getCurrent","updateWithPost","updateWithPut","getNextValidStep","flowResp","postOnboarding","endpoint","nextStep","ONBOARDING_CREDIT","titleKey","image","textBodyKey","textBodyAlign","textBodyNoWrap","isCreditIntro","apiResponse","getFAIntroFlow","ctaKey","secondaryCtaPath","_FlowManagerService","RegistrationService","unpackSkipCreationReferral","storeReferralToSession","referralItems","referralSessionInfo","skipAccountCreation","clearReferralItems","createAccountForSSO","callPostClientAccount","submitAccountCode","newRegistrationPrecheck","forgotPasswordPrecheck","isRegistration","changeNumber","devicePushId","companyList","endPoint","postProvisional","submitEmployeeAliasPrecheck","workstate","zipCode","lName","unique_id","work_state","lastName","zip_code","submitEmployeeAlias","employee_alias","submitHomeAddress","submitClientUpdate","ssn","_RegistrationService","ActionArticleComponent","footerEl","footerWrapper","footerActionsContainer","primaryCTA","actionCount","footerWidth","offsetWidth","centeredFooter","_ActionArticleComponent","CellComponent","_isClickable","clicked","cellContainer","getSeparatorClassName","separatorType","None","Offset","Center","onSwitchChange","switchToggled","_CellComponent","LogType","DEBUG","INFO","WARN","VERBOSE","LOG_LEVELS","_pluggables","_padding","_ts","dt","_log","loggerLevelName","LOG_LEVEL","BIND_ALL_LOG_LEVELS","pushLogs","verbose","addPluggable","pluggable","getCategoryName","AWS_CLOUDWATCH_CATEGORY","listPluggables","binarySearch","quickSort","SourceMapConsumer","aSourceMap","sourceMap","sections","IndexedSourceMapConsumer","BasicSourceMapConsumer","fromArray","Mapping","lastOffset","_sections","offsetLine","offsetColumn","generatedOffset","consumer","__generatedMappings","_parseMappings","__originalMappings","_charIsMappingSeparator","GENERATED_ORDER","ORIGINAL_ORDER","GREATEST_LOWER_BOUND","LEAST_UPPER_BOUND","aCallback","aContext","aOrder","_generatedMappings","_originalMappings","at","allGeneratedPositionsFor","needle","_findMapping","lastColumn","smc","generatedMappings","destGeneratedMappings","destOriginalMappings","srcMapping","destMapping","cachedSegments","originalMappings","aNeedle","aMappings","aLineName","aColumnName","aComparator","aBias","computeColumnSpans","nextMapping","hasContentsOfAllSources","sc","nullOnMissing","fileUriAbsPath","generatedPositionFor","sectionIndex","section","bias","generatedPosition","sectionMappings","adjustedMapping","__SENTRY_DEBUG__","ObjectUnsubscribedError","createErrorClass","_super","currentObservers","isStopped","subject","AnonymousSubject","observed","_checkFinalizedStatuses","_innerSubscribe","EMPTY_SUBSCRIPTION","arrRemove","_b","ErrorStackParser","StackGenerator","StackTraceGPS","_options","stackframe","sourceCache","_generateError","_merge","_isShapedLikeParsableError","_filtered","stackframes","opts","fromError","generateArtificially","getSync","backtrace","gps","all","sf","resolveOriginal","pinpoint","stackFrames","instrument","errback","__stacktraceOriginalFn","instrumented","deinstrument","report","errorMsg","requestOptions","req","onreadystatechange","responseText","reportPayload","send","showBackArrow","dataFromRoute","instanceOfV4","getFbInfo","imageName","titleText","bodyText","primaryCtaText","secondaryCtaText","secondaryCtaKey","closeable","bodyTextAlign","bodyTextNoWrap","creditIntroItems","campaignEvent","handlePrimaryClick","handleSecondaryClick","ctaEvent","secondaryCtaEvent","_SharedDisplayCampaignComponent","IconComponent","iconBgSize","backgroundColor","_IconComponent","AsyncScheduler","AsyncAction","createImpl","ctorFunc","ListItemDetailsComponent","hasAvatar","hasTitle","hasDetail","hasLeftIcon","hasRightIcon","rightIconColor","blockStyle","avatarIconName","listTitle","listDetail","leftIconName","rightIconName","_ListItemDetailsComponent","FbDirective","isErrorView","_FbDirective","ExternalPartnerType","ExternalPartnerService","_bsApiService","_router","_modalService","_externalPartners$","_currentPartnerDetails$","getPartners","partnerKey","apiName","_endpoint","lenders","partners","getPartnerDetails","createGenericErrorModal","clearModal","_externalPartnerAttempts","_externalPartnerDetailMaxAttempts","partnerNotFound","partner","postToExternalPartner","resetExternalPartnerDetails","_ExternalPartnerService","_angular_core__WEBPACK_IMPORTED_MODULE_4__","MaskDirective","_maskService","specialCharacters","showTemplate","validation","separatorLimit","allowNegativeNumbers","_maskValue","_maskExpressionArray","_applyMask","ipError","_createValidationError","cpfCnpjError","withoutValidation","timeMasks","_validateTime","counterOfOpt","optional","onInput","_inputValue","_setMask","selectionStart","caretShift","backspaceShift","_backspaceShift","_position","positionToApply","_code","_getActualInputLength","setSelectionRange","onTouch","selectionEnd","keyCode","nextValue","onKeyDown","suffixCheckOnPressDelete","readOnly","_repeatPatternSymbols","maskExp","accum","currval","_start","_end","repeatNumber","repaceWith","rowMaskLen","requiredMask","_MaskDirective","MaintenanceProductType","MaintenanceService","_analytics","_msSvc","_bsAuthService","ensureInitialized","getRules","_bsHubService","getMobileStateRedirect","_rules","getValueAsString","reduceRulesToMaintenanceMap","product","inMaintenance","_productMaintenanceMap","isProductInMaintenance","productType","isAppInMaintenance","_appInMaintenance","fetchUserAttributes","guid","_MaintenanceService","MaintenancePageComponent","maintenanceService","_MaintenancePageComponent","MaintenanceFeatureComponent","goHome","_MaintenanceFeatureComponent","ROUTES","pathMatch","appDisplayStyle","LayoutStyle","FULL_SCREEN","OnboardingCompleteGuard","DesktopFeatureMaintenanceModule","_DesktopFeatureMaintenanceModule","MaintenanceGuard","_MaintenanceGuard","MaintenanceRedirectGuard","checkMaintenance","routeConfig","routePath","_MaintenanceRedirectGuard","BadgeIdFormComponent","firebase","profileService","termsService","clientConfirmationService","cacheStorageSvc","supportNumber","uniqueIdFormElement","UniqueIDFormElement","CONTROL_UNIQUE_ID","uniqueIdRetriesExceeded","maxRetriesExceeded","showMaxRetriesModal","cdnUrl","_company","companyReloaded","setUpRulesAndForm","processInterval","formSub","companyReload","aliasValidatorWithRules","aliasValidator","aliasValidatorRules","consentsKey","consentItem","consentPath","employeeAliasForm","uniqueIdControl","hasValidator","addValidators","errorTextKey","isFormReady","disableSubmit","acceptTerms","submitUniqueId","submitStatusCheck","statusCode","submitPreCheck","hideErrorModal","canContinue","showErrorModal","displayError","maxSoft","backClicked","showProcessErrorMessage","_BadgeIdFormComponent","_angular_core__WEBPACK_IMPORTED_MODULE_9__","instanceOfAny","constructors","idbProxyableTypes","cursorAdvanceMethods","cursorRequestMap","WeakMap","transactionDoneMap","transactionStoreNamesMap","transformCache","reverseTransformCache","idbProxyTraps","receiver","IDBTransaction","objectStoreNames","objectStore","wrap","transformCachableValue","wrapFunction","IDBDatabase","transaction","getCursorAdvanceMethods","IDBCursor","advance","continue","continuePrimaryKey","unwrap","storeNames","cacheDonePromiseForTransaction","unlisten","DOMException","getIdbProxyableTypes","IDBObjectStore","IDBIndex","Proxy","IDBRequest","promisifyRequest","readMethods","writeMethods","cachedMethods","getMethod","targetFuncName","useIndex","isWrite","storeName","replaceTraps","oldTraps","PlatformLoggerServiceImpl","container","getPlatformInfoString","getProviders","provider","isVersionServiceProvider","getComponent","getImmediate","library","logString","name$q","version$1","Logger","DEFAULT_ENTRY_NAME","PLATFORM_LOG_STRING","_apps","_serverApps","_components","_addComponent","app","addComponent","_registerComponent","componentName","serverApp","_getProvider","heartbeatController","getProvider","triggerHeartbeat","ERROR_FACTORY","FirebaseAppImpl","_isDeleted","_name","_automaticDataCollectionEnabled","automaticDataCollectionEnabled","_container","Component","checkDestroyed","isDeleted","appName","initializeApp","rawConfig","existingApp","ComponentContainer","newApp","getApp","registerVersion","libraryKeyOrName","variant","libraryMismatch","versionMismatch","warning","DB_NAME","DB_VERSION","STORE_NAME","dbPromise","getDbPromise","openDB","blocked","upgrade","blocking","terminated","openPromise","oldVersion","newVersion","db","createObjectStore","originalErrorMessage","computeKey","idbGetError","writeHeartbeatsToIndexedDB","heartbeatObject","HeartbeatServiceImpl","_heartbeatsCache","_storage","HeartbeatStorageImpl","_heartbeatsCachePromise","read","agent","getUTCDateString","heartbeats","lastSentHeartbeatDate","singleDateHeartbeat","earliestHeartbeatIdx","getEarliestHeartbeatIdx","earliestHeartbeatDate","overwrite","getHeartbeatsHeader","heartbeatsToSend","unsentEntries","extractHeartbeatsForHeader","heartbeatsCache","heartbeatEntry","hb","countBytes","headerString","_canUseIndexedDBPromise","runIndexedDBEnvironmentCheck","idbHeartbeatObject","readHeartbeatsFromIndexedDB","_x2","heartbeatsObject","existingHeartbeatsObject","registerCoreComponents","ezafeNumSuffix","PanelComponent","_PanelComponent","concatAll","mergeAll","intToCharMap","notifyEventProcessors","processors","hint","processor","final","parsedStackResults","lastKeysCount","cachedFilenameDebugIds","mergeScopeData","mergeData","contexts","sdkProcessingMetadata","breadcrumbs","fingerprint","eventProcessors","attachments","propagationContext","transactionName","mergeAndOverwriteScopeData","mergeVal","prepareEvent","isolationScope","normalizeDepth","normalizeMaxBreadth","prepared","dateTimestampInSeconds","integrations","applyClientOptions","dist","maxValueLength","DEFAULT_ENVIRONMENT","applyIntegrationsMetadata","integrationNames","sdk","applyDebugIds","filenameDebugIdMap","getFilenameToDebugIdMap","debugIdMap","_sentryDebugIds","debugIdKeys","stackKey","parsedStack","stackFrame","debugId","debug_id","finalScope","getFinalScope","captureContext","Scope","clientEventProcessors","getEventProcessors","getGlobalScope","getScopeData","applyScopeDataToEvent","applyDataToEvent","cleanedExtra","cleanedTags","cleanedUser","cleanedContexts","applySpanToEvent","trace","spanToTraceContext","getDynamicSamplingContextFromSpan","rootSpan","getRootSpan","spanToJSON","description","applyFingerprintToEvent","applyBreadcrumbsToEvent","mergedBreadcrumbs","applySdkMetadataToEvent","applyDebugMeta","abs_path","debug_meta","images","entries","code_file","normalizeEvent","maxBreadth","spans","parseEventHintOrCaptureContext","hintIsScopeOrFunction","hintIsScopeContext","captureContextKeys","NumbersOnlyDirective","onPaste","bsNumbersOnly","pastedInput","clipboardData","getData","allowDecimals","regexDecimalNumbers","regexNumbers","execCommand","onDrop","textData","dataTransfer","keyPressed","_NumbersOnlyDirective","selector","handledResult","innerSub","syncUnsub","errorMap","AssertionError","assertion","additionalContext","recoverySuggestion","hasDefaultValue","throwIfEmpty","EmptyError","TRACE_FLAG_NONE","TRACE_FLAG_SAMPLED","hasShownSpanDropWarning","spanToTransactionTraceContext","span_id","trace_id","spanContext","op","parent_span_id","isRemote","spanToTraceHeader","spanIsSampled","spanTimeInputToSeconds","ensureTimestampInSeconds","spanIsSentrySpan","getSpanJSON","spanIsOpenTelemetrySdkTraceBaseSpan","startTime","endTime","start_timestamp","getStatusMessage","SEMANTIC_ATTRIBUTE_SENTRY_OP","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","_metrics_summary","traceFlags","SPAN_STATUS_UNSET","SPAN_STATUS_OK","CHILD_SPANS_FIELD","ROOT_SPAN_FIELD","addChildSpanToSpan","childSpan","removeChildSpanFromSpan","getSpanDescendants","resultSet","addSpanChildren","childSpans","getActiveSpan","acs","getAsyncContextStrategy","getCurrentScope","showSpanDropWarning","ONE_SECOND_IN_MS","createUnixTimestampInSecondsFunc","performance","approxStartingTimeOrigin","timeOrigin","_browserPerformanceTimeOriginMode","browserPerformanceTimeOrigin","performanceNow","dateNow","timeOriginDelta","timeOriginIsReliable","navigationStart","timing","navigationStartDelta","LanguageSelectionModule","_LanguageSelectionModule","_BrightsideUiServicesModule","RoutingStateService","loadRouting","events","NavigationEnd","urlAfterRedirects","goBack","prevPage","_RoutingStateService","sizmekPixelMap","legrand","fivebelow","TrackingService","getSizmekPixelId","addPixels","pixelId","addSizmekPixel","dataLayer","_TrackingService","BlockComponent","handleBlockAction","blockAction","_BlockComponent","UnsubscriptionError","initialTeardown","_parentage","_finalizers","initialFinalizer","finalizer","execFinalizer","teardown","_hasParent","_addParent","_removeParent","KeyboardEvent","_eventType","MessageService","messageSource","clearSource","addAll","messages","_MessageService","isBrowserEnv","singleMatcher","multiMatcher","decodeComponents","components","right","splitOnFirst","separatorIndex","includeKeys","descriptor","enumerable","Reflect","ownKeys","isNullOrUndefined","strictUriEncode","encodeFragmentIdentifier","validateArrayFormatSeparator","decodeUriComponent","encodedURI","customDecodeURIComponent","replaceMap","decodeComponent","keysSorter","removeHash","hashStart","parseValue","parseNumbers","parseBooleans","extract","queryStart","arrayFormat","arrayFormatSeparator","parserForArrayFormat","accumulator","isEncodedArray","arrayValue","parameter","parameter_","key2","value2","shouldFilter","skipNull","skipEmptyString","encoderForArrayFormat","keyValueSep","objectCopy","parseUrl","url_","parseFragmentIdentifier","fragmentIdentifier","stringifyUrl","queryString","getHash","urlObjectForFragmentEncode","pick","exclude","ApplicationContextProviderImpl","getApplicationContext","versionName","getLanguage","os","deviceModel","EventBridgeImpl","queue","setEventReceiver","isEqual","obj1","obj2","primitive","typeA","isArrayA","isArrayB","sorted1","sorted2","ownProps","resArray","IdentityStoreImpl","userProperties","listeners","editIdentity","actingUserProperties","actingIdentity","setUserId","userId","setDeviceId","deviceId","setUserProperties","setOptOut","optOut","updateUserProperties","actingProperties","commit","setIdentity","getIdentity","originalIdentity","addIdentityListener","removeIdentityListener","safeGlobal","AnalyticsConnector","identityStore","eventBridge","applicationContextProvider","instanceName","analyticsConnectorInstances","enumerableOnly","symbols","sym","_objectSpread2","_defineProperty","getOwnPropertyDescriptors","defineProperties","_typeof","_classCallCheck","Constructor","_defineProperties","props","_toPropertyKey","_createClass","protoProps","staticProps","_toPrimitive","prim","toPrimitive","Constants","DEFAULT_INSTANCE","API_VERSION","MAX_STRING_LENGTH","MAX_PROPERTY_KEYS","IDENTIFY_EVENT","GROUP_IDENTIFY_EVENT","EVENT_LOG_URL","EVENT_LOG_EU_URL","DYNAMIC_CONFIG_URL","DYNAMIC_CONFIG_EU_URL","LAST_EVENT_ID","LAST_EVENT_TIME","LAST_IDENTIFY_ID","LAST_SEQUENCE_NUMBER","SESSION_ID","DEVICE_ID","OPT_OUT","USER_ID","DEVICE_ID_INDEX","USER_ID_INDEX","OPT_OUT_INDEX","SESSION_ID_INDEX","LAST_EVENT_TIME_INDEX","EVENT_ID_INDEX","IDENTIFY_ID_INDEX","SEQUENCE_NUMBER_INDEX","COOKIE_TEST_PREFIX","COOKIE_PREFIX","STORAGE_DEFAULT","STORAGE_COOKIES","STORAGE_NONE","STORAGE_LOCAL","STORAGE_SESSION","REVENUE_EVENT","REVENUE_PRODUCT_ID","REVENUE_QUANTITY","REVENUE_PRICE","REVENUE_REVENUE_TYPE","AMP_DEVICE_ID_PARAM","AMP_REFERRER_PARAM","REFERRER","REFERRING_DOMAIN","UTM_SOURCE","UTM_MEDIUM","UTM_CAMPAIGN","UTM_TERM","UTM_CONTENT","ATTRIBUTION_EVENT","TRANSPORT_HTTP","TRANSPORT_BEACON","GlobalScope","Base64","_keyStr","_encode","chr1","chr2","chr3","enc1","enc2","enc3","enc4","utftext","UTF8","escape","_decode","Buffer","isBuffer","logLevels","DISABLE","logLevel","validateInput","expectedType","validateProperties","propsType","copy","keyType","validatePropertyValue","invalidValueTypes","valueType","arrayCopy","elemType","validateGroupName","groupNameType","utils","setLogLevel","logLevelName","getLogLevel","isEmptyString","isWebWorkerEnvironment","WorkerGlobalScope","getQueryParam","sessionStorageEnabled","_truncateValue","validateGroups","groupsType","validateDeviceId","validateTransport","transport","sendBeacon","validateSessionId","sessionId","getLocation","getHost","defaultHostname","ca","expirationDays","getLastEventTime","parsedValue","strValue","baseCookie","cookieArray","trimStart","_createForOfIteratorHelper","normalCompletion","didErr","sortByEventTime","cookies","_toConsumableArray","_arrayWithoutHoles","_iterableToArray","iter","_nonIterableSpread","_areCookiesEnabled","uid","base64Id","topDomain","cname","_domainSpecific","nameEq","Cookie","stored","setRaw","getRaw","WorkerStorage","windowLocalStorageAvailable","globalStorage","div","attrKey","addBehavior","attr","XMLDocument","documentElement","localStorage$1","disableCookies","_storageOptionExists","storageOptionExists","MetadataStorage","loc","writableTopDomain","disableCookieStorage","_ref2","lastEventTime","identifyId","sequenceNumber","saveCookie","getCookieStorageKey","cookieKey","allCookies","latestCookie","AMP_OP_CLEAR_ALL","Identify","userPropertiesOperations","_addOperation","append","clearAll","setOnce","unset","preInsert","postInsert","operation","Request","XDomainRequest","xdr","ontimeout","onprogress","setHeaders","responseStatus","Revenue","_price","_productId","_quantity","_revenueType","_properties","setProductId","productId","setQuantity","setPrice","price","setRevenueType","revenueType","setEventProperties","eventProperties","_isValidRevenue","_toJSONObject","uuid","AmplitudeServerZone","US","EU","getEventLogApi","serverZone","eventLogUrl","DEFAULT_OPTIONS","apiEndpoint","batchEvents","cookieExpiration","sameSiteCookie","cookieForceUpgrade","deferInitialization","deviceIdFromUrlParam","eventUploadPeriodMillis","eventUploadThreshold","forceHttps","includeFbclid","includeGclid","includeReferrer","includeUtm","ingestionMetadata","sourceName","sourceVersion","logAttributionCapturedEvent","onExitPage","onNewSessionStart","plan","branch","versionId","savedMaxCount","saveEvents","saveParamsReferrerOncePerSession","secureCookie","sessionTimeout","trackingOptions","city","country","device_manufacturer","device_model","dma","os_name","os_version","region","version_name","unsetParamsReferrerOnNewSession","unsentKey","unsentIdentifyKey","uploadBatchSize","useDynamicConfig","serverZoneBasedApi","partnerId","instance$1","ConfigManager","ingestionEndpoint","dynamicConfigUrl","getDynamicConfigApi","AmplitudeClient","_instanceName","_unsentEvents","_unsentIdentifys","_q","_sending","_updateScheduled","_onInitCallbacks","_onNewSessionStartCallbacks","_eventId","_identifyId","_lastEventTime","_newSession","_sequenceNumber","_sessionId","_isInitialized","_connector","_userAgent","_ua","UAParser","getResult","apiKey","opt_userId","opt_config","opt_callback","_parseConfig","Prototype","augmentedWindow","augmentedArray","prototypeJsFix","_refreshDynamicConfig","_storageSuffix","_storageSuffixV5","_oldCookiename","_unsentKey","_unsentIdentifyKey","_cookieName","_metadataStorage","hasOldCookie","hasNewCookie","_useOldCookie","_deferInitialization","_generateApiPropertiesTrackingConfig","_apiPropertiesTrackingOptions","tracking_options","_upgradeCookieData","_loadCookieData","_pendingReadStorage","_loadSavedUnsentEvents","storedDeviceId","_getInitialDeviceId","initFromStorage","startNewSession","_unsetUTMParams","_trackParamsAndReferrer","_validateUnsentEventQueue","_saveCookieData","_sendEventsIfReady","_runNewSessionStartCallbacks","runQueuedFunctions","pageHandlersAdded","prevTransport","setTransport","_logEvent","eventType","editor","deleteLowerLevelDomainCookies","cookieHost","hostParts","cookieHostParts","deleteDomain","configDeviceId","_getDeviceIdFromUrlParam","_getUrlParams","event_properties","user_properties","utmProperties","referrerProperties","gclidProperties","fbclidProperties","_initUtmData","_saveReferrer","_getReferrer","_saveGclid","_saveFbclid","attributionProperties","freeFormObjectKeys","zeroAllowedKeys","parseValidateAndLoad","_apiKeySet","methodName","savedUnsentEventsString","_getFromStorage","unsentEvents","_parseSavedUnsentEventsString","_setInStorage","isNewSession","onInit","getSessionId","nextEventId","nextIdentifyId","nextSequenceNumber","_unsentCount","sendEvents","clearStorage","cookieData","_loadCookieDataProps","cookieParams","rawCookie","fetchParam","queryName","utmSource","utmMedium","utmCampaign","utmTerm","utmContent","utmData","addIfNotNull","getUtmData","_sendParamsReferrerUserProperties","identify","_getReferrerFromUrlParam","referrer","urlParams","gclid","fbclid","_getReferringDomain","referrerInfo","referring_domain","serializedUnsentEvents","serializedIdentifys","unsentIdentify","setDomain","_shouldDeferCall","setGroup","groupType","setSessionId","resetSessionId","regenerateDeviceId","sanitized","clearUserProperties","_convertProxyObjectToRealObject","proxy","identify_obj","opt_error_callback","outOfSession","_logErrorsWithCallbacks","groupIdentify","group_type","group_name","setVersionName","apiProperties","groupProperties","errorCallback","eventTime","osName","osVersion","major","device","deviceVendor","device_id","user_id","session_id","event_type","_shouldTrackField","api_properties","sequence_number","group_properties","partner_id","_isObservePlanSet","_isIngestionMetadataSet","ingestion_metadata","source_name","source_version","_limitEventsQueued","fields","logEventWithTimestamp","logEventWithGroups","_isNumber","logRevenueV2","revenue_obj","logRevenue","special","_logErrorsOnEvents","maxEventId","maxIdentifyId","queues","maxId","unsentEvent","removeEvents","_removeEvents","eventQueue","filteredEvents","numEvents","mergedEvents","_mergeEventsAndIdentifys","eventsToSend","uploadTime","upload_time","checksum","eventIndex","identifyIndex","noIdentifys","noEvents","setGlobalUserProperties","__VERSION__","setLibrary","_initializationDeferred","enableTracking","getDeviceId","getUserId","setMinTimeBetweenSessionsMillis","timeInMillis","setEventUploadThreshold","setUseDynamicConfig","setServerZone","setServerUrl","serverUrl","Amplitude","_instances","old","amplitude","newInstance","_iq","retryWhen","notifier","errors$","syncResub","subscribeForRetryWhen","decorator","adopt","settle","resume","__values","verb","CreditSetupService","apiSvc","CreditSetupStatus","VERIFY_OTP","VERIFY_KBA","FULFILLED","VERIFIED","ENROLLED","blankPatchToCreditSub","verifyWithData","verifyConfirm","skipForceVerify","rtnVerifyStatus","CreditSetupVerifyStatus","reasonCode","COMPLETE_UNCONFIRMED","verifyStatus","VerifyWithOtp","otpCode","ERROR_ALLOW_RETRY","rtnApiResponse","ERROR_FATAL","ERROR_NO_RETRY","VerifyWithKba","kbaRequest","MORE_INFORMATION","getSetupStatus","startSetup","_CreditSetupService","pluralForm","plurals","pluralize","NO_HUBCALLBACK_PROVIDED_EXCEPTION","concurrent","mergeInternals","onBeforeNext","expand","innerSubScheduler","additionalFinalizer","outerNext","doInnerSub","innerComplete","bufferedValue","BaseControlValueAccessor","BuiltInControlValueAccessor","DEFAULT_VALUE_ACCESSOR","DefaultValueAccessor","COMPOSITION_BUFFER_MODE","_compositionMode","_composing","_isAndroid","_handleInput","_compositionStart","_compositionEnd","NG_DEV_MODE$1","isEmptyInputValue","hasValidLength","NG_ASYNC_VALIDATORS","EMAIL_REGEXP","minValidator","actual","maxValidator","requiredValidator","requiredTrueValidator","emailValidator","minLength","minLengthValidator","maxLengthValidator","patternValidator","validators","compose","composeAsync","minlength","requiredLength","actualLength","maxlength","nullValidator","regexStr","requiredPattern","isPresent","toObservable","obs","ɵisObservable","mergeErrors","arrayOfErrors","executeValidators","validator","normalizeValidators","isValidatorFn","presentValidators","composeValidators","composeAsyncValidators","mergeValidators","controlValidators","dirValidator","getControlValidators","_rawValidators","getControlAsyncValidators","_rawAsyncValidators","makeValidatorsArray","currentValidators","validatorsToAdd","removeValidators","AbstractControlDirective","_onDestroyCallbacks","pristine","dirty","untouched","_setValidators","_composedValidatorFn","_setAsyncValidators","_composedAsyncValidatorFn","asyncValidator","_registerOnDestroy","_invokeOnDestroyCallbacks","errorCode","getError","ControlContainer","formDirective","NgControl","_parent","AbstractControlStatus","_cd","isTouched","isUntouched","isPristine","isDirty","isInvalid","isPending","isSubmitted","submitted","NgControlStatus","NgControlStatusGroup","describeKey","isFormGroup","NG_DEV_MODE","VALID","INVALID","DISABLED","pickValidators","validatorOrOpts","isOptionsObj","pickAsyncValidators","asyncValidators","assertControlPresent","isGroup","noControlsError","missingControlError","assertAllValuesPresent","_forEachChild","missingControlValueError","AbstractControl","_pendingDirty","_hasOwnPendingAsyncValidator","_pendingTouched","_onCollectionChange","_onDisabledChange","_assignValidators","_assignAsyncValidators","validatorFn","asyncValidatorFn","updateOn","_updateOn","setValidators","setAsyncValidators","addAsyncValidators","removeAsyncValidators","hasAsyncValidator","clearValidators","clearAsyncValidators","onlySelf","markAllAsTouched","_updateTouched","markAsPristine","_updatePristine","markAsPending","skipPristineCheck","_parentMarkedDirty","_updateValue","_updateAncestors","changeFn","setParent","getRawValue","_setInitialStatus","_cancelExistingSubscription","_runValidator","_calculateStatus","_runAsyncValidator","_updateTreeValidity","ctrl","_allControlsDisabled","_asyncValidationSubscription","setErrors","_updateControlsErrors","currPath","_find","_initObservables","_anyControlsHaveStatus","_anyControls","_anyControlsDirty","_anyControlsTouched","_registerOnCollectionChange","_setUpdateStrategy","coerceToValidator","coerceToAsyncValidator","_setUpControls","registerControl","removeControl","setControl","controlName","_reduceChildren","_syncPendingControls","subtreeUpdated","updated","child","_reduceValue","initValue","FormRecord","CALL_SET_DISABLED_STATE","setDisabledStateDefault","controlPath","setUpControl","callSetDisabledState","setUpValidators","setUpViewChangePipeline","_pendingValue","_pendingChange","updateControl","setUpModelChangePipeline","emitModelEvent","viewToModelUpdate","_unregisterOnChange","setUpBlurPipeline","setUpDisabledChangeHandler","onDisabledChange","registerOnDisabledChange","_unregisterOnDisabledChange","cleanUpControl","validateControlPresenceOnChange","cleanUpValidators","registerOnValidatorChange","onValidatorChange","isControlUpdated","updatedValidators","updatedAsyncValidators","emitModelToViewChange","isPropertyUpdated","viewModel","is","selectValueAccessor","valueAccessors","defaultAccessor","builtinAccessor","customAccessor","isBuiltInAccessor","removeListItem","list","isFormControlState","formState","_onChange","_applyFormState","nonNullable","initialValueIsDefault","emitViewToModelChange","formControlBinding$1","NgModel","resolvedPromise","_changeDetectorRef","_registered","_checkForErrors","_checkName","oldName","_getPath","_setUpControl","_updateDisabled","_isStandalone","_setUpStandalone","_checkParentType","disabledValue","ɵcoerceToBoolean","ChangeDetectorRef","ɵNgNoValidate","RadioControlRegistryModule","NG_MODEL_WITH_FORM_CONTROL_WARNING","formControlBinding","FormControlDirective","_ngModelWarningConfig","_ngModelWarningSent","_isControlChanged","previousForm","_ngModelWarningSentOnce","formDirectiveProvider","FormGroupDirective","_updateDomValue","directives","ngSubmit","_checkFormPresent","_updateValidators","_updateRegistrations","_oldForm","getControl","removeListItem$1","addFormGroup","_setUpFormContainer","removeFormGroup","_cleanUpFormContainer","getFormGroup","addFormArray","removeFormArray","getFormArray","syncPendingControls","onReset","resetForm","oldCtrl","newCtrl","isFormControl","setUpFormContainer","cleanUpFormContainer","controlNameBinding","FormControlName","_added","toInteger","AbstractValidatorDirective","_validator","inputName","normalizeInput","_enabled","createValidator","REQUIRED_VALIDATOR","RequiredValidator","MIN_LENGTH_VALIDATOR","MinLengthValidator","MAX_LENGTH_VALIDATOR","MaxLengthValidator","PATTERN_VALIDATOR","PatternValidator","ɵInternalFormsSharedModule","FormsModule","warnOnNgModelWithFormControl","FormArray","_adjustIndex","_registerControl","insert","removeAt","adjustedIndex","isAbstractControlOptions","FormBuilder","useNonNullable","nnfb","reducedControls","_reduceControls","newOptions","createdControls","_createControl","AsyncContextStack","assignedScope","assignedIsolationScope","_stack","_isolationScope","withScope","_pushScope","maybePromiseResult","_popScope","getClient","getStackTop","getScope","getIsolationScope","getAsyncContextStack","sentry","getDefaultCurrentScope","getDefaultIsolationScope","withSetScope","withIsolationScope","getStackAsyncContextStrategy","withSetIsolationScope","invalidTimingValue","isBrowser","isNode","optimizeGroupPlayer","players","NoopAnimationPlayer","ɵAnimationGroupPlayer","normalizeKeyframes$1","driver","normalizer","keyframes","preStyles","postStyles","normalizedKeyframes","previousOffset","previousKeyframe","kf","isSameOffset","normalizedKeyframe","normalizedValue","normalizePropertyName","ɵPRE_STYLE","AUTO_STYLE","normalizeStyleValue","animationFailed","listenOnPlayer","player","onStart","copyAnimationEvent","onDone","onDestroy","phaseName","makeAnimationEvent","triggerName","fromState","toState","totalTime","getOrSetDefaultValue","parseTimelineCommand","command","separatorPos","_contains","elm1","elm2","_query","_documentElement","getParentElement","Element","_CACHED_BODY","_IS_WEBKIT","containsElement","invokeQuery","NoopAnimationDriver","validateStyleProperty","getBodyNode","containsVendorPrefix","matchesElement","_element","_selector","computeStyle","easing","previousPlayers","scrubberAccessRequested","AnimationDriver","NOOP","ONE_SECOND","ENTER_CLASSNAME","LEAVE_CLASSNAME","NG_TRIGGER_CLASSNAME","NG_TRIGGER_SELECTOR","NG_ANIMATING_CLASSNAME","NG_ANIMATING_SELECTOR","resolveTimingValue","_convertTimeValueToMS","resolveTiming","timings","allowNegativeValues","parseTimeExpression","delayMatch","easingVal","containsErrors","startIndex","negativeStepValue","negativeDelayValue","copyObj","convertToMap","styleMap","copyStyles","backfill","getStyleAttributeString","writeStyleAttribute","styleAttrValue","getPropertyValue","camelCaseToDashCase","setStyles","formerStyles","camelProp","dashCaseToCamelCase","eraseStyles","normalizeAnimationEntry","steps","sequence","PARAM_REGEX","extractStyleParams","varName","localVal","invalidParamValue","iteratorToArray","DASH_CASE_REGEXP","visitDslNode","visitor","visitTrigger","visitState","visitTransition","visitSequence","visitGroup","visitAnimate","visitKeyframes","visitStyle","visitReference","visitAnimateChild","visitAnimateRef","visitQuery","visitStagger","invalidNodeType","ANY_STATE","parseTransitionExpr","transitionValue","expressions","parseInnerTransitionStr","eventStr","parseAnimationAlias","invalidTransitionAlias","invalidExpression","makeLambdaFromStates","TRUE_BOOLEAN_VALUES","FALSE_BOOLEAN_VALUES","lhs","rhs","LHS_MATCH_BOOLEAN","RHS_MATCH_BOOLEAN","lhsMatch","rhsMatch","SELF_TOKEN_REGEX","buildAnimationAst","metadata","warnings","AnimationAstBuilderVisitor","_driver","AnimationAstBuilderContext","_resetContextStyleTimingState","currentQuerySelector","collectedStyles","queryCount","depCount","states","transitions","invalidTrigger","definitions","def","stateDef","invalidDefinition","styleAst","astParams","containsDynamicStyles","missingSubs","invalidState","metadataName","animation","matchers","normalizeAnimationOptions","furthestTime","innerAst","timingAst","constructTimingAst","makeTimingAst","ast","dynamic","currentAnimateTimings","styleMetadata","isEmpty","newStyleData","_styleAst","isEmptyStep","_makeStyleAst","_validateStyleAst","metadataStyles","styleTuple","collectedEasing","styleData","tuple","collectedEntry","updateCollectedStyle","invalidParallelAnimation","firstStart","firstEnd","secondStart","secondEnd","validateStyleParams","invalidStyleParams","invalidKeyframes","totalKeyframesWithOffsets","offsets","offsetsOutOfOrder","keyframesOutOfRange","offsetVal","consumeOffset","invalidOffset","keyframeOffsetsOutOfOrder","keyframesMissingOffsets","animateDuration","durationUpToThisFrame","parentSelector","currentQuery","includeSelf","normalizeSelector","hasAmpersand","originalSelector","invalidStagger","currentTransition","unsupportedCSSPropertiesFound","normalizeParams","createTimelineInstruction","preStyleProps","postStyleProps","subTimeline","ElementInstructionMap","_map","instructions","existingInstructions","ENTER_TOKEN_REGEX","LEAVE_TOKEN_REGEX","buildAnimationTimelines","rootElement","enterClassName","leaveClassName","startingStyles","finalStyles","subInstructions","AnimationTimelineBuilderVisitor","buildKeyframes","AnimationTimelineContext","currentTimeline","delayNextStep","timelines","timeline","containsAnimation","lastRootTimeline","allowOnlyTimelineStyles","elementInstructions","innerContext","createSubContext","_visitSubInstructions","transformIntoNewTimeline","previousNode","_applyAnimationRefDelays","animationsRefsOptions","animationRefOptions","animationDelay","animationDelayValue","instruction","instructionTimings","appendInstructionToTimeline","updateOptions","subContextCount","snapshotCurrentStyles","DEFAULT_NOOP_PREVIOUS_NODE","applyStylesToKeyframe","innerTimelines","mergeTimelineCollectedStyles","_visitTiming","incrementTime","hasCurrentStyleProperties","forwardFrame","applyEmptyStep","innerTimeline","forwardTime","elms","currentQueryTotal","sameElementTimeline","currentQueryIndex","parentContext","tl","maxTime","currentStaggerTime","_enterClassName","_leaveClassName","initialTimeline","TimelineBuilder","skipIfExists","optionsToUpdate","newParams","paramsToUpdate","_copyOptions","oldParams","newTime","fork","updatedTimings","SubTimelineBuilder","stretchStartingKeyframe","elements","invalidQuery","_elementTimelineStylesLookup","_previousKeyframe","_currentKeyframe","_keyframes","_styleSummary","_localTimelineStyles","_pendingStyles","_backFill","_currentEmptyStepKeyframe","_globalTimelineStyles","_loadKeyframe","hasPreStyleStep","_updateStyle","allStyles","allProperties","getFinalKeyframe","details1","details0","finalKeyframes","keyframe","finalKeyframe","preProps","postProps","kf0","kf1","_stretchStartingKeyframe","newKeyframes","startingGap","newFirstKeyframe","oldFirstKeyframe","roundOffset","oldOffset","decimalPoints","mult","AnimationStyleNormalizer","DIMENSIONAL_PROP_SET","WebAnimationsStyleNormalizer","propertyName","userProvidedProperty","normalizedProperty","strVal","valAndSuffixMatch","invalidCssUnitValue","createTransitionInstruction","isRemovalTransition","fromStyles","toStyles","queriedElements","EMPTY_OBJECT","AnimationTransitionFactory","_triggerName","_stateStyles","nextState","oneOrMoreTransitionsMatch","matchFns","buildStyles","stateName","styler","currentOptions","nextOptions","skipAstBuild","transitionAnimationParams","currentStateStyles","nextAnimationParams","nextStateStyles","preStyleMap","postStyleMap","isRemoval","animationOptions","applyParamDefaults","elm","queriedElementsList","userParams","AnimationStateStyles","defaultParams","combinedParams","AnimationTrigger","_normalizer","transitionFactories","balanceProperties","fallbackTransition","createFallbackTransition","containsQueries","matchTransition","matchStyles","stateMap","key1","EMPTY_INSTRUCTION_MAP","TimelineAnimationEngine","bodyNode","_animations","_playersById","register","registerFailed","_buildPlayer","autoStylesMap","inst","missingOrDestroyedAnimation","createAnimationFailed","_getPlayer","missingPlayer","baseEvent","restart","finish","setPosition","QUEUED_CLASSNAME","DISABLED_CLASSNAME","EMPTY_PLAYER_ARRAY","NULL_REMOVAL_STATE","namespaceId","setForRemoval","setForMove","hasAnimation","removedBeforeQueried","NULL_REMOVED_QUERIED_STATE","REMOVAL_FLAG","StateValue","isObj","normalizeTriggerValue","absorbOptions","VOID_VALUE","DEFAULT_STATE_VALUE","AnimationTransitionNamespace","hostElement","_engine","_triggers","_queue","_elementListeners","_hostClassName","missingTrigger","missingEvent","isTriggerEventValid","unsupportedTriggerEvent","triggersWithStates","statesByElement","afterFlush","_getTrigger","unregisteredTrigger","defaultToFallback","TransitionAnimationPlayer","objEquals","k1","k2","reportError","playersOnElement","playersByElement","queued","isFallbackTransition","totalQueuedPlayers","deregister","entry","clearElementCache","elementPlayers","_signalRemovalForInnerTriggers","namespaces","fetchNamespacesByElement","ns","triggerLeaveAnimation","afterFlushAnimationsDone","destroyAfterComplete","triggerStates","previousTriggersValues","markElementAsRemoved","processLeaveNode","prepareLeaveAnimationListeners","elementStates","visitedTriggers","removeNode","engine","childElementCount","containsPotentialParentTransition","totalAnimations","currentPlayers","playersByQueriedElement","removalFlag","destroyInnerAnimations","_onRemovalComplete","insertNode","drainQueuedTransitions","microtaskId","destroyed","markedForDestroy","d0","d1","elementContainsData","containsData","TransitionAnimationEngine","newHostElements","disabledNodes","_namespaceLookup","_namespaceList","_flushFns","_whenQuietFns","namespacesByHostElement","collectedEnterElements","collectedLeaveElements","onRemovalComplete","queuedPlayers","createNamespace","_balanceNamespaceList","collectEnterElement","namespaceList","found","ancestor","ancestorNs","registerTrigger","_fetchNamespace","stateValue","markElementAsDisabled","isHostElement","hostNS","_buildInstruction","subTimelines","skipBuildAst","containerElement","destroyActiveAnimationsForElement","finishActiveQueriedAnimationOnElement","whenRenderingDone","flush","cleanupFns","_flushAnimations","quietFns","triggerTransitionsFailed","skippedPlayers","skippedPlayersMap","queuedInstructions","allPreStyleElements","allPostStyleElements","disabledElementsSet","nodesThatAreDisabled","allTriggerElements","enterNodeMap","buildRootMap","enterNodeMapIds","nodes","className","allLeaveNodes","mergedLeaveNodes","leaveNodesWithoutAnimations","leaveNodeMapIds","leaveNodeMap","allPlayers","erroneousTransitions","nodeIsOrphaned","stringMap","setVal","transitionFailed","allPreviousPlayersMap","animationElementMap","_beforeAnimationBuild","_getPreviousPlayers","prevPlayer","replaceNodes","replacePostStylesAsPre","postStylesMap","cloakAndComputeStyles","preStylesMap","pre","rootPlayers","subPlayers","NO_PARENT_ANIMATION_ELEMENT_DETECTED","overrideTotalTime","parentWithAnimation","parentsToAdd","detectedParent","innerPlayer","_buildAnimation","setRealPlayer","parentPlayers","parentPlayer","playersForElement","syncPlayerEvents","queriedPlayerResults","queriedInnerElements","queriedPlayers","activePlayers","removeNodesAfterAnimationDone","isQueriedElement","toStateValue","queriedElementPlayers","isRemovalAnimation","targetNameSpaceId","targetTriggerName","timelineInstruction","realPlayer","getRealPlayer","beforeDestroy","allQueriedPlayers","allConsumedElements","allSubElements","allNewPlayers","flattenGroupPlayers","finalPlayers","_flattenGroupPlayersRecur","wrappedPlayer","deleteOrUnsetInMap","currentValues","_player","_containsRealPlayer","_queuedCallbacks","callbacks","triggerCallback","_queueEvent","hasStarted","getPosition","cloakElement","oldValue","valuesMap","elementPropsMap","defaultStyle","cloakVals","failedElements","roots","rootMap","NULL_NODE","nodeSet","localRootMap","getRoot","postEntry","preEntry","AnimationEngine","_triggerCache","_transitionEngine","_timelineEngine","componentId","cacheKey","triggerBuildFailed","buildTrigger","onInsert","disableAnimations","eventPhase","SpecialCasedStyles","_startStyles","_endStyles","initialStyles","initialStylesByElement","_initialStyles","filterNonAnimatableStyles","isNonAnimatableStyle","WebAnimationsPlayer","_specialStyles","_onDoneFns","_onStartFns","_onDestroyFns","_initialized","_finished","_started","_destroyed","_originalOnDoneFns","_originalOnStartFns","currentSnapshot","_duration","_delay","_onFinish","_preparePlayerBeforeStart","domPlayer","_triggerWebAnimation","_finalKeyframe","_resetDomPlayerState","_convertKeyframesToObject","kfs","fromEntries","cancel","methods","WebAnimationsDriver","validateAnimatableStyleProperty","playerOptions","previousStyles","previousWebAnimationPlayers","allowPreviousPlayerStylesMerge","normalizeKeyframes","balancePreviousStylesIntoKeyframes","startingKeyframe","missingStyleProps","specialStyles","packageNonAnimatableStyles","startStyles","endStyles","BrowserAnimationBuilder","AnimationBuilder","rootRenderer","_nextAnimationId","issueAnimationCommand","BrowserAnimationFactory","AnimationFactory","_id","RendererAnimationPlayer","_command","_listen","DISABLE_ANIMATIONS_FLAG","AnimationRendererFactory","_currentId","_microtaskId","_animationCallbacksBuffer","_rendererCache","_cdRecurDepth","BaseAnimationRenderer","animationTriggers","AnimationRenderer","_scheduleCountTask","scheduleListenerCallback","_onDestroy","isMove","resolveElementFromTarget","parseTriggerCallbackName","dotIndex","SHARED_ANIMATION_PROVIDERS","ɵAnimationStyleNormalizer","instantiateDefaultStyleNormalizer","ɵWebAnimationsStyleNormalizer","ɵAnimationEngine","InjectableAnimationEngine","appRef","instantiateRendererFactory","ɵDomRendererFactory2","BROWSER_ANIMATIONS_PROVIDERS","ɵWebAnimationsDriver","ANIMATION_MODULE_TYPE","BROWSER_NOOP_ANIMATIONS_PROVIDERS","ɵNoopAnimationDriver","BrowserAnimationsModule","IdleExpiry","idValue","idlingValue","idling","expiry","Interrupt","onInterrupt","attach","detach","KeepaliveSvc","AlternativeStorage","storageMap","LocalStorage","_wrapped","LocalStorageExpiry","idleName","setExpiry","getExpiry","setIdling","getIdling","getIdleName","setIdleName","AutoResume","idle","notIdle","Idle","keepaliveSvc","timeoutVal","autoResume","interrupts","running","keepaliveEnabled","onIdleStart","onIdleEnd","onTimeoutWarning","onTimeout","getKeepaliveEnabled","setKeepaliveEnabled","getTimeout","getIdle","setIdle","getAutoResume","setAutoResume","setInterrupts","clearInterrupts","interrupt","innerArgs","getInterrupts","isRunning","isIdling","watch","skipExpiry","safeClearInterval","toggleState","startKeepalive","toggleInterrupts","watchFn","getExpiryDiff","setIdleIntervalOutsideOfZone","frequency","idleHandle","stopKeepalive","countdown","eventArgs","doCountdown","setTimoutIntervalOutsideZone","doCountdownInZone","intervalFn","timeoutHandle","handleName","ping","InterruptArgs","InterruptSource","attachFn","detachFn","isAttached","Zone","EventTargetInterruptSource","eventSubscription","throttleDelay","passive","eventTarget","fromEvents","eventSrc","filterEvent","DocumentInterruptSource","originalEvent","movementX","movementY","WindowInterruptSource","StorageInterruptSource","NgIdleModule","DEFAULT_INTERRUPTSOURCES","createDefaultInterruptSources","handlers","addHandler","maybeInstrument","instrumentFn","triggerHandlers","typeHandlers","WINDOW","DEBOUNCE_DURATION","debounceTimerID","lastCapturedEventType","lastCapturedEventTargetId","addClickKeypressInstrumentationHandler","instrumentDOM","triggerDOMHandler","globalDOMEventHandler","makeDOMEventHandler","targetObj","originalAddEventListener","__sentry_instrumentation_handlers__","handlerForType","refCount","originalRemoveEventListener","globalListener","_sentryCaptured","getEventTarget","shouldSkipDOMEvent","isContentEditable","_sentryId","isSimilarToLastCapturedEvent","SENTRY_XHR_DATA_KEY","addXhrInstrumentationHandler","instrumentXHR","xhrproto","originalOpen","xhrOpenThisArg","xhrOpenArgArray","virtualError","startTimestamp","request_headers","__sentry_own_request__","onreadystatechangeHandler","xhrInfo","status_code","endTimestamp","originalOnreadystatechange","onreadystatechangeThisArg","onreadystatechangeArgArray","originalSetRequestHeader","setRequestHeaderThisArg","setRequestHeaderArgArray","originalSend","sendThisArg","sendArgArray","sentryXhrData","lastHref","addHistoryInstrumentationHandler","instrumentHistory","supportsHistory","chromeVar","oldOnPopState","onpopstate","historyReplacementFunction","originalHistoryFunction","instrumentConsole","supportsFetch","Headers","Response","isNativeFunction","addFetchInstrumentationHandler","skipNativeFetchCheck","instrumentFetch","onFetchResolved","supportsNativeFetch","EdgeRuntime","sandbox","contentWindow","originalFetch","parseFetchArgs","fetchArgs","getUrlFromResource","hasProp","handlerData","fetchData","onFinishedResolving","responseReader","getReader","maxFetchDurationTimeout","readingActive","chunkTimeout","streamHandler","clonedResponseForResolving","resolveResponse","resource","installedIntegrations","getIntegrationsToSetup","defaultIntegrations","userIntegrations","integration","isDefaultInstance","resolvedUserIntegrations","finalIntegrations","filterDuplicates","integrationsByName","currentInstance","existingInstance","debugIndex","debugInstance","afterSetupIntegrations","afterAllSetup","setupIntegration","integrationIndex","setupOnce","setup","preprocessEvent","processEvent","addEventProcessor","DEFAULT_BREADCRUMBS","addBreadcrumb","breadcrumb","beforeBreadcrumb","maxBreadcrumbs","getOptions","mergedBreadcrumb","finalBreadcrumb","severityLevelFromString","getBreadcrumbLogLevelFromHttpStatusCode","ignoreOnError","shouldIgnoreOnError","wrapper","__sentry_wrapped__","sentryWrapped","wrappedArguments","ex","ignoreNextOnError","captureException","MAX_ALLOWED_STRING_LENGTH","breadcrumbsIntegration","addConsoleInstrumentationHandler","_getConsoleBreadcrumbHandler","category","_getDomBreadcrumbHandler","keyAttrs","serializeAttribute","maxStringLength","_isEvent","getComponentName","_getXhrBreadcrumbHandler","_getFetchBreadcrumbHandler","_getHistoryBreadcrumbHandler","parsedLoc","parsedFrom","parsedTo","_getSentryBreadcrumbHandler","_oldOnErrorHandler","addGlobalErrorInstrumentationHandler","instrumentError","__SENTRY_INSTRUMENTED__","_oldOnUnhandledRejectionHandler","addGlobalUnhandledRejectionInstrumentationHandler","instrumentUnhandledRejection","onunhandledrejection","exceptionFromError","parseStackFrames","extractType","extractMessage","eventFromError","skipLines","getSkipFirstStackStringLines","reactMinifiedRegexp","getPopFirstTopFrames","isWebAssemblyException","WebAssembly","Exception","eventFromUnknownInput","syntheticException","attachStacktrace","isUnhandledRejection","isErrorEvent","isDOMError","isDOMException","domException","eventFromString","eventFromPlainObject","errorFromProp","getErrorPropertyFromObject","__serialized__","getNonErrorObjectExceptionValue","synthetic","isParameterizedString","__sentry_template_string__","__sentry_template_values__","logentry","captureType","getObjectClassName","globalHandlersIntegration","stackTraceLimit","_installGlobalOnErrorHandler","_enhanceEventWithInitialFrame","ev0","ev0s","ev0sf","colno","lineno","getLocationHref","in_app","captureEvent","originalException","globalHandlerLog","_installGlobalOnUnhandledRejectionHandler","_getUnhandledRejectionError","isPrimitive","_eventFromRejectionWithPrimitive","applyAggregateErrorsToEvent","exceptionFromErrorImplementation","maxValueLimit","truncateAggregateExceptions","exceptions","aggregateExceptionsFromError","prevExceptions","exceptionId","newExceptions","applyExceptionGroupFieldsForParentException","newException","newExceptionId","applyExceptionGroupFieldsForChildException","childError","is_exception_group","exception_id","parentId","parent_id","linkedErrorsIntegration","httpContextIntegration","Referer","browserSessionIntegration","startSession","captureSession","DEFAULT_IGNORE_ERRORS","inboundFiltersIntegration","_hint","clientOptions","mergedOptions","_mergeOptions","internalOptions","allowUrls","denyUrls","ignoreErrors","disableErrorDefaults","ignoreTransactions","ignoreInternal","_shouldDropEvent","_isSentryError","_isIgnoredError","_getPossibleEventMessages","possibleMessages","lastException","_isUselessError","_isIgnoredTransaction","_isDeniedUrl","_getEventFilterUrl","_isAllowedUrl","_getLastValidUrl","originalFunctionToString","SETUP_CLIENTS","functionToStringIntegration","originalFunction","dedupeIntegration","previousEvent","currentEvent","_isSameMessageEvent","currentMessage","previousMessage","_isSameFingerprint","_isSameStacktrace","_isSameExceptionEvent","previousException","_getExceptionFromEvent","currentException","currentFrames","previousFrames","frameA","frameB","currentFingerprint","previousFingerprint","SENTRY_API_VERSION","DSN_REGEX","dsnToString","dsn","withPassword","pass","projectId","publicKey","dsnFromComponents","createEnvelope","addItemToEnvelope","envelope","newItem","forEachEnvelopeItem","envelopeItems","envelopeItem","encodeUTF8","encodePolyfill","serializeEnvelope","envHeaders","itemHeaders","stringifiedPayload","concatBuffers","buffers","totalLength","buf","merged","createSpanEnvelopeItem","spanJson","createAttachmentEnvelopeItem","attachment","content_type","contentType","attachment_type","attachmentType","ITEM_TYPE_TO_DATA_CATEGORY_MAP","sessions","client_report","user_report","profile","profile_chunk","replay_event","replay_recording","check_in","feedback","statsd","raw_security","envelopeItemTypeToDataCategory","getSdkMetadataForEnvelopeHeader","metadataOrEvent","createEventEnvelopeHeaders","sdkInfo","tunnel","sent_at","SentryError","parseSampleRate","sampleRate","ALREADY_SEEN_ERROR","BaseClient","_integrations","_numProcessing","_outcomes","_hooks","_eventProcessors","_dsn","makeDsn","dsnFromString","lastPath","projectMatch","validateDsn","isValidProtocol","getEnvelopeEndpointWithUrlEncodedAuth","_getIngestEndpoint","getBaseApiEndpoint","_encodedAuth","sentry_version","sentry_key","sentry_client","_metadata","_transport","recordDroppedEvent","transportOptions","undefinedOption","hintWithEventId","_process","eventFromException","_captureEvent","captureMessage","currentScope","eventMessage","promisedEvent","eventFromMessage","capturedSpanScope","sendSession","getDsn","getSdkMetadata","getTransport","_isClientDoneProcessing","clientFinished","transportFlushed","eventProcessor","_isEnabled","_setupIntegrations","getIntegrationByName","integrationName","addIntegration","isAlreadyInstalled","sendEvent","createEventEnvelope","enhanceEventWithSdkInfo","packages","envelopeHeaders","sendEnvelope","sendResponse","createSessionEnvelope","eventOrCount","sendClientReports","hook","cbIndex","setupIntegrations","_updateSessionFromEvent","crashed","errored","sessionNonTerminal","ticked","interval","_prepareEvent","setLastEventId","getTraceContextFromScope","getDynamicSamplingContextFromScope","_processEvent","finalEvent","isTransaction","isTransactionEvent","beforeSendLabel","parsedSampleRate","dataCategory","capturedSpanIsolationScope","__sentry__","processBeforeSend","beforeSend","beforeSendTransaction","beforeSendSpan","processedSpans","processedSpan","spanCountBeforeProcessing","_validateBeforeSendResult","beforeSendResult","invalidValueError","processedEvent","getSession","droppedSpanCount","transactionInfo","transaction_info","_clearOutcomes","outcomes","_flushOutcomes","createClientReportEnvelope","discarded_events","applySdkMetadata","BrowserClient","parentSpanIsAlwaysRootSpan","SENTRY_SDK_SOURCE","visibilityState","captureUserFeedback","createUserFeedbackEnvelope","createUserFeedbackEnvelopeItem","DEFAULT_EVENT_TARGET","browserApiErrorsIntegration","requestAnimationFrame","_wrapTimeFunction","_wrapRAF","_wrapXHR","eventTargetOption","_wrapEventTarget","xmlHttpRequestProps","wrapOptions","isEventListenerObject","handleEvent","originalEventHandler","createFrame","chromeRegexNoFnName","chromeRegex","chromeEvalRegex","geckoREgex","geckoEvalRegex","defaultStackParser","noFnParts","col","subMatch","extractSafariExtensionDetails","isSafariExtension","isSafariWebExtension","cachedImplementations","getNativeImplementation","impl","clearCachedImplementation","DEFAULT_RETRY_AFTER","isRateLimited","limits","disabledUntil","updateRateLimits","updatedRateLimits","rateLimitHeader","retryAfterHeader","retryAfter","categories","headerDelay","parseRetryAfterHeader","headerDate","DEFAULT_TRANSPORT_BUFFER_SIZE","getEventForEnvelopeItem","makeFetchTransport","nativeFetch","pendingBodySize","pendingCount","createTransport","makeRequest","makePromiseBuffer","task","taskProducer","drain","counter","capturedSetTimeout","bufferSize","rateLimits","filteredEnvelopeItems","filteredEnvelope","recordEnvelopeLoss","requestSize","referrerPolicy","keepalive","getDefaultIntegrations","autoSessionTracking","browserOptions","applyDefaultOptions","optionsArg","__SENTRY_RELEASE__","SENTRY_RELEASE","skipBrowserExtensionCheck","shouldShowBrowserExtensionError","windowWithMaybeExtension","extensionObject","runtimeId","isDedicatedExtensionPage","nw","initAndBind","clientClass","initialScope","setCurrentClient","setClient","timedEventsToMeasurements","measurements","SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT","SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE","bindReporter","metric","reportAllChanges","prevValue","delta","forceReport","rating","getRating","getNavigationEntry","checkResponseStart","navigationEntry","getEntriesByType","responseStart","getActivationStart","navEntry","activationStart","initMetric","navigationType","prerendering","wasDiscarded","PerformanceObserver","supportedEntryTypes","po","getEntries","onHidden","onHiddenOrPageHide","runOnce","called","firstHiddenTime","onVisibilityUpdate","timeStamp","removeChangeListeners","getVisibilityWatcher","whenActivated","FCPThresholds","CLSThresholds","onCLS","onReport","visibilityWatcher","onFCP","sessionValue","sessionEntries","handleEntries","hadRecentInput","firstSessionEntry","lastSessionEntry","takeRecords","FIDThresholds","onFID","handleEntry","processingStart","interactionCountEstimate","minKnownInteractionId","maxKnownInteractionId","updateEstimate","interactionId","longestInteractionList","longestInteractionMap","entryPreProcessingCallbacks","processInteractionEntry","entryType","minLongestInteraction","existingInteraction","latency","interaction","whenIdle","rIC","requestIdleCallback","INPThresholds","onINP","PerformanceEventTiming","durationThreshold","candidateInteractionIndex","interactionCount","estimateP98LongestInteraction","LCPThresholds","reportedMetricIDs","onLCP","stopListening","once","capture","TTFBThresholds","whenReady","onTTFB","_previousCls","_previousFid","_previousLcp","_previousTtfb","_previousInp","addClsInstrumentationHandler","stopOnCallback","addMetricObserver","instrumentCls","addLcpInstrumentationHandler","instrumentLcp","addFidInstrumentationHandler","instrumentFid","addInpInstrumentationHandler","instrumentInp","addPerformanceInstrumentationHandler","instrumentPerformanceObserver","getCleanupCallback","instrumentTtfb","SentryNonRecordingSpan","_traceId","_spanId","_timestamp","_key","setAttributes","_values","setStatus","_status","updateName","isRecording","addEvent","_attributesOrStartTime","_startTime","addLink","_link","addLinks","_links","recordException","_exception","_time","SCOPE_ON_START_SPAN_FIELD","ISOLATION_SCOPE_ON_START_SPAN_FIELD","getCapturedScopesOnSpan","SentrySpan","_attributes","_parentSpanId","_sampled","_endTime","_isStandaloneSpan","isStandalone","_onSpanEnded","updateStartTime","timeInput","SEMANTIC_ATTRIBUTE_SENTRY_SOURCE","logSpanEnd","isRootSpan","profile_id","SEMANTIC_ATTRIBUTE_PROFILE_ID","exclusive_time","SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME","is_segment","segment_id","attributesOrStartTime","isSpanTimeInput","isStandaloneSpan","sendSpanEnvelope","spanItems","createSpanEnvelope","dscHasRequiredProps","public_key","convertToSpanJSON","transactionEvent","_convertSpanToTransaction","isFullFinishedSpan","SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME","SUPPRESS_TRACING_KEY","startInactiveSpan","getAcs","spanArguments","parseSentrySpanArguments","initialCtx","experimental","forceTransaction","parentSpan","customParentSpan","withActiveSpan","getParentSpan","onlyIfParent","createChildOrRootSpan","hasTracingEnabled","_startChildSpan","_startRootSpan","freezeDscOnSpan","getPropagationContext","logSpanStart","infoParts","setCapturedScopesOnSpan","sampleSpan","samplingContext","normalizedRequest","enhancedSamplingContext","tracesSampler","tracesSampleRate","transactionContext","SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE","isMeasurementValue","startAndEndSpan","startTimeInSeconds","parentStartTime","startStandaloneWebVitalSpan","passedAttributes","replay","replayId","getReplayId","userDisplay","profileId","replay_id","getBrowserPerformanceAPI","msToSec","extractNetworkProtocol","nextHopProtocol","char","MAX_INT_AS_BYTES","_lcpEntry","_clsEntry","_performanceCursor","_measurements","startTrackingWebVitals","recordClsStandaloneSpans","mark","fidCleanupCallback","_trackFID","fid","lcpCleanupCallback","_trackLCP","lcp","ttfbCleanupCallback","_trackTtfb","addTtfbInstrumentationHandler","ttfb","clsCleanupCallback","trackClsAsStandaloneSpan","standaloneClsEntry","pageloadSpanId","standaloneCLsValue","supportsLayoutShift","sentSpan","_collectClsOnce","sendStandaloneClsSpan","clsValue","routeName","cleanupClsHandler","unsubscribeStartNavigation","activeSpan","spanJSON","_trackCLS","cls","_addPerformanceNavigationTiming","eventEnd","_getEndPropertyNameForNavigationTiming","setResourceEntrySizeData","dataKey","entryVal","LAST_INTERACTIONS","INTERACTIONS_SPAN_MAP","INP_ENTRY_MAP","pointerdown","pointerup","mousedown","mouseup","touchstart","touchend","mouseover","mouseout","mouseenter","mouseleave","pointerover","pointerout","pointerenter","pointerleave","dragstart","dragend","drag","dragenter","dragleave","dragover","drop","keydown","keyup","keypress","TRACING_DEFAULTS","idleTimeout","finalTimeout","childSpanTimeout","FINISH_REASON_HEARTBEAT_FAILED","FINISH_REASON_IDLE_TIMEOUT","FINISH_REASON_FINAL_TIMEOUT","FINISH_REASON_EXTERNAL_FINISH","startIdleSpan","startSpanOptions","activities","_idleTimeoutID","_finishReason","_autoFinishAllowed","disableAutoFinish","_cleanupHooks","beforeSpanEnd","previousActiveSpan","_startIdleSpan","_cancelIdleTimeout","_restartIdleTimeout","_restartChildSpanTimeout","onIdleSpanEnded","cleanup","SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON","discardedSpans","SPAN_STATUS_ERROR","childSpanJSON","childEndTimestamp","childStartTimestamp","spanStartedBeforeIdleSpanEnd","spanEndedBeforeFinalTimeout","stringifiedSpan","definedEndTimestamp","spanEndTimestamp","childEndTimestamps","latestSpanEndTimestamp","spanStartTimestamp","startedSpan","_pushActivity","endedSpan","_popActivity","spanToAllowAutoFinish","errorsInstrumented","tag","getTraceData","scopeToTraceHeader","dynamicSamplingContextToSentryBaggageHeader","instrumentFetchRequest","shouldCreateSpan","shouldAttachHeaders","spanOrigin","shouldCreateSpanResult","__span","endSpan","setHttpStatus","contentLength","contentLengthNum","fullUrl","getFullURL","hasParent","_addTracingHeadersToFetchRequest","fetchOptionsObj","traceHeaders","isRequest","isHeaders","newHeaders","prevBaggageHeader","prevHeaderStrippedFromSentryBaggage","stripBaggageHeaderOfSentryBaggageValues","headerName","headerValue","existingBaggageHeader","newBaggageHeaders","headerItem","baggageHeader","baggageEntry","SENTRY_BAGGAGE_KEY_PREFIX","responseToSpanId","spanIdToEndTimestamp","defaultRequestInstrumentationOptions","traceFetch","traceXHR","enableHTTPTimings","trackFetchStreamPerformance","addHTTPTimings","isPerformanceResourceTiming","initiatorType","resourceTimingEntryToSpanData","resourceTiming","timingSpanData","getAbsoluteTime","redirectStart","fetchStart","domainLookupStart","domainLookupEnd","connectStart","secureConnectionStart","connectEnd","requestStart","responseEnd","DEFAULT_BROWSER_TRACING_OPTIONS","instrumentNavigation","instrumentPageLoad","markBackgroundSpan","enableLongTask","enableLongAnimationFrame","enableInp","_experiments","browserTracingIntegration","registerSpanErrorInstrumentation","enableInteractions","enableStandaloneClsSpans","beforeStartSpan","shouldCreateSpanForRequest","_collectWebVitals","startTrackingINP","inpCallback","_trackINP","interactionType","spanToUse","startTrackingLongAnimationFrames","scripts","parentStartTimestamp","parentOp","initialScript","invoker","invokerType","sourceURL","sourceFunctionName","sourceCharPosition","startTrackingLongTasks","startTrackingInteractions","spanOptions","latestRoute","_createRouteSpan","isPageloadTransaction","finalStartSpanOptions","idleSpan","addPerformanceEntries","performanceEntries","transactionStartTime","_addNavigationSpans","_addRequest","requestStartTimestamp","responseEndTimestamp","responseStartTimestamp","_addMeasureSpans","requestTime","measureStartTimestamp","startTimeStamp","measureEndTimestamp","firstHidden","shouldRecord","fp","fcp","_addResourceSpans","resourceUrl","parsedUrl","deliveryType","renderBlockingStatus","_trackNavigator","connection","effectiveType","rtt","deviceMemory","hardwareConcurrency","_addTtfbRequestTimeToMeasurements","fidMark","recordClsOnPageloadSpan","measurementName","measurement","setMeasurement","_setWebVitalAttributes","loadTime","renderTime","emitFinish","startingUrl","maybeEndActiveSpan","traceOptions","getMetaContent","setPropagationContext","oldPropagationContext","startBrowserTracingPageLoadSpan","setTransactionName","startBrowserTracingNavigationSpan","registerBackgroundTabDetection","cancelledStatus","registerInteractionListener","inflightInteractionSpan","currentRootSpanOp","registerInpInteractionListener","_latestRoute","activeRootSpan","isPerformanceEventTiming","instrumentOutgoingRequests","tracePropagationTargets","shouldAttachHeadersWithTargets","targetUrl","resolvedUrl","currentOrigin","isSameOriginRequest","isRelativeSameOriginRequest","updatedTimestamp","addFetchEndInstrumentationHandler","createdSpan","xhrCallback","__sentry_xhr_span_id__","addTracingHeadersToXhrRequest","setHeaderOnXhr","sentryTraceHeader","sentryBaggageHeader","metaName","metaTag","getDomElement","IS_DEBUG_BUILD","isNgZoneEnabled","instrumentationInitialized","browserTracingIntegration$1","TraceService","navStart$","NavigationStart","navigationEvent","_routingSpan","strippedUrl","stripUrlQueryAndFragment","urlPath","_isPageloadOngoing","_pageloadOngoing","navigationTrigger","resEnd$","ResolveEnd","getParameterizedRouteFromSnapshot","currentRoute","firstChild","_updateSpanAttributesForParametrizedUrl","navEnd$","NavigationCancel","NavigationError","GENERAL","UKNOWN","BROWSERS","CHROME","FIREFOX","SAFARI","OPERA","IE","MS_EDGE","MS_EDGE_CHROMIUM","FB_MESSANGER","SAMSUNG","UCBROWSER","MOBILES_RE","HTC","NEXUS_PHONE","DELL","MOTOROLA","LG","SONY","ASUS","NOKIA_LUMIA","MICROMAX","PALM","VERTU","PANTECH","FLY","WIKO","I_MOBILE","SIMVALLEY","WOLFGANG","ALCATEL","NINTENDO","AMOI","INQ","VITA","BLACKBERRY","FIREFOX_OS","IPHONE","iPod","ANDROID","WINDOWS_PHONE","GENERIC_PHONE","TABLETS_RE","iPad","NexusTablet","GoogleTablet","SamsungTablet","Kindle","SurfaceTablet","HPTablet","AsusTablet","BlackBerryTablet","HTCtablet","MotorolaTablet","NookTablet","AcerTablet","ToshibaTablet","LGTablet","FujitsuTablet","PrestigioTablet","LenovoTablet","DellTablet","YarvikTablet","MedionTablet","ArnovaTablet","IntensoTablet","IRUTablet","MegafonTablet","EbodaTablet","AllViewTablet","ArchosTablet","AinolTablet","NokiaLumiaTablet","SonyTablet","PhilipsTablet","CubeTablet","CobyTablet","MIDTablet","MSITablet","SMiTTablet","RockChipTablet","FlyTablet","bqTablet","HuaweiTablet","NecTablet","PantechTablet","BronchoTablet","VersusTablet","ZyncTablet","PositivoTablet","NabiTablet","KoboTablet","DanewTablet","TexetTablet","PlaystationTablet","TrekstorTablet","PyleAudioTablet","AdvanTablet","DanyTechTablet","GalapadTablet","MicromaxTablet","KarbonnTablet","AllFineTablet","PROSCANTablet","YONESTablet","ChangJiaTablet","GUTablet","PointOfViewTablet","OvermaxTablet","HCLTablet","DPSTablet","VistureTablet","CrestaTablet","MediatekTablet","ConcordeTablet","GoCleverTablet","ModecomTablet","VoninoTablet","ECSTablet","StorexTablet","VodafoneTablet","EssentielBTablet","RossMoorTablet","iMobileTablet","TolinoTablet","AudioSonicTablet","AMPETablet","SkkTablet","TecnoTablet","JXDTablet","iJoyTablet","FX2Tablet","XoroTablet","ViewsonicTablet","VerizonTablet","OdysTablet","CaptivaTablet","IconbitTablet","TeclastTablet","OndaTablet","JaytechTablet","BlaupunktTablet","DigmaTablet","EvolioTablet","LavaTablet","AocTablet","MpmanTablet","CelkonTablet","WolderTablet","MediacomTablet","MiTablet","NibiruTablet","NexoTablet","LeaderTablet","UbislateTablet","PocketBookTablet","KocasoTablet","HisenseTablet","Hudl","TelstraTablet","Honeywell","GenericTablet","DEVICES","CHROME_BOOK","PS4","MAC","CHROMECAST","APPLE_TV","GOOGLE_TV","Tesla","HONEYWELL","MI_SE_9","DESKTOP_DEVICES","OS","WINDOWS","IOS","LINUX","UNIX","CHROME_OS","OS_VERSIONS","WINDOWS_3_11","WINDOWS_95","WINDOWS_ME","WINDOWS_98","WINDOWS_CE","WINDOWS_2000","WINDOWS_XP","WINDOWS_SERVER_2003","WINDOWS_VISTA","WINDOWS_7","WINDOWS_8_1","WINDOWS_8","WINDOWS_10","WINDOWS_PHONE_7_5","WINDOWS_PHONE_8_1","WINDOWS_PHONE_10","WINDOWS_NT_4_0","MACOSX_11_0","MACOSX_16","MACOSX_15","MACOSX_14","MACOSX_13","MACOSX_12","MACOSX_11","MACOSX_10","MACOSX_9","MACOSX_8","MACOSX_7","MACOSX_6","MACOSX_5","MACOSX_4","MACOSX_3","MACOSX_2","MACOSX","iOS","ANDROID_9","OS_RE","and","or","not","DEVICES_RE","OS_VERSIONS_RE_MAP","BROWSER_VERSIONS_RE_MAP","OS_VERSIONS_RE","BROWSER_VERSIONS_RE","freeze","__proto__","BROWSERS_RE","ReTree","DeviceType","Mobile","Tablet","Desktop","OrientationType","Portrait","Landscape","DeviceDetectorService","ua","browser_version","reTree","deviceType","setDeviceInfo","const","matchMedia","isTablet","isMobile","isDesktop","getDeviceInfo","mobile","GoogleTagManagerConfigService","GoogleTagManagerConfiguration","googleTagManagerConfig","_googleTagManagerConfig","gtm_auth","gtm_preview","GoogleTagManagerService","googleTagManagerConfiguration","googleTagManagerId","googleTagManagerAuth","googleTagManagerPreview","googleTagManagerResourcePath","googleTagManagerCSPNonce","isLoaded","browserGlobals","windowRef","documentRef","gtm_resource_path","getDataLayer","pushOnDataLayer","addGtmToDom","gtmScript","applyGtmQueryParams","pushTag","ThemeComponent","deviceService","deviceInfo","getDevice","screenSizeClasses","onResize","_ThemeComponent","TopbarComponent","logoClick","logo","_TopbarComponent","PageComponent","_currentTemplate","_PageComponent","SimpleGlobalModalComponent","sGlobalModalSvc","_modalLoadingCta$","currentModal$","modalObject","ctaAction","loadingAfterCta","closeRoute","closeAction","_SimpleGlobalModalComponent","UtmParamEnum","AppComponent","authService","gtmService","messageService","routingService","routingStateService","intercom","http","_ngZone","requiredVerificationService","internalLinkRouting","globalModalService","languageSelectorService","AwsApiWrapperService","BsAuthService","BsChatService","signOutMessage","BuildVersion","amazon_connect","Sprig","vanilla_setupSprig","vanilla_setupAmazonConnect","caregiver","supportedLanguages","displayLangSelector","hasUtm","pairs","setUpRoutingEventWatcher","faHours","getModal","bannerModal","showIntroVideo","_showIntroVideo","routeToLink","onBannerModalClose","modalId","hideModal","isReviewApp","trackDynamicLink","referrerType","companyRemapping","subdomain","customerLanding","customerName","fetchCompanyFile","setCompany","showCustomerMessage","landingHeading","landingBodyCopy","landingIconGroupTitle","welcomevideo","isMobileWidth","hasIgnoredRoute","mobileRouteIgnoreList","getCustomerBySubDomain","showLogoutWarningModal","minutesToLogout","currentSecond","secondsStringPluralize","minutesStringPluralize","timeToLogout","signedOutMessage","timeOutMessage","setupSprig","isLoggedIn","bsAuthService","Sentry","onOnboardingEvent","getFlag","KnownFeatureFlags","ENABLESALESFORCEMESSAGING","enableSalesforce","_bsChatService","showChat","RouterEvent","redirectUrl","setupMobileContent","isLandingLayout","isWaitlist","showCopy","showAppLink","fetchConfig","customerNumberLoaded","rcSupportNumber","RemoteConfig_SupportNumber","customerNumber","setSupportNumber","setFingerprint","eventParams","utmArray","paramMap","convertToParamMap","utm","isVerifyV2","isVerifyV3","mobileViewEvent","mobileGraphic","mobileHeadline","mobileParagraph","mobileCta","globalSetupSpring","sprigId","sprig","isVerify","showMobileDownloadIfApplicable","downloadApp","addOnEventFunction","fbq","RoutingService","DISPATCH_KEY","RoutingServiceDispatchEvent","LAYOUT_CHANGE","onAppLayoutStyleEvent","clearSession","clearOnboardingCache","clearConfirmationState","deleteAll","onboardingChannelReceived","crumbs","signIn","mobileLayoutType","appLayoutStyleEventTimer","isFullScreenLayout","vertical_padding","PUBLIC_ACCESS","loadChat","isOnboardingComplete","appLinkSent","_enableSalesforce","loadIntercom","intercomLauncherFrame","toastClicked","dismissAutoLogout","hostnameSplit","customerMessage","isLegrand","getTheApp","hasBeenClosed","tryToConnectWatcher","contentDocument","retriesCompleted","startIntercomClickWatcher","withFrame","maxRetryAttempts","nativeToDesktopMapping","remoteConfigMapping","nodeLists","iFrameElement","closest","connectedToWatcher","checkAndSetupSprig","enableSprig","CacheKeys","Guid","fromOnboarding","attribs","app_id","intercomAppId","widget","activator","first_name","last_name","phone","phone_number","intercom_external_id","crmUrl","sf_contact_id","hide_default_launcher","boot","calledUpdateOwner","onHide","onShow","cutoff","chatfashown","onUnreadCountChange","_AppComponent","VerifyComponent","toastSvc","v2","_VerifyComponent","ReviewAppGuard","_ReviewAppGuard","WaitlistService","submitEntry","_WaitlistService","WaitlistComponent","EMAIL_PATTERN","_bodyEl","waitlistForm","email_pattern","firstName","phoneValidator","customer","RemoteConfig_Companies","clearThankYou","libphonenumber","handleResponse","_WaitlistComponent","sendConfirmToast","INVITE_SUCCESS_MESSAGE","INVITE_ERROR_MESSAGE","ROUTES_PATH","DisplayCardsComponent","skip","pageCards","textKey","pageHideBackButton","routeInterceptor","pageCtaEventName","CONTROL_FNAME","CONTROL_PHONE","inviteService","InviteService","fName","sendSMS","referredClientName","InviteType","SMS","referralType","InviteReferralType","CLIENT","sms","ToastService","errorTextKEY","CONTROL_EMAIL","textKEY","sendEmail","EMAIL","HouseholdInviteGuard","CONTROL_LNAME","CONTROL_DOB","CONTROL_LAST_FOUR","householdInfo","dateOfBirth","lastFourSSN","saveDependent","getPreCacheHousehold","cachedInfo","HOUSEHOLD","routes","loadChildren","MicroFinancialSnapshotModule","HelpingHands","MicroHelpingHandsModule","Mpap","MicroMpapModule","TermsUpdate","DisplayLoaderComponent","DesktopFeatureSavingsAccountModule","Savings","DesktopFeatureSpendingAccountModule","Spending","DesktopFeatureExternalAccountsModule","External","DesktopFeatureNewTransferFundsModule","DesktopFeatureLoansModule","Loans","DesktopFeatureExternalLendersModule","ExternalLendersGuard","FeatureFlagKillSwitchGuard","featureFlagInfo","flag","ENABLELENDERALTERNATIVES","DesktopFeatureChatHistoryModule","DesktopFeatureUserEligibilityModule","DesktopFeatureRegistrationModule","DesktopFeatureOnboardingModule","RequiredVerificationGuard","DesktopFeatureCreditModule","Credit","DesktopFeatureCreditSetupModule","ProductVerificationGuard","CREDITSETUP","DesktopFeatureHomeModule","SequentialGuard","guards","GuidGuard","guardsRelation","SequentialGuardMode","AND","outlet","DesktopFeatureSettingsModule","DesktopFeatureWwchModule","DesktopFeatureVerificationModule","DesktopFeatureProgramsModule","DesktopFeatureSurveyQuestionnaireModule","Survey","DesktopFeaturePrizeLinkSavingsModule","Contest","loadComponent","SweepstakesAmoeComponent","DesktopFeatureFindMoneyModule","FindMoney","INVITE_ROUTES_PATH","INVITE_ROUTES","AppRoutingModule","_AppRoutingModule","creditLayoutResolverFactory","forRoot","preloadingStrategy","PreloadAllModules","getItemStatic","awsConnectSnippetId","awsConnectWidgetId","hostedDomain","awsmobile","aws_project_region","endpoints","authDomain","databaseURL","storageBucket","messagingSenderId","measurementId","googleTrackingId","baseEnv","featureFlags","appVersion","featureFlagApp","clientSideId","smfaDynamicLink","socure","auth0","chat","organizationId","developerName","scrt2URL","chatScript","EnvironmentImpl","TranslateHttpLoader","playerFactory","HttpLoaderFactory","AppModule","messageBusIncomingService","_traceService","BsCrossCom","publishMessage","rawNativeMessage","handleIncoming","_AppModule","bootstrap","AmplitudeService","Environment","BsErrorHandler","BrightsideTranslateService","CompanyService","StatusNotificationsService","BsApiService","FeatureFlagService","DesktopDataAccessSharedModule","IntercomModule","ngxMaskOptions","SharedMobileModule","MicroMessageBusModule","HttpClientModule","HttpClient","DesktopDataAccessCoreServicesModule","DesktopFeatureFinancialAccountsCoreModule","LottieModule","deepFreeze","propNames","ADD_OAUTH_LISTENER","authTypeMapping","API_KEY","AWS_IAM","AMAZON_COGNITO_USER_POOLS","OPENID_CONNECT","AWS_LAMBDA","LAMBDA","getRedirectUrl","redirectStr","getOAuthConfig","redirectSignIn","redirectSignOut","responseType","scopes","parseSocialProviders","aws_cognito_social_providers","updatedProvider","authModeNames","getGraphQLAuthMode","authType","providerNames","GOOGLE","LOGIN_WITH_AMAZON","FACEBOOK","SIGN_IN_WITH_APPLE","getOAuthProviders","oAuthProviders","getMfaStatus","mfaConfiguration","createBucketInfoMap","buckets","mappedBuckets","bucket_name","bucketName","aws_region","paths","sanitizedPaths","parseAmplifyConfig","amplifyConfig","aws_appsync_apiKey","aws_appsync_authenticationType","aws_appsync_graphqlEndpoint","aws_appsync_region","aws_bots_config","aws_cognito_identity_pool_id","aws_cognito_sign_up_verification_method","aws_cognito_mfa_configuration","aws_cognito_mfa_types","aws_cognito_password_protection_settings","aws_cognito_verification_mechanisms","aws_cognito_signup_attributes","aws_cognito_username_attributes","aws_mandatory_sign_in","aws_mobile_analytics_app_id","aws_mobile_analytics_app_region","aws_user_files_s3_bucket","aws_user_files_s3_bucket_region","aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing","aws_user_pools_id","aws_user_pools_web_client_id","geo","oauth","predictions","aws_cloud_logic_custom","Notifications","modelIntrospection","Analytics","Pinpoint","InAppMessaging","Push","AWSPinpoint","PushNotification","Interactions","LexV1","bot","defaultAuthMode","GraphQL","mfaConfig","totpEnabled","smsEnabled","passwordFormatConfig","passwordPolicyMinLength","requireLowercase","passwordPolicyCharacters","requireUppercase","requireNumbers","requireSpecialCharacters","userAttributes","loginWithEmailEnabled","loginWithPhoneEnabled","Auth","Cognito","identityPoolId","allowGuestAccess","signUpVerificationMethod","userPoolClientId","userPoolId","mfa","passwordFormat","loginWith","hasOAuthConfig","hasSocialProviderConfig","Storage","S3","bucket","dangerouslyConnectToHttpEndpointForTesting","amazon_location_service","Geo","LocationService","maps","geofenceCollections","searchIndices","search_indices","REST","Ad","VoiceId","voiceId","convert","speechGenerator","Predictions","parseAWSExports","isAmplifyOutputs","parseAmplifyOutputs","amplifyOutputs","resourcesConfig","parseStorage","amplifyOutputsStorageProperties","parseAuth","amplifyOutputsAuthProperties","user_pool_id","user_pool_client_id","identity_pool_id","password_policy","mfa_configuration","mfa_methods","unauthenticated_identities_enabled","username_attributes","standard_required_attributes","authConfig","require_lowercase","require_numbers","require_uppercase","require_symbols","min_length","redirect_sign_in_uri","redirect_sign_out_uri","identity_providers","sn","parseAnalytics","amplifyOutputsAnalyticsProperties","amazon_pinpoint","parseGeo","geofence_collections","parseData","amplifyOutputsDataProperties","default_authorization_type","api_key","model_introspection","customConfig","parseCustom","amplifyOutputsCustomProperties","notifications","parseNotifications","amplifyOutputsNotificationsProperties","channels","amazon_pinpoint_app_id","hasInAppMessaging","hasPushNotification","notificationsConfig","KEY","Uint32Array","INIT","MAX_HASHABLE_LENGTH","RawSha256","Int32Array","bufferLength","bytesHashed","finished","byteLength","hashBuffer","bitsHashed","bufferView","DataView","byteOffset","undecoratedLength","setUint8","BLOCK_SIZE","setUint32","state0","state1","state2","state3","state4","state5","state6","state7","t2","fromUtf8","convertToBuffer","ArrayBuffer","isView","BYTES_PER_ELEMENT","Sha256","secret","toHash","isEmptyData","digestSync","outer","bufferFromSecret","bufferHash","SHORT_TO_HEX","HEX_TO_SHORT","encodedByte","AuthClass","authResourcesConfig","authOptions","fetchAuthSession","credentialsAndIdentityId","userSub","getTokens","credentialsProvider","getCredentialsAndIdentityId","forceRefresh","credentials","identityId","clearCredentials","clearCredentialsAndIdentityId","tokenProvider","Amplify","AmplifyClass","oAuthListener","libraryOptions","resolvedResourceConfig","AMPLIFY_SYMBOL","notifyOAuthListener","getConfig","aE","converter","defaultAttributes","stringifiedAttributes","write","jar","withAttributes","withConverter","CookieStorage","JsCookie","promises","SyncKeyValueStorage","defaultStorage","DefaultStorage","base64Decoder","SessionStorage","getSessionStorageWithFallback","SyncSessionStorage","InMemoryStorage","inputStr","urlSafe","getAtob","AuthConfigurationErrorCode","AuthTokenConfigException","AuthUserPoolAndIdentityPoolException","AuthUserPoolException","InvalidIdentityPoolIdException","OAuthNotConfigureException","assertTokenProviderConfig","cognitoConfig","assertionValid","assertIdentityPoolIdConfig","decodeJWT","tokenParts","jsonStr","AuthError","getRegionFromIdentityPoolId","USER_UNAUTHENTICATED_EXCEPTION","oAuthTokenRefreshException","tokenRefreshException","OAuthStorageKeys","inflightOAuth","oauthSignIn","oauthPKCE","oauthState","idToken","composeServiceApi","transferHandler","serializer","deserializer","resolvedConfig","endpointResolver","parseMetadata","isMetadataBearer","$metadata","httpStatusCode","requestId","extendedRequestId","cfId","parseJsonError","parseJsonBody","rawValue","cleanValue","__type","Message","assertServiceError","underlyingError","createUserPoolDeserializer","composeTransferHandler","coreHandler","middleware","composedHandler","composeHandlerRequest","cancellableSleep","timeoutMs","abortSignal","aborted","timeoutId","sleepPromiseResolveFn","sleepPromise","cancelSleep","addOrIncrementMetadataAttempts","nextHandlerOutput","attempts","withMemoization","payloadAccessor","shouldSendBody","unauthenticatedHandler","withCrossDomainCredentials","responseHeaders","blob","userAgentHeader","userAgentValue","userAgentMiddleware","maxAttempts","retryDecider","computeDelay","attemptsCount","handleTerminalErrorOrResponse","isCredentialsExpiredError","retryable","isCredentialsExpired","retryMiddleware","cognitoUserPoolTransferHandler","disableCacheMiddleware","CLOCK_SKEW_ERROR_CODES","isClockSkewError","getRetryDecider","errorParser","parsedError","isConnectionError","isThrottlingError","isServerSideError","THROTTLING_ERROR_CODES","TIMEOUT_ERROR_CODES","jitteredBackoff","attempt","maxDelayMs","BASE_TIME_MS","JITTER_FACTOR","jitteredBackoff$1","Framework","WebUnknown","React","NextJs","Angular","VueJs","Nuxt","Svelte","ServerSideUnknown","ReactSSR","NextJsSSR","AngularSSR","VueJsSSR","NuxtSSR","SvelteSSR","ReactNative","Expo","globalExists","windowExists","documentExists","processExists","keyPrefixMatch","detectionMap","detectionMethod","expoDetect","expo","reactNativeDetect","nextWebDetect","nuxtWebDetect","__NUXT__","$nuxt","angularWebDetect","angularVersionSetInDocument","angularContentSetInWindow","ng","reactWebDetect","elementKeyPrefixedWithReact","vueWebDetect","svelteWebDetect","webDetect","nextSSRDetect","nuxtSSRDetect","__NUXT_PATHS__","reactSSRDetect","vueSSRDetect","angularSSRDetect","npm_lifecycle_script","svelteSSRDetect","frameworkCache","frameworkChangeObservers","resetTriggered","PRIME_FRAMEWORK_DELAY","detectFramework","detect","detectionEntry","fcn","resetTimeout","observeFrameworkChanges","framework","clearCache","customUserAgentState","BASE_USER_AGENT","sanitizeAmplifyVersion","amplifyVersion","PlatformBuilder","isReactNative","getAmplifyUserAgent","customUserAgentDetails","customState","additionalDetails","getCustomUserAgent","getAmplifyUserAgentObject","agentKey","agentValue","COGNITO_IDP_SERVICE_NAME","DEFAULT_SERVICE_CLIENT_API_CONFIG","AmplifyUrl","defaultPartition","dnsSuffix","regionRegex","regions","partitionsInfo","partitions","getDnsSuffix","createCognitoUserPoolEndpointResolver","endpointOverride","cognitoUserPoolEndpointResolver","refreshAuthTokens","asyncFunction","inflightPromise","deDupeAsyncFunction","userPoolEndpoint","getRegionFromUserPoolId","assertAuthTokensWithRefreshToken","isAuthenticatedWithImplicitOauthFlow","refreshToken","isAuthenticatedWithRefreshToken","refreshTokenString","AuthParameters","REFRESH_TOKEN","deviceMetadata","deviceKey","DEVICE_KEY","UserContextData","getUserContextData","amazonCognitoAdvancedSecurityData","AmazonCognitoAdvancedSecurityData","advancedSecurityData","EncodedData","initiateAuth","buildHttpRpcRequest","createInitiateAuthClient","AuthenticationResult","ClientId","AuthFlow","AccessToken","IdToken","clockDrift","AuthTokenStorageKeys","oidcProvider","randomPasswordKey","deviceGroupKey","signInDetails","oauthMetadata","TokenProviderErrorCode","InvalidAuthTokens","AUTH_KEY_PREFIX","DefaultTokenStore","getKeyValueStorage","setKeyValueStorage","setAuthConfig","loadTokens","authKeys","getAuthKeys","accessTokenString","itString","clockDriftString","getDeviceMetadata","getLastAuthUser","storeTokens","lastAuthUser","getLastAuthUserKey","randomPassword","clearTokens","clearDeviceMetadata","createKeysForAuthStorage","setOAuthMetadata","oauthMetadataKey","getOAuthMetadata","identifier","getAuthStorageKeys","authKey","isTokenExpired","tolerance","V5_HOSTED_UI_KEY","oAuthStore","DefaultOAuthStore","clearOAuthInflightData","clearOAuthData","loadOAuthState","storeOAuthState","loadPKCE","storePKCE","pkce","authConfigParam","loadOAuthInFlight","storeOAuthInFlight","inflight","loadOAuthSignIn","isLegacyHostedUISignIn","isOAuthSignIn","preferPrivateSession","storeOAuthSignIn","inflightPromises","TokenOrchestrator","waitForInflightOAuth","setTokenRefresher","tokenRefresher","setAuthTokenStore","tokenStore","getTokenStore","getTokenRefresher","idTokenExpired","accessTokenExpired","refreshTokens","newTokens","setTokens","handleErrors","cognitoUserPoolsTokenProvider","CognitoUserPoolsTokenProvider","authTokenStore","tokenOrchestrator","IdentityIdStorageKeys","cognitoIdentityTransferHandler","getSharedHeaders","getCredentialsForIdentityDeserializer","IdentityId","Credentials","deserializeCredentials","AccessKeyId","SecretKey","SessionToken","Expiration","getCredentialsForIdentity","getId","formLoginsMap","identityIdStore","loadIdentityId","logins","generatedIdentityId","generateIdentityId","storeIdentityId","idResult","IdentityPoolId","Logins","cognitoCredentialsProvider","CognitoAWSCredentialsAndIdentityIdProvider","_nextCredentialsRefresh","_identityIdStore","_credentialsAndIdentityId","clearIdentityId","getCredentialsOptions","tokenHasChanged","hasTokenChanged","cognitoIdentityIdProvider","assertIdTokenInAuthTokens","credsForOIDCTokens","getGuestCredentials","isPastTTL","isAuthenticatedCreds","clientResult","accessKeyId","secretAccessKey","sessionToken","expiration","identityIdRes","authTokens","associatedIdToken","DefaultIdentityIdStore","_authKeys","_hasGuestIdentityId","_primaryIdentityId","storedIdentityId","DefaultAmplify","resourceConfig","ssr","_optionalChain","lastAccessLHS","removeTrailingSlash","isNodeEnv","isBrowserBundle","__SENTRY_BROWSER_BUNDLE__","isElectronNodeRenderer","REPLAY_SESSION_KEY","REPLAY_EVENT_NAME","UNABLE_TO_SEND_REPLAY","RETRY_BASE_INTERVAL","RETRY_MAX_COUNT","NETWORK_BODY_MAX_SIZE","CONSOLE_ARG_MAX_SIZE","REPLAY_MAX_EVENT_BUFFER_SIZE","_nullishCoalesce$1","rhsFn","_optionalChain$5","NodeType$3","NodeType","Document","DocumentType","Text","CDATA","Comment","_2","isNativeShadowDom","stringifyStylesheet","cssRules","fixBrowserCompatibilityIssuesInCSS","cssText","stringifyRule","importStringified","isCSSImportRule","styleSheet","escapeImportStatement","statement","layerName","supportsText","mediaText","isCSSStyleRule","needsSafariColonFix","selectorText","needsAllFix","fixAllCssProperty","styleDeclaration","isImportant","getPropertyPriority","fixSafariColons","cssStringified","Mirror","idNodeMap","nodeMetaMap","_3","getMeta","_4","_5","getNode","getIds","removeNodeFromMap","childNodes","childNode","hasNode","oldNode","shouldMaskInput","maskInputOptions","maskInputValue","isMasked","maskInputFn","repeat","ORIGINAL_ATTRIBUTE_NAME","getInputType","getInputValue","extractFileExtension","baseURL","_6","cachedImplementations$1","getImplementation$1","setTimeout$2","clearTimeout$2","getIframeContentDocument","iframe","tagNameRegex","IGNORED_NODE","genId","canvasService","canvasCtx","URL_IN_CSS_REF","URL_PROTOCOL_MATCH","URL_WWW_MATCH","DATA_URI","absoluteToStylesheet","quote1","path1","quote2","path2","path3","filePath","maybeQuote","extractOrigin","SRCSET_NOT_SPACES","SRCSET_COMMAS_OR_SPACES","cachedDocument","absoluteToDoc","attributeValue","getHref","isSVGElement","ownerSVGElement","customHref","transformAttribute","maskAttributeFn","getAbsoluteSrcsetString","collectCharacters","regEx","chars","descriptorsStr","inParens","ignoreAttribute","distanceToMatch","matchPredicate","distance","createMatchPredicate","elementClassMatchesRegex","eIndex","needMaskingText","maskTextClass","maskTextSelector","unmaskTextClass","unmaskTextSelector","maskAllText","autocomplete","maskDistance","unmaskDistance","lowerIfExists","maybeAttr","serializeNodeWithId","mirror","blockClass","blockSelector","unblockSelector","skipChild","inlineStylesheet","maskTextFn","slimDOMOptions","dataURLOptions","inlineImages","recordCanvas","onSerialize","onIframeLoad","iframeLoadTimeout","onStylesheetLoad","stylesheetLoadTimeout","keepIframeSrcFn","newlyAddedElement","preserveWhiteSpace","_serializedNode","serializeNode","rootId","getRootId","docId","DOCUMENT_NODE","compatMode","DOCUMENT_TYPE_NODE","publicId","systemId","serializeElementNode","needBlock","_isBlockedElement","getValidTagName","HTMLFormElement","processedTagName","stylesheet","styleSheets","rel","_cssText","sheet","innerText","forceMask","select","__context","is2DCanvasBlank","canvas","getContext","getImageData","pixel","rr_dataURL","toDataURL","quality","canvasDataURL","blankCanvas","imageSrc","currentSrc","priorCrossOrigin","crossOrigin","recordInlineImage","naturalWidth","naturalHeight","drawImage","rr_mediaState","paused","rr_mediaCurrentTime","scrollLeft","rr_scrollLeft","scrollTop","rr_scrollTop","class","rr_width","rr_height","isCustomElement","rr_src","customElements","isSVG","isCustom","TEXT_NODE","serializeTextNode","parentTagName","isStyle","isScript","isTextarea","previousSibling","_7","_8","_9","textarea","CDATA_SECTION_NODE","COMMENT_NODE","slimDOMExcluded","comment","script","headFavicon","headMetaDescKeywords","headMetaSocial","headMetaRobots","headMetaHttpEquiv","headMetaAuthorship","headMetaVerification","serializedNode","recordChild","isShadowHost","headWhitespace","bypassOptions","childN","serializedChildNode","isElement$1","isShadow","onceIframeLoaded","iframeEl","win","fired","blankUrl","iframeDoc","serializedIframeNode","onceStylesheetLoaded","styleSheetLoadTimeout","styleSheetLoaded","serializedLinkNode","_optionalChain$4","DEPARTED_MIRROR_ACCESS_WARNING","_mirror","throttle$1","wait","leading","remaining","clearTimeout$1","getImplementation","trailing","setTimeout$1","hookSetter","isRevoked","replacement","__rrweb_original__","nowTimestamp","getWindowScroll","scrollingElement","_10","_11","_12","_13","_14","getWindowHeight","clientHeight","getWindowWidth","clientWidth","closestElementOfNode","isBlocked","checkAncestors","blockedPredicate","isUnblocked","blockDistance","unblockDistance","isIgnored","isAncestorRemoved","legacy_isTouchEvent","changedTouches","isSerializedIframe","isSerializedStylesheet","hasShadowRoot","_18","StyleSheetMirror","styleIDMap","idStyleMap","_nullishCoalesce","newId","getStyle","generateId","getShadowHost","shadowHost","_19","getRootNode","_20","_21","DOCUMENT_FRAGMENT_NODE","inDom","ownerDocument","shadowHostInDom","getRootShadowHost","rootShadowHost","EventType","EventType2","DomContentLoaded","Load","FullSnapshot","IncrementalSnapshot","Meta","Custom","Plugin","IncrementalSource","IncrementalSource2","Mutation","MouseMove","MouseInteraction","ViewportResize","TouchMove","MediaInteraction","StyleSheetRule","CanvasMutation","Font","Log","Drag","StyleDeclaration","Selection","AdoptedStyleSheet","CustomElement","MouseInteractions","MouseInteractions2","MouseUp","MouseDown","Click","ContextMenu","DblClick","Focus","Blur","TouchStart","TouchMove_Departed","TouchEnd","TouchCancel","PointerTypes","PointerTypes2","Mouse","Pen","Touch","getIFrameContentDocument","_optionalChain$3","isNodeInLinkedList","DoubleLinkedList","tail","addNode","__ln","moveKey","MutationBuffer","frozen","texts","attributeMap","removes","mapRemoves","movedMap","addedSet","movedSet","droppedSet","processMutations","processMutation","adds","addedIds","addList","getNextId","nextId","pushAdd","currentN","iframeManager","addIframe","stylesheetManager","trackLinkElement","shadowDomManager","addShadowRoot","childSn","attachIframe","canvasManager","addWindow","observeAttachShadow","attachLinkElement","isParentRemoved","isAncestorInSet","candidate","tailNode","_node","unhandledNode","diffAsStr","styleDiff","unchangedAsStr","_unchangedStyles","mutationCb","isInputMasked","unattachedDoc","pname","newPriority","addedNodes","genAdds","nodeId","isSerialized","deepDelete","processedNodeManager","inOtherBuffer","targetId","unfreeze","addsSet","_isParentRemoved","_isAncestorInSet","callbackWrapper","_optionalChain$2","mutationBuffers","composedPath","initMutationObserver","rootEl","mutationBuffer","mutationObserverCtor","__rrMutationObserver","angularZoneSymbol","__symbol__","attributeOldValue","characterData","characterDataOldValue","subtree","initScrollObserver","scrollCb","sampling","defaultView","scrollLeftTop","scroll","INPUT_TAGS","lastInputValueMap","initInputObserver","inputCb","ignoreClass","ignoreSelector","userTriggeredOnInput","userTriggered","isTrusted","cbWithDedup","lastInputValue","currentWindow","propertyDescriptor","HTMLInputElement","HTMLSelectElement","HTMLTextAreaElement","HTMLOptionElement","getNestedCSSRulePositions","recurse","childRule","hasNestedCSSRule","parentRule","CSSGroupingRule","CSSMediaRule","CSSSupportsRule","CSSConditionRule","parentStyleSheet","getIdAndStyleId","styleMirror","styleId","ownerNode","initAdoptedStyleSheetObserver","hostId","patchTarget","ShadowRoot","originalPropertyDescriptor","sheets","_15","_16","adoptStyleSheets","initObservers","mutationObserver","recordDOM","mousemoveHandler","initMoveObserver","mousemoveCb","mousemove","callbackThreshold","mousemoveCallback","timeBaseline","positions","wrappedCb","totalOffset","timeOffset","updatePosition","clientX","clientY","DragEvent","MouseEvent","mouseInteractionHandler","initMouseInteractionObserver","mouseInteractionCb","mouseInteraction","disableMap","currentPointerType","eventKey","pointerType","thisEventKey","getHandler","PointerEvent","scrollHandler","viewportResizeHandler","initViewportResizeObserver","viewportResizeCb","lastH","lastW","inputHandler","mediaInteractionHandler","initMediaInteractionObserver","mediaInteractionCb","muted","styleSheetObserver","adoptedStyleSheetObserver","styleDeclarationObserver","fontObserver","initStyleSheetObserver","styleSheetRuleCb","CSSStyleSheet","insertRule","argumentsList","deleteRule","replaceSync","supportedNestedCSSRuleTypes","canMonkeyPatchNestedCSSRule","unmodifiedFunctions","typeKey","initStyleDeclarationObserver","styleDeclarationCb","ignoreCSSAttributes","CSSStyleDeclaration","_17","collectFonts","initFontObserver","fontCb","fontMap","originalFontFace","FontFace","family","descriptors","fontFace","fontSource","restoreHandler","fonts","selectionObserver","initSelectionObserver","param","selectionCb","collapsed","updateSelection","selection","getSelection","isCollapsed","ranges","rangeCount","range","getRangeAt","startContainer","startOffset","endContainer","endOffset","customElementObserver","initCustomElementObserver","customElementCb","pluginHandlers","_22","_23","CrossOriginIframeMirror","generateIdFn","iframeIdToRemoteIdMap","iframeRemoteIdToIdMap","remoteId","idToRemoteMap","remoteToIdMap","idToRemoteIdMap","getIdToRemoteIdMap","remoteIdToIdMap","getRemoteIdToIdMap","getRemoteId","getRemoteIds","ids","_optionalChain$1","IframeManagerNoop","crossOriginIframeMirror","crossOriginIframeRootIdMap","addLoadListener","IframeManager","iframes","crossOriginIframeMap","wrappedEmit","recordCrossOriginIframes","crossOriginIframeStyleMirror","handleMessage","loadListener","isAttachIframe","adoptedStyleSheets","crossOriginMessageEvent","transformedEvent","transformCrossOriginEvent","isCheckout","replaceIdOnNode","patchRootIdOnNode","replaceIds","replaceStyleIds","iframeMirror","ShadowDomManagerNoop","ShadowDomManager","shadowDoms","restoreHandlers","patchAttachShadow","iframeElement","iframeWindow","getIFrameContentWindow","resetShadowRoots","CanvasManagerNoop","StylesheetManager","trackedLinkElements","adoptedStyleSheetCb","linkEl","trackStylesheetInLinkElement","adoptedStyleSheetData","styleIds","CSSRule","ProcessedNodeManager","nodeMap","thisBuffer","onRequestAnimationFrame","_takeFullSnapshot","cleanFrame","createMirror","checkoutEveryNms","checkoutEveryNth","maskAllInputs","_maskInputOptions","_slimDOMOptions","maxCanvasSize","packFn","mousemoveWait","recordAfter","getCanvasManager","registerErrorHandler","inEmittingFrame","passEmitsToParent","tel","radio","NodeList","DOMTokenList","lastFullSnapshotEvent","incrementalSnapshotCount","takeFullSnapshot","wrappedMutationEmit","wrappedScrollEmit","wrappedCanvasMutationEmit","__RRWEB_EXCLUDE_IFRAME__","getMirror","nodeMirror","_getCanvasManager","getCanvasManagerFn","__RRWEB_EXCLUDE_SHADOW_DOM__","slimDOM","initialOffset","canvasMutationCb","unregisterErrorHandler","ReplayEventTypeIncrementalSnapshot","timestampToMs","timestampToS","addBreadcrumbEvent","triggerUserActivity","checkAndHandleExpiredSession","addUpdate","throttledAddEvent","INTERACTIVE_SELECTOR","getClosestInteractive","getClickTargetNode","getTargetNode","isEventWithTarget","IncrementalMutationSources","ClickDetector","slowClickConfig","_addBreadcrumbEvent","_lastMutation","_lastScroll","_clicks","_timeout","_threshold","_scrollTimeout","scrollTimeout","_replay","_ignoreSelector","addListeners","cleanupWindowOpen","onWindowOpen","monkeyPatchWindowOpen","originalWindowOpen","nowInSeconds","_teardown","removeListeners","_checkClickTimeout","ignoreElement","SLOW_CLICK_TAGS","isClickBreadcrumb","newClick","clickBreadcrumb","clickCount","_scheduleCheckClicks","registerMutation","registerScroll","registerClick","_handleMultiClick","_getClicks","_checkClicks","timedOutClicks","mutationAfter","scrollAfter","_generateBreadcrumbs","isSlowClick","timeAfterClickMs","endReason","getCurrentRoute","setTimeout$3","createBreadcrumb","ATTRIBUTES_TO_RECORD","getAttributesToRecord","normalizedKey","getBaseDomBreadcrumb","ENTRY_TYPES","createResourceEntry","decodedBodySize","encodedBodySize","transferSize","paint","createPaintEntry","navigation","createNavigationEntry","domComplete","domContentLoadedEventStart","domContentLoadedEventEnd","domInteractive","loadEventStart","loadEventEnd","redirectCount","webVitalHandler","replayPerformanceEntries","createPerformanceEntry","getLargestContentfulPaint","lastEntry","getWebVital","isLayoutShift","getCumulativeLayoutShift","layoutShifts","nodeIds","getFirstInputDelay","getInteractionToNextPaint","attributions","PREFIX","_addBreadcrumb","makeReplayLogger","_capture","_trace","_logger","infoTick","setConfig","captureExceptions","traceInternals","logger$1","EventBufferSizeExceededError","EventBufferArray","_totalSize","hasCheckout","waitForCheckout","hasEvents","eventSize","eventsRet","getEarliestTimestamp","WorkerHandler","_worker","ensureReady","_ensureReadyPromise","terminate","_getAndIncrementId","EventBufferCompressionWorker","_earliestTimestamp","_sendEventToWorker","_finishRequest","EventBufferProxy","_fallback","_compression","_used","_ensureWorkerIsLoadedPromise","_ensureWorkerIsLoaded","ensureWorkerIsLoaded","_switchToCompressionWorker","addEventPromises","hasSessionStorage","isSampled","lastActivity","segmentId","previousSessionId","saveSession","createSession","sessionSampleRate","allowBuffering","stickySession","getSessionSampleType","initialTime","targetTime","isSessionExpired","maxReplayDuration","sessionIdleExpire","shouldRefreshSession","loadOrCreateSession","sessionOptions","existingSession","fetchSession","sessionStringFromStorage","sessionObj","addEventSync","shouldAddEvent","_addEvent","eventBuffer","isBufferMode","recordingMode","eventAfterPossibleCallback","maybeApplyCallback","isCustomEvent","beforeAddRecordingEvent","isExceeded","handleException","isPaused","timestampInMs","timeouts","sessionIdlePause","initialTimestamp","isFeedbackEvent","isBreadcrumbWithCategory","resetReplayIdOnDynamicSamplingContext","createPerformanceSpans","addNetworkBreadcrumb","shouldFilterRequest","isSentryRequestUrl","checkDsn","checkTunnel","getBodySize","textEncoder","FormData","formDataStr","_serializeFormData","parseContentLengthHeader","getBodyString","mergeWarning","_meta","newMeta","makeNetworkReplayBreadcrumb","buildSkippedNetworkRequestOrResponse","bodySize","buildNetworkRequestOrResponse","normalizedBody","normalizeNetworkBody","exceedsSizeLimit","isProbablyJson","_strIsProbablyJson","truncatedBody","getAllowedHeaders","allowedHeaders","filteredHeaders","formData","urlMatches","urls","getFullUrl","baseURI","fixedUrl","_prepareFetchData","_x7","_captureFetchBreadcrumbToReplay","request_body_size","requestBodySize","response_body_size","responseBodySize","captureDetails","networkDetailAllowUrls","networkDetailDenyUrls","_getRequestInfo","networkCaptureBodies","networkRequestHeaders","getRequestHeaders","getHeadersFromOptions","_getFetchRequestArgBody","bodyStr","_getResponseInfo","_x10","_prepareFetchData2","networkResponseHeaders","getAllHeaders","_parseFetchResponseBody","_x14","getResponseData","_getResponseInfo2","_tryCloneResponse","_tryGetResponseText","allHeaders","_getResponseText","_x15","_prepareXhrData","getResponseHeaders","getAllResponseHeaders","requestWarning","responseBody","responseWarning","_getXhrResponseBody","_parseXhrResponse","outerHTML","handleNetworkBreadcrumbs","beforeAddNetworkBreadcrumb","_isXhrBreadcrumb","_isXhrHint","enrichXhrBreadcrumb","reqSize","resSize","getResponseHeader","_getBodySize","captureXhrBreadcrumbToReplay","_x16","_isFetchBreadcrumb","_isFetchHint","enrichFetchBreadcrumb","captureFetchBreadcrumbToReplay","_x4","createMemoryEntry","memoryEntry","jsHeapSizeLimit","totalJSHeapSize","usedJSHeapSize","NAVIGATOR","getHandleRecordingEmit","hadFirstEvent","_isCheckout","clickDetector","updateClickDetectorForRecordingEvent","isIncrementalEvent","isIncrementalMouseInteraction","HTMLElement","setInitialState","addSettingsEvent","createOptionsEvent","shouldRecordCanvas","isRecordingCanvas","errorSampleRate","useCompressionOption","useCompression","blockAllMedia","networkDetailHasUrls","networkRequestHasHeaders","networkResponseHasHeaders","earliestEvent","eventHint","preparedEvent","recordingData","eventContext","preparedRecordingData","prepareRecordingData","payloadWithSequence","replayHeaders","errorIds","traceIds","replay_start_timestamp","error_ids","trace_ids","replay_type","replayEvent","prepareReplayEvent","_x20","createReplayEnvelope","cause","TransportStatusCodeError","RateLimitError","_sendReplayRequest","sendReplay","_x22","replayData","retryConfig","sendReplayRequest","_x21","setContext","_retryCount","_sendReplay","THROTTLED","ReplayContainer","recordingOptions","__init5","__init6","_lastActivity","_isPaused","_requiresManualStart","_hasInitializedCoreListeners","initialUrl","_recordingOptions","_debouncedFlush","debounce","callbackReturnValue","timerId","maxTimerId","maxWait","invokeFunc","cancelTimers","debounced","_flush","flushMinDelay","flushMaxDelay","_throttledAddEvent","throttle","maxCount","durationSeconds","isThrottled","_cleanup","wasThrottled","slowClickTimeout","slowClickIgnoreSelectors","experiments","_canvas","initializeSampling","requiresManualStart","_initializeSessionForSampling","_initializeRecording","_updateUserActivity","startBuffering","startRecording","canvasOptions","_stopRecording","continuousCheckout","_onMutationHandler","stopRecording","forceFlush","_removeListeners","deleteSession","_checkSession","sendBufferedReplayOrFlush","continueRecording","flushImmediate","activityTime","hasStoppedRecording","_updateSessionActivity","_maybeSaveSession","cbResult","updateUserActivity","conditionalFlush","cancelFlush","_clearContext","lastActiveSpan","lastRootSpan","createEventBuffer","customWorkerUrl","_loadWorker","_getWorkerUrl","__SENTRY_EXCLUDE_REPLAY_WORKER__","_addListeners","currentSession","_refreshSession","_handleVisibilityChange","_handleWindowBlur","_handleWindowFocus","_handleKeyboardEvent","addGlobalListeners","handleDom","getDomTarget","isClick","handleDomListener","handleHistorySpanListener","handleHistory","handleBreadcrumbs","beforeAddBreadcrumb","normalizeBreadcrumb","normalizeConsoleBreadcrumb","isTruncated","normalizedArgs","normalizedArg","handleGlobalEventListener","isReplayEvent","addFeedbackBreadcrumb","feedbackId","isRrwebError","__rrweb__","shouldSampleForBufferEvent","handleBeforeSendEvent","handleHydrationError","exceptionValue","handleAfterSendEvent","handleTransactionEvent","replayContext","handleErrorEvent","beforeErrorSampling","feedbackEvent","includeReplay","_performanceCleanupCallback","setupPerformanceObserver","addPerformanceEntry","onEntries","clearCallbacks","clearCallback","_doChangeToForegroundTasks","_doChangeToBackgroundTasks","handleKeyboardEvent","getKeyboardBreadcrumb","_createCustomBreadcrumb","_addPerformanceEntries","createPerformanceEntries","initialTimestampInSeconds","_updateInitialTimestampFromEventBuffer","_popEventContext","_runFlush","addMemoryEntry","tooShort","minReplayDuration","_flushInProgress","_flushLock","mutationLimit","overMutationLimit","mutationBreadcrumbLimit","getOption","defaultSelectors","MEDIA_SELECTORS","DEFAULT_NETWORK_HEADERS","Replay","maskAttributes","unmask","block","unblock","ignore","maskFn","privacyOptions","getPrivacyOptions","password","maskAttribute","_initialOptions","_getMergedNetworkHeaders","_setup","_initialize","getRecordingMode","_maybeLoadFromReplayCanvasIntegration","finalOptions","loadReplayOptionsFromClient","initialOptions","opt","replaysSessionSampleRate","replaysOnErrorSampleRate","canvasIntegration","__initStatic","convertIntegrationFnToClass","objectToString","wat","isBuiltin","isGlobalObj","getGlobalObject","creator","DEFAULT_MAX_STRING_LENGTH","_htmlElementAsString","dataset","sentryComponent","keyAttrPairs","keyAttr","keyAttrPair","allowedAttrs","currentElem","MAX_TRAVERSE_HEIGHT","sepLength","nextStr","__isVue","_isVue","Event","INTEGRATION_NAME","ExtraErrorData","captureErrorCause","_enhanceEventWithErrorData","exceptionName","errorData","_extractErrorData","nativeKeys","extraErrorInfo","serializedError","oO","normalizedErrorData","Debug","debugger","spanIsSpanClass","getDynamicSamplingContextFromClient","user_segment","getCurrentHub","txn","v7FrozenDsc","_frozenDynamicSamplingContext","maybeSampleRate","sample_rate","jsonSpan","_notifyingListeners","_scopeListeners","_breadcrumbs","_attachments","_user","_tags","_extra","_contexts","_sdkProcessingMetadata","_propagationContext","generatePropagationContext","newScope","_level","_span","_session","_transactionName","_fingerprint","_requestSession","_client","addScopeListener","setUser","_notifyScopeListeners","getRequestSession","setRequestSession","requestSession","setTags","setTag","setExtras","extras","setExtra","setLevel","setSpan","getSpan","getTransaction","setSession","scopeToMerge","scopeData","scopeContext","maxCrumbs","getLastBreadcrumb","clearBreadcrumbs","addAttachment","getAttachments","clearAttachments","applyToEvent","additionalEventProcessors","arrayify","maybeArray","setSDKProcessingMetadata","newData","bindClient","isOlderThan","pushScope","getStack","popScope","_lastEventId","lastEventId","configureScope","oldHub","makeMain","getIntegration","startTransaction","customSamplingContext","_callExtensionMethod","endSession","_sendSessionUpdate","shouldSendDefaultPii","sendDefaultPii","extensions","hub","getHubFromCarrier","setHubOnCarrier","getGlobalHub","hasHubOnCarrier","isNativeFetch","readyStateArgs","setRequestHeaderArgs","failedRequestStatusCodes","failedRequestTargets","_wrapFetch","requestInfo","requestInit","_fetchResponseHandler","_shouldCaptureResponse","_getRequest","bodyUsed","requestHeaders","requestCookies","responseCookies","_shouldSendDefaultPii","cookieHeader","_extractFetchHeaders","cookieString","_parseCookieString","_createEvent","_xhrResponseHandler","responseURL","_getXHRResponseHeaders","_getResponseSizeFromHeaders","_isInGivenStatusRanges","_isInGivenRequestTargets","givenRequestTarget","hubOrClient","isHub","body_size","firebaseApp","remoteConfig","getRemoteConfig","fbAnalytics","getAnalytics","PerformanceTrackingConfigure","setUpConfig","checkAndSetAngularVersion","angularVersion","ANGULAR_MINIMUM_VERSION","init$1","SentryClient","getCurrentHubShim","currentScopes","esm_exports","SentryIntegrations","bankHolidays","unlockedCaseTypes","getSubDomain","getEnvironment","minimumFetchIntervalMillis","fetchAndActivate","asString","enableProdMode","__NgCli_bootstrap_1","bootstrapModule","ANIMATION_QUERY_OPTIONS","ANIMATION_SLIDE_META","ANIMATION_STAY_META","ANIMATION_TRANSFORM_OFF_SCREEN","ANIMATION_TRANSFORM_ON_SCREEN","ANIMATION_OPACITY_HIDE","ANIMATION_OPACITY_SHOW","ANIMATION_ZINDEX_BELOW","ANIMATION_ZINDEX_ABOVE","ANIMATION_STAY_ENTER","useSelector","PageTransitionTriggerName","ANIMATION_TARGET_SELECTOR","AllStates","PAGE_BLANK","PAGE_REVERSE","AllTransitions","PAGE","ANIMATION_STAY_EXIT","VOID","PAGE_EXIT","PAGE_EXIT_REVERSE","ANIMATION_TO_RIGHT","ANIMATION_TARGET_TRIGGER","pageTransitionService","insertAnimationStackTrace","animationLog","setNeedsReverseTransition","reverseExitAnimation","getCorrectPageEnterTrigger","needsReverseTransition","getCorrectPageExitTrigger","getTransitionTriggerName","matchForEnterTriggers","matchForExitTriggers","lastTriggerNameCompleted","transitionTriggerName","onAnimationStartEvent","UNSET","onAnimationDoneEvent","_UiTemplatePageTransitionComponent","HubClass","protectedChannels","_remove","holder","ampSymbol","capsule","patternInfo","_toListeners","listenerName","SimpleGlobalModalService","_featureFlagsReady","disableClient","_featureFlags","CACHE_KEY","initializeFeatureFlag","_fetchFeatureFlags","CHECK_INTERVAL","_shouldFetchFlags","cachedFlags","_getCachedFlags","_globalModalSvc","expirationTS","cachedData","defaultVal","featureFlagsReady","checkMultipleFlags","_FeatureFlagService","SENTRY_BAGGAGE_KEY_PREFIX_REGEX","MAX_BAGGAGE_STRING_LENGTH","baggageObject","parseBaggageHeader","currBaggageObject","baggageHeaderToObject","objectToBaggageHeader","objectKey","objectValue","newBaggageHeader","dscKey","dscValue","keyOrValue","readableStreamLikeToAsyncGenerator","readableStream","__asyncGenerator","__await","isReadableStreamLike","UiHeaderDefaultComponent","_UiHeaderDefaultComponent","monthsNominativeEl","monthsGenitiveEl","momentToFormat","_monthsGenitiveEl","_monthsNominativeEl","calendarEl","_calendarEl","SpinnerComponent","_SpinnerComponent","thousandSeparatorChar","decimalChar","precision","rgx","precisionRegEx","_charToRegExpExpression","precisionMatch","_shift","applyMaskWithPattern","maskAndPattern","customPattern","cursor","stepBack","inputArray","_stripToDecimal","getPrecision","checkInputPrecision","percentage","thousandSeperatorCharEscaped","decimalMarkerEscaped","invalidChars","invalidCharRegexp","strForSep","_formatWithSeparators","commaShift","shiftStep","inputSymbol","daysCount","withoutDays","monthsCount","day1monthInput","day2monthInput","day1monthPaste","day2monthPaste","newPosition","actualShift","maskSymbol","_MaskApplierService","FailedCreationStatuses","SavingsSetupStatus","errorCustodialCreation","errorFboCreation","PendingAccountStatuses","accountCreated","TransferableLinkedBankStatuses","LINKED","SavingsAccountService","savingsSetup","microCoreUtilRemoteConfigService","initialAmount","isPayrollEligible","payrollSetup","hasSetupAutosaveBefore","schedule_paused","next_deposit_amount","schedule_type","hasTransferableBank","isFunctional","hasPendingSavingsAccount","hasFailedCreationSavingsAccount","isFailedCreation","rewards","reward","hasSavingsGoal","goal","getSavingsGoal","getStatements","getStatement","getTransferableLinkedBanks","getDepositAccount","getTransferAccounts","FREEZETRANSFERPULL","transferAccounts","TransferAccountType","available_balance","lastFour","linkedBank","ACH","createAccountWithSchedule","schedule","initiating_source","updateSchedule","createSchedule","createTransfer","deleteAccount","canAccessAutosave","getProductOnboardingEligibility","eligibility","_SavingsAccountService","work","intervalProvider","recycleAsyncId","requestAsyncId","_scheduler","_execute","errorValue","_bufferSize","_windowTime","_timestampProvider","dateTimestampProvider","_buffer","_infiniteTimeWindow","_trimBuffer","adjustedBufferSize","validateDataSchemeUsage","updateDirectInputsFromDataObject","shouldUpdateWithDataChanges","hasDataObjectUsed","hasDirectInputsSet","_UiBaseDataMoleculeComponent","RADIO_VALUE_ACCESSOR","RadioComponent","startSelected","inputViewChild","radioBlock","postLabel","isBoldLabel","radioButton","radioClick","onRadioFocus","radioFocus","onRadioBlur","radioBlur","_RadioComponent","_MicroUiMoleculeModule","weekEndings","maybeOptions","__SENTRY_TRACING__","enableTracing","isUpper","Scheduler","schedulerActionCtor","SchedulerAction","_active","webpackContext","debounceTime","dueTime","activeTask","lastValue","lastTime","emitWhenIdle","ANALYTICS_TYPE","GA_FID_KEY","ORIGIN_KEY","FETCH_TIMEOUT_MILLIS","GTAG_URL","createGtagTrustedTypesScriptURL","gtagURL","promiseAllSettled","gtagCore","initializationPromisesMap","dynamicConfigPromisesList","measurementIdToAppId","gtagParams","correspondingAppId","foundConfig","initializationPromisesToWaitFor","send_to","gaSendToList","dynamicConfigResults","sendToId","initializationPromise","LONG_RETRY_FACTOR","defaultRetryData","RetryData","throttleMetadata","getThrottleMetadata","setThrottleMetadata","deleteThrottleMetadata","getHeaders","Accept","appFields","appUrl","jsonResponse","httpStatus","responseMessage","retryData","timeoutMillis","throttleEndTimeMillis","AnalyticsAbortSignal","attemptFetchDynamicConfigWithRetry","setAbortableTimeout","backoffMillis","fetchDynamicConfig","isRetriableError","_attemptFetchDynamicConfigWithRetry","defaultEventParametersForInit","defaultConsentSettingsForInit","gtagFunction","flatProperties","errorInfo","installations","dataLayerName","dynamicConfigPromise","fetchDynamicConfigWithRetry","fidPromise","validateIndexedDB","envIsValid","dynamicConfig","findGtagScriptOnPage","scriptTags","insertScriptTag","trustedTypesPolicy","createTrustedTypesPolicy","policyName","policyOptions","trustedTypes","createPolicy","createScriptURL","gtagScriptURL","_setConsentDefaultForInit","consentSettings","configProperties","_setDefaultEventParametersForInit","_initializeAnalytics2","AnalyticsService","_delete","gtagCoreFunction","wrappedGtagFunction","gtagName","globalInitDone","warnOnBrowserContextMismatch","mismatchedEnvMessages","getOrCreateDataLayer","wrappedGtag","wrapOrCreateGtag","gtagFunctionName","_args","wrapGtag","gtagOnEvent","gtagOnConfig","consentAction","fieldName","_gtagWrapper","gtagWrapper","_x12","_initializeAnalytics","_x39","analyticsProvider","isInitialized","initializeAnalytics","analyticsInstance","setUserId$1","_x27","setUserProperties$1","_x31","logEvent$1","_x18","registerAnalytics","analyticsOptions","internalFactory","isInteropObservable","fromInteropObservable","fromArrayLike","fromPromise","reportUnhandledError","fromAsyncIterable","fromIterable","iterable","fromReadableStreamLike","createInvalidObservableTypeError","asyncIterable","asyncIterable_1","asyncIterable_1_1","e_1","__asyncValues","e_1_1","NewFeatureFlagDirective","brightsideWebFeatureFlag","checkFlagsOfArray","hasView","handleBoolResponse","_NewFeatureFlagDirective","SourceMap","_xdr","_atob","b64str","_ensureStackFrameIsLegit","sourceMapConsumerCache","ajax","_get","isDataUrl","offline","encodedSource","xhrPromise","_getSourceMapConsumer","sourceMappingURL","defaultSourceRoot","sourceMapConsumerPromise","sourceMapSource","_parseJson","getMappedLocation","mappedStackFrame","resolveMappedStackFrame","findFunctionName","guessedFunctionName","_findFunctionName","syntaxes","maxLines","commentPos","_ensureSupportedEnvironment","_findSourceMappingURL","lastSourceMappingUrl","matchSourceMappingUrl","sourceMappingUrlRegExp","sourceMapConsumer","_extractLocationInfoFromSourceMapSource","mappedSource","swap","ary","doQuickSort","comparator","pivotIndex","randomIntInRange","low","high","pivot","isHoliday","_holidays","_holidayFormat","holiday","isBusinessDay","workingWeekdays","_workingWeekdays","businessDaysIntoMonth","businessDay","prevBusinessDay","monthBusinessDays","businessDiff","d2","daysBetween","businessSubtract","nextBusinessDay","loop","_nextBusinessDayLimit","_prevBusinessDayLimit","partialEndDate","me","daysArr","monthNaturalDays","fromToday","monthBusinessWeeks","startDate","getBusinessWeeks","businessWeeksBetween","endDate","weeksArr","monthNaturalWeeks","Toast","stateChangeExpr","scheduleMicroTask","_onStart","triggerMicrotask","AnimationGroupPlayer","_players","doneCount","destroyCount","startCount","timeAtPosition","longestPlayer","longestSoFar","UI_SWITCH_OPTIONS","UI_SWITCH_CONTROL_VALUE_ACCESSOR","UiSwitchComponent","cdr","changeEvent","valueChange","onTouchedCallback","onChangeCallback","switchOffColor","switchColor","defaultBgColor","defaultBoColor","checkedLabel","uncheckedLabel","checkedTextColor","uncheckedTextColor","_checked","_disabled","_reverse","_loading","getColor","onToggle","beforeChange","_beforeChange","confirm","UiSwitchModule","TimeoutDirective","remoteConfigAngularTimeout","timeoutInMS","timedOut","_TimeoutDirective","numbersNouns","numberNoun","numberAsNoun","hundred","ten","translateFuture","translatePast","maxStackSize","callee","$1","caller","FUNC_TYPE","UNDEF_TYPE","OBJ_TYPE","STR_TYPE","MODEL","NAME","TYPE","VENDOR","ARCHITECTURE","CONSOLE","MOBILE","TABLET","SMARTTV","WEARABLE","EMBEDDED","AMAZON","APPLE","BROWSER","MICROSOFT","XIAOMI","ZEBRA","enumerize","enums","str1","str2","lowerize","rgxMapper","arrays","strMapper","windowsVersionMap","ME","XP","Vista","RT","cpu","EDGE","_rgxmap","mergedRegexes","getBrowser","_browser","majorize","getCPU","_cpu","_device","getEngine","getOS","_os","getUA","setUA","CPU","DEVICE","ENGINE","jQuery","Zepto","FinancialAccountTypes","AutoSaveScheduleStatus","ServiceabilityStatus","CardStatus","AccountCreationSteps","AccountCreationResponses","KYCResponseOrigin","FinancialAccountsCreationService","modalSvc","_featureFlagSvc","INTRO","VERIFICATION","CONSENTS","CREATE","KYC","COMPLETED","_accountCreatedResp","kycResponseOrigin","ACCOUNT_CREATION","checkResultCode","sharedErrors","advanceStep","stepIndex","creationStepsOrder","currentStep","retractStep","isStepBeforeCurrent","kycCheck","documentUuid","accountCreationResponse","KYC_MANUAL_REVIEW","KYC_VERIFICATION","createModal","contentKey","displayCloseButton","RETRY","headerImagePath","ENABLESOCUREMANUALREVIEW","socureManualReview","KYC_AUTOMATED_REVIEW","ACCOUNT_CREATION_FAILED","USER_CREATION_FAILED","KYC_DENIED","KYC_VERIFIED","KYC_RESUBMIT_ADDRESS","PRODUCT_PENDING","setAccountType","_FinancialAccountsCreationService","FinancialAccountCreationWaitingComponent","faCreateSvc","accountCreatedResp","createType","_FinancialAccountCreationWaitingComponent","FinancialAccountsCoreMainComponent","_FinancialAccountsCoreMainComponent","FinancialAccountsCoreService","getAccountsByType","getAccountById","accountId","getAccountDetails","_FinancialAccountsCoreService","SocureService","_rendererFactory","loadSocureScript","SCRIPT_PATH","_SocureService","_DesktopFeatureFinancialAccountsCoreModule","FinancialAccountCreationErrorComponent","_FinancialAccountCreationErrorComponent","FinancialAccountCreationGuard","verificationStatusSvc","getEmploymentVerificationStatus","employment_data_verification_status","VerificationStatusEnum","creationStep","_FinancialAccountCreationGuard","FinancialCoreKYCComponent","financialCoreSvc","socureSvc","simpleModalSvc","onSuccess","qrCodeNeeded","showVerifying","kycResp","showVerifyingModal","showKycModal","showSpinner","showSocureModal","socureScript","SocureInitializer","lib","sdkInitiated","Socure","unmount","_FinancialCoreKYCComponent","FinancialAccountsHistoryService","_recentTransactions","_transactionHistory","_hasMoreTransactions","getTransactions","callParams","callGetTransactions","getNextTransactionsPage","transactionsPerPage","transactionHistoryPage","transactionResp","GenericResponseCode","SERVICE_OK","handleHistoryResponse","currentHistory","allFetched","pages","page","lastTransactionId","_FinancialAccountsHistoryService","FinancialAccountsStatementsService","_statements","_taxStatements","groomMonthlyData","statementsResponse","yearObject","statements","getMonthlyStatements","groomedStatements","getTaxStatements","getDateForStatement","statementId","openBase64Pdf","base64String","byteString","ab","ia","blobUrl","_FinancialAccountsStatementsService","FinancialCoreKYCVerificationInProgressComponent","redirectHome","_FinancialCoreKYCVerificationInProgressComponent","equal","AvatarComponent","imageURL","avatarSize","isSmallAvatar","iconSize","isMediumAvatar","isLargeAvatar","avatarStyle","noBackground","bgColor","iconColor","_AvatarComponent","DisplayCardsSettings","extendWith","fbEvent","cardDetails","tapped","navToCardCta","processErrorNavigateOnClose","errorNavigateOnClose","handleErrorClose","_DisplayCardsComponent","_refCount","refCounter","sharedConnection","_connection","conn","connect","ConnectableObservable","subjectFactory","hasLift","getSubject","higherOrderRefCount","takeLast","finalize","PRIMARY_OUTLET","RouteTitleKey","ParamsAsMap","defaultUrlMatcher","segmentGroup","hasChildren","posParams","consumed","shallowEqual","equalArraysOrString","aSorted","bSorted","flatten","wrapIntoObservable","NG_DEV_MODE$b","pathCompareMap","exact","equalSegmentGroups","containee","matrixParams","equalPath","matrixParamsMatch","numberOfChildren","subset","containsSegmentGroup","paramCompareMap","equalParams","containsParams","ignored","containsTree","containsSegmentGroupHelper","containeePaths","containerPaths","containeeSegment","parameters","UrlTree","UrlSegmentGroup","_queryParamMap","DEFAULT_SERIALIZER","serialize","serializePaths","UrlSegment","parameterMap","_parameterMap","serializePath","bs","UrlSerializer","DefaultUrlSerializer","UrlParser","parseRootSegment","parseQueryParams","parseFragment","tree","serializeSegment","serializeQueryParams","strParams","encodeUriQuery","encodeUriFragment","primary","mapChildrenIntoArray","childOutlet","encodeUriString","encodeUriSegment","decodeQuery","serializeMatrixParams","SEGMENT_RE","matchSegments","QUERY_PARAM_RE","QUERY_PARAM_VALUE_RE","consumeOptional","peekStartsWith","parseChildren","parseQueryParam","parseSegment","parseParens","parseMatrixParams","parseParam","valueMatch","matchQueryParams","matchUrlQueryParamValue","decodedKey","decodedVal","allowPrimary","outletName","createRoot","rootCandidate","Ce","squashSegmentGroup","childCandidate","mergeTrivialChildren","isUrlTree","NG_DEV_MODE$a","createUrlTree","urlTree","commands","nav","computeNavigation","Navigation","numberOfDoubleDots","cmd","cmdIdx","outlets","segmentPath","urlPart","partIndex","toRoot","createTreeUsingPathIndex","lastPathIndex","startingPosition","findStartingPosition","Position","createPositionApplyingDoubleDots","ci","isMatrixParams","_urlSegment","processChildren","updateSegmentGroupChildren","updateSegmentGroup","_lastPathIndex","isCommandWithOutlets","oldRoot","oldSegmentGroup","newSegmentGroup","qp","replaceSegment","newRoot","oldSegment","newSegment","cmdWithOutlet","prefixedWith","currentCommandIndex","currentPathIndex","noMatch","pathIndex","commandIndex","slicedCommands","createNewSegmentGroup","getOutlets","createNewSegmentChildren","restoredState","RoutesRecognized","GuardsCheckStart","GuardsCheckEnd","shouldActivate","ResolveStart","RouteConfigLoadStart","RouteConfigLoadEnd","ChildActivationStart","ChildActivationEnd","ActivationStart","ActivationEnd","routerEvent","LegacyCreateUrlTree","currentUrlTree","CreateUrlTreeStrategy","Tree","_root","pathFromRoot","findNode","siblings","findPath","cc","TreeNode","nodeChildrenAsMap","RouterState","setRouterState","createEmptyState","rootComponent","createEmptyStateSnapshot","activated","ActivatedRouteSnapshot","RouterStateSnapshot","emptyUrl","emptyParams","emptyData","emptyQueryParams","ActivatedRoute","futureSnapshot","_futureSnapshot","_routerState","_paramMap","inheritedParamsDataResolve","paramsInheritanceStrategy","inheritingStartingFrom","flattenInherited","_resolvedData","urlSegment","advanceActivatedRoute","nextSnapshot","shallowEqualArrays","equalParamsAndUrlSegments","equalUrlParams","equalSegments","createNode","routeReuseStrategy","prevState","shouldReuseRoute","createOrReuseChildren","shouldAttach","detachedRouteHandle","retrieve","createActivatedRoute","NAVIGATION_CANCELING_ERROR","redirectingNavigationError","urlSerializer","navigationBehaviorOptions","navigationCancelingError","cancellationCode","isRedirectingNavigationCancelingError$1","isNavigationCancelingError$1","OutletContext","resolver","ChildrenOutletContexts","attachRef","onChildOutletCreated","childName","getOrCreateContext","onChildOutletDestroyed","onOutletDeactivated","onOutletReAttached","NG_DEV_MODE$8","RouterOutlet","_activatedRoute","activateEvents","deactivateEvents","attachEvents","detachEvents","parentContexts","ViewContainerRef","changeDetector","environmentInjector","EnvironmentInjector","firstChange","isTrackedInParentContexts","deactivate","initializeOutletWithName","activateWith","isActivated","activatedRouteData","hostView","resolverOrInjector","childContexts","OutletInjector","isComponentFactoryResolver","resolveComponentFactory","notFoundValue","ɵEmptyOutletComponent","getOrCreateRouteInjectorIfNeeded","currentInjector","_injector","createEnvironmentInjector","standardizeConfig","getOutlet","sortByMatchingOutlets","sortedConfig","getClosestRouteInjector","_loadedInjector","ActivateRoutes","futureState","currState","forwardEvent","activate","futureRoot","currRoot","deactivateChildRoutes","activateChildRoutes","futureNode","currNode","futureChild","childOutletName","deactivateRoutes","deactivateRouteAndItsChildren","shouldDetach","detachAndStoreRouteSubtree","deactivateRouteAndOutlet","activateRoutes","cmpFactoryResolver","ComponentFactoryResolver","CanActivate","CanDeactivate","getAllRouteGuards","getChildRouteGuards","getTokenOrFunctionIdentity","tokenOrFunction","NOT_FOUND","ɵisInjectable","futurePath","checks","canDeactivateChecks","canActivateChecks","prevChildren","getRouteGuards","shouldRun","shouldRunGuardsAndResolvers","runGuardsAndResolvers","isEmptyError","INITIAL_VALUE","prioritizedGuardValue","redirectIfUrlTree","noMatch$1","consumedSegments","remainingSegments","positionalParamSegments","matchWithChecks","runCanMatchGuards","canMatch","canMatchObservables","injectionToken","guard","isCanMatch","runInContext","slicedSegments","containsEmptyPathMatchesWithNamedOutlets","emptyPathMatch","createChildrenForEmptyPaths","primarySegment","_sourceSegment","_segmentIndexShift","containsEmptyPathMatches","addEmptyPathsToChildrenIfNeeded","isImmediateMatch","rawSegment","noLeftoversInUrl","NG_DEV_MODE$7","NoMatch$1","AbsoluteRedirect","absoluteRedirect","newTree","ApplyRedirects","configLoader","allowRedirects","splitGroup","rootSegmentGroup","expandSegmentGroup","noMatchError","expandChildren","expandSegment","childOutlets","sortedRoutes","expandedChild","last$1","expandSegmentAgainstRoute","matchSegmentAgainstRoute","expandSegmentAgainstRouteUsingRedirect","expandWildCardWithParamsAgainstRouteUsingRedirect","expandRegularSegmentAgainstRouteUsingRedirect","applyRedirectCommands","lineralizeSegments","newSegments","rawSegmentGroup","_loadedRoutes","cfg","getChildConfig","routerConfig","childInjector","splitSegmentGroup","matchedOnOutlet","cs","runCanLoadGuards","canLoadObservables","isCanLoad","shouldLoadResult","canLoadFails","applyRedirectCreateUrlTree","createSegmentGroup","createQueryParams","redirectToParams","actualParams","updatedSegments","createSegments","redirectToSegments","actualSegments","findPosParam","findOrReturn","redirectToUrlSegment","NoMatch","Recognizer","rootComponentType","recognize","processSegmentGroup","rootNode","routeState","inheritParamsAndData","routeNode","processSegment","outletChildren","takeWhile","mergedChildren","mergeEmptyPathMatches","sortActivatedRouteSnapshots","localeCompare","processSegmentAgainstRoute","matchResult","pathIndexShift","getPathIndexShift","_loadedComponent","getSourceSegmentGroup","getResolve","hasEmptyPathConfig","mergedNodes","duplicateEmptyPathNode","resultNode","mergedNode","hasStaticTitle","switchTap","nextResult","RouterConfigLoader","componentLoaders","childrenLoaders","onLoadStartListener","loadRunner","maybeUnwrapDefaultExport","onLoadEndListener","parentInjector","loadModuleFactoryOrRoutes","factoryOrRoutes","rawRoutes","requireStandaloneComponents","InjectFlags","Self","NG_DEV_MODE$5","NgModuleFactory","compileModuleAsync","isWrappedDefaultExport","NavigationTransitions","currentNavigation","lastSuccessfulNavigation","rootContexts","navigationId","hasRequestedNavigation","handleNavigationRequest","setupNavigations","targetPageId","currentRawUrl","extractedUrl","urlHandlingStrategy","rawUrl","routerState","targetSnapshot","currentRouterState","targetRouterState","guardsResult","overallTransitionState","completed","previousNavigation","browserUrlTree","urlTransition","navigated","onSameUrlNavigation","shouldProcessUrl","isBrowserTriggeredNavigation","applyRedirects","applyRedirects$1","finalUrl","recognize$1","newObservableError","urlUpdateStrategy","skipLocationChange","setBrowserUrl","routesRecognized","rawUrlTree","navStart","replaceUrl","guardsStart","checkGuards","runCanDeactivateChecks","futureRSS","currRSS","check","runCanDeactivate","currARS","canDeactivate","canDeactivateObservables","closestInjector","isCanDeactivate","isBoolean","runCanActivateChecks","fireChildActivationStart","fireActivationStart","runCanActivateChild","futureARS","canActivateChildGuardsMapped","getCanActivateChild","guardsMapped","isCanActivateChild","runCanActivate","canActivateObservables","isCanActivate","guardsEnd","restoreHistory","cancelNavigationTransition","resolveStart","dataResolved","resolveData","canActivateChecksResolved","runResolve","resolveNode","getDataKeys","getResolver","resolvedData","resolveEnd","loadComponents","loaders","loadedComponent","afterPreactivation","createRouterState","titleStrategy","updateTitle","navCancel","mergedTree","scheduleNavigation","navError","TitleStrategy","buildTitle","getResolvedTitleForRoute","DefaultTitleStrategy","RouteReuseStrategy","DefaultRouteReuseStrategy","BaseRouteReuseStrategy","detachedTree","ROUTER_CONFIGURATION","UrlHandlingStrategy","DefaultUrlHandlingStrategy","newUrlPart","wholeUrl","defaultErrorHandler","defaultMalformedUriErrorHandler","exactMatchOptions","subsetMatchOptions","disposed","currentPageId","ɵConsole","malformedUriErrorHandler","lastSuccessfulId","urlCreationStrategy","canceledNavigationResolution","navigationTransitions","isInAngularZone","resetConfig","browserPageId","ɵrouterPageId","resetRootComponentType","initialNavigation","setUpLocationChangeListener","locationSubscription","stateCopy","serializeUrl","getCurrentNavigation","navigationExtras","preserveFragment","removeEmptyProps","validateCommands","isActive","matchOptions","priorPromise","rej","generateNgRouterState","restoringFromCaughtError","targetPagePosition","resetState","resetUrlToCurrentUrlTree","routerPageId","RouterLink","tabIndexAttribute","_preserveFragment","_skipLocationChange","_replaceUrl","onChanges","isAnchorElement","updateHref","setTabIndexIfNotOnNativeEl","newTabIndex","applyAttributeValue","routerLink","sanitizedValue","ɵɵsanitizeUrlOrResourceUrl","attrName","attrValue","i3","RouterLinkActive","routerLinkActiveOptions","isActiveChange","routerEventsSubscription","links","subscribeToEachLinkOnChanges","linkInputChangesSubscription","allLinkChanges","isLinkActive","routerLinkActive","hasActiveLinks","ariaCurrentWhenActive","isActiveMatchOptions","isActiveCheckFn","PreloadingStrategy","RouterPreloader","setUpPreloading","processRoutes","injectorForCurrentRoute","injectorForChildren","preloadConfig","loadedChildren$","recursiveLoadChildren$","loadComponent$","ROUTER_SCROLLER","RouterScroller","viewportScroller","lastId","lastSource","restoredId","scrollPositionRestoration","anchorScrolling","createScrollEvents","scrollEventsSubscription","consumeScrollEvents","scheduleScrollEvent","routerFeature","kind","ɵkind","ɵproviders","ROUTER_IS_PROVIDED","getBootstrapListener","bootstrappedComponentRef","ApplicationRef","bootstrapDone","BOOTSTRAP_DONE","INITIAL_NAVIGATION","ROUTER_PRELOADER","componentTypes","withDebugTracing","ENVIRONMENT_INITIALIZER","stringifyEvent","groupEnd","withPreloading","ROUTER_FORROOT_GUARD","ROUTER_PROVIDERS","rootRoute","routerNgProbeToken","NgProbeToken","provideForRootGuard","SkipSelf","useHash","scrollOffset","provideInitialNavigation","ROUTER_INITIALIZER","APP_BOOTSTRAP_LISTENER","locationInitialized","afterNextNavigation","forms","relativeTimeWithPlural","relativeTimeWithSingular","relativeSeconds","PENDING_TIMEOUT_MS","PACKAGE_VERSION","INTERNAL_AUTH_VERSION","INSTALLATIONS_API_URL","TOKEN_EXPIRATION_BUFFER","isServerError","getInstallationsEndpoint","extractAuthTokenInfoFromResponse","requestStatus","expiresIn","getExpiresInFromResponseExpiresIn","creationTime","getErrorFromResponse","requestName","serverCode","serverMessage","serverStatus","retryIfServerError","responseExpiresIn","appConfig","heartbeatServiceProvider","heartbeatService","heartbeatsHeader","authVersion","sdkVersion","responseValue","registrationStatus","authToken","sleep","VALID_FID_PATTERN","INVALID_FID","generateFid","fidByteArray","bufferToBase64UrlSafe","getKey","fidChangeCallbacks","fidChanged","callFidChangeCallbacks","broadcastFidChange","getBroadcastChannel","broadcastChannel","BroadcastChannel","closeBroadcastChannel","DATABASE_NAME","DATABASE_VERSION","OBJECT_STORE_NAME","_x8","_x9","updateFn","getInstallationEntry","_x11","registrationPromise","installationEntry","oldEntry","updateOrCreateInstallationEntry","clearTimedOutRequest","entryWithPromise","triggerRegistrationIfNecessary","onLine","inProgressEntry","registrationTime","registerInstallation","waitUntilFidRegistration","_getInstallationEntry","registeredInstallationEntry","createInstallationRequest","_registerInstallation","updateInstallationRequest","hasInstallationRequestTimedOut","getGenerateAuthTokenEndpoint","getHeadersWithAuth","getAuthorizationHeader","installation","refreshAuthToken","_x17","tokenPromise","isEntryRegistered","oldAuthToken","isAuthTokenValid","isAuthTokenExpired","waitUntilAuthTokenRequest","makeAuthTokenRequestInProgressEntry","inProgressAuthToken","fetchAuthTokenFromServer","_refreshAuthToken","updateAuthTokenRequest","hasAuthTokenRequestTimedOut","generateAuthTokenRequest","updatedInstallationEntry","_fetchAuthTokenFromServer","installationsImpl","completeInstallationRegistration","_x24","_getToken","getMissingValueError","valueName","INSTALLATIONS_NAME","publicFactory","extractAppConfig","configKeys","getToken","_x23","registerInstallations","monthsNominative","monthsSubjective","translateSingular","translateSeconds","firstValueFrom","hasConfig","_modalObject","createGenericHelpModal","_SimpleGlobalModalService","LanguageSelectorService","_ready","_languageChanged","setUpService","authListener","activeLang","fbAttempts","maxRetry","supportedLocales","disableChangeLang","isAuth","isUserLoggedIn","getSetCachedActiveLang","dataEvent","isLangSupported","bypassPut","storeActiveLang","putChangeLang","preferred_language","_LanguageSelectorService","_angular_core__WEBPACK_IMPORTED_MODULE_11__","HttpHandler","HttpBackend","HttpHeaders","normalizedNames","lazyUpdate","lazyInit","maybeSetNormalizedName","lcName","copyFrom","applyUpdate","toDelete","existing","HttpUrlEncodingCodec","encodeKey","standardEncoding","encodeValue","decodeKey","decodeValue","STANDARD_ENCODING_REGEX","STANDARD_ENCODING_REPLACEMENTS","valueToString","HttpParams","updates","cloneFrom","encoder","fromString","fromObject","paramParser","rawParams","codec","eqIdx","appendAll","eKey","HttpContext","isArrayBuffer","isBlob","isFormData","HttpRequest","third","fourth","reportProgress","mightHaveBody","urlWithParams","qIdx","serializeBody","isUrlSearchParams","detectContentTypeHeader","setParams","HttpEventType","Sent","UploadProgress","ResponseHeader","DownloadProgress","User","HttpResponseBase","defaultStatus","defaultStatusText","statusText","HttpHeaderResponse","HttpResponse","HttpErrorResponse","addBody","events$","res$","jsonp","callbackParam","interceptorChainEndFn","finalHandlerFn","adaptLegacyInterceptorToChain","chainTailFn","interceptor","initialRequest","intercept","downstreamRequest","HTTP_INTERCEPTORS","HTTP_INTERCEPTOR_FNS","legacyInterceptorFnFactory","chain","HttpInterceptorHandler","backend","dedupedInterceptorFns","nextSequencedFn","interceptorFn","chainedInterceptorFn","XSSI_PREFIX","HttpXhrBackend","xhrFactory","detectedType","reqBody","headerResponse","partialFromXhr","getResponseUrl","onLoad","originalBody","sentHeaders","onDownProgress","progressEvent","loaded","lengthComputable","partialText","onUpProgress","upload","DONE","XSRF_ENABLED","XSRF_DEFAULT_COOKIE_NAME","XSRF_COOKIE_NAME","XSRF_DEFAULT_HEADER_NAME","XSRF_HEADER_NAME","HttpXsrfTokenExtractor","HttpXsrfCookieExtractor","lastCookieString","lastToken","parseCount","xsrfInterceptorFn","lcUrl","HttpFeatureKind","Interceptors","LegacyInterceptors","CustomXsrfConfiguration","NoXsrfProtection","JsonpSupport","RequestsMadeViaParent","makeHttpFeature","provideHttpClient","feature","makeEnvironmentProviders","LEGACY_INTERCEPTOR_FN","withXsrfConfiguration","nodeEventEmitterMethods","eventTargetMethods","jqueryMethods","isEventTarget","isNodeStyleEventEmitter","addListener","removeListener","toCommonHandlerRegistry","isJQueryStyleEventEmitter","off","subTarget","COMPLETE_NOTIFICATION","createNotification","EMPTY_OBSERVER","handleStoppedNotification","nextNotification","errorNotification","_bind","ConsumerObserver","partialObserver","handleUnhandledError","notification","CaptionComponent","_CaptionComponent","BackComponent","_BackComponent","configOrBufferSize","windowTime","share","connector","resetOnError","resetOnComplete","resetOnRefCountZero","ScopeClass","scopeInstance","versionedCarrier","objectProto","getKeys","isPOJO","initialObj","mergeObj","processHoursFunction","weekdaysCaseReplace","nominative","accusative","genitive","StepsComponent","itemClick","activeIndexChange","isClickableRouterLink","activeIndex","_StepsComponent","WaitingComponent","_WaitingComponent","inclusive","$0","$2","tapObserver","isUnsub","subscribeOn","scheduleAsyncIterable","scheduled","scheduleObservable","observeOn","scheduleArray","schedulePromise","scheduleIterable","scheduleReadableStreamLike","PhonePipe","pt1","pt2","pt3","_PhonePipe","CallFaComponent","support","phoneNumber","emitClick","_CallFaComponent","getClosureSafeProperty","objWithPropertyToExtract","fillProperties","overriddenName","newLineIndex","concatStringsWithSpace","before","after","__forward_ref__","forwardRefFn","resolveForwardRef","isForwardRef","isEnvironmentProviders","XSS_SECURITY_URL","RuntimeError","formatRuntimeError","renderStringify","throwProviderNotFoundError","injectorName","assertDefined","expected","comparison","ɵɵdefineInjector","getInjectableDef","getOwnDefinition","NG_PROV_DEF","NG_INJECTABLE_DEF","isInjectable","getInjectorDef","NG_INJ_DEF","NG_INJECTOR_DEF","ngInjectableDef","ngInjectorDef","Default","Host","_injectImplementation","setInjectImplementation","injectRootLimpMode","injectableDef","_global","THROW_IF_NOT_FOUND","DI_DECORATOR_FLAG","NG_TEMP_TOKEN_PATH","NG_TOKEN_PATH","NEW_LINE","NO_NEW_LINE","SOURCE","_currentInjector","setCurrentInjector","former","injectInjectorOnly","getInjectImplementation","convertToBitFlags","skipSelf","injectArgs","types","getInjectFlag","attachInjectFlag","noSideEffects","ChangeDetectionStrategy","OnPush","ViewEncapsulation$1","EMPTY_OBJ","EMPTY_ARRAY","NG_COMP_DEF","NG_DIR_DEF","NG_PIPE_DEF","NG_MOD_DEF","NG_FACTORY_DEF","NG_ELEMENT_ID","__NG_ELEMENT_ID__","componentDefCount","ɵɵdefineComponent","componentDefinition","declaredInputs","providersResolver","hostAttrs","onPush","directiveDefs","pipeDefs","getStandaloneInjector","viewQuery","setInput","schemas","tView","findHostDirectiveDefs","hostDirectives","invertObject","extractDirectiveDef","nonNull","getPipeDef$1","ɵɵsetComponentScope","pipes","getComponentDef","getDirectiveDef","ɵɵdefineNgModule","declarations","transitiveCompileScopes","ɵɵsetNgModuleScope","ngModuleDef","getNgModuleDef","secondary","newLookup","minifiedKey","publicName","declaredName","ɵɵdefineDirective","ɵɵdefinePipe","pipeDef","throwNotFound","HOST","TVIEW","FLAGS","PARENT","NEXT","TRANSPLANTED_VIEWS_TO_REFRESH","T_HOST","CLEANUP","CONTEXT","INJECTOR$1","RENDERER_FACTORY","RENDERER","SANITIZER","CHILD_HEAD","CHILD_TAIL","DECLARATION_VIEW","DECLARATION_COMPONENT_VIEW","DECLARATION_LCONTAINER","PREORDER_HOOK_FLAGS","QUERIES","ID","EMBEDDED_VIEW_INJECTOR","HEADER_OFFSET","HAS_TRANSPLANTED_VIEWS","NATIVE","VIEW_REFS","MOVED_VIEWS","CONTAINER_HEADER_OFFSET","isLView","isLContainer","isContentQueryHost","tNode","isComponentHost","componentOffset","isDirectiveHost","isComponentDef","isRootView","getFactoryDef","SimpleChange","ɵɵNgOnChangesFeature","NgOnChangesFeatureImpl","definition","ngOnChangesSetInput","rememberChangeHistoryAndInvokeOnChangesHook","simpleChangesStore","getSimpleChangesStore","privateName","setSimpleChangesStore","SIMPLE_CHANGES_STORE","previousChange","ngInherit","profiler","hookOrListener","SVG_NAMESPACE","unwrapRNode","getNativeByIndex","lView","getNativeByTNode","getTNode","getComponentLViewByIndex","nodeIndex","slotValue","viewAttachedToChangeDetector","getConstant","resetPreOrderHookFlags","updateTransplantedViewCount","lContainer","viewOrContainer","instructionState","lFrame","createLFrame","bindingsEnabled","getBindingsEnabled","getLView","getTView","ɵɵrestoreView","viewToRestore","contextLView","ɵɵresetView","getCurrentTNode","currentTNode","getCurrentTNodePlaceholderOk","setCurrentTNode","isParent","isCurrentTNodeParent","setCurrentTNodeAsNotParent","getBindingRoot","bindingRootIndex","bindingStartIndex","nextBindingIndex","bindingIndex","incrementBindingIndex","setBindingRootForHostBindings","currentDirectiveIndex","setCurrentDirectiveIndex","getCurrentQueryIndex","setCurrentQueryIndex","getDeclarationTNode","declTNode","enterDI","parentTNode","parentLView","allocLFrame","enterView","newView","newLFrame","inI18n","currentLFrame","childLFrame","selectedIndex","elementDepthCount","currentNamespace","leaveViewLight","oldLFrame","leaveDI","leaveView","getSelectedIndex","setSelectedIndex","getSelectedTNode","ɵɵnamespaceSVG","registerPostOrderHooks","directiveStart","directiveEnd","lifecycleHooks","ngAfterContentChecked","ngAfterViewChecked","contentHooks","contentCheckHooks","viewHooks","viewCheckHooks","destroyHooks","executeCheckHooks","callHooks","executeInitAndCheckHooks","initPhase","incrementInitPhaseFlags","currentView","currentNodeIndex","nodeIndexLimit","lastNodeIndexFound","callHook","isInitHook","directive","NO_PARENT_INJECTOR","NodeInjectorFactory","isViewProvider","injectImplementation","resolving","canSeeViewProviders","injectImpl","setUpAttributes","native","namespaceURI","attrVal","isAnimationProp","isNameOnlyAttributeMarker","marker","mergeHostAttrs","dst","srcMarker","mergeHostAttribute","markerInsertPosition","dstValue","hasParentInjector","parentLocation","getParentInjectorIndex","getParentInjectorView","startView","viewOffset","getParentInjectorViewOffset","parentView","includeViewProviders","setIncludeViewProviders","BLOOM_MASK","BLOOM_BUCKET_BITS","nextNgElementId","getOrCreateNodeInjectorForNode","existingInjectorIndex","getInjectorIndex","firstCreatePass","injectorIndex","insertBloom","blueprint","parentLoc","getParentInjectorLocation","parentIndex","parentData","footer","declarationViewOffset","lViewCursor","getTNodeFromLView","diPublicInInjector","bloomAdd","bloomHash","notFoundValueOrThrow","lookupTokenUsingModuleInjector","moduleInjector","previousInjectImplementation","getOrCreateInjectable","embeddedInjectorValue","lookupTokenUsingEmbeddedInjector","currentLView","nodeInjectorValue","lookupTokenUsingNodeInjector","embeddedViewInjector","embeddedViewInjectorValue","bloomHashBitOrFactory","tokenId","createNodeInjector","previousTView","hostTElementNode","shouldSearchParent","bloomHasToken","searchTokensOnInjector","currentTView","injectableIdx","locateDirectiveOrProvider","getNodeInjectable","canAccessViewProviders","isHostSpecialCase","nodeProviderIndexes","providerIndexes","tInjectables","injectablesStart","directivesStart","cptViewProvidersCount","endIndex","providerTokenOrDef","dirDef","tData","isFactory","throwCyclicDependencyError","depPath","stringifyForError","previousIncludeViewProviders","registerPreOrderHooks","directiveIndex","directiveDef","wrappedOnChanges","preOrderHooks","preOrderCheckHooks","injectorView","isFirstHostTNode","NodeInjector","_tNode","_lView","ɵɵgetInheritedFactory","ownConstructor","ownFactory","getFactoryOf","objectPrototype","tViewType","ɵɵinjectAttribute","attrNameToInject","injectAttributeImpl","attrsLength","PARAMETERS","PROP_METADATA","makeMetadataCtor","propName","makeParamDecorator","parentClass","metaCtor","ParamDecoratorFactory","annotationInstance","ParamDecorator","annotation","unusedKey","ngMetadataName","annotationCls","makePropDecorator","additionalProcessing","PropDecoratorFactory","decoratorInstance","PropDecorator","_desc","deepForEach","addToArray","removeFromArray","newArray","keyValueArraySet","keyValueArray","keyValueArrayIndexOf","arrayInsert2","value1","keyValueArrayGet","_arrayIndexOfSorted","middle","TRACKED_LVIEWS","uniqueIdCounter","MONKEY_PATCH_KEY_NAME","attachPatchData","registerLView","_icuContainerIterate","icuContainerIterate","tIcuContainerNode","getLViewParent","getFirstLContainer","getNearestLContainer","getNextLContainer","applyToElementOrContainer","lNodeToHandle","beforeNode","isComponent","rNode","nativeAppendChild","nativeInsertBefore","nativeRemoveNode","nativeParent","nativeParentNode","nativeRemoveChild","applyContainer","parentRElement","applyView","createElementNode","detachMovedView","declarationContainer","movedViews","declarationViewIndex","insertionLContainer","detachView","removeIndex","indexInContainer","viewToDetach","declarationLContainer","removedLView","removeViewFromContainer","lQueries","destroyLView","destroyViewTree","rootView","lViewOrLContainer","cleanUpView","firstView","executeOnDestroys","toCall","callContext","processCleanups","tCleanup","lCleanup","lastLCleanupIndex","targetIdx","instanceCleanupFn","unregisterLView","getParentRElement","getClosestRElement","nativeAppendOrInsertBefore","getInsertInFrontOfRNode","_getInsertInFrontOfRNodeWithI18n","_processI18nInsertBefore","policy$1","policy","getInsertInFrontOfRNodeWithNoI18n","childRNode","childTNode","parentRNode","anchorNode","getFirstNativeNode","tNodeType","getBeforeNodeForView","elIcuContainerChild","rNodeOrLContainer","projectionNodes","getProjectionNodes","projection","viewIndexInContainer","nextViewIndex","firstTNodeOfView","applyNodes","isProjection","rawSlotValue","nextRNode","applyProjectionRecursive","projectionNext","tProjectionNode","componentLView","nodeToProjectOrRNodes","writeDirectClass","setupStaticAttributes","mergedAttrs","writeDirectStyle","trustedHTMLFromString","html","getPolicy$1","createHTML","createScript","setDocument","getPolicy","trustedHTMLFromStringBypass","trustedScriptURLFromStringBypass","SafeValueImpl","changingThisBreaksApplicationSecurity","SafeHtmlImpl","getTypeName","SafeStyleImpl","SafeScriptImpl","SafeUrlImpl","SafeResourceUrlImpl","unwrapSafeValue","allowSanitizationBypassAndThrow","actualType","getSanitizationBypassType","bypassSanitizationTrustHtml","trustedHtml","bypassSanitizationTrustStyle","trustedStyle","bypassSanitizationTrustScript","trustedScript","bypassSanitizationTrustUrl","trustedUrl","bypassSanitizationTrustResourceUrl","trustedResourceUrl","DOMParserHelper","inertDocumentHelper","getInertBodyElement","DOMParser","parseFromString","InertDocumentHelper","defaultDoc","inertDocument","inertHtml","inertBodyElement","templateEl","innerHTML","inertBody","documentMode","stripCustomNsAttrs","elAttrs","SAFE_URL_PATTERN","_sanitizeUrl","tagSet","sets","VOID_ELEMENTS","OPTIONAL_END_TAG_BLOCK_ELEMENTS","OPTIONAL_END_TAG_INLINE_ELEMENTS","VALID_ELEMENTS","URI_ATTRS","VALID_ATTRS","SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS","SanitizingHtmlSerializer","sanitizedSomething","sanitizeChildren","traverseContent","startElement","endElement","checkClobberedElement","elAttr","lower","encodeEntities","compareDocumentPosition","DOCUMENT_POSITION_CONTAINED_BY","SURROGATE_PAIR_REGEXP","NON_ALPHANUMERIC_REGEXP","inertBodyHelper","_sanitizeHtml","unsafeHtmlInput","getInertBodyHelper","isDOMParserAvailable","unsafeHtml","mXSSAttempts","parsedHtml","getTemplateContent","isTemplateElement","ɵɵsanitizeHtml","sanitizer","getSanitizer","getDocument","ɵɵsanitizeUrl","unsafeUrl","ɵɵsanitizeResourceUrl","unsafeResourceUrl","getUrlSanitizer","INJECTOR","INJECTOR_DEF_TYPES","NullInjector","importProvidersFrom","internalImportProvidersFrom","ɵfromNgModule","checkForStandaloneCmp","providersOut","dedup","injectorTypesWithProviders","internalSource","walkProviderTree","processInjectorTypesWithProviders","typesWithProviders","deepForEachProvider","parents","defType","injDef","cmpDef","isDuplicate","dep","importTypesWithProviders","imported","defProviders","USE_VALUE$1","isValueProvider","isTypeProvider","INJECTOR_SCOPE","NOT_YET","CIRCULAR","NULL_INJECTOR$1","getNullInjector","R3Injector","records","_ngOnDestroyHooks","_onDestroyHooks","forEachSingleProvider","processProvider","makeRecord","injectorDefTypes","assertNotDestroyed","previousInjector","couldBeInjectableType","injectableDefInScope","injectableDefOrInjectorDefFactory","hydrate","catchInjectorError","injectorErrorName","tokenPath","formatError","resolveInjectorInitializers","initializers","initializer","providerToRecord","providerToFactory","multiRecord","hasOnDestroy","getUndecoratedInjectableFactory","paramLength","inheritedInjectableDef","getInheritedInjectableDef","typeName","ngModuleType","unwrappedProvider","isFactoryProvider","isExistingProvider","classRef","hasDeps","ComponentRef$1","ComponentFactory$1","_NullComponentFactoryResolver","noComponentFactoryError","ComponentFactoryResolver$1","NULL","injectElementRef","createElementRef","ElementRef","unwrapElementRef","Renderer2","injectRenderer2","nodeAtIndex","Sanitizer","Version","minor","NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR","ERROR_ORIGINAL_ERROR","getOriginalError","_console","handleError","originalError","_findOriginalError","ɵɵresolveWindow","ɵɵresolveDocument","maybeUnwrapFn","classIndexOf","classToSearch","startingIndex","foundIndex","NG_TEMPLATE_SELECTOR","isCssClassMatching","cssClassToMatch","isProjectionMode","isInlineTemplate","hasTagAndTypeMatch","currentSelector","isNodeMatchingSelector","nodeAttrs","nameOnlyMarkerIdx","getNameOnlyMarkerIndex","skipToNextSelector","isPositive","selectorAttrValue","attrIndexInNode","findAttrIndexInNode","nodeAttrValue","compareAgainstClassName","bindingsMode","maybeAttrName","matchTemplateAttribute","isNodeMatchingSelectorList","isSelectorInSelectorList","selectorListLoop","currentSelectorInList","maybeWrapInNotSelector","isNegativeMode","stringifyCSSSelector","currentChunk","valueOrMarker","NO_CHANGE","ɵɵadvance","selectIndexInternal","checkNoChangesMode","createInjector","additionalProviders","createInjectorWithoutInjectorInstances","ɵɵdirectiveInject","ɵɵinvalidFactory","refreshContentQueries","directiveDefIdx","createLView","tHostNode","rendererFactory","getUniqueLViewId","getOrCreateTNode","createTNodeAtIndex","createTNode","tParent","insertBeforeIndex","directiveStylingLast","propertyBindings","localNames","initialInputs","tViews","stylesWithoutHost","residualStyles","classesWithoutHost","residualClasses","classBindings","styleBindings","isInI18nBlock","getCurrentParentTNode","allocExpando","numSlotsToAlloc","allocIdx","renderView","executeViewQueryFn","templateFn","executeTemplate","staticContentQueries","staticViewQueries","renderChildComponents","hostLView","renderComponent","incompleteFirstPass","refreshView","setBindingIndex","hooksInitPhaseCompleted","markTransplantedViewsForRefresh","movedLView","refreshEmbeddedViews","embeddedLView","embeddedTView","processHostBindingOpCodes","hostBindingOpCodes","opCode","directiveIdx","bindingRootIndx","hostBindingFn","refreshChildComponents","refreshComponent","firstUpdatePass","prevSelectedIndex","isUpdatePhase","executeContentQueries","createDirectivesInstances","instantiateAllDirectives","addComponentLogic","hostTNode","getOrCreateComponentTView","componentView","addToViewTree","setInputsFromAttrs","invokeDirectivesHostBindings","saveResolvedLocalsInData","viewData","localRefExtractor","localIndex","createTView","constsOrFactory","initialViewLength","createViewBlueprint","queries","expandoStartIndex","directiveRegistry","pipeRegistry","storeCleanupWithContext","cleanupFn","getOrCreateLViewCleanup","getOrCreateTViewCleanup","generatePropertyAliases","aliasMap","propertyAliases","hostDirectiveAliasMap","internalName","addPropertyAlias","elementPropertyInternal","nativeOnly","dataValue","inputData","setInputsForProperty","markDirtyIfOnPush","mapPropName","viewIndex","childComponentLView","resolveDirectives","localRefs","hasDirectives","exportsMap","findDirectiveDefMatches","hostDirectiveDefs","hostDirectiveMatches","markAsComponentHost","initializeDirectives","cacheMatchingLocalNames","initTNodeFlags","numberOfDirectives","preOrderHooksFound","preOrderCheckHooksFound","configureViewWithDirective","saveNameToExportMap","lifeCycleHooks","initializeInputAndOutputAliases","hostDirectiveDefinitionMap","tViewData","tNodeAttrs","inputsFromAttrs","inputsStore","outputsStore","aliasData","aliasedOutputs","generateInitialInputs","elementIndex","getCurrentDirectiveIndex","invokeHostBindingsInCreationMode","directiveFactory","nodeInjectorFactory","registerHostBindingOpCodes","directiveVarsIdx","elementIndx","lastSelectedElementIdx","elementAttributeInternal","setElementAttribute","initialInputData","inputsToStore","inputConfig","createLContainer","hostNative","componentHostIdx","refreshContainsDirtyView","componentTView","syncViewWithBlueprint","markViewDirty","detectChangesInternal","notifyErrorHandler","viewQueryFn","textBindingInternal","updateTextNode","computeStaticStyling","writeToHost","collectNativeNodes","lNode","lViewInAContainer","lViewFirstChildTNode","nodesInSlot","ViewRef$1","_cdRefInjectingView","_appRef","_attachedToViewContainer","rootNodes","viewRefs","reattach","checkNoChanges","attachToViewContainerRef","detachFromAppRef","renderDetachView","attachToAppRef","RootViewRef","componentDef","ComponentFactory","toRefArray","nonMinified","templateName","ChainedInjector","componentType","stringifyCSSSelectorList","selectorList","isBoundToModule","projectableNodes","rootSelectorOrNode","realEnvironmentInjector","rootViewInjector","hostRenderer","elementName","hostRNode","locateHostElement","elementOrSelector","getNamespace","rootFlags","rootTView","rootLView","tElementNode","rootComponentDef","rootDirectives","createRootComponentTNode","createRootComponentView","applyRootComponentStyling","viewRenderer","setRootNodeAttributes","extractAttrsAndClassesFromSelector","projectNodes","nodesforSlot","createRootComponent","hostFeatures","rootTNode","LifecycleHooksFeature","ComponentRef","_rootLView","ɵɵInheritDefinitionFeature","superType","getSuperType","shouldInheritFields","inheritanceChain","superDef","writeableDef","maybeUnwrapEmpty","superHostBindings","inheritHostBindings","superViewQuery","superContentQueries","inheritViewQuery","inheritContentQueries","defData","mergeHostAttrsAcrossInheritance","prevViewQuery","prevContentQueries","prevHostBindings","_symbolIterator","isListLikeIterable","isJsObject","updateBinding","getBinding","bindingUpdated","bindingUpdated2","exp1","exp2","different","bindingUpdated4","exp3","exp4","ɵɵattribute","interpolation1","v0","interpolation2","v1","getBindingIndex","ɵɵattributeInterpolate1","interpolatedValue","ɵɵtemplate","attrsIndex","localRefsIndex","templateFirstCreatePass","tViewConsts","ɵɵreference","getContextLView","ɵɵproperty","setDirectiveInputsWhichShadowsStyling","isClassBased","ɵɵelementStart","getNamespace$1","elementStartFirstCreatePass","elementStart","getElementDepthCount","increaseElementDepthCount","ɵɵelementEnd","decreaseElementDepthCount","elementEnd","hasClassInput","hasStyleInput","ɵɵelement","ɵɵelementContainerStart","elementContainerStartFirstCreatePass","ɵɵelementContainerEnd","ɵɵelementContainer","ɵɵgetCurrentView","isSubscribable","ɵɵlistener","listenerFn","useCapture","eventTargetResolver","listenerInternal","isTNodeDirectiveHost","processOutputs","lCleanupIndex","idxOrTargetGetter","existingListener","findExistingListener","tNodeIdx","cleanupEventName","listenerIdxInLCleanup","__ngLastListenerFn__","__ngNextListenerFn__","wrapListener","propsLength","executeListenerWithErrorHandling","wrapWithPreventDefault","wrapListenerIn_markDirtyAndPreventDefault","nextListenerFn","ɵɵnextContext","nextContextImpl","walkUpViews","nestingLevel","matchingProjectionSlotIndex","projectionSlots","wildcardNgContentIndex","ngProjectAsAttrVal","getProjectAsAttrValue","ngProjectAsAttrIdx","ɵɵprojectionDef","componentNode","projectionHeads","tails","componentChild","slotIndex","ɵɵprojection","selectorIndex","applyProjection","ɵɵpropertyInterpolate","ɵɵpropertyInterpolate1","ɵɵpropertyInterpolate2","toTStylingRange","getTStylingRangePrev","tStylingRange","setTStylingRangePrevDuplicate","getTStylingRangeNext","setTStylingRangeNext","setTStylingRangeNextDuplicate","markDuplicates","tStylingKey","isPrevDir","isClassBinding","tStylingAtIndex","isMap","foundDuplicate","tStyleRangeAtCursor","isStylingMatch","tStylingKeyCursor","parserState","textEnd","keyEnd","valueEnd","getLastParsedKey","parseClassNameNext","consumeClassToken","consumeWhitespace","ɵɵstyleProp","checkStylingProperty","ɵɵclassProp","ɵɵclassMap","checkStylingMap","classStringParser","parseClassName","resetParserState","stylingFirstUpdatePass","updateStyling","normalizeSuffix","stringParser","hasStylingInputShadow","isInHostBindings","staticPrefix","updateStylingMap","oldKeyValueArray","newKeyValueArray","oldIndex","newIndex","oldKey","newKey","setKey","toStylingKeyValueArray","styleKeyValueArray","unwrappedValue","isHostBindings","wrapInStaticStylingKey","stylingKey","hostDirectiveDef","getCurrentDirectiveDef","residual","collectStylingFromTAttrs","collectStylingFromDirectives","templateStylingKey","getTemplateHeadTStylingKey","bindings","setTemplateHeadTStylingKey","collectResidual","insertTStylingBinding","tStylingKeyWithStatic","isHostBinding","tBindings","tmplHead","tmplTail","isKeyDuplicateOfStatic","setTStylingRangePrev","markDuplicateOfResidualStyling","currentDirective","desiredMarker","currentMarker","tRange","higherPriorityValue","getTStylingRangeNextDuplicate","findStylingValue","isStylingValuePresent","getTStylingRangePrevDuplicate","applyStyling","isPrevDirection","rawKey","containsStatics","isStylingMap","valueAtLViewIndex","ɵɵtext","textNative","ɵɵtextInterpolate","ɵɵtextInterpolate1","interpolated","ɵɵtextInterpolate2","ɵɵclassMapInterpolate1","ɵɵhostProperty","localeEn","LOCALE_DATA","findLocaleData","normalizedLocale","getLocaleData","getLocalePluralCase","LocaleDataIndex","PluralCase","common","FirstDayOfWeek","WeekendRange","CurrencyCode","CurrencySymbol","CurrencyName","Directionality","DEFAULT_LOCALE_ID","LOCALE_ID$1","resolveProvider","lInjectablesBlueprint","providerFactory","beginIndex","existingFactoryIndex","registerDestroyHooksIfSupported","existingProvidersFactoryIndex","existingViewProvidersFactoryIndex","doesViewProvidersFactoryExist","multiFactory","factoryFn","componentProviders","multiFactoryAdd","multiViewProvidersFactoryResolver","multiProvidersFactoryResolver","contextIndex","indexInFactory","providerIsTypeProvider","providerIsClassProvider","isClassProvider","existingCallbacksIndex","isComponentProvider","lData","multiResolve","factories","componentCount","multiProviders","ɵɵProvidersFeature","viewProviders","processProvidersFn","NgModuleRef$1","NgModuleFactory$1","createNgModule","NgModuleRef","_bootstrapComponents","destroyCbs","componentFactoryResolver","_r3Injector","moduleType","EnvironmentNgModuleRefAdapter","debugName","StandaloneService","cachedInjectors","getOrCreateStandaloneInjector","standaloneInjector","ɵɵStandaloneFeature","ɵɵpureFunction0","slotOffset","pureFn","ɵɵpureFunction1","pureFunction1Internal","ɵɵpureFunction2","pureFunction2Internal","ɵɵpureFunction3","pureFunction3Internal","ɵɵpureFunction4","pureFunction4Internal","bindingRoot","getPureFunctionReturnValue","ɵɵpureFunction5","exp5","ɵɵpureFunction6","exp6","returnValueIndex","lastReturnValue","bindingUpdated3","ɵɵpipe","pipeName","getPipeDef","pipeFactory","pipeInstance","ɵɵpipeBind1","isPure","ɵɵpipeBind2","ɵɵpipeBind3","v3","_wrapInTimeout","EventEmitter_","isAsync","__isAsync","nextFn","errorFn","completeFn","symbolIterator","_results","QueryList","_emitDistinctChangesOnly","_changesDetected","_changes","resultsTree","identityAccessor","newResultFlat","POSITIVE_INFINITY","arrayEquals","valueA","valueB","notifyOnChanges","setDirty","TemplateRef","injectTemplateRef","ViewEngineTemplateRef","R3TemplateRef","_declarationLView","_declarationTContainer","declarationViewLQueries","createTemplateRef","injectViewContainerRef","createContainerRef","VE_ViewContainerRef","R3ViewContainerRef","_lContainer","_hostTNode","_hostLView","getViewRefs","indexOrOptions","viewRef","componentFactoryOrType","isComponentFactory","isType","ngModuleRef","componentFactory","contextInjector","viewAttachedToContainer","prevIdx","prevLContainer","prevVCRef","adjustedIdx","insertView","containerLength","trackMovedView","addViewToContainer","parentNativeNode","getOrCreateViewRefs","viewRefsArr","detachedView","commentNode","nativeNextSibling","LQuery_","queryList","LQueries_","tQueries","noOfInheritedQueries","viewLQueries","tQuery","getByIndex","indexInDeclarationView","dirtyQueriesWithMatches","getTQuery","TQueryMetadata_","TQueries_","queriesForTemplateRef","childQueryIndex","tqueryClone","track","tquery","TQuery_","crossesNgTemplate","_appliesToNextNode","_declarationNodeIndex","isApplyingToNode","matchTNode","addMatch","declarationNodeIdx","matchTNodeWithReadOption","getIdxOfMatchingSelector","nodeMatchIdx","directiveOrProviderIdx","matchIdx","createResultForNode","matchingIdx","createResultByTNodeType","createSpecialToken","materializeViewResults","queryIndex","lQuery","tQueryMatches","matchedNodeIdx","collectQueryResults","lViewResults","embeddedLViews","ɵɵqueryRefresh","isCreationMode","ɵɵviewQuery","createTQuery","createLQuery","ɵɵcontentQuery","saveContentQueryAndDirectiveIndex","tViewContentQueries","ɵɵloadQuery","loadQueryInternal","ɵɵtemplateRefExtractor","bindingPropertyName","appInits","initialized","runInitializers","asyncInitPromises","initResult","observableAsPromise","_appIdRandomProviderFactory","_randomChar","Console","getGlobalLocale","$localize","ModuleWithComponentFactories","ngModuleFactory","componentFactories","Compiler","compileModuleSync","compileModuleAndAllComponentsSync","declaration","compileModuleAndAllComponentsAsync","clearCacheFor","getModuleId","enableLongStackTrace","shouldCoalesceEventChangeDetection","shouldCoalesceRunChangeDetection","hasPendingMacrotasks","hasPendingMicrotasks","isStable","onUnstable","onMicrotaskEmpty","onStable","assertZonePatched","_nesting","_outer","_inner","TaskTrackingZoneSpec","longStackTraceZoneSpec","lastRequestAnimationFrameId","nativeRequestAnimationFrame","getNativeRequestAnimationFrame","nativeCancelAnimationFrame","cancelAnimationFrame","unpatchedRequestAnimationFrame","unpatchedCancelAnimationFrame","forkInnerZoneWithAngularBehavior","delayChangeDetectionForEventsDelegate","delayChangeDetectionForEvents","isCheckStableRunning","fakeTopEventTask","scheduleEventTask","updateMicroTaskStatus","checkStable","invoke","isAngularZone","onInvokeTask","applyThis","applyArgs","onEnter","invokeTask","onLeave","onInvoke","onHasTask","hasTaskState","hasTask","_hasPendingMicrotasks","microTask","macroTask","onHandleError","runTask","EMPTY_PAYLOAD","cancelTask","NoopNgZone","TESTABILITY","TESTABILITY_GETTER","_testabilityGetter","testabilityGetter","_pendingCount","_isZoneStable","_didWork","_callbacks","taskTrackingZone","setTestabilityGetter","_watchAngularEvents","assertNotInAngularZone","_runCallbacksIfReady","increasePendingRequestCount","decreasePendingRequestCount","doneCb","getPendingTasks","updateCb","macroTasks","creationLocation","addCallback","getPendingRequestCount","registerApplication","unregisterApplication","findProviders","using","exactMatch","_applications","unregisterAllApplications","_platformInjector","ALLOW_MULTIPLE_PLATFORMS","PLATFORM_DESTROY_LISTENERS","parentPlatformFactory","desc","extraProviders","getPlatform","platformProviders","createPlatform","PlatformRef","runPlatformInitializers","inits","createPlatformInjector","assertPlatform","requiredToken","_modules","_destroyListeners","bootstrapModuleFactory","moduleFactory","ngZone","getNgZone","ngZoneToUse","getNgZoneOptions","ngZoneEventCoalescing","ngZoneRunCoalescing","ngZoneInjector","moduleRef","exceptionHandler","_callAndReportToErrorHandler","initStatus","setLocaleId","_moduleDoBootstrap","compilerOptions","optionsReducer","compileNgModuleFactory","ngDoBootstrap","destroyListeners","objs","_exceptionHandler","_bootstrapListeners","_views","_runningTick","_stable","_onMicrotaskEmptySubscription","tick","isCurrentlyStable","stableSub","unstableSub","assertInAngularZone","merge$1","componentOrFactory","cf","compRef","_loadComponent","attachView","viewCount","warnIfDestroyed","isDevMode","injectChangeDetectorRef","createViewRef","isPipe","DefaultIterableDifferFactory","trackByFn","DefaultIterableDiffer","trackByIdentity","_linkedRecords","_unlinkedRecords","_previousItHead","_itHead","_itTail","_additionsHead","_additionsTail","_movesHead","_movesTail","_removalsHead","_removalsTail","_identityChangesHead","_identityChangesTail","forEachItem","nextIt","nextRemove","addRemoveOffset","moveOffsets","getPreviousIndex","adjPreviousIndex","_nextRemoved","localMovePreviousIndex","localCurrentIndex","forEachPreviousItem","_nextPrevious","_nextAdded","forEachMovedItem","_nextMoved","_nextIdentityChange","collection","_reset","itemTrackBy","mayBeDirty","trackById","_verifyReinsertion","_addIdentityChange","_mismatch","iterateListLike","_truncate","previousRecord","_prev","_reinsertAfter","_moveAfter","_addAfter","IterableChangeRecord_","reinsertRecord","_addToMoves","nextRecord","_addToRemovals","_unlink","prevRecord","_prevRemoved","_insertAfter","_DuplicateMap","toIndex","_prevDup","_nextDup","_DuplicateItemRecordList","_head","_tail","atOrAfterIndex","duplicates","recordList","moveOffset","DefaultKeyValueDifferFactory","DefaultKeyValueDiffer","_records","_mapHead","_appendAfter","_previousMapHead","_changesHead","_changesTail","_nextChanged","_forEach","_maybeAddToChanges","_getOrCreateRecordForKey","_insertBeforeOrAppend","KeyValueChangeRecord_","_addToAdditions","_addToChanges","defaultIterableDiffersFactory","IterableDiffers","copied","defaultKeyValueDiffersFactory","KeyValueDiffers","kv","coerceToBoolean","ctx_r21","DisplayQuestionsComponent","formBuilder","flowManageService","questionForm","questionAnswer","questionAnswerOther","isChoiceMulti","currentQuestion","field_type","QuestionType","CHOICE_MULTI","blankQuestion","choices","field_label","CHOICE","questionOrder","questionIndex","questionIsSkippable","isSkippable","overrideData","buildAnswer","entered_value","buildSkippedAnswer","questionAnswers","buildChoiceAnswer","questionAnswerFormItem","buildChoiceMultiAnswer","answerString","multiAnswerPlaceholder","answer","handlePrevQuestion","choiceId","handleNextQuestion","handleSubmitQuestions","answers","answersSubmitted","checkAndToggleOtherRadio","isOther","isAlreadyShowing","otherAnswerShowIndexes","checkAndToggleOtherBox","handleCheckboxChanged","filterThisValue","_DisplayQuestionsComponent","_angular_core__WEBPACK_IMPORTED_MODULE_8__","_capitalize","_getter","booleanProps","numericProps","stringProps","getArgs","setArgs","getEvalOrigin","evalOrigin","setEvalOrigin","getFileName","getLineNumber","getColumnNumber","getIsEval","argsStartIndex","argsEndIndex","locationString","UiNavigationExitCloseComponent","fromClose","_UiNavigationExitCloseComponent","defaultThrottleConfig","duration$","durationSelector","sendValue","throttled","endThrottling","cleanupThrottling","startThrottle","seed","scanInternals","hasSeed","emitOnNext","emitBeforeComplete","hasState","ButtonComponent","_getHostElement","_hasHostAttributes","isSmallButton","isOutlined","isLink","isFluidButton","isIconButton","setDisabled","_ButtonComponent","fns","CreditService","isCreditScoreEnabled","getCreditScore","getToastNotificationByCreditStatus","leftImage","disconnectCreditReport","getCreditSummary","getCreditReport","getCreditSubscription","_CreditService","instances","LogLevel","SILENT","levelStringToEnum","silent","defaultLogLevel","ConsoleMethod","defaultLogHandler","logType","_logLevel","_logHandler","_userLogHandler","logHandler","userLogHandler","FeatureFlagDirective","ifFeatureFlag","onIf","onElse","createView","ifFeatureFlagElse","_FeatureFlagDirective","_SharedLegalDocumentsModule","HasLegalDocsGuard","legalRoute","getDocsForDocKey","getDocsByKey","docs","legalDocuments","_HasLegalDocsGuard","_BrightsideUiModule","NgxCurrencyModule","LottieComponent","keySelector","defaultCompare","previousKey","currentKey","recursiveSearch","aLow","aHigh","aHaystack","aCompare","mid","liftedSource","_SharedMobileModule","country_calling_codes","countries","AC","AD","AE","AF","AG","AI","AL","AM","AO","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GH","GI","GL","GM","GN","GP","GQ","GR","GT","GU","GW","GY","HK","HN","HR","HT","HU","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LU","LV","LY","MA","MC","MD","MF","MG","MH","MK","ML","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TA","TC","TD","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW","nonGeographic","objectConstructor","normalizeArguments","_Array$prototype$slic2","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_s","_e","_arr","_n","_nonIterableRest","arg_1","arg_2","arg_3","arg_4","_objectSpread","defaultCountry","MIN_LENGTH_FOR_NSN","MAX_LENGTH_FOR_NSN","MAX_LENGTH_COUNTRY_CODE","VALID_DIGITS","VALID_PUNCTUATION","_assertThisInitialized","ReferenceError","_wrapNativeSuper","Class","_cache","_isNativeFunction","Wrapper","_construct","_getPrototypeOf","_setPrototypeOf","Parent","_isNativeReflectConstruct","construct","sham","ParseError","_Error","_inherits","subClass","superClass","_createSuper","Derived","hasNativeReflectConstruct","Super","NewTarget","_possibleConstructorReturn","semver_compare","pa","pb","na","nb","V3","V4","CALLING_CODE_REG_EXP","Metadata","validateMetadata","typeOf","setVersion","countryCode","nonGeographical","getCountryMetadata","callingCode","getCountryCodesForCallingCode","countryCodes","countryCallingCodes","selectNumberingPlan","hasCountry","numberingPlan","NumberingPlan","hasCallingCode","getNumberingPlanMetadata","getCountryCodeForCallingCode","IDDPrefix","defaultIDDPrefix","nationalNumberPattern","possibleLengths","nationalPrefixForParsing","nationalPrefixTransformRule","leadingDigits","hasTypes","_type","ext","country_phone_code_to_countries","globalMetadataObject","_getFormats","getDefaultCountryMetadataForRegion","_getNationalPrefixFormattingRule","_nationalPrefixForParsing","nationalPrefix","_getNationalPrefixIsOptionalWhenFormatting","_type2","getType","Type","_format","nationalPrefixFormattingRule","nationalPrefixIsOptionalWhenFormattingInNationalFormat","usesNationalPrefix","FIRST_GROUP_ONLY_PREFIX_PATTERN","getCountryCallingCode","countryCallingCode","v4","RFC3966_EXTN_PREFIX","getExtensionDigitsPattern","createExtensionPattern","purpose","possibleSeparatorsBetweenNumberAndExtLabel","possibleCharsAfterExtLabel","possibleSeparatorsNumberExtLabelNoComma","rfcExtn","MIN_LENGTH_PHONE_NUMBER_PATTERN","VALID_PHONE_NUMBER","VALID_PHONE_NUMBER_START_REG_EXP","VALID_PHONE_NUMBER_WITH_EXTENSION","VALID_PHONE_NUMBER_PATTERN","EXTN_PATTERN","parseIncompletePhoneNumber","parsePhoneNumberCharacter","prevParsedCharacters","checkNumberLength","nationalNumber","checkNumberLengthForType","type_info","possible_lengths","mobile_type","mergeArrays","actual_length","minimum_length","isPossibleNumber","matchesEntirely","regular_expression","NON_FIXED_LINE_PHONE_TYPES","getNumberType","isNumberTypeEqualTo","FIRST_GROUP_PATTERN","SINGLE_IDD_PREFIX_REG_EXP","formatExtension","formattedNumber","extension","formatNationalNumber","carrierCode","formatAs","chooseFormatForNumber","availableFormats","nationalNnumber","leadingDigitsPatterns","lastLeadingDigitsPattern","formatNationalNumberUsingFormat","useInternationalFormat","withNationalPrefix","internationalFormat","applyInternationalSeparatorStyle","addExtension","USE_NON_GEOGRAPHIC_COUNTRY_CODE","PhoneNumber","countryOrCountryCallingCode","_getCountryAndCountry","getCountryAndCountryCallingCode","metadataJson","isCountryCode","isNonGeographicCallingCode","getMetadata","getPossibleCountriesForNumber","possibleCountries","couldNationalNumberBelongToCountry","isPossiblePhoneNumber","isValidNumber","formatNumber","formatRFC3966","fromCountry","formatIDD","iddPrefix","getIddPrefix","countryMetadata","CAPTURING_DIGIT_PATTERN","extractNationalNumber","_extractNationalNumbe","extractNationalNumberFromPossiblyIncompleteNumber","prefixPattern","prefixMatch","capturedGroupsCount","hasCapturedGroups","possiblePositionOfTheFirstCapturedGroup","shouldHaveExtractedNationalPrefix","nationalNumberBefore","nationalNumberAfter","isPossibleIncompleteNationalNumber","getCountryByCallingCode","nationalPhoneNumber","getCountryByNationalNumber","PLUS_SIGN","RFC3966_PHONE_DIGIT_","RFC3966_GLOBAL_NUMBER_DIGITS_PATTERN_","RFC3966_DOMAINNAME_PATTERN_","RFC3966_PREFIX_","RFC3966_PHONE_CONTEXT_","RFC3966_ISDN_SUBADDRESS_","MAX_INPUT_STRING_LENGTH","PHONE_NUMBER_START_PATTERN","AFTER_PHONE_NUMBER_END_PATTERN","_parseInput","parseInput","extractFormattedPhoneNumberFromPossibleRfc3966NumberUri","numberToParse","phoneNumberString","extractFormattedPhoneNumber","phoneContext","extractPhoneContext","numberToExtractFrom","indexOfPhoneContext","phoneContextStart","phoneContextEnd","isPhoneContextValid","indexOfNationalNumber","indexOfRfc3966Prefix","indexOfIsdn","_extractFormattedPhoneNumber","throwOnError","startsAt","isViablePhoneNumber","isViablePhoneNumberStart","withExtensionStripped","extractExtension","numberWithoutExtension","formattedPhoneNumber","_parsePhoneNumber","parsePhoneNumber","defaultCallingCode","_extractCountryCallin","extractCountryCallingCode","isNumberWithIddPrefix","numberWithoutIDD","stripIddPrefix","IDDPrefixPattern","matchedGroups","extractCountryCallingCodeFromInternationalNumberWithoutPlusSign","possibleShorterNumber","possibleShorterNationalNumber","countryCallingCodeSource","_countryCallingCode","exactCountry","hasSelectedNumberingPlan","__countryCallingCodeSource","possible","_normalizeArguments","isSupportedCountry","parsePhoneNumberWithError","parsePhoneNumber_","PhoneFormComponent","isProd","fGroup","prodPhoneControl","phoneForm","nonProdPhoneControl","_PhoneFormComponent","Cypress","withMetadataArgument","_arguments","parsePhoneNumberFromString","phoneFail","FormItemOrderEnum","TitleKeyEnum","ProductEligibilityComponent","prodElgSvc","clientSvc","date_of_birth","full_ssn","CONTROL_SSN","address1","CONTROL_STREET_ADDRESS_LINE_ONE","address2","CONTROL_STREET_ADDRESS_LINE_TWO","CONTROL_ADDRESS_CITY","CONTROL_ADDRESS_STATE","CONTROL_ZIP","middle_name","CONTROL_MNAME","self_reported_salary","CONTROL_SALARY","bodyKey","full_name","auto_address","errorId","errorTitleKey","errorDescKey","processError","productCode","getProductEligibilityRequirements","currencyOptions","allowNegative","align","nullable","inputMode","CurrencyMaskInputMode","NATURAL","getProductEligibility","productFields","required_fields","handleRequiredFormCreation","requiredForms","itemOrder","numberOfFormsToDisplay","hasAlreadyCompleted","displaySummary","setUpSubmissionForm","tallyOfFieldsToDisplay","reqFieldObj","sub_fields","subField","subFieldControl","EligibilityToControls","not_replayable","testReqValueForEmpty","api_parameter_name","newReqField","ignoreFields","showForm","isSummary","activeFormIndex","showSummary","activeFieldName","setUpForm","startingValue","displayedMissingForm","formCopy","eligibilityForm","formIsReady","displayInfo","updateInfo","subFormControl","stepThroughForms","submitInfo","submissionObject","successfulSubmit","getProductCodeRedirect","displayedError","ssnMismatchError","closeErrorModal","showIntro","handleMainBack","_ProductEligibilityComponent","APIWrapperClass","awsAPIWrapper","callType","errorAs","convertedError","er","unauthMsg","forceLogout","_apiGet","initBody","_apiPipe","_apiPost","_apiPatch","_apiPut","_apiDel","retryCount","defaultRetryCount","reason_code","_APIErrorHandler","_BsApiService","_angular_core__WEBPACK_IMPORTED_MODULE_14__","_c1","a0","NgxSelectDropdownComponent_div_5_div_1_Template","_r7","ctx_r6","changeSearchText","ctx_r8","searchTextChanged","ctx_r9","searchText","ctx_r1","inputDirection","searchPlaceholder","NgxSelectDropdownComponent_div_5_li_3_Template","_r13","restoredCtx","selected_r10","i_r11","ctx_r12","deselectItem","displayFn","displayKey","NgxSelectDropdownComponent_div_5_hr_4_Template","_c2","a1","NgxSelectDropdownComponent_div_5_li_6_Template","_r18","item_r14","i_r15","ctx_r17","selectItem","ctx_r4","focusedItemIndex","NgxSelectDropdownComponent_div_5_li_9_Template","ctx_r5","noResultsFound","NgxSelectDropdownComponent_div_5_Template","selectedItems","availableItems","searchOnKey","limitTo","showNotFound","_c3","FilterByPipe","NgxSelectDropdownComponent","cdref","multiple","searchChange","toggleDropdown","selectedDisplayText","insideKeyPress","clickInsideComponent","blur","toggleSelectDropdown","clickOutsideComponent","resetArrowKeyActiveElement","KeyPressOutsideComponent","avaOpts","availableOptions","onArrowKeyDown","onArrowKeyUp","filteredItems","customComparator","initDropdownValuesAndOptions","setNotFoundState","sortedItems","valueChanged","clearOnSelection","setSelectedDisplayText","placeholder","moreText","ind","aItem","onArrowKey","ɵngcc2","LimitToPipe","itemsCount","SurveySelectorComponent","SurveySelectorType","Instant","selectionControl","surveyGroupForm","surveyGroupFormKey","setUpAdditionalInfoOnData","_unsub$","valueSelected","selectorType","Radio","setRadioActive","Checkbox","setCheckboxActive","handleInstantClick","setInstantActive","instantCtaClicked","onSurveySelectorClick","dataItem","radioElem","checkboxElem","additionalData","selectionControlArray","formControlItem","valueKey","formControl","matchingKeyValue","keyValue","_SurveySelectorComponent","checkForForwardPathInQuery","checkAndReplaceFragmentParams","routeFragment","filterQueryParams","filterOutTheseQueryParams","_DisplayLoaderComponent","NewCurrencySelectComponent","currencyForm","forcedMaxValue","selectionChanged","setInitialValues","preselectedValue","amountOptions","selectedOption","selectOption","currentOption","_keypressed","deselectOptions","_NewCurrencySelectComponent","findDataWithGuards","relation","executeGuards","guardIndex","logStart","activateGuard","logStop","OR","_SequentialGuard","hasCurrentUser","hasUser","_AuthGuard","NoAuthGuard","_NoAuthGuard","checkRequiredVerification","onboardingComplete","getNextRequiredVerification","foundPath","verificationPathsPiece","foundEligibility","knownEligibility","RequiredVerificationsEnums","HOMEADDRESS","isIdentityCompleted","useManualHomeAddressForm","_RequiredVerificationGuard","getOnboardingCompleteFromMS","byPassRedirect","hasOnboardingCompleted","_OnboardingCompleteGuard","verificationStatus","externalSavings","productEligibilityResp","canClientActivate","ProductPostIntroMapping","fromFormSubmission","shouldContinueArray","_ProductVerificationGuard","_GuidGuard","ReferralGuard","regSvc","assistant","whichReferrer","hasAllParams","allParamsPresent","referrerConfigs","referrerConfig","foundParams","_ReferralGuard","IdentityGuard","customerType","employmentType","_IdentityGuard","toasty","amplitudeService","contextInfo","addContextInfo","errMsg","incrementErrorsViewed","StackTrace","_BsErrorHandler","AgeValidator","currentYear","age","invalidAge","AngularFormControlValidationTypes","labelKey","CONTROL_FNAME_PRIMARY","CONTROL_LNAME_PRIMARY","CONTROL_DOB_PRIMARY","errorText","inputHintText","inputHintTextKey","CONTROL_ZIP_PRIMARY","CONTROL_ADDRESS_WORK_STATE","statesArray","stateFound","stateNotFound","beginValidationOn","DIRTY","inputInfo","infoKey","bodykey","splitDotJoin","stringToMod","aliasRulesArray","ruleSet","rulesMatch","forbiddenValue","_msService","_canInviteHousehold","invite","_HouseholdInviteGuard","GenericModalComponent","primaryCtaClick","primaryClick","secondaryCtaClick","secondaryClick","_GenericModalComponent","ctx_r11","CardDisplayType","DesktopCardComponent","DEFAULT_INFO","RemoteConfig_UnlockedCaseTypes","cdnBase","_card","cardBannerColor","errorFooter","defaultSegments","MPAP","HELPING_HANDS","ctaSegments","DesktopCardType","graphic","infoSegments","determineDisplayType","displayType","displayTypes","ACTIVE_LOCKED","ACTIVE_DEFAULT","determineActiveDisplayType","ctaHandler","showVideoModal","getToastMessage","completeCardHandler","clickHandler","hideCard","bannerHandler","infoSegment","modalModel","getModalModel","bannerModalVisible","errorStateClickHandler","_DesktopCardComponent","GenCellValuePipe","missingRequired","isSSN","splitSSN","itemToWorkOn","_GenCellValuePipe","_SharedDesktopModule","DesktopCardsComponent","isSingleLineStyle","cardStyle","clickedTitleLink","clickedTitleAction","clickedPassthrough","closedPassthrough","_DesktopCardsComponent","CurrencyInputComponent","currencyInput","DefaultMaskOptions","clearValue","_CurrencyInputComponent","_CacheKeys","UiHeaderEyebrowComponent","EYE_BROW","_UiHeaderEyebrowComponent","eraYearOrdinalRegex","_DesktopDataAccessSharedModule","ApiCacheService","getBsCacheService","getAwsApiWrapperService","getForced","_ApiCacheService","SupportService","_SupportService","amplitudeInstance","_amplitudeInstance","updateEventPropertiesKeys","clearProperties","updatedProperties","_AmplitudeService","bsLoggerService","userLoggedIn","handleSignIn","setFirebaseProperties","setAmplitudeProperties","setUserLoggedIn","setRedirectUrl","previousSignIn","signInTime","setProperties","setupRemoteConfig","getUserLoggedIn","_AuthService","SavingsSource","SavingsScheduleType","VerificationStatus","MobileStateAction","BasicComponentConfig","pageBodyText","pageBodyTextKey","pageStepperActiveIndex","pageOnForwardSecondaryCtaPath","useCtaEvent","TermsService","getTypes","termTypes","terms","postTerms","acceptTermsFromConsentArray","consents","consentLine","acceptTermsFromArray","fetchTerms","getTermsAcceptance","getAcceptance","_TermsService","NotificationService","sendMessage","messageType","generateDynamicLink","cardName","dynamicLink","sendGetTheAppMessage","ip","getCompany","ipInfo","_NotificationService","MobileStateService","_bsCacheService","_mobileState","getApiCacheService","_fetchingMobileState$","_mobileStateSubject$","_checkAndSendReferral","defaultHome","referralLink","_MobileStateService","toolText","defaultMapping","queryParamsType","onboarding","setupcredit","pageShownAppend","credit","typeOverRideKeys","typeOveride","fbRemoteConfig","shouldThrottle","lastPageShownEvent","isEventThrottled","currentCall","lastCall","getValueAsBoolean","asBoolean","_FirebaseAnalyticsService","RequiredVerificationService","awsApiWrapper","HUBCHANNEL","clearRequiredVerifications","getDataToCollect","employment_type","apiVersion","hasBeenCleared","requiredVerifications","LOCALSTORAGE","getRequiredVerifications","skipCreation","eligibility_fields","newVerifications","eligibility_field","electiveProducts","elective_products","getVerificationOfType","verification","setRequiredVerifications","updateRequiredVerificationStatus","updateVerification","getRequiredVerificationStatus","verifications","setNextRequiredVerification","overriddenNextVerification","identityCompleted","_RequiredVerificationService","ModalService","modalModelMap","_ModalService","equifaxBlurb","ProfileService","sfContactId","getBsAuthService","getBsApiService","bsApiService","getProfile","apiService","profileSubject$","_convertAttributes","_defaultProfile","getChatToken","allResults","_ProfileService","HOUSEHOLD_CACHE_KEY","clearCacheHousehold","setItemStatic","preCacheHousehold","last_four_ssn","verifyDependentEmployee","employeeDetails","dependentCache","primary_info","_InviteService","CampaignRoutingService","campaignInMobileState","campaignKey","campaigns","routeMappingInRemoteConfig","routeToString","navigateToCampaign","campaignLink","errorEventName","currentlyWorking","breakRoute","msCampaignPath","mappingDetail","routeMapping","_CampaignRoutingService","TopicRoutingService","navigateToTopic","topicLink","_TopicRoutingService","FindMoneyRoutingService","navigateToSurvey","surveyLink","_FindMoneyRoutingService","MappingParamType","InternalLinkRoutingService","campaignRouting","topicRouting","_surveyRouting","_findMoneyRouting","brightsideLink","routeMainAppTo","toastError","routeToOptions","routeQueryToString","additionalOptions","AUTO","splitRouteQuery","finalParams","paramValue","brokenValue","_InternalLinkRoutingService","titleCasePipe","_supportNumber","companyName","updateSupportNumber","phonePipeCopy","getSupportNumber","secondsSinceTime","millis","withCountryCode","getCompanyDisplayName","companyKey","_CompanyService","TranslationError","_hours","fahours","cacheHours","family_name","given_name","subscribeAndGetUserInfo","companyDisplay","_companyDisplay","fullName","setLanguageAs","newLang","tempUpperCaseKey","logSentryTranslationNotFound","globalsReplacement","_count","parsedString","newResp","_BrightsideTranslateService","ProductCodes","nonRequiredProductFields","ProductEligibilityService","globalModalSvc","routeKeys","routeKeyCache$","apiPath","hasMissingFields","checkFieldsForEmpty","showVerifyIntroModal","ctaActionFunc","_ProductEligibilityService","GlobalModalService","defaultModal","_globalModal","setModal","_GlobalModalService","VerificationStatusService","getEmploymentVerificationStatusFromAPI","resetStatus","tryAgain","_VerificationStatusService","verificationStatusService","failed","banner","stepper","verified","mobileStateResp","sf_record_type","implementation_type","STATUSMAP","handleVerificationToast","onToastEvent","checkForNotifications","halfSheetNotifications","desktopNotifications","notificationItem","halfsheet","desktopSupported","displayHalfSheetToast","displayPlainToast","bannerCopy","modalObj","bannerId","activeBanner","statusObj","statusItem","stepperInfo","_StatusNotificationsService","ClientConfirmationErrorCodes","ClientConfirmationErrorCodesErrors","INVALID_PII","errorCount","CLIENT_NOT_ELIGIBLE","CLIENT_NOT_IN_COHORT","ctaKey2","softCheckKey","CLIENT_EXISTS_UNIQUEID","CLIENT_NOT_FOUND","INVALID_UNIQUEID","HOUSEHOLD_CLIENT_NOT_FOUND","CLIENT_EXISTS_PII","PRIMARY_EMPLOYEE_NOT_ELIGIBLE","PRIMARY_EMPLOYEE_NOT_FOUND","PRIMARY_EMPLOYEE_WRONG_COMPANY","ClientConfirmationService","submitClientVerification","fieldVersion","_ClientConfirmationService","CacheStorageService","getGuid","withoutGuid","buildKey","_guid","_CacheStorageService","SurveyRoutingService","_bscacheService","surveyRoute","_SurveyRoutingService","BaseRoutingService","environmentService","childRouter","_RoutingService","LoggingClientService","logWithBridge","_LoggingClientService","MicroCoreApiCacheService","extendCacheSecondsBy","_MicroCoreApiCacheService","RemoteConfigKey","MicroCoreUtilRemoteConfigService","firebaseService","getDomainMappingPaths","configAsObjectObservable","DOMAIN_MAPPING","DOMAIN_MAPPING_LOADED","configAsObject","configKey","runAttempt","_MicroCoreUtilRemoteConfigService","MicroCoreUtilPermissionProductService","getPermissionsForProduct","fullProductConfigObject","PRODUCT_CONFIG","permissionScopes","tierKey","getConfigForProduct","_MicroCoreUtilPermissionProductService","_MicroCoreUtilityModule","targetObject","sourceObject","copyTargetObject","copySourceObject","EVENT_METHOD_NAME","RemoteConfigDomainRuleHandler","remoteConfigDomainRules","UseThisForEmbeddedOrThat","_remoteConfigDomainRules","sendOriginalEvent","forceBridgeFire","routeInPlace","replaceFullHref","replaceHref","checkForMatchingRule","matchingRule","handleRouteByUrlEvent","_ignoreRemoteDomainRules","ruleToUse","isMatchingRuleToUse","isMatchingCurrentBasePath","NavigationHelperHandler","fromUrl","toUrl","completeTime","historyCurrentUrl","_historyStack","historyPreviousPath","currentUrl","previousUrl","addHistory","pathsExcludedFromHistory","startSingleNavigationTrack","_lastNavigationDetail","_lastNavigationEventLog","stopSingleNavigationTrack","eventLog","_StartTrackingEvents","_StopTrackingEvents","routeBackwardOnce","isProduction","lastPathKey","routeURL","skipThesePaths","tempRouteDetails","consoleLog","lastLayout","runLayoutCheck","checkAndDispatchLayoutChange","styleFromSnapshotOverride","theOneTrueStyle","layoutLifeCycleEvents","navigationHelperHandler","watchForRoutingEvents","watchForRemoteConfigLoadedEvent","listenForRouteByUrl","UnKnown","getEventMethod","lastEvent","runAllOnEvents","executeAllOnEvent","checkThisPath","remoteConfigDomainRuleHandler","routeMethod","dispatchLayoutChange","resetLastLayout","updateLastBroadcastedAndTimer","lastBroadcastedLayoutStyle","listenStatic","ROUTE_BY_URL","routeByUrl","EXIT_PAGE","routeExitPage","retryAttempt","routeToUrl","dispatchStatic","gTag","page_path","hideLoadingSpinner","NAVIGATION_END","currentCurrentLanguageCode","SupportedLanguages","updateTranslationsWith","forLang","updateTranslations","translationsByCode","updateTranslate","deepCopyKeySwapForDynamicValue","processObject","replaceMapping","replaceKeys","rtnObj","arryValue","In","_MicroUtilTranslationService","English","Spanish","Testing","Language","RemoteConfig_DesktopNativeMapping","_array","_sorted","_last","aThisArg","aMapping","generatedPositionAfter","lineA","lineB","svgNS","locationHref","_useWebWorker","initialDefaultFrame","setWebWorker","getWebWorker","setLocationHref","createTag","extendPrototype","sourcePrototype","getDescriptor","createProxyFunction","ProxyFunction","audioControllerFactory","AudioController","audioFactory","audios","_volume","_isMuted","addAudio","audio","setRate","rateValue","createAudio","assetPath","Howl","isPlaying","seek","setVolume","setAudioFactory","_updateVolume","mute","unmute","getVolume","createTypedArray","createRegularArray","Uint8ClampedArray","Float32Array","createTypedArrayFactory","Int16Array","createSizedArray","_typeof$6","subframeEnabled","expressionsPlugin","expressionsInterfaces","idPrefix$1","isSafari","_shouldRoundValues","bmPow","bmSqrt","sqrt","bmFloor","bmMax","bmMin","BMMath","ProjectInterface$1","propertyNames","absArr","defaultCurveSegments","degToRads","PI","roundCorner","roundValues","bmRnd","styleDiv","transformOrigin","webkitTransformOrigin","backfaceVisibility","webkitBackfaceVisibility","transformStyle","webkitTransformStyle","mozTransformStyle","BMEnterFrameEvent","frameMultiplier","BMCompleteEvent","BMCompleteLoopEvent","totalLoops","currentLoop","BMSegmentStartEvent","firstFrame","totalFrames","BMDestroyEvent","BMRenderFrameErrorEvent","nativeError","BMConfigErrorEvent","BMAnimationConfigErrorEvent","createElementID","HSVtoRGB","RGBtoHSV","addSaturationToRGB","hsv","addBrightnessToRGB","addHueToRGB","rgbToHex","hex","colorMap","setSubframeEnabled","getSubframeEnabled","setExpressionsPlugin","getExpressionsPlugin","setExpressionInterfaces","getExpressionInterfaces","setDefaultCurveSegments","getDefaultCurveSegments","setIdPrefix","getIdPrefix","createNS","_typeof$5","dataManager","workerFn","workerInstance","_counterId","processes","workerProxy","_workerSelf","setupWorker","createWorker","dataFunctionManager","completeLayers","layers","comps","layerData","jLen","kLen","hasMask","maskProps","masksProperties","pt","convertPathsToAbsoluteValues","ty","findCompLayers","refId","completeShapes","shapes","comp","findComp","__used","ks","checkVersion","minimum","animVersionString","animVersion","minimumVersion","checkText","updateTextLayer","textLayer","iterateLayers","animationData","assets","checkChars","charData","st","sr","sk","sa","checkPathProperties","pathData","checkColors","iterateShapes","checkShapes","completeClosingShapes","cl","moduleOb","completeData","__complete","completeChars","assetLoader","formatResponse","contentTypeHeader","loadAsset","createProcess","loadAnimation","processId","loadData","completeAnimation","anim","ImagePreloader","proxyImage","fillStyle","fillRect","imageLoaded","loadedAssets","totalImages","loadedFootagesCount","totalFootages","imagesLoadedCb","footageLoaded","getAssetsPath","assetData","assetsPath","originalPath","imagePath","testImageLoaded","img","intervalId","getBBox","_imageLoaded","createFootageData","ob","footageData","_footageLoaded","ImagePreloaderFactory","loadAssets","_createImageData","setAssetsPath","setPath","loadedImages","loadedFootages","getAsset","createImgData","createImageData","_elementHelper","setCacheType","elementHelper","BaseEvent","triggerEvent","_cbs","markerParser","parsePayloadLines","keysCount","_markers","markers","_marker","markerData","tm","dr","cm","ProjectInterface","registerComposition","compositions","_thisProjectFunction","nm","prepareFrame","xt","currentFrame","compInterface","renderers","registerRenderer","getRenderer","getRegisteredRenderer","_typeof$4","AnimationItem","currentRawFrame","frameRate","frameMult","playSpeed","playDirection","playCount","autoplay","animationID","timeCompleted","segmentPos","isSubframeEnabled","_idle","_completedLoop","projectInterface","imagePreloader","audioController","configAnimation","onSetupError","onSegmentComplete","drawnFrameEvent","animType","RendererClass","rendererSettings","globalData","defs","setProjectInterface","autoloadSegments","initialSegment","setupAnimation","setData","wrapperAttributes","getNamedItem","prerender","includeLayers","newLayers","fontManager","addChars","addFonts","initExpressions","loadNextSegment","loadSegments","imagesLoaded","checkLoaded","preloadImages","animData","fr","searchExtraCompositions","updaFrameModifier","waitForFontsLoaded","triggerConfigError","rendererType","initItems","gotoFrame","resize","updateContainerSize","setSubframe","renderFrame","resetFrame","triggerRenderFrameError","togglePause","setCurrentRawFrameValue","getMarkerData","markerName","goToAndStop","isFrame","numValue","frameModifier","goToAndPlay","playSegments","advanceTime","_isComplete","checkSegments","adjustSegment","setSpeed","setDirection","setSegment","pendingFrame","forceFlag","resetSegments","onEnterFrame","onLoopComplete","onSegmentStart","setLoop","isLooping","getPath","getAssetData","getDuration","updateDocumentData","documentData","getElementByPath","animationManager","registeredAnimations","initTime","playingAnimationsNum","_stopped","_isFrozen","removeElement","animItem","subtractPlayingCount","registerAnimation","addPlayingCount","nowTime","elapsedTime","searchAnimations","animElements","getElementsByClassName","lenAnims","getRegisteredAnimations","animations","BezierFactory","getBezierEasing","beziers","bezEasing","BezierEasing","kSplineTableSize","kSampleStepSize","float32ArraySupported","aA1","aA2","calcBezier","aT","getSlope","points","_p","_mSampleValues","_precomputed","mX1","mY1","mX2","mY2","_precompute","_getTForX","_calcSampleValues","aX","mSampleValues","intervalStart","currentSample","lastSample","guessForT","initialSlope","newtonRaphsonIterate","aGuessT","currentSlope","binarySubdivide","aA","aB","currentX","currentT","pooling","double","_double","poolFactory","initialLength","_create","_release","_length","_maxLength","pool","newElement","bezierLengthPool","addedLength","percents","lengths","segmentsLengthPool","bezFunction","pointOnLine2D","x1","y1","x2","y2","x3","y3","det1","getBezierLength","pt4","ptCoord","perc","ptDistance","curveSegments","point","lastPoint","lengthData","BezierData","segmentLength","PointData","partial","partialLength","storedData","buildBezierData","bezierName","bezierData","getDistancePerc","initPos","lengthPos","lPerc","bezierSegmentPoints","getSegmentsLength","shapeData","segmentsLength","pathV","pathO","pathI","getNewSegment","startPerc","endPerc","t0","u0","u1","u0u0u0","t0u0u0_3","t0t0u0_3","t0t0t0","u0u0u1","t0u0u1_3","t0t0u1_3","t0t0t1","u0u1u1","t0u1u1_3","t0t1u1_3","t0t1t1","u1u1u1","t1u1u1_3","t1t1u1_3","t1t1t1","getPointInSegment","percent","pointOnLine3D","z1","z2","z3","diffDist","dist1","dist2","dist3","bez","initFrame","interpolateValue","frameNum","caching","offsetTime","propType","pv","keyData","nextKeyData","keyframeMetadata","iterationIndex","keyframesMetadata","fnc","endValue","nextKeyTime","keyTime","ti","__fnct","segmentPerc","distanceInLine","lastFrame","_lastKeyframeIndex","_lastAddedLength","_lastPoint","sh","quaternionToEuler","slerp","createQuaternion","omega","cosom","sinom","scale0","scale1","ax","ay","az","aw","bx","bz","bw","acos","sin","quat","qx","qy","qz","qw","heading","atan2","attitude","asin","cos","s1","s2","s3","getValueAtCurrentTime","renderedFrame","_caching","renderResult","setVValue","multipliedValue","_mdf","processEffectsSequence","frameId","effectsSequence","_isFirstFrame","finalValue","addEffect","effectFunction","addDynamicProperty","ValueProperty","vel","MultiDimensionalProperty","KeyframedValueProperty","KeyframedMultidimensionalProperty","PropertyFactory","getProp","slotManager","DynamicPropertyContainer","dynamicProperties","_isAnimated","iterateDynamicProperties","initDynamicPropertyContainer","pointPool","ShapePath","setPathData","setLength","doubleArrayLength","setXYAt","setTripleAt","vX","vY","oX","oY","iX","iY","vertices","outPoints","inPoints","shapePool","shapePath","shape","cloned","ShapeCollection","addShape","releaseShapes","shapeCollectionPool","newShapeCollection","shapeCollection","ShapePropertyFactory","interpolateShape","keyPropS","keyPropE","isHold","interpolateShapeCurrentTime","resetShape","localShapeCollection","shapesEqual","shape1","shape2","ShapeProperty","KeyframedShapeProperty","EllShapeProperty","cPoint","EllShapePropertyFactory","convertEllToPath","p0","s0","_cw","_v","StarShapeProperty","StarShapePropertyFactory","sy","ir","convertToPath","convertStarToPath","convertPolygonToPath","rad","roundness","perimSegment","numPts","angle","longFlag","longRad","shortRad","longRound","shortRound","longPerimSegment","shortPerimSegment","currentAng","ox","oy","RectShapeProperty","RectShapePropertyFactory","convertRectToPath","getShapeProp","getConstructorFunction","getKeyframedConstructorFunction","Matrix","_cos","_sin","_tan","tan","_rnd","rotate","mCos","mSin","rotateX","rotateY","rotateZ","shear","sx","skew","skewFromAxis","scale","sz","setTransform","tz","a2","b2","e2","f2","g2","h2","i2","j2","l2","m2","n2","_identityCalculated","b1","e1","f1","g1","h1","j1","l1","m1","n1","multiply","matrix","matrixProps","isIdentity","_identity","matr","cloneFromProps","applyToPoint","applyToX","applyToY","applyToZ","getInverseMatrix","determinant","inverseMatrix","inversePoint","applyToPointArray","inversePoints","pts","retPts","applyToTriplePoints","p5","p12","p13","applyToPointStringified","toCSS","cssValue","roundMatrixProperty","to2dCSS","_typeof$3","lottie","setLocation","setSubframeRendering","setPrefix","setQuality","inBrowser","installPlugin","getFactory","checkReady","readyStateCheckInterval","getQueryVariable","variable","pair","useWebWorker","setIDPrefix","__getFactory","myScript","ShapeModifiers","modifiers","registerModifier","getModifier","ShapeModifier","TrimModifier","PuckerAndBloatModifier","initModifierProperties","addShapeToModifier","setAsAnimated","processKeys","sValue","eValue","pathsData","calculateShapeEdges","shapeLength","totalModifierLength","segmentOb","shapeSegments","releasePathsData","processShapes","shapePaths","totalShapeLength","edges","shapeS","shapeE","newShapesData","addShapes","lastShape","addPaths","newPaths","addSegment","newShape","addSegmentFromArray","shapeSegment","currentLengthData","segmentCount","processPath","centerPoint","pathLength","clonedPath","TransformPropertyFactory","defaultVector","TransformProperty","appliedTransformations","px","py","pz","rx","ry","rz","_isDirty","applyToMatrix","mat","forceRender","precalculateMatrix","autoOriented","getValueAtTime","autoOrient","_addDynamicProperty","getTransformProperty","RepeaterModifier","RoundCornersModifier","floatEqual","floatZero","lerp","lerpPoint","quadRoots","singleRoot","polynomialCoefficients","singlePoint","PolynomialBezier","linearize","pointEqual","coeffx","coeffy","extrema","intersectData","box","boundingBox","cx","cy","splitData","boxIntersect","intersectsImpl","intersections","maxRecursion","d1s","d2s","crossProduct","lineIntersection","start1","end1","start2","end2","polarOffset","pointDistance","hypot","ZigZagModifier","setPoint","outputBezier","outAmplitude","inAmplitude","angO","angI","getPerpendicularVector","vector","rot","getProjectingAngle","prevIndex","nextIndex","pVector","zigZagCorner","pointType","prevPoint","nextPoint","prevDist","nextDist","zigZagSegment","normalAngle","linearOffset","offsetSegment","p1a","p1b","p2b","p2a","joinLines","seg1","seg2","lineJoin","miterLimit","angleOut","tangentAngle","angleIn","center","radius","intersection","getIntersection","intersect","pruneSegmentIntersection","outa","outb","pruneIntersections","offsetSegmentSplit","flex","inflectionPoints","OffsetPathModifier","getFontProperties","fontData","styleName","fStyle","fWeight","weight","tr","so","eo","pMatrix","rMatrix","sMatrix","tMatrix","applyTransforms","inv","scaleX","scaleY","elemsData","_currentCopies","_elements","_groups","resetElements","_processed","cloneElements","newElements","changeGroupRender","renderFlag","_render","itemsTransform","cont","hasReloaded","copies","ix","reloadShapes","elems","transformData","offsetModulo","pProps","rProps","sProps","iteration","mProps","rd","currentV","currentI","currentO","closerV","newPosPerc","derivative","denom","tcusp","square","p10","p11","p20","p21","bounds","bottom","shapeSegmentInverted","pointsType","ml","lj","inputBezier","multiSegments","lastSeg","multiSegment","FontManager","emptyChar","combinedCharacters","BLACK_FLAG_CODE_POINT","REGIONAL_CHARACTER_A_CODE_POINT","REGIONAL_CHARACTER_Z_CODE_POINT","surrogateModifiers","setUpNode","font","fontFamily","fontSize","fontVariant","fontStyle","fontWeight","letterSpacing","trimFontOptions","familyArray","enabledFamilies","createHelper","helper","fontProps","tHelper","fFamily","fClass","tCanvasHelper","OffscreenCanvas","measureText","measure","getComputedTextLength","getCodePoint","codePoint","isRegionalCode","typekitLoaded","_warned","setIsLoadedBinded","setIsLoaded","checkLoadedFontsBinded","checkLoadedFonts","isModifier","firstCharCode","secondCharCode","sum","isZeroWidthJoiner","isFlagEmoji","isCombinedCharacter","_char3","isRegionalFlag","isVariationSelector","fontArr","_pendingFonts","loadedSelector","shouldLoadFont","monoCase","sansCase","fPath","fOrigin","getCharData","_char","getFontByName","_char2","fontName","doubleSize","singleSize","loadedCount","SlotManager","slotFactory","RenderableElement","slots","initRenderable","isInRange","isTransparent","renderableComponents","addRenderableComponent","removeRenderableComponent","prepareRenderableFrame","checkLayerLimits","checkTransparency","finalTransform","mProp","renderConfig","hideOnTransparent","renderRenderable","sourceRectAtTime","getLayerSize","getBlendMode","blendModeEnums","SliderEffect","AngleEffect","ColorEffect","PointEffect","LayerIndexEffect","MaskIndexEffect","CheckboxEffect","NoValueEffect","EffectsManager","effects","ef","effectElements","effectItem","GroupEffect","BaseElement","FrameElement","FootageElement","imageLoader","initBaseData","AudioElement","_isPlaying","_canPlay","_currentTime","_volumeMultiplier","_previousVolume","_placeholder","lv","au","BaseRenderer","eff","checkMasks","LayerExpressionInterface","EffectsExpressionInterface","ShapeExpressionInterface","TextExpressionInterface","CompExpressionInterface","layerInterface","maskManager","registerMaskInterface","effectsInterface","createEffectsInterface","registerEffectsInterface","shapeInterface","shapesData","itemsData","textInterface","setBlendMode","blendModeValue","bm","layerElement","layerId","effectsManager","prepareProperties","isVisible","_isParent","getBaseElement","FootageInterface","getFootageData","totalVolume","volumeValue","checkLayers","buildItem","checkPendingElements","createItem","layer","createImage","createComp","createSolid","createNull","createShape","createCamera","createFootage","buildAllItems","pInterface","progressiveLoad","buildElementParenting","parentName","hierarchy","setAsParent","setHierarchy","addPendingElement","pendingElements","pathValue","setupGlobalData","fontsContainer","animationItem","compSize","effectTypes","TRANSFORM_EFFECT","TransformElement","MaskElement","maskElement","solidPath","expansor","feMorph","currentMasks","maskType","maskRef","filterID","expan","lastOperator","filterId","lastRadius","createLayerSolidPath","invRect","drawPath","maskedElement","initTransform","_matMdf","_localMatMdf","_opMdf","localMat","localOpacity","ao","renderTransform","finalMat","renderLocalTransform","localTransforms","localOp","searchEffectTransforms","renderableEffectsManager","transformEffects","getEffects","globalToLocal","transforms","ptNew","mHelper","getMaskProperty","isFirstFrame","getMaskelement","pathNodes","pathString","pathShapeValue","filtersFactory","createFilter","filId","skipCoordinates","fil","createAlphaToLuminanceFilter","feColorMatrix","featureSupport","svgLumaHidden","offscreenCanvas","registeredEffects$1","idPrefix","SVGEffects","filterManager","filters","Effect","effect","countsAsEffect","registerEffect$1","SVGBaseElement","HierarchyElement","RenderableDOMElement","IImageElement","initElement","sourceRect","ProcessedElement","IShapeElement","initRendererElement","createContainerElements","matteElement","transformedElement","_sizeChanged","layerElementParent","td","matteMasks","tt","ln","hd","cp","clipId","cpGroup","renderElement","destroyBaseElement","createRenderableComponents","getMatte","matteType","useElement","masker","maskGroup","maskGrouper","feCTr","feFunc","alphaRect","setMatte","initHierarchy","checkParenting","createContent","renderInnerContent","innerElem","pr","imagePreserveAspectRatio","addShapeToModifiers","shapeModifiers","isShapeInAnimatedModifiers","isAnimatedWithShape","renderModifiers","searchProcessedElement","processedElements","addProcessedElement","lineCapEnum","lineJoinEnum","SVGShapeData","transformers","caches","lStr","lvl","SVGStyleData","pElem","msElem","DashProperty","dataProps","dashStr","dashArray","dashoffset","SVGStrokeStyleData","styleOb","SVGFillStyleData","SVGNoStyleData","GradientProperty","cLength","_cmdf","_omdf","_collapsable","checkCollapsable","_hasOpacity","SVGGradientFillStyleData","initGradientData","SVGGradientStrokeStyleData","ShapeGroupData","prevViewData","SVGTransformData","comparePoints","stops","setGradientData","setGradientOpacity","pathElement","gradientId","gfill","gf","cst","opacityId","maskId","opFill","lc","ost","buildShapeString","_o","shapeString","SVGElementsRenderer","_identityMatrix","_matrixHelper","renderContentTransform","itemData","renderNoop","renderPath","pathStringTransformed","redraw","iterations","lLen","renderFill","styleElem","renderGradientStroke","renderGradient","renderStroke","hasOpacity","attr1","attr2","cValues","oValues","ang","createRenderFunction","SVGShapeElement","stylesList","animatedContents","LetterProps","sw","fc","TextProperty","_frameId","keysIndex","canResize","minimumFontSize","currentData","ascent","boxWidth","defaultBoxWidth","justifyOffset","lh","lineWidths","ls","ps","fillColorAnim","strokeColorAnim","strokeWidthAnim","yOffset","finalSize","finalText","finalLineHeight","copyData","searchProperty","completeTextData","initSecondaryElement","identityMatrix","buildExpressionInterface","searchShapes","filterUniqueShapes","tempShapes","areAnimated","setShapesAsAnimated","createStyleElement","elementData","addToAnimatedContents","createGroupElement","createTransformElement","transformProperty","createShapeElement","ownTransformers","setElementStyles","render","modifier","processedPos","ownStyles","ownModifiers","renderShape","animatedContent","setCurrentData","searchKeyframes","getKeyframeValue","_finalValue","textKeys","buildFinalText","charactersArray","shouldCombine","shouldCombineNext","currentChars","newLineFlag","letters","anchorGrouping","currentSize","currentPos","currentLine","lineWidth","maxLineWidth","trackingOffset","currentHeight","boxHeight","lastSpaceIndex","currentChar","uncollapsedSpaces","an","anIndexes","animatorJustifyOffset","animatorData","letterData","animators","based","indexes","fh","fs","rn","totalChars","newInd","currentInd","dData","recalculate","canResizeFont","_canResize","setMinimumFontSize","_fontValue","TextSelectorProp","TextSelectorPropFactory","_currentTextLength","finalS","finalE","xe","ne","sm","getMult","textProperty","easer","tot","smoothness","newCharsFlag","getTextSelectorProp","TextAnimatorDataProperty","animatorProps","defaultData","textAnimatorAnimatables","TextAnimatorProperty","renderType","_hasMaskedPath","_textData","_renderType","_elem","_animatorsData","_pathData","_moreOptions","alignment","renderedLetters","lettersChangedFlag","ITextElement","searchProperties","getMeasures","xPos","yPos","pathInfo","currentLength","currentPoint","pointInd","segmentInd","matrixHelper","renderedLettersCount","tLength","pi","letterValue","yOff","firstLine","offf","xPathPos","yPathPos","elemOpacity","letterSw","letterSc","letterFc","letterO","initPathPos","initSegmentInd","initPointInd","letterM","letterP","defaultPropsArray","animatorFirstCharOffset","justifyOffsetMult","isNewLine","animatorOffset","atan","textAnimator","createPathShape","shapeStr","_fontSize","applyTextPropertiesToMatrix","buildColor","colorData","emptyProp","validateText","buildNewText","emptyShapeData","SVGTextLottieElement","textSpans","ISolidElement","NullElement","SVGRendererBase","ICompElement","SVGCompElement","supports3d","SVGRenderer","svgElement","ariaLabel","titleElement","titleId","descElement","descId","preserveAspectRatio","contentVisibility","viewBoxOnly","viewBoxSize","focusable","filterSize","runExpressions","ShapeTransformManager","sequences","sequenceList","transform_key_count","singleShape","textContainer","buildTextContents","textArray","textContents","currentTextContent","buildShapeData","shapeItem","usesGlyphs","tSpan","cachedSpansLength","glyph","glyphElement","_debug","tElement","justify","textBox","bbox","renderedLetter","textSpan","findIndexByInd","appendElementInPos","tp","matteMask","nextElement","timeRemapped","setElements","getElements","destroyElements","addTransformSequence","processSequence","processSequences","getNewKey","lumaLoader","lumaBuffer","lumaBufferCtx","loadLuma","createLumaSvgFilter","_svg","getLuma","createCanvas","loadLumaCanvas","getLumaCanvas","registeredEffects","CVEffects","registerEffect","CVMaskElement","hasMasks","CVBaseElement","canvasContext","beginPath","moveTo","lineTo","bezierCurveTo","clip","operationsMap","CVShapeData","transformsManager","styledShapes","styledShape","trNodes","CVShapeElement","CVTextElement","stroke","currentRender","sWidth","fValue","CVImageElement","CVSolidElement","CanvasRendererBase","CanvasContext","strokeStyle","lineCap","CVContextData","cArrPos","cTr","nativeContext","transformMat","currentOpacity","currentFillStyle","appliedFillStyle","currentStrokeStyle","appliedStrokeStyle","currentLineWidth","appliedLineWidth","currentLineCap","appliedLineCap","currentLineJoin","appliedLineJoin","appliedMiterLimit","currentMiterLimit","CVCompElement","CanvasRenderer","clearCanvas","dpr","devicePixelRatio","currentGlobalAlpha","contextData","ctxTransform","ctxOpacity","ctxFillStyle","ctxStrokeStyle","ctxLineWidth","ctxLineCap","ctxLineJoin","ctxMiterLimit","ctxFill","ctxFillRect","ctxStroke","HBaseElement","HSolidElement","HShapeElement","shapesContainer","currentBBox","HTextElement","textPaths","HCameraElement","pe","_prevMat","HImageElement","HybridRendererBase","threeDElements","camera","HCompElement","HybridRenderer","createElements","bufferCanvas","bufferCanvas2","_isProxy","transformCanvas","blendMode","globalCompositeOperation","hideElement","showElement","clearRect","prepareLayer","bufferCtx","currentTransform","getTransform","exitLayer","forceRealStack","restore","transformHelper","dashResetter","preTransforms","co","wi","da","do","addTransformToStyleList","removeTransformFromStyleList","closeStyles","shouldRender","ownTransforms","_shouldRender","renderShapeTransform","parentTransform","groupTransform","drawLayer","currentStyle","coOp","grd","setLineDash","lineDashOffset","closePath","isMain","renderGradientFill","renderStyledShape","shapeNodes","groupTransformMat","createLinearGradient","createRadialGradient","addColorStop","hasFill","hasStroke","pathArr","commandsCounter","lastFill","lastStroke","lastStrokeW","widthCrop","heightCrop","imgW","imgH","imgRel","canvasRel","par","globalAlpha","actionFlag","containerStyle","mozTransformOrigin","isDashed","elementWidth","elementHeight","elementRel","animationRel","offsetHeight","fillType","duplicate","newLength","forceRestore","currentContext","prevStack","saveOnNativeFlag","currentStack","newStack","setOpacity","trProps","checkBlendMode","tg","transformedElementStyle","matrixValue","webkitTransform","addEffects","_renderShapeFrame","shapeCont","getTransformedPoint","calculateShapeBoundingBox","vPoint","oPoint","nextIPoint","nextVPoint","checkBounds","getBoundsOfCurve","shapeBoundingBox","xMax","yMax","tempBoundingBox","b2ac","calculateF","calculateBoundingBox","expandStrokeBoundingBox","widthProperty","kfw","currentBoxContains","changed","shapeStyle","shapeTransform","compW","compH","innerElemStyle","textColor","strokeWidth","lineHeight","tCont","tContStyle","tContTranslation","tStyle","tSpanTranslation","svgStyle","translation","textPath","margin","svgTransform","perspectiveStyle","perspective","perspectiveElem","webkitPerspective","mTransf","diffVector","mag","lookDir","lookLengthOnXZ","mRotationX","mRotationY","hasMatrixChanged","matValue","Image","imageElem","newDOMElement","ddd","addTo3dContainer","nextDOMElement","nextLayer","getThreeDContainerByPos","startPos","endPos","createThreeDContainer","threeDContainerData","build3dContainers","lastThreeDContainerData","currentContainer","resizerElem","cWidth","cHeight","floatingContainer","_createBaseContainerElements","_thisLayerFunction","pixelAspect","frameDuration","displayStartTime","numLayers","_typeof$2","seedRandom","nodecrypto","rngname","startdenom","significance","ARC4","keylen","typ","mixkey","smear","stringseed","tostring","seedrandom","shortseed","entropy","autoseed","screen","arc4","prng","int32","quick","is_math_call","initialize$2","propTypes","SHAPE","_typeof$1","ExpressionManager","_lottieGlobal","$bm_isInstanceOfArray","isNumerable","tOfV","$bm_neg","tOfA","lenA","retArr","easeInBez","easeOutBez","easeInOutBez","tOfB","lenB","mul","$bm_sum","$bm_sub","$bm_mul","$bm_div","$bm_mod","clamp","radiansToDegrees","radians_to_degrees","degreesToRadians","degrees_to_radians","helperLengthArray","vec","rgbToHsl","hue2rgb","hslToRgb","linear","tMin","tMax","_tMin","createPath","inTangents","outTangents","inVertexPoint","outVertexPoint","arrPlaceholder","initiateExpression","noOp","needsVelocity","_needsRandom","$bm_transform","thisProperty","valueAtTime","inPoint","outPoint","loopIn","loop_in","loopOut","loop_out","smooth","toWorld","fromWorld","fromComp","toComp","fromCompToSurface","rotation","anchorPoint","thisLayer","thisComp","velocityAtTime","scoped_bm_rt","expression_function","eval","numKeys","wiggle","freq","amp","iWiggle","lenWiggle","addedAmps","periods","loopInDuration","loopOutDuration","getVelocityAtTime","lookAt","elem1","elem2","fVec","pitch","easeOut","val1","val2","applyEase","easeIn","ease","iKey","lenKey","nearestKey","obKey","framesToTime","fps","timeToFrames","randSeed","posterizeTime","framesPerSecond","velocity","textIndex","textTotal","selectorValue","executeExpression","frameExpressionId","__preventDeadCodeRemoval","Expressions","stackCount","registers","pushExpression","popExpression","releaseInstances","registerExpressionProperty","expression","MaskManagerInterface","MaskInterface","_mask","_masksInterfaces","ExpressionPropertyInterface","defaultUnidimensionalValue","defaultMultidimensionalValue","completeProperty","expressionValue","valueProp","speedAtTime","getSpeedAtTime","propertyGroup","defaultGetter","UnidimensionalPropertyInterface","MultidimensionalPropertyInterface","arrValue","TransformExpressionInterface","_thisFunction","xRotation","yRotation","xPosition","yPosition","zPosition","_px","_py","_pz","_transformFactory","getMatrix","toWorldMat","toWorldVec","applyPoint","fromWorldVec","invertPoint","sampleImage","transformInterface","anchorPointDescriptor","anchor_point","_registerMaskInterface","_registerEffectsInterface","propertyGroupFactory","interfaceFunction","parentPropertyGroup","PropertyInterface","_propertyGroup","createGroupInterface","groupInterface","mn","createValueInterface","numProperties","np","en","expressionProperty","setGroupProperty","effectsData","ShapePathInterface","propertyIndex","iterateElements","groupInterfaceFactory","fillInterfaceFactory","strokeInterfaceFactory","trimInterfaceFactory","ellipseInterfaceFactory","starInterfaceFactory","rectInterfaceFactory","roundedInterfaceFactory","repeaterInterfaceFactory","gradientFillInterfaceFactory","contentsInterfaceFactory","interfaces","transformInterfaceFactory","cix","startPoint","_dashPropertyGroup","dashOb","dash","skewAxis","outerRadius","outerRoundness","innerRoundness","innerRadius","_interfaceFunction","parentGroupWrapper","_sourceText","sourceText","stringValue","fillColor","dataInterfaceFactory","outlineInterface","currentPropertyName","currentProperty","propertyNameIndex","outlineInterfaceFactory","dataInterface","footage","getInterface","expressionHelpers","searchExpressions","speed","_cachingAtTime","getStaticValueAtTime","addPropertyDecorator","durationFlag","cycleDuration","firstKeyFrame","lastKeyFrame","initV","endV","repeats","nextLastValue","firstValue","nextFirstValue","samples","sampleValue","sampleFrequency","getTransformValueAtTime","_transformCachingAtTime","rotationZ","rotationY","rotationX","positionX","positionY","positionZ","getTransformStaticValueAtTime","propertyGetProp","ShapePropertyConstructorFunction","KeyframedShapePropertyConstructorFunction","ShapeExpressions","isClosed","pointOnPath","_segmentsLength","accumulatedLength","vectorOnPath","vectorType","xLength","yLength","magnitude","tangentOnPath","normalOnPath","getShapeValueAtTime","shapeValue","propertyGetShapeProp","trims","initialize$1","addDecorator","getExpressionValue","calculateExpression","isKeyframed","hasExpressions","SVGComposableEffect","createMergeNode","resultId","ins","feMergeNode","feMerge","linearFilterValue","SVGTintFilter","linearFilter","matrixFilter","SVGFillFilter","SVGStrokeEffect","SVGTritoneFilter","feComponentTransfer","feFuncR","feFuncG","feFuncB","SVGProLevelsFilter","createFeFunc","feFuncA","feFuncRComposed","feFuncGComposed","feFuncBComposed","SVGDropShadowEffect","globalFilterSize","feGaussianBlur","feOffset","feFlood","feComposite","colorBlack","colorWhite","groupPath","elemChildren","pathMasker","dasharrayValue","getTotalLength","color1","color2","color3","tableG","tableB","getTableValue","inputBlack","inputWhite","gamma","outputBlack","outputWhite","colorValue","table","outputDelta","inputDelta","_svgMatteSymbols","SVGMatte3Effect","filterElem","SVGGaussianBlurEffect","TransformEffect","SVGTransformEffect","CVTransformEffect","findSymbol","replaceInParent","symbolId","nextChild","useElem","setElementAsMask","sigma","dimensions","forceFrame","scaleHeight","scaleWidth","callOrApply","TextColorDirective","_TextColorDirective","intervalOrScheduler","intervalDuration","isValidDate","EligibilityCheckComponent","registrationService","showInfo","home_zip_code","homeZipControl","aTarget","utmVal","launchCheck","mainAnalytics","analyticEventProps","analyticName","handleRequiredVerifications","ControlSubmissionMap","selectedControl","electiveProductChoices","electiveProductsForm","selectedElectiveProduct","electiveProd","prodString","productRadioChanged","showElectiveProducts","statesToDisplayArray","pickedState","hasConsent","errorCodes","submitConsent","skipPrecheck","completeSubmission","submissionObj","skip_precheck","employee_data_verification_status","fa_referred","selections","showCollectPrimaryForm","primaryEmployeeForm","primaryKey","resolveSubmissionCompleted","failedSubmissionHandler","identitySubmitted","displayModal","showInfoModal","clearId","uniqueIdFormControl","setErrorModal","incrementErrorCount","out_pilot_url","errorRedirectURL","showErrorModalCloseBtn","allowDoesNotExist","CLIENT_ALREADY_VERIFIED","userNumber","existing_phone_number","collectPrimary","isCTA","createCollectPrimaryForm","primaryEmployeeFormControls","stateClicked","stateString","controlRef","workingStateControl","selectedState","selectedProducts","programContinue","backEmitted","_EligibilityCheckComponent","maxHeight","_DesktopDataAccessCoreServicesModule","checkFeatureFlag","flagInfo","boolResult","killSwitchLogic","toOnTrue","allowIfFalse","toOnFalse","_FeatureFlagKillSwitchGuard","Auth0Service","notifyUserLoggedIn","notifyUserLoggedOut","_auth0Service","_reloginErrors","login","getUserLoggedInEvent","_userLoggedInSubject","getUserLoggedOutEvent","_userLoggedOutSubject","additionalScope","redirectRoute","overrideIsAuthenticated","screen_hint","_defaultScope","logoutOptions","returnTo","logoutSubscription","storedAccessToken","_profileService","setAccessTokenForMicroApps","changePassword","changePhoneNumber","changeEmailAddress","_BsAuthService","_http","_env","getTimeZone","generateUUID","browserMapping","Opera","validMatch","Chrome","Safari","Firefox","extraChecks","checkDetails","browserName","checkFunc","formatParts","Intl","timeZoneName","requestObj","_createRequestObj","dynamicHeaders","_getHeaders","Authorization","getStandardHeaders","_AwsApiWrapperService","BsLoggerService","_BsLoggerService","_chatLoaded","isSalesForceConfig","_chatConfig","_inMaintenance","alreadyLaunchedChat","_initializeChat","_chatScript","_loadChatScript","embeddedservice_bootstrap","serviceLoaded","_verifyUser","userVerificationAPI","setIdentityToken","identityTokenType","identityToken","prechatAPI","setHiddenPrechatFields","removeHiddenPrechatFields","_setUpOtherListeners","_guidAttempts","_refreshToken","utilAPI","launchChat","_chatLoadingInProgress","chatLoaded","shutdown","_setUpClickWatcher","_BsChatService","MobileAppModalComponent","notificationService","onRetryEvent","handleTextMobileLink","ctaClick","_MobileAppModalComponent","instanceFactory","multipleInstances","serviceProps","instantiationMode","onInstanceCreated","setInstantiationMode","setMultipleInstances","setServiceProps","setInstanceCreatedCallback","Provider","instancesDeferred","instancesOptions","onInitCallbacks","normalizedIdentifier","normalizeInstanceIdentifier","deferred","shouldAutoInitialize","getOrInitializeService","instanceIdentifier","setComponent","isComponentEager","instanceDeferred","clearInstance","isComponentSet","existingCallbacks","invokeOnInitCallbacks","addOrOverwriteComponent","wrapperSource","resetConnection","hasCompleted","hasErrored","cancelReset","resetAndUnsubscribe","dest","handleReset","onSubscriber","spanStatus","getSpanStatusFromHttpCode","_set","aArray","aAllowDuplicates","sStr","aIdx","SafePipe","_SafePipe","GetAnimationStack","animationStackTrace","_lastNavWasReverseExitAnimation","_animationStackTrace","animationLogs","_UiTemplatePageTransitionService","errorFactory","defaultErrorFactory","relativeTimeWithMutation","softMutation","mutationTable","lastNumber","minWeekdaysParse","fullWeekdaysParse","shortWeekdaysParse","specialMutationForYears","errorOrErrorFactory","VideoComponent","cdRef","isMp4","fullVideoPath","onModalClose","modalClosed","_VideoComponent","sentryElement","asyncGeneratorStep","FINANCIAL","CURRENCY_MASK_CONFIG","InputManager","htmlInputElement","setCursorAt","createTextRange","textRange","collapse","moveEnd","moveStart","updateValueAndCursor","newRawValue","oldLength","canInputMoreNumbers","haventReachedMaxLength","inputSelection","haveNumberSelected","startWithZero","createRange","lenght","startRange","moveToBookmark","getBookmark","endRange","compareEndPoints","_storedRawValue","storedRawValue","InputService","SINGLE_DIGIT_REGEX","ONLY_NUMBERS_REGEX","PER_AR_NUMBER","inputManager","addNumber","decimal","keyChar","isDecimalChar","rawValueStart","rawValueEnd","inDecimalPortion","nextSelectionStart","thousands","updateFieldValue","disablePadAndTrim","onlyNumbers","padOrTrimPrecision","integerPart","integerValue","decimalPart","decimalValue","isNegative","padEnd","decimalIndex","decimalPortion","actualPrecision","clearMask","isNullable","re","changeToNegative","changeToPositive","removeNumber","suffixStart","shiftSelection","insertChars","isCursorInDecimals","isCursorImmediatelyAfterDecimalPoint","replacedDecimalCount","selectionFromEnd","prefixLength","suffixLength","InputHandler","inputService","handleCut","handleInput","rawValueLength","storedRawValueLength","handleKeypressImpl","handleKeydown","which","handleKeypress","handlePaste","getOnModelChange","setOnModelChange","callbackFunction","getOnModelTouched","setOnModelTouched","delayMillis","CURRENCYMASKDIRECTIVE_VALUE_ACCESSOR","CurrencyMaskDirective","currencyMaskConfig","keyValueDiffers","optionsTemplate","allowZero","keyValueDiffer","textAlign","handleBlur","isChromeAndroid","isReadOnly","handleDrop","H","RemoteConfigAbortSignal","RC_COMPONENT_NAME","BOOLEAN_TRUTHY_VALUES","Value","_source","asNumber","getSource","rc","lastSuccessfulFetchResponse","activeConfigEtag","getLastSuccessfulFetchResponse","getActiveConfigEtag","eTag","_storageCache","setActiveConfig","setActiveConfigEtag","_initializePromise","loadFromStorage","_isInitializationComplete","fetchTimeoutMillis","customSignals","getCustomSignals","cacheMaxAgeMillis","setLastFetchStatus","lastFetchStatus","hasErrorCode","activeConfig","getActiveConfig","CachingClient","storageCache","isCachedDataFresh","lastSuccessfulFetchTimestampMillis","cacheAgeMillis","getLastSuccessfulFetchTimestampMillis","storageOperations","setLastSuccessfulFetchTimestampMillis","setLastSuccessfulFetchResponse","getUserLanguage","navigatorLanguage","RestClient","firebaseInstallations","installationId","installationToken","FIREBASE_REMOTE_CONFIG_URL_BASE","sdk_version","app_instance_id","app_instance_id_token","language_code","custom_signals","fetchPromise","timeoutPromise","responseEtag","RetryingClient","attemptFetch","RemoteConfig","fetchTimeMillis","getLastFetchStatus","toFirebaseError","APP_NAMESPACE_STORE","openDbPromise","openDatabase","keyPath","etag","setCustomSignals","storedSignals","getWithTransaction","combinedSignals","updatedSignals","maxSignals","setWithTransaction","compositeKey","createCompositeKey","lastFetchStatusPromise","lastSuccessfulFetchTimestampMillisPromise","activeConfigPromise","customSignalsPromise","timestampMillis","_x5","_fetchAndActivate","registerRemoteConfig","remoteConfigFactory","restClient","retryingClient","cachingClient","remoteConfigInstance","ActionDetailsCardComponent","emitCtaClicked","ctaClicked","_ActionDetailsCardComponent","ExternalLendersIntroComponent","_externalPartnerService","_translateSvc","cdnImgUrl","externalPartners$","partnersMap","mapToCardConfig","partnersString","partnersArray","LenderAlernatives","labelImg","ctaString","detailGroup","onCtaClicked","partnerData","_ExternalLendersIntroComponent","ExternalLendersPartnerComponent","currentPartnerDetails$","partnerIntro$","goToPartnerRedirectUrl","goBackToPartnerList","_ExternalLendersPartnerComponent","_DesktopFeatureExternalLendersModule","_mobileStateSvc","hasLenderAlternativesCard","LENDER_ALTERNATIVES","_ExternalLendersGuard","DocumentsKeyEnum","LegalDocsAcceptActions","bsAPI","_requiredDocuments","_processing","_displayGeneralError","_docsSubmitted","_displayDocsRequiredModal","hideAdditionalDocsModal","_uppercaseCopyKeys","activeDocumentsKey","activeRequiredDocuments","validateByDocumentsKey","ACCEPTED","documentVersionIds","_getDocumentIdArray","showAdditionalDocsModal","showGeneralError","getAcceptedDocuments","documentIdArray","documentVersionId","legalDocs","titleCopyKey","descriptionCopyKey","downloadUrlCopyKey","_LegalDocumentsService","IntercomConfig","Intercom","renderer2","updateOnRouterChange","intercomData","_callIntercom","showNewMessage","showMessages","trackEvent","getVisitorId","visitorId","startTour","tourId","injectIntercomScript","conf","afterInjectCallback","intercomSettings","attachEvent","afterLoadCallback","ic","FROZEN_DSC_FIELD","frozenDsc","traceState","traceStateDsc","dscOnTraceState","toastFadeDelay","onShowToast","defaultId","oldtoast","shouldDebounce","debouncing","toasted","pruneDebouncing","removePriorTo","_ToastService","animationFrameProvider","animationFrameScheduler","AnimationFrameScheduler","flushId","_scheduled","AnimationFrameAction","LOTTIE_OPTIONS","AnimationLoader","player$","convertPlayerOrLoaderToObservable","playerOrLoader","createAnimationItem","resolveOptions","BaseDirective","animationLoader","containerClass","animationCreated","getAnimationItem","awaitAnimationItemAndStartListening","loopComplete","enterFrame","segmentStart","configReady","dataReady","domLoaded","destroy$","loadAnimation$","animationItem$","setupLoadAnimationListener","destroyAnimation","provideLottieOptions","MessageBusIncomingEventKeyList","MessageBusOutgoingEventKeyByValue","keyString","MessageBusPlatformNativeEventBody","moveBodyNode","deepInstantHtmlCopySwap","At","toJson","MessageBusPlatformBaseMessageHandler","blockedMessageReceiver","cleanDataBody","allowedBodyKeys","cleanedResponse","prepareNativeEvent","messageReceiver","eventData","jsHandler","MessageBusPlatformAndroidMessageHandler","OUTGOING","SHOW_CAMERA","CAMERA_RESPONSE","rawMessage","SHOW_PHOTO_PICKER","TriggerCameraEvent","SetupCameraEventWatcher","TriggerPickerEvent","SetupPickerEventWatcher","handlePreBridgeRouteEvent","fallbackSetting","triggerRouteByUrlEvent","webkit","messageHandlers","buttonClicked","MessageBusBaseService","AnyClass","MessageBusPlatformIosMessageHandler","nativeWindowReference","nativeWindow","generatedEventClass","MessageBusPlatformBrowserMessageHandler","chatService","watchForExternalLinkEvents","handleBridgeOutgoingMessage","handleDataBodyMessage","handleRouteMessage","handleDataFallbackMessage","CHAT","openIntercomChat","incomingEvent","superclass","MixinClass","wrappedCallbackListener","returnMessageBusHubListener","addHubListener","hubListeners","hubEvent","offSetDelay","_MessageBusInternalService","MessageBusIncomingService","extractEventKeys","rawMessageBusIncomingEventKey","eventKeyDetails","MessageBusIncomingEventKeyByValue","extractEventBody","cleanedMessageBody","cleanedMessageString","skipConvertingToObject","skipKey","convertIncomingBodyToObject","convertToSingleQuotes","unknown","sendIncomingEvents","eventKeys","eventBody","extractedEventKeys","extractedEventBody","_MessageBusIncomingService","ChatService","_ChatService","MessageBusNativeWindowReference","_MessageBusNativeWindowReference","MessageBusOutgoingService","routerService","setUpListenerForOutgoingEvents","setUpListenerForOutgoingRoute","deepInstantTranslationCopySwap","nn","outgoingEventKeyAsStrings","sendOutgoingEvent","windowObjAsAny","GLOBAL_LOADER","groomMessageBody","outgoingEventData","checkAndTriggerSideAffectFrom","EXIT_VIEW","ANALYTICS","outgoingEvent","_MessageBusOutgoingService","messageBusInternalService","messageBusOutgoingService","_MicroMessageBusModule","MessageBusHalfsheetType","StandardEvent_PageLoaded","LOADED","StandardEvent_ShowLoader","SHOW_LOADING","StandardEvent_HideLoader","HIDE_LOADING","BuildForPathAndReturnStandardEvent","DEFAULT_HALFSHEET_CONFIG","subCategory","dismissable","TEXT","cells","enterExternalAccountConnect","exitFeatureToChat","exitFeatureToSavingsHome","forPathAndReturnStandardEvent","pageLoaded","showLoadingSpinner","fallbackMessageCode","BuildFallback","valueForStandalone","valueForThat","valueForEmbedded","LanguageSelectorComponent","langSelectSvc","setUpSelector","displayDropdown","displaySelected","_displayDropdown","displayedOption","changeLangTo","defocus","langSelectInput","_LanguageSelectorComponent","MonthNamePipe","datePipe","_MonthNamePipe","eifelerRegelAppliesToNumber","processFutureTime","processPastTime","parentSubscription","scheduleSubscription","TextStyle","TypographyComponent","hostElAttrs","getAttributeNames","_styleKeys","_TypographyComponent"],"sourceRoot":"webpack:///","sources":["./node_modules/rxjs/dist/esm/internal/util/errorContext.js","./libs/shared/desktop/src/lib/display-form/display-form.component.html","./libs/shared/desktop/src/lib/display-form/display-form.component.ts","./libs/brightside-ui/src/lib/card/card.component.html","./libs/brightside-ui/src/lib/card/card.component.ts","./node_modules/moment/locale/pa-in.js","./node_modules/@ngx-loading-bar/core/fesm2015/ngx-loading-bar-core.js","./libs/desktop/data-access/account-linking/src/lib/linked/linked.service.ts","./libs/micro-ui/template/content/src/lib/shared/model/content-template.enum.ts","./libs/micro-ui/template/content/src/lib/components/cdn-url/cdn-url-content.component.ts","./libs/micro-ui/template/content/src/lib/components/title-text/title-text-content.component.html","./libs/micro-ui/template/content/src/lib/components/title-text/title-text-content.component.ts","./libs/micro-ui/template/content/src/lib/components/display/display-content-item.component.html","./libs/micro-ui/template/content/src/lib/components/display/display-content-item.component.ts","./libs/micro-ui/template/content/src/lib/components/display/display-content.component.html","./libs/micro-ui/template/content/src/lib/components/display/display-content.component.ts","./libs/micro-ui/template/content/src/lib/components/group/radio/group-radio-content.component.html","./libs/micro-ui/template/content/src/lib/components/group/radio/group-radio-content.component.ts","./libs/brightside-ui/src/lib/input/currency-select/currency-select.component.ts","./libs/brightside-ui/src/lib/input/currency-select/currency-select.component.html","./libs/micro-ui/template/content/src/lib/components/select/amount/select-amount-content.component.ts","./libs/micro-ui/template/content/src/lib/components/display-form/display-form-content.component.html","./libs/micro-ui/template/content/src/lib/components/display-form/display-form-content.component.ts","./libs/micro-ui/template/content/src/lib/micro-ui-template-content.module.ts","./libs/micro-ui/template/page/src/lib/shared/model/page-template.enum.ts","./libs/micro-ui/template/page/src/lib/shared/base-page-template.component.ts","./libs/micro-ui/template/page/src/lib/service/state-handler/state-subject.ts","./libs/micro-ui/template/page/src/lib/service/state-handler/state.service.ts","./libs/micro-ui/template/page/src/lib/service/state-handler/state-handler.service.ts","./libs/micro-ui/template/page/src/lib/service/state-handler/state.enum.ts","./libs/micro-ui/template/page/src/lib/shared/state-page-template.component.ts","./libs/micro-ui/template/page/src/lib/service/action-handler/action-handler.shared.ts","./libs/micro-ui/template/page/src/lib/flyer/flyer-page-template.component.html","./libs/micro-ui/template/page/src/lib/flyer/flyer-page-template.component.ts","./libs/micro-ui/template/page/src/lib/half-sheet/half-sheet-page-template.component.html","./libs/micro-ui/template/page/src/lib/half-sheet/half-sheet-page-template.component.ts","./libs/micro-ui/template/page/src/lib/micro-ui-template-page.module.ts","./node_modules/moment/locale/az.js","./libs/micro/terms-update/src/lib/terms/terms.component.ts","./libs/micro/terms-update/src/lib/terms/terms.component.html","./libs/micro/terms-update/src/lib/micro-terms-update.module.ts","./libs/micro/terms-update/src/lib/has-terms-update.guard.ts","./node_modules/moment/locale/gu.js","./node_modules/moment/locale/zh-hk.js","./node_modules/@sentry/core/build/esm/carrier.js","./node_modules/moment/locale/ku.js","./libs/micro-ui/molecule/src/lib/footer/default/footer-default.component.html","./libs/micro-ui/molecule/src/lib/footer/default/footer-default.component.ts","./node_modules/moment/locale/x-pseudo.js","./libs/micro-ui/molecule/src/lib/footer/footer.enum.ts","./node_modules/moment/locale/fr-ch.js","./node_modules/moment/locale/en-gb.js","./node_modules/moment/moment.js","./libs/shared/desktop/src/lib/go-to-brightside-desktop/go-to-brightside-desktop.component.ts","./libs/shared/desktop/src/lib/go-to-brightside-desktop/go-to-brightside-desktop.component.html","./node_modules/rxjs/dist/esm/internal/operators/mapTo.js","./node_modules/moment/locale/sk.js","./node_modules/rxjs/dist/esm/internal/operators/OperatorSubscriber.js","./node_modules/moment/locale/eu.js","./node_modules/moment/locale/it.js","./node_modules/@videogular/ngx-videogular/fesm2020/videogular-ngx-videogular-buffering.mjs","./node_modules/rxjs/dist/esm/internal/operators/filter.js","./node_modules/@ngx-translate/core/fesm2020/ngx-translate-core.mjs","./libs/brightside-ui/src/lib/toast/toast.component.html","./libs/brightside-ui/src/lib/toast/toast.component.ts","./node_modules/@videogular/ngx-videogular/fesm2020/videogular-ngx-videogular-controls.mjs","./libs/shared/desktop/src/lib/credit-modal/credit-modal.component.html","./libs/shared/desktop/src/lib/credit-modal/credit-modal.component.ts","./node_modules/rxjs/dist/esm/internal/util/args.js","./node_modules/stacktrace-gps/node_modules/source-map/lib/source-map-generator.js","./node_modules/rxjs/dist/esm/internal/observable/defer.js","./node_modules/stacktrace-gps/node_modules/source-map/lib/util.js","./node_modules/moment/locale/en-ie.js","./node_modules/moment/locale/zh-cn.js","./node_modules/rxjs/dist/esm/internal/util/isArrayLike.js","./node_modules/@auth0/auth0-spa-js/dist/auth0-spa-js.production.esm.js","./node_modules/@auth0/auth0-angular/fesm2020/auth0-auth0-angular.mjs","./node_modules/rxjs/dist/esm/internal/observable/iif.js","./node_modules/rxjs/dist/esm/internal/operators/withLatestFrom.js","./node_modules/@sentry/core/build/esm/session.js","./libs/brightside-ui/src/lib/cell/action-cell/action-cell.component.html","./libs/brightside-ui/src/lib/cell/action-cell/action-cell.component.ts","./libs/micro-ui/molecule/src/lib/navigation/exit/back/exit-back.component.ts","./libs/micro-ui/molecule/src/lib/navigation/exit/back/exit-back.component.html","./node_modules/moment/locale/sr-cyrl.js","./node_modules/@sentry/core/build/esm/utils-hoist/logger.js","./node_modules/@aws-amplify/core/dist/esm/Cache/constants.mjs","./node_modules/@aws-amplify/core/dist/esm/Cache/utils/cacheHelpers.mjs","./node_modules/@aws-amplify/core/dist/esm/Cache/utils/errorHelpers.mjs","./node_modules/@aws-amplify/core/dist/esm/Cache/StorageCacheCommon.mjs","./node_modules/@aws-amplify/core/dist/esm/Cache/StorageCache.mjs","./node_modules/@aws-amplify/core/dist/esm/Cache/index.mjs","./libs/desktop/data-access/core-services/src/lib/Cache/bs-cache.service.ts","./node_modules/moment/locale/ca.js","./node_modules/moment/locale/bs.js","./node_modules/@firebase/util/dist/index.esm2017.js","./node_modules/@sentry/core/build/esm/utils-hoist/syncpromise.js","./node_modules/@videogular/ngx-videogular/fesm2020/videogular-ngx-videogular-overlay-play.mjs","./libs/brightside-ui/src/lib/utils/ngx-mask/ngx-mask.module.ts","./node_modules/@sentry/core/build/esm/utils-hoist/stacktrace.js","./node_modules/moment/locale/fo.js","./node_modules/rxjs/dist/esm/internal/observable/of.js","./node_modules/@aws-amplify/core/dist/esm/errors/PlatformNotSupportedError.mjs","./node_modules/moment/locale/cv.js","./libs/desktop/data-access/loans/src/lib/loans.service.ts","./libs/desktop/data-access/external-savings/src/lib/external-savings.service.ts","./libs/desktop/data-access/cards/src/lib/savings-card-data.service.ts","./libs/desktop/data-access/cards/src/lib/card.service.ts","./node_modules/moment/locale/nl.js","./libs/micro-ui/molecule/src/lib/media/media.enum.ts","./libs/micro-ui/molecule/src/lib/media/media.component.html","./libs/micro-ui/molecule/src/lib/media/media.component.ts","./node_modules/@videogular/ngx-videogular/fesm2020/videogular-ngx-videogular-core.mjs","./node_modules/rxjs/dist/esm/internal/util/isFunction.js","./libs/brightside-ui/src/lib/input/input.component.html","./libs/brightside-ui/src/lib/input/input.component.ts","./node_modules/moment/locale/km.js","./node_modules/moment/locale/tzl.js","./node_modules/@sentry/core/build/esm/utils-hoist/misc.js","./libs/brightside-ui/src/lib/typography/paragraph/paragraph.component.ts","./libs/brightside-ui/src/lib/typography/paragraph/paragraph.component.html","./node_modules/stacktrace-gps/node_modules/source-map/lib/base64-vlq.js","./node_modules/@sentry/core/build/esm/utils-hoist/tracing.js","./node_modules/moment/locale/dv.js","./node_modules/@angular/platform-browser/fesm2020/platform-browser.mjs","./node_modules/rxjs/dist/esm/internal/scheduler/timeoutProvider.js","./libs/brightside-ui/src/lib/modal/modal.component.html","./libs/brightside-ui/src/lib/modal/modal.component.ts","./node_modules/rxjs/dist/esm/internal/operators/map.js","./node_modules/@angular/common/fesm2020/common.mjs","./libs/desktop/data-access/core-services/src/lib/Hub/bs-hub.service.ts","./node_modules/moment/locale/fi.js","./node_modules/rxjs/dist/esm/internal/Observable.js","./node_modules/moment/locale/cy.js","./libs/micro-ui/molecule/src/lib/header/header.enum.ts","./node_modules/moment/locale/sq.js","./node_modules/moment/locale/me.js","./libs/micro/core/utility/src/lib/tracking/tracking.directive.ts","./node_modules/moment/locale/es-mx.js","./node_modules/moment/locale/uz.js","./node_modules/rxjs/dist/esm/internal/operators/take.js","./node_modules/rxjs/dist/esm/internal/util/isIterable.js","./node_modules/@videogular/ngx-videogular/fesm2020/videogular-ngx-videogular-streaming.mjs","./node_modules/@sentry/core/build/esm/utils-hoist/object.js","./node_modules/moment/locale/bg.js","./libs/shared/desktop/src/lib/hr-modal/hr-modal.component.ts","./libs/shared/desktop/src/lib/hr-modal/hr-modal.component.html","./node_modules/rxjs/dist/esm/internal/operators/switchMap.js","./node_modules/rxjs/dist/esm/internal/operators/delayWhen.js","./node_modules/rxjs/dist/esm/internal/operators/ignoreElements.js","./node_modules/rxjs/dist/esm/internal/operators/delay.js","./node_modules/stacktrace-gps/node_modules/source-map/lib/source-node.js","./node_modules/@sentry/core/build/esm/utils-hoist/normalize.js","./node_modules/@sentry/core/build/esm/utils-hoist/memo.js","./node_modules/moment/locale/da.js","./node_modules/@aws-amplify/core/dist/esm/types/errors.mjs","./node_modules/rxjs/dist/esm/internal/config.js","./node_modules/blueimp-md5/js/md5.js","./node_modules/rxjs/dist/esm/internal/util/isPromise.js","./libs/brightside-ui/src/lib/layout/templates/billboard-article/billboard-article.component.ts","./libs/brightside-ui/src/lib/layout/templates/billboard-article/billboard-article.component.html","./libs/shared/desktop/src/lib/how-we-help/how-we-help.component.html","./libs/shared/desktop/src/lib/how-we-help/how-we-help.component.ts","./node_modules/@sentry/core/build/esm/metrics/metric-summary.js","./libs/brightside-ui/src/lib/utils/ngx-mask/mask.service.ts","./libs/shared/legal-documents/src/lib/required-legal-documents/required-legal-documents.component.html","./libs/shared/legal-documents/src/lib/required-legal-documents/required-legal-documents.component.ts","./node_modules/moment/locale/bm.js","./node_modules/rxjs/dist/esm/internal/observable/combineLatest.js","./libs/brightside-ui/src/lib/menu/menu.component.ts","./libs/brightside-ui/src/lib/menu/menu.component.html","./libs/micro-ui/molecule/src/lib/header/menu/header-menu.component.html","./libs/micro-ui/molecule/src/lib/header/menu/header-menu.component.ts","./libs/shared/desktop/src/lib/display-message/display-message.component.html","./libs/shared/desktop/src/lib/display-message/display-message.component.ts","./node_modules/moment/locale/th.js","./libs/brightside-ui/src/lib/checkbox/checkbox.component.html","./libs/brightside-ui/src/lib/checkbox/checkbox.component.ts","./node_modules/@sentry/core/build/esm/utils-hoist/string.js","./libs/brightside-ui/src/lib/utils/clickable.directive.ts","./node_modules/@sentry/core/build/esm/utils/spanOnScope.js","./node_modules/rxjs/dist/esm/internal/util/isAsyncIterable.js","./node_modules/error-stack-parser/error-stack-parser.js","./node_modules/rxjs/dist/esm/internal/BehaviorSubject.js","./node_modules/rxjs/dist/esm/internal/operators/defaultIfEmpty.js","./node_modules/moment/locale/mr.js","./node_modules/moment/locale/en-il.js","./node_modules/rxjs/dist/esm/internal/observable/forkJoin.js","./node_modules/libphonenumber-js/es6/helpers/parseDigits.js","./libs/brightside-ui/src/lib/anchor/anchor.component.html","./libs/brightside-ui/src/lib/anchor/anchor.component.ts","./libs/shared/display/src/lib/display-complete/display-complete.component.html","./libs/shared/display/src/lib/display-complete/display-complete.component.ts","./libs/shared/display/src/lib/display-form/shared-display-form.modal.ts","./libs/shared/display/src/lib/display-form/form-choice/form-choice.component.html","./libs/shared/display/src/lib/display-form/form-choice/form-choice.component.ts","./libs/shared/display/src/lib/display-form/form-file/form-file.component.html","./libs/shared/display/src/lib/display-form/form-file/form-file.component.ts","./libs/shared/display/src/lib/display-halfsheet/display-halfsheet.component.html","./libs/shared/display/src/lib/display-halfsheet/display-halfsheet.component.ts","./libs/shared/display/src/lib/display-form/shared-display-form.component.html","./libs/shared/display/src/lib/display-form/shared-display-form.component.ts","./libs/shared/display/src/lib/display-review/display-review.component.html","./libs/shared/display/src/lib/display-review/display-review.component.ts","./libs/shared/display/src/lib/display-waiting/display-waiting.component.html","./libs/shared/display/src/lib/display-waiting/display-waiting.component.ts","./libs/shared/display/src/lib/display-content-list/shared-display-content-list.component.html","./libs/shared/display/src/lib/display-content-list/shared-display-content-list.component.ts","./libs/shared/display/src/lib/shared-display.module.ts","./libs/shared/display/src/lib/display-form/util/document-upload.util.ts","./libs/shared/display/src/lib/display-form/util/form.util.ts","./libs/shared/display/src/lib/display-form/responder/file-action.responder.ts","./node_modules/rxjs/dist/esm/internal/symbol/iterator.js","./libs/desktop/data-access/onboarding/src/lib/flow-manager/flow-manager.service.ts","./libs/desktop/data-access/onboarding/src/lib/registration.service.ts","./node_modules/moment/locale/kn.js","./libs/brightside-ui/src/lib/layout/templates/action-article/action-article.component.ts","./libs/brightside-ui/src/lib/layout/templates/action-article/action-article.component.html","./libs/brightside-ui/src/lib/cell/cell.component.html","./libs/brightside-ui/src/lib/cell/cell.component.ts","./node_modules/rxjs/dist/esm/internal/util/identity.js","./node_modules/@aws-amplify/core/dist/esm/Logger/types.mjs","./node_modules/@aws-amplify/core/dist/esm/Logger/ConsoleLogger.mjs","./node_modules/stacktrace-gps/node_modules/source-map/lib/source-map-consumer.js","./node_modules/moment/locale/ne.js","./node_modules/moment/locale/cs.js","./node_modules/@sentry/core/build/esm/utils-hoist/debug-build.js","./node_modules/rxjs/dist/esm/internal/util/ObjectUnsubscribedError.js","./node_modules/rxjs/dist/esm/internal/Subject.js","./node_modules/moment/locale/mn.js","./node_modules/stacktrace-js/stacktrace.js","./libs/shared/display/src/lib/display-campaign/display-campaign.component.html","./libs/shared/display/src/lib/display-campaign/display-campaign.component.ts","./node_modules/rxjs/dist/esm/internal/util/arrRemove.js","./libs/brightside-ui/src/lib/icon/icon.component.ts","./libs/brightside-ui/src/lib/icon/icon.component.html","./node_modules/moment/locale/ms.js","./node_modules/rxjs/dist/esm/internal/scheduler/async.js","./node_modules/rxjs/dist/esm/internal/util/createErrorClass.js","./node_modules/moment/locale/eo.js","./libs/brightside-ui/src/lib/list/list-item-details/list-item-details.component.html","./libs/brightside-ui/src/lib/list/list-item-details/list-item-details.component.ts","./libs/shared/desktop/src/lib/fb.directive.ts","./libs/desktop/data-access/shared/src/lib/external-partner.service.ts","./node_modules/moment/locale/en-au.js","./libs/brightside-ui/src/lib/utils/ngx-mask/mask.directive.ts","./node_modules/moment/locale/et.js","./libs/desktop/feature/maintenance/src/lib/maintenance.service.ts","./libs/desktop/feature/maintenance/src/lib/maintenance-page/maintenance-page.component.ts","./libs/desktop/feature/maintenance/src/lib/maintenance-page/maintenance-page.component.html","./libs/desktop/feature/maintenance/src/lib/maintenance-feature/maintenance-feature.component.ts","./libs/desktop/feature/maintenance/src/lib/maintenance-feature/maintenance-feature.component.html","./libs/desktop/feature/maintenance/src/lib/desktop-feature-maintenance.module.ts","./libs/desktop/feature/maintenance/src/lib/maintenance.guard.ts","./libs/desktop/feature/maintenance/src/lib/maintenance-redirect.guard.ts","./libs/shared/desktop/src/lib/badge-id-form/badge-id-form.component.html","./libs/shared/desktop/src/lib/badge-id-form/badge-id-form.component.ts","./node_modules/@firebase/app/node_modules/idb/build/wrap-idb-value.js","./node_modules/@firebase/app/node_modules/idb/build/index.js","./node_modules/@firebase/app/dist/esm/index.esm2017.js","./node_modules/moment/locale/ku-kmr.js","./libs/brightside-ui/src/lib/panel/panel.component.ts","./libs/brightside-ui/src/lib/panel/panel.component.html","./node_modules/moment/locale/ml.js","./node_modules/rxjs/dist/esm/internal/observable/concat.js","./node_modules/rxjs/dist/esm/internal/operators/concatAll.js","./node_modules/stacktrace-gps/node_modules/source-map/lib/base64.js","./node_modules/@sentry/core/build/esm/eventProcessors.js","./node_modules/@sentry/core/build/esm/utils-hoist/debug-ids.js","./node_modules/@sentry/core/build/esm/utils/applyScopeDataToEvent.js","./node_modules/@sentry/core/build/esm/utils/prepareEvent.js","./libs/brightside-ui/src/lib/utils/numbers-only.directive.ts","./node_modules/rxjs/dist/esm/internal/operators/catchError.js","./node_modules/@aws-amplify/core/dist/esm/errors/createAssertionFunction.mjs","./node_modules/rxjs/dist/esm/internal/operators/first.js","./node_modules/@sentry/core/build/esm/utils/spanUtils.js","./node_modules/@sentry/core/build/esm/utils-hoist/time.js","./libs/desktop/feature/language-selection/src/lib/desktop-feature-language-selection.module.ts","./node_modules/moment/locale/tzm-latn.js","./libs/brightside-ui-services/src/lib/brightside-ui-services.module.ts","./libs/brightside-ui-services/src/lib/routing-state.service.ts","./libs/brightside-ui-services/src/lib/tracking.service.ts","./libs/brightside-ui/src/lib/block/block.component.ts","./libs/brightside-ui/src/lib/block/block.component.html","./node_modules/rxjs/dist/esm/internal/util/UnsubscriptionError.js","./node_modules/rxjs/dist/esm/internal/Subscription.js","./libs/brightside-ui/src/lib/utils/ngx-mask/custom-keyboard-event.ts","./libs/brightside-ui/src/lib/utils/messageservice.ts","./node_modules/@amplitude/utils/esm/src/misc.js","./node_modules/decode-uri-component/index.js","./node_modules/split-on-first/index.js","./node_modules/filter-obj/index.js","./node_modules/query-string/base.js","./node_modules/query-string/index.js","./node_modules/@amplitude/analytics-connector/dist/analytics-connector.es2015.js","./node_modules/amplitude-js/amplitude.esm.js","./node_modules/rxjs/dist/esm/internal/operators/retryWhen.js","./node_modules/tslib/tslib.es6.mjs","./libs/desktop/data-access/credit/src/lib/setup/credit-setup.service.ts","./node_modules/moment/locale/ar-ly.js","./node_modules/moment/locale/is.js","./node_modules/@aws-amplify/core/dist/esm/constants.mjs","./node_modules/rxjs/dist/esm/internal/operators/mergeMap.js","./node_modules/rxjs/dist/esm/internal/operators/mergeInternals.js","./node_modules/@angular/forms/fesm2020/forms.mjs","./node_modules/@sentry/core/build/esm/asyncContext/stackStrategy.js","./node_modules/@sentry/core/build/esm/defaultScopes.js","./node_modules/@sentry/core/build/esm/asyncContext/index.js","./node_modules/rxjs/dist/esm/internal/util/isObservable.js","./node_modules/@angular/animations/fesm2020/browser.mjs","./node_modules/@angular/platform-browser/fesm2020/animations.mjs","./node_modules/@ng-idle/core/fesm2015/ng-idle-core.js","./node_modules/@sentry/core/build/esm/utils-hoist/instrument/handlers.js","./node_modules/@sentry-internal/browser-utils/build/esm/types.js","./node_modules/@sentry-internal/browser-utils/build/esm/instrument/dom.js","./node_modules/@sentry-internal/browser-utils/build/esm/instrument/xhr.js","./node_modules/@sentry/core/build/esm/utils-hoist/vendor/supportsHistory.js","./node_modules/@sentry-internal/browser-utils/build/esm/instrument/history.js","./node_modules/@sentry/core/build/esm/utils-hoist/instrument/console.js","./node_modules/@sentry/core/build/esm/utils-hoist/supports.js","./node_modules/@sentry/core/build/esm/utils-hoist/instrument/fetch.js","./node_modules/@sentry/core/build/esm/integration.js","./node_modules/@sentry/core/build/esm/breadcrumbs.js","./node_modules/@sentry/core/build/esm/utils-hoist/severity.js","./node_modules/@sentry/core/build/esm/utils-hoist/breadcrumb-log-level.js","./node_modules/@sentry/core/build/esm/utils-hoist/url.js","./node_modules/@sentry/browser/build/npm/esm/debug-build.js","./node_modules/@sentry/browser/build/npm/esm/helpers.js","./node_modules/@sentry/browser/build/npm/esm/integrations/breadcrumbs.js","./node_modules/@sentry/core/build/esm/utils-hoist/instrument/globalError.js","./node_modules/@sentry/core/build/esm/utils-hoist/instrument/globalUnhandledRejection.js","./node_modules/@sentry/browser/build/npm/esm/eventbuilder.js","./node_modules/@sentry/browser/build/npm/esm/integrations/globalhandlers.js","./node_modules/@sentry/core/build/esm/utils-hoist/aggregate-errors.js","./node_modules/@sentry/browser/build/npm/esm/integrations/linkederrors.js","./node_modules/@sentry/browser/build/npm/esm/integrations/httpcontext.js","./node_modules/@sentry/browser/build/npm/esm/integrations/browsersession.js","./node_modules/@sentry/core/build/esm/integrations/inboundfilters.js","./node_modules/@sentry/core/build/esm/integrations/functiontostring.js","./node_modules/@sentry/core/build/esm/integrations/dedupe.js","./node_modules/@sentry/core/build/esm/api.js","./node_modules/@sentry/core/build/esm/utils-hoist/dsn.js","./node_modules/@sentry/core/build/esm/utils-hoist/envelope.js","./node_modules/@sentry/core/build/esm/utils-hoist/error.js","./node_modules/@sentry/core/build/esm/utils/parseSampleRate.js","./node_modules/@sentry/core/build/esm/baseclient.js","./node_modules/@sentry/core/build/esm/envelope.js","./node_modules/@sentry/core/build/esm/utils-hoist/clientreport.js","./node_modules/@sentry/core/build/esm/utils/sdkMetadata.js","./node_modules/@sentry/browser/build/npm/esm/client.js","./node_modules/@sentry/core/build/esm/utils-hoist/env.js","./node_modules/@sentry/browser/build/npm/esm/userfeedback.js","./node_modules/@sentry/browser/build/npm/esm/integrations/browserapierrors.js","./node_modules/@sentry/browser/build/npm/esm/stack-parsers.js","./node_modules/@sentry-internal/browser-utils/build/esm/debug-build.js","./node_modules/@sentry-internal/browser-utils/build/esm/getNativeImplementation.js","./node_modules/@sentry/core/build/esm/utils-hoist/ratelimit.js","./node_modules/@sentry/core/build/esm/transports/base.js","./node_modules/@sentry/browser/build/npm/esm/transports/fetch.js","./node_modules/@sentry/core/build/esm/utils-hoist/promisebuffer.js","./node_modules/@sentry/browser/build/npm/esm/sdk.js","./node_modules/@sentry/core/build/esm/sdk.js","./node_modules/@sentry/core/build/esm/tracing/measurement.js","./node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/bindReporter.js","./node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/getNavigationEntry.js","./node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/getActivationStart.js","./node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/initMetric.js","./node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/generateUniqueID.js","./node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/observe.js","./node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/onHidden.js","./node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/runOnce.js","./node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/getVisibilityWatcher.js","./node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/whenActivated.js","./node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/onFCP.js","./node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/getCLS.js","./node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/getFID.js","./node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/polyfills/interactionCountPolyfill.js","./node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/interactions.js","./node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/whenIdle.js","./node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/getINP.js","./node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/getLCP.js","./node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/onTTFB.js","./node_modules/@sentry-internal/browser-utils/build/esm/metrics/instrument.js","./node_modules/@sentry/core/build/esm/tracing/sentryNonRecordingSpan.js","./node_modules/@sentry/core/build/esm/tracing/utils.js","./node_modules/@sentry/core/build/esm/tracing/sentrySpan.js","./node_modules/@sentry/core/build/esm/tracing/logSpans.js","./node_modules/@sentry/core/build/esm/tracing/trace.js","./node_modules/@sentry/core/build/esm/tracing/sampling.js","./node_modules/@sentry-internal/browser-utils/build/esm/metrics/utils.js","./node_modules/@sentry-internal/browser-utils/build/esm/metrics/browserMetrics.js","./node_modules/@sentry-internal/browser-utils/build/esm/metrics/cls.js","./node_modules/@sentry-internal/browser-utils/build/esm/metrics/inp.js","./node_modules/@sentry/core/build/esm/tracing/idleSpan.js","./node_modules/@sentry/core/build/esm/tracing/errors.js","./node_modules/@sentry/core/build/esm/utils/traceData.js","./node_modules/@sentry/core/build/esm/fetch.js","./node_modules/@sentry/browser/build/npm/esm/tracing/request.js","./node_modules/@sentry/browser/build/npm/esm/tracing/browserTracingIntegration.js","./node_modules/@sentry/browser/build/npm/esm/tracing/backgroundtab.js","./node_modules/@sentry/angular/fesm2020/sentry-angular.mjs","./node_modules/ngx-device-detector/fesm2020/ngx-device-detector.mjs","./node_modules/angular-google-tag-manager/fesm2020/angular-google-tag-manager.mjs","./libs/brightside-ui/src/lib/theme/theme.component.ts","./libs/brightside-ui/src/lib/theme/theme.component.html","./libs/brightside-ui/src/lib/topbar/topbar.component.ts","./libs/brightside-ui/src/lib/topbar/topbar.component.html","./libs/brightside-ui/src/lib/layout/templates/page/page.component.ts","./libs/brightside-ui/src/lib/layout/templates/page/page.component.html","./apps/desktop/src/app/global-modal/simple-global-modal.component.html","./apps/desktop/src/app/global-modal/simple-global-modal.component.ts","./apps/desktop/src/app/app.component.html","./apps/desktop/src/app/app.component.ts","./apps/desktop/src/app/verify/verify.component.ts","./apps/desktop/src/app/review-app.guard.ts","./apps/desktop/src/app/waitlist.service.ts","./apps/desktop/src/app/waitlist/waitlist.component.html","./apps/desktop/src/app/waitlist/waitlist.component.ts","./apps/desktop/src/app/routes/invite.ts","./apps/desktop/src/app/app-routing.module.ts","./apps/desktop/src/environments/environment.prod.ts","./node_modules/@ngx-translate/http-loader/fesm2020/ngx-translate-http-loader.mjs","./apps/desktop/src/app/app.module.ts","./node_modules/@aws-amplify/core/dist/esm/utils/deepFreeze.mjs","./node_modules/@aws-amplify/core/dist/esm/singleton/constants.mjs","./node_modules/@aws-amplify/core/dist/esm/parseAWSExports.mjs","./node_modules/@aws-amplify/core/dist/esm/parseAmplifyOutputs.mjs","./node_modules/@aws-amplify/core/dist/esm/utils/parseAmplifyConfig.mjs","./node_modules/@aws-crypto/sha256-js/build/module/constants.js","./node_modules/@aws-crypto/sha256-js/build/module/RawSha256.js","./node_modules/@aws-crypto/util/build/module/convertToBuffer.js","./node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js","./node_modules/@aws-crypto/sha256-js/build/module/jsSha256.js","./node_modules/@aws-crypto/util/build/module/isEmptyData.js","./node_modules/@smithy/util-hex-encoding/dist-es/index.js","./node_modules/@aws-amplify/core/dist/esm/singleton/Auth/index.mjs","./node_modules/@aws-amplify/core/dist/esm/singleton/Amplify.mjs","./node_modules/js-cookie/dist/js.cookie.mjs","./node_modules/@aws-amplify/core/dist/esm/storage/CookieStorage.mjs","./node_modules/@aws-amplify/core/dist/esm/storage/SyncKeyValueStorage.mjs","./node_modules/@aws-amplify/core/dist/esm/storage/index.mjs","./node_modules/@aws-amplify/core/dist/esm/storage/DefaultStorage.mjs","./node_modules/@aws-amplify/core/dist/esm/utils/convert/base64/base64Decoder.mjs","./node_modules/@aws-amplify/core/dist/esm/storage/SessionStorage.mjs","./node_modules/@aws-amplify/core/dist/esm/storage/SyncSessionStorage.mjs","./node_modules/@aws-amplify/core/dist/esm/utils/globalHelpers/index.mjs","./node_modules/@aws-amplify/core/dist/esm/singleton/Auth/utils/errorHelpers.mjs","./node_modules/@aws-amplify/core/dist/esm/singleton/Auth/utils/index.mjs","./node_modules/@aws-amplify/auth/dist/esm/errors/AuthError.mjs","./node_modules/@aws-amplify/auth/dist/esm/foundation/parsers/regionParsers.mjs","./node_modules/@aws-amplify/auth/dist/esm/errors/constants.mjs","./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/types.mjs","./node_modules/@aws-amplify/core/dist/esm/clients/internal/composeServiceApi.mjs","./node_modules/@aws-amplify/core/dist/esm/clients/serde/responseInfo.mjs","./node_modules/@aws-amplify/core/dist/esm/clients/serde/json.mjs","./node_modules/@aws-amplify/auth/dist/esm/errors/utils/assertServiceError.mjs","./node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/shared/serde/createUserPoolDeserializer.mjs","./node_modules/@aws-amplify/core/dist/esm/clients/internal/composeTransferHandler.mjs","./node_modules/@aws-amplify/core/dist/esm/clients/middleware/retry/middleware.mjs","./node_modules/@aws-amplify/core/dist/esm/clients/utils/memoization.mjs","./node_modules/@aws-amplify/core/dist/esm/clients/handlers/fetch.mjs","./node_modules/@aws-amplify/core/dist/esm/clients/handlers/unauthenticated.mjs","./node_modules/@aws-amplify/core/dist/esm/clients/middleware/userAgent/middleware.mjs","./node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs","./node_modules/@aws-amplify/core/dist/esm/clients/middleware/retry/isClockSkewError.mjs","./node_modules/@aws-amplify/core/dist/esm/clients/middleware/retry/defaultRetryDecider.mjs","./node_modules/@aws-amplify/core/dist/esm/clients/middleware/retry/jitteredBackoff.mjs","./node_modules/@aws-amplify/core/dist/esm/utils/retry/jitteredBackoff.mjs","./node_modules/@aws-amplify/core/dist/esm/utils/retry/constants.mjs","./node_modules/@aws-amplify/core/dist/esm/Platform/types.mjs","./node_modules/@aws-amplify/core/dist/esm/Platform/version.mjs","./node_modules/@aws-amplify/core/dist/esm/Platform/detection/helpers.mjs","./node_modules/@aws-amplify/core/dist/esm/Platform/detection/index.mjs","./node_modules/@aws-amplify/core/dist/esm/Platform/detection/Expo.mjs","./node_modules/@aws-amplify/core/dist/esm/Platform/detection/ReactNative.mjs","./node_modules/@aws-amplify/core/dist/esm/Platform/detection/Next.mjs","./node_modules/@aws-amplify/core/dist/esm/Platform/detection/Nuxt.mjs","./node_modules/@aws-amplify/core/dist/esm/Platform/detection/Angular.mjs","./node_modules/@aws-amplify/core/dist/esm/Platform/detection/React.mjs","./node_modules/@aws-amplify/core/dist/esm/Platform/detection/Vue.mjs","./node_modules/@aws-amplify/core/dist/esm/Platform/detection/Svelte.mjs","./node_modules/@aws-amplify/core/dist/esm/Platform/detection/Web.mjs","./node_modules/@aws-amplify/core/dist/esm/Platform/detectFramework.mjs","./node_modules/@aws-amplify/core/dist/esm/Platform/customUserAgent.mjs","./node_modules/@aws-amplify/core/dist/esm/Platform/index.mjs","./node_modules/@aws-amplify/auth/dist/esm/foundation/constants.mjs","./node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs","./node_modules/@aws-amplify/core/dist/esm/utils/amplifyUrl/index.mjs","./node_modules/@aws-amplify/core/dist/esm/clients/endpoints/partitions.mjs","./node_modules/@aws-amplify/core/dist/esm/clients/endpoints/getDnsSuffix.mjs","./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/factories/createCognitoUserPoolEndpointResolver.mjs","./node_modules/@aws-amplify/auth/dist/esm/foundation/cognitoUserPoolEndpointResolver.mjs","./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/refreshAuthTokens.mjs","./node_modules/@aws-amplify/core/dist/esm/utils/deDupeAsyncFunction.mjs","./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/userContextData.mjs","./node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createInitiateAuthClient.mjs","./node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/shared/serde/createUserPoolSerializer.mjs","./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/tokenProvider/types.mjs","./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/tokenProvider/errorHelpers.mjs","./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/tokenProvider/constants.mjs","./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/tokenProvider/TokenStore.mjs","./node_modules/@aws-amplify/core/dist/esm/utils/isTokenExpired.mjs","./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/signInWithRedirectStore.mjs","./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/oAuthStore.mjs","./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/inflightPromise.mjs","./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/tokenProvider/TokenOrchestrator.mjs","./node_modules/@aws-amplify/core/dist/esm/utils/isBrowser.mjs","./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/tokenProvider/tokenProvider.mjs","./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/tokenProvider/CognitoUserPoolsTokenProvider.mjs","./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/credentialsProvider/types.mjs","./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/credentialsProvider/IdentityIdStore.mjs","./node_modules/@aws-amplify/core/dist/esm/awsClients/cognitoIdentity/base.mjs","./node_modules/@aws-amplify/core/dist/esm/awsClients/cognitoIdentity/getCredentialsForIdentity.mjs","./node_modules/@aws-amplify/core/dist/esm/awsClients/cognitoIdentity/getId.mjs","./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/credentialsProvider/utils.mjs","./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/credentialsProvider/IdentityIdProvider.mjs","./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/credentialsProvider/credentialsProvider.mjs","./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/credentialsProvider/index.mjs","./node_modules/aws-amplify/dist/esm/initSingleton.mjs","./node_modules/@sentry/core/build/esm/utils-hoist/buildPolyfills/_optionalChain.js","./node_modules/@sentry/core/build/esm/utils/isSentryRequestUrl.js","./node_modules/@sentry/core/build/esm/utils-hoist/isBrowser.js","./node_modules/@sentry/core/build/esm/utils-hoist/node.js","./node_modules/@sentry-internal/replay/build/npm/esm/index.js","./node_modules/@sentry/core/build/esm/utils-hoist/buildPolyfills/_nullishCoalesce.js","./node_modules/@sentry/integrations/node_modules/@sentry/core/esm/integration.js","./node_modules/@sentry/utils/esm/is.js","./node_modules/@sentry/utils/esm/worldwide.js","./node_modules/@sentry/utils/esm/browser.js","./node_modules/@sentry/utils/esm/debug-build.js","./node_modules/@sentry/utils/esm/logger.js","./node_modules/@sentry/utils/esm/object.js","./node_modules/@sentry/utils/esm/stacktrace.js","./node_modules/@sentry/utils/esm/normalize.js","./node_modules/@sentry/utils/esm/memo.js","./node_modules/@sentry/integrations/esm/debug-build.js","./node_modules/@sentry/integrations/esm/extraerrordata.js","./node_modules/@sentry/integrations/esm/debug.js","./node_modules/@sentry/utils/esm/misc.js","./node_modules/@sentry/utils/esm/time.js","./node_modules/@sentry/integrations/node_modules/@sentry/core/esm/constants.js","./node_modules/@sentry/integrations/node_modules/@sentry/core/esm/debug-build.js","./node_modules/@sentry/utils/esm/syncpromise.js","./node_modules/@sentry/integrations/node_modules/@sentry/core/esm/eventProcessors.js","./node_modules/@sentry/integrations/node_modules/@sentry/core/esm/session.js","./node_modules/@sentry/integrations/node_modules/@sentry/core/esm/utils/getRootSpan.js","./node_modules/@sentry/integrations/node_modules/@sentry/core/esm/utils/spanUtils.js","./node_modules/@sentry/integrations/node_modules/@sentry/core/esm/tracing/dynamicSamplingContext.js","./node_modules/@sentry/integrations/node_modules/@sentry/core/esm/exports.js","./node_modules/@sentry/integrations/node_modules/@sentry/core/esm/scope.js","./node_modules/@sentry/integrations/node_modules/@sentry/core/esm/utils/applyScopeDataToEvent.js","./node_modules/@sentry/integrations/node_modules/@sentry/core/esm/hub.js","./node_modules/@sentry/integrations/node_modules/@sentry/core/esm/version.js","./node_modules/@sentry/integrations/node_modules/@sentry/core/esm/utils/isSentryRequestUrl.js","./node_modules/@sentry/utils/esm/supports.js","./node_modules/@sentry/utils/esm/instrument/_handlers.js","./node_modules/@sentry/utils/esm/instrument/fetch.js","./node_modules/@sentry/utils/esm/instrument/xhr.js","./node_modules/@sentry/integrations/esm/httpclient.js","./apps/desktop/src/main.ts","./libs/micro/core/lib-config/src/lib/performance/performance-tracking.config.ts","./node_modules/@sentry/core/build/esm/getCurrentHubShim.js","./node_modules/moment/locale/de-at.js","./libs/micro-ui/template/page/src/lib/util/page-transition/page-transition.animations.ts","./libs/micro-ui/template/page/src/lib/util/page-transition/page-transition.component.ts","./node_modules/@aws-amplify/core/dist/esm/Hub/index.mjs","./libs/desktop/data-access/core-services/src/lib/FeatureFlag/feature-flag.service.ts","./node_modules/rxjs/dist/esm/internal/observable/interval.js","./node_modules/@sentry/core/build/esm/utils-hoist/baggage.js","./node_modules/moment/locale/gd.js","./node_modules/moment/locale/ar-sa.js","./node_modules/rxjs/dist/esm/internal/util/isReadableStreamLike.js","./libs/micro-ui/molecule/src/lib/header/default/header-default.component.html","./libs/micro-ui/molecule/src/lib/header/default/header-default.component.ts","./node_modules/moment/locale/el.js","./libs/brightside-ui/src/lib/spinner/spinner.component.ts","./libs/brightside-ui/src/lib/spinner/spinner.component.html","./libs/brightside-ui/src/lib/utils/ngx-mask/mask-applier.service.ts","./libs/desktop/data-access/savings/src/lib/savings-account.service.ts","./node_modules/moment/locale/gl.js","./node_modules/rxjs/dist/esm/internal/scheduler/Action.js","./node_modules/rxjs/dist/esm/internal/scheduler/intervalProvider.js","./node_modules/rxjs/dist/esm/internal/scheduler/AsyncAction.js","./node_modules/rxjs/dist/esm/internal/ReplaySubject.js","./node_modules/moment/locale/hr.js","./libs/micro-ui/molecule/src/lib/shared/base-data/base-data-molecule.component.ts","./node_modules/moment/locale/tl-ph.js","./node_modules/rxjs/dist/esm/internal/scheduler/dateTimestampProvider.js","./libs/brightside-ui/src/lib/radio/radio.component.html","./libs/brightside-ui/src/lib/radio/radio.component.ts","./libs/micro-ui/molecule/src/lib/micro-ui-molecule.module.ts","./node_modules/moment/locale/hu.js","./node_modules/@sentry/core/build/esm/utils/hasTracingEnabled.js","./node_modules/moment/locale/zh-tw.js","./node_modules/moment/locale/ko.js","./node_modules/moment/locale/ar-ps.js","./node_modules/rxjs/dist/esm/internal/Scheduler.js","./node_modules/rxjs/dist/esm/internal/scheduler/AsyncScheduler.js","./node_modules/rxjs/dist/esm/internal/observable/empty.js","./node_modules/rxjs/dist/esm/internal/operators/concatMap.js","./node_modules/rxjs/dist/esm/internal/symbol/observable.js","./node_modules/moment/locale/ sync ^\\.\\/.*$","./node_modules/rxjs/dist/esm/internal/util/createObject.js","./node_modules/rxjs/dist/esm/internal/operators/debounceTime.js","./node_modules/moment/locale/fil.js","./node_modules/moment/locale/ur.js","./node_modules/@firebase/analytics/dist/esm/index.esm2017.js","./node_modules/moment/locale/fy.js","./node_modules/moment/locale/de.js","./node_modules/rxjs/dist/esm/internal/observable/innerFrom.js","./libs/shared/desktop/src/lib/new-feature-flag.directive.ts","./node_modules/moment/locale/bn-bd.js","./node_modules/stacktrace-gps/stacktrace-gps.js","./node_modules/moment/locale/sv.js","./node_modules/moment/locale/en-ca.js","./node_modules/moment/locale/nl-be.js","./node_modules/stacktrace-gps/node_modules/source-map/lib/quick-sort.js","./node_modules/moment/locale/bn.js","./node_modules/moment/locale/zh-mo.js","./node_modules/rxjs/dist/esm/internal/util/noop.js","./node_modules/@sentry/core/build/esm/exports.js","./node_modules/moment-business-days/index.js","./node_modules/rxjs/dist/esm/internal/operators/startWith.js","./libs/brightside-ui-services/src/lib/toast.model.ts","./node_modules/moment/locale/kk.js","./node_modules/@angular/animations/fesm2020/animations.mjs","./node_modules/ngx-ui-switch/fesm2020/ngx-ui-switch.mjs","./node_modules/moment/locale/hi.js","./node_modules/rxjs/dist/esm/internal/util/isInteropObservable.js","./libs/shared/desktop/src/lib/timeout.directive.ts","./node_modules/moment/locale/tlh.js","./node_modules/stack-generator/stack-generator.js","./node_modules/@amplitude/ua-parser-js/src/ua-parser.js","./libs/desktop/feature/financial-accounts-core/src/lib/models/financial-account-models.ts","./libs/desktop/feature/financial-accounts-core/src/lib/services/financial-accounts-creation.service.ts","./libs/desktop/feature/financial-accounts-core/src/lib/financial-account-creation-waiting/financial-account-creation-waiting.component.ts","./libs/desktop/feature/financial-accounts-core/src/lib/financial-account-creation-waiting/financial-account-creation-waiting.component.html","./libs/desktop/feature/financial-accounts-core/src/lib/financial-accounts-core-main/financial-accounts-core-main.component.ts","./libs/desktop/feature/financial-accounts-core/src/lib/financial-accounts-core-main/financial-accounts-core-main.component.html","./libs/desktop/feature/financial-accounts-core/src/lib/services/financial-accounts-core.service.ts","./libs/desktop/feature/financial-accounts-core/src/lib/services/socure.service.ts","./libs/desktop/feature/financial-accounts-core/src/lib/desktop-feature-financial-accounts-core.module.ts","./libs/desktop/feature/financial-accounts-core/src/lib/financial-account-creation-error/financial-account-creation-error.component.ts","./libs/desktop/feature/financial-accounts-core/src/lib/financial-account-creation-error/financial-account-creation-error.component.html","./libs/desktop/feature/financial-accounts-core/src/lib/financial-account-creation-guard.service.ts","./libs/desktop/feature/financial-accounts-core/src/lib/socure/socure.component.html","./libs/desktop/feature/financial-accounts-core/src/lib/socure/socure.component.ts","./libs/desktop/feature/financial-accounts-core/src/lib/services/financial-accounts-history.service.ts","./libs/desktop/feature/financial-accounts-core/src/lib/services/financial-accounts-statements.service.ts","./libs/desktop/feature/financial-accounts-core/src/lib/kyc-verification-in-progress/kyc-verification-in-progress.component.ts","./libs/desktop/feature/financial-accounts-core/src/lib/kyc-verification-in-progress/kyc-verification-in-progress.component.html","./node_modules/moment/locale/ar.js","./node_modules/fast-deep-equal/index.js","./node_modules/@aws-amplify/core/dist/esm/storage/utils.mjs","./node_modules/moment/locale/mi.js","./node_modules/moment/locale/uz-latn.js","./node_modules/moment/locale/te.js","./libs/brightside-ui/src/lib/avatar/avatar.component.html","./libs/brightside-ui/src/lib/avatar/avatar.component.ts","./libs/shared/desktop/src/lib/display-cards/display-cards.component.html","./libs/shared/desktop/src/lib/display-cards/display-cards.component.ts","./node_modules/moment/locale/he.js","./node_modules/moment/locale/ga.js","./node_modules/moment/locale/de-ch.js","./node_modules/moment/locale/sd.js","./node_modules/rxjs/dist/esm/internal/operators/refCount.js","./node_modules/rxjs/dist/esm/internal/observable/ConnectableObservable.js","./node_modules/rxjs/dist/esm/internal/operators/takeLast.js","./node_modules/rxjs/dist/esm/internal/operators/last.js","./node_modules/rxjs/dist/esm/internal/operators/finalize.js","./node_modules/@angular/router/fesm2020/router.mjs","./node_modules/moment/locale/tk.js","./node_modules/moment/locale/lv.js","./node_modules/@firebase/installations/dist/esm/index.esm2017.js","./node_modules/moment/locale/pl.js","./node_modules/moment/locale/lt.js","./node_modules/rxjs/dist/esm/internal/firstValueFrom.js","./node_modules/moment/locale/pt-br.js","./libs/desktop/data-access/core-services/src/lib/GlobalModal/simple-global-modal.service.ts","./libs/desktop/feature/language-selection/src/lib/language-selector.service.ts","./node_modules/@angular/common/fesm2020/http.mjs","./node_modules/rxjs/dist/esm/internal/observable/fromEvent.js","./node_modules/rxjs/dist/esm/internal/NotificationFactories.js","./node_modules/rxjs/dist/esm/internal/Subscriber.js","./node_modules/moment/locale/en-in.js","./libs/brightside-ui/src/lib/typography/caption/caption.component.ts","./libs/brightside-ui/src/lib/typography/caption/caption.component.html","./node_modules/moment/locale/yo.js","./node_modules/moment/locale/lo.js","./node_modules/moment/locale/jv.js","./node_modules/moment/locale/be.js","./node_modules/moment/locale/my.js","./libs/brightside-ui/src/lib/back/back.component.ts","./libs/brightside-ui/src/lib/back/back.component.html","./node_modules/rxjs/dist/esm/internal/operators/shareReplay.js","./node_modules/@sentry/core/build/esm/scope.js","./node_modules/@sentry/core/build/esm/utils-hoist/worldwide.js","./node_modules/moment/locale/it-ch.js","./node_modules/rxjs/dist/esm/internal/util/argsArgArrayOrObject.js","./node_modules/@sentry/core/build/esm/utils/merge.js","./node_modules/moment/locale/tg.js","./node_modules/moment/locale/fr.js","./node_modules/moment/locale/uk.js","./libs/brightside-ui/src/lib/steps/steps.component.html","./libs/brightside-ui/src/lib/steps/steps.component.ts","./libs/shared/desktop/src/lib/waiting/waiting.component.html","./libs/shared/desktop/src/lib/waiting/waiting.component.ts","./node_modules/@aws-amplify/core/dist/esm/storage/InMemoryStorage.mjs","./node_modules/rxjs/dist/esm/internal/operators/takeWhile.js","./node_modules/moment/locale/ka.js","./node_modules/moment/locale/en-nz.js","./node_modules/rxjs/dist/esm/internal/operators/tap.js","./node_modules/rxjs/dist/esm/internal/operators/subscribeOn.js","./node_modules/rxjs/dist/esm/internal/scheduled/scheduleAsyncIterable.js","./node_modules/rxjs/dist/esm/internal/observable/from.js","./node_modules/rxjs/dist/esm/internal/scheduled/scheduled.js","./node_modules/rxjs/dist/esm/internal/scheduled/scheduleObservable.js","./node_modules/rxjs/dist/esm/internal/scheduled/scheduleArray.js","./node_modules/rxjs/dist/esm/internal/scheduled/schedulePromise.js","./node_modules/rxjs/dist/esm/internal/scheduled/scheduleIterable.js","./node_modules/rxjs/dist/esm/internal/scheduled/scheduleReadableStreamLike.js","./node_modules/moment/locale/sr.js","./libs/shared/desktop/src/lib/phone.pipe.ts","./node_modules/moment/locale/oc-lnc.js","./node_modules/@sentry/core/build/esm/constants.js","./libs/shared/desktop/src/lib/call-fa/call-fa.component.html","./libs/shared/desktop/src/lib/call-fa/call-fa.component.ts","./node_modules/@angular/core/fesm2020/core.mjs","./libs/shared/desktop/src/lib/display-questions/display-questions.component.html","./libs/shared/desktop/src/lib/display-questions/display-questions.component.ts","./node_modules/stackframe/stackframe.js","./node_modules/moment/locale/es-us.js","./libs/micro-ui/molecule/src/lib/navigation/exit/close/exit-close.component.ts","./libs/micro-ui/molecule/src/lib/navigation/exit/close/exit-close.component.html","./node_modules/rxjs/dist/esm/internal/operators/throttle.js","./node_modules/rxjs/dist/esm/internal/operators/throttleTime.js","./node_modules/moment/locale/ss.js","./node_modules/@sentry/core/build/esm/utils-hoist/is.js","./node_modules/rxjs/dist/esm/internal/operators/scan.js","./node_modules/rxjs/dist/esm/internal/operators/scanInternals.js","./libs/brightside-ui/src/lib/button/button.component.html","./libs/brightside-ui/src/lib/button/button.component.ts","./node_modules/rxjs/dist/esm/internal/util/pipe.js","./libs/desktop/data-access/credit/src/lib/credit.service.ts","./node_modules/@firebase/logger/dist/esm/index.esm2017.js","./node_modules/moment/locale/sl.js","./libs/shared/desktop/src/lib/feature-flag.directive.ts","./libs/shared/legal-documents/src/lib/shared-legal-documents.module.ts","./libs/shared/legal-documents/src/lib/has-legal-docs.guard.ts","./libs/brightside-ui/src/lib/brightside-ui.module.ts","./node_modules/rxjs/dist/esm/internal/operators/distinctUntilChanged.js","./node_modules/moment/locale/gom-latn.js","./node_modules/stacktrace-gps/node_modules/source-map/lib/binary-search.js","./node_modules/moment/locale/ar-ma.js","./node_modules/rxjs/dist/esm/internal/util/lift.js","./node_modules/moment/locale/fa.js","./libs/shared/mobile/src/lib/shared-mobile.module.ts","./node_modules/moment/locale/mt.js","./node_modules/libphonenumber-js/metadata.mobile.json.js","./node_modules/libphonenumber-js/es6/helpers/isObject.js","./node_modules/libphonenumber-js/es6/normalizeArguments.js","./node_modules/libphonenumber-js/es6/constants.js","./node_modules/libphonenumber-js/es6/ParseError.js","./node_modules/libphonenumber-js/es6/tools/semver-compare.js","./node_modules/libphonenumber-js/es6/metadata.js","./node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js","./node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.js","./node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.js","./node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js","./node_modules/libphonenumber-js/es6/helpers/mergeArrays.js","./node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js","./node_modules/libphonenumber-js/es6/isPossible.js","./node_modules/libphonenumber-js/es6/helpers/matchesEntirely.js","./node_modules/libphonenumber-js/es6/helpers/getNumberType.js","./node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js","./node_modules/libphonenumber-js/es6/helpers/getIddPrefix.js","./node_modules/libphonenumber-js/es6/format.js","./node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js","./node_modules/libphonenumber-js/es6/PhoneNumber.js","./node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js","./node_modules/libphonenumber-js/es6/isValid.js","./node_modules/libphonenumber-js/es6/helpers/RFC3966.js","./node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.js","./node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.js","./node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js","./node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js","./node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js","./node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.js","./node_modules/libphonenumber-js/es6/parse.js","./node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js","./node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.js","./node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js","./node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.js","./node_modules/libphonenumber-js/es6/parsePhoneNumber_.js","./node_modules/libphonenumber-js/es6/parsePhoneNumber.js","./libs/brightside-ui/src/lib/input/phone-form/phone-form.component.html","./libs/brightside-ui/src/lib/input/phone-form/phone-form.component.ts","./node_modules/libphonenumber-js/mobile/exports/parsePhoneNumber.js","./node_modules/libphonenumber-js/mobile/exports/withMetadataArgument.js","./node_modules/moment/locale/es.js","./libs/shared/desktop/src/lib/product-eligibility/product-eligibility.component.html","./libs/shared/desktop/src/lib/product-eligibility/product-eligibility.component.ts","./libs/desktop/data-access/core-services/src/lib/API/bs-api.service.ts","./node_modules/rxjs/dist/esm/internal/util/EmptyError.js","./node_modules/ngx-select-dropdown/fesm2015/ngx-select-dropdown.js","./node_modules/moment/locale/gom-deva.js","./libs/brightside-ui/src/lib/survey-selector/survey-selector.component.html","./libs/brightside-ui/src/lib/survey-selector/survey-selector.component.ts","./node_modules/moment/locale/mk.js","./node_modules/@sentry/core/build/esm/utils-hoist/version.js","./node_modules/moment/locale/en-sg.js","./node_modules/moment/locale/vi.js","./libs/shared/desktop/src/lib/display-loader/display-loader.component.ts","./libs/shared/desktop/src/lib/display-loader/display-loader.component.html","./libs/brightside-ui/src/lib/currency-select/new-currency-select.component.html","./libs/brightside-ui/src/lib/currency-select/new-currency-select.component.ts","./node_modules/moment/locale/se.js","./node_modules/moment/locale/ar-kw.js","./libs/shared/desktop/src/lib/sequential-guard.ts","./libs/shared/desktop/src/lib/auth.guard.ts","./libs/shared/desktop/src/lib/no-auth.guard.ts","./libs/shared/desktop/src/lib/requiredVerification.guard.ts","./libs/shared/desktop/src/lib/onboarding-complete.guard.ts","./libs/shared/desktop/src/lib/product-verification.guard.ts","./libs/shared/desktop/src/lib/guid.guard.ts","./libs/shared/desktop/src/lib/referral.guard.ts","./libs/shared/desktop/src/lib/identity.guard.ts","./libs/shared/desktop/src/lib/error.handler.ts","./libs/shared/desktop/src/lib/display-form/validators/validators.ts","./libs/shared/desktop/src/lib/display-form/controls/controls.ts","./libs/shared/desktop/src/lib/display-form/controls/unique-id.ts","./libs/shared/desktop/src/lib/household-invite.guard.ts","./libs/shared/desktop/src/lib/generic-modal/generic-modal.component.html","./libs/shared/desktop/src/lib/generic-modal/generic-modal.component.ts","./libs/shared/desktop/src/lib/desktop-card/desktop-card.component.html","./libs/shared/desktop/src/lib/desktop-card/desktop-card.component.ts","./libs/shared/desktop/src/lib/gen-cell-value.pipe.ts","./libs/shared/desktop/src/lib/shared-desktop.module.ts","./libs/shared/desktop/src/lib/desktop-cards/desktop-cards.component.html","./libs/shared/desktop/src/lib/desktop-cards/desktop-cards.component.ts","./libs/micro-ui/molecule/src/lib/navigation/navigation.enum.ts","./libs/brightside-ui/src/lib/input/currency-input/currency-input.component.html","./libs/brightside-ui/src/lib/input/currency-input/currency-input.component.ts","./libs/micro/core/environment/src/lib/models/environment.interface.ts","./libs/micro-ui/molecule/src/lib/header/eyebrow/header-eyebrow.component.html","./libs/micro-ui/molecule/src/lib/header/eyebrow/header-eyebrow.component.ts","./node_modules/moment/locale/ja.js","./node_modules/moment/locale/pt.js","./node_modules/rxjs/dist/esm/internal/util/isScheduler.js","./libs/desktop/data-access/shared/src/lib/desktop-data-access-shared.module.ts","./libs/desktop/data-access/shared/src/lib/api-cache.service.ts","./libs/desktop/data-access/shared/src/lib/support.service.ts","./libs/desktop/data-access/shared/src/lib/amplitude.service.ts","./libs/desktop/data-access/shared/src/lib/firebase.service.ts","./libs/desktop/data-access/shared/src/lib/auth.service.ts","./libs/desktop/data-access/shared/src/lib/api-enums.ts","./libs/desktop/data-access/shared/src/lib/api-contracts.ts","./libs/desktop/data-access/shared/src/lib/terms.service.ts","./libs/desktop/data-access/shared/src/lib/notification.service.ts","./libs/desktop/data-access/shared/src/lib/mobile-state.service.ts","./libs/desktop/data-access/shared/src/lib/firebase.analytics.service.ts","./libs/desktop/data-access/shared/src/lib/required-verification.service.ts","./libs/desktop/data-access/shared/src/lib/modal.service.ts","./libs/desktop/data-access/shared/src/lib/profile.service.ts","./libs/desktop/data-access/shared/src/lib/static-utility.ts","./libs/desktop/data-access/shared/src/lib/invite.service.ts","./libs/desktop/data-access/shared/src/lib/campaign-routing.service.ts","./libs/desktop/data-access/shared/src/lib/topic-routing.service.ts","./libs/desktop/data-access/shared/src/lib/find-money-routing.service.ts","./libs/desktop/data-access/shared/src/lib/internal-link-routing.service.ts","./libs/desktop/data-access/shared/src/lib/company.service.ts","./libs/desktop/data-access/shared/src/lib/brightside-translate.service.ts","./libs/desktop/data-access/shared/src/lib/product-eligibility.service.ts","./libs/desktop/data-access/shared/src/lib/global-modal.service.ts","./libs/desktop/data-access/shared/src/lib/verification-status.service.ts","./libs/desktop/data-access/shared/src/lib/status-notifications.service.ts","./libs/desktop/data-access/shared/src/lib/client-confirmation.service.ts","./libs/desktop/data-access/shared/src/lib/cache-storage.service.ts","./libs/desktop/data-access/shared/src/lib/feature-flags.ts","./libs/desktop/data-access/shared/src/lib/survey-routing.service.ts","./apps/desktop/src/app/routing.service.ts","./libs/micro/core/utility/src/lib/class-extend/logger.extend.ts","./libs/micro/core/utility/src/lib/tracking/amplitude.service.ts","./libs/micro/core/utility/src/lib/logging-client.service.ts","./libs/micro/core/utility/src/lib/api/api-cache.service.ts","./libs/micro/core/utility/src/lib/remote-config.service.ts","./libs/micro/core/utility/src/lib/permission-product.service.ts","./libs/micro/core/utility/src/lib/micro-core-utility.module.ts","./libs/micro/core/utility/src/lib/deep-merge.ts","./libs/micro/core/utility/src/lib/routing.service.ts","./libs/micro/core/utility/src/lib/translation.service.ts","./libs/micro/core/utility/src/lib/tracking/firebase.service.ts","./node_modules/moment/locale/es-do.js","./node_modules/stacktrace-gps/node_modules/source-map/lib/mapping-list.js","./node_modules/moment/locale/bo.js","./node_modules/@aws-amplify/core/dist/esm/storage/KeyValueStorage.mjs","./node_modules/lottie-web/build/player/lottie.js","./node_modules/rxjs/dist/esm/internal/util/mapOneOrManyArgs.js","./node_modules/firebase/app/dist/esm/index.esm.js","./node_modules/moment/locale/tet.js","./libs/brightside-ui/src/lib/utils/text-color.directive.ts","./node_modules/moment/locale/id.js","./node_modules/rxjs/dist/esm/internal/observable/timer.js","./node_modules/rxjs/dist/esm/internal/util/isDate.js","./libs/shared/desktop/src/lib/forms/eligibility-check/eligibility-check.component.html","./libs/shared/desktop/src/lib/forms/eligibility-check/eligibility-check.component.ts","./libs/desktop/data-access/core-services/src/lib/desktop-data-access-core-services.module.ts","./libs/desktop/data-access/core-services/src/lib/FeatureFlag/feature-flag-kill-switch.guard.ts","./libs/desktop/data-access/core-services/src/lib/Auth/bs-auth.service.ts","./libs/desktop/data-access/core-services/src/lib/AWS-API/aws-api-wrapper.service.ts","./libs/desktop/data-access/core-services/src/lib/Logger/bs-logger.service.ts","./libs/desktop/data-access/core-services/src/lib/Chat/bs-chat.service.ts","./node_modules/moment/locale/ta.js","./libs/shared/mobile/src/lib/mobile-app-modal/mobile-app-modal.component.ts","./libs/shared/mobile/src/lib/mobile-app-modal/mobile-app-modal.component.html","./node_modules/rxjs/dist/esm/internal/operators/mergeAll.js","./node_modules/@firebase/component/dist/esm/index.esm2017.js","./node_modules/rxjs/dist/esm/internal/operators/takeUntil.js","./node_modules/rxjs/dist/esm/internal/observable/merge.js","./node_modules/rxjs/dist/esm/internal/operators/share.js","./node_modules/@sentry/core/build/esm/tracing/spanstatus.js","./node_modules/@sentry/core/build/esm/utils-hoist/propagationContext.js","./node_modules/moment/locale/fr-ca.js","./node_modules/moment/locale/si.js","./node_modules/stacktrace-gps/node_modules/source-map/lib/array-set.js","./node_modules/rxjs/dist/esm/internal/util/throwUnobservableError.js","./libs/shared/desktop/src/lib/safe.pipe.ts","./libs/micro-ui/template/page/src/lib/util/page-transition/page-transition.service.ts","./node_modules/rxjs/dist/esm/internal/operators/throwIfEmpty.js","./node_modules/moment/locale/ro.js","./libs/brightside-ui/src/lib/survey-selector/survey-selector.model.ts","./node_modules/moment/locale/br.js","./node_modules/moment/locale/nn.js","./node_modules/rxjs/dist/esm/internal/observable/throwError.js","./libs/brightside-ui/src/lib/video/video.component.html","./libs/brightside-ui/src/lib/video/video.component.ts","./node_modules/@sentry/core/build/esm/utils-hoist/browser.js","./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","./libs/micro/core/utility/src/lib/tracking/firebase-abstract.service.ts","./node_modules/ngx-currency/fesm2015/ngx-currency.js","./node_modules/moment/locale/tzm.js","./libs/brightside-ui/src/lib/utils/ngx-mask/config.ts","./node_modules/stacktrace-gps/node_modules/source-map/source-map.js","./node_modules/@aws-amplify/core/dist/esm/errors/AmplifyError.mjs","./node_modules/moment/locale/ky.js","./node_modules/moment/locale/tr.js","./node_modules/rxjs/dist/esm/internal/operators/observeOn.js","./node_modules/@firebase/remote-config/dist/esm/index.esm2017.js","./node_modules/moment/locale/sw.js","./node_modules/rxjs/dist/esm/internal/util/reportUnhandledError.js","./libs/brightside-ui/src/lib/action-details-card/action-details-card.component.html","./libs/brightside-ui/src/lib/action-details-card/action-details-card.component.ts","./libs/desktop/feature/external-lenders/src/lib/external-lenders-intro/external-lenders-intro.component.html","./libs/desktop/feature/external-lenders/src/lib/external-lenders-intro/external-lenders-intro.component.ts","./libs/desktop/feature/external-lenders/src/lib/external-lenders-partner/external-lenders-partner.component.html","./libs/desktop/feature/external-lenders/src/lib/external-lenders-partner/external-lenders-partner.component.ts","./libs/desktop/feature/external-lenders/src/lib/desktop-feature-external-lenders.module.ts","./libs/desktop/feature/external-lenders/src/lib/external-lenders.guard.ts","./node_modules/@sentry/core/build/esm/debug-build.js","./libs/shared/legal-documents/src/lib/legal-documents.service.ts","./node_modules/moment/locale/af.js","./node_modules/ng-intercom/fesm2015/ng-intercom.js","./node_modules/@sentry/core/build/esm/tracing/dynamicSamplingContext.js","./libs/brightside-ui-services/src/lib/toast.service.ts","./node_modules/moment/locale/ug-cn.js","./node_modules/moment/locale/ar-dz.js","./node_modules/rxjs/dist/esm/internal/scheduler/animationFrameProvider.js","./node_modules/rxjs/dist/esm/internal/scheduler/animationFrame.js","./node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameScheduler.js","./node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameAction.js","./node_modules/ngx-lottie/fesm2020/ngx-lottie.mjs","./libs/micro/core/message-bus/src/lib/models/message-bus.enum.ts","./libs/micro/core/message-bus/src/lib/service/platform/platform-base.service.ts","./libs/micro/core/message-bus/src/lib/service/platform/platform-android.service.ts","./libs/micro/core/message-bus/src/lib/service/platform/platform-ios.service.ts","./libs/micro/core/message-bus/src/lib/service/message-bus-base.service.ts","./libs/micro/core/message-bus/src/lib/service/platform/platform-browser.service.ts","./libs/micro/core/message-bus/src/lib/internal/message-bus-internal.service.ts","./libs/micro/core/message-bus/src/lib/incoming/message-bus-incoming.service.ts","./libs/micro/core/chat/src/lib/chat.service.ts","./libs/micro/core/message-bus/src/lib/native-window/message-bus-native-window.reference.ts","./libs/micro/core/message-bus/src/lib/outgoing/message-bus-outgoing.service.ts","./libs/micro/core/message-bus/src/lib/micro-message-bus.module.ts","./libs/micro/core/message-bus/src/lib/models/event/halfsheet-event.enum.ts","./libs/micro/core/message-bus/src/lib/event/standard-events.ts","./libs/micro/core/message-bus/src/lib/event/builder/route-builder.event.ts","./libs/micro/core/message-bus/src/lib/event/builder/halfsheet-builder.event.ts","./libs/micro/core/message-bus/src/lib/util/event.util.ts","./libs/micro/core/message-bus/src/lib/util/this-or-that.util.ts","./node_modules/moment/locale/ms-my.js","./libs/desktop/feature/language-selection/src/lib/language-selector/language-selector.component.html","./libs/desktop/feature/language-selection/src/lib/language-selector/language-selector.component.ts","./libs/shared/desktop/src/lib/month-name.pipe.ts","./node_modules/moment/locale/hy-am.js","./node_modules/moment/locale/lb.js","./node_modules/rxjs/dist/esm/internal/util/executeSchedule.js","./node_modules/@sentry/core/build/esm/semanticAttributes.js","./libs/brightside-ui/src/lib/typography/typography/typography.component.ts","./libs/brightside-ui/src/lib/typography/typography/typography.component.html","./node_modules/moment/locale/ru.js","./node_modules/moment/locale/nb.js","./node_modules/moment/locale/ar-tn.js","./node_modules/@sentry/core/build/esm/currentScopes.js"],"sourcesContent":["import { config } from '../config';\nlet context = null;\nexport function errorContext(cb) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n const isRoot = !context;\n if (isRoot) {\n context = { errorThrown: false, error: null };\n }\n cb();\n if (isRoot) {\n const { errorThrown, error } = context;\n context = null;\n if (errorThrown) {\n throw error;\n }\n }\n }\n else {\n cb();\n }\n}\nexport function captureError(err) {\n if (config.useDeprecatedSynchronousErrorHandling && context) {\n context.errorThrown = true;\n context.error = err;\n }\n}\n","
\n \n \n \n \n \n\n
\n {{ config.pageTitleKey || config.pageTitle | translate }}\n
\n\n
\n

\n {{ config.pageSubTitleKey || config.pageSubTitle | translate }}\n

\n\n
\n
\n 1\n }\"\n >\n \n \n \n \n \n \n {{ controlConfig.inputOptions?.link.textKey || controlConfig.inputOptions?.link.text || '' | translate }}\n \n
\n
\n \n\n\n
\n\n
\n \n {{ config.pageCtaLabelKey || config.pageCtaLabel | translate }}\n \n\n \n {{\n config.pageSecondaryCtaLabel | translate\n }}\n \n
\n \n\n\n\n {{ processErrorMessageTitle | translate }}\n
\n {{ processErrorMessage | translate }}\n
\n \n
\n","import { Component, OnInit, OnDestroy, Injector, ChangeDetectorRef } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { FormGroup, FormControl } from '@angular/forms';\nimport { RoutingStateService, ToastService } from '@brightside/brightside-ui-services';\n\nimport { Observable } from 'rxjs';\nimport { take } from 'rxjs/operators';\n\nimport { DisplayFormControlConfig } from './controls/controls';\nimport { Settings, AnalyticsAttributesV4 } from '@brightside-web/desktop/data-access/shared';\nimport { TranslatePipe, TranslateService } from '@ngx-translate/core';\nimport {\n IsRunningIOS,\n IsRunningAndroid,\n MessageBusInternalService,\n MessageBusOutgoingEventKey\n} from \"@micro-core/message-bus\";\n\n\ninterface DisplayFormPatchValues {\n [key: string]: string | number;\n}\n\nexport class DisplayFormAnalytics {\n shown: AnalyticsAttributesV4;\n dismiss: AnalyticsAttributesV4;\n submit: AnalyticsAttributesV4;\n}\n\nexport class DisplayFormSettings extends Settings {\n constructor(config: any = {}) {\n super(config);\n\n this.pageFormControlFullWidth = config.pageFormControlFullWidth || false;\n this.pageFormControls = config.pageFormControls || [];\n this.pageFormControlsTitle = config.pageFormControlsTitle || '';\n this.pageFormControlsTitleKey = config.pageFormControlsTitleKey || '';\n\n this.processSecondaryEvent = config.processSecondaryEvent || null;\n this.processUpdater = config.processUpdater || null;\n this.checkPageFormForceAsValid = config.checkPageFormForceAsValid || null;\n }\n pageFormControlFullWidth?: boolean;\n pageFormControls: DisplayFormControlConfig[];\n pageFormControlsObservable?: Observable;\n pageFormControlsTitle?: string;\n pageFormControlsTitleKey?: string;\n\n //Returns a routing array to navigate to\n processSecondaryEvent?: () => Observable;\n\n /**\n * This is where you should have the caller process the form data. When this is called the Angular component will provide an Injector and FromGroup class\n * which can be used to send server request for example. Method needs to provide a promise object that will return success.failure when complete\n *\n * @example\n * processUpdater: (injector: Injector, form: FormGroup) => {\n * const responseObservable = new Observable((responseSubscriber) => {\n * const clientService = injector.get(MicroUserCreationClientService);\n * const updateAddressObservable = clientService.updateAddress(ExtractAddressFromForm(form)).subscribe(\n * () => {\n * updateAddressObservable.unsubscribe();\n *\n * responseSubscriber.next({ status: 'success' });\n * responseSubscriber.complete();\n * },\n * () => {\n * updateAddressObservable.unsubscribe();\n *\n * responseSubscriber.next({\n * status: 'failed',\n * errorMessage: 'Could not save your updated information. Please try again.',\n * });\n * responseSubscriber.complete();\n * }\n * );\n * });\n */\n processUpdater?: (injector: Injector, form: FormGroup, translatePipe: TranslatePipe) => Observable;\n checkPageFormForceAsValid?: null\n}\n\nexport interface DisplayFormProcessResponse {\n status: string;\n errorType?: DisplayFormProcessErrorType;\n errorMessage?: string;\n errorMessageTitle?: string;\n}\n\nexport enum DisplayFormProcessErrorType {\n BANNER = 'BANNER',\n MODAL = 'MODAL',\n SILENT = 'SILENT',\n}\n\n@Component({\n selector: 'brightside-web-display-form',\n templateUrl: './display-form.component.html',\n})\nexport class DisplayFormComponent implements OnInit, OnDestroy {\n config: DisplayFormSettings = new DisplayFormSettings({\n fbPage: 'display',\n fbCategory: 'cards',\n fbEventName: '',\n pageTitle: '',\n pageTitleKey: '',\n pageSubTitle: '',\n pageSubTitleKey: '',\n pageCtaLabel: 'BUTTON_CONTINUE',\n pageCtaLabelKey: '',\n pageSecondaryCtaLabel: '',\n\n pageFormControls: [],\n\n pageOnForwardCtaPath: [],\n });\n\n //This will determine if the form should spin up form on init or when manually triggered\n formAutomaticCreateMode = true;\n\n displayForm: FormGroup;\n\n processing: boolean;\n\n pageIsFullScreen: boolean;\n\n processErrorMessage: string;\n processErrorMessageTitle: string;\n\n showProcessError: boolean;\n\n displayFormAnalytics = new DisplayFormAnalytics();\n\n constructor(\n protected activatedRoute: ActivatedRoute,\n protected injector: Injector,\n protected routingState: RoutingStateService,\n protected toastService: ToastService,\n protected translatePipe: TranslatePipe,\n protected translateService: TranslateService,\n protected changeDetectorRef: ChangeDetectorRef\n ) {}\n\n ngOnInit(): void {\n this.checkForConfigViaData();\n\n if (this.formAutomaticCreateMode) {\n this.buildFormFromConfig();\n this.clearForm();\n }\n }\n\n ngOnDestroy(): void {\n //We need to clear any initialized values from the config - Weird issue from the\n //nature of the configs generation\n this.config.pageFormControls.forEach((controlConfig: DisplayFormControlConfig) => {\n if (controlConfig.inputOptions?.initialValue !== undefined) {\n controlConfig.inputOptions.initialValue = '';\n }\n });\n }\n\n private checkForConfigViaData() {\n if (this.activatedRoute?.snapshot?.data?.pageConfig) {\n this.config = new DisplayFormSettings(this.activatedRoute.snapshot.data.pageConfig);\n if (this.config) {\n this.setUpAnalytics();\n }\n }\n }\n\n private setUpAnalytics() {\n if (this.config.fbEventName) {\n this.displayFormAnalytics.shown = this.config.analyticsAttributes('shown');\n this.displayFormAnalytics.dismiss = this.config.analyticsAttributes('dismiss');\n this.displayFormAnalytics.submit = this.config.analyticsAttributes('tapped');\n }\n }\n\n protected processControlAndUpdateFormPatch(\n patchInitialValues: DisplayFormPatchValues,\n controlConfig: DisplayFormControlConfig\n ) {\n if (controlConfig.control) {\n //If there is a default initialValue, let's set it.\n if (controlConfig.inputOptions?.initialValue) {\n if (controlConfig.type === 'date') {\n patchInitialValues[controlConfig.key] = controlConfig.inputOptions.initialValue;\n try {\n patchInitialValues[controlConfig.key] = new Date(controlConfig.inputOptions.initialValue).toISOString().split('T')[0];\n } catch (e) {\n const dateArgs = controlConfig.inputOptions.initialValue.toString().split('-');\n patchInitialValues[controlConfig.key] = new Date(Number(dateArgs[2]), Number(dateArgs[0]) - 1, Number(dateArgs[1]), 0,0,0).toISOString().split('T')[0];\n }\n } else {\n patchInitialValues[controlConfig.key] = controlConfig.inputOptions.initialValue;\n }\n }\n }\n }\n\n protected buildFormFromConfig() {\n const controls: { [key: string]: FormControl } = {};\n const patchInitialValues: DisplayFormPatchValues = {};\n\n if (this.config.pageFormControls) {\n this.config.pageFormControls.forEach((controlConfig: DisplayFormControlConfig) => {\n this.processControlAndUpdateFormPatch(patchInitialValues, controlConfig);\n\n if (controlConfig.control) controls[controlConfig.key] = controlConfig.control;\n });\n }\n\n this.displayForm = new FormGroup(controls);\n\n //Needed to update this way to make sure the updates take\n this.displayForm.statusChanges.pipe(take(1)).subscribe((status: any) => {\n setTimeout(() => {\n const patchKeys = Object.keys(patchInitialValues);\n\n if (patchKeys.length > 0) {\n this.displayForm.patchValue(patchInitialValues, { emitEvent: true });\n this.changeDetectorRef.detectChanges();\n }\n }, 1);\n\n return status;\n });\n }\n\n protected clearForm() {\n this.displayForm.reset();\n }\n\n protected handleMoveBackward() {\n this.routingState.popAndNavigateTo(this.config.pageOnBackCtaPath || []);\n }\n\n protected handleMoveForward() {\n if (this.config.bridgeExitOverride && (IsRunningIOS() || IsRunningAndroid())) {\n MessageBusInternalService.sendOutgoingHubEvent(\n {\n event: MessageBusOutgoingEventKey.ROUTE,\n data: {\n path: this.config.bridgeExitOverride,\n },\n }\n );\n } else {\n this.routingState.popAndNavigateTo(this.config.pageOnForwardCtaPath || []);\n }\n }\n\n protected handleShowError(result: DisplayFormProcessResponse) {\n if (!result.errorType) result.errorType = DisplayFormProcessErrorType.MODAL;\n\n if (result.errorType === DisplayFormProcessErrorType.MODAL) {\n this.processErrorMessage = result.errorMessage || '';\n this.processErrorMessageTitle = result.errorMessageTitle || '';\n this.showProcessError = true;\n } else if (result.errorType === DisplayFormProcessErrorType.BANNER) {\n this.toastService.error(this.translateService.instant(result.errorMessage || ''), {\n link: false,\n transient: true,\n });\n }\n\n this.processing = false;\n }\n\n doesControlHaveError(key: string): boolean {\n if (this.displayForm) {\n const control = this.displayForm.get(key);\n\n if (control) {\n return control.touched && control.invalid;\n }\n\n return false;\n } else {\n return false;\n }\n }\n\n handleBackClick() {\n this.handleMoveBackward();\n return false;\n }\n\n handleCtaClick() {\n if (this.processing) {\n return;\n }\n\n this.processing = true;\n this.showProcessError = false;\n this.processErrorMessage = '';\n\n if (this.config.processUpdater) {\n const results = this.config.processUpdater(this.injector, this.displayForm, this.translatePipe);\n\n const defaultErrorMessage = this.translateService.instant('PRIMARY_VERIFICATION_ERROR_MSG_WEB');\n const defaultErrorTitle = this.translateService.instant('ERROR_TITLE_GENERAL');\n\n results.subscribe({\n next: (result:DisplayFormProcessResponse) => {\n if (result.status === 'success') {\n this.handleMoveForward();\n } else {\n this.handleShowError({\n ...result,\n errorMessage: result.errorMessage || defaultErrorMessage,\n errorMessageTitle: result.errorMessageTitle || defaultErrorTitle,\n });\n }\n },\n error: () => {\n this.handleShowError({\n status: 'failed',\n errorType: DisplayFormProcessErrorType.MODAL,\n errorMessage: defaultErrorMessage,\n errorMessageTitle: defaultErrorTitle,\n });\n }\n });\n } else {\n this.handleMoveForward();\n }\n }\n\n handleSecondaryCtaClick() {}\n\n handleLinkClick(path: string[]) {\n this.routingState.navigateTo(path);\n }\n}\n","
\n
\n
\n \n \n {{title}}\n \n
\n

\n \n

\n
\n
\n \n
\n
\n\n
\n \n \n {{title}}\n \n
\n \n \n \n
\n
\n\n
\n \n {{title}}\n \n \n {{subtitle}}\n \n
\n \n \n \n
\n
\n\n
\n
\n \n {{title}}\n \n \n
\n \n {{subtitle}}\n \n
\n \n
\n
\n \n \n \n
\n
\n
\n\n\n\n \n\n","import { Component, ElementRef, EventEmitter, HostBinding, Input, OnInit, Output, ViewChild } from '@angular/core';\n\nexport enum CardTypes {\n Promo = 'promo',\n Action = 'action',\n Info = 'info',\n ActiveProduct = 'active-product'\n}\n@Component({\n selector: 'bw-card',\n templateUrl: './card.component.html',\n styleUrls: ['./card.component.scss'],\n})\nexport class CardComponent implements OnInit {\n @Input() cardType: CardTypes;\n @Input() title: string;\n @Input() subtitle: string;\n @Input() bgImageSrc: string;\n @Input() closeable: boolean;\n @Input() invertedColor: boolean;\n @Input() cardTextColor: string;\n @Input() cardBannerColor: string;\n\n @Output() closeCard = new EventEmitter();\n @Output() cardAction = new EventEmitter();\n\n isPromoCard: boolean;\n isActionCard: boolean;\n isInfoCard: boolean;\n isActiveProductCard: boolean;\n\n @HostBinding('className') hostClass: string;\n @HostBinding('class.has-banner') hasCardBanner = false;\n constructor(private elRef: ElementRef) {}\n\n ngOnInit(): void {\n if (this.cardType === CardTypes.Promo) {\n this.isPromoCard = true;\n }\n if (this.cardType === CardTypes.Action) {\n this.isActionCard = true;\n }\n if (this.cardType === CardTypes.Info) {\n this.isInfoCard = true;\n this.hostClass = 'info-card';\n }\n if (this.cardType === CardTypes.ActiveProduct) {\n this.isActiveProductCard = true;\n this.hostClass = 'activated-product';\n }\n if (this.invertedColor) {\n this.hostClass = 'inverted';\n }\n this.hasCardBanner = this.elRef.nativeElement.lastElementChild.localName === \"bw-card-banner\";\n }\n\n handleCloseCard(event: Event) {\n this.closeCard.emit();\n }\n\n handleCardAction(event: Event) {\n this.cardAction.emit(event);\n }\n}\n\n@Component({\n selector: 'bw-card-header',\n template: ` `\n})\nexport class CardHeaderComponent {}\n\n@Component({\n selector: 'bw-card-body',\n template: ` `\n})\nexport class CardBodyComponent {}\n\n@Component({\n selector: 'bw-card-footer',\n template: ` `,\n})\nexport class CardFooterComponent {}\n\n@Component({\n selector: 'bw-card-banner',\n template: `
`,\n styleUrls: ['card-banner.scss']\n})\nexport class CardBannerComponent {\n @Input() cardBannerColor: string;\n}\n","//! moment.js locale configuration\n//! locale : Punjabi (India) [pa-in]\n//! author : Harpreet Singh : https://github.com/harpreetkhalsagtbit\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '੧',\n 2: '੨',\n 3: '੩',\n 4: '੪',\n 5: '੫',\n 6: '੬',\n 7: '੭',\n 8: '੮',\n 9: '੯',\n 0: '੦',\n },\n numberMap = {\n '੧': '1',\n '੨': '2',\n '੩': '3',\n '੪': '4',\n '੫': '5',\n '੬': '6',\n '੭': '7',\n '੮': '8',\n '੯': '9',\n '੦': '0',\n };\n\n var paIn = moment.defineLocale('pa-in', {\n // There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi.\n months: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(\n '_'\n ),\n monthsShort:\n 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(\n '_'\n ),\n weekdays: 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split(\n '_'\n ),\n weekdaysShort: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),\n weekdaysMin: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm ਵਜੇ',\n LTS: 'A h:mm:ss ਵਜੇ',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm ਵਜੇ',\n LLLL: 'dddd, D MMMM YYYY, A h:mm ਵਜੇ',\n },\n calendar: {\n sameDay: '[ਅਜ] LT',\n nextDay: '[ਕਲ] LT',\n nextWeek: '[ਅਗਲਾ] dddd, LT',\n lastDay: '[ਕਲ] LT',\n lastWeek: '[ਪਿਛਲੇ] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s ਵਿੱਚ',\n past: '%s ਪਿਛਲੇ',\n s: 'ਕੁਝ ਸਕਿੰਟ',\n ss: '%d ਸਕਿੰਟ',\n m: 'ਇਕ ਮਿੰਟ',\n mm: '%d ਮਿੰਟ',\n h: 'ਇੱਕ ਘੰਟਾ',\n hh: '%d ਘੰਟੇ',\n d: 'ਇੱਕ ਦਿਨ',\n dd: '%d ਦਿਨ',\n M: 'ਇੱਕ ਮਹੀਨਾ',\n MM: '%d ਮਹੀਨੇ',\n y: 'ਇੱਕ ਸਾਲ',\n yy: '%d ਸਾਲ',\n },\n preparse: function (string) {\n return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n // Punjabi notation for meridiems are quite fuzzy in practice. While there exists\n // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi.\n meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'ਰਾਤ') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'ਸਵੇਰ') {\n return hour;\n } else if (meridiem === 'ਦੁਪਹਿਰ') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'ਸ਼ਾਮ') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'ਰਾਤ';\n } else if (hour < 10) {\n return 'ਸਵੇਰ';\n } else if (hour < 17) {\n return 'ਦੁਪਹਿਰ';\n } else if (hour < 20) {\n return 'ਸ਼ਾਮ';\n } else {\n return 'ਰਾਤ';\n }\n },\n week: {\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 });\n\n return paIn;\n\n})));\n","import { __decorate, __param, __metadata } from 'tslib';\nimport { InjectionToken, Inject, PLATFORM_ID, Optional, NgZone, ɵɵdefineInjectable, ɵɵinject, Injectable, Input, Component, ChangeDetectionStrategy, ViewEncapsulation, NgModule } from '@angular/core';\nimport { isPlatformBrowser, CommonModule } from '@angular/common';\nimport { Subject, of, timer, combineLatest, Observable } from 'rxjs';\nimport { take, map, tap, startWith, switchMap, shareReplay } from 'rxjs/operators';\n\nimport * as ɵngcc0 from '@angular/core';\nimport * as ɵngcc1 from '@angular/common';\n\nfunction LoadingBarComponent_ng_container_0_div_1_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelementStart(0, \"div\", 3);\n ɵngcc0.ɵɵelement(1, \"div\", 4);\n ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n const ctx_r2 = ɵngcc0.ɵɵnextContext(2);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵstyleProp(\"width\", ctx_r2.diameter)(\"height\", ctx_r2.diameter);\n} }\nfunction LoadingBarComponent_ng_container_0_div_2_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelement(0, \"div\", 5);\n} if (rf & 2) {\n const progress_r1 = ɵngcc0.ɵɵnextContext().ngIf;\n const ctx_r3 = ɵngcc0.ɵɵnextContext();\n ɵngcc0.ɵɵstyleProp(\"background\", ctx_r3.color)(\"height\", ctx_r3.height)(\"width\", progress_r1 + \"%\");\n} }\nfunction LoadingBarComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelementContainerStart(0);\n ɵngcc0.ɵɵtemplate(1, LoadingBarComponent_ng_container_0_div_1_Template, 2, 4, \"div\", 1);\n ɵngcc0.ɵɵtemplate(2, LoadingBarComponent_ng_container_0_div_2_Template, 1, 6, \"div\", 2);\n ɵngcc0.ɵɵelementContainerEnd();\n} if (rf & 2) {\n const ctx_r0 = ɵngcc0.ɵɵnextContext();\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx_r0.includeSpinner);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx_r0.includeBar);\n} }\nclass LoadingBarState {\n constructor(config = {}) {\n this.config = config;\n this.state = {\n action: null,\n value: 0,\n initialValue: 0,\n };\n this.requests = null;\n this.disabled = false;\n this.stream$ = new Subject();\n this._value$ = null;\n this.timer$ = (s) => {\n let state$ = of(s);\n switch (s.action) {\n case 'start':\n case 'increment':\n case 'set': {\n if (s.action === 'start' && this.config.latencyThreshold === 0 && s.value === 0) {\n s.value = s.initialValue;\n }\n if (this.requests > 0) {\n state$ = timer(this.config.latencyThreshold, 250).pipe(map((t) => (Object.assign(Object.assign({}, s), { value: t === 0 ? this.state.value || s.initialValue : this._increment() }))));\n }\n break;\n }\n case 'complete':\n case 'stop': {\n // Attempt to aggregate any start/complete calls within 500ms:\n state$ =\n s.value === 0\n ? of(Object.assign({}, s))\n : timer(0, 500).pipe(take(2), map((t) => ({ value: t === 0 ? 100 : 0 })));\n break;\n }\n }\n return state$.pipe(map((next) => (Object.assign(Object.assign({}, next), { action: 'set' }))), tap((next) => this.next(next, false)));\n };\n this.config = Object.assign({ latencyThreshold: 0 }, config);\n }\n get value$() {\n if (this._value$) {\n return this._value$;\n }\n return (this._value$ = this.stream$.asObservable().pipe(startWith(this.state), switchMap((s) => this.timer$(s)), shareReplay(), map((s) => s.value)));\n }\n start(initialValue = 2) {\n if (this.disabled) {\n return;\n }\n this.next({ action: 'start', initialValue });\n }\n stop() {\n this.next({ action: 'stop' });\n }\n complete() {\n this.next({ action: 'complete' });\n }\n disable() {\n this.disabled = true;\n }\n set(value) {\n this.next({ action: 'set', value });\n }\n increment(value = 0) {\n this.next({ action: 'increment', value });\n }\n next(state, emitEvent = true) {\n switch (state.action) {\n case 'start':\n this.requests = (this.requests || 0) + 1;\n break;\n case 'complete':\n this.requests = (this.requests || 1) - 1;\n if (this.requests > 0) {\n return;\n }\n break;\n case 'stop':\n this.requests = 0;\n break;\n case 'increment':\n state.value = this._increment(state.value);\n break;\n }\n this.state = Object.assign(Object.assign(Object.assign({}, this.state), { action: null }), state);\n if (emitEvent) {\n this.stream$.next(this.state);\n }\n }\n _increment(rnd = 0) {\n const stat = this.state.value;\n if (stat >= 99) {\n rnd = 0;\n }\n if (rnd === 0) {\n if (stat >= 0 && stat < 25) {\n // Start out between 3 - 6% increments\n rnd = Math.random() * (5 - 3 + 1) + 3;\n }\n else if (stat >= 25 && stat < 65) {\n // increment between 0 - 3%\n rnd = Math.random() * 3;\n }\n else if (stat >= 65 && stat < 90) {\n // increment between 0 - 2%\n rnd = Math.random() * 2;\n }\n else if (stat >= 90 && stat < 99) {\n // finally, increment it .5 %\n rnd = 0.5;\n }\n else {\n // after 99%, don't increment:\n rnd = 0;\n }\n }\n return rnd + stat;\n }\n}\n\nconst LOADING_BAR_CONFIG = new InjectionToken('LOADING_BAR_CONFIG');\n\nlet LoadingBarService = class LoadingBarService {\n constructor(platformId, config = {}, zone) {\n this.platformId = platformId;\n this.config = config;\n this.zone = zone;\n this.refs = {};\n this.streams$ = new Subject();\n this.value$ = this.streams$.asObservable().pipe(startWith(null), switchMap(() => combineLatest(...Object.keys(this.refs).map((s) => this.refs[s].value$))), runInZone(this.zone), map((v) => Math.max(0, ...v)));\n }\n /** @deprecated use `value$` instead. */\n get progress$() {\n return this.value$;\n }\n /** @deprecated use `useRef` instead. */\n start(initialValue = 2) {\n this.useRef().start(initialValue);\n }\n /** @deprecated use `useRef` instead. */\n set(value) {\n this.useRef().set(value);\n }\n /** @deprecated use `useRef` instead. */\n increment(value) {\n this.useRef().increment(value);\n }\n /** @deprecated use `useRef` instead. */\n complete() {\n this.useRef().complete();\n }\n /** @deprecated use `useRef` instead. */\n stop() {\n this.useRef().stop();\n }\n useRef(id = 'default') {\n if (!this.refs[id]) {\n this.refs[id] = new LoadingBarState(this.config);\n this.streams$.next();\n if (!isPlatformBrowser(this.platformId)) {\n this.refs[id].disable();\n }\n }\n return this.refs[id];\n }\n};\nLoadingBarService.ɵfac = function LoadingBarService_Factory(t) { return new (t || LoadingBarService)(ɵngcc0.ɵɵinject(PLATFORM_ID), ɵngcc0.ɵɵinject(LOADING_BAR_CONFIG, 8), ɵngcc0.ɵɵinject(ɵngcc0.NgZone, 8)); };\nLoadingBarService.ctorParameters = () => [\n { type: Object, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] },\n { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [LOADING_BAR_CONFIG,] }] },\n { type: NgZone, decorators: [{ type: Optional }] }\n];\nLoadingBarService.ɵprov = ɵɵdefineInjectable({ factory: function LoadingBarService_Factory() { return new LoadingBarService(ɵɵinject(PLATFORM_ID), ɵɵinject(LOADING_BAR_CONFIG, 8), ɵɵinject(NgZone, 8)); }, token: LoadingBarService, providedIn: \"root\" });\nLoadingBarService = __decorate([ __param(0, Inject(PLATFORM_ID)),\n __param(1, Optional()), __param(1, Inject(LOADING_BAR_CONFIG)),\n __param(2, Optional()),\n __metadata(\"design:paramtypes\", [Object, Object, NgZone])\n], LoadingBarService);\n// https://stackoverflow.com/a/57452361/1406096\nfunction runInZone(zone) {\n if (!zone) {\n return (source) => source;\n }\n return (source) => new Observable((observer) => source.subscribe((value) => zone.run(() => observer.next(value)), (e) => zone.run(() => observer.error(e)), () => zone.run(() => observer.complete())));\n}\n\nlet LoadingBarComponent = class LoadingBarComponent {\n constructor(loader) {\n this.loader = loader;\n this.includeSpinner = true;\n this.includeBar = true;\n this.fixed = true;\n this.color = '#29d';\n }\n get value$() {\n return this.ref ? this.loader.useRef(this.ref).value$ : this.loader.value$;\n }\n};\nLoadingBarComponent.ɵfac = function LoadingBarComponent_Factory(t) { return new (t || LoadingBarComponent)(ɵngcc0.ɵɵdirectiveInject(LoadingBarService)); };\nLoadingBarComponent.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: LoadingBarComponent, selectors: [[\"ngx-loading-bar\"]], hostVars: 3, hostBindings: function LoadingBarComponent_HostBindings(rf, ctx) { if (rf & 2) {\n ɵngcc0.ɵɵattribute(\"fixed\", ctx.fixed);\n ɵngcc0.ɵɵstyleProp(\"color\", ctx.color);\n } }, inputs: { includeSpinner: \"includeSpinner\", includeBar: \"includeBar\", fixed: \"fixed\", color: \"color\", value: \"value\", ref: \"ref\", height: \"height\", diameter: \"diameter\" }, decls: 2, vars: 3, consts: [[4, \"ngIf\"], [\"class\", \"ngx-spinner\", 4, \"ngIf\"], [\"class\", \"ngx-bar\", 3, \"background\", \"height\", \"width\", 4, \"ngIf\"], [1, \"ngx-spinner\"], [1, \"ngx-spinner-icon\"], [1, \"ngx-bar\"]], template: function LoadingBarComponent_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵtemplate(0, LoadingBarComponent_ng_container_0_Template, 3, 2, \"ng-container\", 0);\n ɵngcc0.ɵɵpipe(1, \"async\");\n } if (rf & 2) {\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx.value != null ? ctx.value : ɵngcc0.ɵɵpipeBind1(1, 1, ctx.value$));\n } }, dependencies: [ɵngcc1.NgIf, ɵngcc1.AsyncPipe], styles: [\"[_nghost-%COMP%]{position:relative;display:block;pointer-events:none}[_nghost-%COMP%] .ngx-spinner[_ngcontent-%COMP%]{transition:350ms linear;display:block;position:absolute;top:5px;left:0}[_nghost-%COMP%] .ngx-spinner[_ngcontent-%COMP%] .ngx-spinner-icon[_ngcontent-%COMP%]{width:14px;height:14px;border:2px solid transparent;border-top-color:inherit;border-left-color:inherit;border-radius:50%;-webkit-animation:.4s linear infinite _ngcontent-%COMP%_loading-bar-spinner;animation:.4s linear infinite _ngcontent-%COMP%_loading-bar-spinner}[_nghost-%COMP%] .ngx-bar[_ngcontent-%COMP%]{transition:width 350ms;position:absolute;top:0;left:0;width:100%;height:2px;border-bottom-right-radius:1px;border-top-right-radius:1px}[dir=rtl] [_nghost-%COMP%] .ngx-bar[_ngcontent-%COMP%]{right:0;left:unset}[fixed=true][_nghost-%COMP%]{z-index:10002}[fixed=true][_nghost-%COMP%] .ngx-bar[_ngcontent-%COMP%]{position:fixed}[fixed=true][_nghost-%COMP%] .ngx-spinner[_ngcontent-%COMP%]{position:fixed;top:10px;left:10px}[dir=rtl] [fixed=true][_nghost-%COMP%] .ngx-spinner[_ngcontent-%COMP%]{right:10px;left:unset}@-webkit-keyframes _ngcontent-%COMP%_loading-bar-spinner{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes _ngcontent-%COMP%_loading-bar-spinner{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}\"], changeDetection: 0 });\nLoadingBarComponent.ctorParameters = () => [\n { type: LoadingBarService }\n];\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], LoadingBarComponent.prototype, \"includeSpinner\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], LoadingBarComponent.prototype, \"includeBar\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], LoadingBarComponent.prototype, \"fixed\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Object)\n], LoadingBarComponent.prototype, \"color\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", Number)\n], LoadingBarComponent.prototype, \"value\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", String)\n], LoadingBarComponent.prototype, \"ref\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", String)\n], LoadingBarComponent.prototype, \"height\", void 0);\n__decorate([\n Input(),\n __metadata(\"design:type\", String)\n], LoadingBarComponent.prototype, \"diameter\", void 0);\nLoadingBarComponent = __decorate([ __metadata(\"design:paramtypes\", [LoadingBarService])\n], LoadingBarComponent);\n\nlet LoadingBarModule = class LoadingBarModule {\n};\nLoadingBarModule.ɵfac = function LoadingBarModule_Factory(t) { return new (t || LoadingBarModule)(); };\nLoadingBarModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: LoadingBarModule });\nLoadingBarModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ imports: [CommonModule] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(LoadingBarService, [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], function () { return [{ type: Object, decorators: [{\n type: Inject,\n args: [PLATFORM_ID]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [LOADING_BAR_CONFIG]\n }] }, { type: ɵngcc0.NgZone, decorators: [{\n type: Optional\n }] }]; }, null); })();\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(LoadingBarComponent, [{\n type: Component,\n args: [{ selector: 'ngx-loading-bar', template: `\n \n
\n
\n
\n \n
\n `, preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, host: {\n '[attr.fixed]': 'fixed',\n '[style.color]': 'color'\n }, styles: [\":host{position:relative;display:block;pointer-events:none}:host .ngx-spinner{transition:350ms linear;display:block;position:absolute;top:5px;left:0}:host .ngx-spinner .ngx-spinner-icon{width:14px;height:14px;border:2px solid transparent;border-top-color:inherit;border-left-color:inherit;border-radius:50%;-webkit-animation:.4s linear infinite loading-bar-spinner;animation:.4s linear infinite loading-bar-spinner}:host .ngx-bar{transition:width 350ms;position:absolute;top:0;left:0;width:100%;height:2px;border-bottom-right-radius:1px;border-top-right-radius:1px}[dir=rtl] :host .ngx-bar{right:0;left:unset}:host[fixed=true]{z-index:10002}:host[fixed=true] .ngx-bar{position:fixed}:host[fixed=true] .ngx-spinner{position:fixed;top:10px;left:10px}[dir=rtl] :host[fixed=true] .ngx-spinner{right:10px;left:unset}@-webkit-keyframes loading-bar-spinner{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes loading-bar-spinner{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}\"] }]\n }], function () { return [{ type: LoadingBarService }]; }, { includeSpinner: [{\n type: Input\n }], includeBar: [{\n type: Input\n }], fixed: [{\n type: Input\n }], color: [{\n type: Input\n }], value: [{\n type: Input\n }], ref: [{\n type: Input\n }], height: [{\n type: Input\n }], diameter: [{\n type: Input\n }] }); })();\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(LoadingBarModule, [{\n type: NgModule,\n args: [{\n imports: [CommonModule],\n declarations: [LoadingBarComponent],\n exports: [LoadingBarComponent]\n }]\n }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(LoadingBarModule, { declarations: function () { return [LoadingBarComponent]; }, imports: function () { return [CommonModule]; }, exports: function () { return [LoadingBarComponent]; } }); })();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { LOADING_BAR_CONFIG, LoadingBarComponent, LoadingBarModule, LoadingBarService };\n\n","import { Injectable } from '@angular/core';\nimport {\n ApiResponse,\n LinkedAccountRequestBody,\n LinkedAccountResponse,\n LinkedAccountVerifyRequestBody,\n LinkedAccountVerifyResponse,\n LinkedBank,\n LinkedBankStatus,\n SavingsAccount,\n} from '@brightside-web/desktop/data-access/shared';\nimport { SavingsAccountService } from '@brightside-web/desktop/data-access/savings';\n\nimport {\n AwsApiWrapperService\n} from '@brightside-web/desktop/data-access/core-services';\nimport { from, Observable } from 'rxjs';\n\nimport * as moment from 'moment-business-days';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class LinkedAccountService {\n constructor(\n private savingsService: SavingsAccountService,\n private awsApiWrapperService: AwsApiWrapperService) {}\n\n static getAccountIdPendingDeposits(account: SavingsAccount): false | number {\n const verifiableBank = account.banks.find((bank) => LinkedAccountService.isLinkedAccountVerifiable(bank));\n return verifiableBank ? verifiableBank.id : false;\n }\n\n static isLinkedAccountVerifiable(account: LinkedBank): boolean {\n return Boolean(\n account.status === LinkedBankStatus.LINK_VERIFY_DEPOSIT &&\n moment().isSameOrAfter(moment(account?.micro_meta?.micro_deposit_initiated_ts).local().businessAdd(1).startOf('day'))\n );\n }\n\n createAccount(requestBody: LinkedAccountRequestBody): Observable {\n this.savingsService.clearSavingsCache();\n\n return from(\n this.awsApiWrapperService.post('api-mobile', '/deposit/link/routing', { headers: { 'Content-Type': 'application/json' }, body: requestBody })\n );\n }\n\n resendDeposits(bankId: number): Observable {\n this.savingsService.clearSavingsCache();\n\n return from(\n this.awsApiWrapperService.patch('api-mobile', `/deposit/link/routing/${bankId}`, {\n headers: { 'Content-Type': 'application/json' },\n body: {\n action: 'resendMicroDeposits',\n },\n })\n );\n }\n\n verifyAccount(request: LinkedAccountVerifyRequestBody): Observable {\n this.savingsService.clearSavingsCache();\n\n return from(\n this.awsApiWrapperService.patch('api-mobile', `/deposit/link/routing/${request.bankId}`, {\n headers: { 'Content-Type': 'application/json' },\n body: {\n amounts: request.amounts,\n action: 'verifyMicroDeposits',\n },\n })\n );\n }\n\n unlinkAccount(bankId: number): Observable {\n this.savingsService.clearSavingsCache();\n return from(this.awsApiWrapperService.del('api-mobile', `/deposit/link/${bankId}`, { headers: { 'Content-Type': 'application/json' } }));\n }\n}\n","export * from './content-util-map.enum';\n\nexport enum UiTemplateContentType {\n CDN_CONTENT = 'content.cdn-url',\n CUSTOM_COMPONENT = 'content.custom-component',\n GROUP_CELL = 'content.group-cell',\n LIST_ITEM = 'content.list-item',\n TITLE_TEXT = 'content.title-text',\n}\n\nexport enum UiTemplateContentFormType {\n SELECT_AMOUNT = 'content.form.select.amount',\n GROUP_RADIO = 'content.form.group.radio',\n}\n\nexport enum UiTemplateContentGroupRadioDisplayStyle {\n BLOCK = 'display.style.block',\n LIST = 'display.style.list'\n}\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\n\nimport { UiTemplateContentCdnUrl } from '../../shared/model/content-template.interface';\n\n@Component({\n selector: 'ui-content-cdn-url',\n template: '
',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class UiTemplateContentCdnUrlComponent implements OnInit {\n @Input() data: UiTemplateContentCdnUrl;\n\n constructor(protected httpClient: HttpClient) {}\n\n fullPath = '';\n\n ngOnInit(): void {\n this.fullPath = `assets${this.data.path}`;\n }\n}\n","\n \n\n\n\n \n\n
\n {{ title }}\n
\n\n

\n\n

\n
\n","import { Component, Input, ChangeDetectionStrategy } from '@angular/core';\n\nimport { UiTemplateContentTitleText } from '../../shared/model/content-template.interface';\n\n@Component({\n selector: 'ui-content-title-text',\n templateUrl: './title-text-content.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class UiTemplateContentTitleTextComponent {\n @Input() data: UiTemplateContentTitleText;\n}\n","\n\n\n\n\n\n \n\n\n\n \n\n\n\n \n \n\n\n\n \n \n \n

{{ item.label | translate }}

\n
\n\n \n

{{ item.value | translate }}

\n
\n \n
\n
\n","import { Component, Input, OnInit, ChangeDetectionStrategy, ViewContainerRef } from '@angular/core';\n\nimport { CellSeparatorType } from '@brightside/brightside-ui';\nimport { MicroUtilDebugLogger } from '@micro-core/utility';\n\nimport { UiTemplateContentType, UiTemplateContentFormType } from '../../shared/model/content-template.enum';\nimport { UiTemplateContent, UiTemplateContentCustomComponent } from '../../shared/model/content-template.interface';\n\ntype ContentType = UiTemplateContentType | UiTemplateContentFormType;\n\n@Component({\n selector: 'ui-content-display-item',\n templateUrl: './display-content-item.component.html',\n styleUrls: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class UiContentDisplayItemComponent extends MicroUtilDebugLogger implements OnInit {\n @Input() contentControl: UiTemplateContent;\n\n //Make sure the content types can be used in template\n contentType = UiTemplateContentType;\n contentFormType = UiTemplateContentFormType;\n separatorType = CellSeparatorType;\n\n constructor(public viewContainerRef: ViewContainerRef) {\n super();\n\n this.allowVerboseDebugMode = true;\n this.logPrefix = 'UiContentDisplayItemComponent';\n }\n\n ngOnInit(): void {\n this.getMethodOrNoop(this.contentControl.type)();\n }\n\n private getMethodOrNoop(contentTypeName: ContentType) {\n this.logForDebugging(`Trying to load method for type of ${contentTypeName}`);\n\n if (UiContentDisplayItemComponent.prototype[contentTypeName]) {\n this.logForDebugging(`Found method for type`);\n\n return this[contentTypeName].bind(this);\n }\n\n this.logForDebugging(`No method found for type`);\n\n return () => false;\n }\n\n private [UiTemplateContentType.CDN_CONTENT]() {}\n private [UiTemplateContentType.CUSTOM_COMPONENT]() {\n const data: UiTemplateContentCustomComponent = this.contentControl.data as UiTemplateContentCustomComponent;\n\n if (data.component) {\n const componentRef = this.viewContainerRef.createComponent(data.component);\n\n data.afterComponentCreated(componentRef);\n }\n }\n private [UiTemplateContentType.GROUP_CELL]() {}\n private [UiTemplateContentType.LIST_ITEM]() {}\n private [UiTemplateContentType.TITLE_TEXT]() {}\n private [UiTemplateContentFormType.SELECT_AMOUNT]() {}\n private [UiTemplateContentFormType.GROUP_RADIO]() {}\n}\n","\n \n\n\n\n","import { Component, Input, ChangeDetectionStrategy } from '@angular/core';\n\nimport { UiTemplateContent } from '../../shared/model/content-template.interface';\n\n@Component({\n selector: 'ui-content-display',\n templateUrl: './display-content.component.html',\n styleUrls: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class UiContentDisplayComponent {\n @Input() data: UiTemplateContent[];\n}\n","\n \n \n\n\n\n \n\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';\n\nimport { UiTemplateContentGroupRadioDisplayStyle } from '../../../shared/model/content-template.enum';\nimport { UiTemplateContentGroupRadio, UiTemplateFormContentValueChanged } from '../../../shared/model/content-template.interface';\n\n@Component({\n selector: 'ui-content-group-radio',\n templateUrl: './group-radio-content.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class UiTemplateContentGroupRadioComponent {\n @Input() data: UiTemplateContentGroupRadio;\n\n @Output() formValuesChanged: EventEmitter = new EventEmitter();\n\n DISPLAY_STYLE = UiTemplateContentGroupRadioDisplayStyle;\n}\n","import { Component, Input, OnDestroy, OnInit } from \"@angular/core\";\nimport { NG_VALUE_ACCESSOR, NG_VALIDATORS, ControlValueAccessor, Validator, AbstractControl, ValidationErrors, FormGroup, Validators, FormBuilder } from \"@angular/forms\";\nimport { Subscription } from \"rxjs\";\n\n@Component({\n selector: 'bw-currency-select',\n templateUrl: \"currency-select.component.html\",\n styleUrls: [\"currency-select.component.scss\"],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n multi:true,\n useExisting: CurrencySelectComponent\n },\n {\n provide: NG_VALIDATORS,\n multi: true,\n useExisting: CurrencySelectComponent\n }\n ]\n})\nexport class CurrencySelectComponent implements ControlValueAccessor, Validator, OnDestroy, OnInit {\n @Input() fcGroup: FormGroup;\n @Input() fcName = 'currencyInputAmount';\n\n @Input() increment = 10;\n @Input() suppressKeyboardInput = false;\n\n private childFormGroup: FormGroup = this.fb.group({\n currencyInputAmount: [null, [Validators.required]]\n });\n\n quantity = 0;\n touched = false;\n disabled = false;\n \n onChangeSubs: Subscription[] = [];\n\n onTouched = () => {};\n\n constructor(private fb: FormBuilder) {}\n\n ngOnInit() {\n if (this.suppressKeyboardInput) {\n this.formInput?.disable();\n }\n }\n\n ngOnDestroy() {\n for (const sub of this.onChangeSubs) {\n sub.unsubscribe();\n }\n }\n\n get form() {\n return this.fcGroup || this.childFormGroup;\n }\n\n get formInput() {\n return this.form.get(this.fcName);\n }\n get formInputValue() {\n return this.formInput?.value || this.increment;\n }\n\n /* by = 'increase' 'decrease' */\n private adjustInputValue(by: string) {\n const newValue = this.formInputValue + (by === 'increase' ? this.increment : -this.increment);\n\n this.markAsTouched();\n this.writeValue(newValue);\n this.formInput?.updateValueAndValidity(newValue);\n }\n\n writeValue(value: any) {\n if (!this.disabled && this.formInput && value) {\n this.formInput.setValue(value, {emitEvent: false});\n }\n }\n\n onAdd() {\n this.adjustInputValue('increase');\n }\n\n onRemove() {\n this.adjustInputValue('decrease');\n }\n\n registerOnChange(onChange: any) {\n const sub = this.form.valueChanges.subscribe(onChange);\n\n this.onChangeSubs.push(sub);\n }\n\n registerOnTouched(onTouched: any) {\n this.onTouched = onTouched;\n }\n\n markAsTouched() {\n if (!this.touched) {\n this.onTouched();\n this.touched = true;\n }\n }\n\n setDisabledState(disabled: boolean) {\n if (disabled) {\n this.form.disable();\n }\n else {\n this.form.enable();\n }\n }\n\n validate(control: AbstractControl): ValidationErrors | null {\n const quantity = control.value;\n if (quantity <= 0) {\n return {\n mustBePositive: {\n quantity\n }\n };\n } else {\n return null\n }\n }\n}\n","
\n \n
\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { FormGroup, FormControl } from '@angular/forms';\n\nimport {\n UiTemplateContentSelectAmount,\n UiTemplateFormContentValueChanged,\n} from '../../../shared/model/content-template.interface';\n\n@Component({\n selector: 'ui-content-select-amount',\n template:\n '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class UiTemplateContentSelectAmountComponent implements OnInit {\n @Input() data: UiTemplateContentSelectAmount;\n\n @Output() formValuesChanged: EventEmitter = new EventEmitter();\n\n localFormGroup: FormGroup;\n localFormControlName = 'currencySelect';\n\n ngOnInit(): void {\n this.localFormControlName = this.data.groupName || this.localFormControlName;\n this.localFormGroup = new FormGroup({\n [this.localFormControlName]: new FormControl(this.data.value || 0),\n });\n\n this.localFormGroup.valueChanges.subscribe(() => this.amountChanged());\n\n //Trigger the amount change to ensure we get the init value\n this.amountChanged();\n }\n\n amountChanged() {\n this.formValuesChanged.emit({\n name: this.localFormControlName,\n value: Number(this.localFormGroup.get(this.localFormControlName)?.value || 0),\n });\n }\n}\n","\n \n \n\n\n\n \n\n\n\n \n\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';\n\nimport { UiTemplateContentFormType } from '../../shared/model/content-template.enum';\nimport { UiTemplateContent, UiTemplateFormContentValueChanged } from '../../shared/model/content-template.interface';\n\n@Component({\n selector: 'ui-content-display-form',\n templateUrl: './display-form-content.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class UiContentDisplayFormComponent {\n @Input() data: UiTemplateContent[];\n\n @Output() formValuesChanged: EventEmitter = new EventEmitter();\n\n //Make sure the content types can be used in template\n contentType = UiTemplateContentFormType;\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { TranslateModule } from '@ngx-translate/core';\n\nimport { BrightsideUiModule } from '@brightside/brightside-ui';\n\nimport { MicroCoreUtilityModule } from '@micro-core/utility';\nimport { MicroUiMoleculeModule } from '@micro-ui/molecule';\n\nimport { UiContentDisplayComponent } from './components/display/display-content.component';\nimport { UiContentDisplayFormComponent } from './components/display-form/display-form-content.component';\nimport { UiContentDisplayItemComponent } from './components/display/display-content-item.component';\n\nimport { UiTemplateContentCdnUrlComponent } from './components/cdn-url/cdn-url-content.component';\nimport { UiTemplateContentTitleTextComponent } from './components/title-text/title-text-content.component';\n\nimport { UiTemplateContentSelectAmountComponent } from './components/select/amount/select-amount-content.component';\nimport { UiTemplateContentGroupRadioComponent } from './components/group/radio/group-radio-content.component';\n\nconst ContentComponents = [\n UiContentDisplayComponent,\n UiContentDisplayFormComponent,\n UiContentDisplayItemComponent,\n UiTemplateContentCdnUrlComponent,\n UiTemplateContentGroupRadioComponent,\n UiTemplateContentSelectAmountComponent,\n UiTemplateContentTitleTextComponent,\n];\n\n@NgModule({\n imports: [BrightsideUiModule, CommonModule, MicroCoreUtilityModule, MicroUiMoleculeModule, TranslateModule],\n exports: [...ContentComponents],\n declarations: [...ContentComponents],\n})\nexport class MicroUiTemplateContentModule {}\n","import { Injector } from '@angular/core';\n\nimport { UiNavigationExitType } from '@micro-ui/molecule';\n\nimport { DeepPartial, UiTemplateState } from '../../service/state-handler/state.interface';\n\nimport { UiTemplateBaseActionRoute } from './page-template.interface';\n\nenum UiTemplateNavType {\n NONE = UiNavigationExitType.NONE,\n BACK = UiNavigationExitType.BACK,\n CLOSE = UiNavigationExitType.CLOSE,\n}\n\nenum UiTemplateAction {\n cta1 = 'cta1',\n cta2 = 'cta2',\n footerLink = 'footer.link',\n formValueChanged = 'action.form.value.changed',\n headerMenuItem = 'action.menu.select',\n navLeftIcon = 'navLeftIcon',\n stateChanged = 'action.state.changed',\n}\n\nenum UiTemplateLifecycleHook {\n templateDataInitLoaded = 'lifecycle.hook.template.data.init',\n}\n\n/**\n * These util methods can be used to perform common actions without\n * needing to remain the right information to pass. Can be changed\n * by caller if more details are needed in route.\n *\n * ROUTE_SAME_LEVEL(appendRouteInfo: string[]) -> Will do the step in route to clear modal and ensure\n * we navigate to a path that is the same base level: level1/ - appendRouteInfo will\n * be appended to level1/<...appendRouteInfo>\n *\n * MODAL_OPEN(modalId: string) -> Used to trigger a modal/halfsheet with the information passed to the\n * flyer template modal section.\n * Example interface: UiTemplateFlyerInterface\n * modals?: { [key: string]: UiTemplateFlyerModal };\n *\n * The modalId you pass should be the key in the above example. This will render out inside a bw-modal.\n *\n * MODAL_CLOSE -> Used to dismiss the modal and clear data from the route snapshot.\n */\nconst GetUiTemplateActionRoute: { [key: string]: (arg?: any) => UiTemplateBaseActionRoute } = {\n ROUTE_TO: (appendRouteInfo: string[]) => ({\n route: [...appendRouteInfo],\n options: { queryParams: { modal: null }, queryParamsHandling: 'merge' },\n }),\n ROUTE_SAME_LEVEL: (appendRouteInfo: string[]) => ({\n route: ['./', ...appendRouteInfo],\n options: { queryParams: { modal: null }, queryParamsHandling: 'merge' },\n }),\n MODAL_OPEN: (modalId: string) => ({ route: [], options: { queryParams: { modal: modalId }, queryParamsHandling: 'merge' } }),\n MODAL_CLOSE: () => ({ route: [], options: { queryParams: { modal: null }, queryParamsHandling: 'merge' } }),\n};\n\n/**\n * Used in action function handlers to help define what the\n * argument for updating state looks like.\n *\n * Expected function is like: UiTemplateStateHandlerService.updateWithPartial\n */\ntype UiTemplateActionUpdateStateFunctionType = (partialState: DeepPartial) => void;\n\n/**\n * Used when something is needed to utilize the injection but not\n * affect the current template data directly.\n *\n * Arguments\n * injector: Injector,\n *\n */\ntype UiTemplateActionInjectorFunctionType = (injector: Injector) => void;\n\n/**\n * Utilize this to handle actions that need to act on state information\n * and trigger unrelated event or simple state updates\n *\n * Arguments\n * state?: UiTemplateState,\n * updateState?: UiTemplateActionUpdateStateFunctionType\n *\n * RETURNS \n */\ntype UiTemplateBaseActionFunction = (\n state?: UiTemplateState,\n updateState?: UiTemplateActionUpdateStateFunctionType\n) => void | null | undefined | UiTemplateBaseActionRoute;\n\n/**\n * Utilize this to handle actions that need to act on state information\n * and return a route detail directly to handler.\n *\n * Arguments\n * state?: UiTemplateState,\n * updateState?: UiTemplateActionUpdateStateFunctionType\n *\n * RETURNS \n */\ntype UiTemplateActionFunctionReturnRouter = (\n state?: UiTemplateState,\n updateState?: UiTemplateActionUpdateStateFunctionType\n) => UiTemplateBaseActionRoute;\n\n/**\n * Anytime you add a new action interface you should include here so\n * it's included as a supported type in interfaces.\n */\ntype UiTemplateBaseAction = UiTemplateBaseActionRoute | UiTemplateActionFunctionReturnRouter | UiTemplateBaseActionFunction;\n\nexport {\n GetUiTemplateActionRoute,\n UiTemplateAction,\n UiTemplateActionFunctionReturnRouter,\n UiTemplateActionInjectorFunctionType,\n UiTemplateActionUpdateStateFunctionType,\n UiTemplateBaseAction,\n UiTemplateBaseActionFunction,\n UiTemplateBaseActionRoute,\n UiTemplateLifecycleHook,\n UiTemplateNavType,\n};\n","import { ChangeDetectorRef, Component, Injector, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { Subscription } from 'rxjs';\nimport { throttleTime } from 'rxjs/operators';\n\nimport {\n UiTemplateAction,\n UiTemplateActionFunctionReturnRouter,\n UiTemplateBaseActionFunction,\n UiTemplateLifecycleHook,\n} from './model/page-template.enum';\nimport { UiTemplateBaseActionRoute, UiTemplateBaseInterface } from './model/page-template.interface';\n\nexport interface OnTemplateDataChanged {\n data: UiTemplateBaseInterface;\n\n /**\n * This method is called (and should always call super) when data input values change.\n */\n templateDataChanged(): void;\n\n /**\n * This method is called (and should always call super) when route query params change\n */\n queryParamsChanged(): void;\n}\n\n@Component({\n template: '',\n})\nexport class UiTemplateBaseComponent implements OnDestroy, OnInit, OnChanges, OnTemplateDataChanged {\n public hasRoutingLocked = false;\n public hasActionLocked = false;\n\n public shouldReverseExitAnimation = false;\n\n private _sub = new Subscription();\n\n /**\n * If you wish to have developer logging turn this on\n *\n * Default: true\n */\n protected allowVerboseDebugMode = true;\n\n /**\n * Override this if you want your template to log\n * with certain prefix string\n *\n * Default: 'UI Template Log - '\n */\n protected logPrefix = 'UI Template Log - ';\n\n /**\n * This can be set to true when query params should be subscribed to\n *\n * Default: false\n */\n protected shouldWatchQueryParams = false;\n\n /**\n * Allow developer to pass in data with an object\n *\n * Interface UiTemplateBaseInterface\n */\n data: UiTemplateBaseInterface;\n\n constructor(\n protected activatedRoute: ActivatedRoute,\n protected changeDetectorRef: ChangeDetectorRef,\n protected injector: Injector,\n protected router: Router\n ) {}\n\n ngOnInit(): void {\n this.checkAndValidateDataFromActivatedRoute();\n this.checkForFlagsBasedOnData();\n\n this.startWatchingQueryParams();\n }\n\n ngOnDestroy(): void {\n this._sub.unsubscribe();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n //If changes happened\n if (!changes['data'].isFirstChange()) {\n this.templateDataChanged();\n }\n }\n\n private get hasDataDefined(): boolean {\n return this.data !== undefined && Object.keys(this.data).length > 0;\n }\n\n private get hasHooksDefined(): boolean {\n return Boolean(this.data?.hooks) && Object.keys(this.data.hooks || {}).length > 0;\n }\n\n private startWatchingQueryParams() {\n if (this.shouldWatchQueryParams) {\n this._sub.add(\n this.activatedRoute.queryParams.pipe(throttleTime(1000)).subscribe(() => {\n this.logForDebugging('startWatchingQueryParams - Query Param Changed');\n\n this.queryParamsChanged();\n })\n );\n }\n }\n\n private checkForFlagsBasedOnData() {\n if ((this.data as any)['modals']) {\n this.shouldWatchQueryParams = true;\n }\n }\n\n private checkAndValidateDataFromActivatedRoute() {\n this.logForDebugging('checkAndValidateDataFromActivatedRoute', this.activatedRoute);\n\n //Only load data if we don't have data defined yet. This helps us avoid the modals have route defined data\n if (!this.hasDataDefined && this.activatedRoute.snapshot?.data && this.activatedRoute.snapshot.data['templateData']) {\n const templatedData: UiTemplateBaseInterface = this.activatedRoute.snapshot.data['templateData'];\n\n this.logForDebugging('Template Data', templatedData);\n\n this.data = templatedData;\n }\n\n //Check if we have a data object yet.\n //Should be true when one is present with at least 1 key/value pair\n if (this.hasDataDefined) {\n this.templateDataChanged();\n\n this.runLifeCycleEvent(UiTemplateLifecycleHook.templateDataInitLoaded);\n }\n }\n\n private checkForDeveloperSettingsFromData() {\n if (this.data.developer) {\n //Should maybe not make this hard coded later... but not sure about allowing anything to be overwritten\n this.allowVerboseDebugMode =\n this.data.developer.allowVerboseDebugMode === undefined\n ? this.allowVerboseDebugMode\n : this.data.developer.allowVerboseDebugMode;\n this.logPrefix = this.data.developer.logPrefix === undefined ? this.logPrefix : this.data.developer.logPrefix;\n }\n }\n\n protected get sub(): Subscription {\n return this._sub;\n }\n\n public queryParamsChanged(): void {\n this.logForDebugging('queryParamsChanged (core)', this.activatedRoute.snapshot.queryParams);\n }\n\n public templateDataChanged(): void {\n this.logForDebugging('templateDataChanged (core)', this.data);\n\n this.checkForDeveloperSettingsFromData();\n }\n\n protected logForDebugging(message?: any, ...optionalParams: any[]) {\n if (this.allowVerboseDebugMode) console.log(`main:${this.logPrefix || ''}`, message, optionalParams);\n }\n\n /**\n *\n *\n * @param action \n * @returns void\n */\n protected runLifeCycleEvent(lifeCycle: UiTemplateLifecycleHook): void {\n //If there are no hooks, exit\n if (!this.hasHooksDefined) {\n return;\n }\n\n /**\n * Make sure we have a hook in the template for this given\n * life cycle hook to make sure we have something needing\n * to be called.\n */\n const hookFn = (this.data?.hooks || {})[lifeCycle];\n\n if (hookFn) {\n hookFn(this.injector);\n }\n }\n\n /**\n * This should be used to understand what the name of\n * the template component is. Which is used for logging\n * in console.\n */\n public get templateDisplayName() {\n return this.logPrefix || '';\n }\n\n public routeTo(routeInfo: UiTemplateBaseActionRoute, actionKey?: UiTemplateAction) {\n if (this.hasRoutingLocked) {\n console.warn('UITemplate: Trying to route when another route event is in progress');\n return;\n }\n\n this.logForDebugging('routing to', routeInfo.route);\n this.logForDebugging('routing with options', routeInfo.options);\n this.logForDebugging('routing from', this.activatedRoute);\n\n if (actionKey === UiTemplateAction.navLeftIcon) {\n this.shouldReverseExitAnimation = true;\n this.changeDetectorRef.detectChanges();\n }\n\n //this.hasRoutingLocked = true;\n this.router\n .navigate(routeInfo.route, {\n relativeTo: this.activatedRoute,\n queryParamsHandling: 'preserve',\n ...routeInfo.options,\n queryParams: {\n entryAt: new Date().getTime(),\n ...routeInfo.options?.queryParams,\n },\n })\n .then((routeWorked) => {\n //this.hasRoutingLocked = false;\n this.logForDebugging('routing result', routeWorked);\n })\n .catch((err) => {\n this.logForDebugging('routing had error', err);\n })\n .finally(() => {\n this.logForDebugging('routing hit finally');\n });\n this.changeDetectorRef.markForCheck();\n }\n\n public executeAction(action: UiTemplateActionFunctionReturnRouter | UiTemplateBaseActionFunction) {\n if (this.hasActionLocked) {\n console.warn('UITemplate: Trying to trigger action when another action is in progress');\n return;\n }\n\n this.hasActionLocked = true;\n const actionFnResponse = action();\n this.hasActionLocked = false;\n\n //Check if the response has a route\n if (actionFnResponse && actionFnResponse.route) {\n this.routeTo(actionFnResponse);\n return;\n }\n }\n}\n","import { BehaviorSubject, Observable } from 'rxjs';\nimport { distinctUntilChanged } from 'rxjs/operators';\n\nexport class StateSubject extends BehaviorSubject {\n private initialValue: T;\n\n constructor(value: T) {\n super(value);\n this.initialValue = value;\n }\n\n get value$(): Observable {\n //ToDo: Need deep matching here\n return super.asObservable();\n }\n\n update(value: T): void {\n this.next(value);\n }\n\n reset(): void {\n this.next(this.initialValue);\n }\n}\n","import * as deepEqual from 'fast-deep-equal';\nimport { Subject, Observable } from 'rxjs';\nimport { distinctUntilChanged, map, takeUntil } from 'rxjs/operators';\n\nimport { DeepMerge } from '@micro-core/utility';\n\nimport { StateSubject } from './state-subject';\n\nimport { DeepPartial, UiTemplatePageStateCondition } from './state.interface';\n\nexport class Store {\n private unsubscriber: Subject;\n private state: StateSubject;\n\n get isReady() {\n return Boolean(this.state);\n }\n\n initialize(state: T, unsubscriber: Subject): void {\n this.state = new StateSubject(state);\n this.unsubscriber = unsubscriber;\n }\n\n isStateEqualWith(checkWithState: DeepPartial) {\n if (!this.isReady) {\n console.warn('State NOT READY');\n return false;\n }\n\n const currentState = this.getState();\n const newPossibleState = DeepMerge(checkWithState, currentState);\n\n return deepEqual(currentState, newPossibleState);\n }\n\n setState(value: DeepPartial, conditions?: UiTemplatePageStateCondition[]): void {\n if (!this.isReady) {\n console.warn('State NOT READY');\n return;\n }\n\n let preparedNewState = DeepMerge(this.state.value, value);\n\n if (conditions) {\n const pendingUpdatedKeys = Object.keys(value);\n\n conditions.forEach((conditionCheck: UiTemplatePageStateCondition) => {\n const hasTriggerMatch = conditionCheck.triggeringKeys.filter((key) => pendingUpdatedKeys.includes(key)).length > 0;\n\n if (hasTriggerMatch) {\n preparedNewState = conditionCheck.manualConditionRunner(preparedNewState);\n }\n });\n }\n\n this.state.next(preparedNewState);\n }\n\n getState(): T | Record {\n if (!this.isReady) {\n console.warn('State NOT READY');\n return {};\n }\n\n return this.state.value;\n }\n\n withKey$(key: K): Observable | undefined {\n if (this.isReady) {\n return this.state.value$.pipe(\n map((state) => state[key]),\n distinctUntilChanged((a, b) => deepEqual(a, b)),\n takeUntil(this.unsubscriber)\n );\n }\n\n return undefined;\n }\n\n reset(): void {\n if (!this.isReady) {\n console.warn('State NOT READY');\n return;\n }\n\n this.state.reset();\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DeepPartial, UiTemplateState, UiTemplatePageStateCondition } from './state.interface';\nimport { Store } from './state.service';\n\nimport { UiTemplateStateInterface } from '../../shared/state-page-template.component';\n\n//ToDo: maybe this should be { providedIn: 'root', }\n\n@Injectable({ providedIn: 'root' })\nexport class UiTemplateStateHandlerService extends Store {\n /**\n * We are keeping track of the initial state and last updates. Don't look to these\n * for information for the client. Should be used as validation/debugging tool only.\n *\n * Default: undefined\n */\n private _initial: UiTemplateState | undefined;\n private _lastUpdateWith: DeepPartial | undefined;\n\n /**\n * Keep direct reference to the conditions in-case a child is updating state\n * without direct access to the conditions.\n *\n * Default: undefined\n */\n private _conditions: UiTemplatePageStateCondition[] | undefined;\n\n /**\n * Tracking change log for validation and debugging\n *\n * Default: []\n */\n private _changeLog: {\n updatedAt: string;\n with: DeepPartial | undefined;\n }[] = [];\n\n /**\n * If you wish to have developer logging turn this on\n *\n * Default: true\n */\n protected allowVerboseDebugMode = true;\n protected logPrefix = 'state-handler:';\n\n protected logForDebugging(message?: any, ...optionalParams: any[]) {\n if (this.allowVerboseDebugMode) console.log(`${this.logPrefix} - `, message, optionalParams);\n }\n\n private addLastChange() {\n this._changeLog.push({ updatedAt: new Date().toTimeString(), with: this._lastUpdateWith });\n }\n\n /**\n * Very important to clean this stuff up when destroyed.\n */\n public destroy() {\n this.reset();\n\n this._initial = undefined;\n this._lastUpdateWith = undefined;\n this._conditions = undefined;\n\n this._changeLog = [];\n }\n\n public isNotEmpty(checkObj: DeepPartial | undefined) {\n return !checkObj || Object.keys(checkObj).length > 0;\n }\n\n public updateWithInterface(details: UiTemplateStateInterface) {\n if (!details.state) {\n this.logForDebugging('Eh, called without any state details. If you only have partial state update, just pass that');\n return;\n }\n\n this.logForDebugging(\n 'Condition Checks (updateWithInterface)',\n this.isNotEmpty(details.state.initial),\n this.isNotEmpty(details.state.updateWith)\n );\n\n if (details && this.isNotEmpty(details.state.initial) && this.isNotEmpty(details.state.updateWith)) {\n this._initial = details.state.initial;\n this._lastUpdateWith = details.state.updateWith;\n\n this.setState(details.state.updateWith || {}, details.stateConditions);\n this.addLastChange();\n\n this.logForDebugging('Updated State', this.getState());\n }\n }\n\n public updateWithPartial(partialState: DeepPartial) {\n this.logForDebugging('Condition Checks (updateWithPartial)', this.isNotEmpty(partialState));\n\n if (this.isNotEmpty(partialState)) {\n this._lastUpdateWith = partialState;\n\n this.setState(partialState, this._conditions);\n this.addLastChange();\n }\n }\n}\n","enum UiTemplateStateKey {\n CHILD_MODAL = 'state_child_modal',\n CTA_1 = 'state_cta1',\n CTA_2 = 'state_cta2',\n FOOTER_CHECKED = 'state_footer_checked',\n FORM = 'state_form',\n HEADER_MENU = 'state_menu',\n}\n\nexport { UiTemplateStateKey };\n","import { ChangeDetectorRef, Component, Injector, OnDestroy, OnInit } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { Subject } from 'rxjs';\n\nimport { UiTemplateBaseComponent } from './base-page-template.component';\n\nimport { UiTemplateStateHandlerService } from '../service/state-handler/state-handler.service';\nimport { UiTemplateStateKey } from '../service/state-handler/state.enum';\nimport { DeepPartial, UiTemplatePageStateCondition, UiTemplateState } from '../service/state-handler/state.interface';\n\nexport interface OnTemplateStateChanged {\n /**\n *\n */\n templateStateChanged(): void;\n}\n\nimport { UiTemplateBaseInterface } from './model/page-template.interface';\n\nexport interface UiTemplateStateInterface extends UiTemplateBaseInterface {\n state?: {\n initial?: UiTemplateState;\n updateWith?: DeepPartial;\n };\n stateConditions?: UiTemplatePageStateCondition[];\n}\n\n@Component({\n template: '',\n})\nexport class UiTemplateStateComponent extends UiTemplateBaseComponent implements OnDestroy, OnInit, OnTemplateStateChanged {\n private stateUnsubscriber: Subject = new Subject();\n\n override logPrefix = '';\n override data: UiTemplateStateInterface;\n\n /**\n * state handler should be the only way to update/access\n * state.\n *\n * Interface UiTemplateStateHandler\n */\n stateKeys = UiTemplateStateKey;\n\n constructor(\n public state: UiTemplateStateHandlerService,\n protected activatedRoute: ActivatedRoute,\n protected changeDetectorRef: ChangeDetectorRef,\n protected injector: Injector,\n protected router: Router\n ) {\n super(activatedRoute, changeDetectorRef, injector, router);\n }\n\n ngOnInit(): void {\n super.ngOnInit();\n\n if (this.state.isNotEmpty(this.data.state?.initial)) {\n this.logForDebugging('Init state');\n\n this.state.initialize(this.data.state?.initial || {}, this.stateUnsubscriber);\n\n this.templateStateChanged();\n }\n }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n\n this.stateUnsubscriber?.unsubscribe();\n this.state?.destroy();\n }\n\n private _templateDataChanged(): void {\n this.logForDebugging(\n 'Condition Checks (templateDataChanged)',\n this.state.isNotEmpty(this.data.state?.initial),\n this.state.isNotEmpty(this.data.state?.updateWith),\n !this.state.isStateEqualWith(this.data.state?.updateWith || {})\n );\n\n if (\n this.state.isNotEmpty(this.data.state?.initial) &&\n this.state.isNotEmpty(this.data.state?.updateWith) &&\n !this.state.isStateEqualWith(this.data.state?.updateWith || {})\n ) {\n this.logForDebugging('Template state change 1');\n\n this.templateStateChanged();\n }\n }\n\n private _checkForConditionalChanges(pendingState: UiTemplateState): UiTemplateState {\n return pendingState;\n }\n\n protected setUpdateStateForKey(updateStateKey: UiTemplateStateKey, updateStateValue: unknown) {\n this.setUpdateStateWith({ [updateStateKey]: updateStateValue });\n }\n\n protected setUpdateStateWith(partialState: DeepPartial) {\n if (this.data.state) {\n this.data.state.updateWith = partialState;\n }\n\n this.templateStateChanged();\n }\n\n public templateDataChanged(): void {\n super.templateDataChanged();\n\n this._templateDataChanged();\n }\n\n public templateStateChanged(): void {\n this.state.updateWithInterface(this.data);\n }\n}\n","import {\n UiTemplateAction,\n UiTemplateActionFunctionReturnRouter,\n UiTemplateBaseActionFunction,\n UiTemplateBaseActionRoute,\n} from '../../shared/model/page-template.enum';\nimport { UiTemplateBaseActions } from '../../shared/model/page-template.interface';\n\nimport { UiTemplateStateComponent } from '../../shared/state-page-template.component';\nimport { UiTemplateBaseComponent } from '../../shared/base-page-template.component';\n\ntype ActionFunction = UiTemplateActionFunctionReturnRouter | UiTemplateBaseActionFunction;\n\nexport class UiTemplateActionHandler {\n /**\n * If you wish to have developer logging turn this on\n *\n * Default: true\n */\n protected allowVerboseDebugMode = true;\n protected logPrefix = '';\n\n protected lastExecutedActionKey: UiTemplateAction;\n\n constructor(\n private actions: UiTemplateBaseActions = {},\n private uiComponent: UiTemplateStateComponent | UiTemplateBaseComponent | undefined = undefined\n ) {\n this.logForDebugging(actions);\n\n if (uiComponent) this.updateUiComponent(uiComponent);\n\n this.updateActions(actions);\n }\n\n protected logForDebugging(message?: any, ...optionalParams: any[]) {\n if (this.allowVerboseDebugMode)\n console.log(`action:${this.uiComponent?.templateDisplayName || ''} - `, message, optionalParams);\n }\n\n /**\n * Will execute the target action, providing state when applicable.\n * If the action produces a routing side affect, it will be handled\n * via the uiComponent routeTo method\n *\n * @param action \n * @returns void\n */\n protected action(action: UiTemplateBaseActionFunction): void {\n if (!this.uiComponent || this.uiComponent.hasActionLocked) {\n console.warn('UiTemplateActionHandler: Trying to trigger action when another action is in progress');\n return;\n }\n\n //Lock actions until this one is complete\n this.uiComponent.hasActionLocked = true;\n\n const state = (this.uiComponent as UiTemplateStateComponent).state || undefined;\n const stateObj = state.getState() || undefined;\n const stateUpdateWith = state?.updateWithPartial.bind(state) || undefined;\n\n const actionFnResponse = action(stateObj, stateUpdateWith);\n\n this.logForDebugging('response of action function', actionFnResponse);\n\n //Unlock actions\n this.uiComponent.hasActionLocked = false;\n\n //If the action returns a route object, let's direct traffic there.\n if (actionFnResponse?.route) {\n this.uiComponent.routeTo(actionFnResponse, this.lastExecutedActionKey);\n }\n }\n\n updateActions(actions: UiTemplateBaseActions) {\n this.actions = actions;\n }\n\n updateUiComponent(uiComponent: UiTemplateBaseComponent) {\n this.uiComponent = uiComponent;\n }\n\n clear() {\n this.actions = {};\n this.uiComponent = undefined;\n }\n\n executeAction(actionKey: UiTemplateAction) {\n this.logForDebugging('executeAction with ', actionKey);\n this.lastExecutedActionKey = actionKey;\n\n //Check if we don't have a UI component\n if (!this.uiComponent) {\n this.logForDebugging('We could not complete this action because we do not have a UI component reference');\n return;\n }\n\n //Check if we have an action to use\n if (!this.actions[actionKey]) {\n this.logForDebugging('We could not complete this action. There was nothing configured in your template data');\n return;\n }\n\n if (typeof this.actions[actionKey] === 'function') {\n this.logForDebugging('executeAction ACTION FUNCTION');\n\n this.action(this.actions[actionKey] as ActionFunction);\n return;\n }\n\n this.uiComponent.routeTo(this.actions[actionKey] as UiTemplateBaseActionRoute, this.lastExecutedActionKey);\n }\n}\n","\n \n
\n \n \n\n \n \n
\n\n
\n \n
\n\n \n \n\n \n\n \n \n\n \n \n \n\n \n
\n \n {{ fromDataFooter.inputs.link | translate }}\n \n\n \n \n {{ fromDataFooter.inputs.confirmBox | translate }}\n \n \n
\n \n\n \n
\n
\n\n\n \n\n\n\n\n \n
\n \n
\n
\n
\n\n","import {\n Component,\n Input,\n OnDestroy,\n ViewEncapsulation\n} from '@angular/core';\n\nimport {\n UiFooterDefaultData,\n UiFooterType,\n UiHeaderDefaultInputs,\n UiHeaderEyebrowInputs,\n UiMoleculeMedia,\n UiMoleculeMediaType,\n UiNavigationExitData,\n UiNavigationExitType,\n} from '@micro-ui/molecule';\nimport { UiTemplateContent } from '@micro-ui/template/content';\n\nimport { UiTemplateStateComponent, UiTemplateStateInterface } from '../shared/state-page-template.component';\n\nimport { UiTemplateNavType, UiTemplateAction } from '../shared/model/page-template.enum';\nimport { UiTemplateBaseActions, UiTemplateBaseInputs } from '../shared/model/page-template.interface';\n\nimport { UiTemplateActionHandler } from '../service/action-handler/action-handler.shared';\nimport { PageTransitionAnimationTriggers } from '../util/page-transition/page-transition.component';\n\nexport interface UiTemplateFlyerInterface extends UiTemplateStateInterface {\n inputs: UiTemplateFlyerInputs;\n modals?: { [key: string]: UiTemplateFlyerModal };\n actions: UiTemplateFlyerActions;\n}\n\nexport interface UiTemplateFlyerInputs extends UiTemplateBaseInputs {\n content?: UiTemplateContent[];\n header?: UiHeaderDefaultInputs | UiHeaderEyebrowInputs;\n media?: UiTemplateFlyerMedia[];\n viewName: string;\n}\n\nexport interface UiTemplateFlyerModal {\n modalId: string;\n data: UiTemplateFlyerInterface;\n}\n\nexport type UiTemplateFlyerActions = UiTemplateBaseActions;\nexport type UiTemplateFlyerMedia = UiMoleculeMedia;\n\nexport const UiTemplateFlyerMediaType = UiMoleculeMediaType;\n\n@Component({\n animations: PageTransitionAnimationTriggers,\n selector: 'ui-page-flyer',\n templateUrl: './flyer-page-template.component.html',\n styleUrls: ['./flyer-page-template.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class UiTemplateFlyerComponent extends UiTemplateStateComponent implements OnDestroy {\n @Input() override data: UiTemplateFlyerInterface;\n @Input() override logPrefix = 'UiTemplateFlyer -';\n @Input() override allowVerboseDebugMode = false;\n\n animationTriggerName = 'pageEnterFromRight';\n\n //Make sure the nav types can be used in template\n navType = UiTemplateNavType;\n action = UiTemplateAction;\n\n /**\n * The properties that began with fromData should not be set outside\n * templateDataChanged.\n */\n fromDataAction: UiTemplateActionHandler = new UiTemplateActionHandler();\n fromDataActions: UiTemplateFlyerActions; //Don't call these directly, please only use to check if action is present\n fromDataContent: UiTemplateContent[];\n fromDataFooter: UiFooterDefaultData;\n fromDataHeader: UiHeaderDefaultInputs | UiHeaderEyebrowInputs;\n fromDataMedia: UiTemplateFlyerMedia[];\n fromDataNavigation: UiNavigationExitData;\n fromDataTrackingDetail = { event_name: '' };\n\n fromDataActiveModal: UiTemplateFlyerModal | undefined;\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n\n this.resetFromDataAction();\n }\n\n private resetFromDataAction() {\n //this.fromDataAction =\n }\n\n private updateActionsFromData() {\n this.fromDataActions = this.data?.actions || {};\n\n this.fromDataAction.updateUiComponent(this);\n this.fromDataAction.updateActions(this.fromDataActions);\n }\n\n private updateFooterFromData() {\n this.fromDataFooter = {\n inputs: {\n cta1Label: this.data?.inputs?.cta1Label || '',\n cta2Label: this.data?.inputs?.cta2Label || '',\n trackingDetail: this.fromDataTrackingDetail,\n link: this.data?.inputs?.link || '',\n infoText: this.data?.inputs?.infoText || '',\n confirmBox: this.data?.inputs?.confirmBox || '',\n type: UiFooterType.DEFAULT,\n },\n };\n }\n\n public queryParamsChanged(): void {\n super.queryParamsChanged();\n\n const targetModalId: string = this.activatedRoute.snapshot.queryParams['modal'] || '';\n\n //This is to clean out any modal if not there\n if (!targetModalId) {\n this.fromDataActiveModal = undefined;\n return;\n }\n\n if (!this.data.modals || !this.data.modals[targetModalId]) {\n console.warn('Eh, looks like there is a modal trying to load without any data in the templateData for it.');\n return;\n }\n\n this.fromDataActiveModal = this.data.modals[targetModalId];\n this.animationTriggerName = 'pageStayPut';\n\n this.logForDebugging('queryParamsChanged - Modal Found', this.fromDataActiveModal.data);\n }\n\n public templateDataChanged(): void {\n super.templateDataChanged();\n\n if (!this.data?.inputs) {\n return;\n }\n\n this.fromDataTrackingDetail.event_name = this.data?.inputs?.viewName || 'flyer_template';\n\n if (this.data.inputs.content) {\n this.fromDataContent = this.data.inputs.content;\n }\n\n if (this.data.inputs.header) {\n this.fromDataHeader = this.data.inputs.header;\n }\n\n if (this.data.inputs.media) {\n this.fromDataMedia = this.data.inputs.media;\n }\n\n if (this.data.inputs.navType) {\n this.fromDataNavigation = {\n inputs: {\n trackingDetail: this.fromDataTrackingDetail,\n type: this.data.inputs.navType.toString() as UiNavigationExitType,\n },\n };\n }\n\n this.updateActionsFromData();\n this.updateFooterFromData();\n }\n\n public templateStateChanged(): void {\n super.templateStateChanged();\n }\n}\n","
\n
\n {{ data.inputs.header?.title || '' | translate }}\n\n

\n
\n\n
\n \n \n \n
\n\n
\n

\n {{ fromDataFooter.inputs.infoText | translate }}\n

\n\n \n
\n
\n","import { Component, ViewEncapsulation, Input, ChangeDetectionStrategy } from '@angular/core';\n\nimport { UseThisForStandaloneOrThat } from '@micro-core/message-bus';\n\nimport { UiFooterDefaultData, UiFooterType } from '@micro-ui/molecule';\nimport { UiTemplateFormContentValueChanged } from '@micro-ui/template/content';\n\nimport { UiTemplateAction } from '../shared/model/page-template.enum';\nimport { UiTemplateStateKey } from '../service/state-handler/state.enum';\n\nimport { UiTemplateBaseComponent } from '../shared/base-page-template.component';\n\nimport { UiTemplateActionHandler } from '../service/action-handler/action-handler.shared';\nimport { UiTemplateStateHandlerService } from '../service/state-handler/state-handler.service';\n\nimport { UiTemplateFormFlyerInterface } from '../form-flyer/form-flyer-page-template.component';\n\n@Component({\n selector: 'ui-page-half-sheet',\n templateUrl: './half-sheet-page-template.component.html',\n styleUrls: [],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class UiTemplateHalfSheetComponent extends UiTemplateBaseComponent {\n @Input() override data: UiTemplateFormFlyerInterface;\n @Input() override logPrefix = 'UiTemplateHalfSheetComponent -';\n @Input() override allowVerboseDebugMode = false;\n\n @Input() state: UiTemplateStateHandlerService;\n\n /**\n * state handler should be the only way to update/access\n * state.\n *\n * Interface UiTemplateStateHandler\n */\n stateKeys = UiTemplateStateKey;\n\n //Make sure the nav types can be used in template\n action = UiTemplateAction;\n\n fromDataAction: UiTemplateActionHandler = new UiTemplateActionHandler();\n fromDataFooter: UiFooterDefaultData;\n fromDataTrackingDetail = { event_name: '' };\n\n private updateActionsFromData() {\n this.fromDataAction.updateUiComponent(this);\n this.fromDataAction.updateActions(this.data?.actions || {});\n }\n\n private updateFooterFromData() {\n this.fromDataFooter = {\n inputs: {\n cta1Label: this.data?.inputs?.cta1Label || '',\n cta2Label: this.data?.inputs?.cta2Label || '',\n trackingDetail: this.fromDataTrackingDetail,\n link: this.data?.inputs?.link || '',\n infoText: this.data?.inputs?.infoText || '',\n type: UiFooterType.ROW,\n },\n };\n }\n\n public templateDataChanged(): void {\n super.templateDataChanged();\n\n if (!this.data?.inputs) {\n return;\n }\n\n this.fromDataTrackingDetail.event_name = this.data?.inputs?.viewName || 'halfsheet_modal';\n\n this.updateActionsFromData();\n this.updateFooterFromData();\n\n this.logForDebugging('Current State', this.state.getState());\n }\n\n public formValueChanged(change: UiTemplateFormContentValueChanged) {\n if (change && change.name) {\n this.state.updateWithPartial({ [UiTemplateStateKey.CHILD_MODAL]: { [change.name]: change.value } });\n } else {\n console.warn('UiTemplateFormFlyerComponent Form value was changed but it is missing the name or entire object.');\n }\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { RouterModule } from '@angular/router';\nimport { TranslateModule } from '@ngx-translate/core';\n\nimport { BrightsideUiModule } from '@brightside/brightside-ui';\n\nimport { MicroCoreUtilityModule } from '@micro-core/utility';\nimport { MicroUiMoleculeModule } from '@micro-ui/molecule';\nimport { MicroUiTemplateContentModule } from '@micro-ui/template/content';\n\nimport { UiTemplateFlyerComponent } from './flyer/flyer-page-template.component';\nimport { UiTemplateFormFlyerComponent } from './form-flyer/form-flyer-page-template.component';\nimport { UiTemplateHalfSheetComponent } from './half-sheet/half-sheet-page-template.component';\n\nimport { UiTemplateModalRouterComponent } from './util/modal-router/modal-router.component';\n\nimport { UiTemplateStateHandlerService } from './service/state-handler/state-handler.service';\nimport { UiTemplatePageTransitionComponent } from './util/page-transition/page-transition.component';\nimport { UiTemplatePageTransitionService } from './util/page-transition/page-transition.service';\n\n@NgModule({\n imports: [\n BrightsideUiModule,\n CommonModule,\n MicroCoreUtilityModule,\n MicroUiMoleculeModule,\n MicroUiTemplateContentModule,\n ReactiveFormsModule,\n RouterModule,\n TranslateModule,\n ],\n declarations: [\n UiTemplateFlyerComponent,\n UiTemplateFormFlyerComponent,\n UiTemplateHalfSheetComponent,\n UiTemplateModalRouterComponent,\n UiTemplatePageTransitionComponent,\n ],\n exports: [UiTemplatePageTransitionComponent],\n providers: [UiTemplatePageTransitionService, UiTemplateStateHandlerService],\n})\nexport class MicroUiTemplatePageModule {}\n","//! moment.js locale configuration\n//! locale : Azerbaijani [az]\n//! author : topchiyev : https://github.com/topchiyev\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var suffixes = {\n 1: '-inci',\n 5: '-inci',\n 8: '-inci',\n 70: '-inci',\n 80: '-inci',\n 2: '-nci',\n 7: '-nci',\n 20: '-nci',\n 50: '-nci',\n 3: '-üncü',\n 4: '-üncü',\n 100: '-üncü',\n 6: '-ncı',\n 9: '-uncu',\n 10: '-uncu',\n 30: '-uncu',\n 60: '-ıncı',\n 90: '-ıncı',\n };\n\n var az = moment.defineLocale('az', {\n months: 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split(\n '_'\n ),\n monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'),\n weekdays:\n 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split(\n '_'\n ),\n weekdaysShort: 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'),\n weekdaysMin: 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[bugün saat] LT',\n nextDay: '[sabah saat] LT',\n nextWeek: '[gələn həftə] dddd [saat] LT',\n lastDay: '[dünən] LT',\n lastWeek: '[keçən həftə] dddd [saat] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s sonra',\n past: '%s əvvəl',\n s: 'bir neçə saniyə',\n ss: '%d saniyə',\n m: 'bir dəqiqə',\n mm: '%d dəqiqə',\n h: 'bir saat',\n hh: '%d saat',\n d: 'bir gün',\n dd: '%d gün',\n M: 'bir ay',\n MM: '%d ay',\n y: 'bir il',\n yy: '%d il',\n },\n meridiemParse: /gecə|səhər|gündüz|axşam/,\n isPM: function (input) {\n return /^(gündüz|axşam)$/.test(input);\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'gecə';\n } else if (hour < 12) {\n return 'səhər';\n } else if (hour < 17) {\n return 'gündüz';\n } else {\n return 'axşam';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,\n ordinal: function (number) {\n if (number === 0) {\n // special case for zero\n return number + '-ıncı';\n }\n var a = number % 10,\n b = (number % 100) - a,\n c = number >= 100 ? 100 : null;\n return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return az;\n\n})));\n","import { Component } from '@angular/core';\nimport {MessageBusEventUtil, MessageBusInternalService} from \"@micro-core/message-bus\";\nimport {MobileStateService} from \"@brightside-web/desktop/data-access/shared\";\nimport {take} from \"rxjs/operators\";\n\n@Component({\n selector: 'brightside-web-terms',\n templateUrl: './terms.component.html',\n styleUrls: ['./terms.component.css']\n})\nexport class TermsComponent {\n\n constructor(private msService: MobileStateService) { }\n\n closeEvent($event: boolean) {\n this.leaveTermsUpdate();\n }\n\n termsAccepted($event: boolean) {\n if ($event) {\n this.leaveTermsUpdate();\n }\n }\n\n leaveTermsUpdate() {\n this.msService.put( {\n \"redirectCompleted\": true\n }).pipe(take(1)).subscribe(\n resp => {\n MessageBusInternalService.sendOutgoingHubEvent(MessageBusEventUtil.event.standard.exitFeature);\n }\n )\n }\n}\n","
\n\n","import { NgModule } from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport { LandingComponent } from './landing/landing.component';\nimport {BrightsideUiModule} from \"@brightside/brightside-ui\";\nimport {BrightsideUiServicesModule} from \"@brightside/brightside-ui-services\";\nimport {RouterModule, Routes} from \"@angular/router\";\nimport {SharedDisplayModule} from \"@brightside-web/shared/display\";\nimport {\n FirebaseAnalyticsService,\n FirebaseService, MicroCoreUtilityModule,\n MicroUtilTranslationService\n} from \"@micro-core/utility\";\n\nimport {TranslateModule, TranslateService} from \"@ngx-translate/core\";\nimport {MicroUiMoleculeModule} from \"@micro-ui/molecule\";\nimport {MicroUiTemplatePageModule} from \"@micro-ui/template/page\";\nimport {ReactiveFormsModule} from \"@angular/forms\";\nimport {SharedDesktopModule} from \"@brightside-web/shared/desktop\";\nimport { TermsComponent } from './terms/terms.component';\nimport { SharedLegalDocumentsModule } from \"@brightside-web/shared/legal-documents\";\n\nconst moduleRoutes: Routes = [\n {\n path: '',\n children: [\n {\n path: 'terms',\n component: TermsComponent,\n },\n {\n path: '**',\n redirectTo: 'terms',\n }\n ]\n },\n {\n path: '**',\n redirectTo: 'terms',\n },\n]\n\n@NgModule({\n imports: [\n BrightsideUiModule,\n BrightsideUiServicesModule,\n CommonModule,\n MicroCoreUtilityModule,\n MicroUiMoleculeModule,\n MicroUiTemplatePageModule,\n ReactiveFormsModule,\n RouterModule.forChild(moduleRoutes),\n TranslateModule,\n SharedDesktopModule,\n SharedDisplayModule,\n SharedLegalDocumentsModule\n ],\n declarations: [\n LandingComponent,\n TermsComponent\n ],\n providers: [\n { provide: FirebaseService, useClass: FirebaseAnalyticsService },\n { provide: TranslateService, useClass: MicroUtilTranslationService },\n ],\n})\nexport class MicroTermsUpdateModule {\n constructor() {}\n}\n","import { Injectable } from '@angular/core';\nimport {\n ActivatedRouteSnapshot,\n CanLoad,\n Route,\n Router, RouterStateSnapshot,\n UrlSegment, UrlTree\n} from '@angular/router';\nimport {Observable, of} from 'rxjs';\nimport {MobileStateService} from \"@brightside-web/desktop/data-access/shared\";\nimport {map} from \"rxjs/operators\";\nimport {MessageBusEventUtil, MessageBusInternalService} from \"@micro-core/message-bus\";\n\n@Injectable({\n providedIn: 'root'\n})\nexport class HasTermsUpdateGuard implements CanLoad {\n\n constructor(\n private mobileStateService: MobileStateService,\n private router: Router\n ) {}\n\n canLoad(route: Route, segments: UrlSegment[]): Observable {\n return this.mobileStateService.get().pipe(\n map( (value => {\n if (value.redirect !== \"terms-update\") {\n MessageBusInternalService.sendOutgoingHubEvent(MessageBusEventUtil.event.standard.exitFeature);\n return false;\n }\n return true;\n }))\n );\n }\n\n // use to block routes and force them to go to the terms-update\n canActivate(next: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable {\n return this.mobileStateService.get().pipe(\n map( (value => {\n if (value.redirect === \"terms-update\") {\n this.router.navigate(['terms-update']);\n return false;\n }\n return true;\n }))\n );\n }\n\n}\n","//! moment.js locale configuration\n//! locale : Gujarati [gu]\n//! author : Kaushik Thanki : https://github.com/Kaushik1987\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '૧',\n 2: '૨',\n 3: '૩',\n 4: '૪',\n 5: '૫',\n 6: '૬',\n 7: '૭',\n 8: '૮',\n 9: '૯',\n 0: '૦',\n },\n numberMap = {\n '૧': '1',\n '૨': '2',\n '૩': '3',\n '૪': '4',\n '૫': '5',\n '૬': '6',\n '૭': '7',\n '૮': '8',\n '૯': '9',\n '૦': '0',\n };\n\n var gu = moment.defineLocale('gu', {\n months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split(\n '_'\n ),\n monthsShort:\n 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split(\n '_'\n ),\n weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'),\n weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm વાગ્યે',\n LTS: 'A h:mm:ss વાગ્યે',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm વાગ્યે',\n LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે',\n },\n calendar: {\n sameDay: '[આજ] LT',\n nextDay: '[કાલે] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[ગઇકાલે] LT',\n lastWeek: '[પાછલા] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s મા',\n past: '%s પહેલા',\n s: 'અમુક પળો',\n ss: '%d સેકંડ',\n m: 'એક મિનિટ',\n mm: '%d મિનિટ',\n h: 'એક કલાક',\n hh: '%d કલાક',\n d: 'એક દિવસ',\n dd: '%d દિવસ',\n M: 'એક મહિનો',\n MM: '%d મહિનો',\n y: 'એક વર્ષ',\n yy: '%d વર્ષ',\n },\n preparse: function (string) {\n return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n // Gujarati notation for meridiems are quite fuzzy in practice. While there exists\n // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati.\n meridiemParse: /રાત|બપોર|સવાર|સાંજ/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'રાત') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'સવાર') {\n return hour;\n } else if (meridiem === 'બપોર') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'સાંજ') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'રાત';\n } else if (hour < 10) {\n return 'સવાર';\n } else if (hour < 17) {\n return 'બપોર';\n } else if (hour < 20) {\n return 'સાંજ';\n } else {\n return 'રાત';\n }\n },\n week: {\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 });\n\n return gu;\n\n})));\n","//! moment.js locale configuration\n//! locale : Chinese (Hong Kong) [zh-hk]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n//! author : Konstantin : https://github.com/skfd\n//! author : Anthony : https://github.com/anthonylau\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var zhHk = moment.defineLocale('zh-hk', {\n months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n '_'\n ),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n '_'\n ),\n weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日 HH:mm',\n LLLL: 'YYYY年M月D日dddd HH:mm',\n l: 'YYYY/M/D',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日dddd HH:mm',\n },\n meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n return hour;\n } else if (meridiem === '中午') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === '下午' || meridiem === '晚上') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n var hm = hour * 100 + minute;\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1200) {\n return '上午';\n } else if (hm === 1200) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n } else {\n return '晚上';\n }\n },\n calendar: {\n sameDay: '[今天]LT',\n nextDay: '[明天]LT',\n nextWeek: '[下]ddddLT',\n lastDay: '[昨天]LT',\n lastWeek: '[上]ddddLT',\n sameElse: 'L',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n case 'M':\n return number + '月';\n case 'w':\n case 'W':\n return number + '週';\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s後',\n past: '%s前',\n s: '幾秒',\n ss: '%d 秒',\n m: '1 分鐘',\n mm: '%d 分鐘',\n h: '1 小時',\n hh: '%d 小時',\n d: '1 天',\n dd: '%d 天',\n M: '1 個月',\n MM: '%d 個月',\n y: '1 年',\n yy: '%d 年',\n },\n });\n\n return zhHk;\n\n})));\n","import { SDK_VERSION } from './utils-hoist/version.js';\nimport { GLOBAL_OBJ } from './utils-hoist/worldwide.js';\n\n/**\n * An object that contains globally accessible properties and maintains a scope stack.\n * @hidden\n */\n\n/**\n * Returns the global shim registry.\n *\n * FIXME: This function is problematic, because despite always returning a valid Carrier,\n * it has an optional `__SENTRY__` property, which then in turn requires us to always perform an unnecessary check\n * at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there.\n **/\nfunction getMainCarrier() {\n // This ensures a Sentry carrier exists\n getSentryCarrier(GLOBAL_OBJ);\n return GLOBAL_OBJ;\n}\n\n/** Will either get the existing sentry carrier, or create a new one. */\nfunction getSentryCarrier(carrier) {\n const __SENTRY__ = (carrier.__SENTRY__ = carrier.__SENTRY__ || {});\n\n // For now: First SDK that sets the .version property wins\n __SENTRY__.version = __SENTRY__.version || SDK_VERSION;\n\n // Intentionally populating and returning the version of \"this\" SDK instance\n // rather than what's set in .version so that \"this\" SDK always gets its carrier\n return (__SENTRY__[SDK_VERSION] = __SENTRY__[SDK_VERSION] || {});\n}\n\nexport { getMainCarrier, getSentryCarrier };\n","//! moment.js locale configuration\n//! locale : Kurdish [ku]\n//! author : Shahram Mebashar : https://github.com/ShahramMebashar\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '١',\n 2: '٢',\n 3: '٣',\n 4: '٤',\n 5: '٥',\n 6: '٦',\n 7: '٧',\n 8: '٨',\n 9: '٩',\n 0: '٠',\n },\n numberMap = {\n '١': '1',\n '٢': '2',\n '٣': '3',\n '٤': '4',\n '٥': '5',\n '٦': '6',\n '٧': '7',\n '٨': '8',\n '٩': '9',\n '٠': '0',\n },\n months = [\n 'کانونی دووەم',\n 'شوبات',\n 'ئازار',\n 'نیسان',\n 'ئایار',\n 'حوزەیران',\n 'تەمموز',\n 'ئاب',\n 'ئەیلوول',\n 'تشرینی یەكەم',\n 'تشرینی دووەم',\n 'كانونی یەکەم',\n ];\n\n var ku = moment.defineLocale('ku', {\n months: months,\n monthsShort: months,\n weekdays:\n 'یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌'.split(\n '_'\n ),\n weekdaysShort:\n 'یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌'.split('_'),\n weekdaysMin: 'ی_د_س_چ_پ_ه_ش'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n meridiemParse: /ئێواره‌|به‌یانی/,\n isPM: function (input) {\n return /ئێواره‌/.test(input);\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'به‌یانی';\n } else {\n return 'ئێواره‌';\n }\n },\n calendar: {\n sameDay: '[ئه‌مرۆ كاتژمێر] LT',\n nextDay: '[به‌یانی كاتژمێر] LT',\n nextWeek: 'dddd [كاتژمێر] LT',\n lastDay: '[دوێنێ كاتژمێر] LT',\n lastWeek: 'dddd [كاتژمێر] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'له‌ %s',\n past: '%s',\n s: 'چه‌ند چركه‌یه‌ك',\n ss: 'چركه‌ %d',\n m: 'یه‌ك خوله‌ك',\n mm: '%d خوله‌ك',\n h: 'یه‌ك كاتژمێر',\n hh: '%d كاتژمێر',\n d: 'یه‌ك ڕۆژ',\n dd: '%d ڕۆژ',\n M: 'یه‌ك مانگ',\n MM: '%d مانگ',\n y: 'یه‌ك ساڵ',\n yy: '%d ساڵ',\n },\n preparse: function (string) {\n return string\n .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n return numberMap[match];\n })\n .replace(/،/g, ',');\n },\n postformat: function (string) {\n return string\n .replace(/\\d/g, function (match) {\n return symbolMap[match];\n })\n .replace(/,/g, '،');\n },\n week: {\n dow: 6, // Saturday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return ku;\n\n})));\n","\n\n\n
\n \n
\n
\n\n\n \n {{ cta1Label }}\n \n \n\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, OnInit, ViewEncapsulation } from '@angular/core';\n\nimport { UiBaseDataMoleculeComponent, UiBaseDataMoleculeSchema } from '../../shared/base-data/base-data-molecule.component';\n\nimport { UiFooterType } from '../footer.enum';\nimport { UiFooterDefaultData, UiFooterDefaultStateCta } from '../footer.interface';\n\nconst DEFAULT_STATE: UiFooterDefaultStateCta = {\n disabled: false,\n processing: false,\n};\n\n@Component({\n selector: 'ui-footer-default',\n templateUrl: './footer-default.component.html',\n styleUrls: ['./footer-default.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class UiFooterDefaultComponent extends UiBaseDataMoleculeComponent implements UiBaseDataMoleculeSchema, OnInit {\n /**\n * Allow developer to pass in data with an object\n *\n * Interface UiFooterDefaultData\n */\n @Input() override data: UiFooterDefaultData;\n\n /**\n * Allow developer to pass in data single fields at a time\n */\n @Input() cta1Label: string;\n @Input() cta2Label: string;\n @Input() trackingDetail: { event_name: string };\n @Input() type: UiFooterType;\n\n @Input() cta1State: UiFooterDefaultStateCta | undefined | null = DEFAULT_STATE;\n @Input() cta2State: UiFooterDefaultStateCta | undefined | null = DEFAULT_STATE;\n\n @Output() cta1ActionHandler = new EventEmitter();\n @Output() cta2ActionHandler = new EventEmitter();\n\n footerTypeEnum = UiFooterType;\n\n ngOnInit(): void {\n this.schemaValidationConfig = {\n directInputValues: [this.cta1Label, this.cta2Label],\n };\n\n super.ngOnInit();\n }\n\n public override uiOnDirectInputsFromDataObject(): void {\n this.cta1Label = this.data?.inputs?.cta1Label || this.cta1Label || '';\n this.cta2Label = this.data?.inputs?.cta2Label || this.cta2Label || '';\n\n this.trackingDetail = this.data?.inputs?.trackingDetail || this.trackingDetail || { event_name: 'missing_event_name_footer' };\n this.type = this.data?.inputs?.type || this.type || UiFooterType.DEFAULT;\n }\n}\n","//! moment.js locale configuration\n//! locale : Pseudo [x-pseudo]\n//! author : Andrew Hood : https://github.com/andrewhood125\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var xPseudo = moment.defineLocale('x-pseudo', {\n months: 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split(\n '_'\n ),\n monthsShort:\n 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays:\n 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split(\n '_'\n ),\n weekdaysShort: 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'),\n weekdaysMin: 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[T~ódá~ý át] LT',\n nextDay: '[T~ómó~rró~w át] LT',\n nextWeek: 'dddd [át] LT',\n lastDay: '[Ý~ést~érdá~ý át] LT',\n lastWeek: '[L~ást] dddd [át] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'í~ñ %s',\n past: '%s á~gó',\n s: 'á ~féw ~sécó~ñds',\n ss: '%d s~écóñ~ds',\n m: 'á ~míñ~úté',\n mm: '%d m~íñú~tés',\n h: 'á~ñ hó~úr',\n hh: '%d h~óúrs',\n d: 'á ~dáý',\n dd: '%d d~áýs',\n M: 'á ~móñ~th',\n MM: '%d m~óñt~hs',\n y: 'á ~ýéár',\n yy: '%d ý~éárs',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((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 week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return xPseudo;\n\n})));\n","export enum UiFooterType {\n DEFAULT = 'default',\n ROW = 'row',\n}\n","//! moment.js locale configuration\n//! locale : French (Switzerland) [fr-ch]\n//! author : Gaspard Bucher : https://github.com/gaspard\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var frCh = moment.defineLocale('fr-ch', {\n months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(\n '_'\n ),\n monthsShort:\n 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Aujourd’hui à] LT',\n nextDay: '[Demain à] LT',\n nextWeek: 'dddd [à] LT',\n lastDay: '[Hier à] LT',\n lastWeek: 'dddd [dernier à] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'dans %s',\n past: 'il y a %s',\n s: 'quelques secondes',\n ss: '%d secondes',\n m: 'une minute',\n mm: '%d minutes',\n h: 'une heure',\n hh: '%d heures',\n d: 'un jour',\n dd: '%d jours',\n M: 'un mois',\n MM: '%d mois',\n y: 'un an',\n yy: '%d ans',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(er|e)/,\n ordinal: function (number, period) {\n switch (period) {\n // Words with masculine grammatical gender: mois, trimestre, jour\n default:\n case 'M':\n case 'Q':\n case 'D':\n case 'DDD':\n case 'd':\n return number + (number === 1 ? 'er' : 'e');\n\n // Words with feminine grammatical gender: semaine\n case 'w':\n case 'W':\n return number + (number === 1 ? 're' : 'e');\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return frCh;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (United Kingdom) [en-gb]\n//! author : Chris Gedrim : https://github.com/chrisgedrim\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enGb = moment.defineLocale('en-gb', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\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 relativeTime: {\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 M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((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 week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return enGb;\n\n})));\n","//! moment.js\n//! version : 2.30.1\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n global.moment = factory()\n}(this, (function () { 'use strict';\n\n var hookCallback;\n\n function 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.\n function setHookCallback(callback) {\n hookCallback = callback;\n }\n\n function isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n }\n\n function 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\n function hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n }\n\n function 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\n function isUndefined(input) {\n return input === void 0;\n }\n\n function isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n }\n\n function isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n }\n\n function 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\n function 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\n function createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n }\n\n function 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\n function getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n }\n\n var some;\n if (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\n function isValid(m) {\n var flags = null,\n parsedParts = false,\n isNowValid = m._d && !isNaN(m._d.getTime());\n if (isNowValid) {\n flags = getParsingFlags(m);\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n });\n isNowValid =\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 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 return m._isValid;\n }\n\n function 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.\n var momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\n function 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\n function 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\n function isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n }\n\n function 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\n function 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\n var deprecations = {};\n\n function 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\n hooks.suppressDeprecationWarnings = false;\n hooks.deprecationHandler = null;\n\n function isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n }\n\n function 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\n function 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\n function Locale(config) {\n if (config != null) {\n this.set(config);\n }\n }\n\n var keys;\n\n if (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\n var 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\n function calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n }\n\n function 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\n var 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 }\n function 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\n function removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n }\n\n function 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\n function 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\n function 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\n var 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\n function 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\n var defaultInvalidDate = 'Invalid date';\n\n function invalidDate() {\n return this._invalidDate;\n }\n\n var defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\n function ordinal(number) {\n return this._ordinal.replace('%d', number);\n }\n\n var 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\n function 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\n function 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\n var aliases = {\n D: 'date',\n dates: 'date',\n date: 'date',\n d: 'day',\n days: 'day',\n day: 'day',\n e: 'weekday',\n weekdays: 'weekday',\n weekday: 'weekday',\n E: 'isoWeekday',\n isoweekdays: 'isoWeekday',\n isoweekday: 'isoWeekday',\n DDD: 'dayOfYear',\n dayofyears: 'dayOfYear',\n dayofyear: 'dayOfYear',\n h: 'hour',\n hours: 'hour',\n hour: 'hour',\n ms: 'millisecond',\n milliseconds: 'millisecond',\n millisecond: 'millisecond',\n m: 'minute',\n minutes: 'minute',\n minute: 'minute',\n M: 'month',\n months: 'month',\n month: 'month',\n Q: 'quarter',\n quarters: 'quarter',\n quarter: 'quarter',\n s: 'second',\n seconds: 'second',\n second: 'second',\n gg: 'weekYear',\n weekyears: 'weekYear',\n weekyear: 'weekYear',\n GG: 'isoWeekYear',\n isoweekyears: 'isoWeekYear',\n isoweekyear: 'isoWeekYear',\n w: 'week',\n weeks: 'week',\n week: 'week',\n W: 'isoWeek',\n isoweeks: 'isoWeek',\n isoweek: 'isoWeek',\n y: 'year',\n years: 'year',\n year: 'year',\n };\n\n function normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n }\n\n function 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\n var priorities = {\n date: 9,\n day: 11,\n weekday: 11,\n isoWeekday: 11,\n dayOfYear: 4,\n hour: 13,\n millisecond: 16,\n minute: 14,\n month: 8,\n quarter: 7,\n second: 15,\n weekYear: 1,\n isoWeekYear: 1,\n week: 5,\n isoWeek: 5,\n year: 1,\n };\n\n function 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\n var 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 match1to2NoLeadingZero = /^[1-9]\\d?/, // 1-99\n match1to2HasZero = /^([1-9]\\d|\\d)/, // 0-99\n regexes;\n\n regexes = {};\n\n function addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n }\n\n function 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\n function 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\n function regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n\n function 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\n function 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\n var tokens = {};\n\n function 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\n function 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\n function addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n }\n\n function isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n }\n\n var 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\n // FORMATTING\n\n addFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n });\n\n addFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n });\n\n addFormatToken(0, ['YYYY', 4], 0, 'year');\n addFormatToken(0, ['YYYYY', 5], 0, 'year');\n addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n // PARSING\n\n addRegexToken('Y', matchSigned);\n addRegexToken('YY', match1to2, match2);\n addRegexToken('YYYY', match1to4, match4);\n addRegexToken('YYYYY', match1to6, match6);\n addRegexToken('YYYYYY', match1to6, match6);\n\n addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n addParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n });\n addParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n });\n addParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n });\n\n // HELPERS\n\n function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n }\n\n // HOOKS\n\n hooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n };\n\n // MOMENTS\n\n var getSetYear = makeGetSet('FullYear', true);\n\n function getIsLeapYear() {\n return isLeapYear(this.year());\n }\n\n function 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\n function get(mom, unit) {\n if (!mom.isValid()) {\n return NaN;\n }\n\n var d = mom._d,\n isUTC = mom._isUTC;\n\n switch (unit) {\n case 'Milliseconds':\n return isUTC ? d.getUTCMilliseconds() : d.getMilliseconds();\n case 'Seconds':\n return isUTC ? d.getUTCSeconds() : d.getSeconds();\n case 'Minutes':\n return isUTC ? d.getUTCMinutes() : d.getMinutes();\n case 'Hours':\n return isUTC ? d.getUTCHours() : d.getHours();\n case 'Date':\n return isUTC ? d.getUTCDate() : d.getDate();\n case 'Day':\n return isUTC ? d.getUTCDay() : d.getDay();\n case 'Month':\n return isUTC ? d.getUTCMonth() : d.getMonth();\n case 'FullYear':\n return isUTC ? d.getUTCFullYear() : d.getFullYear();\n default:\n return NaN; // Just in case\n }\n }\n\n function set$1(mom, unit, value) {\n var d, isUTC, year, month, date;\n\n if (!mom.isValid() || isNaN(value)) {\n return;\n }\n\n d = mom._d;\n isUTC = mom._isUTC;\n\n switch (unit) {\n case 'Milliseconds':\n return void (isUTC\n ? d.setUTCMilliseconds(value)\n : d.setMilliseconds(value));\n case 'Seconds':\n return void (isUTC ? d.setUTCSeconds(value) : d.setSeconds(value));\n case 'Minutes':\n return void (isUTC ? d.setUTCMinutes(value) : d.setMinutes(value));\n case 'Hours':\n return void (isUTC ? d.setUTCHours(value) : d.setHours(value));\n case 'Date':\n return void (isUTC ? d.setUTCDate(value) : d.setDate(value));\n // case 'Day': // Not real\n // return void (isUTC ? d.setUTCDay(value) : d.setDay(value));\n // case 'Month': // Not used because we need to pass two variables\n // return void (isUTC ? d.setUTCMonth(value) : d.setMonth(value));\n case 'FullYear':\n break; // See below ...\n default:\n return; // Just in case\n }\n\n year = value;\n month = mom.month();\n date = mom.date();\n date = date === 29 && month === 1 && !isLeapYear(year) ? 28 : date;\n void (isUTC\n ? d.setUTCFullYear(year, month, date)\n : d.setFullYear(year, month, date));\n }\n\n // MOMENTS\n\n function stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n }\n\n function 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\n function mod(n, x) {\n return ((n % x) + x) % x;\n }\n\n var indexOf;\n\n if (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\n function 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\n addFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n });\n\n addFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n });\n\n addFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n });\n\n // PARSING\n\n addRegexToken('M', match1to2, match1to2NoLeadingZero);\n addRegexToken('MM', match1to2, match2);\n addRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n });\n addRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n });\n\n addParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n });\n\n addParseToken(['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\n var 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\n function 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\n function 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\n function 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\n function 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\n function setMonth(mom, value) {\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 var month = value,\n date = mom.date();\n\n date = date < 29 ? date : Math.min(date, daysInMonth(mom.year(), month));\n void (mom._isUTC\n ? mom._d.setUTCMonth(month, date)\n : mom._d.setMonth(month, date));\n return mom;\n }\n\n function 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\n function getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n }\n\n function 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\n function 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\n function 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 shortP,\n longP;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortP = regexEscape(this.monthsShort(mom, ''));\n longP = regexEscape(this.months(mom, ''));\n shortPieces.push(shortP);\n longPieces.push(longP);\n mixedPieces.push(longP);\n mixedPieces.push(shortP);\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\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 function 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\n function 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\n function 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\n function 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\n function 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\n function 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\n addFormatToken('w', ['ww', 2], 'wo', 'week');\n addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n // PARSING\n\n addRegexToken('w', match1to2, match1to2NoLeadingZero);\n addRegexToken('ww', match1to2, match2);\n addRegexToken('W', match1to2, match1to2NoLeadingZero);\n addRegexToken('WW', match1to2, match2);\n\n addWeekParseToken(\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\n function localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n }\n\n var 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\n function localeFirstDayOfWeek() {\n return this._week.dow;\n }\n\n function localeFirstDayOfYear() {\n return this._week.doy;\n }\n\n // MOMENTS\n\n function getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n function 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\n addFormatToken('d', 0, 'do', 'day');\n\n addFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n });\n\n addFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n });\n\n addFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n });\n\n addFormatToken('e', 0, 0, 'weekday');\n addFormatToken('E', 0, 0, 'isoWeekday');\n\n // PARSING\n\n addRegexToken('d', match1to2);\n addRegexToken('e', match1to2);\n addRegexToken('E', match1to2);\n addRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n });\n addRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n });\n addRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n });\n\n addWeekParseToken(['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\n addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n });\n\n // HELPERS\n\n function 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\n function 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\n function shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n }\n\n var 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\n function 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\n function 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\n function 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\n function 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\n function 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\n function getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n var day = get(this, 'Day');\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\n function 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\n function 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\n function 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\n function 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\n function 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\n function 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\n function hFormat() {\n return this.hours() % 12 || 12;\n }\n\n function kFormat() {\n return this.hours() || 24;\n }\n\n addFormatToken('H', ['HH', 2], 0, 'hour');\n addFormatToken('h', ['hh', 2], 0, hFormat);\n addFormatToken('k', ['kk', 2], 0, kFormat);\n\n addFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n });\n\n addFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n });\n\n addFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n });\n\n addFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n });\n\n function 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\n meridiem('a', true);\n meridiem('A', false);\n\n // PARSING\n\n function matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n }\n\n addRegexToken('a', matchMeridiem);\n addRegexToken('A', matchMeridiem);\n addRegexToken('H', match1to2, match1to2HasZero);\n addRegexToken('h', match1to2, match1to2NoLeadingZero);\n addRegexToken('k', match1to2, match1to2NoLeadingZero);\n addRegexToken('HH', match1to2, match2);\n addRegexToken('hh', match1to2, match2);\n addRegexToken('kk', match1to2, match2);\n\n addRegexToken('hmm', match3to4);\n addRegexToken('hmmss', match5to6);\n addRegexToken('Hmm', match3to4);\n addRegexToken('Hmmss', match5to6);\n\n addParseToken(['H', 'HH'], HOUR);\n addParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n });\n addParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n });\n addParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('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 });\n addParseToken('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 });\n addParseToken('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 });\n addParseToken('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\n function 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\n var 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\n function localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n }\n\n var 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\n var locales = {},\n localeFamilies = {},\n globalLocale;\n\n function 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\n function 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\n function 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\n function isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n // Ensure name is available and function returns boolean\n return !!(name && name.match('^[^/\\\\\\\\]*$'));\n }\n\n function 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.\n function 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\n function 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\n function 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\n function 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\n function listLocales() {\n return keys(locales);\n }\n\n function 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)\n var 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\n function 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\n function 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\n function 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\n function 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\n function 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\n function 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\n function 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\n function 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\n hooks.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.\n function 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\n function 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]\n function 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\n function 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\n hooks.ISO_8601 = function () {};\n\n // constant that refers to the RFC 2822 form\n hooks.RFC_2822 = function () {};\n\n // date from string and format string\n function 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\n function 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\n function 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\n function 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\n function 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\n function 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\n function 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\n function 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\n function createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n }\n\n var 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.\n function 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?\n function min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n }\n\n function max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n }\n\n var now = function () {\n return Date.now ? Date.now() : +new Date();\n };\n\n var ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n ];\n\n function 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\n function isValid$1() {\n return this._isValid;\n }\n\n function createInvalid$1() {\n return createDuration(NaN);\n }\n\n function 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\n function isDuration(obj) {\n return obj instanceof Duration;\n }\n\n function 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\n function 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\n function 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\n offset('Z', ':');\n offset('ZZ', '');\n\n // PARSING\n\n addRegexToken('Z', matchShortOffset);\n addRegexToken('ZZ', matchShortOffset);\n addParseToken(['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']\n var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n function 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.\n function 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\n function 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.\n hooks.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.\n function 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\n function 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\n function setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n }\n\n function 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\n function 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\n function 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\n function isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n }\n\n function 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\n function isLocal() {\n return this.isValid() ? !this._isUTC : false;\n }\n\n function isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n }\n\n function isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n }\n\n // ASP.NET json date format regex\n var 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\n function 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\n createDuration.fn = Duration.prototype;\n createDuration.invalid = createInvalid$1;\n\n function 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\n function 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\n function 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\n function 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\n function 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\n var add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\n function 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\n function 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\n function 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\n function 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\n function 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\n function 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\n function 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\n function clone() {\n return new Moment(this);\n }\n\n function 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\n function 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\n function 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\n function 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\n function isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n }\n\n function isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n }\n\n function 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\n function 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\n hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\n function toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n }\n\n function 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 */\n function 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\n function 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\n function 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\n function fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n }\n\n function 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\n function 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.\n function 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\n var 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\n function localeData() {\n return this._locale;\n }\n\n var 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):\n function mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n }\n\n function 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\n function 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\n function 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\n function 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\n function valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n }\n\n function unix() {\n return Math.floor(this.valueOf() / 1000);\n }\n\n function toDate() {\n return new Date(this.valueOf());\n }\n\n function 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\n function 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\n function toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n }\n\n function isValid$2() {\n return isValid(this);\n }\n\n function parsingFlags() {\n return extend({}, getParsingFlags(this));\n }\n\n function invalidAt() {\n return getParsingFlags(this).overflow;\n }\n\n function 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\n addFormatToken('N', 0, 0, 'eraAbbr');\n addFormatToken('NN', 0, 0, 'eraAbbr');\n addFormatToken('NNN', 0, 0, 'eraAbbr');\n addFormatToken('NNNN', 0, 0, 'eraName');\n addFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\n addFormatToken('y', ['y', 1], 'yo', 'eraYear');\n addFormatToken('y', ['yy', 2], 0, 'eraYear');\n addFormatToken('y', ['yyy', 3], 0, 'eraYear');\n addFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\n addRegexToken('N', matchEraAbbr);\n addRegexToken('NN', matchEraAbbr);\n addRegexToken('NNN', matchEraAbbr);\n addRegexToken('NNNN', matchEraName);\n addRegexToken('NNNNN', matchEraNarrow);\n\n addParseToken(\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\n addRegexToken('y', matchUnsigned);\n addRegexToken('yy', matchUnsigned);\n addRegexToken('yyy', matchUnsigned);\n addRegexToken('yyyy', matchUnsigned);\n addRegexToken('yo', matchEraYearOrdinal);\n\n addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\n addParseToken(['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\n function 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\n function 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\n function 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\n function 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\n function 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\n function 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\n function 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\n function erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n }\n\n function erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n }\n\n function erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n }\n\n function matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n }\n\n function matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n }\n\n function matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n }\n\n function matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n }\n\n function computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n erasName,\n erasAbbr,\n erasNarrow,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n erasName = regexEscape(eras[i].name);\n erasAbbr = regexEscape(eras[i].abbr);\n erasNarrow = regexEscape(eras[i].narrow);\n\n namePieces.push(erasName);\n abbrPieces.push(erasAbbr);\n narrowPieces.push(erasNarrow);\n mixedPieces.push(erasName);\n mixedPieces.push(erasAbbr);\n mixedPieces.push(erasNarrow);\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\n addFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n });\n\n addFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n });\n\n function addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n }\n\n addWeekYearFormatToken('gggg', 'weekYear');\n addWeekYearFormatToken('ggggg', 'weekYear');\n addWeekYearFormatToken('GGGG', 'isoWeekYear');\n addWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n // ALIASES\n\n // PARSING\n\n addRegexToken('G', matchSigned);\n addRegexToken('g', matchSigned);\n addRegexToken('GG', match1to2, match2);\n addRegexToken('gg', match1to2, match2);\n addRegexToken('GGGG', match1to4, match4);\n addRegexToken('gggg', match1to4, match4);\n addRegexToken('GGGGG', match1to6, match6);\n addRegexToken('ggggg', match1to6, match6);\n\n addWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n );\n\n addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n });\n\n // MOMENTS\n\n function getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday() + this.localeData()._week.dow,\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n }\n\n function getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n }\n\n function getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n }\n\n function getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n }\n\n function getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n }\n\n function getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n }\n\n function 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\n function 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\n addFormatToken('Q', 0, 'Qo', 'quarter');\n\n // PARSING\n\n addRegexToken('Q', match1);\n addParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n });\n\n // MOMENTS\n\n function 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\n addFormatToken('D', ['DD', 2], 'Do', 'date');\n\n // PARSING\n\n addRegexToken('D', match1to2, match1to2NoLeadingZero);\n addRegexToken('DD', match1to2, match2);\n addRegexToken('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\n addParseToken(['D', 'DD'], DATE);\n addParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n });\n\n // MOMENTS\n\n var getSetDayOfMonth = makeGetSet('Date', true);\n\n // FORMATTING\n\n addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n // PARSING\n\n addRegexToken('DDD', match1to3);\n addRegexToken('DDDD', match3);\n addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n });\n\n // HELPERS\n\n // MOMENTS\n\n function 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\n addFormatToken('m', ['mm', 2], 0, 'minute');\n\n // PARSING\n\n addRegexToken('m', match1to2, match1to2HasZero);\n addRegexToken('mm', match1to2, match2);\n addParseToken(['m', 'mm'], MINUTE);\n\n // MOMENTS\n\n var getSetMinute = makeGetSet('Minutes', false);\n\n // FORMATTING\n\n addFormatToken('s', ['ss', 2], 0, 'second');\n\n // PARSING\n\n addRegexToken('s', match1to2, match1to2HasZero);\n addRegexToken('ss', match1to2, match2);\n addParseToken(['s', 'ss'], SECOND);\n\n // MOMENTS\n\n var getSetSecond = makeGetSet('Seconds', false);\n\n // FORMATTING\n\n addFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n });\n\n addFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n });\n\n addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n addFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n });\n addFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n });\n addFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n });\n addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n });\n addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n });\n addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n });\n\n // PARSING\n\n addRegexToken('S', match1to3, match1);\n addRegexToken('SS', match1to3, match2);\n addRegexToken('SSS', match1to3, match3);\n\n var token, getSetMillisecond;\n for (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n }\n\n function parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n }\n\n for (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n }\n\n getSetMillisecond = makeGetSet('Milliseconds', false);\n\n // FORMATTING\n\n addFormatToken('z', 0, 0, 'zoneAbbr');\n addFormatToken('zz', 0, 0, 'zoneName');\n\n // MOMENTS\n\n function getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n }\n\n function getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n }\n\n var proto = Moment.prototype;\n\n proto.add = add;\n proto.calendar = calendar$1;\n proto.clone = clone;\n proto.diff = diff;\n proto.endOf = endOf;\n proto.format = format;\n proto.from = from;\n proto.fromNow = fromNow;\n proto.to = to;\n proto.toNow = toNow;\n proto.get = stringGet;\n proto.invalidAt = invalidAt;\n proto.isAfter = isAfter;\n proto.isBefore = isBefore;\n proto.isBetween = isBetween;\n proto.isSame = isSame;\n proto.isSameOrAfter = isSameOrAfter;\n proto.isSameOrBefore = isSameOrBefore;\n proto.isValid = isValid$2;\n proto.lang = lang;\n proto.locale = locale;\n proto.localeData = localeData;\n proto.max = prototypeMax;\n proto.min = prototypeMin;\n proto.parsingFlags = parsingFlags;\n proto.set = stringSet;\n proto.startOf = startOf;\n proto.subtract = subtract;\n proto.toArray = toArray;\n proto.toObject = toObject;\n proto.toDate = toDate;\n proto.toISOString = toISOString;\n proto.inspect = inspect;\n if (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n }\n proto.toJSON = toJSON;\n proto.toString = toString;\n proto.unix = unix;\n proto.valueOf = valueOf;\n proto.creationData = creationData;\n proto.eraName = getEraName;\n proto.eraNarrow = getEraNarrow;\n proto.eraAbbr = getEraAbbr;\n proto.eraYear = getEraYear;\n proto.year = getSetYear;\n proto.isLeapYear = getIsLeapYear;\n proto.weekYear = getSetWeekYear;\n proto.isoWeekYear = getSetISOWeekYear;\n proto.quarter = proto.quarters = getSetQuarter;\n proto.month = getSetMonth;\n proto.daysInMonth = getDaysInMonth;\n proto.week = proto.weeks = getSetWeek;\n proto.isoWeek = proto.isoWeeks = getSetISOWeek;\n proto.weeksInYear = getWeeksInYear;\n proto.weeksInWeekYear = getWeeksInWeekYear;\n proto.isoWeeksInYear = getISOWeeksInYear;\n proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\n proto.date = getSetDayOfMonth;\n proto.day = proto.days = getSetDayOfWeek;\n proto.weekday = getSetLocaleDayOfWeek;\n proto.isoWeekday = getSetISODayOfWeek;\n proto.dayOfYear = getSetDayOfYear;\n proto.hour = proto.hours = getSetHour;\n proto.minute = proto.minutes = getSetMinute;\n proto.second = proto.seconds = getSetSecond;\n proto.millisecond = proto.milliseconds = getSetMillisecond;\n proto.utcOffset = getSetOffset;\n proto.utc = setOffsetToUTC;\n proto.local = setOffsetToLocal;\n proto.parseZone = setOffsetToParsedOffset;\n proto.hasAlignedHourOffset = hasAlignedHourOffset;\n proto.isDST = isDaylightSavingTime;\n proto.isLocal = isLocal;\n proto.isUtcOffset = isUtcOffset;\n proto.isUtc = isUtc;\n proto.isUTC = isUtc;\n proto.zoneAbbr = getZoneAbbr;\n proto.zoneName = getZoneName;\n proto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n );\n proto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n );\n proto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n );\n proto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n );\n proto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n );\n\n function createUnix(input) {\n return createLocal(input * 1000);\n }\n\n function createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n }\n\n function preParsePostFormat(string) {\n return string;\n }\n\n var proto$1 = Locale.prototype;\n\n proto$1.calendar = calendar;\n proto$1.longDateFormat = longDateFormat;\n proto$1.invalidDate = invalidDate;\n proto$1.ordinal = ordinal;\n proto$1.preparse = preParsePostFormat;\n proto$1.postformat = preParsePostFormat;\n proto$1.relativeTime = relativeTime;\n proto$1.pastFuture = pastFuture;\n proto$1.set = set;\n proto$1.eras = localeEras;\n proto$1.erasParse = localeErasParse;\n proto$1.erasConvertYear = localeErasConvertYear;\n proto$1.erasAbbrRegex = erasAbbrRegex;\n proto$1.erasNameRegex = erasNameRegex;\n proto$1.erasNarrowRegex = erasNarrowRegex;\n\n proto$1.months = localeMonths;\n proto$1.monthsShort = localeMonthsShort;\n proto$1.monthsParse = localeMonthsParse;\n proto$1.monthsRegex = monthsRegex;\n proto$1.monthsShortRegex = monthsShortRegex;\n proto$1.week = localeWeek;\n proto$1.firstDayOfYear = localeFirstDayOfYear;\n proto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\n proto$1.weekdays = localeWeekdays;\n proto$1.weekdaysMin = localeWeekdaysMin;\n proto$1.weekdaysShort = localeWeekdaysShort;\n proto$1.weekdaysParse = localeWeekdaysParse;\n\n proto$1.weekdaysRegex = weekdaysRegex;\n proto$1.weekdaysShortRegex = weekdaysShortRegex;\n proto$1.weekdaysMinRegex = weekdaysMinRegex;\n\n proto$1.isPM = localeIsPM;\n proto$1.meridiem = localeMeridiem;\n\n function get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n }\n\n function 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)\n function 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\n function listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n }\n\n function listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n }\n\n function listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n }\n\n function listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n }\n\n function listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n }\n\n getSetGlobalLocale('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\n hooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n );\n hooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n );\n\n var mathAbs = Math.abs;\n\n function 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\n function 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)\n function 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)\n function subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n }\n\n function absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n }\n\n function 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\n function 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\n function monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n }\n\n function 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 function makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n }\n\n var 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 valueOf$1 = asMilliseconds;\n\n function clone$1() {\n return createDuration(this);\n }\n\n function get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n }\n\n function makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n }\n\n var 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\n function weeks() {\n return absFloor(this.days() / 7);\n }\n\n var 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\n function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n }\n\n function 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\n function 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\n function 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\n function 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\n var abs$1 = Math.abs;\n\n function sign(x) {\n return (x > 0) - (x < 0) || +x;\n }\n\n function 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\n var proto$2 = Duration.prototype;\n\n proto$2.isValid = isValid$1;\n proto$2.abs = abs;\n proto$2.add = add$1;\n proto$2.subtract = subtract$1;\n proto$2.as = as;\n proto$2.asMilliseconds = asMilliseconds;\n proto$2.asSeconds = asSeconds;\n proto$2.asMinutes = asMinutes;\n proto$2.asHours = asHours;\n proto$2.asDays = asDays;\n proto$2.asWeeks = asWeeks;\n proto$2.asMonths = asMonths;\n proto$2.asQuarters = asQuarters;\n proto$2.asYears = asYears;\n proto$2.valueOf = valueOf$1;\n proto$2._bubble = bubble;\n proto$2.clone = clone$1;\n proto$2.get = get$2;\n proto$2.milliseconds = milliseconds;\n proto$2.seconds = seconds;\n proto$2.minutes = minutes;\n proto$2.hours = hours;\n proto$2.days = days;\n proto$2.weeks = weeks;\n proto$2.months = months;\n proto$2.years = years;\n proto$2.humanize = humanize;\n proto$2.toISOString = toISOString$1;\n proto$2.toString = toISOString$1;\n proto$2.toJSON = toISOString$1;\n proto$2.locale = locale;\n proto$2.localeData = localeData;\n\n proto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n );\n proto$2.lang = lang;\n\n // FORMATTING\n\n addFormatToken('X', 0, 0, 'unix');\n addFormatToken('x', 0, 0, 'valueOf');\n\n // PARSING\n\n addRegexToken('x', matchSigned);\n addRegexToken('X', matchTimestamp);\n addParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n });\n addParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n });\n\n //! moment.js\n\n hooks.version = '2.30.1';\n\n setHookCallback(createLocal);\n\n hooks.fn = proto;\n hooks.min = min;\n hooks.max = max;\n hooks.now = now;\n hooks.utc = createUTC;\n hooks.unix = createUnix;\n hooks.months = listMonths;\n hooks.isDate = isDate;\n hooks.locale = getSetGlobalLocale;\n hooks.invalid = createInvalid;\n hooks.duration = createDuration;\n hooks.isMoment = isMoment;\n hooks.weekdays = listWeekdays;\n hooks.parseZone = createInZone;\n hooks.localeData = getLocale;\n hooks.isDuration = isDuration;\n hooks.monthsShort = listMonthsShort;\n hooks.weekdaysMin = listWeekdaysMin;\n hooks.defineLocale = defineLocale;\n hooks.updateLocale = updateLocale;\n hooks.locales = listLocales;\n hooks.weekdaysShort = listWeekdaysShort;\n hooks.normalizeUnits = normalizeUnits;\n hooks.relativeTimeRounding = getSetRelativeTimeRounding;\n hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\n hooks.calendarFormat = getCalendarFormat;\n hooks.prototype = proto;\n\n // currently HTML5 input type only supports 24-hour formats\n hooks.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\n return hooks;\n\n})));\n","import { Component } from \"@angular/core\";\n\n@Component({\n selector: 'go-to-brightside-desktop',\n templateUrl: './go-to-brightside-desktop.component.html',\n styleUrls: ['./go-to-brightside-desktop.component.scss'],\n })\n export class GoToBrightsideDesktopComponent {\n }","\n
\n
\n \"go-to-brightside\"\n\n

\n Return to Brightside on your desktop\n

\n
\n
\n
","import { map } from './map';\nexport function mapTo(value) {\n return map(() => value);\n}\n","//! moment.js locale configuration\n//! locale : Slovak [sk]\n//! author : Martin Minka : https://github.com/k2s\n//! based on work of petrbela : https://github.com/petrbela\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var months =\n 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split(\n '_'\n ),\n monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');\n function plural(n) {\n return n > 1 && n < 5;\n }\n function translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's': // a few seconds / in a few seconds / a few seconds ago\n return withoutSuffix || isFuture ? 'pár sekúnd' : 'pár sekundami';\n case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'sekundy' : 'sekúnd');\n } else {\n return result + 'sekundami';\n }\n case 'm': // a minute / in a minute / a minute ago\n return withoutSuffix ? 'minúta' : isFuture ? 'minútu' : 'minútou';\n case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'minúty' : 'minút');\n } else {\n return result + 'minútami';\n }\n case 'h': // an hour / in an hour / an hour ago\n return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';\n case 'hh': // 9 hours / in 9 hours / 9 hours ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'hodiny' : 'hodín');\n } else {\n return result + 'hodinami';\n }\n case 'd': // a day / in a day / a day ago\n return withoutSuffix || isFuture ? 'deň' : 'dňom';\n case 'dd': // 9 days / in 9 days / 9 days ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'dni' : 'dní');\n } else {\n return result + 'dňami';\n }\n case 'M': // a month / in a month / a month ago\n return withoutSuffix || isFuture ? 'mesiac' : 'mesiacom';\n case 'MM': // 9 months / in 9 months / 9 months ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'mesiace' : 'mesiacov');\n } else {\n return result + 'mesiacmi';\n }\n case 'y': // a year / in a year / a year ago\n return withoutSuffix || isFuture ? 'rok' : 'rokom';\n case 'yy': // 9 years / in 9 years / 9 years ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'roky' : 'rokov');\n } else {\n return result + 'rokmi';\n }\n }\n }\n\n var sk = moment.defineLocale('sk', {\n months: months,\n monthsShort: monthsShort,\n weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),\n weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'),\n weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd D. MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[dnes o] LT',\n nextDay: '[zajtra o] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[v nedeľu o] LT';\n case 1:\n case 2:\n return '[v] dddd [o] LT';\n case 3:\n return '[v stredu o] LT';\n case 4:\n return '[vo štvrtok o] LT';\n case 5:\n return '[v piatok o] LT';\n case 6:\n return '[v sobotu o] LT';\n }\n },\n lastDay: '[včera o] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[minulú nedeľu o] LT';\n case 1:\n case 2:\n return '[minulý] dddd [o] LT';\n case 3:\n return '[minulú stredu o] LT';\n case 4:\n case 5:\n return '[minulý] dddd [o] LT';\n case 6:\n return '[minulú sobotu o] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'za %s',\n past: 'pred %s',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return sk;\n\n})));\n","import { Subscriber } from '../Subscriber';\nexport function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) {\n return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize);\n}\nexport class OperatorSubscriber extends Subscriber {\n constructor(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) {\n super(destination);\n this.onFinalize = onFinalize;\n this.shouldUnsubscribe = shouldUnsubscribe;\n this._next = onNext\n ? function (value) {\n try {\n onNext(value);\n }\n catch (err) {\n destination.error(err);\n }\n }\n : super._next;\n this._error = onError\n ? function (err) {\n try {\n onError(err);\n }\n catch (err) {\n destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n }\n : super._error;\n this._complete = onComplete\n ? function () {\n try {\n onComplete();\n }\n catch (err) {\n destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n }\n : super._complete;\n }\n unsubscribe() {\n var _a;\n if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {\n const { closed } = this;\n super.unsubscribe();\n !closed && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this));\n }\n }\n}\n","//! moment.js locale configuration\n//! locale : Basque [eu]\n//! author : Eneko Illarramendi : https://github.com/eillarra\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var eu = moment.defineLocale('eu', {\n months: 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split(\n '_'\n ),\n monthsShort:\n 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays:\n 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split(\n '_'\n ),\n weekdaysShort: 'ig._al._ar._az._og._ol._lr.'.split('_'),\n weekdaysMin: 'ig_al_ar_az_og_ol_lr'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'YYYY[ko] MMMM[ren] D[a]',\n LLL: 'YYYY[ko] MMMM[ren] D[a] HH:mm',\n LLLL: 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm',\n l: 'YYYY-M-D',\n ll: 'YYYY[ko] MMM D[a]',\n lll: 'YYYY[ko] MMM D[a] HH:mm',\n llll: 'ddd, YYYY[ko] MMM D[a] HH:mm',\n },\n calendar: {\n sameDay: '[gaur] LT[etan]',\n nextDay: '[bihar] LT[etan]',\n nextWeek: 'dddd LT[etan]',\n lastDay: '[atzo] LT[etan]',\n lastWeek: '[aurreko] dddd LT[etan]',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s barru',\n past: 'duela %s',\n s: 'segundo batzuk',\n ss: '%d segundo',\n m: 'minutu bat',\n mm: '%d minutu',\n h: 'ordu bat',\n hh: '%d ordu',\n d: 'egun bat',\n dd: '%d egun',\n M: 'hilabete bat',\n MM: '%d hilabete',\n y: 'urte bat',\n yy: '%d urte',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return eu;\n\n})));\n","//! moment.js locale configuration\n//! locale : Italian [it]\n//! author : Lorenzo : https://github.com/aliem\n//! author: Mattia Larentis: https://github.com/nostalgiaz\n//! author: Marco : https://github.com/Manfre98\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var it = moment.defineLocale('it', {\n months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(\n '_'\n ),\n monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),\n weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(\n '_'\n ),\n weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),\n weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: function () {\n return (\n '[Oggi a' +\n (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n ']LT'\n );\n },\n nextDay: function () {\n return (\n '[Domani a' +\n (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n ']LT'\n );\n },\n nextWeek: function () {\n return (\n 'dddd [a' +\n (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n ']LT'\n );\n },\n lastDay: function () {\n return (\n '[Ieri a' +\n (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n ']LT'\n );\n },\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return (\n '[La scorsa] dddd [a' +\n (this.hours() > 1\n ? 'lle '\n : this.hours() === 0\n ? ' '\n : \"ll'\") +\n ']LT'\n );\n default:\n return (\n '[Lo scorso] dddd [a' +\n (this.hours() > 1\n ? 'lle '\n : this.hours() === 0\n ? ' '\n : \"ll'\") +\n ']LT'\n );\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'tra %s',\n past: '%s fa',\n s: 'alcuni secondi',\n ss: '%d secondi',\n m: 'un minuto',\n mm: '%d minuti',\n h: \"un'ora\",\n hh: '%d ore',\n d: 'un giorno',\n dd: '%d giorni',\n w: 'una settimana',\n ww: '%d settimane',\n M: 'un mese',\n MM: '%d mesi',\n y: 'un anno',\n yy: '%d anni',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return it;\n\n})));\n","import * as i0 from '@angular/core';\nimport { Component, ViewEncapsulation, Input, HostBinding, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport * as i1 from '@videogular/ngx-videogular/core';\nimport { VgCoreModule } from '@videogular/ngx-videogular/core';\n\nclass VgBufferingComponent {\n constructor(ref, API) {\n this.API = API;\n this.checkInterval = 50;\n this.currentPlayPos = 0;\n this.lastPlayPos = 0;\n this.subscriptions = [];\n this.isBuffering = false;\n this.elem = ref.nativeElement;\n }\n ngOnInit() {\n if (this.API.isPlayerReady) {\n this.onPlayerReady();\n }\n else {\n this.subscriptions.push(this.API.playerReadyEvent.subscribe(() => this.onPlayerReady()));\n }\n }\n onPlayerReady() {\n this.target = this.API.getMediaById(this.vgFor);\n this.subscriptions.push(this.target.subscriptions.bufferDetected.subscribe((isBuffering) => this.onUpdateBuffer(isBuffering)));\n }\n onUpdateBuffer(isBuffering) {\n this.isBuffering = isBuffering;\n }\n ngOnDestroy() {\n this.subscriptions.forEach((s) => s.unsubscribe());\n }\n}\n/** @nocollapse */ /** @nocollapse */ VgBufferingComponent.ɵfac = function VgBufferingComponent_Factory(t) { return new (t || VgBufferingComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.VgApiService)); };\n/** @nocollapse */ /** @nocollapse */ VgBufferingComponent.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: VgBufferingComponent, selectors: [[\"vg-buffering\"]], hostVars: 2, hostBindings: function VgBufferingComponent_HostBindings(rf, ctx) { if (rf & 2) {\n i0.ɵɵclassProp(\"is-buffering\", ctx.isBuffering);\n } }, inputs: { vgFor: \"vgFor\" }, decls: 3, vars: 0, consts: [[1, \"vg-buffering\"], [1, \"bufferingContainer\"], [1, \"loadingSpinner\"]], template: function VgBufferingComponent_Template(rf, ctx) { if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 0);\n i0.ɵɵelementStart(1, \"div\", 1);\n i0.ɵɵelement(2, \"div\", 2);\n i0.ɵɵelementEnd();\n i0.ɵɵelementEnd();\n } }, styles: [\"vg-buffering{display:none;z-index:201}vg-buffering.is-buffering{display:block}.vg-buffering{position:absolute;display:block;width:100%;height:100%}.vg-buffering .bufferingContainer{width:100%;position:absolute;cursor:pointer;top:50%;margin-top:-50px;zoom:1;filter:alpha(opacity=60);opacity:.6}.vg-buffering .loadingSpinner{background-color:#0000;border:5px solid rgba(255,255,255,1);opacity:.9;border-top:5px solid rgba(0,0,0,0);border-left:5px solid rgba(0,0,0,0);border-radius:50px;box-shadow:0 0 35px #fff;width:50px;height:50px;margin:0 auto;-moz-animation:spin .5s infinite linear;-webkit-animation:spin .5s infinite linear}.vg-buffering .loadingSpinner .stop{-webkit-animation-play-state:paused;-moz-animation-play-state:paused}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}@-webkit-keyframes spinoff{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(-360deg)}}\\n\"], encapsulation: 2 });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(VgBufferingComponent, [{\n type: Component,\n args: [{\n selector: 'vg-buffering',\n encapsulation: ViewEncapsulation.None,\n template: `
\n
\n
\n
\n
`,\n styles: [\n `\n vg-buffering {\n display: none;\n z-index: 201;\n }\n vg-buffering.is-buffering {\n display: block;\n }\n\n .vg-buffering {\n position: absolute;\n display: block;\n width: 100%;\n height: 100%;\n }\n .vg-buffering .bufferingContainer {\n width: 100%;\n position: absolute;\n cursor: pointer;\n top: 50%;\n margin-top: -50px;\n zoom: 1;\n filter: alpha(opacity=60);\n opacity: 0.6;\n }\n /* Loading Spinner\n * http://www.alessioatzeni.com/blog/css3-loading-animation-loop/\n */\n .vg-buffering .loadingSpinner {\n background-color: rgba(0, 0, 0, 0);\n border: 5px solid rgba(255, 255, 255, 1);\n opacity: 0.9;\n border-top: 5px solid rgba(0, 0, 0, 0);\n border-left: 5px solid rgba(0, 0, 0, 0);\n border-radius: 50px;\n box-shadow: 0 0 35px #ffffff;\n width: 50px;\n height: 50px;\n margin: 0 auto;\n -moz-animation: spin 0.5s infinite linear;\n -webkit-animation: spin 0.5s infinite linear;\n }\n .vg-buffering .loadingSpinner .stop {\n -webkit-animation-play-state: paused;\n -moz-animation-play-state: paused;\n }\n @-moz-keyframes spin {\n 0% {\n -moz-transform: rotate(0deg);\n }\n 100% {\n -moz-transform: rotate(360deg);\n }\n }\n @-moz-keyframes spinoff {\n 0% {\n -moz-transform: rotate(0deg);\n }\n 100% {\n -moz-transform: rotate(-360deg);\n }\n }\n @-webkit-keyframes spin {\n 0% {\n -webkit-transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n }\n }\n @-webkit-keyframes spinoff {\n 0% {\n -webkit-transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(-360deg);\n }\n }\n `,\n ],\n }]\n }], function () { return [{ type: i0.ElementRef }, { type: i1.VgApiService }]; }, { vgFor: [{\n type: Input\n }], isBuffering: [{\n type: HostBinding,\n args: ['class.is-buffering']\n }] }); })();\n\nclass VgBufferingModule {\n}\n/** @nocollapse */ /** @nocollapse */ VgBufferingModule.ɵfac = function VgBufferingModule_Factory(t) { return new (t || VgBufferingModule)(); };\n/** @nocollapse */ /** @nocollapse */ VgBufferingModule.ɵmod = /** @pureOrBreakMyCode */ i0.ɵɵdefineNgModule({ type: VgBufferingModule });\n/** @nocollapse */ /** @nocollapse */ VgBufferingModule.ɵinj = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjector({ imports: [[CommonModule, VgCoreModule]] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(VgBufferingModule, [{\n type: NgModule,\n args: [{\n imports: [CommonModule, VgCoreModule],\n declarations: [VgBufferingComponent],\n exports: [VgBufferingComponent],\n }]\n }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && i0.ɵɵsetNgModuleScope(VgBufferingModule, { declarations: [VgBufferingComponent], imports: [CommonModule, VgCoreModule], exports: [VgBufferingComponent] }); })();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { VgBufferingComponent, VgBufferingModule };\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function filter(predicate, thisArg) {\n return operate((source, subscriber) => {\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => predicate.call(thisArg, value, index++) && subscriber.next(value)));\n });\n}\n","import * as i0 from '@angular/core';\nimport { Injectable, EventEmitter, InjectionToken, Inject, Directive, Input, Pipe, NgModule } from '@angular/core';\nimport { of, isObservable, forkJoin, concat, defer } from 'rxjs';\nimport { take, shareReplay, map, concatMap, switchMap } from 'rxjs/operators';\n\nclass TranslateLoader {\r\n}\r\n/**\r\n * This loader is just a placeholder that does nothing, in case you don't need a loader at all\r\n */\r\nclass TranslateFakeLoader extends TranslateLoader {\r\n getTranslation(lang) {\r\n return of({});\r\n }\r\n}\r\nTranslateFakeLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: TranslateFakeLoader, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\r\nTranslateFakeLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: TranslateFakeLoader });\r\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: TranslateFakeLoader, decorators: [{\r\n type: Injectable\r\n }] });\n\nclass MissingTranslationHandler {\r\n}\r\n/**\r\n * This handler is just a placeholder that does nothing, in case you don't need a missing translation handler at all\r\n */\r\nclass FakeMissingTranslationHandler {\r\n handle(params) {\r\n return params.key;\r\n }\r\n}\r\nFakeMissingTranslationHandler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: FakeMissingTranslationHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\r\nFakeMissingTranslationHandler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: FakeMissingTranslationHandler });\r\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: FakeMissingTranslationHandler, decorators: [{\r\n type: Injectable\r\n }] });\n\n/* tslint:disable */\r\n/**\r\n * Determines if two objects or two values are equivalent.\r\n *\r\n * Two objects or values are considered equivalent if at least one of the following is true:\r\n *\r\n * * Both objects or values pass `===` comparison.\r\n * * Both objects or values are of the same type and all of their properties are equal by\r\n * comparing them with `equals`.\r\n *\r\n * @param o1 Object or value to compare.\r\n * @param o2 Object or value to compare.\r\n * @returns true if arguments are equal.\r\n */\r\nfunction equals(o1, o2) {\r\n if (o1 === o2)\r\n return true;\r\n if (o1 === null || o2 === null)\r\n return false;\r\n if (o1 !== o1 && o2 !== o2)\r\n return true; // NaN === NaN\r\n let t1 = typeof o1, t2 = typeof o2, length, key, keySet;\r\n if (t1 == t2 && t1 == 'object') {\r\n if (Array.isArray(o1)) {\r\n if (!Array.isArray(o2))\r\n return false;\r\n if ((length = o1.length) == o2.length) {\r\n for (key = 0; key < length; key++) {\r\n if (!equals(o1[key], o2[key]))\r\n return false;\r\n }\r\n return true;\r\n }\r\n }\r\n else {\r\n if (Array.isArray(o2)) {\r\n return false;\r\n }\r\n keySet = Object.create(null);\r\n for (key in o1) {\r\n if (!equals(o1[key], o2[key])) {\r\n return false;\r\n }\r\n keySet[key] = true;\r\n }\r\n for (key in o2) {\r\n if (!(key in keySet) && typeof o2[key] !== 'undefined') {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n }\r\n return false;\r\n}\r\n/* tslint:enable */\r\nfunction isDefined(value) {\r\n return typeof value !== 'undefined' && value !== null;\r\n}\r\nfunction isObject(item) {\r\n return (item && typeof item === 'object' && !Array.isArray(item));\r\n}\r\nfunction mergeDeep(target, source) {\r\n let output = Object.assign({}, target);\r\n if (isObject(target) && isObject(source)) {\r\n Object.keys(source).forEach((key) => {\r\n if (isObject(source[key])) {\r\n if (!(key in target)) {\r\n Object.assign(output, { [key]: source[key] });\r\n }\r\n else {\r\n output[key] = mergeDeep(target[key], source[key]);\r\n }\r\n }\r\n else {\r\n Object.assign(output, { [key]: source[key] });\r\n }\r\n });\r\n }\r\n return output;\r\n}\n\nclass TranslateParser {\r\n}\r\nclass TranslateDefaultParser extends TranslateParser {\r\n constructor() {\r\n super(...arguments);\r\n this.templateMatcher = /{{\\s?([^{}\\s]*)\\s?}}/g;\r\n }\r\n interpolate(expr, params) {\r\n let result;\r\n if (typeof expr === 'string') {\r\n result = this.interpolateString(expr, params);\r\n }\r\n else if (typeof expr === 'function') {\r\n result = this.interpolateFunction(expr, params);\r\n }\r\n else {\r\n // this should not happen, but an unrelated TranslateService test depends on it\r\n result = expr;\r\n }\r\n return result;\r\n }\r\n getValue(target, key) {\r\n let keys = typeof key === 'string' ? key.split('.') : [key];\r\n key = '';\r\n do {\r\n key += keys.shift();\r\n if (isDefined(target) && isDefined(target[key]) && (typeof target[key] === 'object' || !keys.length)) {\r\n target = target[key];\r\n key = '';\r\n }\r\n else if (!keys.length) {\r\n target = undefined;\r\n }\r\n else {\r\n key += '.';\r\n }\r\n } while (keys.length);\r\n return target;\r\n }\r\n interpolateFunction(fn, params) {\r\n return fn(params);\r\n }\r\n interpolateString(expr, params) {\r\n if (!params) {\r\n return expr;\r\n }\r\n return expr.replace(this.templateMatcher, (substring, b) => {\r\n let r = this.getValue(params, b);\r\n return isDefined(r) ? r : substring;\r\n });\r\n }\r\n}\r\nTranslateDefaultParser.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: TranslateDefaultParser, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\r\nTranslateDefaultParser.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: TranslateDefaultParser });\r\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: TranslateDefaultParser, decorators: [{\r\n type: Injectable\r\n }] });\n\nclass TranslateCompiler {\r\n}\r\n/**\r\n * This compiler is just a placeholder that does nothing, in case you don't need a compiler at all\r\n */\r\nclass TranslateFakeCompiler extends TranslateCompiler {\r\n compile(value, lang) {\r\n return value;\r\n }\r\n compileTranslations(translations, lang) {\r\n return translations;\r\n }\r\n}\r\nTranslateFakeCompiler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: TranslateFakeCompiler, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\r\nTranslateFakeCompiler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: TranslateFakeCompiler });\r\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: TranslateFakeCompiler, decorators: [{\r\n type: Injectable\r\n }] });\n\nclass TranslateStore {\r\n constructor() {\r\n /**\r\n * The lang currently used\r\n */\r\n this.currentLang = this.defaultLang;\r\n /**\r\n * a list of translations per lang\r\n */\r\n this.translations = {};\r\n /**\r\n * an array of langs\r\n */\r\n this.langs = [];\r\n /**\r\n * An EventEmitter to listen to translation change events\r\n * onTranslationChange.subscribe((params: TranslationChangeEvent) => {\r\n * // do something\r\n * });\r\n */\r\n this.onTranslationChange = new EventEmitter();\r\n /**\r\n * An EventEmitter to listen to lang change events\r\n * onLangChange.subscribe((params: LangChangeEvent) => {\r\n * // do something\r\n * });\r\n */\r\n this.onLangChange = new EventEmitter();\r\n /**\r\n * An EventEmitter to listen to default lang change events\r\n * onDefaultLangChange.subscribe((params: DefaultLangChangeEvent) => {\r\n * // do something\r\n * });\r\n */\r\n this.onDefaultLangChange = new EventEmitter();\r\n }\r\n}\n\nconst USE_STORE = new InjectionToken('USE_STORE');\r\nconst USE_DEFAULT_LANG = new InjectionToken('USE_DEFAULT_LANG');\r\nconst DEFAULT_LANGUAGE = new InjectionToken('DEFAULT_LANGUAGE');\r\nconst USE_EXTEND = new InjectionToken('USE_EXTEND');\r\nclass TranslateService {\r\n /**\r\n *\r\n * @param store an instance of the store (that is supposed to be unique)\r\n * @param currentLoader An instance of the loader currently used\r\n * @param compiler An instance of the compiler currently used\r\n * @param parser An instance of the parser currently used\r\n * @param missingTranslationHandler A handler for missing translations.\r\n * @param useDefaultLang whether we should use default language translation when current language translation is missing.\r\n * @param isolate whether this service should use the store or not\r\n * @param extend To make a child module extend (and use) translations from parent modules.\r\n * @param defaultLanguage Set the default language using configuration\r\n */\r\n constructor(store, currentLoader, compiler, parser, missingTranslationHandler, useDefaultLang = true, isolate = false, extend = false, defaultLanguage) {\r\n this.store = store;\r\n this.currentLoader = currentLoader;\r\n this.compiler = compiler;\r\n this.parser = parser;\r\n this.missingTranslationHandler = missingTranslationHandler;\r\n this.useDefaultLang = useDefaultLang;\r\n this.isolate = isolate;\r\n this.extend = extend;\r\n this.pending = false;\r\n this._onTranslationChange = new EventEmitter();\r\n this._onLangChange = new EventEmitter();\r\n this._onDefaultLangChange = new EventEmitter();\r\n this._langs = [];\r\n this._translations = {};\r\n this._translationRequests = {};\r\n /** set the default language from configuration */\r\n if (defaultLanguage) {\r\n this.setDefaultLang(defaultLanguage);\r\n }\r\n }\r\n /**\r\n * An EventEmitter to listen to translation change events\r\n * onTranslationChange.subscribe((params: TranslationChangeEvent) => {\r\n * // do something\r\n * });\r\n */\r\n get onTranslationChange() {\r\n return this.isolate ? this._onTranslationChange : this.store.onTranslationChange;\r\n }\r\n /**\r\n * An EventEmitter to listen to lang change events\r\n * onLangChange.subscribe((params: LangChangeEvent) => {\r\n * // do something\r\n * });\r\n */\r\n get onLangChange() {\r\n return this.isolate ? this._onLangChange : this.store.onLangChange;\r\n }\r\n /**\r\n * An EventEmitter to listen to default lang change events\r\n * onDefaultLangChange.subscribe((params: DefaultLangChangeEvent) => {\r\n * // do something\r\n * });\r\n */\r\n get onDefaultLangChange() {\r\n return this.isolate ? this._onDefaultLangChange : this.store.onDefaultLangChange;\r\n }\r\n /**\r\n * The default lang to fallback when translations are missing on the current lang\r\n */\r\n get defaultLang() {\r\n return this.isolate ? this._defaultLang : this.store.defaultLang;\r\n }\r\n set defaultLang(defaultLang) {\r\n if (this.isolate) {\r\n this._defaultLang = defaultLang;\r\n }\r\n else {\r\n this.store.defaultLang = defaultLang;\r\n }\r\n }\r\n /**\r\n * The lang currently used\r\n */\r\n get currentLang() {\r\n return this.isolate ? this._currentLang : this.store.currentLang;\r\n }\r\n set currentLang(currentLang) {\r\n if (this.isolate) {\r\n this._currentLang = currentLang;\r\n }\r\n else {\r\n this.store.currentLang = currentLang;\r\n }\r\n }\r\n /**\r\n * an array of langs\r\n */\r\n get langs() {\r\n return this.isolate ? this._langs : this.store.langs;\r\n }\r\n set langs(langs) {\r\n if (this.isolate) {\r\n this._langs = langs;\r\n }\r\n else {\r\n this.store.langs = langs;\r\n }\r\n }\r\n /**\r\n * a list of translations per lang\r\n */\r\n get translations() {\r\n return this.isolate ? this._translations : this.store.translations;\r\n }\r\n set translations(translations) {\r\n if (this.isolate) {\r\n this._translations = translations;\r\n }\r\n else {\r\n this.store.translations = translations;\r\n }\r\n }\r\n /**\r\n * Sets the default language to use as a fallback\r\n */\r\n setDefaultLang(lang) {\r\n if (lang === this.defaultLang) {\r\n return;\r\n }\r\n let pending = this.retrieveTranslations(lang);\r\n if (typeof pending !== \"undefined\") {\r\n // on init set the defaultLang immediately\r\n if (this.defaultLang == null) {\r\n this.defaultLang = lang;\r\n }\r\n pending.pipe(take(1))\r\n .subscribe((res) => {\r\n this.changeDefaultLang(lang);\r\n });\r\n }\r\n else { // we already have this language\r\n this.changeDefaultLang(lang);\r\n }\r\n }\r\n /**\r\n * Gets the default language used\r\n */\r\n getDefaultLang() {\r\n return this.defaultLang;\r\n }\r\n /**\r\n * Changes the lang currently used\r\n */\r\n use(lang) {\r\n // don't change the language if the language given is already selected\r\n if (lang === this.currentLang) {\r\n return of(this.translations[lang]);\r\n }\r\n let pending = this.retrieveTranslations(lang);\r\n if (typeof pending !== \"undefined\") {\r\n // on init set the currentLang immediately\r\n if (!this.currentLang) {\r\n this.currentLang = lang;\r\n }\r\n pending.pipe(take(1))\r\n .subscribe((res) => {\r\n this.changeLang(lang);\r\n });\r\n return pending;\r\n }\r\n else { // we have this language, return an Observable\r\n this.changeLang(lang);\r\n return of(this.translations[lang]);\r\n }\r\n }\r\n /**\r\n * Retrieves the given translations\r\n */\r\n retrieveTranslations(lang) {\r\n let pending;\r\n // if this language is unavailable or extend is true, ask for it\r\n if (typeof this.translations[lang] === \"undefined\" || this.extend) {\r\n this._translationRequests[lang] = this._translationRequests[lang] || this.getTranslation(lang);\r\n pending = this._translationRequests[lang];\r\n }\r\n return pending;\r\n }\r\n /**\r\n * Gets an object of translations for a given language with the current loader\r\n * and passes it through the compiler\r\n */\r\n getTranslation(lang) {\r\n this.pending = true;\r\n const loadingTranslations = this.currentLoader.getTranslation(lang).pipe(shareReplay(1), take(1));\r\n this.loadingTranslations = loadingTranslations.pipe(map((res) => this.compiler.compileTranslations(res, lang)), shareReplay(1), take(1));\r\n this.loadingTranslations\r\n .subscribe({\r\n next: (res) => {\r\n this.translations[lang] = this.extend && this.translations[lang] ? { ...res, ...this.translations[lang] } : res;\r\n this.updateLangs();\r\n this.pending = false;\r\n },\r\n error: (err) => {\r\n this.pending = false;\r\n }\r\n });\r\n return loadingTranslations;\r\n }\r\n /**\r\n * Manually sets an object of translations for a given language\r\n * after passing it through the compiler\r\n */\r\n setTranslation(lang, translations, shouldMerge = false) {\r\n translations = this.compiler.compileTranslations(translations, lang);\r\n if ((shouldMerge || this.extend) && this.translations[lang]) {\r\n this.translations[lang] = mergeDeep(this.translations[lang], translations);\r\n }\r\n else {\r\n this.translations[lang] = translations;\r\n }\r\n this.updateLangs();\r\n this.onTranslationChange.emit({ lang: lang, translations: this.translations[lang] });\r\n }\r\n /**\r\n * Returns an array of currently available langs\r\n */\r\n getLangs() {\r\n return this.langs;\r\n }\r\n /**\r\n * Add available langs\r\n */\r\n addLangs(langs) {\r\n langs.forEach((lang) => {\r\n if (this.langs.indexOf(lang) === -1) {\r\n this.langs.push(lang);\r\n }\r\n });\r\n }\r\n /**\r\n * Update the list of available langs\r\n */\r\n updateLangs() {\r\n this.addLangs(Object.keys(this.translations));\r\n }\r\n /**\r\n * Returns the parsed result of the translations\r\n */\r\n getParsedResult(translations, key, interpolateParams) {\r\n let res;\r\n if (key instanceof Array) {\r\n let result = {}, observables = false;\r\n for (let k of key) {\r\n result[k] = this.getParsedResult(translations, k, interpolateParams);\r\n if (isObservable(result[k])) {\r\n observables = true;\r\n }\r\n }\r\n if (observables) {\r\n const sources = key.map(k => isObservable(result[k]) ? result[k] : of(result[k]));\r\n return forkJoin(sources).pipe(map((arr) => {\r\n let obj = {};\r\n arr.forEach((value, index) => {\r\n obj[key[index]] = value;\r\n });\r\n return obj;\r\n }));\r\n }\r\n return result;\r\n }\r\n if (translations) {\r\n res = this.parser.interpolate(this.parser.getValue(translations, key), interpolateParams);\r\n }\r\n if (typeof res === \"undefined\" && this.defaultLang != null && this.defaultLang !== this.currentLang && this.useDefaultLang) {\r\n res = this.parser.interpolate(this.parser.getValue(this.translations[this.defaultLang], key), interpolateParams);\r\n }\r\n if (typeof res === \"undefined\") {\r\n let params = { key, translateService: this };\r\n if (typeof interpolateParams !== 'undefined') {\r\n params.interpolateParams = interpolateParams;\r\n }\r\n res = this.missingTranslationHandler.handle(params);\r\n }\r\n return typeof res !== \"undefined\" ? res : key;\r\n }\r\n /**\r\n * Gets the translated value of a key (or an array of keys)\r\n * @returns the translated key, or an object of translated keys\r\n */\r\n get(key, interpolateParams) {\r\n if (!isDefined(key) || !key.length) {\r\n throw new Error(`Parameter \"key\" required`);\r\n }\r\n // check if we are loading a new translation to use\r\n if (this.pending) {\r\n return this.loadingTranslations.pipe(concatMap((res) => {\r\n res = this.getParsedResult(res, key, interpolateParams);\r\n return isObservable(res) ? res : of(res);\r\n }));\r\n }\r\n else {\r\n let res = this.getParsedResult(this.translations[this.currentLang], key, interpolateParams);\r\n return isObservable(res) ? res : of(res);\r\n }\r\n }\r\n /**\r\n * Returns a stream of translated values of a key (or an array of keys) which updates\r\n * whenever the translation changes.\r\n * @returns A stream of the translated key, or an object of translated keys\r\n */\r\n getStreamOnTranslationChange(key, interpolateParams) {\r\n if (!isDefined(key) || !key.length) {\r\n throw new Error(`Parameter \"key\" required`);\r\n }\r\n return concat(defer(() => this.get(key, interpolateParams)), this.onTranslationChange.pipe(switchMap((event) => {\r\n const res = this.getParsedResult(event.translations, key, interpolateParams);\r\n if (typeof res.subscribe === 'function') {\r\n return res;\r\n }\r\n else {\r\n return of(res);\r\n }\r\n })));\r\n }\r\n /**\r\n * Returns a stream of translated values of a key (or an array of keys) which updates\r\n * whenever the language changes.\r\n * @returns A stream of the translated key, or an object of translated keys\r\n */\r\n stream(key, interpolateParams) {\r\n if (!isDefined(key) || !key.length) {\r\n throw new Error(`Parameter \"key\" required`);\r\n }\r\n return concat(defer(() => this.get(key, interpolateParams)), this.onLangChange.pipe(switchMap((event) => {\r\n const res = this.getParsedResult(event.translations, key, interpolateParams);\r\n return isObservable(res) ? res : of(res);\r\n })));\r\n }\r\n /**\r\n * Returns a translation instantly from the internal state of loaded translation.\r\n * All rules regarding the current language, the preferred language of even fallback languages will be used except any promise handling.\r\n */\r\n instant(key, interpolateParams) {\r\n if (!isDefined(key) || !key.length) {\r\n throw new Error(`Parameter \"key\" required`);\r\n }\r\n let res = this.getParsedResult(this.translations[this.currentLang], key, interpolateParams);\r\n if (isObservable(res)) {\r\n if (key instanceof Array) {\r\n let obj = {};\r\n key.forEach((value, index) => {\r\n obj[key[index]] = key[index];\r\n });\r\n return obj;\r\n }\r\n return key;\r\n }\r\n else {\r\n return res;\r\n }\r\n }\r\n /**\r\n * Sets the translated value of a key, after compiling it\r\n */\r\n set(key, value, lang = this.currentLang) {\r\n this.translations[lang][key] = this.compiler.compile(value, lang);\r\n this.updateLangs();\r\n this.onTranslationChange.emit({ lang: lang, translations: this.translations[lang] });\r\n }\r\n /**\r\n * Changes the current lang\r\n */\r\n changeLang(lang) {\r\n this.currentLang = lang;\r\n this.onLangChange.emit({ lang: lang, translations: this.translations[lang] });\r\n // if there is no default lang, use the one that we just set\r\n if (this.defaultLang == null) {\r\n this.changeDefaultLang(lang);\r\n }\r\n }\r\n /**\r\n * Changes the default lang\r\n */\r\n changeDefaultLang(lang) {\r\n this.defaultLang = lang;\r\n this.onDefaultLangChange.emit({ lang: lang, translations: this.translations[lang] });\r\n }\r\n /**\r\n * Allows to reload the lang file from the file\r\n */\r\n reloadLang(lang) {\r\n this.resetLang(lang);\r\n return this.getTranslation(lang);\r\n }\r\n /**\r\n * Deletes inner translation\r\n */\r\n resetLang(lang) {\r\n this._translationRequests[lang] = undefined;\r\n this.translations[lang] = undefined;\r\n }\r\n /**\r\n * Returns the language code name from the browser, e.g. \"de\"\r\n */\r\n getBrowserLang() {\r\n if (typeof window === 'undefined' || typeof window.navigator === 'undefined') {\r\n return undefined;\r\n }\r\n let browserLang = window.navigator.languages ? window.navigator.languages[0] : null;\r\n browserLang = browserLang || window.navigator.language || window.navigator.browserLanguage || window.navigator.userLanguage;\r\n if (typeof browserLang === 'undefined') {\r\n return undefined;\r\n }\r\n if (browserLang.indexOf('-') !== -1) {\r\n browserLang = browserLang.split('-')[0];\r\n }\r\n if (browserLang.indexOf('_') !== -1) {\r\n browserLang = browserLang.split('_')[0];\r\n }\r\n return browserLang;\r\n }\r\n /**\r\n * Returns the culture language code name from the browser, e.g. \"de-DE\"\r\n */\r\n getBrowserCultureLang() {\r\n if (typeof window === 'undefined' || typeof window.navigator === 'undefined') {\r\n return undefined;\r\n }\r\n let browserCultureLang = window.navigator.languages ? window.navigator.languages[0] : null;\r\n browserCultureLang = browserCultureLang || window.navigator.language || window.navigator.browserLanguage || window.navigator.userLanguage;\r\n return browserCultureLang;\r\n }\r\n}\r\nTranslateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: TranslateService, deps: [{ token: TranslateStore }, { token: TranslateLoader }, { token: TranslateCompiler }, { token: TranslateParser }, { token: MissingTranslationHandler }, { token: USE_DEFAULT_LANG }, { token: USE_STORE }, { token: USE_EXTEND }, { token: DEFAULT_LANGUAGE }], target: i0.ɵɵFactoryTarget.Injectable });\r\nTranslateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: TranslateService });\r\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: TranslateService, decorators: [{\r\n type: Injectable\r\n }], ctorParameters: function () { return [{ type: TranslateStore }, { type: TranslateLoader }, { type: TranslateCompiler }, { type: TranslateParser }, { type: MissingTranslationHandler }, { type: undefined, decorators: [{\r\n type: Inject,\r\n args: [USE_DEFAULT_LANG]\r\n }] }, { type: undefined, decorators: [{\r\n type: Inject,\r\n args: [USE_STORE]\r\n }] }, { type: undefined, decorators: [{\r\n type: Inject,\r\n args: [USE_EXTEND]\r\n }] }, { type: undefined, decorators: [{\r\n type: Inject,\r\n args: [DEFAULT_LANGUAGE]\r\n }] }]; } });\n\nclass TranslateDirective {\r\n constructor(translateService, element, _ref) {\r\n this.translateService = translateService;\r\n this.element = element;\r\n this._ref = _ref;\r\n // subscribe to onTranslationChange event, in case the translations of the current lang change\r\n if (!this.onTranslationChangeSub) {\r\n this.onTranslationChangeSub = this.translateService.onTranslationChange.subscribe((event) => {\r\n if (event.lang === this.translateService.currentLang) {\r\n this.checkNodes(true, event.translations);\r\n }\r\n });\r\n }\r\n // subscribe to onLangChange event, in case the language changes\r\n if (!this.onLangChangeSub) {\r\n this.onLangChangeSub = this.translateService.onLangChange.subscribe((event) => {\r\n this.checkNodes(true, event.translations);\r\n });\r\n }\r\n // subscribe to onDefaultLangChange event, in case the default language changes\r\n if (!this.onDefaultLangChangeSub) {\r\n this.onDefaultLangChangeSub = this.translateService.onDefaultLangChange.subscribe((event) => {\r\n this.checkNodes(true);\r\n });\r\n }\r\n }\r\n set translate(key) {\r\n if (key) {\r\n this.key = key;\r\n this.checkNodes();\r\n }\r\n }\r\n set translateParams(params) {\r\n if (!equals(this.currentParams, params)) {\r\n this.currentParams = params;\r\n this.checkNodes(true);\r\n }\r\n }\r\n ngAfterViewChecked() {\r\n this.checkNodes();\r\n }\r\n checkNodes(forceUpdate = false, translations) {\r\n let nodes = this.element.nativeElement.childNodes;\r\n // if the element is empty\r\n if (!nodes.length) {\r\n // we add the key as content\r\n this.setContent(this.element.nativeElement, this.key);\r\n nodes = this.element.nativeElement.childNodes;\r\n }\r\n for (let i = 0; i < nodes.length; ++i) {\r\n let node = nodes[i];\r\n if (node.nodeType === 3) { // node type 3 is a text node\r\n let key;\r\n if (forceUpdate) {\r\n node.lastKey = null;\r\n }\r\n if (isDefined(node.lookupKey)) {\r\n key = node.lookupKey;\r\n }\r\n else if (this.key) {\r\n key = this.key;\r\n }\r\n else {\r\n let content = this.getContent(node);\r\n let trimmedContent = content.trim();\r\n if (trimmedContent.length) {\r\n node.lookupKey = trimmedContent;\r\n // we want to use the content as a key, not the translation value\r\n if (content !== node.currentValue) {\r\n key = trimmedContent;\r\n // the content was changed from the user, we'll use it as a reference if needed\r\n node.originalContent = content || node.originalContent;\r\n }\r\n else if (node.originalContent) { // the content seems ok, but the lang has changed\r\n // the current content is the translation, not the key, use the last real content as key\r\n key = node.originalContent.trim();\r\n }\r\n else if (content !== node.currentValue) {\r\n // we want to use the content as a key, not the translation value\r\n key = trimmedContent;\r\n // the content was changed from the user, we'll use it as a reference if needed\r\n node.originalContent = content || node.originalContent;\r\n }\r\n }\r\n }\r\n this.updateValue(key, node, translations);\r\n }\r\n }\r\n }\r\n updateValue(key, node, translations) {\r\n if (key) {\r\n if (node.lastKey === key && this.lastParams === this.currentParams) {\r\n return;\r\n }\r\n this.lastParams = this.currentParams;\r\n let onTranslation = (res) => {\r\n if (res !== key) {\r\n node.lastKey = key;\r\n }\r\n if (!node.originalContent) {\r\n node.originalContent = this.getContent(node);\r\n }\r\n node.currentValue = isDefined(res) ? res : (node.originalContent || key);\r\n // we replace in the original content to preserve spaces that we might have trimmed\r\n this.setContent(node, this.key ? node.currentValue : node.originalContent.replace(key, node.currentValue));\r\n this._ref.markForCheck();\r\n };\r\n if (isDefined(translations)) {\r\n let res = this.translateService.getParsedResult(translations, key, this.currentParams);\r\n if (isObservable(res)) {\r\n res.subscribe({ next: onTranslation });\r\n }\r\n else {\r\n onTranslation(res);\r\n }\r\n }\r\n else {\r\n this.translateService.get(key, this.currentParams).subscribe(onTranslation);\r\n }\r\n }\r\n }\r\n getContent(node) {\r\n return isDefined(node.textContent) ? node.textContent : node.data;\r\n }\r\n setContent(node, content) {\r\n if (isDefined(node.textContent)) {\r\n node.textContent = content;\r\n }\r\n else {\r\n node.data = content;\r\n }\r\n }\r\n ngOnDestroy() {\r\n if (this.onLangChangeSub) {\r\n this.onLangChangeSub.unsubscribe();\r\n }\r\n if (this.onDefaultLangChangeSub) {\r\n this.onDefaultLangChangeSub.unsubscribe();\r\n }\r\n if (this.onTranslationChangeSub) {\r\n this.onTranslationChangeSub.unsubscribe();\r\n }\r\n }\r\n}\r\nTranslateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: TranslateDirective, deps: [{ token: TranslateService }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });\r\nTranslateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"12.0.0\", version: \"13.0.0\", type: TranslateDirective, selector: \"[translate],[ngx-translate]\", inputs: { translate: \"translate\", translateParams: \"translateParams\" }, ngImport: i0 });\r\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: TranslateDirective, decorators: [{\r\n type: Directive,\r\n args: [{\r\n selector: '[translate],[ngx-translate]'\r\n }]\r\n }], ctorParameters: function () { return [{ type: TranslateService }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { translate: [{\r\n type: Input\r\n }], translateParams: [{\r\n type: Input\r\n }] } });\n\nclass TranslatePipe {\r\n constructor(translate, _ref) {\r\n this.translate = translate;\r\n this._ref = _ref;\r\n this.value = '';\r\n this.lastKey = null;\r\n this.lastParams = [];\r\n }\r\n updateValue(key, interpolateParams, translations) {\r\n let onTranslation = (res) => {\r\n this.value = res !== undefined ? res : key;\r\n this.lastKey = key;\r\n this._ref.markForCheck();\r\n };\r\n if (translations) {\r\n let res = this.translate.getParsedResult(translations, key, interpolateParams);\r\n if (isObservable(res.subscribe)) {\r\n res.subscribe(onTranslation);\r\n }\r\n else {\r\n onTranslation(res);\r\n }\r\n }\r\n this.translate.get(key, interpolateParams).subscribe(onTranslation);\r\n }\r\n transform(query, ...args) {\r\n if (!query || !query.length) {\r\n return query;\r\n }\r\n // if we ask another time for the same key, return the last value\r\n if (equals(query, this.lastKey) && equals(args, this.lastParams)) {\r\n return this.value;\r\n }\r\n let interpolateParams = undefined;\r\n if (isDefined(args[0]) && args.length) {\r\n if (typeof args[0] === 'string' && args[0].length) {\r\n // we accept objects written in the template such as {n:1}, {'n':1}, {n:'v'}\r\n // which is why we might need to change it to real JSON objects such as {\"n\":1} or {\"n\":\"v\"}\r\n let validArgs = args[0]\r\n .replace(/(\\')?([a-zA-Z0-9_]+)(\\')?(\\s)?:/g, '\"$2\":')\r\n .replace(/:(\\s)?(\\')(.*?)(\\')/g, ':\"$3\"');\r\n try {\r\n interpolateParams = JSON.parse(validArgs);\r\n }\r\n catch (e) {\r\n throw new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${args[0]}`);\r\n }\r\n }\r\n else if (typeof args[0] === 'object' && !Array.isArray(args[0])) {\r\n interpolateParams = args[0];\r\n }\r\n }\r\n // store the query, in case it changes\r\n this.lastKey = query;\r\n // store the params, in case they change\r\n this.lastParams = args;\r\n // set the value\r\n this.updateValue(query, interpolateParams);\r\n // if there is a subscription to onLangChange, clean it\r\n this._dispose();\r\n // subscribe to onTranslationChange event, in case the translations change\r\n if (!this.onTranslationChange) {\r\n this.onTranslationChange = this.translate.onTranslationChange.subscribe((event) => {\r\n if (this.lastKey && event.lang === this.translate.currentLang) {\r\n this.lastKey = null;\r\n this.updateValue(query, interpolateParams, event.translations);\r\n }\r\n });\r\n }\r\n // subscribe to onLangChange event, in case the language changes\r\n if (!this.onLangChange) {\r\n this.onLangChange = this.translate.onLangChange.subscribe((event) => {\r\n if (this.lastKey) {\r\n this.lastKey = null; // we want to make sure it doesn't return the same value until it's been updated\r\n this.updateValue(query, interpolateParams, event.translations);\r\n }\r\n });\r\n }\r\n // subscribe to onDefaultLangChange event, in case the default language changes\r\n if (!this.onDefaultLangChange) {\r\n this.onDefaultLangChange = this.translate.onDefaultLangChange.subscribe(() => {\r\n if (this.lastKey) {\r\n this.lastKey = null; // we want to make sure it doesn't return the same value until it's been updated\r\n this.updateValue(query, interpolateParams);\r\n }\r\n });\r\n }\r\n return this.value;\r\n }\r\n /**\r\n * Clean any existing subscription to change events\r\n */\r\n _dispose() {\r\n if (typeof this.onTranslationChange !== 'undefined') {\r\n this.onTranslationChange.unsubscribe();\r\n this.onTranslationChange = undefined;\r\n }\r\n if (typeof this.onLangChange !== 'undefined') {\r\n this.onLangChange.unsubscribe();\r\n this.onLangChange = undefined;\r\n }\r\n if (typeof this.onDefaultLangChange !== 'undefined') {\r\n this.onDefaultLangChange.unsubscribe();\r\n this.onDefaultLangChange = undefined;\r\n }\r\n }\r\n ngOnDestroy() {\r\n this._dispose();\r\n }\r\n}\r\nTranslatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: TranslatePipe, deps: [{ token: TranslateService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe });\r\nTranslatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: TranslatePipe, name: \"translate\", pure: false });\r\nTranslatePipe.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: TranslatePipe });\r\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: TranslatePipe, decorators: [{\r\n type: Injectable\r\n }, {\r\n type: Pipe,\r\n args: [{\r\n name: 'translate',\r\n pure: false // required to update the value when the promise is resolved\r\n }]\r\n }], ctorParameters: function () { return [{ type: TranslateService }, { type: i0.ChangeDetectorRef }]; } });\n\nclass TranslateModule {\r\n /**\r\n * Use this method in your root module to provide the TranslateService\r\n */\r\n static forRoot(config = {}) {\r\n return {\r\n ngModule: TranslateModule,\r\n providers: [\r\n config.loader || { provide: TranslateLoader, useClass: TranslateFakeLoader },\r\n config.compiler || { provide: TranslateCompiler, useClass: TranslateFakeCompiler },\r\n config.parser || { provide: TranslateParser, useClass: TranslateDefaultParser },\r\n config.missingTranslationHandler || { provide: MissingTranslationHandler, useClass: FakeMissingTranslationHandler },\r\n TranslateStore,\r\n { provide: USE_STORE, useValue: config.isolate },\r\n { provide: USE_DEFAULT_LANG, useValue: config.useDefaultLang },\r\n { provide: USE_EXTEND, useValue: config.extend },\r\n { provide: DEFAULT_LANGUAGE, useValue: config.defaultLanguage },\r\n TranslateService\r\n ]\r\n };\r\n }\r\n /**\r\n * Use this method in your other (non root) modules to import the directive/pipe\r\n */\r\n static forChild(config = {}) {\r\n return {\r\n ngModule: TranslateModule,\r\n providers: [\r\n config.loader || { provide: TranslateLoader, useClass: TranslateFakeLoader },\r\n config.compiler || { provide: TranslateCompiler, useClass: TranslateFakeCompiler },\r\n config.parser || { provide: TranslateParser, useClass: TranslateDefaultParser },\r\n config.missingTranslationHandler || { provide: MissingTranslationHandler, useClass: FakeMissingTranslationHandler },\r\n { provide: USE_STORE, useValue: config.isolate },\r\n { provide: USE_DEFAULT_LANG, useValue: config.useDefaultLang },\r\n { provide: USE_EXTEND, useValue: config.extend },\r\n { provide: DEFAULT_LANGUAGE, useValue: config.defaultLanguage },\r\n TranslateService\r\n ]\r\n };\r\n }\r\n}\r\nTranslateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: TranslateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\r\nTranslateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: TranslateModule, declarations: [TranslatePipe,\r\n TranslateDirective], exports: [TranslatePipe,\r\n TranslateDirective] });\r\nTranslateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: TranslateModule });\r\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: TranslateModule, decorators: [{\r\n type: NgModule,\r\n args: [{\r\n declarations: [\r\n TranslatePipe,\r\n TranslateDirective\r\n ],\r\n exports: [\r\n TranslatePipe,\r\n TranslateDirective\r\n ]\r\n }]\r\n }] });\n\n/**\r\n * Generated bundle index. Do not edit.\r\n */\n\nexport { DEFAULT_LANGUAGE, FakeMissingTranslationHandler, MissingTranslationHandler, TranslateCompiler, TranslateDefaultParser, TranslateDirective, TranslateFakeCompiler, TranslateFakeLoader, TranslateLoader, TranslateModule, TranslateParser, TranslatePipe, TranslateService, TranslateStore, USE_DEFAULT_LANG, USE_EXTEND, USE_STORE };\n","
\n \n
\n
{{ toast.message }}
\n \n
\n
\n","import { Component, OnInit, OnDestroy, Input, Output, EventEmitter } from '@angular/core';\nimport { Observable, Subscription } from 'rxjs';\nimport { Toast, ToastType, ToastDelay } from '@brightside/brightside-ui-services';\n\n\n@Component({\n selector: 'bw-toast',\n templateUrl: './toast.component.html',\n styleUrls: ['./toast.component.scss']\n})\nexport class ToastComponent implements OnInit, OnDestroy {\n @Input() id = 'default-toast';\n @Input() fade = true;\n @Output() emit = new EventEmitter();\n @Output() emitClosed = new EventEmitter();\n @Input() toastObs = new Observable();\n toasts: Toast[] = [];\n\n toastSubscription: Subscription;\n\n constructor() {}\n\n resetToasts(){\n this.toasts = [];\n }\n\n ngOnInit() {\n this.toastSubscription = this.toastObs.subscribe(toast => {\n if (toast.message === 'delete') {\n this.toasts = this.toasts.filter(t => t.id !== toast.id);\n return;\n }\n\n this.toasts.push(toast);\n\n if (toast.transient) {\n setTimeout(() => this.removeToast(toast), ToastDelay);\n }\n });\n }\n\n ngOnDestroy() {\n if (this.toastSubscription) {\n this.toastSubscription.unsubscribe();\n }\n }\n\n removeToast(toast: Toast) {\n toast.closing = true;\n this.emit.emit(toast);\n if (this.fade) {\n toast.fade = true;\n setTimeout(() => {\n this.toasts = this.toasts.filter(x => x !== toast);\n }, 301);\n } else {\n this.toasts = this.toasts.filter(x => x !== toast);\n }\n }\n\n cssClass(toast: Toast) {\n if (!toast) return;\n\n const classes = ['toast'];\n const toastTypeClass = {\n [ToastType.Success]: 'toast-success',\n [ToastType.Error]: 'toast-danger',\n [ToastType.Info]: 'toast-info',\n [ToastType.Warning]: 'toast-warning',\n [ToastType.InfoBlue]: 'toast-infoblue'\n };\n\n classes.push(toastTypeClass[toast.type]);\n\n if (toast.fade) {\n classes.push('fade');\n }\n\n return classes.join(' ');\n }\n\n emitLinkClicked(toast: Toast) {\n const toastToDeliver = {...toast};\n this.removeToast(toast);\n this.emit.emit(toastToDeliver);\n }\n}\n","import * as i0 from '@angular/core';\nimport { Component, ViewEncapsulation, HostBinding, Input, ViewChild, HostListener, Pipe, EventEmitter, Output, NgModule } from '@angular/core';\nimport * as i2 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport { fromEvent } from 'rxjs';\nimport * as i1 from '@videogular/ngx-videogular/core';\nimport { VgStates, VgApiService, VgCoreModule } from '@videogular/ngx-videogular/core';\n\nconst _c0$3 = [\"*\"];\nclass VgControlsComponent {\n // @ts-ignore\n constructor(API, ref, hidden) {\n this.API = API;\n this.hidden = hidden;\n this.isAdsPlaying = 'initial';\n this.hideControls = false;\n this.vgAutohide = false;\n this.vgAutohideTime = 3;\n this.subscriptions = [];\n this.elem = ref.nativeElement;\n }\n ngOnInit() {\n this.mouseMove$ = fromEvent(this.API.videogularElement, 'mousemove');\n this.subscriptions.push(this.mouseMove$.subscribe(this.show.bind(this)));\n this.touchStart$ = fromEvent(this.API.videogularElement, 'touchstart');\n this.subscriptions.push(this.touchStart$.subscribe(this.show.bind(this)));\n this.mouseClick$ = fromEvent(this.API.videogularElement, 'click');\n this.subscriptions.push(this.mouseClick$.subscribe(this.show.bind(this)));\n if (this.API.isPlayerReady) {\n this.onPlayerReady();\n }\n else {\n this.subscriptions.push(this.API.playerReadyEvent.subscribe(() => this.onPlayerReady()));\n }\n }\n onPlayerReady() {\n this.target = this.API.getMediaById(this.vgFor);\n this.subscriptions.push(this.target.subscriptions.play.subscribe(this.onPlay.bind(this)));\n this.subscriptions.push(this.target.subscriptions.pause.subscribe(this.onPause.bind(this)));\n this.subscriptions.push(this.target.subscriptions.startAds.subscribe(this.onStartAds.bind(this)));\n this.subscriptions.push(this.target.subscriptions.endAds.subscribe(this.onEndAds.bind(this)));\n }\n ngAfterViewInit() {\n if (this.vgAutohide) {\n this.hide();\n }\n else {\n this.show();\n }\n }\n onPlay() {\n if (this.vgAutohide) {\n this.hide();\n }\n }\n onPause() {\n clearTimeout(this.timer);\n this.hideControls = false;\n this.hidden.state(false);\n }\n onStartAds() {\n this.isAdsPlaying = 'none';\n }\n onEndAds() {\n this.isAdsPlaying = 'initial';\n }\n hide() {\n if (this.vgAutohide) {\n clearTimeout(this.timer);\n this.hideAsync();\n }\n }\n show() {\n clearTimeout(this.timer);\n this.hideControls = false;\n this.hidden.state(false);\n if (this.vgAutohide) {\n this.hideAsync();\n }\n }\n hideAsync() {\n if (this.API.state === VgStates.VG_PLAYING) {\n this.timer = setTimeout(() => {\n this.hideControls = true;\n this.hidden.state(true);\n }, this.vgAutohideTime * 1000);\n }\n }\n ngOnDestroy() {\n this.subscriptions.forEach((s) => s.unsubscribe());\n }\n}\n/** @nocollapse */ /** @nocollapse */ VgControlsComponent.ɵfac = function VgControlsComponent_Factory(t) { return new (t || VgControlsComponent)(i0.ɵɵdirectiveInject(i1.VgApiService), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.VgControlsHiddenService)); };\n/** @nocollapse */ /** @nocollapse */ VgControlsComponent.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: VgControlsComponent, selectors: [[\"vg-controls\"]], hostVars: 4, hostBindings: function VgControlsComponent_HostBindings(rf, ctx) { if (rf & 2) {\n i0.ɵɵstyleProp(\"pointer-events\", ctx.isAdsPlaying);\n i0.ɵɵclassProp(\"hide\", ctx.hideControls);\n } }, inputs: { vgFor: \"vgFor\", vgAutohide: \"vgAutohide\", vgAutohideTime: \"vgAutohideTime\" }, ngContentSelectors: _c0$3, decls: 1, vars: 0, template: function VgControlsComponent_Template(rf, ctx) { if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵprojection(0);\n } }, styles: [\"vg-controls{position:absolute;display:flex;width:100%;height:50px;z-index:300;bottom:0;background-color:#00000080;transition:bottom 1s}vg-controls.hide{bottom:-50px}\\n\"], encapsulation: 2 });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(VgControlsComponent, [{\n type: Component,\n args: [{\n selector: 'vg-controls',\n encapsulation: ViewEncapsulation.None,\n template: ``,\n styles: [\n `\n vg-controls {\n position: absolute;\n display: flex;\n width: 100%;\n height: 50px;\n z-index: 300;\n bottom: 0;\n background-color: rgba(0, 0, 0, 0.5);\n -webkit-transition: bottom 1s;\n -khtml-transition: bottom 1s;\n -moz-transition: bottom 1s;\n -ms-transition: bottom 1s;\n transition: bottom 1s;\n }\n vg-controls.hide {\n bottom: -50px;\n }\n `,\n ],\n }]\n }], function () { return [{ type: i1.VgApiService }, { type: i0.ElementRef }, { type: i1.VgControlsHiddenService }]; }, { isAdsPlaying: [{\n type: HostBinding,\n args: ['style.pointer-events']\n }], hideControls: [{\n type: HostBinding,\n args: ['class.hide']\n }], vgFor: [{\n type: Input\n }], vgAutohide: [{\n type: Input\n }], vgAutohideTime: [{\n type: Input\n }] }); })();\n\nconst _c0$2 = [\"volumeBar\"];\nconst _c1 = function (a0) { return { dragging: a0 }; };\nclass VgVolumeComponent {\n constructor(ref, API) {\n this.API = API;\n this.subscriptions = [];\n this.elem = ref.nativeElement;\n this.isDragging = false;\n }\n ngOnInit() {\n if (this.API.isPlayerReady) {\n this.onPlayerReady();\n }\n else {\n this.subscriptions.push(this.API.playerReadyEvent.subscribe(() => this.onPlayerReady()));\n }\n }\n onPlayerReady() {\n this.target = this.API.getMediaById(this.vgFor);\n this.ariaValue = this.getVolume() * 100;\n }\n onClick(event) {\n this.setVolume(this.calculateVolume(event.clientX));\n }\n onMouseDown(event) {\n this.mouseDownPosX = event.clientX;\n this.isDragging = true;\n }\n onDrag(event) {\n if (this.isDragging) {\n this.setVolume(this.calculateVolume(event.clientX));\n }\n }\n onStopDrag(event) {\n if (this.isDragging) {\n this.isDragging = false;\n if (this.mouseDownPosX === event.clientX) {\n this.setVolume(this.calculateVolume(event.clientX));\n }\n }\n }\n arrowAdjustVolume(event) {\n if (event.keyCode === 38 || event.keyCode === 39) {\n event.preventDefault();\n this.setVolume(Math.max(0, Math.min(100, this.getVolume() * 100 + 10)));\n }\n else if (event.keyCode === 37 || event.keyCode === 40) {\n event.preventDefault();\n this.setVolume(Math.max(0, Math.min(100, this.getVolume() * 100 - 10)));\n }\n }\n calculateVolume(mousePosX) {\n const recObj = this.volumeBarRef.nativeElement.getBoundingClientRect();\n const volumeBarOffsetLeft = recObj.left;\n const volumeBarWidth = recObj.width;\n return ((mousePosX - volumeBarOffsetLeft) / volumeBarWidth) * 100;\n }\n setVolume(vol) {\n this.target.volume = Math.max(0, Math.min(1, vol / 100));\n this.ariaValue = this.target.volume * 100;\n }\n getVolume() {\n return this.target ? this.target.volume : 0;\n }\n ngOnDestroy() {\n this.subscriptions.forEach((s) => s.unsubscribe());\n }\n}\n/** @nocollapse */ /** @nocollapse */ VgVolumeComponent.ɵfac = function VgVolumeComponent_Factory(t) { return new (t || VgVolumeComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.VgApiService)); };\n/** @nocollapse */ /** @nocollapse */ VgVolumeComponent.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: VgVolumeComponent, selectors: [[\"vg-volume\"]], viewQuery: function VgVolumeComponent_Query(rf, ctx) { if (rf & 1) {\n i0.ɵɵviewQuery(_c0$2, 7);\n } if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.volumeBarRef = _t.first);\n } }, hostBindings: function VgVolumeComponent_HostBindings(rf, ctx) { if (rf & 1) {\n i0.ɵɵlistener(\"mousemove\", function VgVolumeComponent_mousemove_HostBindingHandler($event) { return ctx.onDrag($event); }, false, i0.ɵɵresolveDocument)(\"mouseup\", function VgVolumeComponent_mouseup_HostBindingHandler($event) { return ctx.onStopDrag($event); }, false, i0.ɵɵresolveDocument)(\"keydown\", function VgVolumeComponent_keydown_HostBindingHandler($event) { return ctx.arrowAdjustVolume($event); });\n } }, inputs: { vgFor: \"vgFor\" }, decls: 5, vars: 9, consts: [[\"tabindex\", \"0\", \"role\", \"slider\", \"aria-label\", \"volume level\", \"aria-level\", \"polite\", \"aria-valuemin\", \"0\", \"aria-valuemax\", \"100\", \"aria-orientation\", \"horizontal\", 1, \"volumeBar\", 3, \"click\", \"mousedown\"], [\"volumeBar\", \"\"], [1, \"volumeBackground\", 3, \"ngClass\"], [1, \"volumeValue\"], [1, \"volumeKnob\"]], template: function VgVolumeComponent_Template(rf, ctx) { if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 0, 1);\n i0.ɵɵlistener(\"click\", function VgVolumeComponent_Template_div_click_0_listener($event) { return ctx.onClick($event); })(\"mousedown\", function VgVolumeComponent_Template_div_mousedown_0_listener($event) { return ctx.onMouseDown($event); });\n i0.ɵɵelementStart(2, \"div\", 2);\n i0.ɵɵelement(3, \"div\", 3);\n i0.ɵɵelement(4, \"div\", 4);\n i0.ɵɵelementEnd();\n i0.ɵɵelementEnd();\n } if (rf & 2) {\n i0.ɵɵattribute(\"aria-valuenow\", ctx.ariaValue)(\"aria-valuetext\", ctx.ariaValue + \"%\");\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngClass\", i0.ɵɵpureFunction1(7, _c1, ctx.isDragging));\n i0.ɵɵadvance(1);\n i0.ɵɵstyleProp(\"width\", ctx.getVolume() * (100 - 15) + \"%\");\n i0.ɵɵadvance(1);\n i0.ɵɵstyleProp(\"left\", ctx.getVolume() * (100 - 15) + \"%\");\n } }, directives: [i2.NgClass], styles: [\"vg-volume{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;display:flex;justify-content:center;height:50px;width:100px;cursor:pointer;color:#fff;line-height:50px}vg-volume .volumeBar{position:relative;display:flex;flex-grow:1;align-items:center}vg-volume .volumeBackground{display:flex;flex-grow:1;height:5px;pointer-events:none;background-color:#333}vg-volume .volumeValue{display:flex;height:5px;pointer-events:none;background-color:#fff;transition:all .2s ease-out}vg-volume .volumeKnob{position:absolute;width:15px;height:15px;left:0;top:50%;transform:translateY(-50%);border-radius:15px;pointer-events:none;background-color:#fff;transition:all .2s ease-out}vg-volume .volumeBackground.dragging .volumeValue,vg-volume .volumeBackground.dragging .volumeKnob{transition:none}\\n\"], encapsulation: 2 });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(VgVolumeComponent, [{\n type: Component,\n args: [{\n selector: 'vg-volume',\n encapsulation: ViewEncapsulation.None,\n template: `\n \n
\n
\n \n \n \n `,\n styles: [\n `\n vg-volume {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n display: flex;\n justify-content: center;\n height: 50px;\n width: 100px;\n cursor: pointer;\n color: white;\n line-height: 50px;\n }\n vg-volume .volumeBar {\n position: relative;\n display: flex;\n flex-grow: 1;\n align-items: center;\n }\n vg-volume .volumeBackground {\n display: flex;\n flex-grow: 1;\n height: 5px;\n pointer-events: none;\n background-color: #333;\n }\n vg-volume .volumeValue {\n display: flex;\n height: 5px;\n pointer-events: none;\n background-color: #fff;\n transition: all 0.2s ease-out;\n }\n vg-volume .volumeKnob {\n position: absolute;\n width: 15px;\n height: 15px;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n border-radius: 15px;\n pointer-events: none;\n background-color: #fff;\n transition: all 0.2s ease-out;\n }\n vg-volume .volumeBackground.dragging .volumeValue,\n vg-volume .volumeBackground.dragging .volumeKnob {\n transition: none;\n }\n `,\n ],\n }]\n }], function () { return [{ type: i0.ElementRef }, { type: i1.VgApiService }]; }, { vgFor: [{\n type: Input\n }], volumeBarRef: [{\n type: ViewChild,\n args: ['volumeBar', { static: true }]\n }], onDrag: [{\n type: HostListener,\n args: ['document:mousemove', ['$event']]\n }], onStopDrag: [{\n type: HostListener,\n args: ['document:mouseup', ['$event']]\n }], arrowAdjustVolume: [{\n type: HostListener,\n args: ['keydown', ['$event']]\n }] }); })();\n\nfunction VgTrackSelectorComponent_option_4_Template(rf, ctx) { if (rf & 1) {\n i0.ɵɵelementStart(0, \"option\", 4);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n} if (rf & 2) {\n const track_r1 = ctx.$implicit;\n i0.ɵɵproperty(\"value\", track_r1.id)(\"selected\", track_r1.selected === true);\n i0.ɵɵadvance(1);\n i0.ɵɵtextInterpolate1(\" \", track_r1.label, \" \");\n} }\nclass VgTrackSelectorComponent {\n constructor(ref, API) {\n this.API = API;\n this.subscriptions = [];\n this.elem = ref.nativeElement;\n }\n ngOnInit() {\n if (this.API.isPlayerReady) {\n this.onPlayerReady();\n }\n else {\n this.subscriptions.push(this.API.playerReadyEvent.subscribe(() => this.onPlayerReady()));\n }\n }\n onPlayerReady() {\n this.target = this.API.getMediaById(this.vgFor);\n const subs = Array.from(this.API.getMasterMedia().elem.children)\n .filter((item) => item.tagName === 'TRACK')\n .filter((item) => item.kind === 'subtitles')\n .map((item) => ({\n label: item.label,\n selected: item.default === true,\n id: item.srclang,\n }));\n this.tracks = [\n ...subs,\n {\n id: null,\n label: 'Off',\n selected: subs.every((item) => item.selected === false),\n },\n ];\n const track = this.tracks.filter((item) => item.selected === true)[0];\n this.trackSelected = track.id;\n this.ariaValue = track.label;\n }\n selectTrack(trackId) {\n this.trackSelected = trackId === 'null' ? null : trackId;\n this.ariaValue = 'No track selected';\n Array.from(this.API.getMasterMedia().elem.textTracks).forEach((item) => {\n if (item.language === trackId) {\n this.ariaValue = item.label;\n item.mode = 'showing';\n }\n else {\n item.mode = 'hidden';\n }\n });\n }\n ngOnDestroy() {\n this.subscriptions.forEach((s) => s.unsubscribe());\n }\n}\n/** @nocollapse */ /** @nocollapse */ VgTrackSelectorComponent.ɵfac = function VgTrackSelectorComponent_Factory(t) { return new (t || VgTrackSelectorComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.VgApiService)); };\n/** @nocollapse */ /** @nocollapse */ VgTrackSelectorComponent.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: VgTrackSelectorComponent, selectors: [[\"vg-track-selector\"]], inputs: { vgFor: \"vgFor\" }, decls: 5, vars: 5, consts: [[1, \"container\"], [1, \"track-selected\"], [\"tabindex\", \"0\", \"aria-label\", \"track selector\", 1, \"trackSelector\", 3, \"change\"], [3, \"value\", \"selected\", 4, \"ngFor\", \"ngForOf\"], [3, \"value\", \"selected\"]], template: function VgTrackSelectorComponent_Template(rf, ctx) { if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 0);\n i0.ɵɵelementStart(1, \"div\", 1);\n i0.ɵɵtext(2);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(3, \"select\", 2);\n i0.ɵɵlistener(\"change\", function VgTrackSelectorComponent_Template_select_change_3_listener($event) { return ctx.selectTrack($event.target.value); });\n i0.ɵɵtemplate(4, VgTrackSelectorComponent_option_4_Template, 2, 3, \"option\", 3);\n i0.ɵɵelementEnd();\n i0.ɵɵelementEnd();\n } if (rf & 2) {\n i0.ɵɵadvance(1);\n i0.ɵɵclassProp(\"vg-icon-closed_caption\", !ctx.trackSelected);\n i0.ɵɵadvance(1);\n i0.ɵɵtextInterpolate1(\" \", ctx.trackSelected || \"\", \" \");\n i0.ɵɵadvance(1);\n i0.ɵɵattribute(\"aria-valuetext\", ctx.ariaValue);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngForOf\", ctx.tracks);\n } }, directives: [i2.NgForOf], styles: [\"vg-track-selector{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;display:flex;justify-content:center;width:50px;height:50px;cursor:pointer;color:#fff;line-height:50px}vg-track-selector .container{position:relative;display:flex;flex-grow:1;align-items:center;padding:0;margin:5px}vg-track-selector select.trackSelector{width:50px;padding:5px 8px;border:none;background:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;color:transparent;font-size:16px}vg-track-selector select.trackSelector::-ms-expand{display:none}vg-track-selector select.trackSelector option{color:#000}vg-track-selector .track-selected{position:absolute;width:100%;height:50px;top:-6px;text-align:center;text-transform:uppercase;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;padding-top:2px;pointer-events:none}vg-track-selector .vg-icon-closed_caption:before{width:100%}\\n\"], encapsulation: 2 });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(VgTrackSelectorComponent, [{\n type: Component,\n args: [{\n selector: 'vg-track-selector',\n encapsulation: ViewEncapsulation.None,\n template: `\n
\n \n {{ trackSelected || '' }}\n
\n \n \n {{ track.label }}\n \n \n \n `,\n styles: [\n `\n vg-track-selector {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n display: flex;\n justify-content: center;\n width: 50px;\n height: 50px;\n cursor: pointer;\n color: white;\n line-height: 50px;\n }\n vg-track-selector .container {\n position: relative;\n display: flex;\n flex-grow: 1;\n align-items: center;\n padding: 0;\n margin: 5px;\n }\n vg-track-selector select.trackSelector {\n width: 50px;\n padding: 5px 8px;\n border: none;\n background: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n color: transparent;\n font-size: 16px;\n }\n vg-track-selector select.trackSelector::-ms-expand {\n display: none;\n }\n vg-track-selector select.trackSelector option {\n color: #000;\n }\n vg-track-selector .track-selected {\n position: absolute;\n width: 100%;\n height: 50px;\n top: -6px;\n text-align: center;\n text-transform: uppercase;\n font-family: Helvetica Neue, Helvetica, Arial, sans-serif;\n padding-top: 2px;\n pointer-events: none;\n }\n vg-track-selector .vg-icon-closed_caption:before {\n width: 100%;\n }\n `,\n ],\n }]\n }], function () { return [{ type: i0.ElementRef }, { type: i1.VgApiService }]; }, { vgFor: [{\n type: Input\n }] }); })();\n\nfunction VgTimeDisplayComponent_span_0_Template(rf, ctx) { if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\");\n i0.ɵɵtext(1, \"LIVE\");\n i0.ɵɵelementEnd();\n} }\nfunction VgTimeDisplayComponent_span_1_Template(rf, ctx) { if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\");\n i0.ɵɵtext(1);\n i0.ɵɵpipe(2, \"vgUtc\");\n i0.ɵɵelementEnd();\n} if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance(1);\n i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r1.getTime(), ctx_r1.vgFormat));\n} }\nconst _c0$1 = [\"*\"];\n// Workaround until we can use UTC with Angular Date Pipe\nclass VgUtcPipe {\n transform(value, format) {\n let date = new Date(value);\n let result = format;\n let ss = date.getUTCSeconds();\n let mm = date.getUTCMinutes();\n let hh = date.getUTCHours();\n if (ss < 10) {\n ss = '0' + ss;\n }\n if (mm < 10) {\n mm = '0' + mm;\n }\n if (hh < 10) {\n hh = '0' + hh;\n }\n result = result.replace(/ss/g, ss);\n result = result.replace(/mm/g, mm);\n result = result.replace(/hh/g, hh);\n return result;\n }\n}\n/** @nocollapse */ /** @nocollapse */ VgUtcPipe.ɵfac = function VgUtcPipe_Factory(t) { return new (t || VgUtcPipe)(); };\n/** @nocollapse */ /** @nocollapse */ VgUtcPipe.ɵpipe = /** @pureOrBreakMyCode */ i0.ɵɵdefinePipe({ name: \"vgUtc\", type: VgUtcPipe, pure: true });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(VgUtcPipe, [{\n type: Pipe,\n args: [{ name: 'vgUtc' }]\n }], null, null); })();\nclass VgTimeDisplayComponent {\n constructor(ref, API) {\n this.API = API;\n this.vgProperty = 'current';\n this.vgFormat = 'mm:ss';\n this.subscriptions = [];\n this.elem = ref.nativeElement;\n }\n ngOnInit() {\n if (this.API.isPlayerReady) {\n this.onPlayerReady();\n }\n else {\n this.subscriptions.push(this.API.playerReadyEvent.subscribe(() => this.onPlayerReady()));\n }\n }\n onPlayerReady() {\n this.target = this.API.getMediaById(this.vgFor);\n }\n getTime() {\n let t = 0;\n if (this.target) {\n t = Math.round(this.target.time[this.vgProperty]);\n t = isNaN(t) || this.target.isLive ? 0 : t;\n }\n return t;\n }\n ngOnDestroy() {\n this.subscriptions.forEach((s) => s.unsubscribe());\n }\n}\n/** @nocollapse */ /** @nocollapse */ VgTimeDisplayComponent.ɵfac = function VgTimeDisplayComponent_Factory(t) { return new (t || VgTimeDisplayComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.VgApiService)); };\n/** @nocollapse */ /** @nocollapse */ VgTimeDisplayComponent.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: VgTimeDisplayComponent, selectors: [[\"vg-time-display\"]], inputs: { vgFor: \"vgFor\", vgProperty: \"vgProperty\", vgFormat: \"vgFormat\" }, ngContentSelectors: _c0$1, decls: 3, vars: 2, consts: [[4, \"ngIf\"]], template: function VgTimeDisplayComponent_Template(rf, ctx) { if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵtemplate(0, VgTimeDisplayComponent_span_0_Template, 2, 0, \"span\", 0);\n i0.ɵɵtemplate(1, VgTimeDisplayComponent_span_1_Template, 3, 4, \"span\", 0);\n i0.ɵɵprojection(2);\n } if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", ctx.target == null ? null : ctx.target.isLive);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", !(ctx.target == null ? null : ctx.target.isLive));\n } }, directives: [i2.NgIf], pipes: [VgUtcPipe], styles: [\"vg-time-display{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;display:flex;justify-content:center;height:50px;width:60px;cursor:pointer;color:#fff;line-height:50px;pointer-events:none;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}\\n\"], encapsulation: 2 });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(VgTimeDisplayComponent, [{\n type: Component,\n args: [{\n selector: 'vg-time-display',\n encapsulation: ViewEncapsulation.None,\n template: `\n LIVE\n {{ getTime() | vgUtc: vgFormat }}\n \n `,\n styles: [\n `\n vg-time-display {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n display: flex;\n justify-content: center;\n height: 50px;\n width: 60px;\n cursor: pointer;\n color: white;\n line-height: 50px;\n pointer-events: none;\n font-family: Helvetica Neue, Helvetica, Arial, sans-serif;\n }\n `,\n ],\n }]\n }], function () { return [{ type: i0.ElementRef }, { type: i1.VgApiService }]; }, { vgFor: [{\n type: Input\n }], vgProperty: [{\n type: Input\n }], vgFormat: [{\n type: Input\n }] }); })();\n\nconst _c0 = [\"*\"];\nclass VgScrubBarComponent {\n constructor(ref, API, vgControlsHiddenState) {\n this.API = API;\n this.hideScrubBar = false;\n this.vgSlider = true;\n this.isSeeking = false;\n this.wasPlaying = false;\n this.subscriptions = [];\n this.elem = ref.nativeElement;\n this.subscriptions.push(vgControlsHiddenState.isHidden.subscribe((hide) => this.onHideScrubBar(hide)));\n }\n ngOnInit() {\n if (this.API.isPlayerReady) {\n this.onPlayerReady();\n }\n else {\n this.subscriptions.push(this.API.playerReadyEvent.subscribe(() => this.onPlayerReady()));\n }\n }\n onPlayerReady() {\n this.target = this.API.getMediaById(this.vgFor);\n }\n seekStart() {\n if (this.target.canPlay) {\n this.isSeeking = true;\n if (this.target.state === VgStates.VG_PLAYING) {\n this.wasPlaying = true;\n }\n this.target.pause();\n }\n }\n seekMove(offset) {\n if (this.isSeeking) {\n const percentage = Math.max(Math.min((offset * 100) / this.elem.scrollWidth, 99.9), 0);\n this.target.time.current = (percentage * this.target.time.total) / 100;\n this.target.seekTime(percentage, true);\n }\n }\n seekEnd(offset) {\n this.isSeeking = false;\n if (this.target.canPlay) {\n const percentage = Math.max(Math.min((offset * 100) / this.elem.scrollWidth, 99.9), 0);\n this.target.seekTime(percentage, true);\n if (this.wasPlaying) {\n this.wasPlaying = false;\n this.target.play();\n }\n }\n }\n touchEnd() {\n this.isSeeking = false;\n if (this.wasPlaying) {\n this.wasPlaying = false;\n this.target.play();\n }\n }\n getTouchOffset(event) {\n let offsetLeft = 0;\n let element = event.target;\n while (element) {\n offsetLeft += element.offsetLeft;\n element = element.offsetParent;\n }\n return event.touches[0].pageX - offsetLeft;\n }\n onMouseDownScrubBar($event) {\n if (this.target) {\n if (!this.target.isLive) {\n if (!this.vgSlider) {\n this.seekEnd($event.offsetX);\n }\n else {\n this.seekStart();\n }\n }\n }\n }\n onMouseMoveScrubBar($event) {\n if (this.target) {\n if (!this.target.isLive && this.vgSlider && this.isSeeking) {\n this.seekMove($event.offsetX);\n }\n }\n }\n onMouseUpScrubBar($event) {\n if (this.target) {\n if (!this.target.isLive && this.vgSlider && this.isSeeking) {\n this.seekEnd($event.offsetX);\n }\n }\n }\n onTouchStartScrubBar($event) {\n if (this.target) {\n if (!this.target.isLive) {\n if (!this.vgSlider) {\n this.seekEnd(this.getTouchOffset($event));\n }\n else {\n this.seekStart();\n }\n }\n }\n }\n onTouchMoveScrubBar($event) {\n if (this.target) {\n if (!this.target.isLive && this.vgSlider && this.isSeeking) {\n this.seekMove(this.getTouchOffset($event));\n }\n }\n }\n // @ts-ignore\n onTouchCancelScrubBar(_$event) {\n if (this.target) {\n if (!this.target.isLive && this.vgSlider && this.isSeeking) {\n this.touchEnd();\n }\n }\n }\n // @ts-ignore\n onTouchEndScrubBar(_$event) {\n if (this.target) {\n if (!this.target.isLive && this.vgSlider && this.isSeeking) {\n this.touchEnd();\n }\n }\n }\n arrowAdjustVolume(event) {\n if (this.target) {\n if (event.keyCode === 38 || event.keyCode === 39) {\n event.preventDefault();\n this.target.seekTime((this.target.time.current + 5000) / 1000, false);\n }\n else if (event.keyCode === 37 || event.keyCode === 40) {\n event.preventDefault();\n this.target.seekTime((this.target.time.current - 5000) / 1000, false);\n }\n }\n }\n getPercentage() {\n return this.target\n ? Math.round((this.target.time.current * 100) / this.target.time.total) + '%'\n : '0%';\n }\n onHideScrubBar(hide) {\n this.hideScrubBar = hide;\n }\n ngOnDestroy() {\n this.subscriptions.forEach((s) => s.unsubscribe());\n }\n}\n/** @nocollapse */ /** @nocollapse */ VgScrubBarComponent.ɵfac = function VgScrubBarComponent_Factory(t) { return new (t || VgScrubBarComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.VgApiService), i0.ɵɵdirectiveInject(i1.VgControlsHiddenService)); };\n/** @nocollapse */ /** @nocollapse */ VgScrubBarComponent.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: VgScrubBarComponent, selectors: [[\"vg-scrub-bar\"]], hostVars: 2, hostBindings: function VgScrubBarComponent_HostBindings(rf, ctx) { if (rf & 1) {\n i0.ɵɵlistener(\"mousedown\", function VgScrubBarComponent_mousedown_HostBindingHandler($event) { return ctx.onMouseDownScrubBar($event); })(\"mousemove\", function VgScrubBarComponent_mousemove_HostBindingHandler($event) { return ctx.onMouseMoveScrubBar($event); }, false, i0.ɵɵresolveDocument)(\"mouseup\", function VgScrubBarComponent_mouseup_HostBindingHandler($event) { return ctx.onMouseUpScrubBar($event); }, false, i0.ɵɵresolveDocument)(\"touchstart\", function VgScrubBarComponent_touchstart_HostBindingHandler($event) { return ctx.onTouchStartScrubBar($event); })(\"touchmove\", function VgScrubBarComponent_touchmove_HostBindingHandler($event) { return ctx.onTouchMoveScrubBar($event); }, false, i0.ɵɵresolveDocument)(\"touchcancel\", function VgScrubBarComponent_touchcancel_HostBindingHandler($event) { return ctx.onTouchCancelScrubBar($event); }, false, i0.ɵɵresolveDocument)(\"touchend\", function VgScrubBarComponent_touchend_HostBindingHandler($event) { return ctx.onTouchEndScrubBar($event); }, false, i0.ɵɵresolveDocument)(\"keydown\", function VgScrubBarComponent_keydown_HostBindingHandler($event) { return ctx.arrowAdjustVolume($event); });\n } if (rf & 2) {\n i0.ɵɵclassProp(\"hide\", ctx.hideScrubBar);\n } }, inputs: { vgFor: \"vgFor\", vgSlider: \"vgSlider\" }, ngContentSelectors: _c0, decls: 2, vars: 2, consts: [[\"tabindex\", \"0\", \"role\", \"slider\", \"aria-label\", \"scrub bar\", \"aria-level\", \"polite\", \"aria-valuemin\", \"0\", \"aria-valuemax\", \"100\", 1, \"scrubBar\"]], template: function VgScrubBarComponent_Template(rf, ctx) { if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵelementStart(0, \"div\", 0);\n i0.ɵɵprojection(1);\n i0.ɵɵelementEnd();\n } if (rf & 2) {\n i0.ɵɵattribute(\"aria-valuenow\", ctx.getPercentage())(\"aria-valuetext\", ctx.getPercentage());\n } }, styles: [\"vg-scrub-bar{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;position:absolute;width:100%;height:5px;bottom:50px;margin:0;cursor:pointer;align-items:center;background:rgba(0,0,0,.75);z-index:250;transition:bottom 1s,opacity .5s}vg-scrub-bar .scrubBar{position:relative;display:flex;flex-grow:1;align-items:center;height:100%}vg-controls vg-scrub-bar{position:relative;bottom:0;background:transparent;height:50px;flex-grow:1;flex-basis:0;margin:0 10px;transition:none 0s ease 0s;transition:initial}vg-scrub-bar.hide{bottom:0;opacity:0}vg-controls vg-scrub-bar.hide{bottom:auto;bottom:initial;opacity:1;opacity:initial}\\n\"], encapsulation: 2 });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(VgScrubBarComponent, [{\n type: Component,\n args: [{\n selector: 'vg-scrub-bar',\n encapsulation: ViewEncapsulation.None,\n template: `\n \n \n \n `,\n styles: [\n `\n vg-scrub-bar {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n position: absolute;\n width: 100%;\n height: 5px;\n bottom: 50px;\n margin: 0;\n cursor: pointer;\n align-items: center;\n background: rgba(0, 0, 0, 0.75);\n z-index: 250;\n -webkit-transition: bottom 1s, opacity 0.5s;\n -khtml-transition: bottom 1s, opacity 0.5s;\n -moz-transition: bottom 1s, opacity 0.5s;\n -ms-transition: bottom 1s, opacity 0.5s;\n transition: bottom 1s, opacity 0.5s;\n }\n vg-scrub-bar .scrubBar {\n position: relative;\n display: flex;\n flex-grow: 1;\n align-items: center;\n height: 100%;\n }\n vg-controls vg-scrub-bar {\n position: relative;\n bottom: 0;\n background: transparent;\n height: 50px;\n flex-grow: 1;\n flex-basis: 0;\n margin: 0 10px;\n -webkit-transition: initial;\n -khtml-transition: initial;\n -moz-transition: initial;\n -ms-transition: initial;\n transition: initial;\n }\n vg-scrub-bar.hide {\n bottom: 0;\n opacity: 0;\n }\n vg-controls vg-scrub-bar.hide {\n bottom: initial;\n opacity: initial;\n }\n `,\n ],\n }]\n }], function () { return [{ type: i0.ElementRef }, { type: i1.VgApiService }, { type: i1.VgControlsHiddenService }]; }, { hideScrubBar: [{\n type: HostBinding,\n args: ['class.hide']\n }], vgFor: [{\n type: Input\n }], vgSlider: [{\n type: Input\n }], onMouseDownScrubBar: [{\n type: HostListener,\n args: ['mousedown', ['$event']]\n }], onMouseMoveScrubBar: [{\n type: HostListener,\n args: ['document:mousemove', ['$event']]\n }], onMouseUpScrubBar: [{\n type: HostListener,\n args: ['document:mouseup', ['$event']]\n }], onTouchStartScrubBar: [{\n type: HostListener,\n args: ['touchstart', ['$event']]\n }], onTouchMoveScrubBar: [{\n type: HostListener,\n args: ['document:touchmove', ['$event']]\n }], onTouchCancelScrubBar: [{\n type: HostListener,\n args: ['document:touchcancel', ['$event']]\n }], onTouchEndScrubBar: [{\n type: HostListener,\n args: ['document:touchend', ['$event']]\n }], arrowAdjustVolume: [{\n type: HostListener,\n args: ['keydown', ['$event']]\n }] }); })();\n\nfunction VgQualitySelectorComponent_option_4_Template(rf, ctx) { if (rf & 1) {\n i0.ɵɵelementStart(0, \"option\", 4);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n} if (rf & 2) {\n const bitrate_r1 = ctx.$implicit;\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"value\", bitrate_r1.qualityIndex)(\"selected\", bitrate_r1.qualityIndex === (ctx_r0.bitrateSelected == null ? null : ctx_r0.bitrateSelected.qualityIndex));\n i0.ɵɵadvance(1);\n i0.ɵɵtextInterpolate1(\" \", bitrate_r1.label, \" \");\n} }\nclass VgQualitySelectorComponent {\n constructor(ref, API) {\n this.API = API;\n this.onBitrateChange = new EventEmitter();\n this.subscriptions = [];\n this.elem = ref.nativeElement;\n }\n ngOnInit() { }\n ngOnChanges(changes) {\n if (changes.bitrates.currentValue && changes.bitrates.currentValue.length) {\n this.bitrates.forEach((item) => (item.label =\n item.label || Math.round(item.bitrate / 1000).toString()));\n }\n }\n selectBitrate(index) {\n this.bitrateSelected = this.bitrates[index];\n this.onBitrateChange.emit(this.bitrates[index]);\n }\n ngOnDestroy() {\n this.subscriptions.forEach((s) => s.unsubscribe());\n }\n}\n/** @nocollapse */ /** @nocollapse */ VgQualitySelectorComponent.ɵfac = function VgQualitySelectorComponent_Factory(t) { return new (t || VgQualitySelectorComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.VgApiService)); };\n/** @nocollapse */ /** @nocollapse */ VgQualitySelectorComponent.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: VgQualitySelectorComponent, selectors: [[\"vg-quality-selector\"]], inputs: { bitrates: \"bitrates\" }, outputs: { onBitrateChange: \"onBitrateChange\" }, features: [i0.ɵɵNgOnChangesFeature], decls: 5, vars: 5, consts: [[1, \"container\"], [1, \"quality-selected\"], [\"tabindex\", \"0\", \"aria-label\", \"quality selector\", 1, \"quality-selector\", 3, \"change\"], [3, \"value\", \"selected\", 4, \"ngFor\", \"ngForOf\"], [3, \"value\", \"selected\"]], template: function VgQualitySelectorComponent_Template(rf, ctx) { if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 0);\n i0.ɵɵelementStart(1, \"div\", 1);\n i0.ɵɵtext(2);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(3, \"select\", 2);\n i0.ɵɵlistener(\"change\", function VgQualitySelectorComponent_Template_select_change_3_listener($event) { return ctx.selectBitrate($event.target.value); });\n i0.ɵɵtemplate(4, VgQualitySelectorComponent_option_4_Template, 2, 3, \"option\", 3);\n i0.ɵɵelementEnd();\n i0.ɵɵelementEnd();\n } if (rf & 2) {\n i0.ɵɵadvance(1);\n i0.ɵɵclassProp(\"vg-icon-hd\", !ctx.bitrateSelected);\n i0.ɵɵadvance(1);\n i0.ɵɵtextInterpolate1(\" \", ctx.bitrateSelected == null ? null : ctx.bitrateSelected.label, \" \");\n i0.ɵɵadvance(1);\n i0.ɵɵattribute(\"aria-valuetext\", ctx.ariaValue);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngForOf\", ctx.bitrates);\n } }, directives: [i2.NgForOf], styles: [\"vg-quality-selector{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;display:flex;justify-content:center;width:50px;height:50px;cursor:pointer;color:#fff;line-height:50px}vg-quality-selector .container{position:relative;display:flex;flex-grow:1;align-items:center;padding:0;margin:5px}vg-quality-selector select.quality-selector{width:50px;padding:5px 8px;border:none;background:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;color:transparent;font-size:16px}vg-quality-selector select.quality-selector::-ms-expand{display:none}vg-quality-selector select.quality-selector option{color:#000}vg-quality-selector .quality-selected{position:absolute;width:100%;height:50px;top:-6px;text-align:center;text-transform:uppercase;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;padding-top:2px;pointer-events:none}vg-quality-selector .vg-icon-closed_caption:before{width:100%}\\n\"], encapsulation: 2 });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(VgQualitySelectorComponent, [{\n type: Component,\n args: [{\n selector: 'vg-quality-selector',\n encapsulation: ViewEncapsulation.None,\n template: `\n
\n
\n {{ bitrateSelected?.label }}\n
\n \n \n {{ bitrate.label }}\n \n \n
\n `,\n styles: [\n `\n vg-quality-selector {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n display: flex;\n justify-content: center;\n width: 50px;\n height: 50px;\n cursor: pointer;\n color: white;\n line-height: 50px;\n }\n vg-quality-selector .container {\n position: relative;\n display: flex;\n flex-grow: 1;\n align-items: center;\n padding: 0;\n margin: 5px;\n }\n vg-quality-selector select.quality-selector {\n width: 50px;\n padding: 5px 8px;\n border: none;\n background: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n color: transparent;\n font-size: 16px;\n }\n vg-quality-selector select.quality-selector::-ms-expand {\n display: none;\n }\n vg-quality-selector select.quality-selector option {\n color: #000;\n }\n vg-quality-selector .quality-selected {\n position: absolute;\n width: 100%;\n height: 50px;\n top: -6px;\n text-align: center;\n text-transform: uppercase;\n font-family: Helvetica Neue, Helvetica, Arial, sans-serif;\n padding-top: 2px;\n pointer-events: none;\n }\n vg-quality-selector .vg-icon-closed_caption:before {\n width: 100%;\n }\n `,\n ],\n }]\n }], function () { return [{ type: i0.ElementRef }, { type: i1.VgApiService }]; }, { bitrates: [{\n type: Input\n }], onBitrateChange: [{\n type: Output\n }] }); })();\n\nclass VgPlaybackButtonComponent {\n constructor(ref, API, cdr) {\n this.API = API;\n this.cdr = cdr;\n this.subscriptions = [];\n this.ariaValue = 1;\n this.elem = ref.nativeElement;\n this.playbackValues = ['0.5', '1.0', '1.5', '2.0'];\n this.playbackIndex = 1;\n }\n ngOnInit() {\n if (this.API.isPlayerReady) {\n this.onPlayerReady();\n }\n else {\n this.subscriptions.push(this.API.playerReadyEvent.subscribe(() => this.onPlayerReady()));\n }\n }\n onPlayerReady() {\n this.target = this.API.getMediaById(this.vgFor);\n }\n onClick() {\n this.updatePlaybackSpeed();\n }\n onKeyDown(event) {\n // On press Enter (13) or Space (32)\n if (event.keyCode === 13 || event.keyCode === 32) {\n event.preventDefault();\n this.updatePlaybackSpeed();\n }\n }\n updatePlaybackSpeed() {\n this.playbackIndex = ++this.playbackIndex % this.playbackValues.length;\n if (this.target instanceof VgApiService) {\n this.target.playbackRate = this.playbackValues[this.playbackIndex];\n }\n else {\n this.target.playbackRate[this.vgFor] = this.playbackValues[this.playbackIndex];\n }\n this.detectChanges();\n }\n getPlaybackRate() {\n this.ariaValue = this.target ? this.target.playbackRate : 1.0;\n return this.ariaValue;\n }\n detectChanges() {\n try {\n this.cdr.detectChanges();\n }\n catch (e) {\n console.warn(e);\n }\n }\n ngOnDestroy() {\n this.subscriptions.forEach((s) => s.unsubscribe());\n }\n}\n/** @nocollapse */ /** @nocollapse */ VgPlaybackButtonComponent.ɵfac = function VgPlaybackButtonComponent_Factory(t) { return new (t || VgPlaybackButtonComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.VgApiService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };\n/** @nocollapse */ /** @nocollapse */ VgPlaybackButtonComponent.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: VgPlaybackButtonComponent, selectors: [[\"vg-playback-button\"]], hostBindings: function VgPlaybackButtonComponent_HostBindings(rf, ctx) { if (rf & 1) {\n i0.ɵɵlistener(\"click\", function VgPlaybackButtonComponent_click_HostBindingHandler() { return ctx.onClick(); })(\"keydown\", function VgPlaybackButtonComponent_keydown_HostBindingHandler($event) { return ctx.onKeyDown($event); });\n } }, inputs: { vgFor: \"vgFor\", playbackValues: \"playbackValues\" }, decls: 2, vars: 2, consts: [[\"tabindex\", \"0\", \"role\", \"button\", \"aria-label\", \"playback speed button\", 1, \"button\"]], template: function VgPlaybackButtonComponent_Template(rf, ctx) { if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\", 0);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n } if (rf & 2) {\n i0.ɵɵattribute(\"aria-valuetext\", ctx.ariaValue);\n i0.ɵɵadvance(1);\n i0.ɵɵtextInterpolate1(\" \", ctx.getPlaybackRate(), \"x \");\n } }, styles: [\"vg-playback-button{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;display:flex;justify-content:center;height:50px;width:50px;cursor:pointer;color:#fff;line-height:50px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}vg-playback-button .button{display:flex;align-items:center;justify-content:center;width:50px}\\n\"], encapsulation: 2 });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(VgPlaybackButtonComponent, [{\n type: Component,\n args: [{\n selector: 'vg-playback-button',\n encapsulation: ViewEncapsulation.None,\n template: ` \n {{ getPlaybackRate() }}x\n `,\n styles: [\n `\n vg-playback-button {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n display: flex;\n justify-content: center;\n height: 50px;\n width: 50px;\n cursor: pointer;\n color: white;\n line-height: 50px;\n font-family: Helvetica Neue, Helvetica, Arial, sans-serif;\n }\n vg-playback-button .button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 50px;\n }\n `,\n ],\n }]\n }], function () { return [{ type: i0.ElementRef }, { type: i1.VgApiService }, { type: i0.ChangeDetectorRef }]; }, { vgFor: [{\n type: Input\n }], playbackValues: [{\n type: Input\n }], onClick: [{\n type: HostListener,\n args: ['click']\n }], onKeyDown: [{\n type: HostListener,\n args: ['keydown', ['$event']]\n }] }); })();\n\nclass VgPlayPauseComponent {\n constructor(ref, API) {\n this.API = API;\n this.subscriptions = [];\n this.ariaValue = VgStates.VG_PAUSED;\n this.elem = ref.nativeElement;\n }\n ngOnInit() {\n if (this.API.isPlayerReady) {\n this.onPlayerReady();\n }\n else {\n this.subscriptions.push(this.API.playerReadyEvent.subscribe(() => this.onPlayerReady()));\n }\n }\n onPlayerReady() {\n this.target = this.API.getMediaById(this.vgFor);\n }\n onClick() {\n this.playPause();\n }\n onKeyDown(event) {\n // On press Enter (13) or Space (32)\n if (event.keyCode === 13 || event.keyCode === 32) {\n event.preventDefault();\n this.playPause();\n }\n }\n playPause() {\n const state = this.getState();\n switch (state) {\n case VgStates.VG_PLAYING:\n this.target.pause();\n break;\n case VgStates.VG_PAUSED:\n case VgStates.VG_ENDED:\n this.target.play();\n break;\n }\n }\n getState() {\n this.ariaValue = this.target ? this.target.state : VgStates.VG_PAUSED;\n return this.ariaValue;\n }\n ngOnDestroy() {\n this.subscriptions.forEach((s) => s.unsubscribe());\n }\n}\n/** @nocollapse */ /** @nocollapse */ VgPlayPauseComponent.ɵfac = function VgPlayPauseComponent_Factory(t) { return new (t || VgPlayPauseComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.VgApiService)); };\n/** @nocollapse */ /** @nocollapse */ VgPlayPauseComponent.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: VgPlayPauseComponent, selectors: [[\"vg-play-pause\"]], hostBindings: function VgPlayPauseComponent_HostBindings(rf, ctx) { if (rf & 1) {\n i0.ɵɵlistener(\"click\", function VgPlayPauseComponent_click_HostBindingHandler() { return ctx.onClick(); })(\"keydown\", function VgPlayPauseComponent_keydown_HostBindingHandler($event) { return ctx.onKeyDown($event); });\n } }, inputs: { vgFor: \"vgFor\" }, decls: 1, vars: 6, consts: [[\"tabindex\", \"0\", \"role\", \"button\", 1, \"icon\"]], template: function VgPlayPauseComponent_Template(rf, ctx) { if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 0);\n } if (rf & 2) {\n i0.ɵɵclassProp(\"vg-icon-pause\", ctx.getState() === \"playing\")(\"vg-icon-play_arrow\", ctx.getState() === \"paused\" || ctx.getState() === \"ended\");\n i0.ɵɵattribute(\"aria-label\", ctx.getState() === \"paused\" ? \"play\" : \"pause\")(\"aria-valuetext\", ctx.ariaValue);\n } }, styles: [\"vg-play-pause{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;display:flex;justify-content:center;height:50px;width:50px;cursor:pointer;color:#fff;line-height:50px}vg-play-pause .icon{pointer-events:none}\\n\"], encapsulation: 2 });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(VgPlayPauseComponent, [{\n type: Component,\n args: [{\n selector: 'vg-play-pause',\n encapsulation: ViewEncapsulation.None,\n template: ` `,\n styles: [\n `\n vg-play-pause {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n display: flex;\n justify-content: center;\n height: 50px;\n width: 50px;\n cursor: pointer;\n color: white;\n line-height: 50px;\n }\n vg-play-pause .icon {\n pointer-events: none;\n }\n `,\n ],\n }]\n }], function () { return [{ type: i0.ElementRef }, { type: i1.VgApiService }]; }, { vgFor: [{\n type: Input\n }], onClick: [{\n type: HostListener,\n args: ['click']\n }], onKeyDown: [{\n type: HostListener,\n args: ['keydown', ['$event']]\n }] }); })();\n\nclass VgMuteComponent {\n constructor(ref, API) {\n this.API = API;\n this.subscriptions = [];\n this.ariaValue = 'unmuted';\n this.elem = ref.nativeElement;\n }\n ngOnInit() {\n if (this.API.isPlayerReady) {\n this.onPlayerReady();\n }\n else {\n this.subscriptions.push(this.API.playerReadyEvent.subscribe(() => this.onPlayerReady()));\n }\n }\n onPlayerReady() {\n this.target = this.API.getMediaById(this.vgFor);\n this.currentVolume = this.target.volume;\n }\n onClick() {\n this.changeMuteState();\n }\n onKeyDown(event) {\n // On press Enter (13) or Space (32)\n if (event.keyCode === 13 || event.keyCode === 32) {\n event.preventDefault();\n this.changeMuteState();\n }\n }\n changeMuteState() {\n const volume = this.getVolume();\n if (volume === 0) {\n if (this.target.volume === 0 && this.currentVolume === 0) {\n this.currentVolume = 1;\n }\n this.target.volume = this.currentVolume;\n }\n else {\n this.currentVolume = volume;\n this.target.volume = 0;\n }\n }\n getVolume() {\n const volume = this.target ? this.target.volume : 0;\n this.ariaValue = volume ? 'unmuted' : 'muted';\n return volume;\n }\n ngOnDestroy() {\n this.subscriptions.forEach((s) => s.unsubscribe());\n }\n}\n/** @nocollapse */ /** @nocollapse */ VgMuteComponent.ɵfac = function VgMuteComponent_Factory(t) { return new (t || VgMuteComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.VgApiService)); };\n/** @nocollapse */ /** @nocollapse */ VgMuteComponent.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: VgMuteComponent, selectors: [[\"vg-mute\"]], hostBindings: function VgMuteComponent_HostBindings(rf, ctx) { if (rf & 1) {\n i0.ɵɵlistener(\"click\", function VgMuteComponent_click_HostBindingHandler() { return ctx.onClick(); })(\"keydown\", function VgMuteComponent_keydown_HostBindingHandler($event) { return ctx.onKeyDown($event); });\n } }, inputs: { vgFor: \"vgFor\" }, decls: 1, vars: 9, consts: [[\"tabindex\", \"0\", \"role\", \"button\", \"aria-label\", \"mute button\", 1, \"icon\"]], template: function VgMuteComponent_Template(rf, ctx) { if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 0);\n } if (rf & 2) {\n i0.ɵɵclassProp(\"vg-icon-volume_up\", ctx.getVolume() >= 0.75)(\"vg-icon-volume_down\", ctx.getVolume() >= 0.25 && ctx.getVolume() < 0.75)(\"vg-icon-volume_mute\", ctx.getVolume() > 0 && ctx.getVolume() < 0.25)(\"vg-icon-volume_off\", ctx.getVolume() === 0);\n i0.ɵɵattribute(\"aria-valuetext\", ctx.ariaValue);\n } }, styles: [\"vg-mute{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;display:flex;justify-content:center;height:50px;width:50px;cursor:pointer;color:#fff;line-height:50px}vg-mute .icon{pointer-events:none}\\n\"], encapsulation: 2 });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(VgMuteComponent, [{\n type: Component,\n args: [{\n selector: 'vg-mute',\n encapsulation: ViewEncapsulation.None,\n template: ` = 0.75\"\n [class.vg-icon-volume_down]=\"getVolume() >= 0.25 && getVolume() < 0.75\"\n [class.vg-icon-volume_mute]=\"getVolume() > 0 && getVolume() < 0.25\"\n [class.vg-icon-volume_off]=\"getVolume() === 0\"\n tabindex=\"0\"\n role=\"button\"\n aria-label=\"mute button\"\n [attr.aria-valuetext]=\"ariaValue\"\n >`,\n styles: [\n `\n vg-mute {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n display: flex;\n justify-content: center;\n height: 50px;\n width: 50px;\n cursor: pointer;\n color: white;\n line-height: 50px;\n }\n vg-mute .icon {\n pointer-events: none;\n }\n `,\n ],\n }]\n }], function () { return [{ type: i0.ElementRef }, { type: i1.VgApiService }]; }, { vgFor: [{\n type: Input\n }], onClick: [{\n type: HostListener,\n args: ['click']\n }], onKeyDown: [{\n type: HostListener,\n args: ['keydown', ['$event']]\n }] }); })();\n\nclass VgFullscreenComponent {\n constructor(ref, API, fsAPI) {\n this.API = API;\n this.fsAPI = fsAPI;\n this.isFullscreen = false;\n this.subscriptions = [];\n this.ariaValue = 'normal mode';\n this.elem = ref.nativeElement;\n this.subscriptions.push(this.fsAPI.onChangeFullscreen.subscribe(this.onChangeFullscreen.bind(this)));\n }\n ngOnInit() {\n if (this.API.isPlayerReady) {\n this.onPlayerReady();\n }\n else {\n this.subscriptions.push(this.API.playerReadyEvent.subscribe(() => this.onPlayerReady()));\n }\n }\n onPlayerReady() {\n this.target = this.API.getMediaById(this.vgFor);\n }\n onChangeFullscreen(fsState) {\n this.ariaValue = fsState ? 'fullscreen mode' : 'normal mode';\n this.isFullscreen = fsState;\n }\n onClick() {\n this.changeFullscreenState();\n }\n onKeyDown(event) {\n // On press Enter (13) or Space (32)\n if (event.keyCode === 13 || event.keyCode === 32) {\n event.preventDefault();\n this.changeFullscreenState();\n }\n }\n changeFullscreenState() {\n let element = this.target;\n if (this.target instanceof VgApiService) {\n element = null;\n }\n this.fsAPI.toggleFullscreen(element);\n }\n ngOnDestroy() {\n this.subscriptions.forEach((s) => s.unsubscribe());\n }\n}\n/** @nocollapse */ /** @nocollapse */ VgFullscreenComponent.ɵfac = function VgFullscreenComponent_Factory(t) { return new (t || VgFullscreenComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.VgApiService), i0.ɵɵdirectiveInject(i1.VgFullscreenApiService)); };\n/** @nocollapse */ /** @nocollapse */ VgFullscreenComponent.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: VgFullscreenComponent, selectors: [[\"vg-fullscreen\"]], hostBindings: function VgFullscreenComponent_HostBindings(rf, ctx) { if (rf & 1) {\n i0.ɵɵlistener(\"click\", function VgFullscreenComponent_click_HostBindingHandler() { return ctx.onClick(); })(\"keydown\", function VgFullscreenComponent_keydown_HostBindingHandler($event) { return ctx.onKeyDown($event); });\n } }, decls: 1, vars: 5, consts: [[\"tabindex\", \"0\", \"role\", \"button\", \"aria-label\", \"fullscreen button\", 1, \"icon\"]], template: function VgFullscreenComponent_Template(rf, ctx) { if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 0);\n } if (rf & 2) {\n i0.ɵɵclassProp(\"vg-icon-fullscreen\", !ctx.isFullscreen)(\"vg-icon-fullscreen_exit\", ctx.isFullscreen);\n i0.ɵɵattribute(\"aria-valuetext\", ctx.ariaValue);\n } }, styles: [\"vg-fullscreen{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;display:flex;justify-content:center;height:50px;width:50px;cursor:pointer;color:#fff;line-height:50px}vg-fullscreen .icon{pointer-events:none}\\n\"], encapsulation: 2 });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(VgFullscreenComponent, [{\n type: Component,\n args: [{\n selector: 'vg-fullscreen',\n encapsulation: ViewEncapsulation.None,\n template: ` `,\n styles: [\n `\n vg-fullscreen {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n display: flex;\n justify-content: center;\n height: 50px;\n width: 50px;\n cursor: pointer;\n color: white;\n line-height: 50px;\n }\n vg-fullscreen .icon {\n pointer-events: none;\n }\n `,\n ],\n }]\n }], function () { return [{ type: i0.ElementRef }, { type: i1.VgApiService }, { type: i1.VgFullscreenApiService }]; }, { onClick: [{\n type: HostListener,\n args: ['click']\n }], onKeyDown: [{\n type: HostListener,\n args: ['keydown', ['$event']]\n }] }); })();\n\nclass VgScrubBarBufferingTimeComponent {\n constructor(ref, API) {\n this.API = API;\n this.subscriptions = [];\n this.elem = ref.nativeElement;\n }\n ngOnInit() {\n if (this.API.isPlayerReady) {\n this.onPlayerReady();\n }\n else {\n this.subscriptions.push(this.API.playerReadyEvent.subscribe(() => this.onPlayerReady()));\n }\n }\n onPlayerReady() {\n this.target = this.API.getMediaById(this.vgFor);\n }\n getBufferTime() {\n let bufferTime = '0%';\n if (this.target?.buffered?.length) {\n if (this.target.time.total === 0) {\n bufferTime = '0%';\n }\n else {\n bufferTime =\n (this.target.buffer.end / this.target.time.total) * 100 + '%';\n }\n }\n return bufferTime;\n }\n ngOnDestroy() {\n this.subscriptions.forEach((s) => s.unsubscribe());\n }\n}\n/** @nocollapse */ /** @nocollapse */ VgScrubBarBufferingTimeComponent.ɵfac = function VgScrubBarBufferingTimeComponent_Factory(t) { return new (t || VgScrubBarBufferingTimeComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.VgApiService)); };\n/** @nocollapse */ /** @nocollapse */ VgScrubBarBufferingTimeComponent.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: VgScrubBarBufferingTimeComponent, selectors: [[\"vg-scrub-bar-buffering-time\"]], inputs: { vgFor: \"vgFor\" }, decls: 1, vars: 2, consts: [[1, \"background\"]], template: function VgScrubBarBufferingTimeComponent_Template(rf, ctx) { if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 0);\n } if (rf & 2) {\n i0.ɵɵstyleProp(\"width\", ctx.getBufferTime());\n } }, styles: [\"vg-scrub-bar-buffering-time{display:flex;width:100%;height:5px;pointer-events:none;position:absolute}vg-scrub-bar-buffering-time .background{background-color:#ffffff4d}vg-controls vg-scrub-bar-buffering-time{position:absolute;top:calc(50% - 3px)}vg-controls vg-scrub-bar-buffering-time .background{border-radius:2px}\\n\"], encapsulation: 2 });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(VgScrubBarBufferingTimeComponent, [{\n type: Component,\n args: [{\n selector: 'vg-scrub-bar-buffering-time',\n encapsulation: ViewEncapsulation.None,\n template: `
`,\n styles: [\n `\n vg-scrub-bar-buffering-time {\n display: flex;\n width: 100%;\n height: 5px;\n pointer-events: none;\n position: absolute;\n }\n vg-scrub-bar-buffering-time .background {\n background-color: rgba(255, 255, 255, 0.3);\n }\n vg-controls vg-scrub-bar-buffering-time {\n position: absolute;\n top: calc(50% - 3px);\n }\n vg-controls vg-scrub-bar-buffering-time .background {\n -webkit-border-radius: 2px;\n -moz-border-radius: 2px;\n border-radius: 2px;\n }\n `,\n ],\n }]\n }], function () { return [{ type: i0.ElementRef }, { type: i1.VgApiService }]; }, { vgFor: [{\n type: Input\n }] }); })();\n\nfunction VgScrubBarCuePointsComponent_span_1_Template(rf, ctx) { if (rf & 1) {\n i0.ɵɵelement(0, \"span\", 2);\n} if (rf & 2) {\n const cp_r1 = ctx.$implicit;\n i0.ɵɵstyleProp(\"width\", cp_r1.$$style == null ? null : cp_r1.$$style.width)(\"left\", cp_r1.$$style == null ? null : cp_r1.$$style.left);\n} }\n// tslint:disable-next-line: no-conflicting-lifecycle\nclass VgScrubBarCuePointsComponent {\n constructor(ref, API) {\n this.API = API;\n this.onLoadedMetadataCalled = false;\n this.cuePoints = [];\n this.subscriptions = [];\n this.totalCues = 0;\n this.elem = ref.nativeElement;\n }\n ngOnInit() {\n if (this.API.isPlayerReady) {\n this.onPlayerReady();\n }\n else {\n this.subscriptions.push(this.API.playerReadyEvent.subscribe(() => this.onPlayerReady()));\n }\n }\n onPlayerReady() {\n this.target = this.API.getMediaById(this.vgFor);\n const onTimeUpdate = this.target.subscriptions.loadedMetadata;\n this.subscriptions.push(onTimeUpdate.subscribe(this.onLoadedMetadata.bind(this)));\n if (this.onLoadedMetadataCalled) {\n this.onLoadedMetadata();\n }\n }\n onLoadedMetadata() {\n if (this.vgCuePoints) {\n // We need to transform the TextTrackCueList to Array or it doesn't work on IE11/Edge.\n // See: https://github.com/videogular/videogular2/issues/369\n this.cuePoints = [];\n for (let i = 0, l = this.vgCuePoints.length; i < l; i++) {\n const end = this.vgCuePoints[i].endTime >= 0\n ? this.vgCuePoints[i].endTime\n : this.vgCuePoints[i].startTime + 1;\n const cuePointDuration = (end - this.vgCuePoints[i].startTime) * 1000;\n let position = '0';\n let percentWidth = '0';\n if (typeof cuePointDuration === 'number' && this.target.time.total) {\n percentWidth =\n (cuePointDuration * 100) / this.target.time.total + '%';\n position =\n (this.vgCuePoints[i].startTime * 100) /\n Math.round(this.target.time.total / 1000) +\n '%';\n }\n this.vgCuePoints[i].$$style = {\n width: percentWidth,\n left: position,\n };\n this.cuePoints.push(this.vgCuePoints[i]);\n }\n }\n }\n updateCuePoints() {\n if (!this.target) {\n this.onLoadedMetadataCalled = true;\n return;\n }\n this.onLoadedMetadata();\n }\n ngOnChanges(changes) {\n if (changes.vgCuePoints.currentValue) {\n this.updateCuePoints();\n }\n }\n ngDoCheck() {\n if (this.vgCuePoints) {\n const changes = this.totalCues !== this.vgCuePoints.length;\n if (changes) {\n this.totalCues = this.vgCuePoints.length;\n this.updateCuePoints();\n }\n }\n }\n ngOnDestroy() {\n this.subscriptions.forEach((s) => s.unsubscribe());\n }\n}\n/** @nocollapse */ /** @nocollapse */ VgScrubBarCuePointsComponent.ɵfac = function VgScrubBarCuePointsComponent_Factory(t) { return new (t || VgScrubBarCuePointsComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.VgApiService)); };\n/** @nocollapse */ /** @nocollapse */ VgScrubBarCuePointsComponent.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: VgScrubBarCuePointsComponent, selectors: [[\"vg-scrub-bar-cue-points\"]], inputs: { vgCuePoints: \"vgCuePoints\", vgFor: \"vgFor\" }, features: [i0.ɵɵNgOnChangesFeature], decls: 2, vars: 1, consts: [[1, \"cue-point-container\"], [\"class\", \"cue-point\", 3, \"width\", \"left\", 4, \"ngFor\", \"ngForOf\"], [1, \"cue-point\"]], template: function VgScrubBarCuePointsComponent_Template(rf, ctx) { if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 0);\n i0.ɵɵtemplate(1, VgScrubBarCuePointsComponent_span_1_Template, 1, 4, \"span\", 1);\n i0.ɵɵelementEnd();\n } if (rf & 2) {\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngForOf\", ctx.cuePoints);\n } }, directives: [i2.NgForOf], styles: [\"vg-scrub-bar-cue-points{display:flex;width:100%;height:5px;pointer-events:none;position:absolute}vg-scrub-bar-cue-points .cue-point-container .cue-point{position:absolute;height:5px;background-color:#ffcc00b3}vg-controls vg-scrub-bar-cue-points{position:absolute;top:calc(50% - 3px)}\\n\"], encapsulation: 2 });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(VgScrubBarCuePointsComponent, [{\n type: Component,\n args: [{\n selector: 'vg-scrub-bar-cue-points',\n encapsulation: ViewEncapsulation.None,\n template: `\n
\n \n
\n `,\n styles: [\n `\n vg-scrub-bar-cue-points {\n display: flex;\n width: 100%;\n height: 5px;\n pointer-events: none;\n position: absolute;\n }\n vg-scrub-bar-cue-points .cue-point-container .cue-point {\n position: absolute;\n height: 5px;\n background-color: rgba(255, 204, 0, 0.7);\n }\n vg-controls vg-scrub-bar-cue-points {\n position: absolute;\n top: calc(50% - 3px);\n }\n `,\n ],\n }]\n }], function () { return [{ type: i0.ElementRef }, { type: i1.VgApiService }]; }, { vgCuePoints: [{\n type: Input\n }], vgFor: [{\n type: Input\n }] }); })();\n\nfunction VgScrubBarCurrentTimeComponent_span_1_Template(rf, ctx) { if (rf & 1) {\n i0.ɵɵelement(0, \"span\", 2);\n} }\nclass VgScrubBarCurrentTimeComponent {\n constructor(ref, API) {\n this.API = API;\n this.vgSlider = false;\n this.subscriptions = [];\n this.elem = ref.nativeElement;\n }\n ngOnInit() {\n if (this.API.isPlayerReady) {\n this.onPlayerReady();\n }\n else {\n this.subscriptions.push(this.API.playerReadyEvent.subscribe(() => this.onPlayerReady()));\n }\n }\n onPlayerReady() {\n this.target = this.API.getMediaById(this.vgFor);\n }\n getPercentage() {\n return this.target\n ? Math.round((this.target.time.current * 100) / this.target.time.total) +\n '%'\n : '0%';\n }\n ngOnDestroy() {\n this.subscriptions.forEach((s) => s.unsubscribe());\n }\n}\n/** @nocollapse */ /** @nocollapse */ VgScrubBarCurrentTimeComponent.ɵfac = function VgScrubBarCurrentTimeComponent_Factory(t) { return new (t || VgScrubBarCurrentTimeComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.VgApiService)); };\n/** @nocollapse */ /** @nocollapse */ VgScrubBarCurrentTimeComponent.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: VgScrubBarCurrentTimeComponent, selectors: [[\"vg-scrub-bar-current-time\"]], inputs: { vgFor: \"vgFor\", vgSlider: \"vgSlider\" }, decls: 2, vars: 3, consts: [[1, \"background\"], [\"class\", \"slider\", 4, \"ngIf\"], [1, \"slider\"]], template: function VgScrubBarCurrentTimeComponent_Template(rf, ctx) { if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 0);\n i0.ɵɵtemplate(1, VgScrubBarCurrentTimeComponent_span_1_Template, 1, 0, \"span\", 1);\n } if (rf & 2) {\n i0.ɵɵstyleProp(\"width\", ctx.getPercentage());\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx.vgSlider);\n } }, directives: [i2.NgIf], styles: [\"vg-scrub-bar-current-time{display:flex;width:100%;height:5px;pointer-events:none;position:absolute}vg-scrub-bar-current-time .background{background-color:#fff}vg-controls vg-scrub-bar-current-time{position:absolute;top:calc(50% - 3px);border-radius:2px}vg-controls vg-scrub-bar-current-time .background{border:1px solid white;border-radius:2px}vg-scrub-bar-current-time .slider{background:white;height:15px;width:15px;border-radius:50%;box-shadow:0 0 10px #000;margin-top:-5px;margin-left:-10px}\\n\"], encapsulation: 2 });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(VgScrubBarCurrentTimeComponent, [{\n type: Component,\n args: [{\n selector: 'vg-scrub-bar-current-time',\n encapsulation: ViewEncapsulation.None,\n template: `
\n `,\n styles: [\n `\n vg-scrub-bar-current-time {\n display: flex;\n width: 100%;\n height: 5px;\n pointer-events: none;\n position: absolute;\n }\n vg-scrub-bar-current-time .background {\n background-color: white;\n }\n vg-controls vg-scrub-bar-current-time {\n position: absolute;\n top: calc(50% - 3px);\n -webkit-border-radius: 2px;\n -moz-border-radius: 2px;\n border-radius: 2px;\n }\n vg-controls vg-scrub-bar-current-time .background {\n border: 1px solid white;\n -webkit-border-radius: 2px;\n -moz-border-radius: 2px;\n border-radius: 2px;\n }\n vg-scrub-bar-current-time .slider {\n background: white;\n height: 15px;\n width: 15px;\n border-radius: 50%;\n box-shadow: 0px 0px 10px black;\n margin-top: -5px;\n margin-left: -10px;\n }\n `,\n ],\n }]\n }], function () { return [{ type: i0.ElementRef }, { type: i1.VgApiService }]; }, { vgFor: [{\n type: Input\n }], vgSlider: [{\n type: Input\n }] }); })();\n\nconst components = [\n VgControlsComponent,\n VgVolumeComponent,\n VgTrackSelectorComponent,\n VgTimeDisplayComponent,\n VgScrubBarComponent,\n VgQualitySelectorComponent,\n VgPlaybackButtonComponent,\n VgPlayPauseComponent,\n VgMuteComponent,\n VgFullscreenComponent,\n VgUtcPipe,\n VgScrubBarBufferingTimeComponent,\n VgScrubBarCuePointsComponent,\n VgScrubBarCurrentTimeComponent\n];\nclass VgControlsModule {\n}\n/** @nocollapse */ /** @nocollapse */ VgControlsModule.ɵfac = function VgControlsModule_Factory(t) { return new (t || VgControlsModule)(); };\n/** @nocollapse */ /** @nocollapse */ VgControlsModule.ɵmod = /** @pureOrBreakMyCode */ i0.ɵɵdefineNgModule({ type: VgControlsModule });\n/** @nocollapse */ /** @nocollapse */ VgControlsModule.ɵinj = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjector({ imports: [[CommonModule, VgCoreModule]] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(VgControlsModule, [{\n type: NgModule,\n args: [{\n imports: [CommonModule, VgCoreModule],\n declarations: [...components],\n exports: [...components],\n }]\n }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && i0.ɵɵsetNgModuleScope(VgControlsModule, { declarations: [VgControlsComponent,\n VgVolumeComponent,\n VgTrackSelectorComponent,\n VgTimeDisplayComponent,\n VgScrubBarComponent,\n VgQualitySelectorComponent,\n VgPlaybackButtonComponent,\n VgPlayPauseComponent,\n VgMuteComponent,\n VgFullscreenComponent,\n VgUtcPipe,\n VgScrubBarBufferingTimeComponent,\n VgScrubBarCuePointsComponent,\n VgScrubBarCurrentTimeComponent], imports: [CommonModule, VgCoreModule], exports: [VgControlsComponent,\n VgVolumeComponent,\n VgTrackSelectorComponent,\n VgTimeDisplayComponent,\n VgScrubBarComponent,\n VgQualitySelectorComponent,\n VgPlaybackButtonComponent,\n VgPlayPauseComponent,\n VgMuteComponent,\n VgFullscreenComponent,\n VgUtcPipe,\n VgScrubBarBufferingTimeComponent,\n VgScrubBarCuePointsComponent,\n VgScrubBarCurrentTimeComponent] }); })();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { VgControlsComponent, VgControlsModule, VgFullscreenComponent, VgMuteComponent, VgPlayPauseComponent, VgPlaybackButtonComponent, VgQualitySelectorComponent, VgScrubBarBufferingTimeComponent, VgScrubBarComponent, VgScrubBarCuePointsComponent, VgScrubBarCurrentTimeComponent, VgTimeDisplayComponent, VgTrackSelectorComponent, VgUtcPipe, VgVolumeComponent };\n","\n {{ 'PROGRESS_STEP_CONNECT_CREDIT' | translate }}\n
\n \n \n
\n
\n
\n
\n
\n
\n \n {{ 'BUTTON_CONTINUE' | translate }}\n \n
\n
\n
\n","import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';\nimport {AnalyticsAttributesV4, FirebaseService} from '@brightside-web/desktop/data-access/shared';\n\n@Component({\n selector: 'brightside-web-credit-modal',\n templateUrl: './credit-modal.component.html',\n})\nexport class CreditModalComponent {\n @Input() visible = false;\n @Input() analyticsData: AnalyticsAttributesV4;\n\n @Output() results: EventEmitter = new EventEmitter();\n\n constructor(private analytics: FirebaseService) {\n }\n\n handleClick(boolToSend: boolean) {\n if (!boolToSend) this.analytics.logEvent('credit_details_dismissed');\n this.results.emit(boolToSend);\n }\n getFBInfo(extra: { [key: string]: string } = {}) {\n return {\n ...this.analyticsData,\n ...extra,\n };\n }\n}\n","import { isFunction } from './isFunction';\nimport { isScheduler } from './isScheduler';\nfunction last(arr) {\n return arr[arr.length - 1];\n}\nexport function popResultSelector(args) {\n return isFunction(last(args)) ? args.pop() : undefined;\n}\nexport function popScheduler(args) {\n return isScheduler(last(args)) ? args.pop() : undefined;\n}\nexport function popNumber(args, defaultValue) {\n return typeof last(args) === 'number' ? args.pop() : defaultValue;\n}\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar base64VLQ = require('./base64-vlq');\nvar util = require('./util');\nvar ArraySet = require('./array-set').ArraySet;\nvar MappingList = require('./mapping-list').MappingList;\n\n/**\n * An instance of the SourceMapGenerator represents a source map which is\n * being built incrementally. You may pass an object with the following\n * properties:\n *\n * - file: The filename of the generated source.\n * - sourceRoot: A root for all relative URLs in this source map.\n */\nfunction SourceMapGenerator(aArgs) {\n if (!aArgs) {\n aArgs = {};\n }\n this._file = util.getArg(aArgs, 'file', null);\n this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n this._sources = new ArraySet();\n this._names = new ArraySet();\n this._mappings = new MappingList();\n this._sourcesContents = null;\n}\n\nSourceMapGenerator.prototype._version = 3;\n\n/**\n * Creates a new SourceMapGenerator based on a SourceMapConsumer\n *\n * @param aSourceMapConsumer The SourceMap.\n */\nSourceMapGenerator.fromSourceMap =\n function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {\n var sourceRoot = aSourceMapConsumer.sourceRoot;\n var generator = new SourceMapGenerator({\n file: aSourceMapConsumer.file,\n sourceRoot: sourceRoot\n });\n aSourceMapConsumer.eachMapping(function (mapping) {\n var newMapping = {\n generated: {\n line: mapping.generatedLine,\n column: mapping.generatedColumn\n }\n };\n\n if (mapping.source != null) {\n newMapping.source = mapping.source;\n if (sourceRoot != null) {\n newMapping.source = util.relative(sourceRoot, newMapping.source);\n }\n\n newMapping.original = {\n line: mapping.originalLine,\n column: mapping.originalColumn\n };\n\n if (mapping.name != null) {\n newMapping.name = mapping.name;\n }\n }\n\n generator.addMapping(newMapping);\n });\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n generator.setSourceContent(sourceFile, content);\n }\n });\n return generator;\n };\n\n/**\n * Add a single mapping from original source line and column to the generated\n * source's line and column for this source map being created. The mapping\n * object should have the following properties:\n *\n * - generated: An object with the generated line and column positions.\n * - original: An object with the original line and column positions.\n * - source: The original source file (relative to the sourceRoot).\n * - name: An optional original token name for this mapping.\n */\nSourceMapGenerator.prototype.addMapping =\n function SourceMapGenerator_addMapping(aArgs) {\n var generated = util.getArg(aArgs, 'generated');\n var original = util.getArg(aArgs, 'original', null);\n var source = util.getArg(aArgs, 'source', null);\n var name = util.getArg(aArgs, 'name', null);\n\n if (!this._skipValidation) {\n this._validateMapping(generated, original, source, name);\n }\n\n if (source != null) {\n source = String(source);\n if (!this._sources.has(source)) {\n this._sources.add(source);\n }\n }\n\n if (name != null) {\n name = String(name);\n if (!this._names.has(name)) {\n this._names.add(name);\n }\n }\n\n this._mappings.add({\n generatedLine: generated.line,\n generatedColumn: generated.column,\n originalLine: original != null && original.line,\n originalColumn: original != null && original.column,\n source: source,\n name: name\n });\n };\n\n/**\n * Set the source content for a source file.\n */\nSourceMapGenerator.prototype.setSourceContent =\n function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n var source = aSourceFile;\n if (this._sourceRoot != null) {\n source = util.relative(this._sourceRoot, source);\n }\n\n if (aSourceContent != null) {\n // Add the source content to the _sourcesContents map.\n // Create a new _sourcesContents map if the property is null.\n if (!this._sourcesContents) {\n this._sourcesContents = Object.create(null);\n }\n this._sourcesContents[util.toSetString(source)] = aSourceContent;\n } else if (this._sourcesContents) {\n // Remove the source file from the _sourcesContents map.\n // If the _sourcesContents map is empty, set the property to null.\n delete this._sourcesContents[util.toSetString(source)];\n if (Object.keys(this._sourcesContents).length === 0) {\n this._sourcesContents = null;\n }\n }\n };\n\n/**\n * Applies the mappings of a sub-source-map for a specific source file to the\n * source map being generated. Each mapping to the supplied source file is\n * rewritten using the supplied source map. Note: The resolution for the\n * resulting mappings is the minimium of this map and the supplied map.\n *\n * @param aSourceMapConsumer The source map to be applied.\n * @param aSourceFile Optional. The filename of the source file.\n * If omitted, SourceMapConsumer's file property will be used.\n * @param aSourceMapPath Optional. The dirname of the path to the source map\n * to be applied. If relative, it is relative to the SourceMapConsumer.\n * This parameter is needed when the two source maps aren't in the same\n * directory, and the source map to be applied contains relative source\n * paths. If so, those relative source paths need to be rewritten\n * relative to the SourceMapGenerator.\n */\nSourceMapGenerator.prototype.applySourceMap =\n function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n var sourceFile = aSourceFile;\n // If aSourceFile is omitted, we will use the file property of the SourceMap\n if (aSourceFile == null) {\n if (aSourceMapConsumer.file == null) {\n throw new Error(\n 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +\n 'or the source map\\'s \"file\" property. Both were omitted.'\n );\n }\n sourceFile = aSourceMapConsumer.file;\n }\n var sourceRoot = this._sourceRoot;\n // Make \"sourceFile\" relative if an absolute Url is passed.\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n // Applying the SourceMap can add and remove items from the sources and\n // the names array.\n var newSources = new ArraySet();\n var newNames = new ArraySet();\n\n // Find mappings for the \"sourceFile\"\n this._mappings.unsortedForEach(function (mapping) {\n if (mapping.source === sourceFile && mapping.originalLine != null) {\n // Check if it can be mapped by the source map, then update the mapping.\n var original = aSourceMapConsumer.originalPositionFor({\n line: mapping.originalLine,\n column: mapping.originalColumn\n });\n if (original.source != null) {\n // Copy mapping\n mapping.source = original.source;\n if (aSourceMapPath != null) {\n mapping.source = util.join(aSourceMapPath, mapping.source)\n }\n if (sourceRoot != null) {\n mapping.source = util.relative(sourceRoot, mapping.source);\n }\n mapping.originalLine = original.line;\n mapping.originalColumn = original.column;\n if (original.name != null) {\n mapping.name = original.name;\n }\n }\n }\n\n var source = mapping.source;\n if (source != null && !newSources.has(source)) {\n newSources.add(source);\n }\n\n var name = mapping.name;\n if (name != null && !newNames.has(name)) {\n newNames.add(name);\n }\n\n }, this);\n this._sources = newSources;\n this._names = newNames;\n\n // Copy sourcesContents of applied map.\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aSourceMapPath != null) {\n sourceFile = util.join(aSourceMapPath, sourceFile);\n }\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n this.setSourceContent(sourceFile, content);\n }\n }, this);\n };\n\n/**\n * A mapping can have one of the three levels of data:\n *\n * 1. Just the generated position.\n * 2. The Generated position, original position, and original source.\n * 3. Generated and original position, original source, as well as a name\n * token.\n *\n * To maintain consistency, we validate that any new mapping being added falls\n * in to one of these categories.\n */\nSourceMapGenerator.prototype._validateMapping =\n function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,\n aName) {\n if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aGenerated.line > 0 && aGenerated.column >= 0\n && !aOriginal && !aSource && !aName) {\n // Case 1.\n return;\n }\n else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n && aGenerated.line > 0 && aGenerated.column >= 0\n && aOriginal.line > 0 && aOriginal.column >= 0\n && aSource) {\n // Cases 2 and 3.\n return;\n }\n else {\n throw new Error('Invalid mapping: ' + JSON.stringify({\n generated: aGenerated,\n source: aSource,\n original: aOriginal,\n name: aName\n }));\n }\n };\n\n/**\n * Serialize the accumulated mappings in to the stream of base 64 VLQs\n * specified by the source map format.\n */\nSourceMapGenerator.prototype._serializeMappings =\n function SourceMapGenerator_serializeMappings() {\n var previousGeneratedColumn = 0;\n var previousGeneratedLine = 1;\n var previousOriginalColumn = 0;\n var previousOriginalLine = 0;\n var previousName = 0;\n var previousSource = 0;\n var result = '';\n var next;\n var mapping;\n var nameIdx;\n var sourceIdx;\n\n var mappings = this._mappings.toArray();\n for (var i = 0, len = mappings.length; i < len; i++) {\n mapping = mappings[i];\n next = ''\n\n if (mapping.generatedLine !== previousGeneratedLine) {\n previousGeneratedColumn = 0;\n while (mapping.generatedLine !== previousGeneratedLine) {\n next += ';';\n previousGeneratedLine++;\n }\n }\n else {\n if (i > 0) {\n if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n continue;\n }\n next += ',';\n }\n }\n\n next += base64VLQ.encode(mapping.generatedColumn\n - previousGeneratedColumn);\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (mapping.source != null) {\n sourceIdx = this._sources.indexOf(mapping.source);\n next += base64VLQ.encode(sourceIdx - previousSource);\n previousSource = sourceIdx;\n\n // lines are stored 0-based in SourceMap spec version 3\n next += base64VLQ.encode(mapping.originalLine - 1\n - previousOriginalLine);\n previousOriginalLine = mapping.originalLine - 1;\n\n next += base64VLQ.encode(mapping.originalColumn\n - previousOriginalColumn);\n previousOriginalColumn = mapping.originalColumn;\n\n if (mapping.name != null) {\n nameIdx = this._names.indexOf(mapping.name);\n next += base64VLQ.encode(nameIdx - previousName);\n previousName = nameIdx;\n }\n }\n\n result += next;\n }\n\n return result;\n };\n\nSourceMapGenerator.prototype._generateSourcesContent =\n function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n return aSources.map(function (source) {\n if (!this._sourcesContents) {\n return null;\n }\n if (aSourceRoot != null) {\n source = util.relative(aSourceRoot, source);\n }\n var key = util.toSetString(source);\n return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n ? this._sourcesContents[key]\n : null;\n }, this);\n };\n\n/**\n * Externalize the source map.\n */\nSourceMapGenerator.prototype.toJSON =\n function SourceMapGenerator_toJSON() {\n var map = {\n version: this._version,\n sources: this._sources.toArray(),\n names: this._names.toArray(),\n mappings: this._serializeMappings()\n };\n if (this._file != null) {\n map.file = this._file;\n }\n if (this._sourceRoot != null) {\n map.sourceRoot = this._sourceRoot;\n }\n if (this._sourcesContents) {\n map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n }\n\n return map;\n };\n\n/**\n * Render the source map being generated to a string.\n */\nSourceMapGenerator.prototype.toString =\n function SourceMapGenerator_toString() {\n return JSON.stringify(this.toJSON());\n };\n\nexports.SourceMapGenerator = SourceMapGenerator;\n","import { Observable } from '../Observable';\nimport { innerFrom } from './innerFrom';\nexport function defer(observableFactory) {\n return new Observable((subscriber) => {\n innerFrom(observableFactory()).subscribe(subscriber);\n });\n}\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n/**\n * This is a helper function for getting values from parameter/options\n * objects.\n *\n * @param args The object we are extracting values from\n * @param name The name of the property we are getting.\n * @param defaultValue An optional value to return if the property is missing\n * from the object. If this is not specified and the property is missing, an\n * error will be thrown.\n */\nfunction getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}\nexports.getArg = getArg;\n\nvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.]*)(?::(\\d+))?(\\S*)$/;\nvar dataUrlRegexp = /^data:.+\\,.+$/;\n\nfunction urlParse(aUrl) {\n var match = aUrl.match(urlRegexp);\n if (!match) {\n return null;\n }\n return {\n scheme: match[1],\n auth: match[2],\n host: match[3],\n port: match[4],\n path: match[5]\n };\n}\nexports.urlParse = urlParse;\n\nfunction urlGenerate(aParsedUrl) {\n var url = '';\n if (aParsedUrl.scheme) {\n url += aParsedUrl.scheme + ':';\n }\n url += '//';\n if (aParsedUrl.auth) {\n url += aParsedUrl.auth + '@';\n }\n if (aParsedUrl.host) {\n url += aParsedUrl.host;\n }\n if (aParsedUrl.port) {\n url += \":\" + aParsedUrl.port\n }\n if (aParsedUrl.path) {\n url += aParsedUrl.path;\n }\n return url;\n}\nexports.urlGenerate = urlGenerate;\n\n/**\n * Normalizes a path, or the path portion of a URL:\n *\n * - Replaces consecutive slashes with one slash.\n * - Removes unnecessary '.' parts.\n * - Removes unnecessary '/..' parts.\n *\n * Based on code in the Node.js 'path' core module.\n *\n * @param aPath The path or url to normalize.\n */\nfunction normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}\nexports.normalize = normalize;\n\n/**\n * Joins two paths/URLs.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be joined with the root.\n *\n * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n * first.\n * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n * is updated with the result and aRoot is returned. Otherwise the result\n * is returned.\n * - If aPath is absolute, the result is aPath.\n * - Otherwise the two paths are joined with a slash.\n * - Joining for example 'http://' and 'www.example.com' is also supported.\n */\nfunction join(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n if (aPath === \"\") {\n aPath = \".\";\n }\n var aPathUrl = urlParse(aPath);\n var aRootUrl = urlParse(aRoot);\n if (aRootUrl) {\n aRoot = aRootUrl.path || '/';\n }\n\n // `join(foo, '//www.example.org')`\n if (aPathUrl && !aPathUrl.scheme) {\n if (aRootUrl) {\n aPathUrl.scheme = aRootUrl.scheme;\n }\n return urlGenerate(aPathUrl);\n }\n\n if (aPathUrl || aPath.match(dataUrlRegexp)) {\n return aPath;\n }\n\n // `join('http://', 'www.example.com')`\n if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n aRootUrl.host = aPath;\n return urlGenerate(aRootUrl);\n }\n\n var joined = aPath.charAt(0) === '/'\n ? aPath\n : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\n if (aRootUrl) {\n aRootUrl.path = joined;\n return urlGenerate(aRootUrl);\n }\n return joined;\n}\nexports.join = join;\n\nexports.isAbsolute = function (aPath) {\n return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);\n};\n\n/**\n * Make a path relative to a URL or another path.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be made relative to aRoot.\n */\nfunction relative(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n\n aRoot = aRoot.replace(/\\/$/, '');\n\n // It is possible for the path to be above the root. In this case, simply\n // checking whether the root is a prefix of the path won't work. Instead, we\n // need to remove components from the root one by one, until either we find\n // a prefix that fits, or we run out of components to remove.\n var level = 0;\n while (aPath.indexOf(aRoot + '/') !== 0) {\n var index = aRoot.lastIndexOf(\"/\");\n if (index < 0) {\n return aPath;\n }\n\n // If the only part of the root that is left is the scheme (i.e. http://,\n // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n // have exhausted all components, so the path is not relative to the root.\n aRoot = aRoot.slice(0, index);\n if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n return aPath;\n }\n\n ++level;\n }\n\n // Make sure we add a \"../\" for each component we removed from the root.\n return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n}\nexports.relative = relative;\n\nvar supportsNullProto = (function () {\n var obj = Object.create(null);\n return !('__proto__' in obj);\n}());\n\nfunction identity (s) {\n return s;\n}\n\n/**\n * Because behavior goes wacky when you set `__proto__` on objects, we\n * have to prefix all the strings in our set with an arbitrary character.\n *\n * See https://github.com/mozilla/source-map/pull/31 and\n * https://github.com/mozilla/source-map/issues/30\n *\n * @param String aStr\n */\nfunction toSetString(aStr) {\n if (isProtoString(aStr)) {\n return '$' + aStr;\n }\n\n return aStr;\n}\nexports.toSetString = supportsNullProto ? identity : toSetString;\n\nfunction fromSetString(aStr) {\n if (isProtoString(aStr)) {\n return aStr.slice(1);\n }\n\n return aStr;\n}\nexports.fromSetString = supportsNullProto ? identity : fromSetString;\n\nfunction isProtoString(s) {\n if (!s) {\n return false;\n }\n\n var length = s.length;\n\n if (length < 9 /* \"__proto__\".length */) {\n return false;\n }\n\n if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n s.charCodeAt(length - 9) !== 95 /* '_' */) {\n return false;\n }\n\n for (var i = length - 10; i >= 0; i--) {\n if (s.charCodeAt(i) !== 36 /* '$' */) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Comparator between two mappings where the original positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same original source/line/column, but different generated\n * line and column the same. Useful when searching for a mapping with a\n * stubbed out mapping.\n */\nfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n var cmp = mappingA.source - mappingB.source;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0 || onlyCompareOriginal) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n return mappingA.name - mappingB.name;\n}\nexports.compareByOriginalPositions = compareByOriginalPositions;\n\n/**\n * Comparator between two mappings with deflated source and name indices where\n * the generated positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same generated line and column, but different\n * source/name/original line and column the same. Useful when searching for a\n * mapping with a stubbed out mapping.\n */\nfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0 || onlyCompareGenerated) {\n return cmp;\n }\n\n cmp = mappingA.source - mappingB.source;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return mappingA.name - mappingB.name;\n}\nexports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\nfunction strcmp(aStr1, aStr2) {\n if (aStr1 === aStr2) {\n return 0;\n }\n\n if (aStr1 > aStr2) {\n return 1;\n }\n\n return -1;\n}\n\n/**\n * Comparator between two mappings with inflated source and name strings where\n * the generated positions are compared.\n */\nfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n","//! moment.js locale configuration\n//! locale : English (Ireland) [en-ie]\n//! author : Chris Cartlidge : https://github.com/chriscartlidge\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enIe = moment.defineLocale('en-ie', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\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 relativeTime: {\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 M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((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 week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return enIe;\n\n})));\n","//! moment.js locale configuration\n//! locale : Chinese (China) [zh-cn]\n//! author : suupic : https://github.com/suupic\n//! author : Zeno Zeng : https://github.com/zenozeng\n//! author : uu109 : https://github.com/uu109\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var zhCn = moment.defineLocale('zh-cn', {\n months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n '_'\n ),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n '_'\n ),\n weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),\n weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日Ah点mm分',\n LLLL: 'YYYY年M月D日ddddAh点mm分',\n l: 'YYYY/M/D',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日dddd HH:mm',\n },\n meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n return hour;\n } else if (meridiem === '下午' || meridiem === '晚上') {\n return hour + 12;\n } else {\n // '中午'\n return hour >= 11 ? hour : hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n var hm = hour * 100 + minute;\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1130) {\n return '上午';\n } else if (hm < 1230) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n } else {\n return '晚上';\n }\n },\n calendar: {\n sameDay: '[今天]LT',\n nextDay: '[明天]LT',\n nextWeek: function (now) {\n if (now.week() !== this.week()) {\n return '[下]dddLT';\n } else {\n return '[本]dddLT';\n }\n },\n lastDay: '[昨天]LT',\n lastWeek: function (now) {\n if (this.week() !== now.week()) {\n return '[上]dddLT';\n } else {\n return '[本]dddLT';\n }\n },\n sameElse: 'L',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(日|月|周)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n case 'M':\n return number + '月';\n case 'w':\n case 'W':\n return number + '周';\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s后',\n past: '%s前',\n s: '几秒',\n ss: '%d 秒',\n m: '1 分钟',\n mm: '%d 分钟',\n h: '1 小时',\n hh: '%d 小时',\n d: '1 天',\n dd: '%d 天',\n w: '1 周',\n ww: '%d 周',\n M: '1 个月',\n MM: '%d 个月',\n y: '1 年',\n yy: '%d 年',\n },\n week: {\n // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return zhCn;\n\n})));\n","export const isArrayLike = ((x) => x && typeof x.length === 'number' && typeof x !== 'function');\n","function e(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n0&&n[n.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]0?setTimeout(i,t):i(null)}}window.addEventListener(\"storage\",r),e.addToWaiting(r);var s=setTimeout(r,Math.max(0,t-Date.now()))}))];case 1:return i.sent(),[2]}}))}))},e.addToWaiting=function(t){this.removeFromWaiting(t),void 0!==e.waiters&&e.waiters.push(t)},e.removeFromWaiting=function(t){void 0!==e.waiters&&(e.waiters=e.waiters.filter((function(e){return e!==t})))},e.notifyWaiters=function(){void 0!==e.waiters&&e.waiters.slice().forEach((function(e){return e()}))},e.prototype.releaseLock=function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.releaseLock__private__(e)];case 1:return[2,t.sent()]}}))}))},e.prototype.releaseLock__private__=function(t){return o(this,void 0,void 0,(function(){var i,o,r,d;return a(this,(function(a){switch(a.label){case 0:return i=void 0===this.storageHandler?c:this.storageHandler,o=s+\"-\"+t,null===(r=i.getItemSync(o))?[2]:(d=JSON.parse(r)).id!==this.id?[3,2]:[4,n.default().lock(d.iat)];case 1:a.sent(),this.acquiredIatSet.delete(d.iat),i.removeItemSync(o),n.default().unlock(d.iat),e.notifyWaiters(),a.label=2;case 2:return[2]}}))}))},e.lockCorrector=function(t){for(var i=Date.now()-5e3,o=t,n=[],a=0;;){var r=o.keySync(a);if(null===r)break;n.push(r),a++}for(var c=!1,d=0;dDate.now();class d extends Error{constructor(e,t){super(t),this.error=e,this.error_description=t,Object.setPrototypeOf(this,d.prototype)}static fromPayload({error:e,error_description:t}){return new d(e,t)}}class u extends d{constructor(e,t,i,o=null){super(e,t),this.state=i,this.appState=o,Object.setPrototypeOf(this,u.prototype)}}class l extends d{constructor(){super(\"timeout\",\"Timeout\"),Object.setPrototypeOf(this,l.prototype)}}class h extends l{constructor(e){super(),this.popup=e,Object.setPrototypeOf(this,h.prototype)}}class p extends d{constructor(e){super(\"cancelled\",\"Popup closed\"),this.popup=e,Object.setPrototypeOf(this,p.prototype)}}class m extends d{constructor(e,t,i){super(e,t),this.mfa_token=i,Object.setPrototypeOf(this,m.prototype)}}class f extends d{constructor(e,t){super(\"missing_refresh_token\",`Missing Refresh Token (audience: '${g(e,[\"default\"])}', scope: '${g(t)}')`),this.audience=e,this.scope=t,Object.setPrototypeOf(this,f.prototype)}}function g(e,t=[]){return e&&!t.includes(e)?e:\"\"}const w=()=>window.crypto,y=()=>{const e=\"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.\";let t=\"\";return Array.from(w().getRandomValues(new Uint8Array(43))).forEach((i=>t+=e[i%e.length])),t},k=e=>btoa(e),v=t=>{var{clientId:i}=t,o=e(t,[\"clientId\"]);return new URLSearchParams((e=>Object.keys(e).filter((t=>void 0!==e[t])).reduce(((t,i)=>Object.assign(Object.assign({},t),{[i]:e[i]})),{}))(Object.assign({client_id:i},o))).toString()},b=e=>(e=>decodeURIComponent(atob(e).split(\"\").map((e=>\"%\"+(\"00\"+e.charCodeAt(0).toString(16)).slice(-2))).join(\"\")))(e.replace(/_/g,\"/\").replace(/-/g,\"+\")),_=async(e,t)=>{const i=await fetch(e,t);return{ok:i.ok,json:await i.json()}},I=async(e,t,i)=>{const o=new AbortController;let n;return t.signal=o.signal,Promise.race([_(e,t),new Promise(((e,t)=>{n=setTimeout((()=>{o.abort(),t(new Error(\"Timeout when executing 'fetch'\"))}),i)}))]).finally((()=>{clearTimeout(n)}))},S=async(e,t,i,o,n,a,r)=>{return s={auth:{audience:t,scope:i},timeout:n,fetchUrl:e,fetchOptions:o,useFormData:r},c=a,new Promise((function(e,t){const i=new MessageChannel;i.port1.onmessage=function(o){o.data.error?t(new Error(o.data.error)):e(o.data),i.port1.close()},c.postMessage(s,[i.port2])}));var s,c},O=async(e,t,i,o,n,a,r=1e4)=>n?S(e,t,i,o,r,n,a):I(e,o,r);async function T(t,i){var{baseUrl:o,timeout:n,audience:a,scope:r,auth0Client:c,useFormData:u}=t,l=e(t,[\"baseUrl\",\"timeout\",\"audience\",\"scope\",\"auth0Client\",\"useFormData\"]);const h=u?v(l):JSON.stringify(l);return await async function(t,i,o,n,a,r,s){let c,u=null;for(let e=0;e<3;e++)try{c=await O(t,o,n,a,r,s,i),u=null;break}catch(e){u=e}if(u)throw u;const l=c.json,{error:h,error_description:p}=l,g=e(l,[\"error\",\"error_description\"]),{ok:w}=c;if(!w){const e=p||`HTTP error. Unable to fetch ${t}`;if(\"mfa_required\"===h)throw new m(h,e,g.mfa_token);if(\"missing_refresh_token\"===h)throw new f(o,n);throw new d(h||\"request_error\",e)}return g}(`${o}/oauth/token`,n,a||\"default\",r,{method:\"POST\",body:h,headers:{\"Content-Type\":u?\"application/x-www-form-urlencoded\":\"application/json\",\"Auth0-Client\":btoa(JSON.stringify(c||s))}},i,u)}const j=(...e)=>{return(t=e.filter(Boolean).join(\" \").trim().split(/\\s+/),Array.from(new Set(t))).join(\" \");var t};class C{constructor(e,t=\"@@auth0spajs@@\",i){this.prefix=t,this.suffix=i,this.clientId=e.clientId,this.scope=e.scope,this.audience=e.audience}toKey(){return[this.prefix,this.clientId,this.audience,this.scope,this.suffix].filter(Boolean).join(\"::\")}static fromKey(e){const[t,i,o,n]=e.split(\"::\");return new C({clientId:i,scope:n,audience:o},t)}static fromCacheEntry(e){const{scope:t,audience:i,client_id:o}=e;return new C({scope:t,audience:i,clientId:o})}}class z{set(e,t){localStorage.setItem(e,JSON.stringify(t))}get(e){const t=window.localStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(e){return}}remove(e){localStorage.removeItem(e)}allKeys(){return Object.keys(window.localStorage).filter((e=>e.startsWith(\"@@auth0spajs@@\")))}}class P{constructor(){this.enclosedCache=function(){let e={};return{set(t,i){e[t]=i},get(t){const i=e[t];if(i)return i},remove(t){delete e[t]},allKeys:()=>Object.keys(e)}}()}}class x{constructor(e,t,i){this.cache=e,this.keyManifest=t,this.nowProvider=i||c}async setIdToken(e,t,i){var o;const n=this.getIdTokenCacheKey(e);await this.cache.set(n,{id_token:t,decodedToken:i}),await(null===(o=this.keyManifest)||void 0===o?void 0:o.add(n))}async getIdToken(e){const t=await this.cache.get(this.getIdTokenCacheKey(e.clientId));if(!t&&e.scope&&e.audience){const t=await this.get(e);if(!t)return;if(!t.id_token||!t.decodedToken)return;return{id_token:t.id_token,decodedToken:t.decodedToken}}if(t)return{id_token:t.id_token,decodedToken:t.decodedToken}}async get(e,t=0){var i;let o=await this.cache.get(e.toKey());if(!o){const t=await this.getCacheKeys();if(!t)return;const i=this.matchExistingCacheKey(e,t);i&&(o=await this.cache.get(i))}if(!o)return;const n=await this.nowProvider(),a=Math.floor(n/1e3);return o.expiresAt-t!e||t.includes(e))).reduce((async(e,t)=>{await e,await this.cache.remove(t)}),Promise.resolve()),await(null===(t=this.keyManifest)||void 0===t?void 0:t.clear()))}async wrapCacheEntry(e){const t=await this.nowProvider();return{body:e,expiresAt:Math.floor(t/1e3)+e.expires_in}}async getCacheKeys(){var e;return this.keyManifest?null===(e=await this.keyManifest.get())||void 0===e?void 0:e.keys:this.cache.allKeys?this.cache.allKeys():void 0}getIdTokenCacheKey(e){return new C({clientId:e},\"@@auth0spajs@@\",\"@@user@@\").toKey()}matchExistingCacheKey(e,t){return t.filter((t=>{var i;const o=C.fromKey(t),n=new Set(o.scope&&o.scope.split(\" \")),a=(null===(i=e.scope)||void 0===i?void 0:i.split(\" \"))||[],r=o.scope&&a.reduce(((e,t)=>e&&n.has(t)),!0);return\"@@auth0spajs@@\"===o.prefix&&o.clientId===e.clientId&&o.audience===e.audience&&r}))[0]}}class Z{constructor(e,t,i){this.storage=e,this.clientId=t,this.cookieDomain=i,this.storageKey=`a0.spajs.txs.${this.clientId}`}create(e){this.storage.save(this.storageKey,e,{daysUntilExpire:1,cookieDomain:this.cookieDomain})}get(){return this.storage.get(this.storageKey)}remove(){this.storage.remove(this.storageKey,{cookieDomain:this.cookieDomain})}}const K=e=>\"number\"==typeof e,W=[\"iss\",\"aud\",\"exp\",\"nbf\",\"iat\",\"jti\",\"azp\",\"nonce\",\"auth_time\",\"at_hash\",\"c_hash\",\"acr\",\"amr\",\"sub_jwk\",\"cnf\",\"sip_from_tag\",\"sip_date\",\"sip_callid\",\"sip_cseq_num\",\"sip_via_branch\",\"orig\",\"dest\",\"mky\",\"events\",\"toe\",\"txn\",\"rph\",\"sid\",\"vot\",\"vtm\"],E=e=>{if(!e.id_token)throw new Error(\"ID token is required but missing\");const t=(e=>{const t=e.split(\".\"),[i,o,n]=t;if(3!==t.length||!i||!o||!n)throw new Error(\"ID token could not be decoded\");const a=JSON.parse(b(o)),r={__raw:e},s={};return Object.keys(a).forEach((e=>{r[e]=a[e],W.includes(e)||(s[e]=a[e])})),{encoded:{header:i,payload:o,signature:n},header:JSON.parse(b(i)),claims:r,user:s}})(e.id_token);if(!t.claims.iss)throw new Error(\"Issuer (iss) claim must be a string present in the ID token\");if(t.claims.iss!==e.iss)throw new Error(`Issuer (iss) claim mismatch in the ID token; expected \"${e.iss}\", found \"${t.claims.iss}\"`);if(!t.user.sub)throw new Error(\"Subject (sub) claim must be a string present in the ID token\");if(\"RS256\"!==t.header.alg)throw new Error(`Signature algorithm of \"${t.header.alg}\" is not supported. Expected the ID token to be signed with \"RS256\".`);if(!t.claims.aud||\"string\"!=typeof t.claims.aud&&!Array.isArray(t.claims.aud))throw new Error(\"Audience (aud) claim must be a string or array of strings present in the ID token\");if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e.aud))throw new Error(`Audience (aud) claim mismatch in the ID token; expected \"${e.aud}\" but was not one of \"${t.claims.aud.join(\", \")}\"`);if(t.claims.aud.length>1){if(!t.claims.azp)throw new Error(\"Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values\");if(t.claims.azp!==e.aud)throw new Error(`Authorized Party (azp) claim mismatch in the ID token; expected \"${e.aud}\", found \"${t.claims.azp}\"`)}}else if(t.claims.aud!==e.aud)throw new Error(`Audience (aud) claim mismatch in the ID token; expected \"${e.aud}\" but found \"${t.claims.aud}\"`);if(e.nonce){if(!t.claims.nonce)throw new Error(\"Nonce (nonce) claim must be a string present in the ID token\");if(t.claims.nonce!==e.nonce)throw new Error(`Nonce (nonce) claim mismatch in the ID token; expected \"${e.nonce}\", found \"${t.claims.nonce}\"`)}if(e.max_age&&!K(t.claims.auth_time))throw new Error(\"Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified\");if(null==t.claims.exp||!K(t.claims.exp))throw new Error(\"Expiration Time (exp) claim must be a number present in the ID token\");if(!K(t.claims.iat))throw new Error(\"Issued At (iat) claim must be a number present in the ID token\");const i=e.leeway||60,o=new Date(e.now||Date.now()),n=new Date(0);if(n.setUTCSeconds(t.claims.exp+i),o>n)throw new Error(`Expiration Time (exp) claim error in the ID token; current time (${o}) is after expiration time (${n})`);if(null!=t.claims.nbf&&K(t.claims.nbf)){const e=new Date(0);if(e.setUTCSeconds(t.claims.nbf-i),on)throw new Error(`Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Current time (${o}) is after last auth at ${n}`)}if(e.organization){const i=e.organization.trim();if(i.startsWith(\"org_\")){const e=i;if(!t.claims.org_id)throw new Error(\"Organization ID (org_id) claim must be a string present in the ID token\");if(e!==t.claims.org_id)throw new Error(`Organization ID (org_id) claim mismatch in the ID token; expected \"${e}\", found \"${t.claims.org_id}\"`)}else{const e=i.toLowerCase();if(!t.claims.org_name)throw new Error(\"Organization Name (org_name) claim must be a string present in the ID token\");if(e!==t.claims.org_name)throw new Error(`Organization Name (org_name) claim mismatch in the ID token; expected \"${e}\", found \"${t.claims.org_name}\"`)}}return t};var R=o((function(e,i){var o=t&&t.__assign||function(){return o=Object.assign||function(e){for(var t,i=1,o=arguments.length;i0?await this.cache.set(this.manifestKey,{keys:[...i]}):await this.cache.remove(this.manifestKey)}}get(){return this.cache.get(this.manifestKey)}clear(){return this.cache.remove(this.manifestKey)}createManifestKeyFrom(e){return`@@auth0spajs@@::${e}`}}const $={memory:()=>(new P).enclosedCache,localstorage:()=>new z},q=e=>$[e],Q=t=>{const{openUrl:i,onRedirect:o}=t,n=e(t,[\"openUrl\",\"onRedirect\"]);return Object.assign(Object.assign({},n),{openUrl:!1===i||i?i:o})},ee=new a;class te{constructor(e){let t,i;if(this.userCache=(new P).enclosedCache,this.defaultOptions={authorizationParams:{scope:\"openid profile email\"},useRefreshTokensFallback:!1,useFormData:!0},this._releaseLockOnPageHide=async()=>{await ee.releaseLock(\"auth0.lock.getTokenSilently\"),window.removeEventListener(\"pagehide\",this._releaseLockOnPageHide)},this.options=Object.assign(Object.assign(Object.assign({},this.defaultOptions),e),{authorizationParams:Object.assign(Object.assign({},this.defaultOptions.authorizationParams),e.authorizationParams)}),\"undefined\"!=typeof window&&(()=>{if(!w())throw new Error(\"For security reasons, `window.crypto` is required to run `auth0-spa-js`.\");if(void 0===w().subtle)throw new Error(\"\\n auth0-spa-js must run on a secure origin. See https://github.com/auth0/auth0-spa-js/blob/main/FAQ.md#why-do-i-get-auth0-spa-js-must-run-on-a-secure-origin for more information.\\n \")})(),e.cache&&e.cacheLocation&&console.warn(\"Both `cache` and `cacheLocation` options have been specified in the Auth0Client configuration; ignoring `cacheLocation` and using `cache`.\"),e.cache)i=e.cache;else{if(t=e.cacheLocation||\"memory\",!q(t))throw new Error(`Invalid cache location \"${t}\"`);i=q(t)()}this.httpTimeoutMs=e.httpTimeoutInSeconds?1e3*e.httpTimeoutInSeconds:1e4,this.cookieStorage=!1===e.legacySameSiteCookie?X:N,this.orgHintCookieName=`auth0.${this.options.clientId}.organization_hint`,this.isAuthenticatedCookieName=(e=>`auth0.${e}.is.authenticated`)(this.options.clientId),this.sessionCheckExpiryDays=e.sessionCheckExpiryDays||1;const o=e.useCookiesForTransactions?this.cookieStorage:J;var n;this.scope=j(\"openid\",this.options.authorizationParams.scope,this.options.useRefreshTokens?\"offline_access\":\"\"),this.transactionManager=new Z(o,this.options.clientId,this.options.cookieDomain),this.nowProvider=this.options.nowProvider||c,this.cacheManager=new x(i,i.allKeys?void 0:new B(i,this.options.clientId),this.nowProvider),this.domainUrl=(n=this.options.domain,/^https?:\\/\\//.test(n)?n:`https://${n}`),this.tokenIssuer=((e,t)=>e?e.startsWith(\"https://\")?e:`https://${e}/`:`${t}/`)(this.options.issuer,this.domainUrl),\"undefined\"!=typeof window&&window.Worker&&this.options.useRefreshTokens&&\"memory\"===t&&(this.options.workerUrl?this.worker=new Worker(this.options.workerUrl):this.worker=new M)}_url(e){const t=encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client||s)));return`${this.domainUrl}${e}&auth0Client=${t}`}_authorizeUrl(e){return this._url(`/authorize?${v(e)}`)}async _verifyIdToken(e,t,i){const o=await this.nowProvider();return E({iss:this.tokenIssuer,aud:this.options.clientId,id_token:e,nonce:t,organization:i,leeway:this.options.leeway,max_age:(n=this.options.authorizationParams.max_age,\"string\"!=typeof n?n:parseInt(n,10)||void 0),now:o});var n}_processOrgHint(e){e?this.cookieStorage.save(this.orgHintCookieName,e,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}):this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain})}async _prepareAuthorizeUrl(e,t,i){const o=k(y()),n=k(y()),a=y(),r=(e=>{const t=new Uint8Array(e);return(e=>{const t={\"+\":\"-\",\"/\":\"_\",\"=\":\"\"};return e.replace(/[+/=]/g,(e=>t[e]))})(window.btoa(String.fromCharCode(...Array.from(t))))})(await(async e=>{const t=w().subtle.digest({name:\"SHA-256\"},(new TextEncoder).encode(e));return await t})(a)),s=((e,t,i,o,n,a,r,s)=>Object.assign(Object.assign(Object.assign({client_id:e.clientId},e.authorizationParams),i),{scope:j(t,i.scope),response_type:\"code\",response_mode:s||\"query\",state:o,nonce:n,redirect_uri:r||e.authorizationParams.redirect_uri,code_challenge:a,code_challenge_method:\"S256\"}))(this.options,this.scope,e,o,n,r,e.redirect_uri||this.options.authorizationParams.redirect_uri||i,null==t?void 0:t.response_mode),c=this._authorizeUrl(s);return{nonce:n,code_verifier:a,scope:s.scope,audience:s.audience||\"default\",redirect_uri:s.redirect_uri,state:o,url:c}}async loginWithPopup(e,t){var i;if(e=e||{},!(t=t||{}).popup&&(t.popup=(e=>{const t=window.screenX+(window.innerWidth-400)/2,i=window.screenY+(window.innerHeight-600)/2;return window.open(e,\"auth0:authorize:popup\",`left=${t},top=${i},width=400,height=600,resizable,scrollbars=yes,status=1`)})(\"\"),!t.popup))throw new Error(\"Unable to open a popup for loginWithPopup - window.open returned `null`\");const o=await this._prepareAuthorizeUrl(e.authorizationParams||{},{response_mode:\"web_message\"},window.location.origin);t.popup.location.href=o.url;const n=await(e=>new Promise(((t,i)=>{let o;const n=setInterval((()=>{e.popup&&e.popup.closed&&(clearInterval(n),clearTimeout(a),window.removeEventListener(\"message\",o,!1),i(new p(e.popup)))}),1e3),a=setTimeout((()=>{clearInterval(n),i(new h(e.popup)),window.removeEventListener(\"message\",o,!1)}),1e3*(e.timeoutInSeconds||60));o=function(r){if(r.data&&\"authorization_response\"===r.data.type){if(clearTimeout(a),clearInterval(n),window.removeEventListener(\"message\",o,!1),e.popup.close(),r.data.response.error)return i(d.fromPayload(r.data.response));t(r.data.response)}},window.addEventListener(\"message\",o)})))(Object.assign(Object.assign({},t),{timeoutInSeconds:t.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||60}));if(o.state!==n.state)throw new d(\"state_mismatch\",\"Invalid state\");const a=(null===(i=e.authorizationParams)||void 0===i?void 0:i.organization)||this.options.authorizationParams.organization;await this._requestToken({audience:o.audience,scope:o.scope,code_verifier:o.code_verifier,grant_type:\"authorization_code\",code:n.code,redirect_uri:o.redirect_uri},{nonceIn:o.nonce,organization:a})}async getUser(){var e;const t=await this._getIdTokenFromCache();return null===(e=null==t?void 0:t.decodedToken)||void 0===e?void 0:e.user}async getIdTokenClaims(){var e;const t=await this._getIdTokenFromCache();return null===(e=null==t?void 0:t.decodedToken)||void 0===e?void 0:e.claims}async loginWithRedirect(t={}){var i;const o=Q(t),{openUrl:n,fragment:a,appState:r}=o,s=e(o,[\"openUrl\",\"fragment\",\"appState\"]),c=(null===(i=s.authorizationParams)||void 0===i?void 0:i.organization)||this.options.authorizationParams.organization,d=await this._prepareAuthorizeUrl(s.authorizationParams||{}),{url:u}=d,l=e(d,[\"url\"]);this.transactionManager.create(Object.assign(Object.assign(Object.assign({},l),{appState:r}),c&&{organization:c}));const h=a?`${u}#${a}`:u;n?await n(h):window.location.assign(h)}async handleRedirectCallback(e=window.location.href){const t=e.split(\"?\").slice(1);if(0===t.length)throw new Error(\"There are no query params available for parsing.\");const{state:i,code:o,error:n,error_description:a}=(e=>{e.indexOf(\"#\")>-1&&(e=e.substring(0,e.indexOf(\"#\")));const t=new URLSearchParams(e);return{state:t.get(\"state\"),code:t.get(\"code\")||void 0,error:t.get(\"error\")||void 0,error_description:t.get(\"error_description\")||void 0}})(t.join(\"\")),r=this.transactionManager.get();if(!r)throw new d(\"missing_transaction\",\"Invalid state\");if(this.transactionManager.remove(),n)throw new u(n,a||n,i,r.appState);if(!r.code_verifier||r.state&&r.state!==i)throw new d(\"state_mismatch\",\"Invalid state\");const s=r.organization,c=r.nonce,l=r.redirect_uri;return await this._requestToken(Object.assign({audience:r.audience,scope:r.scope,code_verifier:r.code_verifier,grant_type:\"authorization_code\",code:o},l?{redirect_uri:l}:{}),{nonceIn:c,organization:s}),{appState:r.appState}}async checkSession(e){if(!this.cookieStorage.get(this.isAuthenticatedCookieName)){if(!this.cookieStorage.get(\"auth0.is.authenticated\"))return;this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove(\"auth0.is.authenticated\")}try{await this.getTokenSilently(e)}catch(e){}}async getTokenSilently(e={}){var t;const i=Object.assign(Object.assign({cacheMode:\"on\"},e),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),e.authorizationParams),{scope:j(this.scope,null===(t=e.authorizationParams)||void 0===t?void 0:t.scope)})}),o=await((e,t)=>{let i=A[t];return i||(i=e().finally((()=>{delete A[t],i=null})),A[t]=i),i})((()=>this._getTokenSilently(i)),`${this.options.clientId}::${i.authorizationParams.audience}::${i.authorizationParams.scope}`);return e.detailedResponse?o:null==o?void 0:o.access_token}async _getTokenSilently(t){const{cacheMode:i}=t,o=e(t,[\"cacheMode\"]);if(\"off\"!==i){const e=await this._getEntryFromCache({scope:o.authorizationParams.scope,audience:o.authorizationParams.audience||\"default\",clientId:this.options.clientId});if(e)return e}if(\"cache-only\"!==i){if(!await(async(e,t=3)=>{for(let i=0;iee.acquireLock(\"auth0.lock.getTokenSilently\",5e3)),10))throw new l;try{if(window.addEventListener(\"pagehide\",this._releaseLockOnPageHide),\"off\"!==i){const e=await this._getEntryFromCache({scope:o.authorizationParams.scope,audience:o.authorizationParams.audience||\"default\",clientId:this.options.clientId});if(e)return e}const e=this.options.useRefreshTokens?await this._getTokenUsingRefreshToken(o):await this._getTokenFromIFrame(o),{id_token:t,access_token:n,oauthTokenScope:a,expires_in:r}=e;return Object.assign(Object.assign({id_token:t,access_token:n},a?{scope:a}:null),{expires_in:r})}finally{await ee.releaseLock(\"auth0.lock.getTokenSilently\"),window.removeEventListener(\"pagehide\",this._releaseLockOnPageHide)}}}async getTokenWithPopup(e={},t={}){var i;const o=Object.assign(Object.assign({},e),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),e.authorizationParams),{scope:j(this.scope,null===(i=e.authorizationParams)||void 0===i?void 0:i.scope)})});t=Object.assign(Object.assign({},r),t),await this.loginWithPopup(o,t);return(await this.cacheManager.get(new C({scope:o.authorizationParams.scope,audience:o.authorizationParams.audience||\"default\",clientId:this.options.clientId}))).access_token}async isAuthenticated(){return!!await this.getUser()}_buildLogoutUrl(t){null!==t.clientId?t.clientId=t.clientId||this.options.clientId:delete t.clientId;const i=t.logoutParams||{},{federated:o}=i,n=e(i,[\"federated\"]),a=o?\"&federated\":\"\";return this._url(`/v2/logout?${v(Object.assign({clientId:t.clientId},n))}`)+a}async logout(t={}){const i=Q(t),{openUrl:o}=i,n=e(i,[\"openUrl\"]);null===t.clientId?await this.cacheManager.clear():await this.cacheManager.clear(t.clientId||this.options.clientId),this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove(this.isAuthenticatedCookieName,{cookieDomain:this.options.cookieDomain}),this.userCache.remove(\"@@user@@\");const a=this._buildLogoutUrl(n);o?await o(a):!1!==o&&window.location.assign(a)}async _getTokenFromIFrame(e){const t=Object.assign(Object.assign({},e.authorizationParams),{prompt:\"none\"}),i=this.cookieStorage.get(this.orgHintCookieName);i&&!t.organization&&(t.organization=i);const{url:o,state:n,nonce:a,code_verifier:r,redirect_uri:s,scope:c,audience:u}=await this._prepareAuthorizeUrl(t,{response_mode:\"web_message\"},window.location.origin);try{if(window.crossOriginIsolated)throw new d(\"login_required\",\"The application is running in a Cross-Origin Isolated context, silently retrieving a token without refresh token is not possible.\");const i=e.timeoutInSeconds||this.options.authorizeTimeoutInSeconds,h=await((e,t,i=60)=>new Promise(((o,n)=>{const a=window.document.createElement(\"iframe\");a.setAttribute(\"width\",\"0\"),a.setAttribute(\"height\",\"0\"),a.style.display=\"none\";const r=()=>{window.document.body.contains(a)&&(window.document.body.removeChild(a),window.removeEventListener(\"message\",s,!1))};let s;const c=setTimeout((()=>{n(new l),r()}),1e3*i);s=function(e){if(e.origin!=t)return;if(!e.data||\"authorization_response\"!==e.data.type)return;const i=e.source;i&&i.close(),e.data.response.error?n(d.fromPayload(e.data.response)):o(e.data.response),clearTimeout(c),window.removeEventListener(\"message\",s,!1),setTimeout(r,2e3)},window.addEventListener(\"message\",s,!1),window.document.body.appendChild(a),a.setAttribute(\"src\",e)})))(o,this.domainUrl,i);if(n!==h.state)throw new d(\"state_mismatch\",\"Invalid state\");const p=await this._requestToken(Object.assign(Object.assign({},e.authorizationParams),{code_verifier:r,code:h.code,grant_type:\"authorization_code\",redirect_uri:s,timeout:e.authorizationParams.timeout||this.httpTimeoutMs}),{nonceIn:a,organization:t.organization});return Object.assign(Object.assign({},p),{scope:c,oauthTokenScope:p.scope,audience:u})}catch(e){throw\"login_required\"===e.error&&this.logout({openUrl:!1}),e}}async _getTokenUsingRefreshToken(e){const t=await this.cacheManager.get(new C({scope:e.authorizationParams.scope,audience:e.authorizationParams.audience||\"default\",clientId:this.options.clientId}));if(!(t&&t.refresh_token||this.worker)){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);throw new f(e.authorizationParams.audience||\"default\",e.authorizationParams.scope)}const i=e.authorizationParams.redirect_uri||this.options.authorizationParams.redirect_uri||window.location.origin,o=\"number\"==typeof e.timeoutInSeconds?1e3*e.timeoutInSeconds:null;try{const n=await this._requestToken(Object.assign(Object.assign(Object.assign({},e.authorizationParams),{grant_type:\"refresh_token\",refresh_token:t&&t.refresh_token,redirect_uri:i}),o&&{timeout:o}));return Object.assign(Object.assign({},n),{scope:e.authorizationParams.scope,oauthTokenScope:n.scope,audience:e.authorizationParams.audience||\"default\"})}catch(t){if((t.message.indexOf(\"Missing Refresh Token\")>-1||t.message&&t.message.indexOf(\"invalid refresh token\")>-1)&&this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);throw t}}async _saveEntryInCache(t){const{id_token:i,decodedToken:o}=t,n=e(t,[\"id_token\",\"decodedToken\"]);this.userCache.set(\"@@user@@\",{id_token:i,decodedToken:o}),await this.cacheManager.setIdToken(this.options.clientId,t.id_token,t.decodedToken),await this.cacheManager.set(n)}async _getIdTokenFromCache(){const e=this.options.authorizationParams.audience||\"default\",t=await this.cacheManager.getIdToken(new C({clientId:this.options.clientId,audience:e,scope:this.scope})),i=this.userCache.get(\"@@user@@\");return t&&t.id_token===(null==i?void 0:i.id_token)?i:(this.userCache.set(\"@@user@@\",t),t)}async _getEntryFromCache({scope:e,audience:t,clientId:i}){const o=await this.cacheManager.get(new C({scope:e,audience:t,clientId:i}),60);if(o&&o.access_token){const{access_token:e,oauthTokenScope:t,expires_in:i}=o,n=await this._getIdTokenFromCache();return n&&Object.assign(Object.assign({id_token:n.id_token,access_token:e},t?{scope:t}:null),{expires_in:i})}}async _requestToken(e,t){const{nonceIn:i,organization:o}=t||{},n=await T(Object.assign({baseUrl:this.domainUrl,client_id:this.options.clientId,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs},e),this.worker),a=await this._verifyIdToken(n.id_token,i,o);return await this._saveEntryInCache(Object.assign(Object.assign(Object.assign(Object.assign({},n),{decodedToken:a,scope:e.scope,audience:e.audience||\"default\"}),n.scope?{oauthTokenScope:n.scope}:null),{client_id:this.options.clientId})),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgHint(o||a.claims.org_id),Object.assign(Object.assign({},n),{decodedToken:a})}}class ie{}async function oe(e){const t=new te(e);return await t.checkSession(),t}export{te as Auth0Client,u as AuthenticationError,C as CacheKey,d as GenericError,P as InMemoryCache,z as LocalStorageCache,m as MfaRequiredError,f as MissingRefreshTokenError,p as PopupCancelledError,h as PopupTimeoutError,l as TimeoutError,ie as User,oe as createAuth0Client};\n","import * as i0 from '@angular/core';\nimport { VERSION, InjectionToken, Injectable, Optional, Inject, NgModule, inject } from '@angular/core';\nimport { BehaviorSubject, Subject, ReplaySubject, merge, defer, of, iif, from, throwError } from 'rxjs';\nimport { scan, filter, distinctUntilChanged, switchMap, mergeMap, shareReplay, concatMap, catchError, tap, takeUntil, withLatestFrom, map, take, first, mapTo, pluck } from 'rxjs/operators';\nimport * as i4 from '@auth0/auth0-spa-js';\nimport { Auth0Client } from '@auth0/auth0-spa-js';\nexport { AuthenticationError, GenericError, InMemoryCache, LocalStorageCache, MfaRequiredError, MissingRefreshTokenError, PopupCancelledError, PopupTimeoutError, TimeoutError, User } from '@auth0/auth0-spa-js';\nimport { Router } from '@angular/router';\nimport * as i1 from '@angular/common';\n\nvar useragent = { name: '@auth0/auth0-angular', version: '2.2.3' };\n\nclass Auth0ClientFactory {\n static createClient(configFactory) {\n const config = configFactory.get();\n if (!config) {\n throw new Error('Configuration must be specified either through AuthModule.forRoot or through AuthClientConfig.set');\n }\n return new Auth0Client({\n ...config,\n auth0Client: {\n name: useragent.name,\n version: useragent.version,\n env: {\n 'angular/core': VERSION.full,\n },\n },\n });\n }\n}\nconst Auth0ClientService = new InjectionToken('auth0.client');\n\n/**\n * A custom type guard to help identify route definitions that are actually HttpInterceptorRouteConfig types.\n *\n * @param def The route definition type\n */\nfunction isHttpInterceptorRouteConfig(def) {\n return typeof def !== 'string';\n}\n/**\n * Injection token for accessing configuration.\n *\n * @usageNotes\n *\n * Use the `Inject` decorator to access the configuration from a service or component:\n *\n * ```\n * class MyService(@Inject(AuthConfigService) config: AuthConfig) {}\n * ```\n */\nconst AuthConfigService = new InjectionToken('auth0-angular.config');\n/**\n * Gets and sets configuration for the internal Auth0 client. This can be\n * used to provide configuration outside of using AuthModule.forRoot, i.e. from\n * a factory provided by APP_INITIALIZER.\n *\n * @usage\n *\n * ```js\n * // app.module.ts\n * // ---------------------------\n * import { AuthModule, AuthClientConfig } from '@auth0/auth0-angular';\n *\n * // Provide an initializer function that returns a Promise\n * function configInitializer(\n * http: HttpClient,\n * config: AuthClientConfig\n * ) {\n * return () =>\n * http\n * .get('/config')\n * .toPromise()\n * .then((loadedConfig: any) => config.set(loadedConfig)); // Set the config that was loaded asynchronously here\n * }\n *\n * // Provide APP_INITIALIZER with this function. Note that there is no config passed to AuthModule.forRoot\n * imports: [\n * // other imports..\n *\n * HttpClientModule,\n * AuthModule.forRoot(), //<- don't pass any config here\n * ],\n * providers: [\n * {\n * provide: APP_INITIALIZER,\n * useFactory: configInitializer, // <- pass your initializer function here\n * deps: [HttpClient, AuthClientConfig],\n * multi: true,\n * },\n * ],\n * ```\n *\n */\nclass AuthClientConfig {\n constructor(config) {\n if (config) {\n this.set(config);\n }\n }\n /**\n * Sets configuration to be read by other consumers of the service (see usage notes)\n *\n * @param config The configuration to set\n */\n set(config) {\n this.config = config;\n }\n /**\n * Gets the config that has been set by other consumers of the service\n */\n get() {\n return this.config;\n }\n}\nAuthClientConfig.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.4.0\", ngImport: i0, type: AuthClientConfig, deps: [{ token: AuthConfigService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\nAuthClientConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"13.4.0\", ngImport: i0, type: AuthClientConfig, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.4.0\", ngImport: i0, type: AuthClientConfig, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [AuthConfigService]\n }] }]; } });\n\nclass AbstractNavigator {\n constructor(location, injector) {\n this.location = location;\n try {\n this.router = injector.get(Router);\n }\n catch { }\n }\n /**\n * Navigates to the specified url. The router will be used if one is available, otherwise it falls back\n * to `window.history.replaceState`.\n *\n * @param url The url to navigate to\n */\n navigateByUrl(url) {\n if (this.router) {\n this.router.navigateByUrl(url);\n return;\n }\n this.location.replaceState(url);\n }\n}\nAbstractNavigator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.4.0\", ngImport: i0, type: AbstractNavigator, deps: [{ token: i1.Location }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });\nAbstractNavigator.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"13.4.0\", ngImport: i0, type: AbstractNavigator, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.4.0\", ngImport: i0, type: AbstractNavigator, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root',\n }]\n }], ctorParameters: function () { return [{ type: i1.Location }, { type: i0.Injector }]; } });\n\n/**\n * Tracks the Authentication State for the SDK\n */\nclass AuthState {\n constructor(auth0Client) {\n this.auth0Client = auth0Client;\n this.isLoadingSubject$ = new BehaviorSubject(true);\n this.refresh$ = new Subject();\n this.accessToken$ = new ReplaySubject(1);\n this.errorSubject$ = new ReplaySubject(1);\n /**\n * Emits boolean values indicating the loading state of the SDK.\n */\n this.isLoading$ = this.isLoadingSubject$.asObservable();\n /**\n * Trigger used to pull User information from the Auth0Client.\n * Triggers when the access token has changed.\n */\n this.accessTokenTrigger$ = this.accessToken$.pipe(scan((acc, current) => ({\n previous: acc.current,\n current,\n }), { current: null, previous: null }), filter(({ previous, current }) => previous !== current));\n /**\n * Trigger used to pull User information from the Auth0Client.\n * Triggers when an event occurs that needs to retrigger the User Profile information.\n * Events: Login, Access Token change and Logout\n */\n this.isAuthenticatedTrigger$ = this.isLoading$.pipe(filter((loading) => !loading), distinctUntilChanged(), switchMap(() => \n // To track the value of isAuthenticated over time, we need to merge:\n // - the current value\n // - the value whenever the access token changes. (this should always be true of there is an access token\n // but it is safer to pass this through this.auth0Client.isAuthenticated() nevertheless)\n // - the value whenever refreshState$ emits\n merge(defer(() => this.auth0Client.isAuthenticated()), this.accessTokenTrigger$.pipe(mergeMap(() => this.auth0Client.isAuthenticated())), this.refresh$.pipe(mergeMap(() => this.auth0Client.isAuthenticated())))));\n /**\n * Emits boolean values indicating the authentication state of the user. If `true`, it means a user has authenticated.\n * This depends on the value of `isLoading$`, so there is no need to manually check the loading state of the SDK.\n */\n this.isAuthenticated$ = this.isAuthenticatedTrigger$.pipe(distinctUntilChanged(), shareReplay(1));\n /**\n * Emits details about the authenticated user, or null if not authenticated.\n */\n this.user$ = this.isAuthenticatedTrigger$.pipe(concatMap((authenticated) => authenticated ? this.auth0Client.getUser() : of(null)), distinctUntilChanged());\n /**\n * Emits ID token claims when authenticated, or null if not authenticated.\n */\n this.idTokenClaims$ = this.isAuthenticatedTrigger$.pipe(concatMap((authenticated) => authenticated ? this.auth0Client.getIdTokenClaims() : of(null)));\n /**\n * Emits errors that occur during login, or when checking for an active session on startup.\n */\n this.error$ = this.errorSubject$.asObservable();\n }\n /**\n * Update the isLoading state using the provided value\n *\n * @param isLoading The new value for isLoading\n */\n setIsLoading(isLoading) {\n this.isLoadingSubject$.next(isLoading);\n }\n /**\n * Refresh the state to ensure the `isAuthenticated`, `user$` and `idTokenClaims$`\n * reflect the most up-to-date values from Auth0Client.\n */\n refresh() {\n this.refresh$.next();\n }\n /**\n * Update the access token, doing so will also refresh the state.\n *\n * @param accessToken The new Access Token\n */\n setAccessToken(accessToken) {\n this.accessToken$.next(accessToken);\n }\n /**\n * Emits the error in the `error$` observable.\n *\n * @param error The new error\n */\n setError(error) {\n this.errorSubject$.next(error);\n }\n}\nAuthState.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.4.0\", ngImport: i0, type: AuthState, deps: [{ token: Auth0ClientService }], target: i0.ɵɵFactoryTarget.Injectable });\nAuthState.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"13.4.0\", ngImport: i0, type: AuthState, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.4.0\", ngImport: i0, type: AuthState, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: i4.Auth0Client, decorators: [{\n type: Inject,\n args: [Auth0ClientService]\n }] }]; } });\n\nclass AuthService {\n constructor(auth0Client, configFactory, navigator, authState) {\n this.auth0Client = auth0Client;\n this.configFactory = configFactory;\n this.navigator = navigator;\n this.authState = authState;\n this.appStateSubject$ = new ReplaySubject(1);\n // https://stackoverflow.com/a/41177163\n this.ngUnsubscribe$ = new Subject();\n /**\n * Emits boolean values indicating the loading state of the SDK.\n */\n this.isLoading$ = this.authState.isLoading$;\n /**\n * Emits boolean values indicating the authentication state of the user. If `true`, it means a user has authenticated.\n * This depends on the value of `isLoading$`, so there is no need to manually check the loading state of the SDK.\n */\n this.isAuthenticated$ = this.authState.isAuthenticated$;\n /**\n * Emits details about the authenticated user, or null if not authenticated.\n */\n this.user$ = this.authState.user$;\n /**\n * Emits ID token claims when authenticated, or null if not authenticated.\n */\n this.idTokenClaims$ = this.authState.idTokenClaims$;\n /**\n * Emits errors that occur during login, or when checking for an active session on startup.\n */\n this.error$ = this.authState.error$;\n /**\n * Emits the value (if any) that was passed to the `loginWithRedirect` method call\n * but only **after** `handleRedirectCallback` is first called\n */\n this.appState$ = this.appStateSubject$.asObservable();\n const checkSessionOrCallback$ = (isCallback) => iif(() => isCallback, this.handleRedirectCallback(), defer(() => this.auth0Client.checkSession()));\n this.shouldHandleCallback()\n .pipe(switchMap((isCallback) => checkSessionOrCallback$(isCallback).pipe(catchError((error) => {\n const config = this.configFactory.get();\n this.navigator.navigateByUrl(config.errorPath || '/');\n this.authState.setError(error);\n return of(undefined);\n }))), tap(() => {\n this.authState.setIsLoading(false);\n }), takeUntil(this.ngUnsubscribe$))\n .subscribe();\n }\n /**\n * Called when the service is destroyed\n */\n ngOnDestroy() {\n // https://stackoverflow.com/a/41177163\n this.ngUnsubscribe$.next();\n this.ngUnsubscribe$.complete();\n }\n /**\n * ```js\n * loginWithRedirect(options);\n * ```\n *\n * Performs a redirect to `/authorize` using the parameters\n * provided as arguments. Random and secure `state` and `nonce`\n * parameters will be auto-generated.\n *\n * @param options The login options\n */\n loginWithRedirect(options) {\n return from(this.auth0Client.loginWithRedirect(options));\n }\n /**\n * ```js\n * await loginWithPopup(options);\n * ```\n *\n * Opens a popup with the `/authorize` URL using the parameters\n * provided as arguments. Random and secure `state` and `nonce`\n * parameters will be auto-generated. If the response is successful,\n * results will be valid according to their expiration times.\n *\n * IMPORTANT: This method has to be called from an event handler\n * that was started by the user like a button click, for example,\n * otherwise the popup will be blocked in most browsers.\n *\n * @param options The login options\n * @param config Configuration for the popup window\n */\n loginWithPopup(options, config) {\n return from(this.auth0Client.loginWithPopup(options, config).then(() => {\n this.authState.refresh();\n }));\n }\n /**\n * ```js\n * logout();\n * ```\n *\n * Clears the application session and performs a redirect to `/v2/logout`, using\n * the parameters provided as arguments, to clear the Auth0 session.\n * If the `federated` option is specified it also clears the Identity Provider session.\n * If the `openUrl` option is set to false, it only clears the application session.\n * It is invalid to set both the `federated` to true and `openUrl` to `false`,\n * and an error will be thrown if you do.\n * [Read more about how Logout works at Auth0](https://auth0.com/docs/logout).\n *\n * @param options The logout options\n */\n logout(options) {\n return from(this.auth0Client.logout(options).then(() => {\n if (options?.openUrl === false || options?.openUrl) {\n this.authState.refresh();\n }\n }));\n }\n /**\n * ```js\n * getAccessTokenSilently(options).subscribe(token => ...)\n * ```\n *\n * If there's a valid token stored, return it. Otherwise, opens an\n * iframe with the `/authorize` URL using the parameters provided\n * as arguments. Random and secure `state` and `nonce` parameters\n * will be auto-generated. If the response is successful, results\n * will be valid according to their expiration times.\n *\n * If refresh tokens are used, the token endpoint is called directly with the\n * 'refresh_token' grant. If no refresh token is available to make this call,\n * the SDK falls back to using an iframe to the '/authorize' URL.\n *\n * This method may use a web worker to perform the token call if the in-memory\n * cache is used.\n *\n * If an `audience` value is given to this function, the SDK always falls\n * back to using an iframe to make the token exchange.\n *\n * Note that in all cases, falling back to an iframe requires access to\n * the `auth0` cookie, and thus will not work in browsers that block third-party\n * cookies by default (Safari, Brave, etc).\n *\n * @param options The options for configuring the token fetch.\n */\n getAccessTokenSilently(options = {}) {\n return of(this.auth0Client).pipe(concatMap((client) => options.detailedResponse === true\n ? client.getTokenSilently({ ...options, detailedResponse: true })\n : client.getTokenSilently(options)), tap((token) => {\n if (token) {\n this.authState.setAccessToken(typeof token === 'string' ? token : token.access_token);\n }\n }), catchError((error) => {\n this.authState.setError(error);\n this.authState.refresh();\n return throwError(error);\n }));\n }\n /**\n * ```js\n * getTokenWithPopup(options).subscribe(token => ...)\n * ```\n *\n * Get an access token interactively.\n *\n * Opens a popup with the `/authorize` URL using the parameters\n * provided as arguments. Random and secure `state` and `nonce`\n * parameters will be auto-generated. If the response is successful,\n * results will be valid according to their expiration times.\n */\n getAccessTokenWithPopup(options) {\n return of(this.auth0Client).pipe(concatMap((client) => client.getTokenWithPopup(options)), tap((token) => {\n if (token) {\n this.authState.setAccessToken(token);\n }\n }), catchError((error) => {\n this.authState.setError(error);\n this.authState.refresh();\n return throwError(error);\n }));\n }\n /**\n * ```js\n * handleRedirectCallback(url).subscribe(result => ...)\n * ```\n *\n * After the browser redirects back to the callback page,\n * call `handleRedirectCallback` to handle success and error\n * responses from Auth0. If the response is successful, results\n * will be valid according to their expiration times.\n *\n * Calling this method also refreshes the authentication and user states.\n *\n * @param url The URL to that should be used to retrieve the `state` and `code` values. Defaults to `window.location.href` if not given.\n */\n handleRedirectCallback(url) {\n return defer(() => this.auth0Client.handleRedirectCallback(url)).pipe(withLatestFrom(this.authState.isLoading$), tap(([result, isLoading]) => {\n if (!isLoading) {\n this.authState.refresh();\n }\n const appState = result?.appState;\n const target = appState?.target ?? '/';\n if (appState) {\n this.appStateSubject$.next(appState);\n }\n this.navigator.navigateByUrl(target);\n }), map(([result]) => result));\n }\n shouldHandleCallback() {\n return of(location.search).pipe(map((search) => {\n const searchParams = new URLSearchParams(search);\n return ((searchParams.has('code') || searchParams.has('error')) &&\n searchParams.has('state') &&\n !this.configFactory.get().skipRedirectCallback);\n }));\n }\n}\nAuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.4.0\", ngImport: i0, type: AuthService, deps: [{ token: Auth0ClientService }, { token: AuthClientConfig }, { token: AbstractNavigator }, { token: AuthState }], target: i0.ɵɵFactoryTarget.Injectable });\nAuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"13.4.0\", ngImport: i0, type: AuthService, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.4.0\", ngImport: i0, type: AuthService, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root',\n }]\n }], ctorParameters: function () { return [{ type: i4.Auth0Client, decorators: [{\n type: Inject,\n args: [Auth0ClientService]\n }] }, { type: AuthClientConfig }, { type: AbstractNavigator }, { type: AuthState }]; } });\n\nclass AuthGuard {\n constructor(auth) {\n this.auth = auth;\n }\n canLoad(route, segments) {\n return this.auth.isAuthenticated$.pipe(take(1));\n }\n canActivate(next, state) {\n return this.redirectIfUnauthenticated(state);\n }\n canActivateChild(childRoute, state) {\n return this.redirectIfUnauthenticated(state);\n }\n redirectIfUnauthenticated(state) {\n return this.auth.isAuthenticated$.pipe(tap((loggedIn) => {\n if (!loggedIn) {\n this.auth.loginWithRedirect({\n appState: { target: state.url },\n });\n }\n }));\n }\n}\nAuthGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.4.0\", ngImport: i0, type: AuthGuard, deps: [{ token: AuthService }], target: i0.ɵɵFactoryTarget.Injectable });\nAuthGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"13.4.0\", ngImport: i0, type: AuthGuard, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.4.0\", ngImport: i0, type: AuthGuard, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root',\n }]\n }], ctorParameters: function () { return [{ type: AuthService }]; } });\n\nclass AuthModule {\n /**\n * Initialize the authentication module system. Configuration can either be specified here,\n * or by calling AuthClientConfig.set (perhaps from an APP_INITIALIZER factory function).\n *\n * @param config The optional configuration for the SDK.\n */\n static forRoot(config) {\n return {\n ngModule: AuthModule,\n providers: [\n AuthService,\n AuthGuard,\n {\n provide: AuthConfigService,\n useValue: config,\n },\n {\n provide: Auth0ClientService,\n useFactory: Auth0ClientFactory.createClient,\n deps: [AuthClientConfig],\n },\n ],\n };\n }\n}\nAuthModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.4.0\", ngImport: i0, type: AuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nAuthModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"12.0.0\", version: \"13.4.0\", ngImport: i0, type: AuthModule });\nAuthModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"13.4.0\", ngImport: i0, type: AuthModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.4.0\", ngImport: i0, type: AuthModule, decorators: [{\n type: NgModule\n }] });\n\nconst waitUntil = (signal$) => (source$) => source$.pipe(mergeMap((value) => signal$.pipe(first(), mapTo(value))));\nclass AuthHttpInterceptor {\n constructor(configFactory, auth0Client, authState, authService) {\n this.configFactory = configFactory;\n this.auth0Client = auth0Client;\n this.authState = authState;\n this.authService = authService;\n }\n intercept(req, next) {\n const config = this.configFactory.get();\n if (!config.httpInterceptor?.allowedList) {\n return next.handle(req);\n }\n const isLoaded$ = this.authService.isLoading$.pipe(filter((isLoading) => !isLoading));\n return this.findMatchingRoute(req, config.httpInterceptor).pipe(concatMap((route) => iif(\n // Check if a route was matched\n () => route !== null, \n // If we have a matching route, call getTokenSilently and attach the token to the\n // outgoing request\n of(route).pipe(waitUntil(isLoaded$), pluck('tokenOptions'), concatMap((options) => this.getAccessTokenSilently(options).pipe(catchError((err) => {\n if (this.allowAnonymous(route, err)) {\n return of('');\n }\n this.authState.setError(err);\n return throwError(err);\n }))), switchMap((token) => {\n // Clone the request and attach the bearer token\n const clone = token\n ? req.clone({\n headers: req.headers.set('Authorization', `Bearer ${token}`),\n })\n : req;\n return next.handle(clone);\n })), \n // If the URI being called was not found in our httpInterceptor config, simply\n // pass the request through without attaching a token\n next.handle(req))));\n }\n /**\n * Duplicate of AuthService.getAccessTokenSilently, but with a slightly different error handling.\n * Only used internally in the interceptor.\n *\n * @param options The options for configuring the token fetch.\n */\n getAccessTokenSilently(options) {\n return of(this.auth0Client).pipe(concatMap((client) => client.getTokenSilently(options)), tap((token) => this.authState.setAccessToken(token)), catchError((error) => {\n this.authState.refresh();\n return throwError(error);\n }));\n }\n /**\n * Strips the query and fragment from the given uri\n *\n * @param uri The uri to remove the query and fragment from\n */\n stripQueryFrom(uri) {\n if (uri.indexOf('?') > -1) {\n uri = uri.substr(0, uri.indexOf('?'));\n }\n if (uri.indexOf('#') > -1) {\n uri = uri.substr(0, uri.indexOf('#'));\n }\n return uri;\n }\n /**\n * Determines whether the specified route can have an access token attached to it, based on matching the HTTP request against\n * the interceptor route configuration.\n *\n * @param route The route to test\n * @param request The HTTP request\n */\n canAttachToken(route, request) {\n const testPrimitive = (value) => {\n if (!value) {\n return false;\n }\n const requestPath = this.stripQueryFrom(request.url);\n if (value === requestPath) {\n return true;\n }\n // If the URL ends with an asterisk, match using startsWith.\n return (value.indexOf('*') === value.length - 1 &&\n request.url.startsWith(value.substr(0, value.length - 1)));\n };\n if (isHttpInterceptorRouteConfig(route)) {\n if (route.httpMethod && route.httpMethod !== request.method) {\n return false;\n }\n /* istanbul ignore if */\n if (!route.uri && !route.uriMatcher) {\n console.warn('Either a uri or uriMatcher is required when configuring the HTTP interceptor.');\n }\n return route.uriMatcher\n ? route.uriMatcher(request.url)\n : testPrimitive(route.uri);\n }\n return testPrimitive(route);\n }\n /**\n * Tries to match a route from the SDK configuration to the HTTP request.\n * If a match is found, the route configuration is returned.\n *\n * @param request The Http request\n * @param config HttpInterceptorConfig\n */\n findMatchingRoute(request, config) {\n return from(config.allowedList).pipe(first((route) => this.canAttachToken(route, request), null));\n }\n allowAnonymous(route, err) {\n return (!!route &&\n isHttpInterceptorRouteConfig(route) &&\n !!route.allowAnonymous &&\n ['login_required', 'consent_required', 'missing_refresh_token'].includes(err.error));\n }\n}\nAuthHttpInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.4.0\", ngImport: i0, type: AuthHttpInterceptor, deps: [{ token: AuthClientConfig }, { token: Auth0ClientService }, { token: AuthState }, { token: AuthService }], target: i0.ɵɵFactoryTarget.Injectable });\nAuthHttpInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"13.4.0\", ngImport: i0, type: AuthHttpInterceptor });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.4.0\", ngImport: i0, type: AuthHttpInterceptor, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: AuthClientConfig }, { type: i4.Auth0Client, decorators: [{\n type: Inject,\n args: [Auth0ClientService]\n }] }, { type: AuthState }, { type: AuthService }]; } });\n\n/**\n * Initialize the authentication system. Configuration can either be specified here,\n * or by calling AuthClientConfig.set (perhaps from an APP_INITIALIZER factory function).\n *\n * Note: Should only be used as of Angular 15, and should not be added to a component's providers.\n *\n * @param config The optional configuration for the SDK.\n *\n * @example\n * bootstrapApplication(AppComponent, {\n * providers: [\n * provideAuth0(),\n * ],\n * });\n */\nfunction provideAuth0(config) {\n return [\n AuthService,\n AuthHttpInterceptor,\n AuthGuard,\n {\n provide: AuthConfigService,\n useValue: config,\n },\n {\n provide: Auth0ClientService,\n useFactory: Auth0ClientFactory.createClient,\n deps: [AuthClientConfig],\n },\n ];\n}\n\n/**\n * Functional AuthGuard to ensure routes can only be accessed when authenticated.\n *\n * Note: Should only be used as of Angular 15\n *\n * @param route Contains the information about a route associated with a component loaded in an outlet at a particular moment in time.\n * @param state Represents the state of the router at a moment in time.\n * @returns An Observable, indicating if the route can be accessed or not\n */\nconst authGuardFn = (route, state) => inject(AuthGuard).canActivate(route, state);\n/**\n * Functional AuthHttpInterceptor to include the access token in matching requests.\n *\n * Note: Should only be used as of Angular 15\n *\n * @param req An outgoing HTTP request with an optional typed body.\n * @param handle Represents the next interceptor in an interceptor chain, or the real backend if there are no\n * further interceptors.\n * @returns An Observable representing the intercepted HttpRequest\n */\nconst authHttpInterceptorFn = (req, handle) => inject(AuthHttpInterceptor).intercept(req, { handle });\n\n/*\n * Public API Surface of auth0-angular\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AbstractNavigator, Auth0ClientFactory, Auth0ClientService, AuthClientConfig, AuthConfigService, AuthGuard, AuthHttpInterceptor, AuthModule, AuthService, AuthState, authGuardFn, authHttpInterceptorFn, isHttpInterceptorRouteConfig, provideAuth0 };\n","import { defer } from './defer';\nexport function iif(condition, trueResult, falseResult) {\n return defer(() => (condition() ? trueResult : falseResult));\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { identity } from '../util/identity';\nimport { noop } from '../util/noop';\nimport { popResultSelector } from '../util/args';\nexport function withLatestFrom(...inputs) {\n const project = popResultSelector(inputs);\n return operate((source, subscriber) => {\n const len = inputs.length;\n const otherValues = new Array(len);\n let hasValue = inputs.map(() => false);\n let ready = false;\n for (let i = 0; i < len; i++) {\n innerFrom(inputs[i]).subscribe(createOperatorSubscriber(subscriber, (value) => {\n otherValues[i] = value;\n if (!ready && !hasValue[i]) {\n hasValue[i] = true;\n (ready = hasValue.every(identity)) && (hasValue = null);\n }\n }, noop));\n }\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n if (ready) {\n const values = [value, ...otherValues];\n subscriber.next(project ? project(...values) : values);\n }\n }));\n });\n}\n","import './utils-hoist/debug-build.js';\nimport './utils-hoist/logger.js';\nimport { dropUndefinedKeys } from './utils-hoist/object.js';\nimport { timestampInSeconds } from './utils-hoist/time.js';\nimport { uuid4 } from './utils-hoist/misc.js';\nimport './utils-hoist/syncpromise.js';\n\n/**\n * Creates a new `Session` object by setting certain default parameters. If optional @param context\n * is passed, the passed properties are applied to the session object.\n *\n * @param context (optional) additional properties to be applied to the returned session object\n *\n * @returns a new `Session` object\n */\nfunction makeSession(context) {\n // Both timestamp and started are in seconds since the UNIX epoch.\n const startingTime = timestampInSeconds();\n\n const session = {\n sid: uuid4(),\n init: true,\n timestamp: startingTime,\n started: startingTime,\n duration: 0,\n status: 'ok',\n errors: 0,\n ignoreDuration: false,\n toJSON: () => sessionToJSON(session),\n };\n\n if (context) {\n updateSession(session, context);\n }\n\n return session;\n}\n\n/**\n * Updates a session object with the properties passed in the context.\n *\n * Note that this function mutates the passed object and returns void.\n * (Had to do this instead of returning a new and updated session because closing and sending a session\n * makes an update to the session after it was passed to the sending logic.\n * @see BaseClient.captureSession )\n *\n * @param session the `Session` to update\n * @param context the `SessionContext` holding the properties that should be updated in @param session\n */\n// eslint-disable-next-line complexity\nfunction updateSession(session, context = {}) {\n if (context.user) {\n if (!session.ipAddress && context.user.ip_address) {\n session.ipAddress = context.user.ip_address;\n }\n\n if (!session.did && !context.did) {\n session.did = context.user.id || context.user.email || context.user.username;\n }\n }\n\n session.timestamp = context.timestamp || timestampInSeconds();\n\n if (context.abnormal_mechanism) {\n session.abnormal_mechanism = context.abnormal_mechanism;\n }\n\n if (context.ignoreDuration) {\n session.ignoreDuration = context.ignoreDuration;\n }\n if (context.sid) {\n // Good enough uuid validation. — Kamil\n session.sid = context.sid.length === 32 ? context.sid : uuid4();\n }\n if (context.init !== undefined) {\n session.init = context.init;\n }\n if (!session.did && context.did) {\n session.did = `${context.did}`;\n }\n if (typeof context.started === 'number') {\n session.started = context.started;\n }\n if (session.ignoreDuration) {\n session.duration = undefined;\n } else if (typeof context.duration === 'number') {\n session.duration = context.duration;\n } else {\n const duration = session.timestamp - session.started;\n session.duration = duration >= 0 ? duration : 0;\n }\n if (context.release) {\n session.release = context.release;\n }\n if (context.environment) {\n session.environment = context.environment;\n }\n if (!session.ipAddress && context.ipAddress) {\n session.ipAddress = context.ipAddress;\n }\n if (!session.userAgent && context.userAgent) {\n session.userAgent = context.userAgent;\n }\n if (typeof context.errors === 'number') {\n session.errors = context.errors;\n }\n if (context.status) {\n session.status = context.status;\n }\n}\n\n/**\n * Closes a session by setting its status and updating the session object with it.\n * Internally calls `updateSession` to update the passed session object.\n *\n * Note that this function mutates the passed session (@see updateSession for explanation).\n *\n * @param session the `Session` object to be closed\n * @param status the `SessionStatus` with which the session was closed. If you don't pass a status,\n * this function will keep the previously set status, unless it was `'ok'` in which case\n * it is changed to `'exited'`.\n */\nfunction closeSession(session, status) {\n let context = {};\n if (status) {\n context = { status };\n } else if (session.status === 'ok') {\n context = { status: 'exited' };\n }\n\n updateSession(session, context);\n}\n\n/**\n * Serializes a passed session object to a JSON object with a slightly different structure.\n * This is necessary because the Sentry backend requires a slightly different schema of a session\n * than the one the JS SDKs use internally.\n *\n * @param session the session to be converted\n *\n * @returns a JSON object of the passed session\n */\nfunction sessionToJSON(session) {\n return dropUndefinedKeys({\n sid: `${session.sid}`,\n init: session.init,\n // Make sure that sec is converted to ms for date constructor\n started: new Date(session.started * 1000).toISOString(),\n timestamp: new Date(session.timestamp * 1000).toISOString(),\n status: session.status,\n errors: session.errors,\n did: typeof session.did === 'number' || typeof session.did === 'string' ? `${session.did}` : undefined,\n duration: session.duration,\n abnormal_mechanism: session.abnormal_mechanism,\n attrs: {\n release: session.release,\n environment: session.environment,\n ip_address: session.ipAddress,\n user_agent: session.userAgent,\n },\n });\n}\n\nexport { closeSession, makeSession, updateSession };\n","
\n
\n \n
\n
\n
{{label}}
\n
{{detail}}
\n
\n
\n \n
\n
","import { Component, EventEmitter, Input, OnInit, Output, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'bw-action-cell',\n templateUrl: './action-cell.component.html',\n styleUrls: ['./action-cell.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class ActionCellComponent implements OnInit {\n\n @Input() label: string;\n @Input() detail: string;\n\n @Input() emphasize = true;\n @Input() disabled = false;\n @Input() iconName: string;\n @Input() iconColor: string;\n @Input() leftIconName: string;\n @Input() leftIconColor: string;\n\n @Output() actionCellClick = new EventEmitter();\n\n constructor() { }\n\n ngOnInit(): void {\n }\n\n onActionCellClick() {\n if (!this.disabled) {\n this.actionCellClick.emit();\n }\n }\n\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n OnInit,\n OnDestroy,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { BsHubService } from '@brightside-web/desktop/data-access/core-services';\n\nimport { UiBaseDataMoleculeComponent, UiBaseDataMoleculeSchema } from '../../../shared/base-data/base-data-molecule.component';\n\nimport { UiNavigationExitType } from '../../navigation.enum';\nimport { UiNavigationExitData } from '../../navigation.interface';\n\n@Component({\n selector: 'ui-nav-exit-back',\n templateUrl: './exit-back.component.html',\n styleUrls: ['./exit-back.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class UiNavigationExitBackComponent\n extends UiBaseDataMoleculeComponent\n implements UiBaseDataMoleculeSchema, OnInit, OnDestroy\n{\n /**\n * Allow developer to pass in data with an object\n *\n * Interface UiFooterDefaultData\n */\n @Input() override data: UiNavigationExitData;\n\n /**\n * Allow developer to pass in data single fields at a time\n */\n @Input() infoLabel = 'BACK_WEB';\n @Input() trackingDetail: { event_name: string } = { event_name: 'missing_event_name_nav_exit' };\n @Input() type: UiNavigationExitType;\n\n /**\n * Please set this to true to skip emitting on exit action\n */\n @Input() skipActionEmit = false;\n\n @Output() exitActionHandler = new EventEmitter();\n\n exitTypeEnum = UiNavigationExitType;\n\n constructor(private bsHubService: BsHubService) {\n super();\n }\n\n ngOnInit(): void {\n this.schemaValidationConfig = {\n directInputValues: [this.infoLabel],\n };\n\n super.ngOnInit();\n }\n\n ngOnDestroy(): void {\n this.exitActionHandler.unsubscribe();\n }\n\n public override uiOnDirectInputsFromDataObject(): void {\n this.infoLabel = this.data?.inputs?.infoLabel || this.infoLabel || 'BACK_WEB';\n\n this.trackingDetail = this.data?.inputs?.trackingDetail ||\n this.trackingDetail || { event_name: 'missing_event_name_nav_exit' };\n this.type = this.data?.inputs?.type || this.type || UiNavigationExitType.NONE;\n }\n\n public exitActionTrigger() {\n /**\n * If we are NOT skipping emitting and we have observer, trigger .emit\n */\n if (!this.skipActionEmit && this.exitActionHandler.observers.length > 0) {\n this.exitActionHandler.emit();\n this.logForDebugging('Emit done on exit action instead of default');\n return;\n }\n\n this.bsHubService.dispatch('RoutingServiceChannel', { event: 'EXIT_PAGE', data: { fromBack: true } });\n }\n}\n","{{ infoLabel | translate }}\n","//! moment.js locale configuration\n//! locale : Serbian Cyrillic [sr-cyrl]\n//! author : Milan Janačković : https://github.com/milan-j\n//! author : Stefan Crnjaković : https://github.com/crnjakovic\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var translator = {\n words: {\n //Different grammatical cases\n ss: ['секунда', 'секунде', 'секунди'],\n m: ['један минут', 'једног минута'],\n mm: ['минут', 'минута', 'минута'],\n h: ['један сат', 'једног сата'],\n hh: ['сат', 'сата', 'сати'],\n d: ['један дан', 'једног дана'],\n dd: ['дан', 'дана', 'дана'],\n M: ['један месец', 'једног месеца'],\n MM: ['месец', 'месеца', 'месеци'],\n y: ['једну годину', 'једне године'],\n yy: ['годину', 'године', 'година'],\n },\n correctGrammaticalCase: function (number, wordKey) {\n if (\n number % 10 >= 1 &&\n number % 10 <= 4 &&\n (number % 100 < 10 || number % 100 >= 20)\n ) {\n return number % 10 === 1 ? wordKey[0] : wordKey[1];\n }\n return wordKey[2];\n },\n translate: function (number, withoutSuffix, key, isFuture) {\n var wordKey = translator.words[key],\n word;\n\n if (key.length === 1) {\n // Nominativ\n if (key === 'y' && withoutSuffix) return 'једна година';\n return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];\n }\n\n word = translator.correctGrammaticalCase(number, wordKey);\n // Nominativ\n if (key === 'yy' && withoutSuffix && word === 'годину') {\n return number + ' година';\n }\n\n return number + ' ' + word;\n },\n };\n\n var srCyrl = moment.defineLocale('sr-cyrl', {\n months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split(\n '_'\n ),\n monthsShort:\n 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split('_'),\n monthsParseExact: true,\n weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'),\n weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'),\n weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'D. M. YYYY.',\n LL: 'D. MMMM YYYY.',\n LLL: 'D. MMMM YYYY. H:mm',\n LLLL: 'dddd, D. MMMM YYYY. H:mm',\n },\n calendar: {\n sameDay: '[данас у] LT',\n nextDay: '[сутра у] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[у] [недељу] [у] LT';\n case 3:\n return '[у] [среду] [у] LT';\n case 6:\n return '[у] [суботу] [у] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[у] dddd [у] LT';\n }\n },\n lastDay: '[јуче у] LT',\n lastWeek: function () {\n var lastWeekDays = [\n '[прошле] [недеље] [у] LT',\n '[прошлог] [понедељка] [у] LT',\n '[прошлог] [уторка] [у] LT',\n '[прошле] [среде] [у] LT',\n '[прошлог] [четвртка] [у] LT',\n '[прошлог] [петка] [у] LT',\n '[прошле] [суботе] [у] LT',\n ];\n return lastWeekDays[this.day()];\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'за %s',\n past: 'пре %s',\n s: 'неколико секунди',\n ss: translator.translate,\n m: translator.translate,\n mm: translator.translate,\n h: translator.translate,\n hh: translator.translate,\n d: translator.translate,\n dd: translator.translate,\n M: translator.translate,\n MM: translator.translate,\n y: translator.translate,\n yy: translator.translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 1st is the first week of the year.\n },\n });\n\n return srCyrl;\n\n})));\n","import { DEBUG_BUILD } from './debug-build.js';\nimport { getGlobalSingleton, GLOBAL_OBJ } from './worldwide.js';\n\n/** Prefix for logging strings */\nconst PREFIX = 'Sentry Logger ';\n\nconst CONSOLE_LEVELS = [\n 'debug',\n 'info',\n 'warn',\n 'error',\n 'log',\n 'assert',\n 'trace',\n] ;\n\n/** This may be mutated by the console instrumentation. */\nconst originalConsoleMethods\n\n = {};\n\n/** JSDoc */\n\n/**\n * Temporarily disable sentry console instrumentations.\n *\n * @param callback The function to run against the original `console` messages\n * @returns The results of the callback\n */\nfunction consoleSandbox(callback) {\n if (!('console' in GLOBAL_OBJ)) {\n return callback();\n }\n\n const console = GLOBAL_OBJ.console ;\n const wrappedFuncs = {};\n\n const wrappedLevels = Object.keys(originalConsoleMethods) ;\n\n // Restore all wrapped console methods\n wrappedLevels.forEach(level => {\n const originalConsoleMethod = originalConsoleMethods[level] ;\n wrappedFuncs[level] = console[level] ;\n console[level] = originalConsoleMethod;\n });\n\n try {\n return callback();\n } finally {\n // Revert restoration to wrapped state\n wrappedLevels.forEach(level => {\n console[level] = wrappedFuncs[level] ;\n });\n }\n}\n\nfunction makeLogger() {\n let enabled = false;\n const logger = {\n enable: () => {\n enabled = true;\n },\n disable: () => {\n enabled = false;\n },\n isEnabled: () => enabled,\n };\n\n if (DEBUG_BUILD) {\n CONSOLE_LEVELS.forEach(name => {\n logger[name] = (...args) => {\n if (enabled) {\n consoleSandbox(() => {\n GLOBAL_OBJ.console[name](`${PREFIX}[${name}]:`, ...args);\n });\n }\n };\n });\n } else {\n CONSOLE_LEVELS.forEach(name => {\n logger[name] = () => undefined;\n });\n }\n\n return logger ;\n}\n\n/**\n * This is a logger singleton which either logs things or no-ops if logging is not enabled.\n * The logger is a singleton on the carrier, to ensure that a consistent logger is used throughout the SDK.\n */\nconst logger = getGlobalSingleton('logger', makeLogger);\n\nexport { CONSOLE_LEVELS, consoleSandbox, logger, originalConsoleMethods };\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Default cache config\n */\nconst defaultConfig = {\n keyPrefix: 'aws-amplify-cache',\n capacityInBytes: 1048576,\n itemMaxSize: 210000,\n defaultTTL: 259200000,\n defaultPriority: 5,\n warningThreshold: 0.8,\n};\nconst currentSizeKey = 'CurSize';\n\nexport { currentSizeKey, defaultConfig };\n","import { currentSizeKey } from '../constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * return the byte size of the string\n * @param str\n */\nfunction getByteLength(str) {\n let ret = 0;\n ret = str.length;\n for (let i = str.length; i >= 0; i -= 1) {\n const charCode = str.charCodeAt(i);\n if (charCode > 0x7f && charCode <= 0x7ff) {\n ret += 1;\n }\n else if (charCode > 0x7ff && charCode <= 0xffff) {\n ret += 2;\n }\n // trail surrogate\n if (charCode >= 0xdc00 && charCode <= 0xdfff) {\n i -= 1;\n }\n }\n return ret;\n}\n/**\n * get current time\n */\nfunction getCurrentTime() {\n const currentTime = new Date();\n return currentTime.getTime();\n}\n/**\n * check if passed value is an integer\n */\nfunction isInteger(value) {\n if (Number.isInteger) {\n return Number.isInteger(value);\n }\n return (typeof value === 'number' && isFinite(value) && Math.floor(value) === value);\n}\nconst getCurrentSizeKey = (keyPrefix) => `${keyPrefix}${currentSizeKey}`;\n\nexport { getByteLength, getCurrentSizeKey, getCurrentTime, isInteger };\n","import { createAssertionFunction } from '../../errors/createAssertionFunction.mjs';\nimport '../../types/errors.mjs';\nimport '../../errors/errorHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar CacheErrorCode;\n(function (CacheErrorCode) {\n CacheErrorCode[\"NoCacheItem\"] = \"NoCacheItem\";\n CacheErrorCode[\"NullNextNode\"] = \"NullNextNode\";\n CacheErrorCode[\"NullPreviousNode\"] = \"NullPreviousNode\";\n})(CacheErrorCode || (CacheErrorCode = {}));\nconst cacheErrorMap = {\n [CacheErrorCode.NoCacheItem]: {\n message: 'Item not found in the cache storage.',\n },\n [CacheErrorCode.NullNextNode]: {\n message: 'Next node is null.',\n },\n [CacheErrorCode.NullPreviousNode]: {\n message: 'Previous node is null.',\n },\n};\nconst assert = createAssertionFunction(cacheErrorMap);\n\nexport { CacheErrorCode, assert };\n","import { ConsoleLogger } from '../Logger/ConsoleLogger.mjs';\nimport { defaultConfig, currentSizeKey } from './constants.mjs';\nimport { getCurrentSizeKey, getCurrentTime, getByteLength } from './utils/cacheHelpers.mjs';\nimport { assert, CacheErrorCode } from './utils/errorHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst logger = new ConsoleLogger('StorageCache');\n/**\n * Initialization of the cache\n *\n */\nclass StorageCacheCommon {\n /**\n * Initialize the cache\n *\n * @param config - Custom configuration for this instance.\n */\n constructor({ config, keyValueStorage, }) {\n this.config = {\n ...defaultConfig,\n ...config,\n };\n this.keyValueStorage = keyValueStorage;\n this.sanitizeConfig();\n }\n getModuleName() {\n return 'Cache';\n }\n /**\n * Set custom configuration for the cache instance.\n *\n * @param config - customized configuration (without keyPrefix, which can't be changed)\n *\n * @return - the current configuration\n */\n configure(config) {\n if (config) {\n if (config.keyPrefix) {\n logger.warn('keyPrefix can not be re-configured on an existing Cache instance.');\n }\n this.config = {\n ...this.config,\n ...config,\n };\n }\n this.sanitizeConfig();\n return this.config;\n }\n /**\n * return the current size of the cache\n * @return {Promise}\n */\n async getCurrentCacheSize() {\n let size = await this.getStorage().getItem(getCurrentSizeKey(this.config.keyPrefix));\n if (!size) {\n await this.getStorage().setItem(getCurrentSizeKey(this.config.keyPrefix), '0');\n size = '0';\n }\n return Number(size);\n }\n /**\n * Set item into cache. You can put number, string, boolean or object.\n * The cache will first check whether has the same key.\n * If it has, it will delete the old item and then put the new item in\n * The cache will pop out items if it is full\n * You can specify the cache item options. The cache will abort and output a warning:\n * If the key is invalid\n * If the size of the item exceeds itemMaxSize.\n * If the value is undefined\n * If incorrect cache item configuration\n * If error happened with browser storage\n *\n * @param {String} key - the key of the item\n * @param {Object} value - the value of the item\n * @param {Object} [options] - optional, the specified meta-data\n *\n * @return {Promise}\n */\n async setItem(key, value, options) {\n logger.debug(`Set item: key is ${key}, value is ${value} with options: ${options}`);\n if (!key || key === currentSizeKey) {\n logger.warn(`Invalid key: should not be empty or reserved key: '${currentSizeKey}'`);\n return;\n }\n if (typeof value === 'undefined') {\n logger.warn(`The value of item should not be undefined!`);\n return;\n }\n const cacheItemOptions = {\n priority: options?.priority !== undefined\n ? options.priority\n : this.config.defaultPriority,\n expires: options?.expires !== undefined\n ? options.expires\n : this.config.defaultTTL + getCurrentTime(),\n };\n if (cacheItemOptions.priority < 1 || cacheItemOptions.priority > 5) {\n logger.warn(`Invalid parameter: priority due to out or range. It should be within 1 and 5.`);\n return;\n }\n const prefixedKey = `${this.config.keyPrefix}${key}`;\n const item = this.fillCacheItem(prefixedKey, value, cacheItemOptions);\n // check whether this item is too big;\n if (item.byteSize > this.config.itemMaxSize) {\n logger.warn(`Item with key: ${key} you are trying to put into is too big!`);\n return;\n }\n try {\n // first look into the storage, if it exists, delete it.\n const val = await this.getStorage().getItem(prefixedKey);\n if (val) {\n await this.removeCacheItem(prefixedKey, JSON.parse(val).byteSize);\n }\n // check whether the cache is full\n if (await this.isCacheFull(item.byteSize)) {\n const validKeys = await this.clearInvalidAndGetRemainingKeys();\n if (await this.isCacheFull(item.byteSize)) {\n const sizeToPop = await this.sizeToPop(item.byteSize);\n await this.popOutItems(validKeys, sizeToPop);\n }\n }\n // put item in the cache\n return this.setCacheItem(prefixedKey, item);\n }\n catch (e) {\n logger.warn(`setItem failed! ${e}`);\n }\n }\n /**\n * Get item from cache. It will return null if item doesn’t exist or it has been expired.\n * If you specified callback function in the options,\n * then the function will be executed if no such item in the cache\n * and finally put the return value into cache.\n * Please make sure the callback function will return the value you want to put into the cache.\n * The cache will abort output a warning:\n * If the key is invalid\n * If error happened with AsyncStorage\n *\n * @param {String} key - the key of the item\n * @param {Object} [options] - the options of callback function\n *\n * @return {Promise} - return a promise resolves to be the value of the item\n */\n async getItem(key, options) {\n logger.debug(`Get item: key is ${key} with options ${options}`);\n let cached;\n if (!key || key === currentSizeKey) {\n logger.warn(`Invalid key: should not be empty or reserved key: '${currentSizeKey}'`);\n return null;\n }\n const prefixedKey = `${this.config.keyPrefix}${key}`;\n try {\n cached = await this.getStorage().getItem(prefixedKey);\n if (cached != null) {\n if (await this.isExpired(prefixedKey)) {\n // if expired, remove that item and return null\n await this.removeCacheItem(prefixedKey, JSON.parse(cached).byteSize);\n }\n else {\n // if not expired, update its visitedTime and return the value\n const item = await this.updateVisitedTime(JSON.parse(cached), prefixedKey);\n return item.data;\n }\n }\n if (options?.callback) {\n const val = options.callback();\n if (val !== null) {\n await this.setItem(key, val, options);\n }\n return val;\n }\n return null;\n }\n catch (e) {\n logger.warn(`getItem failed! ${e}`);\n return null;\n }\n }\n /**\n * remove item from the cache\n * The cache will abort output a warning:\n * If error happened with AsyncStorage\n * @param {String} key - the key of the item\n * @return {Promise}\n */\n async removeItem(key) {\n logger.debug(`Remove item: key is ${key}`);\n if (!key || key === currentSizeKey) {\n logger.warn(`Invalid key: should not be empty or reserved key: '${currentSizeKey}'`);\n return;\n }\n const prefixedKey = `${this.config.keyPrefix}${key}`;\n try {\n const val = await this.getStorage().getItem(prefixedKey);\n if (val) {\n await this.removeCacheItem(prefixedKey, JSON.parse(val).byteSize);\n }\n }\n catch (e) {\n logger.warn(`removeItem failed! ${e}`);\n }\n }\n /**\n * Return all the keys owned by this cache.\n * Will return an empty array if error occurred.\n *\n * @return {Promise}\n */\n async getAllKeys() {\n try {\n return await this.getAllCacheKeys();\n }\n catch (e) {\n logger.warn(`getAllkeys failed! ${e}`);\n return [];\n }\n }\n getStorage() {\n return this.keyValueStorage;\n }\n /**\n * check whether item is expired\n *\n * @param key - the key of the item\n *\n * @return true if the item is expired.\n */\n async isExpired(key) {\n const text = await this.getStorage().getItem(key);\n assert(text !== null, CacheErrorCode.NoCacheItem, `Key: ${key}`);\n const item = JSON.parse(text);\n if (getCurrentTime() >= item.expires) {\n return true;\n }\n return false;\n }\n /**\n * delete item from cache\n *\n * @param prefixedKey - the key of the item\n * @param size - optional, the byte size of the item\n */\n async removeCacheItem(prefixedKey, size) {\n const item = await this.getStorage().getItem(prefixedKey);\n assert(item !== null, CacheErrorCode.NoCacheItem, `Key: ${prefixedKey}`);\n const itemSize = size ?? JSON.parse(item).byteSize;\n // first try to update the current size of the cache\n await this.decreaseCurrentSizeInBytes(itemSize);\n // try to remove the item from cache\n try {\n await this.getStorage().removeItem(prefixedKey);\n }\n catch (removeItemError) {\n // if some error happened, we need to rollback the current size\n await this.increaseCurrentSizeInBytes(itemSize);\n logger.error(`Failed to remove item: ${removeItemError}`);\n }\n }\n /**\n * produce a JSON object with meta-data and data value\n * @param value - the value of the item\n * @param options - optional, the specified meta-data\n *\n * @return - the item which has the meta-data and the value\n */\n fillCacheItem(key, value, options) {\n const item = {\n key,\n data: value,\n timestamp: getCurrentTime(),\n visitedTime: getCurrentTime(),\n priority: options.priority ?? 0,\n expires: options.expires ?? 0,\n type: typeof value,\n byteSize: 0,\n };\n // calculate byte size\n item.byteSize = getByteLength(JSON.stringify(item));\n // re-calculate using cache item with updated byteSize property\n item.byteSize = getByteLength(JSON.stringify(item));\n return item;\n }\n sanitizeConfig() {\n if (this.config.itemMaxSize > this.config.capacityInBytes) {\n logger.error('Invalid parameter: itemMaxSize. It should be smaller than capacityInBytes. Setting back to default.');\n this.config.itemMaxSize = defaultConfig.itemMaxSize;\n }\n if (this.config.defaultPriority > 5 || this.config.defaultPriority < 1) {\n logger.error('Invalid parameter: defaultPriority. It should be between 1 and 5. Setting back to default.');\n this.config.defaultPriority = defaultConfig.defaultPriority;\n }\n if (Number(this.config.warningThreshold) > 1 ||\n Number(this.config.warningThreshold) < 0) {\n logger.error('Invalid parameter: warningThreshold. It should be between 0 and 1. Setting back to default.');\n this.config.warningThreshold = defaultConfig.warningThreshold;\n }\n // Set 5MB limit\n const cacheLimit = 5 * 1024 * 1024;\n if (this.config.capacityInBytes > cacheLimit) {\n logger.error('Cache Capacity should be less than 5MB. Setting back to default. Setting back to default.');\n this.config.capacityInBytes = defaultConfig.capacityInBytes;\n }\n }\n /**\n * increase current size of the cache\n *\n * @param amount - the amount of the cache szie which need to be increased\n */\n async increaseCurrentSizeInBytes(amount) {\n const size = await this.getCurrentCacheSize();\n await this.getStorage().setItem(getCurrentSizeKey(this.config.keyPrefix), (size + amount).toString());\n }\n /**\n * decrease current size of the cache\n *\n * @param amount - the amount of the cache size which needs to be decreased\n */\n async decreaseCurrentSizeInBytes(amount) {\n const size = await this.getCurrentCacheSize();\n await this.getStorage().setItem(getCurrentSizeKey(this.config.keyPrefix), (size - amount).toString());\n }\n /**\n * update the visited time if item has been visited\n *\n * @param item - the item which need to be updated\n * @param prefixedKey - the key of the item\n *\n * @return the updated item\n */\n async updateVisitedTime(item, prefixedKey) {\n item.visitedTime = getCurrentTime();\n await this.getStorage().setItem(prefixedKey, JSON.stringify(item));\n return item;\n }\n /**\n * put item into cache\n *\n * @param prefixedKey - the key of the item\n * @param itemData - the value of the item\n * @param itemSizeInBytes - the byte size of the item\n */\n async setCacheItem(prefixedKey, item) {\n // first try to update the current size of the cache.\n await this.increaseCurrentSizeInBytes(item.byteSize);\n // try to add the item into cache\n try {\n await this.getStorage().setItem(prefixedKey, JSON.stringify(item));\n }\n catch (setItemErr) {\n // if some error happened, we need to rollback the current size\n await this.decreaseCurrentSizeInBytes(item.byteSize);\n logger.error(`Failed to set item ${setItemErr}`);\n }\n }\n /**\n * total space needed when poping out items\n *\n * @param itemSize\n *\n * @return total space needed\n */\n async sizeToPop(itemSize) {\n const cur = await this.getCurrentCacheSize();\n const spaceItemNeed = cur + itemSize - this.config.capacityInBytes;\n const cacheThresholdSpace = (1 - this.config.warningThreshold) * this.config.capacityInBytes;\n return spaceItemNeed > cacheThresholdSpace\n ? spaceItemNeed\n : cacheThresholdSpace;\n }\n /**\n * see whether cache is full\n *\n * @param itemSize\n *\n * @return true if cache is full\n */\n async isCacheFull(itemSize) {\n const cur = await this.getCurrentCacheSize();\n return itemSize + cur > this.config.capacityInBytes;\n }\n /**\n * get all the items we have, sort them by their priority,\n * if priority is same, sort them by their last visited time\n * pop out items from the low priority (5 is the lowest)\n * @private\n * @param keys - all the keys in this cache\n * @param sizeToPop - the total size of the items which needed to be poped out\n */\n async popOutItems(keys, sizeToPop) {\n const items = [];\n let remainedSize = sizeToPop;\n for (const key of keys) {\n const val = await this.getStorage().getItem(key);\n if (val != null) {\n const item = JSON.parse(val);\n items.push(item);\n }\n }\n // first compare priority\n // then compare visited time\n items.sort((a, b) => {\n if (a.priority > b.priority) {\n return -1;\n }\n else if (a.priority < b.priority) {\n return 1;\n }\n else {\n if (a.visitedTime < b.visitedTime) {\n return -1;\n }\n else\n return 1;\n }\n });\n for (const item of items) {\n // pop out items until we have enough room for new item\n await this.removeCacheItem(item.key, item.byteSize);\n remainedSize -= item.byteSize;\n if (remainedSize <= 0) {\n return;\n }\n }\n }\n /**\n * Scan the storage and combine the following operations for efficiency\n * 1. Clear out all expired keys owned by this cache, not including the size key.\n * 2. Return the remaining keys.\n *\n * @return The remaining valid keys\n */\n async clearInvalidAndGetRemainingKeys() {\n const remainingKeys = [];\n const keys = await this.getAllCacheKeys({\n omitSizeKey: true,\n });\n for (const key of keys) {\n if (await this.isExpired(key)) {\n await this.removeCacheItem(key);\n }\n else {\n remainingKeys.push(key);\n }\n }\n return remainingKeys;\n }\n /**\n * clear the entire cache\n * The cache will abort and output a warning if error occurs\n * @return {Promise}\n */\n async clear() {\n logger.debug(`Clear Cache`);\n try {\n const keys = await this.getAllKeys();\n for (const key of keys) {\n const prefixedKey = `${this.config.keyPrefix}${key}`;\n await this.getStorage().removeItem(prefixedKey);\n }\n }\n catch (e) {\n logger.warn(`clear failed! ${e}`);\n }\n }\n}\n\nexport { StorageCacheCommon };\n","import { ConsoleLogger } from '../Logger/ConsoleLogger.mjs';\nimport { KeyValueStorage } from '../storage/KeyValueStorage.mjs';\nimport { getLocalStorageWithFallback } from '../storage/utils.mjs';\nimport { defaultConfig } from './constants.mjs';\nimport { StorageCacheCommon } from './StorageCacheCommon.mjs';\nimport { getCurrentSizeKey, getCurrentTime } from './utils/cacheHelpers.mjs';\nimport './utils/errorHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst logger = new ConsoleLogger('StorageCache');\n/**\n * Customized storage based on the SessionStorage or LocalStorage with LRU implemented\n */\nclass StorageCache extends StorageCacheCommon {\n /**\n * initialize the cache\n * @param config - the configuration of the cache\n */\n constructor(config) {\n const storage = getLocalStorageWithFallback();\n super({ config, keyValueStorage: new KeyValueStorage(storage) });\n this.storage = storage;\n this.getItem = this.getItem.bind(this);\n this.setItem = this.setItem.bind(this);\n this.removeItem = this.removeItem.bind(this);\n }\n async getAllCacheKeys(options) {\n const { omitSizeKey } = options ?? {};\n const keys = [];\n for (let i = 0; i < this.storage.length; i++) {\n const key = this.storage.key(i);\n if (omitSizeKey && key === getCurrentSizeKey(this.config.keyPrefix)) {\n continue;\n }\n if (key?.startsWith(this.config.keyPrefix)) {\n keys.push(key.substring(this.config.keyPrefix.length));\n }\n }\n return keys;\n }\n /**\n * Return a new instance of cache with customized configuration.\n * @param {Object} config - the customized configuration\n * @return {Object} - the new instance of Cache\n */\n createInstance(config) {\n if (!config.keyPrefix || config.keyPrefix === defaultConfig.keyPrefix) {\n logger.error('invalid keyPrefix, setting keyPrefix with timeStamp');\n config.keyPrefix = getCurrentTime.toString();\n }\n return new StorageCache(config);\n }\n}\n\nexport { StorageCache };\n","import { StorageCache } from './StorageCache.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst Cache = new StorageCache();\n\nexport { Cache };\n","import {Injectable} from '@angular/core';\nimport {Cache} from 'aws-amplify/utils'\nimport { CacheItemOptions } from '@aws-amplify/core/src/Cache/types/cache';\nimport {Environment} from \"@micro-core/environment\";\n\n@Injectable({\n providedIn: 'root'\n})\nexport class BsCacheService {\n\n static setItemStatic(key: string, value: any, options?: Record | undefined) : Promise {\n return Cache.setItem(key, value, options);\n }\n\n static getItemStatic(key: string) : Promise\n static getItemStatic(key: string, options?: CacheItemOptions | undefined) : Promise {\n if (options) return Cache.getItem(key, options);\n return Cache.getItem(key);\n }\n\n static removeItemStatic(key: string) : Promise {\n return Cache.removeItem(key);\n }\n\n constructor(\n private env: Environment\n ) { }\n\n async getItem(key: string) : Promise\n async getItem(key: string, options?: CacheItemOptions | undefined) : Promise {\n if (options) {\n return Cache.getItem(key, options).catch(\n (error) => {\n if (!this.env.production) console.warn(`Error getting cache item, ${error}`);\n return Promise.reject(error);\n }\n );\n }\n return await Cache.getItem(key).catch(\n (error) => {\n if (!this.env.production) console.warn(`Error getting cache item, ${error}`);\n return Promise.reject(error);\n }\n );\n }\n\n setItem(key: string, value: any, options?: Record): Promise {\n if (!value) return Promise.resolve(); // Resolve immediately if value is falsy\n return Cache.setItem(key, value, options).catch((error) => {\n if (!this.env.production) {\n console.warn(`Error setting cache item: ${error}`);\n }\n return Promise.reject(error);\n });\n }\n\n\n removeItem(key: string) : Promise {\n return Cache.removeItem(key).catch(\n (error) => {\n if (!this.env.production) console.warn(`Error removing cache item, ${error}`);\n return Promise.reject(error);\n }\n );\n }\n\n clear(): Promise {\n return Cache.clear();\n }\n\n}\n","//! moment.js locale configuration\n//! locale : Catalan [ca]\n//! author : Juan G. Hurtado : https://github.com/juanghurtado\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ca = moment.defineLocale('ca', {\n months: {\n standalone:\n 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split(\n '_'\n ),\n format: \"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre\".split(\n '_'\n ),\n isFormat: /D[oD]?(\\s)+MMMM/,\n },\n monthsShort:\n 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays:\n 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split(\n '_'\n ),\n weekdaysShort: 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),\n weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM [de] YYYY',\n ll: 'D MMM YYYY',\n LLL: 'D MMMM [de] YYYY [a les] H:mm',\n lll: 'D MMM YYYY, H:mm',\n LLLL: 'dddd D MMMM [de] YYYY [a les] H:mm',\n llll: 'ddd D MMM YYYY, H:mm',\n },\n calendar: {\n sameDay: function () {\n return '[avui a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n },\n nextDay: function () {\n return '[demà a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n },\n nextWeek: function () {\n return 'dddd [a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n },\n lastDay: function () {\n return '[ahir a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n },\n lastWeek: function () {\n return (\n '[el] dddd [passat a ' +\n (this.hours() !== 1 ? 'les' : 'la') +\n '] LT'\n );\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: \"d'aquí %s\",\n past: 'fa %s',\n s: 'uns segons',\n ss: '%d segons',\n m: 'un minut',\n mm: '%d minuts',\n h: 'una hora',\n hh: '%d hores',\n d: 'un dia',\n dd: '%d dies',\n M: 'un mes',\n MM: '%d mesos',\n y: 'un any',\n yy: '%d anys',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(r|n|t|è|a)/,\n ordinal: function (number, period) {\n var output =\n number === 1\n ? 'r'\n : number === 2\n ? 'n'\n : number === 3\n ? 'r'\n : number === 4\n ? 't'\n : 'è';\n if (period === 'w' || period === 'W') {\n output = 'a';\n }\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return ca;\n\n})));\n","//! moment.js locale configuration\n//! locale : Bosnian [bs]\n//! author : Nedim Cholich : https://github.com/frontyard\n//! author : Rasid Redzic : https://github.com/rasidre\n//! based on (hr) translation by Bojan Marković\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n switch (key) {\n case 'm':\n return withoutSuffix\n ? 'jedna minuta'\n : isFuture\n ? 'jednu minutu'\n : 'jedne minute';\n }\n }\n\n function translate(number, withoutSuffix, key) {\n var result = number + ' ';\n switch (key) {\n case 'ss':\n if (number === 1) {\n result += 'sekunda';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'sekunde';\n } else {\n result += 'sekundi';\n }\n return result;\n case 'mm':\n if (number === 1) {\n result += 'minuta';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'minute';\n } else {\n result += 'minuta';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'jedan sat' : 'jedan sat';\n case 'hh':\n if (number === 1) {\n result += 'sat';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'sata';\n } else {\n result += 'sati';\n }\n return result;\n case 'dd':\n if (number === 1) {\n result += 'dan';\n } else {\n result += 'dana';\n }\n return result;\n case 'MM':\n if (number === 1) {\n result += 'mjesec';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'mjeseca';\n } else {\n result += 'mjeseci';\n }\n return result;\n case 'yy':\n if (number === 1) {\n result += 'godina';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'godine';\n } else {\n result += 'godina';\n }\n return result;\n }\n }\n\n var bs = moment.defineLocale('bs', {\n months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split(\n '_'\n ),\n monthsShort:\n 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(\n '_'\n ),\n weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[danas u] LT',\n nextDay: '[sutra u] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[u] [nedjelju] [u] LT';\n case 3:\n return '[u] [srijedu] [u] LT';\n case 6:\n return '[u] [subotu] [u] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[u] dddd [u] LT';\n }\n },\n lastDay: '[jučer u] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n case 3:\n return '[prošlu] dddd [u] LT';\n case 6:\n return '[prošle] [subote] [u] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[prošli] dddd [u] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'za %s',\n past: 'prije %s',\n s: 'par sekundi',\n ss: translate,\n m: processRelativeTime,\n mm: translate,\n h: translate,\n hh: translate,\n d: 'dan',\n dd: translate,\n M: 'mjesec',\n MM: translate,\n y: 'godinu',\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return bs;\n\n})));\n","/**\n * @license\n * Copyright 2017 Google LLC\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 * @fileoverview Firebase constants. Some of these (@defines) can be overridden at compile-time.\n */\nconst CONSTANTS = {\n /**\n * @define {boolean} Whether this is the client Node.js SDK.\n */\n NODE_CLIENT: false,\n /**\n * @define {boolean} Whether this is the Admin Node.js SDK.\n */\n NODE_ADMIN: false,\n /**\n * Firebase SDK Version\n */\n SDK_VERSION: '${JSCORE_VERSION}'\n};\n\n/**\n * @license\n * Copyright 2017 Google LLC\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 * Throws an error if the provided assertion is falsy\n */\nconst assert = function (assertion, message) {\n if (!assertion) {\n throw assertionError(message);\n }\n};\n/**\n * Returns an Error object suitable for throwing.\n */\nconst assertionError = function (message) {\n return new Error('Firebase Database (' +\n CONSTANTS.SDK_VERSION +\n ') INTERNAL ASSERT FAILED: ' +\n message);\n};\n\n/**\n * @license\n * Copyright 2017 Google LLC\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 */\nconst stringToByteArray$1 = function (str) {\n // TODO(user): Use native implementations if/when available\n const out = [];\n let p = 0;\n for (let i = 0; i < str.length; i++) {\n let c = str.charCodeAt(i);\n if (c < 128) {\n out[p++] = c;\n }\n else if (c < 2048) {\n out[p++] = (c >> 6) | 192;\n out[p++] = (c & 63) | 128;\n }\n else if ((c & 0xfc00) === 0xd800 &&\n i + 1 < str.length &&\n (str.charCodeAt(i + 1) & 0xfc00) === 0xdc00) {\n // Surrogate Pair\n c = 0x10000 + ((c & 0x03ff) << 10) + (str.charCodeAt(++i) & 0x03ff);\n out[p++] = (c >> 18) | 240;\n out[p++] = ((c >> 12) & 63) | 128;\n out[p++] = ((c >> 6) & 63) | 128;\n out[p++] = (c & 63) | 128;\n }\n else {\n out[p++] = (c >> 12) | 224;\n out[p++] = ((c >> 6) & 63) | 128;\n out[p++] = (c & 63) | 128;\n }\n }\n return out;\n};\n/**\n * Turns an array of numbers into the string given by the concatenation of the\n * characters to which the numbers correspond.\n * @param bytes Array of numbers representing characters.\n * @return Stringification of the array.\n */\nconst byteArrayToString = function (bytes) {\n // TODO(user): Use native implementations if/when available\n const out = [];\n let pos = 0, c = 0;\n while (pos < bytes.length) {\n const c1 = bytes[pos++];\n if (c1 < 128) {\n out[c++] = String.fromCharCode(c1);\n }\n else if (c1 > 191 && c1 < 224) {\n const c2 = bytes[pos++];\n out[c++] = String.fromCharCode(((c1 & 31) << 6) | (c2 & 63));\n }\n else if (c1 > 239 && c1 < 365) {\n // Surrogate Pair\n const c2 = bytes[pos++];\n const c3 = bytes[pos++];\n const c4 = bytes[pos++];\n const u = (((c1 & 7) << 18) | ((c2 & 63) << 12) | ((c3 & 63) << 6) | (c4 & 63)) -\n 0x10000;\n out[c++] = String.fromCharCode(0xd800 + (u >> 10));\n out[c++] = String.fromCharCode(0xdc00 + (u & 1023));\n }\n else {\n const c2 = bytes[pos++];\n const c3 = bytes[pos++];\n out[c++] = String.fromCharCode(((c1 & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));\n }\n }\n return out.join('');\n};\n// We define it as an object literal instead of a class because a class compiled down to es5 can't\n// be treeshaked. https://github.com/rollup/rollup/issues/1691\n// Static lookup maps, lazily populated by init_()\n// TODO(dlarocque): Define this as a class, since we no longer target ES5.\nconst base64 = {\n /**\n * Maps bytes to characters.\n */\n byteToCharMap_: null,\n /**\n * Maps characters to bytes.\n */\n charToByteMap_: null,\n /**\n * Maps bytes to websafe characters.\n * @private\n */\n byteToCharMapWebSafe_: null,\n /**\n * Maps websafe characters to bytes.\n * @private\n */\n charToByteMapWebSafe_: null,\n /**\n * Our default alphabet, shared between\n * ENCODED_VALS and ENCODED_VALS_WEBSAFE\n */\n ENCODED_VALS_BASE: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' + 'abcdefghijklmnopqrstuvwxyz' + '0123456789',\n /**\n * Our default alphabet. Value 64 (=) is special; it means \"nothing.\"\n */\n get ENCODED_VALS() {\n return this.ENCODED_VALS_BASE + '+/=';\n },\n /**\n * Our websafe alphabet.\n */\n get ENCODED_VALS_WEBSAFE() {\n return this.ENCODED_VALS_BASE + '-_.';\n },\n /**\n * Whether this browser supports the atob and btoa functions. This extension\n * started at Mozilla but is now implemented by many browsers. We use the\n * ASSUME_* variables to avoid pulling in the full useragent detection library\n * but still allowing the standard per-browser compilations.\n *\n */\n HAS_NATIVE_SUPPORT: typeof atob === 'function',\n /**\n * Base64-encode an array of bytes.\n *\n * @param input An array of bytes (numbers with\n * value in [0, 255]) to encode.\n * @param webSafe Boolean indicating we should use the\n * alternative alphabet.\n * @return The base64 encoded string.\n */\n encodeByteArray(input, webSafe) {\n if (!Array.isArray(input)) {\n throw Error('encodeByteArray takes an array as a parameter');\n }\n this.init_();\n const byteToCharMap = webSafe\n ? this.byteToCharMapWebSafe_\n : this.byteToCharMap_;\n const output = [];\n for (let i = 0; i < input.length; i += 3) {\n const byte1 = input[i];\n const haveByte2 = i + 1 < input.length;\n const byte2 = haveByte2 ? input[i + 1] : 0;\n const haveByte3 = i + 2 < input.length;\n const byte3 = haveByte3 ? input[i + 2] : 0;\n const outByte1 = byte1 >> 2;\n const outByte2 = ((byte1 & 0x03) << 4) | (byte2 >> 4);\n let outByte3 = ((byte2 & 0x0f) << 2) | (byte3 >> 6);\n let outByte4 = byte3 & 0x3f;\n if (!haveByte3) {\n outByte4 = 64;\n if (!haveByte2) {\n outByte3 = 64;\n }\n }\n output.push(byteToCharMap[outByte1], byteToCharMap[outByte2], byteToCharMap[outByte3], byteToCharMap[outByte4]);\n }\n return output.join('');\n },\n /**\n * Base64-encode a string.\n *\n * @param input A string to encode.\n * @param webSafe If true, we should use the\n * alternative alphabet.\n * @return The base64 encoded string.\n */\n encodeString(input, webSafe) {\n // Shortcut for Mozilla browsers that implement\n // a native base64 encoder in the form of \"btoa/atob\"\n if (this.HAS_NATIVE_SUPPORT && !webSafe) {\n return btoa(input);\n }\n return this.encodeByteArray(stringToByteArray$1(input), webSafe);\n },\n /**\n * Base64-decode a string.\n *\n * @param input to decode.\n * @param webSafe True if we should use the\n * alternative alphabet.\n * @return string representing the decoded value.\n */\n decodeString(input, webSafe) {\n // Shortcut for Mozilla browsers that implement\n // a native base64 encoder in the form of \"btoa/atob\"\n if (this.HAS_NATIVE_SUPPORT && !webSafe) {\n return atob(input);\n }\n return byteArrayToString(this.decodeStringToByteArray(input, webSafe));\n },\n /**\n * Base64-decode a string.\n *\n * In base-64 decoding, groups of four characters are converted into three\n * bytes. If the encoder did not apply padding, the input length may not\n * be a multiple of 4.\n *\n * In this case, the last group will have fewer than 4 characters, and\n * padding will be inferred. If the group has one or two characters, it decodes\n * to one byte. If the group has three characters, it decodes to two bytes.\n *\n * @param input Input to decode.\n * @param webSafe True if we should use the web-safe alphabet.\n * @return bytes representing the decoded value.\n */\n decodeStringToByteArray(input, webSafe) {\n this.init_();\n const charToByteMap = webSafe\n ? this.charToByteMapWebSafe_\n : this.charToByteMap_;\n const output = [];\n for (let i = 0; i < input.length;) {\n const byte1 = charToByteMap[input.charAt(i++)];\n const haveByte2 = i < input.length;\n const byte2 = haveByte2 ? charToByteMap[input.charAt(i)] : 0;\n ++i;\n const haveByte3 = i < input.length;\n const byte3 = haveByte3 ? charToByteMap[input.charAt(i)] : 64;\n ++i;\n const haveByte4 = i < input.length;\n const byte4 = haveByte4 ? charToByteMap[input.charAt(i)] : 64;\n ++i;\n if (byte1 == null || byte2 == null || byte3 == null || byte4 == null) {\n throw new DecodeBase64StringError();\n }\n const outByte1 = (byte1 << 2) | (byte2 >> 4);\n output.push(outByte1);\n if (byte3 !== 64) {\n const outByte2 = ((byte2 << 4) & 0xf0) | (byte3 >> 2);\n output.push(outByte2);\n if (byte4 !== 64) {\n const outByte3 = ((byte3 << 6) & 0xc0) | byte4;\n output.push(outByte3);\n }\n }\n }\n return output;\n },\n /**\n * Lazy static initialization function. Called before\n * accessing any of the static map variables.\n * @private\n */\n init_() {\n if (!this.byteToCharMap_) {\n this.byteToCharMap_ = {};\n this.charToByteMap_ = {};\n this.byteToCharMapWebSafe_ = {};\n this.charToByteMapWebSafe_ = {};\n // We want quick mappings back and forth, so we precompute two maps.\n for (let i = 0; i < this.ENCODED_VALS.length; i++) {\n this.byteToCharMap_[i] = this.ENCODED_VALS.charAt(i);\n this.charToByteMap_[this.byteToCharMap_[i]] = i;\n this.byteToCharMapWebSafe_[i] = this.ENCODED_VALS_WEBSAFE.charAt(i);\n this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[i]] = i;\n // Be forgiving when decoding and correctly decode both encodings.\n if (i >= this.ENCODED_VALS_BASE.length) {\n this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(i)] = i;\n this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(i)] = i;\n }\n }\n }\n }\n};\n/**\n * An error encountered while decoding base64 string.\n */\nclass DecodeBase64StringError extends Error {\n constructor() {\n super(...arguments);\n this.name = 'DecodeBase64StringError';\n }\n}\n/**\n * URL-safe base64 encoding\n */\nconst base64Encode = function (str) {\n const utf8Bytes = stringToByteArray$1(str);\n return base64.encodeByteArray(utf8Bytes, true);\n};\n/**\n * URL-safe base64 encoding (without \".\" padding in the end).\n * e.g. Used in JSON Web Token (JWT) parts.\n */\nconst base64urlEncodeWithoutPadding = function (str) {\n // Use base64url encoding and remove padding in the end (dot characters).\n return base64Encode(str).replace(/\\./g, '');\n};\n/**\n * URL-safe base64 decoding\n *\n * NOTE: DO NOT use the global atob() function - it does NOT support the\n * base64Url variant encoding.\n *\n * @param str To be decoded\n * @return Decoded result, if possible\n */\nconst base64Decode = function (str) {\n try {\n return base64.decodeString(str, true);\n }\n catch (e) {\n console.error('base64Decode failed: ', e);\n }\n return null;\n};\n\n/**\n * @license\n * Copyright 2017 Google LLC\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 * Do a deep-copy of basic JavaScript Objects or Arrays.\n */\nfunction deepCopy(value) {\n return deepExtend(undefined, value);\n}\n/**\n * Copy properties from source to target (recursively allows extension\n * of Objects and Arrays). Scalar values in the target are over-written.\n * If target is undefined, an object of the appropriate type will be created\n * (and returned).\n *\n * We recursively copy all child properties of plain Objects in the source- so\n * that namespace- like dictionaries are merged.\n *\n * Note that the target can be a function, in which case the properties in\n * the source Object are copied onto it as static properties of the Function.\n *\n * Note: we don't merge __proto__ to prevent prototype pollution\n */\nfunction deepExtend(target, source) {\n if (!(source instanceof Object)) {\n return source;\n }\n switch (source.constructor) {\n case Date:\n // Treat Dates like scalars; if the target date object had any child\n // properties - they will be lost!\n const dateValue = source;\n return new Date(dateValue.getTime());\n case Object:\n if (target === undefined) {\n target = {};\n }\n break;\n case Array:\n // Always copy the array source and overwrite the target.\n target = [];\n break;\n default:\n // Not a plain Object - treat it as a scalar.\n return source;\n }\n for (const prop in source) {\n // use isValidKey to guard against prototype pollution. See https://snyk.io/vuln/SNYK-JS-LODASH-450202\n if (!source.hasOwnProperty(prop) || !isValidKey(prop)) {\n continue;\n }\n target[prop] = deepExtend(target[prop], source[prop]);\n }\n return target;\n}\nfunction isValidKey(key) {\n return key !== '__proto__';\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\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 * Polyfill for `globalThis` object.\n * @returns the `globalThis` object for the given environment.\n * @public\n */\nfunction getGlobal() {\n if (typeof self !== 'undefined') {\n return self;\n }\n if (typeof window !== 'undefined') {\n return window;\n }\n if (typeof global !== 'undefined') {\n return global;\n }\n throw new Error('Unable to locate global object.');\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\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 */\nconst getDefaultsFromGlobal = () => getGlobal().__FIREBASE_DEFAULTS__;\n/**\n * Attempt to read defaults from a JSON string provided to\n * process(.)env(.)__FIREBASE_DEFAULTS__ or a JSON file whose path is in\n * process(.)env(.)__FIREBASE_DEFAULTS_PATH__\n * The dots are in parens because certain compilers (Vite?) cannot\n * handle seeing that variable in comments.\n * See https://github.com/firebase/firebase-js-sdk/issues/6838\n */\nconst getDefaultsFromEnvVariable = () => {\n if (typeof process === 'undefined' || typeof process.env === 'undefined') {\n return;\n }\n const defaultsJsonString = process.env.__FIREBASE_DEFAULTS__;\n if (defaultsJsonString) {\n return JSON.parse(defaultsJsonString);\n }\n};\nconst getDefaultsFromCookie = () => {\n if (typeof document === 'undefined') {\n return;\n }\n let match;\n try {\n match = document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/);\n }\n catch (e) {\n // Some environments such as Angular Universal SSR have a\n // `document` object but error on accessing `document.cookie`.\n return;\n }\n const decoded = match && base64Decode(match[1]);\n return decoded && JSON.parse(decoded);\n};\n/**\n * Get the __FIREBASE_DEFAULTS__ object. It checks in order:\n * (1) if such an object exists as a property of `globalThis`\n * (2) if such an object was provided on a shell environment variable\n * (3) if such an object exists in a cookie\n * @public\n */\nconst getDefaults = () => {\n try {\n return (getDefaultsFromGlobal() ||\n getDefaultsFromEnvVariable() ||\n getDefaultsFromCookie());\n }\n catch (e) {\n /**\n * Catch-all for being unable to get __FIREBASE_DEFAULTS__ due\n * to any environment case we have not accounted for. Log to\n * info instead of swallowing so we can find these unknown cases\n * and add paths for them if needed.\n */\n console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);\n return;\n }\n};\n/**\n * Returns emulator host stored in the __FIREBASE_DEFAULTS__ object\n * for the given product.\n * @returns a URL host formatted like `127.0.0.1:9999` or `[::1]:4000` if available\n * @public\n */\nconst getDefaultEmulatorHost = (productName) => { var _a, _b; return (_b = (_a = getDefaults()) === null || _a === void 0 ? void 0 : _a.emulatorHosts) === null || _b === void 0 ? void 0 : _b[productName]; };\n/**\n * Returns emulator hostname and port stored in the __FIREBASE_DEFAULTS__ object\n * for the given product.\n * @returns a pair of hostname and port like `[\"::1\", 4000]` if available\n * @public\n */\nconst getDefaultEmulatorHostnameAndPort = (productName) => {\n const host = getDefaultEmulatorHost(productName);\n if (!host) {\n return undefined;\n }\n const separatorIndex = host.lastIndexOf(':'); // Finding the last since IPv6 addr also has colons.\n if (separatorIndex <= 0 || separatorIndex + 1 === host.length) {\n throw new Error(`Invalid host ${host} with no separate hostname and port!`);\n }\n // eslint-disable-next-line no-restricted-globals\n const port = parseInt(host.substring(separatorIndex + 1), 10);\n if (host[0] === '[') {\n // Bracket-quoted `[ipv6addr]:port` => return \"ipv6addr\" (without brackets).\n return [host.substring(1, separatorIndex - 1), port];\n }\n else {\n return [host.substring(0, separatorIndex), port];\n }\n};\n/**\n * Returns Firebase app config stored in the __FIREBASE_DEFAULTS__ object.\n * @public\n */\nconst getDefaultAppConfig = () => { var _a; return (_a = getDefaults()) === null || _a === void 0 ? void 0 : _a.config; };\n/**\n * Returns an experimental setting on the __FIREBASE_DEFAULTS__ object (properties\n * prefixed by \"_\")\n * @public\n */\nconst getExperimentalSetting = (name) => { var _a; return (_a = getDefaults()) === null || _a === void 0 ? void 0 : _a[`_${name}`]; };\n\n/**\n * @license\n * Copyright 2017 Google LLC\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 */\nclass Deferred {\n constructor() {\n this.reject = () => { };\n this.resolve = () => { };\n this.promise = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n }\n /**\n * Our API internals are not promisified and cannot because our callback APIs have subtle expectations around\n * invoking promises inline, which Promises are forbidden to do. This method accepts an optional node-style callback\n * and returns a node-style callback which will resolve or reject the Deferred's promise.\n */\n wrapCallback(callback) {\n return (error, value) => {\n if (error) {\n this.reject(error);\n }\n else {\n this.resolve(value);\n }\n if (typeof callback === 'function') {\n // Attaching noop handler just in case developer wasn't expecting\n // promises\n this.promise.catch(() => { });\n // Some of our callbacks don't expect a value and our own tests\n // assert that the parameter length is 1\n if (callback.length === 1) {\n callback(error);\n }\n else {\n callback(error, value);\n }\n }\n };\n }\n}\n\n/**\n * @license\n * Copyright 2021 Google LLC\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 */\nfunction createMockUserToken(token, projectId) {\n if (token.uid) {\n throw new Error('The \"uid\" field is no longer supported by mockUserToken. Please use \"sub\" instead for Firebase Auth User ID.');\n }\n // Unsecured JWTs use \"none\" as the algorithm.\n const header = {\n alg: 'none',\n type: 'JWT'\n };\n const project = projectId || 'demo-project';\n const iat = token.iat || 0;\n const sub = token.sub || token.user_id;\n if (!sub) {\n throw new Error(\"mockUserToken must contain 'sub' or 'user_id' field!\");\n }\n const payload = Object.assign({ \n // Set all required fields to decent defaults\n iss: `https://securetoken.google.com/${project}`, aud: project, iat, exp: iat + 3600, auth_time: iat, sub, user_id: sub, firebase: {\n sign_in_provider: 'custom',\n identities: {}\n } }, token);\n // Unsecured JWTs use the empty string as a signature.\n const signature = '';\n return [\n base64urlEncodeWithoutPadding(JSON.stringify(header)),\n base64urlEncodeWithoutPadding(JSON.stringify(payload)),\n signature\n ].join('.');\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\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 * Returns navigator.userAgent string or '' if it's not defined.\n * @return user agent string\n */\nfunction getUA() {\n if (typeof navigator !== 'undefined' &&\n typeof navigator['userAgent'] === 'string') {\n return navigator['userAgent'];\n }\n else {\n return '';\n }\n}\n/**\n * Detect Cordova / PhoneGap / Ionic frameworks on a mobile device.\n *\n * Deliberately does not rely on checking `file://` URLs (as this fails PhoneGap\n * in the Ripple emulator) nor Cordova `onDeviceReady`, which would normally\n * wait for a callback.\n */\nfunction isMobileCordova() {\n return (typeof window !== 'undefined' &&\n // @ts-ignore Setting up an broadly applicable index signature for Window\n // just to deal with this case would probably be a bad idea.\n !!(window['cordova'] || window['phonegap'] || window['PhoneGap']) &&\n /ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(getUA()));\n}\n/**\n * Detect Node.js.\n *\n * @return true if Node.js environment is detected or specified.\n */\n// Node detection logic from: https://github.com/iliakan/detect-node/\nfunction isNode() {\n var _a;\n const forceEnvironment = (_a = getDefaults()) === null || _a === void 0 ? void 0 : _a.forceEnvironment;\n if (forceEnvironment === 'node') {\n return true;\n }\n else if (forceEnvironment === 'browser') {\n return false;\n }\n try {\n return (Object.prototype.toString.call(global.process) === '[object process]');\n }\n catch (e) {\n return false;\n }\n}\n/**\n * Detect Browser Environment.\n * Note: This will return true for certain test frameworks that are incompletely\n * mimicking a browser, and should not lead to assuming all browser APIs are\n * available.\n */\nfunction isBrowser() {\n return typeof window !== 'undefined' || isWebWorker();\n}\n/**\n * Detect Web Worker context.\n */\nfunction isWebWorker() {\n return (typeof WorkerGlobalScope !== 'undefined' &&\n typeof self !== 'undefined' &&\n self instanceof WorkerGlobalScope);\n}\n/**\n * Detect Cloudflare Worker context.\n */\nfunction isCloudflareWorker() {\n return (typeof navigator !== 'undefined' &&\n navigator.userAgent === 'Cloudflare-Workers');\n}\nfunction isBrowserExtension() {\n const runtime = typeof chrome === 'object'\n ? chrome.runtime\n : typeof browser === 'object'\n ? browser.runtime\n : undefined;\n return typeof runtime === 'object' && runtime.id !== undefined;\n}\n/**\n * Detect React Native.\n *\n * @return true if ReactNative environment is detected.\n */\nfunction isReactNative() {\n return (typeof navigator === 'object' && navigator['product'] === 'ReactNative');\n}\n/** Detects Electron apps. */\nfunction isElectron() {\n return getUA().indexOf('Electron/') >= 0;\n}\n/** Detects Internet Explorer. */\nfunction isIE() {\n const ua = getUA();\n return ua.indexOf('MSIE ') >= 0 || ua.indexOf('Trident/') >= 0;\n}\n/** Detects Universal Windows Platform apps. */\nfunction isUWP() {\n return getUA().indexOf('MSAppHost/') >= 0;\n}\n/**\n * Detect whether the current SDK build is the Node version.\n *\n * @return true if it's the Node SDK build.\n */\nfunction isNodeSdk() {\n return CONSTANTS.NODE_CLIENT === true || CONSTANTS.NODE_ADMIN === true;\n}\n/** Returns true if we are running in Safari. */\nfunction isSafari() {\n return (!isNode() &&\n !!navigator.userAgent &&\n navigator.userAgent.includes('Safari') &&\n !navigator.userAgent.includes('Chrome'));\n}\n/**\n * This method checks if indexedDB is supported by current browser/service worker context\n * @return true if indexedDB is supported by current browser/service worker context\n */\nfunction isIndexedDBAvailable() {\n try {\n return typeof indexedDB === 'object';\n }\n catch (e) {\n return false;\n }\n}\n/**\n * This method validates browser/sw context for indexedDB by opening a dummy indexedDB database and reject\n * if errors occur during the database open operation.\n *\n * @throws exception if current browser/sw context can't run idb.open (ex: Safari iframe, Firefox\n * private browsing)\n */\nfunction validateIndexedDBOpenable() {\n return new Promise((resolve, reject) => {\n try {\n let preExist = true;\n const DB_CHECK_NAME = 'validate-browser-context-for-indexeddb-analytics-module';\n const request = self.indexedDB.open(DB_CHECK_NAME);\n request.onsuccess = () => {\n request.result.close();\n // delete database only when it doesn't pre-exist\n if (!preExist) {\n self.indexedDB.deleteDatabase(DB_CHECK_NAME);\n }\n resolve(true);\n };\n request.onupgradeneeded = () => {\n preExist = false;\n };\n request.onerror = () => {\n var _a;\n reject(((_a = request.error) === null || _a === void 0 ? void 0 : _a.message) || '');\n };\n }\n catch (error) {\n reject(error);\n }\n });\n}\n/**\n *\n * This method checks whether cookie is enabled within current browser\n * @return true if cookie is enabled within current browser\n */\nfunction areCookiesEnabled() {\n if (typeof navigator === 'undefined' || !navigator.cookieEnabled) {\n return false;\n }\n return true;\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\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 * @fileoverview Standardized Firebase Error.\n *\n * Usage:\n *\n * // TypeScript string literals for type-safe codes\n * type Err =\n * 'unknown' |\n * 'object-not-found'\n * ;\n *\n * // Closure enum for type-safe error codes\n * // at-enum {string}\n * var Err = {\n * UNKNOWN: 'unknown',\n * OBJECT_NOT_FOUND: 'object-not-found',\n * }\n *\n * let errors: Map = {\n * 'generic-error': \"Unknown error\",\n * 'file-not-found': \"Could not find file: {$file}\",\n * };\n *\n * // Type-safe function - must pass a valid error code as param.\n * let error = new ErrorFactory('service', 'Service', errors);\n *\n * ...\n * throw error.create(Err.GENERIC);\n * ...\n * throw error.create(Err.FILE_NOT_FOUND, {'file': fileName});\n * ...\n * // Service: Could not file file: foo.txt (service/file-not-found).\n *\n * catch (e) {\n * assert(e.message === \"Could not find file: foo.txt.\");\n * if ((e as FirebaseError)?.code === 'service/file-not-found') {\n * console.log(\"Could not read file: \" + e['file']);\n * }\n * }\n */\nconst ERROR_NAME = 'FirebaseError';\n// Based on code from:\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Custom_Error_Types\nclass FirebaseError extends Error {\n constructor(\n /** The error code for this error. */\n code, message, \n /** Custom data for this error. */\n customData) {\n super(message);\n this.code = code;\n this.customData = customData;\n /** The custom name for all FirebaseErrors. */\n this.name = ERROR_NAME;\n // Fix For ES5\n // https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work\n // TODO(dlarocque): Replace this with `new.target`: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-2.html#support-for-newtarget\n // which we can now use since we no longer target ES5.\n Object.setPrototypeOf(this, FirebaseError.prototype);\n // Maintains proper stack trace for where our error was thrown.\n // Only available on V8.\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, ErrorFactory.prototype.create);\n }\n }\n}\nclass ErrorFactory {\n constructor(service, serviceName, errors) {\n this.service = service;\n this.serviceName = serviceName;\n this.errors = errors;\n }\n create(code, ...data) {\n const customData = data[0] || {};\n const fullCode = `${this.service}/${code}`;\n const template = this.errors[code];\n const message = template ? replaceTemplate(template, customData) : 'Error';\n // Service Name: Error message (service/code).\n const fullMessage = `${this.serviceName}: ${message} (${fullCode}).`;\n const error = new FirebaseError(fullCode, fullMessage, customData);\n return error;\n }\n}\nfunction replaceTemplate(template, data) {\n return template.replace(PATTERN, (_, key) => {\n const value = data[key];\n return value != null ? String(value) : `<${key}?>`;\n });\n}\nconst PATTERN = /\\{\\$([^}]+)}/g;\n\n/**\n * @license\n * Copyright 2017 Google LLC\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 * Evaluates a JSON string into a javascript object.\n *\n * @param {string} str A string containing JSON.\n * @return {*} The javascript object representing the specified JSON.\n */\nfunction jsonEval(str) {\n return JSON.parse(str);\n}\n/**\n * Returns JSON representing a javascript object.\n * @param {*} data JavaScript object to be stringified.\n * @return {string} The JSON contents of the object.\n */\nfunction stringify(data) {\n return JSON.stringify(data);\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\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 * Decodes a Firebase auth. token into constituent parts.\n *\n * Notes:\n * - May return with invalid / incomplete claims if there's no native base64 decoding support.\n * - Doesn't check if the token is actually valid.\n */\nconst decode = function (token) {\n let header = {}, claims = {}, data = {}, signature = '';\n try {\n const parts = token.split('.');\n header = jsonEval(base64Decode(parts[0]) || '');\n claims = jsonEval(base64Decode(parts[1]) || '');\n signature = parts[2];\n data = claims['d'] || {};\n delete claims['d'];\n }\n catch (e) { }\n return {\n header,\n claims,\n data,\n signature\n };\n};\n/**\n * Decodes a Firebase auth. token and checks the validity of its time-based claims. Will return true if the\n * token is within the time window authorized by the 'nbf' (not-before) and 'iat' (issued-at) claims.\n *\n * Notes:\n * - May return a false negative if there's no native base64 decoding support.\n * - Doesn't check if the token is actually valid.\n */\nconst isValidTimestamp = function (token) {\n const claims = decode(token).claims;\n const now = Math.floor(new Date().getTime() / 1000);\n let validSince = 0, validUntil = 0;\n if (typeof claims === 'object') {\n if (claims.hasOwnProperty('nbf')) {\n validSince = claims['nbf'];\n }\n else if (claims.hasOwnProperty('iat')) {\n validSince = claims['iat'];\n }\n if (claims.hasOwnProperty('exp')) {\n validUntil = claims['exp'];\n }\n else {\n // token will expire after 24h by default\n validUntil = validSince + 86400;\n }\n }\n return (!!now &&\n !!validSince &&\n !!validUntil &&\n now >= validSince &&\n now <= validUntil);\n};\n/**\n * Decodes a Firebase auth. token and returns its issued at time if valid, null otherwise.\n *\n * Notes:\n * - May return null if there's no native base64 decoding support.\n * - Doesn't check if the token is actually valid.\n */\nconst issuedAtTime = function (token) {\n const claims = decode(token).claims;\n if (typeof claims === 'object' && claims.hasOwnProperty('iat')) {\n return claims['iat'];\n }\n return null;\n};\n/**\n * Decodes a Firebase auth. token and checks the validity of its format. Expects a valid issued-at time.\n *\n * Notes:\n * - May return a false negative if there's no native base64 decoding support.\n * - Doesn't check if the token is actually valid.\n */\nconst isValidFormat = function (token) {\n const decoded = decode(token), claims = decoded.claims;\n return !!claims && typeof claims === 'object' && claims.hasOwnProperty('iat');\n};\n/**\n * Attempts to peer into an auth token and determine if it's an admin auth token by looking at the claims portion.\n *\n * Notes:\n * - May return a false negative if there's no native base64 decoding support.\n * - Doesn't check if the token is actually valid.\n */\nconst isAdmin = function (token) {\n const claims = decode(token).claims;\n return typeof claims === 'object' && claims['admin'] === true;\n};\n\n/**\n * @license\n * Copyright 2017 Google LLC\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 */\nfunction contains(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\nfunction safeGet(obj, key) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n return obj[key];\n }\n else {\n return undefined;\n }\n}\nfunction isEmpty(obj) {\n for (const key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n return false;\n }\n }\n return true;\n}\nfunction map(obj, fn, contextObj) {\n const res = {};\n for (const key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n res[key] = fn.call(contextObj, obj[key], key, obj);\n }\n }\n return res;\n}\n/**\n * Deep equal two objects. Support Arrays and Objects.\n */\nfunction deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n const aKeys = Object.keys(a);\n const bKeys = Object.keys(b);\n for (const k of aKeys) {\n if (!bKeys.includes(k)) {\n return false;\n }\n const aProp = a[k];\n const bProp = b[k];\n if (isObject(aProp) && isObject(bProp)) {\n if (!deepEqual(aProp, bProp)) {\n return false;\n }\n }\n else if (aProp !== bProp) {\n return false;\n }\n }\n for (const k of bKeys) {\n if (!aKeys.includes(k)) {\n return false;\n }\n }\n return true;\n}\nfunction isObject(thing) {\n return thing !== null && typeof thing === 'object';\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\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 * Rejects if the given promise doesn't resolve in timeInMS milliseconds.\n * @internal\n */\nfunction promiseWithTimeout(promise, timeInMS = 2000) {\n const deferredPromise = new Deferred();\n setTimeout(() => deferredPromise.reject('timeout!'), timeInMS);\n promise.then(deferredPromise.resolve, deferredPromise.reject);\n return deferredPromise.promise;\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\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 * Returns a querystring-formatted string (e.g. &arg=val&arg2=val2) from a\n * params object (e.g. {arg: 'val', arg2: 'val2'})\n * Note: You must prepend it with ? when adding it to a URL.\n */\nfunction querystring(querystringParams) {\n const params = [];\n for (const [key, value] of Object.entries(querystringParams)) {\n if (Array.isArray(value)) {\n value.forEach(arrayVal => {\n params.push(encodeURIComponent(key) + '=' + encodeURIComponent(arrayVal));\n });\n }\n else {\n params.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));\n }\n }\n return params.length ? '&' + params.join('&') : '';\n}\n/**\n * Decodes a querystring (e.g. ?arg=val&arg2=val2) into a params object\n * (e.g. {arg: 'val', arg2: 'val2'})\n */\nfunction querystringDecode(querystring) {\n const obj = {};\n const tokens = querystring.replace(/^\\?/, '').split('&');\n tokens.forEach(token => {\n if (token) {\n const [key, value] = token.split('=');\n obj[decodeURIComponent(key)] = decodeURIComponent(value);\n }\n });\n return obj;\n}\n/**\n * Extract the query string part of a URL, including the leading question mark (if present).\n */\nfunction extractQuerystring(url) {\n const queryStart = url.indexOf('?');\n if (!queryStart) {\n return '';\n }\n const fragmentStart = url.indexOf('#', queryStart);\n return url.substring(queryStart, fragmentStart > 0 ? fragmentStart : undefined);\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\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 * @fileoverview SHA-1 cryptographic hash.\n * Variable names follow the notation in FIPS PUB 180-3:\n * http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf.\n *\n * Usage:\n * var sha1 = new sha1();\n * sha1.update(bytes);\n * var hash = sha1.digest();\n *\n * Performance:\n * Chrome 23: ~400 Mbit/s\n * Firefox 16: ~250 Mbit/s\n *\n */\n/**\n * SHA-1 cryptographic hash constructor.\n *\n * The properties declared here are discussed in the above algorithm document.\n * @constructor\n * @final\n * @struct\n */\nclass Sha1 {\n constructor() {\n /**\n * Holds the previous values of accumulated variables a-e in the compress_\n * function.\n * @private\n */\n this.chain_ = [];\n /**\n * A buffer holding the partially computed hash result.\n * @private\n */\n this.buf_ = [];\n /**\n * An array of 80 bytes, each a part of the message to be hashed. Referred to\n * as the message schedule in the docs.\n * @private\n */\n this.W_ = [];\n /**\n * Contains data needed to pad messages less than 64 bytes.\n * @private\n */\n this.pad_ = [];\n /**\n * @private {number}\n */\n this.inbuf_ = 0;\n /**\n * @private {number}\n */\n this.total_ = 0;\n this.blockSize = 512 / 8;\n this.pad_[0] = 128;\n for (let i = 1; i < this.blockSize; ++i) {\n this.pad_[i] = 0;\n }\n this.reset();\n }\n reset() {\n this.chain_[0] = 0x67452301;\n this.chain_[1] = 0xefcdab89;\n this.chain_[2] = 0x98badcfe;\n this.chain_[3] = 0x10325476;\n this.chain_[4] = 0xc3d2e1f0;\n this.inbuf_ = 0;\n this.total_ = 0;\n }\n /**\n * Internal compress helper function.\n * @param buf Block to compress.\n * @param offset Offset of the block in the buffer.\n * @private\n */\n compress_(buf, offset) {\n if (!offset) {\n offset = 0;\n }\n const W = this.W_;\n // get 16 big endian words\n if (typeof buf === 'string') {\n for (let i = 0; i < 16; i++) {\n // TODO(user): [bug 8140122] Recent versions of Safari for Mac OS and iOS\n // have a bug that turns the post-increment ++ operator into pre-increment\n // during JIT compilation. We have code that depends heavily on SHA-1 for\n // correctness and which is affected by this bug, so I've removed all uses\n // of post-increment ++ in which the result value is used. We can revert\n // this change once the Safari bug\n // (https://bugs.webkit.org/show_bug.cgi?id=109036) has been fixed and\n // most clients have been updated.\n W[i] =\n (buf.charCodeAt(offset) << 24) |\n (buf.charCodeAt(offset + 1) << 16) |\n (buf.charCodeAt(offset + 2) << 8) |\n buf.charCodeAt(offset + 3);\n offset += 4;\n }\n }\n else {\n for (let i = 0; i < 16; i++) {\n W[i] =\n (buf[offset] << 24) |\n (buf[offset + 1] << 16) |\n (buf[offset + 2] << 8) |\n buf[offset + 3];\n offset += 4;\n }\n }\n // expand to 80 words\n for (let i = 16; i < 80; i++) {\n const t = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];\n W[i] = ((t << 1) | (t >>> 31)) & 0xffffffff;\n }\n let a = this.chain_[0];\n let b = this.chain_[1];\n let c = this.chain_[2];\n let d = this.chain_[3];\n let e = this.chain_[4];\n let f, k;\n // TODO(user): Try to unroll this loop to speed up the computation.\n for (let i = 0; i < 80; i++) {\n if (i < 40) {\n if (i < 20) {\n f = d ^ (b & (c ^ d));\n k = 0x5a827999;\n }\n else {\n f = b ^ c ^ d;\n k = 0x6ed9eba1;\n }\n }\n else {\n if (i < 60) {\n f = (b & c) | (d & (b | c));\n k = 0x8f1bbcdc;\n }\n else {\n f = b ^ c ^ d;\n k = 0xca62c1d6;\n }\n }\n const t = (((a << 5) | (a >>> 27)) + f + e + k + W[i]) & 0xffffffff;\n e = d;\n d = c;\n c = ((b << 30) | (b >>> 2)) & 0xffffffff;\n b = a;\n a = t;\n }\n this.chain_[0] = (this.chain_[0] + a) & 0xffffffff;\n this.chain_[1] = (this.chain_[1] + b) & 0xffffffff;\n this.chain_[2] = (this.chain_[2] + c) & 0xffffffff;\n this.chain_[3] = (this.chain_[3] + d) & 0xffffffff;\n this.chain_[4] = (this.chain_[4] + e) & 0xffffffff;\n }\n update(bytes, length) {\n // TODO(johnlenz): tighten the function signature and remove this check\n if (bytes == null) {\n return;\n }\n if (length === undefined) {\n length = bytes.length;\n }\n const lengthMinusBlock = length - this.blockSize;\n let n = 0;\n // Using local instead of member variables gives ~5% speedup on Firefox 16.\n const buf = this.buf_;\n let inbuf = this.inbuf_;\n // The outer while loop should execute at most twice.\n while (n < length) {\n // When we have no data in the block to top up, we can directly process the\n // input buffer (assuming it contains sufficient data). This gives ~25%\n // speedup on Chrome 23 and ~15% speedup on Firefox 16, but requires that\n // the data is provided in large chunks (or in multiples of 64 bytes).\n if (inbuf === 0) {\n while (n <= lengthMinusBlock) {\n this.compress_(bytes, n);\n n += this.blockSize;\n }\n }\n if (typeof bytes === 'string') {\n while (n < length) {\n buf[inbuf] = bytes.charCodeAt(n);\n ++inbuf;\n ++n;\n if (inbuf === this.blockSize) {\n this.compress_(buf);\n inbuf = 0;\n // Jump to the outer loop so we use the full-block optimization.\n break;\n }\n }\n }\n else {\n while (n < length) {\n buf[inbuf] = bytes[n];\n ++inbuf;\n ++n;\n if (inbuf === this.blockSize) {\n this.compress_(buf);\n inbuf = 0;\n // Jump to the outer loop so we use the full-block optimization.\n break;\n }\n }\n }\n }\n this.inbuf_ = inbuf;\n this.total_ += length;\n }\n /** @override */\n digest() {\n const digest = [];\n let totalBits = this.total_ * 8;\n // Add pad 0x80 0x00*.\n if (this.inbuf_ < 56) {\n this.update(this.pad_, 56 - this.inbuf_);\n }\n else {\n this.update(this.pad_, this.blockSize - (this.inbuf_ - 56));\n }\n // Add # bits.\n for (let i = this.blockSize - 1; i >= 56; i--) {\n this.buf_[i] = totalBits & 255;\n totalBits /= 256; // Don't use bit-shifting here!\n }\n this.compress_(this.buf_);\n let n = 0;\n for (let i = 0; i < 5; i++) {\n for (let j = 24; j >= 0; j -= 8) {\n digest[n] = (this.chain_[i] >> j) & 255;\n ++n;\n }\n }\n return digest;\n }\n}\n\n/**\n * Helper to make a Subscribe function (just like Promise helps make a\n * Thenable).\n *\n * @param executor Function which can make calls to a single Observer\n * as a proxy.\n * @param onNoObservers Callback when count of Observers goes to zero.\n */\nfunction createSubscribe(executor, onNoObservers) {\n const proxy = new ObserverProxy(executor, onNoObservers);\n return proxy.subscribe.bind(proxy);\n}\n/**\n * Implement fan-out for any number of Observers attached via a subscribe\n * function.\n */\nclass ObserverProxy {\n /**\n * @param executor Function which can make calls to a single Observer\n * as a proxy.\n * @param onNoObservers Callback when count of Observers goes to zero.\n */\n constructor(executor, onNoObservers) {\n this.observers = [];\n this.unsubscribes = [];\n this.observerCount = 0;\n // Micro-task scheduling by calling task.then().\n this.task = Promise.resolve();\n this.finalized = false;\n this.onNoObservers = onNoObservers;\n // Call the executor asynchronously so subscribers that are called\n // synchronously after the creation of the subscribe function\n // can still receive the very first value generated in the executor.\n this.task\n .then(() => {\n executor(this);\n })\n .catch(e => {\n this.error(e);\n });\n }\n next(value) {\n this.forEachObserver((observer) => {\n observer.next(value);\n });\n }\n error(error) {\n this.forEachObserver((observer) => {\n observer.error(error);\n });\n this.close(error);\n }\n complete() {\n this.forEachObserver((observer) => {\n observer.complete();\n });\n this.close();\n }\n /**\n * Subscribe function that can be used to add an Observer to the fan-out list.\n *\n * - We require that no event is sent to a subscriber synchronously to their\n * call to subscribe().\n */\n subscribe(nextOrObserver, error, complete) {\n let observer;\n if (nextOrObserver === undefined &&\n error === undefined &&\n complete === undefined) {\n throw new Error('Missing Observer.');\n }\n // Assemble an Observer object when passed as callback functions.\n if (implementsAnyMethods(nextOrObserver, [\n 'next',\n 'error',\n 'complete'\n ])) {\n observer = nextOrObserver;\n }\n else {\n observer = {\n next: nextOrObserver,\n error,\n complete\n };\n }\n if (observer.next === undefined) {\n observer.next = noop;\n }\n if (observer.error === undefined) {\n observer.error = noop;\n }\n if (observer.complete === undefined) {\n observer.complete = noop;\n }\n const unsub = this.unsubscribeOne.bind(this, this.observers.length);\n // Attempt to subscribe to a terminated Observable - we\n // just respond to the Observer with the final error or complete\n // event.\n if (this.finalized) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.task.then(() => {\n try {\n if (this.finalError) {\n observer.error(this.finalError);\n }\n else {\n observer.complete();\n }\n }\n catch (e) {\n // nothing\n }\n return;\n });\n }\n this.observers.push(observer);\n return unsub;\n }\n // Unsubscribe is synchronous - we guarantee that no events are sent to\n // any unsubscribed Observer.\n unsubscribeOne(i) {\n if (this.observers === undefined || this.observers[i] === undefined) {\n return;\n }\n delete this.observers[i];\n this.observerCount -= 1;\n if (this.observerCount === 0 && this.onNoObservers !== undefined) {\n this.onNoObservers(this);\n }\n }\n forEachObserver(fn) {\n if (this.finalized) {\n // Already closed by previous event....just eat the additional values.\n return;\n }\n // Since sendOne calls asynchronously - there is no chance that\n // this.observers will become undefined.\n for (let i = 0; i < this.observers.length; i++) {\n this.sendOne(i, fn);\n }\n }\n // Call the Observer via one of it's callback function. We are careful to\n // confirm that the observe has not been unsubscribed since this asynchronous\n // function had been queued.\n sendOne(i, fn) {\n // Execute the callback asynchronously\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.task.then(() => {\n if (this.observers !== undefined && this.observers[i] !== undefined) {\n try {\n fn(this.observers[i]);\n }\n catch (e) {\n // Ignore exceptions raised in Observers or missing methods of an\n // Observer.\n // Log error to console. b/31404806\n if (typeof console !== 'undefined' && console.error) {\n console.error(e);\n }\n }\n }\n });\n }\n close(err) {\n if (this.finalized) {\n return;\n }\n this.finalized = true;\n if (err !== undefined) {\n this.finalError = err;\n }\n // Proxy is no longer needed - garbage collect references\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.task.then(() => {\n this.observers = undefined;\n this.onNoObservers = undefined;\n });\n }\n}\n/** Turn synchronous function into one called asynchronously. */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction async(fn, onError) {\n return (...args) => {\n Promise.resolve(true)\n .then(() => {\n fn(...args);\n })\n .catch((error) => {\n if (onError) {\n onError(error);\n }\n });\n };\n}\n/**\n * Return true if the object passed in implements any of the named methods.\n */\nfunction implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (const method of methods) {\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}\nfunction noop() {\n // do nothing\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\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 * Check to make sure the appropriate number of arguments are provided for a public function.\n * Throws an error if it fails.\n *\n * @param fnName The function name\n * @param minCount The minimum number of arguments to allow for the function call\n * @param maxCount The maximum number of argument to allow for the function call\n * @param argCount The actual number of arguments provided.\n */\nconst validateArgCount = function (fnName, minCount, maxCount, argCount) {\n let argError;\n if (argCount < minCount) {\n argError = 'at least ' + minCount;\n }\n else if (argCount > maxCount) {\n argError = maxCount === 0 ? 'none' : 'no more than ' + maxCount;\n }\n if (argError) {\n const error = fnName +\n ' failed: Was called with ' +\n argCount +\n (argCount === 1 ? ' argument.' : ' arguments.') +\n ' Expects ' +\n argError +\n '.';\n throw new Error(error);\n }\n};\n/**\n * Generates a string to prefix an error message about failed argument validation\n *\n * @param fnName The function name\n * @param argName The name of the argument\n * @return The prefix to add to the error thrown for validation.\n */\nfunction errorPrefix(fnName, argName) {\n return `${fnName} failed: ${argName} argument `;\n}\n/**\n * @param fnName\n * @param argumentNumber\n * @param namespace\n * @param optional\n */\nfunction validateNamespace(fnName, namespace, optional) {\n if (optional && !namespace) {\n return;\n }\n if (typeof namespace !== 'string') {\n //TODO: I should do more validation here. We only allow certain chars in namespaces.\n throw new Error(errorPrefix(fnName, 'namespace') + 'must be a valid firebase namespace.');\n }\n}\nfunction validateCallback(fnName, argumentName, \n// eslint-disable-next-line @typescript-eslint/ban-types\ncallback, optional) {\n if (optional && !callback) {\n return;\n }\n if (typeof callback !== 'function') {\n throw new Error(errorPrefix(fnName, argumentName) + 'must be a valid function.');\n }\n}\nfunction validateContextObject(fnName, argumentName, context, optional) {\n if (optional && !context) {\n return;\n }\n if (typeof context !== 'object' || context === null) {\n throw new Error(errorPrefix(fnName, argumentName) + 'must be a valid context object.');\n }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\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// Code originally came from goog.crypt.stringToUtf8ByteArray, but for some reason they\n// automatically replaced '\\r\\n' with '\\n', and they didn't handle surrogate pairs,\n// so it's been modified.\n// Note that not all Unicode characters appear as single characters in JavaScript strings.\n// fromCharCode returns the UTF-16 encoding of a character - so some Unicode characters\n// use 2 characters in JavaScript. All 4-byte UTF-8 characters begin with a first\n// character in the range 0xD800 - 0xDBFF (the first character of a so-called surrogate\n// pair).\n// See http://www.ecma-international.org/ecma-262/5.1/#sec-15.1.3\n/**\n * @param {string} str\n * @return {Array}\n */\nconst stringToByteArray = function (str) {\n const out = [];\n let p = 0;\n for (let i = 0; i < str.length; i++) {\n let c = str.charCodeAt(i);\n // Is this the lead surrogate in a surrogate pair?\n if (c >= 0xd800 && c <= 0xdbff) {\n const high = c - 0xd800; // the high 10 bits.\n i++;\n assert(i < str.length, 'Surrogate pair missing trail surrogate.');\n const low = str.charCodeAt(i) - 0xdc00; // the low 10 bits.\n c = 0x10000 + (high << 10) + low;\n }\n if (c < 128) {\n out[p++] = c;\n }\n else if (c < 2048) {\n out[p++] = (c >> 6) | 192;\n out[p++] = (c & 63) | 128;\n }\n else if (c < 65536) {\n out[p++] = (c >> 12) | 224;\n out[p++] = ((c >> 6) & 63) | 128;\n out[p++] = (c & 63) | 128;\n }\n else {\n out[p++] = (c >> 18) | 240;\n out[p++] = ((c >> 12) & 63) | 128;\n out[p++] = ((c >> 6) & 63) | 128;\n out[p++] = (c & 63) | 128;\n }\n }\n return out;\n};\n/**\n * Calculate length without actually converting; useful for doing cheaper validation.\n * @param {string} str\n * @return {number}\n */\nconst stringLength = function (str) {\n let p = 0;\n for (let i = 0; i < str.length; i++) {\n const c = str.charCodeAt(i);\n if (c < 128) {\n p++;\n }\n else if (c < 2048) {\n p += 2;\n }\n else if (c >= 0xd800 && c <= 0xdbff) {\n // Lead surrogate of a surrogate pair. The pair together will take 4 bytes to represent.\n p += 4;\n i++; // skip trail surrogate.\n }\n else {\n p += 3;\n }\n }\n return p;\n};\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 * The amount of milliseconds to exponentially increase.\n */\nconst DEFAULT_INTERVAL_MILLIS = 1000;\n/**\n * The factor to backoff by.\n * Should be a number greater than 1.\n */\nconst DEFAULT_BACKOFF_FACTOR = 2;\n/**\n * The maximum milliseconds to increase to.\n *\n *

Visible for testing\n */\nconst MAX_VALUE_MILLIS = 4 * 60 * 60 * 1000; // Four hours, like iOS and Android.\n/**\n * The percentage of backoff time to randomize by.\n * See\n * http://go/safe-client-behavior#step-1-determine-the-appropriate-retry-interval-to-handle-spike-traffic\n * for context.\n *\n *

Visible for testing\n */\nconst RANDOM_FACTOR = 0.5;\n/**\n * Based on the backoff method from\n * https://github.com/google/closure-library/blob/master/closure/goog/math/exponentialbackoff.js.\n * Extracted here so we don't need to pass metadata and a stateful ExponentialBackoff object around.\n */\nfunction calculateBackoffMillis(backoffCount, intervalMillis = DEFAULT_INTERVAL_MILLIS, backoffFactor = DEFAULT_BACKOFF_FACTOR) {\n // Calculates an exponentially increasing value.\n // Deviation: calculates value from count and a constant interval, so we only need to save value\n // and count to restore state.\n const currBaseValue = intervalMillis * Math.pow(backoffFactor, backoffCount);\n // A random \"fuzz\" to avoid waves of retries.\n // Deviation: randomFactor is required.\n const randomWait = Math.round(\n // A fraction of the backoff value to add/subtract.\n // Deviation: changes multiplication order to improve readability.\n RANDOM_FACTOR *\n currBaseValue *\n // A random float (rounded to int by Math.round above) in the range [-1, 1]. Determines\n // if we add or subtract.\n (Math.random() - 0.5) *\n 2);\n // Limits backoff to max to avoid effectively permanent backoff.\n return Math.min(MAX_VALUE_MILLIS, currBaseValue + randomWait);\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\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 * Provide English ordinal letters after a number\n */\nfunction ordinal(i) {\n if (!Number.isFinite(i)) {\n return `${i}`;\n }\n return i + indicator(i);\n}\nfunction indicator(i) {\n i = Math.abs(i);\n const cent = i % 100;\n if (cent >= 10 && cent <= 20) {\n return 'th';\n }\n const dec = i % 10;\n if (dec === 1) {\n return 'st';\n }\n if (dec === 2) {\n return 'nd';\n }\n if (dec === 3) {\n return 'rd';\n }\n return 'th';\n}\n\n/**\n * @license\n * Copyright 2021 Google LLC\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 */\nfunction getModularInstance(service) {\n if (service && service._delegate) {\n return service._delegate;\n }\n else {\n return service;\n }\n}\n\nexport { CONSTANTS, DecodeBase64StringError, Deferred, ErrorFactory, FirebaseError, MAX_VALUE_MILLIS, RANDOM_FACTOR, Sha1, areCookiesEnabled, assert, assertionError, async, base64, base64Decode, base64Encode, base64urlEncodeWithoutPadding, calculateBackoffMillis, contains, createMockUserToken, createSubscribe, decode, deepCopy, deepEqual, deepExtend, errorPrefix, extractQuerystring, getDefaultAppConfig, getDefaultEmulatorHost, getDefaultEmulatorHostnameAndPort, getDefaults, getExperimentalSetting, getGlobal, getModularInstance, getUA, isAdmin, isBrowser, isBrowserExtension, isCloudflareWorker, isElectron, isEmpty, isIE, isIndexedDBAvailable, isMobileCordova, isNode, isNodeSdk, isReactNative, isSafari, isUWP, isValidFormat, isValidTimestamp, isWebWorker, issuedAtTime, jsonEval, map, ordinal, promiseWithTimeout, querystring, querystringDecode, safeGet, stringLength, stringToByteArray, stringify, validateArgCount, validateCallback, validateContextObject, validateIndexedDBOpenable, validateNamespace };\n","import { isThenable } from './is.js';\n\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/** SyncPromise internal states */\nvar States; (function (States) {\n /** Pending */\n const PENDING = 0; States[States[\"PENDING\"] = PENDING] = \"PENDING\";\n /** Resolved / OK */\n const RESOLVED = 1; States[States[\"RESOLVED\"] = RESOLVED] = \"RESOLVED\";\n /** Rejected / Error */\n const REJECTED = 2; States[States[\"REJECTED\"] = REJECTED] = \"REJECTED\";\n})(States || (States = {}));\n\n// Overloads so we can call resolvedSyncPromise without arguments and generic argument\n\n/**\n * Creates a resolved sync promise.\n *\n * @param value the value to resolve the promise with\n * @returns the resolved sync promise\n */\nfunction resolvedSyncPromise(value) {\n return new SyncPromise(resolve => {\n resolve(value);\n });\n}\n\n/**\n * Creates a rejected sync promise.\n *\n * @param value the value to reject the promise with\n * @returns the rejected sync promise\n */\nfunction rejectedSyncPromise(reason) {\n return new SyncPromise((_, reject) => {\n reject(reason);\n });\n}\n\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\nclass SyncPromise {\n\n constructor(\n executor,\n ) {SyncPromise.prototype.__init.call(this);SyncPromise.prototype.__init2.call(this);SyncPromise.prototype.__init3.call(this);SyncPromise.prototype.__init4.call(this);\n this._state = States.PENDING;\n this._handlers = [];\n\n try {\n executor(this._resolve, this._reject);\n } catch (e) {\n this._reject(e);\n }\n }\n\n /** JSDoc */\n then(\n onfulfilled,\n onrejected,\n ) {\n return new SyncPromise((resolve, reject) => {\n this._handlers.push([\n false,\n result => {\n if (!onfulfilled) {\n // TODO: ¯\\_(ツ)_/¯\n // TODO: FIXME\n resolve(result );\n } else {\n try {\n resolve(onfulfilled(result));\n } catch (e) {\n reject(e);\n }\n }\n },\n reason => {\n if (!onrejected) {\n reject(reason);\n } else {\n try {\n resolve(onrejected(reason));\n } catch (e) {\n reject(e);\n }\n }\n },\n ]);\n this._executeHandlers();\n });\n }\n\n /** JSDoc */\n catch(\n onrejected,\n ) {\n return this.then(val => val, onrejected);\n }\n\n /** JSDoc */\n finally(onfinally) {\n return new SyncPromise((resolve, reject) => {\n let val;\n let isRejected;\n\n return this.then(\n value => {\n isRejected = false;\n val = value;\n if (onfinally) {\n onfinally();\n }\n },\n reason => {\n isRejected = true;\n val = reason;\n if (onfinally) {\n onfinally();\n }\n },\n ).then(() => {\n if (isRejected) {\n reject(val);\n return;\n }\n\n resolve(val );\n });\n });\n }\n\n /** JSDoc */\n __init() {this._resolve = (value) => {\n this._setResult(States.RESOLVED, value);\n };}\n\n /** JSDoc */\n __init2() {this._reject = (reason) => {\n this._setResult(States.REJECTED, reason);\n };}\n\n /** JSDoc */\n __init3() {this._setResult = (state, value) => {\n if (this._state !== States.PENDING) {\n return;\n }\n\n if (isThenable(value)) {\n void (value ).then(this._resolve, this._reject);\n return;\n }\n\n this._state = state;\n this._value = value;\n\n this._executeHandlers();\n };}\n\n /** JSDoc */\n __init4() {this._executeHandlers = () => {\n if (this._state === States.PENDING) {\n return;\n }\n\n const cachedHandlers = this._handlers.slice();\n this._handlers = [];\n\n cachedHandlers.forEach(handler => {\n if (handler[0]) {\n return;\n }\n\n if (this._state === States.RESOLVED) {\n handler[1](this._value );\n }\n\n if (this._state === States.REJECTED) {\n handler[2](this._value);\n }\n\n handler[0] = true;\n });\n };}\n}\n\nexport { SyncPromise, rejectedSyncPromise, resolvedSyncPromise };\n","import * as i0 from '@angular/core';\nimport { Component, ViewEncapsulation, Input, HostBinding, HostListener, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport * as i1 from '@videogular/ngx-videogular/core';\nimport { VgStates, VgCoreModule } from '@videogular/ngx-videogular/core';\n\nclass VgOverlayPlayComponent {\n constructor(ref, API, fsAPI, controlsHidden) {\n this.API = API;\n this.fsAPI = fsAPI;\n this.controlsHidden = controlsHidden;\n this.vgSkipIfControlsHidden = false;\n this.vgSkipIfControlsHiddenDelay = 0.5;\n this.isNativeFullscreen = false;\n this.areControlsHidden = false;\n this.areControlsHiddenChangeTime = 0;\n this.subscriptions = [];\n this.isBuffering = false;\n this.elem = ref.nativeElement;\n }\n ngOnInit() {\n if (this.API.isPlayerReady) {\n this.onPlayerReady();\n }\n else {\n this.subscriptions.push(this.API.playerReadyEvent.subscribe(() => this.onPlayerReady()));\n }\n }\n onPlayerReady() {\n this.target = this.API.getMediaById(this.vgFor);\n this.subscriptions.push(this.fsAPI.onChangeFullscreen.subscribe(this.onChangeFullscreen.bind(this)));\n this.subscriptions.push(this.controlsHidden.isHidden.subscribe(this.onHideControls.bind(this)));\n this.subscriptions.push(this.target.subscriptions.bufferDetected.subscribe((isBuffering) => this.onUpdateBuffer(isBuffering)));\n }\n onUpdateBuffer(isBuffering) {\n this.isBuffering = isBuffering;\n }\n onChangeFullscreen(fsState) {\n if (this.fsAPI.nativeFullscreen) {\n this.isNativeFullscreen = fsState;\n }\n }\n onHideControls(hidden) {\n if (this.vgSkipIfControlsHidden && this.areControlsHidden != hidden) {\n this.areControlsHiddenChangeTime = Date.now();\n }\n this.areControlsHidden = hidden;\n }\n onClick() {\n if (this.vgSkipIfControlsHidden && (this.areControlsHidden || (Date.now() - this.areControlsHiddenChangeTime) < this.vgSkipIfControlsHiddenDelay * 1000)) {\n return;\n }\n const state = this.getState();\n switch (state) {\n case VgStates.VG_PLAYING:\n this.target.pause();\n break;\n case VgStates.VG_PAUSED:\n case VgStates.VG_ENDED:\n this.target.play();\n break;\n }\n }\n getState() {\n let state = VgStates.VG_PAUSED;\n if (this.target) {\n if (this.target.state instanceof Array) {\n for (let i = 0, l = this.target.state.length; i < l; i++) {\n if (this.target.state[i] === VgStates.VG_PLAYING) {\n state = VgStates.VG_PLAYING;\n break;\n }\n }\n }\n else {\n state = this.target.state;\n }\n }\n return state;\n }\n ngOnDestroy() {\n this.subscriptions.forEach((s) => s.unsubscribe());\n }\n}\n/** @nocollapse */ /** @nocollapse */ VgOverlayPlayComponent.ɵfac = function VgOverlayPlayComponent_Factory(t) { return new (t || VgOverlayPlayComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.VgApiService), i0.ɵɵdirectiveInject(i1.VgFullscreenApiService), i0.ɵɵdirectiveInject(i1.VgControlsHiddenService)); };\n/** @nocollapse */ /** @nocollapse */ VgOverlayPlayComponent.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: VgOverlayPlayComponent, selectors: [[\"vg-overlay-play\"]], hostVars: 2, hostBindings: function VgOverlayPlayComponent_HostBindings(rf, ctx) { if (rf & 1) {\n i0.ɵɵlistener(\"click\", function VgOverlayPlayComponent_click_HostBindingHandler() { return ctx.onClick(); });\n } if (rf & 2) {\n i0.ɵɵclassProp(\"is-buffering\", ctx.isBuffering);\n } }, inputs: { vgFor: \"vgFor\", vgSkipIfControlsHidden: \"vgSkipIfControlsHidden\", vgSkipIfControlsHiddenDelay: \"vgSkipIfControlsHiddenDelay\" }, decls: 2, vars: 6, consts: [[1, \"vg-overlay-play\"], [1, \"overlay-play-container\"]], template: function VgOverlayPlayComponent_Template(rf, ctx) { if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 0);\n i0.ɵɵelement(1, \"div\", 1);\n i0.ɵɵelementEnd();\n } if (rf & 2) {\n i0.ɵɵclassProp(\"native-fullscreen\", ctx.isNativeFullscreen)(\"controls-hidden\", ctx.areControlsHidden);\n i0.ɵɵadvance(1);\n i0.ɵɵclassProp(\"vg-icon-play_arrow\", ctx.getState() !== \"playing\");\n } }, styles: [\"vg-overlay-play{z-index:200}vg-overlay-play.is-buffering{display:none}vg-overlay-play .vg-overlay-play{transition:all .5s;cursor:pointer;position:absolute;display:block;color:#fff;width:100%;height:100%;font-size:80px;filter:alpha(opacity=60);opacity:.6}vg-overlay-play .vg-overlay-play.native-fullscreen.controls-hidden{cursor:none}vg-overlay-play .vg-overlay-play .overlay-play-container.vg-icon-play_arrow{pointer-events:none;width:100%;height:100%;position:absolute;display:flex;align-items:center;justify-content:center;font-size:80px}vg-overlay-play .vg-overlay-play:hover{filter:alpha(opacity=100);opacity:1}vg-overlay-play .vg-overlay-play:hover .overlay-play-container.vg-icon-play_arrow:before{transform:scale(1.2)}\\n\"], encapsulation: 2 });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(VgOverlayPlayComponent, [{\n type: Component,\n args: [{\n selector: 'vg-overlay-play',\n encapsulation: ViewEncapsulation.None,\n template: `\n \n `,\n styles: [\n `\n vg-overlay-play {\n z-index: 200;\n }\n vg-overlay-play.is-buffering {\n display: none;\n }\n vg-overlay-play .vg-overlay-play {\n transition: all 0.5s;\n cursor: pointer;\n position: absolute;\n display: block;\n color: white;\n width: 100%;\n height: 100%;\n font-size: 80px;\n filter: alpha(opacity=60);\n opacity: 0.6;\n }\n vg-overlay-play .vg-overlay-play.native-fullscreen.controls-hidden {\n cursor: none;\n }\n vg-overlay-play\n .vg-overlay-play\n .overlay-play-container.vg-icon-play_arrow {\n pointer-events: none;\n width: 100%;\n height: 100%;\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 80px;\n }\n vg-overlay-play .vg-overlay-play:hover {\n filter: alpha(opacity=100);\n opacity: 1;\n }\n vg-overlay-play\n .vg-overlay-play:hover\n .overlay-play-container.vg-icon-play_arrow:before {\n transform: scale(1.2);\n }\n `,\n ],\n }]\n }], function () { return [{ type: i0.ElementRef }, { type: i1.VgApiService }, { type: i1.VgFullscreenApiService }, { type: i1.VgControlsHiddenService }]; }, { vgFor: [{\n type: Input\n }], vgSkipIfControlsHidden: [{\n type: Input\n }], vgSkipIfControlsHiddenDelay: [{\n type: Input\n }], isBuffering: [{\n type: HostBinding,\n args: ['class.is-buffering']\n }], onClick: [{\n type: HostListener,\n args: ['click']\n }] }); })();\n\nclass VgOverlayPlayModule {\n}\n/** @nocollapse */ /** @nocollapse */ VgOverlayPlayModule.ɵfac = function VgOverlayPlayModule_Factory(t) { return new (t || VgOverlayPlayModule)(); };\n/** @nocollapse */ /** @nocollapse */ VgOverlayPlayModule.ɵmod = /** @pureOrBreakMyCode */ i0.ɵɵdefineNgModule({ type: VgOverlayPlayModule });\n/** @nocollapse */ /** @nocollapse */ VgOverlayPlayModule.ɵinj = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjector({ imports: [[CommonModule, VgCoreModule]] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(VgOverlayPlayModule, [{\n type: NgModule,\n args: [{\n imports: [CommonModule, VgCoreModule],\n declarations: [VgOverlayPlayComponent],\n exports: [VgOverlayPlayComponent],\n }]\n }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && i0.ɵɵsetNgModuleScope(VgOverlayPlayModule, { declarations: [VgOverlayPlayComponent], imports: [CommonModule, VgCoreModule], exports: [VgOverlayPlayComponent] }); })();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { VgOverlayPlayComponent, VgOverlayPlayModule };\n","import { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { config, INITIAL_CONFIG, initialConfig, NEW_CONFIG, optionsConfig } from './config';\nimport { MaskApplierService } from './mask-applier.service';\nimport { MaskDirective } from './mask.directive';\nimport { MaskPipe } from './mask.pipe';\n\n@NgModule({\n exports: [MaskDirective, MaskPipe],\n declarations: [MaskDirective, MaskPipe],\n})\nexport class NgxMaskModule {\n public static forRoot(configValue?: optionsConfig | (() => optionsConfig)): ModuleWithProviders {\n return {\n ngModule: NgxMaskModule,\n providers: [\n {\n provide: NEW_CONFIG,\n useValue: configValue,\n },\n {\n provide: INITIAL_CONFIG,\n useValue: initialConfig,\n },\n {\n provide: config,\n useFactory: _configFactory,\n deps: [INITIAL_CONFIG, NEW_CONFIG],\n },\n MaskApplierService,\n ],\n };\n }\n public static forChild(): ModuleWithProviders {\n return {\n ngModule: NgxMaskModule,\n };\n }\n}\n\n/**\n * @internal\n */\nexport function _configFactory(\n initConfig: optionsConfig,\n configValue: optionsConfig | (() => optionsConfig)\n): optionsConfig {\n return configValue instanceof Function ? { ...initConfig, ...configValue() } : { ...initConfig, ...configValue };\n}\n","const STACKTRACE_FRAME_LIMIT = 50;\nconst UNKNOWN_FUNCTION = '?';\n// Used to sanitize webpack (error: *) wrapped stack errors\nconst WEBPACK_ERROR_REGEXP = /\\(error: (.*)\\)/;\nconst STRIP_FRAME_REGEXP = /captureMessage|captureException/;\n\n/**\n * Creates a stack parser with the supplied line parsers\n *\n * StackFrames are returned in the correct order for Sentry Exception\n * frames and with Sentry SDK internal frames removed from the top and bottom\n *\n */\nfunction createStackParser(...parsers) {\n const sortedParsers = parsers.sort((a, b) => a[0] - b[0]).map(p => p[1]);\n\n return (stack, skipFirstLines = 0, framesToPop = 0) => {\n const frames = [];\n const lines = stack.split('\\n');\n\n for (let i = skipFirstLines; i < lines.length; i++) {\n const line = lines[i] ;\n // Ignore lines over 1kb as they are unlikely to be stack frames.\n // Many of the regular expressions use backtracking which results in run time that increases exponentially with\n // input size. Huge strings can result in hangs/Denial of Service:\n // https://github.com/getsentry/sentry-javascript/issues/2286\n if (line.length > 1024) {\n continue;\n }\n\n // https://github.com/getsentry/sentry-javascript/issues/5459\n // Remove webpack (error: *) wrappers\n const cleanedLine = WEBPACK_ERROR_REGEXP.test(line) ? line.replace(WEBPACK_ERROR_REGEXP, '$1') : line;\n\n // https://github.com/getsentry/sentry-javascript/issues/7813\n // Skip Error: lines\n if (cleanedLine.match(/\\S*Error: /)) {\n continue;\n }\n\n for (const parser of sortedParsers) {\n const frame = parser(cleanedLine);\n\n if (frame) {\n frames.push(frame);\n break;\n }\n }\n\n if (frames.length >= STACKTRACE_FRAME_LIMIT + framesToPop) {\n break;\n }\n }\n\n return stripSentryFramesAndReverse(frames.slice(framesToPop));\n };\n}\n\n/**\n * Gets a stack parser implementation from Options.stackParser\n * @see Options\n *\n * If options contains an array of line parsers, it is converted into a parser\n */\nfunction stackParserFromStackParserOptions(stackParser) {\n if (Array.isArray(stackParser)) {\n return createStackParser(...stackParser);\n }\n return stackParser;\n}\n\n/**\n * Removes Sentry frames from the top and bottom of the stack if present and enforces a limit of max number of frames.\n * Assumes stack input is ordered from top to bottom and returns the reverse representation so call site of the\n * function that caused the crash is the last frame in the array.\n * @hidden\n */\nfunction stripSentryFramesAndReverse(stack) {\n if (!stack.length) {\n return [];\n }\n\n const localStack = Array.from(stack);\n\n // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)\n if (/sentryWrapped/.test(getLastStackFrame(localStack).function || '')) {\n localStack.pop();\n }\n\n // Reversing in the middle of the procedure allows us to just pop the values off the stack\n localStack.reverse();\n\n // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)\n if (STRIP_FRAME_REGEXP.test(getLastStackFrame(localStack).function || '')) {\n localStack.pop();\n\n // When using synthetic events, we will have a 2 levels deep stack, as `new Error('Sentry syntheticException')`\n // is produced within the hub itself, making it:\n //\n // Sentry.captureException()\n // getCurrentHub().captureException()\n //\n // instead of just the top `Sentry` call itself.\n // This forces us to possibly strip an additional frame in the exact same was as above.\n if (STRIP_FRAME_REGEXP.test(getLastStackFrame(localStack).function || '')) {\n localStack.pop();\n }\n }\n\n return localStack.slice(0, STACKTRACE_FRAME_LIMIT).map(frame => ({\n ...frame,\n filename: frame.filename || getLastStackFrame(localStack).filename,\n function: frame.function || UNKNOWN_FUNCTION,\n }));\n}\n\nfunction getLastStackFrame(arr) {\n return arr[arr.length - 1] || {};\n}\n\nconst defaultFunctionName = '';\n\n/**\n * Safely extract function name from itself\n */\nfunction getFunctionName(fn) {\n try {\n if (!fn || typeof fn !== 'function') {\n return defaultFunctionName;\n }\n return fn.name || defaultFunctionName;\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n return defaultFunctionName;\n }\n}\n\n/**\n * Get's stack frames from an event without needing to check for undefined properties.\n */\nfunction getFramesFromEvent(event) {\n const exception = event.exception;\n\n if (exception) {\n const frames = [];\n try {\n // @ts-expect-error Object could be undefined\n exception.values.forEach(value => {\n // @ts-expect-error Value could be undefined\n if (value.stacktrace.frames) {\n // @ts-expect-error Value could be undefined\n frames.push(...value.stacktrace.frames);\n }\n });\n return frames;\n } catch (_oO) {\n return undefined;\n }\n }\n return undefined;\n}\n\nexport { UNKNOWN_FUNCTION, createStackParser, getFramesFromEvent, getFunctionName, stackParserFromStackParserOptions, stripSentryFramesAndReverse };\n","//! moment.js locale configuration\n//! locale : Faroese [fo]\n//! author : Ragnar Johannesen : https://github.com/ragnar123\n//! author : Kristian Sakarisson : https://github.com/sakarisson\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var fo = moment.defineLocale('fo', {\n months: 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split(\n '_'\n ),\n monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),\n weekdays:\n 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split(\n '_'\n ),\n weekdaysShort: 'sun_mán_týs_mik_hós_frí_ley'.split('_'),\n weekdaysMin: 'su_má_tý_mi_hó_fr_le'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D. MMMM, YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Í dag kl.] LT',\n nextDay: '[Í morgin kl.] LT',\n nextWeek: 'dddd [kl.] LT',\n lastDay: '[Í gjár kl.] LT',\n lastWeek: '[síðstu] dddd [kl] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'um %s',\n past: '%s síðani',\n s: 'fá sekund',\n ss: '%d sekundir',\n m: 'ein minuttur',\n mm: '%d minuttir',\n h: 'ein tími',\n hh: '%d tímar',\n d: 'ein dagur',\n dd: '%d dagar',\n M: 'ein mánaður',\n MM: '%d mánaðir',\n y: 'eitt ár',\n yy: '%d ár',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return fo;\n\n})));\n","import { popScheduler } from '../util/args';\nimport { from } from './from';\nexport function of(...args) {\n const scheduler = popScheduler(args);\n return from(args, scheduler);\n}\n","import { AmplifyErrorCode } from '../types/errors.mjs';\nimport { AmplifyError } from './AmplifyError.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nclass PlatformNotSupportedError extends AmplifyError {\n constructor() {\n super({\n name: AmplifyErrorCode.PlatformNotSupported,\n message: 'Function not supported on current platform',\n });\n }\n}\n\nexport { PlatformNotSupportedError };\n","//! moment.js locale configuration\n//! locale : Chuvash [cv]\n//! author : Anatoly Mironov : https://github.com/mirontoli\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var cv = moment.defineLocale('cv', {\n months: 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split(\n '_'\n ),\n monthsShort: 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'),\n weekdays:\n 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split(\n '_'\n ),\n weekdaysShort: 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'),\n weekdaysMin: 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD-MM-YYYY',\n LL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]',\n LLL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',\n LLLL: 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',\n },\n calendar: {\n sameDay: '[Паян] LT [сехетре]',\n nextDay: '[Ыран] LT [сехетре]',\n lastDay: '[Ӗнер] LT [сехетре]',\n nextWeek: '[Ҫитес] dddd LT [сехетре]',\n lastWeek: '[Иртнӗ] dddd LT [сехетре]',\n sameElse: 'L',\n },\n relativeTime: {\n future: function (output) {\n var affix = /сехет$/i.exec(output)\n ? 'рен'\n : /ҫул$/i.exec(output)\n ? 'тан'\n : 'ран';\n return output + affix;\n },\n past: '%s каялла',\n s: 'пӗр-ик ҫеккунт',\n ss: '%d ҫеккунт',\n m: 'пӗр минут',\n mm: '%d минут',\n h: 'пӗр сехет',\n hh: '%d сехет',\n d: 'пӗр кун',\n dd: '%d кун',\n M: 'пӗр уйӑх',\n MM: '%d уйӑх',\n y: 'пӗр ҫул',\n yy: '%d ҫул',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-мӗш/,\n ordinal: '%d-мӗш',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return cv;\n\n})));\n","import { Injectable } from '@angular/core';\nimport {\n ApiCacheService,\n ApiResponse,\n DesktopCard,\n DesktopCardCaseType,\n DesktopCardSegment,\n DesktopSegmentType,\n PayrollAccountResponse,\n PayrollScheduleResponse,\n} from '@brightside-web/desktop/data-access/shared';\nimport { Observable, of } from 'rxjs';\nimport { catchError, map } from 'rxjs/operators';\nimport {\n AwsApiWrapperService,\n BsApiService,\n BsCacheService,\n BsHubService,\n} from '@brightside-web/desktop/data-access/core-services';\nimport { HubCapsule } from 'aws-amplify/utils';\nimport { CurrencyPipe } from '@angular/common';\nimport { LoanPayload } from '@brightside-web/desktop/feature/loans';\nimport { ActivatedRoute } from '@angular/router';\n\nconst useRealData = true;\n\nexport enum LoanStatus {\n LOAN_APPROVED = 'LOAN_APPROVED',\n LOAN_PENDING = 'LOAN_PENDING',\n LOAN_DECLINED = 'LOAN_DECLINED',\n ACCOUNT_CREATED = 'ACCOUNT_CREATED',\n LOAN_NON_REPAYABLE_BANKRUPTCY = 'LOAN_NON_REPAYABLE_BANKRUPTCY',\n LOAN_FUNDING_FAILED = 'LOAN_FUNDING_FAILED',\n LOAN_PROCESS_PENDING = 'LOAN_PROCESS_PENDING',\n LOAN_PROCESS_ERROR = 'LOAN_PROCESS_ERROR',\n LOAN_FUNDED = 'LOAN_FUNDED',\n LOAN_DENIED = 'LOAN_DENIED',\n LOAN_NOT_APPROVED = 'LOAN_NOT_APPROVED',\n LOAN_NON_REPAYABLE = 'LOAN_NON_REPAYABLE',\n LOAN_PAID_OFF = 'LOAN_PAID_OFF',\n LOAN_OFFERED = 'LOAN_OFFERED',\n APPLICATION_TECHNICAL_ISSUE = 'APPLICATION_TECHNICAL_ISSUE',\n USER_ACTION_REQUIRED = 'USER_ACTION_REQUIRED',\n APPLICATION_REVIEW = 'APPLICATION_REVIEW',\n LOAN_ACCEPTED = 'LOAN_ACCEPTED',\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class LoansService {\n constructor(\n private apiCache: ApiCacheService,\n private awsApiWrapperService: AwsApiWrapperService,\n private bsCacheService: BsCacheService,\n private bsHubService: BsHubService,\n private currencyPipe: CurrencyPipe,\n private _bsApi: BsApiService,\n private _route: ActivatedRoute\n ) {\n this.bsHubService.listen('LoansChannel', (data: HubCapsule) => {\n if (data.payload.event === 'refreshStatus') {\n this.getPayrollAccountStatus(true).subscribe((response) =>\n this.bsHubService.dispatch('LoansChannel', { event: 'accountRefresh', data: response })\n );\n }\n });\n }\n\n // getLoanState(cardType?: string): LoanState {\n // if (cardType) {\n // return Cache.getItem(`loanState${cardType}`);\n // } else {\n // return Cache.getItem(`loanState${Cache.getItem('activeCaseType')}`);\n // }\n // }\n\n async groomCardData(startingData: DesktopCard): Promise {\n\n if (startingData.case_type === DesktopCardCaseType.LOAN_DASHBOARD) {\n const defaultSegment = startingData.segments\n ? startingData.segments.find((seg: DesktopCardSegment) => seg.type === DesktopSegmentType.DEFAULT)\n : undefined;\n if (defaultSegment) {\n const partnerName = this._route.snapshot.queryParamMap.get('vendor') || '';\n const loanPayload = await this._bsApi\n .get('api-mobile', `/loans-app-api?partnerType=${partnerName}`)\n .toPromise();\n let loan = loanPayload?.payload?.loans?.filter((loan) => loan.isTaken)[0];\n if (!loan) {\n loan = loanPayload?.payload?.loans?.filter((loan) =>\n [\n LoanStatus.LOAN_PROCESS_PENDING,\n LoanStatus.LOAN_PENDING,\n LoanStatus.ACCOUNT_CREATED,\n LoanStatus.LOAN_APPROVED,\n LoanStatus.LOAN_FUNDED,\n LoanStatus.LOAN_PROCESS_ERROR,\n LoanStatus.LOAN_OFFERED,\n LoanStatus.APPLICATION_TECHNICAL_ISSUE,\n LoanStatus.USER_ACTION_REQUIRED,\n LoanStatus.APPLICATION_REVIEW,\n LoanStatus.LOAN_ACCEPTED,\n ].includes(loan.status)\n )[0];\n }\n defaultSegment.dynamicValue = this.currencyPipe.transform(loan?.remainingBalance) || '$0.00';\n }\n } else {\n const pathPieces = startingData.ctaPath?.split(';') || [];\n const keyvalpairs = pathPieces.slice(1);\n const kvmap = keyvalpairs.reduce((p, c) => {\n const keyval: string[] = c.split('=');\n p[keyval[0]] = keyval[1];\n return p;\n }, {} as Record);\n const loanState: LoanState = {\n type: kvmap['type'] as LoanFundingType,\n vendor: kvmap['vendor'],\n consent: kvmap['consent']?.split(','),\n cardType: kvmap['cardtype'],\n };\n\n this.bsCacheService.setItem(`loanState${kvmap['cardtype']}`, loanState);\n\n startingData.vendor = loanState.vendor;\n startingData.ctaPath = '/loans/landing';\n }\n return startingData;\n }\n\n // MW payroll-loan.service getLoanRedirectUrl\n /**\n * does not throw API errors, it maps them to a LoanLinkResponse with errorMessage populated\n * @param vendor\n */\n getLoanLink(vendor: string): Observable {\n return this.apiCache.get('api-mobile', `/loans/payrollbased?provider=${vendor}`).pipe(\n // apiCache does not cache an error response (how could we both cache it and return cached response as an error)\n catchError((err) => of(err.response.data))\n );\n }\n\n // MW payroll-loan.service createPayrollCustodialAccount\n // createPayrollCustodialAccount(): Observable {\n // this.apiCache.refreshItem(`/loans/payrollbased?provider=${this.getLoanState().vendor}`);\n // this.apiCache.refreshItem(`/payroll/account`);\n // return from(API.post('api-mobile', '/payroll', { headers: { 'Content-Type': 'application/json' } }));\n // }\n\n // MW payroll-loan.service fetchPayrollCustodialAccount\n getPayrollAccountStatus(force = false): Observable {\n if (force) {\n this.apiCache.refreshItem('/payroll/account');\n }\n return this.apiCache.get('api-mobile', '/payroll/account').pipe(map((response) => response.status));\n }\n\n //MW finsol shared payroll.service getPayrollSchedule\n getPayrollSchedule(): Observable {\n //TODO we have the same call in another service, should use one call one service\n if (useRealData) {\n return this.apiCache.get('api-mobile', '/payroll/schedule');\n }\n return of({\n schedule: [\n '2023-03-03',\n '2023-03-17',\n '2023-03-31',\n '2023-04-14',\n '2023-04-28',\n '2023-05-12',\n '2023-05-26',\n '2023-06-09',\n '2023-06-23',\n '2023-07-07',\n '2023-07-21',\n '2023-08-04',\n '2023-08-18',\n '2023-09-01',\n '2023-09-15',\n '2023-09-29',\n '2023-10-13',\n '2023-10-27',\n '2023-11-10',\n '2023-11-24',\n '2023-12-08',\n '2023-12-22',\n '2024-01-05',\n '2024-01-19',\n '2024-02-02',\n '2024-02-16',\n '2024-03-01',\n '2024-03-15',\n '2024-03-29',\n '2024-04-12',\n '2024-04-26',\n '2024-05-10',\n '2024-05-24',\n '2024-06-07',\n '2024-06-21',\n '2024-07-05',\n '2024-07-19',\n '2024-08-02',\n '2024-08-16',\n '2024-08-30',\n '2024-09-13',\n '2024-09-27',\n '2024-10-11',\n '2024-10-25',\n '2024-11-08',\n '2024-11-22',\n '2024-12-06',\n '2024-12-20',\n '2025-01-03',\n ],\n });\n }\n}\nexport enum LoanFundingType {\n ACH = 'ach' /** we do not support ach loans at this time **/,\n PAYROLL = 'payroll',\n}\nexport interface LoanState {\n type: LoanFundingType;\n vendor: string;\n consent: string[];\n cardType?: string;\n}\nexport interface LoanLinkResponse {\n link?: string;\n errorMessage?: string;\n}\n\nexport interface LoanObject {\n [key: string]: any;\n}\n","import { Injectable } from '@angular/core';\nimport { defer, forkJoin, from, Observable, of } from 'rxjs';\nimport { mergeMap, switchMap, tap } from 'rxjs/operators';\nimport { SavingsAccountService } from '@brightside-web/desktop/data-access/savings';\nimport { Environment } from '@brightside-web/micro/core/environment';\nimport {\n ApiCacheService,\n ApiResponse,\n LinkedBank,\n LinkedBankStatus,\n SavingsAccount,\n SavingsAch,\n SavingsTransaction, SavingsTransactionCategory,\n} from '@brightside-web/desktop/data-access/shared';\n// eslint-disable-next-line @nrwl/nx/enforce-module-boundaries\nimport { LinkedAccountService } from '@brightside-web/desktop/data-access/account-linking';\nimport {\n AwsApiWrapperService\n} from '@brightside-web/desktop/data-access/core-services';\nimport { SavingsTestData } from './savings-test-data';\n\nexport const BRIGHTSIDE_SAVINGS_ACCOUNT_ID = 'BRIGHTSIDESAVINGS';\nexport const BRIGHTSIDE_SAVINGS_INSTITUTION_NAME = 'Brightside';\nexport const BRIGHTSIDE_SAVINGS_ICON = 'brightside-logo';\nexport const EXTERNAL_SAVINGS_ICON = 'fi-icon';\nexport const TRANSFER_FUNDS_ACCOUNT_LIMIT = 1;\n// this is just for local testing\nconst useRealData = true;\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ExternalSavingsService {\n constructor(\n private env: Environment,\n private savingsAccountService: SavingsAccountService,\n private apiCache: ApiCacheService,\n private linkedAccountService: LinkedAccountService,\n private awsApiWrapperService: AwsApiWrapperService\n ) {}\n\n static hasBrightsideSavingsAccountInAccounts(accounts: InternalOrExternalSavingsAccount[]): boolean {\n return Boolean(accounts.find((account) => account.type === SavingsAccountType.BRIGHTSIDE));\n }\n\n /**\n * TODO can delete this if nothing is going to use it\n * @param accounts\n */\n static getBrightsideAccountFromAccounts(\n accounts: InternalOrExternalSavingsAccount[]\n ): InternalOrExternalSavingsAccount | undefined {\n const match = accounts.filter((acct) => acct.type === SavingsAccountType.BRIGHTSIDE);\n return match.length ? match[0] : undefined;\n }\n\n static getSavingsTotalBalanceFromAccounts(accounts: InternalOrExternalSavingsAccount[]): number {\n return accounts.reduce((prev, curr) => prev + curr.balance, 0);\n }\n\n /**\n * basing status on label may be brittle, we may want to use the status instead\n * Canceled:\n * Status: ‘CANCELED’\n * Pending/Scheduled:\n * Status: ‘PLANNED’, ‘SENT_TO_PAYROLL’, ‘PENDING’, ‘DEDUCTION_TAKEN’\n * @param label\n */\n static _getBrightsideTxStatusFromLabel(label: string): SavingsTransactionStatus {\n if (label.includes(SavingsTransactionStatus.PENDING)) {\n return SavingsTransactionStatus.PENDING;\n } else if (label.includes(SavingsTransactionStatus.CANCELED)) {\n return SavingsTransactionStatus.CANCELED;\n } else if (label.includes(SavingsTransactionStatus.SCHEDULED)) {\n return SavingsTransactionStatus.SCHEDULED;\n }\n return SavingsTransactionStatus.POSTED;\n }\n\n static _getExternalTxStatusFromStatus(status: string): SavingsTransactionStatus {\n if (status.includes(FinicityTransactionStatus.PENDING)) {\n return SavingsTransactionStatus.PENDING;\n } else if (status.includes(FinicityTransactionStatus.SHADOW)) {\n return SavingsTransactionStatus.PENDING;\n }\n return SavingsTransactionStatus.POSTED;\n }\n\n /**\n * TODO: desktop is not handling the locked/invalid statuses at this time\n * @param bank\n */\n static _getLinkedStatusFromLinkedBank(bank: LinkedBank): LinkedAccountStatus {\n if (bank.status === LinkedBankStatus.LINKING || bank.status === LinkedBankStatus.LINK_VERIFY_DEPOSIT) {\n return LinkedAccountService.isLinkedAccountVerifiable(bank)\n ? LinkedAccountStatus.UNVERIFIED_ELIGIBLE\n : LinkedAccountStatus.UNVERIFIED_NEW;\n }\n return LinkedAccountStatus.ACTIVE;\n }\n\n /**\n * TODO: desktop does not implement connect fix session or have UX for showing broken institution logins\n * at that time it would make sense to have a mapping here for LinkedAccountStatus.FIX_LOGIN\n */\n static _getLinkedStatusFromFinicityStatus(): LinkedAccountStatus {\n return LinkedAccountStatus.ACTIVE;\n }\n\n static allowAddingMoreTransferFundsAccounts(groups: LinkedAccountGroup[]): boolean {\n const tfgroup = groups.find((group) => group.type === LinkedAccountType.TRANSFER_FUNDS);\n if (!tfgroup) {\n return true;\n }\n return tfgroup.banks.length < TRANSFER_FUNDS_ACCOUNT_LIMIT;\n }\n\n getSavingsAccounts(includeAccountNumber: boolean = false): Observable {\n const allAccounts: InternalOrExternalSavingsAccount[] = [];\n const observables = [];\n observables.push(this.getBrightsideAccount(includeAccountNumber));\n observables.push(this.getExternalAccounts());\n return forkJoin(observables).pipe(\n switchMap(([bsAccount, extAccts]) => {\n if (bsAccount) {\n allAccounts.push(bsAccount as InternalOrExternalSavingsAccount);\n }\n allAccounts.push(...(extAccts as InternalOrExternalSavingsAccount[]));\n return of(allAccounts);\n })\n );\n }\n\n _getBrightsideAccount(): Observable {\n if (useRealData) {\n return this.savingsAccountService.getSavingsAccount();\n }\n return of(SavingsTestData.generateTestObject('SavingsAccount', {}));\n }\n\n _getExternalAccounts(): Observable {\n if (useRealData) {\n return this.apiCache.get(\n 'api-mobile',\n '/cashflow/accounts?feature=externalSavings&excludeStatus=deleted'\n );\n }\n return of([SavingsTestData.generateTestObject('ExternalFinicityAccount', {})]);\n }\n\n /**\n *\n * @param includeAccountNumber false if you don't care about the account number (saves api call)\n */\n getBrightsideAccount(includeAccountNumber = true): Observable {\n const observables: Observable[] = [this._getBrightsideAccount()];\n if (includeAccountNumber) {\n if (useRealData) {\n observables.push(this.savingsAccountService.getSavingsAch());\n } else {\n observables.push(of(SavingsTestData.generateTestObject('SavingsAch', {})));\n }\n }\n return forkJoin(observables).pipe(\n switchMap(([account, achDetails]) => {\n if (account) {\n return of({\n type: SavingsAccountType.BRIGHTSIDE,\n id: BRIGHTSIDE_SAVINGS_ACCOUNT_ID,\n accountName: (account as SavingsAccount).name,\n institutionName: BRIGHTSIDE_SAVINGS_INSTITUTION_NAME,\n balance: account.balance,\n lastFourAccountNumber: (achDetails as SavingsAch)?.account_number?.substr(-4) ?? (account as SavingsAccount).last_four_accnum,\n icon: BRIGHTSIDE_SAVINGS_ICON,\n });\n } else {\n return of(undefined);\n }\n })\n );\n }\n\n getExternalAccounts(): Observable {\n return this._getExternalAccounts().pipe(\n switchMap((accounts) => {\n const mapped = accounts.map((account) => ({\n type: SavingsAccountType.EXTERNAL,\n id: account.id,\n accountName: account.name,\n institutionName: account.institutionName,\n balance: account.balance,\n lastFourAccountNumber: account.number,\n icon: account?.branding?.icon || EXTERNAL_SAVINGS_ICON,\n }));\n return of(mapped);\n })\n );\n }\n\n getAccountFromTypeAndId(type: SavingsAccountType, id: string): Observable {\n if (type === SavingsAccountType.BRIGHTSIDE) {\n return this.getBrightsideAccount(false);\n } else {\n return this.getExternalAccounts().pipe(switchMap((accounts) => of(accounts.find((acct) => acct.id === id))));\n }\n }\n\n /**\n * TODO remove this if nothing uses it\n */\n getSavingsTotalBalance(): Observable {\n return this.getSavingsAccounts(false).pipe(\n switchMap((accounts) => of(ExternalSavingsService.getSavingsTotalBalanceFromAccounts(accounts)))\n );\n }\n\n hasBrightsideSavingsAccount(): Observable {\n if (useRealData) {\n return this.savingsAccountService.hasFunctionalSavingsAccount();\n }\n return of(true);\n }\n\n hasExternalSavingsAccount(): Observable {\n return this._getExternalAccounts().pipe(switchMap((accounts) => of(Boolean(accounts.length))));\n }\n\n hasInternalOrExternalSavingsAccount(): Observable {\n return this.hasBrightsideSavingsAccount().pipe(mergeMap((v) => defer(() => (v ? of(v) : this.hasExternalSavingsAccount()))));\n }\n\n getAccountTransactions(type: SavingsAccountType, id: string): Observable {\n if (type === SavingsAccountType.BRIGHTSIDE) {\n return this.getBrightsideSavingsTransactions();\n } else {\n return this.getExternalSavingsTransactions(id);\n }\n }\n\n _getBrightsideSavingsTransactions(filterCategory?: SavingsTransactionCategory): Observable {\n if (useRealData) {\n return this.savingsAccountService.getSavingsTransactions(filterCategory);\n }\n return of([SavingsTestData.generateTestObject('SavingsTransaction', {})]);\n }\n\n _getExternalSavingsTransactions(id: string): Observable {\n if (useRealData) {\n return this.apiCache.get('api-mobile', `/cashflow/accounts/${id}/transactions`);\n }\n return of([SavingsTestData.generateTestObject('ExternalFinicityTransaction', {})]);\n }\n\n getBrightsideSavingsTransactions(\n filterCategory?: SavingsTransactionCategory\n ): Observable {\n return this._getBrightsideSavingsTransactions(filterCategory).pipe(\n switchMap((transactions) => {\n const mapped = transactions.map((tx) => ({\n id: String(tx.id),\n label: tx.label || '',\n amount: tx.is_credit ? tx.amount : -tx.amount,\n createdDate: tx.transaction_date || '',\n status: ExternalSavingsService._getBrightsideTxStatusFromLabel(tx.label || ''),\n }));\n return of(mapped);\n })\n );\n }\n\n getExternalSavingsTransactions(id: string): Observable {\n return this._getExternalSavingsTransactions(id).pipe(\n switchMap((transactions) => {\n const mapped = transactions.map((tx) => ({\n id: tx.transactionId,\n label: tx.merchant,\n amount: tx.amount,\n createdDate: tx.transactionDateStr,\n status: ExternalSavingsService._getExternalTxStatusFromStatus(tx.status),\n }));\n return of(mapped);\n })\n );\n }\n\n /**\n * TODO remove if nothing uses this\n * @param id\n */\n getAccountBalance(id: string): Observable {\n return this.getSavingsAccounts(false).pipe(\n switchMap((accounts) => of(Number(accounts.find((acct) => acct.id === id)?.balance)))\n );\n }\n\n _getAchLinkedBanks(): Observable {\n if (useRealData) {\n return this.savingsAccountService.getLinkedBanks();\n }\n return of([]);\n }\n\n getAchLinkedBanks(): Observable {\n return this._getAchLinkedBanks().pipe(\n switchMap((banks) => {\n const mapped = banks.map((bank) => ({\n id: String(bank.id),\n type: LinkedAccountType.TRANSFER_FUNDS,\n institutionName: bank.bank_name,\n accountType: bank.account_class,\n accountName: bank.account_class,\n lastFourAccountNumber: bank.last_four,\n institutionLogo: bank.bank_logo || EXTERNAL_SAVINGS_ICON,\n status: ExternalSavingsService._getLinkedStatusFromLinkedBank(bank),\n }));\n return of(mapped);\n })\n );\n }\n\n _getExternalAccountsAsLinked(): Observable {\n return this._getExternalAccounts().pipe(\n switchMap((accounts) => {\n const mapped = accounts.map((account) => ({\n id: account.id,\n type: LinkedAccountType.TRACK_BALANCE,\n institutionLoginId: account.institutionLoginId,\n institutionName: account.institutionName,\n accountType: account.type,\n accountName: account.name,\n lastFourAccountNumber: account.number,\n institutionLogo: account?.branding?.icon || EXTERNAL_SAVINGS_ICON,\n status: ExternalSavingsService._getLinkedStatusFromFinicityStatus(),\n }));\n return of(mapped);\n })\n );\n }\n\n getLinkedAccountGroups(): Observable {\n return this.savingsAccountService.hasFunctionalSavingsAccount().pipe(\n switchMap((hasAccount) => {\n const observables = [];\n if (hasAccount) {\n observables.push(this.getAchLinkedBanks());\n } else {\n observables.push(of([]));\n }\n observables.push(this._getExternalAccountsAsLinked());\n return forkJoin(observables).pipe(\n switchMap(([achAccts, extAccts]) => {\n const groups: LinkedAccountGroup[] = [];\n // @ts-ignore\n if (achAccts.length) {\n groups.push({\n type: LinkedAccountType.TRANSFER_FUNDS,\n banks: achAccts,\n });\n }\n // @ts-ignore\n if (extAccts.length) {\n groups.push({\n type: LinkedAccountType.TRACK_BALANCE,\n banks: extAccts,\n });\n }\n return of(groups);\n })\n );\n })\n );\n }\n\n /**\n * NOTE we can only unlink entire institutions, Finicity does not give us API to unlink single accounts\n * @param institutionId\n */\n _deleteExternalAccount(institutionId: string): Observable {\n return from(\n this.awsApiWrapperService.del('api-mobile', `/cashflow/institutions/${institutionId}`, { headers: { 'Content-Type': 'application/json' } })\n ).pipe(\n tap(() => {\n // clearing the cache is not helpful because the deletion is async\n // instead we will manipulate the cached data to remove the item that should get deleted\n // but ONLY on success\n const accounts = this.apiCache.getItem(\n '/cashflow/accounts?feature=externalSavings&excludeStatus=deleted'\n ) as unknown as ExternalFinicityAccount[];\n this.apiCache.setItem(\n '/cashflow/accounts?feature=externalSavings&excludeStatus=deleted',\n accounts.filter((account) => account.institutionId !== institutionId)\n );\n })\n );\n }\n\n unlinkExternalAccount(type: LinkedAccountType, id: string): Observable {\n if (type === LinkedAccountType.TRANSFER_FUNDS) {\n return this.linkedAccountService.unlinkAccount(Number(id));\n } else {\n return this._getExternalAccounts().pipe(\n switchMap((accounts) => {\n const acctToDelete = accounts.find((acct) => acct.id === id);\n if (!acctToDelete) {\n throw Error('account to delete not found');\n }\n return this._deleteExternalAccount(acctToDelete.institutionId);\n })\n );\n }\n }\n}\n\nexport enum SavingsAccountType {\n BRIGHTSIDE = 'Brightside',\n EXTERNAL = 'External',\n}\n\nexport enum LinkedAccountType {\n TRANSFER_FUNDS = 'TRANSFER_FUNDS',\n TRACK_BALANCE = 'TRACK_BALANCE',\n}\n\nexport enum SavingsAccountAction {\n AUTOSAVE = 'AUTOSAVE',\n TRANSFER = 'TRANSFER',\n MANAGE_LINKED_ACCOUNT = 'MANAGE_LINKED_ACCOUNT',\n ACCOUNT_DETAILS = 'ACCOUNT_DETAILS',\n CONTACT_DETAILS = 'CONTACT_DETAILS',\n VIEW_STATEMENTS = 'VIEW_STATEMENTS',\n VIEW_GOALS = 'VIEW_GOALS',\n VIEW_REWARDS = 'VIEW_REWARDS',\n DELETE_ACCOUNT = 'DELETE_ACCOUNT',\n}\n\nexport interface InternalOrExternalSavingsAccount {\n id: string;\n accountName: string;\n institutionName: string;\n lastFourAccountNumber: string;\n balance: number;\n type: SavingsAccountType;\n icon: string;\n}\n\nexport enum FinicityAccountType {\n CHECKING = 'checking',\n SAVINGS = 'savings',\n}\n\nexport interface ExternalFinicityAccount {\n id: string;\n name: string;\n institutionName: string;\n number: string;\n balance: number;\n institutionId: string;\n institutionLoginId?: string;\n type: FinicityAccountType;\n branding?: { icon: string };\n}\n\nexport interface ExternalFinicityTransaction {\n transactionId: string;\n amount: number;\n merchant: string;\n transactionDateStr: string;\n status: FinicityTransactionStatus;\n}\n\nexport enum FinicityTransactionStatus {\n ACTIVE = 'active',\n SHADOW = 'shadow',\n PENDING = 'pending',\n}\n\nexport enum SavingsTransactionStatus {\n PENDING = 'Pending',\n CANCELED = 'Canceled',\n SCHEDULED = 'Scheduled',\n POSTED = 'Posted',\n}\n\nexport interface InternalOrExternalSavingsTransaction {\n id: string;\n label: string;\n createdDate: string;\n amount: number;\n status: SavingsTransactionStatus;\n // NOTE these fields are for details but desktop does not support details yet\n // payee: string; // maybe an object?\n // postedDate: string; // can also contain the estimated date (if not yet posted)\n}\n\nexport interface LinkedAccountGroup {\n type: LinkedAccountType;\n banks: InternalOrExternalLinkedAccount[];\n}\n\nexport enum LinkedAccountStatus {\n ACTIVE = 'active',\n UNVERIFIED_NEW = 'unverified-new', // for ach transfer funds before deposit verification eligible\n UNVERIFIED_ELIGIBLE = 'verify-deposit', // for ach transfer funds deposit verification eligible\n FIX_LOGIN = 'fix-login', // FUTURE: for finicity institution login error codes\n}\n\nexport interface InternalOrExternalLinkedAccount {\n id: string;\n type: LinkedAccountType;\n institutionLoginId?: string;\n institutionName: string;\n accountType: string;\n accountName: string;\n lastFourAccountNumber: string;\n institutionLogo: string;\n status: LinkedAccountStatus;\n}\n","import { Injectable } from '@angular/core';\nimport { CurrencyPipe } from '@angular/common';\nimport {\n DesktopCard,\n DesktopSegmentType,\n MobileStateService,\n} from '@brightside-web/desktop/data-access/shared';\nimport { SavingsAccountService } from '@brightside-web/desktop/data-access/savings';\nimport { LinkedAccountService } from '@brightside-web/desktop/data-access/account-linking';\nimport { ToastService } from '@brightside/brightside-ui-services';\nimport { ExternalSavingsService } from '@brightside-web/desktop/data-access/external-savings'\nimport { forkJoin } from 'rxjs';\nimport {TranslateService} from \"@ngx-translate/core\";\nimport {BsApiService, FeatureFlagService} from \"@brightside-web/desktop/data-access/core-services\";\nimport { ArrayOfSavingsAccounts } from \"@brightside-web/desktop/feature/savings-account\";\nimport {ArrayOfSpendingAccounts} from \"../../../../feature/spending-account/src/lib/new-spending-account.service\";\nimport { FinancialAccountPayload } from \"@brightside-web/desktop/feature/financial-accounts-core\";\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SavingsCardDataService {\n\n constructor(\n private toastService: ToastService,\n private savingsService: SavingsAccountService,\n private mobileStateService: MobileStateService,\n private currencyPipe: CurrencyPipe,\n private extSavingsService: ExternalSavingsService,\n private translateService: TranslateService,\n private featureFlagSvc: FeatureFlagService,\n private bsApi: BsApiService\n ) {}\n\n private handleBannerSideAffect(message: string, options?: any) {\n this.toastService.infoBlue(message, options);\n }\n\n async groomCardData(startingData: DesktopCard): Promise {\n return this.helixAccount(startingData);\n }\n\n async helixAccount(startingData: DesktopCard): Promise {\n const savingsAccount = await this.bsApi.get>('api-mobile', `/accounts/savings`).toPromise();\n // @ts-ignore\n if (savingsAccount?.payload?.accounts.length > 0) {\n startingData.segments?.forEach((segment) => {\n if (segment.type === DesktopSegmentType.DEFAULT && savingsAccount) {\n segment.dynamicValue = this.currencyPipe.transform(savingsAccount.payload.accounts[0].availableBalance) || '$0.00';\n }\n });\n }\n return startingData;\n }\n\n\n async groomSpendingCard(startingData: DesktopCard): Promise {\n return this.helixSpendingAccount(startingData);\n }\n\n async helixSpendingAccount(startingData: DesktopCard): Promise {\n const spendingAccount = await this.bsApi.get>('api-mobile', `/accounts/spending`).toPromise();\n // @ts-ignore\n if (spendingAccount?.payload?.accounts.length > 0) {\n startingData.segments?.forEach((segment) => {\n if (segment.type === DesktopSegmentType.DEFAULT && spendingAccount) {\n segment.dynamicValue = this.currencyPipe.transform(spendingAccount.payload.accounts[0].availableBalance) || '$0.00';\n\n }\n });\n }\n return startingData;\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n DesktopCard,\n DesktopCardCaseType,\n DesktopSegmentType,\n EligibleProduct,\n MobileStateExplore,\n MobileStateHome,\n MobileStateService,\n} from '@brightside-web/desktop/data-access/shared';\n\nimport { forkJoin, Observable } from 'rxjs';\nimport { map, switchMap } from 'rxjs/operators';\nimport { LoansService } from '@brightside-web/desktop/data-access/loans';\nimport { SavingsCardDataService } from './savings-card-data.service';\nimport { CreditService } from '@brightside-web/desktop/data-access/credit';\n\n//Do we want to have a whole class for this>?\nconst CashFlowGroomerFunction = async (card: DesktopCard) => {\n const fsIntroRoutePath = 'financialsnapshot/intro';\n\n card.segments?.forEach((segment) => (segment.ctaPath = fsIntroRoutePath));\n\n return { ...card, ctaPath: fsIntroRoutePath };\n};\n\n@Injectable({\n providedIn: 'root',\n})\nexport class CardService {\n constructor(\n private mobileStateService: MobileStateService,\n private savingsCardDataService: SavingsCardDataService,\n private loansSvc: LoansService,\n private creditSvc: CreditService\n ) {}\n\n // I don't like putting product specific stuff in this service, maybe we can access these through the service map\n private static cardToasts: Record = {\n noCreditData: 'No credit data available. Please contact your Financial Assistant.',\n creditSyncing: 'Still syncing your credit data. Please contact your Financial Assistant.',\n };\n\n static getToastMessage(key: string): string {\n return this.cardToasts[key];\n }\n\n /* ToDo: This is temp way of grooming the savings card data. We will need a proper solution that's not so hard fixed */\n private groomDesktopFinancialToolCardData(card: DesktopCard, products: EligibleProduct[]) {\n // we only support payroll savings at this time, not ach\n if (card.key === 'savings' && !card.case_type && products.includes(EligibleProduct.payrollSavings)) {\n // key of 'savings' is not an unlocked case type but Emergency_Savings is\n card.key = DesktopCardCaseType.SAVINGS;\n card.ctaPath = 'home/savings/intro';\n } else if (card.key === 'creditScore') {\n card.key = DesktopCardCaseType.CREDIT_SCORE;\n card.ctaPath = 'credit-setup/creation';\n } else if (card.key === 'externalSavings') {\n card.key = DesktopCardCaseType.SAVINGS;\n card.ctaPath = 'external-accounts/intro';\n } else if (card.key === 'MPAP') {\n card.ctaPath = 'program/mpap';\n } else if (card.key === 'HELPING_HANDS') {\n card.ctaPath = 'program/helping-hands';\n }\n return card;\n }\n\n private convertCardsToDesktopCards = (cards: DesktopCard[]) =>\n cards.map((card) => {\n if (card.case_type === DesktopCardCaseType.SAVINGS) {\n card.ctaPath = 'home/savings';\n } else if (card.case_type === DesktopCardCaseType.CONTEST) {\n card.ctaPath = card.ctaPath?.replace('contest/intro/', 'contest-loader/');\n } else if (card.case_type === DesktopCardCaseType.SPENDING) {\n card.ctaPath = 'accounts/spending/dashboard';\n } else if (card.case_type === DesktopCardCaseType.CASH_FLOW) {\n card.ctaPath = '/financialsnapshot-loader';\n card.segments?.forEach((segment) => (segment.ctaPath = '/financialsnapshot-loader'));\n }\n return { ...card, expandable: false };\n });\n private convertHomeCardsToDesktopCards = (cards: MobileStateHome, products: EligibleProduct[]) =>\n cards.financialTools.map((card) => this.groomDesktopFinancialToolCardData({ ...card, expandable: false }, products));\n private convertExploreCardsToDesktopCards = (cards: MobileStateExplore) =>\n [...cards.waysWeCanHelp, ...cards.moreForYouToExplore].map((card) => ({ ...card, expandable: false }));\n\n getDesktopHomeCards(): Observable {\n return forkJoin([this.getActivatedCards(), this.getHomeCards(), this.getProducts()]).pipe(\n map((responses) => ({\n active: this.convertCardsToDesktopCards(responses.shift() as DesktopCard[]),\n financialTools: this.convertHomeCardsToDesktopCards(\n responses.shift() as MobileStateHome,\n responses.shift() as EligibleProduct[]\n ),\n }))\n );\n }\n\n getDesktopExploreCards(exploreCards: MobileStateExplore): WaysToHelpCards {\n return {\n active: this.convertExploreCardsToDesktopCards(exploreCards),\n };\n }\n\n getProducts(): Observable {\n return this.mobileStateService.get().pipe(map((mobileState) => mobileState.products || []));\n }\n\n getHomeCards(): Observable {\n return this.mobileStateService\n .get()\n .pipe(map((mobileState) => mobileState.home || { waysWeCanHelp: [], financialTools: [] }));\n }\n\n getHomeBlockCards(): Observable {\n return this.mobileStateService.get().pipe(\n map((mobileState) => {\n const baseCards: DesktopCard[] = [...(mobileState.home?.waysWeCanHelp || [])];\n const baseCardTypes = baseCards.map((card) => card.key || card.type || card.case_type);\n\n const extraCards: DesktopCard[] = [\n ...(mobileState.explore?.waysWeCanHelp || []),\n ...(mobileState.explore?.moreForYouToExplore || []),\n ];\n\n const addTheseOn: DesktopCard[] =\n extraCards.reduce((rtnArry: DesktopCard[], card: DesktopCard) => {\n if (!baseCardTypes.includes(card.key || card.type || card.case_type)) {\n return [...rtnArry, card];\n }\n\n return rtnArry;\n }, []) || [];\n\n return [...baseCards, ...addTheseOn];\n })\n );\n }\n\n getExploreCards(): Observable {\n return this.mobileStateService\n .get()\n .pipe(map((mobileState) => mobileState.explore || { waysWeCanHelp: [], moreForYouToExplore: [] }));\n }\n\n getCardMap(): CardMap {\n return {\n [DesktopCardCaseType.SAVINGS]: this.savingsCardDataService.groomCardData,\n [DesktopCardCaseType.CREDIT_SCORE]: this.creditSvc.groomCardData,\n [DesktopCardCaseType.CASH_FLOW]: CashFlowGroomerFunction,\n [DesktopCardCaseType.SPENDING]: this.savingsCardDataService.groomSpendingCard,\n [DesktopCardCaseType.EMERGENCY_CASH]: this.loansSvc.groomCardData,\n [DesktopCardCaseType.CREDIT_CARD_REFI]: this.loansSvc.groomCardData,\n [DesktopCardCaseType.LOAN_DASHBOARD]: this.loansSvc.groomCardData,\n } as CardMap;\n }\n\n getServiceMap(): ServiceMap {\n return {\n [DesktopCardCaseType.SAVINGS]: this.savingsCardDataService,\n [DesktopCardCaseType.SPENDING]: this.savingsCardDataService,\n [DesktopCardCaseType.EMERGENCY_CASH]: this.loansSvc,\n [DesktopCardCaseType.CREDIT_CARD_REFI]: this.loansSvc,\n [DesktopCardCaseType.CREDIT_SCORE]: this.creditSvc,\n [DesktopCardCaseType.LOAN_DASHBOARD]: this.loansSvc,\n } as ServiceMap;\n }\n\n getActivatedCards(force: boolean = false): Observable {\n return this.mobileStateService.get(force).pipe(\n map((mobileState) => [\n Array.isArray(mobileState.activatedCards) ? mobileState.activatedCards : [],\n mobileState.creditScore,\n ]),\n switchMap(async ([activatedCards, creditScore]) => {\n //probably not the most performant approach\n activatedCards = activatedCards as DesktopCard[];\n for (let i = 0; i < activatedCards.length; i++) {\n if (this.getCardMap()[activatedCards[i].case_type as DesktopCardCaseType]) {\n const groomingFunction = this.getCardMap()[activatedCards[i].case_type as DesktopCardCaseType];\n const groomingService = this.getServiceMap()[activatedCards[i].case_type as DesktopCardCaseType];\n\n //If there is no service, skip binding\n activatedCards[i] = await (!groomingService\n ? groomingFunction(activatedCards[i], !!creditScore)\n : groomingFunction.bind(groomingService)(activatedCards[i], !!creditScore));\n }\n }\n return activatedCards;\n })\n );\n }\n\n getCards(): Observable {\n return this.mobileStateService.get().pipe(map((mobileState) => (Array.isArray(mobileState.cards) ? mobileState.cards : [])));\n }\n}\n\nexport interface DesktopCards {\n active: DesktopCard[];\n financialTools: DesktopCard[];\n}\n\nexport interface WaysToHelpCards {\n active: DesktopCard[];\n}\n\nexport type CardMap = {\n [key in DesktopCardCaseType]: (card: DesktopCard, isCreditScoreEnabled?: boolean) => Promise;\n};\nexport type ServiceMap = {\n [key in DesktopCardCaseType]: any;\n};\n","//! moment.js locale configuration\n//! locale : Dutch [nl]\n//! author : Joris Röling : https://github.com/jorisroling\n//! author : Jacob Middag : https://github.com/middagj\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsShortWithDots =\n 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),\n monthsShortWithoutDots =\n 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n monthsParse = [\n /^jan/i,\n /^feb/i,\n /^(maart|mrt\\.?)$/i,\n /^apr/i,\n /^mei$/i,\n /^jun[i.]?$/i,\n /^jul[i.]?$/i,\n /^aug/i,\n /^sep/i,\n /^okt/i,\n /^nov/i,\n /^dec/i,\n ],\n monthsRegex =\n /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\\.?|feb\\.?|mrt\\.?|apr\\.?|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i;\n\n var nl = moment.defineLocale('nl', {\n months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(\n '_'\n ),\n monthsShort: function (m, format) {\n if (!m) {\n return monthsShortWithDots;\n } else if (/-MMM-/.test(format)) {\n return monthsShortWithoutDots[m.month()];\n } else {\n return monthsShortWithDots[m.month()];\n }\n },\n\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex:\n /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,\n monthsShortStrictRegex:\n /^(jan\\.?|feb\\.?|mrt\\.?|apr\\.?|mei|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i,\n\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n\n weekdays:\n 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),\n weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),\n weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD-MM-YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[vandaag om] LT',\n nextDay: '[morgen om] LT',\n nextWeek: 'dddd [om] LT',\n lastDay: '[gisteren om] LT',\n lastWeek: '[afgelopen] dddd [om] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'over %s',\n past: '%s geleden',\n s: 'een paar seconden',\n ss: '%d seconden',\n m: 'één minuut',\n mm: '%d minuten',\n h: 'één uur',\n hh: '%d uur',\n d: 'één dag',\n dd: '%d dagen',\n w: 'één week',\n ww: '%d weken',\n M: 'één maand',\n MM: '%d maanden',\n y: 'één jaar',\n yy: '%d jaar',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal: function (number) {\n return (\n number +\n (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n );\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return nl;\n\n})));\n","export enum UiMoleculeMediaType {\n IMAGE = 'image',\n ANIMATION = 'animation',\n}\n","\n","import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\n\nimport { UiMoleculeMediaType } from './media.enum';\nimport { UiMoleculeMedia } from './media.interface';\n\n@Component({\n selector: 'ui-media',\n templateUrl: './media.component.html',\n styleUrls: ['./media.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class UiMediaComponent {\n @Input() data: UiMoleculeMedia[];\n\n /**\n * Base path can be changed if you know your images are stored someplace else.\n *\n * DEFAULT ../assets/\n */\n @Input() basePath = '../assets/';\n\n mediaType = UiMoleculeMediaType;\n}\n","import * as i0 from '@angular/core';\nimport { Injectable, EventEmitter, Directive, Output, Input, Component, ViewEncapsulation, HostBinding, ContentChildren, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { Subject, fromEvent, Observable, combineLatest, timer } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nclass VgStates {\n}\nVgStates.VG_ENDED = 'ended';\nVgStates.VG_PAUSED = 'paused';\nVgStates.VG_PLAYING = 'playing';\nVgStates.VG_LOADING = 'waiting';\n/** @nocollapse */ /** @nocollapse */ VgStates.ɵfac = function VgStates_Factory(t) { return new (t || VgStates)(); };\n/** @nocollapse */ /** @nocollapse */ VgStates.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: VgStates, factory: VgStates.ɵfac, providedIn: 'root' });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(VgStates, [{\n type: Injectable,\n args: [{\n providedIn: 'root',\n }]\n }], null, null); })();\n\nclass VgApiService {\n constructor() {\n this.medias = {}; // TODO: refactor to Set\n this.playerReadyEvent = new EventEmitter(true);\n this.isPlayerReady = false;\n }\n onPlayerReady(fsAPI) {\n this.fsAPI = fsAPI;\n this.isPlayerReady = true;\n this.playerReadyEvent.emit(this);\n }\n getDefaultMedia() {\n for (const item in this.medias) {\n if (this.medias[item]) {\n return this.medias[item];\n }\n }\n }\n getMasterMedia() {\n let master;\n for (const id in this.medias) {\n if (this.medias[id].vgMaster === 'true' ||\n this.medias[id].vgMaster === true) {\n master = this.medias[id];\n break;\n }\n }\n return master || this.getDefaultMedia();\n }\n isMasterDefined() {\n let result = false;\n for (const id in this.medias) {\n if (this.medias[id].vgMaster === 'true' ||\n this.medias[id].vgMaster === true) {\n result = true;\n break;\n }\n }\n return result;\n }\n getMediaById(id = null) {\n let media = this.medias[id];\n if (!id || id === '*') {\n media = this;\n }\n return media;\n }\n play() {\n for (const id in this.medias) {\n if (this.medias[id]) {\n this.medias[id].play();\n }\n }\n }\n pause() {\n for (const id in this.medias) {\n if (this.medias[id]) {\n this.medias[id].pause();\n }\n }\n }\n get duration() {\n return this.$$getAllProperties('duration');\n }\n set currentTime(seconds) {\n this.$$setAllProperties('currentTime', seconds);\n }\n get currentTime() {\n return this.$$getAllProperties('currentTime');\n }\n set state(state) {\n this.$$setAllProperties('state', state);\n }\n get state() {\n return this.$$getAllProperties('state');\n }\n set volume(volume) {\n this.$$setAllProperties('volume', volume);\n }\n get volume() {\n return this.$$getAllProperties('volume');\n }\n set playbackRate(rate) {\n this.$$setAllProperties('playbackRate', rate);\n }\n get playbackRate() {\n return this.$$getAllProperties('playbackRate');\n }\n get canPlay() {\n return this.$$getAllProperties('canPlay');\n }\n get canPlayThrough() {\n return this.$$getAllProperties('canPlayThrough');\n }\n get isMetadataLoaded() {\n return this.$$getAllProperties('isMetadataLoaded');\n }\n get isWaiting() {\n return this.$$getAllProperties('isWaiting');\n }\n get isCompleted() {\n return this.$$getAllProperties('isCompleted');\n }\n get isLive() {\n return this.$$getAllProperties('isLive');\n }\n get isMaster() {\n return this.$$getAllProperties('isMaster');\n }\n get time() {\n return this.$$getAllProperties('time');\n }\n get buffer() {\n return this.$$getAllProperties('buffer');\n }\n get buffered() {\n return this.$$getAllProperties('buffered');\n }\n get subscriptions() {\n return this.$$getAllProperties('subscriptions');\n }\n get textTracks() {\n return this.$$getAllProperties('textTracks');\n }\n seekTime(value, byPercent = false) {\n for (const id in this.medias) {\n if (this.medias[id]) {\n this.$$seek(this.medias[id], value, byPercent);\n }\n }\n }\n $$seek(media, value, byPercent = false) {\n let second;\n let duration = media.duration;\n if (byPercent) {\n if (this.isMasterDefined()) {\n duration = this.getMasterMedia().duration;\n }\n second = (value * duration) / 100;\n }\n else {\n second = value;\n }\n media.currentTime = second;\n }\n addTextTrack(type, label, language) {\n for (const id in this.medias) {\n if (this.medias[id]) {\n this.$$addTextTrack(this.medias[id], type, label, language);\n }\n }\n }\n $$addTextTrack(media, type, label, language) {\n media.addTextTrack(type, label, language);\n }\n $$getAllProperties(property) {\n const medias = {};\n let result;\n for (const id in this.medias) {\n if (this.medias[id]) {\n medias[id] = this.medias[id];\n }\n }\n const nMedias = Object.keys(medias).length;\n switch (nMedias) {\n case 0:\n // Return default values until vgMedia is initialized\n switch (property) {\n case 'state':\n result = VgStates.VG_PAUSED;\n break;\n case 'playbackRate':\n case 'volume':\n result = 1;\n break;\n case 'time':\n result = { current: 0, total: 0, left: 0 };\n break;\n }\n break;\n case 1:\n // If there's only one media element then return the plain value\n const firstMediaId = Object.keys(medias)[0];\n result = medias[firstMediaId][property];\n break;\n default:\n // TODO: return 'master' value\n const master = this.getMasterMedia();\n result = medias[master.id][property];\n }\n return result;\n }\n $$setAllProperties(property, value) {\n for (const id in this.medias) {\n if (this.medias[id]) {\n this.medias[id][property] = value;\n }\n }\n }\n registerElement(elem) {\n this.videogularElement = elem;\n }\n registerMedia(media) {\n this.medias[media.id] = media;\n }\n unregisterMedia(media) {\n delete this.medias[media.id];\n }\n}\n/** @nocollapse */ /** @nocollapse */ VgApiService.ɵfac = function VgApiService_Factory(t) { return new (t || VgApiService)(); };\n/** @nocollapse */ /** @nocollapse */ VgApiService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: VgApiService, factory: VgApiService.ɵfac, providedIn: 'root' });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(VgApiService, [{\n type: Injectable,\n args: [{\n providedIn: 'root',\n }]\n }], function () { return []; }, null); })();\n\nclass VgControlsHiddenService {\n constructor() {\n this.isHiddenSubject = new Subject();\n this.isHidden = this.isHiddenSubject.asObservable();\n }\n state(hidden) {\n this.isHiddenSubject.next(hidden);\n }\n}\n/** @nocollapse */ /** @nocollapse */ VgControlsHiddenService.ɵfac = function VgControlsHiddenService_Factory(t) { return new (t || VgControlsHiddenService)(); };\n/** @nocollapse */ /** @nocollapse */ VgControlsHiddenService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: VgControlsHiddenService, factory: VgControlsHiddenService.ɵfac, providedIn: 'root' });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(VgControlsHiddenService, [{\n type: Injectable,\n args: [{\n providedIn: 'root',\n }]\n }], function () { return []; }, null); })();\n\nclass VgUtilsService {\n /**\n * Inspired by Paul Irish\n * https://gist.github.com/paulirish/211209\n */\n static getZIndex() {\n let zIndex = 1;\n let elementZIndex;\n const tags = document.getElementsByTagName('*');\n for (let i = 0, l = tags.length; i < l; i++) {\n elementZIndex = parseInt(window.getComputedStyle(tags[i])['z-index'], 10);\n if (elementZIndex > zIndex) {\n zIndex = elementZIndex + 1;\n }\n }\n return zIndex;\n }\n // Very simple mobile detection, not 100% reliable\n static isMobileDevice() {\n // return (\n // typeof window.screen.orientation !== 'undefined' ||\n // navigator.userAgent.indexOf('IEMobile') !== -1\n // );\n // window.orientation is deprecated and we should use window.screen.orientation\n return (typeof window.orientation !== 'undefined' ||\n navigator.userAgent.indexOf('IEMobile') !== -1);\n }\n static isiOSDevice() {\n return ((navigator.userAgent.match(/ip(hone|ad|od)/i) ||\n VgUtilsService.isIpadOS()) &&\n !navigator.userAgent.match(/(iemobile)[\\/\\s]?([\\w\\.]*)/i));\n }\n static isIpadOS() {\n return (navigator.maxTouchPoints &&\n navigator.maxTouchPoints > 2 &&\n /MacIntel/.test(navigator.platform));\n }\n static isCordova() {\n return (document.URL.indexOf('http://') === -1 &&\n document.URL.indexOf('https://') === -1);\n }\n}\n/** @nocollapse */ /** @nocollapse */ VgUtilsService.ɵfac = function VgUtilsService_Factory(t) { return new (t || VgUtilsService)(); };\n/** @nocollapse */ /** @nocollapse */ VgUtilsService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: VgUtilsService, factory: VgUtilsService.ɵfac, providedIn: 'root' });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(VgUtilsService, [{\n type: Injectable,\n args: [{\n providedIn: 'root',\n }]\n }], null, null); })();\n\nclass VgFullscreenApiService {\n constructor() {\n this.nativeFullscreen = true;\n this.isFullscreen = false;\n this.onChangeFullscreen = new EventEmitter();\n }\n init(elem, medias) {\n this.videogularElement = elem;\n this.medias = medias;\n const APIs = {\n w3: {\n enabled: 'fullscreenEnabled',\n element: 'fullscreenElement',\n request: 'requestFullscreen',\n exit: 'exitFullscreen',\n onchange: 'fullscreenchange',\n onerror: 'fullscreenerror',\n },\n newWebkit: {\n enabled: 'webkitFullscreenEnabled',\n element: 'webkitFullscreenElement',\n request: 'webkitRequestFullscreen',\n exit: 'webkitExitFullscreen',\n onchange: 'webkitfullscreenchange',\n onerror: 'webkitfullscreenerror',\n },\n oldWebkit: {\n enabled: 'webkitIsFullScreen',\n element: 'webkitCurrentFullScreenElement',\n request: 'webkitRequestFullScreen',\n exit: 'webkitCancelFullScreen',\n onchange: 'webkitfullscreenchange',\n onerror: 'webkitfullscreenerror',\n },\n moz: {\n enabled: 'mozFullScreen',\n element: 'mozFullScreenElement',\n request: 'mozRequestFullScreen',\n exit: 'mozCancelFullScreen',\n onchange: 'mozfullscreenchange',\n onerror: 'mozfullscreenerror',\n },\n ios: {\n enabled: 'webkitFullscreenEnabled',\n element: 'webkitFullscreenElement',\n request: 'webkitEnterFullscreen',\n exit: 'webkitExitFullscreen',\n onchange: 'webkitendfullscreen',\n onerror: 'webkitfullscreenerror',\n },\n ms: {\n enabled: 'msFullscreenEnabled',\n element: 'msFullscreenElement',\n request: 'msRequestFullscreen',\n exit: 'msExitFullscreen',\n onchange: 'MSFullscreenChange',\n onerror: 'MSFullscreenError',\n },\n };\n for (const browser in APIs) {\n if (APIs[browser].enabled in document) {\n this.polyfill = APIs[browser];\n break;\n }\n }\n if (VgUtilsService.isiOSDevice()) {\n this.polyfill = APIs.ios;\n }\n this.isAvailable = this.polyfill != null;\n if (this.polyfill == null) {\n return;\n }\n let fsElemDispatcher;\n switch (this.polyfill.onchange) {\n // Mozilla dispatches the fullscreen change event from document, not the element\n // See: https://bugzilla.mozilla.org/show_bug.cgi?id=724816#c3\n case 'mozfullscreenchange':\n fsElemDispatcher = document;\n break;\n // iOS dispatches the fullscreen change event from video element\n case 'webkitendfullscreen':\n fsElemDispatcher = this.medias.toArray()[0].elem;\n break;\n // HTML5 implementation dispatches the fullscreen change event from the element\n default:\n fsElemDispatcher = elem;\n }\n this.fsChangeSubscription = fromEvent(fsElemDispatcher, this.polyfill.onchange).subscribe(() => {\n this.onFullscreenChange();\n });\n }\n onFullscreenChange() {\n this.isFullscreen = !!document[this.polyfill.element];\n this.onChangeFullscreen.emit(this.isFullscreen);\n }\n toggleFullscreen(element = null) {\n if (this.isFullscreen) {\n this.exit();\n }\n else {\n this.request(element);\n }\n }\n request(elem) {\n if (!elem) {\n elem = this.videogularElement;\n }\n this.isFullscreen = true;\n this.onChangeFullscreen.emit(true);\n // Perform native full screen support\n if (this.isAvailable && this.nativeFullscreen) {\n // Fullscreen for mobile devices\n if (VgUtilsService.isMobileDevice()) {\n // We should make fullscreen the video object if it doesn't have native fullscreen support\n // Fallback! We can't set vg-player on fullscreen, only video/audio objects\n if ((!this.polyfill.enabled && elem === this.videogularElement) ||\n VgUtilsService.isiOSDevice()) {\n elem = this.medias.toArray()[0].elem;\n }\n this.enterElementInFullScreen(elem);\n }\n else {\n this.enterElementInFullScreen(this.videogularElement);\n }\n }\n }\n enterElementInFullScreen(elem) {\n elem[this.polyfill.request]();\n }\n exit() {\n this.isFullscreen = false;\n this.onChangeFullscreen.emit(false);\n // Exit from native fullscreen\n if (this.isAvailable && this.nativeFullscreen) {\n document[this.polyfill.exit]();\n }\n }\n}\n/** @nocollapse */ /** @nocollapse */ VgFullscreenApiService.ɵfac = function VgFullscreenApiService_Factory(t) { return new (t || VgFullscreenApiService)(); };\n/** @nocollapse */ /** @nocollapse */ VgFullscreenApiService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: VgFullscreenApiService, factory: VgFullscreenApiService.ɵfac, providedIn: 'root' });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(VgFullscreenApiService, [{\n type: Injectable,\n args: [{\n providedIn: 'root',\n }]\n }], function () { return []; }, null); })();\n\nclass VgEvents {\n}\nVgEvents.VG_ABORT = 'abort';\nVgEvents.VG_CAN_PLAY = 'canplay';\nVgEvents.VG_CAN_PLAY_THROUGH = 'canplaythrough';\nVgEvents.VG_DURATION_CHANGE = 'durationchange';\nVgEvents.VG_EMPTIED = 'emptied';\nVgEvents.VG_ENCRYPTED = 'encrypted';\nVgEvents.VG_ENDED = 'ended';\nVgEvents.VG_ERROR = 'error';\nVgEvents.VG_LOADED_DATA = 'loadeddata';\nVgEvents.VG_LOADED_METADATA = 'loadedmetadata';\nVgEvents.VG_LOAD_START = 'loadstart';\nVgEvents.VG_PAUSE = 'pause';\nVgEvents.VG_PLAY = 'play';\nVgEvents.VG_PLAYING = 'playing';\nVgEvents.VG_PROGRESS = 'progress';\nVgEvents.VG_RATE_CHANGE = 'ratechange';\nVgEvents.VG_SEEK = 'seek';\nVgEvents.VG_SEEKED = 'seeked';\nVgEvents.VG_SEEKING = 'seeking';\nVgEvents.VG_STALLED = 'stalled';\nVgEvents.VG_SUSPEND = 'suspend';\nVgEvents.VG_TIME_UPDATE = 'timeupdate';\nVgEvents.VG_VOLUME_CHANGE = 'volumechange';\nVgEvents.VG_WAITING = 'waiting';\nVgEvents.VG_LOAD = 'load';\nVgEvents.VG_ENTER = 'enter';\nVgEvents.VG_EXIT = 'exit';\nVgEvents.VG_START_ADS = 'startads';\nVgEvents.VG_END_ADS = 'endads';\n/** @nocollapse */ /** @nocollapse */ VgEvents.ɵfac = function VgEvents_Factory(t) { return new (t || VgEvents)(); };\n/** @nocollapse */ /** @nocollapse */ VgEvents.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: VgEvents, factory: VgEvents.ɵfac, providedIn: 'root' });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(VgEvents, [{\n type: Injectable,\n args: [{\n providedIn: 'root',\n }]\n }], null, null); })();\n\nclass VgCuePointsDirective {\n constructor(ref) {\n this.ref = ref;\n this.onEnterCuePoint = new EventEmitter();\n this.onUpdateCuePoint = new EventEmitter();\n this.onExitCuePoint = new EventEmitter();\n this.onCompleteCuePoint = new EventEmitter();\n this.subscriptions = [];\n this.cuesSubscriptions = [];\n this.totalCues = 0;\n }\n ngOnInit() {\n this.onLoad$ = fromEvent(this.ref.nativeElement, VgEvents.VG_LOAD);\n this.subscriptions.push(this.onLoad$.subscribe(this.onLoad.bind(this)));\n }\n onLoad(event) {\n const cues = event.target.track.cues;\n this.ref.nativeElement.cues = cues;\n this.updateCuePoints(cues);\n }\n updateCuePoints(cues) {\n this.cuesSubscriptions.forEach((s) => s.unsubscribe());\n for (let i = 0, l = cues.length; i < l; i++) {\n this.onEnter$ = fromEvent(cues[i], VgEvents.VG_ENTER);\n this.cuesSubscriptions.push(this.onEnter$.subscribe(this.onEnter.bind(this)));\n this.onExit$ = fromEvent(cues[i], VgEvents.VG_EXIT);\n this.cuesSubscriptions.push(this.onExit$.subscribe(this.onExit.bind(this)));\n }\n }\n onEnter(event) {\n this.onEnterCuePoint.emit(event.target);\n }\n onExit(event) {\n this.onExitCuePoint.emit(event.target);\n }\n ngDoCheck() {\n if (this.ref.nativeElement.track && this.ref.nativeElement.track.cues) {\n const changes = this.totalCues !== this.ref.nativeElement.track.cues.length;\n if (changes) {\n this.totalCues = this.ref.nativeElement.track.cues.length;\n this.ref.nativeElement.cues = this.ref.nativeElement.track.cues;\n this.updateCuePoints(this.ref.nativeElement.track.cues);\n }\n }\n }\n ngOnDestroy() {\n this.subscriptions.forEach((s) => s.unsubscribe());\n }\n}\n/** @nocollapse */ /** @nocollapse */ VgCuePointsDirective.ɵfac = function VgCuePointsDirective_Factory(t) { return new (t || VgCuePointsDirective)(i0.ɵɵdirectiveInject(i0.ElementRef)); };\n/** @nocollapse */ /** @nocollapse */ VgCuePointsDirective.ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: VgCuePointsDirective, selectors: [[\"\", \"vgCuePoints\", \"\"]], outputs: { onEnterCuePoint: \"onEnterCuePoint\", onUpdateCuePoint: \"onUpdateCuePoint\", onExitCuePoint: \"onExitCuePoint\", onCompleteCuePoint: \"onCompleteCuePoint\" } });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(VgCuePointsDirective, [{\n type: Directive,\n args: [{\n selector: '[vgCuePoints]',\n }]\n }], function () { return [{ type: i0.ElementRef }]; }, { onEnterCuePoint: [{\n type: Output\n }], onUpdateCuePoint: [{\n type: Output\n }], onExitCuePoint: [{\n type: Output\n }], onCompleteCuePoint: [{\n type: Output\n }] }); })();\n\nclass VgMediaDirective {\n constructor(api, ref) {\n this.api = api;\n this.ref = ref;\n this.state = VgStates.VG_PAUSED;\n this.time = { current: 0, total: 0, left: 0 };\n this.buffer = { end: 0 };\n this.canPlay = false;\n this.canPlayThrough = false;\n this.isMetadataLoaded = false;\n this.isWaiting = false;\n this.isCompleted = false;\n this.isLive = false;\n this.isBufferDetected = false;\n this.checkInterval = 200;\n this.currentPlayPos = 0;\n this.lastPlayPos = 0;\n this.playAtferSync = false;\n this.bufferDetected = new Subject();\n }\n ngOnInit() {\n if (this.vgMedia.nodeName) {\n // It's a native element\n this.elem = this.vgMedia;\n }\n else {\n // It's an Angular Class\n this.elem = this.vgMedia.elem;\n }\n // Just in case we're creating this vgMedia dynamically register again into API\n this.api.registerMedia(this);\n this.subscriptions = {\n // Native events\n abort: fromEvent(this.elem, VgEvents.VG_ABORT),\n canPlay: fromEvent(this.elem, VgEvents.VG_CAN_PLAY),\n canPlayThrough: fromEvent(this.elem, VgEvents.VG_CAN_PLAY_THROUGH),\n durationChange: fromEvent(this.elem, VgEvents.VG_DURATION_CHANGE),\n emptied: fromEvent(this.elem, VgEvents.VG_EMPTIED),\n encrypted: fromEvent(this.elem, VgEvents.VG_ENCRYPTED),\n ended: fromEvent(this.elem, VgEvents.VG_ENDED),\n error: fromEvent(this.elem, VgEvents.VG_ERROR),\n loadedData: fromEvent(this.elem, VgEvents.VG_LOADED_DATA),\n loadedMetadata: fromEvent(this.elem, VgEvents.VG_LOADED_METADATA),\n loadStart: fromEvent(this.elem, VgEvents.VG_LOAD_START),\n pause: fromEvent(this.elem, VgEvents.VG_PAUSE),\n play: fromEvent(this.elem, VgEvents.VG_PLAY),\n playing: fromEvent(this.elem, VgEvents.VG_PLAYING),\n progress: fromEvent(this.elem, VgEvents.VG_PROGRESS),\n rateChange: fromEvent(this.elem, VgEvents.VG_RATE_CHANGE),\n seeked: fromEvent(this.elem, VgEvents.VG_SEEKED),\n seeking: fromEvent(this.elem, VgEvents.VG_SEEKING),\n stalled: fromEvent(this.elem, VgEvents.VG_STALLED),\n suspend: fromEvent(this.elem, VgEvents.VG_SUSPEND),\n timeUpdate: fromEvent(this.elem, VgEvents.VG_TIME_UPDATE),\n volumeChange: fromEvent(this.elem, VgEvents.VG_VOLUME_CHANGE),\n waiting: fromEvent(this.elem, VgEvents.VG_WAITING),\n // Advertisement only events\n startAds: fromEvent(window, VgEvents.VG_START_ADS),\n endAds: fromEvent(window, VgEvents.VG_END_ADS),\n // See changes on child elements to reload the video file\n mutation: new Observable((observer) => {\n const domObs = new MutationObserver((mutations) => {\n observer.next(mutations);\n });\n domObs.observe(this.elem, { childList: true, attributes: true });\n return () => {\n domObs.disconnect();\n };\n }),\n // Custom buffering detection\n bufferDetected: this.bufferDetected,\n };\n this.mutationObs = this.subscriptions.mutation.subscribe(this.onMutation.bind(this));\n this.canPlayObs = this.subscriptions.canPlay.subscribe(this.onCanPlay.bind(this));\n this.canPlayThroughObs = this.subscriptions.canPlayThrough.subscribe(this.onCanPlayThrough.bind(this));\n this.loadedMetadataObs = this.subscriptions.loadedMetadata.subscribe(this.onLoadMetadata.bind(this));\n this.waitingObs = this.subscriptions.waiting.subscribe(this.onWait.bind(this));\n this.progressObs = this.subscriptions.progress.subscribe(this.onProgress.bind(this));\n this.endedObs = this.subscriptions.ended.subscribe(this.onComplete.bind(this));\n this.playingObs = this.subscriptions.playing.subscribe(this.onStartPlaying.bind(this));\n this.playObs = this.subscriptions.play.subscribe(this.onPlay.bind(this));\n this.pauseObs = this.subscriptions.pause.subscribe(this.onPause.bind(this));\n this.timeUpdateObs = this.subscriptions.timeUpdate.subscribe(this.onTimeUpdate.bind(this));\n this.volumeChangeObs = this.subscriptions.volumeChange.subscribe(this.onVolumeChange.bind(this));\n this.errorObs = this.subscriptions.error.subscribe(this.onError.bind(this));\n if (this.vgMaster) {\n this.api.playerReadyEvent.subscribe(() => {\n this.prepareSync();\n });\n }\n }\n prepareSync() {\n const canPlayAll = [];\n for (const media in this.api.medias) {\n if (this.api.medias[media]) {\n canPlayAll.push(this.api.medias[media].subscriptions.canPlay);\n }\n }\n this.canPlayAllSubscription = combineLatest(canPlayAll)\n .pipe(map((...params) => {\n const checkReadyState = (event) => {\n if (!event?.target) {\n return false;\n }\n return event.target.readyState === 4;\n };\n const allReady = params.some(checkReadyState);\n if (allReady && !this.syncSubscription) {\n this.startSync();\n this.syncSubscription.unsubscribe();\n }\n }))\n .subscribe();\n }\n startSync() {\n this.syncSubscription = timer(0, 1000).subscribe(() => {\n for (const media in this.api.medias) {\n if (this.api.medias[media] !== this) {\n const diff = this.api.medias[media].currentTime - this.currentTime;\n if (diff < -0.3 || diff > 0.3) {\n this.playAtferSync = this.state === VgStates.VG_PLAYING;\n this.pause();\n this.api.medias[media].pause();\n this.api.medias[media].currentTime = this.currentTime;\n }\n else {\n if (this.playAtferSync) {\n this.play();\n this.api.medias[media].play();\n this.playAtferSync = false;\n }\n }\n }\n }\n });\n }\n onMutation(mutations) {\n // Detect changes only for source elements or src attribute\n for (let i = 0, l = mutations.length; i < l; i++) {\n const mut = mutations[i];\n if (mut.type === 'attributes' && mut.attributeName === 'src') {\n // Only load src file if it's not a blob (for DASH / HLS sources)\n if (mut.target.src &&\n mut.target.src.length > 0 &&\n mut.target.src.indexOf('blob:') < 0) {\n this.loadMedia();\n break;\n }\n }\n else if (mut.type === 'childList' &&\n mut.removedNodes.length &&\n mut.removedNodes[0].nodeName.toLowerCase() === 'source') {\n this.loadMedia();\n break;\n }\n }\n }\n loadMedia() {\n this.vgMedia.pause();\n this.vgMedia.currentTime = 0;\n // Start buffering until we can play the media file\n this.stopBufferCheck();\n this.isBufferDetected = true;\n this.bufferDetected.next(this.isBufferDetected);\n // TODO: This is ugly, we should find something cleaner. For some reason a TimerObservable doesn't works.\n setTimeout(() => this.vgMedia.load(), 10);\n }\n play() {\n // short-circuit if already playing\n if (this.playPromise ||\n (this.state !== VgStates.VG_PAUSED && this.state !== VgStates.VG_ENDED)) {\n return;\n }\n this.playPromise = this.vgMedia.play();\n // browser has async play promise\n if (this.playPromise && this.playPromise.then && this.playPromise.catch) {\n this.playPromise\n .then(() => {\n this.playPromise = null;\n })\n .catch(() => {\n this.playPromise = null;\n // deliberately empty for the sake of eating console noise\n });\n }\n return this.playPromise;\n }\n pause() {\n // browser has async play promise\n if (this.playPromise) {\n this.playPromise.then(() => {\n this.vgMedia.pause();\n });\n }\n else {\n this.vgMedia.pause();\n }\n }\n get id() {\n // We should return undefined if vgMedia still doesn't exist\n let result;\n if (this.vgMedia) {\n result = this.vgMedia.id;\n }\n return result;\n }\n get duration() {\n return this.vgMedia.duration === Infinity\n ? this.specifiedDuration\n : this.vgMedia.duration;\n }\n set currentTime(seconds) {\n this.vgMedia.currentTime = seconds;\n // this.elem.dispatchEvent(new CustomEvent(VgEvents.VG_SEEK));\n }\n get currentTime() {\n return this.vgMedia.currentTime;\n }\n set volume(volume) {\n this.vgMedia.volume = volume;\n }\n get volume() {\n return this.vgMedia.volume;\n }\n set playbackRate(rate) {\n this.vgMedia.playbackRate = rate;\n }\n get playbackRate() {\n return this.vgMedia.playbackRate;\n }\n get buffered() {\n return this.vgMedia.buffered;\n }\n get textTracks() {\n return this.vgMedia.textTracks;\n }\n // @ts-ignore\n onCanPlay(event) {\n this.isBufferDetected = false;\n this.bufferDetected.next(this.isBufferDetected);\n this.canPlay = true;\n this.ref.detectChanges();\n }\n // @ts-ignore\n onCanPlayThrough(event) {\n this.isBufferDetected = false;\n this.bufferDetected.next(this.isBufferDetected);\n this.canPlayThrough = true;\n this.ref.detectChanges();\n }\n // @ts-ignore\n onLoadMetadata(event) {\n this.isMetadataLoaded = true;\n this.time = {\n current: 0,\n left: 0,\n total: this.duration * 1000,\n };\n this.state = VgStates.VG_PAUSED;\n // Live streaming check\n const t = Math.round(this.time.total);\n this.isLive = t === Infinity;\n this.ref.detectChanges();\n }\n // @ts-ignore\n onWait(event) {\n this.isWaiting = true;\n this.ref.detectChanges();\n }\n // @ts-ignore\n onComplete(event) {\n this.isCompleted = true;\n this.state = VgStates.VG_ENDED;\n this.ref.detectChanges();\n }\n // @ts-ignore\n onStartPlaying(event) {\n this.state = VgStates.VG_PLAYING;\n this.ref.detectChanges();\n }\n // @ts-ignore\n onPlay(event) {\n this.state = VgStates.VG_PLAYING;\n if (this.vgMaster) {\n if (!this.syncSubscription || this.syncSubscription.closed) {\n this.startSync();\n }\n }\n this.startBufferCheck();\n this.ref.detectChanges();\n }\n // @ts-ignore\n onPause(event) {\n this.state = VgStates.VG_PAUSED;\n if (this.vgMaster) {\n if (!this.playAtferSync) {\n this.syncSubscription.unsubscribe();\n }\n }\n this.stopBufferCheck();\n this.ref.detectChanges();\n }\n // @ts-ignore\n onTimeUpdate(event) {\n const end = this.buffered.length - 1;\n this.time = {\n current: this.currentTime * 1000,\n total: this.time.total,\n left: (this.duration - this.currentTime) * 1000,\n };\n if (end >= 0) {\n this.buffer = { end: this.buffered.end(end) * 1000 };\n }\n this.ref.detectChanges();\n }\n // @ts-ignore\n onProgress(event) {\n const end = this.buffered.length - 1;\n if (end >= 0) {\n this.buffer = { end: this.buffered.end(end) * 1000 };\n }\n this.ref.detectChanges();\n }\n // @ts-ignore\n onVolumeChange(event) {\n // TODO: Save to localstorage the current volume\n this.ref.detectChanges();\n }\n // @ts-ignore\n onError(event) {\n // TODO: Handle error messages\n this.ref.detectChanges();\n }\n // http://stackoverflow.com/a/23828241/779529\n bufferCheck() {\n const offset = 1 / this.checkInterval;\n this.currentPlayPos = this.currentTime;\n if (!this.isBufferDetected &&\n this.currentPlayPos < this.lastPlayPos + offset) {\n this.isBufferDetected = true;\n }\n if (this.isBufferDetected &&\n this.currentPlayPos > this.lastPlayPos + offset) {\n this.isBufferDetected = false;\n }\n // Prevent calls to bufferCheck after ngOnDestroy have been called\n if (!this.bufferDetected.closed) {\n this.bufferDetected.next(this.isBufferDetected);\n }\n this.lastPlayPos = this.currentPlayPos;\n }\n startBufferCheck() {\n this.checkBufferSubscription = timer(0, this.checkInterval).subscribe(() => {\n this.bufferCheck();\n });\n }\n stopBufferCheck() {\n if (this.checkBufferSubscription) {\n this.checkBufferSubscription.unsubscribe();\n }\n this.isBufferDetected = false;\n this.bufferDetected.next(this.isBufferDetected);\n }\n seekTime(value, byPercent = false) {\n let second;\n const duration = this.duration;\n if (byPercent) {\n second = (value * duration) / 100;\n }\n else {\n second = value;\n }\n this.currentTime = second;\n }\n addTextTrack(type, label, language, mode) {\n const newTrack = this.vgMedia.addTextTrack(type, label, language);\n if (mode) {\n newTrack.mode = mode;\n }\n return newTrack;\n }\n ngOnDestroy() {\n this.vgMedia.src = '';\n this.mutationObs?.unsubscribe();\n this.canPlayObs?.unsubscribe();\n this.canPlayThroughObs?.unsubscribe();\n this.loadedMetadataObs?.unsubscribe();\n this.waitingObs?.unsubscribe();\n this.progressObs?.unsubscribe();\n this.endedObs?.unsubscribe();\n this.playingObs?.unsubscribe();\n this.playObs?.unsubscribe();\n this.pauseObs?.unsubscribe();\n this.timeUpdateObs?.unsubscribe();\n this.volumeChangeObs?.unsubscribe();\n this.errorObs?.unsubscribe();\n this.checkBufferSubscription?.unsubscribe();\n this.syncSubscription?.unsubscribe();\n this.bufferDetected?.complete();\n this.bufferDetected?.unsubscribe();\n this.api.unregisterMedia(this);\n }\n}\n/** @nocollapse */ /** @nocollapse */ VgMediaDirective.ɵfac = function VgMediaDirective_Factory(t) { return new (t || VgMediaDirective)(i0.ɵɵdirectiveInject(VgApiService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };\n/** @nocollapse */ /** @nocollapse */ VgMediaDirective.ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: VgMediaDirective, selectors: [[\"\", \"vgMedia\", \"\"]], inputs: { vgMedia: \"vgMedia\", vgMaster: \"vgMaster\" } });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(VgMediaDirective, [{\n type: Directive,\n args: [{\n selector: '[vgMedia]',\n }]\n }], function () { return [{ type: VgApiService }, { type: i0.ChangeDetectorRef }]; }, { vgMedia: [{\n type: Input\n }], vgMaster: [{\n type: Input\n }] }); })();\n\nconst _c0 = [\"*\"];\nclass VgPlayerComponent {\n constructor(ref, api, fsAPI, controlsHidden) {\n this.api = api;\n this.fsAPI = fsAPI;\n this.controlsHidden = controlsHidden;\n this.isFullscreen = false;\n this.isNativeFullscreen = false;\n this.areControlsHidden = false;\n this.onPlayerReady = new EventEmitter();\n this.onMediaReady = new EventEmitter();\n this.subscriptions = [];\n this.elem = ref.nativeElement;\n this.api.registerElement(this.elem);\n }\n ngAfterContentInit() {\n this.medias.toArray().forEach((media) => {\n this.api.registerMedia(media);\n });\n this.fsAPI.init(this.elem, this.medias);\n this.subscriptions.push(this.fsAPI.onChangeFullscreen.subscribe(this.onChangeFullscreen.bind(this)));\n this.subscriptions.push(this.controlsHidden.isHidden.subscribe(this.onHideControls.bind(this)));\n this.api.onPlayerReady(this.fsAPI);\n this.onPlayerReady.emit(this.api);\n }\n onChangeFullscreen(fsState) {\n if (!this.fsAPI.nativeFullscreen) {\n this.isFullscreen = fsState;\n this.zIndex = fsState ? VgUtilsService.getZIndex().toString() : 'auto';\n }\n else {\n this.isNativeFullscreen = fsState;\n }\n }\n onHideControls(hidden) {\n this.areControlsHidden = hidden;\n }\n ngOnDestroy() {\n this.subscriptions.forEach((s) => s.unsubscribe());\n }\n}\n/** @nocollapse */ /** @nocollapse */ VgPlayerComponent.ɵfac = function VgPlayerComponent_Factory(t) { return new (t || VgPlayerComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(VgApiService), i0.ɵɵdirectiveInject(VgFullscreenApiService), i0.ɵɵdirectiveInject(VgControlsHiddenService)); };\n/** @nocollapse */ /** @nocollapse */ VgPlayerComponent.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: VgPlayerComponent, selectors: [[\"vg-player\"]], contentQueries: function VgPlayerComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, VgMediaDirective, 4);\n } if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.medias = _t);\n } }, hostVars: 8, hostBindings: function VgPlayerComponent_HostBindings(rf, ctx) { if (rf & 2) {\n i0.ɵɵstyleProp(\"z-index\", ctx.zIndex);\n i0.ɵɵclassProp(\"fullscreen\", ctx.isFullscreen)(\"native-fullscreen\", ctx.isNativeFullscreen)(\"controls-hidden\", ctx.areControlsHidden);\n } }, outputs: { onPlayerReady: \"onPlayerReady\", onMediaReady: \"onMediaReady\" }, features: [i0.ɵɵProvidersFeature([VgApiService, VgFullscreenApiService, VgControlsHiddenService])], ngContentSelectors: _c0, decls: 1, vars: 0, template: function VgPlayerComponent_Template(rf, ctx) { if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵprojection(0);\n } }, styles: [\"vg-player{font-family:\\\"videogular\\\";position:relative;display:flex;width:100%;height:100%;overflow:hidden;background-color:#000}vg-player.fullscreen{position:fixed;left:0;top:0}vg-player.native-fullscreen.controls-hidden{cursor:none}\\n\"], encapsulation: 2 });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(VgPlayerComponent, [{\n type: Component,\n args: [{\n selector: 'vg-player',\n encapsulation: ViewEncapsulation.None,\n template: ``,\n styles: [\n `\n vg-player {\n font-family: 'videogular';\n position: relative;\n display: flex;\n width: 100%;\n height: 100%;\n overflow: hidden;\n background-color: black;\n }\n vg-player.fullscreen {\n position: fixed;\n left: 0;\n top: 0;\n }\n vg-player.native-fullscreen.controls-hidden {\n cursor: none;\n }\n `,\n ],\n providers: [VgApiService, VgFullscreenApiService, VgControlsHiddenService],\n }]\n }], function () { return [{ type: i0.ElementRef }, { type: VgApiService }, { type: VgFullscreenApiService }, { type: VgControlsHiddenService }]; }, { isFullscreen: [{\n type: HostBinding,\n args: ['class.fullscreen']\n }], isNativeFullscreen: [{\n type: HostBinding,\n args: ['class.native-fullscreen']\n }], areControlsHidden: [{\n type: HostBinding,\n args: ['class.controls-hidden']\n }], zIndex: [{\n type: HostBinding,\n args: ['style.z-index']\n }], onPlayerReady: [{\n type: Output\n }], onMediaReady: [{\n type: Output\n }], medias: [{\n type: ContentChildren,\n args: [VgMediaDirective]\n }] }); })();\n\nconst services = [\n VgApiService,\n VgControlsHiddenService,\n VgFullscreenApiService,\n VgUtilsService,\n VgEvents,\n VgStates\n];\nconst directives = [\n VgCuePointsDirective,\n VgMediaDirective\n];\nclass VgCoreModule {\n}\n/** @nocollapse */ /** @nocollapse */ VgCoreModule.ɵfac = function VgCoreModule_Factory(t) { return new (t || VgCoreModule)(); };\n/** @nocollapse */ /** @nocollapse */ VgCoreModule.ɵmod = /** @pureOrBreakMyCode */ i0.ɵɵdefineNgModule({ type: VgCoreModule });\n/** @nocollapse */ /** @nocollapse */ VgCoreModule.ɵinj = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjector({ providers: [...services], imports: [[CommonModule]] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(VgCoreModule, [{\n type: NgModule,\n args: [{\n imports: [CommonModule],\n providers: [...services],\n declarations: [...directives, VgPlayerComponent],\n exports: [...directives, VgPlayerComponent]\n }]\n }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && i0.ɵɵsetNgModuleScope(VgCoreModule, { declarations: [VgCuePointsDirective,\n VgMediaDirective, VgPlayerComponent], imports: [CommonModule], exports: [VgCuePointsDirective,\n VgMediaDirective, VgPlayerComponent] }); })();\n\nclass VgMediaElement {\n get audioTracks() {\n return null;\n }\n // @ts-ignore\n addTextTrack(kind, label, language) {\n return null;\n }\n // @ts-ignore\n canPlayType(type) {\n return null;\n }\n load() { }\n msClearEffects() { }\n msGetAsCastingSource() {\n return null;\n }\n // @ts-ignore\n msInsertAudioEffect(_activatableClassId, _effectRequired, _config) { }\n // @ts-ignore\n msSetMediaProtectionManager(mediaProtectionManager) { }\n pause() { }\n play() {\n return null;\n }\n // @ts-ignore\n setMediaKeys(mediaKeys) {\n return null;\n }\n // @ts-ignore\n addEventListener(_type, _listener, _useCapture) { }\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { VgApiService, VgControlsHiddenService, VgCoreModule, VgCuePointsDirective, VgEvents, VgFullscreenApiService, VgMediaDirective, VgMediaElement, VgPlayerComponent, VgStates, VgUtilsService };\n","export function isFunction(value) {\n return typeof value === 'function';\n}\n","

\n
\n {{prefixSymbol}}\n
\n \n \n \n \n \n \n \n \n \n \n
\n \n
\n
\n \n
\n
\n\n
\n {{ inputErrorText }}\n
\n
{{ inputHintText }}
\n\n","import {\n Component,\n OnInit,\n Input,\n EventEmitter,\n Output,\n Self,\n Optional,\n ElementRef, ViewChild, AfterViewInit\n} from '@angular/core';\nimport { ControlValueAccessor, NgControl } from '@angular/forms';\nimport { trigger, style, animate, transition, state } from '@angular/animations';\n\n@Component({\n selector: 'bw-input',\n animations: [\n trigger(\n 'enterAnimation', [\n state('show', style({\n minHeight: '16px',\n visibility: 'visible',\n opacity: 1\n })),\n state('hide', style({\n minHeight: '0px',\n visibility: 'hidden',\n opacity: 0\n })),\n transition('show => hide', [\n animate('0.05s')\n ]),\n transition('hide => show', [\n animate('0.1s 0.2s')\n ]),\n ]\n )\n ],\n templateUrl: './input.component.html',\n styleUrls: ['./input.component.scss']\n})\nexport class InputComponent implements OnInit, ControlValueAccessor, AfterViewInit {\n\n @Input() isCustomControl = false;\n\n /** The native input element type */\n @Input() type: 'text' | 'email' | 'password' | 'phone' = 'text';\n\n /** Whether the input is disabled */\n @Input() disabled: boolean;\n\n @Input() inputMode: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';\n\n /** Whether the input element is required */\n @Input() required: boolean;\n\n /** The label string that will be renderend inside the label element */\n @Input() label: string;\n\n /** The native input element placehoder text */\n @Input() placeholder = '';\n\n /** Toggles the visibiolity of the password hide/show icon. */\n @Input() togglePassword: boolean;\n\n /** Whether the input has an error in validation */\n @Input() inputError: boolean;\n\n /** Pattern is passed to the native input element for pattern validation. */\n @Input() pattern: string;\n\n /** Minimum length allowed in the input field */\n @Input() minlength: string | number;\n\n /** Minimum length allowed in the input field */\n @Input() maxlength: string | number;\n\n /** Text that is shown below the input if there is a validation error */\n @Input() inputErrorText: string;\n\n /** Text that is shown below the input that serves as an input hint */\n @Input() inputHintText: string;\n\n @Input() prefixSymbol: string;\n\n @Input() suffixIconName = 'view';\n @Input() showSuffixIcon = false;\n\n /**\n * NGX-Mask input to format and restrict input values to masked patterns. https://jsdaddy.github.io/ngx-mask-page/main\n *\n * NOTE: Mask is intended for use on with inputs of type text. If mask is used for inputs of any other type, the mask attribute will be ignored.\n */\n @Input() inputMask: string;\n\n /** Event that signals a change in the input model */\n @Output() inputModelChange = new EventEmitter();\n\n /** The native input element value */\n @Input() value: any = '';\n\n @Input() verticalSpace = 'mb-xs';\n @Input() horizontalSpace = 'mr-null';\n\n @Input() autoFocus:boolean;\n @ViewChild('elementRef') el:ElementRef;\n\n error = false;\n hint = true;\n hidePass: boolean;\n isPassword: boolean;\n @Input() isFocused: boolean;\n\n @Input() hasInfo: boolean;\n @Output() emitInfoClicked = new EventEmitter();\n @Output() hasFocus = new EventEmitter();\n\n @Input() allowOnlyNumbers: boolean;\n\n constructor(\n // Retrieve the dependency only from the local injector,\n // not from parent or ancestors.\n @Self()\n // We want to be able to use the component without a form,\n // so we mark the dependency as optional.\n @Optional()\n private ngControl: NgControl\n ) {\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n ngOnInit() {\n if (this.togglePassword) {\n this.isPassword = true;\n this.type = 'password';\n }\n }\n\n ngAfterViewInit(): void {\n if (this.autoFocus){\n //If you dont use a timeout, you get expressionchangedafterithasbeenchecked error\n setTimeout(()=>{\n this.el.nativeElement.focus();\n }, 1)\n }\n }\n\n /**\n * Write form value to the DOM element (model => view)\n */\n writeValue(value: any): void {\n this.value = value;\n }\n\n /**\n * Write form disabled state to the DOM element (model => view)\n */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n /**\n * Update form when DOM element value changes (view => model)\n */\n registerOnChange(fn: any): void {\n // Store the provided function as an internal method.\n this.onChange = fn;\n }\n\n /**\n * Update form when DOM element is blurred (view => model)\n */\n registerOnTouched(fn: any): void {\n // Store the provided function as an internal method.\n this.onTouched = fn;\n }\n\n onChange(e: string) {\n this.inputModelChange.emit(e);\n }\n\n onTouched(e: any) {\n // console.log('touch', e);\n }\n\n onFocus(e: any) {\n // console.log('focus', e);\n this.hasFocus.emit(true);\n this.isFocused = true;\n }\n\n onBlur(e: any) {\n // console.log('blur', e);\n this.hasFocus.emit(false);\n this.isFocused = false;\n this.onTouched(e)\n }\n\n showHidePassword() {\n if (this.type === 'password') {\n this.type = 'text';\n this.hidePass = true;\n } else {\n this.type = 'password';\n\n this.hidePass = false;\n }\n }\n\n infoClicked() {\n this.emitInfoClicked.emit(true);\n }\n}\n","//! moment.js locale configuration\n//! locale : Cambodian [km]\n//! author : Kruy Vanna : https://github.com/kruyvanna\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '១',\n 2: '២',\n 3: '៣',\n 4: '៤',\n 5: '៥',\n 6: '៦',\n 7: '៧',\n 8: '៨',\n 9: '៩',\n 0: '០',\n },\n numberMap = {\n '១': '1',\n '២': '2',\n '៣': '3',\n '៤': '4',\n '៥': '5',\n '៦': '6',\n '៧': '7',\n '៨': '8',\n '៩': '9',\n '០': '0',\n };\n\n var km = moment.defineLocale('km', {\n months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(\n '_'\n ),\n monthsShort:\n 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(\n '_'\n ),\n weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),\n weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),\n weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n meridiemParse: /ព្រឹក|ល្ងាច/,\n isPM: function (input) {\n return input === 'ល្ងាច';\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ព្រឹក';\n } else {\n return 'ល្ងាច';\n }\n },\n calendar: {\n sameDay: '[ថ្ងៃនេះ ម៉ោង] LT',\n nextDay: '[ស្អែក ម៉ោង] LT',\n nextWeek: 'dddd [ម៉ោង] LT',\n lastDay: '[ម្សិលមិញ ម៉ោង] LT',\n lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%sទៀត',\n past: '%sមុន',\n s: 'ប៉ុន្មានវិនាទី',\n ss: '%d វិនាទី',\n m: 'មួយនាទី',\n mm: '%d នាទី',\n h: 'មួយម៉ោង',\n hh: '%d ម៉ោង',\n d: 'មួយថ្ងៃ',\n dd: '%d ថ្ងៃ',\n M: 'មួយខែ',\n MM: '%d ខែ',\n y: 'មួយឆ្នាំ',\n yy: '%d ឆ្នាំ',\n },\n dayOfMonthOrdinalParse: /ទី\\d{1,2}/,\n ordinal: 'ទី%d',\n preparse: function (string) {\n return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return km;\n\n})));\n","//! moment.js locale configuration\n//! locale : Talossan [tzl]\n//! author : Robin van der Vliet : https://github.com/robin0van0der0v\n//! author : Iustì Canun\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals.\n // This is currently too difficult (maybe even impossible) to add.\n var tzl = moment.defineLocale('tzl', {\n months: 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split(\n '_'\n ),\n monthsShort: 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'),\n weekdays: 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'),\n weekdaysShort: 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'),\n weekdaysMin: 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM [dallas] YYYY',\n LLL: 'D. MMMM [dallas] YYYY HH.mm',\n LLLL: 'dddd, [li] D. MMMM [dallas] YYYY HH.mm',\n },\n meridiemParse: /d\\'o|d\\'a/i,\n isPM: function (input) {\n return \"d'o\" === input.toLowerCase();\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? \"d'o\" : \"D'O\";\n } else {\n return isLower ? \"d'a\" : \"D'A\";\n }\n },\n calendar: {\n sameDay: '[oxhi à] LT',\n nextDay: '[demà à] LT',\n nextWeek: 'dddd [à] LT',\n lastDay: '[ieiri à] LT',\n lastWeek: '[sür el] dddd [lasteu à] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'osprei %s',\n past: 'ja%s',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n s: ['viensas secunds', \"'iensas secunds\"],\n ss: [number + ' secunds', '' + number + ' secunds'],\n m: [\"'n míut\", \"'iens míut\"],\n mm: [number + ' míuts', '' + number + ' míuts'],\n h: [\"'n þora\", \"'iensa þora\"],\n hh: [number + ' þoras', '' + number + ' þoras'],\n d: [\"'n ziua\", \"'iensa ziua\"],\n dd: [number + ' ziuas', '' + number + ' ziuas'],\n M: [\"'n mes\", \"'iens mes\"],\n MM: [number + ' mesen', '' + number + ' mesen'],\n y: [\"'n ar\", \"'iens ar\"],\n yy: [number + ' ars', '' + number + ' ars'],\n };\n return isFuture\n ? format[key][0]\n : withoutSuffix\n ? format[key][0]\n : format[key][1];\n }\n\n return tzl;\n\n})));\n","import { addNonEnumerableProperty } from './object.js';\nimport { snipLine } from './string.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\n/**\n * UUID4 generator\n *\n * @returns string Generated UUID4.\n */\nfunction uuid4() {\n const gbl = GLOBAL_OBJ ;\n const crypto = gbl.crypto || gbl.msCrypto;\n\n let getRandomByte = () => Math.random() * 16;\n try {\n if (crypto && crypto.randomUUID) {\n return crypto.randomUUID().replace(/-/g, '');\n }\n if (crypto && crypto.getRandomValues) {\n getRandomByte = () => {\n // crypto.getRandomValues might return undefined instead of the typed array\n // in old Chromium versions (e.g. 23.0.1235.0 (151422))\n // However, `typedArray` is still filled in-place.\n // @see https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues#typedarray\n const typedArray = new Uint8Array(1);\n crypto.getRandomValues(typedArray);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return typedArray[0];\n };\n }\n } catch (_) {\n // some runtimes can crash invoking crypto\n // https://github.com/getsentry/sentry-javascript/issues/8935\n }\n\n // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n // Concatenating the following numbers as strings results in '10000000100040008000100000000000'\n return (([1e7] ) + 1e3 + 4e3 + 8e3 + 1e11).replace(/[018]/g, c =>\n // eslint-disable-next-line no-bitwise\n ((c ) ^ ((getRandomByte() & 15) >> ((c ) / 4))).toString(16),\n );\n}\n\nfunction getFirstException(event) {\n return event.exception && event.exception.values ? event.exception.values[0] : undefined;\n}\n\n/**\n * Extracts either message or type+value from an event that can be used for user-facing logs\n * @returns event's description\n */\nfunction getEventDescription(event) {\n const { message, event_id: eventId } = event;\n if (message) {\n return message;\n }\n\n const firstException = getFirstException(event);\n if (firstException) {\n if (firstException.type && firstException.value) {\n return `${firstException.type}: ${firstException.value}`;\n }\n return firstException.type || firstException.value || eventId || '';\n }\n return eventId || '';\n}\n\n/**\n * Adds exception values, type and value to an synthetic Exception.\n * @param event The event to modify.\n * @param value Value of the exception.\n * @param type Type of the exception.\n * @hidden\n */\nfunction addExceptionTypeValue(event, value, type) {\n const exception = (event.exception = event.exception || {});\n const values = (exception.values = exception.values || []);\n const firstException = (values[0] = values[0] || {});\n if (!firstException.value) {\n firstException.value = value || '';\n }\n if (!firstException.type) {\n firstException.type = type || 'Error';\n }\n}\n\n/**\n * Adds exception mechanism data to a given event. Uses defaults if the second parameter is not passed.\n *\n * @param event The event to modify.\n * @param newMechanism Mechanism data to add to the event.\n * @hidden\n */\nfunction addExceptionMechanism(event, newMechanism) {\n const firstException = getFirstException(event);\n if (!firstException) {\n return;\n }\n\n const defaultMechanism = { type: 'generic', handled: true };\n const currentMechanism = firstException.mechanism;\n firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism };\n\n if (newMechanism && 'data' in newMechanism) {\n const mergedData = { ...(currentMechanism && currentMechanism.data), ...newMechanism.data };\n firstException.mechanism.data = mergedData;\n }\n}\n\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nconst SEMVER_REGEXP =\n /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/;\n\n/**\n * Represents Semantic Versioning object\n */\n\nfunction _parseInt(input) {\n return parseInt(input || '', 10);\n}\n\n/**\n * Parses input into a SemVer interface\n * @param input string representation of a semver version\n */\nfunction parseSemver(input) {\n const match = input.match(SEMVER_REGEXP) || [];\n const major = _parseInt(match[1]);\n const minor = _parseInt(match[2]);\n const patch = _parseInt(match[3]);\n return {\n buildmetadata: match[5],\n major: isNaN(major) ? undefined : major,\n minor: isNaN(minor) ? undefined : minor,\n patch: isNaN(patch) ? undefined : patch,\n prerelease: match[4],\n };\n}\n\n/**\n * This function adds context (pre/post/line) lines to the provided frame\n *\n * @param lines string[] containing all lines\n * @param frame StackFrame that will be mutated\n * @param linesOfContext number of context lines we want to add pre/post\n */\nfunction addContextToFrame(lines, frame, linesOfContext = 5) {\n // When there is no line number in the frame, attaching context is nonsensical and will even break grouping\n if (frame.lineno === undefined) {\n return;\n }\n\n const maxLines = lines.length;\n const sourceLine = Math.max(Math.min(maxLines - 1, frame.lineno - 1), 0);\n\n frame.pre_context = lines\n .slice(Math.max(0, sourceLine - linesOfContext), sourceLine)\n .map((line) => snipLine(line, 0));\n\n // We guard here to ensure this is not larger than the existing number of lines\n const lineIndex = Math.min(maxLines - 1, sourceLine);\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n frame.context_line = snipLine(lines[lineIndex], frame.colno || 0);\n\n frame.post_context = lines\n .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)\n .map((line) => snipLine(line, 0));\n}\n\n/**\n * Checks whether or not we've already captured the given exception (note: not an identical exception - the very object\n * in question), and marks it captured if not.\n *\n * This is useful because it's possible for an error to get captured by more than one mechanism. After we intercept and\n * record an error, we rethrow it (assuming we've intercepted it before it's reached the top-level global handlers), so\n * that we don't interfere with whatever effects the error might have had were the SDK not there. At that point, because\n * the error has been rethrown, it's possible for it to bubble up to some other code we've instrumented. If it's not\n * caught after that, it will bubble all the way up to the global handlers (which of course we also instrument). This\n * function helps us ensure that even if we encounter the same error more than once, we only record it the first time we\n * see it.\n *\n * Note: It will ignore primitives (always return `false` and not mark them as seen), as properties can't be set on\n * them. {@link: Object.objectify} can be used on exceptions to convert any that are primitives into their equivalent\n * object wrapper forms so that this check will always work. However, because we need to flag the exact object which\n * will get rethrown, and because that rethrowing happens outside of the event processing pipeline, the objectification\n * must be done before the exception captured.\n *\n * @param A thrown exception to check or flag as having been seen\n * @returns `true` if the exception has already been captured, `false` if not (with the side effect of marking it seen)\n */\nfunction checkOrSetAlreadyCaught(exception) {\n if (isAlreadyCaptured(exception)) {\n return true;\n }\n\n try {\n // set it this way rather than by assignment so that it's not ennumerable and therefore isn't recorded by the\n // `ExtraErrorData` integration\n addNonEnumerableProperty(exception , '__sentry_captured__', true);\n } catch (err) {\n // `exception` is a primitive, so we can't mark it seen\n }\n\n return false;\n}\n\nfunction isAlreadyCaptured(exception) {\n try {\n return (exception ).__sentry_captured__;\n } catch (e) {} // eslint-disable-line no-empty\n}\n\n/**\n * Checks whether the given input is already an array, and if it isn't, wraps it in one.\n *\n * @param maybeArray Input to turn into an array, if necessary\n * @returns The input, if already an array, or an array with the input as the only element, if not\n *\n * @deprecated This function has been deprecated and will not be replaced.\n */\nfunction arrayify(maybeArray) {\n return Array.isArray(maybeArray) ? maybeArray : [maybeArray];\n}\n\nexport { addContextToFrame, addExceptionMechanism, addExceptionTypeValue, arrayify, checkOrSetAlreadyCaught, getEventDescription, parseSemver, uuid4 };\n","import { Component, OnInit, Input } from '@angular/core';\n\nexport type TextStyleOptions = 'Body1' | 'Body2';\n\n@Component({\n selector: 'bw-paragraph',\n templateUrl: './paragraph.component.html',\n styleUrls: ['./paragraph.component.scss']\n})\nexport class ParagraphComponent {\n /** The text style: Body1 | Body2 */\n @Input() textStyle: TextStyleOptions = 'Body1';\n\n /** The space between the bottom of this element and the top of its subsequent sibling */\n @Input() verticalSpace = '24';\n\n /** Whether the text is centered */\n @Input() center: boolean;\n\n /** The text color of the paragraph */\n @Input() color: string;\n\n constructor() {}\n\n}\n","

\n \n

\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * Based on the Base 64 VLQ implementation in Closure Compiler:\n * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n *\n * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nvar base64 = require('./base64');\n\n// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n// length quantities we use in the source map spec, the first bit is the sign,\n// the next four bits are the actual value, and the 6th bit is the\n// continuation bit. The continuation bit tells us whether there are more\n// digits in this value following this digit.\n//\n// Continuation\n// | Sign\n// | |\n// V V\n// 101011\n\nvar VLQ_BASE_SHIFT = 5;\n\n// binary: 100000\nvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\n// binary: 011111\nvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\n// binary: 100000\nvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\n/**\n * Converts from a two-complement value to a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n */\nfunction toVLQSigned(aValue) {\n return aValue < 0\n ? ((-aValue) << 1) + 1\n : (aValue << 1) + 0;\n}\n\n/**\n * Converts to a two-complement value from a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n */\nfunction fromVLQSigned(aValue) {\n var isNegative = (aValue & 1) === 1;\n var shifted = aValue >> 1;\n return isNegative\n ? -shifted\n : shifted;\n}\n\n/**\n * Returns the base 64 VLQ encoded value.\n */\nexports.encode = function base64VLQ_encode(aValue) {\n var encoded = \"\";\n var digit;\n\n var vlq = toVLQSigned(aValue);\n\n do {\n digit = vlq & VLQ_BASE_MASK;\n vlq >>>= VLQ_BASE_SHIFT;\n if (vlq > 0) {\n // There are still more digits in this value, so we must make sure the\n // continuation bit is marked.\n digit |= VLQ_CONTINUATION_BIT;\n }\n encoded += base64.encode(digit);\n } while (vlq > 0);\n\n return encoded;\n};\n\n/**\n * Decodes the next base 64 VLQ value from the given string and returns the\n * value and the rest of the string via the out parameter.\n */\nexports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n var strLen = aStr.length;\n var result = 0;\n var shift = 0;\n var continuation, digit;\n\n do {\n if (aIndex >= strLen) {\n throw new Error(\"Expected more digits in base 64 VLQ value.\");\n }\n\n digit = base64.decode(aStr.charCodeAt(aIndex++));\n if (digit === -1) {\n throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n }\n\n continuation = !!(digit & VLQ_CONTINUATION_BIT);\n digit &= VLQ_BASE_MASK;\n result = result + (digit << shift);\n shift += VLQ_BASE_SHIFT;\n } while (continuation);\n\n aOutParam.value = fromVLQSigned(result);\n aOutParam.rest = aIndex;\n};\n","import { baggageHeaderToDynamicSamplingContext } from './baggage.js';\nimport { generateTraceId, generateSpanId } from './propagationContext.js';\n\n// eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor -- RegExp is used for readability here\nconst TRACEPARENT_REGEXP = new RegExp(\n '^[ \\\\t]*' + // whitespace\n '([0-9a-f]{32})?' + // trace_id\n '-?([0-9a-f]{16})?' + // span_id\n '-?([01])?' + // sampled\n '[ \\\\t]*$', // whitespace\n);\n\n/**\n * Extract transaction context data from a `sentry-trace` header.\n *\n * @param traceparent Traceparent string\n *\n * @returns Object containing data from the header, or undefined if traceparent string is malformed\n */\nfunction extractTraceparentData(traceparent) {\n if (!traceparent) {\n return undefined;\n }\n\n const matches = traceparent.match(TRACEPARENT_REGEXP);\n if (!matches) {\n return undefined;\n }\n\n let parentSampled;\n if (matches[3] === '1') {\n parentSampled = true;\n } else if (matches[3] === '0') {\n parentSampled = false;\n }\n\n return {\n traceId: matches[1],\n parentSampled,\n parentSpanId: matches[2],\n };\n}\n\n/**\n * Create a propagation context from incoming headers or\n * creates a minimal new one if the headers are undefined.\n */\nfunction propagationContextFromHeaders(\n sentryTrace,\n baggage,\n) {\n const traceparentData = extractTraceparentData(sentryTrace);\n const dynamicSamplingContext = baggageHeaderToDynamicSamplingContext(baggage);\n\n if (!traceparentData || !traceparentData.traceId) {\n return { traceId: generateTraceId(), spanId: generateSpanId() };\n }\n\n const { traceId, parentSpanId, parentSampled } = traceparentData;\n\n const virtualSpanId = generateSpanId();\n\n return {\n traceId,\n parentSpanId,\n spanId: virtualSpanId,\n sampled: parentSampled,\n dsc: dynamicSamplingContext || {}, // If we have traceparent data but no DSC it means we are not head of trace and we must freeze it\n };\n}\n\n/**\n * Create sentry-trace header from span context values.\n */\nfunction generateSentryTraceHeader(\n traceId = generateTraceId(),\n spanId = generateSpanId(),\n sampled,\n) {\n let sampledString = '';\n if (sampled !== undefined) {\n sampledString = sampled ? '-1' : '-0';\n }\n return `${traceId}-${spanId}${sampledString}`;\n}\n\nexport { TRACEPARENT_REGEXP, extractTraceparentData, generateSentryTraceHeader, propagationContextFromHeaders };\n","//! moment.js locale configuration\n//! locale : Maldivian [dv]\n//! author : Jawish Hameed : https://github.com/jawish\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var months = [\n 'ޖެނުއަރީ',\n 'ފެބްރުއަރީ',\n 'މާރިޗު',\n 'އޭޕްރީލު',\n 'މޭ',\n 'ޖޫން',\n 'ޖުލައި',\n 'އޯގަސްޓު',\n 'ސެޕްޓެމްބަރު',\n 'އޮކްޓޯބަރު',\n 'ނޮވެމްބަރު',\n 'ޑިސެމްބަރު',\n ],\n weekdays = [\n 'އާދިއްތަ',\n 'ހޯމަ',\n 'އަންގާރަ',\n 'ބުދަ',\n 'ބުރާސްފަތި',\n 'ހުކުރު',\n 'ހޮނިހިރު',\n ];\n\n var dv = moment.defineLocale('dv', {\n months: months,\n monthsShort: months,\n weekdays: weekdays,\n weekdaysShort: weekdays,\n weekdaysMin: 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'D/M/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n meridiemParse: /މކ|މފ/,\n isPM: function (input) {\n return 'މފ' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'މކ';\n } else {\n return 'މފ';\n }\n },\n calendar: {\n sameDay: '[މިއަދު] LT',\n nextDay: '[މާދަމާ] LT',\n nextWeek: 'dddd LT',\n lastDay: '[އިއްޔެ] LT',\n lastWeek: '[ފާއިތުވި] dddd LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'ތެރޭގައި %s',\n past: 'ކުރިން %s',\n s: 'ސިކުންތުކޮޅެއް',\n ss: 'd% ސިކުންތު',\n m: 'މިނިޓެއް',\n mm: 'މިނިޓު %d',\n h: 'ގަޑިއިރެއް',\n hh: 'ގަޑިއިރު %d',\n d: 'ދުވަހެއް',\n dd: 'ދުވަސް %d',\n M: 'މަހެއް',\n MM: 'މަސް %d',\n y: 'އަހަރެއް',\n yy: 'އަހަރު %d',\n },\n preparse: function (string) {\n return string.replace(/،/g, ',');\n },\n postformat: function (string) {\n return string.replace(/,/g, '،');\n },\n week: {\n dow: 7, // Sunday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return dv;\n\n})));\n","/**\n * @license Angular v15.0.4\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { ɵDomAdapter, ɵsetRootDomAdapter, ɵparseCookieValue, ɵgetDOM, DOCUMENT, ɵPLATFORM_BROWSER_ID, XhrFactory, CommonModule } from '@angular/common';\nexport { ɵgetDOM } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, ApplicationInitStatus, APP_INITIALIZER, Injector, ɵglobal, Injectable, Inject, ViewEncapsulation, APP_ID, RendererStyleFlags2, ɵinternalCreateApplication, ErrorHandler, ɵsetDocument, PLATFORM_ID, PLATFORM_INITIALIZER, createPlatformFactory, platformCore, ɵTESTABILITY_GETTER, ɵTESTABILITY, Testability, NgZone, TestabilityRegistry, ɵINJECTOR_SCOPE, RendererFactory2, ApplicationModule, NgModule, Optional, SkipSelf, ɵɵinject, ApplicationRef, inject, ɵConsole, forwardRef, ɵXSS_SECURITY_URL, SecurityContext, ɵallowSanitizationBypassAndThrow, ɵunwrapSafeValue, ɵ_sanitizeUrl, ɵ_sanitizeHtml, ɵbypassSanitizationTrustHtml, ɵbypassSanitizationTrustStyle, ɵbypassSanitizationTrustScript, ɵbypassSanitizationTrustUrl, ɵbypassSanitizationTrustResourceUrl, Version } from '@angular/core';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Provides DOM operations in any browser environment.\n *\n * @security Tread carefully! Interacting with the DOM directly is dangerous and\n * can introduce XSS risks.\n */\nclass GenericBrowserDomAdapter extends ɵDomAdapter {\n constructor() {\n super(...arguments);\n this.supportsDOMEvents = true;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A `DomAdapter` powered by full browser DOM APIs.\n *\n * @security Tread carefully! Interacting with the DOM directly is dangerous and\n * can introduce XSS risks.\n */\n/* tslint:disable:requireParameterType no-console */\nclass BrowserDomAdapter extends GenericBrowserDomAdapter {\n static makeCurrent() {\n ɵsetRootDomAdapter(new BrowserDomAdapter());\n }\n onAndCancel(el, evt, listener) {\n el.addEventListener(evt, listener, false);\n // Needed to follow Dart's subscription semantic, until fix of\n // https://code.google.com/p/dart/issues/detail?id=17406\n return () => {\n el.removeEventListener(evt, listener, false);\n };\n }\n dispatchEvent(el, evt) {\n el.dispatchEvent(evt);\n }\n remove(node) {\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n }\n createElement(tagName, doc) {\n doc = doc || this.getDefaultDocument();\n return doc.createElement(tagName);\n }\n createHtmlDocument() {\n return document.implementation.createHTMLDocument('fakeTitle');\n }\n getDefaultDocument() {\n return document;\n }\n isElementNode(node) {\n return node.nodeType === Node.ELEMENT_NODE;\n }\n isShadowRoot(node) {\n return node instanceof DocumentFragment;\n }\n /** @deprecated No longer being used in Ivy code. To be removed in version 14. */\n getGlobalEventTarget(doc, target) {\n if (target === 'window') {\n return window;\n }\n if (target === 'document') {\n return doc;\n }\n if (target === 'body') {\n return doc.body;\n }\n return null;\n }\n getBaseHref(doc) {\n const href = getBaseElementHref();\n return href == null ? null : relativePath(href);\n }\n resetBaseElement() {\n baseElement = null;\n }\n getUserAgent() {\n return window.navigator.userAgent;\n }\n getCookie(name) {\n return ɵparseCookieValue(document.cookie, name);\n }\n}\nlet baseElement = null;\nfunction getBaseElementHref() {\n baseElement = baseElement || document.querySelector('base');\n return baseElement ? baseElement.getAttribute('href') : null;\n}\n// based on urlUtils.js in AngularJS 1\nlet urlParsingNode;\nfunction relativePath(url) {\n urlParsingNode = urlParsingNode || document.createElement('a');\n urlParsingNode.setAttribute('href', url);\n const pathName = urlParsingNode.pathname;\n return pathName.charAt(0) === '/' ? pathName : `/${pathName}`;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * An id that identifies a particular application being bootstrapped, that should\n * match across the client/server boundary.\n */\nconst TRANSITION_ID = new InjectionToken('TRANSITION_ID');\nfunction appInitializerFactory(transitionId, document, injector) {\n return () => {\n // Wait for all application initializers to be completed before removing the styles set by\n // the server.\n injector.get(ApplicationInitStatus).donePromise.then(() => {\n const dom = ɵgetDOM();\n const styles = document.querySelectorAll(`style[ng-transition=\"${transitionId}\"]`);\n for (let i = 0; i < styles.length; i++) {\n dom.remove(styles[i]);\n }\n });\n };\n}\nconst SERVER_TRANSITION_PROVIDERS = [\n {\n provide: APP_INITIALIZER,\n useFactory: appInitializerFactory,\n deps: [TRANSITION_ID, DOCUMENT, Injector],\n multi: true\n },\n];\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass BrowserGetTestability {\n addToWindow(registry) {\n ɵglobal['getAngularTestability'] = (elem, findInAncestors = true) => {\n const testability = registry.findTestabilityInTree(elem, findInAncestors);\n if (testability == null) {\n throw new Error('Could not find testability for element.');\n }\n return testability;\n };\n ɵglobal['getAllAngularTestabilities'] = () => registry.getAllTestabilities();\n ɵglobal['getAllAngularRootElements'] = () => registry.getAllRootElements();\n const whenAllStable = (callback /** TODO #9100 */) => {\n const testabilities = ɵglobal['getAllAngularTestabilities']();\n let count = testabilities.length;\n let didWork = false;\n const decrement = function (didWork_ /** TODO #9100 */) {\n didWork = didWork || didWork_;\n count--;\n if (count == 0) {\n callback(didWork);\n }\n };\n testabilities.forEach(function (testability /** TODO #9100 */) {\n testability.whenStable(decrement);\n });\n };\n if (!ɵglobal['frameworkStabilizers']) {\n ɵglobal['frameworkStabilizers'] = [];\n }\n ɵglobal['frameworkStabilizers'].push(whenAllStable);\n }\n findTestabilityInTree(registry, elem, findInAncestors) {\n if (elem == null) {\n return null;\n }\n const t = registry.getTestability(elem);\n if (t != null) {\n return t;\n }\n else if (!findInAncestors) {\n return null;\n }\n if (ɵgetDOM().isShadowRoot(elem)) {\n return this.findTestabilityInTree(registry, elem.host, true);\n }\n return this.findTestabilityInTree(registry, elem.parentElement, true);\n }\n}\n\n/**\n * A factory for `HttpXhrBackend` that uses the `XMLHttpRequest` browser API.\n */\nclass BrowserXhr {\n build() {\n return new XMLHttpRequest();\n }\n}\nBrowserXhr.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: BrowserXhr, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nBrowserXhr.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: BrowserXhr });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: BrowserXhr, decorators: [{\n type: Injectable\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The injection token for the event-manager plug-in service.\n *\n * @publicApi\n */\nconst EVENT_MANAGER_PLUGINS = new InjectionToken('EventManagerPlugins');\n/**\n * An injectable service that provides event management for Angular\n * through a browser plug-in.\n *\n * @publicApi\n */\nclass EventManager {\n /**\n * Initializes an instance of the event-manager service.\n */\n constructor(plugins, _zone) {\n this._zone = _zone;\n this._eventNameToPlugin = new Map();\n plugins.forEach(p => p.manager = this);\n this._plugins = plugins.slice().reverse();\n }\n /**\n * Registers a handler for a specific element and event.\n *\n * @param element The HTML element to receive event notifications.\n * @param eventName The name of the event to listen for.\n * @param handler A function to call when the notification occurs. Receives the\n * event object as an argument.\n * @returns A callback function that can be used to remove the handler.\n */\n addEventListener(element, eventName, handler) {\n const plugin = this._findPluginFor(eventName);\n return plugin.addEventListener(element, eventName, handler);\n }\n /**\n * Registers a global handler for an event in a target view.\n *\n * @param target A target for global event notifications. One of \"window\", \"document\", or \"body\".\n * @param eventName The name of the event to listen for.\n * @param handler A function to call when the notification occurs. Receives the\n * event object as an argument.\n * @returns A callback function that can be used to remove the handler.\n * @deprecated No longer being used in Ivy code. To be removed in version 14.\n */\n addGlobalEventListener(target, eventName, handler) {\n const plugin = this._findPluginFor(eventName);\n return plugin.addGlobalEventListener(target, eventName, handler);\n }\n /**\n * Retrieves the compilation zone in which event listeners are registered.\n */\n getZone() {\n return this._zone;\n }\n /** @internal */\n _findPluginFor(eventName) {\n const plugin = this._eventNameToPlugin.get(eventName);\n if (plugin) {\n return plugin;\n }\n const plugins = this._plugins;\n for (let i = 0; i < plugins.length; i++) {\n const plugin = plugins[i];\n if (plugin.supports(eventName)) {\n this._eventNameToPlugin.set(eventName, plugin);\n return plugin;\n }\n }\n throw new Error(`No event manager plugin found for event ${eventName}`);\n }\n}\nEventManager.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: EventManager, deps: [{ token: EVENT_MANAGER_PLUGINS }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });\nEventManager.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: EventManager });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: EventManager, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [EVENT_MANAGER_PLUGINS]\n }] }, { type: i0.NgZone }]; } });\nclass EventManagerPlugin {\n constructor(_doc) {\n this._doc = _doc;\n }\n addGlobalEventListener(element, eventName, handler) {\n const target = ɵgetDOM().getGlobalEventTarget(this._doc, element);\n if (!target) {\n throw new Error(`Unsupported event target ${target} for event ${eventName}`);\n }\n return this.addEventListener(target, eventName, handler);\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass SharedStylesHost {\n constructor() {\n /** @internal */\n this._stylesSet = new Set();\n }\n addStyles(styles) {\n const additions = new Set();\n styles.forEach(style => {\n if (!this._stylesSet.has(style)) {\n this._stylesSet.add(style);\n additions.add(style);\n }\n });\n this.onStylesAdded(additions);\n }\n onStylesAdded(additions) { }\n getAllStyles() {\n return Array.from(this._stylesSet);\n }\n}\nSharedStylesHost.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: SharedStylesHost, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nSharedStylesHost.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: SharedStylesHost });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: SharedStylesHost, decorators: [{\n type: Injectable\n }] });\nclass DomSharedStylesHost extends SharedStylesHost {\n constructor(_doc) {\n super();\n this._doc = _doc;\n // Maps all registered host nodes to a list of style nodes that have been added to the host node.\n this._hostNodes = new Map();\n this._hostNodes.set(_doc.head, []);\n }\n _addStylesToHost(styles, host, styleNodes) {\n styles.forEach((style) => {\n const styleEl = this._doc.createElement('style');\n styleEl.textContent = style;\n styleNodes.push(host.appendChild(styleEl));\n });\n }\n addHost(hostNode) {\n const styleNodes = [];\n this._addStylesToHost(this._stylesSet, hostNode, styleNodes);\n this._hostNodes.set(hostNode, styleNodes);\n }\n removeHost(hostNode) {\n const styleNodes = this._hostNodes.get(hostNode);\n if (styleNodes) {\n styleNodes.forEach(removeStyle);\n }\n this._hostNodes.delete(hostNode);\n }\n onStylesAdded(additions) {\n this._hostNodes.forEach((styleNodes, hostNode) => {\n this._addStylesToHost(additions, hostNode, styleNodes);\n });\n }\n ngOnDestroy() {\n this._hostNodes.forEach(styleNodes => styleNodes.forEach(removeStyle));\n }\n}\nDomSharedStylesHost.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: DomSharedStylesHost, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nDomSharedStylesHost.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: DomSharedStylesHost });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: DomSharedStylesHost, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; } });\nfunction removeStyle(styleNode) {\n ɵgetDOM().remove(styleNode);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst NAMESPACE_URIS = {\n 'svg': 'http://www.w3.org/2000/svg',\n 'xhtml': 'http://www.w3.org/1999/xhtml',\n 'xlink': 'http://www.w3.org/1999/xlink',\n 'xml': 'http://www.w3.org/XML/1998/namespace',\n 'xmlns': 'http://www.w3.org/2000/xmlns/',\n 'math': 'http://www.w3.org/1998/MathML/',\n};\nconst COMPONENT_REGEX = /%COMP%/g;\nconst NG_DEV_MODE$1 = typeof ngDevMode === 'undefined' || !!ngDevMode;\nconst COMPONENT_VARIABLE = '%COMP%';\nconst HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;\nconst CONTENT_ATTR = `_ngcontent-${COMPONENT_VARIABLE}`;\nfunction shimContentAttribute(componentShortId) {\n return CONTENT_ATTR.replace(COMPONENT_REGEX, componentShortId);\n}\nfunction shimHostAttribute(componentShortId) {\n return HOST_ATTR.replace(COMPONENT_REGEX, componentShortId);\n}\nfunction flattenStyles(compId, styles) {\n // Cannot use `Infinity` as depth as `infinity` is not a number literal in TypeScript.\n // See: https://github.com/microsoft/TypeScript/issues/32277\n return styles.flat(100).map(s => s.replace(COMPONENT_REGEX, compId));\n}\nfunction decoratePreventDefault(eventHandler) {\n // `DebugNode.triggerEventHandler` needs to know if the listener was created with\n // decoratePreventDefault or is a listener added outside the Angular context so it can handle the\n // two differently. In the first case, the special '__ngUnwrap__' token is passed to the unwrap\n // the listener (see below).\n return (event) => {\n // Ivy uses '__ngUnwrap__' as a special token that allows us to unwrap the function\n // so that it can be invoked programmatically by `DebugNode.triggerEventHandler`. The debug_node\n // can inspect the listener toString contents for the existence of this special token. Because\n // the token is a string literal, it is ensured to not be modified by compiled code.\n if (event === '__ngUnwrap__') {\n return eventHandler;\n }\n const allowDefaultBehavior = eventHandler(event);\n if (allowDefaultBehavior === false) {\n // TODO(tbosch): move preventDefault into event plugins...\n event.preventDefault();\n event.returnValue = false;\n }\n return undefined;\n };\n}\nlet hasLoggedNativeEncapsulationWarning = false;\nclass DomRendererFactory2 {\n constructor(eventManager, sharedStylesHost, appId) {\n this.eventManager = eventManager;\n this.sharedStylesHost = sharedStylesHost;\n this.appId = appId;\n this.rendererByCompId = new Map();\n this.defaultRenderer = new DefaultDomRenderer2(eventManager);\n }\n createRenderer(element, type) {\n if (!element || !type) {\n return this.defaultRenderer;\n }\n switch (type.encapsulation) {\n case ViewEncapsulation.Emulated: {\n let renderer = this.rendererByCompId.get(type.id);\n if (!renderer) {\n renderer = new EmulatedEncapsulationDomRenderer2(this.eventManager, this.sharedStylesHost, type, this.appId);\n this.rendererByCompId.set(type.id, renderer);\n }\n renderer.applyToHost(element);\n return renderer;\n }\n // @ts-ignore TODO: Remove as part of FW-2290. TS complains about us dealing with an enum\n // value that is not known (but previously was the value for ViewEncapsulation.Native)\n case 1:\n case ViewEncapsulation.ShadowDom:\n // TODO(FW-2290): remove the `case 1:` fallback logic and the warning in v12.\n if ((typeof ngDevMode === 'undefined' || ngDevMode) &&\n // @ts-ignore TODO: Remove as part of FW-2290. TS complains about us dealing with an\n // enum value that is not known (but previously was the value for\n // ViewEncapsulation.Native)\n !hasLoggedNativeEncapsulationWarning && type.encapsulation === 1) {\n hasLoggedNativeEncapsulationWarning = true;\n console.warn('ViewEncapsulation.Native is no longer supported. Falling back to ViewEncapsulation.ShadowDom. The fallback will be removed in v12.');\n }\n return new ShadowDomRenderer(this.eventManager, this.sharedStylesHost, element, type);\n default: {\n if (!this.rendererByCompId.has(type.id)) {\n const styles = flattenStyles(type.id, type.styles);\n this.sharedStylesHost.addStyles(styles);\n this.rendererByCompId.set(type.id, this.defaultRenderer);\n }\n return this.defaultRenderer;\n }\n }\n }\n begin() { }\n end() { }\n}\nDomRendererFactory2.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: DomRendererFactory2, deps: [{ token: EventManager }, { token: DomSharedStylesHost }, { token: APP_ID }], target: i0.ɵɵFactoryTarget.Injectable });\nDomRendererFactory2.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: DomRendererFactory2 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: DomRendererFactory2, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: EventManager }, { type: DomSharedStylesHost }, { type: undefined, decorators: [{\n type: Inject,\n args: [APP_ID]\n }] }]; } });\nclass DefaultDomRenderer2 {\n constructor(eventManager) {\n this.eventManager = eventManager;\n this.data = Object.create(null);\n this.destroyNode = null;\n }\n destroy() { }\n createElement(name, namespace) {\n if (namespace) {\n // TODO: `|| namespace` was added in\n // https://github.com/angular/angular/commit/2b9cc8503d48173492c29f5a271b61126104fbdb to\n // support how Ivy passed around the namespace URI rather than short name at the time. It did\n // not, however extend the support to other parts of the system (setAttribute, setAttribute,\n // and the ServerRenderer). We should decide what exactly the semantics for dealing with\n // namespaces should be and make it consistent.\n // Related issues:\n // https://github.com/angular/angular/issues/44028\n // https://github.com/angular/angular/issues/44883\n return document.createElementNS(NAMESPACE_URIS[namespace] || namespace, name);\n }\n return document.createElement(name);\n }\n createComment(value) {\n return document.createComment(value);\n }\n createText(value) {\n return document.createTextNode(value);\n }\n appendChild(parent, newChild) {\n const targetParent = isTemplateNode(parent) ? parent.content : parent;\n targetParent.appendChild(newChild);\n }\n insertBefore(parent, newChild, refChild) {\n if (parent) {\n const targetParent = isTemplateNode(parent) ? parent.content : parent;\n targetParent.insertBefore(newChild, refChild);\n }\n }\n removeChild(parent, oldChild) {\n if (parent) {\n parent.removeChild(oldChild);\n }\n }\n selectRootElement(selectorOrNode, preserveContent) {\n let el = typeof selectorOrNode === 'string' ? document.querySelector(selectorOrNode) :\n selectorOrNode;\n if (!el) {\n throw new Error(`The selector \"${selectorOrNode}\" did not match any elements`);\n }\n if (!preserveContent) {\n el.textContent = '';\n }\n return el;\n }\n parentNode(node) {\n return node.parentNode;\n }\n nextSibling(node) {\n return node.nextSibling;\n }\n setAttribute(el, name, value, namespace) {\n if (namespace) {\n name = namespace + ':' + name;\n const namespaceUri = NAMESPACE_URIS[namespace];\n if (namespaceUri) {\n el.setAttributeNS(namespaceUri, name, value);\n }\n else {\n el.setAttribute(name, value);\n }\n }\n else {\n el.setAttribute(name, value);\n }\n }\n removeAttribute(el, name, namespace) {\n if (namespace) {\n const namespaceUri = NAMESPACE_URIS[namespace];\n if (namespaceUri) {\n el.removeAttributeNS(namespaceUri, name);\n }\n else {\n el.removeAttribute(`${namespace}:${name}`);\n }\n }\n else {\n el.removeAttribute(name);\n }\n }\n addClass(el, name) {\n el.classList.add(name);\n }\n removeClass(el, name) {\n el.classList.remove(name);\n }\n setStyle(el, style, value, flags) {\n if (flags & (RendererStyleFlags2.DashCase | RendererStyleFlags2.Important)) {\n el.style.setProperty(style, value, flags & RendererStyleFlags2.Important ? 'important' : '');\n }\n else {\n el.style[style] = value;\n }\n }\n removeStyle(el, style, flags) {\n if (flags & RendererStyleFlags2.DashCase) {\n el.style.removeProperty(style);\n }\n else {\n // IE requires '' instead of null\n // see https://github.com/angular/angular/issues/7916\n el.style[style] = '';\n }\n }\n setProperty(el, name, value) {\n NG_DEV_MODE$1 && checkNoSyntheticProp(name, 'property');\n el[name] = value;\n }\n setValue(node, value) {\n node.nodeValue = value;\n }\n listen(target, event, callback) {\n NG_DEV_MODE$1 && checkNoSyntheticProp(event, 'listener');\n if (typeof target === 'string') {\n return this.eventManager.addGlobalEventListener(target, event, decoratePreventDefault(callback));\n }\n return this.eventManager.addEventListener(target, event, decoratePreventDefault(callback));\n }\n}\nconst AT_CHARCODE = (() => '@'.charCodeAt(0))();\nfunction checkNoSyntheticProp(name, nameKind) {\n if (name.charCodeAt(0) === AT_CHARCODE) {\n throw new Error(`Unexpected synthetic ${nameKind} ${name} found. Please make sure that:\n - Either \\`BrowserAnimationsModule\\` or \\`NoopAnimationsModule\\` are imported in your application.\n - There is corresponding configuration for the animation named \\`${name}\\` defined in the \\`animations\\` field of the \\`@Component\\` decorator (see https://angular.io/api/core/Component#animations).`);\n }\n}\nfunction isTemplateNode(node) {\n return node.tagName === 'TEMPLATE' && node.content !== undefined;\n}\nclass EmulatedEncapsulationDomRenderer2 extends DefaultDomRenderer2 {\n constructor(eventManager, sharedStylesHost, component, appId) {\n super(eventManager);\n this.component = component;\n const styles = flattenStyles(appId + '-' + component.id, component.styles);\n sharedStylesHost.addStyles(styles);\n this.contentAttr = shimContentAttribute(appId + '-' + component.id);\n this.hostAttr = shimHostAttribute(appId + '-' + component.id);\n }\n applyToHost(element) {\n super.setAttribute(element, this.hostAttr, '');\n }\n createElement(parent, name) {\n const el = super.createElement(parent, name);\n super.setAttribute(el, this.contentAttr, '');\n return el;\n }\n}\nclass ShadowDomRenderer extends DefaultDomRenderer2 {\n constructor(eventManager, sharedStylesHost, hostEl, component) {\n super(eventManager);\n this.sharedStylesHost = sharedStylesHost;\n this.hostEl = hostEl;\n this.shadowRoot = hostEl.attachShadow({ mode: 'open' });\n this.sharedStylesHost.addHost(this.shadowRoot);\n const styles = flattenStyles(component.id, component.styles);\n for (let i = 0; i < styles.length; i++) {\n const styleEl = document.createElement('style');\n styleEl.textContent = styles[i];\n this.shadowRoot.appendChild(styleEl);\n }\n }\n nodeOrShadowRoot(node) {\n return node === this.hostEl ? this.shadowRoot : node;\n }\n destroy() {\n this.sharedStylesHost.removeHost(this.shadowRoot);\n }\n appendChild(parent, newChild) {\n return super.appendChild(this.nodeOrShadowRoot(parent), newChild);\n }\n insertBefore(parent, newChild, refChild) {\n return super.insertBefore(this.nodeOrShadowRoot(parent), newChild, refChild);\n }\n removeChild(parent, oldChild) {\n return super.removeChild(this.nodeOrShadowRoot(parent), oldChild);\n }\n parentNode(node) {\n return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(node)));\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass DomEventsPlugin extends EventManagerPlugin {\n constructor(doc) {\n super(doc);\n }\n // This plugin should come last in the list of plugins, because it accepts all\n // events.\n supports(eventName) {\n return true;\n }\n addEventListener(element, eventName, handler) {\n element.addEventListener(eventName, handler, false);\n return () => this.removeEventListener(element, eventName, handler);\n }\n removeEventListener(target, eventName, callback) {\n return target.removeEventListener(eventName, callback);\n }\n}\nDomEventsPlugin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: DomEventsPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nDomEventsPlugin.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: DomEventsPlugin });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: DomEventsPlugin, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Defines supported modifiers for key events.\n */\nconst MODIFIER_KEYS = ['alt', 'control', 'meta', 'shift'];\n// The following values are here for cross-browser compatibility and to match the W3C standard\n// cf https://www.w3.org/TR/DOM-Level-3-Events-key/\nconst _keyMap = {\n '\\b': 'Backspace',\n '\\t': 'Tab',\n '\\x7F': 'Delete',\n '\\x1B': 'Escape',\n 'Del': 'Delete',\n 'Esc': 'Escape',\n 'Left': 'ArrowLeft',\n 'Right': 'ArrowRight',\n 'Up': 'ArrowUp',\n 'Down': 'ArrowDown',\n 'Menu': 'ContextMenu',\n 'Scroll': 'ScrollLock',\n 'Win': 'OS'\n};\n/**\n * Retrieves modifiers from key-event objects.\n */\nconst MODIFIER_KEY_GETTERS = {\n 'alt': (event) => event.altKey,\n 'control': (event) => event.ctrlKey,\n 'meta': (event) => event.metaKey,\n 'shift': (event) => event.shiftKey\n};\n/**\n * @publicApi\n * A browser plug-in that provides support for handling of key events in Angular.\n */\nclass KeyEventsPlugin extends EventManagerPlugin {\n /**\n * Initializes an instance of the browser plug-in.\n * @param doc The document in which key events will be detected.\n */\n constructor(doc) {\n super(doc);\n }\n /**\n * Reports whether a named key event is supported.\n * @param eventName The event name to query.\n * @return True if the named key event is supported.\n */\n supports(eventName) {\n return KeyEventsPlugin.parseEventName(eventName) != null;\n }\n /**\n * Registers a handler for a specific element and key event.\n * @param element The HTML element to receive event notifications.\n * @param eventName The name of the key event to listen for.\n * @param handler A function to call when the notification occurs. Receives the\n * event object as an argument.\n * @returns The key event that was registered.\n */\n addEventListener(element, eventName, handler) {\n const parsedEvent = KeyEventsPlugin.parseEventName(eventName);\n const outsideHandler = KeyEventsPlugin.eventCallback(parsedEvent['fullKey'], handler, this.manager.getZone());\n return this.manager.getZone().runOutsideAngular(() => {\n return ɵgetDOM().onAndCancel(element, parsedEvent['domEventName'], outsideHandler);\n });\n }\n /**\n * Parses the user provided full keyboard event definition and normalizes it for\n * later internal use. It ensures the string is all lowercase, converts special\n * characters to a standard spelling, and orders all the values consistently.\n *\n * @param eventName The name of the key event to listen for.\n * @returns an object with the full, normalized string, and the dom event name\n * or null in the case when the event doesn't match a keyboard event.\n */\n static parseEventName(eventName) {\n const parts = eventName.toLowerCase().split('.');\n const domEventName = parts.shift();\n if ((parts.length === 0) || !(domEventName === 'keydown' || domEventName === 'keyup')) {\n return null;\n }\n const key = KeyEventsPlugin._normalizeKey(parts.pop());\n let fullKey = '';\n let codeIX = parts.indexOf('code');\n if (codeIX > -1) {\n parts.splice(codeIX, 1);\n fullKey = 'code.';\n }\n MODIFIER_KEYS.forEach(modifierName => {\n const index = parts.indexOf(modifierName);\n if (index > -1) {\n parts.splice(index, 1);\n fullKey += modifierName + '.';\n }\n });\n fullKey += key;\n if (parts.length != 0 || key.length === 0) {\n // returning null instead of throwing to let another plugin process the event\n return null;\n }\n // NOTE: Please don't rewrite this as so, as it will break JSCompiler property renaming.\n // The code must remain in the `result['domEventName']` form.\n // return {domEventName, fullKey};\n const result = {};\n result['domEventName'] = domEventName;\n result['fullKey'] = fullKey;\n return result;\n }\n /**\n * Determines whether the actual keys pressed match the configured key code string.\n * The `fullKeyCode` event is normalized in the `parseEventName` method when the\n * event is attached to the DOM during the `addEventListener` call. This is unseen\n * by the end user and is normalized for internal consistency and parsing.\n *\n * @param event The keyboard event.\n * @param fullKeyCode The normalized user defined expected key event string\n * @returns boolean.\n */\n static matchEventFullKeyCode(event, fullKeyCode) {\n let keycode = _keyMap[event.key] || event.key;\n let key = '';\n if (fullKeyCode.indexOf('code.') > -1) {\n keycode = event.code;\n key = 'code.';\n }\n // the keycode could be unidentified so we have to check here\n if (keycode == null || !keycode)\n return false;\n keycode = keycode.toLowerCase();\n if (keycode === ' ') {\n keycode = 'space'; // for readability\n }\n else if (keycode === '.') {\n keycode = 'dot'; // because '.' is used as a separator in event names\n }\n MODIFIER_KEYS.forEach(modifierName => {\n if (modifierName !== keycode) {\n const modifierGetter = MODIFIER_KEY_GETTERS[modifierName];\n if (modifierGetter(event)) {\n key += modifierName + '.';\n }\n }\n });\n key += keycode;\n return key === fullKeyCode;\n }\n /**\n * Configures a handler callback for a key event.\n * @param fullKey The event name that combines all simultaneous keystrokes.\n * @param handler The function that responds to the key event.\n * @param zone The zone in which the event occurred.\n * @returns A callback function.\n */\n static eventCallback(fullKey, handler, zone) {\n return (event) => {\n if (KeyEventsPlugin.matchEventFullKeyCode(event, fullKey)) {\n zone.runGuarded(() => handler(event));\n }\n };\n }\n /** @internal */\n static _normalizeKey(keyName) {\n // TODO: switch to a Map if the mapping grows too much\n switch (keyName) {\n case 'esc':\n return 'escape';\n default:\n return keyName;\n }\n }\n}\nKeyEventsPlugin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: KeyEventsPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nKeyEventsPlugin.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: KeyEventsPlugin });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: KeyEventsPlugin, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst NG_DEV_MODE = typeof ngDevMode === 'undefined' || !!ngDevMode;\n/**\n * Bootstraps an instance of an Angular application and renders a standalone component as the\n * application's root component. More information about standalone components can be found in [this\n * guide](guide/standalone-components).\n *\n * @usageNotes\n * The root component passed into this function *must* be a standalone one (should have the\n * `standalone: true` flag in the `@Component` decorator config).\n *\n * ```typescript\n * @Component({\n * standalone: true,\n * template: 'Hello world!'\n * })\n * class RootComponent {}\n *\n * const appRef: ApplicationRef = await bootstrapApplication(RootComponent);\n * ```\n *\n * You can add the list of providers that should be available in the application injector by\n * specifying the `providers` field in an object passed as the second argument:\n *\n * ```typescript\n * await bootstrapApplication(RootComponent, {\n * providers: [\n * {provide: BACKEND_URL, useValue: 'https://yourdomain.com/api'}\n * ]\n * });\n * ```\n *\n * The `importProvidersFrom` helper method can be used to collect all providers from any\n * existing NgModule (and transitively from all NgModules that it imports):\n *\n * ```typescript\n * await bootstrapApplication(RootComponent, {\n * providers: [\n * importProvidersFrom(SomeNgModule)\n * ]\n * });\n * ```\n *\n * Note: the `bootstrapApplication` method doesn't include [Testability](api/core/Testability) by\n * default. You can add [Testability](api/core/Testability) by getting the list of necessary\n * providers using `provideProtractorTestingSupport()` function and adding them into the `providers`\n * array, for example:\n *\n * ```typescript\n * import {provideProtractorTestingSupport} from '@angular/platform-browser';\n *\n * await bootstrapApplication(RootComponent, {providers: [provideProtractorTestingSupport()]});\n * ```\n *\n * @param rootComponent A reference to a standalone component that should be rendered.\n * @param options Extra configuration for the bootstrap operation, see `ApplicationConfig` for\n * additional info.\n * @returns A promise that returns an `ApplicationRef` instance once resolved.\n *\n * @publicApi\n */\nfunction bootstrapApplication(rootComponent, options) {\n return ɵinternalCreateApplication({ rootComponent, ...createProvidersConfig(options) });\n}\n/**\n * Create an instance of an Angular application without bootstrapping any components. This is useful\n * for the situation where one wants to decouple application environment creation (a platform and\n * associated injectors) from rendering components on a screen. Components can be subsequently\n * bootstrapped on the returned `ApplicationRef`.\n *\n * @param options Extra configuration for the application environment, see `ApplicationConfig` for\n * additional info.\n * @returns A promise that returns an `ApplicationRef` instance once resolved.\n *\n * @publicApi\n */\nfunction createApplication(options) {\n return ɵinternalCreateApplication(createProvidersConfig(options));\n}\nfunction createProvidersConfig(options) {\n return {\n appProviders: [\n ...BROWSER_MODULE_PROVIDERS,\n ...(options?.providers ?? []),\n ],\n platformProviders: INTERNAL_BROWSER_PLATFORM_PROVIDERS\n };\n}\n/**\n * Returns a set of providers required to setup [Testability](api/core/Testability) for an\n * application bootstrapped using the `bootstrapApplication` function. The set of providers is\n * needed to support testing an application with Protractor (which relies on the Testability APIs\n * to be present).\n *\n * @returns An array of providers required to setup Testability for an application and make it\n * available for testing using Protractor.\n *\n * @publicApi\n */\nfunction provideProtractorTestingSupport() {\n // Return a copy to prevent changes to the original array in case any in-place\n // alterations are performed to the `provideProtractorTestingSupport` call results in app code.\n return [...TESTABILITY_PROVIDERS];\n}\nfunction initDomAdapter() {\n BrowserDomAdapter.makeCurrent();\n}\nfunction errorHandler() {\n return new ErrorHandler();\n}\nfunction _document() {\n // Tell ivy about the global document\n ɵsetDocument(document);\n return document;\n}\nconst INTERNAL_BROWSER_PLATFORM_PROVIDERS = [\n { provide: PLATFORM_ID, useValue: ɵPLATFORM_BROWSER_ID },\n { provide: PLATFORM_INITIALIZER, useValue: initDomAdapter, multi: true },\n { provide: DOCUMENT, useFactory: _document, deps: [] },\n];\n/**\n * A factory function that returns a `PlatformRef` instance associated with browser service\n * providers.\n *\n * @publicApi\n */\nconst platformBrowser = createPlatformFactory(platformCore, 'browser', INTERNAL_BROWSER_PLATFORM_PROVIDERS);\n/**\n * Internal marker to signal whether providers from the `BrowserModule` are already present in DI.\n * This is needed to avoid loading `BrowserModule` providers twice. We can't rely on the\n * `BrowserModule` presence itself, since the standalone-based bootstrap just imports\n * `BrowserModule` providers without referencing the module itself.\n */\nconst BROWSER_MODULE_PROVIDERS_MARKER = new InjectionToken(NG_DEV_MODE ? 'BrowserModule Providers Marker' : '');\nconst TESTABILITY_PROVIDERS = [\n {\n provide: ɵTESTABILITY_GETTER,\n useClass: BrowserGetTestability,\n deps: [],\n },\n {\n provide: ɵTESTABILITY,\n useClass: Testability,\n deps: [NgZone, TestabilityRegistry, ɵTESTABILITY_GETTER]\n },\n {\n provide: Testability,\n useClass: Testability,\n deps: [NgZone, TestabilityRegistry, ɵTESTABILITY_GETTER]\n }\n];\nconst BROWSER_MODULE_PROVIDERS = [\n { provide: ɵINJECTOR_SCOPE, useValue: 'root' },\n { provide: ErrorHandler, useFactory: errorHandler, deps: [] }, {\n provide: EVENT_MANAGER_PLUGINS,\n useClass: DomEventsPlugin,\n multi: true,\n deps: [DOCUMENT, NgZone, PLATFORM_ID]\n },\n { provide: EVENT_MANAGER_PLUGINS, useClass: KeyEventsPlugin, multi: true, deps: [DOCUMENT] }, {\n provide: DomRendererFactory2,\n useClass: DomRendererFactory2,\n deps: [EventManager, DomSharedStylesHost, APP_ID]\n },\n { provide: RendererFactory2, useExisting: DomRendererFactory2 },\n { provide: SharedStylesHost, useExisting: DomSharedStylesHost },\n { provide: DomSharedStylesHost, useClass: DomSharedStylesHost, deps: [DOCUMENT] },\n { provide: EventManager, useClass: EventManager, deps: [EVENT_MANAGER_PLUGINS, NgZone] },\n { provide: XhrFactory, useClass: BrowserXhr, deps: [] },\n NG_DEV_MODE ? { provide: BROWSER_MODULE_PROVIDERS_MARKER, useValue: true } : []\n];\n/**\n * Exports required infrastructure for all Angular apps.\n * Included by default in all Angular apps created with the CLI\n * `new` command.\n * Re-exports `CommonModule` and `ApplicationModule`, making their\n * exports and providers available to all apps.\n *\n * @publicApi\n */\nclass BrowserModule {\n constructor(providersAlreadyPresent) {\n if (NG_DEV_MODE && providersAlreadyPresent) {\n throw new Error(`Providers from the \\`BrowserModule\\` have already been loaded. If you need access ` +\n `to common directives such as NgIf and NgFor, import the \\`CommonModule\\` instead.`);\n }\n }\n /**\n * Configures a browser-based app to transition from a server-rendered app, if\n * one is present on the page.\n *\n * @param params An object containing an identifier for the app to transition.\n * The ID must match between the client and server versions of the app.\n * @returns The reconfigured `BrowserModule` to import into the app's root `AppModule`.\n */\n static withServerTransition(params) {\n return {\n ngModule: BrowserModule,\n providers: [\n { provide: APP_ID, useValue: params.appId },\n { provide: TRANSITION_ID, useExisting: APP_ID },\n SERVER_TRANSITION_PROVIDERS,\n ],\n };\n }\n}\nBrowserModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: BrowserModule, deps: [{ token: BROWSER_MODULE_PROVIDERS_MARKER, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.NgModule });\nBrowserModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.0.4\", ngImport: i0, type: BrowserModule, exports: [CommonModule, ApplicationModule] });\nBrowserModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: BrowserModule, providers: [\n ...BROWSER_MODULE_PROVIDERS,\n ...TESTABILITY_PROVIDERS\n ], imports: [CommonModule, ApplicationModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: BrowserModule, decorators: [{\n type: NgModule,\n args: [{\n providers: [\n ...BROWSER_MODULE_PROVIDERS,\n ...TESTABILITY_PROVIDERS\n ],\n exports: [CommonModule, ApplicationModule],\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Optional\n }, {\n type: SkipSelf\n }, {\n type: Inject,\n args: [BROWSER_MODULE_PROVIDERS_MARKER]\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Factory to create a `Meta` service instance for the current DOM document.\n */\nfunction createMeta() {\n return new Meta(ɵɵinject(DOCUMENT));\n}\n/**\n * A service for managing HTML `` tags.\n *\n * Properties of the `MetaDefinition` object match the attributes of the\n * HTML `` tag. These tags define document metadata that is important for\n * things like configuring a Content Security Policy, defining browser compatibility\n * and security settings, setting HTTP Headers, defining rich content for social sharing,\n * and Search Engine Optimization (SEO).\n *\n * To identify specific `` tags in a document, use an attribute selection\n * string in the format `\"tag_attribute='value string'\"`.\n * For example, an `attrSelector` value of `\"name='description'\"` matches a tag\n * whose `name` attribute has the value `\"description\"`.\n * Selectors are used with the `querySelector()` Document method,\n * in the format `meta[{attrSelector}]`.\n *\n * @see [HTML meta tag](https://developer.mozilla.org/docs/Web/HTML/Element/meta)\n * @see [Document.querySelector()](https://developer.mozilla.org/docs/Web/API/Document/querySelector)\n *\n *\n * @publicApi\n */\nclass Meta {\n constructor(_doc) {\n this._doc = _doc;\n this._dom = ɵgetDOM();\n }\n /**\n * Retrieves or creates a specific `` tag element in the current HTML document.\n * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute\n * values in the provided tag definition, and verifies that all other attribute values are equal.\n * If an existing element is found, it is returned and is not modified in any way.\n * @param tag The definition of a `` element to match or create.\n * @param forceCreation True to create a new element without checking whether one already exists.\n * @returns The existing element with the same attributes and values if found,\n * the new element if no match is found, or `null` if the tag parameter is not defined.\n */\n addTag(tag, forceCreation = false) {\n if (!tag)\n return null;\n return this._getOrCreateElement(tag, forceCreation);\n }\n /**\n * Retrieves or creates a set of `` tag elements in the current HTML document.\n * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute\n * values in the provided tag definition, and verifies that all other attribute values are equal.\n * @param tags An array of tag definitions to match or create.\n * @param forceCreation True to create new elements without checking whether they already exist.\n * @returns The matching elements if found, or the new elements.\n */\n addTags(tags, forceCreation = false) {\n if (!tags)\n return [];\n return tags.reduce((result, tag) => {\n if (tag) {\n result.push(this._getOrCreateElement(tag, forceCreation));\n }\n return result;\n }, []);\n }\n /**\n * Retrieves a `` tag element in the current HTML document.\n * @param attrSelector The tag attribute and value to match against, in the format\n * `\"tag_attribute='value string'\"`.\n * @returns The matching element, if any.\n */\n getTag(attrSelector) {\n if (!attrSelector)\n return null;\n return this._doc.querySelector(`meta[${attrSelector}]`) || null;\n }\n /**\n * Retrieves a set of `` tag elements in the current HTML document.\n * @param attrSelector The tag attribute and value to match against, in the format\n * `\"tag_attribute='value string'\"`.\n * @returns The matching elements, if any.\n */\n getTags(attrSelector) {\n if (!attrSelector)\n return [];\n const list /*NodeList*/ = this._doc.querySelectorAll(`meta[${attrSelector}]`);\n return list ? [].slice.call(list) : [];\n }\n /**\n * Modifies an existing `` tag element in the current HTML document.\n * @param tag The tag description with which to replace the existing tag content.\n * @param selector A tag attribute and value to match against, to identify\n * an existing tag. A string in the format `\"tag_attribute=`value string`\"`.\n * If not supplied, matches a tag with the same `name` or `property` attribute value as the\n * replacement tag.\n * @return The modified element.\n */\n updateTag(tag, selector) {\n if (!tag)\n return null;\n selector = selector || this._parseSelector(tag);\n const meta = this.getTag(selector);\n if (meta) {\n return this._setMetaElementAttributes(tag, meta);\n }\n return this._getOrCreateElement(tag, true);\n }\n /**\n * Removes an existing `` tag element from the current HTML document.\n * @param attrSelector A tag attribute and value to match against, to identify\n * an existing tag. A string in the format `\"tag_attribute=`value string`\"`.\n */\n removeTag(attrSelector) {\n this.removeTagElement(this.getTag(attrSelector));\n }\n /**\n * Removes an existing `` tag element from the current HTML document.\n * @param meta The tag definition to match against to identify an existing tag.\n */\n removeTagElement(meta) {\n if (meta) {\n this._dom.remove(meta);\n }\n }\n _getOrCreateElement(meta, forceCreation = false) {\n if (!forceCreation) {\n const selector = this._parseSelector(meta);\n // It's allowed to have multiple elements with the same name so it's not enough to\n // just check that element with the same name already present on the page. We also need to\n // check if element has tag attributes\n const elem = this.getTags(selector).filter(elem => this._containsAttributes(meta, elem))[0];\n if (elem !== undefined)\n return elem;\n }\n const element = this._dom.createElement('meta');\n this._setMetaElementAttributes(meta, element);\n const head = this._doc.getElementsByTagName('head')[0];\n head.appendChild(element);\n return element;\n }\n _setMetaElementAttributes(tag, el) {\n Object.keys(tag).forEach((prop) => el.setAttribute(this._getMetaKeyMap(prop), tag[prop]));\n return el;\n }\n _parseSelector(tag) {\n const attr = tag.name ? 'name' : 'property';\n return `${attr}=\"${tag[attr]}\"`;\n }\n _containsAttributes(tag, elem) {\n return Object.keys(tag).every((key) => elem.getAttribute(this._getMetaKeyMap(key)) === tag[key]);\n }\n _getMetaKeyMap(prop) {\n return META_KEYS_MAP[prop] || prop;\n }\n}\nMeta.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: Meta, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nMeta.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: Meta, providedIn: 'root', useFactory: createMeta, deps: [] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: Meta, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root', useFactory: createMeta, deps: [] }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; } });\n/**\n * Mapping for MetaDefinition properties with their correct meta attribute names\n */\nconst META_KEYS_MAP = {\n httpEquiv: 'http-equiv'\n};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Factory to create Title service.\n */\nfunction createTitle() {\n return new Title(ɵɵinject(DOCUMENT));\n}\n/**\n * A service that can be used to get and set the title of a current HTML document.\n *\n * Since an Angular application can't be bootstrapped on the entire HTML document (`` tag)\n * it is not possible to bind to the `text` property of the `HTMLTitleElement` elements\n * (representing the `` tag). Instead, this service can be used to set and get the current\n * title value.\n *\n * @publicApi\n */\nclass Title {\n constructor(_doc) {\n this._doc = _doc;\n }\n /**\n * Get the title of the current HTML document.\n */\n getTitle() {\n return this._doc.title;\n }\n /**\n * Set the title of the current HTML document.\n * @param newTitle\n */\n setTitle(newTitle) {\n this._doc.title = newTitle || '';\n }\n}\nTitle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: Title, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nTitle.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: Title, providedIn: 'root', useFactory: createTitle, deps: [] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: Title, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root', useFactory: createTitle, deps: [] }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst CAMEL_CASE_REGEXP = /([A-Z])/g;\nconst DASH_CASE_REGEXP = /-([a-z])/g;\nfunction camelCaseToDashCase(input) {\n return input.replace(CAMEL_CASE_REGEXP, (...m) => '-' + m[1].toLowerCase());\n}\nfunction dashCaseToCamelCase(input) {\n return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase());\n}\n/**\n * Exports the value under a given `name` in the global property `ng`. For example `ng.probe` if\n * `name` is `'probe'`.\n * @param name Name under which it will be exported. Keep in mind this will be a property of the\n * global `ng` object.\n * @param value The value to export.\n */\nfunction exportNgVar(name, value) {\n if (typeof COMPILED === 'undefined' || !COMPILED) {\n // Note: we can't export `ng` when using closure enhanced optimization as:\n // - closure declares globals itself for minified names, which sometimes clobber our `ng` global\n // - we can't declare a closure extern as the namespace `ng` is already used within Google\n // for typings for angularJS (via `goog.provide('ng....')`).\n const ng = ɵglobal['ng'] = ɵglobal['ng'] || {};\n ng[name] = value;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst win = typeof window !== 'undefined' && window || {};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass ChangeDetectionPerfRecord {\n constructor(msPerTick, numTicks) {\n this.msPerTick = msPerTick;\n this.numTicks = numTicks;\n }\n}\n/**\n * Entry point for all Angular profiling-related debug tools. This object\n * corresponds to the `ng.profiler` in the dev console.\n */\nclass AngularProfiler {\n constructor(ref) {\n this.appRef = ref.injector.get(ApplicationRef);\n }\n // tslint:disable:no-console\n /**\n * Exercises change detection in a loop and then prints the average amount of\n * time in milliseconds how long a single round of change detection takes for\n * the current state of the UI. It runs a minimum of 5 rounds for a minimum\n * of 500 milliseconds.\n *\n * Optionally, a user may pass a `config` parameter containing a map of\n * options. Supported options are:\n *\n * `record` (boolean) - causes the profiler to record a CPU profile while\n * it exercises the change detector. Example:\n *\n * ```\n * ng.profiler.timeChangeDetection({record: true})\n * ```\n */\n timeChangeDetection(config) {\n const record = config && config['record'];\n const profileName = 'Change Detection';\n // Profiler is not available in Android browsers without dev tools opened\n const isProfilerAvailable = win.console.profile != null;\n if (record && isProfilerAvailable) {\n win.console.profile(profileName);\n }\n const start = performanceNow();\n let numTicks = 0;\n while (numTicks < 5 || (performanceNow() - start) < 500) {\n this.appRef.tick();\n numTicks++;\n }\n const end = performanceNow();\n if (record && isProfilerAvailable) {\n win.console.profileEnd(profileName);\n }\n const msPerTick = (end - start) / numTicks;\n win.console.log(`ran ${numTicks} change detection cycles`);\n win.console.log(`${msPerTick.toFixed(2)} ms per check`);\n return new ChangeDetectionPerfRecord(msPerTick, numTicks);\n }\n}\nfunction performanceNow() {\n return win.performance && win.performance.now ? win.performance.now() :\n new Date().getTime();\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst PROFILER_GLOBAL_NAME = 'profiler';\n/**\n * Enabled Angular debug tools that are accessible via your browser's\n * developer console.\n *\n * Usage:\n *\n * 1. Open developer console (e.g. in Chrome Ctrl + Shift + j)\n * 1. Type `ng.` (usually the console will show auto-complete suggestion)\n * 1. Try the change detection profiler `ng.profiler.timeChangeDetection()`\n * then hit Enter.\n *\n * @publicApi\n */\nfunction enableDebugTools(ref) {\n exportNgVar(PROFILER_GLOBAL_NAME, new AngularProfiler(ref));\n return ref;\n}\n/**\n * Disables Angular tools.\n *\n * @publicApi\n */\nfunction disableDebugTools() {\n exportNgVar(PROFILER_GLOBAL_NAME, null);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction escapeHtml(text) {\n const escapedText = {\n '&': '&a;',\n '\"': '&q;',\n '\\'': '&s;',\n '<': '&l;',\n '>': '&g;',\n };\n return text.replace(/[&\"'<>]/g, s => escapedText[s]);\n}\nfunction unescapeHtml(text) {\n const unescapedText = {\n '&a;': '&',\n '&q;': '\"',\n '&s;': '\\'',\n '&l;': '<',\n '&g;': '>',\n };\n return text.replace(/&[^;]+;/g, s => unescapedText[s]);\n}\n/**\n * Create a `StateKey<T>` that can be used to store value of type T with `TransferState`.\n *\n * Example:\n *\n * ```\n * const COUNTER_KEY = makeStateKey<number>('counter');\n * let value = 10;\n *\n * transferState.set(COUNTER_KEY, value);\n * ```\n *\n * @publicApi\n */\nfunction makeStateKey(key) {\n return key;\n}\n/**\n * A key value store that is transferred from the application on the server side to the application\n * on the client side.\n *\n * The `TransferState` is available as an injectable token.\n * On the client, just inject this token using DI and use it, it will be lazily initialized.\n * On the server it's already included if `renderApplication` function is used. Otherwise, import\n * the `ServerTransferStateModule` module to make the `TransferState` available.\n *\n * The values in the store are serialized/deserialized using JSON.stringify/JSON.parse. So only\n * boolean, number, string, null and non-class objects will be serialized and deserialized in a\n * non-lossy manner.\n *\n * @publicApi\n */\nclass TransferState {\n constructor() {\n this.store = {};\n this.onSerializeCallbacks = {};\n }\n /**\n * Get the value corresponding to a key. Return `defaultValue` if key is not found.\n */\n get(key, defaultValue) {\n return this.store[key] !== undefined ? this.store[key] : defaultValue;\n }\n /**\n * Set the value corresponding to a key.\n */\n set(key, value) {\n this.store[key] = value;\n }\n /**\n * Remove a key from the store.\n */\n remove(key) {\n delete this.store[key];\n }\n /**\n * Test whether a key exists in the store.\n */\n hasKey(key) {\n return this.store.hasOwnProperty(key);\n }\n /**\n * Indicates whether the state is empty.\n */\n get isEmpty() {\n return Object.keys(this.store).length === 0;\n }\n /**\n * Register a callback to provide the value for a key when `toJson` is called.\n */\n onSerialize(key, callback) {\n this.onSerializeCallbacks[key] = callback;\n }\n /**\n * Serialize the current state of the store to JSON.\n */\n toJson() {\n // Call the onSerialize callbacks and put those values into the store.\n for (const key in this.onSerializeCallbacks) {\n if (this.onSerializeCallbacks.hasOwnProperty(key)) {\n try {\n this.store[key] = this.onSerializeCallbacks[key]();\n }\n catch (e) {\n console.warn('Exception in onSerialize callback: ', e);\n }\n }\n }\n return JSON.stringify(this.store);\n }\n}\nTransferState.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: TransferState, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nTransferState.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: TransferState, providedIn: 'root', useFactory: () => {\n const doc = inject(DOCUMENT);\n const appId = inject(APP_ID);\n const state = new TransferState();\n state.store = retrieveTransferredState(doc, appId);\n return state;\n } });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: TransferState, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root',\n useFactory: () => {\n const doc = inject(DOCUMENT);\n const appId = inject(APP_ID);\n const state = new TransferState();\n state.store = retrieveTransferredState(doc, appId);\n return state;\n }\n }]\n }] });\nfunction retrieveTransferredState(doc, appId) {\n // Locate the script tag with the JSON data transferred from the server.\n // The id of the script tag is set to the Angular appId + 'state'.\n const script = doc.getElementById(appId + '-state');\n let initialState = {};\n if (script && script.textContent) {\n try {\n // Avoid using any here as it triggers lint errors in google3 (any is not allowed).\n initialState = JSON.parse(unescapeHtml(script.textContent));\n }\n catch (e) {\n console.warn('Exception while restoring TransferState for app ' + appId, e);\n }\n }\n return initialState;\n}\n/**\n * NgModule to install on the client side while using the `TransferState` to transfer state from\n * server to client.\n *\n * @publicApi\n * @deprecated no longer needed, you can inject the `TransferState` in an app without providing\n * this module.\n */\nclass BrowserTransferStateModule {\n}\nBrowserTransferStateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: BrowserTransferStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nBrowserTransferStateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.0.4\", ngImport: i0, type: BrowserTransferStateModule });\nBrowserTransferStateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: BrowserTransferStateModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: BrowserTransferStateModule, decorators: [{\n type: NgModule,\n args: [{}]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Predicates for use with {@link DebugElement}'s query functions.\n *\n * @publicApi\n */\nclass By {\n /**\n * Match all nodes.\n *\n * @usageNotes\n * ### Example\n *\n * {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'}\n */\n static all() {\n return () => true;\n }\n /**\n * Match elements by the given CSS selector.\n *\n * @usageNotes\n * ### Example\n *\n * {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}\n */\n static css(selector) {\n return (debugElement) => {\n return debugElement.nativeElement != null ?\n elementMatches(debugElement.nativeElement, selector) :\n false;\n };\n }\n /**\n * Match nodes that have the given directive present.\n *\n * @usageNotes\n * ### Example\n *\n * {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}\n */\n static directive(type) {\n return (debugNode) => debugNode.providerTokens.indexOf(type) !== -1;\n }\n}\nfunction elementMatches(n, selector) {\n if (ɵgetDOM().isElementNode(n)) {\n return n.matches && n.matches(selector) ||\n n.msMatchesSelector && n.msMatchesSelector(selector) ||\n n.webkitMatchesSelector && n.webkitMatchesSelector(selector);\n }\n return false;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Supported HammerJS recognizer event names.\n */\nconst EVENT_NAMES = {\n // pan\n 'pan': true,\n 'panstart': true,\n 'panmove': true,\n 'panend': true,\n 'pancancel': true,\n 'panleft': true,\n 'panright': true,\n 'panup': true,\n 'pandown': true,\n // pinch\n 'pinch': true,\n 'pinchstart': true,\n 'pinchmove': true,\n 'pinchend': true,\n 'pinchcancel': true,\n 'pinchin': true,\n 'pinchout': true,\n // press\n 'press': true,\n 'pressup': true,\n // rotate\n 'rotate': true,\n 'rotatestart': true,\n 'rotatemove': true,\n 'rotateend': true,\n 'rotatecancel': true,\n // swipe\n 'swipe': true,\n 'swipeleft': true,\n 'swiperight': true,\n 'swipeup': true,\n 'swipedown': true,\n // tap\n 'tap': true,\n 'doubletap': true\n};\n/**\n * DI token for providing [HammerJS](https://hammerjs.github.io/) support to Angular.\n * @see `HammerGestureConfig`\n *\n * @ngModule HammerModule\n * @publicApi\n */\nconst HAMMER_GESTURE_CONFIG = new InjectionToken('HammerGestureConfig');\n/**\n * Injection token used to provide a {@link HammerLoader} to Angular.\n *\n * @publicApi\n */\nconst HAMMER_LOADER = new InjectionToken('HammerLoader');\n/**\n * An injectable [HammerJS Manager](https://hammerjs.github.io/api/#hammermanager)\n * for gesture recognition. Configures specific event recognition.\n * @publicApi\n */\nclass HammerGestureConfig {\n constructor() {\n /**\n * A set of supported event names for gestures to be used in Angular.\n * Angular supports all built-in recognizers, as listed in\n * [HammerJS documentation](https://hammerjs.github.io/).\n */\n this.events = [];\n /**\n * Maps gesture event names to a set of configuration options\n * that specify overrides to the default values for specific properties.\n *\n * The key is a supported event name to be configured,\n * and the options object contains a set of properties, with override values\n * to be applied to the named recognizer event.\n * For example, to disable recognition of the rotate event, specify\n * `{\"rotate\": {\"enable\": false}}`.\n *\n * Properties that are not present take the HammerJS default values.\n * For information about which properties are supported for which events,\n * and their allowed and default values, see\n * [HammerJS documentation](https://hammerjs.github.io/).\n *\n */\n this.overrides = {};\n }\n /**\n * Creates a [HammerJS Manager](https://hammerjs.github.io/api/#hammermanager)\n * and attaches it to a given HTML element.\n * @param element The element that will recognize gestures.\n * @returns A HammerJS event-manager object.\n */\n buildHammer(element) {\n const mc = new Hammer(element, this.options);\n mc.get('pinch').set({ enable: true });\n mc.get('rotate').set({ enable: true });\n for (const eventName in this.overrides) {\n mc.get(eventName).set(this.overrides[eventName]);\n }\n return mc;\n }\n}\nHammerGestureConfig.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: HammerGestureConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nHammerGestureConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: HammerGestureConfig });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: HammerGestureConfig, decorators: [{\n type: Injectable\n }] });\n/**\n * Event plugin that adds Hammer support to an application.\n *\n * @ngModule HammerModule\n */\nclass HammerGesturesPlugin extends EventManagerPlugin {\n constructor(doc, _config, console, loader) {\n super(doc);\n this._config = _config;\n this.console = console;\n this.loader = loader;\n this._loaderPromise = null;\n }\n supports(eventName) {\n if (!EVENT_NAMES.hasOwnProperty(eventName.toLowerCase()) && !this.isCustomEvent(eventName)) {\n return false;\n }\n if (!window.Hammer && !this.loader) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n this.console.warn(`The \"${eventName}\" event cannot be bound because Hammer.JS is not ` +\n `loaded and no custom loader has been specified.`);\n }\n return false;\n }\n return true;\n }\n addEventListener(element, eventName, handler) {\n const zone = this.manager.getZone();\n eventName = eventName.toLowerCase();\n // If Hammer is not present but a loader is specified, we defer adding the event listener\n // until Hammer is loaded.\n if (!window.Hammer && this.loader) {\n this._loaderPromise = this._loaderPromise || zone.runOutsideAngular(() => this.loader());\n // This `addEventListener` method returns a function to remove the added listener.\n // Until Hammer is loaded, the returned function needs to *cancel* the registration rather\n // than remove anything.\n let cancelRegistration = false;\n let deregister = () => {\n cancelRegistration = true;\n };\n zone.runOutsideAngular(() => this._loaderPromise\n .then(() => {\n // If Hammer isn't actually loaded when the custom loader resolves, give up.\n if (!window.Hammer) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n this.console.warn(`The custom HAMMER_LOADER completed, but Hammer.JS is not present.`);\n }\n deregister = () => { };\n return;\n }\n if (!cancelRegistration) {\n // Now that Hammer is loaded and the listener is being loaded for real,\n // the deregistration function changes from canceling registration to\n // removal.\n deregister = this.addEventListener(element, eventName, handler);\n }\n })\n .catch(() => {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n this.console.warn(`The \"${eventName}\" event cannot be bound because the custom ` +\n `Hammer.JS loader failed.`);\n }\n deregister = () => { };\n }));\n // Return a function that *executes* `deregister` (and not `deregister` itself) so that we\n // can change the behavior of `deregister` once the listener is added. Using a closure in\n // this way allows us to avoid any additional data structures to track listener removal.\n return () => {\n deregister();\n };\n }\n return zone.runOutsideAngular(() => {\n // Creating the manager bind events, must be done outside of angular\n const mc = this._config.buildHammer(element);\n const callback = function (eventObj) {\n zone.runGuarded(function () {\n handler(eventObj);\n });\n };\n mc.on(eventName, callback);\n return () => {\n mc.off(eventName, callback);\n // destroy mc to prevent memory leak\n if (typeof mc.destroy === 'function') {\n mc.destroy();\n }\n };\n });\n }\n isCustomEvent(eventName) {\n return this._config.events.indexOf(eventName) > -1;\n }\n}\nHammerGesturesPlugin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: HammerGesturesPlugin, deps: [{ token: DOCUMENT }, { token: HAMMER_GESTURE_CONFIG }, { token: i0.ɵConsole }, { token: HAMMER_LOADER, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\nHammerGesturesPlugin.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: HammerGesturesPlugin });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: HammerGesturesPlugin, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: HammerGestureConfig, decorators: [{\n type: Inject,\n args: [HAMMER_GESTURE_CONFIG]\n }] }, { type: i0.ɵConsole }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [HAMMER_LOADER]\n }] }]; } });\n/**\n * Adds support for HammerJS.\n *\n * Import this module at the root of your application so that Angular can work with\n * HammerJS to detect gesture events.\n *\n * Note that applications still need to include the HammerJS script itself. This module\n * simply sets up the coordination layer between HammerJS and Angular's EventManager.\n *\n * @publicApi\n */\nclass HammerModule {\n}\nHammerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: HammerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nHammerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.0.4\", ngImport: i0, type: HammerModule });\nHammerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: HammerModule, providers: [\n {\n provide: EVENT_MANAGER_PLUGINS,\n useClass: HammerGesturesPlugin,\n multi: true,\n deps: [DOCUMENT, HAMMER_GESTURE_CONFIG, ɵConsole, [new Optional(), HAMMER_LOADER]]\n },\n { provide: HAMMER_GESTURE_CONFIG, useClass: HammerGestureConfig, deps: [] },\n ] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: HammerModule, decorators: [{\n type: NgModule,\n args: [{\n providers: [\n {\n provide: EVENT_MANAGER_PLUGINS,\n useClass: HammerGesturesPlugin,\n multi: true,\n deps: [DOCUMENT, HAMMER_GESTURE_CONFIG, ɵConsole, [new Optional(), HAMMER_LOADER]]\n },\n { provide: HAMMER_GESTURE_CONFIG, useClass: HammerGestureConfig, deps: [] },\n ]\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * DomSanitizer helps preventing Cross Site Scripting Security bugs (XSS) by sanitizing\n * values to be safe to use in the different DOM contexts.\n *\n * For example, when binding a URL in an `<a [href]=\"someValue\">` hyperlink, `someValue` will be\n * sanitized so that an attacker cannot inject e.g. a `javascript:` URL that would execute code on\n * the website.\n *\n * In specific situations, it might be necessary to disable sanitization, for example if the\n * application genuinely needs to produce a `javascript:` style link with a dynamic value in it.\n * Users can bypass security by constructing a value with one of the `bypassSecurityTrust...`\n * methods, and then binding to that value from the template.\n *\n * These situations should be very rare, and extraordinary care must be taken to avoid creating a\n * Cross Site Scripting (XSS) security bug!\n *\n * When using `bypassSecurityTrust...`, make sure to call the method as early as possible and as\n * close as possible to the source of the value, to make it easy to verify no security bug is\n * created by its use.\n *\n * It is not required (and not recommended) to bypass security if the value is safe, e.g. a URL that\n * does not start with a suspicious protocol, or an HTML snippet that does not contain dangerous\n * code. The sanitizer leaves safe values intact.\n *\n * @security Calling any of the `bypassSecurityTrust...` APIs disables Angular's built-in\n * sanitization for the value passed in. Carefully check and audit all values and code paths going\n * into this call. Make sure any user data is appropriately escaped for this security context.\n * For more detail, see the [Security Guide](https://g.co/ng/security).\n *\n * @publicApi\n */\nclass DomSanitizer {\n}\nDomSanitizer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: DomSanitizer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nDomSanitizer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: DomSanitizer, providedIn: 'root', useExisting: i0.forwardRef(function () { return DomSanitizerImpl; }) });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: DomSanitizer, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root', useExisting: forwardRef(() => DomSanitizerImpl) }]\n }] });\nfunction domSanitizerImplFactory(injector) {\n return new DomSanitizerImpl(injector.get(DOCUMENT));\n}\nclass DomSanitizerImpl extends DomSanitizer {\n constructor(_doc) {\n super();\n this._doc = _doc;\n }\n sanitize(ctx, value) {\n if (value == null)\n return null;\n switch (ctx) {\n case SecurityContext.NONE:\n return value;\n case SecurityContext.HTML:\n if (ɵallowSanitizationBypassAndThrow(value, \"HTML\" /* BypassType.Html */)) {\n return ɵunwrapSafeValue(value);\n }\n return ɵ_sanitizeHtml(this._doc, String(value)).toString();\n case SecurityContext.STYLE:\n if (ɵallowSanitizationBypassAndThrow(value, \"Style\" /* BypassType.Style */)) {\n return ɵunwrapSafeValue(value);\n }\n return value;\n case SecurityContext.SCRIPT:\n if (ɵallowSanitizationBypassAndThrow(value, \"Script\" /* BypassType.Script */)) {\n return ɵunwrapSafeValue(value);\n }\n throw new Error('unsafe value used in a script context');\n case SecurityContext.URL:\n if (ɵallowSanitizationBypassAndThrow(value, \"URL\" /* BypassType.Url */)) {\n return ɵunwrapSafeValue(value);\n }\n return ɵ_sanitizeUrl(String(value));\n case SecurityContext.RESOURCE_URL:\n if (ɵallowSanitizationBypassAndThrow(value, \"ResourceURL\" /* BypassType.ResourceUrl */)) {\n return ɵunwrapSafeValue(value);\n }\n throw new Error(`unsafe value used in a resource URL context (see ${ɵXSS_SECURITY_URL})`);\n default:\n throw new Error(`Unexpected SecurityContext ${ctx} (see ${ɵXSS_SECURITY_URL})`);\n }\n }\n bypassSecurityTrustHtml(value) {\n return ɵbypassSanitizationTrustHtml(value);\n }\n bypassSecurityTrustStyle(value) {\n return ɵbypassSanitizationTrustStyle(value);\n }\n bypassSecurityTrustScript(value) {\n return ɵbypassSanitizationTrustScript(value);\n }\n bypassSecurityTrustUrl(value) {\n return ɵbypassSanitizationTrustUrl(value);\n }\n bypassSecurityTrustResourceUrl(value) {\n return ɵbypassSanitizationTrustResourceUrl(value);\n }\n}\nDomSanitizerImpl.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: DomSanitizerImpl, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nDomSanitizerImpl.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: DomSanitizerImpl, providedIn: 'root', useFactory: domSanitizerImplFactory, deps: [{ token: Injector }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: DomSanitizerImpl, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root', useFactory: domSanitizerImplFactory, deps: [Injector] }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @publicApi\n */\nconst VERSION = new Version('15.0.4');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { BrowserModule, BrowserTransferStateModule, By, DomSanitizer, EVENT_MANAGER_PLUGINS, EventManager, HAMMER_GESTURE_CONFIG, HAMMER_LOADER, HammerGestureConfig, HammerModule, Meta, Title, TransferState, VERSION, bootstrapApplication, createApplication, disableDebugTools, enableDebugTools, makeStateKey, platformBrowser, provideProtractorTestingSupport, BrowserDomAdapter as ɵBrowserDomAdapter, BrowserGetTestability as ɵBrowserGetTestability, DomEventsPlugin as ɵDomEventsPlugin, DomRendererFactory2 as ɵDomRendererFactory2, DomSanitizerImpl as ɵDomSanitizerImpl, DomSharedStylesHost as ɵDomSharedStylesHost, HammerGesturesPlugin as ɵHammerGesturesPlugin, INTERNAL_BROWSER_PLATFORM_PROVIDERS as ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS, KeyEventsPlugin as ɵKeyEventsPlugin, NAMESPACE_URIS as ɵNAMESPACE_URIS, SharedStylesHost as ɵSharedStylesHost, TRANSITION_ID as ɵTRANSITION_ID, escapeHtml as ɵescapeHtml, flattenStyles as ɵflattenStyles, initDomAdapter as ɵinitDomAdapter, shimContentAttribute as ɵshimContentAttribute, shimHostAttribute as ɵshimHostAttribute };\n","export const timeoutProvider = {\n setTimeout(handler, timeout, ...args) {\n const { delegate } = timeoutProvider;\n if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) {\n return delegate.setTimeout(handler, timeout, ...args);\n }\n return setTimeout(handler, timeout, ...args);\n },\n clearTimeout(handle) {\n const { delegate } = timeoutProvider;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);\n },\n delegate: undefined,\n};\n","<div class=\"modal-sheet\">\n <div class=\"modal-container\" [ngClass]=\"[sizeClass, heightClass]\">\n <div class=\"close-modal\" *ngIf=\"showCloseButton\" (click)=\"_closeModal($event)\">\n <bw-icon iconName=\"close\" size=\"24\"></bw-icon>\n </div>\n <div class=\"modal-inner-container\">\n <div class=\"header-container\">\n <ng-content select=\"[title-medium]\"></ng-content>\n </div>\n <div class=\"body-container\" [ngClass]=\"{ 'no-footer': footerContainer.children.length === 0, 'full-content-width': fullContentWidth }\">\n <ng-content select=\".body\"></ng-content>\n </div>\n <div #footerContainer class=\"footer-container\">\n <ng-content select=\".footer\"></ng-content>\n </div>\n </div>\n </div>\n</div>\n","import { Component, OnInit, Output, Input, ViewEncapsulation } from '@angular/core';\nimport { EventEmitter } from '@angular/core';\n\n@Component({\n selector: 'bw-modal',\n templateUrl: './modal.component.html',\n styleUrls: ['./modal.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class ModalComponent implements OnInit {\n /** Show the close action icon button in the upper right corner of the modal */\n @Input() showCloseButton = false;\n\n /** The width of the modal: \"small | medium | large\"\n * The large size allows for vertical scrolling but small/medium is fixed size\n * */\n @Input() modalWidth: string;\n @Input() modalHeight: string;\n\n @Input() fullContentWidth = false;\n\n /** Event to close the modal */\n @Output() closeModal = new EventEmitter();\n\n sizeClass = 'modal-width-small';\n heightClass= 'modal-height-default';\n\n ngOnInit() {\n this.sizeClass = `modal-width-${this.modalWidth || 'medium'}`;\n this.heightClass = `modal-height-${this.modalHeight || 'default'}`;\n }\n\n _closeModal(event: any) {\n this.closeModal.emit(event);\n }\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function map(project, thisArg) {\n return operate((source, subscriber) => {\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n subscriber.next(project.call(thisArg, value, index++));\n }));\n });\n}\n","/**\n * @license Angular v15.0.4\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Injectable, ɵɵinject, Inject, inject, Optional, EventEmitter, ɵfindLocaleData, ɵLocaleDataIndex, ɵgetLocaleCurrencyCode, ɵgetLocalePluralCase, LOCALE_ID, ɵregisterLocaleData, ɵisListLikeIterable, ɵstringify, Directive, Input, createNgModule, NgModuleRef, ɵRuntimeError, Host, Attribute, RendererStyleFlags2, ɵisPromise, ɵisSubscribable, Pipe, DEFAULT_CURRENCY_CODE, NgModule, Version, ɵɵdefineInjectable, ɵformatRuntimeError, Renderer2, ElementRef, Injector, PLATFORM_ID, NgZone } from '@angular/core';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nlet _DOM = null;\nfunction getDOM() {\n return _DOM;\n}\nfunction setRootDomAdapter(adapter) {\n if (!_DOM) {\n _DOM = adapter;\n }\n}\n/* tslint:disable:requireParameterType */\n/**\n * Provides DOM operations in an environment-agnostic way.\n *\n * @security Tread carefully! Interacting with the DOM directly is dangerous and\n * can introduce XSS risks.\n */\nclass DomAdapter {\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A DI Token representing the main rendering context. In a browser this is the DOM Document.\n *\n * Note: Document might not be available in the Application Context when Application and Rendering\n * Contexts are not the same (e.g. when running the application in a Web Worker).\n *\n * @publicApi\n */\nconst DOCUMENT = new InjectionToken('DocumentToken');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * This class should not be used directly by an application developer. Instead, use\n * {@link Location}.\n *\n * `PlatformLocation` encapsulates all calls to DOM APIs, which allows the Router to be\n * platform-agnostic.\n * This means that we can have different implementation of `PlatformLocation` for the different\n * platforms that Angular supports. For example, `@angular/platform-browser` provides an\n * implementation specific to the browser environment, while `@angular/platform-server` provides\n * one suitable for use with server-side rendering.\n *\n * The `PlatformLocation` class is used directly by all implementations of {@link LocationStrategy}\n * when they need to interact with the DOM APIs like pushState, popState, etc.\n *\n * {@link LocationStrategy} in turn is used by the {@link Location} service which is used directly\n * by the {@link Router} in order to navigate between routes. Since all interactions between {@link\n * Router} /\n * {@link Location} / {@link LocationStrategy} and DOM APIs flow through the `PlatformLocation`\n * class, they are all platform-agnostic.\n *\n * @publicApi\n */\nclass PlatformLocation {\n historyGo(relativePosition) {\n throw new Error('Not implemented');\n }\n}\nPlatformLocation.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: PlatformLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nPlatformLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: PlatformLocation, providedIn: 'platform', useFactory: useBrowserPlatformLocation });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: PlatformLocation, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'platform',\n // See #23917\n useFactory: useBrowserPlatformLocation\n }]\n }] });\nfunction useBrowserPlatformLocation() {\n return ɵɵinject(BrowserPlatformLocation);\n}\n/**\n * @description\n * Indicates when a location is initialized.\n *\n * @publicApi\n */\nconst LOCATION_INITIALIZED = new InjectionToken('Location Initialized');\n/**\n * `PlatformLocation` encapsulates all of the direct calls to platform APIs.\n * This class should not be used directly by an application developer. Instead, use\n * {@link Location}.\n */\nclass BrowserPlatformLocation extends PlatformLocation {\n constructor(_doc) {\n super();\n this._doc = _doc;\n this._init();\n }\n // This is moved to its own method so that `MockPlatformLocationStrategy` can overwrite it\n /** @internal */\n _init() {\n this.location = window.location;\n this._history = window.history;\n }\n getBaseHrefFromDOM() {\n return getDOM().getBaseHref(this._doc);\n }\n onPopState(fn) {\n const window = getDOM().getGlobalEventTarget(this._doc, 'window');\n window.addEventListener('popstate', fn, false);\n return () => window.removeEventListener('popstate', fn);\n }\n onHashChange(fn) {\n const window = getDOM().getGlobalEventTarget(this._doc, 'window');\n window.addEventListener('hashchange', fn, false);\n return () => window.removeEventListener('hashchange', fn);\n }\n get href() {\n return this.location.href;\n }\n get protocol() {\n return this.location.protocol;\n }\n get hostname() {\n return this.location.hostname;\n }\n get port() {\n return this.location.port;\n }\n get pathname() {\n return this.location.pathname;\n }\n get search() {\n return this.location.search;\n }\n get hash() {\n return this.location.hash;\n }\n set pathname(newPath) {\n this.location.pathname = newPath;\n }\n pushState(state, title, url) {\n if (supportsState()) {\n this._history.pushState(state, title, url);\n }\n else {\n this.location.hash = url;\n }\n }\n replaceState(state, title, url) {\n if (supportsState()) {\n this._history.replaceState(state, title, url);\n }\n else {\n this.location.hash = url;\n }\n }\n forward() {\n this._history.forward();\n }\n back() {\n this._history.back();\n }\n historyGo(relativePosition = 0) {\n this._history.go(relativePosition);\n }\n getState() {\n return this._history.state;\n }\n}\nBrowserPlatformLocation.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: BrowserPlatformLocation, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nBrowserPlatformLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: BrowserPlatformLocation, providedIn: 'platform', useFactory: createBrowserPlatformLocation });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: BrowserPlatformLocation, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'platform',\n // See #23917\n useFactory: createBrowserPlatformLocation,\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; } });\nfunction supportsState() {\n return !!window.history.pushState;\n}\nfunction createBrowserPlatformLocation() {\n return new BrowserPlatformLocation(ɵɵinject(DOCUMENT));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Joins two parts of a URL with a slash if needed.\n *\n * @param start URL string\n * @param end URL string\n *\n *\n * @returns The joined URL string.\n */\nfunction joinWithSlash(start, end) {\n if (start.length == 0) {\n return end;\n }\n if (end.length == 0) {\n return start;\n }\n let slashes = 0;\n if (start.endsWith('/')) {\n slashes++;\n }\n if (end.startsWith('/')) {\n slashes++;\n }\n if (slashes == 2) {\n return start + end.substring(1);\n }\n if (slashes == 1) {\n return start + end;\n }\n return start + '/' + end;\n}\n/**\n * Removes a trailing slash from a URL string if needed.\n * Looks for the first occurrence of either `#`, `?`, or the end of the\n * line as `/` characters and removes the trailing slash if one exists.\n *\n * @param url URL string.\n *\n * @returns The URL string, modified if needed.\n */\nfunction stripTrailingSlash(url) {\n const match = url.match(/#|\\?|$/);\n const pathEndIdx = match && match.index || url.length;\n const droppedSlashIdx = pathEndIdx - (url[pathEndIdx - 1] === '/' ? 1 : 0);\n return url.slice(0, droppedSlashIdx) + url.slice(pathEndIdx);\n}\n/**\n * Normalizes URL parameters by prepending with `?` if needed.\n *\n * @param params String of URL parameters.\n *\n * @returns The normalized URL parameters string.\n */\nfunction normalizeQueryParams(params) {\n return params && params[0] !== '?' ? '?' + params : params;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Enables the `Location` service to read route state from the browser's URL.\n * Angular provides two strategies:\n * `HashLocationStrategy` and `PathLocationStrategy`.\n *\n * Applications should use the `Router` or `Location` services to\n * interact with application route state.\n *\n * For instance, `HashLocationStrategy` produces URLs like\n * <code class=\"no-auto-link\">http://example.com#/foo</code>,\n * and `PathLocationStrategy` produces\n * <code class=\"no-auto-link\">http://example.com/foo</code> as an equivalent URL.\n *\n * See these two classes for more.\n *\n * @publicApi\n */\nclass LocationStrategy {\n historyGo(relativePosition) {\n throw new Error('Not implemented');\n }\n}\nLocationStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: LocationStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nLocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: LocationStrategy, providedIn: 'root', useFactory: () => inject(PathLocationStrategy) });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: LocationStrategy, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root', useFactory: () => inject(PathLocationStrategy) }]\n }] });\n/**\n * A predefined [DI token](guide/glossary#di-token) for the base href\n * to be used with the `PathLocationStrategy`.\n * The base href is the URL prefix that should be preserved when generating\n * and recognizing URLs.\n *\n * @usageNotes\n *\n * The following example shows how to use this token to configure the root app injector\n * with a base href value, so that the DI framework can supply the dependency anywhere in the app.\n *\n * ```typescript\n * import {Component, NgModule} from '@angular/core';\n * import {APP_BASE_HREF} from '@angular/common';\n *\n * @NgModule({\n * providers: [{provide: APP_BASE_HREF, useValue: '/my/app'}]\n * })\n * class AppModule {}\n * ```\n *\n * @publicApi\n */\nconst APP_BASE_HREF = new InjectionToken('appBaseHref');\n/**\n * @description\n * A {@link LocationStrategy} used to configure the {@link Location} service to\n * represent its state in the\n * [path](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax) of the\n * browser's URL.\n *\n * If you're using `PathLocationStrategy`, you may provide a {@link APP_BASE_HREF}\n * or add a `<base href>` element to the document to override the default.\n *\n * For instance, if you provide an `APP_BASE_HREF` of `'/my/app/'` and call\n * `location.go('/foo')`, the browser's URL will become\n * `example.com/my/app/foo`. To ensure all relative URIs resolve correctly,\n * the `<base href>` and/or `APP_BASE_HREF` should end with a `/`.\n *\n * Similarly, if you add `<base href='/my/app/'/>` to the document and call\n * `location.go('/foo')`, the browser's URL will become\n * `example.com/my/app/foo`.\n *\n * Note that when using `PathLocationStrategy`, neither the query nor\n * the fragment in the `<base href>` will be preserved, as outlined\n * by the [RFC](https://tools.ietf.org/html/rfc3986#section-5.2.2).\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example common/location/ts/path_location_component.ts region='LocationComponent'}\n *\n * @publicApi\n */\nclass PathLocationStrategy extends LocationStrategy {\n constructor(_platformLocation, href) {\n super();\n this._platformLocation = _platformLocation;\n this._removeListenerFns = [];\n this._baseHref = href ?? this._platformLocation.getBaseHrefFromDOM() ??\n inject(DOCUMENT).location?.origin ?? '';\n }\n /** @nodoc */\n ngOnDestroy() {\n while (this._removeListenerFns.length) {\n this._removeListenerFns.pop()();\n }\n }\n onPopState(fn) {\n this._removeListenerFns.push(this._platformLocation.onPopState(fn), this._platformLocation.onHashChange(fn));\n }\n getBaseHref() {\n return this._baseHref;\n }\n prepareExternalUrl(internal) {\n return joinWithSlash(this._baseHref, internal);\n }\n path(includeHash = false) {\n const pathname = this._platformLocation.pathname + normalizeQueryParams(this._platformLocation.search);\n const hash = this._platformLocation.hash;\n return hash && includeHash ? `${pathname}${hash}` : pathname;\n }\n pushState(state, title, url, queryParams) {\n const externalUrl = this.prepareExternalUrl(url + normalizeQueryParams(queryParams));\n this._platformLocation.pushState(state, title, externalUrl);\n }\n replaceState(state, title, url, queryParams) {\n const externalUrl = this.prepareExternalUrl(url + normalizeQueryParams(queryParams));\n this._platformLocation.replaceState(state, title, externalUrl);\n }\n forward() {\n this._platformLocation.forward();\n }\n back() {\n this._platformLocation.back();\n }\n getState() {\n return this._platformLocation.getState();\n }\n historyGo(relativePosition = 0) {\n this._platformLocation.historyGo?.(relativePosition);\n }\n}\nPathLocationStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: PathLocationStrategy, deps: [{ token: PlatformLocation }, { token: APP_BASE_HREF, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\nPathLocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: PathLocationStrategy, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: PathLocationStrategy, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: PlatformLocation }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [APP_BASE_HREF]\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description\n * A {@link LocationStrategy} used to configure the {@link Location} service to\n * represent its state in the\n * [hash fragment](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax)\n * of the browser's URL.\n *\n * For instance, if you call `location.go('/foo')`, the browser's URL will become\n * `example.com#/foo`.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example common/location/ts/hash_location_component.ts region='LocationComponent'}\n *\n * @publicApi\n */\nclass HashLocationStrategy extends LocationStrategy {\n constructor(_platformLocation, _baseHref) {\n super();\n this._platformLocation = _platformLocation;\n this._baseHref = '';\n this._removeListenerFns = [];\n if (_baseHref != null) {\n this._baseHref = _baseHref;\n }\n }\n /** @nodoc */\n ngOnDestroy() {\n while (this._removeListenerFns.length) {\n this._removeListenerFns.pop()();\n }\n }\n onPopState(fn) {\n this._removeListenerFns.push(this._platformLocation.onPopState(fn), this._platformLocation.onHashChange(fn));\n }\n getBaseHref() {\n return this._baseHref;\n }\n path(includeHash = false) {\n // the hash value is always prefixed with a `#`\n // and if it is empty then it will stay empty\n let path = this._platformLocation.hash;\n if (path == null)\n path = '#';\n return path.length > 0 ? path.substring(1) : path;\n }\n prepareExternalUrl(internal) {\n const url = joinWithSlash(this._baseHref, internal);\n return url.length > 0 ? ('#' + url) : url;\n }\n pushState(state, title, path, queryParams) {\n let url = this.prepareExternalUrl(path + normalizeQueryParams(queryParams));\n if (url.length == 0) {\n url = this._platformLocation.pathname;\n }\n this._platformLocation.pushState(state, title, url);\n }\n replaceState(state, title, path, queryParams) {\n let url = this.prepareExternalUrl(path + normalizeQueryParams(queryParams));\n if (url.length == 0) {\n url = this._platformLocation.pathname;\n }\n this._platformLocation.replaceState(state, title, url);\n }\n forward() {\n this._platformLocation.forward();\n }\n back() {\n this._platformLocation.back();\n }\n getState() {\n return this._platformLocation.getState();\n }\n historyGo(relativePosition = 0) {\n this._platformLocation.historyGo?.(relativePosition);\n }\n}\nHashLocationStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: HashLocationStrategy, deps: [{ token: PlatformLocation }, { token: APP_BASE_HREF, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\nHashLocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: HashLocationStrategy });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: HashLocationStrategy, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: PlatformLocation }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [APP_BASE_HREF]\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description\n *\n * A service that applications can use to interact with a browser's URL.\n *\n * Depending on the `LocationStrategy` used, `Location` persists\n * to the URL's path or the URL's hash segment.\n *\n * @usageNotes\n *\n * It's better to use the `Router.navigate()` service to trigger route changes. Use\n * `Location` only if you need to interact with or create normalized URLs outside of\n * routing.\n *\n * `Location` is responsible for normalizing the URL against the application's base href.\n * A normalized URL is absolute from the URL host, includes the application's base href, and has no\n * trailing slash:\n * - `/my/app/user/123` is normalized\n * - `my/app/user/123` **is not** normalized\n * - `/my/app/user/123/` **is not** normalized\n *\n * ### Example\n *\n * <code-example path='common/location/ts/path_location_component.ts'\n * region='LocationComponent'></code-example>\n *\n * @publicApi\n */\nclass Location {\n constructor(locationStrategy) {\n /** @internal */\n this._subject = new EventEmitter();\n /** @internal */\n this._urlChangeListeners = [];\n /** @internal */\n this._urlChangeSubscription = null;\n this._locationStrategy = locationStrategy;\n const baseHref = this._locationStrategy.getBaseHref();\n // Note: This class's interaction with base HREF does not fully follow the rules\n // outlined in the spec https://www.freesoft.org/CIE/RFC/1808/18.htm.\n // Instead of trying to fix individual bugs with more and more code, we should\n // investigate using the URL constructor and providing the base as a second\n // argument.\n // https://developer.mozilla.org/en-US/docs/Web/API/URL/URL#parameters\n this._basePath = _stripOrigin(stripTrailingSlash(_stripIndexHtml(baseHref)));\n this._locationStrategy.onPopState((ev) => {\n this._subject.emit({\n 'url': this.path(true),\n 'pop': true,\n 'state': ev.state,\n 'type': ev.type,\n });\n });\n }\n /** @nodoc */\n ngOnDestroy() {\n this._urlChangeSubscription?.unsubscribe();\n this._urlChangeListeners = [];\n }\n /**\n * Normalizes the URL path for this location.\n *\n * @param includeHash True to include an anchor fragment in the path.\n *\n * @returns The normalized URL path.\n */\n // TODO: vsavkin. Remove the boolean flag and always include hash once the deprecated router is\n // removed.\n path(includeHash = false) {\n return this.normalize(this._locationStrategy.path(includeHash));\n }\n /**\n * Reports the current state of the location history.\n * @returns The current value of the `history.state` object.\n */\n getState() {\n return this._locationStrategy.getState();\n }\n /**\n * Normalizes the given path and compares to the current normalized path.\n *\n * @param path The given URL path.\n * @param query Query parameters.\n *\n * @returns True if the given URL path is equal to the current normalized path, false\n * otherwise.\n */\n isCurrentPathEqualTo(path, query = '') {\n return this.path() == this.normalize(path + normalizeQueryParams(query));\n }\n /**\n * Normalizes a URL path by stripping any trailing slashes.\n *\n * @param url String representing a URL.\n *\n * @returns The normalized URL string.\n */\n normalize(url) {\n return Location.stripTrailingSlash(_stripBasePath(this._basePath, _stripIndexHtml(url)));\n }\n /**\n * Normalizes an external URL path.\n * If the given URL doesn't begin with a leading slash (`'/'`), adds one\n * before normalizing. Adds a hash if `HashLocationStrategy` is\n * in use, or the `APP_BASE_HREF` if the `PathLocationStrategy` is in use.\n *\n * @param url String representing a URL.\n *\n * @returns A normalized platform-specific URL.\n */\n prepareExternalUrl(url) {\n if (url && url[0] !== '/') {\n url = '/' + url;\n }\n return this._locationStrategy.prepareExternalUrl(url);\n }\n // TODO: rename this method to pushState\n /**\n * Changes the browser's URL to a normalized version of a given URL, and pushes a\n * new item onto the platform's history.\n *\n * @param path URL path to normalize.\n * @param query Query parameters.\n * @param state Location history state.\n *\n */\n go(path, query = '', state = null) {\n this._locationStrategy.pushState(state, '', path, query);\n this._notifyUrlChangeListeners(this.prepareExternalUrl(path + normalizeQueryParams(query)), state);\n }\n /**\n * Changes the browser's URL to a normalized version of the given URL, and replaces\n * the top item on the platform's history stack.\n *\n * @param path URL path to normalize.\n * @param query Query parameters.\n * @param state Location history state.\n */\n replaceState(path, query = '', state = null) {\n this._locationStrategy.replaceState(state, '', path, query);\n this._notifyUrlChangeListeners(this.prepareExternalUrl(path + normalizeQueryParams(query)), state);\n }\n /**\n * Navigates forward in the platform's history.\n */\n forward() {\n this._locationStrategy.forward();\n }\n /**\n * Navigates back in the platform's history.\n */\n back() {\n this._locationStrategy.back();\n }\n /**\n * Navigate to a specific page from session history, identified by its relative position to the\n * current page.\n *\n * @param relativePosition Position of the target page in the history relative to the current\n * page.\n * A negative value moves backwards, a positive value moves forwards, e.g. `location.historyGo(2)`\n * moves forward two pages and `location.historyGo(-2)` moves back two pages. When we try to go\n * beyond what's stored in the history session, we stay in the current page. Same behaviour occurs\n * when `relativePosition` equals 0.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/History_API#Moving_to_a_specific_point_in_history\n */\n historyGo(relativePosition = 0) {\n this._locationStrategy.historyGo?.(relativePosition);\n }\n /**\n * Registers a URL change listener. Use to catch updates performed by the Angular\n * framework that are not detectible through \"popstate\" or \"hashchange\" events.\n *\n * @param fn The change handler function, which take a URL and a location history state.\n * @returns A function that, when executed, unregisters a URL change listener.\n */\n onUrlChange(fn) {\n this._urlChangeListeners.push(fn);\n if (!this._urlChangeSubscription) {\n this._urlChangeSubscription = this.subscribe(v => {\n this._notifyUrlChangeListeners(v.url, v.state);\n });\n }\n return () => {\n const fnIndex = this._urlChangeListeners.indexOf(fn);\n this._urlChangeListeners.splice(fnIndex, 1);\n if (this._urlChangeListeners.length === 0) {\n this._urlChangeSubscription?.unsubscribe();\n this._urlChangeSubscription = null;\n }\n };\n }\n /** @internal */\n _notifyUrlChangeListeners(url = '', state) {\n this._urlChangeListeners.forEach(fn => fn(url, state));\n }\n /**\n * Subscribes to the platform's `popState` events.\n *\n * Note: `Location.go()` does not trigger the `popState` event in the browser. Use\n * `Location.onUrlChange()` to subscribe to URL changes instead.\n *\n * @param value Event that is triggered when the state history changes.\n * @param exception The exception to throw.\n *\n * @see [onpopstate](https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onpopstate)\n *\n * @returns Subscribed events.\n */\n subscribe(onNext, onThrow, onReturn) {\n return this._subject.subscribe({ next: onNext, error: onThrow, complete: onReturn });\n }\n}\n/**\n * Normalizes URL parameters by prepending with `?` if needed.\n *\n * @param params String of URL parameters.\n *\n * @returns The normalized URL parameters string.\n */\nLocation.normalizeQueryParams = normalizeQueryParams;\n/**\n * Joins two parts of a URL with a slash if needed.\n *\n * @param start URL string\n * @param end URL string\n *\n *\n * @returns The joined URL string.\n */\nLocation.joinWithSlash = joinWithSlash;\n/**\n * Removes a trailing slash from a URL string if needed.\n * Looks for the first occurrence of either `#`, `?`, or the end of the\n * line as `/` characters and removes the trailing slash if one exists.\n *\n * @param url URL string.\n *\n * @returns The URL string, modified if needed.\n */\nLocation.stripTrailingSlash = stripTrailingSlash;\nLocation.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: Location, deps: [{ token: LocationStrategy }], target: i0.ɵɵFactoryTarget.Injectable });\nLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: Location, providedIn: 'root', useFactory: createLocation });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: Location, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root',\n // See #23917\n useFactory: createLocation,\n }]\n }], ctorParameters: function () { return [{ type: LocationStrategy }]; } });\nfunction createLocation() {\n return new Location(ɵɵinject(LocationStrategy));\n}\nfunction _stripBasePath(basePath, url) {\n return basePath && url.startsWith(basePath) ? url.substring(basePath.length) : url;\n}\nfunction _stripIndexHtml(url) {\n return url.replace(/\\/index.html$/, '');\n}\nfunction _stripOrigin(baseHref) {\n // DO NOT REFACTOR! Previously, this check looked like this:\n // `/^(https?:)?\\/\\//.test(baseHref)`, but that resulted in\n // syntactically incorrect code after Closure Compiler minification.\n // This was likely caused by a bug in Closure Compiler, but\n // for now, the check is rewritten to use `new RegExp` instead.\n const isAbsoluteUrl = (new RegExp('^(https?:)?//')).test(baseHref);\n if (isAbsoluteUrl) {\n const [, pathname] = baseHref.split(/\\/\\/[^\\/]+/);\n return pathname;\n }\n return baseHref;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** @internal */\nconst CURRENCIES_EN = { \"ADP\": [undefined, undefined, 0], \"AFN\": [undefined, \"؋\", 0], \"ALL\": [undefined, undefined, 0], \"AMD\": [undefined, \"֏\", 2], \"AOA\": [undefined, \"Kz\"], \"ARS\": [undefined, \"$\"], \"AUD\": [\"A$\", \"$\"], \"AZN\": [undefined, \"₼\"], \"BAM\": [undefined, \"KM\"], \"BBD\": [undefined, \"$\"], \"BDT\": [undefined, \"৳\"], \"BHD\": [undefined, undefined, 3], \"BIF\": [undefined, undefined, 0], \"BMD\": [undefined, \"$\"], \"BND\": [undefined, \"$\"], \"BOB\": [undefined, \"Bs\"], \"BRL\": [\"R$\"], \"BSD\": [undefined, \"$\"], \"BWP\": [undefined, \"P\"], \"BYN\": [undefined, undefined, 2], \"BYR\": [undefined, undefined, 0], \"BZD\": [undefined, \"$\"], \"CAD\": [\"CA$\", \"$\", 2], \"CHF\": [undefined, undefined, 2], \"CLF\": [undefined, undefined, 4], \"CLP\": [undefined, \"$\", 0], \"CNY\": [\"CN¥\", \"¥\"], \"COP\": [undefined, \"$\", 2], \"CRC\": [undefined, \"₡\", 2], \"CUC\": [undefined, \"$\"], \"CUP\": [undefined, \"$\"], \"CZK\": [undefined, \"Kč\", 2], \"DJF\": [undefined, undefined, 0], \"DKK\": [undefined, \"kr\", 2], \"DOP\": [undefined, \"$\"], \"EGP\": [undefined, \"E£\"], \"ESP\": [undefined, \"₧\", 0], \"EUR\": [\"€\"], \"FJD\": [undefined, \"$\"], \"FKP\": [undefined, \"£\"], \"GBP\": [\"£\"], \"GEL\": [undefined, \"₾\"], \"GHS\": [undefined, \"GH₵\"], \"GIP\": [undefined, \"£\"], \"GNF\": [undefined, \"FG\", 0], \"GTQ\": [undefined, \"Q\"], \"GYD\": [undefined, \"$\", 2], \"HKD\": [\"HK$\", \"$\"], \"HNL\": [undefined, \"L\"], \"HRK\": [undefined, \"kn\"], \"HUF\": [undefined, \"Ft\", 2], \"IDR\": [undefined, \"Rp\", 2], \"ILS\": [\"₪\"], \"INR\": [\"₹\"], \"IQD\": [undefined, undefined, 0], \"IRR\": [undefined, undefined, 0], \"ISK\": [undefined, \"kr\", 0], \"ITL\": [undefined, undefined, 0], \"JMD\": [undefined, \"$\"], \"JOD\": [undefined, undefined, 3], \"JPY\": [\"¥\", undefined, 0], \"KHR\": [undefined, \"៛\"], \"KMF\": [undefined, \"CF\", 0], \"KPW\": [undefined, \"₩\", 0], \"KRW\": [\"₩\", undefined, 0], \"KWD\": [undefined, undefined, 3], \"KYD\": [undefined, \"$\"], \"KZT\": [undefined, \"₸\"], \"LAK\": [undefined, \"₭\", 0], \"LBP\": [undefined, \"L£\", 0], \"LKR\": [undefined, \"Rs\"], \"LRD\": [undefined, \"$\"], \"LTL\": [undefined, \"Lt\"], \"LUF\": [undefined, undefined, 0], \"LVL\": [undefined, \"Ls\"], \"LYD\": [undefined, undefined, 3], \"MGA\": [undefined, \"Ar\", 0], \"MGF\": [undefined, undefined, 0], \"MMK\": [undefined, \"K\", 0], \"MNT\": [undefined, \"₮\", 2], \"MRO\": [undefined, undefined, 0], \"MUR\": [undefined, \"Rs\", 2], \"MXN\": [\"MX$\", \"$\"], \"MYR\": [undefined, \"RM\"], \"NAD\": [undefined, \"$\"], \"NGN\": [undefined, \"₦\"], \"NIO\": [undefined, \"C$\"], \"NOK\": [undefined, \"kr\", 2], \"NPR\": [undefined, \"Rs\"], \"NZD\": [\"NZ$\", \"$\"], \"OMR\": [undefined, undefined, 3], \"PHP\": [\"₱\"], \"PKR\": [undefined, \"Rs\", 2], \"PLN\": [undefined, \"zł\"], \"PYG\": [undefined, \"₲\", 0], \"RON\": [undefined, \"lei\"], \"RSD\": [undefined, undefined, 0], \"RUB\": [undefined, \"₽\"], \"RWF\": [undefined, \"RF\", 0], \"SBD\": [undefined, \"$\"], \"SEK\": [undefined, \"kr\", 2], \"SGD\": [undefined, \"$\"], \"SHP\": [undefined, \"£\"], \"SLE\": [undefined, undefined, 2], \"SLL\": [undefined, undefined, 0], \"SOS\": [undefined, undefined, 0], \"SRD\": [undefined, \"$\"], \"SSP\": [undefined, \"£\"], \"STD\": [undefined, undefined, 0], \"STN\": [undefined, \"Db\"], \"SYP\": [undefined, \"£\", 0], \"THB\": [undefined, \"฿\"], \"TMM\": [undefined, undefined, 0], \"TND\": [undefined, undefined, 3], \"TOP\": [undefined, \"T$\"], \"TRL\": [undefined, undefined, 0], \"TRY\": [undefined, \"₺\"], \"TTD\": [undefined, \"$\"], \"TWD\": [\"NT$\", \"$\", 2], \"TZS\": [undefined, undefined, 2], \"UAH\": [undefined, \"₴\"], \"UGX\": [undefined, undefined, 0], \"USD\": [\"$\"], \"UYI\": [undefined, undefined, 0], \"UYU\": [undefined, \"$\"], \"UYW\": [undefined, undefined, 4], \"UZS\": [undefined, undefined, 2], \"VEF\": [undefined, \"Bs\", 2], \"VND\": [\"₫\", undefined, 0], \"VUV\": [undefined, undefined, 0], \"XAF\": [\"FCFA\", undefined, 0], \"XCD\": [\"EC$\", \"$\"], \"XOF\": [\"F CFA\", undefined, 0], \"XPF\": [\"CFPF\", undefined, 0], \"XXX\": [\"¤\"], \"YER\": [undefined, undefined, 0], \"ZAR\": [undefined, \"R\"], \"ZMK\": [undefined, undefined, 0], \"ZMW\": [undefined, \"ZK\"], \"ZWD\": [undefined, undefined, 0] };\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Format styles that can be used to represent numbers.\n * @see `getLocaleNumberFormat()`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nvar NumberFormatStyle;\n(function (NumberFormatStyle) {\n NumberFormatStyle[NumberFormatStyle[\"Decimal\"] = 0] = \"Decimal\";\n NumberFormatStyle[NumberFormatStyle[\"Percent\"] = 1] = \"Percent\";\n NumberFormatStyle[NumberFormatStyle[\"Currency\"] = 2] = \"Currency\";\n NumberFormatStyle[NumberFormatStyle[\"Scientific\"] = 3] = \"Scientific\";\n})(NumberFormatStyle || (NumberFormatStyle = {}));\n/**\n * Plurality cases used for translating plurals to different languages.\n *\n * @see `NgPlural`\n * @see `NgPluralCase`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nvar Plural;\n(function (Plural) {\n Plural[Plural[\"Zero\"] = 0] = \"Zero\";\n Plural[Plural[\"One\"] = 1] = \"One\";\n Plural[Plural[\"Two\"] = 2] = \"Two\";\n Plural[Plural[\"Few\"] = 3] = \"Few\";\n Plural[Plural[\"Many\"] = 4] = \"Many\";\n Plural[Plural[\"Other\"] = 5] = \"Other\";\n})(Plural || (Plural = {}));\n/**\n * Context-dependant translation forms for strings.\n * Typically the standalone version is for the nominative form of the word,\n * and the format version is used for the genitive case.\n * @see [CLDR website](http://cldr.unicode.org/translation/date-time-1/date-time#TOC-Standalone-vs.-Format-Styles)\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nvar FormStyle;\n(function (FormStyle) {\n FormStyle[FormStyle[\"Format\"] = 0] = \"Format\";\n FormStyle[FormStyle[\"Standalone\"] = 1] = \"Standalone\";\n})(FormStyle || (FormStyle = {}));\n/**\n * String widths available for translations.\n * The specific character widths are locale-specific.\n * Examples are given for the word \"Sunday\" in English.\n *\n * @publicApi\n */\nvar TranslationWidth;\n(function (TranslationWidth) {\n /** 1 character for `en-US`. For example: 'S' */\n TranslationWidth[TranslationWidth[\"Narrow\"] = 0] = \"Narrow\";\n /** 3 characters for `en-US`. For example: 'Sun' */\n TranslationWidth[TranslationWidth[\"Abbreviated\"] = 1] = \"Abbreviated\";\n /** Full length for `en-US`. For example: \"Sunday\" */\n TranslationWidth[TranslationWidth[\"Wide\"] = 2] = \"Wide\";\n /** 2 characters for `en-US`, For example: \"Su\" */\n TranslationWidth[TranslationWidth[\"Short\"] = 3] = \"Short\";\n})(TranslationWidth || (TranslationWidth = {}));\n/**\n * String widths available for date-time formats.\n * The specific character widths are locale-specific.\n * Examples are given for `en-US`.\n *\n * @see `getLocaleDateFormat()`\n * @see `getLocaleTimeFormat()`\n * @see `getLocaleDateTimeFormat()`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n * @publicApi\n */\nvar FormatWidth;\n(function (FormatWidth) {\n /**\n * For `en-US`, 'M/d/yy, h:mm a'`\n * (Example: `6/15/15, 9:03 AM`)\n */\n FormatWidth[FormatWidth[\"Short\"] = 0] = \"Short\";\n /**\n * For `en-US`, `'MMM d, y, h:mm:ss a'`\n * (Example: `Jun 15, 2015, 9:03:01 AM`)\n */\n FormatWidth[FormatWidth[\"Medium\"] = 1] = \"Medium\";\n /**\n * For `en-US`, `'MMMM d, y, h:mm:ss a z'`\n * (Example: `June 15, 2015 at 9:03:01 AM GMT+1`)\n */\n FormatWidth[FormatWidth[\"Long\"] = 2] = \"Long\";\n /**\n * For `en-US`, `'EEEE, MMMM d, y, h:mm:ss a zzzz'`\n * (Example: `Monday, June 15, 2015 at 9:03:01 AM GMT+01:00`)\n */\n FormatWidth[FormatWidth[\"Full\"] = 3] = \"Full\";\n})(FormatWidth || (FormatWidth = {}));\n/**\n * Symbols that can be used to replace placeholders in number patterns.\n * Examples are based on `en-US` values.\n *\n * @see `getLocaleNumberSymbol()`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nvar NumberSymbol;\n(function (NumberSymbol) {\n /**\n * Decimal separator.\n * For `en-US`, the dot character.\n * Example: 2,345`.`67\n */\n NumberSymbol[NumberSymbol[\"Decimal\"] = 0] = \"Decimal\";\n /**\n * Grouping separator, typically for thousands.\n * For `en-US`, the comma character.\n * Example: 2`,`345.67\n */\n NumberSymbol[NumberSymbol[\"Group\"] = 1] = \"Group\";\n /**\n * List-item separator.\n * Example: \"one, two, and three\"\n */\n NumberSymbol[NumberSymbol[\"List\"] = 2] = \"List\";\n /**\n * Sign for percentage (out of 100).\n * Example: 23.4%\n */\n NumberSymbol[NumberSymbol[\"PercentSign\"] = 3] = \"PercentSign\";\n /**\n * Sign for positive numbers.\n * Example: +23\n */\n NumberSymbol[NumberSymbol[\"PlusSign\"] = 4] = \"PlusSign\";\n /**\n * Sign for negative numbers.\n * Example: -23\n */\n NumberSymbol[NumberSymbol[\"MinusSign\"] = 5] = \"MinusSign\";\n /**\n * Computer notation for exponential value (n times a power of 10).\n * Example: 1.2E3\n */\n NumberSymbol[NumberSymbol[\"Exponential\"] = 6] = \"Exponential\";\n /**\n * Human-readable format of exponential.\n * Example: 1.2x103\n */\n NumberSymbol[NumberSymbol[\"SuperscriptingExponent\"] = 7] = \"SuperscriptingExponent\";\n /**\n * Sign for permille (out of 1000).\n * Example: 23.4‰\n */\n NumberSymbol[NumberSymbol[\"PerMille\"] = 8] = \"PerMille\";\n /**\n * Infinity, can be used with plus and minus.\n * Example: ∞, +∞, -∞\n */\n NumberSymbol[NumberSymbol[\"Infinity\"] = 9] = \"Infinity\";\n /**\n * Not a number.\n * Example: NaN\n */\n NumberSymbol[NumberSymbol[\"NaN\"] = 10] = \"NaN\";\n /**\n * Symbol used between time units.\n * Example: 10:52\n */\n NumberSymbol[NumberSymbol[\"TimeSeparator\"] = 11] = \"TimeSeparator\";\n /**\n * Decimal separator for currency values (fallback to `Decimal`).\n * Example: $2,345.67\n */\n NumberSymbol[NumberSymbol[\"CurrencyDecimal\"] = 12] = \"CurrencyDecimal\";\n /**\n * Group separator for currency values (fallback to `Group`).\n * Example: $2,345.67\n */\n NumberSymbol[NumberSymbol[\"CurrencyGroup\"] = 13] = \"CurrencyGroup\";\n})(NumberSymbol || (NumberSymbol = {}));\n/**\n * The value for each day of the week, based on the `en-US` locale\n *\n * @publicApi\n */\nvar WeekDay;\n(function (WeekDay) {\n WeekDay[WeekDay[\"Sunday\"] = 0] = \"Sunday\";\n WeekDay[WeekDay[\"Monday\"] = 1] = \"Monday\";\n WeekDay[WeekDay[\"Tuesday\"] = 2] = \"Tuesday\";\n WeekDay[WeekDay[\"Wednesday\"] = 3] = \"Wednesday\";\n WeekDay[WeekDay[\"Thursday\"] = 4] = \"Thursday\";\n WeekDay[WeekDay[\"Friday\"] = 5] = \"Friday\";\n WeekDay[WeekDay[\"Saturday\"] = 6] = \"Saturday\";\n})(WeekDay || (WeekDay = {}));\n/**\n * Retrieves the locale ID from the currently loaded locale.\n * The loaded locale could be, for example, a global one rather than a regional one.\n * @param locale A locale code, such as `fr-FR`.\n * @returns The locale code. For example, `fr`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleId(locale) {\n return ɵfindLocaleData(locale)[ɵLocaleDataIndex.LocaleId];\n}\n/**\n * Retrieves day period strings for the given locale.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param formStyle The required grammatical form.\n * @param width The required character width.\n * @returns An array of localized period strings. For example, `[AM, PM]` for `en-US`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleDayPeriods(locale, formStyle, width) {\n const data = ɵfindLocaleData(locale);\n const amPmData = [\n data[ɵLocaleDataIndex.DayPeriodsFormat], data[ɵLocaleDataIndex.DayPeriodsStandalone]\n ];\n const amPm = getLastDefinedValue(amPmData, formStyle);\n return getLastDefinedValue(amPm, width);\n}\n/**\n * Retrieves days of the week for the given locale, using the Gregorian calendar.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param formStyle The required grammatical form.\n * @param width The required character width.\n * @returns An array of localized name strings.\n * For example,`[Sunday, Monday, ... Saturday]` for `en-US`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleDayNames(locale, formStyle, width) {\n const data = ɵfindLocaleData(locale);\n const daysData = [data[ɵLocaleDataIndex.DaysFormat], data[ɵLocaleDataIndex.DaysStandalone]];\n const days = getLastDefinedValue(daysData, formStyle);\n return getLastDefinedValue(days, width);\n}\n/**\n * Retrieves months of the year for the given locale, using the Gregorian calendar.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param formStyle The required grammatical form.\n * @param width The required character width.\n * @returns An array of localized name strings.\n * For example, `[January, February, ...]` for `en-US`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleMonthNames(locale, formStyle, width) {\n const data = ɵfindLocaleData(locale);\n const monthsData = [data[ɵLocaleDataIndex.MonthsFormat], data[ɵLocaleDataIndex.MonthsStandalone]];\n const months = getLastDefinedValue(monthsData, formStyle);\n return getLastDefinedValue(months, width);\n}\n/**\n * Retrieves Gregorian-calendar eras for the given locale.\n * @param locale A locale code for the locale format rules to use.\n * @param width The required character width.\n\n * @returns An array of localized era strings.\n * For example, `[AD, BC]` for `en-US`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleEraNames(locale, width) {\n const data = ɵfindLocaleData(locale);\n const erasData = data[ɵLocaleDataIndex.Eras];\n return getLastDefinedValue(erasData, width);\n}\n/**\n * Retrieves the first day of the week for the given locale.\n *\n * @param locale A locale code for the locale format rules to use.\n * @returns A day index number, using the 0-based week-day index for `en-US`\n * (Sunday = 0, Monday = 1, ...).\n * For example, for `fr-FR`, returns 1 to indicate that the first day is Monday.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleFirstDayOfWeek(locale) {\n const data = ɵfindLocaleData(locale);\n return data[ɵLocaleDataIndex.FirstDayOfWeek];\n}\n/**\n * Range of week days that are considered the week-end for the given locale.\n *\n * @param locale A locale code for the locale format rules to use.\n * @returns The range of day values, `[startDay, endDay]`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleWeekEndRange(locale) {\n const data = ɵfindLocaleData(locale);\n return data[ɵLocaleDataIndex.WeekendRange];\n}\n/**\n * Retrieves a localized date-value formatting string.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param width The format type.\n * @returns The localized formatting string.\n * @see `FormatWidth`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleDateFormat(locale, width) {\n const data = ɵfindLocaleData(locale);\n return getLastDefinedValue(data[ɵLocaleDataIndex.DateFormat], width);\n}\n/**\n * Retrieves a localized time-value formatting string.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param width The format type.\n * @returns The localized formatting string.\n * @see `FormatWidth`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n\n * @publicApi\n */\nfunction getLocaleTimeFormat(locale, width) {\n const data = ɵfindLocaleData(locale);\n return getLastDefinedValue(data[ɵLocaleDataIndex.TimeFormat], width);\n}\n/**\n * Retrieves a localized date-time formatting string.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param width The format type.\n * @returns The localized formatting string.\n * @see `FormatWidth`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleDateTimeFormat(locale, width) {\n const data = ɵfindLocaleData(locale);\n const dateTimeFormatData = data[ɵLocaleDataIndex.DateTimeFormat];\n return getLastDefinedValue(dateTimeFormatData, width);\n}\n/**\n * Retrieves a localized number symbol that can be used to replace placeholders in number formats.\n * @param locale The locale code.\n * @param symbol The symbol to localize.\n * @returns The character for the localized symbol.\n * @see `NumberSymbol`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleNumberSymbol(locale, symbol) {\n const data = ɵfindLocaleData(locale);\n const res = data[ɵLocaleDataIndex.NumberSymbols][symbol];\n if (typeof res === 'undefined') {\n if (symbol === NumberSymbol.CurrencyDecimal) {\n return data[ɵLocaleDataIndex.NumberSymbols][NumberSymbol.Decimal];\n }\n else if (symbol === NumberSymbol.CurrencyGroup) {\n return data[ɵLocaleDataIndex.NumberSymbols][NumberSymbol.Group];\n }\n }\n return res;\n}\n/**\n * Retrieves a number format for a given locale.\n *\n * Numbers are formatted using patterns, like `#,###.00`. For example, the pattern `#,###.00`\n * when used to format the number 12345.678 could result in \"12'345,678\". That would happen if the\n * grouping separator for your language is an apostrophe, and the decimal separator is a comma.\n *\n * <b>Important:</b> The characters `.` `,` `0` `#` (and others below) are special placeholders\n * that stand for the decimal separator, and so on, and are NOT real characters.\n * You must NOT \"translate\" the placeholders. For example, don't change `.` to `,` even though in\n * your language the decimal point is written with a comma. The symbols should be replaced by the\n * local equivalents, using the appropriate `NumberSymbol` for your language.\n *\n * Here are the special characters used in number patterns:\n *\n * | Symbol | Meaning |\n * |--------|---------|\n * | . | Replaced automatically by the character used for the decimal point. |\n * | , | Replaced by the \"grouping\" (thousands) separator. |\n * | 0 | Replaced by a digit (or zero if there aren't enough digits). |\n * | # | Replaced by a digit (or nothing if there aren't enough). |\n * | ¤ | Replaced by a currency symbol, such as $ or USD. |\n * | % | Marks a percent format. The % symbol may change position, but must be retained. |\n * | E | Marks a scientific format. The E symbol may change position, but must be retained. |\n * | ' | Special characters used as literal characters are quoted with ASCII single quotes. |\n *\n * @param locale A locale code for the locale format rules to use.\n * @param type The type of numeric value to be formatted (such as `Decimal` or `Currency`.)\n * @returns The localized format string.\n * @see `NumberFormatStyle`\n * @see [CLDR website](http://cldr.unicode.org/translation/number-patterns)\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleNumberFormat(locale, type) {\n const data = ɵfindLocaleData(locale);\n return data[ɵLocaleDataIndex.NumberFormats][type];\n}\n/**\n * Retrieves the symbol used to represent the currency for the main country\n * corresponding to a given locale. For example, '$' for `en-US`.\n *\n * @param locale A locale code for the locale format rules to use.\n * @returns The localized symbol character,\n * or `null` if the main country cannot be determined.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleCurrencySymbol(locale) {\n const data = ɵfindLocaleData(locale);\n return data[ɵLocaleDataIndex.CurrencySymbol] || null;\n}\n/**\n * Retrieves the name of the currency for the main country corresponding\n * to a given locale. For example, 'US Dollar' for `en-US`.\n * @param locale A locale code for the locale format rules to use.\n * @returns The currency name,\n * or `null` if the main country cannot be determined.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleCurrencyName(locale) {\n const data = ɵfindLocaleData(locale);\n return data[ɵLocaleDataIndex.CurrencyName] || null;\n}\n/**\n * Retrieves the default currency code for the given locale.\n *\n * The default is defined as the first currency which is still in use.\n *\n * @param locale The code of the locale whose currency code we want.\n * @returns The code of the default currency for the given locale.\n *\n * @publicApi\n */\nfunction getLocaleCurrencyCode(locale) {\n return ɵgetLocaleCurrencyCode(locale);\n}\n/**\n * Retrieves the currency values for a given locale.\n * @param locale A locale code for the locale format rules to use.\n * @returns The currency values.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n */\nfunction getLocaleCurrencies(locale) {\n const data = ɵfindLocaleData(locale);\n return data[ɵLocaleDataIndex.Currencies];\n}\n/**\n * @alias core/ɵgetLocalePluralCase\n * @publicApi\n */\nconst getLocalePluralCase = ɵgetLocalePluralCase;\nfunction checkFullData(data) {\n if (!data[ɵLocaleDataIndex.ExtraData]) {\n throw new Error(`Missing extra locale data for the locale \"${data[ɵLocaleDataIndex\n .LocaleId]}\". Use \"registerLocaleData\" to load new data. See the \"I18n guide\" on angular.io to know more.`);\n }\n}\n/**\n * Retrieves locale-specific rules used to determine which day period to use\n * when more than one period is defined for a locale.\n *\n * There is a rule for each defined day period. The\n * first rule is applied to the first day period and so on.\n * Fall back to AM/PM when no rules are available.\n *\n * A rule can specify a period as time range, or as a single time value.\n *\n * This functionality is only available when you have loaded the full locale data.\n * See the [\"I18n guide\"](guide/i18n-common-format-data-locale).\n *\n * @param locale A locale code for the locale format rules to use.\n * @returns The rules for the locale, a single time value or array of *from-time, to-time*,\n * or null if no periods are available.\n *\n * @see `getLocaleExtraDayPeriods()`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleExtraDayPeriodRules(locale) {\n const data = ɵfindLocaleData(locale);\n checkFullData(data);\n const rules = data[ɵLocaleDataIndex.ExtraData][2 /* ɵExtraLocaleDataIndex.ExtraDayPeriodsRules */] || [];\n return rules.map((rule) => {\n if (typeof rule === 'string') {\n return extractTime(rule);\n }\n return [extractTime(rule[0]), extractTime(rule[1])];\n });\n}\n/**\n * Retrieves locale-specific day periods, which indicate roughly how a day is broken up\n * in different languages.\n * For example, for `en-US`, periods are morning, noon, afternoon, evening, and midnight.\n *\n * This functionality is only available when you have loaded the full locale data.\n * See the [\"I18n guide\"](guide/i18n-common-format-data-locale).\n *\n * @param locale A locale code for the locale format rules to use.\n * @param formStyle The required grammatical form.\n * @param width The required character width.\n * @returns The translated day-period strings.\n * @see `getLocaleExtraDayPeriodRules()`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleExtraDayPeriods(locale, formStyle, width) {\n const data = ɵfindLocaleData(locale);\n checkFullData(data);\n const dayPeriodsData = [\n data[ɵLocaleDataIndex.ExtraData][0 /* ɵExtraLocaleDataIndex.ExtraDayPeriodFormats */],\n data[ɵLocaleDataIndex.ExtraData][1 /* ɵExtraLocaleDataIndex.ExtraDayPeriodStandalone */]\n ];\n const dayPeriods = getLastDefinedValue(dayPeriodsData, formStyle) || [];\n return getLastDefinedValue(dayPeriods, width) || [];\n}\n/**\n * Retrieves the writing direction of a specified locale\n * @param locale A locale code for the locale format rules to use.\n * @publicApi\n * @returns 'rtl' or 'ltr'\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n */\nfunction getLocaleDirection(locale) {\n const data = ɵfindLocaleData(locale);\n return data[ɵLocaleDataIndex.Directionality];\n}\n/**\n * Retrieves the first value that is defined in an array, going backwards from an index position.\n *\n * To avoid repeating the same data (as when the \"format\" and \"standalone\" forms are the same)\n * add the first value to the locale data arrays, and add other values only if they are different.\n *\n * @param data The data array to retrieve from.\n * @param index A 0-based index into the array to start from.\n * @returns The value immediately before the given index position.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLastDefinedValue(data, index) {\n for (let i = index; i > -1; i--) {\n if (typeof data[i] !== 'undefined') {\n return data[i];\n }\n }\n throw new Error('Locale data API: locale data undefined');\n}\n/**\n * Extracts the hours and minutes from a string like \"15:45\"\n */\nfunction extractTime(time) {\n const [h, m] = time.split(':');\n return { hours: +h, minutes: +m };\n}\n/**\n * Retrieves the currency symbol for a given currency code.\n *\n * For example, for the default `en-US` locale, the code `USD` can\n * be represented by the narrow symbol `$` or the wide symbol `US$`.\n *\n * @param code The currency code.\n * @param format The format, `wide` or `narrow`.\n * @param locale A locale code for the locale format rules to use.\n *\n * @returns The symbol, or the currency code if no symbol is available.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getCurrencySymbol(code, format, locale = 'en') {\n const currency = getLocaleCurrencies(locale)[code] || CURRENCIES_EN[code] || [];\n const symbolNarrow = currency[1 /* ɵCurrencyIndex.SymbolNarrow */];\n if (format === 'narrow' && typeof symbolNarrow === 'string') {\n return symbolNarrow;\n }\n return currency[0 /* ɵCurrencyIndex.Symbol */] || code;\n}\n// Most currencies have cents, that's why the default is 2\nconst DEFAULT_NB_OF_CURRENCY_DIGITS = 2;\n/**\n * Reports the number of decimal digits for a given currency.\n * The value depends upon the presence of cents in that particular currency.\n *\n * @param code The currency code.\n * @returns The number of decimal digits, typically 0 or 2.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getNumberOfCurrencyDigits(code) {\n let digits;\n const currency = CURRENCIES_EN[code];\n if (currency) {\n digits = currency[2 /* ɵCurrencyIndex.NbOfDigits */];\n }\n return typeof digits === 'number' ? digits : DEFAULT_NB_OF_CURRENCY_DIGITS;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst ISO8601_DATE_REGEX = /^(\\d{4,})-?(\\d\\d)-?(\\d\\d)(?:T(\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:\\.(\\d+))?)?)?(Z|([+-])(\\d\\d):?(\\d\\d))?)?$/;\n// 1 2 3 4 5 6 7 8 9 10 11\nconst NAMED_FORMATS = {};\nconst DATE_FORMATS_SPLIT = /((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\\s\\S]*)/;\nvar ZoneWidth;\n(function (ZoneWidth) {\n ZoneWidth[ZoneWidth[\"Short\"] = 0] = \"Short\";\n ZoneWidth[ZoneWidth[\"ShortGMT\"] = 1] = \"ShortGMT\";\n ZoneWidth[ZoneWidth[\"Long\"] = 2] = \"Long\";\n ZoneWidth[ZoneWidth[\"Extended\"] = 3] = \"Extended\";\n})(ZoneWidth || (ZoneWidth = {}));\nvar DateType;\n(function (DateType) {\n DateType[DateType[\"FullYear\"] = 0] = \"FullYear\";\n DateType[DateType[\"Month\"] = 1] = \"Month\";\n DateType[DateType[\"Date\"] = 2] = \"Date\";\n DateType[DateType[\"Hours\"] = 3] = \"Hours\";\n DateType[DateType[\"Minutes\"] = 4] = \"Minutes\";\n DateType[DateType[\"Seconds\"] = 5] = \"Seconds\";\n DateType[DateType[\"FractionalSeconds\"] = 6] = \"FractionalSeconds\";\n DateType[DateType[\"Day\"] = 7] = \"Day\";\n})(DateType || (DateType = {}));\nvar TranslationType;\n(function (TranslationType) {\n TranslationType[TranslationType[\"DayPeriods\"] = 0] = \"DayPeriods\";\n TranslationType[TranslationType[\"Days\"] = 1] = \"Days\";\n TranslationType[TranslationType[\"Months\"] = 2] = \"Months\";\n TranslationType[TranslationType[\"Eras\"] = 3] = \"Eras\";\n})(TranslationType || (TranslationType = {}));\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a date according to locale rules.\n *\n * @param value The date to format, as a Date, or a number (milliseconds since UTC epoch)\n * or an [ISO date-time string](https://www.w3.org/TR/NOTE-datetime).\n * @param format The date-time components to include. See `DatePipe` for details.\n * @param locale A locale code for the locale format rules to use.\n * @param timezone The time zone. A time zone offset from GMT (such as `'+0430'`),\n * or a standard UTC/GMT or continental US time zone abbreviation.\n * If not specified, uses host system settings.\n *\n * @returns The formatted date string.\n *\n * @see `DatePipe`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction formatDate(value, format, locale, timezone) {\n let date = toDate(value);\n const namedFormat = getNamedFormat(locale, format);\n format = namedFormat || format;\n let parts = [];\n let match;\n while (format) {\n match = DATE_FORMATS_SPLIT.exec(format);\n if (match) {\n parts = parts.concat(match.slice(1));\n const part = parts.pop();\n if (!part) {\n break;\n }\n format = part;\n }\n else {\n parts.push(format);\n break;\n }\n }\n let dateTimezoneOffset = date.getTimezoneOffset();\n if (timezone) {\n dateTimezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);\n date = convertTimezoneToLocal(date, timezone, true);\n }\n let text = '';\n parts.forEach(value => {\n const dateFormatter = getDateFormatter(value);\n text += dateFormatter ? dateFormatter(date, locale, dateTimezoneOffset) :\n value === '\\'\\'' ? '\\'' :\n value.replace(/(^'|'$)/g, '').replace(/''/g, '\\'');\n });\n return text;\n}\n/**\n * Create a new Date object with the given date value, and the time set to midnight.\n *\n * We cannot use `new Date(year, month, date)` because it maps years between 0 and 99 to 1900-1999.\n * See: https://github.com/angular/angular/issues/40377\n *\n * Note that this function returns a Date object whose time is midnight in the current locale's\n * timezone. In the future we might want to change this to be midnight in UTC, but this would be a\n * considerable breaking change.\n */\nfunction createDate(year, month, date) {\n // The `newDate` is set to midnight (UTC) on January 1st 1970.\n // - In PST this will be December 31st 1969 at 4pm.\n // - In GMT this will be January 1st 1970 at 1am.\n // Note that they even have different years, dates and months!\n const newDate = new Date(0);\n // `setFullYear()` allows years like 0001 to be set correctly. This function does not\n // change the internal time of the date.\n // Consider calling `setFullYear(2019, 8, 20)` (September 20, 2019).\n // - In PST this will now be September 20, 2019 at 4pm\n // - In GMT this will now be September 20, 2019 at 1am\n newDate.setFullYear(year, month, date);\n // We want the final date to be at local midnight, so we reset the time.\n // - In PST this will now be September 20, 2019 at 12am\n // - In GMT this will now be September 20, 2019 at 12am\n newDate.setHours(0, 0, 0);\n return newDate;\n}\nfunction getNamedFormat(locale, format) {\n const localeId = getLocaleId(locale);\n NAMED_FORMATS[localeId] = NAMED_FORMATS[localeId] || {};\n if (NAMED_FORMATS[localeId][format]) {\n return NAMED_FORMATS[localeId][format];\n }\n let formatValue = '';\n switch (format) {\n case 'shortDate':\n formatValue = getLocaleDateFormat(locale, FormatWidth.Short);\n break;\n case 'mediumDate':\n formatValue = getLocaleDateFormat(locale, FormatWidth.Medium);\n break;\n case 'longDate':\n formatValue = getLocaleDateFormat(locale, FormatWidth.Long);\n break;\n case 'fullDate':\n formatValue = getLocaleDateFormat(locale, FormatWidth.Full);\n break;\n case 'shortTime':\n formatValue = getLocaleTimeFormat(locale, FormatWidth.Short);\n break;\n case 'mediumTime':\n formatValue = getLocaleTimeFormat(locale, FormatWidth.Medium);\n break;\n case 'longTime':\n formatValue = getLocaleTimeFormat(locale, FormatWidth.Long);\n break;\n case 'fullTime':\n formatValue = getLocaleTimeFormat(locale, FormatWidth.Full);\n break;\n case 'short':\n const shortTime = getNamedFormat(locale, 'shortTime');\n const shortDate = getNamedFormat(locale, 'shortDate');\n formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Short), [shortTime, shortDate]);\n break;\n case 'medium':\n const mediumTime = getNamedFormat(locale, 'mediumTime');\n const mediumDate = getNamedFormat(locale, 'mediumDate');\n formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Medium), [mediumTime, mediumDate]);\n break;\n case 'long':\n const longTime = getNamedFormat(locale, 'longTime');\n const longDate = getNamedFormat(locale, 'longDate');\n formatValue =\n formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Long), [longTime, longDate]);\n break;\n case 'full':\n const fullTime = getNamedFormat(locale, 'fullTime');\n const fullDate = getNamedFormat(locale, 'fullDate');\n formatValue =\n formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Full), [fullTime, fullDate]);\n break;\n }\n if (formatValue) {\n NAMED_FORMATS[localeId][format] = formatValue;\n }\n return formatValue;\n}\nfunction formatDateTime(str, opt_values) {\n if (opt_values) {\n str = str.replace(/\\{([^}]+)}/g, function (match, key) {\n return (opt_values != null && key in opt_values) ? opt_values[key] : match;\n });\n }\n return str;\n}\nfunction padNumber(num, digits, minusSign = '-', trim, negWrap) {\n let neg = '';\n if (num < 0 || (negWrap && num <= 0)) {\n if (negWrap) {\n num = -num + 1;\n }\n else {\n num = -num;\n neg = minusSign;\n }\n }\n let strNum = String(num);\n while (strNum.length < digits) {\n strNum = '0' + strNum;\n }\n if (trim) {\n strNum = strNum.slice(strNum.length - digits);\n }\n return neg + strNum;\n}\nfunction formatFractionalSeconds(milliseconds, digits) {\n const strMs = padNumber(milliseconds, 3);\n return strMs.substring(0, digits);\n}\n/**\n * Returns a date formatter that transforms a date into its locale digit representation\n */\nfunction dateGetter(name, size, offset = 0, trim = false, negWrap = false) {\n return function (date, locale) {\n let part = getDatePart(name, date);\n if (offset > 0 || part > -offset) {\n part += offset;\n }\n if (name === DateType.Hours) {\n if (part === 0 && offset === -12) {\n part = 12;\n }\n }\n else if (name === DateType.FractionalSeconds) {\n return formatFractionalSeconds(part, size);\n }\n const localeMinus = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign);\n return padNumber(part, size, localeMinus, trim, negWrap);\n };\n}\nfunction getDatePart(part, date) {\n switch (part) {\n case DateType.FullYear:\n return date.getFullYear();\n case DateType.Month:\n return date.getMonth();\n case DateType.Date:\n return date.getDate();\n case DateType.Hours:\n return date.getHours();\n case DateType.Minutes:\n return date.getMinutes();\n case DateType.Seconds:\n return date.getSeconds();\n case DateType.FractionalSeconds:\n return date.getMilliseconds();\n case DateType.Day:\n return date.getDay();\n default:\n throw new Error(`Unknown DateType value \"${part}\".`);\n }\n}\n/**\n * Returns a date formatter that transforms a date into its locale string representation\n */\nfunction dateStrGetter(name, width, form = FormStyle.Format, extended = false) {\n return function (date, locale) {\n return getDateTranslation(date, locale, name, width, form, extended);\n };\n}\n/**\n * Returns the locale translation of a date for a given form, type and width\n */\nfunction getDateTranslation(date, locale, name, width, form, extended) {\n switch (name) {\n case TranslationType.Months:\n return getLocaleMonthNames(locale, form, width)[date.getMonth()];\n case TranslationType.Days:\n return getLocaleDayNames(locale, form, width)[date.getDay()];\n case TranslationType.DayPeriods:\n const currentHours = date.getHours();\n const currentMinutes = date.getMinutes();\n if (extended) {\n const rules = getLocaleExtraDayPeriodRules(locale);\n const dayPeriods = getLocaleExtraDayPeriods(locale, form, width);\n const index = rules.findIndex(rule => {\n if (Array.isArray(rule)) {\n // morning, afternoon, evening, night\n const [from, to] = rule;\n const afterFrom = currentHours >= from.hours && currentMinutes >= from.minutes;\n const beforeTo = (currentHours < to.hours ||\n (currentHours === to.hours && currentMinutes < to.minutes));\n // We must account for normal rules that span a period during the day (e.g. 6am-9am)\n // where `from` is less (earlier) than `to`. But also rules that span midnight (e.g.\n // 10pm - 5am) where `from` is greater (later!) than `to`.\n //\n // In the first case the current time must be BOTH after `from` AND before `to`\n // (e.g. 8am is after 6am AND before 10am).\n //\n // In the second case the current time must be EITHER after `from` OR before `to`\n // (e.g. 4am is before 5am but not after 10pm; and 11pm is not before 5am but it is\n // after 10pm).\n if (from.hours < to.hours) {\n if (afterFrom && beforeTo) {\n return true;\n }\n }\n else if (afterFrom || beforeTo) {\n return true;\n }\n }\n else { // noon or midnight\n if (rule.hours === currentHours && rule.minutes === currentMinutes) {\n return true;\n }\n }\n return false;\n });\n if (index !== -1) {\n return dayPeriods[index];\n }\n }\n // if no rules for the day periods, we use am/pm by default\n return getLocaleDayPeriods(locale, form, width)[currentHours < 12 ? 0 : 1];\n case TranslationType.Eras:\n return getLocaleEraNames(locale, width)[date.getFullYear() <= 0 ? 0 : 1];\n default:\n // This default case is not needed by TypeScript compiler, as the switch is exhaustive.\n // However Closure Compiler does not understand that and reports an error in typed mode.\n // The `throw new Error` below works around the problem, and the unexpected: never variable\n // makes sure tsc still checks this code is unreachable.\n const unexpected = name;\n throw new Error(`unexpected translation type ${unexpected}`);\n }\n}\n/**\n * Returns a date formatter that transforms a date and an offset into a timezone with ISO8601 or\n * GMT format depending on the width (eg: short = +0430, short:GMT = GMT+4, long = GMT+04:30,\n * extended = +04:30)\n */\nfunction timeZoneGetter(width) {\n return function (date, locale, offset) {\n const zone = -1 * offset;\n const minusSign = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign);\n const hours = zone > 0 ? Math.floor(zone / 60) : Math.ceil(zone / 60);\n switch (width) {\n case ZoneWidth.Short:\n return ((zone >= 0) ? '+' : '') + padNumber(hours, 2, minusSign) +\n padNumber(Math.abs(zone % 60), 2, minusSign);\n case ZoneWidth.ShortGMT:\n return 'GMT' + ((zone >= 0) ? '+' : '') + padNumber(hours, 1, minusSign);\n case ZoneWidth.Long:\n return 'GMT' + ((zone >= 0) ? '+' : '') + padNumber(hours, 2, minusSign) + ':' +\n padNumber(Math.abs(zone % 60), 2, minusSign);\n case ZoneWidth.Extended:\n if (offset === 0) {\n return 'Z';\n }\n else {\n return ((zone >= 0) ? '+' : '') + padNumber(hours, 2, minusSign) + ':' +\n padNumber(Math.abs(zone % 60), 2, minusSign);\n }\n default:\n throw new Error(`Unknown zone width \"${width}\"`);\n }\n };\n}\nconst JANUARY = 0;\nconst THURSDAY = 4;\nfunction getFirstThursdayOfYear(year) {\n const firstDayOfYear = createDate(year, JANUARY, 1).getDay();\n return createDate(year, 0, 1 + ((firstDayOfYear <= THURSDAY) ? THURSDAY : THURSDAY + 7) - firstDayOfYear);\n}\nfunction getThursdayThisWeek(datetime) {\n return createDate(datetime.getFullYear(), datetime.getMonth(), datetime.getDate() + (THURSDAY - datetime.getDay()));\n}\nfunction weekGetter(size, monthBased = false) {\n return function (date, locale) {\n let result;\n if (monthBased) {\n const nbDaysBefore1stDayOfMonth = new Date(date.getFullYear(), date.getMonth(), 1).getDay() - 1;\n const today = date.getDate();\n result = 1 + Math.floor((today + nbDaysBefore1stDayOfMonth) / 7);\n }\n else {\n const thisThurs = getThursdayThisWeek(date);\n // Some days of a year are part of next year according to ISO 8601.\n // Compute the firstThurs from the year of this week's Thursday\n const firstThurs = getFirstThursdayOfYear(thisThurs.getFullYear());\n const diff = thisThurs.getTime() - firstThurs.getTime();\n result = 1 + Math.round(diff / 6.048e8); // 6.048e8 ms per week\n }\n return padNumber(result, size, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n };\n}\n/**\n * Returns a date formatter that provides the week-numbering year for the input date.\n */\nfunction weekNumberingYearGetter(size, trim = false) {\n return function (date, locale) {\n const thisThurs = getThursdayThisWeek(date);\n const weekNumberingYear = thisThurs.getFullYear();\n return padNumber(weekNumberingYear, size, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign), trim);\n };\n}\nconst DATE_FORMATS = {};\n// Based on CLDR formats:\n// See complete list: http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n// See also explanations: http://cldr.unicode.org/translation/date-time\n// TODO(ocombe): support all missing cldr formats: U, Q, D, F, e, j, J, C, A, v, V, X, x\nfunction getDateFormatter(format) {\n if (DATE_FORMATS[format]) {\n return DATE_FORMATS[format];\n }\n let formatter;\n switch (format) {\n // Era name (AD/BC)\n case 'G':\n case 'GG':\n case 'GGG':\n formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Abbreviated);\n break;\n case 'GGGG':\n formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Wide);\n break;\n case 'GGGGG':\n formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Narrow);\n break;\n // 1 digit representation of the year, e.g. (AD 1 => 1, AD 199 => 199)\n case 'y':\n formatter = dateGetter(DateType.FullYear, 1, 0, false, true);\n break;\n // 2 digit representation of the year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10)\n case 'yy':\n formatter = dateGetter(DateType.FullYear, 2, 0, true, true);\n break;\n // 3 digit representation of the year, padded (000-999). (e.g. AD 2001 => 01, AD 2010 => 10)\n case 'yyy':\n formatter = dateGetter(DateType.FullYear, 3, 0, false, true);\n break;\n // 4 digit representation of the year (e.g. AD 1 => 0001, AD 2010 => 2010)\n case 'yyyy':\n formatter = dateGetter(DateType.FullYear, 4, 0, false, true);\n break;\n // 1 digit representation of the week-numbering year, e.g. (AD 1 => 1, AD 199 => 199)\n case 'Y':\n formatter = weekNumberingYearGetter(1);\n break;\n // 2 digit representation of the week-numbering year, padded (00-99). (e.g. AD 2001 => 01, AD\n // 2010 => 10)\n case 'YY':\n formatter = weekNumberingYearGetter(2, true);\n break;\n // 3 digit representation of the week-numbering year, padded (000-999). (e.g. AD 1 => 001, AD\n // 2010 => 2010)\n case 'YYY':\n formatter = weekNumberingYearGetter(3);\n break;\n // 4 digit representation of the week-numbering year (e.g. AD 1 => 0001, AD 2010 => 2010)\n case 'YYYY':\n formatter = weekNumberingYearGetter(4);\n break;\n // Month of the year (1-12), numeric\n case 'M':\n case 'L':\n formatter = dateGetter(DateType.Month, 1, 1);\n break;\n case 'MM':\n case 'LL':\n formatter = dateGetter(DateType.Month, 2, 1);\n break;\n // Month of the year (January, ...), string, format\n case 'MMM':\n formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Abbreviated);\n break;\n case 'MMMM':\n formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Wide);\n break;\n case 'MMMMM':\n formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Narrow);\n break;\n // Month of the year (January, ...), string, standalone\n case 'LLL':\n formatter =\n dateStrGetter(TranslationType.Months, TranslationWidth.Abbreviated, FormStyle.Standalone);\n break;\n case 'LLLL':\n formatter =\n dateStrGetter(TranslationType.Months, TranslationWidth.Wide, FormStyle.Standalone);\n break;\n case 'LLLLL':\n formatter =\n dateStrGetter(TranslationType.Months, TranslationWidth.Narrow, FormStyle.Standalone);\n break;\n // Week of the year (1, ... 52)\n case 'w':\n formatter = weekGetter(1);\n break;\n case 'ww':\n formatter = weekGetter(2);\n break;\n // Week of the month (1, ...)\n case 'W':\n formatter = weekGetter(1, true);\n break;\n // Day of the month (1-31)\n case 'd':\n formatter = dateGetter(DateType.Date, 1);\n break;\n case 'dd':\n formatter = dateGetter(DateType.Date, 2);\n break;\n // Day of the Week StandAlone (1, 1, Mon, Monday, M, Mo)\n case 'c':\n case 'cc':\n formatter = dateGetter(DateType.Day, 1);\n break;\n case 'ccc':\n formatter =\n dateStrGetter(TranslationType.Days, TranslationWidth.Abbreviated, FormStyle.Standalone);\n break;\n case 'cccc':\n formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Wide, FormStyle.Standalone);\n break;\n case 'ccccc':\n formatter =\n dateStrGetter(TranslationType.Days, TranslationWidth.Narrow, FormStyle.Standalone);\n break;\n case 'cccccc':\n formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Short, FormStyle.Standalone);\n break;\n // Day of the Week\n case 'E':\n case 'EE':\n case 'EEE':\n formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Abbreviated);\n break;\n case 'EEEE':\n formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Wide);\n break;\n case 'EEEEE':\n formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Narrow);\n break;\n case 'EEEEEE':\n formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Short);\n break;\n // Generic period of the day (am-pm)\n case 'a':\n case 'aa':\n case 'aaa':\n formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated);\n break;\n case 'aaaa':\n formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide);\n break;\n case 'aaaaa':\n formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow);\n break;\n // Extended period of the day (midnight, at night, ...), standalone\n case 'b':\n case 'bb':\n case 'bbb':\n formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated, FormStyle.Standalone, true);\n break;\n case 'bbbb':\n formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide, FormStyle.Standalone, true);\n break;\n case 'bbbbb':\n formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow, FormStyle.Standalone, true);\n break;\n // Extended period of the day (midnight, night, ...), standalone\n case 'B':\n case 'BB':\n case 'BBB':\n formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated, FormStyle.Format, true);\n break;\n case 'BBBB':\n formatter =\n dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide, FormStyle.Format, true);\n break;\n case 'BBBBB':\n formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow, FormStyle.Format, true);\n break;\n // Hour in AM/PM, (1-12)\n case 'h':\n formatter = dateGetter(DateType.Hours, 1, -12);\n break;\n case 'hh':\n formatter = dateGetter(DateType.Hours, 2, -12);\n break;\n // Hour of the day (0-23)\n case 'H':\n formatter = dateGetter(DateType.Hours, 1);\n break;\n // Hour in day, padded (00-23)\n case 'HH':\n formatter = dateGetter(DateType.Hours, 2);\n break;\n // Minute of the hour (0-59)\n case 'm':\n formatter = dateGetter(DateType.Minutes, 1);\n break;\n case 'mm':\n formatter = dateGetter(DateType.Minutes, 2);\n break;\n // Second of the minute (0-59)\n case 's':\n formatter = dateGetter(DateType.Seconds, 1);\n break;\n case 'ss':\n formatter = dateGetter(DateType.Seconds, 2);\n break;\n // Fractional second\n case 'S':\n formatter = dateGetter(DateType.FractionalSeconds, 1);\n break;\n case 'SS':\n formatter = dateGetter(DateType.FractionalSeconds, 2);\n break;\n case 'SSS':\n formatter = dateGetter(DateType.FractionalSeconds, 3);\n break;\n // Timezone ISO8601 short format (-0430)\n case 'Z':\n case 'ZZ':\n case 'ZZZ':\n formatter = timeZoneGetter(ZoneWidth.Short);\n break;\n // Timezone ISO8601 extended format (-04:30)\n case 'ZZZZZ':\n formatter = timeZoneGetter(ZoneWidth.Extended);\n break;\n // Timezone GMT short format (GMT+4)\n case 'O':\n case 'OO':\n case 'OOO':\n // Should be location, but fallback to format O instead because we don't have the data yet\n case 'z':\n case 'zz':\n case 'zzz':\n formatter = timeZoneGetter(ZoneWidth.ShortGMT);\n break;\n // Timezone GMT long format (GMT+0430)\n case 'OOOO':\n case 'ZZZZ':\n // Should be location, but fallback to format O instead because we don't have the data yet\n case 'zzzz':\n formatter = timeZoneGetter(ZoneWidth.Long);\n break;\n default:\n return null;\n }\n DATE_FORMATS[format] = formatter;\n return formatter;\n}\nfunction timezoneToOffset(timezone, fallback) {\n // Support: IE 11 only, Edge 13-15+\n // IE/Edge do not \"understand\" colon (`:`) in timezone\n timezone = timezone.replace(/:/g, '');\n const requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000;\n return isNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset;\n}\nfunction addDateMinutes(date, minutes) {\n date = new Date(date.getTime());\n date.setMinutes(date.getMinutes() + minutes);\n return date;\n}\nfunction convertTimezoneToLocal(date, timezone, reverse) {\n const reverseValue = reverse ? -1 : 1;\n const dateTimezoneOffset = date.getTimezoneOffset();\n const timezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);\n return addDateMinutes(date, reverseValue * (timezoneOffset - dateTimezoneOffset));\n}\n/**\n * Converts a value to date.\n *\n * Supported input formats:\n * - `Date`\n * - number: timestamp\n * - string: numeric (e.g. \"1234\"), ISO and date strings in a format supported by\n * [Date.parse()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse).\n * Note: ISO strings without time return a date without timeoffset.\n *\n * Throws if unable to convert to a date.\n */\nfunction toDate(value) {\n if (isDate(value)) {\n return value;\n }\n if (typeof value === 'number' && !isNaN(value)) {\n return new Date(value);\n }\n if (typeof value === 'string') {\n value = value.trim();\n if (/^(\\d{4}(-\\d{1,2}(-\\d{1,2})?)?)$/.test(value)) {\n /* For ISO Strings without time the day, month and year must be extracted from the ISO String\n before Date creation to avoid time offset and errors in the new Date.\n If we only replace '-' with ',' in the ISO String (\"2015,01,01\"), and try to create a new\n date, some browsers (e.g. IE 9) will throw an invalid Date error.\n If we leave the '-' (\"2015-01-01\") and try to create a new Date(\"2015-01-01\") the timeoffset\n is applied.\n Note: ISO months are 0 for January, 1 for February, ... */\n const [y, m = 1, d = 1] = value.split('-').map((val) => +val);\n return createDate(y, m - 1, d);\n }\n const parsedNb = parseFloat(value);\n // any string that only contains numbers, like \"1234\" but not like \"1234hello\"\n if (!isNaN(value - parsedNb)) {\n return new Date(parsedNb);\n }\n let match;\n if (match = value.match(ISO8601_DATE_REGEX)) {\n return isoStringToDate(match);\n }\n }\n const date = new Date(value);\n if (!isDate(date)) {\n throw new Error(`Unable to convert \"${value}\" into a date`);\n }\n return date;\n}\n/**\n * Converts a date in ISO8601 to a Date.\n * Used instead of `Date.parse` because of browser discrepancies.\n */\nfunction isoStringToDate(match) {\n const date = new Date(0);\n let tzHour = 0;\n let tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n const h = Number(match[4] || 0) - tzHour;\n const m = Number(match[5] || 0) - tzMin;\n const s = Number(match[6] || 0);\n // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}\nfunction isDate(value) {\n return value instanceof Date && !isNaN(value.valueOf());\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst NUMBER_FORMAT_REGEXP = /^(\\d+)?\\.((\\d+)(-(\\d+))?)?$/;\nconst MAX_DIGITS = 22;\nconst DECIMAL_SEP = '.';\nconst ZERO_CHAR = '0';\nconst PATTERN_SEP = ';';\nconst GROUP_SEP = ',';\nconst DIGIT_CHAR = '#';\nconst CURRENCY_CHAR = '¤';\nconst PERCENT_CHAR = '%';\n/**\n * Transforms a number to a locale string based on a style and a format.\n */\nfunction formatNumberToLocaleString(value, pattern, locale, groupSymbol, decimalSymbol, digitsInfo, isPercent = false) {\n let formattedText = '';\n let isZero = false;\n if (!isFinite(value)) {\n formattedText = getLocaleNumberSymbol(locale, NumberSymbol.Infinity);\n }\n else {\n let parsedNumber = parseNumber(value);\n if (isPercent) {\n parsedNumber = toPercent(parsedNumber);\n }\n let minInt = pattern.minInt;\n let minFraction = pattern.minFrac;\n let maxFraction = pattern.maxFrac;\n if (digitsInfo) {\n const parts = digitsInfo.match(NUMBER_FORMAT_REGEXP);\n if (parts === null) {\n throw new Error(`${digitsInfo} is not a valid digit info`);\n }\n const minIntPart = parts[1];\n const minFractionPart = parts[3];\n const maxFractionPart = parts[5];\n if (minIntPart != null) {\n minInt = parseIntAutoRadix(minIntPart);\n }\n if (minFractionPart != null) {\n minFraction = parseIntAutoRadix(minFractionPart);\n }\n if (maxFractionPart != null) {\n maxFraction = parseIntAutoRadix(maxFractionPart);\n }\n else if (minFractionPart != null && minFraction > maxFraction) {\n maxFraction = minFraction;\n }\n }\n roundNumber(parsedNumber, minFraction, maxFraction);\n let digits = parsedNumber.digits;\n let integerLen = parsedNumber.integerLen;\n const exponent = parsedNumber.exponent;\n let decimals = [];\n isZero = digits.every(d => !d);\n // pad zeros for small numbers\n for (; integerLen < minInt; integerLen++) {\n digits.unshift(0);\n }\n // pad zeros for small numbers\n for (; integerLen < 0; integerLen++) {\n digits.unshift(0);\n }\n // extract decimals digits\n if (integerLen > 0) {\n decimals = digits.splice(integerLen, digits.length);\n }\n else {\n decimals = digits;\n digits = [0];\n }\n // format the integer digits with grouping separators\n const groups = [];\n if (digits.length >= pattern.lgSize) {\n groups.unshift(digits.splice(-pattern.lgSize, digits.length).join(''));\n }\n while (digits.length > pattern.gSize) {\n groups.unshift(digits.splice(-pattern.gSize, digits.length).join(''));\n }\n if (digits.length) {\n groups.unshift(digits.join(''));\n }\n formattedText = groups.join(getLocaleNumberSymbol(locale, groupSymbol));\n // append the decimal digits\n if (decimals.length) {\n formattedText += getLocaleNumberSymbol(locale, decimalSymbol) + decimals.join('');\n }\n if (exponent) {\n formattedText += getLocaleNumberSymbol(locale, NumberSymbol.Exponential) + '+' + exponent;\n }\n }\n if (value < 0 && !isZero) {\n formattedText = pattern.negPre + formattedText + pattern.negSuf;\n }\n else {\n formattedText = pattern.posPre + formattedText + pattern.posSuf;\n }\n return formattedText;\n}\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a number as currency using locale rules.\n *\n * @param value The number to format.\n * @param locale A locale code for the locale format rules to use.\n * @param currency A string containing the currency symbol or its name,\n * such as \"$\" or \"Canadian Dollar\". Used in output string, but does not affect the operation\n * of the function.\n * @param currencyCode The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)\n * currency code, such as `USD` for the US dollar and `EUR` for the euro.\n * Used to determine the number of digits in the decimal part.\n * @param digitsInfo Decimal representation options, specified by a string in the following format:\n * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details.\n *\n * @returns The formatted currency value.\n *\n * @see `formatNumber()`\n * @see `DecimalPipe`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction formatCurrency(value, locale, currency, currencyCode, digitsInfo) {\n const format = getLocaleNumberFormat(locale, NumberFormatStyle.Currency);\n const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n pattern.minFrac = getNumberOfCurrencyDigits(currencyCode);\n pattern.maxFrac = pattern.minFrac;\n const res = formatNumberToLocaleString(value, pattern, locale, NumberSymbol.CurrencyGroup, NumberSymbol.CurrencyDecimal, digitsInfo);\n return res\n .replace(CURRENCY_CHAR, currency)\n // if we have 2 time the currency character, the second one is ignored\n .replace(CURRENCY_CHAR, '')\n // If there is a spacing between currency character and the value and\n // the currency character is suppressed by passing an empty string, the\n // spacing character would remain as part of the string. Then we\n // should remove it.\n .trim();\n}\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a number as a percentage according to locale rules.\n *\n * @param value The number to format.\n * @param locale A locale code for the locale format rules to use.\n * @param digitsInfo Decimal representation options, specified by a string in the following format:\n * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details.\n *\n * @returns The formatted percentage value.\n *\n * @see `formatNumber()`\n * @see `DecimalPipe`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n * @publicApi\n *\n */\nfunction formatPercent(value, locale, digitsInfo) {\n const format = getLocaleNumberFormat(locale, NumberFormatStyle.Percent);\n const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n const res = formatNumberToLocaleString(value, pattern, locale, NumberSymbol.Group, NumberSymbol.Decimal, digitsInfo, true);\n return res.replace(new RegExp(PERCENT_CHAR, 'g'), getLocaleNumberSymbol(locale, NumberSymbol.PercentSign));\n}\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a number as text, with group sizing, separator, and other\n * parameters based on the locale.\n *\n * @param value The number to format.\n * @param locale A locale code for the locale format rules to use.\n * @param digitsInfo Decimal representation options, specified by a string in the following format:\n * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details.\n *\n * @returns The formatted text string.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction formatNumber(value, locale, digitsInfo) {\n const format = getLocaleNumberFormat(locale, NumberFormatStyle.Decimal);\n const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n return formatNumberToLocaleString(value, pattern, locale, NumberSymbol.Group, NumberSymbol.Decimal, digitsInfo);\n}\nfunction parseNumberFormat(format, minusSign = '-') {\n const p = {\n minInt: 1,\n minFrac: 0,\n maxFrac: 0,\n posPre: '',\n posSuf: '',\n negPre: '',\n negSuf: '',\n gSize: 0,\n lgSize: 0\n };\n const patternParts = format.split(PATTERN_SEP);\n const positive = patternParts[0];\n const negative = patternParts[1];\n const positiveParts = positive.indexOf(DECIMAL_SEP) !== -1 ?\n positive.split(DECIMAL_SEP) :\n [\n positive.substring(0, positive.lastIndexOf(ZERO_CHAR) + 1),\n positive.substring(positive.lastIndexOf(ZERO_CHAR) + 1)\n ], integer = positiveParts[0], fraction = positiveParts[1] || '';\n p.posPre = integer.substring(0, integer.indexOf(DIGIT_CHAR));\n for (let i = 0; i < fraction.length; i++) {\n const ch = fraction.charAt(i);\n if (ch === ZERO_CHAR) {\n p.minFrac = p.maxFrac = i + 1;\n }\n else if (ch === DIGIT_CHAR) {\n p.maxFrac = i + 1;\n }\n else {\n p.posSuf += ch;\n }\n }\n const groups = integer.split(GROUP_SEP);\n p.gSize = groups[1] ? groups[1].length : 0;\n p.lgSize = (groups[2] || groups[1]) ? (groups[2] || groups[1]).length : 0;\n if (negative) {\n const trunkLen = positive.length - p.posPre.length - p.posSuf.length, pos = negative.indexOf(DIGIT_CHAR);\n p.negPre = negative.substring(0, pos).replace(/'/g, '');\n p.negSuf = negative.slice(pos + trunkLen).replace(/'/g, '');\n }\n else {\n p.negPre = minusSign + p.posPre;\n p.negSuf = p.posSuf;\n }\n return p;\n}\n// Transforms a parsed number into a percentage by multiplying it by 100\nfunction toPercent(parsedNumber) {\n // if the number is 0, don't do anything\n if (parsedNumber.digits[0] === 0) {\n return parsedNumber;\n }\n // Getting the current number of decimals\n const fractionLen = parsedNumber.digits.length - parsedNumber.integerLen;\n if (parsedNumber.exponent) {\n parsedNumber.exponent += 2;\n }\n else {\n if (fractionLen === 0) {\n parsedNumber.digits.push(0, 0);\n }\n else if (fractionLen === 1) {\n parsedNumber.digits.push(0);\n }\n parsedNumber.integerLen += 2;\n }\n return parsedNumber;\n}\n/**\n * Parses a number.\n * Significant bits of this parse algorithm came from https://github.com/MikeMcl/big.js/\n */\nfunction parseNumber(num) {\n let numStr = Math.abs(num) + '';\n let exponent = 0, digits, integerLen;\n let i, j, zeros;\n // Decimal point?\n if ((integerLen = numStr.indexOf(DECIMAL_SEP)) > -1) {\n numStr = numStr.replace(DECIMAL_SEP, '');\n }\n // Exponential form?\n if ((i = numStr.search(/e/i)) > 0) {\n // Work out the exponent.\n if (integerLen < 0)\n integerLen = i;\n integerLen += +numStr.slice(i + 1);\n numStr = numStr.substring(0, i);\n }\n else if (integerLen < 0) {\n // There was no decimal point or exponent so it is an integer.\n integerLen = numStr.length;\n }\n // Count the number of leading zeros.\n for (i = 0; numStr.charAt(i) === ZERO_CHAR; i++) { /* empty */\n }\n if (i === (zeros = numStr.length)) {\n // The digits are all zero.\n digits = [0];\n integerLen = 1;\n }\n else {\n // Count the number of trailing zeros\n zeros--;\n while (numStr.charAt(zeros) === ZERO_CHAR)\n zeros--;\n // Trailing zeros are insignificant so ignore them\n integerLen -= i;\n digits = [];\n // Convert string to array of digits without leading/trailing zeros.\n for (j = 0; i <= zeros; i++, j++) {\n digits[j] = Number(numStr.charAt(i));\n }\n }\n // If the number overflows the maximum allowed digits then use an exponent.\n if (integerLen > MAX_DIGITS) {\n digits = digits.splice(0, MAX_DIGITS - 1);\n exponent = integerLen - 1;\n integerLen = 1;\n }\n return { digits, exponent, integerLen };\n}\n/**\n * Round the parsed number to the specified number of decimal places\n * This function changes the parsedNumber in-place\n */\nfunction roundNumber(parsedNumber, minFrac, maxFrac) {\n if (minFrac > maxFrac) {\n throw new Error(`The minimum number of digits after fraction (${minFrac}) is higher than the maximum (${maxFrac}).`);\n }\n let digits = parsedNumber.digits;\n let fractionLen = digits.length - parsedNumber.integerLen;\n const fractionSize = Math.min(Math.max(minFrac, fractionLen), maxFrac);\n // The index of the digit to where rounding is to occur\n let roundAt = fractionSize + parsedNumber.integerLen;\n let digit = digits[roundAt];\n if (roundAt > 0) {\n // Drop fractional digits beyond `roundAt`\n digits.splice(Math.max(parsedNumber.integerLen, roundAt));\n // Set non-fractional digits beyond `roundAt` to 0\n for (let j = roundAt; j < digits.length; j++) {\n digits[j] = 0;\n }\n }\n else {\n // We rounded to zero so reset the parsedNumber\n fractionLen = Math.max(0, fractionLen);\n parsedNumber.integerLen = 1;\n digits.length = Math.max(1, roundAt = fractionSize + 1);\n digits[0] = 0;\n for (let i = 1; i < roundAt; i++)\n digits[i] = 0;\n }\n if (digit >= 5) {\n if (roundAt - 1 < 0) {\n for (let k = 0; k > roundAt; k--) {\n digits.unshift(0);\n parsedNumber.integerLen++;\n }\n digits.unshift(1);\n parsedNumber.integerLen++;\n }\n else {\n digits[roundAt - 1]++;\n }\n }\n // Pad out with zeros to get the required fraction length\n for (; fractionLen < Math.max(0, fractionSize); fractionLen++)\n digits.push(0);\n let dropTrailingZeros = fractionSize !== 0;\n // Minimal length = nb of decimals required + current nb of integers\n // Any number besides that is optional and can be removed if it's a trailing 0\n const minLen = minFrac + parsedNumber.integerLen;\n // Do any carrying, e.g. a digit was rounded up to 10\n const carry = digits.reduceRight(function (carry, d, i, digits) {\n d = d + carry;\n digits[i] = d < 10 ? d : d - 10; // d % 10\n if (dropTrailingZeros) {\n // Do not keep meaningless fractional trailing zeros (e.g. 15.52000 --> 15.52)\n if (digits[i] === 0 && i >= minLen) {\n digits.pop();\n }\n else {\n dropTrailingZeros = false;\n }\n }\n return d >= 10 ? 1 : 0; // Math.floor(d / 10);\n }, 0);\n if (carry) {\n digits.unshift(carry);\n parsedNumber.integerLen++;\n }\n}\nfunction parseIntAutoRadix(text) {\n const result = parseInt(text);\n if (isNaN(result)) {\n throw new Error('Invalid integer literal when parsing ' + text);\n }\n return result;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @publicApi\n */\nclass NgLocalization {\n}\nNgLocalization.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgLocalization, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNgLocalization.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgLocalization, providedIn: 'root', useFactory: (locale) => new NgLocaleLocalization(locale), deps: [{ token: LOCALE_ID }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgLocalization, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root',\n useFactory: (locale) => new NgLocaleLocalization(locale),\n deps: [LOCALE_ID],\n }]\n }] });\n/**\n * Returns the plural category for a given value.\n * - \"=value\" when the case exists,\n * - the plural category otherwise\n */\nfunction getPluralCategory(value, cases, ngLocalization, locale) {\n let key = `=${value}`;\n if (cases.indexOf(key) > -1) {\n return key;\n }\n key = ngLocalization.getPluralCategory(value, locale);\n if (cases.indexOf(key) > -1) {\n return key;\n }\n if (cases.indexOf('other') > -1) {\n return 'other';\n }\n throw new Error(`No plural message found for value \"${value}\"`);\n}\n/**\n * Returns the plural case based on the locale\n *\n * @publicApi\n */\nclass NgLocaleLocalization extends NgLocalization {\n constructor(locale) {\n super();\n this.locale = locale;\n }\n getPluralCategory(value, locale) {\n const plural = getLocalePluralCase(locale || this.locale)(value);\n switch (plural) {\n case Plural.Zero:\n return 'zero';\n case Plural.One:\n return 'one';\n case Plural.Two:\n return 'two';\n case Plural.Few:\n return 'few';\n case Plural.Many:\n return 'many';\n default:\n return 'other';\n }\n }\n}\nNgLocaleLocalization.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgLocaleLocalization, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable });\nNgLocaleLocalization.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgLocaleLocalization });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgLocaleLocalization, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [LOCALE_ID]\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Register global data to be used internally by Angular. See the\n * [\"I18n guide\"](guide/i18n-common-format-data-locale) to know how to import additional locale\n * data.\n *\n * The signature registerLocaleData(data: any, extraData?: any) is deprecated since v5.1\n *\n * @publicApi\n */\nfunction registerLocaleData(data, localeId, extraData) {\n return ɵregisterLocaleData(data, localeId, extraData);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction parseCookieValue(cookieStr, name) {\n name = encodeURIComponent(name);\n for (const cookie of cookieStr.split(';')) {\n const eqIndex = cookie.indexOf('=');\n const [cookieName, cookieValue] = eqIndex == -1 ? [cookie, ''] : [cookie.slice(0, eqIndex), cookie.slice(eqIndex + 1)];\n if (cookieName.trim() === name) {\n return decodeURIComponent(cookieValue);\n }\n }\n return null;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @ngModule CommonModule\n *\n * @usageNotes\n * ```\n * <some-element [ngClass]=\"'first second'\">...</some-element>\n *\n * <some-element [ngClass]=\"['first', 'second']\">...</some-element>\n *\n * <some-element [ngClass]=\"{'first': true, 'second': true, 'third': false}\">...</some-element>\n *\n * <some-element [ngClass]=\"stringExp|arrayExp|objExp\">...</some-element>\n *\n * <some-element [ngClass]=\"{'class1 class2 class3' : true}\">...</some-element>\n * ```\n *\n * @description\n *\n * Adds and removes CSS classes on an HTML element.\n *\n * The CSS classes are updated as follows, depending on the type of the expression evaluation:\n * - `string` - the CSS classes listed in the string (space delimited) are added,\n * - `Array` - the CSS classes declared as Array elements are added,\n * - `Object` - keys are CSS classes that get added when the expression given in the value\n * evaluates to a truthy value, otherwise they are removed.\n *\n * @publicApi\n */\nclass NgClass {\n constructor(_iterableDiffers, _keyValueDiffers, _ngEl, _renderer) {\n this._iterableDiffers = _iterableDiffers;\n this._keyValueDiffers = _keyValueDiffers;\n this._ngEl = _ngEl;\n this._renderer = _renderer;\n this._iterableDiffer = null;\n this._keyValueDiffer = null;\n this._initialClasses = [];\n this._rawClass = null;\n }\n set klass(value) {\n this._removeClasses(this._initialClasses);\n this._initialClasses = typeof value === 'string' ? value.split(/\\s+/) : [];\n this._applyClasses(this._initialClasses);\n this._applyClasses(this._rawClass);\n }\n set ngClass(value) {\n this._removeClasses(this._rawClass);\n this._applyClasses(this._initialClasses);\n this._iterableDiffer = null;\n this._keyValueDiffer = null;\n this._rawClass = typeof value === 'string' ? value.split(/\\s+/) : value;\n if (this._rawClass) {\n if (ɵisListLikeIterable(this._rawClass)) {\n this._iterableDiffer = this._iterableDiffers.find(this._rawClass).create();\n }\n else {\n this._keyValueDiffer = this._keyValueDiffers.find(this._rawClass).create();\n }\n }\n }\n ngDoCheck() {\n if (this._iterableDiffer) {\n const iterableChanges = this._iterableDiffer.diff(this._rawClass);\n if (iterableChanges) {\n this._applyIterableChanges(iterableChanges);\n }\n }\n else if (this._keyValueDiffer) {\n const keyValueChanges = this._keyValueDiffer.diff(this._rawClass);\n if (keyValueChanges) {\n this._applyKeyValueChanges(keyValueChanges);\n }\n }\n }\n _applyKeyValueChanges(changes) {\n changes.forEachAddedItem((record) => this._toggleClass(record.key, record.currentValue));\n changes.forEachChangedItem((record) => this._toggleClass(record.key, record.currentValue));\n changes.forEachRemovedItem((record) => {\n if (record.previousValue) {\n this._toggleClass(record.key, false);\n }\n });\n }\n _applyIterableChanges(changes) {\n changes.forEachAddedItem((record) => {\n if (typeof record.item === 'string') {\n this._toggleClass(record.item, true);\n }\n else {\n throw new Error(`NgClass can only toggle CSS classes expressed as strings, got ${ɵstringify(record.item)}`);\n }\n });\n changes.forEachRemovedItem((record) => this._toggleClass(record.item, false));\n }\n /**\n * Applies a collection of CSS classes to the DOM element.\n *\n * For argument of type Set and Array CSS class names contained in those collections are always\n * added.\n * For argument of type Map CSS class name in the map's key is toggled based on the value (added\n * for truthy and removed for falsy).\n */\n _applyClasses(rawClassVal) {\n if (rawClassVal) {\n if (Array.isArray(rawClassVal) || rawClassVal instanceof Set) {\n rawClassVal.forEach((klass) => this._toggleClass(klass, true));\n }\n else {\n Object.keys(rawClassVal).forEach(klass => this._toggleClass(klass, !!rawClassVal[klass]));\n }\n }\n }\n /**\n * Removes a collection of CSS classes from the DOM element. This is mostly useful for cleanup\n * purposes.\n */\n _removeClasses(rawClassVal) {\n if (rawClassVal) {\n if (Array.isArray(rawClassVal) || rawClassVal instanceof Set) {\n rawClassVal.forEach((klass) => this._toggleClass(klass, false));\n }\n else {\n Object.keys(rawClassVal).forEach(klass => this._toggleClass(klass, false));\n }\n }\n }\n _toggleClass(klass, enabled) {\n klass = klass.trim();\n if (klass) {\n klass.split(/\\s+/g).forEach(klass => {\n if (enabled) {\n this._renderer.addClass(this._ngEl.nativeElement, klass);\n }\n else {\n this._renderer.removeClass(this._ngEl.nativeElement, klass);\n }\n });\n }\n }\n}\nNgClass.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgClass, deps: [{ token: i0.IterableDiffers }, { token: i0.KeyValueDiffers }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });\nNgClass.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: NgClass, isStandalone: true, selector: \"[ngClass]\", inputs: { klass: [\"class\", \"klass\"], ngClass: \"ngClass\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgClass, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngClass]',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: i0.IterableDiffers }, { type: i0.KeyValueDiffers }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { klass: [{\n type: Input,\n args: ['class']\n }], ngClass: [{\n type: Input,\n args: ['ngClass']\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Instantiates a {@link Component} type and inserts its Host View into the current View.\n * `NgComponentOutlet` provides a declarative approach for dynamic component creation.\n *\n * `NgComponentOutlet` requires a component type, if a falsy value is set the view will clear and\n * any existing component will be destroyed.\n *\n * @usageNotes\n *\n * ### Fine tune control\n *\n * You can control the component creation process by using the following optional attributes:\n *\n * * `ngComponentOutletInjector`: Optional custom {@link Injector} that will be used as parent for\n * the Component. Defaults to the injector of the current view container.\n *\n * * `ngComponentOutletContent`: Optional list of projectable nodes to insert into the content\n * section of the component, if it exists.\n *\n * * `ngComponentOutletNgModule`: Optional NgModule class reference to allow loading another\n * module dynamically, then loading a component from that module.\n *\n * * `ngComponentOutletNgModuleFactory`: Deprecated config option that allows providing optional\n * NgModule factory to allow loading another module dynamically, then loading a component from that\n * module. Use `ngComponentOutletNgModule` instead.\n *\n * ### Syntax\n *\n * Simple\n * ```\n * <ng-container *ngComponentOutlet=\"componentTypeExpression\"></ng-container>\n * ```\n *\n * Customized injector/content\n * ```\n * <ng-container *ngComponentOutlet=\"componentTypeExpression;\n * injector: injectorExpression;\n * content: contentNodesExpression;\">\n * </ng-container>\n * ```\n *\n * Customized NgModule reference\n * ```\n * <ng-container *ngComponentOutlet=\"componentTypeExpression;\n * ngModule: ngModuleClass;\">\n * </ng-container>\n * ```\n *\n * ### A simple example\n *\n * {@example common/ngComponentOutlet/ts/module.ts region='SimpleExample'}\n *\n * A more complete example with additional options:\n *\n * {@example common/ngComponentOutlet/ts/module.ts region='CompleteExample'}\n *\n * @publicApi\n * @ngModule CommonModule\n */\nclass NgComponentOutlet {\n constructor(_viewContainerRef) {\n this._viewContainerRef = _viewContainerRef;\n this.ngComponentOutlet = null;\n }\n /** @nodoc */\n ngOnChanges(changes) {\n const { _viewContainerRef: viewContainerRef, ngComponentOutletNgModule: ngModule, ngComponentOutletNgModuleFactory: ngModuleFactory, } = this;\n viewContainerRef.clear();\n this._componentRef = undefined;\n if (this.ngComponentOutlet) {\n const injector = this.ngComponentOutletInjector || viewContainerRef.parentInjector;\n if (changes['ngComponentOutletNgModule'] || changes['ngComponentOutletNgModuleFactory']) {\n if (this._moduleRef)\n this._moduleRef.destroy();\n if (ngModule) {\n this._moduleRef = createNgModule(ngModule, getParentInjector(injector));\n }\n else if (ngModuleFactory) {\n this._moduleRef = ngModuleFactory.create(getParentInjector(injector));\n }\n else {\n this._moduleRef = undefined;\n }\n }\n this._componentRef = viewContainerRef.createComponent(this.ngComponentOutlet, {\n index: viewContainerRef.length,\n injector,\n ngModuleRef: this._moduleRef,\n projectableNodes: this.ngComponentOutletContent,\n });\n }\n }\n /** @nodoc */\n ngOnDestroy() {\n if (this._moduleRef)\n this._moduleRef.destroy();\n }\n}\nNgComponentOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgComponentOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgComponentOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: NgComponentOutlet, isStandalone: true, selector: \"[ngComponentOutlet]\", inputs: { ngComponentOutlet: \"ngComponentOutlet\", ngComponentOutletInjector: \"ngComponentOutletInjector\", ngComponentOutletContent: \"ngComponentOutletContent\", ngComponentOutletNgModule: \"ngComponentOutletNgModule\", ngComponentOutletNgModuleFactory: \"ngComponentOutletNgModuleFactory\" }, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgComponentOutlet, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngComponentOutlet]',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { ngComponentOutlet: [{\n type: Input\n }], ngComponentOutletInjector: [{\n type: Input\n }], ngComponentOutletContent: [{\n type: Input\n }], ngComponentOutletNgModule: [{\n type: Input\n }], ngComponentOutletNgModuleFactory: [{\n type: Input\n }] } });\n// Helper function that returns an Injector instance of a parent NgModule.\nfunction getParentInjector(injector) {\n const parentNgModule = injector.get(NgModuleRef);\n return parentNgModule.injector;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst NG_DEV_MODE = typeof ngDevMode === 'undefined' || !!ngDevMode;\n/**\n * @publicApi\n */\nclass NgForOfContext {\n constructor($implicit, ngForOf, index, count) {\n this.$implicit = $implicit;\n this.ngForOf = ngForOf;\n this.index = index;\n this.count = count;\n }\n get first() {\n return this.index === 0;\n }\n get last() {\n return this.index === this.count - 1;\n }\n get even() {\n return this.index % 2 === 0;\n }\n get odd() {\n return !this.even;\n }\n}\n/**\n * A [structural directive](guide/structural-directives) that renders\n * a template for each item in a collection.\n * The directive is placed on an element, which becomes the parent\n * of the cloned templates.\n *\n * The `ngForOf` directive is generally used in the\n * [shorthand form](guide/structural-directives#asterisk) `*ngFor`.\n * In this form, the template to be rendered for each iteration is the content\n * of an anchor element containing the directive.\n *\n * The following example shows the shorthand syntax with some options,\n * contained in an `<li>` element.\n *\n * ```\n * <li *ngFor=\"let item of items; index as i; trackBy: trackByFn\">...</li>\n * ```\n *\n * The shorthand form expands into a long form that uses the `ngForOf` selector\n * on an `<ng-template>` element.\n * The content of the `<ng-template>` element is the `<li>` element that held the\n * short-form directive.\n *\n * Here is the expanded version of the short-form example.\n *\n * ```\n * <ng-template ngFor let-item [ngForOf]=\"items\" let-i=\"index\" [ngForTrackBy]=\"trackByFn\">\n * <li>...</li>\n * </ng-template>\n * ```\n *\n * Angular automatically expands the shorthand syntax as it compiles the template.\n * The context for each embedded view is logically merged to the current component\n * context according to its lexical position.\n *\n * When using the shorthand syntax, Angular allows only [one structural directive\n * on an element](guide/structural-directives#one-per-element).\n * If you want to iterate conditionally, for example,\n * put the `*ngIf` on a container element that wraps the `*ngFor` element.\n * For further discussion, see\n * [Structural Directives](guide/structural-directives#one-per-element).\n *\n * @usageNotes\n *\n * ### Local variables\n *\n * `NgForOf` provides exported values that can be aliased to local variables.\n * For example:\n *\n * ```\n * <li *ngFor=\"let user of users; index as i; first as isFirst\">\n * {{i}}/{{users.length}}. {{user}} <span *ngIf=\"isFirst\">default</span>\n * </li>\n * ```\n *\n * The following exported values can be aliased to local variables:\n *\n * - `$implicit: T`: The value of the individual items in the iterable (`ngForOf`).\n * - `ngForOf: NgIterable<T>`: The value of the iterable expression. Useful when the expression is\n * more complex then a property access, for example when using the async pipe (`userStreams |\n * async`).\n * - `index: number`: The index of the current item in the iterable.\n * - `count: number`: The length of the iterable.\n * - `first: boolean`: True when the item is the first item in the iterable.\n * - `last: boolean`: True when the item is the last item in the iterable.\n * - `even: boolean`: True when the item has an even index in the iterable.\n * - `odd: boolean`: True when the item has an odd index in the iterable.\n *\n * ### Change propagation\n *\n * When the contents of the iterator changes, `NgForOf` makes the corresponding changes to the DOM:\n *\n * * When an item is added, a new instance of the template is added to the DOM.\n * * When an item is removed, its template instance is removed from the DOM.\n * * When items are reordered, their respective templates are reordered in the DOM.\n *\n * Angular uses object identity to track insertions and deletions within the iterator and reproduce\n * those changes in the DOM. This has important implications for animations and any stateful\n * controls that are present, such as `<input>` elements that accept user input. Inserted rows can\n * be animated in, deleted rows can be animated out, and unchanged rows retain any unsaved state\n * such as user input.\n * For more on animations, see [Transitions and Triggers](guide/transition-and-triggers).\n *\n * The identities of elements in the iterator can change while the data does not.\n * This can happen, for example, if the iterator is produced from an RPC to the server, and that\n * RPC is re-run. Even if the data hasn't changed, the second response produces objects with\n * different identities, and Angular must tear down the entire DOM and rebuild it (as if all old\n * elements were deleted and all new elements inserted).\n *\n * To avoid this expensive operation, you can customize the default tracking algorithm.\n * by supplying the `trackBy` option to `NgForOf`.\n * `trackBy` takes a function that has two arguments: `index` and `item`.\n * If `trackBy` is given, Angular tracks changes by the return value of the function.\n *\n * @see [Structural Directives](guide/structural-directives)\n * @ngModule CommonModule\n * @publicApi\n */\nclass NgForOf {\n constructor(_viewContainer, _template, _differs) {\n this._viewContainer = _viewContainer;\n this._template = _template;\n this._differs = _differs;\n this._ngForOf = null;\n this._ngForOfDirty = true;\n this._differ = null;\n }\n /**\n * The value of the iterable expression, which can be used as a\n * [template input variable](guide/structural-directives#shorthand).\n */\n set ngForOf(ngForOf) {\n this._ngForOf = ngForOf;\n this._ngForOfDirty = true;\n }\n /**\n * Specifies a custom `TrackByFunction` to compute the identity of items in an iterable.\n *\n * If a custom `TrackByFunction` is not provided, `NgForOf` will use the item's [object\n * identity](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is)\n * as the key.\n *\n * `NgForOf` uses the computed key to associate items in an iterable with DOM elements\n * it produces for these items.\n *\n * A custom `TrackByFunction` is useful to provide good user experience in cases when items in an\n * iterable rendered using `NgForOf` have a natural identifier (for example, custom ID or a\n * primary key), and this iterable could be updated with new object instances that still\n * represent the same underlying entity (for example, when data is re-fetched from the server,\n * and the iterable is recreated and re-rendered, but most of the data is still the same).\n *\n * @see `TrackByFunction`\n */\n set ngForTrackBy(fn) {\n if (NG_DEV_MODE && fn != null && typeof fn !== 'function') {\n // TODO(vicb): use a log service once there is a public one available\n if (console && console.warn) {\n console.warn(`trackBy must be a function, but received ${JSON.stringify(fn)}. ` +\n `See https://angular.io/api/common/NgForOf#change-propagation for more information.`);\n }\n }\n this._trackByFn = fn;\n }\n get ngForTrackBy() {\n return this._trackByFn;\n }\n /**\n * A reference to the template that is stamped out for each item in the iterable.\n * @see [template reference variable](guide/template-reference-variables)\n */\n set ngForTemplate(value) {\n // TODO(TS2.1): make TemplateRef<Partial<NgForRowOf<T>>> once we move to TS v2.1\n // The current type is too restrictive; a template that just uses index, for example,\n // should be acceptable.\n if (value) {\n this._template = value;\n }\n }\n /**\n * Applies the changes when needed.\n * @nodoc\n */\n ngDoCheck() {\n if (this._ngForOfDirty) {\n this._ngForOfDirty = false;\n // React on ngForOf changes only once all inputs have been initialized\n const value = this._ngForOf;\n if (!this._differ && value) {\n if (NG_DEV_MODE) {\n try {\n // CAUTION: this logic is duplicated for production mode below, as the try-catch\n // is only present in development builds.\n this._differ = this._differs.find(value).create(this.ngForTrackBy);\n }\n catch {\n let errorMessage = `Cannot find a differ supporting object '${value}' of type '` +\n `${getTypeName(value)}'. NgFor only supports binding to Iterables, such as Arrays.`;\n if (typeof value === 'object') {\n errorMessage += ' Did you mean to use the keyvalue pipe?';\n }\n throw new ɵRuntimeError(-2200 /* RuntimeErrorCode.NG_FOR_MISSING_DIFFER */, errorMessage);\n }\n }\n else {\n // CAUTION: this logic is duplicated for development mode above, as the try-catch\n // is only present in development builds.\n this._differ = this._differs.find(value).create(this.ngForTrackBy);\n }\n }\n }\n if (this._differ) {\n const changes = this._differ.diff(this._ngForOf);\n if (changes)\n this._applyChanges(changes);\n }\n }\n _applyChanges(changes) {\n const viewContainer = this._viewContainer;\n changes.forEachOperation((item, adjustedPreviousIndex, currentIndex) => {\n if (item.previousIndex == null) {\n // NgForOf is never \"null\" or \"undefined\" here because the differ detected\n // that a new item needs to be inserted from the iterable. This implies that\n // there is an iterable value for \"_ngForOf\".\n viewContainer.createEmbeddedView(this._template, new NgForOfContext(item.item, this._ngForOf, -1, -1), currentIndex === null ? undefined : currentIndex);\n }\n else if (currentIndex == null) {\n viewContainer.remove(adjustedPreviousIndex === null ? undefined : adjustedPreviousIndex);\n }\n else if (adjustedPreviousIndex !== null) {\n const view = viewContainer.get(adjustedPreviousIndex);\n viewContainer.move(view, currentIndex);\n applyViewChange(view, item);\n }\n });\n for (let i = 0, ilen = viewContainer.length; i < ilen; i++) {\n const viewRef = viewContainer.get(i);\n const context = viewRef.context;\n context.index = i;\n context.count = ilen;\n context.ngForOf = this._ngForOf;\n }\n changes.forEachIdentityChange((record) => {\n const viewRef = viewContainer.get(record.currentIndex);\n applyViewChange(viewRef, record);\n });\n }\n /**\n * Asserts the correct type of the context for the template that `NgForOf` will render.\n *\n * The presence of this method is a signal to the Ivy template type-check compiler that the\n * `NgForOf` structural directive renders its template with a specific context type.\n */\n static ngTemplateContextGuard(dir, ctx) {\n return true;\n }\n}\nNgForOf.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgForOf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Directive });\nNgForOf.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: NgForOf, isStandalone: true, selector: \"[ngFor][ngForOf]\", inputs: { ngForOf: \"ngForOf\", ngForTrackBy: \"ngForTrackBy\", ngForTemplate: \"ngForTemplate\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgForOf, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngFor][ngForOf]',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }, { type: i0.IterableDiffers }]; }, propDecorators: { ngForOf: [{\n type: Input\n }], ngForTrackBy: [{\n type: Input\n }], ngForTemplate: [{\n type: Input\n }] } });\nfunction applyViewChange(view, record) {\n view.context.$implicit = record.item;\n}\nfunction getTypeName(type) {\n return type['name'] || typeof type;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A structural directive that conditionally includes a template based on the value of\n * an expression coerced to Boolean.\n * When the expression evaluates to true, Angular renders the template\n * provided in a `then` clause, and when false or null,\n * Angular renders the template provided in an optional `else` clause. The default\n * template for the `else` clause is blank.\n *\n * A [shorthand form](guide/structural-directives#asterisk) of the directive,\n * `*ngIf=\"condition\"`, is generally used, provided\n * as an attribute of the anchor element for the inserted template.\n * Angular expands this into a more explicit version, in which the anchor element\n * is contained in an `<ng-template>` element.\n *\n * Simple form with shorthand syntax:\n *\n * ```\n * <div *ngIf=\"condition\">Content to render when condition is true.</div>\n * ```\n *\n * Simple form with expanded syntax:\n *\n * ```\n * <ng-template [ngIf]=\"condition\"><div>Content to render when condition is\n * true.</div></ng-template>\n * ```\n *\n * Form with an \"else\" block:\n *\n * ```\n * <div *ngIf=\"condition; else elseBlock\">Content to render when condition is true.</div>\n * <ng-template #elseBlock>Content to render when condition is false.</ng-template>\n * ```\n *\n * Shorthand form with \"then\" and \"else\" blocks:\n *\n * ```\n * <div *ngIf=\"condition; then thenBlock else elseBlock\"></div>\n * <ng-template #thenBlock>Content to render when condition is true.</ng-template>\n * <ng-template #elseBlock>Content to render when condition is false.</ng-template>\n * ```\n *\n * Form with storing the value locally:\n *\n * ```\n * <div *ngIf=\"condition as value; else elseBlock\">{{value}}</div>\n * <ng-template #elseBlock>Content to render when value is null.</ng-template>\n * ```\n *\n * @usageNotes\n *\n * The `*ngIf` directive is most commonly used to conditionally show an inline template,\n * as seen in the following example.\n * The default `else` template is blank.\n *\n * {@example common/ngIf/ts/module.ts region='NgIfSimple'}\n *\n * ### Showing an alternative template using `else`\n *\n * To display a template when `expression` evaluates to false, use an `else` template\n * binding as shown in the following example.\n * The `else` binding points to an `<ng-template>` element labeled `#elseBlock`.\n * The template can be defined anywhere in the component view, but is typically placed right after\n * `ngIf` for readability.\n *\n * {@example common/ngIf/ts/module.ts region='NgIfElse'}\n *\n * ### Using an external `then` template\n *\n * In the previous example, the then-clause template is specified inline, as the content of the\n * tag that contains the `ngIf` directive. You can also specify a template that is defined\n * externally, by referencing a labeled `<ng-template>` element. When you do this, you can\n * change which template to use at runtime, as shown in the following example.\n *\n * {@example common/ngIf/ts/module.ts region='NgIfThenElse'}\n *\n * ### Storing a conditional result in a variable\n *\n * You might want to show a set of properties from the same object. If you are waiting\n * for asynchronous data, the object can be undefined.\n * In this case, you can use `ngIf` and store the result of the condition in a local\n * variable as shown in the following example.\n *\n * {@example common/ngIf/ts/module.ts region='NgIfAs'}\n *\n * This code uses only one `AsyncPipe`, so only one subscription is created.\n * The conditional statement stores the result of `userStream|async` in the local variable `user`.\n * You can then bind the local `user` repeatedly.\n *\n * The conditional displays the data only if `userStream` returns a value,\n * so you don't need to use the\n * safe-navigation-operator (`?.`)\n * to guard against null values when accessing properties.\n * You can display an alternative template while waiting for the data.\n *\n * ### Shorthand syntax\n *\n * The shorthand syntax `*ngIf` expands into two separate template specifications\n * for the \"then\" and \"else\" clauses. For example, consider the following shorthand statement,\n * that is meant to show a loading page while waiting for data to be loaded.\n *\n * ```\n * <div class=\"hero-list\" *ngIf=\"heroes else loading\">\n * ...\n * </div>\n *\n * <ng-template #loading>\n * <div>Loading...</div>\n * </ng-template>\n * ```\n *\n * You can see that the \"else\" clause references the `<ng-template>`\n * with the `#loading` label, and the template for the \"then\" clause\n * is provided as the content of the anchor element.\n *\n * However, when Angular expands the shorthand syntax, it creates\n * another `<ng-template>` tag, with `ngIf` and `ngIfElse` directives.\n * The anchor element containing the template for the \"then\" clause becomes\n * the content of this unlabeled `<ng-template>` tag.\n *\n * ```\n * <ng-template [ngIf]=\"heroes\" [ngIfElse]=\"loading\">\n * <div class=\"hero-list\">\n * ...\n * </div>\n * </ng-template>\n *\n * <ng-template #loading>\n * <div>Loading...</div>\n * </ng-template>\n * ```\n *\n * The presence of the implicit template object has implications for the nesting of\n * structural directives. For more on this subject, see\n * [Structural Directives](guide/structural-directives#one-per-element).\n *\n * @ngModule CommonModule\n * @publicApi\n */\nclass NgIf {\n constructor(_viewContainer, templateRef) {\n this._viewContainer = _viewContainer;\n this._context = new NgIfContext();\n this._thenTemplateRef = null;\n this._elseTemplateRef = null;\n this._thenViewRef = null;\n this._elseViewRef = null;\n this._thenTemplateRef = templateRef;\n }\n /**\n * The Boolean expression to evaluate as the condition for showing a template.\n */\n set ngIf(condition) {\n this._context.$implicit = this._context.ngIf = condition;\n this._updateView();\n }\n /**\n * A template to show if the condition expression evaluates to true.\n */\n set ngIfThen(templateRef) {\n assertTemplate('ngIfThen', templateRef);\n this._thenTemplateRef = templateRef;\n this._thenViewRef = null; // clear previous view if any.\n this._updateView();\n }\n /**\n * A template to show if the condition expression evaluates to false.\n */\n set ngIfElse(templateRef) {\n assertTemplate('ngIfElse', templateRef);\n this._elseTemplateRef = templateRef;\n this._elseViewRef = null; // clear previous view if any.\n this._updateView();\n }\n _updateView() {\n if (this._context.$implicit) {\n if (!this._thenViewRef) {\n this._viewContainer.clear();\n this._elseViewRef = null;\n if (this._thenTemplateRef) {\n this._thenViewRef =\n this._viewContainer.createEmbeddedView(this._thenTemplateRef, this._context);\n }\n }\n }\n else {\n if (!this._elseViewRef) {\n this._viewContainer.clear();\n this._thenViewRef = null;\n if (this._elseTemplateRef) {\n this._elseViewRef =\n this._viewContainer.createEmbeddedView(this._elseTemplateRef, this._context);\n }\n }\n }\n }\n /**\n * Asserts the correct type of the context for the template that `NgIf` will render.\n *\n * The presence of this method is a signal to the Ivy template type-check compiler that the\n * `NgIf` structural directive renders its template with a specific context type.\n */\n static ngTemplateContextGuard(dir, ctx) {\n return true;\n }\n}\nNgIf.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgIf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgIf.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: NgIf, isStandalone: true, selector: \"[ngIf]\", inputs: { ngIf: \"ngIf\", ngIfThen: \"ngIfThen\", ngIfElse: \"ngIfElse\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgIf, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngIf]',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }]; }, propDecorators: { ngIf: [{\n type: Input\n }], ngIfThen: [{\n type: Input\n }], ngIfElse: [{\n type: Input\n }] } });\n/**\n * @publicApi\n */\nclass NgIfContext {\n constructor() {\n this.$implicit = null;\n this.ngIf = null;\n }\n}\nfunction assertTemplate(property, templateRef) {\n const isTemplateRefOrNull = !!(!templateRef || templateRef.createEmbeddedView);\n if (!isTemplateRefOrNull) {\n throw new Error(`${property} must be a TemplateRef, but received '${ɵstringify(templateRef)}'.`);\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass SwitchView {\n constructor(_viewContainerRef, _templateRef) {\n this._viewContainerRef = _viewContainerRef;\n this._templateRef = _templateRef;\n this._created = false;\n }\n create() {\n this._created = true;\n this._viewContainerRef.createEmbeddedView(this._templateRef);\n }\n destroy() {\n this._created = false;\n this._viewContainerRef.clear();\n }\n enforceState(created) {\n if (created && !this._created) {\n this.create();\n }\n else if (!created && this._created) {\n this.destroy();\n }\n }\n}\n/**\n * @ngModule CommonModule\n *\n * @description\n * The `[ngSwitch]` directive on a container specifies an expression to match against.\n * The expressions to match are provided by `ngSwitchCase` directives on views within the container.\n * - Every view that matches is rendered.\n * - If there are no matches, a view with the `ngSwitchDefault` directive is rendered.\n * - Elements within the `[NgSwitch]` statement but outside of any `NgSwitchCase`\n * or `ngSwitchDefault` directive are preserved at the location.\n *\n * @usageNotes\n * Define a container element for the directive, and specify the switch expression\n * to match against as an attribute:\n *\n * ```\n * <container-element [ngSwitch]=\"switch_expression\">\n * ```\n *\n * Within the container, `*ngSwitchCase` statements specify the match expressions\n * as attributes. Include `*ngSwitchDefault` as the final case.\n *\n * ```\n * <container-element [ngSwitch]=\"switch_expression\">\n * <some-element *ngSwitchCase=\"match_expression_1\">...</some-element>\n * ...\n * <some-element *ngSwitchDefault>...</some-element>\n * </container-element>\n * ```\n *\n * ### Usage Examples\n *\n * The following example shows how to use more than one case to display the same view:\n *\n * ```\n * <container-element [ngSwitch]=\"switch_expression\">\n * <!-- the same view can be shown in more than one case -->\n * <some-element *ngSwitchCase=\"match_expression_1\">...</some-element>\n * <some-element *ngSwitchCase=\"match_expression_2\">...</some-element>\n * <some-other-element *ngSwitchCase=\"match_expression_3\">...</some-other-element>\n * <!--default case when there are no matches -->\n * <some-element *ngSwitchDefault>...</some-element>\n * </container-element>\n * ```\n *\n * The following example shows how cases can be nested:\n * ```\n * <container-element [ngSwitch]=\"switch_expression\">\n * <some-element *ngSwitchCase=\"match_expression_1\">...</some-element>\n * <some-element *ngSwitchCase=\"match_expression_2\">...</some-element>\n * <some-other-element *ngSwitchCase=\"match_expression_3\">...</some-other-element>\n * <ng-container *ngSwitchCase=\"match_expression_3\">\n * <!-- use a ng-container to group multiple root nodes -->\n * <inner-element></inner-element>\n * <inner-other-element></inner-other-element>\n * </ng-container>\n * <some-element *ngSwitchDefault>...</some-element>\n * </container-element>\n * ```\n *\n * @publicApi\n * @see `NgSwitchCase`\n * @see `NgSwitchDefault`\n * @see [Structural Directives](guide/structural-directives)\n *\n */\nclass NgSwitch {\n constructor() {\n this._defaultUsed = false;\n this._caseCount = 0;\n this._lastCaseCheckIndex = 0;\n this._lastCasesMatched = false;\n }\n set ngSwitch(newValue) {\n this._ngSwitch = newValue;\n if (this._caseCount === 0) {\n this._updateDefaultCases(true);\n }\n }\n /** @internal */\n _addCase() {\n return this._caseCount++;\n }\n /** @internal */\n _addDefault(view) {\n if (!this._defaultViews) {\n this._defaultViews = [];\n }\n this._defaultViews.push(view);\n }\n /** @internal */\n _matchCase(value) {\n const matched = value == this._ngSwitch;\n this._lastCasesMatched = this._lastCasesMatched || matched;\n this._lastCaseCheckIndex++;\n if (this._lastCaseCheckIndex === this._caseCount) {\n this._updateDefaultCases(!this._lastCasesMatched);\n this._lastCaseCheckIndex = 0;\n this._lastCasesMatched = false;\n }\n return matched;\n }\n _updateDefaultCases(useDefault) {\n if (this._defaultViews && useDefault !== this._defaultUsed) {\n this._defaultUsed = useDefault;\n for (let i = 0; i < this._defaultViews.length; i++) {\n const defaultView = this._defaultViews[i];\n defaultView.enforceState(useDefault);\n }\n }\n }\n}\nNgSwitch.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgSwitch, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nNgSwitch.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: NgSwitch, isStandalone: true, selector: \"[ngSwitch]\", inputs: { ngSwitch: \"ngSwitch\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgSwitch, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngSwitch]',\n standalone: true,\n }]\n }], propDecorators: { ngSwitch: [{\n type: Input\n }] } });\n/**\n * @ngModule CommonModule\n *\n * @description\n * Provides a switch case expression to match against an enclosing `ngSwitch` expression.\n * When the expressions match, the given `NgSwitchCase` template is rendered.\n * If multiple match expressions match the switch expression value, all of them are displayed.\n *\n * @usageNotes\n *\n * Within a switch container, `*ngSwitchCase` statements specify the match expressions\n * as attributes. Include `*ngSwitchDefault` as the final case.\n *\n * ```\n * <container-element [ngSwitch]=\"switch_expression\">\n * <some-element *ngSwitchCase=\"match_expression_1\">...</some-element>\n * ...\n * <some-element *ngSwitchDefault>...</some-element>\n * </container-element>\n * ```\n *\n * Each switch-case statement contains an in-line HTML template or template reference\n * that defines the subtree to be selected if the value of the match expression\n * matches the value of the switch expression.\n *\n * Unlike JavaScript, which uses strict equality, Angular uses loose equality.\n * This means that the empty string, `\"\"` matches 0.\n *\n * @publicApi\n * @see `NgSwitch`\n * @see `NgSwitchDefault`\n *\n */\nclass NgSwitchCase {\n constructor(viewContainer, templateRef, ngSwitch) {\n this.ngSwitch = ngSwitch;\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && !ngSwitch) {\n throwNgSwitchProviderNotFoundError('ngSwitchCase', 'NgSwitchCase');\n }\n ngSwitch._addCase();\n this._view = new SwitchView(viewContainer, templateRef);\n }\n /**\n * Performs case matching. For internal use only.\n * @nodoc\n */\n ngDoCheck() {\n this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase));\n }\n}\nNgSwitchCase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgSwitchCase, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nNgSwitchCase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: NgSwitchCase, isStandalone: true, selector: \"[ngSwitchCase]\", inputs: { ngSwitchCase: \"ngSwitchCase\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgSwitchCase, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngSwitchCase]',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }, { type: NgSwitch, decorators: [{\n type: Optional\n }, {\n type: Host\n }] }]; }, propDecorators: { ngSwitchCase: [{\n type: Input\n }] } });\n/**\n * @ngModule CommonModule\n *\n * @description\n *\n * Creates a view that is rendered when no `NgSwitchCase` expressions\n * match the `NgSwitch` expression.\n * This statement should be the final case in an `NgSwitch`.\n *\n * @publicApi\n * @see `NgSwitch`\n * @see `NgSwitchCase`\n *\n */\nclass NgSwitchDefault {\n constructor(viewContainer, templateRef, ngSwitch) {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && !ngSwitch) {\n throwNgSwitchProviderNotFoundError('ngSwitchDefault', 'NgSwitchDefault');\n }\n ngSwitch._addDefault(new SwitchView(viewContainer, templateRef));\n }\n}\nNgSwitchDefault.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgSwitchDefault, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nNgSwitchDefault.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: NgSwitchDefault, isStandalone: true, selector: \"[ngSwitchDefault]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgSwitchDefault, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngSwitchDefault]',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }, { type: NgSwitch, decorators: [{\n type: Optional\n }, {\n type: Host\n }] }]; } });\nfunction throwNgSwitchProviderNotFoundError(attrName, directiveName) {\n throw new ɵRuntimeError(2000 /* RuntimeErrorCode.PARENT_NG_SWITCH_NOT_FOUND */, `An element with the \"${attrName}\" attribute ` +\n `(matching the \"${directiveName}\" directive) must be located inside an element with the \"ngSwitch\" attribute ` +\n `(matching \"NgSwitch\" directive)`);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @ngModule CommonModule\n *\n * @usageNotes\n * ```\n * <some-element [ngPlural]=\"value\">\n * <ng-template ngPluralCase=\"=0\">there is nothing</ng-template>\n * <ng-template ngPluralCase=\"=1\">there is one</ng-template>\n * <ng-template ngPluralCase=\"few\">there are a few</ng-template>\n * </some-element>\n * ```\n *\n * @description\n *\n * Adds / removes DOM sub-trees based on a numeric value. Tailored for pluralization.\n *\n * Displays DOM sub-trees that match the switch expression value, or failing that, DOM sub-trees\n * that match the switch expression's pluralization category.\n *\n * To use this directive you must provide a container element that sets the `[ngPlural]` attribute\n * to a switch expression. Inner elements with a `[ngPluralCase]` will display based on their\n * expression:\n * - if `[ngPluralCase]` is set to a value starting with `=`, it will only display if the value\n * matches the switch expression exactly,\n * - otherwise, the view will be treated as a \"category match\", and will only display if exact\n * value matches aren't found and the value maps to its category for the defined locale.\n *\n * See http://cldr.unicode.org/index/cldr-spec/plural-rules\n *\n * @publicApi\n */\nclass NgPlural {\n constructor(_localization) {\n this._localization = _localization;\n this._caseViews = {};\n }\n set ngPlural(value) {\n this._switchValue = value;\n this._updateView();\n }\n addCase(value, switchView) {\n this._caseViews[value] = switchView;\n }\n _updateView() {\n this._clearViews();\n const cases = Object.keys(this._caseViews);\n const key = getPluralCategory(this._switchValue, cases, this._localization);\n this._activateView(this._caseViews[key]);\n }\n _clearViews() {\n if (this._activeView)\n this._activeView.destroy();\n }\n _activateView(view) {\n if (view) {\n this._activeView = view;\n this._activeView.create();\n }\n }\n}\nNgPlural.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgPlural, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Directive });\nNgPlural.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: NgPlural, isStandalone: true, selector: \"[ngPlural]\", inputs: { ngPlural: \"ngPlural\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgPlural, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngPlural]',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: NgLocalization }]; }, propDecorators: { ngPlural: [{\n type: Input\n }] } });\n/**\n * @ngModule CommonModule\n *\n * @description\n *\n * Creates a view that will be added/removed from the parent {@link NgPlural} when the\n * given expression matches the plural expression according to CLDR rules.\n *\n * @usageNotes\n * ```\n * <some-element [ngPlural]=\"value\">\n * <ng-template ngPluralCase=\"=0\">...</ng-template>\n * <ng-template ngPluralCase=\"other\">...</ng-template>\n * </some-element>\n *```\n *\n * See {@link NgPlural} for more details and example.\n *\n * @publicApi\n */\nclass NgPluralCase {\n constructor(value, template, viewContainer, ngPlural) {\n this.value = value;\n const isANumber = !isNaN(Number(value));\n ngPlural.addCase(isANumber ? `=${value}` : value, new SwitchView(viewContainer, template));\n }\n}\nNgPluralCase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgPluralCase, deps: [{ token: 'ngPluralCase', attribute: true }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: NgPlural, host: true }], target: i0.ɵɵFactoryTarget.Directive });\nNgPluralCase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: NgPluralCase, isStandalone: true, selector: \"[ngPluralCase]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgPluralCase, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngPluralCase]',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Attribute,\n args: ['ngPluralCase']\n }] }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: NgPlural, decorators: [{\n type: Host\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @ngModule CommonModule\n *\n * @usageNotes\n *\n * Set the font of the containing element to the result of an expression.\n *\n * ```\n * <some-element [ngStyle]=\"{'font-style': styleExp}\">...</some-element>\n * ```\n *\n * Set the width of the containing element to a pixel value returned by an expression.\n *\n * ```\n * <some-element [ngStyle]=\"{'max-width.px': widthExp}\">...</some-element>\n * ```\n *\n * Set a collection of style values using an expression that returns key-value pairs.\n *\n * ```\n * <some-element [ngStyle]=\"objExp\">...</some-element>\n * ```\n *\n * @description\n *\n * An attribute directive that updates styles for the containing HTML element.\n * Sets one or more style properties, specified as colon-separated key-value pairs.\n * The key is a style name, with an optional `.<unit>` suffix\n * (such as 'top.px', 'font-style.em').\n * The value is an expression to be evaluated.\n * The resulting non-null value, expressed in the given unit,\n * is assigned to the given style property.\n * If the result of evaluation is null, the corresponding style is removed.\n *\n * @publicApi\n */\nclass NgStyle {\n constructor(_ngEl, _differs, _renderer) {\n this._ngEl = _ngEl;\n this._differs = _differs;\n this._renderer = _renderer;\n this._ngStyle = null;\n this._differ = null;\n }\n set ngStyle(values) {\n this._ngStyle = values;\n if (!this._differ && values) {\n this._differ = this._differs.find(values).create();\n }\n }\n ngDoCheck() {\n if (this._differ) {\n const changes = this._differ.diff(this._ngStyle);\n if (changes) {\n this._applyChanges(changes);\n }\n }\n }\n _setStyle(nameAndUnit, value) {\n const [name, unit] = nameAndUnit.split('.');\n const flags = name.indexOf('-') === -1 ? undefined : RendererStyleFlags2.DashCase;\n if (value != null) {\n this._renderer.setStyle(this._ngEl.nativeElement, name, unit ? `${value}${unit}` : value, flags);\n }\n else {\n this._renderer.removeStyle(this._ngEl.nativeElement, name, flags);\n }\n }\n _applyChanges(changes) {\n changes.forEachRemovedItem((record) => this._setStyle(record.key, null));\n changes.forEachAddedItem((record) => this._setStyle(record.key, record.currentValue));\n changes.forEachChangedItem((record) => this._setStyle(record.key, record.currentValue));\n }\n}\nNgStyle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgStyle, deps: [{ token: i0.ElementRef }, { token: i0.KeyValueDiffers }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });\nNgStyle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: NgStyle, isStandalone: true, selector: \"[ngStyle]\", inputs: { ngStyle: \"ngStyle\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgStyle, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngStyle]',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.KeyValueDiffers }, { type: i0.Renderer2 }]; }, propDecorators: { ngStyle: [{\n type: Input,\n args: ['ngStyle']\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @ngModule CommonModule\n *\n * @description\n *\n * Inserts an embedded view from a prepared `TemplateRef`.\n *\n * You can attach a context object to the `EmbeddedViewRef` by setting `[ngTemplateOutletContext]`.\n * `[ngTemplateOutletContext]` should be an object, the object's keys will be available for binding\n * by the local template `let` declarations.\n *\n * @usageNotes\n * ```\n * <ng-container *ngTemplateOutlet=\"templateRefExp; context: contextExp\"></ng-container>\n * ```\n *\n * Using the key `$implicit` in the context object will set its value as default.\n *\n * ### Example\n *\n * {@example common/ngTemplateOutlet/ts/module.ts region='NgTemplateOutlet'}\n *\n * @publicApi\n */\nclass NgTemplateOutlet {\n constructor(_viewContainerRef) {\n this._viewContainerRef = _viewContainerRef;\n this._viewRef = null;\n /**\n * A context object to attach to the {@link EmbeddedViewRef}. This should be an\n * object, the object's keys will be available for binding by the local template `let`\n * declarations.\n * Using the key `$implicit` in the context object will set its value as default.\n */\n this.ngTemplateOutletContext = null;\n /**\n * A string defining the template reference and optionally the context object for the template.\n */\n this.ngTemplateOutlet = null;\n /** Injector to be used within the embedded view. */\n this.ngTemplateOutletInjector = null;\n }\n /** @nodoc */\n ngOnChanges(changes) {\n if (changes['ngTemplateOutlet'] || changes['ngTemplateOutletInjector']) {\n const viewContainerRef = this._viewContainerRef;\n if (this._viewRef) {\n viewContainerRef.remove(viewContainerRef.indexOf(this._viewRef));\n }\n if (this.ngTemplateOutlet) {\n const { ngTemplateOutlet: template, ngTemplateOutletContext: context, ngTemplateOutletInjector: injector } = this;\n this._viewRef = viewContainerRef.createEmbeddedView(template, context, injector ? { injector } : undefined);\n }\n else {\n this._viewRef = null;\n }\n }\n else if (this._viewRef && changes['ngTemplateOutletContext'] && this.ngTemplateOutletContext) {\n this._viewRef.context = this.ngTemplateOutletContext;\n }\n }\n}\nNgTemplateOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgTemplateOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgTemplateOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: NgTemplateOutlet, isStandalone: true, selector: \"[ngTemplateOutlet]\", inputs: { ngTemplateOutletContext: \"ngTemplateOutletContext\", ngTemplateOutlet: \"ngTemplateOutlet\", ngTemplateOutletInjector: \"ngTemplateOutletInjector\" }, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgTemplateOutlet, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngTemplateOutlet]',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { ngTemplateOutletContext: [{\n type: Input\n }], ngTemplateOutlet: [{\n type: Input\n }], ngTemplateOutletInjector: [{\n type: Input\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A collection of Angular directives that are likely to be used in each and every Angular\n * application.\n */\nconst COMMON_DIRECTIVES = [\n NgClass,\n NgComponentOutlet,\n NgForOf,\n NgIf,\n NgTemplateOutlet,\n NgStyle,\n NgSwitch,\n NgSwitchCase,\n NgSwitchDefault,\n NgPlural,\n NgPluralCase,\n];\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction invalidPipeArgumentError(type, value) {\n return new ɵRuntimeError(2100 /* RuntimeErrorCode.INVALID_PIPE_ARGUMENT */, ngDevMode && `InvalidPipeArgument: '${value}' for pipe '${ɵstringify(type)}'`);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass SubscribableStrategy {\n createSubscription(async, updateLatestValue) {\n return async.subscribe({\n next: updateLatestValue,\n error: (e) => {\n throw e;\n }\n });\n }\n dispose(subscription) {\n subscription.unsubscribe();\n }\n}\nclass PromiseStrategy {\n createSubscription(async, updateLatestValue) {\n return async.then(updateLatestValue, e => {\n throw e;\n });\n }\n dispose(subscription) { }\n}\nconst _promiseStrategy = new PromiseStrategy();\nconst _subscribableStrategy = new SubscribableStrategy();\n/**\n * @ngModule CommonModule\n * @description\n *\n * Unwraps a value from an asynchronous primitive.\n *\n * The `async` pipe subscribes to an `Observable` or `Promise` and returns the latest value it has\n * emitted. When a new value is emitted, the `async` pipe marks the component to be checked for\n * changes. When the component gets destroyed, the `async` pipe unsubscribes automatically to avoid\n * potential memory leaks. When the reference of the expression changes, the `async` pipe\n * automatically unsubscribes from the old `Observable` or `Promise` and subscribes to the new one.\n *\n * @usageNotes\n *\n * ### Examples\n *\n * This example binds a `Promise` to the view. Clicking the `Resolve` button resolves the\n * promise.\n *\n * {@example common/pipes/ts/async_pipe.ts region='AsyncPipePromise'}\n *\n * It's also possible to use `async` with Observables. The example below binds the `time` Observable\n * to the view. The Observable continuously updates the view with the current time.\n *\n * {@example common/pipes/ts/async_pipe.ts region='AsyncPipeObservable'}\n *\n * @publicApi\n */\nclass AsyncPipe {\n constructor(ref) {\n this._latestValue = null;\n this._subscription = null;\n this._obj = null;\n this._strategy = null;\n // Assign `ref` into `this._ref` manually instead of declaring `_ref` in the constructor\n // parameter list, as the type of `this._ref` includes `null` unlike the type of `ref`.\n this._ref = ref;\n }\n ngOnDestroy() {\n if (this._subscription) {\n this._dispose();\n }\n // Clear the `ChangeDetectorRef` and its association with the view data, to mitigate\n // potential memory leaks in Observables that could otherwise cause the view data to\n // be retained.\n // https://github.com/angular/angular/issues/17624\n this._ref = null;\n }\n transform(obj) {\n if (!this._obj) {\n if (obj) {\n this._subscribe(obj);\n }\n return this._latestValue;\n }\n if (obj !== this._obj) {\n this._dispose();\n return this.transform(obj);\n }\n return this._latestValue;\n }\n _subscribe(obj) {\n this._obj = obj;\n this._strategy = this._selectStrategy(obj);\n this._subscription = this._strategy.createSubscription(obj, (value) => this._updateLatestValue(obj, value));\n }\n _selectStrategy(obj) {\n if (ɵisPromise(obj)) {\n return _promiseStrategy;\n }\n if (ɵisSubscribable(obj)) {\n return _subscribableStrategy;\n }\n throw invalidPipeArgumentError(AsyncPipe, obj);\n }\n _dispose() {\n // Note: `dispose` is only called if a subscription has been initialized before, indicating\n // that `this._strategy` is also available.\n this._strategy.dispose(this._subscription);\n this._latestValue = null;\n this._subscription = null;\n this._obj = null;\n }\n _updateLatestValue(async, value) {\n if (async === this._obj) {\n this._latestValue = value;\n // Note: `this._ref` is only cleared in `ngOnDestroy` so is known to be available when a\n // value is being updated.\n this._ref.markForCheck();\n }\n }\n}\nAsyncPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: AsyncPipe, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe });\nAsyncPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.0.4\", ngImport: i0, type: AsyncPipe, isStandalone: true, name: \"async\", pure: false });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: AsyncPipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'async',\n pure: false,\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Transforms text to all lower case.\n *\n * @see `UpperCasePipe`\n * @see `TitleCasePipe`\n * @usageNotes\n *\n * The following example defines a view that allows the user to enter\n * text, and then uses the pipe to convert the input text to all lower case.\n *\n * <code-example path=\"common/pipes/ts/lowerupper_pipe.ts\" region='LowerUpperPipe'></code-example>\n *\n * @ngModule CommonModule\n * @publicApi\n */\nclass LowerCasePipe {\n transform(value) {\n if (value == null)\n return null;\n if (typeof value !== 'string') {\n throw invalidPipeArgumentError(LowerCasePipe, value);\n }\n return value.toLowerCase();\n }\n}\nLowerCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: LowerCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nLowerCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.0.4\", ngImport: i0, type: LowerCasePipe, isStandalone: true, name: \"lowercase\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: LowerCasePipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'lowercase',\n standalone: true,\n }]\n }] });\n//\n// Regex below matches any Unicode word and number compatible with ES5. In ES2018 the same result\n// can be achieved by using /[0-9\\p{L}]\\S*/gu and also known as Unicode Property Escapes\n// (https://2ality.com/2017/07/regexp-unicode-property-escapes.html). Since there is no\n// transpilation of this functionality down to ES5 without external tool, the only solution is\n// to use already transpiled form. Example can be found here -\n// https://mothereff.in/regexpu#input=var+regex+%3D+%2F%5B0-9%5Cp%7BL%7D%5D%5CS*%2Fgu%3B%0A%0A&unicodePropertyEscape=1\n//\nconst unicodeWordMatch = /(?:[0-9A-Za-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u0870-\\u0887\\u0889-\\u088E\\u08A0-\\u08C9\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u09FC\\u0A05-\\u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u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16F1-\\u16F8\\u1700-\\u1711\\u171F-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1878\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4C\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5\\u1CF6\\u1CFA\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184\\u2C00-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3400-\\u4DBF\\u4E00-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7CA\\uA7D0\\uA7D1\\uA7D3\\uA7D5-\\uA7D9\\uA7F2-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA8FE\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42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\\uDC61\\uDC80-\\uDCAF\\uDCC4\\uDCC5\\uDCC7\\uDD80-\\uDDAE\\uDDD8-\\uDDDB\\uDE00-\\uDE2F\\uDE44\\uDE80-\\uDEAA\\uDEB8\\uDF00-\\uDF1A\\uDF40-\\uDF46]|\\uD806[\\uDC00-\\uDC2B\\uDCA0-\\uDCDF\\uDCFF-\\uDD06\\uDD09\\uDD0C-\\uDD13\\uDD15\\uDD16\\uDD18-\\uDD2F\\uDD3F\\uDD41\\uDDA0-\\uDDA7\\uDDAA-\\uDDD0\\uDDE1\\uDDE3\\uDE00\\uDE0B-\\uDE32\\uDE3A\\uDE50\\uDE5C-\\uDE89\\uDE9D\\uDEB0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC2E\\uDC40\\uDC72-\\uDC8F\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD30\\uDD46\\uDD60-\\uDD65\\uDD67\\uDD68\\uDD6A-\\uDD89\\uDD98\\uDEE0-\\uDEF2\\uDFB0]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC80-\\uDD43]|\\uD80B[\\uDF90-\\uDFF0]|[\\uD80C\\uD81C-\\uD820\\uD822\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879\\uD880-\\uD883][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDE70-\\uDEBE\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF40-\\uDF43\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDE40-\\uDE7F\\uDF00-\\uDF4A\\uDF50\\uDF93-\\uDF9F\\uDFE0\\uDFE1\\uDFE3]|\\uD821[\\uDC00-\\uDFF7]|\\uD823[\\uDC00-\\uDCD5\\uDD00-\\uDD08]|\\uD82B[\\uDFF0-\\uDFF3\\uDFF5-\\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uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDEDF\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF38\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D]|\\uD884[\\uDC00-\\uDF4A])\\S*/g;\n/**\n * Transforms text to title case.\n * Capitalizes the first letter of each word and transforms the\n * rest of the word to lower case.\n * Words are delimited by any whitespace character, such as a space, tab, or line-feed character.\n *\n * @see `LowerCasePipe`\n * @see `UpperCasePipe`\n *\n * @usageNotes\n * The following example shows the result of transforming various strings into title case.\n *\n * <code-example path=\"common/pipes/ts/titlecase_pipe.ts\" region='TitleCasePipe'></code-example>\n *\n * @ngModule CommonModule\n * @publicApi\n */\nclass TitleCasePipe {\n transform(value) {\n if (value == null)\n return null;\n if (typeof value !== 'string') {\n throw invalidPipeArgumentError(TitleCasePipe, value);\n }\n return value.replace(unicodeWordMatch, (txt => txt[0].toUpperCase() + txt.slice(1).toLowerCase()));\n }\n}\nTitleCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: TitleCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nTitleCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.0.4\", ngImport: i0, type: TitleCasePipe, isStandalone: true, name: \"titlecase\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: TitleCasePipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'titlecase',\n standalone: true,\n }]\n }] });\n/**\n * Transforms text to all upper case.\n * @see `LowerCasePipe`\n * @see `TitleCasePipe`\n *\n * @ngModule CommonModule\n * @publicApi\n */\nclass UpperCasePipe {\n transform(value) {\n if (value == null)\n return null;\n if (typeof value !== 'string') {\n throw invalidPipeArgumentError(UpperCasePipe, value);\n }\n return value.toUpperCase();\n }\n}\nUpperCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: UpperCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nUpperCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.0.4\", ngImport: i0, type: UpperCasePipe, isStandalone: true, name: \"uppercase\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: UpperCasePipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'uppercase',\n standalone: true,\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The default date format of Angular date pipe, which corresponds to the following format:\n * `'MMM d,y'` (e.g. `Jun 15, 2015`)\n */\nconst DEFAULT_DATE_FORMAT = 'mediumDate';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Optionally-provided default timezone to use for all instances of `DatePipe` (such as `'+0430'`).\n * If the value isn't provided, the `DatePipe` will use the end-user's local system timezone.\n *\n * @deprecated use DATE_PIPE_DEFAULT_OPTIONS token to configure DatePipe\n */\nconst DATE_PIPE_DEFAULT_TIMEZONE = new InjectionToken('DATE_PIPE_DEFAULT_TIMEZONE');\n/**\n * DI token that allows to provide default configuration for the `DatePipe` instances in an\n * application. The value is an object which can include the following fields:\n * - `dateFormat`: configures the default date format. If not provided, the `DatePipe`\n * will use the 'mediumDate' as a value.\n * - `timezone`: configures the default timezone. If not provided, the `DatePipe` will\n * use the end-user's local system timezone.\n *\n * @see `DatePipeConfig`\n *\n * @usageNotes\n *\n * Various date pipe default values can be overwritten by providing this token with\n * the value that has this interface.\n *\n * For example:\n *\n * Override the default date format by providing a value using the token:\n * ```typescript\n * providers: [\n * {provide: DATE_PIPE_DEFAULT_OPTIONS, useValue: {dateFormat: 'shortDate'}}\n * ]\n * ```\n *\n * Override the default timezone by providing a value using the token:\n * ```typescript\n * providers: [\n * {provide: DATE_PIPE_DEFAULT_OPTIONS, useValue: {timezone: '-1200'}}\n * ]\n * ```\n */\nconst DATE_PIPE_DEFAULT_OPTIONS = new InjectionToken('DATE_PIPE_DEFAULT_OPTIONS');\n// clang-format off\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a date value according to locale rules.\n *\n * `DatePipe` is executed only when it detects a pure change to the input value.\n * A pure change is either a change to a primitive input value\n * (such as `String`, `Number`, `Boolean`, or `Symbol`),\n * or a changed object reference (such as `Date`, `Array`, `Function`, or `Object`).\n *\n * Note that mutating a `Date` object does not cause the pipe to be rendered again.\n * To ensure that the pipe is executed, you must create a new `Date` object.\n *\n * Only the `en-US` locale data comes with Angular. To localize dates\n * in another language, you must import the corresponding locale data.\n * See the [I18n guide](guide/i18n-common-format-data-locale) for more information.\n *\n * The time zone of the formatted value can be specified either by passing it in as the second\n * parameter of the pipe, or by setting the default through the `DATE_PIPE_DEFAULT_OPTIONS`\n * injection token. The value that is passed in as the second parameter takes precedence over\n * the one defined using the injection token.\n *\n * @see `formatDate()`\n *\n *\n * @usageNotes\n *\n * The result of this pipe is not reevaluated when the input is mutated. To avoid the need to\n * reformat the date on every change-detection cycle, treat the date as an immutable object\n * and change the reference when the pipe needs to run again.\n *\n * ### Pre-defined format options\n *\n * | Option | Equivalent to | Examples (given in `en-US` locale) |\n * |---------------|-------------------------------------|-------------------------------------------------|\n * | `'short'` | `'M/d/yy, h:mm a'` | `6/15/15, 9:03 AM` |\n * | `'medium'` | `'MMM d, y, h:mm:ss a'` | `Jun 15, 2015, 9:03:01 AM` |\n * | `'long'` | `'MMMM d, y, h:mm:ss a z'` | `June 15, 2015 at 9:03:01 AM GMT+1` |\n * | `'full'` | `'EEEE, MMMM d, y, h:mm:ss a zzzz'` | `Monday, June 15, 2015 at 9:03:01 AM GMT+01:00` |\n * | `'shortDate'` | `'M/d/yy'` | `6/15/15` |\n * | `'mediumDate'`| `'MMM d, y'` | `Jun 15, 2015` |\n * | `'longDate'` | `'MMMM d, y'` | `June 15, 2015` |\n * | `'fullDate'` | `'EEEE, MMMM d, y'` | `Monday, June 15, 2015` |\n * | `'shortTime'` | `'h:mm a'` | `9:03 AM` |\n * | `'mediumTime'`| `'h:mm:ss a'` | `9:03:01 AM` |\n * | `'longTime'` | `'h:mm:ss a z'` | `9:03:01 AM GMT+1` |\n * | `'fullTime'` | `'h:mm:ss a zzzz'` | `9:03:01 AM GMT+01:00` |\n *\n * ### Custom format options\n *\n * You can construct a format string using symbols to specify the components\n * of a date-time value, as described in the following table.\n * Format details depend on the locale.\n * Fields marked with (*) are only available in the extra data set for the given locale.\n *\n * | Field type | Format | Description | Example Value |\n * |-------------------- |-------------|---------------------------------------------------------------|------------------------------------------------------------|\n * | Era | G, GG & GGG | Abbreviated | AD |\n * | | GGGG | Wide | Anno Domini |\n * | | GGGGG | Narrow | A |\n * | Year | y | Numeric: minimum digits | 2, 20, 201, 2017, 20173 |\n * | | yy | Numeric: 2 digits + zero padded | 02, 20, 01, 17, 73 |\n * | | yyy | Numeric: 3 digits + zero padded | 002, 020, 201, 2017, 20173 |\n * | | yyyy | Numeric: 4 digits or more + zero padded | 0002, 0020, 0201, 2017, 20173 |\n * | Week-numbering year | Y | Numeric: minimum digits | 2, 20, 201, 2017, 20173 |\n * | | YY | Numeric: 2 digits + zero padded | 02, 20, 01, 17, 73 |\n * | | YYY | Numeric: 3 digits + zero padded | 002, 020, 201, 2017, 20173 |\n * | | YYYY | Numeric: 4 digits or more + zero padded | 0002, 0020, 0201, 2017, 20173 |\n * | Month | M | Numeric: 1 digit | 9, 12 |\n * | | MM | Numeric: 2 digits + zero padded | 09, 12 |\n * | | MMM | Abbreviated | Sep |\n * | | MMMM | Wide | September |\n * | | MMMMM | Narrow | S |\n * | Month standalone | L | Numeric: 1 digit | 9, 12 |\n * | | LL | Numeric: 2 digits + zero padded | 09, 12 |\n * | | LLL | Abbreviated | Sep |\n * | | LLLL | Wide | September |\n * | | LLLLL | Narrow | S |\n * | Week of year | w | Numeric: minimum digits | 1... 53 |\n * | | ww | Numeric: 2 digits + zero padded | 01... 53 |\n * | Week of month | W | Numeric: 1 digit | 1... 5 |\n * | Day of month | d | Numeric: minimum digits | 1 |\n * | | dd | Numeric: 2 digits + zero padded | 01 |\n * | Week day | E, EE & EEE | Abbreviated | Tue |\n * | | EEEE | Wide | Tuesday |\n * | | EEEEE | Narrow | T |\n * | | EEEEEE | Short | Tu |\n * | Week day standalone | c, cc | Numeric: 1 digit | 2 |\n * | | ccc | Abbreviated | Tue |\n * | | cccc | Wide | Tuesday |\n * | | ccccc | Narrow | T |\n * | | cccccc | Short | Tu |\n * | Period | a, aa & aaa | Abbreviated | am/pm or AM/PM |\n * | | aaaa | Wide (fallback to `a` when missing) | ante meridiem/post meridiem |\n * | | aaaaa | Narrow | a/p |\n * | Period* | B, BB & BBB | Abbreviated | mid. |\n * | | BBBB | Wide | am, pm, midnight, noon, morning, afternoon, evening, night |\n * | | BBBBB | Narrow | md |\n * | Period standalone* | b, bb & bbb | Abbreviated | mid. |\n * | | bbbb | Wide | am, pm, midnight, noon, morning, afternoon, evening, night |\n * | | bbbbb | Narrow | md |\n * | Hour 1-12 | h | Numeric: minimum digits | 1, 12 |\n * | | hh | Numeric: 2 digits + zero padded | 01, 12 |\n * | Hour 0-23 | H | Numeric: minimum digits | 0, 23 |\n * | | HH | Numeric: 2 digits + zero padded | 00, 23 |\n * | Minute | m | Numeric: minimum digits | 8, 59 |\n * | | mm | Numeric: 2 digits + zero padded | 08, 59 |\n * | Second | s | Numeric: minimum digits | 0... 59 |\n * | | ss | Numeric: 2 digits + zero padded | 00... 59 |\n * | Fractional seconds | S | Numeric: 1 digit | 0... 9 |\n * | | SS | Numeric: 2 digits + zero padded | 00... 99 |\n * | | SSS | Numeric: 3 digits + zero padded (= milliseconds) | 000... 999 |\n * | Zone | z, zz & zzz | Short specific non location format (fallback to O) | GMT-8 |\n * | | zzzz | Long specific non location format (fallback to OOOO) | GMT-08:00 |\n * | | Z, ZZ & ZZZ | ISO8601 basic format | -0800 |\n * | | ZZZZ | Long localized GMT format | GMT-8:00 |\n * | | ZZZZZ | ISO8601 extended format + Z indicator for offset 0 (= XXXXX) | -08:00 |\n * | | O, OO & OOO | Short localized GMT format | GMT-8 |\n * | | OOOO | Long localized GMT format | GMT-08:00 |\n *\n *\n * ### Format examples\n *\n * These examples transform a date into various formats,\n * assuming that `dateObj` is a JavaScript `Date` object for\n * year: 2015, month: 6, day: 15, hour: 21, minute: 43, second: 11,\n * given in the local time for the `en-US` locale.\n *\n * ```\n * {{ dateObj | date }} // output is 'Jun 15, 2015'\n * {{ dateObj | date:'medium' }} // output is 'Jun 15, 2015, 9:43:11 PM'\n * {{ dateObj | date:'shortTime' }} // output is '9:43 PM'\n * {{ dateObj | date:'mm:ss' }} // output is '43:11'\n * ```\n *\n * ### Usage example\n *\n * The following component uses a date pipe to display the current date in different formats.\n *\n * ```\n * @Component({\n * selector: 'date-pipe',\n * template: `<div>\n * <p>Today is {{today | date}}</p>\n * <p>Or if you prefer, {{today | date:'fullDate'}}</p>\n * <p>The time is {{today | date:'h:mm a z'}}</p>\n * </div>`\n * })\n * // Get the current date and time as a date-time value.\n * export class DatePipeComponent {\n * today: number = Date.now();\n * }\n * ```\n *\n * @publicApi\n */\n// clang-format on\nclass DatePipe {\n constructor(locale, defaultTimezone, defaultOptions) {\n this.locale = locale;\n this.defaultTimezone = defaultTimezone;\n this.defaultOptions = defaultOptions;\n }\n transform(value, format, timezone, locale) {\n if (value == null || value === '' || value !== value)\n return null;\n try {\n const _format = format ?? this.defaultOptions?.dateFormat ?? DEFAULT_DATE_FORMAT;\n const _timezone = timezone ?? this.defaultOptions?.timezone ?? this.defaultTimezone ?? undefined;\n return formatDate(value, _format, locale || this.locale, _timezone);\n }\n catch (error) {\n throw invalidPipeArgumentError(DatePipe, error.message);\n }\n }\n}\nDatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: DatePipe, deps: [{ token: LOCALE_ID }, { token: DATE_PIPE_DEFAULT_TIMEZONE, optional: true }, { token: DATE_PIPE_DEFAULT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Pipe });\nDatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.0.4\", ngImport: i0, type: DatePipe, isStandalone: true, name: \"date\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: DatePipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'date',\n pure: true,\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [LOCALE_ID]\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [DATE_PIPE_DEFAULT_TIMEZONE]\n }, {\n type: Optional\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [DATE_PIPE_DEFAULT_OPTIONS]\n }, {\n type: Optional\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst _INTERPOLATION_REGEXP = /#/g;\n/**\n * @ngModule CommonModule\n * @description\n *\n * Maps a value to a string that pluralizes the value according to locale rules.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example common/pipes/ts/i18n_pipe.ts region='I18nPluralPipeComponent'}\n *\n * @publicApi\n */\nclass I18nPluralPipe {\n constructor(_localization) {\n this._localization = _localization;\n }\n /**\n * @param value the number to be formatted\n * @param pluralMap an object that mimics the ICU format, see\n * https://unicode-org.github.io/icu/userguide/format_parse/messages/.\n * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by\n * default).\n */\n transform(value, pluralMap, locale) {\n if (value == null)\n return '';\n if (typeof pluralMap !== 'object' || pluralMap === null) {\n throw invalidPipeArgumentError(I18nPluralPipe, pluralMap);\n }\n const key = getPluralCategory(value, Object.keys(pluralMap), this._localization, locale);\n return pluralMap[key].replace(_INTERPOLATION_REGEXP, value.toString());\n }\n}\nI18nPluralPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: I18nPluralPipe, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Pipe });\nI18nPluralPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.0.4\", ngImport: i0, type: I18nPluralPipe, isStandalone: true, name: \"i18nPlural\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: I18nPluralPipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'i18nPlural',\n pure: true,\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: NgLocalization }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @ngModule CommonModule\n * @description\n *\n * Generic selector that displays the string that matches the current value.\n *\n * If none of the keys of the `mapping` match the `value`, then the content\n * of the `other` key is returned when present, otherwise an empty string is returned.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example common/pipes/ts/i18n_pipe.ts region='I18nSelectPipeComponent'}\n *\n * @publicApi\n */\nclass I18nSelectPipe {\n /**\n * @param value a string to be internationalized.\n * @param mapping an object that indicates the text that should be displayed\n * for different values of the provided `value`.\n */\n transform(value, mapping) {\n if (value == null)\n return '';\n if (typeof mapping !== 'object' || typeof value !== 'string') {\n throw invalidPipeArgumentError(I18nSelectPipe, mapping);\n }\n if (mapping.hasOwnProperty(value)) {\n return mapping[value];\n }\n if (mapping.hasOwnProperty('other')) {\n return mapping['other'];\n }\n return '';\n }\n}\nI18nSelectPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: I18nSelectPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nI18nSelectPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.0.4\", ngImport: i0, type: I18nSelectPipe, isStandalone: true, name: \"i18nSelect\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: I18nSelectPipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'i18nSelect',\n pure: true,\n standalone: true,\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @ngModule CommonModule\n * @description\n *\n * Converts a value into its JSON-format representation. Useful for debugging.\n *\n * @usageNotes\n *\n * The following component uses a JSON pipe to convert an object\n * to JSON format, and displays the string in both formats for comparison.\n *\n * {@example common/pipes/ts/json_pipe.ts region='JsonPipe'}\n *\n * @publicApi\n */\nclass JsonPipe {\n /**\n * @param value A value of any type to convert into a JSON-format string.\n */\n transform(value) {\n return JSON.stringify(value, null, 2);\n }\n}\nJsonPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: JsonPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nJsonPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.0.4\", ngImport: i0, type: JsonPipe, isStandalone: true, name: \"json\", pure: false });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: JsonPipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'json',\n pure: false,\n standalone: true,\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction makeKeyValuePair(key, value) {\n return { key: key, value: value };\n}\n/**\n * @ngModule CommonModule\n * @description\n *\n * Transforms Object or Map into an array of key value pairs.\n *\n * The output array will be ordered by keys.\n * By default the comparator will be by Unicode point value.\n * You can optionally pass a compareFn if your keys are complex types.\n *\n * @usageNotes\n * ### Examples\n *\n * This examples show how an Object or a Map can be iterated by ngFor with the use of this\n * keyvalue pipe.\n *\n * {@example common/pipes/ts/keyvalue_pipe.ts region='KeyValuePipe'}\n *\n * @publicApi\n */\nclass KeyValuePipe {\n constructor(differs) {\n this.differs = differs;\n this.keyValues = [];\n this.compareFn = defaultComparator;\n }\n transform(input, compareFn = defaultComparator) {\n if (!input || (!(input instanceof Map) && typeof input !== 'object')) {\n return null;\n }\n if (!this.differ) {\n // make a differ for whatever type we've been passed in\n this.differ = this.differs.find(input).create();\n }\n const differChanges = this.differ.diff(input);\n const compareFnChanged = compareFn !== this.compareFn;\n if (differChanges) {\n this.keyValues = [];\n differChanges.forEachItem((r) => {\n this.keyValues.push(makeKeyValuePair(r.key, r.currentValue));\n });\n }\n if (differChanges || compareFnChanged) {\n this.keyValues.sort(compareFn);\n this.compareFn = compareFn;\n }\n return this.keyValues;\n }\n}\nKeyValuePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: KeyValuePipe, deps: [{ token: i0.KeyValueDiffers }], target: i0.ɵɵFactoryTarget.Pipe });\nKeyValuePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.0.4\", ngImport: i0, type: KeyValuePipe, isStandalone: true, name: \"keyvalue\", pure: false });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: KeyValuePipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'keyvalue',\n pure: false,\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: i0.KeyValueDiffers }]; } });\nfunction defaultComparator(keyValueA, keyValueB) {\n const a = keyValueA.key;\n const b = keyValueB.key;\n // if same exit with 0;\n if (a === b)\n return 0;\n // make sure that undefined are at the end of the sort.\n if (a === undefined)\n return 1;\n if (b === undefined)\n return -1;\n // make sure that nulls are at the end of the sort.\n if (a === null)\n return 1;\n if (b === null)\n return -1;\n if (typeof a == 'string' && typeof b == 'string') {\n return a < b ? -1 : 1;\n }\n if (typeof a == 'number' && typeof b == 'number') {\n return a - b;\n }\n if (typeof a == 'boolean' && typeof b == 'boolean') {\n return a < b ? -1 : 1;\n }\n // `a` and `b` are of different types. Compare their string values.\n const aString = String(a);\n const bString = String(b);\n return aString == bString ? 0 : aString < bString ? -1 : 1;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a value according to digit options and locale rules.\n * Locale determines group sizing and separator,\n * decimal point character, and other locale-specific configurations.\n *\n * @see `formatNumber()`\n *\n * @usageNotes\n *\n * ### digitsInfo\n *\n * The value's decimal representation is specified by the `digitsInfo`\n * parameter, written in the following format:<br>\n *\n * ```\n * {minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}\n * ```\n *\n * - `minIntegerDigits`:\n * The minimum number of integer digits before the decimal point.\n * Default is 1.\n *\n * - `minFractionDigits`:\n * The minimum number of digits after the decimal point.\n * Default is 0.\n *\n * - `maxFractionDigits`:\n * The maximum number of digits after the decimal point.\n * Default is 3.\n *\n * If the formatted value is truncated it will be rounded using the \"to-nearest\" method:\n *\n * ```\n * {{3.6 | number: '1.0-0'}}\n * <!--will output '4'-->\n *\n * {{-3.6 | number:'1.0-0'}}\n * <!--will output '-4'-->\n * ```\n *\n * ### locale\n *\n * `locale` will format a value according to locale rules.\n * Locale determines group sizing and separator,\n * decimal point character, and other locale-specific configurations.\n *\n * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n *\n * See [Setting your app locale](guide/i18n-common-locale-id).\n *\n * ### Example\n *\n * The following code shows how the pipe transforms values\n * according to various format specifications,\n * where the caller's default locale is `en-US`.\n *\n * <code-example path=\"common/pipes/ts/number_pipe.ts\" region='NumberPipe'></code-example>\n *\n * @publicApi\n */\nclass DecimalPipe {\n constructor(_locale) {\n this._locale = _locale;\n }\n /**\n * @param value The value to be formatted.\n * @param digitsInfo Sets digit and decimal representation.\n * [See more](#digitsinfo).\n * @param locale Specifies what locale format rules to use.\n * [See more](#locale).\n */\n transform(value, digitsInfo, locale) {\n if (!isValue(value))\n return null;\n locale = locale || this._locale;\n try {\n const num = strToNumber(value);\n return formatNumber(num, locale, digitsInfo);\n }\n catch (error) {\n throw invalidPipeArgumentError(DecimalPipe, error.message);\n }\n }\n}\nDecimalPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: DecimalPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });\nDecimalPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.0.4\", ngImport: i0, type: DecimalPipe, isStandalone: true, name: \"number\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: DecimalPipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'number',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [LOCALE_ID]\n }] }]; } });\n/**\n * @ngModule CommonModule\n * @description\n *\n * Transforms a number to a percentage\n * string, formatted according to locale rules that determine group sizing and\n * separator, decimal-point character, and other locale-specific\n * configurations.\n *\n * @see `formatPercent()`\n *\n * @usageNotes\n * The following code shows how the pipe transforms numbers\n * into text strings, according to various format specifications,\n * where the caller's default locale is `en-US`.\n *\n * <code-example path=\"common/pipes/ts/percent_pipe.ts\" region='PercentPipe'></code-example>\n *\n * @publicApi\n */\nclass PercentPipe {\n constructor(_locale) {\n this._locale = _locale;\n }\n /**\n *\n * @param value The number to be formatted as a percentage.\n * @param digitsInfo Decimal representation options, specified by a string\n * in the following format:<br>\n * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.\n * - `minIntegerDigits`: The minimum number of integer digits before the decimal point.\n * Default is `1`.\n * - `minFractionDigits`: The minimum number of digits after the decimal point.\n * Default is `0`.\n * - `maxFractionDigits`: The maximum number of digits after the decimal point.\n * Default is `0`.\n * @param locale A locale code for the locale format rules to use.\n * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n * See [Setting your app locale](guide/i18n-common-locale-id).\n */\n transform(value, digitsInfo, locale) {\n if (!isValue(value))\n return null;\n locale = locale || this._locale;\n try {\n const num = strToNumber(value);\n return formatPercent(num, locale, digitsInfo);\n }\n catch (error) {\n throw invalidPipeArgumentError(PercentPipe, error.message);\n }\n }\n}\nPercentPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: PercentPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });\nPercentPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.0.4\", ngImport: i0, type: PercentPipe, isStandalone: true, name: \"percent\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: PercentPipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'percent',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [LOCALE_ID]\n }] }]; } });\n/**\n * @ngModule CommonModule\n * @description\n *\n * Transforms a number to a currency string, formatted according to locale rules\n * that determine group sizing and separator, decimal-point character,\n * and other locale-specific configurations.\n *\n * {@a currency-code-deprecation}\n * <div class=\"alert is-helpful\">\n *\n * **Deprecation notice:**\n *\n * The default currency code is currently always `USD` but this is deprecated from v9.\n *\n * **In v11 the default currency code will be taken from the current locale identified by\n * the `LOCALE_ID` token. See the [i18n guide](guide/i18n-common-locale-id) for\n * more information.**\n *\n * If you need the previous behavior then set it by creating a `DEFAULT_CURRENCY_CODE` provider in\n * your application `NgModule`:\n *\n * ```ts\n * {provide: DEFAULT_CURRENCY_CODE, useValue: 'USD'}\n * ```\n *\n * </div>\n *\n * @see `getCurrencySymbol()`\n * @see `formatCurrency()`\n *\n * @usageNotes\n * The following code shows how the pipe transforms numbers\n * into text strings, according to various format specifications,\n * where the caller's default locale is `en-US`.\n *\n * <code-example path=\"common/pipes/ts/currency_pipe.ts\" region='CurrencyPipe'></code-example>\n *\n * @publicApi\n */\nclass CurrencyPipe {\n constructor(_locale, _defaultCurrencyCode = 'USD') {\n this._locale = _locale;\n this._defaultCurrencyCode = _defaultCurrencyCode;\n }\n /**\n *\n * @param value The number to be formatted as currency.\n * @param currencyCode The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code,\n * such as `USD` for the US dollar and `EUR` for the euro. The default currency code can be\n * configured using the `DEFAULT_CURRENCY_CODE` injection token.\n * @param display The format for the currency indicator. One of the following:\n * - `code`: Show the code (such as `USD`).\n * - `symbol`(default): Show the symbol (such as `$`).\n * - `symbol-narrow`: Use the narrow symbol for locales that have two symbols for their\n * currency.\n * For example, the Canadian dollar CAD has the symbol `CA$` and the symbol-narrow `$`. If the\n * locale has no narrow symbol, uses the standard symbol for the locale.\n * - String: Use the given string value instead of a code or a symbol.\n * For example, an empty string will suppress the currency & symbol.\n * - Boolean (marked deprecated in v5): `true` for symbol and false for `code`.\n *\n * @param digitsInfo Decimal representation options, specified by a string\n * in the following format:<br>\n * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.\n * - `minIntegerDigits`: The minimum number of integer digits before the decimal point.\n * Default is `1`.\n * - `minFractionDigits`: The minimum number of digits after the decimal point.\n * Default is `2`.\n * - `maxFractionDigits`: The maximum number of digits after the decimal point.\n * Default is `2`.\n * If not provided, the number will be formatted with the proper amount of digits,\n * depending on what the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) specifies.\n * For example, the Canadian dollar has 2 digits, whereas the Chilean peso has none.\n * @param locale A locale code for the locale format rules to use.\n * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n * See [Setting your app locale](guide/i18n-common-locale-id).\n */\n transform(value, currencyCode = this._defaultCurrencyCode, display = 'symbol', digitsInfo, locale) {\n if (!isValue(value))\n return null;\n locale = locale || this._locale;\n if (typeof display === 'boolean') {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && console && console.warn) {\n console.warn(`Warning: the currency pipe has been changed in Angular v5. The symbolDisplay option (third parameter) is now a string instead of a boolean. The accepted values are \"code\", \"symbol\" or \"symbol-narrow\".`);\n }\n display = display ? 'symbol' : 'code';\n }\n let currency = currencyCode || this._defaultCurrencyCode;\n if (display !== 'code') {\n if (display === 'symbol' || display === 'symbol-narrow') {\n currency = getCurrencySymbol(currency, display === 'symbol' ? 'wide' : 'narrow', locale);\n }\n else {\n currency = display;\n }\n }\n try {\n const num = strToNumber(value);\n return formatCurrency(num, locale, currency, currencyCode, digitsInfo);\n }\n catch (error) {\n throw invalidPipeArgumentError(CurrencyPipe, error.message);\n }\n }\n}\nCurrencyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: CurrencyPipe, deps: [{ token: LOCALE_ID }, { token: DEFAULT_CURRENCY_CODE }], target: i0.ɵɵFactoryTarget.Pipe });\nCurrencyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.0.4\", ngImport: i0, type: CurrencyPipe, isStandalone: true, name: \"currency\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: CurrencyPipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'currency',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [LOCALE_ID]\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [DEFAULT_CURRENCY_CODE]\n }] }]; } });\nfunction isValue(value) {\n return !(value == null || value === '' || value !== value);\n}\n/**\n * Transforms a string into a number (if needed).\n */\nfunction strToNumber(value) {\n // Convert strings to numbers\n if (typeof value === 'string' && !isNaN(Number(value) - parseFloat(value))) {\n return Number(value);\n }\n if (typeof value !== 'number') {\n throw new Error(`${value} is not a number`);\n }\n return value;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @ngModule CommonModule\n * @description\n *\n * Creates a new `Array` or `String` containing a subset (slice) of the elements.\n *\n * @usageNotes\n *\n * All behavior is based on the expected behavior of the JavaScript API `Array.prototype.slice()`\n * and `String.prototype.slice()`.\n *\n * When operating on an `Array`, the returned `Array` is always a copy even when all\n * the elements are being returned.\n *\n * When operating on a blank value, the pipe returns the blank value.\n *\n * ### List Example\n *\n * This `ngFor` example:\n *\n * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_list'}\n *\n * produces the following:\n *\n * ```html\n * <li>b</li>\n * <li>c</li>\n * ```\n *\n * ### String Examples\n *\n * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_string'}\n *\n * @publicApi\n */\nclass SlicePipe {\n transform(value, start, end) {\n if (value == null)\n return null;\n if (!this.supports(value)) {\n throw invalidPipeArgumentError(SlicePipe, value);\n }\n return value.slice(start, end);\n }\n supports(obj) {\n return typeof obj === 'string' || Array.isArray(obj);\n }\n}\nSlicePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: SlicePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nSlicePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.0.4\", ngImport: i0, type: SlicePipe, isStandalone: true, name: \"slice\", pure: false });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: SlicePipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'slice',\n pure: false,\n standalone: true,\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A collection of Angular pipes that are likely to be used in each and every application.\n */\nconst COMMON_PIPES = [\n AsyncPipe,\n UpperCasePipe,\n LowerCasePipe,\n JsonPipe,\n SlicePipe,\n DecimalPipe,\n PercentPipe,\n TitleCasePipe,\n CurrencyPipe,\n DatePipe,\n I18nPluralPipe,\n I18nSelectPipe,\n KeyValuePipe,\n];\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Note: This does not contain the location providers,\n// as they need some platform specific implementations to work.\n/**\n * Exports all the basic Angular directives and pipes,\n * such as `NgIf`, `NgForOf`, `DecimalPipe`, and so on.\n * Re-exported by `BrowserModule`, which is included automatically in the root\n * `AppModule` when you create a new app with the CLI `new` command.\n *\n * @publicApi\n */\nclass CommonModule {\n}\nCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: CommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.0.4\", ngImport: i0, type: CommonModule, imports: [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe], exports: [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe] });\nCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: CommonModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: CommonModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [COMMON_DIRECTIVES, COMMON_PIPES],\n exports: [COMMON_DIRECTIVES, COMMON_PIPES],\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst PLATFORM_BROWSER_ID = 'browser';\nconst PLATFORM_SERVER_ID = 'server';\nconst PLATFORM_WORKER_APP_ID = 'browserWorkerApp';\nconst PLATFORM_WORKER_UI_ID = 'browserWorkerUi';\n/**\n * Returns whether a platform id represents a browser platform.\n * @publicApi\n */\nfunction isPlatformBrowser(platformId) {\n return platformId === PLATFORM_BROWSER_ID;\n}\n/**\n * Returns whether a platform id represents a server platform.\n * @publicApi\n */\nfunction isPlatformServer(platformId) {\n return platformId === PLATFORM_SERVER_ID;\n}\n/**\n * Returns whether a platform id represents a web worker app platform.\n * @publicApi\n */\nfunction isPlatformWorkerApp(platformId) {\n return platformId === PLATFORM_WORKER_APP_ID;\n}\n/**\n * Returns whether a platform id represents a web worker UI platform.\n * @publicApi\n */\nfunction isPlatformWorkerUi(platformId) {\n return platformId === PLATFORM_WORKER_UI_ID;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @publicApi\n */\nconst VERSION = new Version('15.0.4');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Defines a scroll position manager. Implemented by `BrowserViewportScroller`.\n *\n * @publicApi\n */\nclass ViewportScroller {\n}\n// De-sugared tree-shakable injection\n// See #23917\n/** @nocollapse */\nViewportScroller.ɵprov = ɵɵdefineInjectable({\n token: ViewportScroller,\n providedIn: 'root',\n factory: () => new BrowserViewportScroller(ɵɵinject(DOCUMENT), window)\n});\n/**\n * Manages the scroll position for a browser window.\n */\nclass BrowserViewportScroller {\n constructor(document, window) {\n this.document = document;\n this.window = window;\n this.offset = () => [0, 0];\n }\n /**\n * Configures the top offset used when scrolling to an anchor.\n * @param offset A position in screen coordinates (a tuple with x and y values)\n * or a function that returns the top offset position.\n *\n */\n setOffset(offset) {\n if (Array.isArray(offset)) {\n this.offset = () => offset;\n }\n else {\n this.offset = offset;\n }\n }\n /**\n * Retrieves the current scroll position.\n * @returns The position in screen coordinates.\n */\n getScrollPosition() {\n if (this.supportsScrolling()) {\n return [this.window.pageXOffset, this.window.pageYOffset];\n }\n else {\n return [0, 0];\n }\n }\n /**\n * Sets the scroll position.\n * @param position The new position in screen coordinates.\n */\n scrollToPosition(position) {\n if (this.supportsScrolling()) {\n this.window.scrollTo(position[0], position[1]);\n }\n }\n /**\n * Scrolls to an element and attempts to focus the element.\n *\n * Note that the function name here is misleading in that the target string may be an ID for a\n * non-anchor element.\n *\n * @param target The ID of an element or name of the anchor.\n *\n * @see https://html.spec.whatwg.org/#the-indicated-part-of-the-document\n * @see https://html.spec.whatwg.org/#scroll-to-fragid\n */\n scrollToAnchor(target) {\n if (!this.supportsScrolling()) {\n return;\n }\n const elSelected = findAnchorFromDocument(this.document, target);\n if (elSelected) {\n this.scrollToElement(elSelected);\n // After scrolling to the element, the spec dictates that we follow the focus steps for the\n // target. Rather than following the robust steps, simply attempt focus.\n //\n // @see https://html.spec.whatwg.org/#get-the-focusable-area\n // @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLOrForeignElement/focus\n // @see https://html.spec.whatwg.org/#focusable-area\n elSelected.focus();\n }\n }\n /**\n * Disables automatic scroll restoration provided by the browser.\n */\n setHistoryScrollRestoration(scrollRestoration) {\n if (this.supportScrollRestoration()) {\n const history = this.window.history;\n if (history && history.scrollRestoration) {\n history.scrollRestoration = scrollRestoration;\n }\n }\n }\n /**\n * Scrolls to an element using the native offset and the specified offset set on this scroller.\n *\n * The offset can be used when we know that there is a floating header and scrolling naively to an\n * element (ex: `scrollIntoView`) leaves the element hidden behind the floating header.\n */\n scrollToElement(el) {\n const rect = el.getBoundingClientRect();\n const left = rect.left + this.window.pageXOffset;\n const top = rect.top + this.window.pageYOffset;\n const offset = this.offset();\n this.window.scrollTo(left - offset[0], top - offset[1]);\n }\n /**\n * We only support scroll restoration when we can get a hold of window.\n * This means that we do not support this behavior when running in a web worker.\n *\n * Lifting this restriction right now would require more changes in the dom adapter.\n * Since webworkers aren't widely used, we will lift it once RouterScroller is\n * battle-tested.\n */\n supportScrollRestoration() {\n try {\n if (!this.supportsScrolling()) {\n return false;\n }\n // The `scrollRestoration` property could be on the `history` instance or its prototype.\n const scrollRestorationDescriptor = getScrollRestorationProperty(this.window.history) ||\n getScrollRestorationProperty(Object.getPrototypeOf(this.window.history));\n // We can write to the `scrollRestoration` property if it is a writable data field or it has a\n // setter function.\n return !!scrollRestorationDescriptor &&\n !!(scrollRestorationDescriptor.writable || scrollRestorationDescriptor.set);\n }\n catch {\n return false;\n }\n }\n supportsScrolling() {\n try {\n return !!this.window && !!this.window.scrollTo && 'pageXOffset' in this.window;\n }\n catch {\n return false;\n }\n }\n}\nfunction getScrollRestorationProperty(obj) {\n return Object.getOwnPropertyDescriptor(obj, 'scrollRestoration');\n}\nfunction findAnchorFromDocument(document, target) {\n const documentResult = document.getElementById(target) || document.getElementsByName(target)[0];\n if (documentResult) {\n return documentResult;\n }\n // `getElementById` and `getElementsByName` won't pierce through the shadow DOM so we\n // have to traverse the DOM manually and do the lookup through the shadow roots.\n if (typeof document.createTreeWalker === 'function' && document.body &&\n (document.body.createShadowRoot || document.body.attachShadow)) {\n const treeWalker = document.createTreeWalker(document.body, NodeFilter.SHOW_ELEMENT);\n let currentNode = treeWalker.currentNode;\n while (currentNode) {\n const shadowRoot = currentNode.shadowRoot;\n if (shadowRoot) {\n // Note that `ShadowRoot` doesn't support `getElementsByName`\n // so we have to fall back to `querySelector`.\n const result = shadowRoot.getElementById(target) || shadowRoot.querySelector(`[name=\"${target}\"]`);\n if (result) {\n return result;\n }\n }\n currentNode = treeWalker.nextNode();\n }\n }\n return null;\n}\n/**\n * Provides an empty implementation of the viewport scroller.\n */\nclass NullViewportScroller {\n /**\n * Empty implementation\n */\n setOffset(offset) { }\n /**\n * Empty implementation\n */\n getScrollPosition() {\n return [0, 0];\n }\n /**\n * Empty implementation\n */\n scrollToPosition(position) { }\n /**\n * Empty implementation\n */\n scrollToAnchor(anchor) { }\n /**\n * Empty implementation\n */\n setHistoryScrollRestoration(scrollRestoration) { }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A wrapper around the `XMLHttpRequest` constructor.\n *\n * @publicApi\n */\nclass XhrFactory {\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Converts a string that represents a URL into a URL class instance.\nfunction getUrl(src, win) {\n // Don't use a base URL is the URL is absolute.\n return isAbsoluteUrl(src) ? new URL(src) : new URL(src, win.location.href);\n}\n// Checks whether a URL is absolute (i.e. starts with `http://` or `https://`).\nfunction isAbsoluteUrl(src) {\n return /^https?:\\/\\//.test(src);\n}\n// Given a URL, extract the hostname part.\n// If a URL is a relative one - the URL is returned as is.\nfunction extractHostname(url) {\n return isAbsoluteUrl(url) ? (new URL(url)).hostname : url;\n}\nfunction isValidPath(path) {\n const isString = typeof path === 'string';\n if (!isString || path.trim() === '') {\n return false;\n }\n // Calling new URL() will throw if the path string is malformed\n try {\n const url = new URL(path);\n return true;\n }\n catch {\n return false;\n }\n}\nfunction normalizePath(path) {\n return path.endsWith('/') ? path.slice(0, -1) : path;\n}\nfunction normalizeSrc(src) {\n return src.startsWith('/') ? src.slice(1) : src;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Noop image loader that does no transformation to the original src and just returns it as is.\n * This loader is used as a default one if more specific logic is not provided in an app config.\n *\n * @see `ImageLoader`\n * @see `NgOptimizedImage`\n */\nconst noopImageLoader = (config) => config.src;\n/**\n * Injection token that configures the image loader function.\n *\n * @see `ImageLoader`\n * @see `NgOptimizedImage`\n * @publicApi\n */\nconst IMAGE_LOADER = new InjectionToken('ImageLoader', {\n providedIn: 'root',\n factory: () => noopImageLoader,\n});\n/**\n * Internal helper function that makes it easier to introduce custom image loaders for the\n * `NgOptimizedImage` directive. It is enough to specify a URL builder function to obtain full DI\n * configuration for a given loader: a DI token corresponding to the actual loader function, plus DI\n * tokens managing preconnect check functionality.\n * @param buildUrlFn a function returning a full URL based on loader's configuration\n * @param exampleUrls example of full URLs for a given loader (used in error messages)\n * @returns a set of DI providers corresponding to the configured image loader\n */\nfunction createImageLoader(buildUrlFn, exampleUrls) {\n return function provideImageLoader(path) {\n if (!isValidPath(path)) {\n throwInvalidPathError(path, exampleUrls || []);\n }\n // The trailing / is stripped (if provided) to make URL construction (concatenation) easier in\n // the individual loader functions.\n path = normalizePath(path);\n const loaderFn = (config) => {\n if (isAbsoluteUrl(config.src)) {\n // Image loader functions expect an image file name (e.g. `my-image.png`)\n // or a relative path + a file name (e.g. `/a/b/c/my-image.png`) as an input,\n // so the final absolute URL can be constructed.\n // When an absolute URL is provided instead - the loader can not\n // build a final URL, thus the error is thrown to indicate that.\n throwUnexpectedAbsoluteUrlError(path, config.src);\n }\n return buildUrlFn(path, { ...config, src: normalizeSrc(config.src) });\n };\n const providers = [{ provide: IMAGE_LOADER, useValue: loaderFn }];\n return providers;\n };\n}\nfunction throwInvalidPathError(path, exampleUrls) {\n throw new ɵRuntimeError(2959 /* RuntimeErrorCode.INVALID_LOADER_ARGUMENTS */, ngDevMode &&\n `Image loader has detected an invalid path (\\`${path}\\`). ` +\n `To fix this, supply a path using one of the following formats: ${exampleUrls.join(' or ')}`);\n}\nfunction throwUnexpectedAbsoluteUrlError(path, url) {\n throw new ɵRuntimeError(2959 /* RuntimeErrorCode.INVALID_LOADER_ARGUMENTS */, ngDevMode &&\n `Image loader has detected a \\`<img>\\` tag with an invalid \\`ngSrc\\` attribute: ${url}. ` +\n `This image loader expects \\`ngSrc\\` to be a relative URL - ` +\n `however the provided value is an absolute URL. ` +\n `To fix this, provide \\`ngSrc\\` as a path relative to the base URL ` +\n `configured for this loader (\\`${path}\\`).`);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Function that generates an ImageLoader for [Cloudflare Image\n * Resizing](https://developers.cloudflare.com/images/image-resizing/) and turns it into an Angular\n * provider. Note: Cloudflare has multiple image products - this provider is specifically for\n * Cloudflare Image Resizing; it will not work with Cloudflare Images or Cloudflare Polish.\n *\n * @param path Your domain name, e.g. https://mysite.com\n * @returns Provider that provides an ImageLoader function\n *\n * @publicApi\n */\nconst provideCloudflareLoader = createImageLoader(createCloudflareUrl, ngDevMode ? ['https://<ZONE>/cdn-cgi/image/<OPTIONS>/<SOURCE-IMAGE>'] : undefined);\nfunction createCloudflareUrl(path, config) {\n let params = `format=auto`;\n if (config.width) {\n params += `,width=${config.width}`;\n }\n // Cloudflare image URLs format:\n // https://developers.cloudflare.com/images/image-resizing/url-format/\n return `${path}/cdn-cgi/image/${params}/${config.src}`;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Name and URL tester for Cloudinary.\n */\nconst cloudinaryLoaderInfo = {\n name: 'Cloudinary',\n testUrl: isCloudinaryUrl\n};\nconst CLOUDINARY_LOADER_REGEX = /https?\\:\\/\\/[^\\/]+\\.cloudinary\\.com\\/.+/;\n/**\n * Tests whether a URL is from Cloudinary CDN.\n */\nfunction isCloudinaryUrl(url) {\n return CLOUDINARY_LOADER_REGEX.test(url);\n}\n/**\n * Function that generates an ImageLoader for Cloudinary and turns it into an Angular provider.\n *\n * @param path Base URL of your Cloudinary images\n * This URL should match one of the following formats:\n * https://res.cloudinary.com/mysite\n * https://mysite.cloudinary.com\n * https://subdomain.mysite.com\n * @returns Set of providers to configure the Cloudinary loader.\n *\n * @publicApi\n */\nconst provideCloudinaryLoader = createImageLoader(createCloudinaryUrl, ngDevMode ?\n [\n 'https://res.cloudinary.com/mysite', 'https://mysite.cloudinary.com',\n 'https://subdomain.mysite.com'\n ] :\n undefined);\nfunction createCloudinaryUrl(path, config) {\n // Cloudinary image URLformat:\n // https://cloudinary.com/documentation/image_transformations#transformation_url_structure\n // Example of a Cloudinary image URL:\n // https://res.cloudinary.com/mysite/image/upload/c_scale,f_auto,q_auto,w_600/marketing/tile-topics-m.png\n let params = `f_auto,q_auto`; // sets image format and quality to \"auto\"\n if (config.width) {\n params += `,w_${config.width}`;\n }\n return `${path}/image/upload/${params}/${config.src}`;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Name and URL tester for ImageKit.\n */\nconst imageKitLoaderInfo = {\n name: 'ImageKit',\n testUrl: isImageKitUrl\n};\nconst IMAGE_KIT_LOADER_REGEX = /https?\\:\\/\\/[^\\/]+\\.imagekit\\.io\\/.+/;\n/**\n * Tests whether a URL is from ImageKit CDN.\n */\nfunction isImageKitUrl(url) {\n return IMAGE_KIT_LOADER_REGEX.test(url);\n}\n/**\n * Function that generates an ImageLoader for ImageKit and turns it into an Angular provider.\n *\n * @param path Base URL of your ImageKit images\n * This URL should match one of the following formats:\n * https://ik.imagekit.io/myaccount\n * https://subdomain.mysite.com\n * @returns Set of providers to configure the ImageKit loader.\n *\n * @publicApi\n */\nconst provideImageKitLoader = createImageLoader(createImagekitUrl, ngDevMode ? ['https://ik.imagekit.io/mysite', 'https://subdomain.mysite.com'] : undefined);\nfunction createImagekitUrl(path, config) {\n // Example of an ImageKit image URL:\n // https://ik.imagekit.io/demo/tr:w-300,h-300/medium_cafe_B1iTdD0C.jpg\n let params = `tr:q-auto`; // applies the \"auto quality\" transformation\n if (config.width) {\n params += `,w-${config.width}`;\n }\n return `${path}/${params}/${config.src}`;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Name and URL tester for Imgix.\n */\nconst imgixLoaderInfo = {\n name: 'Imgix',\n testUrl: isImgixUrl\n};\nconst IMGIX_LOADER_REGEX = /https?\\:\\/\\/[^\\/]+\\.imgix\\.net\\/.+/;\n/**\n * Tests whether a URL is from Imgix CDN.\n */\nfunction isImgixUrl(url) {\n return IMGIX_LOADER_REGEX.test(url);\n}\n/**\n * Function that generates an ImageLoader for Imgix and turns it into an Angular provider.\n *\n * @param path path to the desired Imgix origin,\n * e.g. https://somepath.imgix.net or https://images.mysite.com\n * @returns Set of providers to configure the Imgix loader.\n *\n * @publicApi\n */\nconst provideImgixLoader = createImageLoader(createImgixUrl, ngDevMode ? ['https://somepath.imgix.net/'] : undefined);\nfunction createImgixUrl(path, config) {\n const url = new URL(`${path}/${config.src}`);\n // This setting ensures the smallest allowable format is set.\n url.searchParams.set('auto', 'format');\n if (config.width) {\n url.searchParams.set('w', config.width.toString());\n }\n return url.href;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Assembles directive details string, useful for error messages.\nfunction imgDirectiveDetails(ngSrc, includeNgSrc = true) {\n const ngSrcInfo = includeNgSrc ? `(activated on an <img> element with the \\`ngSrc=\"${ngSrc}\"\\`) ` : '';\n return `The NgOptimizedImage directive ${ngSrcInfo}has detected that`;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Asserts that the application is in development mode. Throws an error if the application is in\n * production mode. This assert can be used to make sure that there is no dev-mode code invoked in\n * the prod mode accidentally.\n */\nfunction assertDevMode(checkName) {\n if (!ngDevMode) {\n throw new ɵRuntimeError(2958 /* RuntimeErrorCode.UNEXPECTED_DEV_MODE_CHECK_IN_PROD_MODE */, `Unexpected invocation of the ${checkName} in the prod mode. ` +\n `Please make sure that the prod mode is enabled for production builds.`);\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Observer that detects whether an image with `NgOptimizedImage`\n * is treated as a Largest Contentful Paint (LCP) element. If so,\n * asserts that the image has the `priority` attribute.\n *\n * Note: this is a dev-mode only class and it does not appear in prod bundles,\n * thus there is no `ngDevMode` use in the code.\n *\n * Based on https://web.dev/lcp/#measure-lcp-in-javascript.\n */\nclass LCPImageObserver {\n constructor() {\n // Map of full image URLs -> original `ngSrc` values.\n this.images = new Map();\n // Keep track of images for which `console.warn` was produced.\n this.alreadyWarned = new Set();\n this.window = null;\n this.observer = null;\n assertDevMode('LCP checker');\n const win = inject(DOCUMENT).defaultView;\n if (typeof win !== 'undefined' && typeof PerformanceObserver !== 'undefined') {\n this.window = win;\n this.observer = this.initPerformanceObserver();\n }\n }\n /**\n * Inits PerformanceObserver and subscribes to LCP events.\n * Based on https://web.dev/lcp/#measure-lcp-in-javascript\n */\n initPerformanceObserver() {\n const observer = new PerformanceObserver((entryList) => {\n const entries = entryList.getEntries();\n if (entries.length === 0)\n return;\n // We use the latest entry produced by the `PerformanceObserver` as the best\n // signal on which element is actually an LCP one. As an example, the first image to load on\n // a page, by virtue of being the only thing on the page so far, is often a LCP candidate\n // and gets reported by PerformanceObserver, but isn't necessarily the LCP element.\n const lcpElement = entries[entries.length - 1];\n // Cast to `any` due to missing `element` on the `LargestContentfulPaint` type of entry.\n // See https://developer.mozilla.org/en-US/docs/Web/API/LargestContentfulPaint\n const imgSrc = lcpElement.element?.src ?? '';\n // Exclude `data:` and `blob:` URLs, since they are not supported by the directive.\n if (imgSrc.startsWith('data:') || imgSrc.startsWith('blob:'))\n return;\n const imgNgSrc = this.images.get(imgSrc);\n if (imgNgSrc && !this.alreadyWarned.has(imgSrc)) {\n this.alreadyWarned.add(imgSrc);\n logMissingPriorityWarning(imgSrc);\n }\n });\n observer.observe({ type: 'largest-contentful-paint', buffered: true });\n return observer;\n }\n registerImage(rewrittenSrc, originalNgSrc) {\n if (!this.observer)\n return;\n this.images.set(getUrl(rewrittenSrc, this.window).href, originalNgSrc);\n }\n unregisterImage(rewrittenSrc) {\n if (!this.observer)\n return;\n this.images.delete(getUrl(rewrittenSrc, this.window).href);\n }\n ngOnDestroy() {\n if (!this.observer)\n return;\n this.observer.disconnect();\n this.images.clear();\n this.alreadyWarned.clear();\n }\n}\nLCPImageObserver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: LCPImageObserver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nLCPImageObserver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: LCPImageObserver, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: LCPImageObserver, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return []; } });\nfunction logMissingPriorityWarning(ngSrc) {\n const directiveDetails = imgDirectiveDetails(ngSrc);\n console.warn(ɵformatRuntimeError(2955 /* RuntimeErrorCode.LCP_IMG_MISSING_PRIORITY */, `${directiveDetails} this image is the Largest Contentful Paint (LCP) ` +\n `element but was not marked \"priority\". This image should be marked ` +\n `\"priority\" in order to prioritize its loading. ` +\n `To fix this, add the \"priority\" attribute.`));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Set of origins that are always excluded from the preconnect checks.\nconst INTERNAL_PRECONNECT_CHECK_BLOCKLIST = new Set(['localhost', '127.0.0.1', '0.0.0.0']);\n/**\n * Injection token to configure which origins should be excluded\n * from the preconnect checks. It can either be a single string or an array of strings\n * to represent a group of origins, for example:\n *\n * ```typescript\n * {provide: PRECONNECT_CHECK_BLOCKLIST, useValue: 'https://your-domain.com'}\n * ```\n *\n * or:\n *\n * ```typescript\n * {provide: PRECONNECT_CHECK_BLOCKLIST,\n * useValue: ['https://your-domain-1.com', 'https://your-domain-2.com']}\n * ```\n *\n * @publicApi\n */\nconst PRECONNECT_CHECK_BLOCKLIST = new InjectionToken('PRECONNECT_CHECK_BLOCKLIST');\n/**\n * Contains the logic to detect whether an image, marked with the \"priority\" attribute\n * has a corresponding `<link rel=\"preconnect\">` tag in the `document.head`.\n *\n * Note: this is a dev-mode only class, which should not appear in prod bundles,\n * thus there is no `ngDevMode` use in the code.\n */\nclass PreconnectLinkChecker {\n constructor() {\n this.document = inject(DOCUMENT);\n /**\n * Set of <link rel=\"preconnect\"> tags found on this page.\n * The `null` value indicates that there was no DOM query operation performed.\n */\n this.preconnectLinks = null;\n /*\n * Keep track of all already seen origin URLs to avoid repeating the same check.\n */\n this.alreadySeen = new Set();\n this.window = null;\n this.blocklist = new Set(INTERNAL_PRECONNECT_CHECK_BLOCKLIST);\n assertDevMode('preconnect link checker');\n const win = this.document.defaultView;\n if (typeof win !== 'undefined') {\n this.window = win;\n }\n const blocklist = inject(PRECONNECT_CHECK_BLOCKLIST, { optional: true });\n if (blocklist) {\n this.populateBlocklist(blocklist);\n }\n }\n populateBlocklist(origins) {\n if (Array.isArray(origins)) {\n deepForEach(origins, origin => {\n this.blocklist.add(extractHostname(origin));\n });\n }\n else {\n this.blocklist.add(extractHostname(origins));\n }\n }\n /**\n * Checks that a preconnect resource hint exists in the head fo rthe\n * given src.\n *\n * @param rewrittenSrc src formatted with loader\n * @param originalNgSrc ngSrc value\n */\n assertPreconnect(rewrittenSrc, originalNgSrc) {\n if (!this.window)\n return;\n const imgUrl = getUrl(rewrittenSrc, this.window);\n if (this.blocklist.has(imgUrl.hostname) || this.alreadySeen.has(imgUrl.origin))\n return;\n // Register this origin as seen, so we don't check it again later.\n this.alreadySeen.add(imgUrl.origin);\n if (!this.preconnectLinks) {\n // Note: we query for preconnect links only *once* and cache the results\n // for the entire lifespan of an application, since it's unlikely that the\n // list would change frequently. This allows to make sure there are no\n // performance implications of making extra DOM lookups for each image.\n this.preconnectLinks = this.queryPreconnectLinks();\n }\n if (!this.preconnectLinks.has(imgUrl.origin)) {\n console.warn(ɵformatRuntimeError(2956 /* RuntimeErrorCode.PRIORITY_IMG_MISSING_PRECONNECT_TAG */, `${imgDirectiveDetails(originalNgSrc)} there is no preconnect tag present for this ` +\n `image. Preconnecting to the origin(s) that serve priority images ensures that these ` +\n `images are delivered as soon as possible. To fix this, please add the following ` +\n `element into the <head> of the document:\\n` +\n ` <link rel=\"preconnect\" href=\"${imgUrl.origin}\">`));\n }\n }\n queryPreconnectLinks() {\n const preconnectUrls = new Set();\n const selector = 'link[rel=preconnect]';\n const links = Array.from(this.document.querySelectorAll(selector));\n for (let link of links) {\n const url = getUrl(link.href, this.window);\n preconnectUrls.add(url.origin);\n }\n return preconnectUrls;\n }\n ngOnDestroy() {\n this.preconnectLinks?.clear();\n this.alreadySeen.clear();\n }\n}\nPreconnectLinkChecker.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: PreconnectLinkChecker, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nPreconnectLinkChecker.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: PreconnectLinkChecker, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: PreconnectLinkChecker, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return []; } });\n/**\n * Invokes a callback for each element in the array. Also invokes a callback\n * recursively for each nested array.\n */\nfunction deepForEach(input, fn) {\n for (let value of input) {\n Array.isArray(value) ? deepForEach(value, fn) : fn(value);\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * In SSR scenarios, a preload `<link>` element is generated for priority images.\n * Having a large number of preload tags may negatively affect the performance,\n * so we warn developers (by throwing an error) if the number of preloaded images\n * is above a certain threshold. This const specifies this threshold.\n */\nconst DEFAULT_PRELOADED_IMAGES_LIMIT = 5;\n/**\n * Helps to keep track of priority images that already have a corresponding\n * preload tag (to avoid generating multiple preload tags with the same URL).\n *\n * This Set tracks the original src passed into the `ngSrc` input not the src after it has been\n * run through the specified `IMAGE_LOADER`.\n */\nconst PRELOADED_IMAGES = new InjectionToken('NG_OPTIMIZED_PRELOADED_IMAGES', { providedIn: 'root', factory: () => new Set() });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description Contains the logic needed to track and add preload link tags to the `<head>` tag. It\n * will also track what images have already had preload link tags added so as to not duplicate link\n * tags.\n *\n * In dev mode this service will validate that the number of preloaded images does not exceed the\n * configured default preloaded images limit: {@link DEFAULT_PRELOADED_IMAGES_LIMIT}.\n */\nclass PreloadLinkCreator {\n constructor() {\n this.preloadedImages = inject(PRELOADED_IMAGES);\n this.document = inject(DOCUMENT);\n }\n /**\n * @description Add a preload `<link>` to the `<head>` of the `index.html` that is served from the\n * server while using Angular Universal and SSR to kick off image loads for high priority images.\n *\n * The `sizes` (passed in from the user) and `srcset` (parsed and formatted from `ngSrcset`)\n * properties used to set the corresponding attributes, `imagesizes` and `imagesrcset`\n * respectively, on the preload `<link>` tag so that the correctly sized image is preloaded from\n * the CDN.\n *\n * {@link https://web.dev/preload-responsive-images/#imagesrcset-and-imagesizes}\n *\n * @param renderer The `Renderer2` passed in from the directive\n * @param src The original src of the image that is set on the `ngSrc` input.\n * @param srcset The parsed and formatted srcset created from the `ngSrcset` input\n * @param sizes The value of the `sizes` attribute passed in to the `<img>` tag\n */\n createPreloadLinkTag(renderer, src, srcset, sizes) {\n if (ngDevMode) {\n if (this.preloadedImages.size >= DEFAULT_PRELOADED_IMAGES_LIMIT) {\n throw new ɵRuntimeError(2961 /* RuntimeErrorCode.TOO_MANY_PRELOADED_IMAGES */, ngDevMode &&\n `The \\`NgOptimizedImage\\` directive has detected that more than ` +\n `${DEFAULT_PRELOADED_IMAGES_LIMIT} images were marked as priority. ` +\n `This might negatively affect an overall performance of the page. ` +\n `To fix this, remove the \"priority\" attribute from images with less priority.`);\n }\n }\n if (this.preloadedImages.has(src)) {\n return;\n }\n this.preloadedImages.add(src);\n const preload = renderer.createElement('link');\n renderer.setAttribute(preload, 'as', 'image');\n renderer.setAttribute(preload, 'href', src);\n renderer.setAttribute(preload, 'rel', 'preload');\n renderer.setAttribute(preload, 'fetchpriority', 'high');\n if (sizes) {\n renderer.setAttribute(preload, 'imageSizes', sizes);\n }\n if (srcset) {\n renderer.setAttribute(preload, 'imageSrcset', srcset);\n }\n renderer.appendChild(this.document.head, preload);\n }\n}\nPreloadLinkCreator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: PreloadLinkCreator, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nPreloadLinkCreator.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: PreloadLinkCreator, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: PreloadLinkCreator, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * When a Base64-encoded image is passed as an input to the `NgOptimizedImage` directive,\n * an error is thrown. The image content (as a string) might be very long, thus making\n * it hard to read an error message if the entire string is included. This const defines\n * the number of characters that should be included into the error message. The rest\n * of the content is truncated.\n */\nconst BASE64_IMG_MAX_LENGTH_IN_ERROR = 50;\n/**\n * RegExpr to determine whether a src in a srcset is using width descriptors.\n * Should match something like: \"100w, 200w\".\n */\nconst VALID_WIDTH_DESCRIPTOR_SRCSET = /^((\\s*\\d+w\\s*(,|$)){1,})$/;\n/**\n * RegExpr to determine whether a src in a srcset is using density descriptors.\n * Should match something like: \"1x, 2x, 50x\". Also supports decimals like \"1.5x, 1.50x\".\n */\nconst VALID_DENSITY_DESCRIPTOR_SRCSET = /^((\\s*\\d+(\\.\\d+)?x\\s*(,|$)){1,})$/;\n/**\n * Srcset values with a density descriptor higher than this value will actively\n * throw an error. Such densities are not permitted as they cause image sizes\n * to be unreasonably large and slow down LCP.\n */\nconst ABSOLUTE_SRCSET_DENSITY_CAP = 3;\n/**\n * Used only in error message text to communicate best practices, as we will\n * only throw based on the slightly more conservative ABSOLUTE_SRCSET_DENSITY_CAP.\n */\nconst RECOMMENDED_SRCSET_DENSITY_CAP = 2;\n/**\n * Used in generating automatic density-based srcsets\n */\nconst DENSITY_SRCSET_MULTIPLIERS = [1, 2];\n/**\n * Used to determine which breakpoints to use on full-width images\n */\nconst VIEWPORT_BREAKPOINT_CUTOFF = 640;\n/**\n * Used to determine whether two aspect ratios are similar in value.\n */\nconst ASPECT_RATIO_TOLERANCE = .1;\n/**\n * Used to determine whether the image has been requested at an overly\n * large size compared to the actual rendered image size (after taking\n * into account a typical device pixel ratio). In pixels.\n */\nconst OVERSIZED_IMAGE_TOLERANCE = 1000;\n/**\n * Used to limit automatic srcset generation of very large sources for\n * fixed-size images. In pixels.\n */\nconst FIXED_SRCSET_WIDTH_LIMIT = 1920;\nconst FIXED_SRCSET_HEIGHT_LIMIT = 1080;\n/** Info about built-in loaders we can test for. */\nconst BUILT_IN_LOADERS = [imgixLoaderInfo, imageKitLoaderInfo, cloudinaryLoaderInfo];\nconst defaultConfig = {\n breakpoints: [16, 32, 48, 64, 96, 128, 256, 384, 640, 750, 828, 1080, 1200, 1920, 2048, 3840],\n};\n/**\n * Injection token that configures the image optimized image functionality.\n *\n * @see `NgOptimizedImage`\n * @publicApi\n * @developerPreview\n */\nconst IMAGE_CONFIG = new InjectionToken('ImageConfig', { providedIn: 'root', factory: () => defaultConfig });\n/**\n * Directive that improves image loading performance by enforcing best practices.\n *\n * `NgOptimizedImage` ensures that the loading of the Largest Contentful Paint (LCP) image is\n * prioritized by:\n * - Automatically setting the `fetchpriority` attribute on the `<img>` tag\n * - Lazy loading non-priority images by default\n * - Asserting that there is a corresponding preconnect link tag in the document head\n *\n * In addition, the directive:\n * - Generates appropriate asset URLs if a corresponding `ImageLoader` function is provided\n * - Automatically generates a srcset\n * - Requires that `width` and `height` are set\n * - Warns if `width` or `height` have been set incorrectly\n * - Warns if the image will be visually distorted when rendered\n *\n * @usageNotes\n * The `NgOptimizedImage` directive is marked as [standalone](guide/standalone-components) and can\n * be imported directly.\n *\n * Follow the steps below to enable and use the directive:\n * 1. Import it into the necessary NgModule or a standalone Component.\n * 2. Optionally provide an `ImageLoader` if you use an image hosting service.\n * 3. Update the necessary `<img>` tags in templates and replace `src` attributes with `ngSrc`.\n * Using a `ngSrc` allows the directive to control when the `src` gets set, which triggers an image\n * download.\n *\n * Step 1: import the `NgOptimizedImage` directive.\n *\n * ```typescript\n * import { NgOptimizedImage } from '@angular/common';\n *\n * // Include it into the necessary NgModule\n * @NgModule({\n * imports: [NgOptimizedImage],\n * })\n * class AppModule {}\n *\n * // ... or a standalone Component\n * @Component({\n * standalone: true\n * imports: [NgOptimizedImage],\n * })\n * class MyStandaloneComponent {}\n * ```\n *\n * Step 2: configure a loader.\n *\n * To use the **default loader**: no additional code changes are necessary. The URL returned by the\n * generic loader will always match the value of \"src\". In other words, this loader applies no\n * transformations to the resource URL and the value of the `ngSrc` attribute will be used as is.\n *\n * To use an existing loader for a **third-party image service**: add the provider factory for your\n * chosen service to the `providers` array. In the example below, the Imgix loader is used:\n *\n * ```typescript\n * import {provideImgixLoader} from '@angular/common';\n *\n * // Call the function and add the result to the `providers` array:\n * providers: [\n * provideImgixLoader(\"https://my.base.url/\"),\n * ],\n * ```\n *\n * The `NgOptimizedImage` directive provides the following functions:\n * - `provideCloudflareLoader`\n * - `provideCloudinaryLoader`\n * - `provideImageKitLoader`\n * - `provideImgixLoader`\n *\n * If you use a different image provider, you can create a custom loader function as described\n * below.\n *\n * To use a **custom loader**: provide your loader function as a value for the `IMAGE_LOADER` DI\n * token.\n *\n * ```typescript\n * import {IMAGE_LOADER, ImageLoaderConfig} from '@angular/common';\n *\n * // Configure the loader using the `IMAGE_LOADER` token.\n * providers: [\n * {\n * provide: IMAGE_LOADER,\n * useValue: (config: ImageLoaderConfig) => {\n * return `https://example.com/${config.src}-${config.width}.jpg}`;\n * }\n * },\n * ],\n * ```\n *\n * Step 3: update `<img>` tags in templates to use `ngSrc` instead of `src`.\n *\n * ```\n * <img ngSrc=\"logo.png\" width=\"200\" height=\"100\">\n * ```\n *\n * @publicApi\n */\nclass NgOptimizedImage {\n constructor() {\n this.imageLoader = inject(IMAGE_LOADER);\n this.config = processConfig(inject(IMAGE_CONFIG));\n this.renderer = inject(Renderer2);\n this.imgElement = inject(ElementRef).nativeElement;\n this.injector = inject(Injector);\n this.isServer = isPlatformServer(inject(PLATFORM_ID));\n this.preloadLinkChecker = inject(PreloadLinkCreator);\n // a LCP image observer - should be injected only in the dev mode\n this.lcpObserver = ngDevMode ? this.injector.get(LCPImageObserver) : null;\n /**\n * Calculate the rewritten `src` once and store it.\n * This is needed to avoid repetitive calculations and make sure the directive cleanup in the\n * `ngOnDestroy` does not rely on the `IMAGE_LOADER` logic (which in turn can rely on some other\n * instance that might be already destroyed).\n */\n this._renderedSrc = null;\n this._priority = false;\n this._disableOptimizedSrcset = false;\n this._fill = false;\n }\n /**\n * For responsive images: the intrinsic width of the image in pixels.\n * For fixed size images: the desired rendered width of the image in pixels.\n */\n set width(value) {\n ngDevMode && assertGreaterThanZero(this, value, 'width');\n this._width = inputToInteger(value);\n }\n get width() {\n return this._width;\n }\n /**\n * For responsive images: the intrinsic height of the image in pixels.\n * For fixed size images: the desired rendered height of the image in pixels.* The intrinsic\n * height of the image in pixels.\n */\n set height(value) {\n ngDevMode && assertGreaterThanZero(this, value, 'height');\n this._height = inputToInteger(value);\n }\n get height() {\n return this._height;\n }\n /**\n * Indicates whether this image should have a high priority.\n */\n set priority(value) {\n this._priority = inputToBoolean(value);\n }\n get priority() {\n return this._priority;\n }\n /**\n * Disables automatic srcset generation for this image.\n */\n set disableOptimizedSrcset(value) {\n this._disableOptimizedSrcset = inputToBoolean(value);\n }\n get disableOptimizedSrcset() {\n return this._disableOptimizedSrcset;\n }\n /**\n * Sets the image to \"fill mode\", which eliminates the height/width requirement and adds\n * styles such that the image fills its containing element.\n *\n * @developerPreview\n */\n set fill(value) {\n this._fill = inputToBoolean(value);\n }\n get fill() {\n return this._fill;\n }\n /** @nodoc */\n ngOnInit() {\n if (ngDevMode) {\n assertNonEmptyInput(this, 'ngSrc', this.ngSrc);\n assertValidNgSrcset(this, this.ngSrcset);\n assertNoConflictingSrc(this);\n if (this.ngSrcset) {\n assertNoConflictingSrcset(this);\n }\n assertNotBase64Image(this);\n assertNotBlobUrl(this);\n if (this.fill) {\n assertEmptyWidthAndHeight(this);\n assertNonZeroRenderedHeight(this, this.imgElement, this.renderer);\n }\n else {\n assertNonEmptyWidthAndHeight(this);\n // Only check for distorted images when not in fill mode, where\n // images may be intentionally stretched, cropped or letterboxed.\n assertNoImageDistortion(this, this.imgElement, this.renderer);\n }\n assertValidLoadingInput(this);\n if (!this.ngSrcset) {\n assertNoComplexSizes(this);\n }\n assertNotMissingBuiltInLoader(this.ngSrc, this.imageLoader);\n if (this.priority) {\n const checker = this.injector.get(PreconnectLinkChecker);\n checker.assertPreconnect(this.getRewrittenSrc(), this.ngSrc);\n }\n else {\n // Monitor whether an image is an LCP element only in case\n // the `priority` attribute is missing. Otherwise, an image\n // has the necessary settings and no extra checks are required.\n if (this.lcpObserver !== null) {\n const ngZone = this.injector.get(NgZone);\n ngZone.runOutsideAngular(() => {\n this.lcpObserver.registerImage(this.getRewrittenSrc(), this.ngSrc);\n });\n }\n }\n }\n this.setHostAttributes();\n }\n setHostAttributes() {\n // Must set width/height explicitly in case they are bound (in which case they will\n // only be reflected and not found by the browser)\n if (this.fill) {\n if (!this.sizes) {\n this.sizes = '100vw';\n }\n }\n else {\n this.setHostAttribute('width', this.width.toString());\n this.setHostAttribute('height', this.height.toString());\n }\n this.setHostAttribute('loading', this.getLoadingBehavior());\n this.setHostAttribute('fetchpriority', this.getFetchPriority());\n // The `src` and `srcset` attributes should be set last since other attributes\n // could affect the image's loading behavior.\n const rewrittenSrc = this.getRewrittenSrc();\n this.setHostAttribute('src', rewrittenSrc);\n let rewrittenSrcset = undefined;\n if (this.sizes) {\n this.setHostAttribute('sizes', this.sizes);\n }\n if (this.ngSrcset) {\n rewrittenSrcset = this.getRewrittenSrcset();\n }\n else if (this.shouldGenerateAutomaticSrcset()) {\n rewrittenSrcset = this.getAutomaticSrcset();\n }\n if (rewrittenSrcset) {\n this.setHostAttribute('srcset', rewrittenSrcset);\n }\n if (this.isServer && this.priority) {\n this.preloadLinkChecker.createPreloadLinkTag(this.renderer, rewrittenSrc, rewrittenSrcset, this.sizes);\n }\n }\n /** @nodoc */\n ngOnChanges(changes) {\n if (ngDevMode) {\n assertNoPostInitInputChange(this, changes, [\n 'ngSrc',\n 'ngSrcset',\n 'width',\n 'height',\n 'priority',\n 'fill',\n 'loading',\n 'sizes',\n 'disableOptimizedSrcset',\n ]);\n }\n }\n getLoadingBehavior() {\n if (!this.priority && this.loading !== undefined) {\n return this.loading;\n }\n return this.priority ? 'eager' : 'lazy';\n }\n getFetchPriority() {\n return this.priority ? 'high' : 'auto';\n }\n getRewrittenSrc() {\n // ImageLoaderConfig supports setting a width property. However, we're not setting width here\n // because if the developer uses rendered width instead of intrinsic width in the HTML width\n // attribute, the image requested may be too small for 2x+ screens.\n if (!this._renderedSrc) {\n const imgConfig = { src: this.ngSrc };\n // Cache calculated image src to reuse it later in the code.\n this._renderedSrc = this.imageLoader(imgConfig);\n }\n return this._renderedSrc;\n }\n getRewrittenSrcset() {\n const widthSrcSet = VALID_WIDTH_DESCRIPTOR_SRCSET.test(this.ngSrcset);\n const finalSrcs = this.ngSrcset.split(',').filter(src => src !== '').map(srcStr => {\n srcStr = srcStr.trim();\n const width = widthSrcSet ? parseFloat(srcStr) : parseFloat(srcStr) * this.width;\n return `${this.imageLoader({ src: this.ngSrc, width })} ${srcStr}`;\n });\n return finalSrcs.join(', ');\n }\n getAutomaticSrcset() {\n if (this.sizes) {\n return this.getResponsiveSrcset();\n }\n else {\n return this.getFixedSrcset();\n }\n }\n getResponsiveSrcset() {\n const { breakpoints } = this.config;\n let filteredBreakpoints = breakpoints;\n if (this.sizes?.trim() === '100vw') {\n // Since this is a full-screen-width image, our srcset only needs to include\n // breakpoints with full viewport widths.\n filteredBreakpoints = breakpoints.filter(bp => bp >= VIEWPORT_BREAKPOINT_CUTOFF);\n }\n const finalSrcs = filteredBreakpoints.map(bp => `${this.imageLoader({ src: this.ngSrc, width: bp })} ${bp}w`);\n return finalSrcs.join(', ');\n }\n getFixedSrcset() {\n const finalSrcs = DENSITY_SRCSET_MULTIPLIERS.map(multiplier => `${this.imageLoader({ src: this.ngSrc, width: this.width * multiplier })} ${multiplier}x`);\n return finalSrcs.join(', ');\n }\n shouldGenerateAutomaticSrcset() {\n return !this._disableOptimizedSrcset && !this.srcset && this.imageLoader !== noopImageLoader &&\n !(this.width > FIXED_SRCSET_WIDTH_LIMIT || this.height > FIXED_SRCSET_HEIGHT_LIMIT);\n }\n /** @nodoc */\n ngOnDestroy() {\n if (ngDevMode) {\n if (!this.priority && this._renderedSrc !== null && this.lcpObserver !== null) {\n this.lcpObserver.unregisterImage(this._renderedSrc);\n }\n }\n }\n setHostAttribute(name, value) {\n this.renderer.setAttribute(this.imgElement, name, value);\n }\n}\nNgOptimizedImage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgOptimizedImage, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nNgOptimizedImage.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: NgOptimizedImage, isStandalone: true, selector: \"img[ngSrc]\", inputs: { ngSrc: \"ngSrc\", ngSrcset: \"ngSrcset\", sizes: \"sizes\", width: \"width\", height: \"height\", loading: \"loading\", priority: \"priority\", disableOptimizedSrcset: \"disableOptimizedSrcset\", fill: \"fill\", src: \"src\", srcset: \"srcset\" }, host: { properties: { \"style.position\": \"fill ? \\\"absolute\\\" : null\", \"style.width\": \"fill ? \\\"100%\\\" : null\", \"style.height\": \"fill ? \\\"100%\\\" : null\", \"style.inset\": \"fill ? \\\"0px\\\" : null\" } }, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgOptimizedImage, decorators: [{\n type: Directive,\n args: [{\n standalone: true,\n selector: 'img[ngSrc]',\n host: {\n '[style.position]': 'fill ? \"absolute\" : null',\n '[style.width]': 'fill ? \"100%\" : null',\n '[style.height]': 'fill ? \"100%\" : null',\n '[style.inset]': 'fill ? \"0px\" : null'\n }\n }]\n }], propDecorators: { ngSrc: [{\n type: Input\n }], ngSrcset: [{\n type: Input\n }], sizes: [{\n type: Input\n }], width: [{\n type: Input\n }], height: [{\n type: Input\n }], loading: [{\n type: Input\n }], priority: [{\n type: Input\n }], disableOptimizedSrcset: [{\n type: Input\n }], fill: [{\n type: Input\n }], src: [{\n type: Input\n }], srcset: [{\n type: Input\n }] } });\n/***** Helpers *****/\n/**\n * Convert input value to integer.\n */\nfunction inputToInteger(value) {\n return typeof value === 'string' ? parseInt(value, 10) : value;\n}\n/**\n * Convert input value to boolean.\n */\nfunction inputToBoolean(value) {\n return value != null && `${value}` !== 'false';\n}\n/**\n * Sorts provided config breakpoints and uses defaults.\n */\nfunction processConfig(config) {\n let sortedBreakpoints = {};\n if (config.breakpoints) {\n sortedBreakpoints.breakpoints = config.breakpoints.sort((a, b) => a - b);\n }\n return Object.assign({}, defaultConfig, config, sortedBreakpoints);\n}\n/***** Assert functions *****/\n/**\n * Verifies that there is no `src` set on a host element.\n */\nfunction assertNoConflictingSrc(dir) {\n if (dir.src) {\n throw new ɵRuntimeError(2950 /* RuntimeErrorCode.UNEXPECTED_SRC_ATTR */, `${imgDirectiveDetails(dir.ngSrc)} both \\`src\\` and \\`ngSrc\\` have been set. ` +\n `Supplying both of these attributes breaks lazy loading. ` +\n `The NgOptimizedImage directive sets \\`src\\` itself based on the value of \\`ngSrc\\`. ` +\n `To fix this, please remove the \\`src\\` attribute.`);\n }\n}\n/**\n * Verifies that there is no `srcset` set on a host element.\n */\nfunction assertNoConflictingSrcset(dir) {\n if (dir.srcset) {\n throw new ɵRuntimeError(2951 /* RuntimeErrorCode.UNEXPECTED_SRCSET_ATTR */, `${imgDirectiveDetails(dir.ngSrc)} both \\`srcset\\` and \\`ngSrcset\\` have been set. ` +\n `Supplying both of these attributes breaks lazy loading. ` +\n `The NgOptimizedImage directive sets \\`srcset\\` itself based on the value of ` +\n `\\`ngSrcset\\`. To fix this, please remove the \\`srcset\\` attribute.`);\n }\n}\n/**\n * Verifies that the `ngSrc` is not a Base64-encoded image.\n */\nfunction assertNotBase64Image(dir) {\n let ngSrc = dir.ngSrc.trim();\n if (ngSrc.startsWith('data:')) {\n if (ngSrc.length > BASE64_IMG_MAX_LENGTH_IN_ERROR) {\n ngSrc = ngSrc.substring(0, BASE64_IMG_MAX_LENGTH_IN_ERROR) + '...';\n }\n throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc, false)} \\`ngSrc\\` is a Base64-encoded string ` +\n `(${ngSrc}). NgOptimizedImage does not support Base64-encoded strings. ` +\n `To fix this, disable the NgOptimizedImage directive for this element ` +\n `by removing \\`ngSrc\\` and using a standard \\`src\\` attribute instead.`);\n }\n}\n/**\n * Verifies that the 'sizes' only includes responsive values.\n */\nfunction assertNoComplexSizes(dir) {\n let sizes = dir.sizes;\n if (sizes?.match(/((\\)|,)\\s|^)\\d+px/)) {\n throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc, false)} \\`sizes\\` was set to a string including ` +\n `pixel values. For automatic \\`srcset\\` generation, \\`sizes\\` must only include responsive ` +\n `values, such as \\`sizes=\"50vw\"\\` or \\`sizes=\"(min-width: 768px) 50vw, 100vw\"\\`. ` +\n `To fix this, modify the \\`sizes\\` attribute, or provide your own \\`ngSrcset\\` value directly.`);\n }\n}\n/**\n * Verifies that the `ngSrc` is not a Blob URL.\n */\nfunction assertNotBlobUrl(dir) {\n const ngSrc = dir.ngSrc.trim();\n if (ngSrc.startsWith('blob:')) {\n throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \\`ngSrc\\` was set to a blob URL (${ngSrc}). ` +\n `Blob URLs are not supported by the NgOptimizedImage directive. ` +\n `To fix this, disable the NgOptimizedImage directive for this element ` +\n `by removing \\`ngSrc\\` and using a regular \\`src\\` attribute instead.`);\n }\n}\n/**\n * Verifies that the input is set to a non-empty string.\n */\nfunction assertNonEmptyInput(dir, name, value) {\n const isString = typeof value === 'string';\n const isEmptyString = isString && value.trim() === '';\n if (!isString || isEmptyString) {\n throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \\`${name}\\` has an invalid value ` +\n `(\\`${value}\\`). To fix this, change the value to a non-empty string.`);\n }\n}\n/**\n * Verifies that the `ngSrcset` is in a valid format, e.g. \"100w, 200w\" or \"1x, 2x\".\n */\nfunction assertValidNgSrcset(dir, value) {\n if (value == null)\n return;\n assertNonEmptyInput(dir, 'ngSrcset', value);\n const stringVal = value;\n const isValidWidthDescriptor = VALID_WIDTH_DESCRIPTOR_SRCSET.test(stringVal);\n const isValidDensityDescriptor = VALID_DENSITY_DESCRIPTOR_SRCSET.test(stringVal);\n if (isValidDensityDescriptor) {\n assertUnderDensityCap(dir, stringVal);\n }\n const isValidSrcset = isValidWidthDescriptor || isValidDensityDescriptor;\n if (!isValidSrcset) {\n throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \\`ngSrcset\\` has an invalid value (\\`${value}\\`). ` +\n `To fix this, supply \\`ngSrcset\\` using a comma-separated list of one or more width ` +\n `descriptors (e.g. \"100w, 200w\") or density descriptors (e.g. \"1x, 2x\").`);\n }\n}\nfunction assertUnderDensityCap(dir, value) {\n const underDensityCap = value.split(',').every(num => num === '' || parseFloat(num) <= ABSOLUTE_SRCSET_DENSITY_CAP);\n if (!underDensityCap) {\n throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the \\`ngSrcset\\` contains an unsupported image density:` +\n `\\`${value}\\`. NgOptimizedImage generally recommends a max image density of ` +\n `${RECOMMENDED_SRCSET_DENSITY_CAP}x but supports image densities up to ` +\n `${ABSOLUTE_SRCSET_DENSITY_CAP}x. The human eye cannot distinguish between image densities ` +\n `greater than ${RECOMMENDED_SRCSET_DENSITY_CAP}x - which makes them unnecessary for ` +\n `most use cases. Images that will be pinch-zoomed are typically the primary use case for ` +\n `${ABSOLUTE_SRCSET_DENSITY_CAP}x images. Please remove the high density descriptor and try again.`);\n }\n}\n/**\n * Creates a `RuntimeError` instance to represent a situation when an input is set after\n * the directive has initialized.\n */\nfunction postInitInputChangeError(dir, inputName) {\n let reason;\n if (inputName === 'width' || inputName === 'height') {\n reason = `Changing \\`${inputName}\\` may result in different attribute value ` +\n `applied to the underlying image element and cause layout shifts on a page.`;\n }\n else {\n reason = `Changing the \\`${inputName}\\` would have no effect on the underlying ` +\n `image element, because the resource loading has already occurred.`;\n }\n return new ɵRuntimeError(2953 /* RuntimeErrorCode.UNEXPECTED_INPUT_CHANGE */, `${imgDirectiveDetails(dir.ngSrc)} \\`${inputName}\\` was updated after initialization. ` +\n `The NgOptimizedImage directive will not react to this input change. ${reason} ` +\n `To fix this, either switch \\`${inputName}\\` to a static value ` +\n `or wrap the image element in an *ngIf that is gated on the necessary value.`);\n}\n/**\n * Verify that none of the listed inputs has changed.\n */\nfunction assertNoPostInitInputChange(dir, changes, inputs) {\n inputs.forEach(input => {\n const isUpdated = changes.hasOwnProperty(input);\n if (isUpdated && !changes[input].isFirstChange()) {\n if (input === 'ngSrc') {\n // When the `ngSrc` input changes, we detect that only in the\n // `ngOnChanges` hook, thus the `ngSrc` is already set. We use\n // `ngSrc` in the error message, so we use a previous value, but\n // not the updated one in it.\n dir = { ngSrc: changes[input].previousValue };\n }\n throw postInitInputChangeError(dir, input);\n }\n });\n}\n/**\n * Verifies that a specified input is a number greater than 0.\n */\nfunction assertGreaterThanZero(dir, inputValue, inputName) {\n const validNumber = typeof inputValue === 'number' && inputValue > 0;\n const validString = typeof inputValue === 'string' && /^\\d+$/.test(inputValue.trim()) && parseInt(inputValue) > 0;\n if (!validNumber && !validString) {\n throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \\`${inputName}\\` has an invalid value ` +\n `(\\`${inputValue}\\`). To fix this, provide \\`${inputName}\\` ` +\n `as a number greater than 0.`);\n }\n}\n/**\n * Verifies that the rendered image is not visually distorted. Effectively this is checking:\n * - Whether the \"width\" and \"height\" attributes reflect the actual dimensions of the image.\n * - Whether image styling is \"correct\" (see below for a longer explanation).\n */\nfunction assertNoImageDistortion(dir, img, renderer) {\n const removeListenerFn = renderer.listen(img, 'load', () => {\n removeListenerFn();\n // TODO: `clientWidth`, `clientHeight`, `naturalWidth` and `naturalHeight`\n // are typed as number, but we run `parseFloat` (which accepts strings only).\n // Verify whether `parseFloat` is needed in the cases below.\n const renderedWidth = parseFloat(img.clientWidth);\n const renderedHeight = parseFloat(img.clientHeight);\n const renderedAspectRatio = renderedWidth / renderedHeight;\n const nonZeroRenderedDimensions = renderedWidth !== 0 && renderedHeight !== 0;\n const intrinsicWidth = parseFloat(img.naturalWidth);\n const intrinsicHeight = parseFloat(img.naturalHeight);\n const intrinsicAspectRatio = intrinsicWidth / intrinsicHeight;\n const suppliedWidth = dir.width;\n const suppliedHeight = dir.height;\n const suppliedAspectRatio = suppliedWidth / suppliedHeight;\n // Tolerance is used to account for the impact of subpixel rendering.\n // Due to subpixel rendering, the rendered, intrinsic, and supplied\n // aspect ratios of a correctly configured image may not exactly match.\n // For example, a `width=4030 height=3020` image might have a rendered\n // size of \"1062w, 796.48h\". (An aspect ratio of 1.334... vs. 1.333...)\n const inaccurateDimensions = Math.abs(suppliedAspectRatio - intrinsicAspectRatio) > ASPECT_RATIO_TOLERANCE;\n const stylingDistortion = nonZeroRenderedDimensions &&\n Math.abs(intrinsicAspectRatio - renderedAspectRatio) > ASPECT_RATIO_TOLERANCE;\n if (inaccurateDimensions) {\n console.warn(ɵformatRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the aspect ratio of the image does not match ` +\n `the aspect ratio indicated by the width and height attributes. ` +\n `\\nIntrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h ` +\n `(aspect-ratio: ${intrinsicAspectRatio}). \\nSupplied width and height attributes: ` +\n `${suppliedWidth}w x ${suppliedHeight}h (aspect-ratio: ${suppliedAspectRatio}). ` +\n `\\nTo fix this, update the width and height attributes.`));\n }\n else if (stylingDistortion) {\n console.warn(ɵformatRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the aspect ratio of the rendered image ` +\n `does not match the image's intrinsic aspect ratio. ` +\n `\\nIntrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h ` +\n `(aspect-ratio: ${intrinsicAspectRatio}). \\nRendered image size: ` +\n `${renderedWidth}w x ${renderedHeight}h (aspect-ratio: ` +\n `${renderedAspectRatio}). \\nThis issue can occur if \"width\" and \"height\" ` +\n `attributes are added to an image without updating the corresponding ` +\n `image styling. To fix this, adjust image styling. In most cases, ` +\n `adding \"height: auto\" or \"width: auto\" to the image styling will fix ` +\n `this issue.`));\n }\n else if (!dir.ngSrcset && nonZeroRenderedDimensions) {\n // If `ngSrcset` hasn't been set, sanity check the intrinsic size.\n const recommendedWidth = RECOMMENDED_SRCSET_DENSITY_CAP * renderedWidth;\n const recommendedHeight = RECOMMENDED_SRCSET_DENSITY_CAP * renderedHeight;\n const oversizedWidth = (intrinsicWidth - recommendedWidth) >= OVERSIZED_IMAGE_TOLERANCE;\n const oversizedHeight = (intrinsicHeight - recommendedHeight) >= OVERSIZED_IMAGE_TOLERANCE;\n if (oversizedWidth || oversizedHeight) {\n console.warn(ɵformatRuntimeError(2960 /* RuntimeErrorCode.OVERSIZED_IMAGE */, `${imgDirectiveDetails(dir.ngSrc)} the intrinsic image is significantly ` +\n `larger than necessary. ` +\n `\\nRendered image size: ${renderedWidth}w x ${renderedHeight}h. ` +\n `\\nIntrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h. ` +\n `\\nRecommended intrinsic image size: ${recommendedWidth}w x ${recommendedHeight}h. ` +\n `\\nNote: Recommended intrinsic image size is calculated assuming a maximum DPR of ` +\n `${RECOMMENDED_SRCSET_DENSITY_CAP}. To improve loading time, resize the image ` +\n `or consider using the \"ngSrcset\" and \"sizes\" attributes.`));\n }\n }\n });\n}\n/**\n * Verifies that a specified input is set.\n */\nfunction assertNonEmptyWidthAndHeight(dir) {\n let missingAttributes = [];\n if (dir.width === undefined)\n missingAttributes.push('width');\n if (dir.height === undefined)\n missingAttributes.push('height');\n if (missingAttributes.length > 0) {\n throw new ɵRuntimeError(2954 /* RuntimeErrorCode.REQUIRED_INPUT_MISSING */, `${imgDirectiveDetails(dir.ngSrc)} these required attributes ` +\n `are missing: ${missingAttributes.map(attr => `\"${attr}\"`).join(', ')}. ` +\n `Including \"width\" and \"height\" attributes will prevent image-related layout shifts. ` +\n `To fix this, include \"width\" and \"height\" attributes on the image tag or turn on ` +\n `\"fill\" mode with the \\`fill\\` attribute.`);\n }\n}\n/**\n * Verifies that width and height are not set. Used in fill mode, where those attributes don't make\n * sense.\n */\nfunction assertEmptyWidthAndHeight(dir) {\n if (dir.width || dir.height) {\n throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the attributes \\`height\\` and/or \\`width\\` are present ` +\n `along with the \\`fill\\` attribute. Because \\`fill\\` mode causes an image to fill its containing ` +\n `element, the size attributes have no effect and should be removed.`);\n }\n}\n/**\n * Verifies that the rendered image has a nonzero height. If the image is in fill mode, provides\n * guidance that this can be caused by the containing element's CSS position property.\n */\nfunction assertNonZeroRenderedHeight(dir, img, renderer) {\n const removeListenerFn = renderer.listen(img, 'load', () => {\n removeListenerFn();\n const renderedHeight = parseFloat(img.clientHeight);\n if (dir.fill && renderedHeight === 0) {\n console.warn(ɵformatRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the height of the fill-mode image is zero. ` +\n `This is likely because the containing element does not have the CSS 'position' ` +\n `property set to one of the following: \"relative\", \"fixed\", or \"absolute\". ` +\n `To fix this problem, make sure the container element has the CSS 'position' ` +\n `property defined and the height of the element is not zero.`));\n }\n });\n}\n/**\n * Verifies that the `loading` attribute is set to a valid input &\n * is not used on priority images.\n */\nfunction assertValidLoadingInput(dir) {\n if (dir.loading && dir.priority) {\n throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the \\`loading\\` attribute ` +\n `was used on an image that was marked \"priority\". ` +\n `Setting \\`loading\\` on priority images is not allowed ` +\n `because these images will always be eagerly loaded. ` +\n `To fix this, remove the “loading” attribute from the priority image.`);\n }\n const validInputs = ['auto', 'eager', 'lazy'];\n if (typeof dir.loading === 'string' && !validInputs.includes(dir.loading)) {\n throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the \\`loading\\` attribute ` +\n `has an invalid value (\\`${dir.loading}\\`). ` +\n `To fix this, provide a valid value (\"lazy\", \"eager\", or \"auto\").`);\n }\n}\n/**\n * Warns if NOT using a loader (falling back to the generic loader) and\n * the image appears to be hosted on one of the image CDNs for which\n * we do have a built-in image loader. Suggests switching to the\n * built-in loader.\n *\n * @param ngSrc Value of the ngSrc attribute\n * @param imageLoader ImageLoader provided\n */\nfunction assertNotMissingBuiltInLoader(ngSrc, imageLoader) {\n if (imageLoader === noopImageLoader) {\n let builtInLoaderName = '';\n for (const loader of BUILT_IN_LOADERS) {\n if (loader.testUrl(ngSrc)) {\n builtInLoaderName = loader.name;\n break;\n }\n }\n if (builtInLoaderName) {\n console.warn(ɵformatRuntimeError(2962 /* RuntimeErrorCode.MISSING_BUILTIN_LOADER */, `NgOptimizedImage: It looks like your images may be hosted on the ` +\n `${builtInLoaderName} CDN, but your app is not using Angular's ` +\n `built-in loader for that CDN. We recommend switching to use ` +\n `the built-in by calling \\`provide${builtInLoaderName}Loader()\\` ` +\n `in your \\`providers\\` and passing it your instance's base URL. ` +\n `If you don't want to use the built-in loader, define a custom ` +\n `loader function using IMAGE_LOADER to silence this warning.`));\n }\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { APP_BASE_HREF, AsyncPipe, CommonModule, CurrencyPipe, DATE_PIPE_DEFAULT_OPTIONS, DATE_PIPE_DEFAULT_TIMEZONE, DOCUMENT, DatePipe, DecimalPipe, FormStyle, FormatWidth, HashLocationStrategy, I18nPluralPipe, I18nSelectPipe, IMAGE_CONFIG, IMAGE_LOADER, JsonPipe, KeyValuePipe, LOCATION_INITIALIZED, Location, LocationStrategy, LowerCasePipe, NgClass, NgComponentOutlet, NgForOf as NgFor, NgForOf, NgForOfContext, NgIf, NgIfContext, NgLocaleLocalization, NgLocalization, NgOptimizedImage, NgPlural, NgPluralCase, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgTemplateOutlet, NumberFormatStyle, NumberSymbol, PRECONNECT_CHECK_BLOCKLIST, PathLocationStrategy, PercentPipe, PlatformLocation, Plural, SlicePipe, TitleCasePipe, TranslationWidth, UpperCasePipe, VERSION, ViewportScroller, WeekDay, XhrFactory, formatCurrency, formatDate, formatNumber, formatPercent, getCurrencySymbol, getLocaleCurrencyCode, getLocaleCurrencyName, getLocaleCurrencySymbol, getLocaleDateFormat, getLocaleDateTimeFormat, getLocaleDayNames, getLocaleDayPeriods, getLocaleDirection, getLocaleEraNames, getLocaleExtraDayPeriodRules, getLocaleExtraDayPeriods, getLocaleFirstDayOfWeek, getLocaleId, getLocaleMonthNames, getLocaleNumberFormat, getLocaleNumberSymbol, getLocalePluralCase, getLocaleTimeFormat, getLocaleWeekEndRange, getNumberOfCurrencyDigits, isPlatformBrowser, isPlatformServer, isPlatformWorkerApp, isPlatformWorkerUi, provideCloudflareLoader, provideCloudinaryLoader, provideImageKitLoader, provideImgixLoader, registerLocaleData, BrowserPlatformLocation as ɵBrowserPlatformLocation, DomAdapter as ɵDomAdapter, NullViewportScroller as ɵNullViewportScroller, PLATFORM_BROWSER_ID as ɵPLATFORM_BROWSER_ID, PLATFORM_SERVER_ID as ɵPLATFORM_SERVER_ID, PLATFORM_WORKER_APP_ID as ɵPLATFORM_WORKER_APP_ID, PLATFORM_WORKER_UI_ID as ɵPLATFORM_WORKER_UI_ID, getDOM as ɵgetDOM, parseCookieValue as ɵparseCookieValue, setRootDomAdapter as ɵsetRootDomAdapter };\n","import { Injectable } from '@angular/core';\nimport { Hub } from 'aws-amplify/utils';\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class BsHubService {\n\n static listenStatic = Hub.listen.bind(Hub);\n static dispatchStatic = Hub.dispatch.bind(Hub);\n\n constructor() { }\n\n listen = Hub.listen.bind(Hub);\n dispatch = Hub.dispatch.bind(Hub);\n\n}\n","//! moment.js locale configuration\n//! locale : Finnish [fi]\n//! author : Tarmo Aidantausta : https://github.com/bleadof\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var numbersPast =\n 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(\n ' '\n ),\n numbersFuture = [\n 'nolla',\n 'yhden',\n 'kahden',\n 'kolmen',\n 'neljän',\n 'viiden',\n 'kuuden',\n numbersPast[7],\n numbersPast[8],\n numbersPast[9],\n ];\n function translate(number, withoutSuffix, key, isFuture) {\n var result = '';\n switch (key) {\n case 's':\n return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';\n case 'ss':\n result = isFuture ? 'sekunnin' : 'sekuntia';\n break;\n case 'm':\n return isFuture ? 'minuutin' : 'minuutti';\n case 'mm':\n result = isFuture ? 'minuutin' : 'minuuttia';\n break;\n case 'h':\n return isFuture ? 'tunnin' : 'tunti';\n case 'hh':\n result = isFuture ? 'tunnin' : 'tuntia';\n break;\n case 'd':\n return isFuture ? 'päivän' : 'päivä';\n case 'dd':\n result = isFuture ? 'päivän' : 'päivää';\n break;\n case 'M':\n return isFuture ? 'kuukauden' : 'kuukausi';\n case 'MM':\n result = isFuture ? 'kuukauden' : 'kuukautta';\n break;\n case 'y':\n return isFuture ? 'vuoden' : 'vuosi';\n case 'yy':\n result = isFuture ? 'vuoden' : 'vuotta';\n break;\n }\n result = verbalNumber(number, isFuture) + ' ' + result;\n return result;\n }\n function verbalNumber(number, isFuture) {\n return number < 10\n ? isFuture\n ? numbersFuture[number]\n : numbersPast[number]\n : number;\n }\n\n var fi = moment.defineLocale('fi', {\n months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split(\n '_'\n ),\n monthsShort:\n 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split(\n '_'\n ),\n weekdays:\n 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split(\n '_'\n ),\n weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'),\n weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD.MM.YYYY',\n LL: 'Do MMMM[ta] YYYY',\n LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm',\n LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',\n l: 'D.M.YYYY',\n ll: 'Do MMM YYYY',\n lll: 'Do MMM YYYY, [klo] HH.mm',\n llll: 'ddd, Do MMM YYYY, [klo] HH.mm',\n },\n calendar: {\n sameDay: '[tänään] [klo] LT',\n nextDay: '[huomenna] [klo] LT',\n nextWeek: 'dddd [klo] LT',\n lastDay: '[eilen] [klo] LT',\n lastWeek: '[viime] dddd[na] [klo] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s päästä',\n past: '%s sitten',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return fi;\n\n})));\n","import { SafeSubscriber, Subscriber } from './Subscriber';\nimport { isSubscription } from './Subscription';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nimport { isFunction } from './util/isFunction';\nimport { errorContext } from './util/errorContext';\nexport class Observable {\n constructor(subscribe) {\n if (subscribe) {\n this._subscribe = subscribe;\n }\n }\n lift(operator) {\n const observable = new Observable();\n observable.source = this;\n observable.operator = operator;\n return observable;\n }\n subscribe(observerOrNext, error, complete) {\n const subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);\n errorContext(() => {\n const { operator, source } = this;\n subscriber.add(operator\n ?\n operator.call(subscriber, source)\n : source\n ?\n this._subscribe(subscriber)\n :\n this._trySubscribe(subscriber));\n });\n return subscriber;\n }\n _trySubscribe(sink) {\n try {\n return this._subscribe(sink);\n }\n catch (err) {\n sink.error(err);\n }\n }\n forEach(next, promiseCtor) {\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor((resolve, reject) => {\n const subscriber = new SafeSubscriber({\n next: (value) => {\n try {\n next(value);\n }\n catch (err) {\n reject(err);\n subscriber.unsubscribe();\n }\n },\n error: reject,\n complete: resolve,\n });\n this.subscribe(subscriber);\n });\n }\n _subscribe(subscriber) {\n var _a;\n return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);\n }\n [Symbol_observable]() {\n return this;\n }\n pipe(...operations) {\n return pipeFromArray(operations)(this);\n }\n toPromise(promiseCtor) {\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor((resolve, reject) => {\n let value;\n this.subscribe((x) => (value = x), (err) => reject(err), () => resolve(value));\n });\n }\n}\nObservable.create = (subscribe) => {\n return new Observable(subscribe);\n};\nfunction getPromiseCtor(promiseCtor) {\n var _a;\n return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;\n}\nfunction isObserver(value) {\n return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);\n}\nfunction isSubscriber(value) {\n return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));\n}\n","//! moment.js locale configuration\n//! locale : Welsh [cy]\n//! author : Robert Allen : https://github.com/robgallen\n//! author : https://github.com/ryangreaves\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var cy = moment.defineLocale('cy', {\n months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split(\n '_'\n ),\n monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split(\n '_'\n ),\n weekdays:\n 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split(\n '_'\n ),\n weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),\n weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),\n weekdaysParseExact: true,\n // time formats are the same as en-gb\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Heddiw am] LT',\n nextDay: '[Yfory am] LT',\n nextWeek: 'dddd [am] LT',\n lastDay: '[Ddoe am] LT',\n lastWeek: 'dddd [diwethaf am] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'mewn %s',\n past: '%s yn ôl',\n s: 'ychydig eiliadau',\n ss: '%d eiliad',\n m: 'munud',\n mm: '%d munud',\n h: 'awr',\n hh: '%d awr',\n d: 'diwrnod',\n dd: '%d diwrnod',\n M: 'mis',\n MM: '%d mis',\n y: 'blwyddyn',\n yy: '%d flynedd',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,\n // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh\n ordinal: function (number) {\n var b = number,\n output = '',\n lookup = [\n '',\n 'af',\n 'il',\n 'ydd',\n 'ydd',\n 'ed',\n 'ed',\n 'ed',\n 'fed',\n 'fed',\n 'fed', // 1af to 10fed\n 'eg',\n 'fed',\n 'eg',\n 'eg',\n 'fed',\n 'eg',\n 'eg',\n 'fed',\n 'eg',\n 'fed', // 11eg to 20fed\n ];\n if (b > 20) {\n if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {\n output = 'fed'; // not 30ain, 70ain or 90ain\n } else {\n output = 'ain';\n }\n } else if (b > 0) {\n output = lookup[b];\n }\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return cy;\n\n})));\n","export enum UiHeaderType {\n DEFAULT = 'default',\n EYE_BROW = 'eyeBrow',\n MENU = 'menu',\n}\n","//! moment.js locale configuration\n//! locale : Albanian [sq]\n//! author : Flakërim Ismani : https://github.com/flakerimi\n//! author : Menelion Elensúle : https://github.com/Oire\n//! author : Oerd Cukalla : https://github.com/oerd\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var sq = moment.defineLocale('sq', {\n months: 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split(\n '_'\n ),\n monthsShort: 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'),\n weekdays: 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split(\n '_'\n ),\n weekdaysShort: 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'),\n weekdaysMin: 'D_H_Ma_Më_E_P_Sh'.split('_'),\n weekdaysParseExact: true,\n meridiemParse: /PD|MD/,\n isPM: function (input) {\n return input.charAt(0) === 'M';\n },\n meridiem: function (hours, minutes, isLower) {\n return hours < 12 ? 'PD' : 'MD';\n },\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Sot në] LT',\n nextDay: '[Nesër në] LT',\n nextWeek: 'dddd [në] LT',\n lastDay: '[Dje në] LT',\n lastWeek: 'dddd [e kaluar në] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'në %s',\n past: '%s më parë',\n s: 'disa sekonda',\n ss: '%d sekonda',\n m: 'një minutë',\n mm: '%d minuta',\n h: 'një orë',\n hh: '%d orë',\n d: 'një ditë',\n dd: '%d ditë',\n M: 'një muaj',\n MM: '%d muaj',\n y: 'një vit',\n yy: '%d vite',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return sq;\n\n})));\n","//! moment.js locale configuration\n//! locale : Montenegrin [me]\n//! author : Miodrag Nikač <miodrag@restartit.me> : https://github.com/miodragnikac\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var translator = {\n words: {\n //Different grammatical cases\n ss: ['sekund', 'sekunda', 'sekundi'],\n m: ['jedan minut', 'jednog minuta'],\n mm: ['minut', 'minuta', 'minuta'],\n h: ['jedan sat', 'jednog sata'],\n hh: ['sat', 'sata', 'sati'],\n dd: ['dan', 'dana', 'dana'],\n MM: ['mjesec', 'mjeseca', 'mjeseci'],\n yy: ['godina', 'godine', 'godina'],\n },\n correctGrammaticalCase: function (number, wordKey) {\n return number === 1\n ? wordKey[0]\n : number >= 2 && number <= 4\n ? wordKey[1]\n : wordKey[2];\n },\n translate: function (number, withoutSuffix, key) {\n var wordKey = translator.words[key];\n if (key.length === 1) {\n return withoutSuffix ? wordKey[0] : wordKey[1];\n } else {\n return (\n number +\n ' ' +\n translator.correctGrammaticalCase(number, wordKey)\n );\n }\n },\n };\n\n var me = moment.defineLocale('me', {\n months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(\n '_'\n ),\n monthsShort:\n 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(\n '_'\n ),\n weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[danas u] LT',\n nextDay: '[sjutra u] LT',\n\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[u] [nedjelju] [u] LT';\n case 3:\n return '[u] [srijedu] [u] LT';\n case 6:\n return '[u] [subotu] [u] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[u] dddd [u] LT';\n }\n },\n lastDay: '[juče u] LT',\n lastWeek: function () {\n var lastWeekDays = [\n '[prošle] [nedjelje] [u] LT',\n '[prošlog] [ponedjeljka] [u] LT',\n '[prošlog] [utorka] [u] LT',\n '[prošle] [srijede] [u] LT',\n '[prošlog] [četvrtka] [u] LT',\n '[prošlog] [petka] [u] LT',\n '[prošle] [subote] [u] LT',\n ];\n return lastWeekDays[this.day()];\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'za %s',\n past: 'prije %s',\n s: 'nekoliko sekundi',\n ss: translator.translate,\n m: translator.translate,\n mm: translator.translate,\n h: translator.translate,\n hh: translator.translate,\n d: 'dan',\n dd: translator.translate,\n M: 'mjesec',\n MM: translator.translate,\n y: 'godinu',\n yy: translator.translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return me;\n\n})));\n","import { AfterViewInit, Directive, ElementRef, HostListener, Input } from '@angular/core';\n\nimport { FirebaseService, AnalyticsAttributesV4 } from './firebase-abstract.service';\n\n@Directive({\n selector: '[coreTracking]',\n})\nexport class MicroCoreUtilTrackingDirective implements AfterViewInit {\n @Input('coreTracking') attributes: AnalyticsAttributesV4;\n @Input() secondaryCta = false;\n @Input() dismissedCta = false;\n @Input() error_view = false;\n\n tagName: string;\n dontLog: boolean;\n\n constructor(private analytics: FirebaseService, private el: ElementRef) {}\n\n @HostListener('click', ['$event']) @HostListener('keyup.enter', ['$event']) onClick(event: KeyboardEvent) {\n if (!this.dontLog) {\n if (this.isDismissButton()) {\n this.analytics.logEvent(`${this.attributes.event_name} dismissed`, this.attributes.custom);\n } else if (this.isClickable()) {\n const eventAction = this.secondaryCta ? 'secondary tapped' : 'tapped';\n this.analytics.logEvent(`${this.attributes.event_name} ${eventAction}`, this.attributes.custom);\n }\n }\n }\n\n cleanEventName() {\n const eventNameArray = this.attributes.event_name.toLowerCase().split('_');\n for (let i = eventNameArray.length - 1; i >= 0; i--) {\n if (\n eventNameArray[i] === 'dismissed' ||\n eventNameArray[i] === 'shown' ||\n eventNameArray[i] === 'tapped' ||\n eventNameArray[i] === 'dismiss'\n ) {\n eventNameArray.splice(i, 1);\n }\n }\n this.attributes.event_name = eventNameArray.join(' ');\n }\n\n cleanCustomParams() {\n try {\n const customParams = JSON.parse(JSON.stringify(this.attributes.custom).toLowerCase().split('_').join(' '));\n this.attributes.custom = customParams;\n } catch (e) {\n // parsing probably failed, so do nothing and pass the params as-is\n }\n }\n\n ngAfterViewInit(): void {\n if (!this.dontLog) {\n this.tagName = this.el.nativeElement.tagName.toLowerCase();\n\n this.cleanEventName();\n if (this.attributes.custom) {\n this.cleanCustomParams();\n }\n if (this.error_view || this.attributes.event_name === 'error shown') {\n // pass error shown event_name as-is\n this.analytics.logEvent(`${this.attributes.event_name}`, this.attributes.custom);\n } else if (!this.isClickable() && !this.isDismissButton()) {\n this.analytics.logEvent(`${this.attributes.event_name} shown`, this.attributes.custom);\n }\n\n // if (!this.env.production) {\n // console.groupCollapsed('FbDirective');\n // console.log(this.attributes);\n // console.log('is clickable: ', this.isClickable());\n // console.log('is dismiss button: ', this.isDismissButton());\n // console.log(this.el);\n // console.groupEnd();\n // }\n }\n }\n\n isClickable(): boolean {\n return this.tagName === 'button' || this.tagName === 'a' || this.tagName === 'bw-icon';\n }\n\n isDismissButton(): boolean {\n return this.tagName === 'bw-back' || this.tagName === 'ui-nav-exit-back' || this.dismissedCta;\n }\n\n isInputElement(tagName: string): boolean {\n return tagName === 'INPUT' || tagName === 'BW-INPUT' || tagName === 'BW-CREATE-PASSWORD' || tagName === 'BW-PHONE-FORM';\n }\n}\n","//! moment.js locale configuration\n//! locale : Spanish (Mexico) [es-mx]\n//! author : JC Franco : https://github.com/jcfranco\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsShortDot =\n 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(\n '_'\n ),\n monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n monthsParse = [\n /^ene/i,\n /^feb/i,\n /^mar/i,\n /^abr/i,\n /^may/i,\n /^jun/i,\n /^jul/i,\n /^ago/i,\n /^sep/i,\n /^oct/i,\n /^nov/i,\n /^dic/i,\n ],\n monthsRegex =\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n var esMx = moment.defineLocale('es-mx', {\n months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(\n '_'\n ),\n monthsShort: function (m, format) {\n if (!m) {\n return monthsShortDot;\n } else if (/-MMM-/.test(format)) {\n return monthsShort[m.month()];\n } else {\n return monthsShortDot[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex:\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n monthsShortStrictRegex:\n /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY H:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',\n },\n calendar: {\n sameDay: function () {\n return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextDay: function () {\n return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextWeek: function () {\n return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastDay: function () {\n return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastWeek: function () {\n return (\n '[el] dddd [pasado a la' +\n (this.hours() !== 1 ? 's' : '') +\n '] LT'\n );\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'en %s',\n past: 'hace %s',\n s: 'unos segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'una hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n w: 'una semana',\n ww: '%d semanas',\n M: 'un mes',\n MM: '%d meses',\n y: 'un año',\n yy: '%d años',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n invalidDate: 'Fecha inválida',\n });\n\n return esMx;\n\n})));\n","//! moment.js locale configuration\n//! locale : Uzbek [uz]\n//! author : Sardor Muminov : https://github.com/muminoff\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var uz = moment.defineLocale('uz', {\n months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(\n '_'\n ),\n monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),\n weekdays: 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'),\n weekdaysShort: 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'),\n weekdaysMin: 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'D MMMM YYYY, dddd HH:mm',\n },\n calendar: {\n sameDay: '[Бугун соат] LT [да]',\n nextDay: '[Эртага] LT [да]',\n nextWeek: 'dddd [куни соат] LT [да]',\n lastDay: '[Кеча соат] LT [да]',\n lastWeek: '[Утган] dddd [куни соат] LT [да]',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'Якин %s ичида',\n past: 'Бир неча %s олдин',\n s: 'фурсат',\n ss: '%d фурсат',\n m: 'бир дакика',\n mm: '%d дакика',\n h: 'бир соат',\n hh: '%d соат',\n d: 'бир кун',\n dd: '%d кун',\n M: 'бир ой',\n MM: '%d ой',\n y: 'бир йил',\n yy: '%d йил',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return uz;\n\n})));\n","import { EMPTY } from '../observable/empty';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function take(count) {\n return count <= 0\n ?\n () => EMPTY\n : operate((source, subscriber) => {\n let seen = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n if (++seen <= count) {\n subscriber.next(value);\n if (count <= seen) {\n subscriber.complete();\n }\n }\n }));\n });\n}\n","import { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from './isFunction';\nexport function isIterable(input) {\n return isFunction(input === null || input === void 0 ? void 0 : input[Symbol_iterator]);\n}\n","import * as i0 from '@angular/core';\nimport { EventEmitter, Directive, Input, Output, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport * as i1 from '@videogular/ngx-videogular/core';\nimport { VgCoreModule } from '@videogular/ngx-videogular/core';\n\nclass VgDashDirective {\n constructor(ref, API) {\n this.ref = ref;\n this.API = API;\n this.onGetBitrates = new EventEmitter();\n this.subscriptions = [];\n }\n ngOnInit() {\n if (this.API.isPlayerReady) {\n this.onPlayerReady();\n }\n else {\n this.subscriptions.push(this.API.playerReadyEvent.subscribe(() => this.onPlayerReady()));\n }\n }\n onPlayerReady() {\n this.vgFor = this.ref.nativeElement.getAttribute('vgFor');\n this.target = this.API.getMediaById(this.vgFor);\n this.createPlayer();\n }\n ngOnChanges(changes) {\n changes.vgDash?.currentValue ? this.createPlayer() : this.destroyPlayer();\n }\n createPlayer() {\n if (this.dash) {\n this.destroyPlayer();\n }\n // It's a DASH source\n if (this.vgDash &&\n (this.vgDash.indexOf('.mpd') > -1 ||\n this.vgDash.indexOf('mpd-time-csf') > -1)) {\n let drmOptions;\n if (this.vgDRMLicenseServer) {\n drmOptions = this.vgDRMLicenseServer;\n if (this.vgDRMToken) {\n for (const drmServer in drmOptions) {\n if (drmServer.hasOwnProperty(drmServer)) {\n drmOptions[drmServer].httpRequestHeaders = {\n Authorization: this.vgDRMToken,\n };\n }\n }\n }\n }\n this.dash = dashjs.MediaPlayer().create();\n this.dash.updateSettings({ debug: { logLevel: dashjs.Debug.LOG_LEVEL_NONE } });\n this.dash.initialize(this.ref.nativeElement);\n this.dash.setAutoPlay(false);\n this.dash.on(dashjs.MediaPlayer.events.STREAM_INITIALIZED, () => {\n const audioList = this.dash.getBitrateInfoListFor('audio');\n const videoList = this.dash.getBitrateInfoListFor('video');\n if (audioList.length > 1) {\n audioList.forEach((item) => (item.qualityIndex = ++item.qualityIndex));\n audioList.unshift({\n qualityIndex: 0,\n width: 0,\n height: 0,\n bitrate: 0,\n mediaType: 'video',\n scanType: 'AUTO',\n });\n this.onGetBitrates.emit(audioList);\n }\n if (videoList.length > 1) {\n videoList.forEach((item) => (item.qualityIndex = ++item.qualityIndex));\n videoList.unshift({\n qualityIndex: 0,\n width: 0,\n height: 0,\n bitrate: 0,\n mediaType: 'video',\n scanType: 'AUTO',\n });\n this.onGetBitrates.emit(videoList);\n }\n });\n if (drmOptions) {\n this.dash.setProtectionData(drmOptions);\n }\n this.dash.attachSource(this.vgDash);\n }\n else {\n if (this.target) {\n this.target.pause();\n this.target.seekTime(0);\n this.ref.nativeElement.src = this.vgDash;\n }\n }\n }\n setBitrate({ mediaType, qualityIndex }) {\n if (this.dash) {\n if (qualityIndex > 0) {\n if (this.dash.getSettings()) {\n this.dash.updateSettings({\n streaming: {\n abr: {\n autoSwitchBitrate: {\n [mediaType]: false\n }\n }\n }\n });\n }\n const nextIndex = qualityIndex - 1;\n this.dash.setQualityFor(mediaType, nextIndex);\n }\n else {\n this.dash.updateSettings({\n streaming: {\n abr: {\n autoSwitchBitrate: {\n [mediaType]: true\n }\n }\n }\n });\n }\n }\n }\n destroyPlayer() {\n if (this.dash) {\n this.dash.reset();\n this.dash = null;\n }\n }\n ngOnDestroy() {\n this.subscriptions.forEach((s) => s.unsubscribe());\n this.destroyPlayer();\n }\n}\n/** @nocollapse */ /** @nocollapse */ VgDashDirective.ɵfac = function VgDashDirective_Factory(t) { return new (t || VgDashDirective)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.VgApiService)); };\n/** @nocollapse */ /** @nocollapse */ VgDashDirective.ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: VgDashDirective, selectors: [[\"\", \"vgDash\", \"\"]], inputs: { vgDash: \"vgDash\", vgDRMToken: \"vgDRMToken\", vgDRMLicenseServer: \"vgDRMLicenseServer\" }, outputs: { onGetBitrates: \"onGetBitrates\" }, exportAs: [\"vgDash\"], features: [i0.ɵɵNgOnChangesFeature] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(VgDashDirective, [{\n type: Directive,\n args: [{\n selector: '[vgDash]',\n exportAs: 'vgDash',\n }]\n }], function () { return [{ type: i0.ElementRef }, { type: i1.VgApiService }]; }, { vgDash: [{\n type: Input\n }], vgDRMToken: [{\n type: Input\n }], vgDRMLicenseServer: [{\n type: Input\n }], onGetBitrates: [{\n type: Output\n }] }); })();\n\nclass VgHlsDirective {\n constructor(ref, API) {\n this.ref = ref;\n this.API = API;\n this.vgHlsHeaders = {};\n this.onGetBitrates = new EventEmitter();\n this.subscriptions = [];\n }\n ngOnInit() {\n if (this.API.isPlayerReady) {\n this.onPlayerReady();\n }\n else {\n this.subscriptions.push(this.API.playerReadyEvent.subscribe(() => this.onPlayerReady()));\n }\n }\n onPlayerReady() {\n this.crossorigin = this.ref.nativeElement.getAttribute('crossorigin');\n this.preload = this.ref.nativeElement.getAttribute('preload') !== 'none';\n this.vgFor = this.ref.nativeElement.getAttribute('vgFor');\n if (this.vgFor) {\n this.target = this.API.getMediaById(this.vgFor);\n }\n else {\n this.target = this.API.getDefaultMedia();\n }\n this.config = {\n autoStartLoad: this.preload,\n };\n // @ts-ignore\n this.config.xhrSetup = (xhr) => {\n // Send cookies\n if (this.crossorigin === 'use-credentials') {\n xhr.withCredentials = true;\n }\n for (const key of Object.keys(this.vgHlsHeaders)) {\n xhr.setRequestHeader(key, this.vgHlsHeaders[key]);\n }\n };\n this.createPlayer();\n if (!this.preload) {\n this.subscriptions.push(this.API.subscriptions.play.subscribe(() => {\n if (this.hls) {\n this.hls.startLoad(0);\n }\n }));\n }\n }\n ngOnChanges(changes) {\n if (changes.vgHls?.currentValue) {\n this.createPlayer();\n }\n else if (changes.vgHlsHeaders && changes.vgHlsHeaders.currentValue) {\n // Do nothing. We don't want to create a or destroy a player if the headers change.\n }\n else {\n this.destroyPlayer();\n }\n }\n createPlayer() {\n if (this.hls) {\n this.destroyPlayer();\n }\n // It's a HLS source\n if (this.vgHls &&\n this.vgHls.indexOf('m3u8') > -1 &&\n Hls.isSupported() &&\n this.API.isPlayerReady) {\n const video = this.ref.nativeElement;\n this.hls = new Hls(this.config);\n // @ts-ignore\n this.hls.on(Hls.Events.MANIFEST_PARSED, (_event, data) => {\n const videoList = [];\n videoList.push({\n qualityIndex: 0,\n width: 0,\n height: 0,\n bitrate: 0,\n mediaType: 'video',\n label: 'AUTO',\n });\n data.levels.forEach((item, index) => {\n videoList.push({\n qualityIndex: ++index,\n width: item.width,\n height: item.height,\n bitrate: item.bitrate,\n mediaType: 'video',\n label: item.name,\n });\n });\n this.onGetBitrates.emit(videoList);\n });\n // @ts-ignore\n this.hls.on(Hls.Events.LEVEL_LOADED, (_event, data) => {\n this.target.isLive = data.details.live;\n });\n this.hls.loadSource(this.vgHls);\n this.hls.attachMedia(video);\n }\n else {\n if (this.target && !!this.target.pause) {\n this.target.pause();\n this.target.seekTime(0);\n this.ref.nativeElement.src = this.vgHls;\n }\n }\n }\n setBitrate(bitrate) {\n if (this.hls) {\n this.hls.nextLevel = bitrate.qualityIndex - 1;\n }\n }\n destroyPlayer() {\n if (this.hls) {\n this.hls.destroy();\n this.hls = null;\n }\n }\n ngOnDestroy() {\n this.subscriptions.forEach((s) => s.unsubscribe());\n this.destroyPlayer();\n delete this.hls;\n }\n}\n/** @nocollapse */ /** @nocollapse */ VgHlsDirective.ɵfac = function VgHlsDirective_Factory(t) { return new (t || VgHlsDirective)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.VgApiService)); };\n/** @nocollapse */ /** @nocollapse */ VgHlsDirective.ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: VgHlsDirective, selectors: [[\"\", \"vgHls\", \"\"]], inputs: { vgHls: \"vgHls\", vgHlsHeaders: \"vgHlsHeaders\" }, outputs: { onGetBitrates: \"onGetBitrates\" }, exportAs: [\"vgHls\"], features: [i0.ɵɵNgOnChangesFeature] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(VgHlsDirective, [{\n type: Directive,\n args: [{\n selector: '[vgHls]',\n exportAs: 'vgHls',\n }]\n }], function () { return [{ type: i0.ElementRef }, { type: i1.VgApiService }]; }, { vgHls: [{\n type: Input\n }], vgHlsHeaders: [{\n type: Input\n }], onGetBitrates: [{\n type: Output\n }] }); })();\n\nclass VgStreamingModule {\n}\n/** @nocollapse */ /** @nocollapse */ VgStreamingModule.ɵfac = function VgStreamingModule_Factory(t) { return new (t || VgStreamingModule)(); };\n/** @nocollapse */ /** @nocollapse */ VgStreamingModule.ɵmod = /** @pureOrBreakMyCode */ i0.ɵɵdefineNgModule({ type: VgStreamingModule });\n/** @nocollapse */ /** @nocollapse */ VgStreamingModule.ɵinj = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjector({ imports: [[CommonModule, VgCoreModule]] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(VgStreamingModule, [{\n type: NgModule,\n args: [{\n imports: [CommonModule, VgCoreModule],\n declarations: [VgDashDirective, VgHlsDirective],\n exports: [VgDashDirective, VgHlsDirective]\n }]\n }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && i0.ɵɵsetNgModuleScope(VgStreamingModule, { declarations: [VgDashDirective, VgHlsDirective], imports: [CommonModule, VgCoreModule], exports: [VgDashDirective, VgHlsDirective] }); })();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { VgDashDirective, VgHlsDirective, VgStreamingModule };\n","import { htmlTreeAsString } from './browser.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { isError, isEvent, isInstanceOf, isElement, isPlainObject, isPrimitive } from './is.js';\nimport { logger } from './logger.js';\nimport { truncate } from './string.js';\n\n/**\n * Replace a method in an object with a wrapped version of itself.\n *\n * @param source An object that contains a method to be wrapped.\n * @param name The name of the method to be wrapped.\n * @param replacementFactory A higher-order function that takes the original version of the given method and returns a\n * wrapped version. Note: The function returned by `replacementFactory` needs to be a non-arrow function, in order to\n * preserve the correct value of `this`, and the original method must be called using `origMethod.call(this, <other\n * args>)` or `origMethod.apply(this, [<other args>])` (rather than being called directly), again to preserve `this`.\n * @returns void\n */\nfunction fill(source, name, replacementFactory) {\n if (!(name in source)) {\n return;\n }\n\n const original = source[name] ;\n const wrapped = replacementFactory(original) ;\n\n // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work\n // otherwise it'll throw \"TypeError: Object.defineProperties called on non-object\"\n if (typeof wrapped === 'function') {\n markFunctionWrapped(wrapped, original);\n }\n\n try {\n source[name] = wrapped;\n } catch (e) {\n DEBUG_BUILD && logger.log(`Failed to replace method \"${name}\" in object`, source);\n }\n}\n\n/**\n * Defines a non-enumerable property on the given object.\n *\n * @param obj The object on which to set the property\n * @param name The name of the property to be set\n * @param value The value to which to set the property\n */\nfunction addNonEnumerableProperty(obj, name, value) {\n try {\n Object.defineProperty(obj, name, {\n // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it\n value: value,\n writable: true,\n configurable: true,\n });\n } catch (o_O) {\n DEBUG_BUILD && logger.log(`Failed to add non-enumerable property \"${name}\" to object`, obj);\n }\n}\n\n/**\n * Remembers the original function on the wrapped function and\n * patches up the prototype.\n *\n * @param wrapped the wrapper function\n * @param original the original function that gets wrapped\n */\nfunction markFunctionWrapped(wrapped, original) {\n try {\n const proto = original.prototype || {};\n wrapped.prototype = original.prototype = proto;\n addNonEnumerableProperty(wrapped, '__sentry_original__', original);\n } catch (o_O) {} // eslint-disable-line no-empty\n}\n\n/**\n * This extracts the original function if available. See\n * `markFunctionWrapped` for more information.\n *\n * @param func the function to unwrap\n * @returns the unwrapped version of the function if available.\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction getOriginalFunction(func) {\n return func.__sentry_original__;\n}\n\n/**\n * Encodes given object into url-friendly format\n *\n * @param object An object that contains serializable values\n * @returns string Encoded\n *\n * @deprecated This function is deprecated and will be removed in the next major version of the SDK.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction urlEncode(object) {\n return Object.entries(object)\n .map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`)\n .join('&');\n}\n\n/**\n * Transforms any `Error` or `Event` into a plain object with all of their enumerable properties, and some of their\n * non-enumerable properties attached.\n *\n * @param value Initial source that we have to transform in order for it to be usable by the serializer\n * @returns An Event or Error turned into an object - or the value argument itself, when value is neither an Event nor\n * an Error.\n */\nfunction convertToPlainObject(value)\n\n {\n if (isError(value)) {\n return {\n message: value.message,\n name: value.name,\n stack: value.stack,\n ...getOwnProperties(value),\n };\n } else if (isEvent(value)) {\n const newObj\n\n = {\n type: value.type,\n target: serializeEventTarget(value.target),\n currentTarget: serializeEventTarget(value.currentTarget),\n ...getOwnProperties(value),\n };\n\n if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) {\n newObj.detail = value.detail;\n }\n\n return newObj;\n } else {\n return value;\n }\n}\n\n/** Creates a string representation of the target of an `Event` object */\nfunction serializeEventTarget(target) {\n try {\n return isElement(target) ? htmlTreeAsString(target) : Object.prototype.toString.call(target);\n } catch (_oO) {\n return '<unknown>';\n }\n}\n\n/** Filters out all but an object's own properties */\nfunction getOwnProperties(obj) {\n if (typeof obj === 'object' && obj !== null) {\n const extractedProps = {};\n for (const property in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, property)) {\n extractedProps[property] = (obj )[property];\n }\n }\n return extractedProps;\n } else {\n return {};\n }\n}\n\n/**\n * Given any captured exception, extract its keys and create a sorted\n * and truncated list that will be used inside the event message.\n * eg. `Non-error exception captured with keys: foo, bar, baz`\n */\nfunction extractExceptionKeysForMessage(exception, maxLength = 40) {\n const keys = Object.keys(convertToPlainObject(exception));\n keys.sort();\n\n const firstKey = keys[0];\n\n if (!firstKey) {\n return '[object has no keys]';\n }\n\n if (firstKey.length >= maxLength) {\n return truncate(firstKey, maxLength);\n }\n\n for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) {\n const serialized = keys.slice(0, includedKeys).join(', ');\n if (serialized.length > maxLength) {\n continue;\n }\n if (includedKeys === keys.length) {\n return serialized;\n }\n return truncate(serialized, maxLength);\n }\n\n return '';\n}\n\n/**\n * Given any object, return a new object having removed all fields whose value was `undefined`.\n * Works recursively on objects and arrays.\n *\n * Attention: This function keeps circular references in the returned object.\n */\nfunction dropUndefinedKeys(inputValue) {\n // This map keeps track of what already visited nodes map to.\n // Our Set - based memoBuilder doesn't work here because we want to the output object to have the same circular\n // references as the input object.\n const memoizationMap = new Map();\n\n // This function just proxies `_dropUndefinedKeys` to keep the `memoBuilder` out of this function's API\n return _dropUndefinedKeys(inputValue, memoizationMap);\n}\n\nfunction _dropUndefinedKeys(inputValue, memoizationMap) {\n if (isPojo(inputValue)) {\n // If this node has already been visited due to a circular reference, return the object it was mapped to in the new object\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== undefined) {\n return memoVal ;\n }\n\n const returnValue = {};\n // Store the mapping of this value in case we visit it again, in case of circular data\n memoizationMap.set(inputValue, returnValue);\n\n for (const key of Object.getOwnPropertyNames(inputValue)) {\n if (typeof inputValue[key] !== 'undefined') {\n returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap);\n }\n }\n\n return returnValue ;\n }\n\n if (Array.isArray(inputValue)) {\n // If this node has already been visited due to a circular reference, return the array it was mapped to in the new object\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== undefined) {\n return memoVal ;\n }\n\n const returnValue = [];\n // Store the mapping of this value in case we visit it again, in case of circular data\n memoizationMap.set(inputValue, returnValue);\n\n inputValue.forEach((item) => {\n returnValue.push(_dropUndefinedKeys(item, memoizationMap));\n });\n\n return returnValue ;\n }\n\n return inputValue;\n}\n\nfunction isPojo(input) {\n if (!isPlainObject(input)) {\n return false;\n }\n\n try {\n const name = (Object.getPrototypeOf(input) ).constructor.name;\n return !name || name === 'Object';\n } catch (e2) {\n return true;\n }\n}\n\n/**\n * Ensure that something is an object.\n *\n * Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper\n * classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives.\n *\n * @param wat The subject of the objectification\n * @returns A version of `wat` which can safely be used with `Object` class methods\n */\nfunction objectify(wat) {\n let objectified;\n switch (true) {\n // this will catch both undefined and null\n case wat == undefined:\n objectified = new String(wat);\n break;\n\n // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason\n // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as\n // an object in order to wrap it.\n case typeof wat === 'symbol' || typeof wat === 'bigint':\n objectified = Object(wat);\n break;\n\n // this will catch the remaining primitives: `String`, `Number`, and `Boolean`\n case isPrimitive(wat):\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n objectified = new (wat ).constructor(wat);\n break;\n\n // by process of elimination, at this point we know that `wat` must already be an object\n default:\n objectified = wat;\n break;\n }\n return objectified;\n}\n\nexport { addNonEnumerableProperty, convertToPlainObject, dropUndefinedKeys, extractExceptionKeysForMessage, fill, getOriginalFunction, markFunctionWrapped, objectify, urlEncode };\n","//! moment.js locale configuration\n//! locale : Bulgarian [bg]\n//! author : Krasen Borisov : https://github.com/kraz\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var bg = moment.defineLocale('bg', {\n months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split(\n '_'\n ),\n monthsShort: 'яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),\n weekdays: 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split(\n '_'\n ),\n weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'),\n weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'D.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY H:mm',\n LLLL: 'dddd, D MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[Днес в] LT',\n nextDay: '[Утре в] LT',\n nextWeek: 'dddd [в] LT',\n lastDay: '[Вчера в] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n case 3:\n case 6:\n return '[Миналата] dddd [в] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[Миналия] dddd [в] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'след %s',\n past: 'преди %s',\n s: 'няколко секунди',\n ss: '%d секунди',\n m: 'минута',\n mm: '%d минути',\n h: 'час',\n hh: '%d часа',\n d: 'ден',\n dd: '%d дена',\n w: 'седмица',\n ww: '%d седмици',\n M: 'месец',\n MM: '%d месеца',\n y: 'година',\n yy: '%d години',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ев|ен|ти|ви|ри|ми)/,\n ordinal: function (number) {\n var lastDigit = number % 10,\n last2Digits = number % 100;\n if (number === 0) {\n return number + '-ев';\n } else if (last2Digits === 0) {\n return number + '-ен';\n } else if (last2Digits > 10 && last2Digits < 20) {\n return number + '-ти';\n } else if (lastDigit === 1) {\n return number + '-ви';\n } else if (lastDigit === 2) {\n return number + '-ри';\n } else if (lastDigit === 7 || lastDigit === 8) {\n return number + '-ми';\n } else {\n return number + '-ти';\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return bg;\n\n})));\n","import {Component, EventEmitter, Input, OnInit, Output, ViewChild} from '@angular/core';\nimport { AnalyticsAttributesV4 } from '@brightside-web/desktop/data-access/shared';\nimport {ButtonComponent} from \"@brightside/brightside-ui\";\n\n@Component({\n selector: 'brightside-web-hr-modal',\n templateUrl: './hr-modal.component.html',\n styleUrls: ['./hr-modal.component.scss']\n})\nexport class HrModalComponent {\n @Output() dismissed = new EventEmitter();\n @Input() title = 'Sorry, we didn’t find your account';\n @Input() prompt = 'Please check your information and try again. If you’re unsure if your company offers Brightside, please talk to your HR team.';\n @Input() ctaText = 'Dismiss';\n @Input() firebase: AnalyticsAttributesV4;\n @ViewChild('btnRef') button: ButtonComponent;\n constructor() { }\n\n ngAfterViewInit() {\n this.button._elementRef.nativeElement.focus();\n }\n\n dismiss() {\n this.dismissed.emit();\n }\n}\n","<bw-modal>\n <typography title-medium>{{title | translate}}</typography>\n <div class=\"body\"><bw-paragraph>{{prompt | translate}}</bw-paragraph></div>\n <div class=\"footer\">\n <button bw-button #btnRef (click)=\"dismiss()\">{{ctaText | translate}}</button>\n </div>\n</bw-modal>\n","import { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function switchMap(project, resultSelector) {\n return operate((source, subscriber) => {\n let innerSubscriber = null;\n let index = 0;\n let isComplete = false;\n const checkComplete = () => isComplete && !innerSubscriber && subscriber.complete();\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe();\n let innerIndex = 0;\n const outerIndex = index++;\n innerFrom(project(value, outerIndex)).subscribe((innerSubscriber = createOperatorSubscriber(subscriber, (innerValue) => subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue), () => {\n innerSubscriber = null;\n checkComplete();\n })));\n }, () => {\n isComplete = true;\n checkComplete();\n }));\n });\n}\n","import { concat } from '../observable/concat';\nimport { take } from './take';\nimport { ignoreElements } from './ignoreElements';\nimport { mapTo } from './mapTo';\nimport { mergeMap } from './mergeMap';\nexport function delayWhen(delayDurationSelector, subscriptionDelay) {\n if (subscriptionDelay) {\n return (source) => concat(subscriptionDelay.pipe(take(1), ignoreElements()), source.pipe(delayWhen(delayDurationSelector)));\n }\n return mergeMap((value, index) => delayDurationSelector(value, index).pipe(take(1), mapTo(value)));\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { noop } from '../util/noop';\nexport function ignoreElements() {\n return operate((source, subscriber) => {\n source.subscribe(createOperatorSubscriber(subscriber, noop));\n });\n}\n","import { asyncScheduler } from '../scheduler/async';\nimport { delayWhen } from './delayWhen';\nimport { timer } from '../observable/timer';\nexport function delay(due, scheduler = asyncScheduler) {\n const duration = timer(due, scheduler);\n return delayWhen(() => duration);\n}\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;\nvar util = require('./util');\n\n// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n// operating systems these days (capturing the result).\nvar REGEX_NEWLINE = /(\\r?\\n)/;\n\n// Newline character code for charCodeAt() comparisons\nvar NEWLINE_CODE = 10;\n\n// Private symbol for identifying `SourceNode`s when multiple versions of\n// the source-map library are loaded. This MUST NOT CHANGE across\n// versions!\nvar isSourceNode = \"$$$isSourceNode$$$\";\n\n/**\n * SourceNodes provide a way to abstract over interpolating/concatenating\n * snippets of generated JavaScript source code while maintaining the line and\n * column information associated with the original source code.\n *\n * @param aLine The original line number.\n * @param aColumn The original column number.\n * @param aSource The original source's filename.\n * @param aChunks Optional. An array of strings which are snippets of\n * generated JS, or other SourceNodes.\n * @param aName The original identifier.\n */\nfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n this.children = [];\n this.sourceContents = {};\n this.line = aLine == null ? null : aLine;\n this.column = aColumn == null ? null : aColumn;\n this.source = aSource == null ? null : aSource;\n this.name = aName == null ? null : aName;\n this[isSourceNode] = true;\n if (aChunks != null) this.add(aChunks);\n}\n\n/**\n * Creates a SourceNode from generated code and a SourceMapConsumer.\n *\n * @param aGeneratedCode The generated code\n * @param aSourceMapConsumer The SourceMap for the generated code\n * @param aRelativePath Optional. The path that relative sources in the\n * SourceMapConsumer should be relative to.\n */\nSourceNode.fromStringWithSourceMap =\n function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n // The SourceNode we want to fill with the generated code\n // and the SourceMap\n var node = new SourceNode();\n\n // All even indices of this array are one line of the generated code,\n // while all odd indices are the newlines between two adjacent lines\n // (since `REGEX_NEWLINE` captures its match).\n // Processed fragments are removed from this array, by calling `shiftNextLine`.\n var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n var shiftNextLine = function() {\n var lineContents = remainingLines.shift();\n // The last line of a file might not have a newline.\n var newLine = remainingLines.shift() || \"\";\n return lineContents + newLine;\n };\n\n // We need to remember the position of \"remainingLines\"\n var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\n // The generate SourceNodes we need a code range.\n // To extract it current and last mapping is used.\n // Here we store the last mapping.\n var lastMapping = null;\n\n aSourceMapConsumer.eachMapping(function (mapping) {\n if (lastMapping !== null) {\n // We add the code from \"lastMapping\" to \"mapping\":\n // First check if there is a new line in between.\n if (lastGeneratedLine < mapping.generatedLine) {\n // Associate first line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n lastGeneratedLine++;\n lastGeneratedColumn = 0;\n // The remaining code is added without mapping\n } else {\n // There is no new line in between.\n // Associate the code between \"lastGeneratedColumn\" and\n // \"mapping.generatedColumn\" with \"lastMapping\"\n var nextLine = remainingLines[0];\n var code = nextLine.substr(0, mapping.generatedColumn -\n lastGeneratedColumn);\n remainingLines[0] = nextLine.substr(mapping.generatedColumn -\n lastGeneratedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n addMappingWithCode(lastMapping, code);\n // No more remaining code, continue\n lastMapping = mapping;\n return;\n }\n }\n // We add the generated code until the first mapping\n // to the SourceNode without any mapping.\n // Each line is added as separate string.\n while (lastGeneratedLine < mapping.generatedLine) {\n node.add(shiftNextLine());\n lastGeneratedLine++;\n }\n if (lastGeneratedColumn < mapping.generatedColumn) {\n var nextLine = remainingLines[0];\n node.add(nextLine.substr(0, mapping.generatedColumn));\n remainingLines[0] = nextLine.substr(mapping.generatedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n }\n lastMapping = mapping;\n }, this);\n // We have processed all mappings.\n if (remainingLines.length > 0) {\n if (lastMapping) {\n // Associate the remaining code in the current line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n }\n // and add the remaining lines without any mapping\n node.add(remainingLines.join(\"\"));\n }\n\n // Copy sourcesContent into SourceNode\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aRelativePath != null) {\n sourceFile = util.join(aRelativePath, sourceFile);\n }\n node.setSourceContent(sourceFile, content);\n }\n });\n\n return node;\n\n function addMappingWithCode(mapping, code) {\n if (mapping === null || mapping.source === undefined) {\n node.add(code);\n } else {\n var source = aRelativePath\n ? util.join(aRelativePath, mapping.source)\n : mapping.source;\n node.add(new SourceNode(mapping.originalLine,\n mapping.originalColumn,\n source,\n code,\n mapping.name));\n }\n }\n };\n\n/**\n * Add a chunk of generated JS to this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.add = function SourceNode_add(aChunk) {\n if (Array.isArray(aChunk)) {\n aChunk.forEach(function (chunk) {\n this.add(chunk);\n }, this);\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n if (aChunk) {\n this.children.push(aChunk);\n }\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Add a chunk of generated JS to the beginning of this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n if (Array.isArray(aChunk)) {\n for (var i = aChunk.length-1; i >= 0; i--) {\n this.prepend(aChunk[i]);\n }\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n this.children.unshift(aChunk);\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Walk over the tree of JS snippets in this node and its children. The\n * walking function is called once for each snippet of JS and is passed that\n * snippet and the its original associated source's line/column location.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n var chunk;\n for (var i = 0, len = this.children.length; i < len; i++) {\n chunk = this.children[i];\n if (chunk[isSourceNode]) {\n chunk.walk(aFn);\n }\n else {\n if (chunk !== '') {\n aFn(chunk, { source: this.source,\n line: this.line,\n column: this.column,\n name: this.name });\n }\n }\n }\n};\n\n/**\n * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n * each of `this.children`.\n *\n * @param aSep The separator.\n */\nSourceNode.prototype.join = function SourceNode_join(aSep) {\n var newChildren;\n var i;\n var len = this.children.length;\n if (len > 0) {\n newChildren = [];\n for (i = 0; i < len-1; i++) {\n newChildren.push(this.children[i]);\n newChildren.push(aSep);\n }\n newChildren.push(this.children[i]);\n this.children = newChildren;\n }\n return this;\n};\n\n/**\n * Call String.prototype.replace on the very right-most source snippet. Useful\n * for trimming whitespace from the end of a source node, etc.\n *\n * @param aPattern The pattern to replace.\n * @param aReplacement The thing to replace the pattern with.\n */\nSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n var lastChild = this.children[this.children.length - 1];\n if (lastChild[isSourceNode]) {\n lastChild.replaceRight(aPattern, aReplacement);\n }\n else if (typeof lastChild === 'string') {\n this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n }\n else {\n this.children.push(''.replace(aPattern, aReplacement));\n }\n return this;\n};\n\n/**\n * Set the source content for a source file. This will be added to the SourceMapGenerator\n * in the sourcesContent field.\n *\n * @param aSourceFile The filename of the source file\n * @param aSourceContent The content of the source file\n */\nSourceNode.prototype.setSourceContent =\n function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n };\n\n/**\n * Walk over the tree of SourceNodes. The walking function is called for each\n * source file content and is passed the filename and source content.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walkSourceContents =\n function SourceNode_walkSourceContents(aFn) {\n for (var i = 0, len = this.children.length; i < len; i++) {\n if (this.children[i][isSourceNode]) {\n this.children[i].walkSourceContents(aFn);\n }\n }\n\n var sources = Object.keys(this.sourceContents);\n for (var i = 0, len = sources.length; i < len; i++) {\n aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n }\n };\n\n/**\n * Return the string representation of this source node. Walks over the tree\n * and concatenates all the various snippets together to one string.\n */\nSourceNode.prototype.toString = function SourceNode_toString() {\n var str = \"\";\n this.walk(function (chunk) {\n str += chunk;\n });\n return str;\n};\n\n/**\n * Returns the string representation of this source node along with a source\n * map.\n */\nSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n var generated = {\n code: \"\",\n line: 1,\n column: 0\n };\n var map = new SourceMapGenerator(aArgs);\n var sourceMappingActive = false;\n var lastOriginalSource = null;\n var lastOriginalLine = null;\n var lastOriginalColumn = null;\n var lastOriginalName = null;\n this.walk(function (chunk, original) {\n generated.code += chunk;\n if (original.source !== null\n && original.line !== null\n && original.column !== null) {\n if(lastOriginalSource !== original.source\n || lastOriginalLine !== original.line\n || lastOriginalColumn !== original.column\n || lastOriginalName !== original.name) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n lastOriginalSource = original.source;\n lastOriginalLine = original.line;\n lastOriginalColumn = original.column;\n lastOriginalName = original.name;\n sourceMappingActive = true;\n } else if (sourceMappingActive) {\n map.addMapping({\n generated: {\n line: generated.line,\n column: generated.column\n }\n });\n lastOriginalSource = null;\n sourceMappingActive = false;\n }\n for (var idx = 0, length = chunk.length; idx < length; idx++) {\n if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n generated.line++;\n generated.column = 0;\n // Mappings end at eol\n if (idx + 1 === length) {\n lastOriginalSource = null;\n sourceMappingActive = false;\n } else if (sourceMappingActive) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n } else {\n generated.column++;\n }\n }\n });\n this.walkSourceContents(function (sourceFile, sourceContent) {\n map.setSourceContent(sourceFile, sourceContent);\n });\n\n return { code: generated.code, map: map };\n};\n\nexports.SourceNode = SourceNode;\n","import { isVueViewModel, isSyntheticEvent } from './is.js';\nimport { memoBuilder } from './memo.js';\nimport { convertToPlainObject } from './object.js';\nimport { getFunctionName } from './stacktrace.js';\n\n/**\n * Recursively normalizes the given object.\n *\n * - Creates a copy to prevent original input mutation\n * - Skips non-enumerable properties\n * - When stringifying, calls `toJSON` if implemented\n * - Removes circular references\n * - Translates non-serializable values (`undefined`/`NaN`/functions) to serializable format\n * - Translates known global objects/classes to a string representations\n * - Takes care of `Error` object serialization\n * - Optionally limits depth of final output\n * - Optionally limits number of properties/elements included in any single object/array\n *\n * @param input The object to be normalized.\n * @param depth The max depth to which to normalize the object. (Anything deeper stringified whole.)\n * @param maxProperties The max number of elements or properties to be included in any single array or\n * object in the normalized output.\n * @returns A normalized version of the object, or `\"**non-serializable**\"` if any errors are thrown during normalization.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction normalize(input, depth = 100, maxProperties = +Infinity) {\n try {\n // since we're at the outermost level, we don't provide a key\n return visit('', input, depth, maxProperties);\n } catch (err) {\n return { ERROR: `**non-serializable** (${err})` };\n }\n}\n\n/** JSDoc */\nfunction normalizeToSize(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n object,\n // Default Node.js REPL depth\n depth = 3,\n // 100kB, as 200kB is max payload size, so half sounds reasonable\n maxSize = 100 * 1024,\n) {\n const normalized = normalize(object, depth);\n\n if (jsonSize(normalized) > maxSize) {\n return normalizeToSize(object, depth - 1, maxSize);\n }\n\n return normalized ;\n}\n\n/**\n * Visits a node to perform normalization on it\n *\n * @param key The key corresponding to the given node\n * @param value The node to be visited\n * @param depth Optional number indicating the maximum recursion depth\n * @param maxProperties Optional maximum number of properties/elements included in any single object/array\n * @param memo Optional Memo class handling decycling\n */\nfunction visit(\n key,\n value,\n depth = +Infinity,\n maxProperties = +Infinity,\n // eslint-disable-next-line deprecation/deprecation\n memo = memoBuilder(),\n) {\n const [memoize, unmemoize] = memo;\n\n // Get the simple cases out of the way first\n if (\n value == null || // this matches null and undefined -> eqeq not eqeqeq\n ['boolean', 'string'].includes(typeof value) ||\n (typeof value === 'number' && Number.isFinite(value))\n ) {\n return value ;\n }\n\n const stringified = stringifyValue(key, value);\n\n // Anything we could potentially dig into more (objects or arrays) will have come back as `\"[object XXXX]\"`.\n // Everything else will have already been serialized, so if we don't see that pattern, we're done.\n if (!stringified.startsWith('[object ')) {\n return stringified;\n }\n\n // From here on, we can assert that `value` is either an object or an array.\n\n // Do not normalize objects that we know have already been normalized. As a general rule, the\n // \"__sentry_skip_normalization__\" property should only be used sparingly and only should only be set on objects that\n // have already been normalized.\n if ((value )['__sentry_skip_normalization__']) {\n return value ;\n }\n\n // We can set `__sentry_override_normalization_depth__` on an object to ensure that from there\n // We keep a certain amount of depth.\n // This should be used sparingly, e.g. we use it for the redux integration to ensure we get a certain amount of state.\n const remainingDepth =\n typeof (value )['__sentry_override_normalization_depth__'] === 'number'\n ? ((value )['__sentry_override_normalization_depth__'] )\n : depth;\n\n // We're also done if we've reached the max depth\n if (remainingDepth === 0) {\n // At this point we know `serialized` is a string of the form `\"[object XXXX]\"`. Clean it up so it's just `\"[XXXX]\"`.\n return stringified.replace('object ', '');\n }\n\n // If we've already visited this branch, bail out, as it's circular reference. If not, note that we're seeing it now.\n if (memoize(value)) {\n return '[Circular ~]';\n }\n\n // If the value has a `toJSON` method, we call it to extract more information\n const valueWithToJSON = value ;\n if (valueWithToJSON && typeof valueWithToJSON.toJSON === 'function') {\n try {\n const jsonValue = valueWithToJSON.toJSON();\n // We need to normalize the return value of `.toJSON()` in case it has circular references\n return visit('', jsonValue, remainingDepth - 1, maxProperties, memo);\n } catch (err) {\n // pass (The built-in `toJSON` failed, but we can still try to do it ourselves)\n }\n }\n\n // At this point we know we either have an object or an array, we haven't seen it before, and we're going to recurse\n // because we haven't yet reached the max depth. Create an accumulator to hold the results of visiting each\n // property/entry, and keep track of the number of items we add to it.\n const normalized = (Array.isArray(value) ? [] : {}) ;\n let numAdded = 0;\n\n // Before we begin, convert`Error` and`Event` instances into plain objects, since some of each of their relevant\n // properties are non-enumerable and otherwise would get missed.\n const visitable = convertToPlainObject(value );\n\n for (const visitKey in visitable) {\n // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.\n if (!Object.prototype.hasOwnProperty.call(visitable, visitKey)) {\n continue;\n }\n\n if (numAdded >= maxProperties) {\n normalized[visitKey] = '[MaxProperties ~]';\n break;\n }\n\n // Recursively visit all the child nodes\n const visitValue = visitable[visitKey];\n normalized[visitKey] = visit(visitKey, visitValue, remainingDepth - 1, maxProperties, memo);\n\n numAdded++;\n }\n\n // Once we've visited all the branches, remove the parent from memo storage\n unmemoize(value);\n\n // Return accumulated values\n return normalized;\n}\n\n/* eslint-disable complexity */\n/**\n * Stringify the given value. Handles various known special values and types.\n *\n * Not meant to be used on simple primitives which already have a string representation, as it will, for example, turn\n * the number 1231 into \"[Object Number]\", nor on `null`, as it will throw.\n *\n * @param value The value to stringify\n * @returns A stringified representation of the given value\n */\nfunction stringifyValue(\n key,\n // this type is a tiny bit of a cheat, since this function does handle NaN (which is technically a number), but for\n // our internal use, it'll do\n value,\n) {\n try {\n if (key === 'domain' && value && typeof value === 'object' && (value )._events) {\n return '[Domain]';\n }\n\n if (key === 'domainEmitter') {\n return '[DomainEmitter]';\n }\n\n // It's safe to use `global`, `window`, and `document` here in this manner, as we are asserting using `typeof` first\n // which won't throw if they are not present.\n\n if (typeof global !== 'undefined' && value === global) {\n return '[Global]';\n }\n\n // eslint-disable-next-line no-restricted-globals\n if (typeof window !== 'undefined' && value === window) {\n return '[Window]';\n }\n\n // eslint-disable-next-line no-restricted-globals\n if (typeof document !== 'undefined' && value === document) {\n return '[Document]';\n }\n\n if (isVueViewModel(value)) {\n return '[VueViewModel]';\n }\n\n // React's SyntheticEvent thingy\n if (isSyntheticEvent(value)) {\n return '[SyntheticEvent]';\n }\n\n if (typeof value === 'number' && !Number.isFinite(value)) {\n return `[${value}]`;\n }\n\n if (typeof value === 'function') {\n return `[Function: ${getFunctionName(value)}]`;\n }\n\n if (typeof value === 'symbol') {\n return `[${String(value)}]`;\n }\n\n // stringified BigInts are indistinguishable from regular numbers, so we need to label them to avoid confusion\n if (typeof value === 'bigint') {\n return `[BigInt: ${String(value)}]`;\n }\n\n // Now that we've knocked out all the special cases and the primitives, all we have left are objects. Simply casting\n // them to strings means that instances of classes which haven't defined their `toStringTag` will just come out as\n // `\"[object Object]\"`. If we instead look at the constructor's name (which is the same as the name of the class),\n // we can make sure that only plain objects come out that way.\n const objName = getConstructorName(value);\n\n // Handle HTML Elements\n if (/^HTML(\\w*)Element$/.test(objName)) {\n return `[HTMLElement: ${objName}]`;\n }\n\n return `[object ${objName}]`;\n } catch (err) {\n return `**non-serializable** (${err})`;\n }\n}\n/* eslint-enable complexity */\n\nfunction getConstructorName(value) {\n const prototype = Object.getPrototypeOf(value);\n\n return prototype ? prototype.constructor.name : 'null prototype';\n}\n\n/** Calculates bytes size of input string */\nfunction utf8Length(value) {\n // eslint-disable-next-line no-bitwise\n return ~-encodeURI(value).split(/%..|./).length;\n}\n\n/** Calculates bytes size of input object */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction jsonSize(value) {\n return utf8Length(JSON.stringify(value));\n}\n\n/**\n * Normalizes URLs in exceptions and stacktraces to a base path so Sentry can fingerprint\n * across platforms and working directory.\n *\n * @param url The URL to be normalized.\n * @param basePath The application base path.\n * @returns The normalized URL.\n */\nfunction normalizeUrlToBase(url, basePath) {\n const escapedBase = basePath\n // Backslash to forward\n .replace(/\\\\/g, '/')\n // Escape RegExp special characters\n .replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&');\n\n let newUrl = url;\n try {\n newUrl = decodeURI(url);\n } catch (_Oo) {\n // Sometime this breaks\n }\n return (\n newUrl\n .replace(/\\\\/g, '/')\n .replace(/webpack:\\/?/g, '') // Remove intermediate base path\n // eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor\n .replace(new RegExp(`(file://)?/*${escapedBase}/*`, 'ig'), 'app:///')\n );\n}\n\nexport { normalize, normalizeToSize, normalizeUrlToBase };\n","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/**\n * Helper to decycle json objects\n *\n * @deprecated This function is deprecated and will be removed in the next major version.\n */\n// TODO(v9): Move this function into normalize() directly\nfunction memoBuilder() {\n const hasWeakSet = typeof WeakSet === 'function';\n const inner = hasWeakSet ? new WeakSet() : [];\n function memoize(obj) {\n if (hasWeakSet) {\n if (inner.has(obj)) {\n return true;\n }\n inner.add(obj);\n return false;\n }\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < inner.length; i++) {\n const value = inner[i];\n if (value === obj) {\n return true;\n }\n }\n inner.push(obj);\n return false;\n }\n\n function unmemoize(obj) {\n if (hasWeakSet) {\n inner.delete(obj);\n } else {\n for (let i = 0; i < inner.length; i++) {\n if (inner[i] === obj) {\n inner.splice(i, 1);\n break;\n }\n }\n }\n }\n return [memoize, unmemoize];\n}\n\nexport { memoBuilder };\n","//! moment.js locale configuration\n//! locale : Danish [da]\n//! author : Ulrik Nielsen : https://github.com/mrbase\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var da = moment.defineLocale('da', {\n months: 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split(\n '_'\n ),\n monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),\n weekdaysShort: 'søn_man_tir_ons_tor_fre_lør'.split('_'),\n weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY HH:mm',\n LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm',\n },\n calendar: {\n sameDay: '[i dag kl.] LT',\n nextDay: '[i morgen kl.] LT',\n nextWeek: 'på dddd [kl.] LT',\n lastDay: '[i går kl.] LT',\n lastWeek: '[i] dddd[s kl.] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'om %s',\n past: '%s siden',\n s: 'få sekunder',\n ss: '%d sekunder',\n m: 'et minut',\n mm: '%d minutter',\n h: 'en time',\n hh: '%d timer',\n d: 'en dag',\n dd: '%d dage',\n M: 'en måned',\n MM: '%d måneder',\n y: 'et år',\n yy: '%d år',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return da;\n\n})));\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar AmplifyErrorCode;\n(function (AmplifyErrorCode) {\n AmplifyErrorCode[\"NoEndpointId\"] = \"NoEndpointId\";\n AmplifyErrorCode[\"PlatformNotSupported\"] = \"PlatformNotSupported\";\n AmplifyErrorCode[\"Unknown\"] = \"Unknown\";\n AmplifyErrorCode[\"NetworkError\"] = \"NetworkError\";\n})(AmplifyErrorCode || (AmplifyErrorCode = {}));\n\nexport { AmplifyErrorCode };\n","export const config = {\n onUnhandledError: null,\n onStoppedNotification: null,\n Promise: undefined,\n useDeprecatedSynchronousErrorHandling: false,\n useDeprecatedNextContext: false,\n};\n","/*\n * JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\n\n/* global define */\n\n/* eslint-disable strict */\n\n;(function ($) {\n 'use strict'\n\n /**\n * Add integers, wrapping at 2^32.\n * This uses 16-bit operations internally to work around bugs in interpreters.\n *\n * @param {number} x First integer\n * @param {number} y Second integer\n * @returns {number} Sum\n */\n function safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff)\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16)\n return (msw << 16) | (lsw & 0xffff)\n }\n\n /**\n * Bitwise rotate a 32-bit number to the left.\n *\n * @param {number} num 32-bit number\n * @param {number} cnt Rotation count\n * @returns {number} Rotated number\n */\n function bitRotateLeft(num, cnt) {\n return (num << cnt) | (num >>> (32 - cnt))\n }\n\n /**\n * Basic operation the algorithm uses.\n *\n * @param {number} q q\n * @param {number} a a\n * @param {number} b b\n * @param {number} x x\n * @param {number} s s\n * @param {number} t t\n * @returns {number} Result\n */\n function md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b)\n }\n /**\n * Basic operation the algorithm uses.\n *\n * @param {number} a a\n * @param {number} b b\n * @param {number} c c\n * @param {number} d d\n * @param {number} x x\n * @param {number} s s\n * @param {number} t t\n * @returns {number} Result\n */\n function md5ff(a, b, c, d, x, s, t) {\n return md5cmn((b & c) | (~b & d), a, b, x, s, t)\n }\n /**\n * Basic operation the algorithm uses.\n *\n * @param {number} a a\n * @param {number} b b\n * @param {number} c c\n * @param {number} d d\n * @param {number} x x\n * @param {number} s s\n * @param {number} t t\n * @returns {number} Result\n */\n function md5gg(a, b, c, d, x, s, t) {\n return md5cmn((b & d) | (c & ~d), a, b, x, s, t)\n }\n /**\n * Basic operation the algorithm uses.\n *\n * @param {number} a a\n * @param {number} b b\n * @param {number} c c\n * @param {number} d d\n * @param {number} x x\n * @param {number} s s\n * @param {number} t t\n * @returns {number} Result\n */\n function md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t)\n }\n /**\n * Basic operation the algorithm uses.\n *\n * @param {number} a a\n * @param {number} b b\n * @param {number} c c\n * @param {number} d d\n * @param {number} x x\n * @param {number} s s\n * @param {number} t t\n * @returns {number} Result\n */\n function md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t)\n }\n\n /**\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n *\n * @param {Array} x Array of little-endian words\n * @param {number} len Bit length\n * @returns {Array<number>} MD5 Array\n */\n function binlMD5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32\n x[(((len + 64) >>> 9) << 4) + 14] = len\n\n var i\n var olda\n var oldb\n var oldc\n var oldd\n var a = 1732584193\n var b = -271733879\n var c = -1732584194\n var d = 271733878\n\n for (i = 0; i < x.length; i += 16) {\n olda = a\n oldb = b\n oldc = c\n oldd = d\n\n a = md5ff(a, b, c, d, x[i], 7, -680876936)\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586)\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819)\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330)\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897)\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426)\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341)\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983)\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416)\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417)\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063)\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162)\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682)\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101)\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290)\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329)\n\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510)\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632)\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713)\n b = md5gg(b, c, d, a, x[i], 20, -373897302)\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691)\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083)\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335)\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848)\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438)\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690)\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961)\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501)\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467)\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784)\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473)\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734)\n\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558)\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463)\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562)\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556)\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060)\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353)\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632)\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640)\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174)\n d = md5hh(d, a, b, c, x[i], 11, -358537222)\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979)\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189)\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487)\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835)\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520)\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651)\n\n a = md5ii(a, b, c, d, x[i], 6, -198630844)\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415)\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905)\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055)\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571)\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606)\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523)\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799)\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359)\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744)\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380)\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649)\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070)\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379)\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259)\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551)\n\n a = safeAdd(a, olda)\n b = safeAdd(b, oldb)\n c = safeAdd(c, oldc)\n d = safeAdd(d, oldd)\n }\n return [a, b, c, d]\n }\n\n /**\n * Convert an array of little-endian words to a string\n *\n * @param {Array<number>} input MD5 Array\n * @returns {string} MD5 string\n */\n function binl2rstr(input) {\n var i\n var output = ''\n var length32 = input.length * 32\n for (i = 0; i < length32; i += 8) {\n output += String.fromCharCode((input[i >> 5] >>> i % 32) & 0xff)\n }\n return output\n }\n\n /**\n * Convert a raw string to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n *\n * @param {string} input Raw input string\n * @returns {Array<number>} Array of little-endian words\n */\n function rstr2binl(input) {\n var i\n var output = []\n output[(input.length >> 2) - 1] = undefined\n for (i = 0; i < output.length; i += 1) {\n output[i] = 0\n }\n var length8 = input.length * 8\n for (i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input.charCodeAt(i / 8) & 0xff) << i % 32\n }\n return output\n }\n\n /**\n * Calculate the MD5 of a raw string\n *\n * @param {string} s Input string\n * @returns {string} Raw MD5 string\n */\n function rstrMD5(s) {\n return binl2rstr(binlMD5(rstr2binl(s), s.length * 8))\n }\n\n /**\n * Calculates the HMAC-MD5 of a key and some data (raw strings)\n *\n * @param {string} key HMAC key\n * @param {string} data Raw input string\n * @returns {string} Raw MD5 string\n */\n function rstrHMACMD5(key, data) {\n var i\n var bkey = rstr2binl(key)\n var ipad = []\n var opad = []\n var hash\n ipad[15] = opad[15] = undefined\n if (bkey.length > 16) {\n bkey = binlMD5(bkey, key.length * 8)\n }\n for (i = 0; i < 16; i += 1) {\n ipad[i] = bkey[i] ^ 0x36363636\n opad[i] = bkey[i] ^ 0x5c5c5c5c\n }\n hash = binlMD5(ipad.concat(rstr2binl(data)), 512 + data.length * 8)\n return binl2rstr(binlMD5(opad.concat(hash), 512 + 128))\n }\n\n /**\n * Convert a raw string to a hex string\n *\n * @param {string} input Raw input string\n * @returns {string} Hex encoded string\n */\n function rstr2hex(input) {\n var hexTab = '0123456789abcdef'\n var output = ''\n var x\n var i\n for (i = 0; i < input.length; i += 1) {\n x = input.charCodeAt(i)\n output += hexTab.charAt((x >>> 4) & 0x0f) + hexTab.charAt(x & 0x0f)\n }\n return output\n }\n\n /**\n * Encode a string as UTF-8\n *\n * @param {string} input Input string\n * @returns {string} UTF8 string\n */\n function str2rstrUTF8(input) {\n return unescape(encodeURIComponent(input))\n }\n\n /**\n * Encodes input string as raw MD5 string\n *\n * @param {string} s Input string\n * @returns {string} Raw MD5 string\n */\n function rawMD5(s) {\n return rstrMD5(str2rstrUTF8(s))\n }\n /**\n * Encodes input string as Hex encoded string\n *\n * @param {string} s Input string\n * @returns {string} Hex encoded string\n */\n function hexMD5(s) {\n return rstr2hex(rawMD5(s))\n }\n /**\n * Calculates the raw HMAC-MD5 for the given key and data\n *\n * @param {string} k HMAC key\n * @param {string} d Input string\n * @returns {string} Raw MD5 string\n */\n function rawHMACMD5(k, d) {\n return rstrHMACMD5(str2rstrUTF8(k), str2rstrUTF8(d))\n }\n /**\n * Calculates the Hex encoded HMAC-MD5 for the given key and data\n *\n * @param {string} k HMAC key\n * @param {string} d Input string\n * @returns {string} Raw MD5 string\n */\n function hexHMACMD5(k, d) {\n return rstr2hex(rawHMACMD5(k, d))\n }\n\n /**\n * Calculates MD5 value for a given string.\n * If a key is provided, calculates the HMAC-MD5 value.\n * Returns a Hex encoded string unless the raw argument is given.\n *\n * @param {string} string Input string\n * @param {string} [key] HMAC key\n * @param {boolean} [raw] Raw output switch\n * @returns {string} MD5 output\n */\n function md5(string, key, raw) {\n if (!key) {\n if (!raw) {\n return hexMD5(string)\n }\n return rawMD5(string)\n }\n if (!raw) {\n return hexHMACMD5(key, string)\n }\n return rawHMACMD5(key, string)\n }\n\n if (typeof define === 'function' && define.amd) {\n define(function () {\n return md5\n })\n } else if (typeof module === 'object' && module.exports) {\n module.exports = md5\n } else {\n $.md5 = md5\n }\n})(this)\n","import { isFunction } from \"./isFunction\";\nexport function isPromise(value) {\n return isFunction(value === null || value === void 0 ? void 0 : value.then);\n}\n","import { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';\n\n@Component({\n selector: 'bw-billboard-article',\n templateUrl: './billboard-article.component.html',\n styleUrls: ['./billboard-article.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class BillboardArticleComponent {\n\n constructor() { }\n\n\n}\n","<ng-content></ng-content>\n","<bw-billboard-article *ngIf=\"displayMe\">\n <div class=\"media-small-center\" >\n <typography display class=\"mb-smd blue-80\">\n <div [innerHTML]=\"heading | translate\"></div>\n </typography>\n <p text-medium-regular class=\"gray-50 mb-md\" [innerHTML]=\"bodyCopy | translate:{customerNameFormatted:company}\"></p>\n <div class=\"media-small-hidden mb-md\">\n <typography title-medium>\n <div [innerHTML]=\"iconGroupTitle | translate\"></div>\n </typography>\n </div>\n </div>\n <div class=\"flex-row media-small-hidden mb-md\" style=\"flex-flow: row wrap;\">\n <div class=\"mr-md\">\n <div class=\"flex-row flex-start mb-sm\" *ngIf=\"('BS_ICON_ONE' | translate) !== 'null'\">\n <img src=\"../assets/{{iconPath.one}}\" class=\"mr-sm\" alt=\"\">\n <p text-medium-regular class=\"gray-50\" [innerHTML]=\"'BS_ICON_ONE' | translate\"></p>\n </div>\n <div class=\"flex-row flex-start mb-sm\" *ngIf=\"('BS_ICON_TWO' | translate) !== 'null'\">\n <img src=\"../assets/{{iconPath.two}}\" class=\"mr-sm\" alt=\"\">\n <p text-medium-regular class=\"gray-50\" [innerHTML]=\"'BS_ICON_TWO' | translate\"></p>\n </div>\n <div class=\"flex-row flex-start mb-sm\" *ngIf=\"('BS_ICON_THREE' | translate) !== 'null'\">\n <img src=\"../assets/{{iconPath.three}}\" class=\"mr-sm\" alt=\"\">\n <p text-medium-regular class=\"gray-50\" [innerHTML]=\"'BS_ICON_THREE' | translate\"></p>\n </div>\n <div class=\"flex-row flex-start mb-sm\" *ngIf=\"('BS_ICON_FOUR' | translate) !== 'null'\">\n <img src=\"../assets/{{iconPath.four}}\" class=\"mr-sm\" alt=\"\">\n <p text-medium-regular class=\"gray-50\" [innerHTML]=\"'BS_ICON_FOUR' | translate\"></p>\n </div>\n <div class=\"flex-row flex-start mb-sm\" *ngIf=\"('BS_ICON_FIVE' | translate) !== 'null'\">\n <img src=\"../assets/{{iconPath.five}}\" class=\"mr-sm\" alt=\"\">\n <p text-medium-regular class=\"gray-50\" [innerHTML]=\"'BS_ICON_FIVE' | translate\"></p>\n </div>\n <div class=\"flex-row flex-start mb-sm\" *ngIf=\"company.toLowerCase() !== 'amazon'\">\n <img src=\"../assets/{{iconPath.six}}\" class=\"mr-sm\" alt=\"\">\n <p text-medium-regular class=\"gray-50\" [innerHTML]=\"'BS_ICON_SIX' | translate\"></p>\n </div>\n </div>\n </div>\n</bw-billboard-article>\n","import {\n AfterViewInit,\n Component,\n ElementRef, EventEmitter,\n Host, HostListener,\n Input,\n OnDestroy,\n OnInit, Output,\n Renderer2,\n ViewChildren\n} from '@angular/core';\nimport { TitleCasePipe } from \"@angular/common\";\nimport { CompanyService } from \"@brightside-web/desktop/data-access/shared\";\nimport {Subscription} from \"rxjs\";\n\n@Component({\n selector: 'brightside-web-how-we-help',\n templateUrl: './how-we-help.component.html',\n styleUrls: ['./how-we-help.component.scss'],\n providers: [TitleCasePipe]\n})\nexport class HowWeHelpComponent implements OnInit, OnDestroy {\n\n private sub = new Subscription();\n\n company: string;\n displayMe = false;\n iconPath: {[key:string]:string};\n\n @Input() heading: string;\n @Input() bodyCopy: string;\n @Input() iconGroupTitle: string;\n @Output() introVideoClicked: EventEmitter<any> = new EventEmitter<any>()\n\n @HostListener('click', ['$event'])\n appOnClick(event: Event) {\n const target = <HTMLElement>event.target;\n if (target.nodeName === 'A' && target.classList.contains('showIntroVid')) {\n event.preventDefault();\n event.stopPropagation();\n this.introVideoClicked.emit(true);\n }\n }\n\n constructor(\n private titleCase: TitleCasePipe,\n private companyService: CompanyService,\n private el: ElementRef,\n private renderer: Renderer2\n ) {}\n\n ngOnInit(): void {\n this.sub.add(\n this.companyService.company.subscribe(\n value => {\n this.company = this.titleCase.transform(value);\n if (value.toLowerCase() === 'amazon') {\n this.iconPath = {\n one: 'landing/amazon/calculator-amazon.svg',\n two: 'landing/amazon/financebills-amazon.svg',\n four: 'landing/amazon/financeincome-amazon.svg',\n five: 'landing/amazon/growth-amazon.svg',\n three: 'landing/amazon/piggybank-amazon.svg',\n }\n } else {\n this.iconPath = {\n one: 'landing/meijer/house.svg',\n two: 'landing/meijer/cash.svg',\n three: 'landing/meijer/card.svg',\n four: 'landing/meijer/piggy-bank.svg',\n five: 'landing/meijer/dollarsign.svg',\n six: 'landing/meijer/checkmarkbadge.svg',\n }\n }\n this.displayMe = true;\n }\n )\n )\n }\n\n ngOnDestroy() {\n this.sub.unsubscribe();\n }\n\n}\n","import { dropUndefinedKeys } from '../utils-hoist/object.js';\n\n/**\n * key: bucketKey\n * value: [exportKey, MetricSummary]\n */\n\nconst METRICS_SPAN_FIELD = '_sentryMetrics';\n\n/**\n * Fetches the metric summary if it exists for the passed span\n */\nfunction getMetricSummaryJsonForSpan(span) {\n const storage = (span )[METRICS_SPAN_FIELD];\n\n if (!storage) {\n return undefined;\n }\n const output = {};\n\n for (const [, [exportKey, summary]] of storage) {\n const arr = output[exportKey] || (output[exportKey] = []);\n arr.push(dropUndefinedKeys(summary));\n }\n\n return output;\n}\n\n/**\n * Updates the metric summary on a span.\n */\nfunction updateMetricSummaryOnSpan(\n span,\n metricType,\n sanitizedName,\n value,\n unit,\n tags,\n bucketKey,\n) {\n const existingStorage = (span )[METRICS_SPAN_FIELD];\n const storage =\n existingStorage ||\n ((span )[METRICS_SPAN_FIELD] = new Map());\n\n const exportKey = `${metricType}:${sanitizedName}@${unit}`;\n const bucketItem = storage.get(bucketKey);\n\n if (bucketItem) {\n const [, summary] = bucketItem;\n storage.set(bucketKey, [\n exportKey,\n {\n min: Math.min(summary.min, value),\n max: Math.max(summary.max, value),\n count: (summary.count += 1),\n sum: (summary.sum += value),\n tags: summary.tags,\n },\n ]);\n } else {\n storage.set(bucketKey, [\n exportKey,\n {\n min: value,\n max: value,\n count: 1,\n sum: value,\n tags,\n },\n ]);\n }\n}\n\nexport { getMetricSummaryJsonForSpan, updateMetricSummaryOnSpan };\n","import { ElementRef, Inject, Injectable, Renderer2 } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\n\nimport { config, IConfig } from './config';\nimport { MaskApplierService } from './mask-applier.service';\n\n@Injectable()\nexport class MaskService extends MaskApplierService {\n public maskExpression = '';\n public isNumberValue = false;\n public placeHolderCharacter = '_';\n public maskIsShown = '';\n public selStart: number | null = null;\n public selEnd: number | null = null;\n\n /**\n * Whether we are currently in writeValue function, in this case when applying the mask we don't want to trigger onChange function,\n * since writeValue should be a one way only process of writing the DOM value based on the Angular model value.\n */\n public writingValue = false;\n\n private _formElement: HTMLInputElement;\n\n public onChange = (_: any) => {};\n\n public constructor(\n @Inject(DOCUMENT) private document: any,\n @Inject(config) protected _config: IConfig,\n private _elementRef: ElementRef,\n private _renderer: Renderer2\n ) {\n super(_config);\n this._formElement = this._elementRef.nativeElement;\n }\n\n // tslint:disable-next-line:cyclomatic-complexity\n public applyMask(inputValue: string, maskExpression: string, position: number = 0, cb: Function = () => {}): string {\n if (!maskExpression) {\n return inputValue;\n }\n this.maskIsShown = this.showMaskTyped ? this.showMaskInInput() : '';\n if (this.maskExpression === 'IP' && this.showMaskTyped) {\n this.maskIsShown = this.showMaskInInput(inputValue || '#');\n }\n if (this.maskExpression === 'CPF_CNPJ' && this.showMaskTyped) {\n this.maskIsShown = this.showMaskInInput(inputValue || '#');\n }\n if (!inputValue && this.showMaskTyped) {\n this.formControlResult(this.prefix);\n return this.prefix + this.maskIsShown;\n }\n const getSymbol: string = !!inputValue && typeof this.selStart === 'number' ? inputValue[this.selStart] : '';\n let newInputValue = '';\n if (this.hiddenInput !== undefined) {\n let actualResult: string[] = this.actualValue.split('');\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n inputValue !== '' && actualResult.length\n ? typeof this.selStart === 'number' && typeof this.selEnd === 'number'\n ? inputValue.length > actualResult.length\n ? actualResult.splice(this.selStart, 0, getSymbol)\n : inputValue.length < actualResult.length\n ? actualResult.length - inputValue.length === 1\n ? actualResult.splice(this.selStart - 1, 1)\n : actualResult.splice(this.selStart, this.selEnd - this.selStart)\n : null\n : null\n : (actualResult = []);\n // tslint:enable no-unused-expression\n newInputValue = this.actualValue.length ? this.shiftTypedSymbols(actualResult.join('')) : inputValue;\n }\n newInputValue = Boolean(newInputValue) && newInputValue.length ? newInputValue : inputValue;\n const result: string = super.applyMask(newInputValue, maskExpression, position, cb);\n this.actualValue = this.getActualValue(result);\n\n // handle some separator implications:\n // a.) adjust decimalMarker default (. -> ,) if thousandSeparator is a dot\n if (this.thousandSeparator === '.' && this.decimalMarker === '.') {\n this.decimalMarker = ',';\n }\n\n // b) remove decimal marker from list of special characters to mask\n if (this.maskExpression.startsWith('separator') && this.dropSpecialCharacters === true) {\n this.maskSpecialCharacters = this.maskSpecialCharacters.filter((item: string) => item !== this.decimalMarker);\n }\n\n this.formControlResult(result);\n\n if (!this.showMaskTyped) {\n if (this.hiddenInput) {\n return result && result.length ? this.hideInput(result, this.maskExpression) : result;\n }\n return result;\n }\n const resLen: number = result.length;\n const prefNmask: string = this.prefix + this.maskIsShown;\n return (\n result +\n (this.maskExpression === 'IP' || this.maskExpression === 'CPF_CNPJ' ? prefNmask : prefNmask.slice(resLen))\n );\n }\n\n public applyValueChanges(position: number = 0, cb: Function = () => {}): void {\n this._formElement.value = this.applyMask(this._formElement.value, this.maskExpression, position, cb);\n if (this._formElement === this.document.activeElement) {\n return;\n }\n this.clearIfNotMatchFn();\n }\n\n public hideInput(inputValue: string, maskExpression: string): string {\n return inputValue\n .split('')\n .map((curr: string, index: number) => {\n if (\n this.maskAvailablePatterns &&\n this.maskAvailablePatterns[maskExpression[index]] &&\n this.maskAvailablePatterns[maskExpression[index]].symbol\n ) {\n return this.maskAvailablePatterns[maskExpression[index]].symbol;\n }\n return curr;\n })\n .join('');\n }\n\n // this function is not necessary, it checks result against maskExpression\n public getActualValue(res: string): string {\n const compare: string[] = res\n .split('')\n .filter(\n (symbol: string, i: number) =>\n this._checkSymbolMask(symbol, this.maskExpression[i]) ||\n (this.maskSpecialCharacters.includes(this.maskExpression[i]) && symbol === this.maskExpression[i])\n );\n if (compare.join('') === res) {\n return compare.join('');\n }\n return res;\n }\n\n public shiftTypedSymbols(inputValue: string): string {\n let symbolToReplace = '';\n const newInputValue: string[] =\n (inputValue &&\n inputValue.split('').map((currSymbol: string, index: number) => {\n if (\n this.maskSpecialCharacters.includes(inputValue[index + 1]) &&\n inputValue[index + 1] !== this.maskExpression[index + 1]\n ) {\n symbolToReplace = currSymbol;\n return inputValue[index + 1];\n }\n if (symbolToReplace.length) {\n const replaceSymbol: string = symbolToReplace;\n symbolToReplace = '';\n return replaceSymbol;\n }\n return currSymbol;\n })) ||\n [];\n return newInputValue.join('');\n }\n\n public showMaskInInput(inputVal?: string): string {\n if (this.showMaskTyped && !!this.shownMaskExpression) {\n if (this.maskExpression.length !== this.shownMaskExpression.length) {\n throw new Error('Mask expression must match mask placeholder length');\n } else {\n return this.shownMaskExpression;\n }\n } else if (this.showMaskTyped) {\n if (inputVal) {\n if (this.maskExpression === 'IP') {\n return this._checkForIp(inputVal);\n }\n if (this.maskExpression === 'CPF_CNPJ') {\n return this._checkForCpfCnpj(inputVal);\n }\n }\n return this.maskExpression.replace(/\\w/g, this.placeHolderCharacter);\n }\n return '';\n }\n\n public clearIfNotMatchFn(): void {\n if (\n this.clearIfNotMatch &&\n this.prefix.length + this.maskExpression.length + this.suffix.length !==\n this._formElement.value.replace(/_/g, '').length\n ) {\n this.formElementProperty = ['value', ''];\n this.applyMask(this._formElement.value, this.maskExpression);\n }\n }\n\n public set formElementProperty([name, value]: [string, string | boolean]) {\n this._renderer.setProperty(this._formElement, name, value);\n }\n\n public checkSpecialCharAmount(mask: string): number {\n const chars: string[] = mask.split('').filter((item: string) => this._findSpecialChar(item));\n return chars.length;\n }\n\n public removeMask(inputValue: string): string {\n return this._removeMask(\n this._removeSuffix(this._removePrefix(inputValue)),\n this.maskSpecialCharacters.concat('_').concat(this.placeHolderCharacter)\n );\n }\n\n private _checkForIp(inputVal: string): string {\n if (inputVal === '#') {\n return `${this.placeHolderCharacter}.${this.placeHolderCharacter}.${this.placeHolderCharacter}.${this.placeHolderCharacter}`;\n }\n const arr: string[] = [];\n for (let i = 0; i < inputVal.length; i++) {\n if (inputVal[i].match('\\\\d')) {\n arr.push(inputVal[i]);\n }\n }\n if (arr.length <= 3) {\n return `${this.placeHolderCharacter}.${this.placeHolderCharacter}.${this.placeHolderCharacter}`;\n }\n if (arr.length > 3 && arr.length <= 6) {\n return `${this.placeHolderCharacter}.${this.placeHolderCharacter}`;\n }\n if (arr.length > 6 && arr.length <= 9) {\n return this.placeHolderCharacter;\n }\n if (arr.length > 9 && arr.length <= 12) {\n return '';\n }\n return '';\n }\n\n private _checkForCpfCnpj(inputVal: string): string {\n const cpf =\n `${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}` +\n `.${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}` +\n `.${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}` +\n `-${this.placeHolderCharacter}${this.placeHolderCharacter}`;\n const cnpj =\n `${this.placeHolderCharacter}${this.placeHolderCharacter}` +\n `.${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}` +\n `.${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}` +\n `/${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}` +\n `-${this.placeHolderCharacter}${this.placeHolderCharacter}`;\n\n if (inputVal === '#') {\n return cpf;\n }\n const arr: string[] = [];\n for (let i = 0; i < inputVal.length; i++) {\n if (inputVal[i].match('\\\\d')) {\n arr.push(inputVal[i]);\n }\n }\n if (arr.length <= 3) {\n return cpf.slice(arr.length, cpf.length);\n }\n if (arr.length > 3 && arr.length <= 6) {\n return cpf.slice(arr.length + 1, cpf.length);\n }\n if (arr.length > 6 && arr.length <= 9) {\n return cpf.slice(arr.length + 2, cpf.length);\n }\n if (arr.length > 9 && arr.length < 11) {\n return cpf.slice(arr.length + 3, cpf.length);\n }\n if (arr.length === 11) {\n return '';\n }\n if (arr.length === 12) {\n if (inputVal.length === 17) {\n return cnpj.slice(16, cnpj.length);\n }\n return cnpj.slice(15, cnpj.length);\n }\n if (arr.length > 12 && arr.length <= 14) {\n return cnpj.slice(arr.length + 4, cnpj.length);\n }\n return '';\n }\n\n /**\n * Propogates the input value back to the Angular model by triggering the onChange function. It won't do this if writingValue\n * is true. If that is true it means we are currently in the writeValue function, which is supposed to only update the actual\n * DOM element based on the Angular model value. It should be a one way process, i.e. writeValue should not be modifying the Angular\n * model value too. Therefore, we don't trigger onChange in this scenario.\n * @param inputValue the current form input value\n */\n private formControlResult(inputValue: string): void {\n if (!this.writingValue) {\n if (Array.isArray(this.dropSpecialCharacters)) {\n this.onChange(this._removeMask(this._removeSuffix(this._removePrefix(inputValue)), this.dropSpecialCharacters));\n } else if (this.dropSpecialCharacters) {\n this.onChange(this._checkSymbols(inputValue));\n } else {\n this.onChange(this._removeSuffix(this._removePrefix(inputValue)));\n }\n }\n }\n\n private _removeMask(value: string, specialCharactersForRemove: string[]): string {\n return value ? value.replace(this._regExpForRemove(specialCharactersForRemove), '') : value;\n }\n\n private _removePrefix(value: string): string {\n if (!this.prefix) {\n return value;\n }\n return value ? value.replace(this.prefix, '') : value;\n }\n\n private _removeSuffix(value: string): string {\n if (!this.suffix) {\n return value;\n }\n return value ? value.replace(this.suffix, '') : value;\n }\n\n private _retrieveSeparatorValue(result: string): string {\n return this._removeMask(this._removeSuffix(this._removePrefix(result)), this.maskSpecialCharacters);\n }\n\n private _regExpForRemove(specialCharactersForRemove: string[]): RegExp {\n return new RegExp(specialCharactersForRemove.map((item: string) => `\\\\${item}`).join('|'), 'gi');\n }\n\n private _checkSymbols(result: string): string | number | undefined | null {\n if (result === '') {\n return result;\n }\n\n const separatorPrecision: number | null = this._retrieveSeparatorPrecision(this.maskExpression);\n let separatorValue: string = this._retrieveSeparatorValue(result);\n if (this.decimalMarker !== '.') {\n separatorValue = separatorValue.replace(this.decimalMarker, '.');\n }\n\n if (this.isNumberValue) {\n if (separatorPrecision) {\n if (result === this.decimalMarker) {\n return null;\n }\n return this._checkPrecision(this.maskExpression, separatorValue);\n } else {\n return Number(separatorValue);\n }\n } else {\n return separatorValue;\n }\n }\n\n // TODO should think about helpers or separting decimal precision to own property\n private _retrieveSeparatorPrecision(maskExpretion: string): number | null {\n const matcher: RegExpMatchArray | null = maskExpretion.match(new RegExp(`^separator\\\\.([^d]*)`));\n return matcher ? Number(matcher[1]) : null;\n }\n\n private _checkPrecision(separatorExpression: string, separatorValue: string): number | string {\n if (separatorExpression.indexOf('2') > 0) {\n return Number(separatorValue).toFixed(2);\n }\n return Number(separatorValue);\n }\n}\n","<ng-container *ngIf=\"(requiredDocs$|async) as docs;else spinner\">\n <ng-container *ngIf=\"docs.length > 0;\">\n <bw-action-article\n [brightsideWebFb]=\"{ event_name: 'legal_documents' }\">\n <div header-actions>\n <ui-nav-exit-back\n *ngIf=\"showBackbutton\"\n [trackingDetail]=\"{ event_name: 'legal_documents' }\"\n [skipActionEmit]=\"skipActionEmit\"\n (exitActionHandler)=\"emitBackButtonEvent()\"\n ></ui-nav-exit-back>\n <bw-icon\n *ngIf=\"showCloseButton\"\n iconName=\"close\"\n size=\"24\"\n (click)=\"handleCloseClick()\"\n ></bw-icon>\n </div>\n <div content-section>\n <typography title-medium class=\"mb-sm\" color=\"var(--primary-text)\">\n <div [innerHTML]=\"title | translate\"></div>\n </typography>\n <typography text-medium-regular class=\"mb-md\" color=\"var(--secondary-text)\">\n <div [innerHTML]=\"subtitle | translate\"></div>\n </typography>\n <typography text-large-semibold class=\"mb-sm\" color=\"var(--primary-text)\">{{ 'AGREEMENTS' | translate }}</typography>\n <ng-container *ngFor=\"let doc of docs\">\n <div class=\"mb-sm\">\n <typography *ngIf=\"doc.titleCopyKey\" text-medium-semibold color=\"var(--primary-text)\">\n <div [innerHTML]=\"doc.titleCopyKey | translate\" class=\"mb-xs\"></div>\n </typography>\n <typography *ngIf=\"doc.descriptionCopyKey\" text-xsmall-regular color=\"var(--secondary-text)\">\n <div [innerHTML]=\"doc.descriptionCopyKey | translate\"></div>\n </typography>\n <ul class=\"legal-doc__links\" *ngIf=\"doc.downloadUrl && doc.downloadUrlCopyKey\">\n <li><a style=\"text-decoration: underline\" target=\"_blank\" (click)=\"handleDocClick(doc.downloadUrl, $event)\">\n <typography text-xsmall-regular >\n <div [innerHTML]=\"doc.downloadUrlCopyKey | translate\"></div>\n </typography>\n </a></li>\n </ul>\n </div>\n </ng-container>\n </div>\n\n\n <div footer-top class=\"flex-row space-center\">\n <form [formGroup]=\"confirmDataForm\">\n <bw-checkbox [formControlName]=\"'confirmCheckbox'\">\n <typography text-medium color=\"var(--primary-text)\">\n {{ 'LEGAL_DOCUMENTS_AGREEMENT' | translate }}\n </typography>\n </bw-checkbox>\n </form>\n </div>\n <div footer-actions>\n <div class=\"flex-row row-reverse\">\n <button\n bw-button\n type=\"submit\"\n (click)=\"onSubmit()\"\n [disabled]=\"confirmDataForm.invalid || (processing | async)\"\n [processing]=\"(processing | async)\"\n [brightsideWebFb]=\"{ event_name: 'legal_documents' }\"\n >\n {{ 'ACCEPT' | translate }}\n </button>\n </div>\n </div>\n\n </bw-action-article>\n\n <bw-modal *ngIf=\"displayDocsRequiredModal | async\" modalWidth=\"medium\"\n [showCloseButton]=\"false\">\n <typography title-medium color=\"var(--primary-text)\" class=\"mb-sm\">{{ 'ERROR_ADDITIONAL_DOCS_REQUIRED_TITLE' | translate }}</typography>\n <section class=\"body\">\n <bw-paragraph>\n <typography text-large-regular color=\"var(--secondary-text)\">\n <p class=\"mb-xs\">\n {{ 'ERROR_ADDITIONAL_DOCS_REQUIRED_DESC' | translate }}\n </p>\n </typography>\n </bw-paragraph>\n </section>\n <footer class=\"footer\">\n <div class=\"flex-row row-reverse\">\n <button\n bw-button\n [brightsideWebFb]=\"{ event_name: 'legal_documents_required' }\"\n (click)=\"refetchDocuments()\">\n {{ 'BUTTON_CONTINUE' | translate }}\n </button>\n </div>\n </footer>\n </bw-modal>\n\n\n <bw-modal *ngIf=\"displayGeneralError | async\" modalWidth=\"medium\"\n [showCloseButton]=\"false\"\n [brightsideWebFb]=\"{ event_name: 'error_shown', custom: { 'error id': 'legal_documents'}}\">\n <typography title-medium color=\"var(--primary-text)\" class=\"mb-sm\">\n {{ 'PROCESS_ERROR_TITLE' | translate }}\n </typography>\n <section class=\"body\">\n <bw-paragraph>\n <typography text-large-regular color=\"var(--secondary-text)\">\n <p class=\"mb-xs\">\n {{ 'PROCESS_ERROR_MSG' | translate }}\n </p>\n </typography>\n </bw-paragraph>\n </section>\n <footer class=\"footer\">\n <div class=\"flex-row row-reverse\">\n <button\n bw-button\n (click)=\"closeError()\">\n {{ 'BUTTON_CONTINUE' | translate }}\n </button>\n </div>\n </footer>\n </bw-modal>\n </ng-container>\n</ng-container>\n\n<ng-template #spinner>\n <bw-action-article>\n <div content-section>\n <div class=\"flex-column space-center\">\n <bw-spinner></bw-spinner>\n </div>\n </div>\n </bw-action-article>\n</ng-template>\n","import {ChangeDetectionStrategy, Component, EventEmitter, Input, Output, OnInit} from '@angular/core';\nimport {DocumentsKeyEnum, LegalDocsResponsePayload, LegalDocumentsService, LegalDocsResponsePayloadItems} from \"../legal-documents.service\";\nimport {Observable, Subscription} from \"rxjs\";\nimport {FormControl, FormGroup, Validators} from \"@angular/forms\";\nimport {ActivatedRoute} from \"@angular/router\";\nimport {take} from \"rxjs/operators\";\nimport {MessageBusEventUtil, MessageBusInternalService, MessageBusOutgoingEventKey} from \"@micro-core/message-bus\";\n\nexport interface LegalDocsPageConfigInterface {\n showCloseButton?: boolean;\n showBackbutton?: boolean;\n closeButtonRoute?: string[];\n pageOnForwardCtaPath: string[];\n documentsKey: DocumentsKeyEnum;\n}\n\n@Component({\n selector: 'brightside-web-required-legal-documents',\n templateUrl: './required-legal-documents.component.html',\n styleUrls: ['./required-legal-documents.component.scss'],\n providers: [ LegalDocumentsService ]\n})\nexport class RequiredLegalDocumentsComponent implements OnInit {\n\n sub = new Subscription();\n\n @Input() documentsKey: string;\n @Input() pageOnForwardCtaPath: string[];\n @Input() showBackbutton = true;\n @Input() skipActionEmit = true;\n @Input() showCloseButton = false;\n @Input() closeButtonRoute: string[] | undefined;\n @Output() closeButtonEvent: EventEmitter<boolean> = new EventEmitter<boolean>();\n @Output() backButtonEvent: EventEmitter<boolean> = new EventEmitter<boolean>();\n @Output() termsSubmittedEvent: EventEmitter<boolean> = new EventEmitter<boolean>();\n @Input() title = 'LEGAL_DOCUMENTS_TITLE';\n @Input() subtitle = 'LEGAL_DOCUMENTS_SUBTITLE';\n\n processing: Observable<boolean> = this.legalDocumentsService.processing;\n requiredDocs$: Observable<LegalDocsResponsePayloadItems[]>;\n docsSubmitted: Observable<boolean> = this.legalDocumentsService.docsSubmitted;\n displayDocsRequiredModal: Observable<boolean> = this.legalDocumentsService.displayDocsRequiredModal;\n displayGeneralError: Observable<boolean> = this.legalDocumentsService.displayGeneralError;\n\n confirmDataForm: FormGroup = new FormGroup({\n confirmCheckbox: new FormControl('', [Validators.requiredTrue])\n });\n\n config: LegalDocsPageConfigInterface;\n\n constructor(\n protected legalDocumentsService: LegalDocumentsService,\n private activatedRoute: ActivatedRoute\n ) {\n this.requiredDocs$ = this.legalDocumentsService.requiredDocuments;\n }\n\n ngOnInit(): void {\n if (this.documentsKey) {\n setTimeout(()=>{\n this.legalDocumentsService.getRequiredDocuments(this.documentsKey as DocumentsKeyEnum);\n },0);\n } else if (\n this.activatedRoute?.snapshot?.data?.pageConfig?.documentsKey\n ) {\n this.config = this.activatedRoute?.snapshot?.data?.pageConfig;\n this.documentsKey = this.config.documentsKey;\n this.pageOnForwardCtaPath = this.config.pageOnForwardCtaPath ?? '';\n this.closeButtonRoute = this.config.closeButtonRoute ?? undefined;\n this.showCloseButton = this.config.showCloseButton ?? false;\n this.showBackbutton = this.config.showBackbutton ?? true;\n setTimeout(()=>{\n this.legalDocumentsService.getRequiredDocuments(this.documentsKey as DocumentsKeyEnum);\n },0);\n } else {\n console.warn('Legal Docs component needs configs to run');\n }\n this.sub.add(\n this.docsSubmitted.subscribe(\n resp => {\n this.docsSubmittedResponse(resp);\n }\n )\n );\n }\n\n onSubmit() {\n this.legalDocumentsService.acceptRequiredDocuments();\n }\n\n handleCloseClick() {\n if (this.closeButtonRoute) {\n MessageBusEventUtil.routeToPath(this.closeButtonRoute.join('/'));\n } else {\n this.closeButtonEvent.emit(true);\n }\n }\n\n docsSubmittedResponse(success:boolean) {\n if (success) {\n if (!this.pageOnForwardCtaPath) {\n this.termsSubmittedEvent.emit(true);\n } else {\n MessageBusEventUtil.routeToPath(this.pageOnForwardCtaPath.join('/'));\n }\n } else {\n this.termsSubmittedEvent.emit(false);\n //unknown error?\n }\n }\n\n refetchDocuments() {\n this.confirmDataForm.reset();\n this.legalDocumentsService.getRequiredDocuments(this.documentsKey as DocumentsKeyEnum);\n }\n\n closeError() {\n this.legalDocumentsService.hideGeneralError();\n }\n\n handleDocClick(downloadUrl: string, $event: MouseEvent) {\n $event.stopPropagation();\n $event.preventDefault();\n MessageBusEventUtil.sendOutgoing({\n event: MessageBusOutgoingEventKey.EXTERNAL_LINK,\n bridgeSetting: {\n data: {\n url: downloadUrl,\n chatIcon: false,\n },\n },\n });\n }\n\n emitBackButtonEvent() {\n if (!this.skipActionEmit) this.backButtonEvent.emit(true);\n }\n}\n","//! moment.js locale configuration\n//! locale : Bambara [bm]\n//! author : Estelle Comment : https://github.com/estellecomment\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var bm = moment.defineLocale('bm', {\n months: 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split(\n '_'\n ),\n monthsShort: 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'),\n weekdays: 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'),\n weekdaysShort: 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'),\n weekdaysMin: 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'MMMM [tile] D [san] YYYY',\n LLL: 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',\n LLLL: 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',\n },\n calendar: {\n sameDay: '[Bi lɛrɛ] LT',\n nextDay: '[Sini lɛrɛ] LT',\n nextWeek: 'dddd [don lɛrɛ] LT',\n lastDay: '[Kunu lɛrɛ] LT',\n lastWeek: 'dddd [tɛmɛnen lɛrɛ] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s kɔnɔ',\n past: 'a bɛ %s bɔ',\n s: 'sanga dama dama',\n ss: 'sekondi %d',\n m: 'miniti kelen',\n mm: 'miniti %d',\n h: 'lɛrɛ kelen',\n hh: 'lɛrɛ %d',\n d: 'tile kelen',\n dd: 'tile %d',\n M: 'kalo kelen',\n MM: 'kalo %d',\n y: 'san kelen',\n yy: 'san %d',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return bm;\n\n})));\n","import { Observable } from '../Observable';\nimport { argsArgArrayOrObject } from '../util/argsArgArrayOrObject';\nimport { from } from './from';\nimport { identity } from '../util/identity';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { popResultSelector, popScheduler } from '../util/args';\nimport { createObject } from '../util/createObject';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function combineLatest(...args) {\n const scheduler = popScheduler(args);\n const resultSelector = popResultSelector(args);\n const { args: observables, keys } = argsArgArrayOrObject(args);\n if (observables.length === 0) {\n return from([], scheduler);\n }\n const result = new Observable(combineLatestInit(observables, scheduler, keys\n ?\n (values) => createObject(keys, values)\n :\n identity));\n return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result;\n}\nexport function combineLatestInit(observables, scheduler, valueTransform = identity) {\n return (subscriber) => {\n maybeSchedule(scheduler, () => {\n const { length } = observables;\n const values = new Array(length);\n let active = length;\n let remainingFirstValues = length;\n for (let i = 0; i < length; i++) {\n maybeSchedule(scheduler, () => {\n const source = from(observables[i], scheduler);\n let hasFirstValue = false;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n values[i] = value;\n if (!hasFirstValue) {\n hasFirstValue = true;\n remainingFirstValues--;\n }\n if (!remainingFirstValues) {\n subscriber.next(valueTransform(values.slice()));\n }\n }, () => {\n if (!--active) {\n subscriber.complete();\n }\n }));\n }, subscriber);\n }\n }, subscriber);\n };\n}\nfunction maybeSchedule(scheduler, execute, subscription) {\n if (scheduler) {\n executeSchedule(subscription, scheduler, execute);\n }\n else {\n execute();\n }\n}\n","import { Component, ViewEncapsulation, HostBinding, HostListener, ElementRef } from '@angular/core';\n\n@Component({\n selector: 'bw-menu',\n templateUrl: './menu.component.html',\n styleUrls: ['./menu.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class MenuComponent {\n constructor(private elementRef: ElementRef) { }\n @HostBinding('style.visibility') visibility = 'hidden';\n @HostListener('document:click', ['$event', '$event.target'])\n onClick(event: MouseEvent, targetElement: HTMLElement): void {\n const clickedInside = this.elementRef.nativeElement.contains(targetElement);\n if (targetElement.hasAttribute('bw-anchor')) {\n this.close(event);\n }\n if (!clickedInside) {\n this.close(event);\n }\n }\n\n open(e: MouseEvent) {\n this.visibility = 'visible';\n e.stopPropagation();\n }\n\n close(e: MouseEvent) {\n this.visibility = 'hidden';\n }\n\n toggle(e: MouseEvent) {\n this.visibility = this.visibility === 'visible' ? 'hidden' : 'visible';\n e.stopPropagation();\n }\n}\n","\n<div class=\"bw-menu-items\">\n <ng-content></ng-content>\n</div>\n","<div id=\"uiHeaderMenu\" class=\"mt-smd mb-md\">\n <ng-container *ngTemplateOutlet=\"headerTemplate; context: { title: title | translate, menu: menu }\"></ng-container>\n</div>\n\n<ng-template #headerTemplate let-title=\"title\" let-menu=\"menu\">\n <div title class=\"mt-xs mb-sm\">\n <typography title-medium color=\"var(--primary-text)\">{{ title }}</typography>\n\n <div class=\"flex-row right pointer\">\n <ng-container *ngFor=\"let exposedItem of menu.exposed\">\n <ng-container *ngIf=\"!menuState.hide.includes(exposedItem.key)\">\n <div class=\"mr-xs\" (click)=\"handleMenuItemSelect(exposedItem)\">\n <bw-icon\n [color]=\"'var(' + exposedItem.iconColor || '--secondary-text' + ')'\"\n [iconName]=\"exposedItem.iconName\"\n ></bw-icon>\n </div>\n <div class=\"mr-md secondary-text hidden-mobile\" (click)=\"handleMenuItemSelect(exposedItem)\">\n {{ exposedItem.displayTitle | translate }}\n </div>\n </ng-container>\n </ng-container>\n\n <bw-icon\n *ngIf=\"menu.items.length > 0\"\n color=\"var(--secondary-text)\"\n [iconName]=\"menu.iconName || 'ellipses' | translate\"\n [coreTracking]=\"{ event_name: trackingDetail + '_menu_toggle' }\"\n (click)=\"handleMenuToggleOpenClose($event)\"\n ></bw-icon>\n <bw-menu #actionMenu>\n <ng-container *ngFor=\"let item of menu.items\">\n <a\n *ngIf=\"!menuState.hide.includes(item.key)\"\n bw-anchor\n anchorStyle=\"text-medium-regular\"\n [color]=\"item.color\"\n (click)=\"handleMenuItemSelect(item)\"\n >\n {{ item.displayTitle | translate }}\n </a>\n </ng-container>\n </bw-menu>\n </div>\n </div>\n</ng-template>\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, ViewChild, ViewEncapsulation } from '@angular/core';\n\nimport { MenuComponent } from '@brightside/brightside-ui';\n\nimport { UiHeaderType } from '../header.enum';\nimport { UiHeaderMenu, UiHeaderMenuInputs, UiHeaderMenuItem } from '../header.interface';\n\n@Component({\n selector: 'ui-header-menu',\n templateUrl: './header-menu.component.html',\n template: '',\n styleUrls: ['./header-menu.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class UiHeaderMenuComponent implements UiHeaderMenuInputs {\n type: UiHeaderType = UiHeaderType.MENU;\n\n @Input() title: string;\n @Input() menu: UiHeaderMenu;\n @Input() trackingDetail: { event_name: string };\n @Input() menuState: { hide: string[]; last: UiHeaderMenuItem | null | undefined[] } = { hide: [], last: null };\n\n @Output() menuItemUpdateStateWithHandler = new EventEmitter();\n @Output() menuItemActionHandler = new EventEmitter();\n\n @ViewChild('actionMenu') actionMenu: MenuComponent;\n\n handleMenuItemSelect(menuItem: UiHeaderMenuItem) {\n this.menuItemUpdateStateWithHandler.emit({ state_menu: { last: [menuItem] } });\n this.menuItemActionHandler.emit();\n }\n\n handleMenuToggleOpenClose(e: MouseEvent) {\n if (this.actionMenu.visibility === 'visible') {\n this.actionMenu.close(e);\n } else {\n this.actionMenu.open(e);\n }\n }\n}\n","<bw-action-article [brightsideWebFb]=\"config.analyticsAttributes()\">\n <div *ngIf='config.analytics && config.analytics.shown'\n [brightsideWebFb]='{ event_name: config.analytics.shown }'>\n </div>\n <div pre-title *ngIf=\"config.pageTitleImage\">\n <img src=\"../assets/{{ config.pageTitleImage }}\" [alt]=\"config.pageTitleImage\" class=\"mb-md\" />\n </div>\n <div header-title class=\"mb-sm\"> \n <typography title-medium>\n {{ !config.pageTitleKey ? config.pageTitle : config.pageTitleKey | translate }}\n </typography>\n </div>\n <div content-section>\n <p text-large-regular class=\"mb-md\" color=\"var(--secondary-text)\">\n {{ !config.pageSubTitleKey ? config.pageSubTitle : config.pageSubTitleKey | translate }}\n </p>\n <div class=\"flex-column space-center\"></div>\n </div>\n <div footer-actions class=\"flex-row row-reverse\">\n <button\n *ngIf=\"config.pageCtaLabel || config.pageCtaLabelKey\"\n bw-button\n (click)=\"handleMoveForward()\"\n type=\"submit\"\n [brightsideWebFb]=\"config.analyticsAttributes('submit')\"\n >\n {{ !config.pageCtaLabelKey ? config.pageCtaLabel : config.pageCtaLabelKey | translate }}\n </button>\n </div>\n</bw-action-article>\n","import { Component, OnInit } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { RoutingStateService } from '@brightside/brightside-ui-services';\nimport { Settings, isTemplateFullScreen } from '@brightside-web/desktop/data-access/shared';\n\n@Component({\n selector: 'brightside-web-display-message',\n templateUrl: './display-message.component.html',\n})\nexport class DisplayMessageComponent implements OnInit {\n config: Settings = new Settings({\n fbPage: 'page',\n fbCategory: 'consents',\n fbEventName: '',\n pageTitle: '',\n pageTitleImage: '',\n pageTitleKey: '',\n pageSubTitle: '',\n pageSubTitleKey: '',\n pageCtaLabel: 'BUTTON_CONTINUE',\n pageCtaLabelKey: '',\n pageSecondaryCtaLabel: '',\n pageSecondaryCtaLabelKey: '',\n\n pageOnForwardCtaPath: [],\n });\n\n processing: boolean;\n\n pageIsFullScreen: boolean;\n\n constructor(private routingState: RoutingStateService, private activatedRoute: ActivatedRoute) {}\n\n ngOnInit(): void {\n this.checkForConfigViaData();\n }\n\n private checkForConfigViaData() {\n if (isTemplateFullScreen(this.activatedRoute)) {\n this.pageIsFullScreen = true;\n }\n\n if (this.activatedRoute?.snapshot?.data?.pageConfig) {\n this.config = new Settings(this.activatedRoute.snapshot.data.pageConfig);\n }\n }\n\n handleMoveForward() {\n let options = {};\n\n if (this.config.pageOnForwardCtaData) {\n options = { queryParams: this.config.pageOnForwardCtaData };\n }\n\n this.routingState.navigateTo(this.config.pageOnForwardCtaPath, options);\n }\n}\n","//! moment.js locale configuration\n//! locale : Thai [th]\n//! author : Kridsada Thanabulpong : https://github.com/sirn\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var th = moment.defineLocale('th', {\n months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split(\n '_'\n ),\n monthsShort:\n 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),\n weekdaysShort: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference\n weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY เวลา H:mm',\n LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm',\n },\n meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,\n isPM: function (input) {\n return input === 'หลังเที่ยง';\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ก่อนเที่ยง';\n } else {\n return 'หลังเที่ยง';\n }\n },\n calendar: {\n sameDay: '[วันนี้ เวลา] LT',\n nextDay: '[พรุ่งนี้ เวลา] LT',\n nextWeek: 'dddd[หน้า เวลา] LT',\n lastDay: '[เมื่อวานนี้ เวลา] LT',\n lastWeek: '[วัน]dddd[ที่แล้ว เวลา] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'อีก %s',\n past: '%sที่แล้ว',\n s: 'ไม่กี่วินาที',\n ss: '%d วินาที',\n m: '1 นาที',\n mm: '%d นาที',\n h: '1 ชั่วโมง',\n hh: '%d ชั่วโมง',\n d: '1 วัน',\n dd: '%d วัน',\n w: '1 สัปดาห์',\n ww: '%d สัปดาห์',\n M: '1 เดือน',\n MM: '%d เดือน',\n y: '1 ปี',\n yy: '%d ปี',\n },\n });\n\n return th;\n\n})));\n","<input\n #cb\n type=\"checkbox\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [value]=\"value\"\n [name]=\"name\"\n [readOnly]=\"readonly\"\n (change)=\"handleChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n/>\n\n<div class=\"checkbox-wrapper flex-row\" [ngClass]=\"{'mobile-space-center': centerAlign, 'disabled': disabled}\">\n <span #placeholderLabel class=\"faux-checkbox\" [id]=\"name+value\" (click)=\"onClick($event, cb, true)\" role=\"checkbox\" [ngClass]=\"{'bw-checkbox-single-margin': singleMargin}\">\n <ng-container *ngIf=\"rounded\">\n <img [ngClass]=\"checked? 'rounded-checkbox-checked': 'rounded-checkbox-unchecked'\" src=\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMCAyMSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeT0iMC4wMTgwMDU0IiB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHJ4PSIxMCIgZmlsbD0iIzAwNUZGRiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTE0Ljc1OTUgNi43NDg0MkMxNC45MDkgNi44OTE2OSAxNC45MTQgNy4xMjg5OSAxNC43NzA3IDcuMjc4NDVMOC41Mzk5NCAxMy43NzYzQzguNDY5MjIgMTMuODUgOC4zNzE0NCAxMy44OTE3IDguMjY5MjMgMTMuODkxN0M4LjE2NzAyIDEzLjg5MTcgOC4wNjkyNSAxMy44NSA3Ljk5ODUyIDEzLjc3NjNMNS4yMjkyOSAxMC44ODg0QzUuMDg1OTcgMTAuNzM4OSA1LjA5MDk5IDEwLjUwMTYgNS4yNDA1IDEwLjM1ODNDNS4zOTAwMSAxMC4yMTUxIDUuNjI3NCAxMC4yMjAxIDUuNzcwNzEgMTAuMzY5NUw4LjI2OTIzIDEyLjk3NTFMMTQuMjI5MyA2Ljc1OTYzQzE0LjM3MjYgNi42MTAxNyAxNC42MSA2LjYwNTE1IDE0Ljc1OTUgNi43NDg0MloiIGZpbGw9IndoaXRlIiBzdHJva2U9IndoaXRlIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9zdmc+Cg==\" [attr.alt]=\"checked? 'checked' : 'unchecked' + ' checkbox'\">\n </ng-container>\n <ng-container *ngIf=\"!rounded\">\n <img *ngIf=\"checked\" src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAYCAYAAAARfGZ1AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAD1SURBVHgB7ZRtFYIwFIbfcQigDYggDTSIoA00gZBAGwgJjIARbCANXALnZTCVw8eAob94zhnb3WXPDgMuMFEDe4884VN0otEMw0hhIcCZxVW5L+50dWAGR8zmKrC+Eg7MKT21hR9iKk/pYFeyH1meiyN2pX47plyJU2zEAgKXPnKObuIliRM0fL5VOUNMzUX9OX7E2X/RIm6SJ3Jx9UXdSmKGCBqq8ictWotdsYErpQPE9fJ89kiSA8m4lOZiLuc6ijPsxgyjOuEJkDSUcS4O0AO7Nas2UOOe2No7BkgVf6stHOak9XKGPRoKkAZRtAc5QkzoeAHrIk2PxBJn9wAAAABJRU5ErkJggg==\" alt=\"checked checkbox\">\n <img *ngIf=\"!checked\" src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACCSURBVHgB7ZTBDYAgDEVr4wCMIGEwZ3AD3MAVHIzACEwAQoIGezFgTDz0JRBKm//bSwGYB4Y6sNbOIYQtPQX04RBRSyn38wPrbBLXL8QzU2nwYqQF+VJKDdCBMSYCaRDhY9iADdiADf5gQLepT0eUrdiLq4PbBDHGhRY04pPGCkwLB50PIr6oYSc4AAAAAElFTkSuQmCC\" alt=\"unchecked checkbox\">\n </ng-container>\n </span>\n <label class=\"body\"\n [innerHTML]=\"label\"\n (click)=\"onClick($event, cb, true)\" *ngIf=\"label\" [attr.for]=\"name+value\">\n </label>\n <label [attr.for]=\"name+value\" *ngIf=\"!label\" class=\"body\" (click)=\"onClick($event, cb, true)\"><ng-content></ng-content></label>\n</div>\n","import { Component, EventEmitter, Input, Output, ChangeDetectorRef, forwardRef } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nexport const CHECKBOX_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => CheckboxComponent),\n multi: true\n};\n\n@Component({\n selector: 'bw-checkbox',\n templateUrl: './checkbox.component.html',\n styleUrls: ['./checkbox.component.scss'],\n providers: [CHECKBOX_VALUE_ACCESSOR]\n})\nexport class CheckboxComponent implements ControlValueAccessor {\n model: any;\n focused = false;\n\n @Input() checked = false;\n @Input() value: any;\n @Input() disabled: boolean;\n @Input() readonly: boolean;\n @Input() label: string;\n @Input() name: string;\n @Input() centerAlign = false;\n @Input() rounded = false;\n @Input() singleMargin = false;\n @Output() checkboxChanged: EventEmitter<any> = new EventEmitter();\n\n onModelChange: Function = () => {};\n onModelTouched: Function = () => {};\n\n constructor(private cd: ChangeDetectorRef) {}\n\n onClick(event: any, checkbox: any, focus: boolean) {\n // added so that consent links could trigger a new tab\n // with consent document\n const target = event.target as HTMLElement;\n if (!target.classList.contains('bypass')) {\n event.preventDefault();\n\n if (this.disabled || this.readonly) {\n return;\n }\n\n this.checked = !this.checked;\n this.updateModel();\n\n }\n }\n\n updateModel() {\n if (this.checked) this.addValue();\n else this.removeValue();\n\n this.onModelChange(this.model);\n\n this.checkboxChanged.emit(this.checked);\n }\n\n removeValue() {\n this.model = false;\n }\n\n addValue() {\n this.model = true;\n }\n\n handleChange(event: any) {\n if (!this.readonly) {\n this.checked = event.target.checked;\n this.updateModel();\n }\n }\n\n isChecked(): boolean {\n return this.model;\n }\n\n writeValue(model: any): void {\n this.model = model;\n this.checked = this.isChecked();\n this.cd.markForCheck();\n }\n\n registerOnChange(fn: Function): void {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn: Function): void {\n this.onModelTouched = fn;\n }\n\n onFocus() {\n this.focused = true;\n }\n\n onBlur() {\n this.focused = false;\n this.onModelTouched();\n }\n}\n","import { isVueViewModel, isString, isRegExp } from './is.js';\n\n/**\n * Truncates given string to the maximum characters count\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string (0 = unlimited)\n * @returns string Encoded\n */\nfunction truncate(str, max = 0) {\n if (typeof str !== 'string' || max === 0) {\n return str;\n }\n return str.length <= max ? str : `${str.slice(0, max)}...`;\n}\n\n/**\n * This is basically just `trim_line` from\n * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\nfunction snipLine(line, colno) {\n let newLine = line;\n const lineLength = newLine.length;\n if (lineLength <= 150) {\n return newLine;\n }\n if (colno > lineLength) {\n // eslint-disable-next-line no-param-reassign\n colno = lineLength;\n }\n\n let start = Math.max(colno - 60, 0);\n if (start < 5) {\n start = 0;\n }\n\n let end = Math.min(start + 140, lineLength);\n if (end > lineLength - 5) {\n end = lineLength;\n }\n if (end === lineLength) {\n start = Math.max(end - 140, 0);\n }\n\n newLine = newLine.slice(start, end);\n if (start > 0) {\n newLine = `'{snip} ${newLine}`;\n }\n if (end < lineLength) {\n newLine += ' {snip}';\n }\n\n return newLine;\n}\n\n/**\n * Join values in array\n * @param input array of values to be joined together\n * @param delimiter string to be placed in-between values\n * @returns Joined values\n */\nfunction safeJoin(input, delimiter) {\n if (!Array.isArray(input)) {\n return '';\n }\n\n const output = [];\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < input.length; i++) {\n const value = input[i];\n try {\n // This is a hack to fix a Vue3-specific bug that causes an infinite loop of\n // console warnings. This happens when a Vue template is rendered with\n // an undeclared variable, which we try to stringify, ultimately causing\n // Vue to issue another warning which repeats indefinitely.\n // see: https://github.com/getsentry/sentry-javascript/pull/8981\n if (isVueViewModel(value)) {\n output.push('[VueViewModel]');\n } else {\n output.push(String(value));\n }\n } catch (e) {\n output.push('[value cannot be serialized]');\n }\n }\n\n return output.join(delimiter);\n}\n\n/**\n * Checks if the given value matches a regex or string\n *\n * @param value The string to test\n * @param pattern Either a regex or a string against which `value` will be matched\n * @param requireExactStringMatch If true, `value` must match `pattern` exactly. If false, `value` will match\n * `pattern` if it contains `pattern`. Only applies to string-type patterns.\n */\nfunction isMatchingPattern(\n value,\n pattern,\n requireExactStringMatch = false,\n) {\n if (!isString(value)) {\n return false;\n }\n\n if (isRegExp(pattern)) {\n return pattern.test(value);\n }\n if (isString(pattern)) {\n return requireExactStringMatch ? value === pattern : value.includes(pattern);\n }\n\n return false;\n}\n\n/**\n * Test the given string against an array of strings and regexes. By default, string matching is done on a\n * substring-inclusion basis rather than a strict equality basis\n *\n * @param testString The string to test\n * @param patterns The patterns against which to test the string\n * @param requireExactStringMatch If true, `testString` must match one of the given string patterns exactly in order to\n * count. If false, `testString` will match a string pattern if it contains that pattern.\n * @returns\n */\nfunction stringMatchesSomePattern(\n testString,\n patterns = [],\n requireExactStringMatch = false,\n) {\n return patterns.some(pattern => isMatchingPattern(testString, pattern, requireExactStringMatch));\n}\n\nexport { isMatchingPattern, safeJoin, snipLine, stringMatchesSomePattern, truncate };\n","import { Directive, ElementRef, Renderer2, OnInit } from \"@angular/core\";\n\n@Directive({\n selector: '[click]'\n})\nexport class ClickStyleDirective implements OnInit {\n\n constructor(private elementRef: ElementRef, private renderer: Renderer2) {}\n\n ngOnInit(): void {\n this.renderer.setStyle(this.elementRef.nativeElement, 'cursor', 'pointer')\n }\n\n}","import { addNonEnumerableProperty } from '../utils-hoist/object.js';\n\nconst SCOPE_SPAN_FIELD = '_sentrySpan';\n\n/**\n * Set the active span for a given scope.\n * NOTE: This should NOT be used directly, but is only used internally by the trace methods.\n */\nfunction _setSpanForScope(scope, span) {\n if (span) {\n addNonEnumerableProperty(scope , SCOPE_SPAN_FIELD, span);\n } else {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete (scope )[SCOPE_SPAN_FIELD];\n }\n}\n\n/**\n * Get the active span for a given scope.\n * NOTE: This should NOT be used directly, but is only used internally by the trace methods.\n */\nfunction _getSpanForScope(scope) {\n return scope[SCOPE_SPAN_FIELD];\n}\n\nexport { _getSpanForScope, _setSpanForScope };\n","import { isFunction } from './isFunction';\nexport function isAsyncIterable(obj) {\n return Symbol.asyncIterator && isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]);\n}\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(,.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(').replace(/^.*?\\s+/, '');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\(.+\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n // if a location was matched, pass it to extractLocation() otherwise pass all sanitizedLine\n // because this line doesn't have function name\n var locationParts = this.extractLocation(location ? location[1] : sanitizedLine);\n var functionName = location && sanitizedLine || undefined;\n var fileName = ['eval', '<anonymous>'].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(/<anonymous function(: (\\w+))?>/, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","import { Subject } from './Subject';\nexport class BehaviorSubject extends Subject {\n constructor(_value) {\n super();\n this._value = _value;\n }\n get value() {\n return this.getValue();\n }\n _subscribe(subscriber) {\n const subscription = super._subscribe(subscriber);\n !subscription.closed && subscriber.next(this._value);\n return subscription;\n }\n getValue() {\n const { hasError, thrownError, _value } = this;\n if (hasError) {\n throw thrownError;\n }\n this._throwIfClosed();\n return _value;\n }\n next(value) {\n super.next((this._value = value));\n }\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function defaultIfEmpty(defaultValue) {\n return operate((source, subscriber) => {\n let hasValue = false;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n hasValue = true;\n subscriber.next(value);\n }, () => {\n if (!hasValue) {\n subscriber.next(defaultValue);\n }\n subscriber.complete();\n }));\n });\n}\n","//! moment.js locale configuration\n//! locale : Marathi [mr]\n//! author : Harshad Kale : https://github.com/kalehv\n//! author : Vivek Athalye : https://github.com/vnathalye\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '१',\n 2: '२',\n 3: '३',\n 4: '४',\n 5: '५',\n 6: '६',\n 7: '७',\n 8: '८',\n 9: '९',\n 0: '०',\n },\n numberMap = {\n '१': '1',\n '२': '2',\n '३': '3',\n '४': '4',\n '५': '5',\n '६': '6',\n '७': '7',\n '८': '8',\n '९': '9',\n '०': '0',\n };\n\n function relativeTimeMr(number, withoutSuffix, string, isFuture) {\n var output = '';\n if (withoutSuffix) {\n switch (string) {\n case 's':\n output = 'काही सेकंद';\n break;\n case 'ss':\n output = '%d सेकंद';\n break;\n case 'm':\n output = 'एक मिनिट';\n break;\n case 'mm':\n output = '%d मिनिटे';\n break;\n case 'h':\n output = 'एक तास';\n break;\n case 'hh':\n output = '%d तास';\n break;\n case 'd':\n output = 'एक दिवस';\n break;\n case 'dd':\n output = '%d दिवस';\n break;\n case 'M':\n output = 'एक महिना';\n break;\n case 'MM':\n output = '%d महिने';\n break;\n case 'y':\n output = 'एक वर्ष';\n break;\n case 'yy':\n output = '%d वर्षे';\n break;\n }\n } else {\n switch (string) {\n case 's':\n output = 'काही सेकंदां';\n break;\n case 'ss':\n output = '%d सेकंदां';\n break;\n case 'm':\n output = 'एका मिनिटा';\n break;\n case 'mm':\n output = '%d मिनिटां';\n break;\n case 'h':\n output = 'एका तासा';\n break;\n case 'hh':\n output = '%d तासां';\n break;\n case 'd':\n output = 'एका दिवसा';\n break;\n case 'dd':\n output = '%d दिवसां';\n break;\n case 'M':\n output = 'एका महिन्या';\n break;\n case 'MM':\n output = '%d महिन्यां';\n break;\n case 'y':\n output = 'एका वर्षा';\n break;\n case 'yy':\n output = '%d वर्षां';\n break;\n }\n }\n return output.replace(/%d/i, number);\n }\n\n var mr = moment.defineLocale('mr', {\n months: 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(\n '_'\n ),\n monthsShort:\n 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),\n weekdaysShort: 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'),\n weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),\n longDateFormat: {\n LT: 'A h:mm वाजता',\n LTS: 'A h:mm:ss वाजता',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm वाजता',\n LLLL: 'dddd, D MMMM YYYY, A h:mm वाजता',\n },\n calendar: {\n sameDay: '[आज] LT',\n nextDay: '[उद्या] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[काल] LT',\n lastWeek: '[मागील] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%sमध्ये',\n past: '%sपूर्वी',\n s: relativeTimeMr,\n ss: relativeTimeMr,\n m: relativeTimeMr,\n mm: relativeTimeMr,\n h: relativeTimeMr,\n hh: relativeTimeMr,\n d: relativeTimeMr,\n dd: relativeTimeMr,\n M: relativeTimeMr,\n MM: relativeTimeMr,\n y: relativeTimeMr,\n yy: relativeTimeMr,\n },\n preparse: function (string) {\n return string.replace(/[१२३४५६७८९०]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'पहाटे' || meridiem === 'सकाळी') {\n return hour;\n } else if (\n meridiem === 'दुपारी' ||\n meridiem === 'सायंकाळी' ||\n meridiem === 'रात्री'\n ) {\n return hour >= 12 ? hour : hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour >= 0 && hour < 6) {\n return 'पहाटे';\n } else if (hour < 12) {\n return 'सकाळी';\n } else if (hour < 17) {\n return 'दुपारी';\n } else if (hour < 20) {\n return 'सायंकाळी';\n } else {\n return 'रात्री';\n }\n },\n week: {\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 });\n\n return mr;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (Israel) [en-il]\n//! author : Chris Gedrim : https://github.com/chrisgedrim\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enIl = moment.defineLocale('en-il', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\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 relativeTime: {\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 M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((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 return enIl;\n\n})));\n","import { Observable } from '../Observable';\nimport { argsArgArrayOrObject } from '../util/argsArgArrayOrObject';\nimport { innerFrom } from './innerFrom';\nimport { popResultSelector } from '../util/args';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { createObject } from '../util/createObject';\nexport function forkJoin(...args) {\n const resultSelector = popResultSelector(args);\n const { args: sources, keys } = argsArgArrayOrObject(args);\n const result = new Observable((subscriber) => {\n const { length } = sources;\n if (!length) {\n subscriber.complete();\n return;\n }\n const values = new Array(length);\n let remainingCompletions = length;\n let remainingEmissions = length;\n for (let sourceIndex = 0; sourceIndex < length; sourceIndex++) {\n let hasValue = false;\n innerFrom(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, (value) => {\n if (!hasValue) {\n hasValue = true;\n remainingEmissions--;\n }\n values[sourceIndex] = value;\n }, () => remainingCompletions--, undefined, () => {\n if (!remainingCompletions || !hasValue) {\n if (!remainingEmissions) {\n subscriber.next(keys ? createObject(keys, values) : values);\n }\n subscriber.complete();\n }\n }));\n }\n });\n return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result;\n}\n","function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n// These mappings map a character (key) to a specific digit that should\n// replace it for normalization purposes. Non-European digits that\n// may be used in phone numbers are mapped to a European equivalent.\n//\n// E.g. in Iraq they don't write `+442323234` but rather `+٤٤٢٣٢٣٢٣٤`.\n//\nexport var DIGITS = {\n '0': '0',\n '1': '1',\n '2': '2',\n '3': '3',\n '4': '4',\n '5': '5',\n '6': '6',\n '7': '7',\n '8': '8',\n '9': '9',\n \"\\uFF10\": '0',\n // Fullwidth digit 0\n \"\\uFF11\": '1',\n // Fullwidth digit 1\n \"\\uFF12\": '2',\n // Fullwidth digit 2\n \"\\uFF13\": '3',\n // Fullwidth digit 3\n \"\\uFF14\": '4',\n // Fullwidth digit 4\n \"\\uFF15\": '5',\n // Fullwidth digit 5\n \"\\uFF16\": '6',\n // Fullwidth digit 6\n \"\\uFF17\": '7',\n // Fullwidth digit 7\n \"\\uFF18\": '8',\n // Fullwidth digit 8\n \"\\uFF19\": '9',\n // Fullwidth digit 9\n \"\\u0660\": '0',\n // Arabic-indic digit 0\n \"\\u0661\": '1',\n // Arabic-indic digit 1\n \"\\u0662\": '2',\n // Arabic-indic digit 2\n \"\\u0663\": '3',\n // Arabic-indic digit 3\n \"\\u0664\": '4',\n // Arabic-indic digit 4\n \"\\u0665\": '5',\n // Arabic-indic digit 5\n \"\\u0666\": '6',\n // Arabic-indic digit 6\n \"\\u0667\": '7',\n // Arabic-indic digit 7\n \"\\u0668\": '8',\n // Arabic-indic digit 8\n \"\\u0669\": '9',\n // Arabic-indic digit 9\n \"\\u06F0\": '0',\n // Eastern-Arabic digit 0\n \"\\u06F1\": '1',\n // Eastern-Arabic digit 1\n \"\\u06F2\": '2',\n // Eastern-Arabic digit 2\n \"\\u06F3\": '3',\n // Eastern-Arabic digit 3\n \"\\u06F4\": '4',\n // Eastern-Arabic digit 4\n \"\\u06F5\": '5',\n // Eastern-Arabic digit 5\n \"\\u06F6\": '6',\n // Eastern-Arabic digit 6\n \"\\u06F7\": '7',\n // Eastern-Arabic digit 7\n \"\\u06F8\": '8',\n // Eastern-Arabic digit 8\n \"\\u06F9\": '9' // Eastern-Arabic digit 9\n\n};\nexport function parseDigit(character) {\n return DIGITS[character];\n}\n/**\r\n * Parses phone number digits from a string.\r\n * Drops all punctuation leaving only digits.\r\n * Also converts wide-ascii and arabic-indic numerals to conventional numerals.\r\n * E.g. in Iraq they don't write `+442323234` but rather `+٤٤٢٣٢٣٢٣٤`.\r\n * @param {string} string\r\n * @return {string}\r\n * @example\r\n * ```js\r\n * parseDigits('8 (800) 555')\r\n * // Outputs '8800555'.\r\n * ```\r\n */\n\nexport default function parseDigits(string) {\n var result = ''; // Using `.split('')` here instead of normal `for ... of`\n // because the importing application doesn't neccessarily include an ES6 polyfill.\n // The `.split('')` approach discards \"exotic\" UTF-8 characters\n // (the ones consisting of four bytes) but digits\n // (including non-European ones) don't fall into that range\n // so such \"exotic\" characters would be discarded anyway.\n\n for (var _iterator = _createForOfIteratorHelperLoose(string.split('')), _step; !(_step = _iterator()).done;) {\n var character = _step.value;\n var digit = parseDigit(character);\n\n if (digit) {\n result += digit;\n }\n }\n\n return result;\n}\n","<span *ngIf=\"hasPrefix\" class=\"mr-xs\"> <bw-icon [iconName]=\"prefixIconName\" size=\"24\"></bw-icon> </span>\n<span [ngClass]=\"[anchorStyle ? anchorStyle : '']\" [ngStyle]=\"{color: color, 'text-decoration': anchorUnderline ? 'underline' : ''}\"><ng-content></ng-content></span>\n<span *ngIf=\"hasSuffix\"><bw-icon [iconName]=\"suffixIconName\" size=\"24\"></bw-icon> </span>\n","import { Component, OnInit, Input } from '@angular/core';\n\n@Component({\n selector: 'a[bw-anchor]',\n templateUrl: './anchor.component.html',\n styleUrls: ['./anchor.component.scss']\n})\nexport class AnchorComponent implements OnInit {\n hasPrefix: boolean;\n hasSuffix: boolean;\n\n /** An icon that is placed before the anchor string */\n @Input() prefixIconName: string;\n\n /** An icon that is placed after the anchor string */\n @Input() suffixIconName: string;\n\n /** The anchor style. This will allow any of the available typography css classes. That class will be added as a class to the span that contains the anchor string. */\n @Input() anchorStyle: string;\n\n /** If the anchor string should be underlined */\n @Input() anchorUnderline = false;\n\n /** The color of the anchor string */\n @Input() color: string;\n\n ngOnInit() {\n if (this.prefixIconName) {\n this.hasPrefix = true;\n }\n if (this.suffixIconName) {\n this.hasSuffix = true;\n }\n }\n}\n","<section class=\"content-layout\">\n <bw-action-article [brightsideWebFb]=\"{ event_name: eventName }\">\n <bw-icon\n *ngIf=\"closeable\"\n back-action-top\n iconName=\"close\"\n size=\"24\"\n [brightsideWebFb]=\"displayFormAnalytics.dismiss\"\n (click)=\"handleCloseClick()\"\n ></bw-icon>\n\n <div header-title class=\"mb-sm\">\n <typography title-medium class=\"mb-sm\">{{ titleText | translate }}</typography>\n </div>\n\n <div content-section>\n <p text-large-regular class=\"mb-md\" color=\"var(--secondary-text)\">{{ bodyText | translate }}</p>\n <div class=\"flex-column space-center mb-xxl\">\n <img *ngIf=\"imageName\" src=\"../assets/{{ imageName }}.svg\" [alt]=\"imageName\" class=\"mb-md\" />\n </div>\n <div class=\"mb-xxl\"></div>\n </div>\n\n <div footer-actions class=\"flex-row row-reverse\">\n <button bw-button fluidWidth type=\"submit\" [brightsideWebFb]=\"{ event_name: eventName }\" (click)=\"handlePrimaryClick()\">\n {{ primaryCtaText | translate }}\n </button>\n\n <typography text-large-semibold>\n <a\n *ngIf=\"secondaryCtaText\"\n bw-anchor\n fluidWidth\n class=\"bs-blue brand pr-xl\"\n [brightsideWebFb]=\"{ event_name: eventName + '_secondary' }\"\n [dismissedCta]=\"true\"\n (click)=\"handleSecondaryClick()\"\n >{{ secondaryCtaText | translate }}</a\n >\n </typography>\n </div>\n </bw-action-article>\n</section>\n","import { Component, OnInit } from '@angular/core';\nimport { Router, ActivatedRoute } from '@angular/router';\n\nimport { AnalyticsAttributesV4, FirebaseService } from '@brightside-web/desktop/data-access/shared';\n\nimport { SharedDisplayCampaignComponent } from '../display-campaign/display-campaign.component';\n\n@Component({\n selector: 'brightside-web-display-complete',\n templateUrl: './display-complete.component.html',\n styleUrls: ['./display-complete.component.scss'],\n})\nexport class SharedDisplayCompleteComponent extends SharedDisplayCampaignComponent implements OnInit {\n displayFormAnalytics: {\n shown: AnalyticsAttributesV4;\n dismiss: AnalyticsAttributesV4;\n submit: AnalyticsAttributesV4;\n } = { shown: { event_name: '' }, dismiss: { event_name: '' }, submit: { event_name: '' } };\n eventName = '';\n\n constructor(protected activatedRoute: ActivatedRoute, protected analytics: FirebaseService, protected router: Router) {\n super(activatedRoute, analytics, router);\n }\n\n ngOnInit(): void {\n if (this.analyticsAttributes && this.analyticsAttributes.event_name) {\n this.eventName = this.analyticsAttributes.event_name;\n }\n }\n}\n","import { FormGroup } from '@angular/forms';\nimport { DisplayFormControlConfig, DisplayFormProcessResponse, DisplayFormSettings } from '@brightside-web/shared/desktop';\nimport { MessageBusInternalHubEvent } from '@brightside-web/micro/core/message-bus';\n\nimport { Observable } from 'rxjs';\n\nexport { DisplayFormProcessErrorType as SharedDisplayFormProcessErrorType } from '@brightside-web/shared/desktop';\n\n//ToDo: Add property information to comments\n//ToDo: Refactor this to be an interface instead of a class.. not sure why it was ever a class to be honest\n/**\n * @description\n * A child class to handle the shared component display needs. Main difference here is\n * removal from the desktop library and support for cell displays along with form information.\n *\n * @extends DisplayFormSettings\n * Beyond what's already part of the DisplayFormSettings interface we add the following support:\n *\n * @property\n * - Key: cellDetails\n * - Type: SharedDisplayCellConfig\n * - Reason: used in-cases when we don't want to render the direct input and want cell displayed\n * - optional\n */\nexport class SharedDisplayFormSettings extends DisplayFormSettings {\n constructor(config: any = {}) {\n super(config);\n\n this.pageAdditionalInformation = config.pageAdditionalInformation || undefined;\n this.pageCalloutInformation = config.pageCalloutInformation || undefined;\n this.pageConfirmCheckText = config.pageConfirmCheckText;\n this.pageHeaderIconName = config.pageHeaderIconName || '';\n\n if (typeof config.pageCellRedirectPath !== 'string') {\n this.pageCellRedirectPath = './:controlKey';\n } else {\n this.pageCellRedirectPath = config.pageCellRedirectPath;\n }\n\n if (config.pageSecondaryCtaEvent) {\n this.pageSecondaryCtaEvent = config.pageSecondaryCtaEvent;\n }\n\n if (config.pageOnBackCtaEvent) {\n this.pageOnBackCtaEvent = config.pageOnBackCtaEvent;\n }\n\n if (config.pageSubTitleColor) {\n this.pageSubTitleColor = config.pageSubTitleColor;\n }\n\n if (config.pageSubTitleStyle) {\n this.pageSubTitleStyle = config.pageSubTitleStyle;\n }\n\n this.cellClicked = config.cellClicked || null;\n\n this.pageFormForceAsValid = config.pageFormForceAsValid || false;\n if (config.pageFormControlsObservable) {\n this.pageFormControlsObservable = config.pageFormControlsObservable;\n }\n }\n\n pageHeaderIconName? = '';\n pageCellRedirectPath?: string;\n pageConfirmCheckText? = '';\n\n pageFormForceAsValid? = false;\n pageFormControlsObservable?: Observable<SharedDisplayFormControlConfig[]>;\n\n pageCalloutInformation?: SharedDisplayCalloutInformation;\n pageAdditionalInformation?: SharedDisplayAdditionalInformation;\n\n pageSubTitleColor?: string;\n pageSubTitleStyle?: string;\n\n pageSecondaryCtaEvent?: MessageBusInternalHubEvent;\n pageOnBackCtaEvent?: MessageBusInternalHubEvent;\n\n cellClicked?: ClickResponderFunction;\n\n getCellRedirectRoute(controlKey: string = ''): string[] {\n return (this.pageCellRedirectPath || '').replace(':controlKey', controlKey).split('/');\n }\n}\n\n/**\n * @description\n * An interface used in the shared display component to understand how to display\n * a cell instead of the direct form input.\n *\n * @property\n * - Key: config\n * - Type: { title: string; subTitle: string; }\n * - Reason: these details will be used when the client clicks into a cell\n * @property\n * - Key: controls\n * - Type: DisplayFormControlConfig[]\n * - Reason: tells us which control(s) to display once the client has selected the cell\n * @property\n * - Key: labelLeft\n * - Type: string\n * @property\n * - Key: labelSubLeft\n * - Type: string\n * @property\n * - Key: iconNameRight\n * - Type: string\n * - Notes: If not provided, will default to chevron_right\n * - optional\n * @property\n * - Key: flipLeftLabels\n * - Type: boolean\n * - Reason: This will flip the labels to move the smaller \"subLabel\" above the larger \"label\"\n * - Notes: Default state will be 'false'\n * - optional\n */\nexport interface SharedDisplayCellConfig {\n action?: SharedDisplayCellActionConfig;\n bypassOutgoing?: boolean;\n config: { title: string; subTitle: string }; //ToDo: need template key support for this copy\n controls: SharedDisplayFormControlConfig[];\n\n labelLeft: string;\n labelSubLeft: string;\n iconNameRight?: string;\n\n flipLeftLabels?: boolean;\n}\n\nexport interface SharedDisplayCellActionConfig {\n clickResponder?: ClickResponderFunction;\n emphasize?: boolean;\n event?: MessageBusInternalHubEvent;\n supportedHelpHint?: string;\n supportedFiles?: string;\n supportMultiple?: boolean;\n redirectPath?: string;\n}\n\nexport enum SharedDisplayChoiceStyle {\n CHECKBOX = 'checkbox',\n RADIO = 'radio'\n}\n\nexport interface SharedDisplayCellChoiceQuestion {\n questionHintText?: string;\n selectedChoices?: {};\n selected?: boolean;\n style?: SharedDisplayChoiceStyle;\n id: string;\n text: string;\n choices: string[];\n choiceValueMapping?: { [key: string]: string | boolean | number };\n}\n\n\nexport interface SharedDisplayCellChoiceConfig {\n questions: SharedDisplayCellChoiceQuestion[];\n clickResponder?: ClickResponderFunction;\n event?: MessageBusInternalHubEvent;\n}\n\n/**\n * @description\n * An interface used in the shared display component to tell the component how\n * to render the page. Includes the form controls and pages details like title/body text.\n *\n * @extends DisplayFormControlConfig\n * Beyond what's already part of the DisplayFormControlConfig interface we add the following support:\n *\n * @property\n * - Key: cellDetails\n * - Type: SharedDisplayCellConfig\n * - Reason: used in-cases when we don't want to render the direct input and want cell displayed\n * - optional\n */\nexport interface SharedDisplayFormControlConfig extends DisplayFormControlConfig {\n cellDetails?: SharedDisplayCellConfig;\n choice?: SharedDisplayCellChoiceConfig;\n groupId?: number;\n rules?: { display: SharedDisplayFormControlDisplayRules };\n}\n\nexport interface SharedDisplayFormControlDisplayRules {\n showIfTrue?: SharedDisplayFormControlDisplayRule[];\n hideIfTrue?: SharedDisplayFormControlDisplayRule[];\n}\n\nexport interface SharedDisplayFormControlDisplayRule {\n objKey?: string;\n formKey: string;\n values: (string | number | boolean)[];\n}\n\n/**\n * @description\n * An interface used to display callout text with an icon right below the subTitle\n *\n *\n * @property\n * - Key: text\n * - Type: string\n *\n * @property\n * - Key: iconName\n * - Type: string\n *\n */\nexport interface SharedDisplayCalloutInformation {\n text: string;\n iconName: string;\n}\n\n/**\n * @description\n * An interface used to display privacy type links at the bottom of forms\n *\n *\n * @property\n * - Key: bodyText\n * - Type: string\n * - Reason: Text to render when link is clicked\n *\n * @property\n * - Key: linkPostText\n * - Type: string\n *\n * @property\n * - Key: linkPreText\n * - Type: string\n *\n * @property\n * - Key: linkText\n * - Type: string\n * - Reason: Clickable text in the link\n *\n * @property\n * - Key: title\n * - Type: string\n * - Reason: Text to render at the top of the modal\n */\nexport interface SharedDisplayAdditionalInformation {\n bodyText: string;\n linkPostText: string;\n linkPreText: string;\n linkText: string;\n title: string;\n cta: string;\n}\n\nexport type SharedDisplayFormProcessResponse = DisplayFormProcessResponse;\nexport type ClickResponderFunction = (form: FormGroup, targetControlConfig?: SharedDisplayFormControlConfig) => null | void;\n","<typography text-small-semibold>\n <div class=\"mb-sm\" [innerHTML]=\"controlConfig.label | translate\"></div>\n</typography>\n\n<div *ngFor=\"let question of questions; let i = index\" class=\"mb-sm\">\n <typography>\n <p class=\"secondary-text mb-sm\" [innerHTML]=\"question.text | translate\"></p>\n </typography>\n <typography>\n <p class=\"hint mb-sm\" [innerHTML]=\"question.questionHintText | translate\"></p>\n </typography>\n <ng-container [ngSwitch]=\"question.style\">\n <ng-container *ngSwitchCase=\"'checkbox'\">\n <ng-container *ngTemplateOutlet=\"checkboxStyle; context: { $implicit: controlConfig, question: question }\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <ng-container *ngTemplateOutlet=\"radioStyle; context: { $implicit: controlConfig, question: question }\"></ng-container>\n </ng-container>\n </ng-container>\n\n\n</div>\n\n<ng-template #checkboxStyle let-controlConfig let-question=question>\n <div class=\"mb-xs\" *ngFor=\"let choice of question.choices\">\n <bw-checkbox\n [name]=\"controlConfig.key\"\n [value]=\"choice\"\n [label]=\"choice | translate\"\n [checked]=\"question.selectedChoices[choice]\"\n (checkboxChanged)=\"updateFormOnChange(question, choice)\"\n ></bw-checkbox>\n </div>\n</ng-template>\n\n<ng-template #radioStyle let-controlConfig let-question=question>\n <ng-container *ngFor=\"let choice of question.choices\">\n <bw-radio\n [name]=\"controlConfig.key\"\n [value]=\"choice\"\n [label]=\"choice | translate\"\n [startSelected]=\"\n controlConfig.inputOptions?.initialValue === question.choiceValueMapping[choice]\n || controlConfig.inputOptions?.initialValue === choice\"\n (radioClick)=\"updateFormOnChange(question, choice)\"\n ></bw-radio>\n </ng-container>\n\n</ng-template>\n","import {Component, EventEmitter, Input, OnInit, Output, ViewEncapsulation} from '@angular/core';\nimport {FormGroup} from '@angular/forms';\n\nimport {MessageBusInternalService} from '@brightside-web/micro/core/message-bus';\n\nimport {\n SharedDisplayCellChoiceQuestion,\n SharedDisplayChoiceStyle,\n SharedDisplayFormControlConfig\n} from '../shared-display-form.modal';\n\n@Component({\n selector: 'bs-form-choice',\n templateUrl: './form-choice.component.html',\n styleUrls: ['./form-choice.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class SharedDisplayFormChoiceComponent implements OnInit {\n @Input() controlConfig: SharedDisplayFormControlConfig;\n @Input() formGroup: FormGroup;\n\n @Output() click: EventEmitter<SharedDisplayFormControlConfig> = new EventEmitter();\n\n private changesDebounces: number;\n\n questions: SharedDisplayCellChoiceQuestion[] = [];\n\n ngOnInit() {\n this.questions = this.controlConfig?.choice?.questions || [];\n\n //If we have an initial value we need to set it\n if (this.controlConfig?.choice?.questions && this.controlConfig?.inputOptions?.initialValue) {\n clearTimeout(this.changesDebounces);\n\n this.changesDebounces = window.setTimeout(() => {\n //Make sure we have choice information\n if (this.controlConfig?.choice) {\n this.updateFormOnChange(this.controlConfig.choice.questions[0], `${this.controlConfig?.inputOptions?.initialValue}`);\n }\n }, 10);\n }\n }\n\n private noopFunction = () => null;\n\n get actionClickResponder() {\n return this.controlConfig?.choice?.clickResponder || this.noopFunction;\n }\n\n updateFormOnChange(question: SharedDisplayCellChoiceQuestion, choice: string) {\n let updateWithValue: string | boolean | number = choice;\n let foundMapping = false;\n if (question?.choiceValueMapping && Object.keys(question.choiceValueMapping).includes(choice)) {\n updateWithValue = question.choiceValueMapping[choice];\n foundMapping = true;\n }\n\n if (question.style && question.style === SharedDisplayChoiceStyle.CHECKBOX ) {\n if (foundMapping) {\n let currentVal = this.formGroup.controls[this.controlConfig.key].value ?? [];\n if (typeof currentVal === 'string') currentVal = currentVal.split(',');\n let storeValue = [];\n if (currentVal.length === 0) {\n storeValue.push(updateWithValue);\n } else {\n storeValue = currentVal;\n const hasValueAlready = storeValue.indexOf(updateWithValue);\n if (hasValueAlready > -1) {\n storeValue.splice(hasValueAlready, 1);\n } else {\n storeValue.push(updateWithValue)\n }\n }\n this.formGroup.controls[this.controlConfig.key].setValue(storeValue, {emitEvent: true});\n } else {\n // below handles preselecting checkbox elements based on the value of the mapping\n // this occurs on refresh/load of the page\n if (question.choiceValueMapping && typeof choice === 'string') {\n Object.keys(question.choiceValueMapping).forEach(item => {\n const choiceVal = question.choiceValueMapping ? question.choiceValueMapping[item].toString() : undefined;\n if (choiceVal && choice.includes(choiceVal)) {\n question.selectedChoices = {...question.selectedChoices, [item]:'selected'};\n }\n })\n }\n }\n } else {\n this.formGroup.controls[this.controlConfig.key].patchValue(updateWithValue, {emitEvent: true});\n }\n }\n\n handleActionCellClick() {\n this.actionClickResponder(this.formGroup, this.controlConfig);\n\n //If this action has a special event defined, something like displaying a half-sheet on click\n if (this.controlConfig?.choice?.event) {\n MessageBusInternalService.sendOutgoingHubEvent(this.controlConfig.choice?.event);\n return; //Return is to not prevent any routing the user may have on emit of click\n }\n\n //Now let the caller handle anything they need to\n this.click.emit(this.controlConfig);\n }\n}\n","<bw-action-cell\n *ngIf=\"controlConfig.cellDetails?.action\"\n label=\"{{ controlConfig.cellDetails.labelLeft || '' | translate }}\"\n detail=\"{{ controlConfig.cellDetails.labelSubLeft || '' | translate }}\"\n iconName=\"{{ controlConfig.cellDetails.iconNameRight || '' | translate }}\"\n [emphasize]=\"controlConfig.cellDetails.action.emphasize\"\n (actionCellClick)=\"handleActionCellClick()\"\n class=\"full-width\"\n></bw-action-cell>\n<ng-container *ngIf=\"controlConfig.cellDetails?.action?.supportedHelpHint\">\n <typography text-small-regular color=\"var(--secondary-text)\" [innerHTML]=\"controlConfig.cellDetails?.action?.supportedHelpHint | translate\">\n </typography>\n</ng-container>\n\n<input\n *ngIf=\"controlConfig.type === 'file'\"\n type=\"file\"\n style=\"display: none\"\n [id]=\"controlConfig.key + 'FileInputField'\"\n [multiple]=\"inputSupportMultiple\"\n [accept]=\"inputSupportedFiles\"\n/>\n","import { Component, EventEmitter, Output, OnInit, Input, ViewEncapsulation } from '@angular/core';\nimport { FormGroup } from '@angular/forms';\n\nimport { MessageBusInternalService } from '@brightside-web/micro/core/message-bus';\n\nimport { SharedDisplayFormControlConfig } from '../shared-display-form.modal';\n\n@Component({\n selector: 'bs-form-file',\n templateUrl: './form-file.component.html',\n styleUrls: [],\n encapsulation: ViewEncapsulation.None,\n})\nexport class SharedDisplayFormFileComponent implements OnInit {\n @Input() controlConfig: SharedDisplayFormControlConfig;\n @Input() formGroup: FormGroup;\n\n @Output() cellClick: EventEmitter<SharedDisplayFormControlConfig> = new EventEmitter();\n\n inputSupportMultiple = false;\n inputSupportedFiles = 'image/*, heif';\n\n ngOnInit() {\n this.inputSupportMultiple = this.controlConfig?.cellDetails?.action?.supportMultiple || false;\n this.inputSupportedFiles = this.controlConfig?.cellDetails?.action?.supportedFiles || 'image/*, heif';\n }\n\n private noopFunction = () => null;\n\n get actionClickResponder() {\n return this.controlConfig?.cellDetails?.action?.clickResponder || this.noopFunction;\n }\n\n handleActionCellClick() {\n //Things like file upload can be supported with a responder like SharedDisplayFormFileActionResponder\n this.actionClickResponder(this.formGroup, this.controlConfig);\n\n //If this action has a special event defined, something like displaying a half-sheet on click\n if (this.controlConfig?.cellDetails?.action?.event) {\n MessageBusInternalService.sendOutgoingHubEvent(this.controlConfig.cellDetails.action.event);\n return; //Return is to not prevent any routing the user may have on emit of click\n }\n\n //Now let the caller handle anything they need to\n this.cellClick.emit(this.controlConfig);\n }\n}\n","<bw-modal\n *ngIf=\"showHalfsheet && halfSheetSettings\"\n [brightsideWebFb]=\"displayAnalytics.shown\"\n (closeModal)=\"showHalfsheet = false\"\n [showCloseButton]=\"halfSheetSettings.data.dismissable\"\n>\n <typography title-medium color=\"var(--gray-70)\">{{ halfSheetSettings.data.title || '' | translate }}</typography>\n <section class=\"body\">\n <bw-paragraph [textStyle]=\"'Body2'\" color=\"var(--gray-50)\"\n ><span [innerHTML]=\"halfSheetSettings.data.subText || '' | translate\"></span\n ></bw-paragraph>\n </section>\n <footer class=\"footer\">\n <div class=\"flex-row row-reverse\">\n <button\n bw-button\n [ngStyle]=\"{ 'background-color': 'var(--error)' }\"\n [brightsideWebFb]=\"displayAnalytics.submit\"\n (click)=\"onPrimaryClick()\"\n >\n {{ halfSheetSettings.data.primaryCta.label || 'OK' | translate }}\n </button>\n <a bw-anchor [brightsideWebFb]=\"displayAnalytics.dismiss\" (click)=\"onSecondaryClick()\" style=\"margin: 0 16px\">{{\n halfSheetSettings.data.secondaryCta.label || 'BUTTON_CANCEL' | translate\n }}</a>\n </div>\n </footer>\n</bw-modal>\n","import { Component, OnChanges, Input, SimpleChanges } from '@angular/core';\n\nimport {\n MessageBusInternalHubEvent,\n MessageBusInternalBridgeSetting,\n MessageBusInternalService,\n MessageBusEventUtil,\n} from '@brightside-web/micro/core/message-bus';\nimport { AnalyticsAttributesV4 } from '@brightside-web/desktop/data-access/shared';\n\n@Component({\n selector: 'brightside-web-display-halfsheet',\n templateUrl: './display-halfsheet.component.html',\n})\nexport class SharedDisplayHalfsheetComponent implements OnChanges {\n @Input() eventName: AnalyticsAttributesV4;\n @Input() internalHubEvent: MessageBusInternalHubEvent;\n\n displayAnalytics: {\n shown: AnalyticsAttributesV4;\n dismiss: AnalyticsAttributesV4;\n submit: AnalyticsAttributesV4;\n } = {\n shown: {event_name:''},\n dismiss: {event_name:''},\n submit: {event_name:''}\n };\n\n halfSheetSettings: MessageBusInternalBridgeSetting | undefined;\n\n showHalfsheet = false;\n\n constructor() {}\n\n private sendIncomingEventAndDismiss(triggerCode: string) {\n MessageBusInternalService.sendOutgoingHubEvent(\n MessageBusEventUtil.event.builder.halfsheetConfigAndReturnStandardEvent({}, triggerCode)\n );\n\n this.dismissModal();\n }\n\n private setUpAnalytics() {\n if (this.eventName) {\n this.displayAnalytics.shown = { event_name: `${this.eventName}_shown` };\n this.displayAnalytics.dismiss = { event_name: `${this.eventName}_dismiss` };\n this.displayAnalytics.submit = { event_name: `${this.eventName}_tapped` };\n }\n }\n\n private dismissModal() {\n this.showHalfsheet = false;\n this.halfSheetSettings = undefined;\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.internalHubEvent?.currentValue?.bridgeSetting) {\n this.setUpAnalytics();\n\n this.halfSheetSettings = changes.internalHubEvent.currentValue.bridgeSetting;\n this.showHalfsheet = true;\n }\n }\n\n onPrimaryClick() {\n if (this.halfSheetSettings?.data?.primaryCta) {\n this.sendIncomingEventAndDismiss((this.halfSheetSettings?.data.primaryCta as any).code);\n } else {\n //Log error...\n this.dismissModal();\n }\n }\n\n onSecondaryClick() {\n if (this.halfSheetSettings?.data?.secondaryCta) {\n this.sendIncomingEventAndDismiss((this.halfSheetSettings?.data.secondaryCta as any).code);\n } else {\n //Log error...\n this.dismissModal();\n }\n }\n}\n","<ng-container *ngIf=\"displayForm\">\n<form [formGroup]=\"displayForm\">\n <bw-action-article minHeight=\"0\" [brightsideWebFb]=\"displayFormAnalytics.shown\">\n <div id=\"displayFormHeaderAction\" header-actions class=\"flex-row pointer\">\n <bw-icon\n *ngIf=\"config.pageHideBackButton; else showBackButton\"\n color=\"var(--secondary-text)\"\n iconName=\"close\"\n (click)=\"handleBackClick()\"\n ></bw-icon>\n\n <ng-template #showBackButton>\n <ui-nav-exit-back\n *ngIf=\"!pageIsFullScreen\"\n back-action-top\n [trackingDetail]=\"displayFormAnalytics.dismiss\"\n [skipActionEmit]=\"!config.pageOnBackCtaPath\"\n (exitActionHandler)=\"handleBackClick()\"\n ></ui-nav-exit-back>\n <ui-nav-exit-back\n *ngIf=\"pageIsFullScreen\"\n back-action-bottom\n [trackingDetail]=\"displayFormAnalytics.dismiss\"\n [skipActionEmit]=\"!config.pageOnBackCtaPath\"\n (exitActionHandler)=\"handleBackClick()\"\n ></ui-nav-exit-back>\n </ng-template>\n </div>\n <div id=\"displayFormHeaderTitle\" header-title>\n <typography title-medium class=\"mt-xs\">{{ config.pageTitleKey || config.pageTitle | translate }}</typography>\n <bw-icon\n *ngIf=\"config.pageHeaderIconName\"\n size=\"41.6\"\n [iconName]=\"config.pageHeaderIconName\"\n color=\"var(--brand)\"\n backgroundColor=\"var(--bg-blue)\"\n ></bw-icon>\n </div>\n <div id=\"displayFormContentSection\" content-section>\n <bw-paragraph [textStyle]=\"config.pageSubTitleStyle\" [color]=\"config.pageSubTitleColor\">\n <span [innerHTML]=\"config.pageSubTitleKey || config.pageSubTitle | translate\"></span>\n </bw-paragraph>\n\n <div *ngIf=\"config.pageCalloutInformation\" class=\"flex-row mb-md\">\n <bw-icon [iconName]=\"config.pageCalloutInformation.iconName\"></bw-icon>\n <p class=\"secondary-text mr-xs\">{{ config.pageCalloutInformation.text | translate }}</p>\n </div>\n\n <typography text-large-semibold class=\"mt-xs mb-sm\">{{\n config.pageFormControlsTitleKey || config.pageFormControlsTitle | translate\n }}</typography>\n\n <div class=\"form-grid mb-lg\" [ngClass]=\"{ 'full-width': config.pageFormControlFullWidth }\">\n <bw-spinner *ngIf=\"!sharedFormControls || !sharedFormControls.length; else templateShowForm\"></bw-spinner>\n <ng-template #templateShowForm>\n <ng-container *ngFor=\"let controlConfig of sharedFormControls\">\n <span [ngClass]=\"{ hidden: displayRuleMapping.hide.includes(controlConfig.key) }\">\n <ng-container *ngTemplateOutlet=\"buildControlTemplate; context: { $implicit: controlConfig }\"></ng-container\n ></span>\n </ng-container>\n </ng-template>\n </div>\n\n <div *ngIf=\"addKeyboardSpacer\" class=\"hidden-desktop flex-column flex-start flex-wrap keyboard-filler-space\"></div>\n </div>\n\n <div footer-top>\n <bw-checkbox\n *ngIf=\"config.pageConfirmCheckText\"\n required\n formControlName=\"controlConfirmCheckbox\"\n [label]=\"config.pageConfirmCheckText | translate\"\n [centerAlign]=\"true\"\n (checkboxChanged)=\"displayForm.markAllAsTouched()\"\n ></bw-checkbox>\n <div *ngIf=\"config.pageAdditionalInformation\" class=\"additional-information-wrapper\">\n <typography text-small-regular class=\"mr-xxs\">{{ config.pageAdditionalInformation.linkPreText | translate }}</typography>\n <a bw-anchor anchorStyle=\"text-small-regular\" class=\"bs-blue mr-xxs\" (click)=\"showAdditionalInformation = true\">\n {{ config.pageAdditionalInformation.linkText | translate }}\n </a>\n <typography text-small-regular>{{ config.pageAdditionalInformation.linkPostText | translate }}</typography>\n </div>\n </div>\n <div footer-actions class=\"flex-row row-reverse\">\n\n <button\n *ngIf=\"config.pageCtaLabel || config.pageCtaLabelKey\"\n bw-button\n [brightsideWebFb]=\"displayFormAnalytics.submit\"\n [disabled]=\"!isFormValid\"\n [processing]=\"processing\"\n (click)=\"handleCtaClick()\"\n >\n {{ config.pageCtaLabelKey || config.pageCtaLabel | translate }}\n </button>\n\n <typography text-large-semibold>\n <a *ngIf=\"config.pageSecondaryCtaLabel\" bw-anchor class=\"bs-blue mr-sm\" (click)=\"handleSecondaryCtaClick()\">{{\n config.pageSecondaryCtaLabelKey || config.pageSecondaryCtaLabel | translate\n }}</a>\n </typography>\n </div>\n </bw-action-article>\n\n <!-- These templates should be broken out to their own files -->\n <ng-template #buildControlTemplate let-controlConfig>\n <!-- START - If you add anything here... make sure you are wrapping template content with IF block -->\n <ng-container *ngIf=\"controlConfig.cellDetails; else formFieldDisplay\">\n <ng-container *ngTemplateOutlet=\"cellFormField; context: { $implicit: controlConfig }\"></ng-container>\n <ng-container *ngTemplateOutlet=\"cellActionFormField; context: { $implicit: controlConfig }\"></ng-container>\n </ng-container>\n\n <ng-template #formFieldDisplay>\n <ng-container *ngTemplateOutlet=\"basicFormField; context: { $implicit: controlConfig }\"></ng-container>\n <ng-container *ngTemplateOutlet=\"checkboxFormField; context: { $implicit: controlConfig }\"></ng-container>\n <ng-container *ngTemplateOutlet=\"choiceFormField; context: { $implicit: controlConfig }\"></ng-container>\n <ng-container *ngTemplateOutlet=\"currencyFormField; context: { $implicit: controlConfig }\"></ng-container>\n <ng-container *ngTemplateOutlet=\"phoneFormField; context: { $implicit: controlConfig }\"></ng-container>\n <ng-container *ngTemplateOutlet=\"selectFormField; context: { $implicit: controlConfig }\"></ng-container>\n </ng-template>\n\n <!-- END - Form field displays -->\n\n <a\n *ngIf=\"controlConfig.inputOptions?.link\"\n bw-anchor\n anchorStyle=\"text-small-regular\"\n color=\"var(--brand)\"\n (click)=\"handleLinkClick(controlConfig.inputOptions?.link.path)\"\n [brightsideWebFb]=\"displayFormAnalytics.submit\"\n >{{ controlConfig.inputOptions?.link.text || '' | translate }}</a\n >\n </ng-template>\n\n <ng-template #basicFormField let-controlConfig>\n <bw-input\n *ngIf=\"\n !controlConfig.type ||\n (!controlConfig.choice &&\n controlConfig.type !== 'currency' &&\n controlConfig.type !== 'phone' &&\n controlConfig.type !== 'checkbox' &&\n controlConfig.type !== 'select')\n \"\n [formControlName]=\"controlConfig.key\"\n [type]=\"controlConfig.type\"\n [label]=\"controlConfig.labelKey || controlConfig.label | translate\"\n [attr.disabled]=\"processing\"\n [inputError]=\"doesControlHaveError(controlConfig.key) && (controlConfig.errorText || controlConfig.errorTextKey)\"\n [inputErrorText]=\"controlConfig.errorTextKey || controlConfig.errorText | translate\"\n [inputMask]=\"controlConfig.inputOptions?.mask\"\n [minlength]=\"controlConfig.inputOptions?.minlength\"\n [maxlength]=\"controlConfig.inputOptions?.maxlength\"\n [pattern]=\"controlConfig.inputOptions?.pattern\"\n [placeholder]=\"controlConfig.inputOptions?.placeholder || '' | translate\"\n [togglePassword]=\"controlConfig.inputOptions?.togglePassword || false\"\n [suffixIconName]=\"controlConfig.inputOptions?.suffixIconName || ''\"\n [showSuffixIcon]=\"false\"\n [inputHintText]=\"controlConfig.inputOptions?.inputHintText || '' | translate\"\n >\n </bw-input>\n </ng-template>\n\n <ng-template #phoneFormField let-controlConfig>\n <bw-phone-form\n *ngIf=\"controlConfig.type === 'phone'\"\n [label]=\"controlConfig.labelKey || controlConfig.label | translate\"\n [fGroup]=\"displayForm\"\n [fcName]=\"controlConfig.key\"\n [inputError]=\"doesControlHaveError(controlConfig.key) && (controlConfig.errorText || controlConfig.errorTextKey)\"\n [inputErrorText]=\"controlConfig.errorTextKey || controlConfig.errorText | translate\"\n [attr.disabled]=\"processing\"\n ></bw-phone-form>\n </ng-template>\n\n <ng-template #currencyFormField let-controlConfig>\n <bw-currency-input\n *ngIf=\"controlConfig.type === 'currency'\"\n verticalSpace=\"mb-sm\"\n class=\"form-grid\"\n value=\"{{ controlConfig.inputOptions?.initialValue || '' }}\"\n [label]=\"controlConfig.labelKey || controlConfig.label | translate\"\n [onChange]=\"generateWrappedFunctionValueUpdate(controlConfig.key)\"\n [inputHintText]=\"controlConfig.inputOptions?.inputHintText || '' | translate\"\n ></bw-currency-input>\n </ng-template>\n\n <ng-template #selectFormField let-controlConfig>\n <span *ngIf=\"controlConfig.type === 'select'\">\n <label [for]=\"controlConfig.key\" class=\"mb-xs\"\n ><typography text-small-semibold>{{ controlConfig.labelKey || controlConfig.label | translate }}</typography></label\n >\n <ngx-select-dropdown\n [formControlName]=\"controlConfig.key\"\n [options]=\"controlConfig.inputOptions?.selectOptions\"\n [config]=\"controlConfig.inputOptions?.selectConfig\"\n ></ngx-select-dropdown>\n </span>\n </ng-template>\n\n <ng-template #checkboxFormField let-controlConfig>\n <bw-checkbox *ngIf=\"controlConfig.type === 'checkbox'\" [formControlName]=\"controlConfig.key\"\n ><typography text-medium-regular color=\"var(--secondary-text)\">{{\n controlConfig.label | translate\n }}</typography></bw-checkbox\n >\n </ng-template>\n\n <ng-template #cellFormField let-controlConfig>\n <bw-cell\n *ngIf=\"!controlConfig.cellDetails.action\"\n (clicked)=\"handleFormCellClick(controlConfig.key)\"\n [labelLeft]=\"controlConfig.cellDetails.labelLeft || '' | translate\"\n [labelSubLeft]=\"controlConfig.cellDetails.labelSubLeft || '' | translate\"\n [flipLeftLabels]=\"controlConfig.cellDetails.flipLeftLabels || false\"\n [iconNameRight]=\"controlConfig.cellDetails.iconNameRight || 'chevron_right'\"\n class=\"full-width\"\n ></bw-cell>\n </ng-template>\n\n <ng-template #cellActionFormField let-controlConfig>\n <bs-form-file\n *ngIf=\"controlConfig.cellDetails.action\"\n [formGroup]=\"displayForm\"\n [controlConfig]=\"controlConfig\"\n (cellClick)=\"handleFormActionCellClick(controlConfig)\"\n ></bs-form-file>\n </ng-template>\n\n <ng-template #choiceFormField let-controlConfig>\n <bs-form-choice *ngIf=\"controlConfig.choice\" [formGroup]=\"displayForm\" [controlConfig]=\"controlConfig\"></bs-form-choice>\n </ng-template>\n</form>\n</ng-container>\n<bw-modal\n *ngIf=\"showAdditionalInformation\"\n modalWidth=\"large\"\n [showCloseButton]=\"true\"\n (closeModal)=\"showAdditionalInformation = false\"\n [brightsideWebFb]=\"{ event_name: 'additional_info' }\"\n>\n <typography title-medium class=\"mb-md\">{{ config.pageAdditionalInformation.title | translate }}</typography>\n <div class=\"body\">\n <bw-paragraph [textStyle]=\"'Body2'\" color=\"var(--gray-50)\" style=\"white-space: pre-wrap\">{{\n config.pageAdditionalInformation.bodyText | translate\n }}</bw-paragraph>\n </div>\n <div class=\"footer\">\n <div class=\"flex-row row-reverse hidden-mobile\">\n <button\n bw-button\n dismissedCta=\"true\"\n (click)=\"showAdditionalInformation = false\"\n [brightsideWebFb]=\"{ event_name: 'additional_info' }\"\n >\n {{ config.pageAdditionalInformation.cta | translate }}\n </button>\n </div>\n </div>\n</bw-modal>\n\n<bw-modal *ngIf=\"showProcessError\" (closeModal)=\"showProcessError = false\">\n <typography title-medium color=\"var(--gray-70)\">{{ processErrorMessageTitle | translate }}</typography>\n <section class=\"body\">\n <bw-paragraph [textStyle]=\"'Body2'\" color=\"var(--gray-50)\">{{ processErrorMessage | translate }}</bw-paragraph>\n </section>\n <footer class=\"footer\">\n <div class=\"flex-row row-reverse\">\n <button bw-button (click)=\"showProcessError = false\" [brightsideWebFb]=\"{ event_name: 'error_modal' }\">{{\"OK\" |translate}}</button>\n </div>\n </footer>\n</bw-modal>\n\n<brightside-web-display-halfsheet\n [eventName]=\"this.config.fbEventName\"\n [internalHubEvent]=\"halfSheetEventData\"\n></brightside-web-display-halfsheet>\n\n\n","import { Component, OnInit, OnDestroy, Injector, ChangeDetectorRef } from '@angular/core';\nimport { FormControl, Validators } from '@angular/forms';\nimport { ActivatedRoute } from '@angular/router';\nimport { TranslatePipe, TranslateService } from '@ngx-translate/core';\n\nimport { RoutingStateService, ToastService } from '@brightside/brightside-ui-services';\n\nimport { DisplayFormComponent } from '@brightside-web/shared/desktop';\nimport {\n HubPayload, IsRunningAndroid, IsRunningIOS,\n MessageBusEventChannel, MessageBusEventUtil,\n MessageBusHubListener,\n MessageBusInternalEventKey,\n MessageBusInternalHubEvent,\n MessageBusInternalService,\n MessageBusOutgoingEventKey,\n} from '@brightside-web/micro/core/message-bus';\n\nimport { Subscription } from 'rxjs';\nimport { take } from 'rxjs/operators';\n\nimport {\n SharedDisplayFormControlConfig,\n SharedDisplayFormControlDisplayRule,\n SharedDisplayFormSettings,\n} from './shared-display-form.modal';\n\n/**\n * @description\n * Component should be used to display a data configured form to the client. Support for\n * basic form usage (like DisplayFormComponent) but also supports cell displays.\n *\n * @extends DisplayFormComponent\n *\n * @usageNotes\n * To utilize this component inside a route you need to be providing a class SharedDisplayFormSettings\n * under the data part of the route. Key for this data should be: pageConfig\n *\n * @example\n * {\n * path: 'testRoutePath',\n * component: SharedDisplayFormComponent,\n * data: {\n * breadcrumb: { skip: true },\n * pageConfig: {} //new SharedDisplayFormSettings()\n * },\n * }\n */\n@Component({\n selector: 'brightside-web-display-form',\n styleUrls: ['./shared-display-form.component.scss'],\n templateUrl: './shared-display-form.component.html',\n})\nexport class SharedDisplayFormComponent extends DisplayFormComponent implements OnInit, OnDestroy {\n private hubWatchers: MessageBusHubListener[] = [];\n private sub = new Subscription();\n\n //Overriding here because it has a different type\n override config: SharedDisplayFormSettings;\n sharedFormControls: SharedDisplayFormControlConfig[];\n\n addKeyboardSpacer = false;\n\n showAdditionalInformation = false;\n //Is driven by events through the bridge to show it from whatever app needs it\n showLanguageSelect = false;\n\n displayRuleControlConfigs: SharedDisplayFormControlConfig[];\n displayRuleMapping: { show: string[]; hide: string[] } = { show: [], hide: [] };\n\n displayRuleCheckDebounces: number;\n\n //This is used to show a modal in place of the half sheet bridge event native uses\n halfSheetEventData: MessageBusInternalHubEvent;\n\n isFormValid = false;\n\n constructor(\n protected activatedRoute: ActivatedRoute,\n protected injector: Injector,\n protected routingState: RoutingStateService,\n protected toastService: ToastService,\n protected translatePipe: TranslatePipe,\n protected translateService: TranslateService,\n protected changeDetectorRef: ChangeDetectorRef\n ) {\n super(activatedRoute, injector, routingState, toastService, translatePipe, translateService, changeDetectorRef);\n\n this.formAutomaticCreateMode = false;\n\n this.setUpHalfSheetListener();\n }\n\n ngOnInit(): void {\n super.ngOnInit();\n\n //Specific config update for this component\n this.updateSharedConfig();\n }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n\n this.hubWatchers.forEach((hubWatcher: MessageBusHubListener) => hubWatcher?.destroy());\n this.sub.unsubscribe();\n }\n\n private extractControlsWithDisplayRules() {\n this.displayRuleControlConfigs = this.sharedFormControls.filter((config: SharedDisplayFormControlConfig) => config.rules);\n }\n\n private setUpFormWatcher() {\n this.sub.add(\n this.displayForm.valueChanges.subscribe((latestValues: { [key: string]: string | number }) => {\n this.isFormValid = false;\n\n const formReadyToCheck = this.displayForm.valid;\n\n if (formReadyToCheck && this.config.checkPageFormForceAsValid) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n //@ts-ignore\n const forceValid = this.config.checkPageFormForceAsValid();\n this.isFormValid = (this.displayForm.valid && forceValid);\n } else {\n this.isFormValid = formReadyToCheck;\n }\n //If there are no rules to check... leave\n if (!this.displayRuleControlConfigs) {\n console.log('No form config rules to validate');\n return;\n }\n\n clearTimeout(this.displayRuleCheckDebounces);\n this.displayRuleCheckDebounces = window.setTimeout(() => {\n this.checkControlsAgainstDisplayRules(latestValues);\n this.cleanControlsAgainstDisplayRules();\n }, 100);\n })\n );\n }\n\n /**\n * This watcher will wait for events to show halfsheet\n * and display a modal as needed\n */\n private setUpHalfSheetListener() {\n this.hubWatchers.push(\n MessageBusInternalService.addHubListenerWithEventFilter({\n channel: MessageBusEventChannel.INTERNAL,\n filterByEvents: [MessageBusOutgoingEventKey.SHOW_HALFSHEET],\n callbackListener: (payload: HubPayload) => {\n console.log('Halfsheet', payload);\n\n this.halfSheetEventData = payload as MessageBusInternalHubEvent;\n },\n })\n );\n }\n\n private setupStaticFormControls(addCheckboxControl: boolean) {\n this.sharedFormControls = this.config.pageFormControls;\n\n this.buildFormFromConfig();\n this.clearForm();\n\n this.setUpFormWatcher();\n this.extractControlsWithDisplayRules();\n this.checkControlsAgainstDisplayRules({});\n this.cleanControlsAgainstDisplayRules();\n\n //Check to see if we should be adding keyboard spacer (more than 2 editable form elements)\n this.addKeyboardSpacer =\n this.displayRuleControlConfigs.filter((formControlConfig: SharedDisplayFormControlConfig) => !formControlConfig.cellDetails)\n .length > 2;\n\n if (addCheckboxControl) this.insertCheckboxControl();\n }\n\n private setupAsyncFormControls(addCheckboxControl: boolean) {\n this.config.pageFormControlsObservable?.pipe(take(1)).subscribe(\n (formControls: SharedDisplayFormControlConfig[]) => {\n this.config.pageFormControls = formControls;\n\n this.setupStaticFormControls(addCheckboxControl);\n },\n () => {\n //ToDo: handle fatal errors\n }\n );\n }\n\n private insertCheckboxControl() {\n this.displayForm.addControl('controlConfirmCheckbox', new FormControl(false, [Validators.required, Validators.requiredTrue]));\n }\n\n private updateSharedConfig() {\n if (this.activatedRoute?.snapshot?.data?.pageConfig) {\n this.config = new SharedDisplayFormSettings(this.activatedRoute.snapshot.data.pageConfig);\n if (this.config.pageFormForceAsValid) {\n this.isFormValid = true;\n }\n if (this.config.pageFormControlsObservable) {\n this.setupAsyncFormControls(Boolean(this.config.pageConfirmCheckText));\n } else {\n this.setupStaticFormControls(Boolean(this.config.pageConfirmCheckText));\n }\n }\n }\n\n /**\n * Build the display rules for the input keys showIfTrue or hideIfTrue inside the config.rules\n * Example would be something like:\n *\n * rules: {\n * display: {\n * showIfTrue: [{ formKey: 'is_earning_income', values: [true] }],\n * },\n * },\n */\n private checkControlsAgainstDisplayRules(latestValues: { [key: string]: string | number }) {\n //Reset the values so we can populate them after processing\n this.displayRuleMapping.show = [];\n this.displayRuleMapping.hide = [];\n\n this.displayRuleControlConfigs.forEach((config: SharedDisplayFormControlConfig) => {\n config.rules?.display.showIfTrue?.forEach((rule: SharedDisplayFormControlDisplayRule) => {\n const latestVal = latestValues[rule.formKey];\n if (typeof latestVal === 'object' && rule.objKey) {\n if (latestVal && latestVal[rule.objKey] && rule.values.includes(latestVal[rule.objKey])) {\n this.displayRuleMapping.show.push(config.key);\n } else {\n this.displayRuleMapping.hide.push(config.key);\n }\n } else if (latestVal && rule.values.includes(latestVal)) {\n this.displayRuleMapping.show.push(config.key);\n } else {\n this.displayRuleMapping.hide.push(config.key);\n }\n });\n\n config.rules?.display.hideIfTrue?.forEach((rule: SharedDisplayFormControlDisplayRule) => {\n const latestVal = latestValues[rule.formKey];\n if (typeof latestVal === 'object' && rule.objKey) {\n if (latestVal && latestVal[rule.objKey] && rule.values.includes(latestVal[rule.objKey])) {\n this.displayRuleMapping.hide.push(config.key);\n } else {\n this.displayRuleMapping.show.push(config.key);\n }\n } else if (latestValues[rule.formKey] && rule.values.includes(latestValues[rule.formKey])) {\n this.displayRuleMapping.hide.push(config.key);\n } else {\n this.displayRuleMapping.show.push(config.key);\n }\n });\n });\n }\n\n /**\n * This method will remove any entered values on inputs that are hidden based on the\n * config.rules provided. Array for process is displayRuleMapping.hide\n */\n private cleanControlsAgainstDisplayRules() {\n this.displayRuleMapping.hide.forEach((controlKey: string) => {\n const control = this.displayForm.get(controlKey);\n\n if (control) {\n if (control.value !== undefined && control.value !== '') {\n control.patchValue('', { emitEvent: true });\n }\n }\n });\n }\n\n protected override handleMoveBackward(): void {\n if (this.config.pageOnBackCtaEvent) {\n MessageBusInternalService.sendOutgoingHubEvent(this.config.pageOnBackCtaEvent);\n } else {\n this.routingState.popAndNavigateTo(this.config.pageOnBackCtaPath || [], { relativeTo: this.activatedRoute });\n }\n }\n\n protected override handleMoveForward() {\n if (this.config.bridgeExitOverride && (IsRunningIOS() || IsRunningAndroid())) {\n MessageBusInternalService.sendOutgoingHubEvent(\n {\n event: MessageBusOutgoingEventKey.ROUTE,\n data: {\n path: this.config.bridgeExitOverride\n },\n }, 500\n );\n } else {\n this.routingState.popAndNavigateTo(this.config.pageOnForwardCtaPath || [], {relativeTo: this.activatedRoute});\n }\n }\n\n /**\n * This method is used to correctly update the category value from the onChange callback\n * @returns Function for the onChange, only argument updatedTotal: number\n */\n generateWrappedFunctionValueUpdate(controlKey: string): Function {\n return (updatedTotal: number) => {\n this.displayForm.controls[controlKey].setValue(updatedTotal);\n };\n }\n\n override handleSecondaryCtaClick() {\n if (this.config.processSecondaryEvent) {\n this.config\n .processSecondaryEvent()\n .pipe(take(1))\n .subscribe((route: string[]) => {\n if (route && route.length > 0) {\n this.routingState.popAndNavigateTo(route, { relativeTo: this.activatedRoute });\n }\n });\n } else if (this.config.pageSecondaryCtaEvent) {\n MessageBusInternalService.sendInternalHubEvent(this.config.pageSecondaryCtaEvent);\n }\n }\n\n handleFormCellClick(controlKey: string) {\n if (this.config.cellClicked) {\n this.config.cellClicked(this.displayForm);\n }\n\n this.routingState.navigateTo(this.config.getCellRedirectRoute(controlKey), { relativeTo: this.activatedRoute });\n }\n\n handleFormActionCellClick(control: SharedDisplayFormControlConfig) {\n if (this.config.cellClicked) {\n //Note: We don't access the form file input directly here to keep the control generic\n //and with the caller.\n this.config.cellClicked(this.displayForm, control);\n }\n\n //If the cell config has an action event attached, trigger it\n if (control.cellDetails?.action) {\n if (control.cellDetails.action.event) {\n MessageBusInternalService.sendOutgoingHubEvent(control.cellDetails?.action.event);\n return;\n } else if (control.cellDetails.action.redirectPath) {\n //If the control itself has a redirect, use this\n this.routingState.navigateTo(control.cellDetails.action.redirectPath.split('/'), { relativeTo: this.activatedRoute });\n return;\n }\n }\n\n //If the config has a general pageCellRedirectPath redirect to basic handler\n if (this.config.pageCellRedirectPath && this.config.pageCellRedirectPath.length > 0) {\n this.handleFormCellClick(control.key);\n return;\n }\n\n if (!this.config.cellClicked && !control.cellDetails?.action?.event && !this.config.pageCellRedirectPath) {\n console.warn(\n 'You have not provided a way for this cell to react to a client interaction event... please add a cellClicked method or cellDetails?.action.event to do something with this action.'\n );\n }\n }\n\n handleLanguageSelectChange(option: { [key: string]: string }) {\n MessageBusInternalService.sendInternalHubEvent({\n event: MessageBusInternalEventKey.CHANGED_LANGUAGE,\n data: option,\n });\n\n this.showLanguageSelect = false;\n }\n\n}\n","<bw-action-article [brightsideWebFb]=\"displayReviewAnalytics.shown\" minHeight=\"0\">\n <div header-actions class=\"flex-row pointer\">\n <bw-icon\n *ngIf=\"config.pageHideBackButton; else showBackButton\"\n color=\"var(--secondary-text)\"\n iconName=\"close\"\n [brightsideWebFb]=\"displayReviewAnalytics.dismiss\"\n (click)=\"handleCloseAction()\"\n ></bw-icon>\n\n <ng-template #showBackButton>\n <ui-nav-exit-back\n *ngIf=\"!pageIsFullScreen\"\n back-action-top\n [trackingDetail]=\"displayReviewAnalytics.dismiss\"\n [skipActionEmit]=\"!config.pageOnBackCtaPath\"\n (exitActionHandler)=\"handleCloseAction()\"\n ></ui-nav-exit-back>\n <ui-nav-exit-back\n *ngIf=\"pageIsFullScreen\"\n back-action-bottom\n [trackingDetail]=\"displayReviewAnalytics.dismiss\"\n [skipActionEmit]=\"!config.pageOnBackCtaPath\"\n (exitActionHandler)=\"handleCloseAction()\"\n ></ui-nav-exit-back>\n </ng-template>\n </div>\n\n <div *ngIf=\"config.pageTitle\" header-title class=\"flex-row space-between flex-end\">\n <typography title-medium class=\"mb-sm\">{{ config.pageTitle | translate }}</typography>\n </div>\n\n <div content-section>\n <p *ngIf=\"config.pageSubTitle\" text-large-regular class=\"mb-sm\">{{ config.pageSubTitle | translate }}</p>\n\n <a\n *ngIf=\"config.pageExtraModal\"\n bw-anchor\n anchorStyle=\"text-large-regular\"\n class=\"mr-xxs\"\n mwTextColor=\"var(--secondary-text)\"\n style=\"text-decoration: underline\"\n (click)=\"pageExtraModalIsShowing = true\"\n >\n {{ config.pageExtraModal.triggerText | translate }}\n </a>\n\n <section class=\"mt-md mb-xs\">\n <ng-container *ngIf=\"!config?.pageDisplayCells?.length; else cellDisplaySection\">\n <p text-large-semibold>{{ config.pageEmptyText | translate }}</p></ng-container\n >\n\n <ng-template #cellDisplaySection>\n <ng-container *ngFor=\"let cellInfo of config.pageDisplayCells\">\n <bw-cell\n *ngIf=\"!cellInfo?.value; else multiLineDisplay\"\n separatorType=\"full\"\n [singleLeftLabel]=\"cellInfo.label | translate\"\n iconNameRight=\"chevron_right\"\n (clicked)=\"handleCellClick(cellInfo)\"\n ></bw-cell>\n\n <ng-template #multiLineDisplay>\n <bw-cell\n *ngIf=\"!config.pageShowAsFlipped\"\n [labelLeft]=\"cellInfo.label | translate\"\n [labelRight]=\"cellInfo.value | translate\"\n separatorType=\"full\"\n >\n </bw-cell>\n\n <bw-cell\n *ngIf=\"config.pageShowAsFlipped\"\n [labelLeft]=\"cellInfo.label | translate\"\n [labelSubLeft]=\"cellInfo.value | translate\"\n [flipLeftLabels]=\"true\"\n separatorType=\"full\"\n >\n </bw-cell>\n </ng-template>\n </ng-container>\n </ng-template>\n\n <div *ngFor=\"let questionAnswer of config.pageDisplayQuestionAnswer\" class=\"mt-md mb-sm\">\n <bw-paragraph textStyle=\"Body2\"><span [innerHTML]=\"questionAnswer.label | translate\"></span></bw-paragraph>\n <p text-large-semibold [innerHTML]=\"questionAnswer.value | translate\"></p>\n </div>\n\n <div *ngIf=\"config.pageAddActionText\" class=\"flex-row mt-md mr-md\" (click)=\"handleAddAction()\">\n <bw-icon iconName=\"add\" color=\"var(--brand)\"></bw-icon>\n <p text-large-regular class=\"brand ml-sm\">{{ config.pageAddActionText | translate }}</p>\n </div>\n </section>\n </div>\n <div footer-top>\n <div class=\"mt-md\" *ngIf=\"config.pageExtraInfoListDetail\">\n <bw-list-item-details\n [avatarIconName]=\"config.pageExtraInfoListDetail.avatarTitle\"\n [avatarIconColor]=\"config.pageExtraInfoListDetail.avatarBg\"\n [blockStyle]=\"true\"\n [bgColor]=\"config.pageExtraInfoListDetail.bgColor\"\n [listTitle]=\"config.pageExtraInfoListDetail.title | translate\">\n </bw-list-item-details>\n </div>\n </div>\n <div footer-actions class=\"flex-row row-reverse\">\n <button\n *ngIf=\"config.pageCtaLabel || config.pageCtaLabelKey\"\n bw-button\n [processing]=\"processing\"\n [brightsideWebFb]=\"displayReviewAnalytics.submit\"\n (click)=\"handleCtaClick()\"\n >\n {{ config.pageCtaLabelKey || config.pageCtaLabel | translate }}\n </button>\n\n <typography text-large-semibold>\n <a\n *ngIf=\"config.pageSecondaryCtaLabel\"\n bw-anchor\n class=\"bs-blue mr-sm\"\n [brightsideWebFb]=\"{ event_name: 'display_review_secondary' }\"\n (click)=\"handleSecondaryCtaClick()\"\n >{{ config.pageSecondaryCtaLabel | translate }}</a\n >\n </typography>\n </div>\n</bw-action-article>\n\n<bw-modal\n *ngIf=\"pageExtraModalIsShowing\"\n (closeModal)=\"pageExtraModalIsShowing = false\"\n [brightsideWebFb]=\"{ event_name: config.fbEventName + 'more_info' }\"\n>\n <typography title-medium color=\"var(--gray-70)\">{{ config.pageExtraModal.title | translate }}</typography>\n <section class=\"body\">\n <bw-paragraph *ngFor=\"let bodyText of config.pageExtraModal.body\" [textStyle]=\"'Body2'\" color=\"var(--gray-50)\">\n <span [innerHTML]=\"bodyText | translate\"></span>\n </bw-paragraph>\n </section>\n <footer class=\"footer\">\n <div class=\"flex-row row-reverse\">\n <button\n bw-button\n (click)=\"pageExtraModalIsShowing = false\"\n [brightsideWebFb]=\"{ event_name: config.fbEventName + 'more_info' }\"\n >\n {{ config.pageExtraModal.cta | translate }}\n </button>\n </div>\n </footer>\n</bw-modal>\n","import { Component, OnInit } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\n\nimport { RoutingStateService } from '@brightside/brightside-ui-services';\nimport { AnalyticsAttributesV4, isTemplateFullScreen, Settings } from '@brightside-web/desktop/data-access/shared';\nimport { MessageBusInternalService, MessageBusInternalHubEvent } from '@brightside-web/micro/core/message-bus';\n\nexport interface DisplayReviewExtra {\n triggerText: string;\n title: string;\n body: string[];\n cta: string;\n}\n\nexport interface SharedDisplayReviewCell {\n label: string;\n value?: string | string[];\n onClickPath?: string[];\n}\n\ninterface SharedDisplayExtraInfoInterface {\n title: string;\n bgColor: string;\n avatarTitle: string;\n avatarBg: string;\n}\n\nexport class DisplayReviewSettings extends Settings {\n pageExtraInfo: any;\n\n constructor(config: any = {}) {\n super(config);\n\n this.pageAddActionText = config.pageAddActionText || null;\n this.pageDisplayCells = config.pageDisplayCells || [];\n this.pageDisplayQuestionAnswer = config.pageDisplayQuestionAnswer || [];\n this.pageEmptyText = config.pageEmptyText || '';\n this.pageExtraModal = config.pageExtraModal;\n this.pageOnAddActionCtaPath = config.pageOnAddActionCtaPath || [];\n this.pageSecondaryCtaEvent = config.pageSecondaryCtaEvent || null;\n this.pageSecondaryCtaPath = config.pageSecondaryCtaPath || null;\n this.pageShowAsFlipped = Boolean(config.pageShowAsFlipped);\n this.pageExtraInfoListDetail = config.pageExtraInfoListDetail || null;\n }\n\n pageAddActionText?: string;\n pageDisplayCells: SharedDisplayReviewCell[];\n pageDisplayQuestionAnswer?: SharedDisplayReviewCell[];\n pageEmptyText: string;\n pageExtraModal?: DisplayReviewExtra;\n pageOnAddActionCtaPath: string[];\n pageSecondaryCtaEvent: MessageBusInternalHubEvent;\n pageSecondaryCtaPath: string[];\n pageShowAsFlipped?: boolean;\n pageExtraInfoListDetail?: SharedDisplayExtraInfoInterface;\n}\n\n@Component({\n selector: 'brightside-web-display-review',\n templateUrl: './display-review.component.html',\n styleUrls: ['./display-review.component.scss'],\n})\nexport class SharedDisplayReviewComponent implements OnInit {\n config: DisplayReviewSettings = new DisplayReviewSettings({\n fbPage: 'page',\n fbCategory: 'consents',\n\n pageTitle: '',\n pageSubTitle: '',\n pageCtaLabel: 'BUTTON_CONTINUE',\n pageSecondaryCtaLabel: '',\n pageSecondaryCtaEvent: null,\n\n pageOnForwardCtaPath: [],\n });\n\n displayReviewAnalytics: {\n shown: AnalyticsAttributesV4;\n dismiss: AnalyticsAttributesV4;\n submit: AnalyticsAttributesV4;\n } = {\n shown: { event_name: '' },\n dismiss: { event_name: '' },\n submit: { event_name: '' },\n };\n\n pageIsFullScreen: boolean;\n pageExtraModalIsShowing = false;\n processing = false;\n\n constructor(private routingState: RoutingStateService, private activatedRoute: ActivatedRoute) {}\n\n ngOnInit(): void {\n this.checkForConfigViaData();\n }\n\n private checkForConfigViaData() {\n if (isTemplateFullScreen(this.activatedRoute)) {\n this.pageIsFullScreen = true;\n }\n\n if (this.activatedRoute?.snapshot?.data?.pageConfig) {\n this.config = new DisplayReviewSettings(this.activatedRoute.snapshot.data.pageConfig);\n this.setUpAnalytics();\n }\n\n this.activatedRoute.data.subscribe(() => {\n this.config = new DisplayReviewSettings(this.activatedRoute.snapshot.data.pageConfig);\n this.setUpAnalytics();\n });\n }\n\n private setUpAnalytics() {\n if (this.config.analyticsAttributes) {\n this.displayReviewAnalytics.shown = this.config.analyticsAttributes('shown');\n this.displayReviewAnalytics.dismiss = this.config.analyticsAttributes('dismiss');\n this.displayReviewAnalytics.submit = this.config.analyticsAttributes('tapped');\n }\n }\n\n handleCellClick(cell: SharedDisplayReviewCell) {\n if (cell.onClickPath) {\n this.routingState.navigateTo(cell.onClickPath);\n }\n }\n\n handleCloseAction() {\n if (this.config.pageSecondaryCtaEvent) {\n MessageBusInternalService.sendOutgoingHubEvent(this.config.pageSecondaryCtaEvent);\n } else {\n this.routingState.navigateTo(this.config.pageOnBackCtaPath || ['home']);\n }\n }\n\n handleAddAction() {\n this.routingState.navigateTo(this.config.pageOnAddActionCtaPath, {});\n }\n\n handleCtaClick() {\n const options = { queryParams: { ...this.activatedRoute?.snapshot?.queryParams } };\n\n if (this.config.pageOnForwardCtaData && Object.keys(this.config.pageOnForwardCtaData || {}).length > 0) {\n options.queryParams = this.config.pageOnForwardCtaData;\n }\n\n this.routingState.navigateTo(this.config.pageOnForwardCtaPath, options);\n }\n\n handleSecondaryCtaClick() {\n this.routingState.navigateTo(this.config.pageSecondaryCtaPath, {});\n }\n}\n","<section class=\"content-layout\">\n <bw-action-article [brightsideWebFb]=\"config.analyticsAttributes()\" [minHeight]=\"0\">\n <div header-actions class=\"flex-row pointer\" *ngIf=\"!config.pageHideBackButton\">\n <bw-icon iconName=\"close\" size=\"24\" (click)=\"handleCloseAction()\"></bw-icon>\n </div>\n <div *ngIf=\"config.pageTitle\" header-title class=\"flex-row space-between flex-end\">\n <typography title-medium class=\"mb-sm\">{{ config.pageTitle | translate }}</typography>\n </div>\n\n <div content-section>\n <div class=\"flex-column space-center mb-xl\">\n <bw-spinner></bw-spinner>\n <p *ngIf=\"config.pageSubTitle\" text-large-semibold class=\"mb-sm\">{{ config.pageSubTitle | translate }}</p>\n <typography *ngIf=\"config.pageBodyText\" text-large-regular color=\"var(--secondary-text)\">\n <p class=\"center\" style=\"max-width: 432px\">{{ config.pageBodyText | translate }}</p>\n </typography>\n </div>\n </div>\n <div footer-actions class=\"flex-row row-reverse\"></div>\n </bw-action-article>\n</section>\n","import { Component, OnInit, Injector } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\n\nimport { RoutingStateService } from '@brightside/brightside-ui-services';\nimport { isTemplateFullScreen, Settings } from '@brightside-web/desktop/data-access/shared';\nimport {\n MessageBusInternalService,\n MessageBusInternalHubEvent,\n} from '@brightside-web/micro/core/message-bus';\n\nimport { Observable } from 'rxjs';\n\nexport class SharedDisplayWaitingSettings extends Settings {\n constructor(config: any = {}) {\n super(config);\n\n this.pageSecondaryCtaEvent = config.pageSecondaryCtaEvent || null;\n this.triggerWaitingStatusCheck = config.triggerWaitingStatusCheck || null;\n }\n\n pageSecondaryCtaEvent: MessageBusInternalHubEvent;\n\n triggerWaitingStatusCheck?: (injector: Injector, routingStateService: RoutingStateService) => Observable<boolean>;\n}\n\n@Component({\n selector: 'brightside-web-display-waiting',\n templateUrl: './display-waiting.component.html',\n})\nexport class SharedDisplayWaitingComponent implements OnInit {\n config: SharedDisplayWaitingSettings = new SharedDisplayWaitingSettings({\n fbPage: 'page',\n fbCategory: 'consents',\n\n pageTitle: '',\n pageSubTitle: '',\n pageCtaLabel: 'BUTTON_CONTINUE',\n pageSecondaryCtaLabel: '',\n pageSecondaryCtaEvent: null,\n\n pageOnForwardCtaPath: [],\n });\n\n pageIsFullScreen: boolean;\n\n constructor(\n private injector: Injector,\n private routingState: RoutingStateService,\n private activatedRoute: ActivatedRoute\n ) {}\n\n ngOnInit(): void {\n this.checkForConfigViaData();\n\n //If we have a method to trigger for status/routing updates, call it. Otherwise set a timer and move forward\n if (this.config.triggerWaitingStatusCheck && typeof this.config.triggerWaitingStatusCheck === 'function') {\n this.config.triggerWaitingStatusCheck(this.injector, this.routingState);\n } else {\n setTimeout(() => this.handleMoveForward(), 500);\n }\n }\n\n private checkForConfigViaData() {\n if (isTemplateFullScreen(this.activatedRoute)) {\n this.pageIsFullScreen = true;\n }\n\n if (this.activatedRoute?.snapshot?.data?.config) {\n this.config = new SharedDisplayWaitingSettings(this.activatedRoute.snapshot.data.config);\n }\n }\n\n handleCloseAction() {\n if (this.config.pageSecondaryCtaEvent) {\n MessageBusInternalService.sendOutgoingHubEvent(this.config.pageSecondaryCtaEvent);\n } else {\n this.routingState.navigateTo(['home']);\n }\n }\n\n handleMoveForward() {\n const options = { queryParams: { ...this.activatedRoute?.snapshot?.queryParams } };\n\n if (this.config.pageOnForwardCtaData && Object.keys(this.config.pageOnForwardCtaData || {}).length > 0) {\n options.queryParams = this.config.pageOnForwardCtaData;\n }\n\n this.routingState.navigateTo(this.config.pageOnForwardCtaPath, options);\n }\n}\n","<ng-container>\n\n <bw-action-article minHeight=\"0\" [brightsideWebFb]=\"displayAnalytics.shown\">\n <div id=\"displayFormHeaderAction\" header-actions class=\"flex-row pointer\">\n <bw-icon\n *ngIf=\"config.pageHideBackButton; else showBackButton\"\n color=\"var(--secondary-text)\"\n iconName=\"close\"\n (click)=\"handleBackClick()\"\n ></bw-icon>\n\n <ng-template #showBackButton>\n <ui-nav-exit-back\n *ngIf=\"!pageIsFullScreen\"\n back-action-top\n [trackingDetail]=\"displayAnalytics.dismiss\"\n [skipActionEmit]=\"!config.pageOnBackCtaPath\"\n (exitActionHandler)=\"handleBackClick()\"\n ></ui-nav-exit-back>\n <ui-nav-exit-back\n *ngIf=\"pageIsFullScreen\"\n back-action-bottom\n [trackingDetail]=\"displayAnalytics.dismiss\"\n [skipActionEmit]=\"!config.pageOnBackCtaPath\"\n (exitActionHandler)=\"handleBackClick()\"\n ></ui-nav-exit-back>\n </ng-template>\n </div>\n <div header-title>\n <typography title-medium class=\"mt-xs\">{{ config.pageTitleKey || config.pageTitle | translate }}</typography>\n </div>\n <div content-section>\n <bw-paragraph>\n <span [innerHTML]=\"config.pageSubTitleKey || config.pageSubTitle | translate\"></span>\n </bw-paragraph>\n <ng-container *ngFor=\"let item of config.pageContentArray\">\n <typography text-medium-semibold>\n {{ item[config.pageContentArrayKey.title] | translate }}\n </typography>\n <bw-paragraph>\n <ul>\n <li *ngFor=\"let docs of item[config.pageContentArrayKey.listItems]\">\n {{ docs | translate }}\n </li>\n </ul>\n </bw-paragraph>\n </ng-container>\n </div>\n\n <div footer-top>\n <ng-container *ngIf=\"config.pageConfirmCheckText && checkboxForm\">\n <form [formGroup]=\"checkboxForm\">\n <bw-checkbox\n required\n formControlName=\"controlConfirmCheckbox\"\n [label]=\"config.pageConfirmCheckText | translate\"\n [centerAlign]=\"true\"\n (checkboxChanged)=\"checkboxForm.markAllAsTouched()\"\n ></bw-checkbox>\n </form>\n </ng-container>\n </div>\n <div footer-actions class=\"flex-row row-reverse\">\n <button\n *ngIf=\"config.pageCtaLabel || config.pageCtaLabelKey\"\n bw-button\n [brightsideWebFb]=\"displayAnalytics.submit\"\n [disabled]=\"config.pageConfirmCheckText && (!checkboxForm?.touched || !checkboxForm?.valid || !checkboxForm?.dirty)\"\n (click)=\"handleCtaClick()\"\n >\n {{ config.pageCtaLabelKey || config.pageCtaLabel | translate }}\n </button>\n </div>\n </bw-action-article>\n</ng-container>\n\n","import { Component, OnInit, Injector } from '@angular/core';\nimport {AnalyticsAttributesV4, isTemplateFullScreen, Settings} from \"@brightside-web/desktop/data-access/shared\";\nimport {RoutingStateService} from \"@brightside/brightside-ui-services\";\nimport {ActivatedRoute} from \"@angular/router\";\nimport {FormControl, FormGroup, Validators} from \"@angular/forms\";\n\nexport class SharedDisplayContentArraySettings extends Settings {\n constructor(config: any = {}) {\n super(config);\n this.pageContentArray = config.pageContentArray || [];\n this.pageContentArrayKey = config.pageContentArrayKey || undefined;\n this.pageConfirmCheckText = config.pageConfirmCheckText;\n }\n\n pageConfirmCheckText? = '';\n\n // one should not exist without the other\n pageContentArray?: [];\n pageContentArrayKey?: {title: string; listItems:string};\n}\n\n@Component({\n selector: 'brightside-web-display-content-array',\n templateUrl: './shared-display-content-list.component.html',\n styleUrls: ['./shared-display-content-list.component.scss'],\n})\nexport class SharedDisplayContentListComponent implements OnInit {\n config: SharedDisplayContentArraySettings = new SharedDisplayContentArraySettings({\n fbPage: 'page',\n fbCategory: '',\n pageTitle: '',\n pageSubTitle: '',\n pageCtaLabel: 'BUTTON_CONTINUE',\n pageSecondaryCtaLabel: '',\n pageSecondaryCtaEvent: null,\n pageOnForwardCtaPath: [],\n });\n\n pageIsFullScreen: boolean;\n\n displayAnalytics: {\n shown: AnalyticsAttributesV4;\n dismiss: AnalyticsAttributesV4;\n submit: AnalyticsAttributesV4;\n } = {\n shown: { event_name: '' },\n dismiss: { event_name: '' },\n submit: { event_name: '' },\n };\n\n isCheckboxClicked = false;\n\n checkboxForm: FormGroup;\n\n constructor(\n private routingState: RoutingStateService,\n private activatedRoute: ActivatedRoute) {\n }\n\n ngOnInit() {\n this.checkForConfigViaData();\n }\n\n private checkForConfigViaData() {\n if (isTemplateFullScreen(this.activatedRoute)) {\n this.pageIsFullScreen = true;\n }\n\n if (this.activatedRoute?.snapshot?.data?.pageConfig) {\n this.config = new SharedDisplayContentArraySettings(this.activatedRoute.snapshot.data.pageConfig);\n this.setUpAnalytics();\n this.setUpConfirmCheckbox();\n }\n\n this.activatedRoute.data.subscribe(() => {\n this.config = new SharedDisplayContentArraySettings(this.activatedRoute.snapshot.data.pageConfig);\n this.setUpAnalytics();\n this.setUpConfirmCheckbox();\n });\n }\n\n private setUpAnalytics() {\n if (this.config.analyticsAttributes) {\n this.displayAnalytics.shown = this.config.analyticsAttributes('shown');\n this.displayAnalytics.dismiss = this.config.analyticsAttributes('dismiss');\n this.displayAnalytics.submit = this.config.analyticsAttributes('tapped');\n }\n }\n\n private setUpConfirmCheckbox() {\n if (this.config.pageConfirmCheckText) {\n this.checkboxForm = new FormGroup({\n 'controlConfirmCheckbox': new FormControl(false, [Validators.required, Validators.requiredTrue])\n })\n }\n }\n\n handleBackClick() {\n this.handleMoveBackward();\n return false;\n }\n\n protected handleMoveBackward() {\n this.routingState.popAndNavigateTo(this.config.pageOnBackCtaPath || []);\n }\n\n handleCtaClick() {\n this.handleMoveForward();\n }\n protected handleMoveForward() {\n this.routingState.popAndNavigateTo(this.config.pageOnForwardCtaPath || []);\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { MicroUiMoleculeModule } from '@micro-ui/molecule';\n\nimport { BrightsideUiModule } from '@brightside/brightside-ui';\nimport { BrightsideUiServicesModule } from '@brightside/brightside-ui-services';\nimport { TranslateModule } from '@ngx-translate/core';\n\n//ToDo: need to extract this from desktop\nimport { SharedDesktopModule } from '@brightside-web/shared/desktop';\n\nimport { SelectDropDownModule } from 'ngx-select-dropdown';\n\nimport { SharedDisplayCampaignComponent } from './display-campaign/display-campaign.component';\nimport { SharedDisplayCompleteComponent } from './display-complete/display-complete.component';\nimport { SharedDisplayFormChoiceComponent } from './display-form/form-choice/form-choice.component';\nimport { SharedDisplayFormComponent } from './display-form/shared-display-form.component';\nimport { SharedDisplayFormFileComponent } from './display-form/form-file/form-file.component';\nimport { SharedDisplayHalfsheetComponent } from './display-halfsheet/display-halfsheet.component';\nimport { SharedDisplayReviewComponent } from './display-review/display-review.component';\nimport { SharedDisplayWaitingComponent } from './display-waiting/display-waiting.component';\nimport { SharedDisplayContentListComponent } from \"./display-content-list/shared-display-content-list.component\";\n\nconst exported = [\n SharedDisplayCampaignComponent,\n SharedDisplayCompleteComponent,\n SharedDisplayFormChoiceComponent,\n SharedDisplayFormComponent,\n SharedDisplayFormFileComponent,\n SharedDisplayHalfsheetComponent,\n SharedDisplayReviewComponent,\n SharedDisplayWaitingComponent,\n SharedDisplayContentListComponent,\n];\n\n@NgModule({\n imports: [\n BrightsideUiModule,\n BrightsideUiServicesModule,\n CommonModule,\n MicroUiMoleculeModule,\n ReactiveFormsModule,\n SelectDropDownModule,\n SharedDesktopModule,\n TranslateModule,\n ],\n declarations: [...exported],\n exports: exported,\n})\nexport class SharedDisplayModule {}\n","import { Observable } from 'rxjs';\n\nimport {\n HubPayload,\n MessageBusInternalService,\n MessageBusEventUtil,\n MessageBusHalfsheetStyle,\n MessageBusEventChannel,\n UseThisForStandaloneOrThat,\n MessageBusIncomingEventKey,\n MessageBusInternalEventKey,\n} from '@brightside-web/micro/core/message-bus';\n\nconst FILE_SIZE_LIMIT = 5.2;\n\nconst ICON_NAME_SELECTED = 'trash';\nconst ICON_NAME_UNSELECTED = UseThisForStandaloneOrThat('camera', 'upload');\n\nconst ACTION_EMPHASIZE_SELECTED = false;\nconst ACTION_EMPHASIZE_UNSELECTED = true;\nconst DELETE_HALF_SHEET_CONFIG = MessageBusEventUtil.event.builder.halfsheetConfigAndReturnStandardEvent({\n id: 'documentUploadImageDeleteConfirm',\n title: 'DOC_UPLOAD_DELETE_HALFSHEET_TITLE',\n subText: 'DOC_UPLOAD_DELETE_HALFSHEET_SUBTEXT',\n primaryCta: {\n code: 'documentUpload_DeleteFile',\n label: 'DOC_UPLOAD_DELETE_HALFSHEET_PRIMARY_CTA',\n style: MessageBusHalfsheetStyle.WARNING,\n },\n secondaryCta: {\n code: 'documentUpload_IgnoreAction',\n label: 'DOC_UPLOAD_DELETE_HALFSHEET_SECONDARY_CTA',\n },\n});\n\nconst SIZE_HALF_SHEET_CONFIG = MessageBusEventUtil.event.builder.halfsheetConfigAndReturnStandardEvent({\n id: 'documentUploadImageSizeTooLargeConfirm',\n title: 'DOC_UPLOAD_SIZE_CAMERA_HALFSHEET_TITLE',\n subText: 'DOC_UPLOAD_SIZE_CAMERA_HALFSHEET_SUBTEXT',\n primaryCta: {\n code: 'documentUpload_NewPicture', //These should match with the codes expected in your hub handler\n label: 'DOC_UPLOAD_SIZE_CAMERA_HALFSHEET_PRIMARY_CTA',\n style: MessageBusHalfsheetStyle.PRIMARY,\n },\n secondaryCta: {\n code: 'documentUpload_ChoosePhoto', //These should match with the codes expected in your hub handler\n label: 'DOC_UPLOAD_SIZE_CAMERA_HALFSHEET_SECONDARY_CTA',\n },\n});\n\nconst SIZE_HALF_SHEET_CONFIG_NO_CAPTURE = MessageBusEventUtil.event.builder.halfsheetConfigAndReturnStandardEvent({\n id: 'documentUploadImageSizeTooLargeConfirm',\n title: 'DOC_UPLOAD_SIZE_UPLOAD_HALFSHEET_TITLE',\n subText: 'DOC_UPLOAD_SIZE_UPLOAD_HALFSHEET_SUBTEXT',\n primaryCta: {\n code: 'documentUpload_ChoosePhoto', //These should match with the codes expected in your hub handler\n label: 'DOC_UPLOAD_SIZE_UPLOAD_HALFSHEET_PRIMARY_CTA',\n style: MessageBusHalfsheetStyle.PRIMARY,\n },\n secondaryCta: {\n code: 'documentUpload_Cancel', //These should match with the codes expected in your hub handler\n label: 'DOC_UPLOAD_SIZE_UPLOAD_HALFSHEET_SECONDARY_CTA',\n },\n});\n\nconst _putFileIntoCache = (key: string, value: string, file?: Blob) => {\n MessageBusInternalService.sendInternalHubEvent({\n event: MessageBusInternalEventKey.SAVE_FILE,\n data: { docKey: key, docValue: value, file },\n });\n};\n\nconst _buildFileStringAndPutToCache = (key: string, file: Blob, retry: boolean = false) => {\n const reader = new FileReader();\n reader.readAsBinaryString(file);\n\n reader.onload = function () {\n _putFileIntoCache(key, btoa(reader.result as string), file);\n };\n reader.onerror = function () {\n if (!retry) {\n _buildFileStringAndPutToCache(key, file, true);\n }\n };\n};\n\nconst showAndReactToFileSizeHalfSheet = (key: string) => {\n /**\n * This watcher will wait for events from the halfsheet bridge info\n * and execute the mapped callback for the code provided.\n */\n MessageBusInternalService.addHubListenerWithEventFilter({\n channel: MessageBusEventChannel.INCOMING,\n filterByEvents: [MessageBusIncomingEventKey.HALF_SHEET],\n take: 1, //Note this is here to make sure we don't get more than one image selector shown\n callbackListener: (payload: HubPayload) => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const code = payload.data.body.code;\n\n if (code === 'documentUpload_NewPicture' || code === 'documentUpload_ChoosePhoto') {\n const fileInput = document.getElementById(`${key}FileInputField`);\n\n if (code === 'documentUpload_ChoosePhoto') {\n fileInput?.removeAttribute('capture');\n } else {\n fileInput?.setAttribute('capture', 'camera');\n }\n\n fileInput?.click();\n }\n },\n });\n\n MessageBusInternalService.sendOutgoingHubEvent(\n UseThisForStandaloneOrThat(SIZE_HALF_SHEET_CONFIG, SIZE_HALF_SHEET_CONFIG_NO_CAPTURE)\n );\n};\n\nconst removeSelectedDocument = (key: string) => {\n const fileInput = document.getElementById(`${key}FileInputField`);\n\n if (fileInput) {\n (fileInput as any).value = null;\n }\n};\n\nconst startDocumentUploadPicker = (key: string): Observable<string> =>\n new Observable<string>((responseSubscriber) => {\n const fileInput = document.getElementById(`${key}FileInputField`);\n\n if (fileInput) {\n fileInput.removeAttribute('capture');\n fileInput.onchange = (event: any, fileAsBase64: string = '') => {\n if (fileAsBase64) {\n _putFileIntoCache(key, fileAsBase64);\n\n responseSubscriber.next('document');\n responseSubscriber.complete();\n } else if (event?.target?.files) {\n const file: File = event.target.files[0];\n\n //We have a limitation on size of the file\n if (file.size && file.size / 1024 ** 2 > FILE_SIZE_LIMIT) {\n showAndReactToFileSizeHalfSheet(key);\n return;\n }\n\n _buildFileStringAndPutToCache(key, file);\n\n responseSubscriber.next(file.name);\n responseSubscriber.complete();\n } else {\n responseSubscriber.next('');\n responseSubscriber.complete();\n }\n };\n\n fileInput.click();\n } else {\n responseSubscriber.next('');\n responseSubscriber.complete();\n }\n });\n\nconst startDocumentUploadCapture = (key: string): Observable<string> =>\n new Observable<string>((responseSubscriber) => {\n const fileInput = document.getElementById(`${key}FileInputField`);\n\n if (fileInput) {\n fileInput.setAttribute('capture', 'camera');\n fileInput.onchange = (event: any, fileAsBase64: string = '') => {\n if (fileAsBase64) {\n _putFileIntoCache(key, fileAsBase64);\n\n responseSubscriber.next('document');\n responseSubscriber.complete();\n } else if (event?.target?.files) {\n const file: File = event.target.files[0];\n\n //We have a limitation on size of the file\n if (file.size && file.size / 1024 ** 2 > FILE_SIZE_LIMIT) {\n showAndReactToFileSizeHalfSheet(key);\n return;\n }\n\n _buildFileStringAndPutToCache(key, file);\n\n responseSubscriber.next(file.name);\n responseSubscriber.complete();\n } else {\n responseSubscriber.next('');\n responseSubscriber.complete();\n }\n };\n\n fileInput.click();\n } else {\n responseSubscriber.next('');\n responseSubscriber.complete();\n }\n });\n\nexport const SharedDisplayFormDocumentUtil = {\n getSetting: {\n selected: { icon: ICON_NAME_SELECTED, emphasize: ACTION_EMPHASIZE_SELECTED },\n unselected: { icon: ICON_NAME_UNSELECTED, emphasize: ACTION_EMPHASIZE_UNSELECTED },\n deleteHalfSheet: DELETE_HALF_SHEET_CONFIG,\n },\n removeSelectedDocument,\n startDocumentUploadCapture,\n startDocumentUploadPicker,\n};\n","import { FormGroup } from '@angular/forms';\n\nconst getProperty = <T, K extends keyof T>(obj: T, key: K): T[K] => obj[key];\n\n/**\n * Utilize this to map form information to a interface type. Either directly or with a special mapping defined.\n * @param form FormGroup\n * @param specialMapping { [key: string]: string }\n * @param keyMapping { [key: string]: { attribute:string, value:string } }\n * @returns Passed T\n */\nconst ExtractValuesAndMapToType = <T>(form: FormGroup, specialMapping: { [key: string]: string } = {}, keyMapping: { [key: string]: { attribute:string, value:string } } = {}): T | any => {\n if (form) {\n const hasSpecialMapping = Object.keys(specialMapping).length > 0;\n const hasKeyMapping = Object.keys(keyMapping).length > 0;\n const dataAsType = Object.keys(form.controls).reduce((buildingObj, nextKey: string) => {\n //Check for special mapping to rename value search\n const specialInsertKey = specialMapping[nextKey] || null;\n const keyInsertObj = keyMapping[nextKey] || null;\n // const specialInsertVal = form.get(nextKey)?.value[keyMapping] || form.get(nextKey)?.value;\n //If we have special mapping but don't find the key, skip it\n if (hasSpecialMapping && !specialInsertKey) {\n return buildingObj;\n }\n // this is used to pull a value from an object in the form.value and put it into\n // a new key while retaining the existing key:value\n if (hasKeyMapping && keyInsertObj) {\n const newVal = form.get(nextKey)?.value[keyInsertObj.value];\n if (newVal) {\n return { ...buildingObj, [keyInsertObj.attribute]: newVal, [nextKey]: form.get(nextKey)?.value};\n }\n }\n\n return { ...buildingObj, [specialInsertKey || nextKey]: form.get(nextKey)?.value };\n }, {});\n\n return dataAsType as T;\n }\n\n return {};\n};\n\n/**\n * Place any util methods you wish to provide application code access with it.\n */\nexport const SharedDisplayFormUtil = {\n ExtractValuesAndMapToType,\n};\n","import { FormGroup } from '@angular/forms';\nimport {\n HubPayload,\n MessageBusEventChannel,\n MessageBusIncomingEventKey,\n MessageBusInternalService,\n} from '@brightside-web/micro/core/message-bus';\n\nimport { take } from 'rxjs/operators';\n\nimport { SharedDisplayFormControlConfig, SharedDisplayFormDocumentUtil } from '../../../index';\n\n/**\n * @description\n * Responder can be used by any action that wants to handle file uploads. Supports both file upload\n * and image capture.\n *\n * Should match ClickResponderFunction type\n *\n *\n * @param {FormGroup} form;\n * @param {SharedDisplayFormControlConfig} targetControlConfig;\n *\n *\n * @usageNotes\n * File will be broadcasted out via message bus like below:\n *\n * MessageBusInternalService.sendInternalHubEvent({\n * event: MessageBusInternalEventKey.SAVE_FILE,\n * data: { docKey: key, docValue: value, file },\n * });\n *\n *\n * @example\n * n/a\n *\n */\nexport const SharedDisplayFormFileActionResponder = (form: FormGroup, targetControlConfig: SharedDisplayFormControlConfig) => {\n //TODO translate this default filename\n const DocumentUploadMarkControlFilled = (fileName: string = 'document') => {\n if (targetControlConfig.cellDetails?.action) {\n targetControlConfig.cellDetails.action.emphasize = SharedDisplayFormDocumentUtil.getSetting.selected.emphasize;\n targetControlConfig.cellDetails.iconNameRight = SharedDisplayFormDocumentUtil.getSetting.selected.icon;\n\n (targetControlConfig.cellDetails as any).originalLabelSubLeft = targetControlConfig.cellDetails.labelSubLeft;\n targetControlConfig.cellDetails.labelSubLeft = fileName;\n\n form.get(targetControlConfig.key)?.setValue(fileName);\n\n DocumentUploadAddRemoveActionEvent();\n }\n };\n const DocumentUploadAddRemoveActionEvent = () => {\n if (targetControlConfig.cellDetails?.action) {\n (targetControlConfig.cellDetails as any).originalActionEvent = targetControlConfig.cellDetails.action.event;\n targetControlConfig.cellDetails.action.event = SharedDisplayFormDocumentUtil.getSetting.deleteHalfSheet;\n }\n };\n const DocumentUploadRemoveActionEvent = () => {\n if (targetControlConfig.cellDetails?.action) {\n targetControlConfig.cellDetails.action.event = (targetControlConfig.cellDetails as any).originalActionEvent;\n delete (targetControlConfig.cellDetails as any).originalActionEvent;\n }\n };\n\n const DocumentUploadCaptureHandler = () => {\n SharedDisplayFormDocumentUtil.startDocumentUploadCapture(targetControlConfig.key)\n .pipe(take(1))\n .subscribe((fileName: string) => {\n //ToDo: should we do anything with the case of not picking a file... tracking at least?\n if (fileName) {\n form.markAsTouched();\n form.markAsDirty();\n\n DocumentUploadMarkControlFilled(fileName);\n }\n });\n };\n const DocumentUploadPickerHandler = () => {\n SharedDisplayFormDocumentUtil.startDocumentUploadPicker(targetControlConfig.key)\n .pipe(take(1))\n .subscribe((fileName: string) => {\n //ToDo: should we do anything with the case of not picking a file... tracking at least?\n if (fileName) {\n form.markAsTouched();\n form.markAsDirty();\n\n DocumentUploadMarkControlFilled(fileName);\n }\n });\n };\n const DocumentUploadDeleteHandler = () => {\n SharedDisplayFormDocumentUtil.removeSelectedDocument(targetControlConfig.key);\n\n form.markAsUntouched();\n form.get(targetControlConfig.key)?.setValue('');\n\n if (targetControlConfig.cellDetails?.action) {\n targetControlConfig.cellDetails.action.emphasize = SharedDisplayFormDocumentUtil.getSetting.unselected.emphasize;\n targetControlConfig.cellDetails.iconNameRight = SharedDisplayFormDocumentUtil.getSetting.unselected.icon;\n targetControlConfig.cellDetails.labelSubLeft = (targetControlConfig.cellDetails as any).originalLabelSubLeft;\n\n delete (targetControlConfig.cellDetails as any).originalLabelSubLeft;\n\n DocumentUploadRemoveActionEvent();\n }\n };\n\n /**\n * This watcher will wait for events from the halfsheet bridge info\n * and execute the mapped callback for the code provided.\n */\n MessageBusInternalService.addHubListenerWithEventFilter({\n channel: MessageBusEventChannel.INCOMING,\n filterByEvents: [MessageBusIncomingEventKey.HALF_SHEET],\n take: 1, //Note this is here to make sure we don't get more than one image selector shown\n callbackListener: (payload: HubPayload) => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const code = payload.data.body.code;\n\n if (code === 'documentUpload_NewPicture') {\n DocumentUploadCaptureHandler();\n } else if (code === 'documentUpload_ChoosePhoto') {\n DocumentUploadPickerHandler();\n } else if (code === 'documentUpload_DeleteFile') {\n DocumentUploadDeleteHandler();\n }\n },\n });\n};\n","export function getSymbolIterator() {\n if (typeof Symbol !== 'function' || !Symbol.iterator) {\n return '@@iterator';\n }\n return Symbol.iterator;\n}\nexport const iterator = getSymbolIterator();\n","import { Injectable } from '@angular/core';\nimport {\n AwsApiWrapperService,\n BsCacheService,\n BsHubService,\n} from '@brightside-web/desktop/data-access/core-services';\nimport { from, Observable } from 'rxjs';\nimport {map, switchMap} from 'rxjs/operators';\nimport {\n AnalyticsActions,\n Campaign,\n FirebaseService, Question,\n QuestionsSettings\n} from '@brightside-web/desktop/data-access/shared';\nimport {Router} from \"@angular/router\";\nimport {TranslateService} from \"@ngx-translate/core\";\n\nexport interface OnboardingFlowStep {\n type: OnboardingFlowStepType;\n details?: FlowStep;\n apiResponse?: OnboardingFlowResponse;\n}\n\nexport interface OnboardingFlowResponse {\n nextStep: { type: string };\n lastStep: boolean;\n template: OnboardingFlowTemplate;\n apiCall?: OnboardingApiCall;\n survey?: OnboardingSurvey;\n campaign?: OnboardingCampaign;\n faIntro?: OnboardingFaIntro;\n redirect?: OnboardingRedirect;\n isNavigation?: boolean;\n postOnboarding?: { endpoint?: string };\n}\n\nexport const getFlowStep = (flow:OnboardingFlowResponse, phase: string): FlowStep | null => {\n if ( phase === \"template\" ) {\n return flow.template || null;\n } else if ( phase === \"campaign\" ) {\n return flow.campaign || null;\n } else if ( phase === \"survey\" ) {\n return flow.survey || null;\n } else if ( phase === \"redirect\" ) {\n return flow.redirect || null;\n } else if ( phase === \"apiCall\" ) {\n return flow.apiCall || null;\n } else if ( phase === \"faIntro\" ) {\n return flow.faIntro || null;\n }\n\n\n return null;\n}\n\n\n\n\n// tslint:disable-next-line:no-empty-interface\nexport interface FlowStep {\n analytics: AnalyticsActions;\n}\n\nexport interface OnboardingFlowTemplate extends FlowStep {\n icon: string;\n title: string;\n textBody: string;\n cta: string;\n ctaPath: string;\n analyticsPage: string;\n}\n\nexport interface OnboardingApiCall extends FlowStep {\n endpoint?: string;\n}\n\nexport interface OnboardingSurvey extends FlowStep {\n type: any;\n canSkipQuestions?: boolean;\n questions: Question[];\n}\n\nexport class OnboardingSurveyStep implements FlowStep {\n type: any;\n canSkipQuestions?: boolean;\n questions: Question[];\n analytics: AnalyticsActions;\n questionSettings: QuestionsSettings;\n\n constructor(object:OnboardingSurvey, settings: QuestionsSettings) {\n this.type = object.type;\n this.analytics = object.analytics;\n this.canSkipQuestions = object.canSkipQuestions;\n this.questions = object.questions;\n this.questionSettings = settings;\n }\n\n}\n\ntype OnboardingSurveySettings = OnboardingSurvey & QuestionsSettings;\n\n/**\n * all of these interfaces are FlowSteps these will check and cast the object when they pass.\n *\n * @param object\n */\nexport const isAnOnboardingCampaign = (object: FlowStep): object is OnboardingCampaign => 'key' in object && 'ctaPath' in object && 'title' in object;\nexport const isAnOnboardingFaIntro = (object: FlowStep): object is OnboardingFaIntro => 'analytics' in object && 'endpoint' in object;\nexport const isAnOnboardingSurvey = (object: FlowStep): object is OnboardingSurvey => 'questions' in object && 'type' in object;\nexport const isAnOnboardingTemplate = (object: FlowStep): object is OnboardingFlowTemplate => 'title' in object && 'textBody' in object && !('key' in object);\nexport const isAnOnboardingRedirect = (object: FlowStep): object is OnboardingRedirect => 'path' in object;\nexport const isAnOnboardingApiCall = (object: FlowStep): object is OnboardingApiCall => 'endpoint' in object;\n\nexport interface OnboardingCampaign extends FlowStep, Campaign {\n closeable?:boolean;\n}\n\nexport interface OnboardingFaIntro extends FlowStep, Campaign {\n endpoint?:string;\n}\n\n\nexport interface OnboardingRedirect extends FlowStep {\n path: string;\n toast?: string;\n}\n\nexport const mapFlowStepFromString = (step: string) : OnboardingFlowStepType => {\n if ( step === \"apiCall\" ) {\n return OnboardingFlowStepType.API_CALL;\n }\n else if ( step === \"complete\" ) {\n return OnboardingFlowStepType.COMPLETE;\n }\n else if ( step === \"campaign\" ) {\n return OnboardingFlowStepType.CAMPAIGN;\n }\n else if ( step === \"redirect\" ) {\n return OnboardingFlowStepType.REDIRECT;\n }\n else if ( step === \"survey\" ) {\n return OnboardingFlowStepType.SURVEY;\n }\n else if ( step === \"faIntro\" ) {\n return OnboardingFlowStepType.FAINTRO;\n }\n else if ( step === \"unknown\" ) {\n return OnboardingFlowStepType.UNKNOWN;\n }\n else {\n return OnboardingFlowStepType.TEMPLATE;\n }\n}\n\nexport enum OnboardingFlowStepType {\n API_CALL = 'apiCall',\n COMPLETE = 'complete',\n CAMPAIGN = 'campaign',\n FAINTRO = 'faIntro',\n REDIRECT = 'redirect',\n SURVEY = 'survey',\n TEMPLATE = 'template',\n UNKNOWN = 'unknown'\n}\n\nexport enum CampaignEventStatus {\n SKIPPED = 'skipped',\n SUCCESS = 'success',\n FAILED = 'failed',\n NEUTRAL = 'neutral',\n}\n\n\nexport enum OnboardingFlowStepStatus {\n SKIPPED = 'skipped',\n SUCCESS = 'success',\n FAILED = 'failed',\n NEUTRAL = 'neutral',\n}\n\nexport const onboardingStatusFromCampaignStatus = (status: CampaignEventStatus): OnboardingFlowStepStatus => {\n switch(status) {\n case CampaignEventStatus.SKIPPED:\n return OnboardingFlowStepStatus.SKIPPED;\n case CampaignEventStatus.SUCCESS:\n return OnboardingFlowStepStatus.SUCCESS;\n case CampaignEventStatus.FAILED:\n return OnboardingFlowStepStatus.FAILED;\n case CampaignEventStatus.NEUTRAL:\n return OnboardingFlowStepStatus.NEUTRAL;\n }\n}\n\n\nexport enum OnboardingCampaignType {\n ONBOARDING_CREDIT = 'onboardingCredit',\n FA_SCHEDULE = 'faSchedule',\n UNKNOWN = 'unknown',\n}\n\n\n\n@Injectable({\n providedIn: 'root',\n})\nexport class FlowManagerService {\n private API_BASIC = 'api-mobile';\n private BASE_PATH = '/onboarding';\n\n static clearSuppressIntercom() {\n BsCacheService.removeItemStatic('HIDE_INTERCOM_FIRST_LOAD');\n }\n\n constructor(\n private analytics: FirebaseService,\n private router: Router,\n private translateSvc: TranslateService,\n private awsApiWrapperService: AwsApiWrapperService,\n private bsCacheService: BsCacheService,\n private bsHubService: BsHubService,) {}\n\n storeOnboardingResponse(response: OnboardingFlowResponse) {\n this.bsCacheService.setItem(\"ONBOARDING\",response);\n }\n\n fetchOnboardingResponse(): Promise<OnboardingFlowResponse> {\n return this.bsCacheService.getItem(\"ONBOARDING\") as Promise<OnboardingFlowResponse>;\n }\n\n onboardingAlreadyActive() : Promise<boolean> {\n return this.bsCacheService.getItem(\"ONBOARDING_FLOW_ACTIVE\") as Promise<boolean> || Promise.resolve(false);\n }\n\n enterOnboarding() {\n this.bsCacheService.setItem('ONBOARDING_FLOW_ACTIVE', true);\n this.bsCacheService.setItem('ONBOARDING_ENDPOINT', '');\n }\n\n exitOnboarding() {\n this.bsCacheService.removeItem('ONBOARDING_FLOW_ACTIVE');\n this.bsCacheService.removeItem('ONBOARDING_ENDPOINT');\n this.bsCacheService.removeItem('ONBOARDING');\n }\n\n private async storePostOnboarding(postEndpoint: string) {\n this.bsCacheService.setItem('ONBOARDING_ENDPOINT', postEndpoint);\n // This should be removed the first time the feed is loaded after this.\n await this.bsCacheService.setItem('HIDE_INTERCOM_FIRST_LOAD',false);\n }\n\n private async clearPostOnboarding() {\n this.bsCacheService.removeItem('ONBOARDING_ENDPOINT');\n // This should be removed the first time the feed is loaded after this.\n await this.bsCacheService.setItem('HIDE_INTERCOM_FIRST_LOAD',true);\n }\n\n buildStepDetails(flowStep: FlowStep): FlowStep {\n if ( isAnOnboardingCampaign(flowStep)) {\n return flowStep;\n }\n else if ( isAnOnboardingSurvey(flowStep) ) {\n return this.buildStepSurvey(flowStep);\n }\n else if ( isAnOnboardingRedirect(flowStep)) {\n return flowStep;\n }\n else if ( isAnOnboardingTemplate(flowStep)) {\n // TODO: ken check this\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return this.buildStepTemplate(flowStep);\n }\n else if ( isAnOnboardingFaIntro(flowStep)) {\n return flowStep;\n }\n /**\n * if this happens the onboarding flow was setup wrong. please look into the onboarding json response. if nextStep.type == \"survey\" it has to include a survey object.\n *\n */\n this.analytics.logEvent(\"error_shown\", { 'error id': \"invalid_onboarding_flow\"});\n throw new Error(this.translateSvc.instant('ERROR_TITLE_GENERAL'));\n }\n\n private buildStepSurvey(survey: OnboardingSurvey): OnboardingSurveyStep {\n\n //this is nested into the survey step object.\n const questionSettings = new QuestionsSettings({\n pageTitle: '',\n pageSubTitle: '',\n pageCtaLabel: 'BUTTON_CONTINUE',\n pageSecondaryCtaLabel: survey.canSkipQuestions ? 'BUTTON_SKIP' : '',\n\n pageOnForwardCtaPath: [],\n\n questions: survey.questions || [],\n surveyType: survey.type || '',\n fbPage: 'onboarding',\n fbCategory: 'survey',\n fbSubCategory: '',\n });\n\n return new OnboardingSurveyStep(survey,questionSettings);\n }\n\n /**\n * This is in the hopes that Desktop will support template pages one day..\n *\n * @param template\n * @private\n */\n private buildStepTemplate(template: OnboardingFlowTemplate) {\n return {\n analytics: template.analytics,\n pageTitle: template.title || '',\n pageSubTitle: template.textBody || '',\n pageCtaLabel: template.cta || 'Continue',\n pageSecondaryCtaLabel: '',\n\n pageOnForwardCtaPath: [],\n\n fbPage: '',\n fbCategory: '',\n };\n }\n\n private executeGet(): Observable<any> {\n this.bsCacheService.removeItem('onboardingError');\n return from(this.awsApiWrapperService.get(this.API_BASIC, this.BASE_PATH, {}).catch(err => {\n this.bsHubService.dispatch('OnboardingChannel', { event: 'OnboardingComplete', message: '' });\n this.bsCacheService.setItem('onboardingError', true);\n this.router.navigateByUrl('/home');\n }));\n }\n\n private executePost(body: any): Observable<any> {\n return from(this.awsApiWrapperService.post(this.API_BASIC, this.BASE_PATH, { body }));\n }\n\n private executePut(status: string): Observable<any> {\n return from(this.awsApiWrapperService.put(this.API_BASIC, `${this.BASE_PATH}?status=${status}`, {}));\n }\n\n UpdateOwner() : Observable<any> {\n return from(this.awsApiWrapperService.post('api-mobile', '/client/event', { body: { type: 'UpdateOwner' } }));\n }\n\n getCurrent(): Observable<OnboardingFlowResponse> {\n return this.executeGet();\n }\n\n updateWithPost(payload: any): Observable<any> {\n return this.executePost(payload);\n }\n\n updateWithPut(status: string): Observable<any> {\n return this.executePut(status);\n }\n\n //These methods are not straight-forward as they manage any automatic skipping/non-supported responses\n getNextValidStep(): Observable<OnboardingFlowStep> {\n return this.getCurrent().pipe(\n switchMap(async (flowResp) => {\n\n //Check for null or otherwise complete\n if (!flowResp) {\n return null;\n }\n\n this.storeOnboardingResponse(flowResp);\n\n if (flowResp.postOnboarding && flowResp.postOnboarding.endpoint) {\n await this.storePostOnboarding(flowResp.postOnboarding.endpoint);\n }\n else {\n // if it comes down non existent in the last step, we shouldn't do this thing.\n // honestly this postOnboarding only applies to the last step..\n await this.clearPostOnboarding();\n }\n\n return flowResp;\n }),\n map((flowResp) => {\n //Check for null or otherwise complete\n if (!flowResp) {\n return { type: OnboardingFlowStepType.COMPLETE };\n }\n\n const type:OnboardingFlowStepType = mapFlowStepFromString(flowResp.nextStep.type);\n\n const flowStep = getFlowStep(flowResp,flowResp.nextStep.type);\n\n if (!flowStep) {\n\n throw new Error(`Error in onboarding step!`);\n }\n\n if (flowResp.campaign?.key === OnboardingCampaignType.ONBOARDING_CREDIT) {\n flowResp.campaign = {\n ...flowResp.campaign,\n key: flowResp.campaign?.key || '',\n analytics: flowResp.campaign?.analytics as AnalyticsActions,\n ctaPath: 'credit-setup/consents',\n titleKey: 'CREDIT_INTRO_TITLE',\n image: 'credit_hero',\n textBodyKey: 'CREDIT_INTRO_DESC',\n textBodyAlign: 'left',\n textBodyNoWrap: true,\n cta: 'GET_STARTED',\n isCreditIntro: true,\n }\n }\n\n return { type, details: this.buildStepDetails(flowStep), apiResponse: flowResp };\n })\n );\n }\n\n getFAIntroFlow() : OnboardingFaIntro[] {\n return [\n {\n ctaKey: 'BUTTON_CONTINUE',\n image: 'fa_intro_1',\n ctaPath: 'forward',\n key: 'fa_intro_1',\n titleKey: 'FA_INTRO_TITLE1',\n textBodyKey: 'FA_INTRO_DESC1',\n textBodyAlign: 'left',\n textBodyNoWrap: true,\n analytics: {}\n },\n {\n ctaKey: 'BUTTON_CONTINUE',\n image: 'fa_intro_2',\n ctaPath: 'forward',\n secondaryCtaPath: 'back',\n key: 'fa_intro_2',\n titleKey: 'FA_INTRO_TITLE2',\n textBodyKey: 'FA_INTRO_DESC2',\n analytics: {}\n },\n {\n ctaKey: 'I_AM_READY',\n image: 'fa_intro_3',\n ctaPath: 'complete',\n secondaryCtaPath: 'BACK_WEB',\n key: 'fa_intro_3',\n titleKey: 'FA_INTRO_TITLE3',\n textBodyKey: 'FA_INTRO_DESC3',\n analytics: {}\n }\n ];\n }\n\n}\n","import { Injectable } from '@angular/core';\nimport {\n AwsApiWrapperService,\n BsCacheService,\n} from '@brightside-web/desktop/data-access/core-services';\nimport { from, Observable } from 'rxjs';\nimport {ApiResponse} from '@brightside-web/desktop/data-access/shared';\nimport { ListData } from '@brightside/brightside-ui';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class RegistrationService {\n\n referralItems : {[p:string]: string} = {};\n skipAccountCreation = false;\n\n constructor(\n private awsApiWrapperService: AwsApiWrapperService,\n private bsCacheService: BsCacheService,\n ) {\n this.unpackSkipCreationReferral();\n }\n\n static clearOnboardingCache() {\n BsCacheService.removeItemStatic('firstName');\n BsCacheService.removeItemStatic('lastName');\n BsCacheService.removeItemStatic('last4ssn');\n BsCacheService.removeItemStatic('email');\n BsCacheService.removeItemStatic('dob');\n BsCacheService.removeItemStatic('create-account');\n BsCacheService.removeItemStatic('phoneNumber');\n BsCacheService.removeItemStatic('recoveryToken');\n BsCacheService.removeItemStatic('flow');\n\n //We need to clear mobile cache so the cards will adjust as needed\n BsCacheService.removeItemStatic('/client/mobilestate');\n }\n\n\n storeReferralToSession() {\n window.sessionStorage.setItem('skipCreationReferral', JSON.stringify(this.referralItems));\n }\n\n unpackSkipCreationReferral() {\n const referralSessionInfo = window.sessionStorage.getItem('skipCreationReferral');\n if (referralSessionInfo) {\n this.referralItems = JSON.parse(referralSessionInfo);\n this.skipAccountCreation = true;\n }\n }\n\n clearReferralItems() {\n this.referralItems = {};\n this.skipAccountCreation = false;\n window.sessionStorage.removeItem('skipCreationReferral')\n }\n\n createAccountForSSO(body: CreateAccountSSORequest): Observable<CreateAccountSSOResponse> {\n return this.callPostClientAccount(body);\n }\n\n submitAccountCode(body: SubmitAccountCodeRequest): Observable<CreateAccountSSOResponse> {\n return this.callPostClientAccount(body);\n }\n\n private callPostClientAccount(body: CreateAccountSSORequest | SubmitAccountCodeRequest): Observable<CreateAccountSSOResponse> {\n return from(this.awsApiWrapperService.post('api-mobile', '/client/account', { body }));\n }\n\n newRegistrationPrecheck(payload: NewPrecheckPayload): Observable<PrecheckResponse> {\n return from(this.awsApiWrapperService.post('api-mobile-noauth', '/client/precheck', { body: payload }));\n }\n\n forgotPasswordPrecheck(payload: ForgotPrecheckPayload, isRegistration?: boolean): Observable<ForgotPasswordResponse> {\n return from(this.awsApiWrapperService.post(isRegistration ? 'api-mobile-noauth' : 'api-mobile', '/client/forgot', { body: payload }));\n }\n\n changeNumber(payload: ChangeNumberPayload): Observable<ApiResponse> {\n return from(this.awsApiWrapperService.patch('api-mobile', '/client/username', { body: { ...payload, devicePushId: '' } }));\n }\n\n companyList(): Observable<ListData[]> {\n return from(this.awsApiWrapperService.get('api-mobile-noauth', '/cdn-resource/resources/companies.json', { body: null }));\n }\n\n postOnboarding(endPoint: string = '') {\n return this.awsApiWrapperService.post('api-mobile', endPoint, {});\n }\n\n postProvisional(payload?: {}, version?: string): Observable<ArgyleApiResponse> {\n const path = version ? `/provisional?apiVersion=${version}` : `/provisional`;\n return from(this.awsApiWrapperService.post('api-mobile', path, { body: { ...payload } }));\n }\n\n // patchProvisional(payload: ArgylePatchProvisionalPayload): Observable<ArgyleApiResponse> {\n // return from(API.patch('api-mobile-noauth', '/provisional', { body: { ...payload } }));\n // }\n\n public submitEmployeeAliasPrecheck(\n payload:string, workstate?:string,\n zipCode?:string, lName?:string\n ):Observable<ApiResponse> {\n if (workstate) {\n return from(this.awsApiWrapperService.post('api-mobile','/client/employment/precheck',{body: {unique_id: payload, work_state: workstate, lastName:lName,zip_code: zipCode}}));\n } else {\n return from(this.awsApiWrapperService.post('api-mobile','/client/employment/precheck',{body: {unique_id: payload}}));\n }\n }\n\n submitEmployeeAlias(payload:string):Observable<ApiResponse> {\n return from(this.awsApiWrapperService.put('api-mobile', '/client', {body: {employee_alias: payload}}));\n }\n\n public submitHomeAddress(payload:HomeAddressPayload):Observable<ApiResponse>{\n return from(this.awsApiWrapperService.put('api-mobile','/client',{body: payload}));\n }\n\n public submitClientUpdate(payload:{ [key: string]: string }):Observable<ApiResponse>{\n if (payload.ssn){\n payload.ssn = payload.ssn.replace(/[^0-9]/gi, '');\n }\n return from(this.awsApiWrapperService.put('api-mobile','/client',{body: payload}));\n }\n\n}\n\nexport interface EmployeeAliasPayload {\n employee_alias: string;\n}\n\nexport interface HomeAddressPayload {\n address1: string;\n address2?: string;\n city: string;\n state: string;\n zip_code: string;\n}\n\nexport interface ArgyleApiResponse {\n prov_guid: string;\n type: string;\n status: string;\n argyle: {\n config: {\n [key: string]: string;\n plugin_key: string;\n api_host: string;\n };\n intro: {\n title: string;\n subtitle: string;\n };\n };\n}\n\nexport interface CreateAccountSSORequest {\n username: string;\n password: string;\n}\n\nexport interface CreateAccountSSOResponse extends ApiResponse {\n code: number;\n}\n\nexport interface SubmitAccountCodeRequest {\n username: string;\n code: string;\n}\n\nexport interface ForgotPrecheckPayload {\n last_name: string;\n last_four_ssn: string;\n date_of_birth?: string;\n}\n\nexport interface NewPrecheckPayload extends ForgotPrecheckPayload {\n first_name: string;\n}\n\nexport enum ClientType {\n Primary = 'primary',\n Dependent = 'dependent',\n}\n\nexport interface PrecheckResponse extends ApiResponse {\n company: string;\n clientType: ClientType;\n}\n\nexport interface ForgotPasswordResponse {\n phoneNumber: string;\n phoneVerified: boolean;\n email: string;\n emailVerified: boolean;\n recoveryToken: string;\n}\n\nexport interface ChangeNumberPayload {\n newUsername: string;\n username: string;\n recoveryToken?: string | null;\n password: string;\n}\n\nexport interface ReferralParamsInterface {\n referrerType?: string;\n firstName?: string;\n clientType?: string;\n company?: string;\n}\n","//! moment.js locale configuration\n//! locale : Kannada [kn]\n//! author : Rajeev Naik : https://github.com/rajeevnaikte\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '೧',\n 2: '೨',\n 3: '೩',\n 4: '೪',\n 5: '೫',\n 6: '೬',\n 7: '೭',\n 8: '೮',\n 9: '೯',\n 0: '೦',\n },\n numberMap = {\n '೧': '1',\n '೨': '2',\n '೩': '3',\n '೪': '4',\n '೫': '5',\n '೬': '6',\n '೭': '7',\n '೮': '8',\n '೯': '9',\n '೦': '0',\n };\n\n var kn = moment.defineLocale('kn', {\n months: 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split(\n '_'\n ),\n monthsShort:\n 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split(\n '_'\n ),\n weekdaysShort: 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'),\n weekdaysMin: 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm',\n LTS: 'A h:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm',\n LLLL: 'dddd, D MMMM YYYY, A h:mm',\n },\n calendar: {\n sameDay: '[ಇಂದು] LT',\n nextDay: '[ನಾಳೆ] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[ನಿನ್ನೆ] LT',\n lastWeek: '[ಕೊನೆಯ] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s ನಂತರ',\n past: '%s ಹಿಂದೆ',\n s: 'ಕೆಲವು ಕ್ಷಣಗಳು',\n ss: '%d ಸೆಕೆಂಡುಗಳು',\n m: 'ಒಂದು ನಿಮಿಷ',\n mm: '%d ನಿಮಿಷ',\n h: 'ಒಂದು ಗಂಟೆ',\n hh: '%d ಗಂಟೆ',\n d: 'ಒಂದು ದಿನ',\n dd: '%d ದಿನ',\n M: 'ಒಂದು ತಿಂಗಳು',\n MM: '%d ತಿಂಗಳು',\n y: 'ಒಂದು ವರ್ಷ',\n yy: '%d ವರ್ಷ',\n },\n preparse: function (string) {\n return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'ರಾತ್ರಿ') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') {\n return hour;\n } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'ಸಂಜೆ') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'ರಾತ್ರಿ';\n } else if (hour < 10) {\n return 'ಬೆಳಿಗ್ಗೆ';\n } else if (hour < 17) {\n return 'ಮಧ್ಯಾಹ್ನ';\n } else if (hour < 20) {\n return 'ಸಂಜೆ';\n } else {\n return 'ರಾತ್ರಿ';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ನೇ)/,\n ordinal: function (number) {\n return number + 'ನೇ';\n },\n week: {\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 });\n\n return kn;\n\n})));\n","import { Component, OnInit, ViewChild, ElementRef, AfterViewInit, Input, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'bw-action-article',\n templateUrl: './action-article.component.html',\n styleUrls: ['./action-article.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class ActionArticleComponent implements AfterViewInit {\n @Input() hideFooter: boolean;\n @Input() pinnedFooter = true;\n @Input() minHeight = 576;\n @Input() maxWidth = '100%';\n @Input() edgeToEdge = false;\n @Input() centeredFooter = false;\n\n @ViewChild('footer_wrapper', { static: true }) footerWrapper: ElementRef;\n\n ngAfterViewInit() {\n const footerEl = this.footerWrapper.nativeElement;\n const footerActionsContainer = footerEl.querySelector('div[footer-actions]');\n const primaryCTA = footerEl.querySelector('button[bw-button]');\n const actionCount =\n footerEl.querySelectorAll('button[bw-button]').length + footerEl.querySelectorAll('button[bw-link-button]').length;\n const footerWidth = footerEl.offsetWidth;\n const footerBackButton = footerEl.querySelector('bw-back');\n\n if (footerBackButton) {\n console.log('NOTE: footerBackButton exists so we do not want centeredFooter to be true');\n this.centeredFooter = false;\n }\n\n // Look for only one cta, then if it has a button and the width of the parent container is 320px or less, make the button fluid width\n if (footerEl && footerActionsContainer && footerWidth <= 320 && actionCount === 1 && primaryCTA) {\n footerActionsContainer.classList.add('full-width');\n primaryCTA.classList.add('fluid-width');\n }\n }\n}\n","<article class=\"action-article\"\n [ngStyle]=\"{'min-height.px': minHeight, 'max-width': maxWidth}\"\n [ngClass]=\"{'edge-to-edge': edgeToEdge}\">\n <header class=\"action-header\">\n <div class=\"header-actions-container\">\n <ng-content select=\"[back-action-top]\"></ng-content>\n <ng-content select=\"[header-actions]\"></ng-content>\n </div>\n <ng-content select=\"[pre-title]\"></ng-content>\n <ng-content select=\"[header-title]\"></ng-content>\n </header>\n <section class=\"action-content\">\n <ng-content select=\"[content-section]\"></ng-content>\n </section>\n <footer class=\"action-footer\" [ngClass]=\"{'hidden-footer': hideFooter, 'bottom-pinned': pinnedFooter, 'centered-footer': centeredFooter}\">\n <ng-content select=\"[footer-top]\"></ng-content>\n <div #footer_wrapper class=\"footer-actions-container\">\n <ng-content select=\"[footer-actions]\"></ng-content>\n <ng-content select=\"[back-action-bottom]\"></ng-content>\n </div>\n </footer>\n</article>\n","<div #cellContainer class=\"cell-container\" (click)=\"cellClicked()\" [ngClass]=\"{ clickable: _isClickable && !disabled }\">\n <div class=\"cell-inner-container\">\n <div class=\"inner-left\">\n <!-- TODO CE-6454 maybe there's a cleaner way to pick icons -->\n <i [ngClass]=\"'pi ' + iconNameLeft\" *ngIf=\"iconNameLeft && iconNameLeft.startsWith('pi-')\"></i>\n <div class=\"logo\" *ngIf=\"iconNameLeft && iconNameLeft.startsWith('http')\">\n <img [attr.src]=\"iconNameLeft\" alt=\"logo\" />\n </div>\n <bw-icon\n *ngIf=\"iconNameLeft && !iconNameLeft.startsWith('pi-') && !iconNameLeft.startsWith('http')\"\n [iconName]=\"iconNameLeft\"\n [size]=\"iconLeftSize\"\n [horizontalSpace]=\"'mr-sm'\"\n [color]=\"iconLeftColor\"\n ></bw-icon>\n <div class=\"cell-label-container\" *ngIf=\"labelLeft || labelSubLeft\" [ngClass]=\"{ 'flip-labels': flipLeftLabels }\">\n <p\n *ngIf=\"labelLeft\"\n text-large-semibold\n class=\"truncate-line\"\n [ngClass]=\"{ 'label--disabled': disabled }\"\n [mwTextColor]=\"'var(' + leftLabelColor + ')'\"\n >\n {{ labelLeft }}\n </p>\n <p\n *ngIf=\"labelSubLeft\"\n text-small-regular\n class=\"truncate-line\"\n [ngClass]=\"{ 'label--disabled': disabled }\"\n [mwTextColor]=\"'var(' + leftSubLabelColor + ')'\"\n >\n {{ labelSubLeft }}\n </p>\n </div>\n <div class=\"cell-label-container\" *ngIf=\"contentLeft || contentSubLeft\">\n <ng-content *ngIf=\"contentLeft\" select=\"[content-left]\"></ng-content>\n <ng-content *ngIf=\"contentSubLeft\" select=\"[content-sub-left]\"></ng-content>\n </div>\n <div class=\"cell-label-container\" *ngIf=\"singleLeftLabel\">\n <p text-large-regular class=\"truncate-line\" [mwTextColor]=\"'var(' + leftLabelColor + ')'\">{{ singleLeftLabel }}</p>\n </div>\n </div>\n <div\n class=\"inner-right\"\n *ngIf=\"contentRight || labelRight || labelSubRight || iconNameRight || showToggleControl || showToggleSwitch\"\n >\n <div class=\"cell-label-container pull-right\">\n <p *ngIf=\"!showToggleControl && labelRight\" text-large-regular [mwTextColor]=\"'var(' + rightLabelColor + ')'\">\n {{ labelRight }}\n </p>\n <p *ngIf=\"!showToggleControl && labelSubRight\" text-small-regular>{{ labelSubRight }}</p>\n <bw-checkbox *ngIf=\"showToggleControl\" [disabled]=\"disabled\"></bw-checkbox>\n <ng-content *ngIf=\"contentRight\" select=\"[content-right]\"></ng-content>\n <ui-switch\n *ngIf=\"showToggleSwitch\"\n color=\"var(--brand)\"\n (change)=\"onSwitchChange($event)\"\n [checked]=\"switchChecked\"\n ></ui-switch>\n </div>\n <div style=\"margin-top: 8px\">\n <i [ngClass]=\"'pi ' + iconNameRight\" *ngIf=\"iconNameRight && iconNameRight.startsWith('pi-')\"></i>\n <bw-icon\n *ngIf=\"iconNameRight && !iconNameRight.startsWith('pi-')\"\n [iconName]=\"iconNameRight\"\n [horizontalSpace]=\"'mr-xxs ' + iconRightMargin\"\n [color]=\"disabled? 'var(--gray-30)': ''\"\n size=\"24\"\n ></bw-icon>\n </div>\n </div>\n </div>\n\n <hr class=\"cell-bottom-bar\" [ngClass]=\"getSeparatorClassName()\" />\n</div>\n","import { Component, OnInit, Output, Input, ViewEncapsulation, AfterViewInit, ViewChild, ElementRef, Renderer2 } from '@angular/core';\nimport { EventEmitter } from '@angular/core';\n\nexport enum CellSeparatorType {\n None = 'none',\n Full = 'full',\n Offset = 'offset',\n Center = 'center',\n}\n\n@Component({\n selector: 'bw-cell',\n templateUrl: './cell.component.html',\n styleUrls: ['./cell.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class CellComponent implements OnInit, AfterViewInit {\n /**\n * default, but overridable. Only used for single text variants, or the top label.\n */\n @Input() leftLabelColor = '--primary-text';\n @Input() leftSubLabelColor = '--secondary-text';\n @Input() rightLabelColor = '--primary-text';\n\n @Input() iconNameLeft = '';\n @Input() labelLeft: string|number = '';\n @Input() labelSubLeft = '';\n @Input() singleLeftLabel = '';\n @Input() flipLeftLabels: boolean;\n @Input() contentLeft: boolean;\n @Input() contentRight: boolean;\n @Input() contentSubLeft: boolean;\n @Input() iconNameRight = ''; //chevron_right\n @Input() iconRightMargin = '';\n @Input() labelRight = '';\n @Input() labelSubRight = '';\n\n @Input() showToggleControl = false;\n @Input() showToggleSwitch = false;\n @Input() switchChecked = false;\n @Input() separatorType: CellSeparatorType = CellSeparatorType.Full;\n\n @Output() clicked = new EventEmitter();\n @Output() switchToggled = new EventEmitter<boolean>();\n _isClickable = false;\n\n @ViewChild('cellContainer') cellContainer: ElementRef;\n @Input() iconLeftSize = 24;\n @Input() iconLeftColor: string;\n @Input() disabled = false;\n\n\n\n constructor(private renderer: Renderer2, private el: ElementRef) {}\n\n ngOnInit() { \n this._isClickable = this.clicked.observers.length > 0;\n }\n\n ngAfterViewInit() {\n if (this._isClickable) {\n this.renderer.setAttribute(this.cellContainer.nativeElement, 'tabindex', '0');\n }\n }\n\n cellClicked() {\n this.clicked.emit();\n }\n\n getSeparatorClassName() {\n if (this.separatorType === CellSeparatorType.None) {\n return 'hidden';\n }\n\n if (this.separatorType === CellSeparatorType.Offset) {\n return 'offset-left';\n }\n\n if (this.separatorType === CellSeparatorType.Center) {\n return 'offset-left offset-right';\n }\n\n return '';\n }\n\n onSwitchChange($event: boolean) {\n this.switchToggled.emit($event);\n }\n}\n","export function identity(x) {\n return x;\n}\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar LogType;\n(function (LogType) {\n LogType[\"DEBUG\"] = \"DEBUG\";\n LogType[\"ERROR\"] = \"ERROR\";\n LogType[\"INFO\"] = \"INFO\";\n LogType[\"WARN\"] = \"WARN\";\n LogType[\"VERBOSE\"] = \"VERBOSE\";\n LogType[\"NONE\"] = \"NONE\";\n})(LogType || (LogType = {}));\n\nexport { LogType };\n","import { AWS_CLOUDWATCH_CATEGORY } from '../constants.mjs';\nimport { LogType } from './types.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst LOG_LEVELS = {\n VERBOSE: 1,\n DEBUG: 2,\n INFO: 3,\n WARN: 4,\n ERROR: 5,\n NONE: 6,\n};\n/**\n * Write logs\n * @class Logger\n */\nclass ConsoleLogger {\n /**\n * @constructor\n * @param {string} name - Name of the logger\n */\n constructor(name, level = LogType.WARN) {\n this.name = name;\n this.level = level;\n this._pluggables = [];\n }\n _padding(n) {\n return n < 10 ? '0' + n : '' + n;\n }\n _ts() {\n const dt = new Date();\n return ([this._padding(dt.getMinutes()), this._padding(dt.getSeconds())].join(':') +\n '.' +\n dt.getMilliseconds());\n }\n configure(config) {\n if (!config)\n return this._config;\n this._config = config;\n return this._config;\n }\n /**\n * Write log\n * @method\n * @memeberof Logger\n * @param {LogType|string} type - log type, default INFO\n * @param {string|object} msg - Logging message or object\n */\n _log(type, ...msg) {\n let loggerLevelName = this.level;\n if (ConsoleLogger.LOG_LEVEL) {\n loggerLevelName = ConsoleLogger.LOG_LEVEL;\n }\n if (typeof window !== 'undefined' && window.LOG_LEVEL) {\n loggerLevelName = window.LOG_LEVEL;\n }\n const loggerLevel = LOG_LEVELS[loggerLevelName];\n const typeLevel = LOG_LEVELS[type];\n if (!(typeLevel >= loggerLevel)) {\n // Do nothing if type is not greater than or equal to logger level (handle undefined)\n return;\n }\n let log = console.log.bind(console);\n if (type === LogType.ERROR && console.error) {\n log = console.error.bind(console);\n }\n if (type === LogType.WARN && console.warn) {\n log = console.warn.bind(console);\n }\n if (ConsoleLogger.BIND_ALL_LOG_LEVELS) {\n if (type === LogType.INFO && console.info) {\n log = console.info.bind(console);\n }\n if (type === LogType.DEBUG && console.debug) {\n log = console.debug.bind(console);\n }\n }\n const prefix = `[${type}] ${this._ts()} ${this.name}`;\n let message = '';\n if (msg.length === 1 && typeof msg[0] === 'string') {\n message = `${prefix} - ${msg[0]}`;\n log(message);\n }\n else if (msg.length === 1) {\n message = `${prefix} ${msg[0]}`;\n log(prefix, msg[0]);\n }\n else if (typeof msg[0] === 'string') {\n let obj = msg.slice(1);\n if (obj.length === 1) {\n obj = obj[0];\n }\n message = `${prefix} - ${msg[0]} ${obj}`;\n log(`${prefix} - ${msg[0]}`, obj);\n }\n else {\n message = `${prefix} ${msg}`;\n log(prefix, msg);\n }\n for (const plugin of this._pluggables) {\n const logEvent = { message, timestamp: Date.now() };\n plugin.pushLogs([logEvent]);\n }\n }\n /**\n * Write General log. Default to INFO\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n log(...msg) {\n this._log(LogType.INFO, ...msg);\n }\n /**\n * Write INFO log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n info(...msg) {\n this._log(LogType.INFO, ...msg);\n }\n /**\n * Write WARN log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n warn(...msg) {\n this._log(LogType.WARN, ...msg);\n }\n /**\n * Write ERROR log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n error(...msg) {\n this._log(LogType.ERROR, ...msg);\n }\n /**\n * Write DEBUG log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n debug(...msg) {\n this._log(LogType.DEBUG, ...msg);\n }\n /**\n * Write VERBOSE log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n verbose(...msg) {\n this._log(LogType.VERBOSE, ...msg);\n }\n addPluggable(pluggable) {\n if (pluggable && pluggable.getCategoryName() === AWS_CLOUDWATCH_CATEGORY) {\n this._pluggables.push(pluggable);\n pluggable.configure(this._config);\n }\n }\n listPluggables() {\n return this._pluggables;\n }\n}\nConsoleLogger.LOG_LEVEL = null;\nConsoleLogger.BIND_ALL_LOG_LEVELS = false;\n\nexport { ConsoleLogger };\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar binarySearch = require('./binary-search');\nvar ArraySet = require('./array-set').ArraySet;\nvar base64VLQ = require('./base64-vlq');\nvar quickSort = require('./quick-sort').quickSort;\n\nfunction SourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n return sourceMap.sections != null\n ? new IndexedSourceMapConsumer(sourceMap)\n : new BasicSourceMapConsumer(sourceMap);\n}\n\nSourceMapConsumer.fromSourceMap = function(aSourceMap) {\n return BasicSourceMapConsumer.fromSourceMap(aSourceMap);\n}\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nSourceMapConsumer.prototype._version = 3;\n\n// `__generatedMappings` and `__originalMappings` are arrays that hold the\n// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n// are lazily instantiated, accessed via the `_generatedMappings` and\n// `_originalMappings` getters respectively, and we only parse the mappings\n// and create these arrays once queried for a source location. We jump through\n// these hoops because there can be many thousands of mappings, and parsing\n// them is expensive, so we only want to do it if we must.\n//\n// Each object in the arrays is of the form:\n//\n// {\n// generatedLine: The line number in the generated code,\n// generatedColumn: The column number in the generated code,\n// source: The path to the original source file that generated this\n// chunk of code,\n// originalLine: The line number in the original source that\n// corresponds to this chunk of generated code,\n// originalColumn: The column number in the original source that\n// corresponds to this chunk of generated code,\n// name: The name of the original symbol which generated this chunk of\n// code.\n// }\n//\n// All properties except for `generatedLine` and `generatedColumn` can be\n// `null`.\n//\n// `_generatedMappings` is ordered by the generated positions.\n//\n// `_originalMappings` is ordered by the original positions.\n\nSourceMapConsumer.prototype.__generatedMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n get: function () {\n if (!this.__generatedMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__generatedMappings;\n }\n});\n\nSourceMapConsumer.prototype.__originalMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n get: function () {\n if (!this.__originalMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__originalMappings;\n }\n});\n\nSourceMapConsumer.prototype._charIsMappingSeparator =\n function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n var c = aStr.charAt(index);\n return c === \";\" || c === \",\";\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n throw new Error(\"Subclasses must implement _parseMappings\");\n };\n\nSourceMapConsumer.GENERATED_ORDER = 1;\nSourceMapConsumer.ORIGINAL_ORDER = 2;\n\nSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\nSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\n/**\n * Iterate over each mapping between an original source/line/column and a\n * generated line/column in this source map.\n *\n * @param Function aCallback\n * The function that is called with each mapping.\n * @param Object aContext\n * Optional. If specified, this object will be the value of `this` every\n * time that `aCallback` is called.\n * @param aOrder\n * Either `SourceMapConsumer.GENERATED_ORDER` or\n * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n * iterate over the mappings sorted by the generated file's line/column\n * order or the original's source/line/column order, respectively. Defaults to\n * `SourceMapConsumer.GENERATED_ORDER`.\n */\nSourceMapConsumer.prototype.eachMapping =\n function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n var context = aContext || null;\n var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\n var mappings;\n switch (order) {\n case SourceMapConsumer.GENERATED_ORDER:\n mappings = this._generatedMappings;\n break;\n case SourceMapConsumer.ORIGINAL_ORDER:\n mappings = this._originalMappings;\n break;\n default:\n throw new Error(\"Unknown order of iteration.\");\n }\n\n var sourceRoot = this.sourceRoot;\n mappings.map(function (mapping) {\n var source = mapping.source === null ? null : this._sources.at(mapping.source);\n if (source != null && sourceRoot != null) {\n source = util.join(sourceRoot, source);\n }\n return {\n source: source,\n generatedLine: mapping.generatedLine,\n generatedColumn: mapping.generatedColumn,\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: mapping.name === null ? null : this._names.at(mapping.name)\n };\n }, this).forEach(aCallback, context);\n };\n\n/**\n * Returns all generated line and column information for the original source,\n * line, and column provided. If no column is provided, returns all mappings\n * corresponding to a either the line we are searching for or the next\n * closest line that has any mappings. Otherwise, returns all mappings\n * corresponding to the given line and either the column we are searching for\n * or the next closest column that has any offsets.\n *\n * The only argument is an object with the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: Optional. the column number in the original source.\n *\n * and an array of objects is returned, each with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nSourceMapConsumer.prototype.allGeneratedPositionsFor =\n function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n var line = util.getArg(aArgs, 'line');\n\n // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n // returns the index of the closest mapping less than the needle. By\n // setting needle.originalColumn to 0, we thus find the last mapping for\n // the given line, provided such a mapping exists.\n var needle = {\n source: util.getArg(aArgs, 'source'),\n originalLine: line,\n originalColumn: util.getArg(aArgs, 'column', 0)\n };\n\n if (this.sourceRoot != null) {\n needle.source = util.relative(this.sourceRoot, needle.source);\n }\n if (!this._sources.has(needle.source)) {\n return [];\n }\n needle.source = this._sources.indexOf(needle.source);\n\n var mappings = [];\n\n var index = this._findMapping(needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n binarySearch.LEAST_UPPER_BOUND);\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (aArgs.column === undefined) {\n var originalLine = mapping.originalLine;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we found. Since\n // mappings are sorted, this is guaranteed to find all mappings for\n // the line we found.\n while (mapping && mapping.originalLine === originalLine) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n } else {\n var originalColumn = mapping.originalColumn;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we were searching for.\n // Since mappings are sorted, this is guaranteed to find all mappings for\n // the line we are searching for.\n while (mapping &&\n mapping.originalLine === line &&\n mapping.originalColumn == originalColumn) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n }\n }\n\n return mappings;\n };\n\nexports.SourceMapConsumer = SourceMapConsumer;\n\n/**\n * A BasicSourceMapConsumer instance represents a parsed source map which we can\n * query for information about the original file positions by giving it a file\n * position in the generated source.\n *\n * The only parameter is the raw source map (either as a JSON string, or\n * already parsed to an object). According to the spec, source maps have the\n * following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - sources: An array of URLs to the original source files.\n * - names: An array of identifiers which can be referrenced by individual mappings.\n * - sourceRoot: Optional. The URL root from which all sources are relative.\n * - sourcesContent: Optional. An array of contents of the original source files.\n * - mappings: A string of base64 VLQs which contain the actual mappings.\n * - file: Optional. The generated file this source map is associated with.\n *\n * Here is an example source map, taken from the source map spec[0]:\n *\n * {\n * version : 3,\n * file: \"out.js\",\n * sourceRoot : \"\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AA,AB;;ABCDE;\"\n * }\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n */\nfunction BasicSourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sources = util.getArg(sourceMap, 'sources');\n // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n // requires the array) to play nice here.\n var names = util.getArg(sourceMap, 'names', []);\n var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n var mappings = util.getArg(sourceMap, 'mappings');\n var file = util.getArg(sourceMap, 'file', null);\n\n // Once again, Sass deviates from the spec and supplies the version as a\n // string rather than a number, so we use loose equality checking here.\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n sources = sources\n .map(String)\n // Some source maps produce relative source paths like \"./foo.js\" instead of\n // \"foo.js\". Normalize these first so that future comparisons will succeed.\n // See bugzil.la/1090768.\n .map(util.normalize)\n // Always ensure that absolute sources are internally stored relative to\n // the source root, if the source root is absolute. Not doing this would\n // be particularly problematic when the source root is a prefix of the\n // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n .map(function (source) {\n return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n ? util.relative(sourceRoot, source)\n : source;\n });\n\n // Pass `true` below to allow duplicate names and sources. While source maps\n // are intended to be compressed and deduplicated, the TypeScript compiler\n // sometimes generates source maps with duplicates in them. See Github issue\n // #72 and bugzil.la/889492.\n this._names = ArraySet.fromArray(names.map(String), true);\n this._sources = ArraySet.fromArray(sources, true);\n\n this.sourceRoot = sourceRoot;\n this.sourcesContent = sourcesContent;\n this._mappings = mappings;\n this.file = file;\n}\n\nBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\n/**\n * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n *\n * @param SourceMapGenerator aSourceMap\n * The source map that will be consumed.\n * @returns BasicSourceMapConsumer\n */\nBasicSourceMapConsumer.fromSourceMap =\n function SourceMapConsumer_fromSourceMap(aSourceMap) {\n var smc = Object.create(BasicSourceMapConsumer.prototype);\n\n var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n smc.sourceRoot = aSourceMap._sourceRoot;\n smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n smc.sourceRoot);\n smc.file = aSourceMap._file;\n\n // Because we are modifying the entries (by converting string sources and\n // names to indices into the sources and names ArraySets), we have to make\n // a copy of the entry or else bad things happen. Shared mutable state\n // strikes again! See github issue #191.\n\n var generatedMappings = aSourceMap._mappings.toArray().slice();\n var destGeneratedMappings = smc.__generatedMappings = [];\n var destOriginalMappings = smc.__originalMappings = [];\n\n for (var i = 0, length = generatedMappings.length; i < length; i++) {\n var srcMapping = generatedMappings[i];\n var destMapping = new Mapping;\n destMapping.generatedLine = srcMapping.generatedLine;\n destMapping.generatedColumn = srcMapping.generatedColumn;\n\n if (srcMapping.source) {\n destMapping.source = sources.indexOf(srcMapping.source);\n destMapping.originalLine = srcMapping.originalLine;\n destMapping.originalColumn = srcMapping.originalColumn;\n\n if (srcMapping.name) {\n destMapping.name = names.indexOf(srcMapping.name);\n }\n\n destOriginalMappings.push(destMapping);\n }\n\n destGeneratedMappings.push(destMapping);\n }\n\n quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\n return smc;\n };\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nBasicSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n get: function () {\n return this._sources.toArray().map(function (s) {\n return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;\n }, this);\n }\n});\n\n/**\n * Provide the JIT with a nice shape / hidden class.\n */\nfunction Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nBasicSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n var generatedLine = 1;\n var previousGeneratedColumn = 0;\n var previousOriginalLine = 0;\n var previousOriginalColumn = 0;\n var previousSource = 0;\n var previousName = 0;\n var length = aStr.length;\n var index = 0;\n var cachedSegments = {};\n var temp = {};\n var originalMappings = [];\n var generatedMappings = [];\n var mapping, str, segment, end, value;\n\n while (index < length) {\n if (aStr.charAt(index) === ';') {\n generatedLine++;\n index++;\n previousGeneratedColumn = 0;\n }\n else if (aStr.charAt(index) === ',') {\n index++;\n }\n else {\n mapping = new Mapping();\n mapping.generatedLine = generatedLine;\n\n // Because each offset is encoded relative to the previous one,\n // many segments often have the same encoding. We can exploit this\n // fact by caching the parsed variable length fields of each segment,\n // allowing us to avoid a second parse if we encounter the same\n // segment again.\n for (end = index; end < length; end++) {\n if (this._charIsMappingSeparator(aStr, end)) {\n break;\n }\n }\n str = aStr.slice(index, end);\n\n segment = cachedSegments[str];\n if (segment) {\n index += str.length;\n } else {\n segment = [];\n while (index < end) {\n base64VLQ.decode(aStr, index, temp);\n value = temp.value;\n index = temp.rest;\n segment.push(value);\n }\n\n if (segment.length === 2) {\n throw new Error('Found a source, but no line and column');\n }\n\n if (segment.length === 3) {\n throw new Error('Found a source and line, but no column');\n }\n\n cachedSegments[str] = segment;\n }\n\n // Generated column.\n mapping.generatedColumn = previousGeneratedColumn + segment[0];\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (segment.length > 1) {\n // Original source.\n mapping.source = previousSource + segment[1];\n previousSource += segment[1];\n\n // Original line.\n mapping.originalLine = previousOriginalLine + segment[2];\n previousOriginalLine = mapping.originalLine;\n // Lines are stored 0-based\n mapping.originalLine += 1;\n\n // Original column.\n mapping.originalColumn = previousOriginalColumn + segment[3];\n previousOriginalColumn = mapping.originalColumn;\n\n if (segment.length > 4) {\n // Original name.\n mapping.name = previousName + segment[4];\n previousName += segment[4];\n }\n }\n\n generatedMappings.push(mapping);\n if (typeof mapping.originalLine === 'number') {\n originalMappings.push(mapping);\n }\n }\n }\n\n quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n this.__generatedMappings = generatedMappings;\n\n quickSort(originalMappings, util.compareByOriginalPositions);\n this.__originalMappings = originalMappings;\n };\n\n/**\n * Find the mapping that best matches the hypothetical \"needle\" mapping that\n * we are searching for in the given \"haystack\" of mappings.\n */\nBasicSourceMapConsumer.prototype._findMapping =\n function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n aColumnName, aComparator, aBias) {\n // To return the position we are searching for, we must first find the\n // mapping for the given position and then return the opposite position it\n // points to. Because the mappings are sorted, we can use binary search to\n // find the best mapping.\n\n if (aNeedle[aLineName] <= 0) {\n throw new TypeError('Line must be greater than or equal to 1, got '\n + aNeedle[aLineName]);\n }\n if (aNeedle[aColumnName] < 0) {\n throw new TypeError('Column must be greater than or equal to 0, got '\n + aNeedle[aColumnName]);\n }\n\n return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n };\n\n/**\n * Compute the last column for each generated mapping. The last column is\n * inclusive.\n */\nBasicSourceMapConsumer.prototype.computeColumnSpans =\n function SourceMapConsumer_computeColumnSpans() {\n for (var index = 0; index < this._generatedMappings.length; ++index) {\n var mapping = this._generatedMappings[index];\n\n // Mappings do not contain a field for the last generated columnt. We\n // can come up with an optimistic estimate, however, by assuming that\n // mappings are contiguous (i.e. given two consecutive mappings, the\n // first mapping ends where the second one starts).\n if (index + 1 < this._generatedMappings.length) {\n var nextMapping = this._generatedMappings[index + 1];\n\n if (mapping.generatedLine === nextMapping.generatedLine) {\n mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n continue;\n }\n }\n\n // The last mapping for each line spans the entire line.\n mapping.lastGeneratedColumn = Infinity;\n }\n };\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source.\n * - column: The column number in the generated source.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null.\n * - column: The column number in the original source, or null.\n * - name: The original identifier, or null.\n */\nBasicSourceMapConsumer.prototype.originalPositionFor =\n function SourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._generatedMappings,\n \"generatedLine\",\n \"generatedColumn\",\n util.compareByGeneratedPositionsDeflated,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._generatedMappings[index];\n\n if (mapping.generatedLine === needle.generatedLine) {\n var source = util.getArg(mapping, 'source', null);\n if (source !== null) {\n source = this._sources.at(source);\n if (this.sourceRoot != null) {\n source = util.join(this.sourceRoot, source);\n }\n }\n var name = util.getArg(mapping, 'name', null);\n if (name !== null) {\n name = this._names.at(name);\n }\n return {\n source: source,\n line: util.getArg(mapping, 'originalLine', null),\n column: util.getArg(mapping, 'originalColumn', null),\n name: name\n };\n }\n }\n\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n function BasicSourceMapConsumer_hasContentsOfAllSources() {\n if (!this.sourcesContent) {\n return false;\n }\n return this.sourcesContent.length >= this._sources.size() &&\n !this.sourcesContent.some(function (sc) { return sc == null; });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nBasicSourceMapConsumer.prototype.sourceContentFor =\n function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n if (!this.sourcesContent) {\n return null;\n }\n\n if (this.sourceRoot != null) {\n aSource = util.relative(this.sourceRoot, aSource);\n }\n\n if (this._sources.has(aSource)) {\n return this.sourcesContent[this._sources.indexOf(aSource)];\n }\n\n var url;\n if (this.sourceRoot != null\n && (url = util.urlParse(this.sourceRoot))) {\n // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n // many users. We can help them out when they expect file:// URIs to\n // behave like it would if they were running a local HTTP server. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n var fileUriAbsPath = aSource.replace(/^file:\\/\\//, \"\");\n if (url.scheme == \"file\"\n && this._sources.has(fileUriAbsPath)) {\n return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n }\n\n if ((!url.path || url.path == \"/\")\n && this._sources.has(\"/\" + aSource)) {\n return this.sourcesContent[this._sources.indexOf(\"/\" + aSource)];\n }\n }\n\n // This function is used recursively from\n // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n // don't want to throw if we can't find the source - we just want to\n // return null, so we provide a flag to exit gracefully.\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: The column number in the original source.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nBasicSourceMapConsumer.prototype.generatedPositionFor =\n function SourceMapConsumer_generatedPositionFor(aArgs) {\n var source = util.getArg(aArgs, 'source');\n if (this.sourceRoot != null) {\n source = util.relative(this.sourceRoot, source);\n }\n if (!this._sources.has(source)) {\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n }\n source = this._sources.indexOf(source);\n\n var needle = {\n source: source,\n originalLine: util.getArg(aArgs, 'line'),\n originalColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (mapping.source === needle.source) {\n return {\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n };\n }\n }\n\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n };\n\nexports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\n/**\n * An IndexedSourceMapConsumer instance represents a parsed source map which\n * we can query for information. It differs from BasicSourceMapConsumer in\n * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n * input.\n *\n * The only parameter is a raw source map (either as a JSON string, or already\n * parsed to an object). According to the spec for indexed source maps, they\n * have the following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - file: Optional. The generated file this source map is associated with.\n * - sections: A list of section definitions.\n *\n * Each value under the \"sections\" field has two fields:\n * - offset: The offset into the original specified at which this section\n * begins to apply, defined as an object with a \"line\" and \"column\"\n * field.\n * - map: A source map definition. This source map could also be indexed,\n * but doesn't have to be.\n *\n * Instead of the \"map\" field, it's also possible to have a \"url\" field\n * specifying a URL to retrieve a source map from, but that's currently\n * unsupported.\n *\n * Here's an example source map, taken from the source map spec[0], but\n * modified to omit a section which uses the \"url\" field.\n *\n * {\n * version : 3,\n * file: \"app.js\",\n * sections: [{\n * offset: {line:100, column:10},\n * map: {\n * version : 3,\n * file: \"section.js\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AAAA,E;;ABCDE;\"\n * }\n * }],\n * }\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n */\nfunction IndexedSourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sections = util.getArg(sourceMap, 'sections');\n\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n this._sources = new ArraySet();\n this._names = new ArraySet();\n\n var lastOffset = {\n line: -1,\n column: 0\n };\n this._sections = sections.map(function (s) {\n if (s.url) {\n // The url field will require support for asynchronicity.\n // See https://github.com/mozilla/source-map/issues/16\n throw new Error('Support for url field in sections not implemented.');\n }\n var offset = util.getArg(s, 'offset');\n var offsetLine = util.getArg(offset, 'line');\n var offsetColumn = util.getArg(offset, 'column');\n\n if (offsetLine < lastOffset.line ||\n (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n throw new Error('Section offsets must be ordered and non-overlapping.');\n }\n lastOffset = offset;\n\n return {\n generatedOffset: {\n // The offset fields are 0-based, but we use 1-based indices when\n // encoding/decoding from VLQ.\n generatedLine: offsetLine + 1,\n generatedColumn: offsetColumn + 1\n },\n consumer: new SourceMapConsumer(util.getArg(s, 'map'))\n }\n });\n}\n\nIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nIndexedSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n get: function () {\n var sources = [];\n for (var i = 0; i < this._sections.length; i++) {\n for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n sources.push(this._sections[i].consumer.sources[j]);\n }\n }\n return sources;\n }\n});\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source.\n * - column: The column number in the generated source.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null.\n * - column: The column number in the original source, or null.\n * - name: The original identifier, or null.\n */\nIndexedSourceMapConsumer.prototype.originalPositionFor =\n function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n // Find the section containing the generated position we're trying to map\n // to an original position.\n var sectionIndex = binarySearch.search(needle, this._sections,\n function(needle, section) {\n var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n if (cmp) {\n return cmp;\n }\n\n return (needle.generatedColumn -\n section.generatedOffset.generatedColumn);\n });\n var section = this._sections[sectionIndex];\n\n if (!section) {\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n }\n\n return section.consumer.originalPositionFor({\n line: needle.generatedLine -\n (section.generatedOffset.generatedLine - 1),\n column: needle.generatedColumn -\n (section.generatedOffset.generatedLine === needle.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n bias: aArgs.bias\n });\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n return this._sections.every(function (s) {\n return s.consumer.hasContentsOfAllSources();\n });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nIndexedSourceMapConsumer.prototype.sourceContentFor =\n function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n var content = section.consumer.sourceContentFor(aSource, true);\n if (content) {\n return content;\n }\n }\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: The column number in the original source.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nIndexedSourceMapConsumer.prototype.generatedPositionFor =\n function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n // Only consider this section if the requested source is in the list of\n // sources of the consumer.\n if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {\n continue;\n }\n var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n if (generatedPosition) {\n var ret = {\n line: generatedPosition.line +\n (section.generatedOffset.generatedLine - 1),\n column: generatedPosition.column +\n (section.generatedOffset.generatedLine === generatedPosition.line\n ? section.generatedOffset.generatedColumn - 1\n : 0)\n };\n return ret;\n }\n }\n\n return {\n line: null,\n column: null\n };\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nIndexedSourceMapConsumer.prototype._parseMappings =\n function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n this.__generatedMappings = [];\n this.__originalMappings = [];\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n var sectionMappings = section.consumer._generatedMappings;\n for (var j = 0; j < sectionMappings.length; j++) {\n var mapping = sectionMappings[j];\n\n var source = section.consumer._sources.at(mapping.source);\n if (section.consumer.sourceRoot !== null) {\n source = util.join(section.consumer.sourceRoot, source);\n }\n this._sources.add(source);\n source = this._sources.indexOf(source);\n\n var name = section.consumer._names.at(mapping.name);\n this._names.add(name);\n name = this._names.indexOf(name);\n\n // The mappings coming from the consumer for the section have\n // generated positions relative to the start of the section, so we\n // need to offset them to be relative to the start of the concatenated\n // generated file.\n var adjustedMapping = {\n source: source,\n generatedLine: mapping.generatedLine +\n (section.generatedOffset.generatedLine - 1),\n generatedColumn: mapping.generatedColumn +\n (section.generatedOffset.generatedLine === mapping.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: name\n };\n\n this.__generatedMappings.push(adjustedMapping);\n if (typeof adjustedMapping.originalLine === 'number') {\n this.__originalMappings.push(adjustedMapping);\n }\n }\n }\n\n quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n quickSort(this.__originalMappings, util.compareByOriginalPositions);\n };\n\nexports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n","//! moment.js locale configuration\n//! locale : Nepalese [ne]\n//! author : suvash : https://github.com/suvash\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '१',\n 2: '२',\n 3: '३',\n 4: '४',\n 5: '५',\n 6: '६',\n 7: '७',\n 8: '८',\n 9: '९',\n 0: '०',\n },\n numberMap = {\n '१': '1',\n '२': '2',\n '३': '3',\n '४': '4',\n '५': '5',\n '६': '6',\n '७': '7',\n '८': '8',\n '९': '9',\n '०': '0',\n };\n\n var ne = moment.defineLocale('ne', {\n months: 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split(\n '_'\n ),\n monthsShort:\n 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split(\n '_'\n ),\n weekdaysShort: 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'),\n weekdaysMin: 'आ._सो._मं._बु._बि._शु._श.'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'Aको h:mm बजे',\n LTS: 'Aको h:mm:ss बजे',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, Aको h:mm बजे',\n LLLL: 'dddd, D MMMM YYYY, Aको h:mm बजे',\n },\n preparse: function (string) {\n return string.replace(/[१२३४५६७८९०]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /राति|बिहान|दिउँसो|साँझ/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'राति') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'बिहान') {\n return hour;\n } else if (meridiem === 'दिउँसो') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'साँझ') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 3) {\n return 'राति';\n } else if (hour < 12) {\n return 'बिहान';\n } else if (hour < 16) {\n return 'दिउँसो';\n } else if (hour < 20) {\n return 'साँझ';\n } else {\n return 'राति';\n }\n },\n calendar: {\n sameDay: '[आज] LT',\n nextDay: '[भोलि] LT',\n nextWeek: '[आउँदो] dddd[,] LT',\n lastDay: '[हिजो] LT',\n lastWeek: '[गएको] dddd[,] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%sमा',\n past: '%s अगाडि',\n s: 'केही क्षण',\n ss: '%d सेकेण्ड',\n m: 'एक मिनेट',\n mm: '%d मिनेट',\n h: 'एक घण्टा',\n hh: '%d घण्टा',\n d: 'एक दिन',\n dd: '%d दिन',\n M: 'एक महिना',\n MM: '%d महिना',\n y: 'एक बर्ष',\n yy: '%d बर्ष',\n },\n week: {\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 });\n\n return ne;\n\n})));\n","//! moment.js locale configuration\n//! locale : Czech [cs]\n//! author : petrbela : https://github.com/petrbela\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var months = {\n standalone:\n 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split(\n '_'\n ),\n format: 'ledna_února_března_dubna_května_června_července_srpna_září_října_listopadu_prosince'.split(\n '_'\n ),\n isFormat: /DD?[o.]?(\\[[^\\[\\]]*\\]|\\s)+MMMM/,\n },\n monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'),\n monthsParse = [\n /^led/i,\n /^úno/i,\n /^bře/i,\n /^dub/i,\n /^kvě/i,\n /^(čvn|červen$|června)/i,\n /^(čvc|červenec|července)/i,\n /^srp/i,\n /^zář/i,\n /^říj/i,\n /^lis/i,\n /^pro/i,\n ],\n // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.\n // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.\n monthsRegex =\n /^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;\n\n function plural(n) {\n return n > 1 && n < 5 && ~~(n / 10) !== 1;\n }\n function translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's': // a few seconds / in a few seconds / a few seconds ago\n return withoutSuffix || isFuture ? 'pár sekund' : 'pár sekundami';\n case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'sekundy' : 'sekund');\n } else {\n return result + 'sekundami';\n }\n case 'm': // a minute / in a minute / a minute ago\n return withoutSuffix ? 'minuta' : isFuture ? 'minutu' : 'minutou';\n case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'minuty' : 'minut');\n } else {\n return result + 'minutami';\n }\n case 'h': // an hour / in an hour / an hour ago\n return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';\n case 'hh': // 9 hours / in 9 hours / 9 hours ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'hodiny' : 'hodin');\n } else {\n return result + 'hodinami';\n }\n case 'd': // a day / in a day / a day ago\n return withoutSuffix || isFuture ? 'den' : 'dnem';\n case 'dd': // 9 days / in 9 days / 9 days ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'dny' : 'dní');\n } else {\n return result + 'dny';\n }\n case 'M': // a month / in a month / a month ago\n return withoutSuffix || isFuture ? 'měsíc' : 'měsícem';\n case 'MM': // 9 months / in 9 months / 9 months ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'měsíce' : 'měsíců');\n } else {\n return result + 'měsíci';\n }\n case 'y': // a year / in a year / a year ago\n return withoutSuffix || isFuture ? 'rok' : 'rokem';\n case 'yy': // 9 years / in 9 years / 9 years ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'roky' : 'let');\n } else {\n return result + 'lety';\n }\n }\n }\n\n var cs = moment.defineLocale('cs', {\n months: months,\n monthsShort: monthsShort,\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.\n // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.\n monthsStrictRegex:\n /^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,\n monthsShortStrictRegex:\n /^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),\n weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'),\n weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd D. MMMM YYYY H:mm',\n l: 'D. M. YYYY',\n },\n calendar: {\n sameDay: '[dnes v] LT',\n nextDay: '[zítra v] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[v neděli v] LT';\n case 1:\n case 2:\n return '[v] dddd [v] LT';\n case 3:\n return '[ve středu v] LT';\n case 4:\n return '[ve čtvrtek v] LT';\n case 5:\n return '[v pátek v] LT';\n case 6:\n return '[v sobotu v] LT';\n }\n },\n lastDay: '[včera v] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[minulou neděli v] LT';\n case 1:\n case 2:\n return '[minulé] dddd [v] LT';\n case 3:\n return '[minulou středu v] LT';\n case 4:\n case 5:\n return '[minulý] dddd [v] LT';\n case 6:\n return '[minulou sobotu v] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'za %s',\n past: 'před %s',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return cs;\n\n})));\n","/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nexport { DEBUG_BUILD };\n","import { createErrorClass } from './createErrorClass';\nexport const ObjectUnsubscribedError = createErrorClass((_super) => function ObjectUnsubscribedErrorImpl() {\n _super(this);\n this.name = 'ObjectUnsubscribedError';\n this.message = 'object unsubscribed';\n});\n","import { Observable } from './Observable';\nimport { Subscription, EMPTY_SUBSCRIPTION } from './Subscription';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { arrRemove } from './util/arrRemove';\nimport { errorContext } from './util/errorContext';\nexport class Subject extends Observable {\n constructor() {\n super();\n this.closed = false;\n this.currentObservers = null;\n this.observers = [];\n this.isStopped = false;\n this.hasError = false;\n this.thrownError = null;\n }\n lift(operator) {\n const subject = new AnonymousSubject(this, this);\n subject.operator = operator;\n return subject;\n }\n _throwIfClosed() {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n }\n next(value) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n if (!this.currentObservers) {\n this.currentObservers = Array.from(this.observers);\n }\n for (const observer of this.currentObservers) {\n observer.next(value);\n }\n }\n });\n }\n error(err) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.hasError = this.isStopped = true;\n this.thrownError = err;\n const { observers } = this;\n while (observers.length) {\n observers.shift().error(err);\n }\n }\n });\n }\n complete() {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.isStopped = true;\n const { observers } = this;\n while (observers.length) {\n observers.shift().complete();\n }\n }\n });\n }\n unsubscribe() {\n this.isStopped = this.closed = true;\n this.observers = this.currentObservers = null;\n }\n get observed() {\n var _a;\n return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;\n }\n _trySubscribe(subscriber) {\n this._throwIfClosed();\n return super._trySubscribe(subscriber);\n }\n _subscribe(subscriber) {\n this._throwIfClosed();\n this._checkFinalizedStatuses(subscriber);\n return this._innerSubscribe(subscriber);\n }\n _innerSubscribe(subscriber) {\n const { hasError, isStopped, observers } = this;\n if (hasError || isStopped) {\n return EMPTY_SUBSCRIPTION;\n }\n this.currentObservers = null;\n observers.push(subscriber);\n return new Subscription(() => {\n this.currentObservers = null;\n arrRemove(observers, subscriber);\n });\n }\n _checkFinalizedStatuses(subscriber) {\n const { hasError, thrownError, isStopped } = this;\n if (hasError) {\n subscriber.error(thrownError);\n }\n else if (isStopped) {\n subscriber.complete();\n }\n }\n asObservable() {\n const observable = new Observable();\n observable.source = this;\n return observable;\n }\n}\nSubject.create = (destination, source) => {\n return new AnonymousSubject(destination, source);\n};\nexport class AnonymousSubject extends Subject {\n constructor(destination, source) {\n super();\n this.destination = destination;\n this.source = source;\n }\n next(value) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value);\n }\n error(err) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err);\n }\n complete() {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a);\n }\n _subscribe(subscriber) {\n var _a, _b;\n return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;\n }\n}\n","//! moment.js locale configuration\n//! locale : Mongolian [mn]\n//! author : Javkhlantugs Nyamdorj : https://github.com/javkhaanj7\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function translate(number, withoutSuffix, key, isFuture) {\n switch (key) {\n case 's':\n return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын';\n case 'ss':\n return number + (withoutSuffix ? ' секунд' : ' секундын');\n case 'm':\n case 'mm':\n return number + (withoutSuffix ? ' минут' : ' минутын');\n case 'h':\n case 'hh':\n return number + (withoutSuffix ? ' цаг' : ' цагийн');\n case 'd':\n case 'dd':\n return number + (withoutSuffix ? ' өдөр' : ' өдрийн');\n case 'M':\n case 'MM':\n return number + (withoutSuffix ? ' сар' : ' сарын');\n case 'y':\n case 'yy':\n return number + (withoutSuffix ? ' жил' : ' жилийн');\n default:\n return number;\n }\n }\n\n var mn = moment.defineLocale('mn', {\n months: 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split(\n '_'\n ),\n monthsShort:\n '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'),\n weekdaysShort: 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'),\n weekdaysMin: 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'YYYY оны MMMMын D',\n LLL: 'YYYY оны MMMMын D HH:mm',\n LLLL: 'dddd, YYYY оны MMMMын D HH:mm',\n },\n meridiemParse: /ҮӨ|ҮХ/i,\n isPM: function (input) {\n return input === 'ҮХ';\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ҮӨ';\n } else {\n return 'ҮХ';\n }\n },\n calendar: {\n sameDay: '[Өнөөдөр] LT',\n nextDay: '[Маргааш] LT',\n nextWeek: '[Ирэх] dddd LT',\n lastDay: '[Өчигдөр] LT',\n lastWeek: '[Өнгөрсөн] dddd LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s дараа',\n past: '%s өмнө',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2} өдөр/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + ' өдөр';\n default:\n return number;\n }\n },\n });\n\n return mn;\n\n})));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stacktrace', ['error-stack-parser', 'stack-generator', 'stacktrace-gps'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('error-stack-parser'), require('stack-generator'), require('stacktrace-gps'));\n } else {\n root.StackTrace = factory(root.ErrorStackParser, root.StackGenerator, root.StackTraceGPS);\n }\n}(this, function StackTrace(ErrorStackParser, StackGenerator, StackTraceGPS) {\n var _options = {\n filter: function(stackframe) {\n // Filter out stackframes for this library by default\n return (stackframe.functionName || '').indexOf('StackTrace$$') === -1 &&\n (stackframe.functionName || '').indexOf('ErrorStackParser$$') === -1 &&\n (stackframe.functionName || '').indexOf('StackTraceGPS$$') === -1 &&\n (stackframe.functionName || '').indexOf('StackGenerator$$') === -1;\n },\n sourceCache: {}\n };\n\n var _generateError = function StackTrace$$GenerateError() {\n try {\n // Error must be thrown to get stack in IE\n throw new Error();\n } catch (err) {\n return err;\n }\n };\n\n /**\n * Merge 2 given Objects. If a conflict occurs the second object wins.\n * Does not do deep merges.\n *\n * @param {Object} first base object\n * @param {Object} second overrides\n * @returns {Object} merged first and second\n * @private\n */\n function _merge(first, second) {\n var target = {};\n\n [first, second].forEach(function(obj) {\n for (var prop in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, prop)) {\n target[prop] = obj[prop];\n }\n }\n return target;\n });\n\n return target;\n }\n\n function _isShapedLikeParsableError(err) {\n return err.stack || err['opera#sourceloc'];\n }\n\n function _filtered(stackframes, filter) {\n if (typeof filter === 'function') {\n return stackframes.filter(filter);\n }\n return stackframes;\n }\n\n return {\n /**\n * Get a backtrace from invocation point.\n *\n * @param {Object} opts\n * @returns {Array} of StackFrame\n */\n get: function StackTrace$$get(opts) {\n var err = _generateError();\n return _isShapedLikeParsableError(err) ? this.fromError(err, opts) : this.generateArtificially(opts);\n },\n\n /**\n * Get a backtrace from invocation point.\n * IMPORTANT: Does not handle source maps or guess function names!\n *\n * @param {Object} opts\n * @returns {Array} of StackFrame\n */\n getSync: function StackTrace$$getSync(opts) {\n opts = _merge(_options, opts);\n var err = _generateError();\n var stack = _isShapedLikeParsableError(err) ? ErrorStackParser.parse(err) : StackGenerator.backtrace(opts);\n return _filtered(stack, opts.filter);\n },\n\n /**\n * Given an error object, parse it.\n *\n * @param {Error} error object\n * @param {Object} opts\n * @returns {Promise} for Array[StackFrame}\n */\n fromError: function StackTrace$$fromError(error, opts) {\n opts = _merge(_options, opts);\n var gps = new StackTraceGPS(opts);\n return new Promise(function(resolve) {\n var stackframes = _filtered(ErrorStackParser.parse(error), opts.filter);\n resolve(Promise.all(stackframes.map(function(sf) {\n return new Promise(function(resolve) {\n function resolveOriginal() {\n resolve(sf);\n }\n\n gps.pinpoint(sf).then(resolve, resolveOriginal)['catch'](resolveOriginal);\n });\n })));\n }.bind(this));\n },\n\n /**\n * Use StackGenerator to generate a backtrace.\n *\n * @param {Object} opts\n * @returns {Promise} of Array[StackFrame]\n */\n generateArtificially: function StackTrace$$generateArtificially(opts) {\n opts = _merge(_options, opts);\n var stackFrames = StackGenerator.backtrace(opts);\n if (typeof opts.filter === 'function') {\n stackFrames = stackFrames.filter(opts.filter);\n }\n return Promise.resolve(stackFrames);\n },\n\n /**\n * Given a function, wrap it such that invocations trigger a callback that\n * is called with a stack trace.\n *\n * @param {Function} fn to be instrumented\n * @param {Function} callback function to call with a stack trace on invocation\n * @param {Function} errback optional function to call with error if unable to get stack trace.\n * @param {Object} thisArg optional context object (e.g. window)\n */\n instrument: function StackTrace$$instrument(fn, callback, errback, thisArg) {\n if (typeof fn !== 'function') {\n throw new Error('Cannot instrument non-function object');\n } else if (typeof fn.__stacktraceOriginalFn === 'function') {\n // Already instrumented, return given Function\n return fn;\n }\n\n var instrumented = function StackTrace$$instrumented() {\n try {\n this.get().then(callback, errback)['catch'](errback);\n return fn.apply(thisArg || this, arguments);\n } catch (e) {\n if (_isShapedLikeParsableError(e)) {\n this.fromError(e).then(callback, errback)['catch'](errback);\n }\n throw e;\n }\n }.bind(this);\n instrumented.__stacktraceOriginalFn = fn;\n\n return instrumented;\n },\n\n /**\n * Given a function that has been instrumented,\n * revert the function to it's original (non-instrumented) state.\n *\n * @param {Function} fn to de-instrument\n */\n deinstrument: function StackTrace$$deinstrument(fn) {\n if (typeof fn !== 'function') {\n throw new Error('Cannot de-instrument non-function object');\n } else if (typeof fn.__stacktraceOriginalFn === 'function') {\n return fn.__stacktraceOriginalFn;\n } else {\n // Function not instrumented, return original\n return fn;\n }\n },\n\n /**\n * Given an error message and Array of StackFrames, serialize and POST to given URL.\n *\n * @param {Array} stackframes\n * @param {String} url\n * @param {String} errorMsg\n * @param {Object} requestOptions\n */\n report: function StackTrace$$report(stackframes, url, errorMsg, requestOptions) {\n return new Promise(function(resolve, reject) {\n var req = new XMLHttpRequest();\n req.onerror = reject;\n req.onreadystatechange = function onreadystatechange() {\n if (req.readyState === 4) {\n if (req.status >= 200 && req.status < 400) {\n resolve(req.responseText);\n } else {\n reject(new Error('POST to ' + url + ' failed with status: ' + req.status));\n }\n }\n };\n req.open('post', url);\n\n // Set request headers\n req.setRequestHeader('Content-Type', 'application/json');\n if (requestOptions && typeof requestOptions.headers === 'object') {\n var headers = requestOptions.headers;\n for (var header in headers) {\n if (Object.prototype.hasOwnProperty.call(headers, header)) {\n req.setRequestHeader(header, headers[header]);\n }\n }\n }\n\n var reportPayload = {stack: stackframes};\n if (errorMsg !== undefined && errorMsg !== null) {\n reportPayload.message = errorMsg;\n }\n\n req.send(JSON.stringify(reportPayload));\n });\n }\n };\n}));\n","<section class=\"content-layout\">\n <bw-action-article [brightsideWebFb]=\"{ event_name: this.analyticsAttributes.event_name }\">\n <bw-icon\n *ngIf=\"campaign.closeable && campaign.secondaryCtaPath\"\n iconName=\"close\"\n size=\"24\"\n [brightsideWebFb]=\"{ event_name: this.analyticsAttributes.event_name }\"\n (click)=\"handleClick(campaign.secondaryCtaPath, CampaignEventStatus.FAILED)\"\n ></bw-icon>\n\n <!-- We need to sort out these buttons... needed to add this one to support micro app (mobile) -->\n <div header-actions class=\"flex-row pointer\" *ngIf=\"campaign.closeable\">\n <bw-icon\n class=\"hidden-desktop\"\n iconName=\"close\"\n size=\"24\"\n (click)=\"handleCloseClick()\"\n ></bw-icon>\n </div>\n\n <ui-nav-exit-back\n *ngIf=\"!campaign.closeable && showBackArrow\"\n back-action-bottom\n [trackingDetail]=\"{ event_name: this.analyticsAttributes.event_name }\"\n (exitActionHandler)=\"handleClick(campaign.secondaryCtaPath, CampaignEventStatus.FAILED)\"\n ></ui-nav-exit-back>\n\n <div content-section>\n <div class=\"flex-column space-center mb-sm\">\n <div class=\"align-left\">\n <img src=\"../assets/{{ imageName }}.svg\" [alt]=\"imageName\" class=\"mb-md\" />\n <p title-medium class=\"mb-sm\">{{ titleText || campaign.titleKey | translate }}</p>\n <typography text-large-regular color=\"var(--secondary-text)\">\n <p [ngClass]=\"bodyTextAlign\" [style.whiteSpace]=\"bodyTextNoWrap\" style=\"max-width: 432px\">\n {{ bodyText || campaign.textBodyKey | translate }}\n </p>\n </typography>\n </div>\n </div>\n </div>\n\n <div content-section *ngIf=\"campaign.isCreditIntro\">\n <div class=\"flex-column space-center mb-xl\">\n <div class=\"align-left\">\n <typography text-large-regular\n ><strong>{{ 'CREDIT_INTRO_SUBHEADER' | translate }}</strong></typography\n >\n <div class=\"mt-sm mb-sm\">\n <div *ngFor=\"let item of creditIntroItems\" class=\"flex-row space-between\">\n <div class=\"align-left mr-sm\">\n <bw-icon [iconName]=\"'checkmark'\" size=\"24\"></bw-icon>\n </div>\n <div class=\"flex-column flex-item-flexible\">\n <typography text-medium-regular>{{ item | translate }}</typography>\n </div>\n </div>\n </div>\n <div class=\"mb-sm\">\n <typography text-large-regular color=\"var(--secondary-text)\">\n <p class=\"left\" style=\"max-width: 432px\">\n {{ 'CREDIT_INTRO_HALFSHEET_DESC' | translate }}\n </p>\n </typography>\n </div>\n </div>\n </div>\n </div>\n\n <div footer-actions [ngClass]=\"{ 'flex-column': campaign.showFullScreenCta }\">\n <button\n *ngIf=\"campaign.ctaKey || primaryCtaText\"\n bw-button\n type=\"submit\"\n [brightsideWebFb]=\"{ event_name: this.analyticsAttributes.event_name }\"\n [processing]=\"processing\"\n (click)=\"handleClick(campaign.ctaPath, CampaignEventStatus.SUCCESS)\"\n >\n {{ primaryCtaText || campaign.ctaKey | translate }}\n </button>\n\n <button\n *ngIf=\"campaign.secondaryCta\"\n bw-link-button\n [brightsideWebFb]=\"{ event_name: this.analyticsAttributes.event_name }\"\n [dismissedCta]=\"true\"\n (click)=\"handleClick(campaign.secondaryCtaPath, CampaignEventStatus.FAILED)\"\n >\n {{ secondaryCtaText || campaign.secondaryCtaKey | translate }}\n </button>\n </div>\n </bw-action-article>\n</section>\n","import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { Router, ActivatedRoute } from '@angular/router';\n\nimport { AnalyticsAttributesV4, FirebaseService } from '@brightside-web/desktop/data-access/shared';\nimport { CampaignEventStatus } from '@brightside-web/desktop/data-access/onboarding';\nimport { MessageBusInternalService } from '@brightside-web/micro/core/message-bus';\n\nimport { DisplayData } from '../models/display.enum';\n\nexport interface DisplayCampaignConfig extends DisplayData {\n pageTitle?: string;\n closeable?: boolean;\n showBackArrow?: boolean;\n showFullScreenCta?: boolean;\n analyticsAttributes?: AnalyticsAttributesV4;\n}\n\nexport interface DisplayCampaignEvent {\n path: string;\n type: CampaignEventStatus;\n}\n\n@Component({\n selector: 'brightside-web-display-campaign',\n templateUrl: './display-campaign.component.html',\n styleUrls: ['./display-campaign.component.scss'],\n})\nexport class SharedDisplayCampaignComponent {\n @Input() analyticsAttributes: AnalyticsAttributesV4;\n @Input() campaign: DisplayCampaignConfig;\n @Input() showBackArrow = true;\n\n @Output() campaignEvent: EventEmitter<DisplayCampaignEvent> = new EventEmitter<DisplayCampaignEvent>();\n\n processing = false;\n\n private dataFromRoute = false;\n\n constructor(protected activatedRoute: ActivatedRoute, protected analytics: FirebaseService, protected router: Router) {\n\n this.activatedRoute.data.subscribe((data) => {\n if (data?.config) {\n this.campaign = data.config;\n this.showBackArrow = Boolean(this.campaign.showBackArrow);\n this.dataFromRoute = true;\n if (this.campaign.analyticsAttributes) {\n this.analyticsAttributes = this.campaign.analyticsAttributes;\n }\n }\n });\n }\n\n instanceOfV4(object: any): object is AnalyticsAttributesV4 {\n return 'event_name' in object;\n }\n\n getFbInfo(extra: { [key: string]: string } = {}) {\n\n if (this.analyticsAttributes && this.instanceOfV4(this.analyticsAttributes)) {\n if (!extra.action) {\n return { event_name: this.analyticsAttributes.event_name + '_shown' };\n }\n switch (extra.action) {\n case 'success':\n return { event_name: this.analyticsAttributes.event_name + '_tapped', action: 'click' };\n default:\n return { event_name: this.analyticsAttributes.event_name + '_dismissed', action: 'click' };\n }\n }\n }\n\n get CampaignEventStatus() {\n return CampaignEventStatus;\n }\n\n get imageName() {\n return this.campaign?.image || '';\n }\n\n get pageTitle() {\n return this.campaign?.pageTitle || '';\n }\n\n get titleText() {\n return this.campaign?.title ?? this.campaign?.titleKey ?? '';\n }\n\n get bodyText() {\n return this.campaign?.textBody ?? this.campaign?.textBodyKey ?? '';\n }\n\n get primaryCtaText() {\n return this.campaign?.cta ?? this.campaign?.ctaKey ?? '';\n }\n\n get secondaryCtaText() {\n return this.campaign?.secondaryCta ?? this.campaign?.secondaryCtaKey ?? '';\n }\n\n get closeable() {\n return Boolean(this.campaign?.closeable);\n }\n\n get bodyTextAlign() {\n return this.campaign?.textBodyAlign || 'center';\n }\n\n get bodyTextNoWrap() {\n return this.campaign?.textBodyNoWrap? 'no-wrap' : 'pre-wrap';\n }\n\n get creditIntroItems() {\n return ['CREDIT_INTRO_ITEM_1', 'CREDIT_INTRO_ITEM_2', 'CREDIT_INTRO_ITEM_3'];\n }\n\n handleClick(path: string, type: CampaignEventStatus) {\n\n //Only call this if data is not from route\n if (!this.dataFromRoute) {\n return this.campaignEvent.emit({ path, type });\n }\n\n if (type === CampaignEventStatus.SUCCESS) this.handlePrimaryClick();\n if (type === CampaignEventStatus.FAILED) this.handleSecondaryClick();\n }\n\n handleCloseClick() {\n if ((this.campaign as any).pageSecondaryCtaEvent) {\n MessageBusInternalService.sendOutgoingHubEvent((this.campaign as any).pageSecondaryCtaEvent);\n } else {\n this.router.navigate(['home']);\n }\n }\n\n handlePrimaryClick() {\n\n this.processing = true;\n if (!this.campaign.ctaPath && !this.campaign.ctaEvent) {\n //ToDo: Maybe this should throw error?\n this.handleCloseClick();\n return;\n }\n\n //Check if there is an event passed\n if (this.campaign.ctaEvent) {\n MessageBusInternalService.sendOutgoingHubEvent(this.campaign.ctaEvent);\n } else if (typeof this.campaign.ctaPath === 'string') { \n this.router.navigateByUrl(this.campaign.ctaPath);\n } else { \n this.router.navigate(this.campaign.ctaPath, { relativeTo: this.activatedRoute });\n }\n }\n\n handleSecondaryClick() {\n //Check if there is an event passed\n if (this.campaign.secondaryCtaEvent) {\n MessageBusInternalService.sendOutgoingHubEvent(this.campaign.secondaryCtaEvent);\n } else if (!this.campaign.secondaryCtaPath) {\n //ToDo: Maybe this should throw error?\n this.handleCloseClick();\n } else {\n if (typeof this.campaign.secondaryCtaPath === 'string') {\n this.router.navigateByUrl(this.campaign.secondaryCtaPath);\n } else {\n this.router.navigate(this.campaign.secondaryCtaPath, { relativeTo: this.activatedRoute });\n }\n }\n }\n}\n","export function arrRemove(arr, item) {\n if (arr) {\n const index = arr.indexOf(item);\n 0 <= index && arr.splice(index, 1);\n }\n}\n","import { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'bw-icon',\n templateUrl: './icon.component.html',\n styleUrls: ['./icon.component.scss']\n})\nexport class IconComponent {\n @Input() iconName: string;\n @Input() size = 24;\n @Input() horizontalSpace = 'mr-null';\n @Input() color: string;\n @Input() backgroundColor: string;\n iconBgSize: number;\n\n ngOnInit() {\n this.iconBgSize = this.backgroundColor ? Number(this.size) + 8 : this.size;\n }\n\n}\n","<div class=\"icon-container\"\n [ngClass]=\"[horizontalSpace ? horizontalSpace : '']\"\n [ngStyle]=\"{ 'width.px': iconBgSize, 'height.px': iconBgSize, 'background-color': backgroundColor}\">\n <svg [ngStyle]=\"{ 'width.px': size, 'height.px': size, 'fill': color }\">\n <use attr.xlink:href=\"/assets/symbol-defs.svg#{{ iconName }}\"></use>\n </svg>\n</div>\n","//! moment.js locale configuration\n//! locale : Malay [ms]\n//! author : Weldan Jamili : https://github.com/weldan\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ms = moment.defineLocale('ms', {\n months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),\n weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),\n weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),\n weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [pukul] HH.mm',\n LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',\n },\n meridiemParse: /pagi|tengahari|petang|malam/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'pagi') {\n return hour;\n } else if (meridiem === 'tengahari') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'petang' || meridiem === 'malam') {\n return hour + 12;\n }\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours < 11) {\n return 'pagi';\n } else if (hours < 15) {\n return 'tengahari';\n } else if (hours < 19) {\n return 'petang';\n } else {\n return 'malam';\n }\n },\n calendar: {\n sameDay: '[Hari ini pukul] LT',\n nextDay: '[Esok pukul] LT',\n nextWeek: 'dddd [pukul] LT',\n lastDay: '[Kelmarin pukul] LT',\n lastWeek: 'dddd [lepas pukul] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'dalam %s',\n past: '%s yang lepas',\n s: 'beberapa saat',\n ss: '%d saat',\n m: 'seminit',\n mm: '%d minit',\n h: 'sejam',\n hh: '%d jam',\n d: 'sehari',\n dd: '%d hari',\n M: 'sebulan',\n MM: '%d bulan',\n y: 'setahun',\n yy: '%d tahun',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return ms;\n\n})));\n","import { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\nexport const asyncScheduler = new AsyncScheduler(AsyncAction);\nexport const async = asyncScheduler;\n","export function createErrorClass(createImpl) {\n const _super = (instance) => {\n Error.call(instance);\n instance.stack = new Error().stack;\n };\n const ctorFunc = createImpl(_super);\n ctorFunc.prototype = Object.create(Error.prototype);\n ctorFunc.prototype.constructor = ctorFunc;\n return ctorFunc;\n}\n","//! moment.js locale configuration\n//! locale : Esperanto [eo]\n//! author : Colin Dean : https://github.com/colindean\n//! author : Mia Nordentoft Imperatori : https://github.com/miestasmia\n//! comment : miestasmia corrected the translation by colindean\n//! comment : Vivakvo corrected the translation by colindean and miestasmia\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var eo = moment.defineLocale('eo', {\n months: 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split(\n '_'\n ),\n monthsShort: 'jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec'.split('_'),\n weekdays: 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'),\n weekdaysShort: 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'),\n weekdaysMin: 'di_lu_ma_me_ĵa_ve_sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: '[la] D[-an de] MMMM, YYYY',\n LLL: '[la] D[-an de] MMMM, YYYY HH:mm',\n LLLL: 'dddd[n], [la] D[-an de] MMMM, YYYY HH:mm',\n llll: 'ddd, [la] D[-an de] MMM, YYYY HH:mm',\n },\n meridiemParse: /[ap]\\.t\\.m/i,\n isPM: function (input) {\n return input.charAt(0).toLowerCase() === 'p';\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'p.t.m.' : 'P.T.M.';\n } else {\n return isLower ? 'a.t.m.' : 'A.T.M.';\n }\n },\n calendar: {\n sameDay: '[Hodiaŭ je] LT',\n nextDay: '[Morgaŭ je] LT',\n nextWeek: 'dddd[n je] LT',\n lastDay: '[Hieraŭ je] LT',\n lastWeek: '[pasintan] dddd[n je] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'post %s',\n past: 'antaŭ %s',\n s: 'kelkaj sekundoj',\n ss: '%d sekundoj',\n m: 'unu minuto',\n mm: '%d minutoj',\n h: 'unu horo',\n hh: '%d horoj',\n d: 'unu tago', //ne 'diurno', ĉar estas uzita por proksimumo\n dd: '%d tagoj',\n M: 'unu monato',\n MM: '%d monatoj',\n y: 'unu jaro',\n yy: '%d jaroj',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}a/,\n ordinal: '%da',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return eo;\n\n})));\n","<div class=\"list-wrapper\" [ngClass]=\"{'block': blockStyle}\" [ngStyle]=\"{'backgroundColor': blockStyle ? bgColor : ''}\">\n <div class=\"flex-row space-between\">\n <div *ngIf=\"hasAvatar\" class=\"mr-sm\">\n <bw-avatar [iconName]=\"avatarIconName\" [iconColor]=\"avatarIconColor\" avatarSize=\"medium\"></bw-avatar>\n </div>\n <div *ngIf=\"hasLeftIcon\" class=\"align-left mr-sm\">\n <bw-icon [iconName]=\"leftIconName\" size=\"24\" [color]=\"leftIconColor\"></bw-icon>\n </div>\n <div class=\"flex-column flex-item-flexible\">\n <typography *ngIf=\"hasTitle\" class=\"type-sm-bold primary-text\">{{listTitle}}</typography>\n <typography *ngIf=\"hasDetail\" class=\"type-sm primary-text\">{{listDetail}}</typography>\n </div>\n <div *ngIf=\"hasRightIcon\" class=\"align-right ml-sm\">\n <bw-icon [iconName]=\"rightIconName\" size=\"24\" [color]=\"rightIconColor\"></bw-icon>\n </div>\n </div>\n</div>\n<div class=\"mb-sm\"></div>\n","import { Component, OnChanges, ChangeDetectionStrategy, Input, SimpleChanges } from '@angular/core';\n\n@Component({\n selector: 'bw-list-item-details',\n templateUrl: './list-item-details.component.html',\n styleUrls: ['./list-item-details.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ListItemDetailsComponent implements OnChanges {\n /** If the component has an avatar */\n hasAvatar: boolean;\n\n /** If the component has a title */\n hasTitle: boolean;\n\n /** If the component has detail text */\n hasDetail: boolean;\n\n /** If the component has an icon on the left */\n hasLeftIcon: boolean;\n\n /** If the component has an icon on the right */\n hasRightIcon: boolean;\n\n /** The name of the icon that will appear in the avatar. If a name is not provided, hasAvatar will be falsy and the avatar component will not show. */\n @Input() avatarIconName: string;\n\n /** The color of the icon in the avatar */\n @Input() avatarIconColor = 'var(--blue-70)';\n\n /** The title line of text. This line will wrap and expand the height of the component. If none is given, hasTitle will be falsy and the title component will not show. */\n @Input() listTitle: string;\n\n /** The detail line of text. This line will wrap and expand the height of the component. If a detail is not provided, hasDetail will be falsy and the detail element will not show. */\n @Input() listDetail: string;\n\n /** The left icon name. If a name is not provided, hasLeftIcon will be falsy and the icon element will not show. */\n @Input() leftIconName: string;\n\n /** The left icon color. Will be ignored if a leftIconName is not provided. */\n @Input() leftIconColor: string;\n\n /** The right icon name. If a name is not provided, hasRightIcon will be falsy and the icon element will not show. */\n @Input() rightIconName: string;\n\n /** The right icon color. Will be ignored if a rightIconName is not provided. */\n @Input() rightIconColor: string;\n\n /** If the component should present as a block (with extra padding and background color). */\n @Input() blockStyle: boolean;\n\n /** The background color for the block style */\n @Input() bgColor: string;\n\n constructor() {\n this.hasAvatar = true;\n this.hasTitle = true;\n this.hasDetail = true;\n this.hasLeftIcon = true;\n this.hasRightIcon = true;\n this.rightIconColor = 'black';\n this.blockStyle = false;\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.hasAvatar = !!this.avatarIconName;\n this.hasTitle = !!this.listTitle;\n this.hasDetail = !!this.listDetail;\n this.hasLeftIcon = !!this.leftIconName;\n this.hasRightIcon = !!this.rightIconName;\n }\n}\n","import { AfterViewInit, Directive, ElementRef, HostListener, Input, OnInit } from '@angular/core';\nimport {\n FirebaseService,\n AnalyticsAttributesV4\n} from '@brightside-web/desktop/data-access/shared';\nimport { Environment } from '@brightside-web/micro/core/environment';\n\nconst isV4 = (object:any): object is AnalyticsAttributesV4 => object && 'event_name' in object;\n\n@Directive({\n selector: '[brightsideWebFb]',\n})\nexport class FbDirective implements AfterViewInit {\n\n @Input('brightsideWebFb') attributes: AnalyticsAttributesV4;\n @Input() secondaryCta = false;\n @Input() dismissedCta = false;\n @Input() error_view = false;\n\n tagName: string;\n dontLog: boolean;\n\n constructor(\n private analytics: FirebaseService,\n private el: ElementRef,\n private env: Environment\n ) {\n\n }\n\n @HostListener('click', ['$event']) @HostListener('keyup.enter', ['$event']) onClick(event: KeyboardEvent) {\n if (!this.dontLog) {\n if (this.isDismissButton()) {\n this.analytics.logEvent(`${this.attributes.event_name} dismissed`, this.attributes.custom);\n } else if (this.isClickable()) {\n const eventAction = this.secondaryCta ? 'secondary tapped' : 'tapped'\n this.analytics.logEvent(`${this.attributes.event_name} ${eventAction}`, this.attributes.custom);\n }\n }\n }\n\n cleanEventName() {\n const eventNameArray = this.attributes.event_name.toLowerCase().split('_');\n for (let i = eventNameArray.length - 1; i >= 0; i--) {\n if (eventNameArray[i] === \"dismissed\" || eventNameArray[i] === \"shown\" || eventNameArray[i] === \"tapped\" || eventNameArray[i] === \"dismiss\") {\n eventNameArray.splice(i, 1);\n }\n }\n this.attributes.event_name = eventNameArray.join(' ');\n }\n\n cleanCustomParams() {\n try {\n const customParams = JSON.parse(JSON.stringify(this.attributes.custom).toLowerCase().split('_').join(' '));\n this.attributes.custom = customParams;\n } catch (e) {\n // parsing probably failed, so do nothing and pass the params as-is\n }\n }\n\n ngOnInit() {\n if (\n !this.attributes.event_name\n || !this.attributes.event_name.trim()\n || !this.el.nativeElement\n || !this.el.nativeElement.tagName) {\n this.dontLog = true;\n // if (!this.env.production) {\n // console.groupCollapsed('FbDirective don\\'t log')\n // console.log(this.attributes);\n // console.log(this.el);\n // console.groupEnd();\n // }\n }\n }\n\n ngAfterViewInit(): void {\n if (!this.dontLog) {\n this.tagName = this.el.nativeElement.tagName.toLowerCase();\n\n if (this.attributes.custom) {\n this.cleanCustomParams();\n }\n\n if (this.isErrorView()) {\n this.analytics.logEvent(`${this.attributes.event_name}`, this.attributes.custom);\n } else if (!this.isClickable() && !this.isDismissButton()) {\n this.cleanEventName();\n this.analytics.logEvent(`${this.attributes.event_name} shown`, this.attributes.custom);\n } else {\n this.cleanEventName();\n }\n }\n }\n\n isErrorView(): boolean {\n return this.error_view || this.attributes.event_name === 'error shown' || this.attributes.event_name === 'error_shown';\n }\n\n isClickable(): boolean {\n return this.tagName === 'button' || this.tagName === 'a';\n }\n\n isDismissButton(): boolean {\n return this.tagName === 'bw-back' || this.dismissedCta;\n }\n\n isInputElement(tagName: string): boolean {\n return tagName === 'INPUT' || tagName === 'BW-INPUT' || tagName === 'BW-CREATE-PASSWORD' || tagName === 'BW-PHONE-FORM';\n }\n}\n","import { Injectable } from '@angular/core';\nimport { BsApiService, GenericResponseResult, SimpleGlobalModalService } from '@brightside-web/desktop/data-access/core-services';\nimport { BehaviorSubject, Observable, take, tap } from 'rxjs';\nimport { Router } from '@angular/router';\nimport { FirebaseService } from './firebase.service';\n\nexport interface PartnerDetails {\n key: string;\n name: string;\n caption: string;\n desc: string;\n summary: string;\n tagline?: string;\n image: string;\n imagePartner: string;\n url: string;\n details: string[][];\n}\n\nexport interface ExternalPartnerResponse {\n payload: { partners: PartnerDetails[] };\n}\n\nexport enum ExternalPartnerType {\n LenderAlernatives = 'lender-alternatives',\n FindMoney = 'find-money',\n}\n\n@Injectable()\nexport class ExternalPartnerService {\n apiName = 'api-mobile';\n\n private _externalPartners$: BehaviorSubject<PartnerDetails[] | undefined> = new BehaviorSubject<PartnerDetails[] | undefined>(\n undefined\n );\n public readonly externalPartners$: Observable<PartnerDetails[] | undefined> = this._externalPartners$.asObservable();\n\n private _currentPartnerDetails$: BehaviorSubject<PartnerDetails | undefined> = new BehaviorSubject<PartnerDetails | undefined>(\n undefined\n );\n public readonly currentPartnerDetails$: Observable<PartnerDetails | undefined> = this._currentPartnerDetails$.asObservable();\n\n private readonly _endpoint = '/external-partner';\n private _externalPartnerAttempts = 0;\n private _externalPartnerDetailMaxAttempts = 10;\n\n constructor(private _bsApiService: BsApiService, private _router: Router, private _modalService: SimpleGlobalModalService) {}\n\n getPartners(type: string, partnerKey?: string) {\n this._bsApiService\n .get<ExternalPartnerResponse>(this.apiName, `${this._endpoint}?type=${type}`)\n .pipe(\n take(1),\n tap((lenders) => {\n if (lenders.payload.partners && lenders.payload.partners.length > 0) {\n this._externalPartners$.next(lenders.payload.partners);\n if (partnerKey) {\n this.getPartnerDetails(type, partnerKey);\n }\n }\n })\n )\n .subscribe({\n error: (err) => {\n this._modalService.createGenericErrorModal('external_lenders', () => {\n this.getPartners(type, partnerKey);\n this._modalService.clearModal();\n });\n },\n });\n }\n\n getPartnerDetails(type: string, partnerKey: string) {\n this._externalPartnerAttempts++;\n\n if (this._externalPartnerAttempts > this._externalPartnerDetailMaxAttempts) {\n this.partnerNotFound();\n return;\n }\n\n if (this._externalPartners$.value && this._externalPartners$.value.length > 0) {\n const details = this._externalPartners$.value.find((partner) => partner.key === partnerKey);\n\n if (details) {\n this._currentPartnerDetails$.next(details);\n this._externalPartnerAttempts = 0;\n } else {\n this.partnerNotFound();\n }\n } else {\n setTimeout(() => this.getPartners(type, partnerKey), 100);\n }\n }\n\n postToExternalPartner(partnerKey: string): void {\n this._bsApiService.post(this.apiName, `${this._endpoint}`, { partnerKey }).subscribe();\n }\n\n resetExternalPartnerDetails() {\n this._currentPartnerDetails$.next(undefined);\n }\n\n private partnerNotFound() {\n this._router.navigate(['home']);\n }\n}\n","//! moment.js locale configuration\n//! locale : English (Australia) [en-au]\n//! author : Jared Morse : https://github.com/jarcoal\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enAu = moment.defineLocale('en-au', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A',\n },\n calendar: {\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 relativeTime: {\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 M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((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 week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return enAu;\n\n})));\n","import {\n ControlValueAccessor,\n FormControl,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ValidationErrors,\n Validator,\n} from '@angular/forms';\nimport { Directive, forwardRef, HostListener, Inject, Input, OnChanges, SimpleChanges } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\n\nimport { CustomKeyboardEvent } from './custom-keyboard-event';\nimport { config, IConfig, timeMasks, withoutValidation } from './config';\nimport { MaskService } from './mask.service';\n\n// tslint:disable deprecation\n// tslint:disable no-input-rename\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'input[mask], textarea[mask]',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MaskDirective),\n multi: true,\n },\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MaskDirective),\n multi: true,\n },\n MaskService,\n ],\n})\nexport class MaskDirective implements ControlValueAccessor, OnChanges, Validator {\n @Input('mask') public maskExpression = '';\n @Input() public specialCharacters: IConfig['specialCharacters'] = [];\n @Input() public patterns: IConfig['patterns'] = {};\n @Input() public prefix: IConfig['prefix'] = '';\n @Input() public suffix: IConfig['suffix'] = '';\n @Input() public thousandSeparator: IConfig['thousandSeparator'] = ' ';\n @Input() public decimalMarker: IConfig['decimalMarker'] = '.';\n @Input() public dropSpecialCharacters: IConfig['dropSpecialCharacters'] | null = null;\n @Input() public hiddenInput: IConfig['hiddenInput'] | null = null;\n @Input() public showMaskTyped: IConfig['showMaskTyped'] | null = null;\n @Input() public placeHolderCharacter: IConfig['placeHolderCharacter'] | null = null;\n @Input() public shownMaskExpression: IConfig['shownMaskExpression'] | null = null;\n @Input() public showTemplate: IConfig['showTemplate'] | null = null;\n @Input() public clearIfNotMatch: IConfig['clearIfNotMatch'] | null = null;\n @Input() public validation: IConfig['validation'] | null = null;\n @Input() public separatorLimit: IConfig['separatorLimit'] | null = null;\n @Input() public allowNegativeNumbers: IConfig['allowNegativeNumbers'] | null = null;\n private _maskValue = '';\n private _inputValue!: string;\n private _position: number | null = null;\n private _start!: number;\n private _end!: number;\n private _code!: string;\n private _maskExpressionArray: string[] = [];\n\n public constructor(\n @Inject(DOCUMENT) private document: any,\n private _maskService: MaskService,\n @Inject(config) protected _config: IConfig\n ) {}\n\n public onChange = (_: any) => {};\n public onTouch = () => {};\n\n public ngOnChanges(changes: SimpleChanges): void {\n const {\n maskExpression,\n specialCharacters,\n patterns,\n prefix,\n suffix,\n thousandSeparator,\n decimalMarker,\n dropSpecialCharacters,\n hiddenInput,\n showMaskTyped,\n placeHolderCharacter,\n shownMaskExpression,\n showTemplate,\n clearIfNotMatch,\n validation,\n separatorLimit,\n allowNegativeNumbers,\n } = changes;\n if (maskExpression) {\n this._maskValue = maskExpression.currentValue || '';\n if (maskExpression.currentValue && maskExpression.currentValue.split('||').length > 1) {\n this._maskExpressionArray = maskExpression.currentValue.split('||').sort((a: string, b: string) =>\n a.length - b.length\n );\n this._maskValue = this._maskExpressionArray[0];\n this.maskExpression = this._maskExpressionArray[0];\n this._maskService.maskExpression = this._maskExpressionArray[0];\n }\n }\n if (specialCharacters) {\n if (!specialCharacters.currentValue || !Array.isArray(specialCharacters.currentValue)) {\n return;\n } else {\n this._maskService.maskSpecialCharacters = specialCharacters.currentValue || [];\n }\n }\n // Only overwrite the mask available patterns if a pattern has actually been passed in\n if (patterns && patterns.currentValue) {\n this._maskService.maskAvailablePatterns = patterns.currentValue;\n }\n if (prefix) {\n this._maskService.prefix = prefix.currentValue;\n }\n if (suffix) {\n this._maskService.suffix = suffix.currentValue;\n }\n if (thousandSeparator) {\n this._maskService.thousandSeparator = thousandSeparator.currentValue;\n }\n if (decimalMarker) {\n this._maskService.decimalMarker = decimalMarker.currentValue;\n }\n if (dropSpecialCharacters) {\n this._maskService.dropSpecialCharacters = dropSpecialCharacters.currentValue;\n }\n if (hiddenInput) {\n this._maskService.hiddenInput = hiddenInput.currentValue;\n }\n if (showMaskTyped) {\n this._maskService.showMaskTyped = showMaskTyped.currentValue;\n }\n if (placeHolderCharacter) {\n this._maskService.placeHolderCharacter = placeHolderCharacter.currentValue;\n }\n if (shownMaskExpression) {\n this._maskService.shownMaskExpression = shownMaskExpression.currentValue;\n }\n if (showTemplate) {\n this._maskService.showTemplate = showTemplate.currentValue;\n }\n if (clearIfNotMatch) {\n this._maskService.clearIfNotMatch = clearIfNotMatch.currentValue;\n }\n if (validation) {\n this._maskService.validation = validation.currentValue;\n }\n if (separatorLimit) {\n this._maskService.separatorLimit = separatorLimit.currentValue;\n }\n if (allowNegativeNumbers) {\n this._maskService.allowNegativeNumbers = allowNegativeNumbers.currentValue;\n if (this._maskService.allowNegativeNumbers) {\n this._maskService.maskSpecialCharacters = this._maskService.maskSpecialCharacters.filter(\n (c: string) => c !== '-'\n );\n }\n }\n this._applyMask();\n }\n\n // tslint:disable-next-line: cyclomatic-complexity\n public validate({ value }: FormControl): ValidationErrors | null {\n if (!this._maskService.validation || !this._maskValue) {\n return null;\n }\n if (this._maskService.ipError) {\n return this._createValidationError(value);\n }\n if (this._maskService.cpfCnpjError) {\n return this._createValidationError(value);\n }\n if (this._maskValue.startsWith('separator')) {\n return null;\n }\n if (withoutValidation.includes(this._maskValue)) {\n return null;\n }\n if (this._maskService.clearIfNotMatch) {\n return null;\n }\n if (timeMasks.includes(this._maskValue)) {\n return this._validateTime(value);\n }\n if (value && value.toString().length >= 1) {\n let counterOfOpt = 0;\n for (const key in this._maskService.maskAvailablePatterns) {\n if (\n this._maskService.maskAvailablePatterns[key].optional &&\n this._maskService.maskAvailablePatterns[key].optional === true\n ) {\n if (this._maskValue.indexOf(key) !== this._maskValue.lastIndexOf(key)) {\n const opt: string = this._maskValue\n .split('')\n .filter((i: string) => i === key)\n .join('');\n counterOfOpt += opt.length;\n } else if (this._maskValue.indexOf(key) !== -1) {\n counterOfOpt++;\n }\n if (this._maskValue.indexOf(key) !== -1 && value.toString().length >= this._maskValue.indexOf(key)) {\n return null;\n }\n if (counterOfOpt === this._maskValue.length) {\n return null;\n }\n }\n }\n if (\n this._maskValue.indexOf('{') === 1 &&\n value.toString().length === this._maskValue.length + Number(this._maskValue.split('{')[1].split('}')[0]) - 4\n ) {\n return null;\n }\n if (this._maskValue.indexOf('*') === 1 || this._maskValue.indexOf('?') === 1) {\n return null;\n } else if (\n (this._maskValue.indexOf('*') > 1 && value.toString().length < this._maskValue.indexOf('*')) ||\n (this._maskValue.indexOf('?') > 1 && value.toString().length < this._maskValue.indexOf('?')) ||\n this._maskValue.indexOf('{') === 1\n ) {\n return this._createValidationError(value);\n }\n if (this._maskValue.indexOf('*') === -1 || this._maskValue.indexOf('?') === -1) {\n const length: number = this._maskService.dropSpecialCharacters\n ? this._maskValue.length - this._maskService.checkSpecialCharAmount(this._maskValue) - counterOfOpt\n : this._maskValue.length - counterOfOpt;\n if (value.toString().length < length) {\n return this._createValidationError(value);\n }\n }\n }\n return null;\n }\n\n @HostListener('input', ['$event'])\n public onInput(e: CustomKeyboardEvent): void {\n const el: HTMLInputElement = e.target as HTMLInputElement;\n this._inputValue = el.value;\n\n this._setMask();\n\n if (!this._maskValue) {\n this.onChange(el.value);\n return;\n }\n const position: number =\n el.selectionStart === 1\n ? (el.selectionStart as number) + this._maskService.prefix.length\n : (el.selectionStart as number);\n let caretShift = 0;\n let backspaceShift = false;\n this._maskService.applyValueChanges(position, (shift: number, _backspaceShift: boolean) => {\n caretShift = shift;\n backspaceShift = _backspaceShift;\n });\n // only set the selection if the element is active\n if (this.document.activeElement !== el) {\n return;\n }\n this._position = this._position === 1 && this._inputValue.length === 1 ? null : this._position;\n let positionToApply: number = this._position\n ? this._inputValue.length + position + caretShift\n : position + (this._code === 'Backspace' && !backspaceShift ? 0 : caretShift);\n if (positionToApply > this._getActualInputLength()) {\n positionToApply = this._getActualInputLength();\n }\n el.setSelectionRange(positionToApply, positionToApply);\n if ((this.maskExpression.includes('H') || this.maskExpression.includes('M')) && caretShift === 0) {\n el.setSelectionRange((el.selectionStart as number) + 1, (el.selectionStart as number) + 1);\n }\n this._position = null;\n }\n\n @HostListener('blur')\n public onBlur(): void {\n if (this._maskValue) {\n this._maskService.clearIfNotMatchFn();\n }\n this.onTouch();\n }\n\n @HostListener('click', ['$event'])\n public onFocus(e: MouseEvent | CustomKeyboardEvent): void {\n if (!this._maskValue) {\n return;\n }\n const el: HTMLInputElement = e.target as HTMLInputElement;\n const posStart = 0;\n const posEnd = 0;\n if (\n el !== null &&\n el.selectionStart !== null &&\n el.selectionStart === el.selectionEnd &&\n el.selectionStart > this._maskService.prefix.length &&\n // tslint:disable-next-line\n (e as any).keyCode !== 38\n )\n if (this._maskService.showMaskTyped) {\n // We are showing the mask in the input\n this._maskService.maskIsShown = this._maskService.showMaskInInput();\n if (el.setSelectionRange && this._maskService.prefix + this._maskService.maskIsShown === el.value) {\n // the input ONLY contains the mask, so position the cursor at the start\n el.focus();\n el.setSelectionRange(posStart, posEnd);\n } else {\n // the input contains some characters already\n if (el.selectionStart > this._maskService.actualValue.length) {\n // if the user clicked beyond our value's length, position the cursor at the end of our value\n el.setSelectionRange(this._maskService.actualValue.length, this._maskService.actualValue.length);\n }\n }\n }\n const nextValue: string | null =\n !el.value || el.value === this._maskService.prefix\n ? this._maskService.prefix + this._maskService.maskIsShown\n : el.value;\n\n /** Fix of cursor position jumping to end in most browsers no matter where cursor is inserted onFocus */\n if (el.value !== nextValue) {\n el.value = nextValue;\n }\n\n /** fix of cursor position with prefix when mouse click occur */\n if (((el.selectionStart as number) || (el.selectionEnd as number)) <= this._maskService.prefix.length) {\n el.selectionStart = this._maskService.prefix.length;\n return;\n }\n\n /** select only inserted text */\n if ((el.selectionEnd as number) > this._getActualInputLength()) {\n el.selectionEnd = this._getActualInputLength();\n }\n }\n\n // tslint:disable-next-line: cyclomatic-complexity\n @HostListener('keydown', ['$event'])\n public onKeyDown(e: CustomKeyboardEvent): void {\n if (!this._maskValue) {\n return;\n }\n this._code = e.code ? e.code : e.key;\n const el: HTMLInputElement = e.target as HTMLInputElement;\n this._inputValue = el.value;\n\n this._setMask();\n\n if (e.keyCode === 38) {\n e.preventDefault();\n }\n if (e.keyCode === 37 || e.keyCode === 8 || e.keyCode === 46) {\n if (e.keyCode === 8 && el.value.length === 0) {\n el.selectionStart = el.selectionEnd;\n }\n if (e.keyCode === 8 && (el.selectionStart as number) !== 0) {\n // If specialChars is false, (shouldn't ever happen) then set to the defaults\n this.specialCharacters = this.specialCharacters || this._config.specialCharacters;\n if (this.prefix.length > 1 && (el.selectionStart as number) <= this.prefix.length) {\n el.setSelectionRange(this.prefix.length, this.prefix.length);\n } else {\n if (this._inputValue.length !== (el.selectionStart as number) && (el.selectionStart as number) !== 1) {\n while (\n this.specialCharacters.includes(this._inputValue[(el.selectionStart as number) - 1].toString()) &&\n ((this.prefix.length >= 1 && (el.selectionStart as number) > this.prefix.length) ||\n this.prefix.length === 0)\n ) {\n el.setSelectionRange((el.selectionStart as number) - 1, (el.selectionStart as number) - 1);\n }\n }\n this.suffixCheckOnPressDelete(e.keyCode, el);\n }\n }\n this.suffixCheckOnPressDelete(e.keyCode, el);\n if (\n this._maskService.prefix.length &&\n (el.selectionStart as number) <= this._maskService.prefix.length &&\n (el.selectionEnd as number) <= this._maskService.prefix.length\n ) {\n e.preventDefault();\n }\n const cursorStart: number | null = el.selectionStart;\n // this.onFocus(e);\n if (\n e.keyCode === 8 &&\n !el.readOnly &&\n cursorStart === 0 &&\n el.selectionEnd === el.value.length &&\n el.value.length !== 0\n ) {\n this._position = this._maskService.prefix ? this._maskService.prefix.length : 0;\n this._maskService.applyMask(this._maskService.prefix, this._maskService.maskExpression, this._position);\n }\n }\n if (\n !!this.suffix &&\n this.suffix.length > 1 &&\n this._inputValue.length - this.suffix.length < (el.selectionStart as number)\n ) {\n el.setSelectionRange(this._inputValue.length - this.suffix.length, this._inputValue.length);\n } else if (\n (e.keyCode === 65 && e.ctrlKey === true) || // Ctrl+ A\n (e.keyCode === 65 && e.metaKey === true) // Cmd + A (Mac)\n ) {\n el.setSelectionRange(0, this._getActualInputLength());\n e.preventDefault();\n }\n this._maskService.selStart = el.selectionStart;\n this._maskService.selEnd = el.selectionEnd;\n }\n\n /** It writes the value in the input */\n public async writeValue(inputValue: string | number): Promise<void> {\n if (inputValue === undefined) {\n inputValue = '';\n }\n if (typeof inputValue === 'number') {\n inputValue = String(inputValue);\n inputValue = this.decimalMarker !== '.' ? inputValue.replace('.', this.decimalMarker) : inputValue;\n this._maskService.isNumberValue = true;\n }\n if (\n (inputValue && this._maskService.maskExpression) ||\n (this._maskService.maskExpression && (this._maskService.prefix || this._maskService.showMaskTyped))\n ) {\n // Let the service we know we are writing value so that triggering onChange function wont happen during applyMask\n this._maskService.writingValue = true;\n this._maskService.formElementProperty = [\n 'value',\n this._maskService.applyMask(inputValue, this._maskService.maskExpression),\n ];\n // Let the service know we've finished writing value\n this._maskService.writingValue = false;\n } else {\n this._maskService.formElementProperty = ['value', inputValue];\n }\n this._inputValue = inputValue;\n }\n\n public registerOnChange(fn: any): void {\n this.onChange = fn;\n this._maskService.onChange = this.onChange;\n }\n\n public registerOnTouched(fn: any): void {\n this.onTouch = fn;\n }\n\n public suffixCheckOnPressDelete(keyCode: number, el: HTMLInputElement): void {\n if (keyCode === 46 && this.suffix.length > 0) {\n if (this._inputValue.length - this.suffix.length <= (el.selectionStart as number)) {\n el.setSelectionRange(this._inputValue.length - this.suffix.length, this._inputValue.length);\n }\n }\n if (keyCode === 8) {\n if (this.suffix.length > 1 && this._inputValue.length - this.suffix.length < (el.selectionStart as number)) {\n el.setSelectionRange(this._inputValue.length - this.suffix.length, this._inputValue.length);\n }\n if (this.suffix.length === 1 && this._inputValue.length === (el.selectionStart as number)) {\n el.setSelectionRange((el.selectionStart as number) - 1, (el.selectionStart as number) - 1);\n }\n }\n }\n\n /** It disables the input element */\n public setDisabledState(isDisabled: boolean): void {\n this._maskService.formElementProperty = ['disabled', isDisabled];\n }\n\n @HostListener('ngModelChange', ['$event'])\n // tslint:disable-next-line: no-any\n public onModelChange(e: any): void {\n if (!e) {\n this._maskService.actualValue = '';\n }\n }\n\n private _repeatPatternSymbols(maskExp: string): string {\n return (\n (maskExp.match(/{[0-9]+}/) &&\n maskExp.split('').reduce((accum: string, currval: string, index: number): string => {\n this._start = currval === '{' ? index : this._start;\n\n if (currval !== '}') {\n return this._maskService._findSpecialChar(currval) ? accum + currval : accum;\n }\n this._end = index;\n const repeatNumber = Number(maskExp.slice(this._start + 1, this._end));\n const repaceWith: string = new Array(repeatNumber + 1).join(maskExp[this._start - 1]);\n return accum + repaceWith;\n }, '')) ||\n maskExp\n );\n }\n // tslint:disable-next-line:no-any\n private _applyMask(): any {\n this._maskService.maskExpression = this._repeatPatternSymbols(this._maskValue || '');\n this._maskService.formElementProperty = [\n 'value',\n this._maskService.applyMask(this._inputValue, this._maskService.maskExpression),\n ];\n }\n\n private _validateTime(value: string): ValidationErrors | null {\n const rowMaskLen: number = this._maskValue.split('').filter((s: string) => s !== ':').length;\n if (value === null || value.length === 0) {\n return null; // Don't validate empty values to allow for optional form control\n }\n\n if ((+value[value.length - 1] === 0 && value.length < rowMaskLen) || value.length <= rowMaskLen - 2) {\n return this._createValidationError(value);\n }\n\n return null;\n }\n\n private _getActualInputLength() {\n return (\n this._maskService.actualValue.length || this._maskService.actualValue.length + this._maskService.prefix.length\n );\n }\n\n private _createValidationError(actualValue: string): ValidationErrors {\n return {\n mask: {\n requiredMask: this._maskValue,\n actualValue,\n },\n };\n }\n\n private _setMask() {\n if (this._maskExpressionArray.length > 0) {\n this._maskExpressionArray.some(mask => {\n const test = this._maskService.removeMask(this._inputValue).length <= this._maskService.removeMask(mask).length;\n if (this._inputValue && test) {\n this._maskValue = mask;\n this.maskExpression = mask;\n this._maskService.maskExpression = mask;\n return test;\n } else {\n this._maskValue = this._maskExpressionArray[this._maskExpressionArray.length - 1];\n this.maskExpression = this._maskExpressionArray[this._maskExpressionArray.length - 1];\n this._maskService.maskExpression = this._maskExpressionArray[this._maskExpressionArray.length - 1];\n }\n });\n }\n }\n}\n","//! moment.js locale configuration\n//! locale : Estonian [et]\n//! author : Henry Kehlmann : https://github.com/madhenry\n//! improvements : Illimar Tambek : https://github.com/ragulka\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'],\n ss: [number + 'sekundi', number + 'sekundit'],\n m: ['ühe minuti', 'üks minut'],\n mm: [number + ' minuti', number + ' minutit'],\n h: ['ühe tunni', 'tund aega', 'üks tund'],\n hh: [number + ' tunni', number + ' tundi'],\n d: ['ühe päeva', 'üks päev'],\n M: ['kuu aja', 'kuu aega', 'üks kuu'],\n MM: [number + ' kuu', number + ' kuud'],\n y: ['ühe aasta', 'aasta', 'üks aasta'],\n yy: [number + ' aasta', number + ' aastat'],\n };\n if (withoutSuffix) {\n return format[key][2] ? format[key][2] : format[key][1];\n }\n return isFuture ? format[key][0] : format[key][1];\n }\n\n var et = moment.defineLocale('et', {\n months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split(\n '_'\n ),\n monthsShort:\n 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'),\n weekdays:\n 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split(\n '_'\n ),\n weekdaysShort: 'P_E_T_K_N_R_L'.split('_'),\n weekdaysMin: 'P_E_T_K_N_R_L'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[Täna,] LT',\n nextDay: '[Homme,] LT',\n nextWeek: '[Järgmine] dddd LT',\n lastDay: '[Eile,] LT',\n lastWeek: '[Eelmine] dddd LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s pärast',\n past: '%s tagasi',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: '%d päeva',\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return et;\n\n})));\n","import { inject, Injectable } from '@angular/core';\nimport { FirebaseService, MobileStateService } from '@brightside-web/desktop/data-access/shared';\nimport { BsAuthService, BsHubService } from '@brightside-web/desktop/data-access/core-services';\nimport { tap } from 'rxjs';\n\nexport enum MaintenanceProductType {\n External = 'external',\n Savings = 'savings',\n Spending = 'spending',\n Web = 'web',\n Contest = 'contest',\n Mpap = 'mpap',\n HelpingHandsConsents = 'helpinghandsconsents',\n HelpingHands = 'helpinghands',\n LoanDashboard = 'loandashboard',\n Loans = 'loans',\n Credit = 'credit',\n FindMoneyIntro = 'findmoneyintro',\n FindMoney = 'findmoney',\n TermsUpdate = 'termsupdate',\n AutoSave = 'autosave',\n Survey = 'survey',\n Chat = 'chat',\n ChatHistory = 'chathistory'\n}\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class MaintenanceService {\n\n _bsHubService: BsHubService = inject(BsHubService);\n\n private _rules: {rules:{ regex: string; product: string; inMaintenance: boolean }[]};\n private _productMaintenanceMap: { [product: string]: boolean } = {};\n private _appInMaintenance = false;\n\n constructor(\n private _analytics: FirebaseService,\n private _msSvc: MobileStateService,\n private _bsAuthService: BsAuthService,\n ) {\n this._analytics.ensureInitialized().then(() => {\n this.getRules();\n });\n this._bsHubService.listen('bsAuth', (data)=>{\n switch (data.payload.event) {\n case 'signedIn':\n this.getMobileStateRedirect();\n break;\n }\n });\n }\n\n private getRules() {\n try {\n this._rules = JSON.parse(this._analytics.getValueAsString('domainMappingPaths'));\n this.reduceRulesToMaintenanceMap();\n } catch (e) {\n setTimeout(()=>{\n // keep trying until we get the rules\n this.getRules();\n },150);\n }\n }\n\n private reduceRulesToMaintenanceMap() {\n this._rules.rules.forEach(rule => {\n const { product, inMaintenance } = rule;\n // Set to true if any rule for the product has inMaintenance: true\n if (inMaintenance) {\n this._productMaintenanceMap[product] = true;\n } else if (!(product in this._productMaintenanceMap)) {\n // Only set to false if no previous true flag was set\n this._productMaintenanceMap[product] = false;\n }\n });\n }\n\n public isProductInMaintenance(productType: string): boolean {\n return this._productMaintenanceMap[productType] || false;\n }\n\n public isAppInMaintenance():boolean {\n return this._appInMaintenance;\n }\n\n getMobileStateRedirect() {\n this._bsAuthService.fetchUserAttributes().pipe(\n tap(attributes => {\n if (attributes.guid) {\n this._msSvc.get().subscribe({\n next: ms => {\n if (ms.redirect === '/maintenance') {\n this._appInMaintenance = true;\n }\n }\n })\n }\n })\n ).subscribe();\n }\n}\n","import { Component } from '@angular/core';\nimport { MaintenanceService } from '../maintenance.service';\n\n@Component({\n selector: 'brightside-web-maintenance-page',\n templateUrl: './maintenance-page.component.html',\n styleUrls: ['./maintenance-page.component.scss'],\n})\nexport class MaintenancePageComponent {\n constructor(\n private maintenanceService:MaintenanceService\n ) { }\n}\n","<div id=\"maintenance-wrapper\">\n <bw-action-article [brightsideWebFb]=\"{event_name: 'app_maintenance'}\">\n <div pre-title>\n <img class=\"mb-sm\" src=\"../assets/maintenance-pig.png\" />\n </div>\n <div header-title>\n <typography title-large color=\"var(--primary-text)\">\n {{ 'APP_MAINTENANCE_TITLE' | translate }}\n </typography>\n </div>\n <div content-section>\n <bw-paragraph>{{ 'APP_MAINTENANCE_DESC' | translate }}</bw-paragraph>\n\n </div>\n </bw-action-article>\n</div>\n","import { Component } from '@angular/core';\nimport { Router } from '@angular/router';\n\n@Component({\n selector: 'brightside-web-maintenance-feature',\n templateUrl: './maintenance-feature.component.html',\n styleUrls: ['./maintenance-feature.component.scss'],\n})\nexport class MaintenanceFeatureComponent {\n constructor(\n private _router: Router,\n ) {\n }\n goHome() {\n this._router.navigate(['home']);\n }\n}\n","<div>\n <bw-action-article [brightsideWebFb]=\"{event_name: 'maintenance'}\">\n <div pre-title>\n <img class=\"mb-sm\" src=\"../assets/warning-cone.png\" />\n </div>\n <div header-title>\n <typography title-large color=\"var(--primary-text)\">\n <span [innerHTML]=\"'MAINTENANCE_TITLE' | translate\"></span>\n </typography>\n </div>\n <div content-section>\n <bw-paragraph>{{ 'MAINTENANCE_DESC' | translate }}</bw-paragraph>\n </div>\n <div footer-actions class=\"flex-row flex-item-flexible space-between\">\n <button\n bw-button\n type=\"submit\"\n [brightsideWebFb]=\"{ event_name: 'maintenance'}\"\n (click)=\"goHome()\"\n >\n {{ 'CLOSE' | translate }}\n </button>\n </div>\n </bw-action-article>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MaintenancePageComponent } from './maintenance-page/maintenance-page.component';\nimport { RouterModule, Routes } from '@angular/router';\nimport { BrightsideUiModule } from '@brightside/brightside-ui';\nimport { AuthGuard, OnboardingCompleteGuard, SharedDesktopModule } from '@brightside-web/shared/desktop';\nimport { MicroUiMoleculeModule } from '@micro-ui/molecule';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { MaintenanceFeatureComponent } from './maintenance-feature/maintenance-feature.component';\nimport { LayoutStyle } from '@micro-core/utility';\n\nconst ROUTES: Routes = [\n {\n path: '',\n component: MaintenancePageComponent,\n pathMatch: 'full',\n data: {appDisplayStyle: LayoutStyle.FULL_SCREEN}\n },\n {\n path: 'feature',\n component: MaintenanceFeatureComponent,\n canActivate: [AuthGuard, OnboardingCompleteGuard]\n },\n];\n\n@NgModule({\n imports: [\n CommonModule,\n RouterModule.forChild(ROUTES),\n BrightsideUiModule,\n SharedDesktopModule,\n MicroUiMoleculeModule,\n TranslateModule,\n ],\n declarations: [MaintenancePageComponent, MaintenanceFeatureComponent],\n})\nexport class DesktopFeatureMaintenanceModule {}\n","import { Injectable } from '@angular/core';\nimport { CanActivate, CanLoad, Route, Router, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';\nimport { MaintenanceService } from './maintenance.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class MaintenanceGuard implements CanActivate, CanLoad {\n\n constructor(\n private maintenanceService: MaintenanceService,\n private router: Router\n ) {}\n\n canActivate(\n route: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): boolean {\n const productType = route.data['product'] as string;\n\n if (productType && this.maintenanceService.isProductInMaintenance(productType)) {\n this.router.navigate(['/maintenance/feature']);\n return false;\n }\n\n return true;\n }\n\n canLoad(route: Route): boolean {\n const productType = route.data?.['product'] as string;\n\n if (productType && this.maintenanceService.isProductInMaintenance(productType)) {\n this.router.navigate(['/maintenance/feature']);\n return false;\n }\n return true;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { CanActivate, CanLoad, Router, Route, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { MaintenanceService } from './maintenance.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class MaintenanceRedirectGuard implements CanActivate, CanLoad {\n\n constructor(private maintenanceService: MaintenanceService, private router: Router) {}\n\n // CanActivate guard to protect activated routes\n canActivate(\n route: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): boolean {\n return this.checkMaintenance(route.routeConfig?.path);\n }\n\n // CanLoad guard to protect lazy-loaded modules\n canLoad(route: Route): boolean {\n return this.checkMaintenance(route.path);\n }\n\n // Helper function to check maintenance status and perform redirection if necessary\n private checkMaintenance(routePath: string | undefined): boolean {\n if (this.maintenanceService.isAppInMaintenance() && routePath !== 'maintenance') {\n this.router.navigate(['/maintenance']);\n return false;\n }\n return true;\n }\n}\n","<bw-action-article\n [pinnedFooter]=\"false\"\n [minHeight]=\"minHeight\"\n [brightsideWebFb]=\"{ event_name: 'employee_id_collect'}\"\n*ngIf=\"company\">\n <ui-nav-exit-back *ngIf=\"displayBackButton\" back-action-bottom [trackingDetail]=\"{ event_name: 'employee_id_collect' }\" (exitActionHandler)=\"handleBackClick()\"></ui-nav-exit-back>\n\n <div header-title class=\"mb-sm\">\n <typography *ngIf=\"companyReload\" title-medium>{{ 'ALIAS_COLLECT_TITLE' | translate }}</typography>\n </div>\n <div *ngIf=\"companyReload\" content-section>\n <p text-large-regular class=\"mb-md\" color=\"var(--secondary-text)\">\n {{ 'ALIAS_COLLECT_DESC' | translate }}\n </p>\n <form *ngIf=\"isFormReady\" [formGroup]=\"employeeAliasForm\" (submit)=\"onSubmit()\">\n <div class=\"flex-row flex-start flex-wrap mb-sm\">\n <div class=\"mr-sm mb-sm flex-item-flexible max-form-width\">\n <bw-input\n [isCustomControl]=\"true\"\n label=\"{{ 'ALIAS_TITLE' | translate }}\"\n [inputError]=\"true\"\n [inputErrorText]=\"errorTextKey | translate \">\n <input type=\"text\" class=\"body\" formControlName=\"uniqueId\" />\n </bw-input>\n <ng-container *ngIf=\"uniqueIdFormElement.aliasValidatorRules.consentsKey\">\n <bw-checkbox formControlName=\"consentItem\">\n <typography *ngIf=\"('ALIAS_CONSENT_TITLE' | translate) !== ' '\" text-medium-semibold color=\"var(--primary-text)\">\n {{ 'ALIAS_CONSENT_TITLE' | translate }}\n </typography>\n <typography text-medium-regular color=\"var(--secondary-text)\"\n [innerHTML]=\"'ALIAS_CONSENT_DESC' | translate:{linkPath: consentPath}\"></typography>\n </bw-checkbox>\n </ng-container>\n </div>\n\n </div>\n </form>\n <bw-caption [centerAlign]=\"centerAlignCaption\" verticalSpace=\"24\">\n <a\n bw-anchor\n anchorStyle=\"text-small-regular\"\n anchorUnderline=\"true\"\n target=\"_blank\"\n (click)=\"showBadgeHelpModal = true\"\n [innerHTML]=\"'BADGE_ID_HELP' | translate\"\n ></a>\n </bw-caption>\n </div>\n <div footer-actions class=\"flex-column full-width\">\n <typography *ngIf=\"('ALIAS_FOOTER_DESC' | translate) !== ' '\"\n text-small-regular\n color=\"var(--secondary-text)\"\n style=\"margin-bottom: 24px\">\n {{ 'ALIAS_FOOTER_DESC' | translate }}\n </typography>\n <button *ngIf=\"isFormReady && !disableSubmit\"\n bw-button\n [processing]=\"processing\"\n [disabled]=\"employeeAliasForm?.invalid\"\n (click)=\"onSubmit()\"\n [brightsideWebFb]=\"{ event_name: 'employee_id_collect'}\">\n {{ submitCtaCopy }}\n </button>\n <ng-container *ngIf=\"disableSubmit\">\n <button\n bw-button\n [processing]=\"processing\"\n disabled=\"true\"\n style=\"background-color: var(--blue-20)\">\n {{ submitCtaCopy }}\n </button>\n </ng-container>\n </div>\n\n</bw-action-article>\n\n<bw-modal *ngIf=\"showBadgeHelpModal\"\n (closeModal)=\"showBadgeHelpModal = false; analytics.logEvent('employee_id_moreinfo_dismissed')\"\n [brightsideWebFb]=\"{ event_name: 'employee_id_moreinfo' }\">\n <typography title-medium color=\"var(--gray-70)\">{{ 'BADGE_ID_HELP_HALFSHEET_TITLE' | translate }}</typography>\n <section class=\"body\">\n <bw-paragraph [textStyle]=\"'Body2'\" color=\"var(--gray-50)\">\n {{ 'BADGE_ID_HELP_HALFSHEET_DESC' | translate }}\n </bw-paragraph>\n </section>\n <footer class=\"footer\">\n <div class=\"flex-row row-reverse\">\n <button\n bw-button\n (click)=\"showBadgeHelpModal = false\"\n [brightsideWebFb]=\"{ event_name: 'employee_id_moreinfo' }\">\n {{ 'GOT_IT' | translate }}\n </button>\n </div>\n </footer>\n</bw-modal>\n\n<bw-modal\n *ngIf=\"showErrorModal\"\n (closeModal)=\"showErrorModal = false\"\n [brightsideWebFb]=\"{event_name: 'error_shown', custom: {'error id': displayError.errorId }}\"\n [error_view]=\"true\">\n <typography title-medium color=\"var(--gray-70)\">\n {{ displayError.errorTitleKey | translate }}\n </typography>\n <section class=\"body\">\n <bw-paragraph [textStyle]=\"'Body2'\" color=\"var(--gray-50)\">\n {{ displayError.errorDescKey | translate:{phone:supportNumber|phone} }}\n </bw-paragraph>\n </section>\n <footer class=\"footer\">\n <div class=\"flex-row row-reverse\">\n <button\n bw-button\n (click)=\"hideErrorModal()\"\n [brightsideWebFb]=\"{ event_name: displayError.errorId }\">\n {{ displayError.ctaKey | translate }}\n </button>\n </div>\n </footer>\n</bw-modal>\n","import {Component, EventEmitter, Input, Output} from '@angular/core';\n\nimport {FormControl, FormGroup, ValidatorFn, Validators} from \"@angular/forms\";\n\nimport {Subscription} from \"rxjs\";\nimport {\n UniqueIDFormElement,\n DisplayFormControlConfig\n} from \"@brightside-web/shared/desktop\";\nimport {EmployeeAliasPayload, RegistrationService} from \"@brightside-web/desktop/data-access/onboarding\";\nimport {Router} from \"@angular/router\";\nimport {\n AmplitudeService, BadgeIDInterface, CompanyService, FirebaseService,\n ApiResponse, ProfileService, TermsService, ClientConfirmationService, CacheStorageService, ClientConfirmationErrorCode\n} from \"@brightside-web/desktop/data-access/shared\";\n\nimport { BsCacheService } from \"@brightside-web/desktop/data-access/core-services\";\n\nimport * as moment from \"moment\";\nimport {Environment} from \"@brightside-web/micro/core/environment\";\n\n@Component({\n selector: 'brightside-web-badge-id-form',\n templateUrl: './badge-id-form.component.html',\n styleUrls: ['./badge-id-form.component.scss']\n})\nexport class BadgeIdFormComponent {\n\n @Input() minHeight = 576;\n @Input() centerAlignCaption = true;\n @Input() displayBackButton = false;\n @Input() submitCtaCopy = 'Continue';\n\n @Output() aliasSubmitted: EventEmitter<BadgeIDInterface> = new EventEmitter<BadgeIDInterface>();\n @Output() backClicked: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n _company = '';\n\n get company() : string {\n return this._company;\n }\n\n set company(value: string) {\n this._company = value;\n this.companyReloaded();\n this.setUpRulesAndForm();\n }\n\n sub = new Subscription();\n formSub = new Subscription();\n\n companyReload = true;\n employeeAliasForm: FormGroup;\n\n\n uniqueIdFormElement : UniqueIDFormElement;\n\n controls: any[];\n controlConfig: DisplayFormControlConfig;\n\n payload: EmployeeAliasPayload;\n maxRetriesExceeded: boolean;\n alias: string;\n maxRetry = 3;\n\n disableSubmit = false;\n processing = false;\n showProcessError = false;\n processInterval: any;\n\n errorTextKey = '';\n isInvalid = true;\n showBadgeHelpModal = false;\n\n isFormReady = false;\n\n aliasValidatorWithRules: ValidatorFn;\n\n showErrorModal: boolean;\n displayError: ClientConfirmationErrorCode;\n supportNumber: string;// = Cache.getItem('supportNumber');\n canContinue = false;\n cdnUrl: string;\n consentPath: string;\n\n\n constructor(\n private service: RegistrationService,\n private router: Router,\n private analytics: AmplitudeService,\n private firebase: FirebaseService,\n private companyService: CompanyService,\n private profileService: ProfileService,\n private termsService: TermsService,\n private env: Environment,\n private clientConfirmationService: ClientConfirmationService,\n private cacheStorageSvc: CacheStorageService,\n private bsCacheService: BsCacheService\n ) {\n this.cacheStorageSvc.getItem('supportNumber').then(\n supportNumber => {\n this.supportNumber = supportNumber;\n }\n );\n this.uniqueIdFormElement = new UniqueIDFormElement(firebase);\n this.controls = [this.uniqueIdFormElement.CONTROL_UNIQUE_ID];\n this.controlConfig = this.uniqueIdFormElement.CONTROL_UNIQUE_ID;\n\n\n this.bsCacheService.getItem('uniqueIdRetriesExceeded').then(\n uniqueIdRetriesExceeded => {\n this.maxRetriesExceeded = uniqueIdRetriesExceeded;\n if (this.maxRetriesExceeded) {\n this.showMaxRetriesModal();\n }\n }\n );\n\n this.cdnUrl = env.cdnUrl;\n this.sub.add(\n this.companyService.company.subscribe(\n value => {\n if (value) this.company = value;\n }\n )\n )\n }\n\n\n ngOnDestroy() {\n clearInterval(this.processInterval);\n this.sub.unsubscribe();\n this.formSub.unsubscribe();\n }\n\n companyReloaded() {\n this.companyReload = false;\n setTimeout(()=>{\n this.companyReload = true;\n }, 0);\n }\n\n setUpRulesAndForm() {\n this.buildFormFromConfig();\n }\n\n\n private buildFormFromConfig() {\n const controls: { [key: string]: FormControl } = {};\n\n this.aliasValidatorWithRules = this.aliasValidatorWithRules ? this.aliasValidatorWithRules : this.uniqueIdFormElement.aliasValidator(this.company);\n\n if (this.controls) {\n this.controls.forEach((controlConfig: DisplayFormControlConfig) => {\n controls[controlConfig.key] = controlConfig.control;\n });\n if (this.uniqueIdFormElement.aliasValidatorRules.consentsKey) {\n controls['consentItem'] = new FormControl('', [Validators.requiredTrue]);\n this.consentPath = `${this.cdnUrl}terms/${this.uniqueIdFormElement.aliasValidatorRules.consentsKey}.pdf`;\n }\n }\n this.employeeAliasForm = new FormGroup(controls);\n\n const uniqueIdControl = this.employeeAliasForm.get(this.uniqueIdFormElement.CONTROL_UNIQUE_ID.key);\n\n if (uniqueIdControl && !uniqueIdControl.hasValidator(this.aliasValidatorWithRules)) {\n uniqueIdControl.addValidators(this.aliasValidatorWithRules);\n uniqueIdControl.updateValueAndValidity();\n this.formSub.add(\n uniqueIdControl.statusChanges.subscribe(\n value => {\n if (value.toLowerCase() === 'invalid') {\n this.errorTextKey = uniqueIdControl.errors?.errorTextKey;\n } else {\n this.errorTextKey = '';\n }\n }\n )\n );\n }\n this.isFormReady = true;\n }\n\n onSubmit() {\n if (this.processing || this.disableSubmit) {\n return;\n }\n\n this.processing = true;\n this.alias = this.employeeAliasForm.get(this.uniqueIdFormElement.CONTROL_UNIQUE_ID.key)?.value.split('@').join('');\n\n if (this.uniqueIdFormElement.aliasValidatorRules.consentsKey) {\n this.sub.add(\n this.termsService.acceptTerms(this.uniqueIdFormElement.aliasValidatorRules.consentsKey).subscribe(\n response => {\n this.submitUniqueId();\n },\n error => {\n this.submitStatusCheck({statusCode: 400, message: ''});\n }\n )\n )\n } else {\n this.submitPreCheck();\n }\n }\n\n submitPreCheck() {\n if (this.alias) {\n this.sub.add(\n this.service.submitEmployeeAliasPrecheck(this.alias).subscribe(\n response => {\n if (response.statusCode === 200) {\n this.submitUniqueId();\n } else {\n this.submitStatusCheck(response);\n }\n },\n error => {\n const response = error.response.data;\n this.submitStatusCheck(response);\n }\n )\n )\n }\n }\n\n submitUniqueId() {\n if (this.alias) {\n this.sub.add(\n this.service.submitEmployeeAlias(this.alias).subscribe(\n response => {\n this.submitStatusCheck(response);\n },\n error => {\n const response = error.response.data;\n this.submitStatusCheck(response);\n }\n )\n )\n }\n }\n hideErrorModal () {\n if (this.canContinue) {\n this.processing = true;\n this.submitUniqueId();\n } else {\n this.processing = false;\n this.showErrorModal = false;\n }\n this.showErrorModal = false;\n }\n\n showMaxRetriesModal() {\n\n this.bsCacheService.setItem('uniqueIdRetriesExceeded', true, { expires: moment().add(6000, 'seconds').valueOf() });\n this.displayError = this.canContinue ? this.clientConfirmationService.errors['maxSoft'] : this.clientConfirmationService.errors['max'];\n this.disableSubmit = true;\n this.showErrorModal = true;\n }\n\n submitStatusCheck(response: ApiResponse) {\n // switch (response.statusCode) {\n // case 200: case 409:\n // this.aliasSubmitted.emit({status: 'success', response: response});\n // break;\n // case 402: case 403:\n // this.displayError = this.uniqueIdFormElement.errors[response.statusCode];\n // this.uniqueIdFormElement.errors[response.statusCode].errorCount++;\n // this.showErrorModal = true;\n // break;\n // case 404:\n //\n // this.displayError = this.uniqueIdFormElement.errors[404];\n // this.uniqueIdFormElement.errors[404].errorCount++;\n // this.maxRetriesExceeded = this.uniqueIdFormElement.errors[404].errorCount >= this.maxRetry;\n //\n // if (this.maxRetriesExceeded && this.uniqueIdFormElement.aliasValidatorRules.allowDoesNotExist) {\n // this.canContinue = true;\n // this.showMaxRetriesModal();\n // break;\n // } else if (this.maxRetriesExceeded) {\n // this.showMaxRetriesModal();\n // break;\n // }\n // this.showErrorModal = true;\n // break;\n // default:\n // this.showProcessErrorMessage();\n // break;\n // }\n }\n\n handleBackClick() {\n this.analytics.logEvent('employee_id_collect_dismissed');\n this.backClicked.emit(true);\n }\n\n showProcessErrorMessage() {\n this.canContinue = false;\n this.processing = false;\n this.displayError = this.clientConfirmationService.errors['process'];\n this.showErrorModal = true;\n this.disableSubmit = false;\n }\n\n}\n","const instanceOfAny = (object, constructors) => constructors.some((c) => object instanceof c);\n\nlet idbProxyableTypes;\nlet cursorAdvanceMethods;\n// This is a function to prevent it throwing up in node environments.\nfunction getIdbProxyableTypes() {\n return (idbProxyableTypes ||\n (idbProxyableTypes = [\n IDBDatabase,\n IDBObjectStore,\n IDBIndex,\n IDBCursor,\n IDBTransaction,\n ]));\n}\n// This is a function to prevent it throwing up in node environments.\nfunction getCursorAdvanceMethods() {\n return (cursorAdvanceMethods ||\n (cursorAdvanceMethods = [\n IDBCursor.prototype.advance,\n IDBCursor.prototype.continue,\n IDBCursor.prototype.continuePrimaryKey,\n ]));\n}\nconst cursorRequestMap = new WeakMap();\nconst transactionDoneMap = new WeakMap();\nconst transactionStoreNamesMap = new WeakMap();\nconst transformCache = new WeakMap();\nconst reverseTransformCache = new WeakMap();\nfunction promisifyRequest(request) {\n const promise = new Promise((resolve, reject) => {\n const unlisten = () => {\n request.removeEventListener('success', success);\n request.removeEventListener('error', error);\n };\n const success = () => {\n resolve(wrap(request.result));\n unlisten();\n };\n const error = () => {\n reject(request.error);\n unlisten();\n };\n request.addEventListener('success', success);\n request.addEventListener('error', error);\n });\n promise\n .then((value) => {\n // Since cursoring reuses the IDBRequest (*sigh*), we cache it for later retrieval\n // (see wrapFunction).\n if (value instanceof IDBCursor) {\n cursorRequestMap.set(value, request);\n }\n // Catching to avoid \"Uncaught Promise exceptions\"\n })\n .catch(() => { });\n // This mapping exists in reverseTransformCache but doesn't doesn't exist in transformCache. This\n // is because we create many promises from a single IDBRequest.\n reverseTransformCache.set(promise, request);\n return promise;\n}\nfunction cacheDonePromiseForTransaction(tx) {\n // Early bail if we've already created a done promise for this transaction.\n if (transactionDoneMap.has(tx))\n return;\n const done = new Promise((resolve, reject) => {\n const unlisten = () => {\n tx.removeEventListener('complete', complete);\n tx.removeEventListener('error', error);\n tx.removeEventListener('abort', error);\n };\n const complete = () => {\n resolve();\n unlisten();\n };\n const error = () => {\n reject(tx.error || new DOMException('AbortError', 'AbortError'));\n unlisten();\n };\n tx.addEventListener('complete', complete);\n tx.addEventListener('error', error);\n tx.addEventListener('abort', error);\n });\n // Cache it for later retrieval.\n transactionDoneMap.set(tx, done);\n}\nlet idbProxyTraps = {\n get(target, prop, receiver) {\n if (target instanceof IDBTransaction) {\n // Special handling for transaction.done.\n if (prop === 'done')\n return transactionDoneMap.get(target);\n // Polyfill for objectStoreNames because of Edge.\n if (prop === 'objectStoreNames') {\n return target.objectStoreNames || transactionStoreNamesMap.get(target);\n }\n // Make tx.store return the only store in the transaction, or undefined if there are many.\n if (prop === 'store') {\n return receiver.objectStoreNames[1]\n ? undefined\n : receiver.objectStore(receiver.objectStoreNames[0]);\n }\n }\n // Else transform whatever we get back.\n return wrap(target[prop]);\n },\n set(target, prop, value) {\n target[prop] = value;\n return true;\n },\n has(target, prop) {\n if (target instanceof IDBTransaction &&\n (prop === 'done' || prop === 'store')) {\n return true;\n }\n return prop in target;\n },\n};\nfunction replaceTraps(callback) {\n idbProxyTraps = callback(idbProxyTraps);\n}\nfunction wrapFunction(func) {\n // Due to expected object equality (which is enforced by the caching in `wrap`), we\n // only create one new func per func.\n // Edge doesn't support objectStoreNames (booo), so we polyfill it here.\n if (func === IDBDatabase.prototype.transaction &&\n !('objectStoreNames' in IDBTransaction.prototype)) {\n return function (storeNames, ...args) {\n const tx = func.call(unwrap(this), storeNames, ...args);\n transactionStoreNamesMap.set(tx, storeNames.sort ? storeNames.sort() : [storeNames]);\n return wrap(tx);\n };\n }\n // Cursor methods are special, as the behaviour is a little more different to standard IDB. In\n // IDB, you advance the cursor and wait for a new 'success' on the IDBRequest that gave you the\n // cursor. It's kinda like a promise that can resolve with many values. That doesn't make sense\n // with real promises, so each advance methods returns a new promise for the cursor object, or\n // undefined if the end of the cursor has been reached.\n if (getCursorAdvanceMethods().includes(func)) {\n return function (...args) {\n // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n // the original object.\n func.apply(unwrap(this), args);\n return wrap(cursorRequestMap.get(this));\n };\n }\n return function (...args) {\n // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n // the original object.\n return wrap(func.apply(unwrap(this), args));\n };\n}\nfunction transformCachableValue(value) {\n if (typeof value === 'function')\n return wrapFunction(value);\n // This doesn't return, it just creates a 'done' promise for the transaction,\n // which is later returned for transaction.done (see idbObjectHandler).\n if (value instanceof IDBTransaction)\n cacheDonePromiseForTransaction(value);\n if (instanceOfAny(value, getIdbProxyableTypes()))\n return new Proxy(value, idbProxyTraps);\n // Return the same value back if we're not going to transform it.\n return value;\n}\nfunction wrap(value) {\n // We sometimes generate multiple promises from a single IDBRequest (eg when cursoring), because\n // IDB is weird and a single IDBRequest can yield many responses, so these can't be cached.\n if (value instanceof IDBRequest)\n return promisifyRequest(value);\n // If we've already transformed this value before, reuse the transformed value.\n // This is faster, but it also provides object equality.\n if (transformCache.has(value))\n return transformCache.get(value);\n const newValue = transformCachableValue(value);\n // Not all types are transformed.\n // These may be primitive types, so they can't be WeakMap keys.\n if (newValue !== value) {\n transformCache.set(value, newValue);\n reverseTransformCache.set(newValue, value);\n }\n return newValue;\n}\nconst unwrap = (value) => reverseTransformCache.get(value);\n\nexport { reverseTransformCache as a, instanceOfAny as i, replaceTraps as r, unwrap as u, wrap as w };\n","import { w as wrap, r as replaceTraps } from './wrap-idb-value.js';\nexport { u as unwrap, w as wrap } from './wrap-idb-value.js';\n\n/**\n * Open a database.\n *\n * @param name Name of the database.\n * @param version Schema version.\n * @param callbacks Additional callbacks.\n */\nfunction openDB(name, version, { blocked, upgrade, blocking, terminated } = {}) {\n const request = indexedDB.open(name, version);\n const openPromise = wrap(request);\n if (upgrade) {\n request.addEventListener('upgradeneeded', (event) => {\n upgrade(wrap(request.result), event.oldVersion, event.newVersion, wrap(request.transaction), event);\n });\n }\n if (blocked) {\n request.addEventListener('blocked', (event) => blocked(\n // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405\n event.oldVersion, event.newVersion, event));\n }\n openPromise\n .then((db) => {\n if (terminated)\n db.addEventListener('close', () => terminated());\n if (blocking) {\n db.addEventListener('versionchange', (event) => blocking(event.oldVersion, event.newVersion, event));\n }\n })\n .catch(() => { });\n return openPromise;\n}\n/**\n * Delete a database.\n *\n * @param name Name of the database.\n */\nfunction deleteDB(name, { blocked } = {}) {\n const request = indexedDB.deleteDatabase(name);\n if (blocked) {\n request.addEventListener('blocked', (event) => blocked(\n // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405\n event.oldVersion, event));\n }\n return wrap(request).then(() => undefined);\n}\n\nconst readMethods = ['get', 'getKey', 'getAll', 'getAllKeys', 'count'];\nconst writeMethods = ['put', 'add', 'delete', 'clear'];\nconst cachedMethods = new Map();\nfunction getMethod(target, prop) {\n if (!(target instanceof IDBDatabase &&\n !(prop in target) &&\n typeof prop === 'string')) {\n return;\n }\n if (cachedMethods.get(prop))\n return cachedMethods.get(prop);\n const targetFuncName = prop.replace(/FromIndex$/, '');\n const useIndex = prop !== targetFuncName;\n const isWrite = writeMethods.includes(targetFuncName);\n if (\n // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.\n !(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype) ||\n !(isWrite || readMethods.includes(targetFuncName))) {\n return;\n }\n const method = async function (storeName, ...args) {\n // isWrite ? 'readwrite' : undefined gzipps better, but fails in Edge :(\n const tx = this.transaction(storeName, isWrite ? 'readwrite' : 'readonly');\n let target = tx.store;\n if (useIndex)\n target = target.index(args.shift());\n // Must reject if op rejects.\n // If it's a write operation, must reject if tx.done rejects.\n // Must reject with op rejection first.\n // Must resolve with op value.\n // Must handle both promises (no unhandled rejections)\n return (await Promise.all([\n target[targetFuncName](...args),\n isWrite && tx.done,\n ]))[0];\n };\n cachedMethods.set(prop, method);\n return method;\n}\nreplaceTraps((oldTraps) => ({\n ...oldTraps,\n get: (target, prop, receiver) => getMethod(target, prop) || oldTraps.get(target, prop, receiver),\n has: (target, prop) => !!getMethod(target, prop) || oldTraps.has(target, prop),\n}));\n\nexport { deleteDB, openDB };\n","import { Component, ComponentContainer } from '@firebase/component';\nimport { Logger, setUserLogHandler, setLogLevel as setLogLevel$1 } from '@firebase/logger';\nimport { ErrorFactory, base64Decode, getDefaultAppConfig, deepEqual, isBrowser, isWebWorker, FirebaseError, base64urlEncodeWithoutPadding, isIndexedDBAvailable, validateIndexedDBOpenable } from '@firebase/util';\nexport { FirebaseError } from '@firebase/util';\nimport { openDB } from 'idb';\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 */\nclass PlatformLoggerServiceImpl {\n constructor(container) {\n this.container = container;\n }\n // In initial implementation, this will be called by installations on\n // auth token refresh, and installations will send this string.\n getPlatformInfoString() {\n const providers = this.container.getProviders();\n // Loop through providers and get library/version pairs from any that are\n // version components.\n return providers\n .map(provider => {\n if (isVersionServiceProvider(provider)) {\n const service = provider.getImmediate();\n return `${service.library}/${service.version}`;\n }\n else {\n return null;\n }\n })\n .filter(logString => logString)\n .join(' ');\n }\n}\n/**\n *\n * @param provider check if this provider provides a VersionService\n *\n * NOTE: Using Provider<'app-version'> is a hack to indicate that the provider\n * provides VersionService. The provider is not necessarily a 'app-version'\n * provider.\n */\nfunction isVersionServiceProvider(provider) {\n const component = provider.getComponent();\n return (component === null || component === void 0 ? void 0 : component.type) === \"VERSION\" /* ComponentType.VERSION */;\n}\n\nconst name$q = \"@firebase/app\";\nconst version$1 = \"0.11.1\";\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 */\nconst logger = new Logger('@firebase/app');\n\nconst name$p = \"@firebase/app-compat\";\n\nconst name$o = \"@firebase/analytics-compat\";\n\nconst name$n = \"@firebase/analytics\";\n\nconst name$m = \"@firebase/app-check-compat\";\n\nconst name$l = \"@firebase/app-check\";\n\nconst name$k = \"@firebase/auth\";\n\nconst name$j = \"@firebase/auth-compat\";\n\nconst name$i = \"@firebase/database\";\n\nconst name$h = \"@firebase/data-connect\";\n\nconst name$g = \"@firebase/database-compat\";\n\nconst name$f = \"@firebase/functions\";\n\nconst name$e = \"@firebase/functions-compat\";\n\nconst name$d = \"@firebase/installations\";\n\nconst name$c = \"@firebase/installations-compat\";\n\nconst name$b = \"@firebase/messaging\";\n\nconst name$a = \"@firebase/messaging-compat\";\n\nconst name$9 = \"@firebase/performance\";\n\nconst name$8 = \"@firebase/performance-compat\";\n\nconst name$7 = \"@firebase/remote-config\";\n\nconst name$6 = \"@firebase/remote-config-compat\";\n\nconst name$5 = \"@firebase/storage\";\n\nconst name$4 = \"@firebase/storage-compat\";\n\nconst name$3 = \"@firebase/firestore\";\n\nconst name$2 = \"@firebase/vertexai\";\n\nconst name$1 = \"@firebase/firestore-compat\";\n\nconst name = \"firebase\";\nconst version = \"11.3.1\";\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 * The default app name\n *\n * @internal\n */\nconst DEFAULT_ENTRY_NAME = '[DEFAULT]';\nconst PLATFORM_LOG_STRING = {\n [name$q]: 'fire-core',\n [name$p]: 'fire-core-compat',\n [name$n]: 'fire-analytics',\n [name$o]: 'fire-analytics-compat',\n [name$l]: 'fire-app-check',\n [name$m]: 'fire-app-check-compat',\n [name$k]: 'fire-auth',\n [name$j]: 'fire-auth-compat',\n [name$i]: 'fire-rtdb',\n [name$h]: 'fire-data-connect',\n [name$g]: 'fire-rtdb-compat',\n [name$f]: 'fire-fn',\n [name$e]: 'fire-fn-compat',\n [name$d]: 'fire-iid',\n [name$c]: 'fire-iid-compat',\n [name$b]: 'fire-fcm',\n [name$a]: 'fire-fcm-compat',\n [name$9]: 'fire-perf',\n [name$8]: 'fire-perf-compat',\n [name$7]: 'fire-rc',\n [name$6]: 'fire-rc-compat',\n [name$5]: 'fire-gcs',\n [name$4]: 'fire-gcs-compat',\n [name$3]: 'fire-fst',\n [name$1]: 'fire-fst-compat',\n [name$2]: 'fire-vertex',\n 'fire-js': 'fire-js', // Platform identifier for JS SDK.\n [name]: 'fire-js-all'\n};\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 * @internal\n */\nconst _apps = new Map();\n/**\n * @internal\n */\nconst _serverApps = new Map();\n/**\n * Registered components.\n *\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst _components = new Map();\n/**\n * @param component - the component being added to this app's container\n *\n * @internal\n */\nfunction _addComponent(app, component) {\n try {\n app.container.addComponent(component);\n }\n catch (e) {\n logger.debug(`Component ${component.name} failed to register with FirebaseApp ${app.name}`, e);\n }\n}\n/**\n *\n * @internal\n */\nfunction _addOrOverwriteComponent(app, component) {\n app.container.addOrOverwriteComponent(component);\n}\n/**\n *\n * @param component - the component to register\n * @returns whether or not the component is registered successfully\n *\n * @internal\n */\nfunction _registerComponent(component) {\n const componentName = component.name;\n if (_components.has(componentName)) {\n logger.debug(`There were multiple attempts to register component ${componentName}.`);\n return false;\n }\n _components.set(componentName, component);\n // add the component to existing app instances\n for (const app of _apps.values()) {\n _addComponent(app, component);\n }\n for (const serverApp of _serverApps.values()) {\n _addComponent(serverApp, component);\n }\n return true;\n}\n/**\n *\n * @param app - FirebaseApp instance\n * @param name - service name\n *\n * @returns the provider for the service with the matching name\n *\n * @internal\n */\nfunction _getProvider(app, name) {\n const heartbeatController = app.container\n .getProvider('heartbeat')\n .getImmediate({ optional: true });\n if (heartbeatController) {\n void heartbeatController.triggerHeartbeat();\n }\n return app.container.getProvider(name);\n}\n/**\n *\n * @param app - FirebaseApp instance\n * @param name - service name\n * @param instanceIdentifier - service instance identifier in case the service supports multiple instances\n *\n * @internal\n */\nfunction _removeServiceInstance(app, name, instanceIdentifier = DEFAULT_ENTRY_NAME) {\n _getProvider(app, name).clearInstance(instanceIdentifier);\n}\n/**\n *\n * @param obj - an object of type FirebaseApp or FirebaseOptions.\n *\n * @returns true if the provide object is of type FirebaseApp.\n *\n * @internal\n */\nfunction _isFirebaseApp(obj) {\n return obj.options !== undefined;\n}\n/**\n *\n * @param obj - an object of type FirebaseApp.\n *\n * @returns true if the provided object is of type FirebaseServerAppImpl.\n *\n * @internal\n */\nfunction _isFirebaseServerApp(obj) {\n if (obj === null || obj === undefined) {\n return false;\n }\n return obj.settings !== undefined;\n}\n/**\n * Test only\n *\n * @internal\n */\nfunction _clearComponents() {\n _components.clear();\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 */\nconst ERRORS = {\n [\"no-app\" /* AppError.NO_APP */]: \"No Firebase App '{$appName}' has been created - \" +\n 'call initializeApp() first',\n [\"bad-app-name\" /* AppError.BAD_APP_NAME */]: \"Illegal App name: '{$appName}'\",\n [\"duplicate-app\" /* AppError.DUPLICATE_APP */]: \"Firebase App named '{$appName}' already exists with different options or config\",\n [\"app-deleted\" /* AppError.APP_DELETED */]: \"Firebase App named '{$appName}' already deleted\",\n [\"server-app-deleted\" /* AppError.SERVER_APP_DELETED */]: 'Firebase Server App has been deleted',\n [\"no-options\" /* AppError.NO_OPTIONS */]: 'Need to provide options, when not being deployed to hosting via source.',\n [\"invalid-app-argument\" /* AppError.INVALID_APP_ARGUMENT */]: 'firebase.{$appName}() takes either no argument or a ' +\n 'Firebase App instance.',\n [\"invalid-log-argument\" /* AppError.INVALID_LOG_ARGUMENT */]: 'First argument to `onLog` must be null or a function.',\n [\"idb-open\" /* AppError.IDB_OPEN */]: 'Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.',\n [\"idb-get\" /* AppError.IDB_GET */]: 'Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.',\n [\"idb-set\" /* AppError.IDB_WRITE */]: 'Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.',\n [\"idb-delete\" /* AppError.IDB_DELETE */]: 'Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.',\n [\"finalization-registry-not-supported\" /* AppError.FINALIZATION_REGISTRY_NOT_SUPPORTED */]: 'FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.',\n [\"invalid-server-app-environment\" /* AppError.INVALID_SERVER_APP_ENVIRONMENT */]: 'FirebaseServerApp is not for use in browser environments.'\n};\nconst ERROR_FACTORY = new ErrorFactory('app', 'Firebase', ERRORS);\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 */\nclass FirebaseAppImpl {\n constructor(options, config, container) {\n this._isDeleted = false;\n this._options = Object.assign({}, options);\n this._config = Object.assign({}, config);\n this._name = config.name;\n this._automaticDataCollectionEnabled =\n config.automaticDataCollectionEnabled;\n this._container = container;\n this.container.addComponent(new Component('app', () => this, \"PUBLIC\" /* ComponentType.PUBLIC */));\n }\n get automaticDataCollectionEnabled() {\n this.checkDestroyed();\n return this._automaticDataCollectionEnabled;\n }\n set automaticDataCollectionEnabled(val) {\n this.checkDestroyed();\n this._automaticDataCollectionEnabled = val;\n }\n get name() {\n this.checkDestroyed();\n return this._name;\n }\n get options() {\n this.checkDestroyed();\n return this._options;\n }\n get config() {\n this.checkDestroyed();\n return this._config;\n }\n get container() {\n return this._container;\n }\n get isDeleted() {\n return this._isDeleted;\n }\n set isDeleted(val) {\n this._isDeleted = val;\n }\n /**\n * This function will throw an Error if the App has already been deleted -\n * use before performing API actions on the App.\n */\n checkDestroyed() {\n if (this.isDeleted) {\n throw ERROR_FACTORY.create(\"app-deleted\" /* AppError.APP_DELETED */, { appName: this._name });\n }\n }\n}\n\n/**\n * @license\n * Copyright 2023 Google LLC\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// Parse the token and check to see if the `exp` claim is in the future.\n// Reports an error to the console if the token or claim could not be parsed, or if `exp` is in\n// the past.\nfunction validateTokenTTL(base64Token, tokenName) {\n const secondPart = base64Decode(base64Token.split('.')[1]);\n if (secondPart === null) {\n console.error(`FirebaseServerApp ${tokenName} is invalid: second part could not be parsed.`);\n return;\n }\n const expClaim = JSON.parse(secondPart).exp;\n if (expClaim === undefined) {\n console.error(`FirebaseServerApp ${tokenName} is invalid: expiration claim could not be parsed`);\n return;\n }\n const exp = JSON.parse(secondPart).exp * 1000;\n const now = new Date().getTime();\n const diff = exp - now;\n if (diff <= 0) {\n console.error(`FirebaseServerApp ${tokenName} is invalid: the token has expired.`);\n }\n}\nclass FirebaseServerAppImpl extends FirebaseAppImpl {\n constructor(options, serverConfig, name, container) {\n // Build configuration parameters for the FirebaseAppImpl base class.\n const automaticDataCollectionEnabled = serverConfig.automaticDataCollectionEnabled !== undefined\n ? serverConfig.automaticDataCollectionEnabled\n : false;\n // Create the FirebaseAppSettings object for the FirebaseAppImp constructor.\n const config = {\n name,\n automaticDataCollectionEnabled\n };\n if (options.apiKey !== undefined) {\n // Construct the parent FirebaseAppImp object.\n super(options, config, container);\n }\n else {\n const appImpl = options;\n super(appImpl.options, config, container);\n }\n // Now construct the data for the FirebaseServerAppImpl.\n this._serverConfig = Object.assign({ automaticDataCollectionEnabled }, serverConfig);\n // Ensure that the current time is within the `authIdtoken` window of validity.\n if (this._serverConfig.authIdToken) {\n validateTokenTTL(this._serverConfig.authIdToken, 'authIdToken');\n }\n // Ensure that the current time is within the `appCheckToken` window of validity.\n if (this._serverConfig.appCheckToken) {\n validateTokenTTL(this._serverConfig.appCheckToken, 'appCheckToken');\n }\n this._finalizationRegistry = null;\n if (typeof FinalizationRegistry !== 'undefined') {\n this._finalizationRegistry = new FinalizationRegistry(() => {\n this.automaticCleanup();\n });\n }\n this._refCount = 0;\n this.incRefCount(this._serverConfig.releaseOnDeref);\n // Do not retain a hard reference to the dref object, otherwise the FinalizationRegistry\n // will never trigger.\n this._serverConfig.releaseOnDeref = undefined;\n serverConfig.releaseOnDeref = undefined;\n registerVersion(name$q, version$1, 'serverapp');\n }\n toJSON() {\n return undefined;\n }\n get refCount() {\n return this._refCount;\n }\n // Increment the reference count of this server app. If an object is provided, register it\n // with the finalization registry.\n incRefCount(obj) {\n if (this.isDeleted) {\n return;\n }\n this._refCount++;\n if (obj !== undefined && this._finalizationRegistry !== null) {\n this._finalizationRegistry.register(obj, this);\n }\n }\n // Decrement the reference count.\n decRefCount() {\n if (this.isDeleted) {\n return 0;\n }\n return --this._refCount;\n }\n // Invoked by the FinalizationRegistry callback to note that this app should go through its\n // reference counts and delete itself if no reference count remain. The coordinating logic that\n // handles this is in deleteApp(...).\n automaticCleanup() {\n void deleteApp(this);\n }\n get settings() {\n this.checkDestroyed();\n return this._serverConfig;\n }\n /**\n * This function will throw an Error if the App has already been deleted -\n * use before performing API actions on the App.\n */\n checkDestroyed() {\n if (this.isDeleted) {\n throw ERROR_FACTORY.create(\"server-app-deleted\" /* AppError.SERVER_APP_DELETED */);\n }\n }\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 * The current SDK version.\n *\n * @public\n */\nconst SDK_VERSION = version;\nfunction initializeApp(_options, rawConfig = {}) {\n let options = _options;\n if (typeof rawConfig !== 'object') {\n const name = rawConfig;\n rawConfig = { name };\n }\n const config = Object.assign({ name: DEFAULT_ENTRY_NAME, automaticDataCollectionEnabled: false }, rawConfig);\n const name = config.name;\n if (typeof name !== 'string' || !name) {\n throw ERROR_FACTORY.create(\"bad-app-name\" /* AppError.BAD_APP_NAME */, {\n appName: String(name)\n });\n }\n options || (options = getDefaultAppConfig());\n if (!options) {\n throw ERROR_FACTORY.create(\"no-options\" /* AppError.NO_OPTIONS */);\n }\n const existingApp = _apps.get(name);\n if (existingApp) {\n // return the existing app if options and config deep equal the ones in the existing app.\n if (deepEqual(options, existingApp.options) &&\n deepEqual(config, existingApp.config)) {\n return existingApp;\n }\n else {\n throw ERROR_FACTORY.create(\"duplicate-app\" /* AppError.DUPLICATE_APP */, { appName: name });\n }\n }\n const container = new ComponentContainer(name);\n for (const component of _components.values()) {\n container.addComponent(component);\n }\n const newApp = new FirebaseAppImpl(options, config, container);\n _apps.set(name, newApp);\n return newApp;\n}\nfunction initializeServerApp(_options, _serverAppConfig) {\n if (isBrowser() && !isWebWorker()) {\n // FirebaseServerApp isn't designed to be run in browsers.\n throw ERROR_FACTORY.create(\"invalid-server-app-environment\" /* AppError.INVALID_SERVER_APP_ENVIRONMENT */);\n }\n if (_serverAppConfig.automaticDataCollectionEnabled === undefined) {\n _serverAppConfig.automaticDataCollectionEnabled = false;\n }\n let appOptions;\n if (_isFirebaseApp(_options)) {\n appOptions = _options.options;\n }\n else {\n appOptions = _options;\n }\n // Build an app name based on a hash of the configuration options.\n const nameObj = Object.assign(Object.assign({}, _serverAppConfig), appOptions);\n // However, Do not mangle the name based on releaseOnDeref, since it will vary between the\n // construction of FirebaseServerApp instances. For example, if the object is the request headers.\n if (nameObj.releaseOnDeref !== undefined) {\n delete nameObj.releaseOnDeref;\n }\n const hashCode = (s) => {\n return [...s].reduce((hash, c) => (Math.imul(31, hash) + c.charCodeAt(0)) | 0, 0);\n };\n if (_serverAppConfig.releaseOnDeref !== undefined) {\n if (typeof FinalizationRegistry === 'undefined') {\n throw ERROR_FACTORY.create(\"finalization-registry-not-supported\" /* AppError.FINALIZATION_REGISTRY_NOT_SUPPORTED */, {});\n }\n }\n const nameString = '' + hashCode(JSON.stringify(nameObj));\n const existingApp = _serverApps.get(nameString);\n if (existingApp) {\n existingApp.incRefCount(_serverAppConfig.releaseOnDeref);\n return existingApp;\n }\n const container = new ComponentContainer(nameString);\n for (const component of _components.values()) {\n container.addComponent(component);\n }\n const newApp = new FirebaseServerAppImpl(appOptions, _serverAppConfig, nameString, container);\n _serverApps.set(nameString, newApp);\n return newApp;\n}\n/**\n * Retrieves a {@link @firebase/app#FirebaseApp} instance.\n *\n * When called with no arguments, the default app is returned. When an app name\n * is provided, the app corresponding to that name is returned.\n *\n * An exception is thrown if the app being retrieved has not yet been\n * initialized.\n *\n * @example\n * ```javascript\n * // Return the default app\n * const app = getApp();\n * ```\n *\n * @example\n * ```javascript\n * // Return a named app\n * const otherApp = getApp(\"otherApp\");\n * ```\n *\n * @param name - Optional name of the app to return. If no name is\n * provided, the default is `\"[DEFAULT]\"`.\n *\n * @returns The app corresponding to the provided app name.\n * If no app name is provided, the default app is returned.\n *\n * @public\n */\nfunction getApp(name = DEFAULT_ENTRY_NAME) {\n const app = _apps.get(name);\n if (!app && name === DEFAULT_ENTRY_NAME && getDefaultAppConfig()) {\n return initializeApp();\n }\n if (!app) {\n throw ERROR_FACTORY.create(\"no-app\" /* AppError.NO_APP */, { appName: name });\n }\n return app;\n}\n/**\n * A (read-only) array of all initialized apps.\n * @public\n */\nfunction getApps() {\n return Array.from(_apps.values());\n}\n/**\n * Renders this app unusable and frees the resources of all associated\n * services.\n *\n * @example\n * ```javascript\n * deleteApp(app)\n * .then(function() {\n * console.log(\"App deleted successfully\");\n * })\n * .catch(function(error) {\n * console.log(\"Error deleting app:\", error);\n * });\n * ```\n *\n * @public\n */\nasync function deleteApp(app) {\n let cleanupProviders = false;\n const name = app.name;\n if (_apps.has(name)) {\n cleanupProviders = true;\n _apps.delete(name);\n }\n else if (_serverApps.has(name)) {\n const firebaseServerApp = app;\n if (firebaseServerApp.decRefCount() <= 0) {\n _serverApps.delete(name);\n cleanupProviders = true;\n }\n }\n if (cleanupProviders) {\n await Promise.all(app.container\n .getProviders()\n .map(provider => provider.delete()));\n app.isDeleted = true;\n }\n}\n/**\n * Registers a library's name and version for platform logging purposes.\n * @param library - Name of 1p or 3p library (e.g. firestore, angularfire)\n * @param version - Current version of that library.\n * @param variant - Bundle variant, e.g., node, rn, etc.\n *\n * @public\n */\nfunction registerVersion(libraryKeyOrName, version, variant) {\n var _a;\n // TODO: We can use this check to whitelist strings when/if we set up\n // a good whitelist system.\n let library = (_a = PLATFORM_LOG_STRING[libraryKeyOrName]) !== null && _a !== void 0 ? _a : libraryKeyOrName;\n if (variant) {\n library += `-${variant}`;\n }\n const libraryMismatch = library.match(/\\s|\\//);\n const versionMismatch = version.match(/\\s|\\//);\n if (libraryMismatch || versionMismatch) {\n const warning = [\n `Unable to register library \"${library}\" with version \"${version}\":`\n ];\n if (libraryMismatch) {\n warning.push(`library name \"${library}\" contains illegal characters (whitespace or \"/\")`);\n }\n if (libraryMismatch && versionMismatch) {\n warning.push('and');\n }\n if (versionMismatch) {\n warning.push(`version name \"${version}\" contains illegal characters (whitespace or \"/\")`);\n }\n logger.warn(warning.join(' '));\n return;\n }\n _registerComponent(new Component(`${library}-version`, () => ({ library, version }), \"VERSION\" /* ComponentType.VERSION */));\n}\n/**\n * Sets log handler for all Firebase SDKs.\n * @param logCallback - An optional custom log handler that executes user code whenever\n * the Firebase SDK makes a logging call.\n *\n * @public\n */\nfunction onLog(logCallback, options) {\n if (logCallback !== null && typeof logCallback !== 'function') {\n throw ERROR_FACTORY.create(\"invalid-log-argument\" /* AppError.INVALID_LOG_ARGUMENT */);\n }\n setUserLogHandler(logCallback, options);\n}\n/**\n * Sets log level for all Firebase SDKs.\n *\n * All of the log types above the current log level are captured (i.e. if\n * you set the log level to `info`, errors are logged, but `debug` and\n * `verbose` logs are not).\n *\n * @public\n */\nfunction setLogLevel(logLevel) {\n setLogLevel$1(logLevel);\n}\n\n/**\n * @license\n * Copyright 2021 Google LLC\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 */\nconst DB_NAME = 'firebase-heartbeat-database';\nconst DB_VERSION = 1;\nconst STORE_NAME = 'firebase-heartbeat-store';\nlet dbPromise = null;\nfunction getDbPromise() {\n if (!dbPromise) {\n dbPromise = openDB(DB_NAME, DB_VERSION, {\n upgrade: (db, oldVersion) => {\n // We don't use 'break' in this switch statement, the fall-through\n // behavior is what we want, because if there are multiple versions between\n // the old version and the current version, we want ALL the migrations\n // that correspond to those versions to run, not only the last one.\n // eslint-disable-next-line default-case\n switch (oldVersion) {\n case 0:\n try {\n db.createObjectStore(STORE_NAME);\n }\n catch (e) {\n // Safari/iOS browsers throw occasional exceptions on\n // db.createObjectStore() that may be a bug. Avoid blocking\n // the rest of the app functionality.\n console.warn(e);\n }\n }\n }\n }).catch(e => {\n throw ERROR_FACTORY.create(\"idb-open\" /* AppError.IDB_OPEN */, {\n originalErrorMessage: e.message\n });\n });\n }\n return dbPromise;\n}\nasync function readHeartbeatsFromIndexedDB(app) {\n try {\n const db = await getDbPromise();\n const tx = db.transaction(STORE_NAME);\n const result = await tx.objectStore(STORE_NAME).get(computeKey(app));\n // We already have the value but tx.done can throw,\n // so we need to await it here to catch errors\n await tx.done;\n return result;\n }\n catch (e) {\n if (e instanceof FirebaseError) {\n logger.warn(e.message);\n }\n else {\n const idbGetError = ERROR_FACTORY.create(\"idb-get\" /* AppError.IDB_GET */, {\n originalErrorMessage: e === null || e === void 0 ? void 0 : e.message\n });\n logger.warn(idbGetError.message);\n }\n }\n}\nasync function writeHeartbeatsToIndexedDB(app, heartbeatObject) {\n try {\n const db = await getDbPromise();\n const tx = db.transaction(STORE_NAME, 'readwrite');\n const objectStore = tx.objectStore(STORE_NAME);\n await objectStore.put(heartbeatObject, computeKey(app));\n await tx.done;\n }\n catch (e) {\n if (e instanceof FirebaseError) {\n logger.warn(e.message);\n }\n else {\n const idbGetError = ERROR_FACTORY.create(\"idb-set\" /* AppError.IDB_WRITE */, {\n originalErrorMessage: e === null || e === void 0 ? void 0 : e.message\n });\n logger.warn(idbGetError.message);\n }\n }\n}\nfunction computeKey(app) {\n return `${app.name}!${app.options.appId}`;\n}\n\n/**\n * @license\n * Copyright 2021 Google LLC\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 */\nconst MAX_HEADER_BYTES = 1024;\nconst MAX_NUM_STORED_HEARTBEATS = 30;\nclass HeartbeatServiceImpl {\n constructor(container) {\n this.container = container;\n /**\n * In-memory cache for heartbeats, used by getHeartbeatsHeader() to generate\n * the header string.\n * Stores one record per date. This will be consolidated into the standard\n * format of one record per user agent string before being sent as a header.\n * Populated from indexedDB when the controller is instantiated and should\n * be kept in sync with indexedDB.\n * Leave public for easier testing.\n */\n this._heartbeatsCache = null;\n const app = this.container.getProvider('app').getImmediate();\n this._storage = new HeartbeatStorageImpl(app);\n this._heartbeatsCachePromise = this._storage.read().then(result => {\n this._heartbeatsCache = result;\n return result;\n });\n }\n /**\n * Called to report a heartbeat. The function will generate\n * a HeartbeatsByUserAgent object, update heartbeatsCache, and persist it\n * to IndexedDB.\n * Note that we only store one heartbeat per day. So if a heartbeat for today is\n * already logged, subsequent calls to this function in the same day will be ignored.\n */\n async triggerHeartbeat() {\n var _a, _b;\n try {\n const platformLogger = this.container\n .getProvider('platform-logger')\n .getImmediate();\n // This is the \"Firebase user agent\" string from the platform logger\n // service, not the browser user agent.\n const agent = platformLogger.getPlatformInfoString();\n const date = getUTCDateString();\n if (((_a = this._heartbeatsCache) === null || _a === void 0 ? void 0 : _a.heartbeats) == null) {\n this._heartbeatsCache = await this._heartbeatsCachePromise;\n // If we failed to construct a heartbeats cache, then return immediately.\n if (((_b = this._heartbeatsCache) === null || _b === void 0 ? void 0 : _b.heartbeats) == null) {\n return;\n }\n }\n // Do not store a heartbeat if one is already stored for this day\n // or if a header has already been sent today.\n if (this._heartbeatsCache.lastSentHeartbeatDate === date ||\n this._heartbeatsCache.heartbeats.some(singleDateHeartbeat => singleDateHeartbeat.date === date)) {\n return;\n }\n else {\n // There is no entry for this date. Create one.\n this._heartbeatsCache.heartbeats.push({ date, agent });\n // If the number of stored heartbeats exceeds the maximum number of stored heartbeats, remove the heartbeat with the earliest date.\n // Since this is executed each time a heartbeat is pushed, the limit can only be exceeded by one, so only one needs to be removed.\n if (this._heartbeatsCache.heartbeats.length > MAX_NUM_STORED_HEARTBEATS) {\n const earliestHeartbeatIdx = getEarliestHeartbeatIdx(this._heartbeatsCache.heartbeats);\n this._heartbeatsCache.heartbeats.splice(earliestHeartbeatIdx, 1);\n }\n }\n return this._storage.overwrite(this._heartbeatsCache);\n }\n catch (e) {\n logger.warn(e);\n }\n }\n /**\n * Returns a base64 encoded string which can be attached to the heartbeat-specific header directly.\n * It also clears all heartbeats from memory as well as in IndexedDB.\n *\n * NOTE: Consuming product SDKs should not send the header if this method\n * returns an empty string.\n */\n async getHeartbeatsHeader() {\n var _a;\n try {\n if (this._heartbeatsCache === null) {\n await this._heartbeatsCachePromise;\n }\n // If it's still null or the array is empty, there is no data to send.\n if (((_a = this._heartbeatsCache) === null || _a === void 0 ? void 0 : _a.heartbeats) == null ||\n this._heartbeatsCache.heartbeats.length === 0) {\n return '';\n }\n const date = getUTCDateString();\n // Extract as many heartbeats from the cache as will fit under the size limit.\n const { heartbeatsToSend, unsentEntries } = extractHeartbeatsForHeader(this._heartbeatsCache.heartbeats);\n const headerString = base64urlEncodeWithoutPadding(JSON.stringify({ version: 2, heartbeats: heartbeatsToSend }));\n // Store last sent date to prevent another being logged/sent for the same day.\n this._heartbeatsCache.lastSentHeartbeatDate = date;\n if (unsentEntries.length > 0) {\n // Store any unsent entries if they exist.\n this._heartbeatsCache.heartbeats = unsentEntries;\n // This seems more likely than emptying the array (below) to lead to some odd state\n // since the cache isn't empty and this will be called again on the next request,\n // and is probably safest if we await it.\n await this._storage.overwrite(this._heartbeatsCache);\n }\n else {\n this._heartbeatsCache.heartbeats = [];\n // Do not wait for this, to reduce latency.\n void this._storage.overwrite(this._heartbeatsCache);\n }\n return headerString;\n }\n catch (e) {\n logger.warn(e);\n return '';\n }\n }\n}\nfunction getUTCDateString() {\n const today = new Date();\n // Returns date format 'YYYY-MM-DD'\n return today.toISOString().substring(0, 10);\n}\nfunction extractHeartbeatsForHeader(heartbeatsCache, maxSize = MAX_HEADER_BYTES) {\n // Heartbeats grouped by user agent in the standard format to be sent in\n // the header.\n const heartbeatsToSend = [];\n // Single date format heartbeats that are not sent.\n let unsentEntries = heartbeatsCache.slice();\n for (const singleDateHeartbeat of heartbeatsCache) {\n // Look for an existing entry with the same user agent.\n const heartbeatEntry = heartbeatsToSend.find(hb => hb.agent === singleDateHeartbeat.agent);\n if (!heartbeatEntry) {\n // If no entry for this user agent exists, create one.\n heartbeatsToSend.push({\n agent: singleDateHeartbeat.agent,\n dates: [singleDateHeartbeat.date]\n });\n if (countBytes(heartbeatsToSend) > maxSize) {\n // If the header would exceed max size, remove the added heartbeat\n // entry and stop adding to the header.\n heartbeatsToSend.pop();\n break;\n }\n }\n else {\n heartbeatEntry.dates.push(singleDateHeartbeat.date);\n // If the header would exceed max size, remove the added date\n // and stop adding to the header.\n if (countBytes(heartbeatsToSend) > maxSize) {\n heartbeatEntry.dates.pop();\n break;\n }\n }\n // Pop unsent entry from queue. (Skipped if adding the entry exceeded\n // quota and the loop breaks early.)\n unsentEntries = unsentEntries.slice(1);\n }\n return {\n heartbeatsToSend,\n unsentEntries\n };\n}\nclass HeartbeatStorageImpl {\n constructor(app) {\n this.app = app;\n this._canUseIndexedDBPromise = this.runIndexedDBEnvironmentCheck();\n }\n async runIndexedDBEnvironmentCheck() {\n if (!isIndexedDBAvailable()) {\n return false;\n }\n else {\n return validateIndexedDBOpenable()\n .then(() => true)\n .catch(() => false);\n }\n }\n /**\n * Read all heartbeats.\n */\n async read() {\n const canUseIndexedDB = await this._canUseIndexedDBPromise;\n if (!canUseIndexedDB) {\n return { heartbeats: [] };\n }\n else {\n const idbHeartbeatObject = await readHeartbeatsFromIndexedDB(this.app);\n if (idbHeartbeatObject === null || idbHeartbeatObject === void 0 ? void 0 : idbHeartbeatObject.heartbeats) {\n return idbHeartbeatObject;\n }\n else {\n return { heartbeats: [] };\n }\n }\n }\n // overwrite the storage with the provided heartbeats\n async overwrite(heartbeatsObject) {\n var _a;\n const canUseIndexedDB = await this._canUseIndexedDBPromise;\n if (!canUseIndexedDB) {\n return;\n }\n else {\n const existingHeartbeatsObject = await this.read();\n return writeHeartbeatsToIndexedDB(this.app, {\n lastSentHeartbeatDate: (_a = heartbeatsObject.lastSentHeartbeatDate) !== null && _a !== void 0 ? _a : existingHeartbeatsObject.lastSentHeartbeatDate,\n heartbeats: heartbeatsObject.heartbeats\n });\n }\n }\n // add heartbeats\n async add(heartbeatsObject) {\n var _a;\n const canUseIndexedDB = await this._canUseIndexedDBPromise;\n if (!canUseIndexedDB) {\n return;\n }\n else {\n const existingHeartbeatsObject = await this.read();\n return writeHeartbeatsToIndexedDB(this.app, {\n lastSentHeartbeatDate: (_a = heartbeatsObject.lastSentHeartbeatDate) !== null && _a !== void 0 ? _a : existingHeartbeatsObject.lastSentHeartbeatDate,\n heartbeats: [\n ...existingHeartbeatsObject.heartbeats,\n ...heartbeatsObject.heartbeats\n ]\n });\n }\n }\n}\n/**\n * Calculate bytes of a HeartbeatsByUserAgent array after being wrapped\n * in a platform logging header JSON object, stringified, and converted\n * to base 64.\n */\nfunction countBytes(heartbeatsCache) {\n // base64 has a restricted set of characters, all of which should be 1 byte.\n return base64urlEncodeWithoutPadding(\n // heartbeatsCache wrapper properties\n JSON.stringify({ version: 2, heartbeats: heartbeatsCache })).length;\n}\n/**\n * Returns the index of the heartbeat with the earliest date.\n * If the heartbeats array is empty, -1 is returned.\n */\nfunction getEarliestHeartbeatIdx(heartbeats) {\n if (heartbeats.length === 0) {\n return -1;\n }\n let earliestHeartbeatIdx = 0;\n let earliestHeartbeatDate = heartbeats[0].date;\n for (let i = 1; i < heartbeats.length; i++) {\n if (heartbeats[i].date < earliestHeartbeatDate) {\n earliestHeartbeatDate = heartbeats[i].date;\n earliestHeartbeatIdx = i;\n }\n }\n return earliestHeartbeatIdx;\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 */\nfunction registerCoreComponents(variant) {\n _registerComponent(new Component('platform-logger', container => new PlatformLoggerServiceImpl(container), \"PRIVATE\" /* ComponentType.PRIVATE */));\n _registerComponent(new Component('heartbeat', container => new HeartbeatServiceImpl(container), \"PRIVATE\" /* ComponentType.PRIVATE */));\n // Register `app` package.\n registerVersion(name$q, version$1, variant);\n // BUILD_TARGET will be replaced by values like esm2017, cjs2017, etc during the compilation\n registerVersion(name$q, version$1, 'esm2017');\n // Register platform SDK identifier (no version).\n registerVersion('fire-js', '');\n}\n\n/**\n * Firebase App\n *\n * @remarks This package coordinates the communication between the different Firebase components\n * @packageDocumentation\n */\nregisterCoreComponents('');\n\nexport { SDK_VERSION, DEFAULT_ENTRY_NAME as _DEFAULT_ENTRY_NAME, _addComponent, _addOrOverwriteComponent, _apps, _clearComponents, _components, _getProvider, _isFirebaseApp, _isFirebaseServerApp, _registerComponent, _removeServiceInstance, _serverApps, deleteApp, getApp, getApps, initializeApp, initializeServerApp, onLog, registerVersion, setLogLevel };\n","//! moment.js locale configuration\n//! locale : Northern Kurdish [ku-kmr]\n//! authors : Mazlum Özdogan : https://github.com/mergehez\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(num, withoutSuffix, key, isFuture) {\n var format = {\n s: ['çend sanîye', 'çend sanîyeyan'],\n ss: [num + ' sanîye', num + ' sanîyeyan'],\n m: ['deqîqeyek', 'deqîqeyekê'],\n mm: [num + ' deqîqe', num + ' deqîqeyan'],\n h: ['saetek', 'saetekê'],\n hh: [num + ' saet', num + ' saetan'],\n d: ['rojek', 'rojekê'],\n dd: [num + ' roj', num + ' rojan'],\n w: ['hefteyek', 'hefteyekê'],\n ww: [num + ' hefte', num + ' hefteyan'],\n M: ['mehek', 'mehekê'],\n MM: [num + ' meh', num + ' mehan'],\n y: ['salek', 'salekê'],\n yy: [num + ' sal', num + ' salan'],\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n }\n // function obliqueNumSuffix(num) {\n // if(num.includes(':'))\n // num = parseInt(num.split(':')[0]);\n // else\n // num = parseInt(num);\n // return num == 0 || num % 10 == 1 ? 'ê'\n // : (num > 10 && num % 10 == 0 ? 'î' : 'an');\n // }\n function ezafeNumSuffix(num) {\n num = '' + num;\n var l = num.substring(num.length - 1),\n ll = num.length > 1 ? num.substring(num.length - 2) : '';\n if (\n !(ll == 12 || ll == 13) &&\n (l == '2' || l == '3' || ll == '50' || l == '70' || l == '80')\n )\n return 'yê';\n return 'ê';\n }\n\n var kuKmr = moment.defineLocale('ku-kmr', {\n // According to the spelling rules defined by the work group of Weqfa Mezopotamyayê (Mesopotamia Foundation)\n // this should be: 'Kanûna Paşîn_Sibat_Adar_Nîsan_Gulan_Hezîran_Tîrmeh_Tebax_Îlon_Çirîya Pêşîn_Çirîya Paşîn_Kanûna Pêşîn'\n // But the names below are more well known and handy\n months: 'Rêbendan_Sibat_Adar_Nîsan_Gulan_Hezîran_Tîrmeh_Tebax_Îlon_Cotmeh_Mijdar_Berfanbar'.split(\n '_'\n ),\n monthsShort: 'Rêb_Sib_Ada_Nîs_Gul_Hez_Tîr_Teb_Îlo_Cot_Mij_Ber'.split('_'),\n monthsParseExact: true,\n weekdays: 'Yekşem_Duşem_Sêşem_Çarşem_Pêncşem_În_Şemî'.split('_'),\n weekdaysShort: 'Yek_Du_Sê_Çar_Pên_În_Şem'.split('_'),\n weekdaysMin: 'Ye_Du_Sê_Ça_Pê_În_Şe'.split('_'),\n meridiem: function (hours, minutes, isLower) {\n if (hours < 12) {\n return isLower ? 'bn' : 'BN';\n } else {\n return isLower ? 'pn' : 'PN';\n }\n },\n meridiemParse: /bn|BN|pn|PN/,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'Do MMMM[a] YYYY[an]',\n LLL: 'Do MMMM[a] YYYY[an] HH:mm',\n LLLL: 'dddd, Do MMMM[a] YYYY[an] HH:mm',\n ll: 'Do MMM[.] YYYY[an]',\n lll: 'Do MMM[.] YYYY[an] HH:mm',\n llll: 'ddd[.], Do MMM[.] YYYY[an] HH:mm',\n },\n calendar: {\n sameDay: '[Îro di saet] LT [de]',\n nextDay: '[Sibê di saet] LT [de]',\n nextWeek: 'dddd [di saet] LT [de]',\n lastDay: '[Duh di saet] LT [de]',\n lastWeek: 'dddd[a borî di saet] LT [de]',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'di %s de',\n past: 'berî %s',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: processRelativeTime,\n w: processRelativeTime,\n ww: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(?:yê|ê|\\.)/,\n ordinal: function (num, period) {\n var p = period.toLowerCase();\n if (p.includes('w') || p.includes('m')) return num + '.';\n\n return num + ezafeNumSuffix(num);\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return kuKmr;\n\n})));\n","import { Component, OnInit, ViewEncapsulation, Input } from '@angular/core';\n\n/**\n * Panel that serves as a container for content\n * Default width is narrow, but can pass in panelSize=\"large\" to increase the width\n */\n@Component({\n selector: 'bw-panel',\n templateUrl: './panel.component.html',\n styleUrls: ['./panel.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class PanelComponent {\n /** The size of the panel. Default is narrow (~360px), but will accept a value of 'large'. More sizes and flexibility to come... */\n @Input() panelSize: string;\n constructor() {}\n\n}\n","<article class=\"panel-container\" [ngClass]=\"panelSize\">\n <ng-content select=\"nav\"></ng-content>\n <ng-content select=\"header\"></ng-content>\n <ng-content select=\"section\"></ng-content>\n <ng-content select=\"footer\"></ng-content>\n</article>\n","//! moment.js locale configuration\n//! locale : Malayalam [ml]\n//! author : Floyd Pink : https://github.com/floydpink\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ml = moment.defineLocale('ml', {\n months: 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split(\n '_'\n ),\n monthsShort:\n 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays:\n 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split(\n '_'\n ),\n weekdaysShort: 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'),\n weekdaysMin: 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm -നു',\n LTS: 'A h:mm:ss -നു',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm -നു',\n LLLL: 'dddd, D MMMM YYYY, A h:mm -നു',\n },\n calendar: {\n sameDay: '[ഇന്ന്] LT',\n nextDay: '[നാളെ] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[ഇന്നലെ] LT',\n lastWeek: '[കഴിഞ്ഞ] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s കഴിഞ്ഞ്',\n past: '%s മുൻപ്',\n s: 'അൽപ നിമിഷങ്ങൾ',\n ss: '%d സെക്കൻഡ്',\n m: 'ഒരു മിനിറ്റ്',\n mm: '%d മിനിറ്റ്',\n h: 'ഒരു മണിക്കൂർ',\n hh: '%d മണിക്കൂർ',\n d: 'ഒരു ദിവസം',\n dd: '%d ദിവസം',\n M: 'ഒരു മാസം',\n MM: '%d മാസം',\n y: 'ഒരു വർഷം',\n yy: '%d വർഷം',\n },\n meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (\n (meridiem === 'രാത്രി' && hour >= 4) ||\n meridiem === 'ഉച്ച കഴിഞ്ഞ്' ||\n meridiem === 'വൈകുന്നേരം'\n ) {\n return hour + 12;\n } else {\n return hour;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'രാത്രി';\n } else if (hour < 12) {\n return 'രാവിലെ';\n } else if (hour < 17) {\n return 'ഉച്ച കഴിഞ്ഞ്';\n } else if (hour < 20) {\n return 'വൈകുന്നേരം';\n } else {\n return 'രാത്രി';\n }\n },\n });\n\n return ml;\n\n})));\n","import { concatAll } from '../operators/concatAll';\nimport { popScheduler } from '../util/args';\nimport { from } from './from';\nexport function concat(...args) {\n return concatAll()(from(args, popScheduler(args)));\n}\n","import { mergeAll } from './mergeAll';\nexport function concatAll() {\n return mergeAll(1);\n}\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\n/**\n * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n */\nexports.encode = function (number) {\n if (0 <= number && number < intToCharMap.length) {\n return intToCharMap[number];\n }\n throw new TypeError(\"Must be between 0 and 63: \" + number);\n};\n\n/**\n * Decode a single base 64 character code digit to an integer. Returns -1 on\n * failure.\n */\nexports.decode = function (charCode) {\n var bigA = 65; // 'A'\n var bigZ = 90; // 'Z'\n\n var littleA = 97; // 'a'\n var littleZ = 122; // 'z'\n\n var zero = 48; // '0'\n var nine = 57; // '9'\n\n var plus = 43; // '+'\n var slash = 47; // '/'\n\n var littleOffset = 26;\n var numberOffset = 52;\n\n // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n if (bigA <= charCode && charCode <= bigZ) {\n return (charCode - bigA);\n }\n\n // 26 - 51: abcdefghijklmnopqrstuvwxyz\n if (littleA <= charCode && charCode <= littleZ) {\n return (charCode - littleA + littleOffset);\n }\n\n // 52 - 61: 0123456789\n if (zero <= charCode && charCode <= nine) {\n return (charCode - zero + numberOffset);\n }\n\n // 62: +\n if (charCode == plus) {\n return 62;\n }\n\n // 63: /\n if (charCode == slash) {\n return 63;\n }\n\n // Invalid base64 digit.\n return -1;\n};\n","import { DEBUG_BUILD } from './debug-build.js';\nimport { isThenable } from './utils-hoist/is.js';\nimport { logger } from './utils-hoist/logger.js';\nimport { SyncPromise } from './utils-hoist/syncpromise.js';\n\n/**\n * Process an array of event processors, returning the processed event (or `null` if the event was dropped).\n */\nfunction notifyEventProcessors(\n processors,\n event,\n hint,\n index = 0,\n) {\n return new SyncPromise((resolve, reject) => {\n const processor = processors[index];\n if (event === null || typeof processor !== 'function') {\n resolve(event);\n } else {\n const result = processor({ ...event }, hint) ;\n\n DEBUG_BUILD && processor.id && result === null && logger.log(`Event processor \"${processor.id}\" dropped event`);\n\n if (isThenable(result)) {\n void result\n .then(final => notifyEventProcessors(processors, final, hint, index + 1).then(resolve))\n .then(null, reject);\n } else {\n void notifyEventProcessors(processors, result, hint, index + 1)\n .then(resolve)\n .then(null, reject);\n }\n }\n });\n}\n\nexport { notifyEventProcessors };\n","import { GLOBAL_OBJ } from './worldwide.js';\n\nlet parsedStackResults;\nlet lastKeysCount;\nlet cachedFilenameDebugIds;\n\n/**\n * Returns a map of filenames to debug identifiers.\n */\nfunction getFilenameToDebugIdMap(stackParser) {\n const debugIdMap = GLOBAL_OBJ._sentryDebugIds;\n if (!debugIdMap) {\n return {};\n }\n\n const debugIdKeys = Object.keys(debugIdMap);\n\n // If the count of registered globals hasn't changed since the last call, we\n // can just return the cached result.\n if (cachedFilenameDebugIds && debugIdKeys.length === lastKeysCount) {\n return cachedFilenameDebugIds;\n }\n\n lastKeysCount = debugIdKeys.length;\n\n // Build a map of filename -> debug_id.\n cachedFilenameDebugIds = debugIdKeys.reduce((acc, stackKey) => {\n if (!parsedStackResults) {\n parsedStackResults = {};\n }\n\n const result = parsedStackResults[stackKey];\n\n if (result) {\n acc[result[0]] = result[1];\n } else {\n const parsedStack = stackParser(stackKey);\n\n for (let i = parsedStack.length - 1; i >= 0; i--) {\n const stackFrame = parsedStack[i];\n const filename = stackFrame && stackFrame.filename;\n const debugId = debugIdMap[stackKey];\n\n if (filename && debugId) {\n acc[filename] = debugId;\n parsedStackResults[stackKey] = [filename, debugId];\n break;\n }\n }\n }\n\n return acc;\n }, {});\n\n return cachedFilenameDebugIds;\n}\n\n/**\n * Returns a list of debug images for the given resources.\n */\nfunction getDebugImagesForResources(\n stackParser,\n resource_paths,\n) {\n const filenameDebugIdMap = getFilenameToDebugIdMap(stackParser);\n\n if (!filenameDebugIdMap) {\n return [];\n }\n\n const images = [];\n for (const path of resource_paths) {\n if (path && filenameDebugIdMap[path]) {\n images.push({\n type: 'sourcemap',\n code_file: path,\n debug_id: filenameDebugIdMap[path] ,\n });\n }\n }\n\n return images;\n}\n\nexport { getDebugImagesForResources, getFilenameToDebugIdMap };\n","import { getDynamicSamplingContextFromSpan } from '../tracing/dynamicSamplingContext.js';\nimport { dropUndefinedKeys } from '../utils-hoist/object.js';\nimport { merge } from './merge.js';\nimport { spanToTraceContext, getRootSpan, spanToJSON } from './spanUtils.js';\n\n/**\n * Applies data from the scope to the event and runs all event processors on it.\n */\nfunction applyScopeDataToEvent(event, data) {\n const { fingerprint, span, breadcrumbs, sdkProcessingMetadata } = data;\n\n // Apply general data\n applyDataToEvent(event, data);\n\n // We want to set the trace context for normal events only if there isn't already\n // a trace context on the event. There is a product feature in place where we link\n // errors with transaction and it relies on that.\n if (span) {\n applySpanToEvent(event, span);\n }\n\n applyFingerprintToEvent(event, fingerprint);\n applyBreadcrumbsToEvent(event, breadcrumbs);\n applySdkMetadataToEvent(event, sdkProcessingMetadata);\n}\n\n/** Merge data of two scopes together. */\nfunction mergeScopeData(data, mergeData) {\n const {\n extra,\n tags,\n user,\n contexts,\n level,\n sdkProcessingMetadata,\n breadcrumbs,\n fingerprint,\n eventProcessors,\n attachments,\n propagationContext,\n transactionName,\n span,\n } = mergeData;\n\n mergeAndOverwriteScopeData(data, 'extra', extra);\n mergeAndOverwriteScopeData(data, 'tags', tags);\n mergeAndOverwriteScopeData(data, 'user', user);\n mergeAndOverwriteScopeData(data, 'contexts', contexts);\n\n data.sdkProcessingMetadata = merge(data.sdkProcessingMetadata, sdkProcessingMetadata, 2);\n\n if (level) {\n data.level = level;\n }\n\n if (transactionName) {\n data.transactionName = transactionName;\n }\n\n if (span) {\n data.span = span;\n }\n\n if (breadcrumbs.length) {\n data.breadcrumbs = [...data.breadcrumbs, ...breadcrumbs];\n }\n\n if (fingerprint.length) {\n data.fingerprint = [...data.fingerprint, ...fingerprint];\n }\n\n if (eventProcessors.length) {\n data.eventProcessors = [...data.eventProcessors, ...eventProcessors];\n }\n\n if (attachments.length) {\n data.attachments = [...data.attachments, ...attachments];\n }\n\n data.propagationContext = { ...data.propagationContext, ...propagationContext };\n}\n\n/**\n * Merges certain scope data. Undefined values will overwrite any existing values.\n * Exported only for tests.\n */\nfunction mergeAndOverwriteScopeData\n\n(data, prop, mergeVal) {\n data[prop] = merge(data[prop], mergeVal, 1);\n}\n\nfunction applyDataToEvent(event, data) {\n const { extra, tags, user, contexts, level, transactionName } = data;\n\n const cleanedExtra = dropUndefinedKeys(extra);\n if (cleanedExtra && Object.keys(cleanedExtra).length) {\n event.extra = { ...cleanedExtra, ...event.extra };\n }\n\n const cleanedTags = dropUndefinedKeys(tags);\n if (cleanedTags && Object.keys(cleanedTags).length) {\n event.tags = { ...cleanedTags, ...event.tags };\n }\n\n const cleanedUser = dropUndefinedKeys(user);\n if (cleanedUser && Object.keys(cleanedUser).length) {\n event.user = { ...cleanedUser, ...event.user };\n }\n\n const cleanedContexts = dropUndefinedKeys(contexts);\n if (cleanedContexts && Object.keys(cleanedContexts).length) {\n event.contexts = { ...cleanedContexts, ...event.contexts };\n }\n\n if (level) {\n event.level = level;\n }\n\n // transaction events get their `transaction` from the root span name\n if (transactionName && event.type !== 'transaction') {\n event.transaction = transactionName;\n }\n}\n\nfunction applyBreadcrumbsToEvent(event, breadcrumbs) {\n const mergedBreadcrumbs = [...(event.breadcrumbs || []), ...breadcrumbs];\n event.breadcrumbs = mergedBreadcrumbs.length ? mergedBreadcrumbs : undefined;\n}\n\nfunction applySdkMetadataToEvent(event, sdkProcessingMetadata) {\n event.sdkProcessingMetadata = {\n ...event.sdkProcessingMetadata,\n ...sdkProcessingMetadata,\n };\n}\n\nfunction applySpanToEvent(event, span) {\n event.contexts = {\n trace: spanToTraceContext(span),\n ...event.contexts,\n };\n\n event.sdkProcessingMetadata = {\n dynamicSamplingContext: getDynamicSamplingContextFromSpan(span),\n ...event.sdkProcessingMetadata,\n };\n\n const rootSpan = getRootSpan(span);\n const transactionName = spanToJSON(rootSpan).description;\n if (transactionName && !event.transaction && event.type === 'transaction') {\n event.transaction = transactionName;\n }\n}\n\n/**\n * Applies fingerprint from the scope to the event if there's one,\n * uses message if there's one instead or get rid of empty fingerprint\n */\nfunction applyFingerprintToEvent(event, fingerprint) {\n // Make sure it's an array first and we actually have something in place\n event.fingerprint = event.fingerprint\n ? Array.isArray(event.fingerprint)\n ? event.fingerprint\n : [event.fingerprint]\n : [];\n\n // If we have something on the scope, then merge it with event\n if (fingerprint) {\n event.fingerprint = event.fingerprint.concat(fingerprint);\n }\n\n // If we have no data at all, remove empty array default\n if (event.fingerprint && !event.fingerprint.length) {\n delete event.fingerprint;\n }\n}\n\nexport { applyScopeDataToEvent, mergeAndOverwriteScopeData, mergeScopeData };\n","import { DEFAULT_ENVIRONMENT } from '../constants.js';\nimport { getGlobalScope } from '../currentScopes.js';\nimport { notifyEventProcessors } from '../eventProcessors.js';\nimport { Scope } from '../scope.js';\nimport { getFilenameToDebugIdMap } from '../utils-hoist/debug-ids.js';\nimport { uuid4, addExceptionMechanism } from '../utils-hoist/misc.js';\nimport { normalize } from '../utils-hoist/normalize.js';\nimport { truncate } from '../utils-hoist/string.js';\nimport { dateTimestampInSeconds } from '../utils-hoist/time.js';\nimport { mergeScopeData, applyScopeDataToEvent } from './applyScopeDataToEvent.js';\n\n/**\n * This type makes sure that we get either a CaptureContext, OR an EventHint.\n * It does not allow mixing them, which could lead to unexpected outcomes, e.g. this is disallowed:\n * { user: { id: '123' }, mechanism: { handled: false } }\n */\n\n/**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n * @hidden\n */\nfunction prepareEvent(\n options,\n event,\n hint,\n scope,\n client,\n isolationScope,\n) {\n const { normalizeDepth = 3, normalizeMaxBreadth = 1000 } = options;\n const prepared = {\n ...event,\n event_id: event.event_id || hint.event_id || uuid4(),\n timestamp: event.timestamp || dateTimestampInSeconds(),\n };\n const integrations = hint.integrations || options.integrations.map(i => i.name);\n\n applyClientOptions(prepared, options);\n applyIntegrationsMetadata(prepared, integrations);\n\n if (client) {\n client.emit('applyFrameMetadata', event);\n }\n\n // Only put debug IDs onto frames for error events.\n if (event.type === undefined) {\n applyDebugIds(prepared, options.stackParser);\n }\n\n // If we have scope given to us, use it as the base for further modifications.\n // This allows us to prevent unnecessary copying of data if `captureContext` is not provided.\n const finalScope = getFinalScope(scope, hint.captureContext);\n\n if (hint.mechanism) {\n addExceptionMechanism(prepared, hint.mechanism);\n }\n\n const clientEventProcessors = client ? client.getEventProcessors() : [];\n\n // This should be the last thing called, since we want that\n // {@link Scope.addEventProcessor} gets the finished prepared event.\n // Merge scope data together\n const data = getGlobalScope().getScopeData();\n\n if (isolationScope) {\n const isolationData = isolationScope.getScopeData();\n mergeScopeData(data, isolationData);\n }\n\n if (finalScope) {\n const finalScopeData = finalScope.getScopeData();\n mergeScopeData(data, finalScopeData);\n }\n\n const attachments = [...(hint.attachments || []), ...data.attachments];\n if (attachments.length) {\n hint.attachments = attachments;\n }\n\n applyScopeDataToEvent(prepared, data);\n\n const eventProcessors = [\n ...clientEventProcessors,\n // Run scope event processors _after_ all other processors\n ...data.eventProcessors,\n ];\n\n const result = notifyEventProcessors(eventProcessors, prepared, hint);\n\n return result.then(evt => {\n if (evt) {\n // We apply the debug_meta field only after all event processors have ran, so that if any event processors modified\n // file names (e.g.the RewriteFrames integration) the filename -> debug ID relationship isn't destroyed.\n // This should not cause any PII issues, since we're only moving data that is already on the event and not adding\n // any new data\n applyDebugMeta(evt);\n }\n\n if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n return normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth);\n }\n return evt;\n });\n}\n\n/**\n * Enhances event using the client configuration.\n * It takes care of all \"static\" values like environment, release and `dist`,\n * as well as truncating overly long values.\n *\n * Only exported for tests.\n *\n * @param event event instance to be enhanced\n */\nfunction applyClientOptions(event, options) {\n const { environment, release, dist, maxValueLength = 250 } = options;\n\n // empty strings do not make sense for environment, release, and dist\n // so we handle them the same as if they were not provided\n event.environment = event.environment || environment || DEFAULT_ENVIRONMENT;\n\n if (!event.release && release) {\n event.release = release;\n }\n\n if (!event.dist && dist) {\n event.dist = dist;\n }\n\n if (event.message) {\n event.message = truncate(event.message, maxValueLength);\n }\n\n const exception = event.exception && event.exception.values && event.exception.values[0];\n if (exception && exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n\n const request = event.request;\n if (request && request.url) {\n request.url = truncate(request.url, maxValueLength);\n }\n}\n\n/**\n * Puts debug IDs into the stack frames of an error event.\n */\nfunction applyDebugIds(event, stackParser) {\n // Build a map of filename -> debug_id\n const filenameDebugIdMap = getFilenameToDebugIdMap(stackParser);\n\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values.forEach(exception => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n exception.stacktrace.frames.forEach(frame => {\n if (filenameDebugIdMap && frame.filename) {\n frame.debug_id = filenameDebugIdMap[frame.filename];\n }\n });\n });\n } catch (e) {\n // To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n }\n}\n\n/**\n * Moves debug IDs from the stack frames of an error event into the debug_meta field.\n */\nfunction applyDebugMeta(event) {\n // Extract debug IDs and filenames from the stack frames on the event.\n const filenameDebugIdMap = {};\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values.forEach(exception => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n exception.stacktrace.frames.forEach(frame => {\n if (frame.debug_id) {\n if (frame.abs_path) {\n filenameDebugIdMap[frame.abs_path] = frame.debug_id;\n } else if (frame.filename) {\n filenameDebugIdMap[frame.filename] = frame.debug_id;\n }\n delete frame.debug_id;\n }\n });\n });\n } catch (e) {\n // To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n }\n\n if (Object.keys(filenameDebugIdMap).length === 0) {\n return;\n }\n\n // Fill debug_meta information\n event.debug_meta = event.debug_meta || {};\n event.debug_meta.images = event.debug_meta.images || [];\n const images = event.debug_meta.images;\n Object.entries(filenameDebugIdMap).forEach(([filename, debug_id]) => {\n images.push({\n type: 'sourcemap',\n code_file: filename,\n debug_id,\n });\n });\n}\n\n/**\n * This function adds all used integrations to the SDK info in the event.\n * @param event The event that will be filled with all integrations.\n */\nfunction applyIntegrationsMetadata(event, integrationNames) {\n if (integrationNames.length > 0) {\n event.sdk = event.sdk || {};\n event.sdk.integrations = [...(event.sdk.integrations || []), ...integrationNames];\n }\n}\n\n/**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */\nfunction normalizeEvent(event, depth, maxBreadth) {\n if (!event) {\n return null;\n }\n\n const normalized = {\n ...event,\n ...(event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map(b => ({\n ...b,\n ...(b.data && {\n data: normalize(b.data, depth, maxBreadth),\n }),\n })),\n }),\n ...(event.user && {\n user: normalize(event.user, depth, maxBreadth),\n }),\n ...(event.contexts && {\n contexts: normalize(event.contexts, depth, maxBreadth),\n }),\n ...(event.extra && {\n extra: normalize(event.extra, depth, maxBreadth),\n }),\n };\n\n // event.contexts.trace stores information about a Transaction. Similarly,\n // event.spans[] stores information about child Spans. Given that a\n // Transaction is conceptually a Span, normalization should apply to both\n // Transactions and Spans consistently.\n // For now the decision is to skip normalization of Transactions and Spans,\n // so this block overwrites the normalized event to add back the original\n // Transaction information prior to normalization.\n if (event.contexts && event.contexts.trace && normalized.contexts) {\n normalized.contexts.trace = event.contexts.trace;\n\n // event.contexts.trace.data may contain circular/dangerous data so we need to normalize it\n if (event.contexts.trace.data) {\n normalized.contexts.trace.data = normalize(event.contexts.trace.data, depth, maxBreadth);\n }\n }\n\n // event.spans[].data may contain circular/dangerous data so we need to normalize it\n if (event.spans) {\n normalized.spans = event.spans.map(span => {\n return {\n ...span,\n ...(span.data && {\n data: normalize(span.data, depth, maxBreadth),\n }),\n };\n });\n }\n\n // event.contexts.flags (FeatureFlagContext) stores context for our feature\n // flag integrations. It has a greater nesting depth than our other typed\n // Contexts, so we re-normalize with a fixed depth of 3 here. We do not want\n // to skip this in case of conflicting, user-provided context.\n if (event.contexts && event.contexts.flags && normalized.contexts) {\n normalized.contexts.flags = normalize(event.contexts.flags, 3, maxBreadth);\n }\n\n return normalized;\n}\n\nfunction getFinalScope(\n scope,\n captureContext,\n) {\n if (!captureContext) {\n return scope;\n }\n\n const finalScope = scope ? scope.clone() : new Scope();\n finalScope.update(captureContext);\n return finalScope;\n}\n\n/**\n * Parse either an `EventHint` directly, or convert a `CaptureContext` to an `EventHint`.\n * This is used to allow to update method signatures that used to accept a `CaptureContext` but should now accept an `EventHint`.\n */\nfunction parseEventHintOrCaptureContext(\n hint,\n) {\n if (!hint) {\n return undefined;\n }\n\n // If you pass a Scope or `() => Scope` as CaptureContext, we just return this as captureContext\n if (hintIsScopeOrFunction(hint)) {\n return { captureContext: hint };\n }\n\n if (hintIsScopeContext(hint)) {\n return {\n captureContext: hint,\n };\n }\n\n return hint;\n}\n\nfunction hintIsScopeOrFunction(\n hint,\n) {\n return hint instanceof Scope || typeof hint === 'function';\n}\n\nconst captureContextKeys = [\n 'user',\n 'level',\n 'extra',\n 'contexts',\n 'tags',\n 'fingerprint',\n 'requestSession',\n 'propagationContext',\n] ;\n\nfunction hintIsScopeContext(hint) {\n return Object.keys(hint).some(key => captureContextKeys.includes(key ));\n}\n\nexport { applyClientOptions, applyDebugIds, applyDebugMeta, parseEventHintOrCaptureContext, prepareEvent };\n","import { Directive, HostListener, Input } from '@angular/core';\n\n@Directive({\n selector: '[bsNumbersOnly]',\n})\nexport class NumbersOnlyDirective {\n @Input() bsNumbersOnly: boolean;\n @Input() allowDecimals: boolean;\n\n private readonly regexNumbers = /^[0-9]*$/;\n private readonly regexDecimalNumbers = /^\\d*\\.?\\d+$/;\n\n constructor() {}\n\n @HostListener('paste', ['$event']) onPaste(event: ClipboardEvent) {\n if (!this.bsNumbersOnly) {\n return;\n }\n // Allow only to paste numeric values\n event.preventDefault();\n const pastedInput: string = event.clipboardData?.getData('text/plain') || '';\n const regex = this.allowDecimals ? this.regexDecimalNumbers : this.regexNumbers;\n\n if (regex.test(pastedInput)) {\n document.execCommand('insertText', false, pastedInput);\n }\n }\n\n @HostListener('drop', ['$event']) onDrop(event: DragEvent) {\n if (!this.bsNumbersOnly) {\n return;\n }\n // Allow only to drop numeric values\n event.preventDefault();\n const textData: string = event.dataTransfer?.getData('text') || '';\n const regex = this.allowDecimals ? this.regexDecimalNumbers : this.regexNumbers;\n if (regex.test(textData)) {\n (event.target as HTMLInputElement).focus();\n document.execCommand('insertText', false, textData);\n }\n }\n\n @HostListener('keydown', ['$event']) onKeyDown(event: KeyboardEvent) {\n if (!this.bsNumbersOnly) {\n return;\n }\n\n const keyPressed = event.key.toLowerCase();\n const regex = this.allowDecimals ? this.regexDecimalNumbers : this.regexNumbers;\n // Allow: Delete, Backspace, Tab, Escape, Enter\n if (\n ['delete', 'backspace', 'tab', 'escape', 'enter', 'arrowleft', 'arrowright'].indexOf(keyPressed) !== -1 ||\n // Allow: Ctrl+A\n (keyPressed === 'a' && event.ctrlKey === true) ||\n // Allow: Ctrl+C\n (keyPressed === 'c' && event.ctrlKey === true) ||\n // Allow: Ctrl+V\n (keyPressed === 'v' && event.ctrlKey === true) ||\n // Allow: Ctrl+X\n (keyPressed === 'x' && event.ctrlKey === true)\n ) {\n // let it happen, don't do anything\n return;\n }\n\n if (this.allowDecimals) {\n if (['decimal point', 'period', 'comma', '.', ','].indexOf(keyPressed) !== -1) {\n return;\n }\n }\n if (regex.test(event.key)) {\n return;\n }\n\n event.preventDefault();\n }\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { operate } from '../util/lift';\nexport function catchError(selector) {\n return operate((source, subscriber) => {\n let innerSub = null;\n let syncUnsub = false;\n let handledResult;\n innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, (err) => {\n handledResult = innerFrom(selector(err, catchError(selector)(source)));\n if (innerSub) {\n innerSub.unsubscribe();\n innerSub = null;\n handledResult.subscribe(subscriber);\n }\n else {\n syncUnsub = true;\n }\n }));\n if (syncUnsub) {\n innerSub.unsubscribe();\n innerSub = null;\n handledResult.subscribe(subscriber);\n }\n });\n}\n","import { AmplifyError } from './AmplifyError.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createAssertionFunction = (errorMap, AssertionError = AmplifyError) => (assertion, name, additionalContext) => {\n const { message, recoverySuggestion } = errorMap[name];\n if (!assertion) {\n throw new AssertionError({\n name,\n message: additionalContext\n ? `${message} ${additionalContext}`\n : message,\n recoverySuggestion,\n });\n }\n};\n\nexport { createAssertionFunction };\n","import { EmptyError } from '../util/EmptyError';\nimport { filter } from './filter';\nimport { take } from './take';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { identity } from '../util/identity';\nexport function first(predicate, defaultValue) {\n const hasDefaultValue = arguments.length >= 2;\n return (source) => source.pipe(predicate ? filter((v, i) => predicate(v, i, source)) : identity, take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(() => new EmptyError()));\n}\n","import { getAsyncContextStrategy } from '../asyncContext/index.js';\nimport { getMainCarrier } from '../carrier.js';\nimport { getCurrentScope } from '../currentScopes.js';\nimport { getMetricSummaryJsonForSpan, updateMetricSummaryOnSpan } from '../metrics/metric-summary.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME } from '../semanticAttributes.js';\nimport { SPAN_STATUS_UNSET, SPAN_STATUS_OK } from '../tracing/spanstatus.js';\nimport { consoleSandbox } from '../utils-hoist/logger.js';\nimport { dropUndefinedKeys, addNonEnumerableProperty } from '../utils-hoist/object.js';\nimport { generateSpanId } from '../utils-hoist/propagationContext.js';\nimport { timestampInSeconds } from '../utils-hoist/time.js';\nimport { generateSentryTraceHeader } from '../utils-hoist/tracing.js';\nimport { _getSpanForScope } from './spanOnScope.js';\n\n// These are aligned with OpenTelemetry trace flags\nconst TRACE_FLAG_NONE = 0x0;\nconst TRACE_FLAG_SAMPLED = 0x1;\n\n// todo(v9): Remove this once we've stopped dropping spans via `beforeSendSpan`\nlet hasShownSpanDropWarning = false;\n\n/**\n * Convert a span to a trace context, which can be sent as the `trace` context in an event.\n * By default, this will only include trace_id, span_id & parent_span_id.\n * If `includeAllData` is true, it will also include data, op, status & origin.\n */\nfunction spanToTransactionTraceContext(span) {\n const { spanId: span_id, traceId: trace_id } = span.spanContext();\n const { data, op, parent_span_id, status, origin } = spanToJSON(span);\n\n return dropUndefinedKeys({\n parent_span_id,\n span_id,\n trace_id,\n data,\n op,\n status,\n origin,\n });\n}\n\n/**\n * Convert a span to a trace context, which can be sent as the `trace` context in a non-transaction event.\n */\nfunction spanToTraceContext(span) {\n const { spanId, traceId: trace_id, isRemote } = span.spanContext();\n\n // If the span is remote, we use a random/virtual span as span_id to the trace context,\n // and the remote span as parent_span_id\n const parent_span_id = isRemote ? spanId : spanToJSON(span).parent_span_id;\n const span_id = isRemote ? generateSpanId() : spanId;\n\n return dropUndefinedKeys({\n parent_span_id,\n span_id,\n trace_id,\n });\n}\n\n/**\n * Convert a Span to a Sentry trace header.\n */\nfunction spanToTraceHeader(span) {\n const { traceId, spanId } = span.spanContext();\n const sampled = spanIsSampled(span);\n return generateSentryTraceHeader(traceId, spanId, sampled);\n}\n\n/**\n * Convert a span time input into a timestamp in seconds.\n */\nfunction spanTimeInputToSeconds(input) {\n if (typeof input === 'number') {\n return ensureTimestampInSeconds(input);\n }\n\n if (Array.isArray(input)) {\n // See {@link HrTime} for the array-based time format\n return input[0] + input[1] / 1e9;\n }\n\n if (input instanceof Date) {\n return ensureTimestampInSeconds(input.getTime());\n }\n\n return timestampInSeconds();\n}\n\n/**\n * Converts a timestamp to second, if it was in milliseconds, or keeps it as second.\n */\nfunction ensureTimestampInSeconds(timestamp) {\n const isMs = timestamp > 9999999999;\n return isMs ? timestamp / 1000 : timestamp;\n}\n\n/**\n * Convert a span to a JSON representation.\n */\n// Note: Because of this, we currently have a circular type dependency (which we opted out of in package.json).\n// This is not avoidable as we need `spanToJSON` in `spanUtils.ts`, which in turn is needed by `span.ts` for backwards compatibility.\n// And `spanToJSON` needs the Span class from `span.ts` to check here.\nfunction spanToJSON(span) {\n if (spanIsSentrySpan(span)) {\n return span.getSpanJSON();\n }\n\n try {\n const { spanId: span_id, traceId: trace_id } = span.spanContext();\n\n // Handle a span from @opentelemetry/sdk-base-trace's `Span` class\n if (spanIsOpenTelemetrySdkTraceBaseSpan(span)) {\n const { attributes, startTime, name, endTime, parentSpanId, status } = span;\n\n return dropUndefinedKeys({\n span_id,\n trace_id,\n data: attributes,\n description: name,\n parent_span_id: parentSpanId,\n start_timestamp: spanTimeInputToSeconds(startTime),\n // This is [0,0] by default in OTEL, in which case we want to interpret this as no end time\n timestamp: spanTimeInputToSeconds(endTime) || undefined,\n status: getStatusMessage(status),\n op: attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP],\n origin: attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] ,\n _metrics_summary: getMetricSummaryJsonForSpan(span),\n });\n }\n\n // Finally, at least we have `spanContext()`....\n return {\n span_id,\n trace_id,\n };\n } catch (e) {\n return {};\n }\n}\n\nfunction spanIsOpenTelemetrySdkTraceBaseSpan(span) {\n const castSpan = span ;\n return !!castSpan.attributes && !!castSpan.startTime && !!castSpan.name && !!castSpan.endTime && !!castSpan.status;\n}\n\n/** Exported only for tests. */\n\n/**\n * Sadly, due to circular dependency checks we cannot actually import the Span class here and check for instanceof.\n * :( So instead we approximate this by checking if it has the `getSpanJSON` method.\n */\nfunction spanIsSentrySpan(span) {\n return typeof (span ).getSpanJSON === 'function';\n}\n\n/**\n * Returns true if a span is sampled.\n * In most cases, you should just use `span.isRecording()` instead.\n * However, this has a slightly different semantic, as it also returns false if the span is finished.\n * So in the case where this distinction is important, use this method.\n */\nfunction spanIsSampled(span) {\n // We align our trace flags with the ones OpenTelemetry use\n // So we also check for sampled the same way they do.\n const { traceFlags } = span.spanContext();\n return traceFlags === TRACE_FLAG_SAMPLED;\n}\n\n/** Get the status message to use for a JSON representation of a span. */\nfunction getStatusMessage(status) {\n if (!status || status.code === SPAN_STATUS_UNSET) {\n return undefined;\n }\n\n if (status.code === SPAN_STATUS_OK) {\n return 'ok';\n }\n\n return status.message || 'unknown_error';\n}\n\nconst CHILD_SPANS_FIELD = '_sentryChildSpans';\nconst ROOT_SPAN_FIELD = '_sentryRootSpan';\n\n/**\n * Adds an opaque child span reference to a span.\n */\nfunction addChildSpanToSpan(span, childSpan) {\n // We store the root span reference on the child span\n // We need this for `getRootSpan()` to work\n const rootSpan = span[ROOT_SPAN_FIELD] || span;\n addNonEnumerableProperty(childSpan , ROOT_SPAN_FIELD, rootSpan);\n\n // We store a list of child spans on the parent span\n // We need this for `getSpanDescendants()` to work\n if (span[CHILD_SPANS_FIELD]) {\n span[CHILD_SPANS_FIELD].add(childSpan);\n } else {\n addNonEnumerableProperty(span, CHILD_SPANS_FIELD, new Set([childSpan]));\n }\n}\n\n/** This is only used internally by Idle Spans. */\nfunction removeChildSpanFromSpan(span, childSpan) {\n if (span[CHILD_SPANS_FIELD]) {\n span[CHILD_SPANS_FIELD].delete(childSpan);\n }\n}\n\n/**\n * Returns an array of the given span and all of its descendants.\n */\nfunction getSpanDescendants(span) {\n const resultSet = new Set();\n\n function addSpanChildren(span) {\n // This exit condition is required to not infinitely loop in case of a circular dependency.\n if (resultSet.has(span)) {\n return;\n // We want to ignore unsampled spans (e.g. non recording spans)\n } else if (spanIsSampled(span)) {\n resultSet.add(span);\n const childSpans = span[CHILD_SPANS_FIELD] ? Array.from(span[CHILD_SPANS_FIELD]) : [];\n for (const childSpan of childSpans) {\n addSpanChildren(childSpan);\n }\n }\n }\n\n addSpanChildren(span);\n\n return Array.from(resultSet);\n}\n\n/**\n * Returns the root span of a given span.\n */\nfunction getRootSpan(span) {\n return span[ROOT_SPAN_FIELD] || span;\n}\n\n/**\n * Returns the currently active span.\n */\nfunction getActiveSpan() {\n const carrier = getMainCarrier();\n const acs = getAsyncContextStrategy(carrier);\n if (acs.getActiveSpan) {\n return acs.getActiveSpan();\n }\n\n return _getSpanForScope(getCurrentScope());\n}\n\n/**\n * Updates the metric summary on the currently active span\n */\nfunction updateMetricSummaryOnActiveSpan(\n metricType,\n sanitizedName,\n value,\n unit,\n tags,\n bucketKey,\n) {\n const span = getActiveSpan();\n if (span) {\n updateMetricSummaryOnSpan(span, metricType, sanitizedName, value, unit, tags, bucketKey);\n }\n}\n\n/**\n * Logs a warning once if `beforeSendSpan` is used to drop spans.\n *\n * todo(v9): Remove this once we've stopped dropping spans via `beforeSendSpan`.\n */\nfunction showSpanDropWarning() {\n if (!hasShownSpanDropWarning) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn(\n '[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK version 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.',\n );\n });\n hasShownSpanDropWarning = true;\n }\n}\n\n/**\n * Updates the name of the given span and ensures that the span name is not\n * overwritten by the Sentry SDK.\n *\n * Use this function instead of `span.updateName()` if you want to make sure that\n * your name is kept. For some spans, for example root `http.server` spans the\n * Sentry SDK would otherwise overwrite the span name with a high-quality name\n * it infers when the span ends.\n *\n * Use this function in server code or when your span is started on the server\n * and on the client (browser). If you only update a span name on the client,\n * you can also use `span.updateName()` the SDK does not overwrite the name.\n *\n * @param span - The span to update the name of.\n * @param name - The name to set on the span.\n */\nfunction updateSpanName(span, name) {\n span.updateName(name);\n span.setAttributes({\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'custom',\n [SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME]: name,\n });\n}\n\nexport { TRACE_FLAG_NONE, TRACE_FLAG_SAMPLED, addChildSpanToSpan, getActiveSpan, getRootSpan, getSpanDescendants, getStatusMessage, removeChildSpanFromSpan, showSpanDropWarning, spanIsSampled, spanTimeInputToSeconds, spanToJSON, spanToTraceContext, spanToTraceHeader, spanToTransactionTraceContext, updateMetricSummaryOnActiveSpan, updateSpanName };\n","import { GLOBAL_OBJ } from './worldwide.js';\n\nconst ONE_SECOND_IN_MS = 1000;\n\n/**\n * A partial definition of the [Performance Web API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Performance}\n * for accessing a high-resolution monotonic clock.\n */\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using the Date API.\n *\n * TODO(v8): Return type should be rounded.\n */\nfunction dateTimestampInSeconds() {\n return Date.now() / ONE_SECOND_IN_MS;\n}\n\n/**\n * Returns a wrapper around the native Performance API browser implementation, or undefined for browsers that do not\n * support the API.\n *\n * Wrapping the native API works around differences in behavior from different browsers.\n */\nfunction createUnixTimestampInSecondsFunc() {\n const { performance } = GLOBAL_OBJ ;\n if (!performance || !performance.now) {\n return dateTimestampInSeconds;\n }\n\n // Some browser and environments don't have a timeOrigin, so we fallback to\n // using Date.now() to compute the starting time.\n const approxStartingTimeOrigin = Date.now() - performance.now();\n const timeOrigin = performance.timeOrigin == undefined ? approxStartingTimeOrigin : performance.timeOrigin;\n\n // performance.now() is a monotonic clock, which means it starts at 0 when the process begins. To get the current\n // wall clock time (actual UNIX timestamp), we need to add the starting time origin and the current time elapsed.\n //\n // TODO: This does not account for the case where the monotonic clock that powers performance.now() drifts from the\n // wall clock time, which causes the returned timestamp to be inaccurate. We should investigate how to detect and\n // correct for this.\n // See: https://github.com/getsentry/sentry-javascript/issues/2590\n // See: https://github.com/mdn/content/issues/4713\n // See: https://dev.to/noamr/when-a-millisecond-is-not-a-millisecond-3h6\n return () => {\n return (timeOrigin + performance.now()) / ONE_SECOND_IN_MS;\n };\n}\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using either the Performance or Date APIs, depending on the\n * availability of the Performance API.\n *\n * BUG: Note that because of how browsers implement the Performance API, the clock might stop when the computer is\n * asleep. This creates a skew between `dateTimestampInSeconds` and `timestampInSeconds`. The\n * skew can grow to arbitrary amounts like days, weeks or months.\n * See https://github.com/getsentry/sentry-javascript/issues/2590.\n */\nconst timestampInSeconds = createUnixTimestampInSecondsFunc();\n\n/**\n * Internal helper to store what is the source of browserPerformanceTimeOrigin below. For debugging only.\n *\n * @deprecated This variable will be removed in the next major version.\n */\nlet _browserPerformanceTimeOriginMode;\n\n/**\n * The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the\n * performance API is available.\n */\nconst browserPerformanceTimeOrigin = (() => {\n // Unfortunately browsers may report an inaccurate time origin data, through either performance.timeOrigin or\n // performance.timing.navigationStart, which results in poor results in performance data. We only treat time origin\n // data as reliable if they are within a reasonable threshold of the current time.\n\n const { performance } = GLOBAL_OBJ ;\n if (!performance || !performance.now) {\n // eslint-disable-next-line deprecation/deprecation\n _browserPerformanceTimeOriginMode = 'none';\n return undefined;\n }\n\n const threshold = 3600 * 1000;\n const performanceNow = performance.now();\n const dateNow = Date.now();\n\n // if timeOrigin isn't available set delta to threshold so it isn't used\n const timeOriginDelta = performance.timeOrigin\n ? Math.abs(performance.timeOrigin + performanceNow - dateNow)\n : threshold;\n const timeOriginIsReliable = timeOriginDelta < threshold;\n\n // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin\n // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.\n // Also as of writing, performance.timing is not available in Web Workers in mainstream browsers, so it is not always\n // a valid fallback. In the absence of an initial time provided by the browser, fallback to the current time from the\n // Date API.\n // eslint-disable-next-line deprecation/deprecation\n const navigationStart = performance.timing && performance.timing.navigationStart;\n const hasNavigationStart = typeof navigationStart === 'number';\n // if navigationStart isn't available set delta to threshold so it isn't used\n const navigationStartDelta = hasNavigationStart ? Math.abs(navigationStart + performanceNow - dateNow) : threshold;\n const navigationStartIsReliable = navigationStartDelta < threshold;\n\n if (timeOriginIsReliable || navigationStartIsReliable) {\n // Use the more reliable time origin\n if (timeOriginDelta <= navigationStartDelta) {\n // eslint-disable-next-line deprecation/deprecation\n _browserPerformanceTimeOriginMode = 'timeOrigin';\n return performance.timeOrigin;\n } else {\n // eslint-disable-next-line deprecation/deprecation\n _browserPerformanceTimeOriginMode = 'navigationStart';\n return navigationStart;\n }\n }\n\n // Either both timeOrigin and navigationStart are skewed or neither is available, fallback to Date.\n // eslint-disable-next-line deprecation/deprecation\n _browserPerformanceTimeOriginMode = 'dateNow';\n return dateNow;\n})();\n\nexport { _browserPerformanceTimeOriginMode, browserPerformanceTimeOrigin, dateTimestampInSeconds, timestampInSeconds };\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { LanguageSelectorComponent } from './language-selector/language-selector.component';\nimport {BrightsideUiModule} from \"@brightside/brightside-ui\";\nimport {TranslateModule} from \"@ngx-translate/core\";\n\n@NgModule({\n imports: [CommonModule, BrightsideUiModule, TranslateModule],\n declarations: [LanguageSelectorComponent],\n exports: [LanguageSelectorComponent],\n})\nexport class LanguageSelectionModule {}\n","//! moment.js locale configuration\n//! locale : Central Atlas Tamazight Latin [tzm-latn]\n//! author : Abdel Said : https://github.com/abdelsaid\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var tzmLatn = moment.defineLocale('tzm-latn', {\n months: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(\n '_'\n ),\n monthsShort:\n 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(\n '_'\n ),\n weekdays: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n weekdaysShort: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n weekdaysMin: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[asdkh g] LT',\n nextDay: '[aska g] LT',\n nextWeek: 'dddd [g] LT',\n lastDay: '[assant g] LT',\n lastWeek: 'dddd [g] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'dadkh s yan %s',\n past: 'yan %s',\n s: 'imik',\n ss: '%d imik',\n m: 'minuḍ',\n mm: '%d minuḍ',\n h: 'saɛa',\n hh: '%d tassaɛin',\n d: 'ass',\n dd: '%d ossan',\n M: 'ayowr',\n MM: '%d iyyirn',\n y: 'asgas',\n yy: '%d isgasn',\n },\n week: {\n dow: 6, // Saturday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return tzmLatn;\n\n})));\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n imports: [CommonModule]\n})\nexport class BrightsideUiServicesModule {}\n","import { Injectable } from '@angular/core';\nimport { NavigationEnd, Router } from '@angular/router';\nimport { filter } from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class RoutingStateService {\n history: string[] = [];\n constructor(private router: Router) {}\n\n public loadRouting(): void {\n this.router.events.pipe(filter((event) => event instanceof NavigationEnd)).subscribe((e: any) => {\n this.history.push(e.urlAfterRedirects);\n });\n }\n\n public navigateTo(route: string[], options: any = {}) {\n this.router.navigate(route, options);\n };\n\n public popAndNavigateTo(route: string[], options: any = {}) {\n if (this.history.length > 1) {\n this.history.pop(); // the current page\n }\n\n this.navigateTo(route, options);\n }\n\n public goBack(): void {\n if (this.history.length > 1) {\n this.history.pop(); // the current page\n const prevPage = this.history.pop() as string;\n this.router.navigateByUrl(prevPage);\n } else {\n this.navigateTo(['/']);\n }\n }\n}\n","import { Injectable } from '@angular/core';\n\n\nconst sizmekPixelMap:{[key: string]: string} = {\n \"legrand\": \"1073746533\",\n \"fivebelow\": \"1073746534\"\n};\n\n@Injectable({\n providedIn: 'root'\n})\nexport class TrackingService {\n\n /**\n * determine which company to get a pixel from.\n * @param hostname - just the hostname, no https garbage.\n */\n getSizmekPixelId(hostname:string) : string {\n if ( hostname.match(/.*.gobrightside.com/)) {\n return sizmekPixelMap[hostname.split(\".\")[0]]\n }\n return \"\";\n }\n\n addPixels(document:Document, hostname: string) {\n //just one for now.\n const pixelId = this.getSizmekPixelId(hostname);\n if ( pixelId ) {\n this.addSizmekPixel(document, pixelId);\n }\n }\n\n addSizmekPixel(document:Document,pixelId:string) {\n console.log(`Adding Pixel for Sizmek...`);\n (function(e, s, t) {\n // @ts-ignore\n // tslint:disable-next-line:no-shadowed-variable\n const versaTagObj = { $: [], onready: function(e) { this.$.push(e) } };\n // @ts-ignore\n // tslint:disable-next-line:no-shadowed-variables\n const n = s.getElementsByTagName(\"script\")[0], r = s.createElement(\"script\"); r.options = t, r.async = !0, r.src = \"https://secure-ds.serving-sys.com/SemiCachedScripts/ebOneTag.js?id=\" + e, r.options = t, n.parentNode.insertBefore(r, n) })(pixelId, document, { dataLayer:\"SizmekDataLayer\", id: pixelId });\n }\n}\n","import { Component, Input, Output, EventEmitter } from '@angular/core';\n\n@Component({\n selector: 'bw-block',\n templateUrl: './block.component.html',\n styleUrls: ['./block.component.scss']\n})\nexport class BlockComponent {\n\n @Input() secondaryStyle = false;\n @Input() showPointer = true;\n @Output() blockAction = new EventEmitter();\n\n handleBlockAction(event: Event) {\n this.blockAction.emit(event);\n }\n}\n","<div class=\"bw-block\" [ngClass]=\"{'secondary': secondaryStyle, 'pointer': showPointer}\" (click)=\"handleBlockAction($event)\">\n <ng-content></ng-content>\n</div>\n","import { createErrorClass } from './createErrorClass';\nexport const UnsubscriptionError = createErrorClass((_super) => function UnsubscriptionErrorImpl(errors) {\n _super(this);\n this.message = errors\n ? `${errors.length} errors occurred during unsubscription:\n${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join('\\n ')}`\n : '';\n this.name = 'UnsubscriptionError';\n this.errors = errors;\n});\n","import { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nimport { arrRemove } from './util/arrRemove';\nexport class Subscription {\n constructor(initialTeardown) {\n this.initialTeardown = initialTeardown;\n this.closed = false;\n this._parentage = null;\n this._finalizers = null;\n }\n unsubscribe() {\n let errors;\n if (!this.closed) {\n this.closed = true;\n const { _parentage } = this;\n if (_parentage) {\n this._parentage = null;\n if (Array.isArray(_parentage)) {\n for (const parent of _parentage) {\n parent.remove(this);\n }\n }\n else {\n _parentage.remove(this);\n }\n }\n const { initialTeardown: initialFinalizer } = this;\n if (isFunction(initialFinalizer)) {\n try {\n initialFinalizer();\n }\n catch (e) {\n errors = e instanceof UnsubscriptionError ? e.errors : [e];\n }\n }\n const { _finalizers } = this;\n if (_finalizers) {\n this._finalizers = null;\n for (const finalizer of _finalizers) {\n try {\n execFinalizer(finalizer);\n }\n catch (err) {\n errors = errors !== null && errors !== void 0 ? errors : [];\n if (err instanceof UnsubscriptionError) {\n errors = [...errors, ...err.errors];\n }\n else {\n errors.push(err);\n }\n }\n }\n }\n if (errors) {\n throw new UnsubscriptionError(errors);\n }\n }\n }\n add(teardown) {\n var _a;\n if (teardown && teardown !== this) {\n if (this.closed) {\n execFinalizer(teardown);\n }\n else {\n if (teardown instanceof Subscription) {\n if (teardown.closed || teardown._hasParent(this)) {\n return;\n }\n teardown._addParent(this);\n }\n (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown);\n }\n }\n }\n _hasParent(parent) {\n const { _parentage } = this;\n return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));\n }\n _addParent(parent) {\n const { _parentage } = this;\n this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;\n }\n _removeParent(parent) {\n const { _parentage } = this;\n if (_parentage === parent) {\n this._parentage = null;\n }\n else if (Array.isArray(_parentage)) {\n arrRemove(_parentage, parent);\n }\n }\n remove(teardown) {\n const { _finalizers } = this;\n _finalizers && arrRemove(_finalizers, teardown);\n if (teardown instanceof Subscription) {\n teardown._removeParent(this);\n }\n }\n}\nSubscription.EMPTY = (() => {\n const empty = new Subscription();\n empty.closed = true;\n return empty;\n})();\nexport const EMPTY_SUBSCRIPTION = Subscription.EMPTY;\nexport function isSubscription(value) {\n return (value instanceof Subscription ||\n (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe)));\n}\nfunction execFinalizer(finalizer) {\n if (isFunction(finalizer)) {\n finalizer();\n }\n else {\n finalizer.unsubscribe();\n }\n}\n","// tslint:disable: no-any typedef\n// eslint-disable-next-line no-var\ndeclare var global: any;\n\n(function() {\n if (!global.KeyboardEvent) {\n global.KeyboardEvent = function(_eventType: any, _init: any) {};\n }\n})();\n\nexport type CustomKeyboardEvent = KeyboardEvent;\n","import { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { Message } from './message';\n\n@Injectable()\nexport class MessageService {\n\n private messageSource = new Subject<Message|Message[]>();\n private clearSource = new Subject<string|undefined>();\n\n messageObserver = this.messageSource.asObservable();\n clearObserver = this.clearSource.asObservable();\n\n add(message: Message) {\n if (message) {\n this.messageSource.next(message);\n }\n }\n\n addAll(messages: Message[]) {\n if (messages && messages.length) {\n this.messageSource.next(messages);\n }\n }\n\n clear(key?: string) {\n this.clearSource.next(key||undefined);\n }\n\n}\n","import { __awaiter, __generator } from \"tslib\";\n/**\n * Checks whether we're in a Node.js environment\n *\n * @returns Answer to given question\n */\nexport function isNodeEnv() {\n var _a;\n return typeof process === 'object' && ((_a = process === null || process === void 0 ? void 0 : process.versions) === null || _a === void 0 ? void 0 : _a.node) !== undefined;\n}\n/**\n * Checks whether we're in a browser environment\n *\n * @returns Answer to given question\n */\nexport function isBrowserEnv() {\n return typeof window === 'object' && (window === null || window === void 0 ? void 0 : window.document) !== undefined;\n}\nvar fallbackGlobalObject = {};\n/**\n * Safely get global scope object\n *\n * @returns Global scope object\n */\nexport var getGlobalObject = function () {\n if (isNodeEnv()) {\n return global;\n }\n else if (typeof window !== 'undefined') {\n return window;\n }\n else if (typeof self !== 'undefined') {\n return self;\n }\n else {\n return fallbackGlobalObject;\n }\n};\nexport var getGlobalAmplitudeNamespace = function () {\n var global = getGlobalObject();\n if (global.__AMPLITUDE__ === undefined) {\n global.__AMPLITUDE__ = {};\n }\n return global.__AMPLITUDE__;\n};\n/**\n * A promise-based way to sleep for x millseconds, then queue ourselves back to the\n * JS event loop.\n *\n * @param milliseconds The number of milliseconds to wait for\n */\nexport var asyncSleep = function (milliseconds) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, milliseconds); })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n}); };\n/**\n * Fixes browser edge case where Prototype.js injects Array.prototype.toJSON and breaks the built-in JSON.stringify()\n *\n * @returns true if Array.prototype.toJSON was deleted, false if not\n */\nexport var prototypeJsFix = function () {\n var _a;\n if (isBrowserEnv()) {\n var augmentedWindow = window;\n var augmentedArray = Array;\n if (augmentedWindow.Prototype !== undefined && ((_a = augmentedArray.prototype) === null || _a === void 0 ? void 0 : _a.toJSON) !== undefined) {\n delete augmentedArray.prototype.toJSON;\n return true;\n }\n }\n return false;\n};\n","const token = '%[a-f0-9]{2}';\nconst singleMatcher = new RegExp('(' + token + ')|([^%]+?)', 'gi');\nconst multiMatcher = new RegExp('(' + token + ')+', 'gi');\n\nfunction decodeComponents(components, split) {\n\ttry {\n\t\t// Try to decode the entire string first\n\t\treturn [decodeURIComponent(components.join(''))];\n\t} catch {\n\t\t// Do nothing\n\t}\n\n\tif (components.length === 1) {\n\t\treturn components;\n\t}\n\n\tsplit = split || 1;\n\n\t// Split the array in 2 parts\n\tconst left = components.slice(0, split);\n\tconst right = components.slice(split);\n\n\treturn Array.prototype.concat.call([], decodeComponents(left), decodeComponents(right));\n}\n\nfunction decode(input) {\n\ttry {\n\t\treturn decodeURIComponent(input);\n\t} catch {\n\t\tlet tokens = input.match(singleMatcher) || [];\n\n\t\tfor (let i = 1; i < tokens.length; i++) {\n\t\t\tinput = decodeComponents(tokens, i).join('');\n\n\t\t\ttokens = input.match(singleMatcher) || [];\n\t\t}\n\n\t\treturn input;\n\t}\n}\n\nfunction customDecodeURIComponent(input) {\n\t// Keep track of all the replacements and prefill the map with the `BOM`\n\tconst replaceMap = {\n\t\t'%FE%FF': '\\uFFFD\\uFFFD',\n\t\t'%FF%FE': '\\uFFFD\\uFFFD',\n\t};\n\n\tlet match = multiMatcher.exec(input);\n\twhile (match) {\n\t\ttry {\n\t\t\t// Decode as big chunks as possible\n\t\t\treplaceMap[match[0]] = decodeURIComponent(match[0]);\n\t\t} catch {\n\t\t\tconst result = decode(match[0]);\n\n\t\t\tif (result !== match[0]) {\n\t\t\t\treplaceMap[match[0]] = result;\n\t\t\t}\n\t\t}\n\n\t\tmatch = multiMatcher.exec(input);\n\t}\n\n\t// Add `%C2` at the end of the map to make sure it does not replace the combinator before everything else\n\treplaceMap['%C2'] = '\\uFFFD';\n\n\tconst entries = Object.keys(replaceMap);\n\n\tfor (const key of entries) {\n\t\t// Replace all decoded components\n\t\tinput = input.replace(new RegExp(key, 'g'), replaceMap[key]);\n\t}\n\n\treturn input;\n}\n\nexport default function decodeUriComponent(encodedURI) {\n\tif (typeof encodedURI !== 'string') {\n\t\tthrow new TypeError('Expected `encodedURI` to be of type `string`, got `' + typeof encodedURI + '`');\n\t}\n\n\ttry {\n\t\t// Try the built in decoder first\n\t\treturn decodeURIComponent(encodedURI);\n\t} catch {\n\t\t// Fallback to a more advanced decoder\n\t\treturn customDecodeURIComponent(encodedURI);\n\t}\n}\n","export default function splitOnFirst(string, separator) {\n\tif (!(typeof string === 'string' && typeof separator === 'string')) {\n\t\tthrow new TypeError('Expected the arguments to be of type `string`');\n\t}\n\n\tif (string === '' || separator === '') {\n\t\treturn [];\n\t}\n\n\tconst separatorIndex = string.indexOf(separator);\n\n\tif (separatorIndex === -1) {\n\t\treturn [];\n\t}\n\n\treturn [\n\t\tstring.slice(0, separatorIndex),\n\t\tstring.slice(separatorIndex + separator.length)\n\t];\n}\n","export function includeKeys(object, predicate) {\n\tconst result = {};\n\n\tif (Array.isArray(predicate)) {\n\t\tfor (const key of predicate) {\n\t\t\tconst descriptor = Object.getOwnPropertyDescriptor(object, key);\n\t\t\tif (descriptor?.enumerable) {\n\t\t\t\tObject.defineProperty(result, key, descriptor);\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// `Reflect.ownKeys()` is required to retrieve symbol properties\n\t\tfor (const key of Reflect.ownKeys(object)) {\n\t\t\tconst descriptor = Object.getOwnPropertyDescriptor(object, key);\n\t\t\tif (descriptor.enumerable) {\n\t\t\t\tconst value = object[key];\n\t\t\t\tif (predicate(key, value, object)) {\n\t\t\t\t\tObject.defineProperty(result, key, descriptor);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn result;\n}\n\nexport function excludeKeys(object, predicate) {\n\tif (Array.isArray(predicate)) {\n\t\tconst set = new Set(predicate);\n\t\treturn includeKeys(object, key => !set.has(key));\n\t}\n\n\treturn includeKeys(object, (key, value, object) => !predicate(key, value, object));\n}\n","import decodeComponent from 'decode-uri-component';\nimport splitOnFirst from 'split-on-first';\nimport {includeKeys} from 'filter-obj';\n\nconst isNullOrUndefined = value => value === null || value === undefined;\n\n// eslint-disable-next-line unicorn/prefer-code-point\nconst strictUriEncode = string => encodeURIComponent(string).replace(/[!'()*]/g, x => `%${x.charCodeAt(0).toString(16).toUpperCase()}`);\n\nconst encodeFragmentIdentifier = Symbol('encodeFragmentIdentifier');\n\nfunction encoderForArrayFormat(options) {\n\tswitch (options.arrayFormat) {\n\t\tcase 'index': {\n\t\t\treturn key => (result, value) => {\n\t\t\t\tconst index = result.length;\n\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined\n\t\t\t\t\t|| (options.skipNull && value === null)\n\t\t\t\t\t|| (options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [\n\t\t\t\t\t\t...result, [encode(key, options), '[', index, ']'].join(''),\n\t\t\t\t\t];\n\t\t\t\t}\n\n\t\t\t\treturn [\n\t\t\t\t\t...result,\n\t\t\t\t\t[encode(key, options), '[', encode(index, options), ']=', encode(value, options)].join(''),\n\t\t\t\t];\n\t\t\t};\n\t\t}\n\n\t\tcase 'bracket': {\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined\n\t\t\t\t\t|| (options.skipNull && value === null)\n\t\t\t\t\t|| (options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [\n\t\t\t\t\t\t...result,\n\t\t\t\t\t\t[encode(key, options), '[]'].join(''),\n\t\t\t\t\t];\n\t\t\t\t}\n\n\t\t\t\treturn [\n\t\t\t\t\t...result,\n\t\t\t\t\t[encode(key, options), '[]=', encode(value, options)].join(''),\n\t\t\t\t];\n\t\t\t};\n\t\t}\n\n\t\tcase 'colon-list-separator': {\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined\n\t\t\t\t\t|| (options.skipNull && value === null)\n\t\t\t\t\t|| (options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [\n\t\t\t\t\t\t...result,\n\t\t\t\t\t\t[encode(key, options), ':list='].join(''),\n\t\t\t\t\t];\n\t\t\t\t}\n\n\t\t\t\treturn [\n\t\t\t\t\t...result,\n\t\t\t\t\t[encode(key, options), ':list=', encode(value, options)].join(''),\n\t\t\t\t];\n\t\t\t};\n\t\t}\n\n\t\tcase 'comma':\n\t\tcase 'separator':\n\t\tcase 'bracket-separator': {\n\t\t\tconst keyValueSep = options.arrayFormat === 'bracket-separator'\n\t\t\t\t? '[]='\n\t\t\t\t: '=';\n\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined\n\t\t\t\t\t|| (options.skipNull && value === null)\n\t\t\t\t\t|| (options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\t// Translate null to an empty string so that it doesn't serialize as 'null'\n\t\t\t\tvalue = value === null ? '' : value;\n\n\t\t\t\tif (result.length === 0) {\n\t\t\t\t\treturn [[encode(key, options), keyValueSep, encode(value, options)].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [[result, encode(value, options)].join(options.arrayFormatSeparator)];\n\t\t\t};\n\t\t}\n\n\t\tdefault: {\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined\n\t\t\t\t\t|| (options.skipNull && value === null)\n\t\t\t\t\t|| (options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [\n\t\t\t\t\t\t...result,\n\t\t\t\t\t\tencode(key, options),\n\t\t\t\t\t];\n\t\t\t\t}\n\n\t\t\t\treturn [\n\t\t\t\t\t...result,\n\t\t\t\t\t[encode(key, options), '=', encode(value, options)].join(''),\n\t\t\t\t];\n\t\t\t};\n\t\t}\n\t}\n}\n\nfunction parserForArrayFormat(options) {\n\tlet result;\n\n\tswitch (options.arrayFormat) {\n\t\tcase 'index': {\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tresult = /\\[(\\d*)]$/.exec(key);\n\n\t\t\t\tkey = key.replace(/\\[\\d*]$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = {};\n\t\t\t\t}\n\n\t\t\t\taccumulator[key][result[1]] = value;\n\t\t\t};\n\t\t}\n\n\t\tcase 'bracket': {\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tresult = /(\\[])$/.exec(key);\n\t\t\t\tkey = key.replace(/\\[]$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = [value];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [...accumulator[key], value];\n\t\t\t};\n\t\t}\n\n\t\tcase 'colon-list-separator': {\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tresult = /(:list)$/.exec(key);\n\t\t\t\tkey = key.replace(/:list$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = [value];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [...accumulator[key], value];\n\t\t\t};\n\t\t}\n\n\t\tcase 'comma':\n\t\tcase 'separator': {\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tconst isArray = typeof value === 'string' && value.includes(options.arrayFormatSeparator);\n\t\t\t\tconst isEncodedArray = (typeof value === 'string' && !isArray && decode(value, options).includes(options.arrayFormatSeparator));\n\t\t\t\tvalue = isEncodedArray ? decode(value, options) : value;\n\t\t\t\tconst newValue = isArray || isEncodedArray ? value.split(options.arrayFormatSeparator).map(item => decode(item, options)) : (value === null ? value : decode(value, options));\n\t\t\t\taccumulator[key] = newValue;\n\t\t\t};\n\t\t}\n\n\t\tcase 'bracket-separator': {\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tconst isArray = /(\\[])$/.test(key);\n\t\t\t\tkey = key.replace(/\\[]$/, '');\n\n\t\t\t\tif (!isArray) {\n\t\t\t\t\taccumulator[key] = value ? decode(value, options) : value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst arrayValue = value === null\n\t\t\t\t\t? []\n\t\t\t\t\t: value.split(options.arrayFormatSeparator).map(item => decode(item, options));\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = arrayValue;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [...accumulator[key], ...arrayValue];\n\t\t\t};\n\t\t}\n\n\t\tdefault: {\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [...[accumulator[key]].flat(), value];\n\t\t\t};\n\t\t}\n\t}\n}\n\nfunction validateArrayFormatSeparator(value) {\n\tif (typeof value !== 'string' || value.length !== 1) {\n\t\tthrow new TypeError('arrayFormatSeparator must be single character string');\n\t}\n}\n\nfunction encode(value, options) {\n\tif (options.encode) {\n\t\treturn options.strict ? strictUriEncode(value) : encodeURIComponent(value);\n\t}\n\n\treturn value;\n}\n\nfunction decode(value, options) {\n\tif (options.decode) {\n\t\treturn decodeComponent(value);\n\t}\n\n\treturn value;\n}\n\nfunction keysSorter(input) {\n\tif (Array.isArray(input)) {\n\t\treturn input.sort();\n\t}\n\n\tif (typeof input === 'object') {\n\t\treturn keysSorter(Object.keys(input))\n\t\t\t.sort((a, b) => Number(a) - Number(b))\n\t\t\t.map(key => input[key]);\n\t}\n\n\treturn input;\n}\n\nfunction removeHash(input) {\n\tconst hashStart = input.indexOf('#');\n\tif (hashStart !== -1) {\n\t\tinput = input.slice(0, hashStart);\n\t}\n\n\treturn input;\n}\n\nfunction getHash(url) {\n\tlet hash = '';\n\tconst hashStart = url.indexOf('#');\n\tif (hashStart !== -1) {\n\t\thash = url.slice(hashStart);\n\t}\n\n\treturn hash;\n}\n\nfunction parseValue(value, options) {\n\tif (options.parseNumbers && !Number.isNaN(Number(value)) && (typeof value === 'string' && value.trim() !== '')) {\n\t\tvalue = Number(value);\n\t} else if (options.parseBooleans && value !== null && (value.toLowerCase() === 'true' || value.toLowerCase() === 'false')) {\n\t\tvalue = value.toLowerCase() === 'true';\n\t}\n\n\treturn value;\n}\n\nexport function extract(input) {\n\tinput = removeHash(input);\n\tconst queryStart = input.indexOf('?');\n\tif (queryStart === -1) {\n\t\treturn '';\n\t}\n\n\treturn input.slice(queryStart + 1);\n}\n\nexport function parse(query, options) {\n\toptions = {\n\t\tdecode: true,\n\t\tsort: true,\n\t\tarrayFormat: 'none',\n\t\tarrayFormatSeparator: ',',\n\t\tparseNumbers: false,\n\t\tparseBooleans: false,\n\t\t...options,\n\t};\n\n\tvalidateArrayFormatSeparator(options.arrayFormatSeparator);\n\n\tconst formatter = parserForArrayFormat(options);\n\n\t// Create an object with no prototype\n\tconst returnValue = Object.create(null);\n\n\tif (typeof query !== 'string') {\n\t\treturn returnValue;\n\t}\n\n\tquery = query.trim().replace(/^[?#&]/, '');\n\n\tif (!query) {\n\t\treturn returnValue;\n\t}\n\n\tfor (const parameter of query.split('&')) {\n\t\tif (parameter === '') {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst parameter_ = options.decode ? parameter.replace(/\\+/g, ' ') : parameter;\n\n\t\tlet [key, value] = splitOnFirst(parameter_, '=');\n\n\t\tif (key === undefined) {\n\t\t\tkey = parameter_;\n\t\t}\n\n\t\t// Missing `=` should be `null`:\n\t\t// http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters\n\t\tvalue = value === undefined ? null : (['comma', 'separator', 'bracket-separator'].includes(options.arrayFormat) ? value : decode(value, options));\n\t\tformatter(decode(key, options), value, returnValue);\n\t}\n\n\tfor (const [key, value] of Object.entries(returnValue)) {\n\t\tif (typeof value === 'object' && value !== null) {\n\t\t\tfor (const [key2, value2] of Object.entries(value)) {\n\t\t\t\tvalue[key2] = parseValue(value2, options);\n\t\t\t}\n\t\t} else {\n\t\t\treturnValue[key] = parseValue(value, options);\n\t\t}\n\t}\n\n\tif (options.sort === false) {\n\t\treturn returnValue;\n\t}\n\n\t// TODO: Remove the use of `reduce`.\n\t// eslint-disable-next-line unicorn/no-array-reduce\n\treturn (options.sort === true ? Object.keys(returnValue).sort() : Object.keys(returnValue).sort(options.sort)).reduce((result, key) => {\n\t\tconst value = returnValue[key];\n\t\tif (Boolean(value) && typeof value === 'object' && !Array.isArray(value)) {\n\t\t\t// Sort object keys, not values\n\t\t\tresult[key] = keysSorter(value);\n\t\t} else {\n\t\t\tresult[key] = value;\n\t\t}\n\n\t\treturn result;\n\t}, Object.create(null));\n}\n\nexport function stringify(object, options) {\n\tif (!object) {\n\t\treturn '';\n\t}\n\n\toptions = {encode: true,\n\t\tstrict: true,\n\t\tarrayFormat: 'none',\n\t\tarrayFormatSeparator: ',', ...options};\n\n\tvalidateArrayFormatSeparator(options.arrayFormatSeparator);\n\n\tconst shouldFilter = key => (\n\t\t(options.skipNull && isNullOrUndefined(object[key]))\n\t\t|| (options.skipEmptyString && object[key] === '')\n\t);\n\n\tconst formatter = encoderForArrayFormat(options);\n\n\tconst objectCopy = {};\n\n\tfor (const [key, value] of Object.entries(object)) {\n\t\tif (!shouldFilter(key)) {\n\t\t\tobjectCopy[key] = value;\n\t\t}\n\t}\n\n\tconst keys = Object.keys(objectCopy);\n\n\tif (options.sort !== false) {\n\t\tkeys.sort(options.sort);\n\t}\n\n\treturn keys.map(key => {\n\t\tconst value = object[key];\n\n\t\tif (value === undefined) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (value === null) {\n\t\t\treturn encode(key, options);\n\t\t}\n\n\t\tif (Array.isArray(value)) {\n\t\t\tif (value.length === 0 && options.arrayFormat === 'bracket-separator') {\n\t\t\t\treturn encode(key, options) + '[]';\n\t\t\t}\n\n\t\t\treturn value\n\t\t\t\t.reduce(formatter(key), [])\n\t\t\t\t.join('&');\n\t\t}\n\n\t\treturn encode(key, options) + '=' + encode(value, options);\n\t}).filter(x => x.length > 0).join('&');\n}\n\nexport function parseUrl(url, options) {\n\toptions = {\n\t\tdecode: true,\n\t\t...options,\n\t};\n\n\tlet [url_, hash] = splitOnFirst(url, '#');\n\n\tif (url_ === undefined) {\n\t\turl_ = url;\n\t}\n\n\treturn {\n\t\turl: url_?.split('?')?.[0] ?? '',\n\t\tquery: parse(extract(url), options),\n\t\t...(options && options.parseFragmentIdentifier && hash ? {fragmentIdentifier: decode(hash, options)} : {}),\n\t};\n}\n\nexport function stringifyUrl(object, options) {\n\toptions = {\n\t\tencode: true,\n\t\tstrict: true,\n\t\t[encodeFragmentIdentifier]: true,\n\t\t...options,\n\t};\n\n\tconst url = removeHash(object.url).split('?')[0] || '';\n\tconst queryFromUrl = extract(object.url);\n\n\tconst query = {\n\t\t...parse(queryFromUrl, {sort: false}),\n\t\t...object.query,\n\t};\n\n\tlet queryString = stringify(query, options);\n\tif (queryString) {\n\t\tqueryString = `?${queryString}`;\n\t}\n\n\tlet hash = getHash(object.url);\n\tif (object.fragmentIdentifier) {\n\t\tconst urlObjectForFragmentEncode = new URL(url);\n\t\turlObjectForFragmentEncode.hash = object.fragmentIdentifier;\n\t\thash = options[encodeFragmentIdentifier] ? urlObjectForFragmentEncode.hash : `#${object.fragmentIdentifier}`;\n\t}\n\n\treturn `${url}${queryString}${hash}`;\n}\n\nexport function pick(input, filter, options) {\n\toptions = {\n\t\tparseFragmentIdentifier: true,\n\t\t[encodeFragmentIdentifier]: false,\n\t\t...options,\n\t};\n\n\tconst {url, query, fragmentIdentifier} = parseUrl(input, options);\n\n\treturn stringifyUrl({\n\t\turl,\n\t\tquery: includeKeys(query, filter),\n\t\tfragmentIdentifier,\n\t}, options);\n}\n\nexport function exclude(input, filter, options) {\n\tconst exclusionFilter = Array.isArray(filter) ? key => !filter.includes(key) : (key, value) => !filter(key, value);\n\n\treturn pick(input, exclusionFilter, options);\n}\n","import * as queryString from './base.js';\n\nexport default queryString;\n","class ApplicationContextProviderImpl {\n getApplicationContext() {\n return {\n versionName: this.versionName,\n language: getLanguage(),\n platform: 'Web',\n os: undefined,\n deviceModel: undefined,\n };\n }\n}\nconst getLanguage = () => {\n return ((typeof navigator !== 'undefined' &&\n ((navigator.languages && navigator.languages[0]) ||\n navigator.language)) ||\n '');\n};\n\nclass EventBridgeImpl {\n constructor() {\n this.queue = [];\n }\n logEvent(event) {\n if (!this.receiver) {\n if (this.queue.length < 512) {\n this.queue.push(event);\n }\n }\n else {\n this.receiver(event);\n }\n }\n setEventReceiver(receiver) {\n this.receiver = receiver;\n if (this.queue.length > 0) {\n this.queue.forEach((event) => {\n receiver(event);\n });\n this.queue = [];\n }\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isEqual = (obj1, obj2) => {\n const primitive = ['string', 'number', 'boolean', 'undefined'];\n const typeA = typeof obj1;\n const typeB = typeof obj2;\n if (typeA !== typeB) {\n return false;\n }\n for (const p of primitive) {\n if (p === typeA) {\n return obj1 === obj2;\n }\n }\n // check null\n if (obj1 == null && obj2 == null) {\n return true;\n }\n else if (obj1 == null || obj2 == null) {\n return false;\n }\n // if got here - objects\n if (obj1.length !== obj2.length) {\n return false;\n }\n //check if arrays\n const isArrayA = Array.isArray(obj1);\n const isArrayB = Array.isArray(obj2);\n if (isArrayA !== isArrayB) {\n return false;\n }\n if (isArrayA && isArrayB) {\n //arrays\n for (let i = 0; i < obj1.length; i++) {\n if (!isEqual(obj1[i], obj2[i])) {\n return false;\n }\n }\n }\n else {\n //objects\n const sorted1 = Object.keys(obj1).sort();\n const sorted2 = Object.keys(obj2).sort();\n if (!isEqual(sorted1, sorted2)) {\n return false;\n }\n //compare object values\n let result = true;\n Object.keys(obj1).forEach((key) => {\n if (!isEqual(obj1[key], obj2[key])) {\n result = false;\n }\n });\n return result;\n }\n return true;\n};\n\nconst ID_OP_SET = '$set';\nconst ID_OP_UNSET = '$unset';\nconst ID_OP_CLEAR_ALL = '$clearAll';\n// Polyfill for Object.entries\nif (!Object.entries) {\n Object.entries = function (obj) {\n const ownProps = Object.keys(obj);\n let i = ownProps.length;\n const resArray = new Array(i);\n while (i--) {\n resArray[i] = [ownProps[i], obj[ownProps[i]]];\n }\n return resArray;\n };\n}\nclass IdentityStoreImpl {\n constructor() {\n this.identity = { userProperties: {} };\n this.listeners = new Set();\n }\n editIdentity() {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const self = this;\n const actingUserProperties = Object.assign({}, this.identity.userProperties);\n const actingIdentity = Object.assign(Object.assign({}, this.identity), { userProperties: actingUserProperties });\n return {\n setUserId: function (userId) {\n actingIdentity.userId = userId;\n return this;\n },\n setDeviceId: function (deviceId) {\n actingIdentity.deviceId = deviceId;\n return this;\n },\n setUserProperties: function (userProperties) {\n actingIdentity.userProperties = userProperties;\n return this;\n },\n setOptOut(optOut) {\n actingIdentity.optOut = optOut;\n return this;\n },\n updateUserProperties: function (actions) {\n let actingProperties = actingIdentity.userProperties || {};\n for (const [action, properties] of Object.entries(actions)) {\n switch (action) {\n case ID_OP_SET:\n for (const [key, value] of Object.entries(properties)) {\n actingProperties[key] = value;\n }\n break;\n case ID_OP_UNSET:\n for (const key of Object.keys(properties)) {\n delete actingProperties[key];\n }\n break;\n case ID_OP_CLEAR_ALL:\n actingProperties = {};\n break;\n }\n }\n actingIdentity.userProperties = actingProperties;\n return this;\n },\n commit: function () {\n self.setIdentity(actingIdentity);\n return this;\n },\n };\n }\n getIdentity() {\n return Object.assign({}, this.identity);\n }\n setIdentity(identity) {\n const originalIdentity = Object.assign({}, this.identity);\n this.identity = Object.assign({}, identity);\n if (!isEqual(originalIdentity, this.identity)) {\n this.listeners.forEach((listener) => {\n listener(identity);\n });\n }\n }\n addIdentityListener(listener) {\n this.listeners.add(listener);\n }\n removeIdentityListener(listener) {\n this.listeners.delete(listener);\n }\n}\n\nconst safeGlobal = typeof globalThis !== 'undefined'\n ? globalThis\n : typeof global !== 'undefined'\n ? global\n : self;\n\nclass AnalyticsConnector {\n constructor() {\n this.identityStore = new IdentityStoreImpl();\n this.eventBridge = new EventBridgeImpl();\n this.applicationContextProvider = new ApplicationContextProviderImpl();\n }\n static getInstance(instanceName) {\n if (!safeGlobal['analyticsConnectorInstances']) {\n safeGlobal['analyticsConnectorInstances'] = {};\n }\n if (!safeGlobal['analyticsConnectorInstances'][instanceName]) {\n safeGlobal['analyticsConnectorInstances'][instanceName] =\n new AnalyticsConnector();\n }\n return safeGlobal['analyticsConnectorInstances'][instanceName];\n }\n}\n\nexport { AnalyticsConnector };\n","import { isBrowserEnv, prototypeJsFix } from '@amplitude/utils';\nimport md5 from 'blueimp-md5';\nimport queryString from 'query-string';\nimport UAParser from '@amplitude/ua-parser-js';\nimport { AnalyticsConnector } from '@amplitude/analytics-connector';\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\nfunction _defineProperty(obj, key, value) {\n key = _toPropertyKey(key);\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 return obj;\n}\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _createForOfIteratorHelper(o, allowArrayLike) {\n var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n if (!it) {\n if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n var F = function () {};\n return {\n s: F,\n n: function () {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n },\n e: function (e) {\n throw e;\n },\n f: F\n };\n }\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n var normalCompletion = true,\n didErr = false,\n err;\n return {\n s: function () {\n it = it.call(o);\n },\n n: function () {\n var step = it.next();\n normalCompletion = step.done;\n return step;\n },\n e: function (e) {\n didErr = true;\n err = e;\n },\n f: function () {\n try {\n if (!normalCompletion && it.return != null) it.return();\n } finally {\n if (didErr) throw err;\n }\n }\n };\n}\nfunction _toPrimitive(input, hint) {\n if (typeof input !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (typeof res !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}\nfunction _toPropertyKey(arg) {\n var key = _toPrimitive(arg, \"string\");\n return typeof key === \"symbol\" ? key : String(key);\n}\n\nvar Constants = {\n DEFAULT_INSTANCE: '$default_instance',\n API_VERSION: 2,\n MAX_STRING_LENGTH: 4096,\n MAX_PROPERTY_KEYS: 1000,\n IDENTIFY_EVENT: '$identify',\n GROUP_IDENTIFY_EVENT: '$groupidentify',\n EVENT_LOG_URL: 'api.amplitude.com',\n EVENT_LOG_EU_URL: 'api.eu.amplitude.com',\n DYNAMIC_CONFIG_URL: 'regionconfig.amplitude.com',\n DYNAMIC_CONFIG_EU_URL: 'regionconfig.eu.amplitude.com',\n // localStorageKeys\n LAST_EVENT_ID: 'amplitude_lastEventId',\n LAST_EVENT_TIME: 'amplitude_lastEventTime',\n LAST_IDENTIFY_ID: 'amplitude_lastIdentifyId',\n LAST_SEQUENCE_NUMBER: 'amplitude_lastSequenceNumber',\n SESSION_ID: 'amplitude_sessionId',\n // Used in cookie as well\n DEVICE_ID: 'amplitude_deviceId',\n OPT_OUT: 'amplitude_optOut',\n USER_ID: 'amplitude_userId',\n // indexes of properties in cookie v2 storage format\n DEVICE_ID_INDEX: 0,\n USER_ID_INDEX: 1,\n OPT_OUT_INDEX: 2,\n SESSION_ID_INDEX: 3,\n LAST_EVENT_TIME_INDEX: 4,\n EVENT_ID_INDEX: 5,\n IDENTIFY_ID_INDEX: 6,\n SEQUENCE_NUMBER_INDEX: 7,\n COOKIE_TEST_PREFIX: 'amp_cookie_test',\n COOKIE_PREFIX: 'amp',\n // Storage options\n STORAGE_DEFAULT: '',\n STORAGE_COOKIES: 'cookies',\n STORAGE_NONE: 'none',\n STORAGE_LOCAL: 'localStorage',\n STORAGE_SESSION: 'sessionStorage',\n // revenue keys\n REVENUE_EVENT: 'revenue_amount',\n REVENUE_PRODUCT_ID: '$productId',\n REVENUE_QUANTITY: '$quantity',\n REVENUE_PRICE: '$price',\n REVENUE_REVENUE_TYPE: '$revenueType',\n AMP_DEVICE_ID_PARAM: 'amp_device_id',\n // url param\n AMP_REFERRER_PARAM: 'amp_referrer',\n // url param for overwriting the document.refer\n\n REFERRER: 'referrer',\n REFERRING_DOMAIN: 'referring_domain',\n // UTM Params\n UTM_SOURCE: 'utm_source',\n UTM_MEDIUM: 'utm_medium',\n UTM_CAMPAIGN: 'utm_campaign',\n UTM_TERM: 'utm_term',\n UTM_CONTENT: 'utm_content',\n ATTRIBUTION_EVENT: '[Amplitude] Attribution Captured',\n TRANSPORT_HTTP: 'http',\n TRANSPORT_BEACON: 'beacon'\n};\n\n/*\n * UTF-8 encoder/decoder\n * http://www.webtoolkit.info/\n */\nvar UTF8 = {\n encode: function encode(s) {\n var utftext = '';\n for (var n = 0; n < s.length; n++) {\n var c = s.charCodeAt(n);\n if (c < 128) {\n utftext += String.fromCharCode(c);\n } else if (c > 127 && c < 2048) {\n utftext += String.fromCharCode(c >> 6 | 192);\n utftext += String.fromCharCode(c & 63 | 128);\n } else {\n utftext += String.fromCharCode(c >> 12 | 224);\n utftext += String.fromCharCode(c >> 6 & 63 | 128);\n utftext += String.fromCharCode(c & 63 | 128);\n }\n }\n return utftext;\n },\n decode: function decode(utftext) {\n var s = '';\n var i = 0;\n var c = 0,\n c1 = 0,\n c2 = 0;\n while (i < utftext.length) {\n c = utftext.charCodeAt(i);\n if (c < 128) {\n s += String.fromCharCode(c);\n i++;\n } else if (c > 191 && c < 224) {\n c1 = utftext.charCodeAt(i + 1);\n s += String.fromCharCode((c & 31) << 6 | c1 & 63);\n i += 2;\n } else {\n c1 = utftext.charCodeAt(i + 1);\n c2 = utftext.charCodeAt(i + 2);\n s += String.fromCharCode((c & 15) << 12 | (c1 & 63) << 6 | c2 & 63);\n i += 3;\n }\n }\n return s;\n }\n};\n\n/* global globalThis */\nvar GlobalScope = function () {\n if (typeof globalThis !== 'undefined') {\n return globalThis;\n }\n if (typeof window !== 'undefined') {\n return window;\n }\n if (typeof self !== 'undefined') {\n return self;\n }\n if (typeof global !== 'undefined') {\n return global;\n }\n}();\n\n/*\n * Base64 encoder/decoder\n * http://www.webtoolkit.info/\n */\nvar Base64 = {\n _keyStr: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=',\n encode: function encode(input) {\n try {\n if (GlobalScope.btoa && GlobalScope.atob) {\n return GlobalScope.btoa(unescape(encodeURIComponent(input)));\n }\n } catch (e) {\n //log(e);\n }\n return Base64._encode(input);\n },\n _encode: function _encode(input) {\n var output = '';\n var chr1, chr2, chr3, enc1, enc2, enc3, enc4;\n var i = 0;\n input = UTF8.encode(input);\n while (i < input.length) {\n chr1 = input.charCodeAt(i++);\n chr2 = input.charCodeAt(i++);\n chr3 = input.charCodeAt(i++);\n enc1 = chr1 >> 2;\n enc2 = (chr1 & 3) << 4 | chr2 >> 4;\n enc3 = (chr2 & 15) << 2 | chr3 >> 6;\n enc4 = chr3 & 63;\n if (isNaN(chr2)) {\n enc3 = enc4 = 64;\n } else if (isNaN(chr3)) {\n enc4 = 64;\n }\n output = output + Base64._keyStr.charAt(enc1) + Base64._keyStr.charAt(enc2) + Base64._keyStr.charAt(enc3) + Base64._keyStr.charAt(enc4);\n }\n return output;\n },\n decode: function decode(input) {\n try {\n if (GlobalScope.btoa && GlobalScope.atob) {\n return decodeURIComponent(escape(GlobalScope.atob(input)));\n }\n } catch (e) {\n //log(e);\n }\n return Base64._decode(input);\n },\n _decode: function _decode(input) {\n var output = '';\n var chr1, chr2, chr3;\n var enc1, enc2, enc3, enc4;\n var i = 0;\n input = input.replace(/[^A-Za-z0-9+/=]/g, '');\n while (i < input.length) {\n enc1 = Base64._keyStr.indexOf(input.charAt(i++));\n enc2 = Base64._keyStr.indexOf(input.charAt(i++));\n enc3 = Base64._keyStr.indexOf(input.charAt(i++));\n enc4 = Base64._keyStr.indexOf(input.charAt(i++));\n chr1 = enc1 << 2 | enc2 >> 4;\n chr2 = (enc2 & 15) << 4 | enc3 >> 2;\n chr3 = (enc3 & 3) << 6 | enc4;\n output = output + String.fromCharCode(chr1);\n if (enc3 !== 64) {\n output = output + String.fromCharCode(chr2);\n }\n if (enc4 !== 64) {\n output = output + String.fromCharCode(chr3);\n }\n }\n output = UTF8.decode(output);\n return output;\n }\n};\n\n/**\n * toString ref.\n * @private\n */\n\nvar toString = Object.prototype.toString;\n\n/**\n * Return the type of `val`.\n * @private\n * @param {Mixed} val\n * @return {String}\n * @api public\n */\n\nfunction type (val) {\n switch (toString.call(val)) {\n case '[object Date]':\n return 'date';\n case '[object RegExp]':\n return 'regexp';\n case '[object Arguments]':\n return 'arguments';\n case '[object Array]':\n return 'array';\n case '[object Error]':\n return 'error';\n }\n if (val === null) {\n return 'null';\n }\n if (val === undefined) {\n return 'undefined';\n }\n if (val !== val) {\n return 'nan';\n }\n if (val && val.nodeType === 1) {\n return 'element';\n }\n if (typeof Buffer !== 'undefined' && typeof Buffer.isBuffer === 'function' && Buffer.isBuffer(val)) {\n return 'buffer';\n }\n val = val.valueOf ? val.valueOf() : Object.prototype.valueOf.apply(val);\n return _typeof(val);\n}\n\nvar logLevels = {\n DISABLE: 0,\n ERROR: 1,\n WARN: 2,\n INFO: 3\n};\nvar logLevel = logLevels.WARN;\nvar setLogLevel = function setLogLevel(logLevelName) {\n if (Object.prototype.hasOwnProperty.call(logLevels, logLevelName)) {\n logLevel = logLevels[logLevelName];\n }\n};\nvar getLogLevel = function getLogLevel() {\n return logLevel;\n};\nvar log = {\n error: function error(s) {\n if (logLevel >= logLevels.ERROR) {\n _log(s);\n }\n },\n warn: function warn(s) {\n if (logLevel >= logLevels.WARN) {\n _log(s);\n }\n },\n info: function info(s) {\n if (logLevel >= logLevels.INFO) {\n _log(s);\n }\n }\n};\nvar _log = function _log(s) {\n try {\n console.log('[Amplitude] ' + s);\n } catch (e) {\n // console logging not available\n }\n};\nvar isEmptyString = function isEmptyString(str) {\n return !str || str.length === 0;\n};\nvar sessionStorageEnabled = function sessionStorageEnabled() {\n try {\n if (GlobalScope.sessionStorage) {\n return true;\n }\n } catch (e) {\n // sessionStorage disabled\n }\n return false;\n};\n\n// truncate string values in event and user properties so that request size does not get too large\nvar truncate = function truncate(value) {\n if (type(value) === 'array') {\n for (var i = 0; i < value.length; i++) {\n value[i] = truncate(value[i]);\n }\n } else if (type(value) === 'object') {\n for (var key in value) {\n if (key in value) {\n value[key] = truncate(value[key]);\n }\n }\n } else {\n value = _truncateValue(value);\n }\n return value;\n};\nvar _truncateValue = function _truncateValue(value) {\n if (type(value) === 'string') {\n return value.length > Constants.MAX_STRING_LENGTH ? value.substring(0, Constants.MAX_STRING_LENGTH) : value;\n }\n return value;\n};\nvar validateInput = function validateInput(input, name, expectedType) {\n if (type(input) !== expectedType) {\n log.error('Invalid ' + name + ' input type. Expected ' + expectedType + ' but received ' + type(input));\n return false;\n }\n return true;\n};\nvar validateDeviceId = function validateDeviceId(deviceId) {\n if (!validateInput(deviceId, 'deviceId', 'string')) {\n return false;\n }\n if (deviceId.indexOf('.') >= 0) {\n log.error(\"Device IDs may not contain '.' characters. Value will be ignored: \\\"\".concat(deviceId, \"\\\"\"));\n return false;\n }\n return true;\n};\nvar validateTransport = function validateTransport(transport) {\n if (!validateInput(transport, 'transport', 'string')) {\n return false;\n }\n if (transport !== Constants.TRANSPORT_HTTP && transport !== Constants.TRANSPORT_BEACON) {\n log.error(\"transport value must be one of '\".concat(Constants.TRANSPORT_BEACON, \"' or '\").concat(Constants.TRANSPORT_HTTP, \"'\"));\n return false;\n }\n if (transport !== Constants.TRANSPORT_HTTP && typeof navigator !== 'undefined' && !navigator.sendBeacon) {\n log.error(\"browser does not support sendBeacon, so transport must be HTTP\");\n return false;\n }\n return true;\n};\n\n// do some basic sanitization and type checking, also catch property dicts with more than 1000 key/value pairs\nvar validateProperties = function validateProperties(properties) {\n var propsType = type(properties);\n if (propsType !== 'object') {\n log.error('Error: invalid properties format. Expecting Javascript object, received ' + propsType + ', ignoring');\n return {};\n }\n if (Object.keys(properties).length > Constants.MAX_PROPERTY_KEYS) {\n log.error('Error: too many properties (more than 1000), ignoring');\n return {};\n }\n var copy = {}; // create a copy with all of the valid properties\n for (var property in properties) {\n if (!Object.prototype.hasOwnProperty.call(properties, property)) {\n continue;\n }\n\n // validate key\n var key = property;\n var keyType = type(key);\n if (keyType !== 'string') {\n key = String(key);\n log.warn('WARNING: Non-string property key, received type ' + keyType + ', coercing to string \"' + key + '\"');\n }\n\n // validate value\n var value = validatePropertyValue(key, properties[property]);\n if (value === null) {\n continue;\n }\n copy[key] = value;\n }\n return copy;\n};\nvar invalidValueTypes = ['nan', 'function', 'arguments', 'regexp', 'element'];\nvar validatePropertyValue = function validatePropertyValue(key, value) {\n var valueType = type(value);\n if (invalidValueTypes.indexOf(valueType) !== -1) {\n log.warn('WARNING: Property key \"' + key + '\" with invalid value type ' + valueType + ', ignoring');\n value = null;\n } else if (valueType === 'undefined') {\n value = null;\n } else if (valueType === 'error') {\n value = String(value);\n log.warn('WARNING: Property key \"' + key + '\" with value type error, coercing to ' + value);\n } else if (valueType === 'array') {\n // check for nested arrays or objects\n var arrayCopy = [];\n for (var i = 0; i < value.length; i++) {\n var element = value[i];\n var elemType = type(element);\n if (elemType === 'array') {\n log.warn('WARNING: Cannot have ' + elemType + ' nested in an array property value, skipping');\n continue;\n } else if (elemType === 'object') {\n arrayCopy.push(validateProperties(element));\n } else {\n arrayCopy.push(validatePropertyValue(key, element));\n }\n }\n value = arrayCopy;\n } else if (valueType === 'object') {\n value = validateProperties(value);\n }\n return value;\n};\nvar validateGroups = function validateGroups(groups) {\n var groupsType = type(groups);\n if (groupsType !== 'object') {\n log.error('Error: invalid groups format. Expecting Javascript object, received ' + groupsType + ', ignoring');\n return {};\n }\n var copy = {}; // create a copy with all of the valid properties\n for (var group in groups) {\n if (!Object.prototype.hasOwnProperty.call(groups, group)) {\n continue;\n }\n\n // validate key\n var key = group;\n var keyType = type(key);\n if (keyType !== 'string') {\n key = String(key);\n log.warn('WARNING: Non-string groupType, received type ' + keyType + ', coercing to string \"' + key + '\"');\n }\n\n // validate value\n var value = validateGroupName(key, groups[group]);\n if (value === null) {\n continue;\n }\n copy[key] = value;\n }\n return copy;\n};\nvar validateGroupName = function validateGroupName(key, groupName) {\n var groupNameType = type(groupName);\n if (groupNameType === 'string') {\n return groupName;\n }\n if (groupNameType === 'date' || groupNameType === 'number' || groupNameType === 'boolean') {\n groupName = String(groupName);\n log.warn('WARNING: Non-string groupName, received type ' + groupNameType + ', coercing to string \"' + groupName + '\"');\n return groupName;\n }\n if (groupNameType === 'array') {\n // check for nested arrays or objects\n var arrayCopy = [];\n for (var i = 0; i < groupName.length; i++) {\n var element = groupName[i];\n var elemType = type(element);\n if (elemType === 'array' || elemType === 'object') {\n log.warn('WARNING: Skipping nested ' + elemType + ' in array groupName');\n continue;\n } else if (elemType === 'string') {\n arrayCopy.push(element);\n } else if (elemType === 'date' || elemType === 'number' || elemType === 'boolean') {\n element = String(element);\n log.warn('WARNING: Non-string groupName, received type ' + elemType + ', coercing to string \"' + element + '\"');\n arrayCopy.push(element);\n }\n }\n return arrayCopy;\n }\n log.warn('WARNING: Non-string groupName, received type ' + groupNameType + '. Please use strings or array of strings for groupName');\n};\n\n// parses the value of a url param (for example ?gclid=1234&...)\nvar getQueryParam = function getQueryParam(name, query) {\n name = name.replace(/[[]/, '\\\\[').replace(/[\\]]/, '\\\\]');\n var regex = new RegExp('[\\\\?&]' + name + '=([^&#]*)');\n var results = regex.exec(query);\n return results === null ? undefined : decodeURIComponent(results[1].replace(/\\+/g, ' '));\n};\nvar isWebWorkerEnvironment = function isWebWorkerEnvironment() {\n return typeof WorkerGlobalScope !== 'undefined';\n};\nvar validateSessionId = function validateSessionId(sessionId) {\n if (validateInput(sessionId, 'sessionId', 'number') && new Date(sessionId).getTime() > 0) {\n return true;\n }\n log.error(\"sessionId value must in milliseconds since epoch (Unix Timestamp)\");\n return false;\n};\nvar getLocation = function getLocation() {\n return GlobalScope.location;\n};\nvar getHost = function getHost(url) {\n var defaultHostname = GlobalScope.location ? GlobalScope.location.hostname : '';\n if (url) {\n if (typeof document !== 'undefined') {\n var a = document.createElement('a');\n a.href = url;\n return a.hostname || defaultHostname;\n }\n if (typeof URL === 'function') {\n var u = new URL(url);\n return u.hostname || defaultHostname;\n }\n }\n return defaultHostname;\n};\nvar utils = {\n setLogLevel: setLogLevel,\n getLogLevel: getLogLevel,\n logLevels: logLevels,\n log: log,\n isEmptyString: isEmptyString,\n isWebWorkerEnvironment: isWebWorkerEnvironment,\n getQueryParam: getQueryParam,\n sessionStorageEnabled: sessionStorageEnabled,\n truncate: truncate,\n validateGroups: validateGroups,\n validateInput: validateInput,\n validateProperties: validateProperties,\n validateDeviceId: validateDeviceId,\n validateTransport: validateTransport,\n validateSessionId: validateSessionId,\n getLocation: getLocation,\n getHost: getHost\n};\n\nvar get$1 = function get(name) {\n try {\n var ca = document.cookie.split(';');\n var value = null;\n for (var i = 0; i < ca.length; i++) {\n var c = ca[i];\n while (c.charAt(0) === ' ') {\n c = c.substring(1, c.length);\n }\n if (c.indexOf(name) === 0) {\n value = c.substring(name.length, c.length);\n break;\n }\n }\n return value;\n } catch (e) {\n return null;\n }\n};\nvar getAll = function getAll(name) {\n try {\n var cookieArray = document.cookie.split(';').map(function (c) {\n return c.trimStart();\n });\n var values = [];\n var _iterator = _createForOfIteratorHelper(cookieArray),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var cookie = _step.value;\n while (cookie.charAt(0) === ' ') {\n cookie = cookie.substring(1);\n }\n if (cookie.indexOf(name) === 0) {\n values.push(cookie.substring(name.length));\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n return values;\n } catch (e) {\n return [];\n }\n};\nvar set$1 = function set(name, value, opts) {\n var expires = value !== null ? opts.expirationDays : -1;\n if (expires) {\n var date = new Date();\n date.setTime(date.getTime() + expires * 24 * 60 * 60 * 1000);\n expires = date;\n }\n var str = name + '=' + value;\n if (expires) {\n str += '; expires=' + expires.toUTCString();\n }\n str += '; path=/';\n if (opts.domain) {\n str += '; domain=' + opts.domain;\n }\n if (opts.secure) {\n str += '; Secure';\n }\n if (opts.sameSite) {\n str += '; SameSite=' + opts.sameSite;\n }\n document.cookie = str;\n};\nvar getLastEventTime = function getLastEventTime() {\n var cookie = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var strValue = cookie.split('.')[Constants.LAST_EVENT_TIME_INDEX];\n var parsedValue;\n if (strValue) {\n parsedValue = parseInt(strValue, 32);\n }\n if (parsedValue) {\n return parsedValue;\n } else {\n utils.log.warn(\"unable to parse malformed cookie: \".concat(cookie));\n return 0;\n }\n};\nvar sortByEventTime = function sortByEventTime(cookies) {\n return _toConsumableArray(cookies).sort(function (c1, c2) {\n var t1 = getLastEventTime(c1);\n var t2 = getLastEventTime(c2);\n // sort c1 first if its last event time is more recent\n // i.e its event time integer is larger that c2's\n return t2 - t1;\n });\n};\n\n// test that cookies are enabled - navigator.cookiesEnabled yields false positives in IE, need to test directly\nvar areCookiesEnabled = function areCookiesEnabled() {\n var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var cookieName = Constants.COOKIE_TEST_PREFIX;\n if (typeof document === 'undefined') {\n return false;\n }\n var _areCookiesEnabled = false;\n try {\n var uid = String(Date.now());\n set$1(cookieName, uid, opts);\n utils.log.info(\"Testing if cookies available\");\n _areCookiesEnabled = get$1(cookieName + '=') === uid;\n } catch (e) {\n utils.log.warn(\"Error thrown when checking for cookies. Reason: \\\"\".concat(e, \"\\\"\"));\n } finally {\n utils.log.info(\"Cleaning up cookies availability test\");\n set$1(cookieName, null, opts);\n }\n return _areCookiesEnabled;\n};\nvar baseCookie = {\n set: set$1,\n get: get$1,\n getAll: getAll,\n getLastEventTime: getLastEventTime,\n sortByEventTime: sortByEventTime,\n areCookiesEnabled: areCookiesEnabled\n};\n\n// A URL safe variation on the the list of Base64 characters\nvar base64Chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_';\nvar base64Id = function base64Id() {\n var str = '';\n for (var i = 0; i < 22; ++i) {\n str += base64Chars.charAt(Math.floor(Math.random() * 64));\n }\n return str;\n};\n\n// Utility that finds top level domain to write to\nvar topDomain = function topDomain(url) {\n var host = utils.getHost(url);\n var parts = host.split('.');\n var levels = [];\n var cname = '_tldtest_' + base64Id();\n if (utils.isWebWorkerEnvironment()) return '';\n for (var i = parts.length - 2; i >= 0; --i) {\n levels.push(parts.slice(i).join('.'));\n }\n for (var _i = 0; _i < levels.length; ++_i) {\n var domain = levels[_i];\n var opts = {\n domain: '.' + domain\n };\n baseCookie.set(cname, 1, opts);\n if (baseCookie.get(cname)) {\n baseCookie.set(cname, null, opts);\n return domain;\n }\n }\n return '';\n};\n\n/*\n * Cookie data\n */\nvar _options = {\n expirationDays: undefined,\n domain: undefined\n};\nvar reset = function reset() {\n _options = {\n expirationDays: undefined,\n domain: undefined\n };\n};\nvar options = function options(opts) {\n if (arguments.length === 0) {\n return _options;\n }\n opts = opts || {};\n _options.expirationDays = opts.expirationDays;\n _options.secure = opts.secure;\n _options.sameSite = opts.sameSite;\n var domain = !utils.isEmptyString(opts.domain) ? opts.domain : '.' + topDomain(utils.getLocation().href);\n var token = Math.random();\n _options.domain = domain;\n set('amplitude_test', token);\n var stored = get('amplitude_test');\n if (!stored || stored !== token) {\n domain = null;\n }\n remove('amplitude_test');\n _options.domain = domain;\n return _options;\n};\nvar _domainSpecific = function _domainSpecific(name) {\n // differentiate between cookies on different domains\n var suffix = '';\n if (_options.domain) {\n suffix = _options.domain.charAt(0) === '.' ? _options.domain.substring(1) : _options.domain;\n }\n return name + suffix;\n};\nvar get = function get(name) {\n var nameEq = _domainSpecific(name) + '=';\n var value = baseCookie.get(nameEq);\n try {\n if (value) {\n return JSON.parse(Base64.decode(value));\n }\n } catch (e) {\n return null;\n }\n return null;\n};\nvar set = function set(name, value) {\n try {\n baseCookie.set(_domainSpecific(name), Base64.encode(JSON.stringify(value)), _options);\n return true;\n } catch (e) {\n return false;\n }\n};\nvar setRaw = function setRaw(name, value) {\n try {\n baseCookie.set(_domainSpecific(name), value, _options);\n return true;\n } catch (e) {\n return false;\n }\n};\nvar getRaw = function getRaw(name) {\n var nameEq = _domainSpecific(name) + '=';\n return baseCookie.get(nameEq);\n};\nvar remove = function remove(name) {\n try {\n baseCookie.set(_domainSpecific(name), null, _options);\n return true;\n } catch (e) {\n return false;\n }\n};\nvar Cookie = {\n reset: reset,\n options: options,\n get: get,\n set: set,\n remove: remove,\n setRaw: setRaw,\n getRaw: getRaw\n};\n\nvar WorkerStorage = /*#__PURE__*/function () {\n function WorkerStorage() {\n _classCallCheck(this, WorkerStorage);\n this.map = new Map();\n this.length = 0;\n }\n _createClass(WorkerStorage, [{\n key: \"key\",\n value: function key(index) {\n var keys = Array.from(this.map.keys());\n var key = keys[index];\n return this.map.get(key);\n }\n }, {\n key: \"getItem\",\n value: function getItem(key) {\n return this.map.get(key);\n }\n }, {\n key: \"setItem\",\n value: function setItem(key, value) {\n if (!this.map.has(key)) {\n this.length += 1;\n }\n this.map.set(key, value);\n }\n }, {\n key: \"removeItem\",\n value: function removeItem(key) {\n if (this.map.has(key)) {\n this.length -= 1;\n this.map[\"delete\"](key);\n }\n }\n }, {\n key: \"clear\",\n value: function clear() {\n this.map.clear();\n this.length = 0;\n }\n }]);\n return WorkerStorage;\n}();\n\n/*\n * Implement localStorage to support Firefox 2-3 and IE 5-7\n */\nvar localStorage;\n{\n // test that Window.localStorage is available and works\n var windowLocalStorageAvailable = function windowLocalStorageAvailable() {\n var uid = new Date();\n var result;\n try {\n GlobalScope.localStorage.setItem(uid, uid);\n result = GlobalScope.localStorage.getItem(uid) === String(uid);\n GlobalScope.localStorage.removeItem(uid);\n return result;\n } catch (e) {\n // localStorage not available\n }\n return false;\n };\n if (windowLocalStorageAvailable()) {\n localStorage = GlobalScope.localStorage;\n } else if (typeof GlobalScope !== 'undefined' && GlobalScope.globalStorage) {\n // Firefox 2-3 use globalStorage\n // See https://developer.mozilla.org/en/dom/storage#globalStorage\n try {\n localStorage = GlobalScope.globalStorage[GlobalScope.location.hostname];\n } catch (e) {\n // Something bad happened...\n }\n } else if (typeof document !== 'undefined') {\n // IE 5-7 use userData\n // See http://msdn.microsoft.com/en-us/library/ms531424(v=vs.85).aspx\n var div = document.createElement('div'),\n attrKey = 'localStorage';\n div.style.display = 'none';\n document.getElementsByTagName('head')[0].appendChild(div);\n if (div.addBehavior) {\n div.addBehavior('#default#userdata');\n localStorage = {\n length: 0,\n setItem: function setItem(k, v) {\n div.load(attrKey);\n if (!div.getAttribute(k)) {\n this.length++;\n }\n div.setAttribute(k, v);\n div.save(attrKey);\n },\n getItem: function getItem(k) {\n div.load(attrKey);\n return div.getAttribute(k);\n },\n removeItem: function removeItem(k) {\n div.load(attrKey);\n if (div.getAttribute(k)) {\n this.length--;\n }\n div.removeAttribute(k);\n div.save(attrKey);\n },\n clear: function clear() {\n div.load(attrKey);\n var i = 0;\n var attr;\n while (attr = div.XMLDocument.documentElement.attributes[i++]) {\n div.removeAttribute(attr.name);\n }\n div.save(attrKey);\n this.length = 0;\n },\n key: function key(k) {\n div.load(attrKey);\n return div.XMLDocument.documentElement.attributes[k];\n }\n };\n div.load(attrKey);\n localStorage.length = div.XMLDocument.documentElement.attributes.length;\n }\n } else if (utils.isWebWorkerEnvironment()) {\n // Web worker\n localStorage = new WorkerStorage();\n }\n if (!localStorage) {\n /* eslint-disable no-unused-vars */\n localStorage = {\n length: 0,\n setItem: function setItem(k, v) {},\n getItem: function getItem(k) {},\n removeItem: function removeItem(k) {},\n clear: function clear() {},\n key: function key(k) {}\n };\n /* eslint-enable no-unused-vars */\n }\n}\n\nvar localStorage$1 = localStorage;\n\n/*\n * Abstraction layer for cookie storage.\n * Uses cookie if available, otherwise fallback to localstorage.\n */\nvar cookieStorage = function cookieStorage() {\n this.storage = null;\n};\ncookieStorage.prototype.getStorage = function (disableCookies) {\n if (this.storage !== null) {\n return this.storage;\n }\n if (!disableCookies && baseCookie.areCookiesEnabled()) {\n this.storage = Cookie;\n } else {\n // if cookies disabled, fallback to localstorage\n // note: localstorage does not persist across subdomains\n var keyPrefix = 'amp_cookiestore_';\n this.storage = {\n _options: {\n expirationDays: undefined,\n domain: undefined,\n secure: false\n },\n reset: function reset() {\n this._options = {\n expirationDays: undefined,\n domain: undefined,\n secure: false\n };\n },\n options: function options(opts) {\n if (arguments.length === 0) {\n return this._options;\n }\n opts = opts || {};\n this._options.expirationDays = opts.expirationDays || this._options.expirationDays;\n // localStorage is specific to subdomains\n this._options.domain = opts.domain || this._options.domain || GlobalScope && GlobalScope.location && GlobalScope.location.hostname;\n return this._options.secure = opts.secure || false;\n },\n get: function get(name) {\n try {\n return JSON.parse(localStorage$1.getItem(keyPrefix + name));\n } catch (e) {} /* eslint-disable-line no-empty */\n return null;\n },\n set: function set(name, value) {\n try {\n localStorage$1.setItem(keyPrefix + name, JSON.stringify(value));\n return true;\n } catch (e) {} /* eslint-disable-line no-empty */\n return false;\n },\n remove: function remove(name) {\n try {\n localStorage$1.removeItem(keyPrefix + name);\n } catch (e) {\n return false;\n }\n }\n };\n }\n return this.storage;\n};\n\nvar _storageOptionExists;\nvar storageOptionExists = (_storageOptionExists = {}, _defineProperty(_storageOptionExists, Constants.STORAGE_COOKIES, true), _defineProperty(_storageOptionExists, Constants.STORAGE_NONE, true), _defineProperty(_storageOptionExists, Constants.STORAGE_LOCAL, true), _defineProperty(_storageOptionExists, Constants.STORAGE_SESSION, true), _storageOptionExists);\n\n/**\n * MetadataStorage involves SDK data persistance\n * storage priority: cookies -> localStorage -> in memory\n * This priority can be overriden by setting the storage options.\n * if in localStorage, unable track users between subdomains\n * if in memory, then memory can't be shared between different tabs\n */\nvar MetadataStorage = /*#__PURE__*/function () {\n function MetadataStorage(_ref) {\n var storageKey = _ref.storageKey,\n disableCookies = _ref.disableCookies,\n domain = _ref.domain,\n secure = _ref.secure,\n sameSite = _ref.sameSite,\n expirationDays = _ref.expirationDays,\n storage = _ref.storage;\n _classCallCheck(this, MetadataStorage);\n this.storageKey = storageKey;\n this.domain = domain;\n this.secure = secure;\n this.sameSite = sameSite;\n this.expirationDays = expirationDays;\n this.cookieDomain = '';\n var loc = utils.getLocation() ? utils.getLocation().href : undefined;\n var writableTopDomain = !disableCookies ? topDomain(loc) : '';\n this.cookieDomain = domain || (writableTopDomain ? '.' + writableTopDomain : null);\n if (storageOptionExists[storage]) {\n this.storage = storage;\n } else {\n var disableCookieStorage = disableCookies || !baseCookie.areCookiesEnabled({\n domain: this.cookieDomain,\n secure: this.secure,\n sameSite: this.sameSite,\n expirationDays: this.expirationDays\n });\n if (disableCookieStorage) {\n this.storage = Constants.STORAGE_LOCAL;\n } else {\n this.storage = Constants.STORAGE_COOKIES;\n }\n }\n }\n _createClass(MetadataStorage, [{\n key: \"getCookieStorageKey\",\n value: function getCookieStorageKey() {\n if (!this.domain) {\n return this.storageKey;\n }\n var suffix = this.domain.charAt(0) === '.' ? this.domain.substring(1) : this.domain;\n return \"\".concat(this.storageKey).concat(suffix ? \"_\".concat(suffix) : '');\n }\n\n /*\n * Data is saved as delimited values rather than JSO to minimize cookie space\n * Should not change order of the items\n */\n }, {\n key: \"save\",\n value: function save(_ref2) {\n var deviceId = _ref2.deviceId,\n userId = _ref2.userId,\n optOut = _ref2.optOut,\n sessionId = _ref2.sessionId,\n lastEventTime = _ref2.lastEventTime,\n eventId = _ref2.eventId,\n identifyId = _ref2.identifyId,\n sequenceNumber = _ref2.sequenceNumber;\n if (this.storage === Constants.STORAGE_NONE) {\n return;\n }\n var value = [deviceId, Base64.encode(userId || ''),\n // used to convert not unicode to alphanumeric since cookies only use alphanumeric\n optOut ? '1' : '', sessionId ? sessionId.toString(32) : '0',\n // generated when instantiated, timestamp (but re-uses session id in cookie if not expired) @TODO clients may want custom session id\n lastEventTime ? lastEventTime.toString(32) : '0',\n // last time an event was set\n eventId ? eventId.toString(32) : '0', identifyId ? identifyId.toString(32) : '0', sequenceNumber ? sequenceNumber.toString(32) : '0'].join('.');\n switch (this.storage) {\n case Constants.STORAGE_SESSION:\n if (GlobalScope.sessionStorage) {\n GlobalScope.sessionStorage.setItem(this.storageKey, value);\n }\n break;\n case Constants.STORAGE_LOCAL:\n localStorage$1.setItem(this.storageKey, value);\n break;\n case Constants.STORAGE_COOKIES:\n this.saveCookie(value);\n break;\n }\n }\n }, {\n key: \"saveCookie\",\n value: function saveCookie(value) {\n baseCookie.set(this.getCookieStorageKey(), value, {\n domain: this.cookieDomain,\n secure: this.secure,\n sameSite: this.sameSite,\n expirationDays: this.expirationDays\n });\n }\n }, {\n key: \"load\",\n value: function load() {\n var _this = this;\n var str;\n if (this.storage === Constants.STORAGE_COOKIES) {\n var cookieKey = this.getCookieStorageKey() + '=';\n var allCookies = baseCookie.getAll(cookieKey);\n if (allCookies.length === 0 || allCookies.length === 1) {\n str = allCookies[0];\n } else {\n // dedup cookies by deleting them all and restoring\n // the one with the most recent event time\n var latestCookie = baseCookie.sortByEventTime(allCookies)[0];\n allCookies.forEach(function () {\n return baseCookie.set(_this.getCookieStorageKey(), null, {});\n });\n this.saveCookie(latestCookie);\n str = baseCookie.get(cookieKey);\n }\n }\n if (!str) {\n str = localStorage$1.getItem(this.storageKey);\n }\n if (!str) {\n try {\n str = GlobalScope.sessionStorage && GlobalScope.sessionStorage.getItem(this.storageKey);\n } catch (e) {\n utils.log.info(\"window.sessionStorage unavailable. Reason: \\\"\".concat(e, \"\\\"\"));\n }\n }\n if (!str) {\n return null;\n }\n var values = str.split('.');\n var userId = null;\n if (values[Constants.USER_ID_INDEX]) {\n try {\n userId = Base64.decode(values[Constants.USER_ID_INDEX]);\n } catch (e) {\n userId = null;\n }\n }\n return {\n deviceId: values[Constants.DEVICE_ID_INDEX],\n userId: userId,\n optOut: values[Constants.OPT_OUT_INDEX] === '1',\n sessionId: parseInt(values[Constants.SESSION_ID_INDEX], 32),\n lastEventTime: parseInt(values[Constants.LAST_EVENT_TIME_INDEX], 32),\n eventId: parseInt(values[Constants.EVENT_ID_INDEX], 32),\n identifyId: parseInt(values[Constants.IDENTIFY_ID_INDEX], 32),\n sequenceNumber: parseInt(values[Constants.SEQUENCE_NUMBER_INDEX], 32)\n };\n }\n\n /**\n * Clears any saved metadata storage\n * @constructor AmplitudeClient\n * @public\n * @return {boolean} True if metadata was cleared, false if none existed\n */\n }, {\n key: \"clear\",\n value: function clear() {\n var str;\n if (this.storage === Constants.STORAGE_COOKIES) {\n str = baseCookie.get(this.getCookieStorageKey() + '=');\n baseCookie.set(this.getCookieStorageKey(), null, {\n domain: this.cookieDomain,\n secure: this.secure,\n sameSite: this.sameSite,\n expirationDays: 0\n });\n }\n if (!str) {\n str = localStorage$1.getItem(this.storageKey);\n localStorage$1.clear();\n }\n if (!str) {\n try {\n str = GlobalScope.sessionStorage && GlobalScope.sessionStorage.getItem(this.storageKey);\n GlobalScope.sessionStorage.clear();\n } catch (e) {\n utils.log.info(\"window.sessionStorage unavailable. Reason: \\\"\".concat(e, \"\\\"\"));\n }\n }\n return !!str;\n }\n }]);\n return MetadataStorage;\n}();\n\nvar getUtmData = function getUtmData(rawCookie, query) {\n // Translate the utmz cookie format into url query string format.\n var cookie = rawCookie ? '?' + rawCookie.split('.').slice(-1)[0].replace(/\\|/g, '&') : '';\n var fetchParam = function fetchParam(queryName, query, cookieName, cookie) {\n return utils.getQueryParam(queryName, query) || utils.getQueryParam(cookieName, cookie);\n };\n var utmSource = fetchParam(Constants.UTM_SOURCE, query, 'utmcsr', cookie);\n var utmMedium = fetchParam(Constants.UTM_MEDIUM, query, 'utmcmd', cookie);\n var utmCampaign = fetchParam(Constants.UTM_CAMPAIGN, query, 'utmccn', cookie);\n var utmTerm = fetchParam(Constants.UTM_TERM, query, 'utmctr', cookie);\n var utmContent = fetchParam(Constants.UTM_CONTENT, query, 'utmcct', cookie);\n var utmData = {};\n var addIfNotNull = function addIfNotNull(key, value) {\n if (!utils.isEmptyString(value)) {\n utmData[key] = value;\n }\n };\n addIfNotNull(Constants.UTM_SOURCE, utmSource);\n addIfNotNull(Constants.UTM_MEDIUM, utmMedium);\n addIfNotNull(Constants.UTM_CAMPAIGN, utmCampaign);\n addIfNotNull(Constants.UTM_TERM, utmTerm);\n addIfNotNull(Constants.UTM_CONTENT, utmContent);\n return utmData;\n};\n\n/*\n * Wrapper for a user properties JSON object that supports operations.\n * Note: if a user property is used in multiple operations on the same Identify object,\n * only the first operation will be saved, and the rest will be ignored.\n */\n\nvar AMP_OP_ADD = '$add';\nvar AMP_OP_APPEND = '$append';\nvar AMP_OP_CLEAR_ALL = '$clearAll';\nvar AMP_OP_PREPEND = '$prepend';\nvar AMP_OP_SET = '$set';\nvar AMP_OP_SET_ONCE = '$setOnce';\nvar AMP_OP_UNSET = '$unset';\nvar AMP_OP_PREINSERT = '$preInsert';\nvar AMP_OP_POSTINSERT = '$postInsert';\nvar AMP_OP_REMOVE = '$remove';\n\n/**\n * Identify API - instance constructor. Identify objects are a wrapper for user property operations.\n * Each method adds a user property operation to the Identify object, and returns the same Identify object,\n * allowing you to chain multiple method calls together.\n * Note: if the same user property is used in multiple operations on a single Identify object,\n * only the first operation on that property will be saved, and the rest will be ignored.\n * @constructor Identify\n * @public\n * @example var identify = new amplitude.Identify();\n */\nvar Identify = function Identify() {\n this.userPropertiesOperations = {};\n this.properties = []; // keep track of keys that have been added\n};\n\n/**\n * Increment a user property by a given value (can also be negative to decrement).\n * If the user property does not have a value set yet, it will be initialized to 0 before being incremented.\n * @public\n * @param {string} property - The user property key.\n * @param {number|string} value - The amount by which to increment the user property. Allows numbers as strings (ex: '123').\n * @return {Identify} Returns the same Identify object, allowing you to chain multiple method calls together.\n * @example var identify = new amplitude.Identify().add('karma', 1).add('friends', 1);\n * amplitude.identify(identify); // send the Identify call\n */\nIdentify.prototype.add = function (property, value) {\n if (type(value) === 'number' || type(value) === 'string') {\n this._addOperation(AMP_OP_ADD, property, value);\n } else {\n utils.log.error('Unsupported type for value: ' + type(value) + ', expecting number or string');\n }\n return this;\n};\n\n/**\n * Append a value or values to a user property.\n * If the user property does not have a value set yet,\n * it will be initialized to an empty list before the new values are appended.\n * If the user property has an existing value and it is not a list,\n * the existing value will be converted into a list with the new values appended.\n * @public\n * @param {string} property - The user property key.\n * @param {number|string|list|object} value - A value or values to append.\n * Values can be numbers, strings, lists, or object (key:value dict will be flattened).\n * @return {Identify} Returns the same Identify object, allowing you to chain multiple method calls together.\n * @example var identify = new amplitude.Identify().append('ab-tests', 'new-user-tests');\n * identify.append('some_list', [1, 2, 3, 4, 'values']);\n * amplitude.identify(identify); // send the Identify call\n */\nIdentify.prototype.append = function (property, value) {\n this._addOperation(AMP_OP_APPEND, property, value);\n return this;\n};\n\n/**\n * Clear all user properties for the current user.\n * SDK user should instead call amplitude.clearUserProperties() instead of using this.\n * $clearAll needs to be sent on its own Identify object. If there are already other operations, then don't add $clearAll.\n * If $clearAll already in an Identify object, don't allow other operations to be added.\n * @private\n */\nIdentify.prototype.clearAll = function () {\n if (Object.keys(this.userPropertiesOperations).length > 0) {\n if (!Object.prototype.hasOwnProperty.call(this.userPropertiesOperations, AMP_OP_CLEAR_ALL)) {\n utils.log.error('Need to send $clearAll on its own Identify object without any other operations, skipping $clearAll');\n }\n return this;\n }\n this.userPropertiesOperations[AMP_OP_CLEAR_ALL] = '-';\n return this;\n};\n\n/**\n * Prepend a value or values to a user property.\n * Prepend means inserting the value or values at the front of a list.\n * If the user property does not have a value set yet,\n * it will be initialized to an empty list before the new values are prepended.\n * If the user property has an existing value and it is not a list,\n * the existing value will be converted into a list with the new values prepended.\n * @public\n * @param {string} property - The user property key.\n * @param {number|string|list|object} value - A value or values to prepend.\n * Values can be numbers, strings, lists, or object (key:value dict will be flattened).\n * @return {Identify} Returns the same Identify object, allowing you to chain multiple method calls together.\n * @example var identify = new amplitude.Identify().prepend('ab-tests', 'new-user-tests');\n * identify.prepend('some_list', [1, 2, 3, 4, 'values']);\n * amplitude.identify(identify); // send the Identify call\n */\nIdentify.prototype.prepend = function (property, value) {\n this._addOperation(AMP_OP_PREPEND, property, value);\n return this;\n};\n\n/**\n * Sets the value of a given user property. If a value already exists, it will be overwriten with the new value.\n * @public\n * @param {string} property - The user property key.\n * @param {number|string|list|boolean|object} value - A value or values to set.\n * Values can be numbers, strings, lists, or object (key:value dict will be flattened).\n * @return {Identify} Returns the same Identify object, allowing you to chain multiple method calls together.\n * @example var identify = new amplitude.Identify().set('user_type', 'beta');\n * identify.set('name', {'first': 'John', 'last': 'Doe'}); // dict is flattened and becomes name.first: John, name.last: Doe\n * amplitude.identify(identify); // send the Identify call\n */\nIdentify.prototype.set = function (property, value) {\n this._addOperation(AMP_OP_SET, property, value);\n return this;\n};\n\n/**\n * Sets the value of a given user property only once. Subsequent setOnce operations on that user property will be ignored;\n * however, that user property can still be modified through any of the other operations.\n * Useful for capturing properties such as 'initial_signup_date', 'initial_referrer', etc.\n * @public\n * @param {string} property - The user property key.\n * @param {number|string|list|boolean|object} value - A value or values to set once.\n * Values can be numbers, strings, lists, or object (key:value dict will be flattened).\n * @return {Identify} Returns the same Identify object, allowing you to chain multiple method calls together.\n * @example var identify = new amplitude.Identify().setOnce('sign_up_date', '2016-04-01');\n * amplitude.identify(identify); // send the Identify call\n */\nIdentify.prototype.setOnce = function (property, value) {\n this._addOperation(AMP_OP_SET_ONCE, property, value);\n return this;\n};\n\n/**\n * Unset and remove a user property. This user property will no longer show up in a user's profile.\n * @public\n * @param {string} property - The user property key.\n * @return {Identify} Returns the same Identify object, allowing you to chain multiple method calls together.\n * @example var identify = new amplitude.Identify().unset('user_type').unset('age');\n * amplitude.identify(identify); // send the Identify call\n */\nIdentify.prototype.unset = function (property) {\n this._addOperation(AMP_OP_UNSET, property, '-');\n return this;\n};\n\n/**\n * Preinsert a value or values to a user property, if it does not exist in the user property already.\n * Preinsert means inserting the value or values to the beginning of the specified user property.\n * If the item already exists in the user property, it will be a no-op.\n * @public\n * @param {string} property - The user property key.\n * @param {number|string|list|object} value - A value or values to insert.\n * @returns {Identify} Returns the same Identify object, allowing you to chain multiple method calls together.\n */\nIdentify.prototype.preInsert = function (property, value) {\n this._addOperation(AMP_OP_PREINSERT, property, value);\n return this;\n};\n\n/**\n * Postinsert a value or values to a user property, if it does not exist in the user property already.\n * Postinsert means inserting the value or values to the beginning of the specified user property.\n * If the item already exists in the user property, it will be a no-op.\n * @param {string} property - The user property key.\n * @param {number|string|list|object} value - A value or values to insert.\n * @returns {Identify} Returns the same Identify object, allowing you to chain multiple method calls together.\n */\nIdentify.prototype.postInsert = function (property, value) {\n this._addOperation(AMP_OP_POSTINSERT, property, value);\n return this;\n};\n\n/**\n * Remove a value or values to a user property, if it does exist in the user property.\n * If the item does not exist in the user property, it will be a no-op.\n * @param {string} property - The user property key.\n * @param {number|string|list|object} value - A value or values to remove.\n * @returns {Identify} Returns the same Identify object, allowing you to chain multiple method calls together.\n */\nIdentify.prototype.remove = function (property, value) {\n this._addOperation(AMP_OP_REMOVE, property, value);\n return this;\n};\n\n/**\n * Helper function that adds operation to the Identify's object\n * Handle's filtering of duplicate user property keys, and filtering for clearAll.\n * @private\n */\nIdentify.prototype._addOperation = function (operation, property, value) {\n // check that the identify doesn't already contain a clearAll\n if (Object.prototype.hasOwnProperty.call(this.userPropertiesOperations, AMP_OP_CLEAR_ALL)) {\n utils.log.error('This identify already contains a $clearAll operation, skipping operation ' + operation);\n return;\n }\n\n // check that property wasn't already used in this Identify\n if (this.properties.indexOf(property) !== -1) {\n utils.log.error('User property \"' + property + '\" already used in this identify, skipping operation ' + operation);\n return;\n }\n if (!Object.prototype.hasOwnProperty.call(this.userPropertiesOperations, operation)) {\n this.userPropertiesOperations[operation] = {};\n }\n this.userPropertiesOperations[operation][property] = value;\n this.properties.push(property);\n};\n\n/*\n * Simple AJAX request object\n */\nvar Request = function Request(url, data, headers) {\n this.url = url;\n this.data = data || {};\n this.headers = headers;\n};\nvar CORS_HEADER = 'Cross-Origin-Resource-Policy';\nfunction setHeaders(xhr, headers) {\n for (var header in headers) {\n if (header === CORS_HEADER && !headers[header]) {\n continue;\n }\n xhr.setRequestHeader(header, headers[header]);\n }\n}\nRequest.prototype.send = function (callback) {\n var isIE = GlobalScope.XDomainRequest ? true : false;\n if (isIE) {\n var xdr = new GlobalScope.XDomainRequest();\n xdr.open('POST', this.url, true);\n xdr.onload = function () {\n callback(200, xdr.responseText);\n };\n xdr.onerror = function () {\n // status code not available from xdr, try string matching on responseText\n if (xdr.responseText === 'Request Entity Too Large') {\n callback(413, xdr.responseText);\n } else {\n callback(500, xdr.responseText);\n }\n };\n xdr.ontimeout = function () {};\n xdr.onprogress = function () {};\n xdr.send(queryString.stringify(this.data));\n } else if (typeof XMLHttpRequest !== 'undefined') {\n var xhr = new XMLHttpRequest();\n xhr.open('POST', this.url, true);\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n callback(xhr.status, xhr.responseText);\n }\n };\n setHeaders(xhr, this.headers);\n xhr.send(queryString.stringify(this.data));\n } else {\n var responseStatus = undefined;\n fetch(this.url, {\n method: 'POST',\n headers: this.headers,\n body: queryString.stringify(this.data)\n }).then(function (response) {\n responseStatus = response.status;\n return response.text();\n }).then(function (responseText) {\n callback(responseStatus, responseText);\n });\n }\n //log('sent request to ' + this.url + ' with data ' + decodeURIComponent(queryString(this.data)));\n};\n\n/**\n * Revenue API - instance constructor. Wrapper for logging Revenue data. Revenue objects get passed to amplitude.logRevenueV2 to send to Amplitude servers.\n * Each method updates a revenue property in the Revenue object, and returns the same Revenue object,\n * allowing you to chain multiple method calls together.\n *\n * Note: price is a required field to log revenue events.\n * If quantity is not specified then defaults to 1.\n * @constructor Revenue\n * @public\n * @example var revenue = new amplitude.Revenue();\n */\nvar Revenue = function Revenue() {\n // required fields\n this._price = null;\n\n // optional fields\n this._productId = null;\n this._quantity = 1;\n this._revenueType = null;\n this._properties = null;\n};\n\n/**\n * Set a value for the product identifer.\n * @public\n * @param {string} productId - The value for the product identifier. Empty and invalid strings are ignored.\n * @return {Revenue} Returns the same Revenue object, allowing you to chain multiple method calls together.\n * @example var revenue = new amplitude.Revenue().setProductId('productIdentifier').setPrice(10.99);\n * amplitude.logRevenueV2(revenue);\n */\nRevenue.prototype.setProductId = function setProductId(productId) {\n if (type(productId) !== 'string') {\n utils.log.error('Unsupported type for productId: ' + type(productId) + ', expecting string');\n } else if (utils.isEmptyString(productId)) {\n utils.log.error('Invalid empty productId');\n } else {\n this._productId = productId;\n }\n return this;\n};\n\n/**\n * Set a value for the quantity. Note revenue amount is calculated as price * quantity.\n * @public\n * @param {number} quantity - Integer value for the quantity. If not set, quantity defaults to 1.\n * @return {Revenue} Returns the same Revenue object, allowing you to chain multiple method calls together.\n * @example var revenue = new amplitude.Revenue().setProductId('productIdentifier').setPrice(10.99).setQuantity(5);\n * amplitude.logRevenueV2(revenue);\n */\nRevenue.prototype.setQuantity = function setQuantity(quantity) {\n if (type(quantity) !== 'number') {\n utils.log.error('Unsupported type for quantity: ' + type(quantity) + ', expecting number');\n } else {\n this._quantity = parseInt(quantity);\n }\n return this;\n};\n\n/**\n * Set a value for the price. This field is required for all revenue being logged.\n *\n * Note: revenue amount is calculated as price * quantity.\n * @public\n * @param {number} price - Double value for the quantity.\n * @return {Revenue} Returns the same Revenue object, allowing you to chain multiple method calls together.\n * @example var revenue = new amplitude.Revenue().setProductId('productIdentifier').setPrice(10.99);\n * amplitude.logRevenueV2(revenue);\n */\nRevenue.prototype.setPrice = function setPrice(price) {\n if (type(price) !== 'number') {\n utils.log.error('Unsupported type for price: ' + type(price) + ', expecting number');\n } else {\n this._price = price;\n }\n return this;\n};\n\n/**\n * Set a value for the revenueType (for example purchase, cost, tax, refund, etc).\n * @public\n * @param {string} revenueType - RevenueType to designate.\n * @return {Revenue} Returns the same Revenue object, allowing you to chain multiple method calls together.\n * @example var revenue = new amplitude.Revenue().setProductId('productIdentifier').setPrice(10.99).setRevenueType('purchase');\n * amplitude.logRevenueV2(revenue);\n */\nRevenue.prototype.setRevenueType = function setRevenueType(revenueType) {\n if (type(revenueType) !== 'string') {\n utils.log.error('Unsupported type for revenueType: ' + type(revenueType) + ', expecting string');\n } else {\n this._revenueType = revenueType;\n }\n return this;\n};\n\n/**\n * Set event properties for the revenue event.\n * @public\n * @param {object} eventProperties - Revenue event properties to set.\n * @return {Revenue} Returns the same Revenue object, allowing you to chain multiple method calls together.\n * @example var event_properties = {'city': 'San Francisco'};\n * var revenue = new amplitude.Revenue().setProductId('productIdentifier').setPrice(10.99).setEventProperties(event_properties);\n * amplitude.logRevenueV2(revenue);\n */\nRevenue.prototype.setEventProperties = function setEventProperties(eventProperties) {\n if (type(eventProperties) !== 'object') {\n utils.log.error('Unsupported type for eventProperties: ' + type(eventProperties) + ', expecting object');\n } else {\n this._properties = utils.validateProperties(eventProperties);\n }\n return this;\n};\n\n/**\n * @private\n */\nRevenue.prototype._isValidRevenue = function _isValidRevenue() {\n if (type(this._price) !== 'number') {\n utils.log.error('Invalid revenue, need to set price field');\n return false;\n }\n return true;\n};\n\n/**\n * @private\n */\nRevenue.prototype._toJSONObject = function _toJSONObject() {\n var obj = type(this._properties) === 'object' ? this._properties : {};\n if (this._productId !== null) {\n obj[Constants.REVENUE_PRODUCT_ID] = this._productId;\n }\n if (this._quantity !== null) {\n obj[Constants.REVENUE_QUANTITY] = this._quantity;\n }\n if (this._price !== null) {\n obj[Constants.REVENUE_PRICE] = this._price;\n }\n if (this._revenueType !== null) {\n obj[Constants.REVENUE_REVENUE_TYPE] = this._revenueType;\n }\n return obj;\n};\n\n/**\n * Source: [jed's gist]{@link https://gist.github.com/982883}.\n * Returns a random v4 UUID of the form xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx,\n * where each x is replaced with a random hexadecimal digit from 0 to f, and\n * y is replaced with a random hexadecimal digit from 8 to b.\n * Used to generate UUIDs for deviceIds.\n * @private\n */\nvar uuid = function uuid(a) {\n return a // if the placeholder was passed, return\n ?\n // a random number from 0 to 15\n (a ^\n // unless b is 8,\n Math.random() *\n // in which case\n 16 >>\n // a random number from\n a / 4\n // 8 to 11\n ).toString(16) // in hexadecimal\n :\n // or otherwise a concatenated string:\n ([1e7] +\n // 10000000 +\n -1e3 +\n // -1000 +\n -4e3 +\n // -4000 +\n -8e3 +\n // -80000000 +\n -1e11\n // -100000000000,\n ).replace(\n // replacing\n /[018]/g,\n // zeroes, ones, and eights with\n uuid // random hex digits\n );\n};\n\nvar getLanguage = function getLanguage() {\n return typeof navigator !== 'undefined' && (navigator.languages && navigator.languages[0] || navigator.language || navigator.userLanguage) || '';\n};\nvar language = {\n getLanguage: getLanguage\n};\n\n/**\n * AmplitudeServerZone is for Data Residency and handling server zone related properties.\n * The server zones now are US and EU.\n *\n * For usage like sending data to Amplitude's EU servers, you need to configure the serverZone during nitializing.\n */\nvar AmplitudeServerZone = {\n US: 'US',\n EU: 'EU'\n};\nvar getEventLogApi = function getEventLogApi(serverZone) {\n var eventLogUrl = Constants.EVENT_LOG_URL;\n switch (serverZone) {\n case AmplitudeServerZone.EU:\n eventLogUrl = Constants.EVENT_LOG_EU_URL;\n break;\n case AmplitudeServerZone.US:\n eventLogUrl = Constants.EVENT_LOG_URL;\n break;\n }\n return eventLogUrl;\n};\nvar getDynamicConfigApi = function getDynamicConfigApi(serverZone) {\n var dynamicConfigUrl = Constants.DYNAMIC_CONFIG_URL;\n switch (serverZone) {\n case AmplitudeServerZone.EU:\n dynamicConfigUrl = Constants.DYNAMIC_CONFIG_EU_URL;\n break;\n case AmplitudeServerZone.US:\n dynamicConfigUrl = Constants.DYNAMIC_CONFIG_URL;\n break;\n }\n return dynamicConfigUrl;\n};\n\nvar version = \"8.21.9\";\n\n/**\n * Options used when initializing Amplitude\n * @typedef {Object} Options\n * @property {string} [apiEndpoint=`api.amplitude.com`] - Endpoint to send amplitude event requests to.\n * @property {boolean} [batchEvents=`false`] - If `true`, then events are batched together and uploaded only when the number of unsent events is greater than or equal to eventUploadThreshold or after eventUploadPeriodMillis milliseconds have passed since the first unsent event was logged.\n * @property {number} [cookieExpiration=`365`] - The number of days after which the Amplitude cookie will expire. 12 months is for GDPR compliance.\n * @property {string} [cookieName=`amplitude_id`] - *DEPRECATED*\n * @property {string} [sameSiteCookie='None'] - Sets the SameSite flag on the amplitude cookie. Decides cookie privacy policy.\n * @property {boolean} [cookieForceUpgrade=`false`] - Forces pre-v6.0.0 instances to adopt post-v6.0.0 compat cookie formats.\n * @property {boolean} [deferInitialization=`null`] - If `true`, disables the core functionality of the sdk, including saving a cookie and all logging, until explicitly enabled. To enable tracking, please call `amplitude.getInstance().enableTracking()` *Note: This will not affect users who already have an amplitude cookie. The decision to track events is determined by whether or not a user has an amplitude analytics cookie. If the `cookieExpiration</code> is manually defined to be a short lifespan, you may need to run `amplitude.getInstance().enableTracking()` upon the cookie expiring or upon logging in.*\n * @property {boolean} [disableCookies=`false`] - Disable Ampllitude cookies altogether.\n * @property {string} [deviceId=A randomly generated UUID.] - The custom Device ID to set. *Note: This is not recommended unless you know what you are doing (e.g. you have your own system for tracking user devices).*\n * @property {boolean} [deviceIdFromUrlParam=`false`] - If `true`, then the SDK will parse Device ID values from the URL parameter amp_device_id if available. Device IDs defined in the configuration options during init will take priority over Device IDs from URL parameters.\n * @property {string} [domain=The top domain of the current page's URL. ('https://amplitude.com')] - Set a custom domain for the Amplitude cookie. To include subdomains, add a preceding period, eg: `.amplitude.com`.\n * @property {number} [eventUploadPeriodMillis=`30000` (30 sec)] - Amount of time in milliseconds that the SDK waits before uploading events if batchEvents is true.\n * @property {number} [eventUploadThreshold=`30`] - Minimum number of events to batch together per request if batchEvents is true.\n * @property {boolean} [forceHttps=`true`] - If `true`, the events will always be uploaded to HTTPS endpoint. Otherwise, it will use the embedding site's protocol.\n * @property {boolean} [includeFbclid=`false`] - If `true`, captures the fbclid URL parameter as well as the user's initial_fbclid via a setOnce operation.\n * @property {boolean} [includeGclid=`false`] - If `true`, captures the gclid URL parameter as well as the user's initial_gclid via a setOnce operation.\n * @property {boolean} [includeReferrer=`false`] - If `true`, captures the referrer and referring_domain for each session, as well as the user's initial_referrer and initial_referring_domain via a setOnce operation.\n * @property {boolean} [includeUtm=`false`] - If `true`, finds UTM parameters in the query string or the _utmz cookie, parses, and includes them as user properties on all events uploaded. This also captures initial UTM parameters for each session via a setOnce operation.\n * @property {Object} [ingestionMetadata] Ingestion metadata\n * @property {string} [ingestionMetadata.sourceName] source name in ingestion metadata, e.g. \"ampli\"\n * @property {string} [ingestionMetadata.sourceVersion] source version in ingestion metadata, e.g. \"1.0.0\"\n * @property {string} [language=The language determined by the browser] - Custom language to set.\n * @property {Object} [library=`{ name: 'amplitude-js', version: packageJsonVersion }`] - Values for the library version\n * @property {string} [logLevel=`WARN`] - Level of logs to be printed in the developer console. Valid values are 'DISABLE', 'ERROR', 'WARN', 'INFO'. To learn more about the different options, see below.\n * @property {boolean} [logAttributionCapturedEvent=`false`] - If `true`, the SDK will log an Amplitude event anytime new attribution values are captured from the user. **Note: These events count towards your event volume.** Event name being logged: [Amplitude] Attribution Captured. Event Properties that can be logged: `utm_source`, `utm_medium`, `utm_campaign`, `utm_term`, `utm_content`, `referrer`, `referring_domain`, `gclid`, `fbclid`. For UTM properties to be logged, `includeUtm` must be set to `true`. For the `referrer` and `referring_domain` properties to be logged, `includeReferrer` must be set to `true`. For the `gclid` property to be logged, `includeGclid` must be set to `true`. For the `fbclid` property to be logged, `includeFbclid` must be set to `true`.\n * @property {boolean} [optOut=`false`] - Whether or not to disable tracking for the current user.\n * @property {function} [onError=`() => {}`] - Function to call on error.\n * @property {function} [onExitPage=`() => {}`] - Function called when the user exits the browser. Useful logging on page exit.\n * @property {Object} [plan] Tracking plan properties\n * @property {string} [plan.branch] The tracking plan branch name e.g. \"main\"\n * @property {string} [plan.source] The tracking plan source e.g. \"web\"\n * @property {string} [plan.version] The tracking plan version e.g. \"1\", \"15\"\n * @property {string} [plan.versionId] The tracking plan version Id e.g. \"9ec23ba0-275f-468f-80d1-66b88bff9529\"\n * @property {string} [platform=`Web`] - Platform device is running on. Defaults to `Web` (browser, including mobile browsers).\n * @property {number} [savedMaxCount=`1000`] - Maximum number of events to save in localStorage. If more events are logged while offline, then old events are removed.\n * @property {boolean} [saveEvents=`true`] - If `true`, saves events to localStorage and removes them upon successful upload. *Note: Without saving events, events may be lost if the user navigates to another page before the events are uploaded.*\n * @property {boolean} [saveParamsReferrerOncePerSession=`true`] - If `true`, then includeGclid, includeFbclid, includeReferrer, and includeUtm will only track their respective properties once per session. New values that come in during the middle of the user's session will be ignored. Set to false to always capture new values.\n * @property {boolean} [secureCookie=`false`] - If `true`, the amplitude cookie will be set with the Secure flag.\n * @property {number} [sessionTimeout=`30*60*1000` (30 min)] - The time between logged events before a new session starts in milliseconds.\n * @property {string[]} [storage=`''`] - Sets storage strategy. Options are 'cookies', 'localStorage', 'sessionStorage', or `none`. Will override `disableCookies` option\n * @property {Object} [trackingOptions=`{ city: true, country: true, carrier: true, device_manufacturer: true, device_model: true, dma: true, ip_address: true, language: true, os_name: true, os_version: true, platform: true, region: true, version_name: true}`] - Type of data associated with a user.\n * @property {string} [transport=`http`] - Network transport mechanism used to send events. Options are 'http' and 'beacon'.\n * @property {boolean} [unsetParamsReferrerOnNewSession=`false`] - If `false`, the existing `referrer` and `utm_parameter` values will be carried through each new session. If set to `true`, the `referrer` and `utm_parameter` user properties, which include `referrer`, `utm_source`, `utm_medium`, `utm_campaign`, `utm_term`, and `utm_content`, will be set to `null` upon instantiating a new session. Note: This only works if `includeReferrer` or `includeUtm` is set to `true`.\n * @property {string} [unsentKey=`amplitude_unsent`] - localStorage key that stores unsent events.\n * @property {string} [unsentIdentifyKey=`amplitude_unsent_identify`] - localStorage key that stores unsent identifies.\n * @property {number} [uploadBatchSize=`100`] - The maximum number of events to send to the server per request.\n * @property {Object} [headers=`{ 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' }`] - Headers attached to an event(s) upload network request. Custom header properties are merged with this object.\n * @property {string} [serverZone] - For server zone related configuration, used for server api endpoint and dynamic configuration.\n * @property {boolean} [useDynamicConfig] - Enable dynamic configuration to find best server url for user.\n * @property {boolean} [serverZoneBasedApi] - To update api endpoint with serverZone change or not. For data residency, recommend to enable it unless using own proxy server.\n * @property {number} [sessionId=`null`] - The custom Session ID for the current session. *Note: This is not recommended unless you know what you are doing because the Session ID of a session is utilized for all session metrics in Amplitude.\n * @property {string} [partnerId=`null`] - The partner id value\n */\nvar DEFAULT_OPTIONS = {\n apiEndpoint: Constants.EVENT_LOG_URL,\n batchEvents: false,\n cookieExpiration: 365,\n // 12 months is for GDPR compliance\n cookieName: 'amplitude_id',\n // this is a deprecated option\n sameSiteCookie: 'Lax',\n // cookie privacy policy\n cookieForceUpgrade: false,\n deferInitialization: false,\n disableCookies: false,\n // this is a deprecated option\n deviceIdFromUrlParam: false,\n domain: '',\n eventUploadPeriodMillis: 30 * 1000,\n // 30s\n eventUploadThreshold: 30,\n forceHttps: true,\n includeFbclid: false,\n includeGclid: false,\n includeReferrer: false,\n includeUtm: false,\n ingestionMetadata: {\n sourceName: '',\n sourceVersion: ''\n },\n language: language.getLanguage(),\n library: {\n name: 'amplitude-js',\n version: version\n },\n logLevel: 'WARN',\n logAttributionCapturedEvent: false,\n optOut: false,\n onError: function onError() {},\n onExitPage: function onExitPage() {},\n onNewSessionStart: function onNewSessionStart() {},\n plan: {\n branch: '',\n source: '',\n version: '',\n versionId: ''\n },\n platform: 'Web',\n savedMaxCount: 1000,\n saveEvents: true,\n saveParamsReferrerOncePerSession: true,\n secureCookie: false,\n sessionTimeout: 30 * 60 * 1000,\n storage: Constants.STORAGE_DEFAULT,\n trackingOptions: {\n city: true,\n country: true,\n carrier: true,\n device_manufacturer: true,\n device_model: true,\n dma: true,\n ip_address: true,\n language: true,\n os_name: true,\n os_version: true,\n platform: true,\n region: true,\n version_name: true\n },\n transport: Constants.TRANSPORT_HTTP,\n unsetParamsReferrerOnNewSession: false,\n unsentKey: 'amplitude_unsent',\n unsentIdentifyKey: 'amplitude_unsent_identify',\n uploadBatchSize: 100,\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',\n 'Cross-Origin-Resource-Policy': 'cross-origin'\n },\n serverZone: AmplitudeServerZone.US,\n useDynamicConfig: false,\n serverZoneBasedApi: false,\n sessionId: null,\n partnerId: ''\n};\n\n/**\n * Dynamic Configuration\n * Find the best server url automatically based on app users' geo location.\n */\nvar ConfigManager = /*#__PURE__*/function () {\n function ConfigManager() {\n _classCallCheck(this, ConfigManager);\n if (!ConfigManager.instance) {\n this.ingestionEndpoint = Constants.EVENT_LOG_URL;\n ConfigManager.instance = this;\n }\n return ConfigManager.instance;\n }\n _createClass(ConfigManager, [{\n key: \"refresh\",\n value: function refresh(serverZone, forceHttps, callback) {\n var protocol = 'https';\n if (!forceHttps && 'https:' !== GlobalScope.location.protocol) {\n protocol = 'http';\n }\n var dynamicConfigUrl = protocol + '://' + getDynamicConfigApi(serverZone);\n var self = this;\n var isIE = GlobalScope.XDomainRequest ? true : false;\n if (isIE) {\n var xdr = new GlobalScope.XDomainRequest();\n xdr.open('GET', dynamicConfigUrl, true);\n xdr.onload = function () {\n var response = JSON.parse(xdr.responseText);\n self.ingestionEndpoint = response['ingestionEndpoint'];\n if (callback) {\n callback();\n }\n };\n xdr.onerror = function () {};\n xdr.ontimeout = function () {};\n xdr.onprogress = function () {};\n xdr.send();\n } else {\n var xhr = new XMLHttpRequest();\n xhr.open('GET', dynamicConfigUrl, true);\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4 && xhr.status === 200) {\n var response = JSON.parse(xhr.responseText);\n self.ingestionEndpoint = response['ingestionEndpoint'];\n if (callback) {\n callback();\n }\n }\n };\n xhr.send();\n }\n }\n }]);\n return ConfigManager;\n}();\nvar instance$1 = new ConfigManager();\n\n/**\n * AmplitudeClient SDK API - instance constructor.\n * The Amplitude class handles creation of client instances, all you need to do is call amplitude.getInstance()\n * @constructor AmplitudeClient\n * @public\n * @example var amplitudeClient = new AmplitudeClient();\n */\nvar AmplitudeClient = function AmplitudeClient(instanceName) {\n if (!isBrowserEnv() && !utils.isWebWorkerEnvironment()) {\n utils.log.warn('amplitude-js will not work in a non-browser environment. If you are planning to add Amplitude to a node environment, please use @amplitude/node');\n }\n this._instanceName = utils.isEmptyString(instanceName) ? Constants.DEFAULT_INSTANCE : instanceName.toLowerCase();\n this._unsentEvents = [];\n this._unsentIdentifys = [];\n this.options = _objectSpread2(_objectSpread2({}, DEFAULT_OPTIONS), {}, {\n headers: _objectSpread2({}, DEFAULT_OPTIONS.headers),\n ingestionMetadata: _objectSpread2({}, DEFAULT_OPTIONS.ingestionMetadata),\n library: _objectSpread2({}, DEFAULT_OPTIONS.library),\n plan: _objectSpread2({}, DEFAULT_OPTIONS.plan),\n trackingOptions: _objectSpread2({}, DEFAULT_OPTIONS.trackingOptions)\n });\n this._q = []; // queue for proxied functions before script load\n this._sending = false;\n this._updateScheduled = false;\n this._onInitCallbacks = [];\n this._onNewSessionStartCallbacks = [];\n\n // event meta data\n this._eventId = 0;\n this._identifyId = 0;\n this._lastEventTime = null;\n this._newSession = false;\n // sequence used for by frontend for prioritizing event send retries\n this._sequenceNumber = 0;\n this._sessionId = null;\n this._isInitialized = false;\n\n // used to integrate with experiment SDK (client-side exposure tracking & real-time user properties)\n this._connector = null;\n this._userAgent = typeof navigator !== 'undefined' && navigator && navigator.userAgent || null;\n this._ua = new UAParser(this._userAgent).getResult();\n};\nAmplitudeClient.prototype.Identify = Identify;\nAmplitudeClient.prototype.Revenue = Revenue;\n\n/**\n * Initializes the Amplitude Javascript SDK with your apiKey and any optional configurations.\n * This is required before any other methods can be called.\n * @public\n * @param {string} apiKey - The API key for your app.\n * @param {string} opt_userId - (optional) An identifier for this user.\n * @param {object} opt_config - (optional) Configuration options.\n * See [options.js](https://amplitude.github.io/Amplitude-JavaScript/Options) for a list of options and default values.\n * @param {function} opt_callback - (optional) Provide a callback function to run after initialization is complete.\n * @example amplitudeClient.init('API_KEY', 'USER_ID', {includeReferrer: true, includeUtm: true}, function() { alert('init complete'); });\n */\nAmplitudeClient.prototype.init = function init(apiKey, opt_userId, opt_config, opt_callback) {\n var _this = this;\n if (type(apiKey) !== 'string' || utils.isEmptyString(apiKey)) {\n utils.log.error('Invalid apiKey. Please re-initialize with a valid apiKey');\n return;\n }\n try {\n // used to integrate with experiment SDK (client-side exposure tracking & real-time user properties)\n this._connector = AnalyticsConnector.getInstance(this._instanceName);\n _parseConfig(this.options, opt_config);\n if ((isBrowserEnv() || utils.isWebWorkerEnvironment()) && GlobalScope.Prototype !== undefined && Array.prototype.toJSON) {\n prototypeJsFix();\n utils.log.warn('Prototype.js injected Array.prototype.toJSON. Deleting Array.prototype.toJSON to prevent double-stringify');\n }\n if (this.options.cookieName !== DEFAULT_OPTIONS.cookieName) {\n utils.log.warn('The cookieName option is deprecated. We will be ignoring it for newer cookies');\n }\n if (this.options.serverZoneBasedApi) {\n this.options.apiEndpoint = getEventLogApi(this.options.serverZone);\n }\n this._refreshDynamicConfig();\n this.options.apiKey = apiKey;\n this._storageSuffix = '_' + apiKey + (this._instanceName === Constants.DEFAULT_INSTANCE ? '' : '_' + this._instanceName);\n this._storageSuffixV5 = apiKey.slice(0, 6);\n this._oldCookiename = this.options.cookieName + this._storageSuffix;\n this._unsentKey = this.options.unsentKey + this._storageSuffix;\n this._unsentIdentifyKey = this.options.unsentIdentifyKey + this._storageSuffix;\n this._cookieName = Constants.COOKIE_PREFIX + '_' + this._storageSuffixV5;\n this.cookieStorage = new cookieStorage().getStorage(this.options.disableCookies);\n this.cookieStorage.options({\n expirationDays: this.options.cookieExpiration,\n domain: this.options.domain,\n secure: this.options.secureCookie,\n sameSite: this.options.sameSiteCookie\n });\n this._metadataStorage = new MetadataStorage({\n storageKey: this._cookieName,\n disableCookies: this.options.disableCookies,\n expirationDays: this.options.cookieExpiration,\n domain: this.options.domain,\n secure: this.options.secureCookie,\n sameSite: this.options.sameSiteCookie,\n storage: this.options.storage\n });\n var hasOldCookie = !!this.cookieStorage.get(this._oldCookiename);\n var hasNewCookie = !!this._metadataStorage.load();\n this._useOldCookie = !hasNewCookie && hasOldCookie && !this.options.cookieForceUpgrade;\n var hasCookie = hasNewCookie || hasOldCookie;\n if (this.options.deferInitialization && !hasCookie) {\n this._deferInitialization(apiKey, opt_userId, opt_config, opt_callback);\n return;\n }\n this.options.domain = this.cookieStorage.options().domain;\n if (type(this.options.logLevel) === 'string') {\n utils.setLogLevel(this.options.logLevel);\n }\n var trackingOptions = _generateApiPropertiesTrackingConfig(this);\n this._apiPropertiesTrackingOptions = Object.keys(trackingOptions).length > 0 ? {\n tracking_options: trackingOptions\n } : {};\n if (this.options.cookieForceUpgrade && hasOldCookie) {\n if (!hasNewCookie) {\n _upgradeCookieData(this);\n }\n this.cookieStorage.remove(this._oldCookiename);\n }\n _loadCookieData(this);\n this._pendingReadStorage = true;\n var initFromStorage = function initFromStorage(storedDeviceId) {\n if (opt_config && opt_config.deviceId && !utils.validateDeviceId(opt_config.deviceId)) {\n utils.log.error(\"Invalid device ID rejected. Randomly generated UUID will be used instead of \\\"\".concat(opt_config.deviceId, \"\\\"\"));\n delete opt_config.deviceId;\n }\n _this.options.deviceId = _this._getInitialDeviceId(opt_config && opt_config.deviceId, storedDeviceId);\n _this.options.userId = type(opt_userId) === 'string' && !utils.isEmptyString(opt_userId) && opt_userId || type(opt_userId) === 'number' && opt_userId.toString() || _this.options.userId || null;\n var now = new Date().getTime();\n var startNewSession = !_this._sessionId || !_this._lastEventTime || now - _this._lastEventTime > _this.options.sessionTimeout || _this.options.sessionId;\n if (startNewSession) {\n if (_this.options.unsetParamsReferrerOnNewSession) {\n _this._unsetUTMParams();\n }\n _this._newSession = true;\n _this._sessionId = _this.options.sessionId || now;\n // reset this.options.sessionId to avoid re-usage\n // use instance.getSessionId() to get session id\n _this.options.sessionId = undefined;\n\n // only capture UTM params and referrer if new session\n if (_this.options.saveParamsReferrerOncePerSession) {\n _this._trackParamsAndReferrer();\n }\n }\n if (!_this.options.saveParamsReferrerOncePerSession) {\n _this._trackParamsAndReferrer();\n }\n\n // load unsent events and identifies before any attempt to log new ones\n if (_this.options.saveEvents) {\n _validateUnsentEventQueue(_this._unsentEvents);\n _validateUnsentEventQueue(_this._unsentIdentifys);\n }\n _this._lastEventTime = now;\n _saveCookieData(_this);\n _this._pendingReadStorage = false;\n _this._sendEventsIfReady(); // try sending unsent events\n\n for (var i = 0; i < _this._onInitCallbacks.length; i++) {\n _this._onInitCallbacks[i](_this);\n }\n _this._onInitCallbacks = [];\n _this._isInitialized = true;\n if (startNewSession) {\n _this._runNewSessionStartCallbacks();\n }\n };\n if (this.options.saveEvents) {\n this._unsentEvents = this._loadSavedUnsentEvents(this.options.unsentKey).map(function (event) {\n return {\n event: event\n };\n }).concat(this._unsentEvents);\n this._unsentIdentifys = this._loadSavedUnsentEvents(this.options.unsentIdentifyKey).map(function (event) {\n return {\n event: event\n };\n }).concat(this._unsentIdentifys);\n }\n if (opt_config && opt_config.onNewSessionStart) {\n this.onNewSessionStart(this.options.onNewSessionStart);\n }\n initFromStorage();\n this.runQueuedFunctions();\n if (type(opt_callback) === 'function') {\n opt_callback(this);\n }\n var onExitPage = this.options.onExitPage;\n if (type(onExitPage) === 'function' && GlobalScope.addEventListener) {\n if (!this.pageHandlersAdded) {\n this.pageHandlersAdded = true;\n var handleVisibilityChange = function handleVisibilityChange() {\n var prevTransport = _this.options.transport;\n _this.setTransport(Constants.TRANSPORT_BEACON);\n onExitPage();\n _this.setTransport(prevTransport);\n };\n\n // Monitoring just page exits because that is the most requested feature for now\n // \"If you're specifically trying to detect page unload events, the pagehide event is the best option.\"\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/pagehide_event\n GlobalScope.addEventListener('pagehide', function () {\n handleVisibilityChange();\n }, false);\n }\n }\n\n // Sets an event receiver to receive and forward exposure events from the experiment SDK.\n this._connector.eventBridge.setEventReceiver(function (event) {\n _this._logEvent(event.eventType, event.eventProperties, event.userProperties);\n });\n\n // Set the user ID and device ID in the core identity store to enable fetching variants.\n var editor = this._connector.identityStore.editIdentity();\n if (this.options.deviceId) {\n editor.setDeviceId(this.options.deviceId);\n }\n if (this.options.userId) {\n editor.setUserId(this.options.userId);\n }\n editor.commit();\n } catch (err) {\n utils.log.error(err);\n if (opt_config && type(opt_config.onError) === 'function') {\n opt_config.onError(err);\n }\n }\n};\nAmplitudeClient.prototype._runNewSessionStartCallbacks = function () {\n for (var i = 0; i < this._onNewSessionStartCallbacks.length; i++) {\n this._onNewSessionStartCallbacks[i](this);\n }\n};\nAmplitudeClient.prototype.deleteLowerLevelDomainCookies = function () {\n var host = utils.getHost();\n var cookieHost = this.options.domain && this.options.domain[0] === '.' ? this.options.domain.slice(1) : this.options.domain;\n if (!cookieHost || !utils.isWebWorkerEnvironment()) {\n return;\n }\n if (host !== cookieHost) {\n if (new RegExp(cookieHost + '$').test(host)) {\n var hostParts = host.split('.');\n var cookieHostParts = cookieHost.split('.');\n for (var i = hostParts.length; i > cookieHostParts.length; --i) {\n var deleteDomain = hostParts.slice(hostParts.length - i).join('.');\n baseCookie.set(this._cookieName, null, {\n domain: '.' + deleteDomain\n });\n }\n baseCookie.set(this._cookieName, null, {});\n }\n }\n};\nAmplitudeClient.prototype._getInitialDeviceId = function (configDeviceId, storedDeviceId) {\n if (configDeviceId) {\n return configDeviceId;\n }\n if (this.options.deviceIdFromUrlParam) {\n var deviceIdFromUrlParam = this._getDeviceIdFromUrlParam(this._getUrlParams());\n if (deviceIdFromUrlParam) {\n return deviceIdFromUrlParam;\n }\n }\n if (this.options.deviceId) {\n return this.options.deviceId;\n }\n if (storedDeviceId) {\n return storedDeviceId;\n }\n return base64Id();\n};\n\n// validate properties for unsent events\nvar _validateUnsentEventQueue = function _validateUnsentEventQueue(queue) {\n for (var i = 0; i < queue.length; i++) {\n var userProperties = queue[i].event.user_properties;\n var eventProperties = queue[i].event.event_properties;\n var groups = queue[i].event.groups;\n queue[i].event.user_properties = utils.validateProperties(userProperties);\n queue[i].event.event_properties = utils.validateProperties(eventProperties);\n queue[i].event.groups = utils.validateGroups(groups);\n }\n};\n\n/**\n * @private\n */\nAmplitudeClient.prototype._trackParamsAndReferrer = function _trackParamsAndReferrer() {\n var utmProperties;\n var referrerProperties;\n var gclidProperties;\n var fbclidProperties;\n if (this.options.includeUtm) {\n utmProperties = this._initUtmData();\n }\n if (this.options.includeReferrer) {\n referrerProperties = this._saveReferrer(this._getReferrer());\n }\n if (this.options.includeGclid) {\n gclidProperties = this._saveGclid(this._getUrlParams());\n }\n if (this.options.includeFbclid) {\n fbclidProperties = this._saveFbclid(this._getUrlParams());\n }\n if (this.options.logAttributionCapturedEvent) {\n var attributionProperties = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, utmProperties), referrerProperties), gclidProperties), fbclidProperties);\n if (Object.keys(attributionProperties).length > 0) {\n this.logEvent(Constants.ATTRIBUTION_EVENT, attributionProperties);\n }\n }\n};\n\n/**\n * Parse and validate user specified config values and overwrite existing option value\n * DEFAULT_OPTIONS provides list of all config keys that are modifiable, as well as expected types for values\n * @private\n */\nvar _parseConfig = function _parseConfig(options, config) {\n if (type(config) !== 'object') {\n return;\n }\n\n // Add exception in headers\n var freeFormObjectKeys = new Set(['headers']);\n var zeroAllowedKeys = new Set(['eventUploadPeriodMillis']);\n\n // validates config value is defined, is the correct type, and some additional value sanity checks\n var parseValidateAndLoad = function parseValidateAndLoad(key) {\n if (!Object.prototype.hasOwnProperty.call(options, key)) {\n return; // skip bogus config values\n }\n\n var inputValue = config[key];\n var expectedType = type(options[key]);\n if (key === 'transport' && !utils.validateTransport(inputValue)) {\n return;\n } else if (key === 'sessionId' && inputValue !== null) {\n options[key] = utils.validateSessionId(inputValue) ? inputValue : null;\n return;\n } else if (!utils.validateInput(inputValue, key + ' option', expectedType)) {\n return;\n }\n if (expectedType === 'boolean') {\n options[key] = !!inputValue;\n } else if (expectedType === 'string' && !utils.isEmptyString(inputValue) || expectedType === 'number' && (inputValue > 0 || inputValue === 0 && zeroAllowedKeys.has(key)) || expectedType === 'function') {\n options[key] = inputValue;\n } else if (expectedType === 'object') {\n _parseConfig(options[key], inputValue);\n }\n };\n for (var key in config) {\n if (freeFormObjectKeys.has(key)) {\n options[key] = _objectSpread2(_objectSpread2({}, options[key]), config[key]);\n } else if (Object.prototype.hasOwnProperty.call(config, key)) {\n parseValidateAndLoad(key);\n }\n }\n};\n\n/**\n * Run functions queued up by proxy loading snippet\n * @private\n */\nAmplitudeClient.prototype.runQueuedFunctions = function () {\n var queue = this._q;\n this._q = [];\n for (var i = 0; i < queue.length; i++) {\n var fn = this[queue[i][0]];\n if (type(fn) === 'function') {\n fn.apply(this, queue[i].slice(1));\n }\n }\n};\n\n/**\n * Check that the apiKey is set before calling a function. Logs a warning message if not set.\n * @private\n */\nAmplitudeClient.prototype._apiKeySet = function _apiKeySet(methodName) {\n if (utils.isEmptyString(this.options.apiKey)) {\n utils.log.error('Invalid apiKey. Please set a valid apiKey with init() before calling ' + methodName);\n return false;\n }\n return true;\n};\n\n/**\n * Load saved events from localStorage. JSON deserializes event array. Handles case where string is corrupted.\n * @private\n */\nAmplitudeClient.prototype._loadSavedUnsentEvents = function _loadSavedUnsentEvents(unsentKey) {\n var savedUnsentEventsString = this._getFromStorage(localStorage$1, unsentKey);\n var unsentEvents = this._parseSavedUnsentEventsString(savedUnsentEventsString, unsentKey);\n this._setInStorage(localStorage$1, unsentKey, JSON.stringify(unsentEvents));\n return unsentEvents;\n};\n\n/**\n * Load saved events from localStorage. JSON deserializes event array. Handles case where string is corrupted.\n * @private\n */\nAmplitudeClient.prototype._parseSavedUnsentEventsString = function _parseSavedUnsentEventsString(savedUnsentEventsString, unsentKey) {\n if (utils.isEmptyString(savedUnsentEventsString)) {\n return []; // new app, does not have any saved events\n }\n\n if (type(savedUnsentEventsString) === 'string') {\n try {\n var events = JSON.parse(savedUnsentEventsString);\n if (type(events) === 'array') {\n // handle case where JSON dumping of unsent events is corrupted\n return events;\n }\n } catch (e) {} /* eslint-disable-line no-empty */\n }\n\n utils.log.error('Unable to load ' + unsentKey + ' events. Restart with a new empty queue.');\n return [];\n};\n\n/**\n * Returns true if a new session was created during initialization, otherwise false.\n * @public\n * @return {boolean} Whether a new session was created during initialization.\n */\nAmplitudeClient.prototype.isNewSession = function isNewSession() {\n return this._newSession;\n};\n\n/**\n * Add callbacks to call after init. Useful for users who load Amplitude through a snippet.\n * @public\n */\nAmplitudeClient.prototype.onInit = function onInit(callback) {\n if (this._isInitialized) {\n callback(this);\n } else {\n this._onInitCallbacks.push(callback);\n }\n};\n\n/**\n * Add callbacks to call after new session start.\n * @public\n */\nAmplitudeClient.prototype.onNewSessionStart = function onNewSessionStart(callback) {\n this._onNewSessionStartCallbacks.push(callback);\n};\n\n/**\n * Returns the id of the current session.\n * @public\n * @return {number} Id of the current session.\n */\nAmplitudeClient.prototype.getSessionId = function getSessionId() {\n return this._sessionId;\n};\n\n/**\n * Increments the eventId and returns it.\n * @private\n */\nAmplitudeClient.prototype.nextEventId = function nextEventId() {\n this._eventId++;\n return this._eventId;\n};\n\n/**\n * Increments the identifyId and returns it.\n * @private\n */\nAmplitudeClient.prototype.nextIdentifyId = function nextIdentifyId() {\n this._identifyId++;\n return this._identifyId;\n};\n\n/**\n * Increments the sequenceNumber and returns it.\n * @private\n */\nAmplitudeClient.prototype.nextSequenceNumber = function nextSequenceNumber() {\n this._sequenceNumber++;\n return this._sequenceNumber;\n};\n\n/**\n * Returns the total count of unsent events and identifys\n * @private\n */\nAmplitudeClient.prototype._unsentCount = function _unsentCount() {\n return this._unsentEvents.length + this._unsentIdentifys.length;\n};\n\n/**\n * Send events if ready. Returns true if events are sent.\n * @private\n */\nAmplitudeClient.prototype._sendEventsIfReady = function _sendEventsIfReady() {\n if (this._unsentCount() === 0) {\n return false;\n }\n\n // if batching disabled, send any unsent events immediately\n if (!this.options.batchEvents) {\n this.sendEvents();\n return true;\n }\n\n // if batching enabled, check if min threshold met for batch size\n if (this._unsentCount() >= this.options.eventUploadThreshold) {\n this.sendEvents();\n return true;\n }\n\n // if beacon transport is activated, send events immediately\n // because there is no way to retry them later\n if (this.options.transport === Constants.TRANSPORT_BEACON) {\n this.sendEvents();\n return true;\n }\n\n // otherwise schedule an upload after 30s\n if (!this._updateScheduled) {\n // make sure we only schedule 1 upload\n this._updateScheduled = true;\n setTimeout(function () {\n this._updateScheduled = false;\n this.sendEvents();\n }.bind(this), this.options.eventUploadPeriodMillis);\n }\n return false; // an upload was scheduled, no events were uploaded\n};\n\n/**\n * Clears any stored events and metadata. Storage is then re-created on next event sending.\n * @public\n * @return {boolean} True if metadata was cleared, false if none existed\n */\nAmplitudeClient.prototype.clearStorage = function clearStorage() {\n return this._metadataStorage.clear();\n};\n\n/**\n * Helper function to fetch values from storage\n * Storage argument allows for localStoraoge and sessionStoraoge\n * @private\n */\nAmplitudeClient.prototype._getFromStorage = function _getFromStorage(storage, key) {\n return storage.getItem(key + this._storageSuffix);\n};\n\n/**\n * Helper function to set values in storage\n * Storage argument allows for localStoraoge and sessionStoraoge\n * @private\n */\nAmplitudeClient.prototype._setInStorage = function _setInStorage(storage, key, value) {\n storage.setItem(key + this._storageSuffix, value);\n};\n\n/**\n * Fetches deviceId, userId, event meta data from amplitude cookie\n * @private\n */\nvar _loadCookieData = function _loadCookieData(scope) {\n if (!scope._useOldCookie) {\n var props = scope._metadataStorage.load();\n if (type(props) === 'object') {\n _loadCookieDataProps(scope, props);\n }\n return;\n }\n var cookieData = scope.cookieStorage.get(scope._oldCookiename);\n if (type(cookieData) === 'object') {\n _loadCookieDataProps(scope, cookieData);\n return;\n }\n};\nvar _upgradeCookieData = function _upgradeCookieData(scope) {\n var cookieData = scope.cookieStorage.get(scope._oldCookiename);\n if (type(cookieData) === 'object') {\n _loadCookieDataProps(scope, cookieData);\n _saveCookieData(scope);\n }\n};\nvar _loadCookieDataProps = function _loadCookieDataProps(scope, cookieData) {\n if (cookieData.deviceId) {\n scope.options.deviceId = cookieData.deviceId;\n }\n if (cookieData.userId) {\n scope.options.userId = cookieData.userId;\n }\n if (cookieData.optOut !== null && cookieData.optOut !== undefined) {\n // Do not clobber config opt out value if cookieData has optOut as false\n if (cookieData.optOut !== false) {\n scope.options.optOut = cookieData.optOut;\n }\n }\n if (cookieData.sessionId) {\n scope._sessionId = parseInt(cookieData.sessionId, 10);\n }\n if (cookieData.lastEventTime) {\n scope._lastEventTime = parseInt(cookieData.lastEventTime, 10);\n }\n if (cookieData.eventId) {\n scope._eventId = parseInt(cookieData.eventId, 10);\n }\n if (cookieData.identifyId) {\n scope._identifyId = parseInt(cookieData.identifyId, 10);\n }\n if (cookieData.sequenceNumber) {\n scope._sequenceNumber = parseInt(cookieData.sequenceNumber, 10);\n }\n};\n\n/**\n * Saves deviceId, userId, event meta data to amplitude cookie\n * @private\n */\nvar _saveCookieData = function _saveCookieData(scope) {\n var cookieData = {\n deviceId: scope.options.deviceId,\n userId: scope.options.userId,\n optOut: scope.options.optOut,\n sessionId: scope._sessionId,\n lastEventTime: scope._lastEventTime,\n eventId: scope._eventId,\n identifyId: scope._identifyId,\n sequenceNumber: scope._sequenceNumber\n };\n if (scope._useOldCookie) {\n scope.cookieStorage.set(scope.options.cookieName + scope._storageSuffix, cookieData);\n } else {\n scope._metadataStorage.save(cookieData);\n }\n};\n\n/**\n * Parse the utm properties out of cookies and query for adding to user properties.\n * @private\n */\nAmplitudeClient.prototype._initUtmData = function _initUtmData(queryParams, cookieParams) {\n queryParams = queryParams || this._getUrlParams();\n cookieParams = cookieParams || this.cookieStorage.get('__utmz');\n var utmProperties = getUtmData(cookieParams, queryParams);\n _sendParamsReferrerUserProperties(this, utmProperties);\n return utmProperties;\n};\n\n/**\n * Unset the utm params from the Amplitude instance and update the identify.\n * @private\n */\nAmplitudeClient.prototype._unsetUTMParams = function _unsetUTMParams() {\n var identify = new Identify();\n identify.unset(Constants.REFERRER);\n identify.unset(Constants.REFERRING_DOMAIN);\n identify.unset(Constants.UTM_SOURCE);\n identify.unset(Constants.UTM_MEDIUM);\n identify.unset(Constants.UTM_CAMPAIGN);\n identify.unset(Constants.UTM_TERM);\n identify.unset(Constants.UTM_CONTENT);\n this.identify(identify);\n};\n\n/**\n * The calling function should determine when it is appropriate to send these user properties. This function\n * will no longer contain any session storage checking logic.\n * @private\n */\nvar _sendParamsReferrerUserProperties = function _sendParamsReferrerUserProperties(scope, userProperties) {\n if (type(userProperties) !== 'object' || Object.keys(userProperties).length === 0) {\n return;\n }\n\n // setOnce the initial user properties\n var identify = new Identify();\n for (var key in userProperties) {\n if (Object.prototype.hasOwnProperty.call(userProperties, key)) {\n identify.setOnce('initial_' + key, userProperties[key]);\n identify.set(key, userProperties[key]);\n }\n }\n scope.identify(identify);\n};\n\n/**\n * @private\n */\nAmplitudeClient.prototype._getReferrer = function _getReferrer() {\n var urlRefer = this._getReferrerFromUrlParam(this._getUrlParams());\n if (urlRefer) return urlRefer;else return typeof document !== 'undefined' ? document.referrer : '';\n};\n\n/**\n * @private\n */\nAmplitudeClient.prototype._getUrlParams = function _getUrlParams() {\n return GlobalScope.location.search;\n};\n\n/**\n * Try to fetch Google Gclid from url params.\n * @private\n */\nAmplitudeClient.prototype._saveGclid = function _saveGclid(urlParams) {\n var gclid = utils.getQueryParam('gclid', urlParams);\n if (utils.isEmptyString(gclid)) {\n return;\n }\n var gclidProperties = {\n gclid: gclid\n };\n _sendParamsReferrerUserProperties(this, gclidProperties);\n return gclidProperties;\n};\n\n/**\n * Try to fetch Facebook Fbclid from url params.\n * @private\n */\nAmplitudeClient.prototype._saveFbclid = function _saveFbclid(urlParams) {\n var fbclid = utils.getQueryParam('fbclid', urlParams);\n if (utils.isEmptyString(fbclid)) {\n return;\n }\n var fbclidProperties = {\n fbclid: fbclid\n };\n _sendParamsReferrerUserProperties(this, fbclidProperties);\n return fbclidProperties;\n};\n\n/**\n * Try to fetch Amplitude device id from url params.\n * @private\n */\nAmplitudeClient.prototype._getDeviceIdFromUrlParam = function _getDeviceIdFromUrlParam(urlParams) {\n return utils.getQueryParam(Constants.AMP_DEVICE_ID_PARAM, urlParams);\n};\n\n/**\n * Try to fetch referrer from url params.\n * @private\n */\nAmplitudeClient.prototype._getReferrerFromUrlParam = function _getReferrerFromUrlParam(urlParams) {\n return utils.getQueryParam(Constants.AMP_REFERRER_PARAM, urlParams);\n};\n\n/**\n * Parse the domain from referrer info\n * @private\n */\nAmplitudeClient.prototype._getReferringDomain = function _getReferringDomain(referrer) {\n if (utils.isEmptyString(referrer)) {\n return null;\n }\n var parts = referrer.split('/');\n if (parts.length >= 3) {\n return parts[2];\n }\n return null;\n};\n\n/**\n * Fetch the referrer information, parse the domain and send.\n * Since user properties are propagated on the server, only send once per session, don't need to send with every event\n * @private\n */\nAmplitudeClient.prototype._saveReferrer = function _saveReferrer(referrer) {\n if (utils.isEmptyString(referrer)) {\n return;\n }\n var referrerInfo = {\n referrer: referrer,\n referring_domain: this._getReferringDomain(referrer)\n };\n _sendParamsReferrerUserProperties(this, referrerInfo);\n return referrerInfo;\n};\n\n/**\n * Saves unsent events and identifies to localStorage. JSON stringifies event queues before saving.\n * Note: this is called automatically every time events are logged, unless you explicitly set option saveEvents to false.\n * @private\n */\nAmplitudeClient.prototype.saveEvents = function saveEvents() {\n try {\n var serializedUnsentEvents = JSON.stringify(this._unsentEvents.map(function (_ref) {\n var event = _ref.event;\n return event;\n }));\n this._setInStorage(localStorage$1, this.options.unsentKey, serializedUnsentEvents);\n } catch (e) {} /* eslint-disable-line no-empty */\n\n try {\n var serializedIdentifys = JSON.stringify(this._unsentIdentifys.map(function (unsentIdentify) {\n return unsentIdentify.event;\n }));\n this._setInStorage(localStorage$1, this.options.unsentIdentifyKey, serializedIdentifys);\n } catch (e) {} /* eslint-disable-line no-empty */\n};\n\n/**\n * Sets a customer domain for the amplitude cookie. Useful if you want to support cross-subdomain tracking.\n * @public\n * @param {string} domain to set.\n * @example amplitudeClient.setDomain('.amplitude.com');\n */\nAmplitudeClient.prototype.setDomain = function setDomain(domain) {\n if (this._shouldDeferCall()) {\n return this._q.push(['setDomain'].concat(Array.prototype.slice.call(arguments, 0)));\n }\n if (!utils.validateInput(domain, 'domain', 'string')) {\n return;\n }\n try {\n this.cookieStorage.options({\n expirationDays: this.options.cookieExpiration,\n secure: this.options.secureCookie,\n domain: domain,\n sameSite: this.options.sameSiteCookie\n });\n this.options.domain = this.cookieStorage.options().domain;\n _loadCookieData(this);\n _saveCookieData(this);\n } catch (e) {\n utils.log.error(e);\n }\n};\n\n/**\n * Sets an identifier for the current user.\n * @public\n * @param {string} userId - identifier to set. Can be null.\n * @param {boolean} startNewSession - (optional) if start a new session or not\n * @example amplitudeClient.setUserId('joe@gmail.com');\n */\nAmplitudeClient.prototype.setUserId = function setUserId(userId) {\n var startNewSession = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n if (!utils.validateInput(startNewSession, 'startNewSession', 'boolean')) {\n return;\n }\n if (this._shouldDeferCall()) {\n return this._q.push(['setUserId'].concat(Array.prototype.slice.call(arguments, 0)));\n }\n try {\n this.options.userId = userId !== undefined && userId !== null && '' + userId || null;\n if (startNewSession) {\n if (this.options.unsetParamsReferrerOnNewSession) {\n this._unsetUTMParams();\n }\n this._newSession = true;\n this._sessionId = new Date().getTime();\n this._runNewSessionStartCallbacks();\n\n // only capture UTM params and referrer if new session\n if (this.options.saveParamsReferrerOncePerSession) {\n this._trackParamsAndReferrer();\n }\n }\n _saveCookieData(this);\n\n // Update core identity store to propagate new user info\n // to experiment SDK and trigger a fetch if the ID has changed.\n if (this._connector) {\n this._connector.identityStore.editIdentity().setUserId(this.options.userId).commit();\n }\n } catch (e) {\n utils.log.error(e);\n }\n};\n\n/**\n * Add user to a group or groups. You need to specify a groupType and groupName(s).\n *\n * For example you can group people by their organization.\n * In that case, groupType is \"orgId\" and groupName would be the actual ID(s).\n * groupName can be a string or an array of strings to indicate a user in multiple gruups.\n * You can also call setGroup multiple times with different groupTypes to track multiple types of groups (up to 5 per app).\n *\n * Note: this will also set groupType: groupName as a user property.\n * See the [advanced topics article](https://developers.amplitude.com/docs/javascript#user-groups) for more information.\n * @public\n * @param {string} groupType - the group type (ex: orgId)\n * @param {string|list} groupName - the name of the group (ex: 15), or a list of names of the groups\n * @example amplitudeClient.setGroup('orgId', 15); // this adds the current user to orgId 15.\n */\nAmplitudeClient.prototype.setGroup = function (groupType, groupName) {\n if (this._shouldDeferCall()) {\n return this._q.push(['setGroup'].concat(Array.prototype.slice.call(arguments, 0)));\n }\n if (!this._apiKeySet('setGroup()') || !utils.validateInput(groupType, 'groupType', 'string') || utils.isEmptyString(groupType)) {\n return;\n }\n var groups = {};\n groups[groupType] = groupName;\n var identify = new Identify().set(groupType, groupName);\n this._logEvent(Constants.IDENTIFY_EVENT, null, null, identify.userPropertiesOperations, groups, null, null, null);\n};\n\n/**\n * Sets whether to opt current user out of tracking.\n * @public\n * @param {boolean} enable - if true then no events will be logged or sent.\n * @example: amplitude.setOptOut(true);\n */\nAmplitudeClient.prototype.setOptOut = function setOptOut(enable) {\n if (this._shouldDeferCall()) {\n return this._q.push(['setOptOut'].concat(Array.prototype.slice.call(arguments, 0)));\n }\n if (!utils.validateInput(enable, 'enable', 'boolean')) {\n return;\n }\n try {\n this.options.optOut = enable;\n _saveCookieData(this);\n } catch (e) {\n utils.log.error(e);\n }\n};\n\n/**\n * Set a custom Session ID for the current session.\n * Note: This is not recommended unless you know what you are doing because the Session ID of a session is utilized for all session metrics in Amplitude.\n * The Session ID to set for the current session must be in milliseconds since epoch (Unix Timestamp).\n * @public\n * @param {int} sessionId to set.\n * @example amplitudeClient.setSessionId(1622158968000);\n */\nAmplitudeClient.prototype.setSessionId = function setSessionId(sessionId) {\n if (!utils.validateInput(sessionId, 'sessionId', 'number')) {\n return;\n }\n try {\n this._sessionId = sessionId;\n _saveCookieData(this);\n } catch (e) {\n utils.log.error(e);\n }\n};\n\n/**\n * Sets the current Unix timestamp as the new Session ID for the instance.\n * @public\n * @example amplitudeClient.resetSessionId();\n */\nAmplitudeClient.prototype.resetSessionId = function resetSessionId() {\n this.setSessionId(new Date().getTime());\n};\n\n/**\n * Regenerates a new random deviceId for current user. Note: this is not recommended unless you know what you\n * are doing. This can be used in conjunction with `setUserId(null)` to anonymize users after they log out.\n * With a null userId and a completely new deviceId, the current user would appear as a brand new user in dashboard.\n * This uses src/uuid.js to regenerate the deviceId.\n * @public\n */\nAmplitudeClient.prototype.regenerateDeviceId = function regenerateDeviceId() {\n if (this._shouldDeferCall()) {\n return this._q.push(['regenerateDeviceId'].concat(Array.prototype.slice.call(arguments, 0)));\n }\n this.setDeviceId(base64Id());\n};\n\n/**\n * Sets a custom deviceId for current user. **Values may not have `.` inside them**\n * Note: this is not recommended unless you know what you are doing (like if you have your own system for managing deviceIds).\n * Make sure the deviceId you set is sufficiently unique\n * (we recommend something like a UUID - see src/uuid.js for an example of how to generate) to prevent conflicts with other devices in our system.\n * @public\n * @param {string} deviceId - custom deviceId for current user.\n * @example amplitudeClient.setDeviceId('45f0954f-eb79-4463-ac8a-233a6f45a8f0');\n */\nAmplitudeClient.prototype.setDeviceId = function setDeviceId(deviceId) {\n if (this._shouldDeferCall()) {\n return this._q.push(['setDeviceId'].concat(Array.prototype.slice.call(arguments, 0)));\n }\n if (!utils.validateDeviceId(deviceId)) {\n return;\n }\n try {\n if (!utils.isEmptyString(deviceId)) {\n this.options.deviceId = '' + deviceId;\n _saveCookieData(this);\n\n // Update core identity store to propagate new user info\n // to experiment SDK and trigger a fetch if the ID has changed.\n if (this._connector) {\n this._connector.identityStore.editIdentity().setDeviceId(this.options.deviceId).commit();\n }\n }\n } catch (e) {\n utils.log.error(e);\n }\n};\n\n/**\n * Sets the network transport type for events. Typically used to set to 'beacon'\n * on an end-of-lifecycle event handler such as `onpagehide` or `onvisibilitychange`\n * @public\n * @param {string} transport - transport mechanism to use for events. Must be one of `http` or `beacon`.\n * @example amplitudeClient.setTransport('beacon');\n */\nAmplitudeClient.prototype.setTransport = function setTransport(transport) {\n if (this._shouldDeferCall()) {\n return this._q.push(['setTransport'].concat(Array.prototype.slice.call(arguments, 0)));\n }\n if (!utils.validateTransport(transport)) {\n return;\n }\n this.options.transport = transport;\n};\n\n/**\n * Sets user properties for the current user.\n * @public\n * @param {object} - object with string keys and values for the user properties to set.\n * @param {boolean} - DEPRECATED opt_replace: in earlier versions of the JS SDK the user properties object was kept in\n * memory and replace = true would replace the object in memory. Now the properties are no longer stored in memory, so replace is deprecated.\n * @example amplitudeClient.setUserProperties({'gender': 'female', 'sign_up_complete': true})\n */\nAmplitudeClient.prototype.setUserProperties = function setUserProperties(userProperties) {\n if (this._shouldDeferCall()) {\n return this._q.push(['setUserProperties'].concat(Array.prototype.slice.call(arguments, 0)));\n }\n if (!this._apiKeySet('setUserProperties()') || !utils.validateInput(userProperties, 'userProperties', 'object')) {\n return;\n }\n // sanitize the userProperties dict before converting into identify\n var sanitized = utils.truncate(utils.validateProperties(userProperties));\n if (Object.keys(sanitized).length === 0) {\n return;\n }\n\n // convert userProperties into an identify call\n var identify = new Identify();\n for (var property in sanitized) {\n if (Object.prototype.hasOwnProperty.call(sanitized, property)) {\n identify.set(property, sanitized[property]);\n }\n }\n this.identify(identify);\n};\n\n/**\n * Clear all of the user properties for the current user. Note: clearing user properties is irreversible!\n * @public\n * @example amplitudeClient.clearUserProperties();\n */\nAmplitudeClient.prototype.clearUserProperties = function clearUserProperties() {\n if (this._shouldDeferCall()) {\n return this._q.push(['clearUserProperties'].concat(Array.prototype.slice.call(arguments, 0)));\n }\n if (!this._apiKeySet('clearUserProperties()')) {\n return;\n }\n var identify = new Identify();\n identify.clearAll();\n this.identify(identify);\n};\n\n/**\n * Applies the proxied functions on the proxied object to an instance of the real object.\n * Used to convert proxied Identify and Revenue objects.\n * @private\n */\nvar _convertProxyObjectToRealObject = function _convertProxyObjectToRealObject(instance, proxy) {\n for (var i = 0; i < proxy._q.length; i++) {\n var fn = instance[proxy._q[i][0]];\n if (type(fn) === 'function') {\n fn.apply(instance, proxy._q[i].slice(1));\n }\n }\n return instance;\n};\n\n/**\n * Send an identify call containing user property operations to Amplitude servers.\n * See the [Identify](https://amplitude.github.io/Amplitude-JavaScript/Identify/)\n * reference page for more information on the Identify API and user property operations.\n * @param {Identify} identify_obj - the Identify object containing the user property operations to send.\n * @param {Amplitude~eventCallback} opt_callback - (optional) callback function to run when the identify event has been sent.\n * Note: the server response code and response body from the identify event upload are passed to the callback function.\n * @param {Amplitude~eventCallback} opt_error_callback - (optional) a callback function to run after the event logging\n * fails. The failure can be from the request being malformed or from a network failure\n * Note: the server response code and response body from the event upload are passed to the callback function.\n * @example\n * var identify = new amplitude.Identify().set('colors', ['rose', 'gold']).add('karma', 1).setOnce('sign_up_date', '2016-03-31');\n * amplitude.identify(identify);\n */\nAmplitudeClient.prototype.identify = function (identify_obj, opt_callback, opt_error_callback, outOfSession) {\n if (this._shouldDeferCall()) {\n return this._q.push(['identify'].concat(Array.prototype.slice.call(arguments, 0)));\n }\n if (!this._apiKeySet('identify()')) {\n _logErrorsWithCallbacks(opt_callback, opt_error_callback, 0, 'No request sent', {\n reason: 'API key is not set'\n });\n return;\n }\n\n // if identify input is a proxied object created by the async loading snippet, convert it into an identify object\n if (type(identify_obj) === 'object' && Object.prototype.hasOwnProperty.call(identify_obj, '_q')) {\n identify_obj = _convertProxyObjectToRealObject(new Identify(), identify_obj);\n }\n if (identify_obj instanceof Identify) {\n // only send if there are operations\n if (Object.keys(identify_obj.userPropertiesOperations).length > 0) {\n return this._logEvent(Constants.IDENTIFY_EVENT, null, null, identify_obj.userPropertiesOperations, null, null, null, opt_callback, opt_error_callback, outOfSession);\n } else {\n _logErrorsWithCallbacks(opt_callback, opt_error_callback, 0, 'No request sent', {\n reason: 'No user property operations'\n });\n }\n } else {\n utils.log.error('Invalid identify input type. Expected Identify object but saw ' + type(identify_obj));\n _logErrorsWithCallbacks(opt_callback, opt_error_callback, 0, 'No request sent', {\n reason: 'Invalid identify input type'\n });\n }\n};\nAmplitudeClient.prototype.groupIdentify = function (group_type, group_name, identify_obj, opt_callback, opt_error_callback, outOfSession) {\n if (this._shouldDeferCall()) {\n return this._q.push(['groupIdentify'].concat(Array.prototype.slice.call(arguments, 0)));\n }\n if (!this._apiKeySet('groupIdentify()')) {\n _logErrorsWithCallbacks(opt_callback, opt_error_callback, 0, 'No request sent', {\n reason: 'API key is not set'\n });\n return;\n }\n if (!utils.validateInput(group_type, 'group_type', 'string') || utils.isEmptyString(group_type)) {\n _logErrorsWithCallbacks(opt_callback, opt_error_callback, 0, 'No request sent', {\n reason: 'Invalid group type'\n });\n return;\n }\n if (group_name === null || group_name === undefined) {\n _logErrorsWithCallbacks(opt_callback, opt_error_callback, 0, 'No request sent', {\n reason: 'Invalid group name'\n });\n return;\n }\n\n // if identify input is a proxied object created by the async loading snippet, convert it into an identify object\n if (type(identify_obj) === 'object' && Object.prototype.hasOwnProperty.call(identify_obj, '_q')) {\n identify_obj = _convertProxyObjectToRealObject(new Identify(), identify_obj);\n }\n if (identify_obj instanceof Identify) {\n // only send if there are operations\n if (Object.keys(identify_obj.userPropertiesOperations).length > 0) {\n return this._logEvent(Constants.GROUP_IDENTIFY_EVENT, null, null, null, _defineProperty({}, group_type, group_name), identify_obj.userPropertiesOperations, null, opt_callback, opt_error_callback, outOfSession);\n } else {\n _logErrorsWithCallbacks(opt_callback, opt_error_callback, 0, 'No request sent', {\n reason: 'No group property operations'\n });\n }\n } else {\n utils.log.error('Invalid identify input type. Expected Identify object but saw ' + type(identify_obj));\n _logErrorsWithCallbacks(opt_callback, opt_error_callback, 0, 'No request sent', {\n reason: 'Invalid identify input type'\n });\n }\n};\n\n/**\n * Set a versionName for your application.\n * @public\n * @param {string} versionName - The version to set for your application.\n * @example amplitudeClient.setVersionName('1.12.3');\n */\nAmplitudeClient.prototype.setVersionName = function setVersionName(versionName) {\n if (this._shouldDeferCall()) {\n return this._q.push(['setVersionName'].concat(Array.prototype.slice.call(arguments, 0)));\n }\n if (!utils.validateInput(versionName, 'versionName', 'string')) {\n return;\n }\n this.options.versionName = versionName;\n};\n\n/**\n * Private logEvent method. Keeps apiProperties from being publicly exposed.\n * @private\n */\nAmplitudeClient.prototype._logEvent = function _logEvent(eventType, eventProperties, apiProperties, userProperties, groups, groupProperties, timestamp, callback, errorCallback, outOfSession) {\n _loadCookieData(this); // reload cookie before each log event to sync event meta-data between windows and tabs\n\n if (!eventType) {\n _logErrorsWithCallbacks(callback, errorCallback, 0, 'No request sent', {\n reason: 'Missing eventType'\n });\n return;\n }\n if (this.options.optOut) {\n _logErrorsWithCallbacks(callback, errorCallback, 0, 'No request sent', {\n reason: 'optOut is set to true'\n });\n return;\n }\n try {\n var eventId;\n if (eventType === Constants.IDENTIFY_EVENT || eventType === Constants.GROUP_IDENTIFY_EVENT) {\n eventId = this.nextIdentifyId();\n } else {\n eventId = this.nextEventId();\n }\n var sequenceNumber = this.nextSequenceNumber();\n var eventTime = type(timestamp) === 'number' ? timestamp : new Date().getTime();\n if (outOfSession) {\n this._sessionId = -1;\n } else if (!this._sessionId || !this._lastEventTime || eventTime - this._lastEventTime > this.options.sessionTimeout) {\n this._sessionId = eventTime;\n this._runNewSessionStartCallbacks();\n }\n this._lastEventTime = eventTime;\n _saveCookieData(this);\n var osName = this._ua.browser.name;\n var osVersion = this._ua.browser.major;\n var deviceModel = this._ua.device.model || this._ua.os.name;\n var deviceVendor = this._ua.device.vendor;\n userProperties = userProperties || {};\n var trackingOptions = _objectSpread2({}, this._apiPropertiesTrackingOptions);\n apiProperties = _objectSpread2(_objectSpread2({}, apiProperties || {}), trackingOptions);\n eventProperties = eventProperties || {};\n groups = groups || {};\n groupProperties = groupProperties || {};\n var event = {\n device_id: this.options.deviceId,\n user_id: this.options.userId,\n timestamp: eventTime,\n event_id: eventId,\n session_id: this._sessionId || -1,\n event_type: eventType,\n version_name: this.options.versionName || null,\n platform: _shouldTrackField(this, 'platform') ? this.options.platform : null,\n os_name: _shouldTrackField(this, 'os_name') ? osName || null : null,\n os_version: _shouldTrackField(this, 'os_version') ? osVersion || null : null,\n device_model: _shouldTrackField(this, 'device_model') ? deviceModel || null : null,\n device_manufacturer: _shouldTrackField(this, 'device_manufacturer') ? deviceVendor || null : null,\n language: _shouldTrackField(this, 'language') ? this.options.language : null,\n api_properties: apiProperties,\n event_properties: utils.truncate(utils.validateProperties(eventProperties)),\n user_properties: utils.truncate(utils.validateProperties(userProperties)),\n uuid: uuid(),\n library: this.options.library,\n sequence_number: sequenceNumber,\n // for ordering events and identifys\n groups: utils.truncate(utils.validateGroups(groups)),\n group_properties: utils.truncate(utils.validateProperties(groupProperties)),\n user_agent: this._userAgent,\n partner_id: this.options.partnerId || null\n };\n if (_isObservePlanSet(this)) {\n event.plan = {\n branch: this.options.plan.branch || undefined,\n source: this.options.plan.source || undefined,\n version: this.options.plan.version || undefined,\n versionId: this.options.plan.versionId || undefined\n };\n }\n if (_isIngestionMetadataSet(this)) {\n event.ingestion_metadata = {\n source_name: this.options.ingestionMetadata.sourceName || undefined,\n source_version: this.options.ingestionMetadata.sourceVersion || undefined\n };\n }\n if (eventType === Constants.IDENTIFY_EVENT || eventType === Constants.GROUP_IDENTIFY_EVENT) {\n this._unsentIdentifys.push({\n event: event,\n callback: callback,\n errorCallback: errorCallback\n });\n this._limitEventsQueued(this._unsentIdentifys);\n } else {\n this._unsentEvents.push({\n event: event,\n callback: callback,\n errorCallback: errorCallback\n });\n this._limitEventsQueued(this._unsentEvents);\n }\n if (this.options.saveEvents) {\n this.saveEvents();\n }\n this._sendEventsIfReady();\n\n // In the case of an identify event, update the core user store so the experiment SDK can fetch new variants and\n // utilize user properties in real time.\n if (eventType === Constants.IDENTIFY_EVENT && this._connector) {\n this._connector.identityStore.editIdentity().updateUserProperties(utils.truncate(utils.validateProperties(userProperties))).commit();\n }\n return eventId;\n } catch (e) {\n utils.log.error(e);\n }\n};\nvar _isObservePlanSet = function _isObservePlanSet(scope) {\n return scope.options.plan && (scope.options.plan.source || scope.options.plan.branch || scope.options.plan.version || scope.options.plan.versionId);\n};\nvar _isIngestionMetadataSet = function _isIngestionMetadataSet(scope) {\n return scope.options.ingestionMetadata && (scope.options.ingestionMetadata.sourceName || scope.options.ingestionMetadata.sourceVersion);\n};\nvar _shouldTrackField = function _shouldTrackField(scope, field) {\n return !!scope.options.trackingOptions[field];\n};\nvar _generateApiPropertiesTrackingConfig = function _generateApiPropertiesTrackingConfig(scope) {\n // to limit size of config payload, only send fields that have been disabled\n var fields = ['city', 'country', 'dma', 'ip_address', 'region'];\n var config = {};\n for (var i = 0; i < fields.length; i++) {\n var field = fields[i];\n if (!_shouldTrackField(scope, field)) {\n config[field] = false;\n }\n }\n return config;\n};\n\n/**\n * Remove old events from the beginning of the array if too many have accumulated. Default limit is 1000 events.\n * @private\n */\nAmplitudeClient.prototype._limitEventsQueued = function _limitEventsQueued(queue) {\n if (queue.length > this.options.savedMaxCount) {\n var deletedEvents = queue.splice(0, queue.length - this.options.savedMaxCount);\n deletedEvents.forEach(function (event) {\n _logErrorsWithCallbacks(event.callback, event.errorCallback, 0, 'No request sent', {\n reason: 'Event dropped because options.savedMaxCount exceeded. User may be offline or have a content blocker'\n });\n });\n }\n};\n\n/**\n * This is the callback for logEvent and identify calls. It gets called after the event/identify is uploaded,\n * and the server response code and response body from the upload request are passed to the callback function.\n * @callback Amplitude~eventCallback\n * @param {number} responseCode - Server response code for the event / identify upload request.\n * @param {string} responseBody - Server response body for the event / identify upload request.\n * @param {object} details - (optional) Additional information associated with sending event.\n */\n\n/**\n * Log an event with eventType and eventProperties\n * @public\n * @param {string} eventType - name of event\n * @param {object} eventProperties - (optional) an object with string keys and values for the event properties.\n * @param {Amplitude~eventCallback} opt_callback - (optional) a callback function to run after the event is logged.\n * Note: the server response code and response body from the event upload are passed to the callback function.\n * @param {Amplitude~eventCallback} opt_error_callback - (optional) a callback function to run after the event logging\n * fails. The failure can be from the request being malformed or from a network failure\n * Note: the server response code and response body from the event upload are passed to the callback function.\n * @param {boolean} outOfSession - (optional) if this event is out of session or not\n * @example amplitudeClient.logEvent('Clicked Homepage Button', {'finished_flow': false, 'clicks': 15});\n */\nAmplitudeClient.prototype.logEvent = function logEvent(eventType, eventProperties, opt_callback, opt_error_callback) {\n var outOfSession = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n if (this._shouldDeferCall()) {\n return this._q.push(['logEvent'].concat(Array.prototype.slice.call(arguments, 0)));\n }\n return this.logEventWithTimestamp(eventType, eventProperties, null, opt_callback, opt_error_callback, outOfSession);\n};\n\n/**\n * Log an event with eventType and eventProperties and a custom timestamp\n * @public\n * @param {string} eventType - name of event\n * @param {object} eventProperties - (optional) an object with string keys and values for the event properties.\n * @param {number} timestamp - (optional) the custom timestamp as milliseconds since epoch.\n * @param {Amplitude~eventCallback} opt_callback - (optional) a callback function to run after the event is logged.\n * Note: the server response code and response body from the event upload are passed to the callback function.\n * @param {Amplitude~eventCallback} opt_error_callback - (optional) a callback function to run after the event logging\n * fails. The failure can be from the request being malformed or from a network failure\n * Note: the server response code and response body from the event upload are passed to the callback function.\n * @param {boolean} outOfSession - (optional) if out of the sessioin or not\n * @example amplitudeClient.logEventWithTimestamp('Clicked Homepage Button', {'finished_flow': false, 'clicks': 15}, Date.now());\n */\nAmplitudeClient.prototype.logEventWithTimestamp = function logEvent(eventType, eventProperties, timestamp, opt_callback, opt_error_callback) {\n var outOfSession = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;\n if (this._shouldDeferCall()) {\n return this._q.push(['logEventWithTimestamp'].concat(Array.prototype.slice.call(arguments, 0)));\n }\n if (!this._apiKeySet('logEvent()')) {\n _logErrorsWithCallbacks(opt_callback, opt_error_callback, 0, 'No request sent', {\n reason: 'API key not set'\n });\n return -1;\n }\n if (!utils.validateInput(eventType, 'eventType', 'string')) {\n _logErrorsWithCallbacks(opt_callback, opt_error_callback, 0, 'No request sent', {\n reason: 'Invalid type for eventType'\n });\n return -1;\n }\n if (utils.isEmptyString(eventType)) {\n _logErrorsWithCallbacks(opt_callback, opt_error_callback, 0, 'No request sent', {\n reason: 'Missing eventType'\n });\n return -1;\n }\n if (!utils.validateInput(outOfSession, 'outOfSession', 'boolean')) {\n _logErrorsWithCallbacks(opt_callback, opt_error_callback, 0, 'No request sent', {\n reason: 'Invalid outOfSession value'\n });\n }\n return this._logEvent(eventType, eventProperties, null, null, null, null, timestamp, opt_callback, opt_error_callback, outOfSession);\n};\n\n/**\n * Log an event with eventType, eventProperties, and groups. Use this to set event-level groups.\n * Note: the group(s) set only apply for the specific event type being logged and does not persist on the user\n * (unless you explicitly set it with setGroup).\n *\n * See the [advanced topics article](https://developers.amplitude.com/docs/javascript#user-groups) for more information\n * about groups and Count by Distinct on the Amplitude platform.\n * @public\n * @param {string} eventType - name of event\n * @param {object} eventProperties - (optional) an object with string keys and values for the event properties.\n * @param {object} groups - (optional) an object with string groupType: groupName values for the event being logged.\n * groupName can be a string or an array of strings.\n * @param {Amplitude~eventCallback} opt_callback - (optional) a callback function to run after the event is logged.\n * Note: the server response code and response body from the event upload are passed to the callback function.\n * @param {Amplitude~eventCallback} opt_error_callback - (optional) a callback function to run after the event logging\n * fails. The failure can be from the request being malformed or from a network failure\n * Note: the server response code and response body from the event upload are passed to the callback function.\n * @example amplitudeClient.logEventWithGroups('Clicked Button', null, {'orgId': 24});\n */\nAmplitudeClient.prototype.logEventWithGroups = function (eventType, eventProperties, groups, opt_callback, opt_error_callback) {\n var outOfSession = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;\n if (this._shouldDeferCall()) {\n return this._q.push(['logEventWithGroups'].concat(Array.prototype.slice.call(arguments, 0)));\n }\n if (!this._apiKeySet('logEventWithGroups()')) {\n _logErrorsWithCallbacks(event.callback, event.errorCallback, 0, 'No request sent', {\n reason: 'API key not set'\n });\n return -1;\n }\n if (!utils.validateInput(eventType, 'eventType', 'string')) {\n _logErrorsWithCallbacks(event.callback, event.errorCallback, 0, 'No request sent', {\n reason: 'Invalid type for eventType'\n });\n return -1;\n }\n if (!utils.validateInput(outOfSession, 'outOfSession', 'boolean')) {\n _logErrorsWithCallbacks(event.callback, event.errorCallback, 0, 'No request sent', {\n reason: 'Invalid outOfSession value'\n });\n }\n return this._logEvent(eventType, eventProperties, null, null, groups, null, null, opt_callback, opt_error_callback, outOfSession);\n};\n\n/**\n * Test that n is a number or a numeric value.\n * @private\n */\nvar _isNumber = function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n};\n\n/**\n * Handles errors that are sent to both callbacks\n * @private\n */\nvar _logErrorsWithCallbacks = function _logErrorsWithCallbacks(opt_callback, opt_error_callback, status, response, details) {\n if (type(opt_callback) === 'function') {\n opt_callback(status, response, details);\n }\n if (type(opt_error_callback) === 'function') {\n opt_error_callback(status, response, details);\n }\n};\n\n/**\n * Log revenue with Revenue interface. The new revenue interface allows for more revenue fields like\n * revenueType and event properties.\n *\n * See the [Revenue](https://amplitude.github.io/Amplitude-JavaScript/Revenue/)\n * reference page for more information on the Revenue interface and logging revenue.\n * @public\n * @param {Revenue} revenue_obj - the revenue object containing the revenue data being logged.\n * @example var revenue = new amplitude.Revenue().setProductId('productIdentifier').setPrice(10.99);\n * amplitude.logRevenueV2(revenue);\n */\nAmplitudeClient.prototype.logRevenueV2 = function logRevenueV2(revenue_obj) {\n if (this._shouldDeferCall()) {\n return this._q.push(['logRevenueV2'].concat(Array.prototype.slice.call(arguments, 0)));\n }\n if (!this._apiKeySet('logRevenueV2()')) {\n return;\n }\n\n // if revenue input is a proxied object created by the async loading snippet, convert it into an revenue object\n if (type(revenue_obj) === 'object' && Object.prototype.hasOwnProperty.call(revenue_obj, '_q')) {\n revenue_obj = _convertProxyObjectToRealObject(new Revenue(), revenue_obj);\n }\n if (revenue_obj instanceof Revenue) {\n // only send if revenue is valid\n if (revenue_obj && revenue_obj._isValidRevenue()) {\n return this.logEvent(Constants.REVENUE_EVENT, revenue_obj._toJSONObject());\n }\n } else {\n utils.log.error('Invalid revenue input type. Expected Revenue object but saw ' + type(revenue_obj));\n }\n};\n{\n /**\n * Log revenue event with a price, quantity, and product identifier. DEPRECATED - use logRevenueV2\n * @public\n * @deprecated\n * @param {number} price - price of revenue event\n * @param {number} quantity - (optional) quantity of products in revenue event. If no quantity specified default to 1.\n * @param {string} product - (optional) product identifier\n * @example amplitudeClient.logRevenue(3.99, 1, 'product_1234');\n */\n AmplitudeClient.prototype.logRevenue = function logRevenue(price, quantity, product) {\n if (this._shouldDeferCall()) {\n return this._q.push(['logRevenue'].concat(Array.prototype.slice.call(arguments, 0)));\n }\n\n // Test that the parameters are of the right type.\n if (!this._apiKeySet('logRevenue()') || !_isNumber(price) || quantity !== undefined && !_isNumber(quantity)) {\n // utils.log('Price and quantity arguments to logRevenue must be numbers');\n return -1;\n }\n return this._logEvent(Constants.REVENUE_EVENT, {}, {\n productId: product,\n special: 'revenue_amount',\n quantity: quantity || 1,\n price: price\n }, null, null, null, null, null);\n };\n}\n\n/**\n * Calls error callback on unsent events\n * @private\n */\nAmplitudeClient.prototype._logErrorsOnEvents = function _logErrorsOnEvents(maxEventId, maxIdentifyId, status, response) {\n var queues = ['_unsentEvents', '_unsentIdentifys'];\n for (var j = 0; j < queues.length; j++) {\n var queue = queues[j];\n var maxId = queue === '_unsentEvents' ? maxEventId : maxIdentifyId;\n for (var i = 0; i < this[queue].length || 0; i++) {\n var unsentEvent = this[queue][i];\n if (unsentEvent.event.event_id <= maxId) {\n if (unsentEvent.errorCallback) {\n unsentEvent.errorCallback(status, response);\n }\n }\n }\n }\n};\n\n/**\n * Remove events in storage with event ids up to and including maxEventId.\n * @private\n */\nAmplitudeClient.prototype.removeEvents = function removeEvents(maxEventId, maxIdentifyId, status, response) {\n _removeEvents(this, '_unsentEvents', maxEventId, status, response);\n _removeEvents(this, '_unsentIdentifys', maxIdentifyId, status, response);\n};\n\n/**\n * Helper function to remove events up to maxId from a single queue.\n * Does a true filter in case events get out of order or old events are removed.\n * @private\n */\nvar _removeEvents = function _removeEvents(scope, eventQueue, maxId, status, response) {\n if (maxId < 0) {\n return;\n }\n var filteredEvents = [];\n for (var i = 0; i < scope[eventQueue].length || 0; i++) {\n var unsentEvent = scope[eventQueue][i];\n if (unsentEvent.event.event_id > maxId) {\n filteredEvents.push(unsentEvent);\n } else {\n if (unsentEvent.callback) {\n unsentEvent.callback(status, response);\n }\n }\n }\n scope[eventQueue] = filteredEvents;\n};\n\n/**\n * Send unsent events. Note: this is called automatically after events are logged if option batchEvents is false.\n * If batchEvents is true, then events are only sent when batch criterias are met.\n * @private\n */\nAmplitudeClient.prototype.sendEvents = function sendEvents() {\n if (!this._apiKeySet('sendEvents()')) {\n this.removeEvents(Infinity, Infinity, 0, 'No request sent', {\n reason: 'API key not set'\n });\n return;\n }\n if (this.options.optOut) {\n this.removeEvents(Infinity, Infinity, 0, 'No request sent', {\n reason: 'Opt out is set to true'\n });\n return;\n }\n\n // How is it possible to get into this state?\n if (this._unsentCount() === 0) {\n return;\n }\n\n // We only make one request at a time. sendEvents will be invoked again once\n // the last request completes.\n // beacon data is sent synchronously, so don't pause for it\n if (this.options.transport !== Constants.TRANSPORT_BEACON) {\n if (this._sending) {\n return;\n }\n this._sending = true;\n }\n var protocol = this.options.forceHttps ? 'https' : 'https:' === GlobalScope.location.protocol ? 'https' : 'http';\n var url = protocol + '://' + this.options.apiEndpoint;\n\n // fetch events to send\n var numEvents = Math.min(this._unsentCount(), this.options.uploadBatchSize);\n var mergedEvents = this._mergeEventsAndIdentifys(numEvents);\n var maxEventId = mergedEvents.maxEventId;\n var maxIdentifyId = mergedEvents.maxIdentifyId;\n var events = JSON.stringify(mergedEvents.eventsToSend.map(function (_ref2) {\n var event = _ref2.event;\n return event;\n }));\n var uploadTime = new Date().getTime();\n var data = {\n client: this.options.apiKey,\n e: events,\n v: Constants.API_VERSION,\n upload_time: uploadTime,\n checksum: md5(Constants.API_VERSION + this.options.apiKey + events + uploadTime)\n };\n if (this.options.transport === Constants.TRANSPORT_BEACON && typeof navigator !== 'undefined') {\n var success = navigator.sendBeacon(url, new URLSearchParams(data));\n if (success) {\n this.removeEvents(maxEventId, maxIdentifyId, 200, 'success');\n if (this.options.saveEvents) {\n this.saveEvents();\n }\n } else {\n this._logErrorsOnEvents(maxEventId, maxIdentifyId, 0, '');\n }\n return;\n }\n var scope = this;\n try {\n new Request(url, data, this.options.headers).send(function (status, response) {\n scope._sending = false;\n try {\n if (status === 200) {\n scope.removeEvents(maxEventId, maxIdentifyId, status, response);\n\n // Update the event cache after the removal of sent events.\n if (scope.options.saveEvents) {\n scope.saveEvents();\n }\n\n // Send more events if any queued during previous send.\n scope._sendEventsIfReady();\n\n // handle payload too large\n } else {\n scope._logErrorsOnEvents(maxEventId, maxIdentifyId, status, response);\n if (status === 413) {\n // utils.log('request too large');\n // Can't even get this one massive event through. Drop it, even if it is an identify.\n if (scope.options.uploadBatchSize === 1) {\n scope.removeEvents(maxEventId, maxIdentifyId, status, response);\n }\n\n // The server complained about the length of the request. Backoff and try again.\n scope.options.uploadBatchSize = Math.ceil(numEvents / 2);\n scope.sendEvents();\n }\n }\n // else {\n // all the events are still queued, and will be retried when the next\n // event is sent In the interest of debugging, it would be nice to have\n // something like an event emitter for a better debugging experince\n // here.\n // }\n } catch (e) {\n // utils.log.error('failed upload');\n }\n });\n } catch (e) {\n var status = 0,\n response = 'Request failed to send';\n utils.log.error(response);\n scope._logErrorsOnEvents(maxEventId, maxIdentifyId, status, response);\n scope.removeEvents(maxEventId, maxIdentifyId, status, response, {\n reason: e.message\n });\n }\n};\n\n/**\n * Merge unsent events and identifys together in sequential order based on their sequence number, for uploading.\n * Identifys given higher priority than Events. Also earlier sequence given priority\n * @private\n */\nAmplitudeClient.prototype._mergeEventsAndIdentifys = function _mergeEventsAndIdentifys(numEvents) {\n // coalesce events from both queues\n var eventsToSend = [];\n var eventIndex = 0;\n var maxEventId = -1;\n var identifyIndex = 0;\n var maxIdentifyId = -1;\n while (eventsToSend.length < numEvents) {\n var unsentEvent = void 0;\n var noIdentifys = identifyIndex >= this._unsentIdentifys.length;\n var noEvents = eventIndex >= this._unsentEvents.length;\n\n // case 0: no events or identifys left\n // note this should not happen, this means we have less events and identifys than expected\n if (noEvents && noIdentifys) {\n utils.log.error('Merging Events and Identifys, less events and identifys than expected');\n break;\n }\n\n // case 1: no identifys - grab from events\n else if (noIdentifys) {\n unsentEvent = this._unsentEvents[eventIndex++];\n maxEventId = unsentEvent.event.event_id;\n\n // case 2: no events - grab from identifys\n } else if (noEvents) {\n unsentEvent = this._unsentIdentifys[identifyIndex++];\n maxIdentifyId = unsentEvent.event.event_id;\n\n // case 3: need to compare sequence numbers\n } else {\n // events logged before v2.5.0 won't have a sequence number, put those first\n if (!('sequence_number' in this._unsentEvents[eventIndex].event) || this._unsentEvents[eventIndex].event.sequence_number < this._unsentIdentifys[identifyIndex].event.sequence_number) {\n unsentEvent = this._unsentEvents[eventIndex++];\n maxEventId = unsentEvent.event.event_id;\n } else {\n unsentEvent = this._unsentIdentifys[identifyIndex++];\n maxIdentifyId = unsentEvent.event.event_id;\n }\n }\n eventsToSend.push(unsentEvent);\n }\n return {\n eventsToSend: eventsToSend,\n maxEventId: maxEventId,\n maxIdentifyId: maxIdentifyId\n };\n};\n{\n /**\n * Set global user properties. Note this is deprecated, and we recommend using setUserProperties\n * @public\n * @deprecated\n */\n AmplitudeClient.prototype.setGlobalUserProperties = function setGlobalUserProperties(userProperties) {\n this.setUserProperties(userProperties);\n };\n}\n\n/**\n * Get the current version of Amplitude's Javascript SDK.\n * @public\n * @returns {number} version number\n * @example var amplitudeVersion = amplitude.__VERSION__;\n */\nAmplitudeClient.prototype.__VERSION__ = function getVersion() {\n return this.options.library.version;\n};\n\n/**\n * Sets the library name and version. Default is `amplitude-js` and the version defined in package.json. Used if you're building another library on top of amplitude-js and want a custom data source value\n * @public\n * @param {string} name - Custom library name\n * @param {string} version - Custom library version\n */\nAmplitudeClient.prototype.setLibrary = function setLibrary(name, version) {\n if (name !== null && typeof name !== 'undefined') {\n this.options.library.name = name;\n }\n if (version !== null && typeof version !== 'undefined') {\n this.options.library.version = version;\n }\n};\n\n/**\n * Determines whether or not to push call to this._q or invoke it\n * @private\n */\nAmplitudeClient.prototype._shouldDeferCall = function _shouldDeferCall() {\n return this._pendingReadStorage || this._initializationDeferred;\n};\n\n/**\n * Defers Initialization by putting all functions into storage until users\n * have accepted terms for tracking\n * @private\n */\nAmplitudeClient.prototype._deferInitialization = function _deferInitialization() {\n this._initializationDeferred = true;\n this._q.push(['init'].concat(Array.prototype.slice.call(arguments, 0)));\n};\n\n/**\n * Enable tracking via logging events and dropping a cookie\n * Intended to be used with the deferInitialization configuration flag\n * This will drop a cookie and reset initialization deferred\n * @public\n */\nAmplitudeClient.prototype.enableTracking = function enableTracking() {\n // This will call init (which drops the cookie) and will run any pending tasks\n this._initializationDeferred = false;\n _saveCookieData(this);\n this.runQueuedFunctions();\n};\n\n/**\n * Find best server url if choose to enable dynamic configuration.\n */\nAmplitudeClient.prototype._refreshDynamicConfig = function _refreshDynamicConfig() {\n if (this.options.useDynamicConfig) {\n instance$1.refresh(this.options.serverZone, this.options.forceHttps, function () {\n this.options.apiEndpoint = instance$1.ingestionEndpoint;\n }.bind(this));\n }\n};\n\n/**\n * Returns the deviceId value.\n * @public\n * @return {string} Id of current device.\n */\nAmplitudeClient.prototype.getDeviceId = function getDeviceId() {\n return this.options.deviceId;\n};\n\n/**\n * Returns the userId.\n * @public\n * @return {string} Id of current user.\n */\nAmplitudeClient.prototype.getUserId = function getUserId() {\n return this.options.userId;\n};\n\n/**\n * Set a custom session expiration time.\n * @public\n * @param {number} timeInMillis - session expireation time in milliseconds.\n */\nAmplitudeClient.prototype.setMinTimeBetweenSessionsMillis = function setMinTimeBetweenSessionsMillis(timeInMillis) {\n if (!utils.validateInput(timeInMillis, 'timeInMillis', 'number')) {\n return;\n }\n if (this._shouldDeferCall()) {\n return this._q.push(['setMinTimeBetweenSessionsMillis'].concat(Array.prototype.slice.call(arguments, 0)));\n }\n try {\n this.options.sessionTimeout = timeInMillis;\n } catch (e) {\n utils.log.error(e);\n }\n};\n\n/**\n * Sets minimum number of events to batch together per request if batchEvents is true.\n * @public\n * @param {number} eventUploadThreshold - The number of the event upload threshold. Default value is 30.\n * @example amplitudeClient.setEventUploadThreshold(10);\n */\nAmplitudeClient.prototype.setEventUploadThreshold = function setEventUploadThreshold(eventUploadThreshold) {\n if (!utils.validateInput(eventUploadThreshold, 'eventUploadThreshold', 'number')) {\n return;\n }\n if (this._shouldDeferCall()) {\n return this._q.push(['setEventUploadThreshold'].concat(Array.prototype.slice.call(arguments, 0)));\n }\n try {\n this.options.eventUploadThreshold = eventUploadThreshold;\n } catch (e) {\n utils.log.error(e);\n }\n};\n\n/**\n * Dynamically adjust server URL\n * @public\n * @param {bool} useDynamicConfig - if enable dynamic config or not.\n * @example amplitudeClient.setUseDynamicConfig(true);\n */\nAmplitudeClient.prototype.setUseDynamicConfig = function setUseDynamicConfig(useDynamicConfig) {\n if (!utils.validateInput(useDynamicConfig, 'useDynamicConfig', 'boolean')) {\n return;\n }\n if (this._shouldDeferCall()) {\n return this._q.push(['setUseDynamicConfig'].concat(Array.prototype.slice.call(arguments, 0)));\n }\n try {\n this.options.useDynamicConfig = useDynamicConfig;\n this._refreshDynamicConfig();\n } catch (e) {\n utils.log.error(e);\n }\n};\n\n/**\n * Sets the server zone, used for server api endpoint and dynamic configuration.\n * @public\n * @param {string} serverZone - the server zone value. AmplitudeServerZone.US or AmplitudeServerZone.EU.\n * @param {bool} serverZoneBasedApi - (optional) update api endpoint with serverZone change or not. For data residency, recommend to enable it unless using own proxy server.\n * @example amplitudeClient.setServerZone(AmplitudeServerZone.EU, true);\n */\nAmplitudeClient.prototype.setServerZone = function setServerZone(serverZone) {\n var serverZoneBasedApi = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (serverZone !== AmplitudeServerZone.EU && serverZone !== AmplitudeServerZone.US || !utils.validateInput(serverZoneBasedApi, 'serverZoneBasedApi', 'boolean')) {\n return;\n }\n if (this._shouldDeferCall()) {\n return this._q.push(['setServerZone'].concat(Array.prototype.slice.call(arguments, 0)));\n }\n try {\n this.options.serverZone = serverZone;\n this.options.serverZoneBasedApi = serverZoneBasedApi;\n if (serverZoneBasedApi) {\n this.options.apiEndpoint = getEventLogApi(this.options.serverZone);\n }\n } catch (e) {\n utils.log.error(e);\n }\n};\n\n/**\n * Sets the server URL for the request.\n * @public\n * @param {string} serverUrl - The value of the server URL.\n * @example amplitudeClient.setServerUrl('api.amplitude.com');\n */\nAmplitudeClient.prototype.setServerUrl = function setServerUrl(serverUrl) {\n if (!utils.validateInput(serverUrl, 'serverUrl', 'string')) {\n return;\n }\n if (this._shouldDeferCall()) {\n return this._q.push(['setServerUrl'].concat(Array.prototype.slice.call(arguments, 0)));\n }\n try {\n this.options.apiEndpoint = serverUrl;\n } catch (e) {\n utils.log.error(e);\n }\n};\n\n/**\n * Deprecated legacy API of the Amplitude JS SDK - instance manager.\n *\n * Wraps around the current [AmplitudeClient](https://amplitude.github.io/Amplitude-JavaScript/) which provides more features\n * Function calls directly on amplitude have been deprecated. Please call methods on the default shared instance: amplitude.getInstance() instead.\n *\n * See the [3.0.0 changelog](https://github.com/amplitude/Amplitude-JavaScript/blob/ed405afb5f06d5cf5b72539a5d09179abcf7e1fe/README.md#300-update-and-logging-events-to-multiple-amplitude-apps) for more information about this change.\n * @constructor Amplitude\n * @public\n * @deprecated\n * @example var amplitude = new Amplitude();\n */\nvar Amplitude = function Amplitude() {\n this.options = _objectSpread2({}, DEFAULT_OPTIONS);\n this._q = [];\n this._instances = {}; // mapping of instance names to instances\n};\n\nAmplitude.prototype.Identify = Identify;\nAmplitude.prototype.Revenue = Revenue;\nAmplitude.prototype.getInstance = function getInstance(instance) {\n instance = utils.isEmptyString(instance) ? Constants.DEFAULT_INSTANCE : instance.toLowerCase();\n var client = this._instances[instance];\n if (client === undefined) {\n client = new AmplitudeClient(instance);\n this._instances[instance] = client;\n }\n return client;\n};\n{\n /**\n * Initializes the Amplitude Javascript SDK with your apiKey and any optional configurations.\n * This is required before any other methods can be called.\n * @public\n * @param {string} apiKey - The API key for your app.\n * @param {string} opt_userId - (optional) An identifier for this user.\n * @param {object} opt_config - (optional) Configuration options.\n * See [options.js](https://github.com/amplitude/Amplitude-JavaScript/blob/master/src/options.js#L14) for list of options and default values.\n * @param {function} opt_callback - (optional) Provide a callback function to run after initialization is complete.\n * @deprecated Please use amplitude.getInstance().init(apiKey, opt_userId, opt_config, opt_callback);\n * @example amplitude.init('API_KEY', 'USER_ID', {includeReferrer: true, includeUtm: true}, function() { alert('init complete'); });\n */\n Amplitude.prototype.init = function init(apiKey, opt_userId, opt_config, opt_callback) {\n this.getInstance().init(apiKey, opt_userId, opt_config, function (instance) {\n // make options such as deviceId available for callback functions\n this.options = instance.options;\n if (type(opt_callback) === 'function') {\n opt_callback(instance);\n }\n }.bind(this));\n };\n\n /**\n * Returns true if a new session was created during initialization, otherwise false.\n * @public\n * @return {boolean} Whether a new session was created during initialization.\n * @deprecated Please use amplitude.getInstance().isNewSession();\n */\n Amplitude.prototype.isNewSession = function isNewSession() {\n return this.getInstance().isNewSession();\n };\n\n /**\n * Returns the id of the current session.\n * @public\n * @return {number} Id of the current session.\n * @deprecated Please use amplitude.getInstance().getSessionId();\n */\n Amplitude.prototype.getSessionId = function getSessionId() {\n return this.getInstance().getSessionId();\n };\n\n /**\n * Increments the eventId and returns it.\n * @private\n */\n Amplitude.prototype.nextEventId = function nextEventId() {\n return this.getInstance().nextEventId();\n };\n\n /**\n * Increments the identifyId and returns it.\n * @private\n */\n Amplitude.prototype.nextIdentifyId = function nextIdentifyId() {\n return this.getInstance().nextIdentifyId();\n };\n\n /**\n * Increments the sequenceNumber and returns it.\n * @private\n */\n Amplitude.prototype.nextSequenceNumber = function nextSequenceNumber() {\n return this.getInstance().nextSequenceNumber();\n };\n\n /**\n * Saves unsent events and identifies to localStorage. JSON stringifies event queues before saving.\n * Note: this is called automatically every time events are logged, unless you explicitly set option saveEvents to false.\n * @private\n */\n Amplitude.prototype.saveEvents = function saveEvents() {\n this.getInstance().saveEvents();\n };\n\n /**\n * Sets a customer domain for the amplitude cookie. Useful if you want to support cross-subdomain tracking.\n * @public\n * @param {string} domain to set.\n * @deprecated Please use amplitude.getInstance().setDomain(domain);\n * @example amplitude.setDomain('.amplitude.com');\n */\n Amplitude.prototype.setDomain = function setDomain(domain) {\n this.getInstance().setDomain(domain);\n };\n\n /**\n * Sets an identifier for the current user.\n * @public\n * @param {string} userId - identifier to set. Can be null.\n * @deprecated Please use amplitude.getInstance().setUserId(userId);\n * @example amplitude.setUserId('joe@gmail.com');\n */\n Amplitude.prototype.setUserId = function setUserId(userId) {\n this.getInstance().setUserId(userId);\n };\n\n /**\n * Add user to a group or groups. You need to specify a groupType and groupName(s).\n * For example you can group people by their organization.\n * In that case groupType is \"orgId\" and groupName would be the actual ID(s).\n * groupName can be a string or an array of strings to indicate a user in multiple gruups.\n * You can also call setGroup multiple times with different groupTypes to track multiple types of groups (up to 5 per app).\n * Note: this will also set groupType: groupName as a user property.\n * See the [advanced topics article](https://developers.amplitude.com/docs/javascript#user-groups) for more information.\n * @public\n * @param {string} groupType - the group type (ex: orgId)\n * @param {string|list} groupName - the name of the group (ex: 15), or a list of names of the groups\n * @deprecated Please use amplitude.getInstance().setGroup(groupType, groupName);\n * @example amplitude.setGroup('orgId', 15); // this adds the current user to orgId 15.\n */\n Amplitude.prototype.setGroup = function (groupType, groupName) {\n this.getInstance().setGroup(groupType, groupName);\n };\n\n /**\n * Sets whether to opt current user out of tracking.\n * @public\n * @param {boolean} enable - if true then no events will be logged or sent.\n * @deprecated Please use amplitude.getInstance().setOptOut(enable);\n * @example: amplitude.setOptOut(true);\n */\n Amplitude.prototype.setOptOut = function setOptOut(enable) {\n this.getInstance().setOptOut(enable);\n };\n\n /**\n * Regenerates a new random deviceId for current user. Note: this is not recommended unless you know what you\n * are doing. This can be used in conjunction with `setUserId(null)` to anonymize users after they log out.\n * With a null userId and a completely new deviceId, the current user would appear as a brand new user in dashboard.\n * This uses src/uuid.js to regenerate the deviceId.\n * @public\n * @deprecated Please use amplitude.getInstance().regenerateDeviceId();\n */\n Amplitude.prototype.regenerateDeviceId = function regenerateDeviceId() {\n this.getInstance().regenerateDeviceId();\n };\n\n /**\n * Sets a custom deviceId for current user. Note: this is not recommended unless you know what you are doing\n * (like if you have your own system for managing deviceIds).\n *\n * Make sure the deviceId you set is sufficiently unique\n * (we recommend something like a UUID - see src/uuid.js for an example of how to generate) to prevent conflicts with other devices in our system.\n * @public\n * @param {string} deviceId - custom deviceId for current user.\n * @deprecated Please use amplitude.getInstance().setDeviceId(deviceId);\n * @example amplitude.setDeviceId('45f0954f-eb79-4463-ac8a-233a6f45a8f0');\n */\n Amplitude.prototype.setDeviceId = function setDeviceId(deviceId) {\n this.getInstance().setDeviceId(deviceId);\n };\n\n /**\n * Sets user properties for the current user.\n * @public\n * @param {object} userProperties - object with string keys and values for the user properties to set.\n * @param {boolean} opt_replace - Deprecated. In earlier versions of the JS SDK the user properties object was kept in\n * memory and replace = true would replace the object in memory. Now the properties are no longer stored in memory, so replace is deprecated.\n * @deprecated Please use amplitude.getInstance().setUserProperties(userProperties);\n * @example amplitude.setUserProperties({'gender': 'female', 'sign_up_complete': true})\n */\n Amplitude.prototype.setUserProperties = function setUserProperties(userProperties) {\n this.getInstance().setUserProperties(userProperties);\n };\n\n /**\n * Clear all of the user properties for the current user. Note: clearing user properties is irreversible!\n * @public\n * @deprecated Please use amplitude.getInstance().clearUserProperties();\n * @example amplitude.clearUserProperties();\n */\n Amplitude.prototype.clearUserProperties = function clearUserProperties() {\n this.getInstance().clearUserProperties();\n };\n\n /**\n * Send an identify call containing user property operations to Amplitude servers.\n * See the [Identify](https://amplitude.github.io/Amplitude-JavaScript/Identify/)\n * reference page for more information on the Identify API and user property operations.\n * @param {Identify} identify_obj - the Identify object containing the user property operations to send.\n * @param {Amplitude~eventCallback} opt_callback - (optional) callback function to run when the identify event has been sent.\n * Note: the server response code and response body from the identify event upload are passed to the callback function.\n * @deprecated Please use amplitude.getInstance().identify(identify);\n * @example\n * var identify = new amplitude.Identify().set('colors', ['rose', 'gold']).add('karma', 1).setOnce('sign_up_date', '2016-03-31');\n * amplitude.identify(identify);\n */\n Amplitude.prototype.identify = function (identify_obj, opt_callback) {\n this.getInstance().identify(identify_obj, opt_callback);\n };\n\n /**\n * Set a versionName for your application.\n * @public\n * @param {string} versionName - The version to set for your application.\n * @deprecated Please use amplitude.getInstance().setVersionName(versionName);\n * @example amplitude.setVersionName('1.12.3');\n */\n Amplitude.prototype.setVersionName = function setVersionName(versionName) {\n this.getInstance().setVersionName(versionName);\n };\n\n /**\n * This is the callback for logEvent and identify calls. It gets called after the event/identify is uploaded,\n * and the server response code and response body from the upload request are passed to the callback function.\n * @callback Amplitude~eventCallback\n * @param {number} responseCode - Server response code for the event / identify upload request.\n * @param {string} responseBody - Server response body for the event / identify upload request.\n */\n\n /**\n * Log an event with eventType and eventProperties\n * @public\n * @param {string} eventType - name of event\n * @param {object} eventProperties - (optional) an object with string keys and values for the event properties.\n * @param {Amplitude~eventCallback} opt_callback - (optional) a callback function to run after the event is logged.\n * Note: the server response code and response body from the event upload are passed to the callback function.\n * @deprecated Please use amplitude.getInstance().logEvent(eventType, eventProperties, opt_callback);\n * @example amplitude.logEvent('Clicked Homepage Button', {'finished_flow': false, 'clicks': 15});\n */\n Amplitude.prototype.logEvent = function logEvent(eventType, eventProperties, opt_callback) {\n return this.getInstance().logEvent(eventType, eventProperties, opt_callback);\n };\n\n /**\n * Log an event with eventType, eventProperties, and groups. Use this to set event-level groups.\n *\n * Note: the group(s) set only apply for the specific event type being logged and does not persist on the user\n * (unless you explicitly set it with setGroup).\n *\n * See the [advanced topics article](https://developers.amplitude.com/docs/javascript#user-groups) for more information\n * about groups and Count by Distinct on the Amplitude platform.\n * @public\n * @param {string} eventType - name of event\n * @param {object} eventProperties - (optional) an object with string keys and values for the event properties.\n * @param {object} groups - (optional) an object with string groupType: groupName values for the event being logged.\n * groupName can be a string or an array of strings.\n * @param {Amplitude~eventCallback} opt_callback - (optional) a callback function to run after the event is logged.\n * Note: the server response code and response body from the event upload are passed to the callback function.\n * @deprecated Please use amplitude.getInstance().logEventWithGroups(eventType, eventProperties, groups, opt_callback);\n * @example amplitude.logEventWithGroups('Clicked Button', null, {'orgId': 24});\n */\n Amplitude.prototype.logEventWithGroups = function (eventType, eventProperties, groups, opt_callback) {\n return this.getInstance().logEventWithGroups(eventType, eventProperties, groups, opt_callback);\n };\n\n /**\n * Log revenue with Revenue interface. The new revenue interface allows for more revenue fields like\n * revenueType and event properties.\n *\n * See the [Revenue](https://amplitude.github.io/Amplitude-JavaScript/Revenue/)\n * reference page for more information on the Revenue interface and logging revenue.\n * @public\n * @param {Revenue} revenue_obj - the revenue object containing the revenue data being logged.\n * @deprecated Please use amplitude.getInstance().logRevenueV2(revenue_obj);\n * @example var revenue = new amplitude.Revenue().setProductId('productIdentifier').setPrice(10.99);\n * amplitude.logRevenueV2(revenue);\n */\n Amplitude.prototype.logRevenueV2 = function logRevenueV2(revenue_obj) {\n return this.getInstance().logRevenueV2(revenue_obj);\n };\n\n /**\n * Log revenue event with a price, quantity, and product identifier.\n * @public\n * @param {number} price - price of revenue event\n * @param {number} quantity - (optional) quantity of products in revenue event. If no quantity specified default to 1.\n * @param {string} product - (optional) product identifier\n * @deprecated Please use amplitude.getInstance().logRevenueV2(revenue_obj);\n * @example amplitude.logRevenue(3.99, 1, 'product_1234');\n */\n Amplitude.prototype.logRevenue = function logRevenue(price, quantity, product) {\n return this.getInstance().logRevenue(price, quantity, product);\n };\n\n /**\n * Remove events in storage with event ids up to and including maxEventId.\n * @private\n */\n Amplitude.prototype.removeEvents = function removeEvents(maxEventId, maxIdentifyId) {\n this.getInstance().removeEvents(maxEventId, maxIdentifyId);\n };\n\n /**\n * Send unsent events. Note: this is called automatically after events are logged if option batchEvents is false.\n * If batchEvents is true, then events are only sent when batch criterias are met.\n * @private\n * @param {Amplitude~eventCallback} callback - (optional) callback to run after events are sent.\n * Note the server response code and response body are passed to the callback as input arguments.\n */\n Amplitude.prototype.sendEvents = function sendEvents(callback) {\n this.getInstance().sendEvents(callback);\n };\n\n /**\n * Set global user properties.\n * @public\n * @deprecated Please use amplitudeClient.setUserProperties\n */\n Amplitude.prototype.setGlobalUserProperties = function setGlobalUserProperties(userProperties) {\n this.getInstance().setUserProperties(userProperties);\n };\n}\n\n/**\n * Get the current version of Amplitude's Javascript SDK.\n * @public\n * @returns {number} version number\n * @example var amplitudeVersion = amplitude.__VERSION__;\n */\nAmplitude.prototype.__VERSION__ = version;\n\n// Entry point\nvar old = typeof GlobalScope !== 'undefined' && GlobalScope.amplitude || {};\nvar newInstance = new Amplitude();\nnewInstance._q = old._q || [];\n\n/**\n * Instantiates Amplitude object and runs all queued function logged by stubbed methods provided by snippets\n * Event queue allows async loading of SDK to not blocking client's app\n */\nfor (var instance in old._iq) {\n // migrate each instance's queue\n if (Object.prototype.hasOwnProperty.call(old._iq, instance)) {\n newInstance.getInstance(instance)._q = old._iq[instance]._q || [];\n }\n}\n\nexport { newInstance as default };\n","import { Subject } from '../Subject';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function retryWhen(notifier) {\n return operate((source, subscriber) => {\n let innerSub;\n let syncResub = false;\n let errors$;\n const subscribeForRetryWhen = () => {\n innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, (err) => {\n if (!errors$) {\n errors$ = new Subject();\n notifier(errors$).subscribe(createOperatorSubscriber(subscriber, () => innerSub ? subscribeForRetryWhen() : (syncResub = true)));\n }\n if (errors$) {\n errors$.next(err);\n }\n }));\n if (syncResub) {\n innerSub.unsubscribe();\n innerSub = null;\n syncResub = false;\n subscribeForRetryWhen();\n }\n };\n subscribeForRetryWhen();\n });\n}\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\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;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\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\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n","import { Injectable } from '@angular/core';\nimport {\n AwsApiWrapperService\n} from '@brightside-web/desktop/data-access/core-services';\nimport { from, of, Observable } from 'rxjs';\nimport { switchMap, catchError } from 'rxjs/operators';\nimport {\n ApiCacheService,\n CreditSetupResponse,\n CreditSetupVerifyResponse,\n CreditSetupKbaRequest,\n CreditSetupStatus,\n CreditSetupVerifyStatus, FirebaseService,\n} from '@brightside-web/desktop/data-access/shared';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class CreditSetupService {\n constructor(\n private apiSvc: ApiCacheService,\n private analytics: FirebaseService,\n private awsApiWrapperService: AwsApiWrapperService\n ) {}\n\n static isVerifyOtp(statusCode: CreditSetupStatus): boolean {\n // @ts-ignore\n return [CreditSetupStatus.VERIFY_OTP].includes(statusCode);\n }\n\n static isVerifyKba(statusCode: CreditSetupStatus): boolean {\n // @ts-ignore\n return [CreditSetupStatus.VERIFY_KBA].includes(statusCode);\n }\n\n static isCompleted(statusCode: CreditSetupStatus): boolean {\n // @ts-ignore\n return [CreditSetupStatus.FULFILLED, CreditSetupStatus.VERIFIED, CreditSetupStatus.ENROLLED].includes(statusCode);\n }\n\n public blankPatchToCreditSub(): Promise<CreditSetupResponse> {\n return this.awsApiWrapperService.patch('api-mobile', '/credit/subscription', {\n headers: { 'Content-Type': 'application/json' },\n body: null,\n });\n }\n\n private verifyWithData(body: CreditSetupKbaRequest | { otpCode: string }): Observable<CreditSetupResponse> {\n return from(this.awsApiWrapperService.patch('api-mobile', '/credit/subscription', { headers: { 'Content-Type': 'application/json' }, body }));\n }\n\n private async verifyConfirm(response: CreditSetupResponse, skipForceVerify: boolean = true) {\n let rtnVerifyStatus: CreditSetupVerifyStatus = CreditSetupVerifyStatus.COMPLETE;\n let results;\n\n if (response.reasonCode) {\n this.analytics.logEvent('credit identity api call completed', {code: response.reasonCode});\n }\n\n if (!skipForceVerify && response.statusCode === 200) {\n results = await this.blankPatchToCreditSub();\n\n if (results.statusCode > 299) {\n rtnVerifyStatus = CreditSetupVerifyStatus.COMPLETE_UNCONFIRMED;\n }\n }\n\n //We need to clear mobile cache so the cards will adjust as needed\n this.apiSvc.refreshItem('/client/mobilestate');\n\n return {\n apiResponse: response,\n verifyStatus: rtnVerifyStatus,\n };\n }\n\n VerifyWithOtp(code: string): Observable<CreditSetupVerifyResponse> {\n return this.verifyWithData({ otpCode: code }).pipe(\n switchMap(resp => this.verifyConfirm(resp)),\n catchError((err) => {\n let rtnVerifyStatus: CreditSetupVerifyStatus = CreditSetupVerifyStatus.ERROR_ALLOW_RETRY;\n let rtnApiResponse = null;\n if (err.response.data.reasonCode) {\n this.analytics.logEvent('credit identity api call completed', {code: err.response.data.reasonCode});\n }\n if(err.response.data.statusCode === 429) {\n rtnVerifyStatus = CreditSetupVerifyStatus.ERROR_FATAL;\n rtnApiResponse = {\n ...err.response.data,\n };\n } else if (err.response.data.statusCode === 406) {\n rtnVerifyStatus = CreditSetupVerifyStatus.ERROR_NO_RETRY;\n rtnApiResponse = {\n ...err.response.data,\n };\n }\n\n return of({\n apiResponse: rtnApiResponse,\n verifyStatus: rtnVerifyStatus,\n });\n })\n );\n }\n\n VerifyWithKba(kbaRequest: CreditSetupKbaRequest): Observable<CreditSetupVerifyResponse> {\n return this.verifyWithData(kbaRequest).pipe(\n switchMap(resp => this.verifyConfirm(resp)),\n catchError((err) => {\n let rtnVerifyStatus: CreditSetupVerifyStatus = CreditSetupVerifyStatus.ERROR_ALLOW_RETRY;\n let rtnApiResponse = null;\n if (err.response.data.reasonCode) {\n this.analytics.logEvent('credit identity api call completed', {code: err.response.data.reasonCode});\n }\n if (err.response.data.statusCode === 406) {\n rtnVerifyStatus = CreditSetupVerifyStatus.MORE_INFORMATION;\n rtnApiResponse = {\n ...err.response.data,\n };\n } else if (err.response.data.statusCode === 429) {\n rtnVerifyStatus = CreditSetupVerifyStatus.ERROR_NO_RETRY;\n rtnApiResponse = {\n ...err.response.data,\n }\n }\n\n return of({\n apiResponse: rtnApiResponse,\n verifyStatus: rtnVerifyStatus,\n });\n })\n );\n }\n\n getSetupStatus(): Observable<CreditSetupResponse> {\n return from(\n this.awsApiWrapperService.get('api-mobile', '/credit/subscription')\n );\n }\n\n startSetup(): Observable<CreditSetupResponse> {\n return from(this.awsApiWrapperService.post('api-mobile', '/credit/subscription', { headers: { 'Content-Type': 'application/json' } }));\n }\n}\n","//! moment.js locale configuration\n//! locale : Arabic (Libya) [ar-ly]\n//! author : Ali Hmer: https://github.com/kikoanis\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '1',\n 2: '2',\n 3: '3',\n 4: '4',\n 5: '5',\n 6: '6',\n 7: '7',\n 8: '8',\n 9: '9',\n 0: '0',\n },\n pluralForm = function (n) {\n return n === 0\n ? 0\n : n === 1\n ? 1\n : n === 2\n ? 2\n : n % 100 >= 3 && n % 100 <= 10\n ? 3\n : n % 100 >= 11\n ? 4\n : 5;\n },\n plurals = {\n s: [\n 'أقل من ثانية',\n 'ثانية واحدة',\n ['ثانيتان', 'ثانيتين'],\n '%d ثوان',\n '%d ثانية',\n '%d ثانية',\n ],\n m: [\n 'أقل من دقيقة',\n 'دقيقة واحدة',\n ['دقيقتان', 'دقيقتين'],\n '%d دقائق',\n '%d دقيقة',\n '%d دقيقة',\n ],\n h: [\n 'أقل من ساعة',\n 'ساعة واحدة',\n ['ساعتان', 'ساعتين'],\n '%d ساعات',\n '%d ساعة',\n '%d ساعة',\n ],\n d: [\n 'أقل من يوم',\n 'يوم واحد',\n ['يومان', 'يومين'],\n '%d أيام',\n '%d يومًا',\n '%d يوم',\n ],\n M: [\n 'أقل من شهر',\n 'شهر واحد',\n ['شهران', 'شهرين'],\n '%d أشهر',\n '%d شهرا',\n '%d شهر',\n ],\n y: [\n 'أقل من عام',\n 'عام واحد',\n ['عامان', 'عامين'],\n '%d أعوام',\n '%d عامًا',\n '%d عام',\n ],\n },\n pluralize = function (u) {\n return function (number, withoutSuffix, string, isFuture) {\n var f = pluralForm(number),\n str = plurals[u][pluralForm(number)];\n if (f === 2) {\n str = str[withoutSuffix ? 0 : 1];\n }\n return str.replace(/%d/i, number);\n };\n },\n months = [\n 'يناير',\n 'فبراير',\n 'مارس',\n 'أبريل',\n 'مايو',\n 'يونيو',\n 'يوليو',\n 'أغسطس',\n 'سبتمبر',\n 'أكتوبر',\n 'نوفمبر',\n 'ديسمبر',\n ];\n\n var arLy = moment.defineLocale('ar-ly', {\n months: months,\n monthsShort: months,\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'D/\\u200FM/\\u200FYYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n meridiemParse: /ص|م/,\n isPM: function (input) {\n return 'م' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar: {\n sameDay: '[اليوم عند الساعة] LT',\n nextDay: '[غدًا عند الساعة] LT',\n nextWeek: 'dddd [عند الساعة] LT',\n lastDay: '[أمس عند الساعة] LT',\n lastWeek: 'dddd [عند الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'بعد %s',\n past: 'منذ %s',\n s: pluralize('s'),\n ss: pluralize('s'),\n m: pluralize('m'),\n mm: pluralize('m'),\n h: pluralize('h'),\n hh: pluralize('h'),\n d: pluralize('d'),\n dd: pluralize('d'),\n M: pluralize('M'),\n MM: pluralize('M'),\n y: pluralize('y'),\n yy: pluralize('y'),\n },\n preparse: function (string) {\n return string.replace(/،/g, ',');\n },\n postformat: function (string) {\n return string\n .replace(/\\d/g, function (match) {\n return symbolMap[match];\n })\n .replace(/,/g, '،');\n },\n week: {\n dow: 6, // Saturday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return arLy;\n\n})));\n","//! moment.js locale configuration\n//! locale : Icelandic [is]\n//! author : Hinrik Örn Sigurðsson : https://github.com/hinrik\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function plural(n) {\n if (n % 100 === 11) {\n return true;\n } else if (n % 10 === 1) {\n return false;\n }\n return true;\n }\n function translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nokkrar sekúndur'\n : 'nokkrum sekúndum';\n case 'ss':\n if (plural(number)) {\n return (\n result +\n (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum')\n );\n }\n return result + 'sekúnda';\n case 'm':\n return withoutSuffix ? 'mínúta' : 'mínútu';\n case 'mm':\n if (plural(number)) {\n return (\n result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum')\n );\n } else if (withoutSuffix) {\n return result + 'mínúta';\n }\n return result + 'mínútu';\n case 'hh':\n if (plural(number)) {\n return (\n result +\n (withoutSuffix || isFuture\n ? 'klukkustundir'\n : 'klukkustundum')\n );\n }\n return result + 'klukkustund';\n case 'd':\n if (withoutSuffix) {\n return 'dagur';\n }\n return isFuture ? 'dag' : 'degi';\n case 'dd':\n if (plural(number)) {\n if (withoutSuffix) {\n return result + 'dagar';\n }\n return result + (isFuture ? 'daga' : 'dögum');\n } else if (withoutSuffix) {\n return result + 'dagur';\n }\n return result + (isFuture ? 'dag' : 'degi');\n case 'M':\n if (withoutSuffix) {\n return 'mánuður';\n }\n return isFuture ? 'mánuð' : 'mánuði';\n case 'MM':\n if (plural(number)) {\n if (withoutSuffix) {\n return result + 'mánuðir';\n }\n return result + (isFuture ? 'mánuði' : 'mánuðum');\n } else if (withoutSuffix) {\n return result + 'mánuður';\n }\n return result + (isFuture ? 'mánuð' : 'mánuði');\n case 'y':\n return withoutSuffix || isFuture ? 'ár' : 'ári';\n case 'yy':\n if (plural(number)) {\n return result + (withoutSuffix || isFuture ? 'ár' : 'árum');\n }\n return result + (withoutSuffix || isFuture ? 'ár' : 'ári');\n }\n }\n\n var is = moment.defineLocale('is', {\n months: 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split(\n '_'\n ),\n monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),\n weekdays:\n 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split(\n '_'\n ),\n weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'),\n weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY [kl.] H:mm',\n LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm',\n },\n calendar: {\n sameDay: '[í dag kl.] LT',\n nextDay: '[á morgun kl.] LT',\n nextWeek: 'dddd [kl.] LT',\n lastDay: '[í gær kl.] LT',\n lastWeek: '[síðasta] dddd [kl.] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'eftir %s',\n past: 'fyrir %s síðan',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: 'klukkustund',\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return is;\n\n})));\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Logging constants\nconst AWS_CLOUDWATCH_CATEGORY = 'Logging';\nconst USER_AGENT_HEADER = 'x-amz-user-agent';\n// Error exception code constants\nconst NO_HUBCALLBACK_PROVIDED_EXCEPTION = 'NoHubcallbackProvidedException';\n\nexport { AWS_CLOUDWATCH_CATEGORY, NO_HUBCALLBACK_PROVIDED_EXCEPTION, USER_AGENT_HEADER };\n","import { map } from './map';\nimport { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { mergeInternals } from './mergeInternals';\nimport { isFunction } from '../util/isFunction';\nexport function mergeMap(project, resultSelector, concurrent = Infinity) {\n if (isFunction(resultSelector)) {\n return mergeMap((a, i) => map((b, ii) => resultSelector(a, b, i, ii))(innerFrom(project(a, i))), concurrent);\n }\n else if (typeof resultSelector === 'number') {\n concurrent = resultSelector;\n }\n return operate((source, subscriber) => mergeInternals(source, subscriber, project, concurrent));\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { executeSchedule } from '../util/executeSchedule';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) {\n const buffer = [];\n let active = 0;\n let index = 0;\n let isComplete = false;\n const checkComplete = () => {\n if (isComplete && !buffer.length && !active) {\n subscriber.complete();\n }\n };\n const outerNext = (value) => (active < concurrent ? doInnerSub(value) : buffer.push(value));\n const doInnerSub = (value) => {\n expand && subscriber.next(value);\n active++;\n let innerComplete = false;\n innerFrom(project(value, index++)).subscribe(createOperatorSubscriber(subscriber, (innerValue) => {\n onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue);\n if (expand) {\n outerNext(innerValue);\n }\n else {\n subscriber.next(innerValue);\n }\n }, () => {\n innerComplete = true;\n }, undefined, () => {\n if (innerComplete) {\n try {\n active--;\n while (buffer.length && active < concurrent) {\n const bufferedValue = buffer.shift();\n if (innerSubScheduler) {\n executeSchedule(subscriber, innerSubScheduler, () => doInnerSub(bufferedValue));\n }\n else {\n doInnerSub(bufferedValue);\n }\n }\n checkComplete();\n }\n catch (err) {\n subscriber.error(err);\n }\n }\n }));\n };\n source.subscribe(createOperatorSubscriber(subscriber, outerNext, () => {\n isComplete = true;\n checkComplete();\n }));\n return () => {\n additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer();\n };\n}\n","/**\n * @license Angular v15.0.4\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport * as i0 from '@angular/core';\nimport { Directive, InjectionToken, forwardRef, Optional, Inject, ɵisPromise, ɵisObservable, ɵRuntimeError, Self, EventEmitter, Input, Host, SkipSelf, ɵcoerceToBoolean, ChangeDetectorRef, Output, NgModule, Injectable, inject, Version } from '@angular/core';\nimport { ɵgetDOM } from '@angular/common';\nimport { from, forkJoin } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Base class for all ControlValueAccessor classes defined in Forms package.\n * Contains common logic and utility functions.\n *\n * Note: this is an *internal-only* class and should not be extended or used directly in\n * applications code.\n */\nclass BaseControlValueAccessor {\n constructor(_renderer, _elementRef) {\n this._renderer = _renderer;\n this._elementRef = _elementRef;\n /**\n * The registered callback function called when a change or input event occurs on the input\n * element.\n * @nodoc\n */\n this.onChange = (_) => { };\n /**\n * The registered callback function called when a blur event occurs on the input element.\n * @nodoc\n */\n this.onTouched = () => { };\n }\n /**\n * Helper method that sets a property on a target element using the current Renderer\n * implementation.\n * @nodoc\n */\n setProperty(key, value) {\n this._renderer.setProperty(this._elementRef.nativeElement, key, value);\n }\n /**\n * Registers a function called when the control is touched.\n * @nodoc\n */\n registerOnTouched(fn) {\n this.onTouched = fn;\n }\n /**\n * Registers a function called when the control value changes.\n * @nodoc\n */\n registerOnChange(fn) {\n this.onChange = fn;\n }\n /**\n * Sets the \"disabled\" property on the range input element.\n * @nodoc\n */\n setDisabledState(isDisabled) {\n this.setProperty('disabled', isDisabled);\n }\n}\nBaseControlValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: BaseControlValueAccessor, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nBaseControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: BaseControlValueAccessor, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: BaseControlValueAccessor, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; } });\n/**\n * Base class for all built-in ControlValueAccessor classes (except DefaultValueAccessor, which is\n * used in case no other CVAs can be found). We use this class to distinguish between default CVA,\n * built-in CVAs and custom CVAs, so that Forms logic can recognize built-in CVAs and treat custom\n * ones with higher priority (when both built-in and custom CVAs are present).\n *\n * Note: this is an *internal-only* class and should not be extended or used directly in\n * applications code.\n */\nclass BuiltInControlValueAccessor extends BaseControlValueAccessor {\n}\nBuiltInControlValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: BuiltInControlValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nBuiltInControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: BuiltInControlValueAccessor, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: BuiltInControlValueAccessor, decorators: [{\n type: Directive\n }] });\n/**\n * Used to provide a `ControlValueAccessor` for form controls.\n *\n * See `DefaultValueAccessor` for how to implement one.\n *\n * @publicApi\n */\nconst NG_VALUE_ACCESSOR = new InjectionToken('NgValueAccessor');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst CHECKBOX_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => CheckboxControlValueAccessor),\n multi: true,\n};\n/**\n * @description\n * A `ControlValueAccessor` for writing a value and listening to changes on a checkbox input\n * element.\n *\n * @usageNotes\n *\n * ### Using a checkbox with a reactive form.\n *\n * The following example shows how to use a checkbox with a reactive form.\n *\n * ```ts\n * const rememberLoginControl = new FormControl();\n * ```\n *\n * ```\n * <input type=\"checkbox\" [formControl]=\"rememberLoginControl\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass CheckboxControlValueAccessor extends BuiltInControlValueAccessor {\n /**\n * Sets the \"checked\" property on the input element.\n * @nodoc\n */\n writeValue(value) {\n this.setProperty('checked', value);\n }\n}\nCheckboxControlValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: CheckboxControlValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nCheckboxControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: CheckboxControlValueAccessor, selector: \"input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]\", host: { listeners: { \"change\": \"onChange($event.target.checked)\", \"blur\": \"onTouched()\" } }, providers: [CHECKBOX_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: CheckboxControlValueAccessor, decorators: [{\n type: Directive,\n args: [{\n selector: 'input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]',\n host: { '(change)': 'onChange($event.target.checked)', '(blur)': 'onTouched()' },\n providers: [CHECKBOX_VALUE_ACCESSOR]\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst DEFAULT_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DefaultValueAccessor),\n multi: true\n};\n/**\n * We must check whether the agent is Android because composition events\n * behave differently between iOS and Android.\n */\nfunction _isAndroid() {\n const userAgent = ɵgetDOM() ? ɵgetDOM().getUserAgent() : '';\n return /android (\\d+)/.test(userAgent.toLowerCase());\n}\n/**\n * @description\n * Provide this token to control if form directives buffer IME input until\n * the \"compositionend\" event occurs.\n * @publicApi\n */\nconst COMPOSITION_BUFFER_MODE = new InjectionToken('CompositionEventMode');\n/**\n * The default `ControlValueAccessor` for writing a value and listening to changes on input\n * elements. The accessor is used by the `FormControlDirective`, `FormControlName`, and\n * `NgModel` directives.\n *\n * {@searchKeywords ngDefaultControl}\n *\n * @usageNotes\n *\n * ### Using the default value accessor\n *\n * The following example shows how to use an input element that activates the default value accessor\n * (in this case, a text field).\n *\n * ```ts\n * const firstNameControl = new FormControl();\n * ```\n *\n * ```\n * <input type=\"text\" [formControl]=\"firstNameControl\">\n * ```\n *\n * This value accessor is used by default for `<input type=\"text\">` and `<textarea>` elements, but\n * you could also use it for custom components that have similar behavior and do not require special\n * processing. In order to attach the default value accessor to a custom element, add the\n * `ngDefaultControl` attribute as shown below.\n *\n * ```\n * <custom-input-component ngDefaultControl [(ngModel)]=\"value\"></custom-input-component>\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass DefaultValueAccessor extends BaseControlValueAccessor {\n constructor(renderer, elementRef, _compositionMode) {\n super(renderer, elementRef);\n this._compositionMode = _compositionMode;\n /** Whether the user is creating a composition string (IME events). */\n this._composing = false;\n if (this._compositionMode == null) {\n this._compositionMode = !_isAndroid();\n }\n }\n /**\n * Sets the \"value\" property on the input element.\n * @nodoc\n */\n writeValue(value) {\n const normalizedValue = value == null ? '' : value;\n this.setProperty('value', normalizedValue);\n }\n /** @internal */\n _handleInput(value) {\n if (!this._compositionMode || (this._compositionMode && !this._composing)) {\n this.onChange(value);\n }\n }\n /** @internal */\n _compositionStart() {\n this._composing = true;\n }\n /** @internal */\n _compositionEnd(value) {\n this._composing = false;\n this._compositionMode && this.onChange(value);\n }\n}\nDefaultValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: DefaultValueAccessor, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: COMPOSITION_BUFFER_MODE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nDefaultValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: DefaultValueAccessor, selector: \"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]\", host: { listeners: { \"input\": \"$any(this)._handleInput($event.target.value)\", \"blur\": \"onTouched()\", \"compositionstart\": \"$any(this)._compositionStart()\", \"compositionend\": \"$any(this)._compositionEnd($event.target.value)\" } }, providers: [DEFAULT_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: DefaultValueAccessor, decorators: [{\n type: Directive,\n args: [{\n selector: 'input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]',\n // TODO: vsavkin replace the above selector with the one below it once\n // https://github.com/angular/angular/issues/3011 is implemented\n // selector: '[ngModel],[formControl],[formControlName]',\n host: {\n '(input)': '$any(this)._handleInput($event.target.value)',\n '(blur)': 'onTouched()',\n '(compositionstart)': '$any(this)._compositionStart()',\n '(compositionend)': '$any(this)._compositionEnd($event.target.value)'\n },\n providers: [DEFAULT_VALUE_ACCESSOR]\n }]\n }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [COMPOSITION_BUFFER_MODE]\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst NG_DEV_MODE$1 = typeof ngDevMode === 'undefined' || !!ngDevMode;\nfunction isEmptyInputValue(value) {\n /**\n * Check if the object is a string or array before evaluating the length attribute.\n * This avoids falsely rejecting objects that contain a custom length attribute.\n * For example, the object {id: 1, length: 0, width: 0} should not be returned as empty.\n */\n return value == null ||\n ((typeof value === 'string' || Array.isArray(value)) && value.length === 0);\n}\nfunction hasValidLength(value) {\n // non-strict comparison is intentional, to check for both `null` and `undefined` values\n return value != null && typeof value.length === 'number';\n}\n/**\n * @description\n * An `InjectionToken` for registering additional synchronous validators used with\n * `AbstractControl`s.\n *\n * @see `NG_ASYNC_VALIDATORS`\n *\n * @usageNotes\n *\n * ### Providing a custom validator\n *\n * The following example registers a custom validator directive. Adding the validator to the\n * existing collection of validators requires the `multi: true` option.\n *\n * ```typescript\n * @Directive({\n * selector: '[customValidator]',\n * providers: [{provide: NG_VALIDATORS, useExisting: CustomValidatorDirective, multi: true}]\n * })\n * class CustomValidatorDirective implements Validator {\n * validate(control: AbstractControl): ValidationErrors | null {\n * return { 'custom': true };\n * }\n * }\n * ```\n *\n * @publicApi\n */\nconst NG_VALIDATORS = new InjectionToken('NgValidators');\n/**\n * @description\n * An `InjectionToken` for registering additional asynchronous validators used with\n * `AbstractControl`s.\n *\n * @see `NG_VALIDATORS`\n *\n * @usageNotes\n *\n * ### Provide a custom async validator directive\n *\n * The following example implements the `AsyncValidator` interface to create an\n * async validator directive with a custom error key.\n *\n * ```typescript\n * @Directive({\n * selector: '[customAsyncValidator]',\n * providers: [{provide: NG_ASYNC_VALIDATORS, useExisting: CustomAsyncValidatorDirective, multi:\n * true}]\n * })\n * class CustomAsyncValidatorDirective implements AsyncValidator {\n * validate(control: AbstractControl): Promise<ValidationErrors|null> {\n * return Promise.resolve({'custom': true});\n * }\n * }\n * ```\n *\n * @publicApi\n */\nconst NG_ASYNC_VALIDATORS = new InjectionToken('NgAsyncValidators');\n/**\n * A regular expression that matches valid e-mail addresses.\n *\n * At a high level, this regexp matches e-mail addresses of the format `local-part@tld`, where:\n * - `local-part` consists of one or more of the allowed characters (alphanumeric and some\n * punctuation symbols).\n * - `local-part` cannot begin or end with a period (`.`).\n * - `local-part` cannot be longer than 64 characters.\n * - `tld` consists of one or more `labels` separated by periods (`.`). For example `localhost` or\n * `foo.com`.\n * - A `label` consists of one or more of the allowed characters (alphanumeric, dashes (`-`) and\n * periods (`.`)).\n * - A `label` cannot begin or end with a dash (`-`) or a period (`.`).\n * - A `label` cannot be longer than 63 characters.\n * - The whole address cannot be longer than 254 characters.\n *\n * ## Implementation background\n *\n * This regexp was ported over from AngularJS (see there for git history):\n * https://github.com/angular/angular.js/blob/c133ef836/src/ng/directive/input.js#L27\n * It is based on the\n * [WHATWG version](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address) with\n * some enhancements to incorporate more RFC rules (such as rules related to domain names and the\n * lengths of different parts of the address). The main differences from the WHATWG version are:\n * - Disallow `local-part` to begin or end with a period (`.`).\n * - Disallow `local-part` length to exceed 64 characters.\n * - Disallow total address length to exceed 254 characters.\n *\n * See [this commit](https://github.com/angular/angular.js/commit/f3f5cf72e) for more details.\n */\nconst EMAIL_REGEXP = /^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n/**\n * @description\n * Provides a set of built-in validators that can be used by form controls.\n *\n * A validator is a function that processes a `FormControl` or collection of\n * controls and returns an error map or null. A null map means that validation has passed.\n *\n * @see [Form Validation](/guide/form-validation)\n *\n * @publicApi\n */\nclass Validators {\n /**\n * @description\n * Validator that requires the control's value to be greater than or equal to the provided number.\n *\n * @usageNotes\n *\n * ### Validate against a minimum of 3\n *\n * ```typescript\n * const control = new FormControl(2, Validators.min(3));\n *\n * console.log(control.errors); // {min: {min: 3, actual: 2}}\n * ```\n *\n * @returns A validator function that returns an error map with the\n * `min` property if the validation check fails, otherwise `null`.\n *\n * @see `updateValueAndValidity()`\n *\n */\n static min(min) {\n return minValidator(min);\n }\n /**\n * @description\n * Validator that requires the control's value to be less than or equal to the provided number.\n *\n * @usageNotes\n *\n * ### Validate against a maximum of 15\n *\n * ```typescript\n * const control = new FormControl(16, Validators.max(15));\n *\n * console.log(control.errors); // {max: {max: 15, actual: 16}}\n * ```\n *\n * @returns A validator function that returns an error map with the\n * `max` property if the validation check fails, otherwise `null`.\n *\n * @see `updateValueAndValidity()`\n *\n */\n static max(max) {\n return maxValidator(max);\n }\n /**\n * @description\n * Validator that requires the control have a non-empty value.\n *\n * @usageNotes\n *\n * ### Validate that the field is non-empty\n *\n * ```typescript\n * const control = new FormControl('', Validators.required);\n *\n * console.log(control.errors); // {required: true}\n * ```\n *\n * @returns An error map with the `required` property\n * if the validation check fails, otherwise `null`.\n *\n * @see `updateValueAndValidity()`\n *\n */\n static required(control) {\n return requiredValidator(control);\n }\n /**\n * @description\n * Validator that requires the control's value be true. This validator is commonly\n * used for required checkboxes.\n *\n * @usageNotes\n *\n * ### Validate that the field value is true\n *\n * ```typescript\n * const control = new FormControl('some value', Validators.requiredTrue);\n *\n * console.log(control.errors); // {required: true}\n * ```\n *\n * @returns An error map that contains the `required` property\n * set to `true` if the validation check fails, otherwise `null`.\n *\n * @see `updateValueAndValidity()`\n *\n */\n static requiredTrue(control) {\n return requiredTrueValidator(control);\n }\n /**\n * @description\n * Validator that requires the control's value pass an email validation test.\n *\n * Tests the value using a [regular\n * expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions)\n * pattern suitable for common use cases. The pattern is based on the definition of a valid email\n * address in the [WHATWG HTML\n * specification](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address) with\n * some enhancements to incorporate more RFC rules (such as rules related to domain names and the\n * lengths of different parts of the address).\n *\n * The differences from the WHATWG version include:\n * - Disallow `local-part` (the part before the `@` symbol) to begin or end with a period (`.`).\n * - Disallow `local-part` to be longer than 64 characters.\n * - Disallow the whole address to be longer than 254 characters.\n *\n * If this pattern does not satisfy your business needs, you can use `Validators.pattern()` to\n * validate the value against a different pattern.\n *\n * @usageNotes\n *\n * ### Validate that the field matches a valid email pattern\n *\n * ```typescript\n * const control = new FormControl('bad@', Validators.email);\n *\n * console.log(control.errors); // {email: true}\n * ```\n *\n * @returns An error map with the `email` property\n * if the validation check fails, otherwise `null`.\n *\n * @see `updateValueAndValidity()`\n *\n */\n static email(control) {\n return emailValidator(control);\n }\n /**\n * @description\n * Validator that requires the length of the control's value to be greater than or equal\n * to the provided minimum length. This validator is also provided by default if you use the\n * the HTML5 `minlength` attribute. Note that the `minLength` validator is intended to be used\n * only for types that have a numeric `length` property, such as strings or arrays. The\n * `minLength` validator logic is also not invoked for values when their `length` property is 0\n * (for example in case of an empty string or an empty array), to support optional controls. You\n * can use the standard `required` validator if empty values should not be considered valid.\n *\n * @usageNotes\n *\n * ### Validate that the field has a minimum of 3 characters\n *\n * ```typescript\n * const control = new FormControl('ng', Validators.minLength(3));\n *\n * console.log(control.errors); // {minlength: {requiredLength: 3, actualLength: 2}}\n * ```\n *\n * ```html\n * <input minlength=\"5\">\n * ```\n *\n * @returns A validator function that returns an error map with the\n * `minlength` property if the validation check fails, otherwise `null`.\n *\n * @see `updateValueAndValidity()`\n *\n */\n static minLength(minLength) {\n return minLengthValidator(minLength);\n }\n /**\n * @description\n * Validator that requires the length of the control's value to be less than or equal\n * to the provided maximum length. This validator is also provided by default if you use the\n * the HTML5 `maxlength` attribute. Note that the `maxLength` validator is intended to be used\n * only for types that have a numeric `length` property, such as strings or arrays.\n *\n * @usageNotes\n *\n * ### Validate that the field has maximum of 5 characters\n *\n * ```typescript\n * const control = new FormControl('Angular', Validators.maxLength(5));\n *\n * console.log(control.errors); // {maxlength: {requiredLength: 5, actualLength: 7}}\n * ```\n *\n * ```html\n * <input maxlength=\"5\">\n * ```\n *\n * @returns A validator function that returns an error map with the\n * `maxlength` property if the validation check fails, otherwise `null`.\n *\n * @see `updateValueAndValidity()`\n *\n */\n static maxLength(maxLength) {\n return maxLengthValidator(maxLength);\n }\n /**\n * @description\n * Validator that requires the control's value to match a regex pattern. This validator is also\n * provided by default if you use the HTML5 `pattern` attribute.\n *\n * @usageNotes\n *\n * ### Validate that the field only contains letters or spaces\n *\n * ```typescript\n * const control = new FormControl('1', Validators.pattern('[a-zA-Z ]*'));\n *\n * console.log(control.errors); // {pattern: {requiredPattern: '^[a-zA-Z ]*$', actualValue: '1'}}\n * ```\n *\n * ```html\n * <input pattern=\"[a-zA-Z ]*\">\n * ```\n *\n * ### Pattern matching with the global or sticky flag\n *\n * `RegExp` objects created with the `g` or `y` flags that are passed into `Validators.pattern`\n * can produce different results on the same input when validations are run consecutively. This is\n * due to how the behavior of `RegExp.prototype.test` is\n * specified in [ECMA-262](https://tc39.es/ecma262/#sec-regexpbuiltinexec)\n * (`RegExp` preserves the index of the last match when the global or sticky flag is used).\n * Due to this behavior, it is recommended that when using\n * `Validators.pattern` you **do not** pass in a `RegExp` object with either the global or sticky\n * flag enabled.\n *\n * ```typescript\n * // Not recommended (since the `g` flag is used)\n * const controlOne = new FormControl('1', Validators.pattern(/foo/g));\n *\n * // Good\n * const controlTwo = new FormControl('1', Validators.pattern(/foo/));\n * ```\n *\n * @param pattern A regular expression to be used as is to test the values, or a string.\n * If a string is passed, the `^` character is prepended and the `$` character is\n * appended to the provided string (if not already present), and the resulting regular\n * expression is used to test the values.\n *\n * @returns A validator function that returns an error map with the\n * `pattern` property if the validation check fails, otherwise `null`.\n *\n * @see `updateValueAndValidity()`\n *\n */\n static pattern(pattern) {\n return patternValidator(pattern);\n }\n /**\n * @description\n * Validator that performs no operation.\n *\n * @see `updateValueAndValidity()`\n *\n */\n static nullValidator(control) {\n return nullValidator(control);\n }\n static compose(validators) {\n return compose(validators);\n }\n /**\n * @description\n * Compose multiple async validators into a single function that returns the union\n * of the individual error objects for the provided control.\n *\n * @returns A validator function that returns an error map with the\n * merged error objects of the async validators if the validation check fails, otherwise `null`.\n *\n * @see `updateValueAndValidity()`\n *\n */\n static composeAsync(validators) {\n return composeAsync(validators);\n }\n}\n/**\n * Validator that requires the control's value to be greater than or equal to the provided number.\n * See `Validators.min` for additional information.\n */\nfunction minValidator(min) {\n return (control) => {\n if (isEmptyInputValue(control.value) || isEmptyInputValue(min)) {\n return null; // don't validate empty values to allow optional controls\n }\n const value = parseFloat(control.value);\n // Controls with NaN values after parsing should be treated as not having a\n // minimum, per the HTML forms spec: https://www.w3.org/TR/html5/forms.html#attr-input-min\n return !isNaN(value) && value < min ? { 'min': { 'min': min, 'actual': control.value } } : null;\n };\n}\n/**\n * Validator that requires the control's value to be less than or equal to the provided number.\n * See `Validators.max` for additional information.\n */\nfunction maxValidator(max) {\n return (control) => {\n if (isEmptyInputValue(control.value) || isEmptyInputValue(max)) {\n return null; // don't validate empty values to allow optional controls\n }\n const value = parseFloat(control.value);\n // Controls with NaN values after parsing should be treated as not having a\n // maximum, per the HTML forms spec: https://www.w3.org/TR/html5/forms.html#attr-input-max\n return !isNaN(value) && value > max ? { 'max': { 'max': max, 'actual': control.value } } : null;\n };\n}\n/**\n * Validator that requires the control have a non-empty value.\n * See `Validators.required` for additional information.\n */\nfunction requiredValidator(control) {\n return isEmptyInputValue(control.value) ? { 'required': true } : null;\n}\n/**\n * Validator that requires the control's value be true. This validator is commonly\n * used for required checkboxes.\n * See `Validators.requiredTrue` for additional information.\n */\nfunction requiredTrueValidator(control) {\n return control.value === true ? null : { 'required': true };\n}\n/**\n * Validator that requires the control's value pass an email validation test.\n * See `Validators.email` for additional information.\n */\nfunction emailValidator(control) {\n if (isEmptyInputValue(control.value)) {\n return null; // don't validate empty values to allow optional controls\n }\n return EMAIL_REGEXP.test(control.value) ? null : { 'email': true };\n}\n/**\n * Validator that requires the length of the control's value to be greater than or equal\n * to the provided minimum length. See `Validators.minLength` for additional information.\n */\nfunction minLengthValidator(minLength) {\n return (control) => {\n if (isEmptyInputValue(control.value) || !hasValidLength(control.value)) {\n // don't validate empty values to allow optional controls\n // don't validate values without `length` property\n return null;\n }\n return control.value.length < minLength ?\n { 'minlength': { 'requiredLength': minLength, 'actualLength': control.value.length } } :\n null;\n };\n}\n/**\n * Validator that requires the length of the control's value to be less than or equal\n * to the provided maximum length. See `Validators.maxLength` for additional information.\n */\nfunction maxLengthValidator(maxLength) {\n return (control) => {\n return hasValidLength(control.value) && control.value.length > maxLength ?\n { 'maxlength': { 'requiredLength': maxLength, 'actualLength': control.value.length } } :\n null;\n };\n}\n/**\n * Validator that requires the control's value to match a regex pattern.\n * See `Validators.pattern` for additional information.\n */\nfunction patternValidator(pattern) {\n if (!pattern)\n return nullValidator;\n let regex;\n let regexStr;\n if (typeof pattern === 'string') {\n regexStr = '';\n if (pattern.charAt(0) !== '^')\n regexStr += '^';\n regexStr += pattern;\n if (pattern.charAt(pattern.length - 1) !== '$')\n regexStr += '$';\n regex = new RegExp(regexStr);\n }\n else {\n regexStr = pattern.toString();\n regex = pattern;\n }\n return (control) => {\n if (isEmptyInputValue(control.value)) {\n return null; // don't validate empty values to allow optional controls\n }\n const value = control.value;\n return regex.test(value) ? null :\n { 'pattern': { 'requiredPattern': regexStr, 'actualValue': value } };\n };\n}\n/**\n * Function that has `ValidatorFn` shape, but performs no operation.\n */\nfunction nullValidator(control) {\n return null;\n}\nfunction isPresent(o) {\n return o != null;\n}\nfunction toObservable(value) {\n const obs = ɵisPromise(value) ? from(value) : value;\n if (NG_DEV_MODE$1 && !(ɵisObservable(obs))) {\n let errorMessage = `Expected async validator to return Promise or Observable.`;\n // A synchronous validator will return object or null.\n if (typeof value === 'object') {\n errorMessage +=\n ' Are you using a synchronous validator where an async validator is expected?';\n }\n throw new ɵRuntimeError(-1101 /* RuntimeErrorCode.WRONG_VALIDATOR_RETURN_TYPE */, errorMessage);\n }\n return obs;\n}\nfunction mergeErrors(arrayOfErrors) {\n let res = {};\n // Not using Array.reduce here due to a Chrome 80 bug\n // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982\n arrayOfErrors.forEach((errors) => {\n res = errors != null ? { ...res, ...errors } : res;\n });\n return Object.keys(res).length === 0 ? null : res;\n}\nfunction executeValidators(control, validators) {\n return validators.map(validator => validator(control));\n}\nfunction isValidatorFn(validator) {\n return !validator.validate;\n}\n/**\n * Given the list of validators that may contain both functions as well as classes, return the list\n * of validator functions (convert validator classes into validator functions). This is needed to\n * have consistent structure in validators list before composing them.\n *\n * @param validators The set of validators that may contain validators both in plain function form\n * as well as represented as a validator class.\n */\nfunction normalizeValidators(validators) {\n return validators.map(validator => {\n return isValidatorFn(validator) ?\n validator :\n ((c) => validator.validate(c));\n });\n}\n/**\n * Merges synchronous validators into a single validator function.\n * See `Validators.compose` for additional information.\n */\nfunction compose(validators) {\n if (!validators)\n return null;\n const presentValidators = validators.filter(isPresent);\n if (presentValidators.length == 0)\n return null;\n return function (control) {\n return mergeErrors(executeValidators(control, presentValidators));\n };\n}\n/**\n * Accepts a list of validators of different possible shapes (`Validator` and `ValidatorFn`),\n * normalizes the list (converts everything to `ValidatorFn`) and merges them into a single\n * validator function.\n */\nfunction composeValidators(validators) {\n return validators != null ? compose(normalizeValidators(validators)) : null;\n}\n/**\n * Merges asynchronous validators into a single validator function.\n * See `Validators.composeAsync` for additional information.\n */\nfunction composeAsync(validators) {\n if (!validators)\n return null;\n const presentValidators = validators.filter(isPresent);\n if (presentValidators.length == 0)\n return null;\n return function (control) {\n const observables = executeValidators(control, presentValidators).map(toObservable);\n return forkJoin(observables).pipe(map(mergeErrors));\n };\n}\n/**\n * Accepts a list of async validators of different possible shapes (`AsyncValidator` and\n * `AsyncValidatorFn`), normalizes the list (converts everything to `AsyncValidatorFn`) and merges\n * them into a single validator function.\n */\nfunction composeAsyncValidators(validators) {\n return validators != null ? composeAsync(normalizeValidators(validators)) :\n null;\n}\n/**\n * Merges raw control validators with a given directive validator and returns the combined list of\n * validators as an array.\n */\nfunction mergeValidators(controlValidators, dirValidator) {\n if (controlValidators === null)\n return [dirValidator];\n return Array.isArray(controlValidators) ? [...controlValidators, dirValidator] :\n [controlValidators, dirValidator];\n}\n/**\n * Retrieves the list of raw synchronous validators attached to a given control.\n */\nfunction getControlValidators(control) {\n return control._rawValidators;\n}\n/**\n * Retrieves the list of raw asynchronous validators attached to a given control.\n */\nfunction getControlAsyncValidators(control) {\n return control._rawAsyncValidators;\n}\n/**\n * Accepts a singleton validator, an array, or null, and returns an array type with the provided\n * validators.\n *\n * @param validators A validator, validators, or null.\n * @returns A validators array.\n */\nfunction makeValidatorsArray(validators) {\n if (!validators)\n return [];\n return Array.isArray(validators) ? validators : [validators];\n}\n/**\n * Determines whether a validator or validators array has a given validator.\n *\n * @param validators The validator or validators to compare against.\n * @param validator The validator to check.\n * @returns Whether the validator is present.\n */\nfunction hasValidator(validators, validator) {\n return Array.isArray(validators) ? validators.includes(validator) : validators === validator;\n}\n/**\n * Combines two arrays of validators into one. If duplicates are provided, only one will be added.\n *\n * @param validators The new validators.\n * @param currentValidators The base array of current validators.\n * @returns An array of validators.\n */\nfunction addValidators(validators, currentValidators) {\n const current = makeValidatorsArray(currentValidators);\n const validatorsToAdd = makeValidatorsArray(validators);\n validatorsToAdd.forEach((v) => {\n // Note: if there are duplicate entries in the new validators array,\n // only the first one would be added to the current list of validators.\n // Duplicate ones would be ignored since `hasValidator` would detect\n // the presence of a validator function and we update the current list in place.\n if (!hasValidator(current, v)) {\n current.push(v);\n }\n });\n return current;\n}\nfunction removeValidators(validators, currentValidators) {\n return makeValidatorsArray(currentValidators).filter(v => !hasValidator(validators, v));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description\n * Base class for control directives.\n *\n * This class is only used internally in the `ReactiveFormsModule` and the `FormsModule`.\n *\n * @publicApi\n */\nclass AbstractControlDirective {\n constructor() {\n /**\n * Set of synchronous validators as they were provided while calling `setValidators` function.\n * @internal\n */\n this._rawValidators = [];\n /**\n * Set of asynchronous validators as they were provided while calling `setAsyncValidators`\n * function.\n * @internal\n */\n this._rawAsyncValidators = [];\n /*\n * The set of callbacks to be invoked when directive instance is being destroyed.\n */\n this._onDestroyCallbacks = [];\n }\n /**\n * @description\n * Reports the value of the control if it is present, otherwise null.\n */\n get value() {\n return this.control ? this.control.value : null;\n }\n /**\n * @description\n * Reports whether the control is valid. A control is considered valid if no\n * validation errors exist with the current value.\n * If the control is not present, null is returned.\n */\n get valid() {\n return this.control ? this.control.valid : null;\n }\n /**\n * @description\n * Reports whether the control is invalid, meaning that an error exists in the input value.\n * If the control is not present, null is returned.\n */\n get invalid() {\n return this.control ? this.control.invalid : null;\n }\n /**\n * @description\n * Reports whether a control is pending, meaning that that async validation is occurring and\n * errors are not yet available for the input value. If the control is not present, null is\n * returned.\n */\n get pending() {\n return this.control ? this.control.pending : null;\n }\n /**\n * @description\n * Reports whether the control is disabled, meaning that the control is disabled\n * in the UI and is exempt from validation checks and excluded from aggregate\n * values of ancestor controls. If the control is not present, null is returned.\n */\n get disabled() {\n return this.control ? this.control.disabled : null;\n }\n /**\n * @description\n * Reports whether the control is enabled, meaning that the control is included in ancestor\n * calculations of validity or value. If the control is not present, null is returned.\n */\n get enabled() {\n return this.control ? this.control.enabled : null;\n }\n /**\n * @description\n * Reports the control's validation errors. If the control is not present, null is returned.\n */\n get errors() {\n return this.control ? this.control.errors : null;\n }\n /**\n * @description\n * Reports whether the control is pristine, meaning that the user has not yet changed\n * the value in the UI. If the control is not present, null is returned.\n */\n get pristine() {\n return this.control ? this.control.pristine : null;\n }\n /**\n * @description\n * Reports whether the control is dirty, meaning that the user has changed\n * the value in the UI. If the control is not present, null is returned.\n */\n get dirty() {\n return this.control ? this.control.dirty : null;\n }\n /**\n * @description\n * Reports whether the control is touched, meaning that the user has triggered\n * a `blur` event on it. If the control is not present, null is returned.\n */\n get touched() {\n return this.control ? this.control.touched : null;\n }\n /**\n * @description\n * Reports the validation status of the control. Possible values include:\n * 'VALID', 'INVALID', 'DISABLED', and 'PENDING'.\n * If the control is not present, null is returned.\n */\n get status() {\n return this.control ? this.control.status : null;\n }\n /**\n * @description\n * Reports whether the control is untouched, meaning that the user has not yet triggered\n * a `blur` event on it. If the control is not present, null is returned.\n */\n get untouched() {\n return this.control ? this.control.untouched : null;\n }\n /**\n * @description\n * Returns a multicasting observable that emits a validation status whenever it is\n * calculated for the control. If the control is not present, null is returned.\n */\n get statusChanges() {\n return this.control ? this.control.statusChanges : null;\n }\n /**\n * @description\n * Returns a multicasting observable of value changes for the control that emits every time the\n * value of the control changes in the UI or programmatically.\n * If the control is not present, null is returned.\n */\n get valueChanges() {\n return this.control ? this.control.valueChanges : null;\n }\n /**\n * @description\n * Returns an array that represents the path from the top-level form to this control.\n * Each index is the string name of the control on that level.\n */\n get path() {\n return null;\n }\n /**\n * Sets synchronous validators for this directive.\n * @internal\n */\n _setValidators(validators) {\n this._rawValidators = validators || [];\n this._composedValidatorFn = composeValidators(this._rawValidators);\n }\n /**\n * Sets asynchronous validators for this directive.\n * @internal\n */\n _setAsyncValidators(validators) {\n this._rawAsyncValidators = validators || [];\n this._composedAsyncValidatorFn = composeAsyncValidators(this._rawAsyncValidators);\n }\n /**\n * @description\n * Synchronous validator function composed of all the synchronous validators registered with this\n * directive.\n */\n get validator() {\n return this._composedValidatorFn || null;\n }\n /**\n * @description\n * Asynchronous validator function composed of all the asynchronous validators registered with\n * this directive.\n */\n get asyncValidator() {\n return this._composedAsyncValidatorFn || null;\n }\n /**\n * Internal function to register callbacks that should be invoked\n * when directive instance is being destroyed.\n * @internal\n */\n _registerOnDestroy(fn) {\n this._onDestroyCallbacks.push(fn);\n }\n /**\n * Internal function to invoke all registered \"on destroy\" callbacks.\n * Note: calling this function also clears the list of callbacks.\n * @internal\n */\n _invokeOnDestroyCallbacks() {\n this._onDestroyCallbacks.forEach(fn => fn());\n this._onDestroyCallbacks = [];\n }\n /**\n * @description\n * Resets the control with the provided value if the control is present.\n */\n reset(value = undefined) {\n if (this.control)\n this.control.reset(value);\n }\n /**\n * @description\n * Reports whether the control with the given path has the error specified.\n *\n * @param errorCode The code of the error to check\n * @param path A list of control names that designates how to move from the current control\n * to the control that should be queried for errors.\n *\n * @usageNotes\n * For example, for the following `FormGroup`:\n *\n * ```\n * form = new FormGroup({\n * address: new FormGroup({ street: new FormControl() })\n * });\n * ```\n *\n * The path to the 'street' control from the root form would be 'address' -> 'street'.\n *\n * It can be provided to this method in one of two formats:\n *\n * 1. An array of string control names, e.g. `['address', 'street']`\n * 1. A period-delimited list of control names in one string, e.g. `'address.street'`\n *\n * If no path is given, this method checks for the error on the current control.\n *\n * @returns whether the given error is present in the control at the given path.\n *\n * If the control is not present, false is returned.\n */\n hasError(errorCode, path) {\n return this.control ? this.control.hasError(errorCode, path) : false;\n }\n /**\n * @description\n * Reports error data for the control with the given path.\n *\n * @param errorCode The code of the error to check\n * @param path A list of control names that designates how to move from the current control\n * to the control that should be queried for errors.\n *\n * @usageNotes\n * For example, for the following `FormGroup`:\n *\n * ```\n * form = new FormGroup({\n * address: new FormGroup({ street: new FormControl() })\n * });\n * ```\n *\n * The path to the 'street' control from the root form would be 'address' -> 'street'.\n *\n * It can be provided to this method in one of two formats:\n *\n * 1. An array of string control names, e.g. `['address', 'street']`\n * 1. A period-delimited list of control names in one string, e.g. `'address.street'`\n *\n * @returns error data for that particular error. If the control or error is not present,\n * null is returned.\n */\n getError(errorCode, path) {\n return this.control ? this.control.getError(errorCode, path) : null;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description\n * A base class for directives that contain multiple registered instances of `NgControl`.\n * Only used by the forms module.\n *\n * @publicApi\n */\nclass ControlContainer extends AbstractControlDirective {\n /**\n * @description\n * The top-level form directive for the control.\n */\n get formDirective() {\n return null;\n }\n /**\n * @description\n * The path to this group.\n */\n get path() {\n return null;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description\n * A base class that all `FormControl`-based directives extend. It binds a `FormControl`\n * object to a DOM element.\n *\n * @publicApi\n */\nclass NgControl extends AbstractControlDirective {\n constructor() {\n super(...arguments);\n /**\n * @description\n * The parent form for the control.\n *\n * @internal\n */\n this._parent = null;\n /**\n * @description\n * The name for the control\n */\n this.name = null;\n /**\n * @description\n * The value accessor for the control\n */\n this.valueAccessor = null;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// DO NOT REFACTOR!\n// Each status is represented by a separate function to make sure that\n// advanced Closure Compiler optimizations related to property renaming\n// can work correctly.\nclass AbstractControlStatus {\n constructor(cd) {\n this._cd = cd;\n }\n get isTouched() {\n return !!this._cd?.control?.touched;\n }\n get isUntouched() {\n return !!this._cd?.control?.untouched;\n }\n get isPristine() {\n return !!this._cd?.control?.pristine;\n }\n get isDirty() {\n return !!this._cd?.control?.dirty;\n }\n get isValid() {\n return !!this._cd?.control?.valid;\n }\n get isInvalid() {\n return !!this._cd?.control?.invalid;\n }\n get isPending() {\n return !!this._cd?.control?.pending;\n }\n get isSubmitted() {\n // We check for the `submitted` field from `NgForm` and `FormGroupDirective` classes, but\n // we avoid instanceof checks to prevent non-tree-shakable references to those types.\n return !!this._cd?.submitted;\n }\n}\nconst ngControlStatusHost = {\n '[class.ng-untouched]': 'isUntouched',\n '[class.ng-touched]': 'isTouched',\n '[class.ng-pristine]': 'isPristine',\n '[class.ng-dirty]': 'isDirty',\n '[class.ng-valid]': 'isValid',\n '[class.ng-invalid]': 'isInvalid',\n '[class.ng-pending]': 'isPending',\n};\nconst ngGroupStatusHost = {\n ...ngControlStatusHost,\n '[class.ng-submitted]': 'isSubmitted',\n};\n/**\n * @description\n * Directive automatically applied to Angular form controls that sets CSS classes\n * based on control status.\n *\n * @usageNotes\n *\n * ### CSS classes applied\n *\n * The following classes are applied as the properties become true:\n *\n * * ng-valid\n * * ng-invalid\n * * ng-pending\n * * ng-pristine\n * * ng-dirty\n * * ng-untouched\n * * ng-touched\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass NgControlStatus extends AbstractControlStatus {\n constructor(cd) {\n super(cd);\n }\n}\nNgControlStatus.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgControlStatus, deps: [{ token: NgControl, self: true }], target: i0.ɵɵFactoryTarget.Directive });\nNgControlStatus.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: NgControlStatus, selector: \"[formControlName],[ngModel],[formControl]\", host: { properties: { \"class.ng-untouched\": \"isUntouched\", \"class.ng-touched\": \"isTouched\", \"class.ng-pristine\": \"isPristine\", \"class.ng-dirty\": \"isDirty\", \"class.ng-valid\": \"isValid\", \"class.ng-invalid\": \"isInvalid\", \"class.ng-pending\": \"isPending\" } }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgControlStatus, decorators: [{\n type: Directive,\n args: [{ selector: '[formControlName],[ngModel],[formControl]', host: ngControlStatusHost }]\n }], ctorParameters: function () { return [{ type: NgControl, decorators: [{\n type: Self\n }] }]; } });\n/**\n * @description\n * Directive automatically applied to Angular form groups that sets CSS classes\n * based on control status (valid/invalid/dirty/etc). On groups, this includes the additional\n * class ng-submitted.\n *\n * @see `NgControlStatus`\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass NgControlStatusGroup extends AbstractControlStatus {\n constructor(cd) {\n super(cd);\n }\n}\nNgControlStatusGroup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgControlStatusGroup, deps: [{ token: ControlContainer, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });\nNgControlStatusGroup.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: NgControlStatusGroup, selector: \"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]\", host: { properties: { \"class.ng-untouched\": \"isUntouched\", \"class.ng-touched\": \"isTouched\", \"class.ng-pristine\": \"isPristine\", \"class.ng-dirty\": \"isDirty\", \"class.ng-valid\": \"isValid\", \"class.ng-invalid\": \"isInvalid\", \"class.ng-pending\": \"isPending\", \"class.ng-submitted\": \"isSubmitted\" } }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgControlStatusGroup, decorators: [{\n type: Directive,\n args: [{\n selector: '[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]',\n host: ngGroupStatusHost\n }]\n }], ctorParameters: function () { return [{ type: ControlContainer, decorators: [{\n type: Optional\n }, {\n type: Self\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst formControlNameExample = `\n <div [formGroup]=\"myGroup\">\n <input formControlName=\"firstName\">\n </div>\n\n In your class:\n\n this.myGroup = new FormGroup({\n firstName: new FormControl()\n });`;\nconst formGroupNameExample = `\n <div [formGroup]=\"myGroup\">\n <div formGroupName=\"person\">\n <input formControlName=\"firstName\">\n </div>\n </div>\n\n In your class:\n\n this.myGroup = new FormGroup({\n person: new FormGroup({ firstName: new FormControl() })\n });`;\nconst formArrayNameExample = `\n <div [formGroup]=\"myGroup\">\n <div formArrayName=\"cities\">\n <div *ngFor=\"let city of cityArray.controls; index as i\">\n <input [formControlName]=\"i\">\n </div>\n </div>\n </div>\n\n In your class:\n\n this.cityArray = new FormArray([new FormControl('SF')]);\n this.myGroup = new FormGroup({\n cities: this.cityArray\n });`;\nconst ngModelGroupExample = `\n <form>\n <div ngModelGroup=\"person\">\n <input [(ngModel)]=\"person.name\" name=\"firstName\">\n </div>\n </form>`;\nconst ngModelWithFormGroupExample = `\n <div [formGroup]=\"myGroup\">\n <input formControlName=\"firstName\">\n <input [(ngModel)]=\"showMoreControls\" [ngModelOptions]=\"{standalone: true}\">\n </div>\n`;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction controlParentException() {\n return new ɵRuntimeError(1050 /* RuntimeErrorCode.FORM_CONTROL_NAME_MISSING_PARENT */, `formControlName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n ${formControlNameExample}`);\n}\nfunction ngModelGroupException() {\n return new ɵRuntimeError(1051 /* RuntimeErrorCode.FORM_CONTROL_NAME_INSIDE_MODEL_GROUP */, `formControlName cannot be used with an ngModelGroup parent. It is only compatible with parents\n that also have a \"form\" prefix: formGroupName, formArrayName, or formGroup.\n\n Option 1: Update the parent to be formGroupName (reactive form strategy)\n\n ${formGroupNameExample}\n\n Option 2: Use ngModel instead of formControlName (template-driven strategy)\n\n ${ngModelGroupExample}`);\n}\nfunction missingFormException() {\n return new ɵRuntimeError(1052 /* RuntimeErrorCode.FORM_GROUP_MISSING_INSTANCE */, `formGroup expects a FormGroup instance. Please pass one in.\n\n Example:\n\n ${formControlNameExample}`);\n}\nfunction groupParentException() {\n return new ɵRuntimeError(1053 /* RuntimeErrorCode.FORM_GROUP_NAME_MISSING_PARENT */, `formGroupName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n ${formGroupNameExample}`);\n}\nfunction arrayParentException() {\n return new ɵRuntimeError(1054 /* RuntimeErrorCode.FORM_ARRAY_NAME_MISSING_PARENT */, `formArrayName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n ${formArrayNameExample}`);\n}\nconst disabledAttrWarning = `\n It looks like you're using the disabled attribute with a reactive form directive. If you set disabled to true\n when you set up this control in your component class, the disabled attribute will actually be set in the DOM for\n you. We recommend using this approach to avoid 'changed after checked' errors.\n\n Example:\n // Specify the \\`disabled\\` property at control creation time:\n form = new FormGroup({\n first: new FormControl({value: 'Nancy', disabled: true}, Validators.required),\n last: new FormControl('Drew', Validators.required)\n });\n\n // Controls can also be enabled/disabled after creation:\n form.get('first')?.enable();\n form.get('last')?.disable();\n`;\nconst asyncValidatorsDroppedWithOptsWarning = `\n It looks like you're constructing using a FormControl with both an options argument and an\n async validators argument. Mixing these arguments will cause your async validators to be dropped.\n You should either put all your validators in the options object, or in separate validators\n arguments. For example:\n\n // Using validators arguments\n fc = new FormControl(42, Validators.required, myAsyncValidator);\n\n // Using AbstractControlOptions\n fc = new FormControl(42, {validators: Validators.required, asyncValidators: myAV});\n\n // Do NOT mix them: async validators will be dropped!\n fc = new FormControl(42, {validators: Validators.required}, /* Oops! */ myAsyncValidator);\n`;\nfunction ngModelWarning(directiveName) {\n return `\n It looks like you're using ngModel on the same form field as ${directiveName}.\n Support for using the ngModel input property and ngModelChange event with\n reactive form directives has been deprecated in Angular v6 and will be removed\n in a future version of Angular.\n\n For more information on this, see our API docs here:\n https://angular.io/api/forms/${directiveName === 'formControl' ? 'FormControlDirective' : 'FormControlName'}#use-with-ngmodel\n `;\n}\nfunction describeKey(isFormGroup, key) {\n return isFormGroup ? `with name: '${key}'` : `at index: ${key}`;\n}\nfunction noControlsError(isFormGroup) {\n return `\n There are no form controls registered with this ${isFormGroup ? 'group' : 'array'} yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n `;\n}\nfunction missingControlError(isFormGroup, key) {\n return `Cannot find form control ${describeKey(isFormGroup, key)}`;\n}\nfunction missingControlValueError(isFormGroup, key) {\n return `Must supply a value for form control ${describeKey(isFormGroup, key)}`;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst NG_DEV_MODE = typeof ngDevMode === 'undefined' || !!ngDevMode;\n/**\n * Reports that a control is valid, meaning that no errors exist in the input value.\n *\n * @see `status`\n */\nconst VALID = 'VALID';\n/**\n * Reports that a control is invalid, meaning that an error exists in the input value.\n *\n * @see `status`\n */\nconst INVALID = 'INVALID';\n/**\n * Reports that a control is pending, meaning that that async validation is occurring and\n * errors are not yet available for the input value.\n *\n * @see `markAsPending`\n * @see `status`\n */\nconst PENDING = 'PENDING';\n/**\n * Reports that a control is disabled, meaning that the control is exempt from ancestor\n * calculations of validity or value.\n *\n * @see `markAsDisabled`\n * @see `status`\n */\nconst DISABLED = 'DISABLED';\n/**\n * Gets validators from either an options object or given validators.\n */\nfunction pickValidators(validatorOrOpts) {\n return (isOptionsObj(validatorOrOpts) ? validatorOrOpts.validators : validatorOrOpts) || null;\n}\n/**\n * Creates validator function by combining provided validators.\n */\nfunction coerceToValidator(validator) {\n return Array.isArray(validator) ? composeValidators(validator) : validator || null;\n}\n/**\n * Gets async validators from either an options object or given validators.\n */\nfunction pickAsyncValidators(asyncValidator, validatorOrOpts) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (isOptionsObj(validatorOrOpts) && asyncValidator) {\n console.warn(asyncValidatorsDroppedWithOptsWarning);\n }\n }\n return (isOptionsObj(validatorOrOpts) ? validatorOrOpts.asyncValidators : asyncValidator) || null;\n}\n/**\n * Creates async validator function by combining provided async validators.\n */\nfunction coerceToAsyncValidator(asyncValidator) {\n return Array.isArray(asyncValidator) ? composeAsyncValidators(asyncValidator) :\n asyncValidator || null;\n}\nfunction isOptionsObj(validatorOrOpts) {\n return validatorOrOpts != null && !Array.isArray(validatorOrOpts) &&\n typeof validatorOrOpts === 'object';\n}\nfunction assertControlPresent(parent, isGroup, key) {\n const controls = parent.controls;\n const collection = isGroup ? Object.keys(controls) : controls;\n if (!collection.length) {\n throw new ɵRuntimeError(1000 /* RuntimeErrorCode.NO_CONTROLS */, NG_DEV_MODE ? noControlsError(isGroup) : '');\n }\n if (!controls[key]) {\n throw new ɵRuntimeError(1001 /* RuntimeErrorCode.MISSING_CONTROL */, NG_DEV_MODE ? missingControlError(isGroup, key) : '');\n }\n}\nfunction assertAllValuesPresent(control, isGroup, value) {\n control._forEachChild((_, key) => {\n if (value[key] === undefined) {\n throw new ɵRuntimeError(1002 /* RuntimeErrorCode.MISSING_CONTROL_VALUE */, NG_DEV_MODE ? missingControlValueError(isGroup, key) : '');\n }\n });\n}\n// clang-format on\n/**\n * This is the base class for `FormControl`, `FormGroup`, and `FormArray`.\n *\n * It provides some of the shared behavior that all controls and groups of controls have, like\n * running validators, calculating status, and resetting state. It also defines the properties\n * that are shared between all sub-classes, like `value`, `valid`, and `dirty`. It shouldn't be\n * instantiated directly.\n *\n * The first type parameter TValue represents the value type of the control (`control.value`).\n * The optional type parameter TRawValue represents the raw value type (`control.getRawValue()`).\n *\n * @see [Forms Guide](/guide/forms)\n * @see [Reactive Forms Guide](/guide/reactive-forms)\n * @see [Dynamic Forms Guide](/guide/dynamic-form)\n *\n * @publicApi\n */\nclass AbstractControl {\n /**\n * Initialize the AbstractControl instance.\n *\n * @param validators The function or array of functions that is used to determine the validity of\n * this control synchronously.\n * @param asyncValidators The function or array of functions that is used to determine validity of\n * this control asynchronously.\n */\n constructor(validators, asyncValidators) {\n /** @internal */\n this._pendingDirty = false;\n /**\n * Indicates that a control has its own pending asynchronous validation in progress.\n *\n * @internal\n */\n this._hasOwnPendingAsyncValidator = false;\n /** @internal */\n this._pendingTouched = false;\n /** @internal */\n this._onCollectionChange = () => { };\n this._parent = null;\n /**\n * A control is `pristine` if the user has not yet changed\n * the value in the UI.\n *\n * @returns True if the user has not yet changed the value in the UI; compare `dirty`.\n * Programmatic changes to a control's value do not mark it dirty.\n */\n this.pristine = true;\n /**\n * True if the control is marked as `touched`.\n *\n * A control is marked `touched` once the user has triggered\n * a `blur` event on it.\n */\n this.touched = false;\n /** @internal */\n this._onDisabledChange = [];\n this._assignValidators(validators);\n this._assignAsyncValidators(asyncValidators);\n }\n /**\n * Returns the function that is used to determine the validity of this control synchronously.\n * If multiple validators have been added, this will be a single composed function.\n * See `Validators.compose()` for additional information.\n */\n get validator() {\n return this._composedValidatorFn;\n }\n set validator(validatorFn) {\n this._rawValidators = this._composedValidatorFn = validatorFn;\n }\n /**\n * Returns the function that is used to determine the validity of this control asynchronously.\n * If multiple validators have been added, this will be a single composed function.\n * See `Validators.compose()` for additional information.\n */\n get asyncValidator() {\n return this._composedAsyncValidatorFn;\n }\n set asyncValidator(asyncValidatorFn) {\n this._rawAsyncValidators = this._composedAsyncValidatorFn = asyncValidatorFn;\n }\n /**\n * The parent control.\n */\n get parent() {\n return this._parent;\n }\n /**\n * A control is `valid` when its `status` is `VALID`.\n *\n * @see {@link AbstractControl.status}\n *\n * @returns True if the control has passed all of its validation tests,\n * false otherwise.\n */\n get valid() {\n return this.status === VALID;\n }\n /**\n * A control is `invalid` when its `status` is `INVALID`.\n *\n * @see {@link AbstractControl.status}\n *\n * @returns True if this control has failed one or more of its validation checks,\n * false otherwise.\n */\n get invalid() {\n return this.status === INVALID;\n }\n /**\n * A control is `pending` when its `status` is `PENDING`.\n *\n * @see {@link AbstractControl.status}\n *\n * @returns True if this control is in the process of conducting a validation check,\n * false otherwise.\n */\n get pending() {\n return this.status == PENDING;\n }\n /**\n * A control is `disabled` when its `status` is `DISABLED`.\n *\n * Disabled controls are exempt from validation checks and\n * are not included in the aggregate value of their ancestor\n * controls.\n *\n * @see {@link AbstractControl.status}\n *\n * @returns True if the control is disabled, false otherwise.\n */\n get disabled() {\n return this.status === DISABLED;\n }\n /**\n * A control is `enabled` as long as its `status` is not `DISABLED`.\n *\n * @returns True if the control has any status other than 'DISABLED',\n * false if the status is 'DISABLED'.\n *\n * @see {@link AbstractControl.status}\n *\n */\n get enabled() {\n return this.status !== DISABLED;\n }\n /**\n * A control is `dirty` if the user has changed the value\n * in the UI.\n *\n * @returns True if the user has changed the value of this control in the UI; compare `pristine`.\n * Programmatic changes to a control's value do not mark it dirty.\n */\n get dirty() {\n return !this.pristine;\n }\n /**\n * True if the control has not been marked as touched\n *\n * A control is `untouched` if the user has not yet triggered\n * a `blur` event on it.\n */\n get untouched() {\n return !this.touched;\n }\n /**\n * Reports the update strategy of the `AbstractControl` (meaning\n * the event on which the control updates itself).\n * Possible values: `'change'` | `'blur'` | `'submit'`\n * Default value: `'change'`\n */\n get updateOn() {\n return this._updateOn ? this._updateOn : (this.parent ? this.parent.updateOn : 'change');\n }\n /**\n * Sets the synchronous validators that are active on this control. Calling\n * this overwrites any existing synchronous validators.\n *\n * When you add or remove a validator at run time, you must call\n * `updateValueAndValidity()` for the new validation to take effect.\n *\n * If you want to add a new validator without affecting existing ones, consider\n * using `addValidators()` method instead.\n */\n setValidators(validators) {\n this._assignValidators(validators);\n }\n /**\n * Sets the asynchronous validators that are active on this control. Calling this\n * overwrites any existing asynchronous validators.\n *\n * When you add or remove a validator at run time, you must call\n * `updateValueAndValidity()` for the new validation to take effect.\n *\n * If you want to add a new validator without affecting existing ones, consider\n * using `addAsyncValidators()` method instead.\n */\n setAsyncValidators(validators) {\n this._assignAsyncValidators(validators);\n }\n /**\n * Add a synchronous validator or validators to this control, without affecting other validators.\n *\n * When you add or remove a validator at run time, you must call\n * `updateValueAndValidity()` for the new validation to take effect.\n *\n * Adding a validator that already exists will have no effect. If duplicate validator functions\n * are present in the `validators` array, only the first instance would be added to a form\n * control.\n *\n * @param validators The new validator function or functions to add to this control.\n */\n addValidators(validators) {\n this.setValidators(addValidators(validators, this._rawValidators));\n }\n /**\n * Add an asynchronous validator or validators to this control, without affecting other\n * validators.\n *\n * When you add or remove a validator at run time, you must call\n * `updateValueAndValidity()` for the new validation to take effect.\n *\n * Adding a validator that already exists will have no effect.\n *\n * @param validators The new asynchronous validator function or functions to add to this control.\n */\n addAsyncValidators(validators) {\n this.setAsyncValidators(addValidators(validators, this._rawAsyncValidators));\n }\n /**\n * Remove a synchronous validator from this control, without affecting other validators.\n * Validators are compared by function reference; you must pass a reference to the exact same\n * validator function as the one that was originally set. If a provided validator is not found,\n * it is ignored.\n *\n * @usageNotes\n *\n * ### Reference to a ValidatorFn\n *\n * ```\n * // Reference to the RequiredValidator\n * const ctrl = new FormControl<string | null>('', Validators.required);\n * ctrl.removeValidators(Validators.required);\n *\n * // Reference to anonymous function inside MinValidator\n * const minValidator = Validators.min(3);\n * const ctrl = new FormControl<string | null>('', minValidator);\n * expect(ctrl.hasValidator(minValidator)).toEqual(true)\n * expect(ctrl.hasValidator(Validators.min(3))).toEqual(false)\n *\n * ctrl.removeValidators(minValidator);\n * ```\n *\n * When you add or remove a validator at run time, you must call\n * `updateValueAndValidity()` for the new validation to take effect.\n *\n * @param validators The validator or validators to remove.\n */\n removeValidators(validators) {\n this.setValidators(removeValidators(validators, this._rawValidators));\n }\n /**\n * Remove an asynchronous validator from this control, without affecting other validators.\n * Validators are compared by function reference; you must pass a reference to the exact same\n * validator function as the one that was originally set. If a provided validator is not found, it\n * is ignored.\n *\n * When you add or remove a validator at run time, you must call\n * `updateValueAndValidity()` for the new validation to take effect.\n *\n * @param validators The asynchronous validator or validators to remove.\n */\n removeAsyncValidators(validators) {\n this.setAsyncValidators(removeValidators(validators, this._rawAsyncValidators));\n }\n /**\n * Check whether a synchronous validator function is present on this control. The provided\n * validator must be a reference to the exact same function that was provided.\n *\n * @usageNotes\n *\n * ### Reference to a ValidatorFn\n *\n * ```\n * // Reference to the RequiredValidator\n * const ctrl = new FormControl<number | null>(0, Validators.required);\n * expect(ctrl.hasValidator(Validators.required)).toEqual(true)\n *\n * // Reference to anonymous function inside MinValidator\n * const minValidator = Validators.min(3);\n * const ctrl = new FormControl<number | null>(0, minValidator);\n * expect(ctrl.hasValidator(minValidator)).toEqual(true)\n * expect(ctrl.hasValidator(Validators.min(3))).toEqual(false)\n * ```\n *\n * @param validator The validator to check for presence. Compared by function reference.\n * @returns Whether the provided validator was found on this control.\n */\n hasValidator(validator) {\n return hasValidator(this._rawValidators, validator);\n }\n /**\n * Check whether an asynchronous validator function is present on this control. The provided\n * validator must be a reference to the exact same function that was provided.\n *\n * @param validator The asynchronous validator to check for presence. Compared by function\n * reference.\n * @returns Whether the provided asynchronous validator was found on this control.\n */\n hasAsyncValidator(validator) {\n return hasValidator(this._rawAsyncValidators, validator);\n }\n /**\n * Empties out the synchronous validator list.\n *\n * When you add or remove a validator at run time, you must call\n * `updateValueAndValidity()` for the new validation to take effect.\n *\n */\n clearValidators() {\n this.validator = null;\n }\n /**\n * Empties out the async validator list.\n *\n * When you add or remove a validator at run time, you must call\n * `updateValueAndValidity()` for the new validation to take effect.\n *\n */\n clearAsyncValidators() {\n this.asyncValidator = null;\n }\n /**\n * Marks the control as `touched`. A control is touched by focus and\n * blur events that do not change the value.\n *\n * @see `markAsUntouched()`\n * @see `markAsDirty()`\n * @see `markAsPristine()`\n *\n * @param opts Configuration options that determine how the control propagates changes\n * and emits events after marking is applied.\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false.\n */\n markAsTouched(opts = {}) {\n this.touched = true;\n if (this._parent && !opts.onlySelf) {\n this._parent.markAsTouched(opts);\n }\n }\n /**\n * Marks the control and all its descendant controls as `touched`.\n * @see `markAsTouched()`\n */\n markAllAsTouched() {\n this.markAsTouched({ onlySelf: true });\n this._forEachChild((control) => control.markAllAsTouched());\n }\n /**\n * Marks the control as `untouched`.\n *\n * If the control has any children, also marks all children as `untouched`\n * and recalculates the `touched` status of all parent controls.\n *\n * @see `markAsTouched()`\n * @see `markAsDirty()`\n * @see `markAsPristine()`\n *\n * @param opts Configuration options that determine how the control propagates changes\n * and emits events after the marking is applied.\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false.\n */\n markAsUntouched(opts = {}) {\n this.touched = false;\n this._pendingTouched = false;\n this._forEachChild((control) => {\n control.markAsUntouched({ onlySelf: true });\n });\n if (this._parent && !opts.onlySelf) {\n this._parent._updateTouched(opts);\n }\n }\n /**\n * Marks the control as `dirty`. A control becomes dirty when\n * the control's value is changed through the UI; compare `markAsTouched`.\n *\n * @see `markAsTouched()`\n * @see `markAsUntouched()`\n * @see `markAsPristine()`\n *\n * @param opts Configuration options that determine how the control propagates changes\n * and emits events after marking is applied.\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false.\n */\n markAsDirty(opts = {}) {\n this.pristine = false;\n if (this._parent && !opts.onlySelf) {\n this._parent.markAsDirty(opts);\n }\n }\n /**\n * Marks the control as `pristine`.\n *\n * If the control has any children, marks all children as `pristine`,\n * and recalculates the `pristine` status of all parent\n * controls.\n *\n * @see `markAsTouched()`\n * @see `markAsUntouched()`\n * @see `markAsDirty()`\n *\n * @param opts Configuration options that determine how the control emits events after\n * marking is applied.\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false.\n */\n markAsPristine(opts = {}) {\n this.pristine = true;\n this._pendingDirty = false;\n this._forEachChild((control) => {\n control.markAsPristine({ onlySelf: true });\n });\n if (this._parent && !opts.onlySelf) {\n this._parent._updatePristine(opts);\n }\n }\n /**\n * Marks the control as `pending`.\n *\n * A control is pending while the control performs async validation.\n *\n * @see {@link AbstractControl.status}\n *\n * @param opts Configuration options that determine how the control propagates changes and\n * emits events after marking is applied.\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false.\n * * `emitEvent`: When true or not supplied (the default), the `statusChanges`\n * observable emits an event with the latest status the control is marked pending.\n * When false, no events are emitted.\n *\n */\n markAsPending(opts = {}) {\n this.status = PENDING;\n if (opts.emitEvent !== false) {\n this.statusChanges.emit(this.status);\n }\n if (this._parent && !opts.onlySelf) {\n this._parent.markAsPending(opts);\n }\n }\n /**\n * Disables the control. This means the control is exempt from validation checks and\n * excluded from the aggregate value of any parent. Its status is `DISABLED`.\n *\n * If the control has children, all children are also disabled.\n *\n * @see {@link AbstractControl.status}\n *\n * @param opts Configuration options that determine how the control propagates\n * changes and emits events after the control is disabled.\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control is disabled.\n * When false, no events are emitted.\n */\n disable(opts = {}) {\n // If parent has been marked artificially dirty we don't want to re-calculate the\n // parent's dirtiness based on the children.\n const skipPristineCheck = this._parentMarkedDirty(opts.onlySelf);\n this.status = DISABLED;\n this.errors = null;\n this._forEachChild((control) => {\n control.disable({ ...opts, onlySelf: true });\n });\n this._updateValue();\n if (opts.emitEvent !== false) {\n this.valueChanges.emit(this.value);\n this.statusChanges.emit(this.status);\n }\n this._updateAncestors({ ...opts, skipPristineCheck });\n this._onDisabledChange.forEach((changeFn) => changeFn(true));\n }\n /**\n * Enables the control. This means the control is included in validation checks and\n * the aggregate value of its parent. Its status recalculates based on its value and\n * its validators.\n *\n * By default, if the control has children, all children are enabled.\n *\n * @see {@link AbstractControl.status}\n *\n * @param opts Configure options that control how the control propagates changes and\n * emits events when marked as untouched\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control is enabled.\n * When false, no events are emitted.\n */\n enable(opts = {}) {\n // If parent has been marked artificially dirty we don't want to re-calculate the\n // parent's dirtiness based on the children.\n const skipPristineCheck = this._parentMarkedDirty(opts.onlySelf);\n this.status = VALID;\n this._forEachChild((control) => {\n control.enable({ ...opts, onlySelf: true });\n });\n this.updateValueAndValidity({ onlySelf: true, emitEvent: opts.emitEvent });\n this._updateAncestors({ ...opts, skipPristineCheck });\n this._onDisabledChange.forEach((changeFn) => changeFn(false));\n }\n _updateAncestors(opts) {\n if (this._parent && !opts.onlySelf) {\n this._parent.updateValueAndValidity(opts);\n if (!opts.skipPristineCheck) {\n this._parent._updatePristine();\n }\n this._parent._updateTouched();\n }\n }\n /**\n * Sets the parent of the control\n *\n * @param parent The new parent.\n */\n setParent(parent) {\n this._parent = parent;\n }\n /**\n * The raw value of this control. For most control implementations, the raw value will include\n * disabled children.\n */\n getRawValue() {\n return this.value;\n }\n /**\n * Recalculates the value and validation status of the control.\n *\n * By default, it also updates the value and validity of its ancestors.\n *\n * @param opts Configuration options determine how the control propagates changes and emits events\n * after updates and validity checks are applied.\n * * `onlySelf`: When true, only update this control. When false or not supplied,\n * update all direct ancestors. Default is false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control is updated.\n * When false, no events are emitted.\n */\n updateValueAndValidity(opts = {}) {\n this._setInitialStatus();\n this._updateValue();\n if (this.enabled) {\n this._cancelExistingSubscription();\n this.errors = this._runValidator();\n this.status = this._calculateStatus();\n if (this.status === VALID || this.status === PENDING) {\n this._runAsyncValidator(opts.emitEvent);\n }\n }\n if (opts.emitEvent !== false) {\n this.valueChanges.emit(this.value);\n this.statusChanges.emit(this.status);\n }\n if (this._parent && !opts.onlySelf) {\n this._parent.updateValueAndValidity(opts);\n }\n }\n /** @internal */\n _updateTreeValidity(opts = { emitEvent: true }) {\n this._forEachChild((ctrl) => ctrl._updateTreeValidity(opts));\n this.updateValueAndValidity({ onlySelf: true, emitEvent: opts.emitEvent });\n }\n _setInitialStatus() {\n this.status = this._allControlsDisabled() ? DISABLED : VALID;\n }\n _runValidator() {\n return this.validator ? this.validator(this) : null;\n }\n _runAsyncValidator(emitEvent) {\n if (this.asyncValidator) {\n this.status = PENDING;\n this._hasOwnPendingAsyncValidator = true;\n const obs = toObservable(this.asyncValidator(this));\n this._asyncValidationSubscription = obs.subscribe((errors) => {\n this._hasOwnPendingAsyncValidator = false;\n // This will trigger the recalculation of the validation status, which depends on\n // the state of the asynchronous validation (whether it is in progress or not). So, it is\n // necessary that we have updated the `_hasOwnPendingAsyncValidator` boolean flag first.\n this.setErrors(errors, { emitEvent });\n });\n }\n }\n _cancelExistingSubscription() {\n if (this._asyncValidationSubscription) {\n this._asyncValidationSubscription.unsubscribe();\n this._hasOwnPendingAsyncValidator = false;\n }\n }\n /**\n * Sets errors on a form control when running validations manually, rather than automatically.\n *\n * Calling `setErrors` also updates the validity of the parent control.\n *\n * @param opts Configuration options that determine how the control propagates\n * changes and emits events after the control errors are set.\n * * `emitEvent`: When true or not supplied (the default), the `statusChanges`\n * observable emits an event after the errors are set.\n *\n * @usageNotes\n *\n * ### Manually set the errors for a control\n *\n * ```\n * const login = new FormControl('someLogin');\n * login.setErrors({\n * notUnique: true\n * });\n *\n * expect(login.valid).toEqual(false);\n * expect(login.errors).toEqual({ notUnique: true });\n *\n * login.setValue('someOtherLogin');\n *\n * expect(login.valid).toEqual(true);\n * ```\n */\n setErrors(errors, opts = {}) {\n this.errors = errors;\n this._updateControlsErrors(opts.emitEvent !== false);\n }\n /**\n * Retrieves a child control given the control's name or path.\n *\n * @param path A dot-delimited string or array of string/number values that define the path to the\n * control. If a string is provided, passing it as a string literal will result in improved type\n * information. Likewise, if an array is provided, passing it `as const` will cause improved type\n * information to be available.\n *\n * @usageNotes\n * ### Retrieve a nested control\n *\n * For example, to get a `name` control nested within a `person` sub-group:\n *\n * * `this.form.get('person.name');`\n *\n * -OR-\n *\n * * `this.form.get(['person', 'name'] as const);` // `as const` gives improved typings\n *\n * ### Retrieve a control in a FormArray\n *\n * When accessing an element inside a FormArray, you can use an element index.\n * For example, to get a `price` control from the first element in an `items` array you can use:\n *\n * * `this.form.get('items.0.price');`\n *\n * -OR-\n *\n * * `this.form.get(['items', 0, 'price']);`\n */\n get(path) {\n let currPath = path;\n if (currPath == null)\n return null;\n if (!Array.isArray(currPath))\n currPath = currPath.split('.');\n if (currPath.length === 0)\n return null;\n return currPath.reduce((control, name) => control && control._find(name), this);\n }\n /**\n * @description\n * Reports error data for the control with the given path.\n *\n * @param errorCode The code of the error to check\n * @param path A list of control names that designates how to move from the current control\n * to the control that should be queried for errors.\n *\n * @usageNotes\n * For example, for the following `FormGroup`:\n *\n * ```\n * form = new FormGroup({\n * address: new FormGroup({ street: new FormControl() })\n * });\n * ```\n *\n * The path to the 'street' control from the root form would be 'address' -> 'street'.\n *\n * It can be provided to this method in one of two formats:\n *\n * 1. An array of string control names, e.g. `['address', 'street']`\n * 1. A period-delimited list of control names in one string, e.g. `'address.street'`\n *\n * @returns error data for that particular error. If the control or error is not present,\n * null is returned.\n */\n getError(errorCode, path) {\n const control = path ? this.get(path) : this;\n return control && control.errors ? control.errors[errorCode] : null;\n }\n /**\n * @description\n * Reports whether the control with the given path has the error specified.\n *\n * @param errorCode The code of the error to check\n * @param path A list of control names that designates how to move from the current control\n * to the control that should be queried for errors.\n *\n * @usageNotes\n * For example, for the following `FormGroup`:\n *\n * ```\n * form = new FormGroup({\n * address: new FormGroup({ street: new FormControl() })\n * });\n * ```\n *\n * The path to the 'street' control from the root form would be 'address' -> 'street'.\n *\n * It can be provided to this method in one of two formats:\n *\n * 1. An array of string control names, e.g. `['address', 'street']`\n * 1. A period-delimited list of control names in one string, e.g. `'address.street'`\n *\n * If no path is given, this method checks for the error on the current control.\n *\n * @returns whether the given error is present in the control at the given path.\n *\n * If the control is not present, false is returned.\n */\n hasError(errorCode, path) {\n return !!this.getError(errorCode, path);\n }\n /**\n * Retrieves the top-level ancestor of this control.\n */\n get root() {\n let x = this;\n while (x._parent) {\n x = x._parent;\n }\n return x;\n }\n /** @internal */\n _updateControlsErrors(emitEvent) {\n this.status = this._calculateStatus();\n if (emitEvent) {\n this.statusChanges.emit(this.status);\n }\n if (this._parent) {\n this._parent._updateControlsErrors(emitEvent);\n }\n }\n /** @internal */\n _initObservables() {\n this.valueChanges = new EventEmitter();\n this.statusChanges = new EventEmitter();\n }\n _calculateStatus() {\n if (this._allControlsDisabled())\n return DISABLED;\n if (this.errors)\n return INVALID;\n if (this._hasOwnPendingAsyncValidator || this._anyControlsHaveStatus(PENDING))\n return PENDING;\n if (this._anyControlsHaveStatus(INVALID))\n return INVALID;\n return VALID;\n }\n /** @internal */\n _anyControlsHaveStatus(status) {\n return this._anyControls((control) => control.status === status);\n }\n /** @internal */\n _anyControlsDirty() {\n return this._anyControls((control) => control.dirty);\n }\n /** @internal */\n _anyControlsTouched() {\n return this._anyControls((control) => control.touched);\n }\n /** @internal */\n _updatePristine(opts = {}) {\n this.pristine = !this._anyControlsDirty();\n if (this._parent && !opts.onlySelf) {\n this._parent._updatePristine(opts);\n }\n }\n /** @internal */\n _updateTouched(opts = {}) {\n this.touched = this._anyControlsTouched();\n if (this._parent && !opts.onlySelf) {\n this._parent._updateTouched(opts);\n }\n }\n /** @internal */\n _registerOnCollectionChange(fn) {\n this._onCollectionChange = fn;\n }\n /** @internal */\n _setUpdateStrategy(opts) {\n if (isOptionsObj(opts) && opts.updateOn != null) {\n this._updateOn = opts.updateOn;\n }\n }\n /**\n * Check to see if parent has been marked artificially dirty.\n *\n * @internal\n */\n _parentMarkedDirty(onlySelf) {\n const parentDirty = this._parent && this._parent.dirty;\n return !onlySelf && !!parentDirty && !this._parent._anyControlsDirty();\n }\n /** @internal */\n _find(name) {\n return null;\n }\n /**\n * Internal implementation of the `setValidators` method. Needs to be separated out into a\n * different method, because it is called in the constructor and it can break cases where\n * a control is extended.\n */\n _assignValidators(validators) {\n this._rawValidators = Array.isArray(validators) ? validators.slice() : validators;\n this._composedValidatorFn = coerceToValidator(this._rawValidators);\n }\n /**\n * Internal implementation of the `setAsyncValidators` method. Needs to be separated out into a\n * different method, because it is called in the constructor and it can break cases where\n * a control is extended.\n */\n _assignAsyncValidators(validators) {\n this._rawAsyncValidators = Array.isArray(validators) ? validators.slice() : validators;\n this._composedAsyncValidatorFn = coerceToAsyncValidator(this._rawAsyncValidators);\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Tracks the value and validity state of a group of `FormControl` instances.\n *\n * A `FormGroup` aggregates the values of each child `FormControl` into one object,\n * with each control name as the key. It calculates its status by reducing the status values\n * of its children. For example, if one of the controls in a group is invalid, the entire\n * group becomes invalid.\n *\n * `FormGroup` is one of the four fundamental building blocks used to define forms in Angular,\n * along with `FormControl`, `FormArray`, and `FormRecord`.\n *\n * When instantiating a `FormGroup`, pass in a collection of child controls as the first\n * argument. The key for each child registers the name for the control.\n *\n * `FormGroup` is intended for use cases where the keys are known ahead of time.\n * If you need to dynamically add and remove controls, use {@link FormRecord} instead.\n *\n * `FormGroup` accepts an optional type parameter `TControl`, which is an object type with inner\n * control types as values.\n *\n * @usageNotes\n *\n * ### Create a form group with 2 controls\n *\n * ```\n * const form = new FormGroup({\n * first: new FormControl('Nancy', Validators.minLength(2)),\n * last: new FormControl('Drew'),\n * });\n *\n * console.log(form.value); // {first: 'Nancy', last; 'Drew'}\n * console.log(form.status); // 'VALID'\n * ```\n *\n * ### The type argument, and optional controls\n *\n * `FormGroup` accepts one generic argument, which is an object containing its inner controls.\n * This type will usually be inferred automatically, but you can always specify it explicitly if you\n * wish.\n *\n * If you have controls that are optional (i.e. they can be removed, you can use the `?` in the\n * type):\n *\n * ```\n * const form = new FormGroup<{\n * first: FormControl<string|null>,\n * middle?: FormControl<string|null>, // Middle name is optional.\n * last: FormControl<string|null>,\n * }>({\n * first: new FormControl('Nancy'),\n * last: new FormControl('Drew'),\n * });\n * ```\n *\n * ### Create a form group with a group-level validator\n *\n * You include group-level validators as the second arg, or group-level async\n * validators as the third arg. These come in handy when you want to perform validation\n * that considers the value of more than one child control.\n *\n * ```\n * const form = new FormGroup({\n * password: new FormControl('', Validators.minLength(2)),\n * passwordConfirm: new FormControl('', Validators.minLength(2)),\n * }, passwordMatchValidator);\n *\n *\n * function passwordMatchValidator(g: FormGroup) {\n * return g.get('password').value === g.get('passwordConfirm').value\n * ? null : {'mismatch': true};\n * }\n * ```\n *\n * Like `FormControl` instances, you choose to pass in\n * validators and async validators as part of an options object.\n *\n * ```\n * const form = new FormGroup({\n * password: new FormControl('')\n * passwordConfirm: new FormControl('')\n * }, { validators: passwordMatchValidator, asyncValidators: otherValidator });\n * ```\n *\n * ### Set the updateOn property for all controls in a form group\n *\n * The options object is used to set a default value for each child\n * control's `updateOn` property. If you set `updateOn` to `'blur'` at the\n * group level, all child controls default to 'blur', unless the child\n * has explicitly specified a different `updateOn` value.\n *\n * ```ts\n * const c = new FormGroup({\n * one: new FormControl()\n * }, { updateOn: 'blur' });\n * ```\n *\n * ### Using a FormGroup with optional controls\n *\n * It is possible to have optional controls in a FormGroup. An optional control can be removed later\n * using `removeControl`, and can be omitted when calling `reset`. Optional controls must be\n * declared optional in the group's type.\n *\n * ```ts\n * const c = new FormGroup<{one?: FormControl<string>}>({\n * one: new FormControl('')\n * });\n * ```\n *\n * Notice that `c.value.one` has type `string|null|undefined`. This is because calling `c.reset({})`\n * without providing the optional key `one` will cause it to become `null`.\n *\n * @publicApi\n */\nclass FormGroup extends AbstractControl {\n /**\n * Creates a new `FormGroup` instance.\n *\n * @param controls A collection of child controls. The key for each child is the name\n * under which it is registered.\n *\n * @param validatorOrOpts A synchronous validator function, or an array of\n * such functions, or an `AbstractControlOptions` object that contains validation functions\n * and a validation trigger.\n *\n * @param asyncValidator A single async validator or array of async validator functions\n *\n */\n constructor(controls, validatorOrOpts, asyncValidator) {\n super(pickValidators(validatorOrOpts), pickAsyncValidators(asyncValidator, validatorOrOpts));\n this.controls = controls;\n this._initObservables();\n this._setUpdateStrategy(validatorOrOpts);\n this._setUpControls();\n this.updateValueAndValidity({\n onlySelf: true,\n // If `asyncValidator` is present, it will trigger control status change from `PENDING` to\n // `VALID` or `INVALID`. The status should be broadcasted via the `statusChanges` observable,\n // so we set `emitEvent` to `true` to allow that during the control creation process.\n emitEvent: !!this.asyncValidator\n });\n }\n registerControl(name, control) {\n if (this.controls[name])\n return this.controls[name];\n this.controls[name] = control;\n control.setParent(this);\n control._registerOnCollectionChange(this._onCollectionChange);\n return control;\n }\n addControl(name, control, options = {}) {\n this.registerControl(name, control);\n this.updateValueAndValidity({ emitEvent: options.emitEvent });\n this._onCollectionChange();\n }\n /**\n * Remove a control from this group. In a strongly-typed group, required controls cannot be\n * removed.\n *\n * This method also updates the value and validity of the control.\n *\n * @param name The control name to remove from the collection\n * @param options Specifies whether this FormGroup instance should emit events after a\n * control is removed.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges` observables emit events with the latest status and value when the control is\n * removed. When false, no events are emitted.\n */\n removeControl(name, options = {}) {\n if (this.controls[name])\n this.controls[name]._registerOnCollectionChange(() => { });\n delete (this.controls[name]);\n this.updateValueAndValidity({ emitEvent: options.emitEvent });\n this._onCollectionChange();\n }\n setControl(name, control, options = {}) {\n if (this.controls[name])\n this.controls[name]._registerOnCollectionChange(() => { });\n delete (this.controls[name]);\n if (control)\n this.registerControl(name, control);\n this.updateValueAndValidity({ emitEvent: options.emitEvent });\n this._onCollectionChange();\n }\n contains(controlName) {\n return this.controls.hasOwnProperty(controlName) && this.controls[controlName].enabled;\n }\n /**\n * Sets the value of the `FormGroup`. It accepts an object that matches\n * the structure of the group, with control names as keys.\n *\n * @usageNotes\n * ### Set the complete value for the form group\n *\n * ```\n * const form = new FormGroup({\n * first: new FormControl(),\n * last: new FormControl()\n * });\n *\n * console.log(form.value); // {first: null, last: null}\n *\n * form.setValue({first: 'Nancy', last: 'Drew'});\n * console.log(form.value); // {first: 'Nancy', last: 'Drew'}\n * ```\n *\n * @throws When strict checks fail, such as setting the value of a control\n * that doesn't exist or if you exclude a value of a control that does exist.\n *\n * @param value The new value for the control that matches the structure of the group.\n * @param options Configuration options that determine how the control propagates changes\n * and emits events after the value changes.\n * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n * updateValueAndValidity} method.\n *\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is\n * false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control value is updated.\n * When false, no events are emitted.\n */\n setValue(value, options = {}) {\n assertAllValuesPresent(this, true, value);\n Object.keys(value).forEach(name => {\n assertControlPresent(this, true, name);\n this.controls[name].setValue(value[name], { onlySelf: true, emitEvent: options.emitEvent });\n });\n this.updateValueAndValidity(options);\n }\n /**\n * Patches the value of the `FormGroup`. It accepts an object with control\n * names as keys, and does its best to match the values to the correct controls\n * in the group.\n *\n * It accepts both super-sets and sub-sets of the group without throwing an error.\n *\n * @usageNotes\n * ### Patch the value for a form group\n *\n * ```\n * const form = new FormGroup({\n * first: new FormControl(),\n * last: new FormControl()\n * });\n * console.log(form.value); // {first: null, last: null}\n *\n * form.patchValue({first: 'Nancy'});\n * console.log(form.value); // {first: 'Nancy', last: null}\n * ```\n *\n * @param value The object that matches the structure of the group.\n * @param options Configuration options that determine how the control propagates changes and\n * emits events after the value is patched.\n * * `onlySelf`: When true, each change only affects this control and not its parent. Default is\n * true.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges` observables emit events with the latest status and value when the control value\n * is updated. When false, no events are emitted. The configuration options are passed to\n * the {@link AbstractControl#updateValueAndValidity updateValueAndValidity} method.\n */\n patchValue(value, options = {}) {\n // Even though the `value` argument type doesn't allow `null` and `undefined` values, the\n // `patchValue` can be called recursively and inner data structures might have these values, so\n // we just ignore such cases when a field containing FormGroup instance receives `null` or\n // `undefined` as a value.\n if (value == null /* both `null` and `undefined` */)\n return;\n Object.keys(value).forEach(name => {\n // The compiler cannot see through the uninstantiated conditional type of `this.controls`, so\n // `as any` is required.\n const control = this.controls[name];\n if (control) {\n control.patchValue(\n /* Guaranteed to be present, due to the outer forEach. */ value[name], { onlySelf: true, emitEvent: options.emitEvent });\n }\n });\n this.updateValueAndValidity(options);\n }\n /**\n * Resets the `FormGroup`, marks all descendants `pristine` and `untouched` and sets\n * the value of all descendants to their default values, or null if no defaults were provided.\n *\n * You reset to a specific form state by passing in a map of states\n * that matches the structure of your form, with control names as keys. The state\n * is a standalone value or a form state object with both a value and a disabled\n * status.\n *\n * @param value Resets the control with an initial value,\n * or an object that defines the initial value and disabled state.\n *\n * @param options Configuration options that determine how the control propagates changes\n * and emits events when the group is reset.\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is\n * false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control is reset.\n * When false, no events are emitted.\n * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n * updateValueAndValidity} method.\n *\n * @usageNotes\n *\n * ### Reset the form group values\n *\n * ```ts\n * const form = new FormGroup({\n * first: new FormControl('first name'),\n * last: new FormControl('last name')\n * });\n *\n * console.log(form.value); // {first: 'first name', last: 'last name'}\n *\n * form.reset({ first: 'name', last: 'last name' });\n *\n * console.log(form.value); // {first: 'name', last: 'last name'}\n * ```\n *\n * ### Reset the form group values and disabled status\n *\n * ```\n * const form = new FormGroup({\n * first: new FormControl('first name'),\n * last: new FormControl('last name')\n * });\n *\n * form.reset({\n * first: {value: 'name', disabled: true},\n * last: 'last'\n * });\n *\n * console.log(form.value); // {last: 'last'}\n * console.log(form.get('first').status); // 'DISABLED'\n * ```\n */\n reset(value = {}, options = {}) {\n this._forEachChild((control, name) => {\n control.reset(value[name], { onlySelf: true, emitEvent: options.emitEvent });\n });\n this._updatePristine(options);\n this._updateTouched(options);\n this.updateValueAndValidity(options);\n }\n /**\n * The aggregate value of the `FormGroup`, including any disabled controls.\n *\n * Retrieves all values regardless of disabled status.\n */\n getRawValue() {\n return this._reduceChildren({}, (acc, control, name) => {\n acc[name] = control.getRawValue();\n return acc;\n });\n }\n /** @internal */\n _syncPendingControls() {\n let subtreeUpdated = this._reduceChildren(false, (updated, child) => {\n return child._syncPendingControls() ? true : updated;\n });\n if (subtreeUpdated)\n this.updateValueAndValidity({ onlySelf: true });\n return subtreeUpdated;\n }\n /** @internal */\n _forEachChild(cb) {\n Object.keys(this.controls).forEach(key => {\n // The list of controls can change (for ex. controls might be removed) while the loop\n // is running (as a result of invoking Forms API in `valueChanges` subscription), so we\n // have to null check before invoking the callback.\n const control = this.controls[key];\n control && cb(control, key);\n });\n }\n /** @internal */\n _setUpControls() {\n this._forEachChild((control) => {\n control.setParent(this);\n control._registerOnCollectionChange(this._onCollectionChange);\n });\n }\n /** @internal */\n _updateValue() {\n this.value = this._reduceValue();\n }\n /** @internal */\n _anyControls(condition) {\n for (const [controlName, control] of Object.entries(this.controls)) {\n if (this.contains(controlName) && condition(control)) {\n return true;\n }\n }\n return false;\n }\n /** @internal */\n _reduceValue() {\n let acc = {};\n return this._reduceChildren(acc, (acc, control, name) => {\n if (control.enabled || this.disabled) {\n acc[name] = control.value;\n }\n return acc;\n });\n }\n /** @internal */\n _reduceChildren(initValue, fn) {\n let res = initValue;\n this._forEachChild((control, name) => {\n res = fn(res, control, name);\n });\n return res;\n }\n /** @internal */\n _allControlsDisabled() {\n for (const controlName of Object.keys(this.controls)) {\n if (this.controls[controlName].enabled) {\n return false;\n }\n }\n return Object.keys(this.controls).length > 0 || this.disabled;\n }\n /** @internal */\n _find(name) {\n return this.controls.hasOwnProperty(name) ?\n this.controls[name] :\n null;\n }\n}\nconst UntypedFormGroup = FormGroup;\n/**\n * @description\n * Asserts that the given control is an instance of `FormGroup`\n *\n * @publicApi\n */\nconst isFormGroup = (control) => control instanceof FormGroup;\n/**\n * Tracks the value and validity state of a collection of `FormControl` instances, each of which has\n * the same value type.\n *\n * `FormRecord` is very similar to {@link FormGroup}, except it can be used with a dynamic keys,\n * with controls added and removed as needed.\n *\n * `FormRecord` accepts one generic argument, which describes the type of the controls it contains.\n *\n * @usageNotes\n *\n * ```\n * let numbers = new FormRecord({bill: new FormControl('415-123-456')});\n * numbers.addControl('bob', new FormControl('415-234-567'));\n * numbers.removeControl('bill');\n * ```\n *\n * @publicApi\n */\nclass FormRecord extends FormGroup {\n}\n/**\n * @description\n * Asserts that the given control is an instance of `FormRecord`\n *\n * @publicApi\n */\nconst isFormRecord = (control) => control instanceof FormRecord;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Token to provide to allow SetDisabledState to always be called when a CVA is added, regardless of\n * whether the control is disabled or enabled.\n *\n * @see `FormsModule.withConfig`\n */\nconst CALL_SET_DISABLED_STATE = new InjectionToken('CallSetDisabledState', { providedIn: 'root', factory: () => setDisabledStateDefault });\n/**\n * Whether to use the fixed setDisabledState behavior by default.\n */\nconst setDisabledStateDefault = 'always';\nfunction controlPath(name, parent) {\n return [...parent.path, name];\n}\n/**\n * Links a Form control and a Form directive by setting up callbacks (such as `onChange`) on both\n * instances. This function is typically invoked when form directive is being initialized.\n *\n * @param control Form control instance that should be linked.\n * @param dir Directive that should be linked with a given control.\n */\nfunction setUpControl(control, dir, callSetDisabledState = setDisabledStateDefault) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!control)\n _throwError(dir, 'Cannot find control with');\n if (!dir.valueAccessor)\n _throwMissingValueAccessorError(dir);\n }\n setUpValidators(control, dir);\n dir.valueAccessor.writeValue(control.value);\n // The legacy behavior only calls the CVA's `setDisabledState` if the control is disabled.\n // If the `callSetDisabledState` option is set to `always`, then this bug is fixed and\n // the method is always called.\n if (control.disabled || callSetDisabledState === 'always') {\n dir.valueAccessor.setDisabledState?.(control.disabled);\n }\n setUpViewChangePipeline(control, dir);\n setUpModelChangePipeline(control, dir);\n setUpBlurPipeline(control, dir);\n setUpDisabledChangeHandler(control, dir);\n}\n/**\n * Reverts configuration performed by the `setUpControl` control function.\n * Effectively disconnects form control with a given form directive.\n * This function is typically invoked when corresponding form directive is being destroyed.\n *\n * @param control Form control which should be cleaned up.\n * @param dir Directive that should be disconnected from a given control.\n * @param validateControlPresenceOnChange Flag that indicates whether onChange handler should\n * contain asserts to verify that it's not called once directive is destroyed. We need this flag\n * to avoid potentially breaking changes caused by better control cleanup introduced in #39235.\n */\nfunction cleanUpControl(control, dir, validateControlPresenceOnChange = true) {\n const noop = () => {\n if (validateControlPresenceOnChange && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n _noControlError(dir);\n }\n };\n // The `valueAccessor` field is typically defined on FromControl and FormControlName directive\n // instances and there is a logic in `selectValueAccessor` function that throws if it's not the\n // case. We still check the presence of `valueAccessor` before invoking its methods to make sure\n // that cleanup works correctly if app code or tests are setup to ignore the error thrown from\n // `selectValueAccessor`. See https://github.com/angular/angular/issues/40521.\n if (dir.valueAccessor) {\n dir.valueAccessor.registerOnChange(noop);\n dir.valueAccessor.registerOnTouched(noop);\n }\n cleanUpValidators(control, dir);\n if (control) {\n dir._invokeOnDestroyCallbacks();\n control._registerOnCollectionChange(() => { });\n }\n}\nfunction registerOnValidatorChange(validators, onChange) {\n validators.forEach((validator) => {\n if (validator.registerOnValidatorChange)\n validator.registerOnValidatorChange(onChange);\n });\n}\n/**\n * Sets up disabled change handler function on a given form control if ControlValueAccessor\n * associated with a given directive instance supports the `setDisabledState` call.\n *\n * @param control Form control where disabled change handler should be setup.\n * @param dir Corresponding directive instance associated with this control.\n */\nfunction setUpDisabledChangeHandler(control, dir) {\n if (dir.valueAccessor.setDisabledState) {\n const onDisabledChange = (isDisabled) => {\n dir.valueAccessor.setDisabledState(isDisabled);\n };\n control.registerOnDisabledChange(onDisabledChange);\n // Register a callback function to cleanup disabled change handler\n // from a control instance when a directive is destroyed.\n dir._registerOnDestroy(() => {\n control._unregisterOnDisabledChange(onDisabledChange);\n });\n }\n}\n/**\n * Sets up sync and async directive validators on provided form control.\n * This function merges validators from the directive into the validators of the control.\n *\n * @param control Form control where directive validators should be setup.\n * @param dir Directive instance that contains validators to be setup.\n */\nfunction setUpValidators(control, dir) {\n const validators = getControlValidators(control);\n if (dir.validator !== null) {\n control.setValidators(mergeValidators(validators, dir.validator));\n }\n else if (typeof validators === 'function') {\n // If sync validators are represented by a single validator function, we force the\n // `Validators.compose` call to happen by executing the `setValidators` function with\n // an array that contains that function. We need this to avoid possible discrepancies in\n // validators behavior, so sync validators are always processed by the `Validators.compose`.\n // Note: we should consider moving this logic inside the `setValidators` function itself, so we\n // have consistent behavior on AbstractControl API level. The same applies to the async\n // validators logic below.\n control.setValidators([validators]);\n }\n const asyncValidators = getControlAsyncValidators(control);\n if (dir.asyncValidator !== null) {\n control.setAsyncValidators(mergeValidators(asyncValidators, dir.asyncValidator));\n }\n else if (typeof asyncValidators === 'function') {\n control.setAsyncValidators([asyncValidators]);\n }\n // Re-run validation when validator binding changes, e.g. minlength=3 -> minlength=4\n const onValidatorChange = () => control.updateValueAndValidity();\n registerOnValidatorChange(dir._rawValidators, onValidatorChange);\n registerOnValidatorChange(dir._rawAsyncValidators, onValidatorChange);\n}\n/**\n * Cleans up sync and async directive validators on provided form control.\n * This function reverts the setup performed by the `setUpValidators` function, i.e.\n * removes directive-specific validators from a given control instance.\n *\n * @param control Form control from where directive validators should be removed.\n * @param dir Directive instance that contains validators to be removed.\n * @returns true if a control was updated as a result of this action.\n */\nfunction cleanUpValidators(control, dir) {\n let isControlUpdated = false;\n if (control !== null) {\n if (dir.validator !== null) {\n const validators = getControlValidators(control);\n if (Array.isArray(validators) && validators.length > 0) {\n // Filter out directive validator function.\n const updatedValidators = validators.filter((validator) => validator !== dir.validator);\n if (updatedValidators.length !== validators.length) {\n isControlUpdated = true;\n control.setValidators(updatedValidators);\n }\n }\n }\n if (dir.asyncValidator !== null) {\n const asyncValidators = getControlAsyncValidators(control);\n if (Array.isArray(asyncValidators) && asyncValidators.length > 0) {\n // Filter out directive async validator function.\n const updatedAsyncValidators = asyncValidators.filter((asyncValidator) => asyncValidator !== dir.asyncValidator);\n if (updatedAsyncValidators.length !== asyncValidators.length) {\n isControlUpdated = true;\n control.setAsyncValidators(updatedAsyncValidators);\n }\n }\n }\n }\n // Clear onValidatorChange callbacks by providing a noop function.\n const noop = () => { };\n registerOnValidatorChange(dir._rawValidators, noop);\n registerOnValidatorChange(dir._rawAsyncValidators, noop);\n return isControlUpdated;\n}\nfunction setUpViewChangePipeline(control, dir) {\n dir.valueAccessor.registerOnChange((newValue) => {\n control._pendingValue = newValue;\n control._pendingChange = true;\n control._pendingDirty = true;\n if (control.updateOn === 'change')\n updateControl(control, dir);\n });\n}\nfunction setUpBlurPipeline(control, dir) {\n dir.valueAccessor.registerOnTouched(() => {\n control._pendingTouched = true;\n if (control.updateOn === 'blur' && control._pendingChange)\n updateControl(control, dir);\n if (control.updateOn !== 'submit')\n control.markAsTouched();\n });\n}\nfunction updateControl(control, dir) {\n if (control._pendingDirty)\n control.markAsDirty();\n control.setValue(control._pendingValue, { emitModelToViewChange: false });\n dir.viewToModelUpdate(control._pendingValue);\n control._pendingChange = false;\n}\nfunction setUpModelChangePipeline(control, dir) {\n const onChange = (newValue, emitModelEvent) => {\n // control -> view\n dir.valueAccessor.writeValue(newValue);\n // control -> ngModel\n if (emitModelEvent)\n dir.viewToModelUpdate(newValue);\n };\n control.registerOnChange(onChange);\n // Register a callback function to cleanup onChange handler\n // from a control instance when a directive is destroyed.\n dir._registerOnDestroy(() => {\n control._unregisterOnChange(onChange);\n });\n}\n/**\n * Links a FormGroup or FormArray instance and corresponding Form directive by setting up validators\n * present in the view.\n *\n * @param control FormGroup or FormArray instance that should be linked.\n * @param dir Directive that provides view validators.\n */\nfunction setUpFormContainer(control, dir) {\n if (control == null && (typeof ngDevMode === 'undefined' || ngDevMode))\n _throwError(dir, 'Cannot find control with');\n setUpValidators(control, dir);\n}\n/**\n * Reverts the setup performed by the `setUpFormContainer` function.\n *\n * @param control FormGroup or FormArray instance that should be cleaned up.\n * @param dir Directive that provided view validators.\n * @returns true if a control was updated as a result of this action.\n */\nfunction cleanUpFormContainer(control, dir) {\n return cleanUpValidators(control, dir);\n}\nfunction _noControlError(dir) {\n return _throwError(dir, 'There is no FormControl instance attached to form control element with');\n}\nfunction _throwError(dir, message) {\n const messageEnd = _describeControlLocation(dir);\n throw new Error(`${message} ${messageEnd}`);\n}\nfunction _describeControlLocation(dir) {\n const path = dir.path;\n if (path && path.length > 1)\n return `path: '${path.join(' -> ')}'`;\n if (path?.[0])\n return `name: '${path}'`;\n return 'unspecified name attribute';\n}\nfunction _throwMissingValueAccessorError(dir) {\n const loc = _describeControlLocation(dir);\n throw new ɵRuntimeError(-1203 /* RuntimeErrorCode.NG_MISSING_VALUE_ACCESSOR */, `No value accessor for form control ${loc}.`);\n}\nfunction _throwInvalidValueAccessorError(dir) {\n const loc = _describeControlLocation(dir);\n throw new ɵRuntimeError(1200 /* RuntimeErrorCode.NG_VALUE_ACCESSOR_NOT_PROVIDED */, `Value accessor was not provided as an array for form control with ${loc}. ` +\n `Check that the \\`NG_VALUE_ACCESSOR\\` token is configured as a \\`multi: true\\` provider.`);\n}\nfunction isPropertyUpdated(changes, viewModel) {\n if (!changes.hasOwnProperty('model'))\n return false;\n const change = changes['model'];\n if (change.isFirstChange())\n return true;\n return !Object.is(viewModel, change.currentValue);\n}\nfunction isBuiltInAccessor(valueAccessor) {\n // Check if a given value accessor is an instance of a class that directly extends\n // `BuiltInControlValueAccessor` one.\n return Object.getPrototypeOf(valueAccessor.constructor) === BuiltInControlValueAccessor;\n}\nfunction syncPendingControls(form, directives) {\n form._syncPendingControls();\n directives.forEach((dir) => {\n const control = dir.control;\n if (control.updateOn === 'submit' && control._pendingChange) {\n dir.viewToModelUpdate(control._pendingValue);\n control._pendingChange = false;\n }\n });\n}\n// TODO: vsavkin remove it once https://github.com/angular/angular/issues/3011 is implemented\nfunction selectValueAccessor(dir, valueAccessors) {\n if (!valueAccessors)\n return null;\n if (!Array.isArray(valueAccessors) && (typeof ngDevMode === 'undefined' || ngDevMode))\n _throwInvalidValueAccessorError(dir);\n let defaultAccessor = undefined;\n let builtinAccessor = undefined;\n let customAccessor = undefined;\n valueAccessors.forEach((v) => {\n if (v.constructor === DefaultValueAccessor) {\n defaultAccessor = v;\n }\n else if (isBuiltInAccessor(v)) {\n if (builtinAccessor && (typeof ngDevMode === 'undefined' || ngDevMode))\n _throwError(dir, 'More than one built-in value accessor matches form control with');\n builtinAccessor = v;\n }\n else {\n if (customAccessor && (typeof ngDevMode === 'undefined' || ngDevMode))\n _throwError(dir, 'More than one custom value accessor matches form control with');\n customAccessor = v;\n }\n });\n if (customAccessor)\n return customAccessor;\n if (builtinAccessor)\n return builtinAccessor;\n if (defaultAccessor)\n return defaultAccessor;\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n _throwError(dir, 'No valid value accessor for form control with');\n }\n return null;\n}\nfunction removeListItem$1(list, el) {\n const index = list.indexOf(el);\n if (index > -1)\n list.splice(index, 1);\n}\n// TODO(kara): remove after deprecation period\nfunction _ngModelWarning(name, type, instance, warningConfig) {\n if (warningConfig === 'never')\n return;\n if (((warningConfig === null || warningConfig === 'once') && !type._ngModelWarningSentOnce) ||\n (warningConfig === 'always' && !instance._ngModelWarningSent)) {\n console.warn(ngModelWarning(name));\n type._ngModelWarningSentOnce = true;\n instance._ngModelWarningSent = true;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst formDirectiveProvider$1 = {\n provide: ControlContainer,\n useExisting: forwardRef(() => NgForm)\n};\nconst resolvedPromise$1 = (() => Promise.resolve())();\n/**\n * @description\n * Creates a top-level `FormGroup` instance and binds it to a form\n * to track aggregate form value and validation status.\n *\n * As soon as you import the `FormsModule`, this directive becomes active by default on\n * all `<form>` tags. You don't need to add a special selector.\n *\n * You optionally export the directive into a local template variable using `ngForm` as the key\n * (ex: `#myForm=\"ngForm\"`). This is optional, but useful. Many properties from the underlying\n * `FormGroup` instance are duplicated on the directive itself, so a reference to it\n * gives you access to the aggregate value and validity status of the form, as well as\n * user interaction properties like `dirty` and `touched`.\n *\n * To register child controls with the form, use `NgModel` with a `name`\n * attribute. You may use `NgModelGroup` to create sub-groups within the form.\n *\n * If necessary, listen to the directive's `ngSubmit` event to be notified when the user has\n * triggered a form submission. The `ngSubmit` event emits the original form\n * submission event.\n *\n * In template driven forms, all `<form>` tags are automatically tagged as `NgForm`.\n * To import the `FormsModule` but skip its usage in some forms,\n * for example, to use native HTML5 validation, add the `ngNoForm` and the `<form>`\n * tags won't create an `NgForm` directive. In reactive forms, using `ngNoForm` is\n * unnecessary because the `<form>` tags are inert. In that case, you would\n * refrain from using the `formGroup` directive.\n *\n * @usageNotes\n *\n * ### Listening for form submission\n *\n * The following example shows how to capture the form values from the \"ngSubmit\" event.\n *\n * {@example forms/ts/simpleForm/simple_form_example.ts region='Component'}\n *\n * ### Setting the update options\n *\n * The following example shows you how to change the \"updateOn\" option from its default using\n * ngFormOptions.\n *\n * ```html\n * <form [ngFormOptions]=\"{updateOn: 'blur'}\">\n * <input name=\"one\" ngModel> <!-- this ngModel will update on blur -->\n * </form>\n * ```\n *\n * ### Native DOM validation UI\n *\n * In order to prevent the native DOM form validation UI from interfering with Angular's form\n * validation, Angular automatically adds the `novalidate` attribute on any `<form>` whenever\n * `FormModule` or `ReactiveFormModule` are imported into the application.\n * If you want to explicitly enable native DOM validation UI with Angular forms, you can add the\n * `ngNativeValidate` attribute to the `<form>` element:\n *\n * ```html\n * <form ngNativeValidate>\n * ...\n * </form>\n * ```\n *\n * @ngModule FormsModule\n * @publicApi\n */\nclass NgForm extends ControlContainer {\n constructor(validators, asyncValidators, callSetDisabledState) {\n super();\n this.callSetDisabledState = callSetDisabledState;\n /**\n * @description\n * Returns whether the form submission has been triggered.\n */\n this.submitted = false;\n this._directives = new Set();\n /**\n * @description\n * Event emitter for the \"ngSubmit\" event\n */\n this.ngSubmit = new EventEmitter();\n this.form =\n new FormGroup({}, composeValidators(validators), composeAsyncValidators(asyncValidators));\n }\n /** @nodoc */\n ngAfterViewInit() {\n this._setUpdateStrategy();\n }\n /**\n * @description\n * The directive instance.\n */\n get formDirective() {\n return this;\n }\n /**\n * @description\n * The internal `FormGroup` instance.\n */\n get control() {\n return this.form;\n }\n /**\n * @description\n * Returns an array representing the path to this group. Because this directive\n * always lives at the top level of a form, it is always an empty array.\n */\n get path() {\n return [];\n }\n /**\n * @description\n * Returns a map of the controls in this group.\n */\n get controls() {\n return this.form.controls;\n }\n /**\n * @description\n * Method that sets up the control directive in this group, re-calculates its value\n * and validity, and adds the instance to the internal list of directives.\n *\n * @param dir The `NgModel` directive instance.\n */\n addControl(dir) {\n resolvedPromise$1.then(() => {\n const container = this._findContainer(dir.path);\n dir.control =\n container.registerControl(dir.name, dir.control);\n setUpControl(dir.control, dir, this.callSetDisabledState);\n dir.control.updateValueAndValidity({ emitEvent: false });\n this._directives.add(dir);\n });\n }\n /**\n * @description\n * Retrieves the `FormControl` instance from the provided `NgModel` directive.\n *\n * @param dir The `NgModel` directive instance.\n */\n getControl(dir) {\n return this.form.get(dir.path);\n }\n /**\n * @description\n * Removes the `NgModel` instance from the internal list of directives\n *\n * @param dir The `NgModel` directive instance.\n */\n removeControl(dir) {\n resolvedPromise$1.then(() => {\n const container = this._findContainer(dir.path);\n if (container) {\n container.removeControl(dir.name);\n }\n this._directives.delete(dir);\n });\n }\n /**\n * @description\n * Adds a new `NgModelGroup` directive instance to the form.\n *\n * @param dir The `NgModelGroup` directive instance.\n */\n addFormGroup(dir) {\n resolvedPromise$1.then(() => {\n const container = this._findContainer(dir.path);\n const group = new FormGroup({});\n setUpFormContainer(group, dir);\n container.registerControl(dir.name, group);\n group.updateValueAndValidity({ emitEvent: false });\n });\n }\n /**\n * @description\n * Removes the `NgModelGroup` directive instance from the form.\n *\n * @param dir The `NgModelGroup` directive instance.\n */\n removeFormGroup(dir) {\n resolvedPromise$1.then(() => {\n const container = this._findContainer(dir.path);\n if (container) {\n container.removeControl(dir.name);\n }\n });\n }\n /**\n * @description\n * Retrieves the `FormGroup` for a provided `NgModelGroup` directive instance\n *\n * @param dir The `NgModelGroup` directive instance.\n */\n getFormGroup(dir) {\n return this.form.get(dir.path);\n }\n /**\n * Sets the new value for the provided `NgControl` directive.\n *\n * @param dir The `NgControl` directive instance.\n * @param value The new value for the directive's control.\n */\n updateModel(dir, value) {\n resolvedPromise$1.then(() => {\n const ctrl = this.form.get(dir.path);\n ctrl.setValue(value);\n });\n }\n /**\n * @description\n * Sets the value for this `FormGroup`.\n *\n * @param value The new value\n */\n setValue(value) {\n this.control.setValue(value);\n }\n /**\n * @description\n * Method called when the \"submit\" event is triggered on the form.\n * Triggers the `ngSubmit` emitter to emit the \"submit\" event as its payload.\n *\n * @param $event The \"submit\" event object\n */\n onSubmit($event) {\n this.submitted = true;\n syncPendingControls(this.form, this._directives);\n this.ngSubmit.emit($event);\n // Forms with `method=\"dialog\"` have some special behavior\n // that won't reload the page and that shouldn't be prevented.\n return $event?.target?.method === 'dialog';\n }\n /**\n * @description\n * Method called when the \"reset\" event is triggered on the form.\n */\n onReset() {\n this.resetForm();\n }\n /**\n * @description\n * Resets the form to an initial value and resets its submitted status.\n *\n * @param value The new value for the form.\n */\n resetForm(value = undefined) {\n this.form.reset(value);\n this.submitted = false;\n }\n _setUpdateStrategy() {\n if (this.options && this.options.updateOn != null) {\n this.form._updateOn = this.options.updateOn;\n }\n }\n _findContainer(path) {\n path.pop();\n return path.length ? this.form.get(path) : this.form;\n }\n}\nNgForm.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgForm, deps: [{ token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }, { token: CALL_SET_DISABLED_STATE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nNgForm.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: NgForm, selector: \"form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]\", inputs: { options: [\"ngFormOptions\", \"options\"] }, outputs: { ngSubmit: \"ngSubmit\" }, host: { listeners: { \"submit\": \"onSubmit($event)\", \"reset\": \"onReset()\" } }, providers: [formDirectiveProvider$1], exportAs: [\"ngForm\"], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgForm, decorators: [{\n type: Directive,\n args: [{\n selector: 'form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]',\n providers: [formDirectiveProvider$1],\n host: { '(submit)': 'onSubmit($event)', '(reset)': 'onReset()' },\n outputs: ['ngSubmit'],\n exportAs: 'ngForm'\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_ASYNC_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [CALL_SET_DISABLED_STATE]\n }] }]; }, propDecorators: { options: [{\n type: Input,\n args: ['ngFormOptions']\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction removeListItem(list, el) {\n const index = list.indexOf(el);\n if (index > -1)\n list.splice(index, 1);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction isFormControlState(formState) {\n return typeof formState === 'object' && formState !== null &&\n Object.keys(formState).length === 2 && 'value' in formState && 'disabled' in formState;\n}\nconst FormControl = (class FormControl extends AbstractControl {\n constructor(\n // formState and defaultValue will only be null if T is nullable\n formState = null, validatorOrOpts, asyncValidator) {\n super(pickValidators(validatorOrOpts), pickAsyncValidators(asyncValidator, validatorOrOpts));\n /** @publicApi */\n this.defaultValue = null;\n /** @internal */\n this._onChange = [];\n /** @internal */\n this._pendingChange = false;\n this._applyFormState(formState);\n this._setUpdateStrategy(validatorOrOpts);\n this._initObservables();\n this.updateValueAndValidity({\n onlySelf: true,\n // If `asyncValidator` is present, it will trigger control status change from `PENDING` to\n // `VALID` or `INVALID`.\n // The status should be broadcasted via the `statusChanges` observable, so we set\n // `emitEvent` to `true` to allow that during the control creation process.\n emitEvent: !!this.asyncValidator\n });\n if (isOptionsObj(validatorOrOpts) &&\n (validatorOrOpts.nonNullable || validatorOrOpts.initialValueIsDefault)) {\n if (isFormControlState(formState)) {\n this.defaultValue = formState.value;\n }\n else {\n this.defaultValue = formState;\n }\n }\n }\n setValue(value, options = {}) {\n this.value = this._pendingValue = value;\n if (this._onChange.length && options.emitModelToViewChange !== false) {\n this._onChange.forEach((changeFn) => changeFn(this.value, options.emitViewToModelChange !== false));\n }\n this.updateValueAndValidity(options);\n }\n patchValue(value, options = {}) {\n this.setValue(value, options);\n }\n reset(formState = this.defaultValue, options = {}) {\n this._applyFormState(formState);\n this.markAsPristine(options);\n this.markAsUntouched(options);\n this.setValue(this.value, options);\n this._pendingChange = false;\n }\n /** @internal */\n _updateValue() { }\n /** @internal */\n _anyControls(condition) {\n return false;\n }\n /** @internal */\n _allControlsDisabled() {\n return this.disabled;\n }\n registerOnChange(fn) {\n this._onChange.push(fn);\n }\n /** @internal */\n _unregisterOnChange(fn) {\n removeListItem(this._onChange, fn);\n }\n registerOnDisabledChange(fn) {\n this._onDisabledChange.push(fn);\n }\n /** @internal */\n _unregisterOnDisabledChange(fn) {\n removeListItem(this._onDisabledChange, fn);\n }\n /** @internal */\n _forEachChild(cb) { }\n /** @internal */\n _syncPendingControls() {\n if (this.updateOn === 'submit') {\n if (this._pendingDirty)\n this.markAsDirty();\n if (this._pendingTouched)\n this.markAsTouched();\n if (this._pendingChange) {\n this.setValue(this._pendingValue, { onlySelf: true, emitModelToViewChange: false });\n return true;\n }\n }\n return false;\n }\n _applyFormState(formState) {\n if (isFormControlState(formState)) {\n this.value = this._pendingValue = formState.value;\n formState.disabled ? this.disable({ onlySelf: true, emitEvent: false }) :\n this.enable({ onlySelf: true, emitEvent: false });\n }\n else {\n this.value = this._pendingValue = formState;\n }\n }\n});\nconst UntypedFormControl = FormControl;\n/**\n * @description\n * Asserts that the given control is an instance of `FormControl`\n *\n * @publicApi\n */\nconst isFormControl = (control) => control instanceof FormControl;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description\n * A base class for code shared between the `NgModelGroup` and `FormGroupName` directives.\n *\n * @publicApi\n */\nclass AbstractFormGroupDirective extends ControlContainer {\n /** @nodoc */\n ngOnInit() {\n this._checkParentType();\n // Register the group with its parent group.\n this.formDirective.addFormGroup(this);\n }\n /** @nodoc */\n ngOnDestroy() {\n if (this.formDirective) {\n // Remove the group from its parent group.\n this.formDirective.removeFormGroup(this);\n }\n }\n /**\n * @description\n * The `FormGroup` bound to this directive.\n */\n get control() {\n return this.formDirective.getFormGroup(this);\n }\n /**\n * @description\n * The path to this group from the top-level directive.\n */\n get path() {\n return controlPath(this.name == null ? this.name : this.name.toString(), this._parent);\n }\n /**\n * @description\n * The top-level directive for this group if present, otherwise null.\n */\n get formDirective() {\n return this._parent ? this._parent.formDirective : null;\n }\n /** @internal */\n _checkParentType() { }\n}\nAbstractFormGroupDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: AbstractFormGroupDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nAbstractFormGroupDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: AbstractFormGroupDirective, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: AbstractFormGroupDirective, decorators: [{\n type: Directive\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction modelParentException() {\n return new ɵRuntimeError(1350 /* RuntimeErrorCode.NGMODEL_IN_FORM_GROUP */, `\n ngModel cannot be used to register form controls with a parent formGroup directive. Try using\n formGroup's partner directive \"formControlName\" instead. Example:\n\n ${formControlNameExample}\n\n Or, if you'd like to avoid registering this form control, indicate that it's standalone in ngModelOptions:\n\n Example:\n\n ${ngModelWithFormGroupExample}`);\n}\nfunction formGroupNameException() {\n return new ɵRuntimeError(1351 /* RuntimeErrorCode.NGMODEL_IN_FORM_GROUP_NAME */, `\n ngModel cannot be used to register form controls with a parent formGroupName or formArrayName directive.\n\n Option 1: Use formControlName instead of ngModel (reactive strategy):\n\n ${formGroupNameExample}\n\n Option 2: Update ngModel's parent be ngModelGroup (template-driven strategy):\n\n ${ngModelGroupExample}`);\n}\nfunction missingNameException() {\n return new ɵRuntimeError(1352 /* RuntimeErrorCode.NGMODEL_WITHOUT_NAME */, `If ngModel is used within a form tag, either the name attribute must be set or the form\n control must be defined as 'standalone' in ngModelOptions.\n\n Example 1: <input [(ngModel)]=\"person.firstName\" name=\"first\">\n Example 2: <input [(ngModel)]=\"person.firstName\" [ngModelOptions]=\"{standalone: true}\">`);\n}\nfunction modelGroupParentException() {\n return new ɵRuntimeError(1353 /* RuntimeErrorCode.NGMODELGROUP_IN_FORM_GROUP */, `\n ngModelGroup cannot be used with a parent formGroup directive.\n\n Option 1: Use formGroupName instead of ngModelGroup (reactive strategy):\n\n ${formGroupNameExample}\n\n Option 2: Use a regular form tag instead of the formGroup directive (template-driven strategy):\n\n ${ngModelGroupExample}`);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst modelGroupProvider = {\n provide: ControlContainer,\n useExisting: forwardRef(() => NgModelGroup)\n};\n/**\n * @description\n * Creates and binds a `FormGroup` instance to a DOM element.\n *\n * This directive can only be used as a child of `NgForm` (within `<form>` tags).\n *\n * Use this directive to validate a sub-group of your form separately from the\n * rest of your form, or if some values in your domain model make more sense\n * to consume together in a nested object.\n *\n * Provide a name for the sub-group and it will become the key\n * for the sub-group in the form's full value. If you need direct access, export the directive into\n * a local template variable using `ngModelGroup` (ex: `#myGroup=\"ngModelGroup\"`).\n *\n * @usageNotes\n *\n * ### Consuming controls in a grouping\n *\n * The following example shows you how to combine controls together in a sub-group\n * of the form.\n *\n * {@example forms/ts/ngModelGroup/ng_model_group_example.ts region='Component'}\n *\n * @ngModule FormsModule\n * @publicApi\n */\nclass NgModelGroup extends AbstractFormGroupDirective {\n constructor(parent, validators, asyncValidators) {\n super();\n this._parent = parent;\n this._setValidators(validators);\n this._setAsyncValidators(asyncValidators);\n }\n /** @internal */\n _checkParentType() {\n if (!(this._parent instanceof NgModelGroup) && !(this._parent instanceof NgForm) &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw modelGroupParentException();\n }\n }\n}\nNgModelGroup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgModelGroup, deps: [{ token: ControlContainer, host: true, skipSelf: true }, { token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });\nNgModelGroup.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: NgModelGroup, selector: \"[ngModelGroup]\", inputs: { name: [\"ngModelGroup\", \"name\"] }, providers: [modelGroupProvider], exportAs: [\"ngModelGroup\"], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgModelGroup, decorators: [{\n type: Directive,\n args: [{ selector: '[ngModelGroup]', providers: [modelGroupProvider], exportAs: 'ngModelGroup' }]\n }], ctorParameters: function () { return [{ type: ControlContainer, decorators: [{\n type: Host\n }, {\n type: SkipSelf\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_ASYNC_VALIDATORS]\n }] }]; }, propDecorators: { name: [{\n type: Input,\n args: ['ngModelGroup']\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst formControlBinding$1 = {\n provide: NgControl,\n useExisting: forwardRef(() => NgModel)\n};\n/**\n * `ngModel` forces an additional change detection run when its inputs change:\n * E.g.:\n * ```\n * <div>{{myModel.valid}}</div>\n * <input [(ngModel)]=\"myValue\" #myModel=\"ngModel\">\n * ```\n * I.e. `ngModel` can export itself on the element and then be used in the template.\n * Normally, this would result in expressions before the `input` that use the exported directive\n * to have an old value as they have been\n * dirty checked before. As this is a very common case for `ngModel`, we added this second change\n * detection run.\n *\n * Notes:\n * - this is just one extra run no matter how many `ngModel`s have been changed.\n * - this is a general problem when using `exportAs` for directives!\n */\nconst resolvedPromise = (() => Promise.resolve())();\n/**\n * @description\n * Creates a `FormControl` instance from a domain model and binds it\n * to a form control element.\n *\n * The `FormControl` instance tracks the value, user interaction, and\n * validation status of the control and keeps the view synced with the model. If used\n * within a parent form, the directive also registers itself with the form as a child\n * control.\n *\n * This directive is used by itself or as part of a larger form. Use the\n * `ngModel` selector to activate it.\n *\n * It accepts a domain model as an optional `Input`. If you have a one-way binding\n * to `ngModel` with `[]` syntax, changing the domain model's value in the component\n * class sets the value in the view. If you have a two-way binding with `[()]` syntax\n * (also known as 'banana-in-a-box syntax'), the value in the UI always syncs back to\n * the domain model in your class.\n *\n * To inspect the properties of the associated `FormControl` (like the validity state),\n * export the directive into a local template variable using `ngModel` as the key (ex:\n * `#myVar=\"ngModel\"`). You can then access the control using the directive's `control` property.\n * However, the most commonly used properties (like `valid` and `dirty`) also exist on the control\n * for direct access. See a full list of properties directly available in\n * `AbstractControlDirective`.\n *\n * @see `RadioControlValueAccessor`\n * @see `SelectControlValueAccessor`\n *\n * @usageNotes\n *\n * ### Using ngModel on a standalone control\n *\n * The following examples show a simple standalone control using `ngModel`:\n *\n * {@example forms/ts/simpleNgModel/simple_ng_model_example.ts region='Component'}\n *\n * When using the `ngModel` within `<form>` tags, you'll also need to supply a `name` attribute\n * so that the control can be registered with the parent form under that name.\n *\n * In the context of a parent form, it's often unnecessary to include one-way or two-way binding,\n * as the parent form syncs the value for you. You access its properties by exporting it into a\n * local template variable using `ngForm` such as (`#f=\"ngForm\"`). Use the variable where\n * needed on form submission.\n *\n * If you do need to populate initial values into your form, using a one-way binding for\n * `ngModel` tends to be sufficient as long as you use the exported form's value rather\n * than the domain model's value on submit.\n *\n * ### Using ngModel within a form\n *\n * The following example shows controls using `ngModel` within a form:\n *\n * {@example forms/ts/simpleForm/simple_form_example.ts region='Component'}\n *\n * ### Using a standalone ngModel within a group\n *\n * The following example shows you how to use a standalone ngModel control\n * within a form. This controls the display of the form, but doesn't contain form data.\n *\n * ```html\n * <form>\n * <input name=\"login\" ngModel placeholder=\"Login\">\n * <input type=\"checkbox\" ngModel [ngModelOptions]=\"{standalone: true}\"> Show more options?\n * </form>\n * <!-- form value: {login: ''} -->\n * ```\n *\n * ### Setting the ngModel `name` attribute through options\n *\n * The following example shows you an alternate way to set the name attribute. Here,\n * an attribute identified as name is used within a custom form control component. To still be able\n * to specify the NgModel's name, you must specify it using the `ngModelOptions` input instead.\n *\n * ```html\n * <form>\n * <my-custom-form-control name=\"Nancy\" ngModel [ngModelOptions]=\"{name: 'user'}\">\n * </my-custom-form-control>\n * </form>\n * <!-- form value: {user: ''} -->\n * ```\n *\n * @ngModule FormsModule\n * @publicApi\n */\nclass NgModel extends NgControl {\n constructor(parent, validators, asyncValidators, valueAccessors, _changeDetectorRef, callSetDisabledState) {\n super();\n this._changeDetectorRef = _changeDetectorRef;\n this.callSetDisabledState = callSetDisabledState;\n this.control = new FormControl();\n /** @internal */\n this._registered = false;\n /**\n * @description\n * Event emitter for producing the `ngModelChange` event after\n * the view model updates.\n */\n this.update = new EventEmitter();\n this._parent = parent;\n this._setValidators(validators);\n this._setAsyncValidators(asyncValidators);\n this.valueAccessor = selectValueAccessor(this, valueAccessors);\n }\n /** @nodoc */\n ngOnChanges(changes) {\n this._checkForErrors();\n if (!this._registered || 'name' in changes) {\n if (this._registered) {\n this._checkName();\n if (this.formDirective) {\n // We can't call `formDirective.removeControl(this)`, because the `name` has already been\n // changed. We also can't reset the name temporarily since the logic in `removeControl`\n // is inside a promise and it won't run immediately. We work around it by giving it an\n // object with the same shape instead.\n const oldName = changes['name'].previousValue;\n this.formDirective.removeControl({ name: oldName, path: this._getPath(oldName) });\n }\n }\n this._setUpControl();\n }\n if ('isDisabled' in changes) {\n this._updateDisabled(changes);\n }\n if (isPropertyUpdated(changes, this.viewModel)) {\n this._updateValue(this.model);\n this.viewModel = this.model;\n }\n }\n /** @nodoc */\n ngOnDestroy() {\n this.formDirective && this.formDirective.removeControl(this);\n }\n /**\n * @description\n * Returns an array that represents the path from the top-level form to this control.\n * Each index is the string name of the control on that level.\n */\n get path() {\n return this._getPath(this.name);\n }\n /**\n * @description\n * The top-level directive for this control if present, otherwise null.\n */\n get formDirective() {\n return this._parent ? this._parent.formDirective : null;\n }\n /**\n * @description\n * Sets the new value for the view model and emits an `ngModelChange` event.\n *\n * @param newValue The new value emitted by `ngModelChange`.\n */\n viewToModelUpdate(newValue) {\n this.viewModel = newValue;\n this.update.emit(newValue);\n }\n _setUpControl() {\n this._setUpdateStrategy();\n this._isStandalone() ? this._setUpStandalone() : this.formDirective.addControl(this);\n this._registered = true;\n }\n _setUpdateStrategy() {\n if (this.options && this.options.updateOn != null) {\n this.control._updateOn = this.options.updateOn;\n }\n }\n _isStandalone() {\n return !this._parent || !!(this.options && this.options.standalone);\n }\n _setUpStandalone() {\n setUpControl(this.control, this, this.callSetDisabledState);\n this.control.updateValueAndValidity({ emitEvent: false });\n }\n _checkForErrors() {\n if (!this._isStandalone()) {\n this._checkParentType();\n }\n this._checkName();\n }\n _checkParentType() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!(this._parent instanceof NgModelGroup) &&\n this._parent instanceof AbstractFormGroupDirective) {\n throw formGroupNameException();\n }\n else if (!(this._parent instanceof NgModelGroup) && !(this._parent instanceof NgForm)) {\n throw modelParentException();\n }\n }\n }\n _checkName() {\n if (this.options && this.options.name)\n this.name = this.options.name;\n if (!this._isStandalone() && !this.name && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw missingNameException();\n }\n }\n _updateValue(value) {\n resolvedPromise.then(() => {\n this.control.setValue(value, { emitViewToModelChange: false });\n this._changeDetectorRef?.markForCheck();\n });\n }\n _updateDisabled(changes) {\n const disabledValue = changes['isDisabled'].currentValue;\n // checking for 0 to avoid breaking change\n const isDisabled = disabledValue !== 0 && ɵcoerceToBoolean(disabledValue);\n resolvedPromise.then(() => {\n if (isDisabled && !this.control.disabled) {\n this.control.disable();\n }\n else if (!isDisabled && this.control.disabled) {\n this.control.enable();\n }\n this._changeDetectorRef?.markForCheck();\n });\n }\n _getPath(controlName) {\n return this._parent ? controlPath(controlName, this._parent) : [controlName];\n }\n}\nNgModel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgModel, deps: [{ token: ControlContainer, host: true, optional: true }, { token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }, { token: NG_VALUE_ACCESSOR, optional: true, self: true }, { token: ChangeDetectorRef, optional: true }, { token: CALL_SET_DISABLED_STATE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nNgModel.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: NgModel, selector: \"[ngModel]:not([formControlName]):not([formControl])\", inputs: { name: \"name\", isDisabled: [\"disabled\", \"isDisabled\"], model: [\"ngModel\", \"model\"], options: [\"ngModelOptions\", \"options\"] }, outputs: { update: \"ngModelChange\" }, providers: [formControlBinding$1], exportAs: [\"ngModel\"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgModel, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngModel]:not([formControlName]):not([formControl])',\n providers: [formControlBinding$1],\n exportAs: 'ngModel'\n }]\n }], ctorParameters: function () { return [{ type: ControlContainer, decorators: [{\n type: Optional\n }, {\n type: Host\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_ASYNC_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALUE_ACCESSOR]\n }] }, { type: i0.ChangeDetectorRef, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ChangeDetectorRef]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [CALL_SET_DISABLED_STATE]\n }] }]; }, propDecorators: { name: [{\n type: Input\n }], isDisabled: [{\n type: Input,\n args: ['disabled']\n }], model: [{\n type: Input,\n args: ['ngModel']\n }], options: [{\n type: Input,\n args: ['ngModelOptions']\n }], update: [{\n type: Output,\n args: ['ngModelChange']\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description\n *\n * Adds `novalidate` attribute to all forms by default.\n *\n * `novalidate` is used to disable browser's native form validation.\n *\n * If you want to use native validation with Angular forms, just add `ngNativeValidate` attribute:\n *\n * ```\n * <form ngNativeValidate></form>\n * ```\n *\n * @publicApi\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n */\nclass ɵNgNoValidate {\n}\nɵNgNoValidate.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: ɵNgNoValidate, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nɵNgNoValidate.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: ɵNgNoValidate, selector: \"form:not([ngNoForm]):not([ngNativeValidate])\", host: { attributes: { \"novalidate\": \"\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: ɵNgNoValidate, decorators: [{\n type: Directive,\n args: [{\n selector: 'form:not([ngNoForm]):not([ngNativeValidate])',\n host: { 'novalidate': '' },\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst NUMBER_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NumberValueAccessor),\n multi: true\n};\n/**\n * @description\n * The `ControlValueAccessor` for writing a number value and listening to number input changes.\n * The value accessor is used by the `FormControlDirective`, `FormControlName`, and `NgModel`\n * directives.\n *\n * @usageNotes\n *\n * ### Using a number input with a reactive form.\n *\n * The following example shows how to use a number input with a reactive form.\n *\n * ```ts\n * const totalCountControl = new FormControl();\n * ```\n *\n * ```\n * <input type=\"number\" [formControl]=\"totalCountControl\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass NumberValueAccessor extends BuiltInControlValueAccessor {\n /**\n * Sets the \"value\" property on the input element.\n * @nodoc\n */\n writeValue(value) {\n // The value needs to be normalized for IE9, otherwise it is set to 'null' when null\n const normalizedValue = value == null ? '' : value;\n this.setProperty('value', normalizedValue);\n }\n /**\n * Registers a function called when the control value changes.\n * @nodoc\n */\n registerOnChange(fn) {\n this.onChange = (value) => {\n fn(value == '' ? null : parseFloat(value));\n };\n }\n}\nNumberValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NumberValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nNumberValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: NumberValueAccessor, selector: \"input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]\", host: { listeners: { \"input\": \"onChange($event.target.value)\", \"blur\": \"onTouched()\" } }, providers: [NUMBER_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NumberValueAccessor, decorators: [{\n type: Directive,\n args: [{\n selector: 'input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]',\n host: { '(input)': 'onChange($event.target.value)', '(blur)': 'onTouched()' },\n providers: [NUMBER_VALUE_ACCESSOR]\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst RADIO_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RadioControlValueAccessor),\n multi: true\n};\nfunction throwNameError() {\n throw new ɵRuntimeError(1202 /* RuntimeErrorCode.NAME_AND_FORM_CONTROL_NAME_MUST_MATCH */, `\n If you define both a name and a formControlName attribute on your radio button, their values\n must match. Ex: <input type=\"radio\" formControlName=\"food\" name=\"food\">\n `);\n}\n/**\n * Internal-only NgModule that works as a host for the `RadioControlRegistry` tree-shakable\n * provider. Note: the `InternalFormsSharedModule` can not be used here directly, since it's\n * declared *after* the `RadioControlRegistry` class and the `providedIn` doesn't support\n * `forwardRef` logic.\n */\nclass RadioControlRegistryModule {\n}\nRadioControlRegistryModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: RadioControlRegistryModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nRadioControlRegistryModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.0.4\", ngImport: i0, type: RadioControlRegistryModule });\nRadioControlRegistryModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: RadioControlRegistryModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: RadioControlRegistryModule, decorators: [{\n type: NgModule\n }] });\n/**\n * @description\n * Class used by Angular to track radio buttons. For internal use only.\n */\nclass RadioControlRegistry {\n constructor() {\n this._accessors = [];\n }\n /**\n * @description\n * Adds a control to the internal registry. For internal use only.\n */\n add(control, accessor) {\n this._accessors.push([control, accessor]);\n }\n /**\n * @description\n * Removes a control from the internal registry. For internal use only.\n */\n remove(accessor) {\n for (let i = this._accessors.length - 1; i >= 0; --i) {\n if (this._accessors[i][1] === accessor) {\n this._accessors.splice(i, 1);\n return;\n }\n }\n }\n /**\n * @description\n * Selects a radio button. For internal use only.\n */\n select(accessor) {\n this._accessors.forEach((c) => {\n if (this._isSameGroup(c, accessor) && c[1] !== accessor) {\n c[1].fireUncheck(accessor.value);\n }\n });\n }\n _isSameGroup(controlPair, accessor) {\n if (!controlPair[0].control)\n return false;\n return controlPair[0]._parent === accessor._control._parent &&\n controlPair[1].name === accessor.name;\n }\n}\nRadioControlRegistry.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: RadioControlRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nRadioControlRegistry.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: RadioControlRegistry, providedIn: RadioControlRegistryModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: RadioControlRegistry, decorators: [{\n type: Injectable,\n args: [{ providedIn: RadioControlRegistryModule }]\n }] });\n/**\n * @description\n * The `ControlValueAccessor` for writing radio control values and listening to radio control\n * changes. The value accessor is used by the `FormControlDirective`, `FormControlName`, and\n * `NgModel` directives.\n *\n * @usageNotes\n *\n * ### Using radio buttons with reactive form directives\n *\n * The follow example shows how to use radio buttons in a reactive form. When using radio buttons in\n * a reactive form, radio buttons in the same group should have the same `formControlName`.\n * Providing a `name` attribute is optional.\n *\n * {@example forms/ts/reactiveRadioButtons/reactive_radio_button_example.ts region='Reactive'}\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass RadioControlValueAccessor extends BuiltInControlValueAccessor {\n constructor(renderer, elementRef, _registry, _injector) {\n super(renderer, elementRef);\n this._registry = _registry;\n this._injector = _injector;\n /**\n * The registered callback function called when a change event occurs on the input element.\n * Note: we declare `onChange` here (also used as host listener) as a function with no arguments\n * to override the `onChange` function (which expects 1 argument) in the parent\n * `BaseControlValueAccessor` class.\n * @nodoc\n */\n this.onChange = () => { };\n }\n /** @nodoc */\n ngOnInit() {\n this._control = this._injector.get(NgControl);\n this._checkName();\n this._registry.add(this._control, this);\n }\n /** @nodoc */\n ngOnDestroy() {\n this._registry.remove(this);\n }\n /**\n * Sets the \"checked\" property value on the radio input element.\n * @nodoc\n */\n writeValue(value) {\n this._state = value === this.value;\n this.setProperty('checked', this._state);\n }\n /**\n * Registers a function called when the control value changes.\n * @nodoc\n */\n registerOnChange(fn) {\n this._fn = fn;\n this.onChange = () => {\n fn(this.value);\n this._registry.select(this);\n };\n }\n /**\n * Sets the \"value\" on the radio input element and unchecks it.\n *\n * @param value\n */\n fireUncheck(value) {\n this.writeValue(value);\n }\n _checkName() {\n if (this.name && this.formControlName && this.name !== this.formControlName &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throwNameError();\n }\n if (!this.name && this.formControlName)\n this.name = this.formControlName;\n }\n}\nRadioControlValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: RadioControlValueAccessor, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: RadioControlRegistry }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive });\nRadioControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: RadioControlValueAccessor, selector: \"input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]\", inputs: { name: \"name\", formControlName: \"formControlName\", value: \"value\" }, host: { listeners: { \"change\": \"onChange()\", \"blur\": \"onTouched()\" } }, providers: [RADIO_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: RadioControlValueAccessor, decorators: [{\n type: Directive,\n args: [{\n selector: 'input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]',\n host: { '(change)': 'onChange()', '(blur)': 'onTouched()' },\n providers: [RADIO_VALUE_ACCESSOR]\n }]\n }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: RadioControlRegistry }, { type: i0.Injector }]; }, propDecorators: { name: [{\n type: Input\n }], formControlName: [{\n type: Input\n }], value: [{\n type: Input\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst RANGE_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RangeValueAccessor),\n multi: true\n};\n/**\n * @description\n * The `ControlValueAccessor` for writing a range value and listening to range input changes.\n * The value accessor is used by the `FormControlDirective`, `FormControlName`, and `NgModel`\n * directives.\n *\n * @usageNotes\n *\n * ### Using a range input with a reactive form\n *\n * The following example shows how to use a range input with a reactive form.\n *\n * ```ts\n * const ageControl = new FormControl();\n * ```\n *\n * ```\n * <input type=\"range\" [formControl]=\"ageControl\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass RangeValueAccessor extends BuiltInControlValueAccessor {\n /**\n * Sets the \"value\" property on the input element.\n * @nodoc\n */\n writeValue(value) {\n this.setProperty('value', parseFloat(value));\n }\n /**\n * Registers a function called when the control value changes.\n * @nodoc\n */\n registerOnChange(fn) {\n this.onChange = (value) => {\n fn(value == '' ? null : parseFloat(value));\n };\n }\n}\nRangeValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: RangeValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nRangeValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: RangeValueAccessor, selector: \"input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]\", host: { listeners: { \"change\": \"onChange($event.target.value)\", \"input\": \"onChange($event.target.value)\", \"blur\": \"onTouched()\" } }, providers: [RANGE_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: RangeValueAccessor, decorators: [{\n type: Directive,\n args: [{\n selector: 'input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]',\n host: {\n '(change)': 'onChange($event.target.value)',\n '(input)': 'onChange($event.target.value)',\n '(blur)': 'onTouched()'\n },\n providers: [RANGE_VALUE_ACCESSOR]\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Token to provide to turn off the ngModel warning on formControl and formControlName.\n */\nconst NG_MODEL_WITH_FORM_CONTROL_WARNING = new InjectionToken('NgModelWithFormControlWarning');\nconst formControlBinding = {\n provide: NgControl,\n useExisting: forwardRef(() => FormControlDirective)\n};\n/**\n * @description\n * Synchronizes a standalone `FormControl` instance to a form control element.\n *\n * Note that support for using the `ngModel` input property and `ngModelChange` event with reactive\n * form directives was deprecated in Angular v6 and is scheduled for removal in\n * a future version of Angular.\n * For details, see [Deprecated features](guide/deprecations#ngmodel-with-reactive-forms).\n *\n * @see [Reactive Forms Guide](guide/reactive-forms)\n * @see `FormControl`\n * @see `AbstractControl`\n *\n * @usageNotes\n *\n * The following example shows how to register a standalone control and set its value.\n *\n * {@example forms/ts/simpleFormControl/simple_form_control_example.ts region='Component'}\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\nclass FormControlDirective extends NgControl {\n constructor(validators, asyncValidators, valueAccessors, _ngModelWarningConfig, callSetDisabledState) {\n super();\n this._ngModelWarningConfig = _ngModelWarningConfig;\n this.callSetDisabledState = callSetDisabledState;\n /** @deprecated as of v6 */\n this.update = new EventEmitter();\n /**\n * @description\n * Instance property used to track whether an ngModel warning has been sent out for this\n * particular `FormControlDirective` instance. Used to support warning config of \"always\".\n *\n * @internal\n */\n this._ngModelWarningSent = false;\n this._setValidators(validators);\n this._setAsyncValidators(asyncValidators);\n this.valueAccessor = selectValueAccessor(this, valueAccessors);\n }\n /**\n * @description\n * Triggers a warning in dev mode that this input should not be used with reactive forms.\n */\n set isDisabled(isDisabled) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n console.warn(disabledAttrWarning);\n }\n }\n /** @nodoc */\n ngOnChanges(changes) {\n if (this._isControlChanged(changes)) {\n const previousForm = changes['form'].previousValue;\n if (previousForm) {\n cleanUpControl(previousForm, this, /* validateControlPresenceOnChange */ false);\n }\n setUpControl(this.form, this, this.callSetDisabledState);\n this.form.updateValueAndValidity({ emitEvent: false });\n }\n if (isPropertyUpdated(changes, this.viewModel)) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n _ngModelWarning('formControl', FormControlDirective, this, this._ngModelWarningConfig);\n }\n this.form.setValue(this.model);\n this.viewModel = this.model;\n }\n }\n /** @nodoc */\n ngOnDestroy() {\n if (this.form) {\n cleanUpControl(this.form, this, /* validateControlPresenceOnChange */ false);\n }\n }\n /**\n * @description\n * Returns an array that represents the path from the top-level form to this control.\n * Each index is the string name of the control on that level.\n */\n get path() {\n return [];\n }\n /**\n * @description\n * The `FormControl` bound to this directive.\n */\n get control() {\n return this.form;\n }\n /**\n * @description\n * Sets the new value for the view model and emits an `ngModelChange` event.\n *\n * @param newValue The new value for the view model.\n */\n viewToModelUpdate(newValue) {\n this.viewModel = newValue;\n this.update.emit(newValue);\n }\n _isControlChanged(changes) {\n return changes.hasOwnProperty('form');\n }\n}\n/**\n * @description\n * Static property used to track whether any ngModel warnings have been sent across\n * all instances of FormControlDirective. Used to support warning config of \"once\".\n *\n * @internal\n */\nFormControlDirective._ngModelWarningSentOnce = false;\nFormControlDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: FormControlDirective, deps: [{ token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }, { token: NG_VALUE_ACCESSOR, optional: true, self: true }, { token: NG_MODEL_WITH_FORM_CONTROL_WARNING, optional: true }, { token: CALL_SET_DISABLED_STATE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nFormControlDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: FormControlDirective, selector: \"[formControl]\", inputs: { form: [\"formControl\", \"form\"], isDisabled: [\"disabled\", \"isDisabled\"], model: [\"ngModel\", \"model\"] }, outputs: { update: \"ngModelChange\" }, providers: [formControlBinding], exportAs: [\"ngForm\"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: FormControlDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[formControl]', providers: [formControlBinding], exportAs: 'ngForm' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_ASYNC_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALUE_ACCESSOR]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [NG_MODEL_WITH_FORM_CONTROL_WARNING]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [CALL_SET_DISABLED_STATE]\n }] }]; }, propDecorators: { form: [{\n type: Input,\n args: ['formControl']\n }], isDisabled: [{\n type: Input,\n args: ['disabled']\n }], model: [{\n type: Input,\n args: ['ngModel']\n }], update: [{\n type: Output,\n args: ['ngModelChange']\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst formDirectiveProvider = {\n provide: ControlContainer,\n useExisting: forwardRef(() => FormGroupDirective)\n};\n/**\n * @description\n *\n * Binds an existing `FormGroup` or `FormRecord` to a DOM element.\n *\n * This directive accepts an existing `FormGroup` instance. It will then use this\n * `FormGroup` instance to match any child `FormControl`, `FormGroup`/`FormRecord`,\n * and `FormArray` instances to child `FormControlName`, `FormGroupName`,\n * and `FormArrayName` directives.\n *\n * @see [Reactive Forms Guide](guide/reactive-forms)\n * @see `AbstractControl`\n *\n * @usageNotes\n * ### Register Form Group\n *\n * The following example registers a `FormGroup` with first name and last name controls,\n * and listens for the *ngSubmit* event when the button is clicked.\n *\n * {@example forms/ts/simpleFormGroup/simple_form_group_example.ts region='Component'}\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\nclass FormGroupDirective extends ControlContainer {\n constructor(validators, asyncValidators, callSetDisabledState) {\n super();\n this.callSetDisabledState = callSetDisabledState;\n /**\n * @description\n * Reports whether the form submission has been triggered.\n */\n this.submitted = false;\n /**\n * Callback that should be invoked when controls in FormGroup or FormArray collection change\n * (added or removed). This callback triggers corresponding DOM updates.\n */\n this._onCollectionChange = () => this._updateDomValue();\n /**\n * @description\n * Tracks the list of added `FormControlName` instances\n */\n this.directives = [];\n /**\n * @description\n * Tracks the `FormGroup` bound to this directive.\n */\n this.form = null;\n /**\n * @description\n * Emits an event when the form submission has been triggered.\n */\n this.ngSubmit = new EventEmitter();\n this._setValidators(validators);\n this._setAsyncValidators(asyncValidators);\n }\n /** @nodoc */\n ngOnChanges(changes) {\n this._checkFormPresent();\n if (changes.hasOwnProperty('form')) {\n this._updateValidators();\n this._updateDomValue();\n this._updateRegistrations();\n this._oldForm = this.form;\n }\n }\n /** @nodoc */\n ngOnDestroy() {\n if (this.form) {\n cleanUpValidators(this.form, this);\n // Currently the `onCollectionChange` callback is rewritten each time the\n // `_registerOnCollectionChange` function is invoked. The implication is that cleanup should\n // happen *only* when the `onCollectionChange` callback was set by this directive instance.\n // Otherwise it might cause overriding a callback of some other directive instances. We should\n // consider updating this logic later to make it similar to how `onChange` callbacks are\n // handled, see https://github.com/angular/angular/issues/39732 for additional info.\n if (this.form._onCollectionChange === this._onCollectionChange) {\n this.form._registerOnCollectionChange(() => { });\n }\n }\n }\n /**\n * @description\n * Returns this directive's instance.\n */\n get formDirective() {\n return this;\n }\n /**\n * @description\n * Returns the `FormGroup` bound to this directive.\n */\n get control() {\n return this.form;\n }\n /**\n * @description\n * Returns an array representing the path to this group. Because this directive\n * always lives at the top level of a form, it always an empty array.\n */\n get path() {\n return [];\n }\n /**\n * @description\n * Method that sets up the control directive in this group, re-calculates its value\n * and validity, and adds the instance to the internal list of directives.\n *\n * @param dir The `FormControlName` directive instance.\n */\n addControl(dir) {\n const ctrl = this.form.get(dir.path);\n setUpControl(ctrl, dir, this.callSetDisabledState);\n ctrl.updateValueAndValidity({ emitEvent: false });\n this.directives.push(dir);\n return ctrl;\n }\n /**\n * @description\n * Retrieves the `FormControl` instance from the provided `FormControlName` directive\n *\n * @param dir The `FormControlName` directive instance.\n */\n getControl(dir) {\n return this.form.get(dir.path);\n }\n /**\n * @description\n * Removes the `FormControlName` instance from the internal list of directives\n *\n * @param dir The `FormControlName` directive instance.\n */\n removeControl(dir) {\n cleanUpControl(dir.control || null, dir, /* validateControlPresenceOnChange */ false);\n removeListItem$1(this.directives, dir);\n }\n /**\n * Adds a new `FormGroupName` directive instance to the form.\n *\n * @param dir The `FormGroupName` directive instance.\n */\n addFormGroup(dir) {\n this._setUpFormContainer(dir);\n }\n /**\n * Performs the necessary cleanup when a `FormGroupName` directive instance is removed from the\n * view.\n *\n * @param dir The `FormGroupName` directive instance.\n */\n removeFormGroup(dir) {\n this._cleanUpFormContainer(dir);\n }\n /**\n * @description\n * Retrieves the `FormGroup` for a provided `FormGroupName` directive instance\n *\n * @param dir The `FormGroupName` directive instance.\n */\n getFormGroup(dir) {\n return this.form.get(dir.path);\n }\n /**\n * Performs the necessary setup when a `FormArrayName` directive instance is added to the view.\n *\n * @param dir The `FormArrayName` directive instance.\n */\n addFormArray(dir) {\n this._setUpFormContainer(dir);\n }\n /**\n * Performs the necessary cleanup when a `FormArrayName` directive instance is removed from the\n * view.\n *\n * @param dir The `FormArrayName` directive instance.\n */\n removeFormArray(dir) {\n this._cleanUpFormContainer(dir);\n }\n /**\n * @description\n * Retrieves the `FormArray` for a provided `FormArrayName` directive instance.\n *\n * @param dir The `FormArrayName` directive instance.\n */\n getFormArray(dir) {\n return this.form.get(dir.path);\n }\n /**\n * Sets the new value for the provided `FormControlName` directive.\n *\n * @param dir The `FormControlName` directive instance.\n * @param value The new value for the directive's control.\n */\n updateModel(dir, value) {\n const ctrl = this.form.get(dir.path);\n ctrl.setValue(value);\n }\n /**\n * @description\n * Method called with the \"submit\" event is triggered on the form.\n * Triggers the `ngSubmit` emitter to emit the \"submit\" event as its payload.\n *\n * @param $event The \"submit\" event object\n */\n onSubmit($event) {\n this.submitted = true;\n syncPendingControls(this.form, this.directives);\n this.ngSubmit.emit($event);\n // Forms with `method=\"dialog\"` have some special behavior that won't reload the page and that\n // shouldn't be prevented. Note that we need to null check the `event` and the `target`, because\n // some internal apps call this method directly with the wrong arguments.\n return $event?.target?.method === 'dialog';\n }\n /**\n * @description\n * Method called when the \"reset\" event is triggered on the form.\n */\n onReset() {\n this.resetForm();\n }\n /**\n * @description\n * Resets the form to an initial value and resets its submitted status.\n *\n * @param value The new value for the form.\n */\n resetForm(value = undefined) {\n this.form.reset(value);\n this.submitted = false;\n }\n /** @internal */\n _updateDomValue() {\n this.directives.forEach(dir => {\n const oldCtrl = dir.control;\n const newCtrl = this.form.get(dir.path);\n if (oldCtrl !== newCtrl) {\n // Note: the value of the `dir.control` may not be defined, for example when it's a first\n // `FormControl` that is added to a `FormGroup` instance (via `addControl` call).\n cleanUpControl(oldCtrl || null, dir);\n // Check whether new control at the same location inside the corresponding `FormGroup` is an\n // instance of `FormControl` and perform control setup only if that's the case.\n // Note: we don't need to clear the list of directives (`this.directives`) here, it would be\n // taken care of in the `removeControl` method invoked when corresponding `formControlName`\n // directive instance is being removed (invoked from `FormControlName.ngOnDestroy`).\n if (isFormControl(newCtrl)) {\n setUpControl(newCtrl, dir, this.callSetDisabledState);\n dir.control = newCtrl;\n }\n }\n });\n this.form._updateTreeValidity({ emitEvent: false });\n }\n _setUpFormContainer(dir) {\n const ctrl = this.form.get(dir.path);\n setUpFormContainer(ctrl, dir);\n // NOTE: this operation looks unnecessary in case no new validators were added in\n // `setUpFormContainer` call. Consider updating this code to match the logic in\n // `_cleanUpFormContainer` function.\n ctrl.updateValueAndValidity({ emitEvent: false });\n }\n _cleanUpFormContainer(dir) {\n if (this.form) {\n const ctrl = this.form.get(dir.path);\n if (ctrl) {\n const isControlUpdated = cleanUpFormContainer(ctrl, dir);\n if (isControlUpdated) {\n // Run validity check only in case a control was updated (i.e. view validators were\n // removed) as removing view validators might cause validity to change.\n ctrl.updateValueAndValidity({ emitEvent: false });\n }\n }\n }\n }\n _updateRegistrations() {\n this.form._registerOnCollectionChange(this._onCollectionChange);\n if (this._oldForm) {\n this._oldForm._registerOnCollectionChange(() => { });\n }\n }\n _updateValidators() {\n setUpValidators(this.form, this);\n if (this._oldForm) {\n cleanUpValidators(this._oldForm, this);\n }\n }\n _checkFormPresent() {\n if (!this.form && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw missingFormException();\n }\n }\n}\nFormGroupDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: FormGroupDirective, deps: [{ token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }, { token: CALL_SET_DISABLED_STATE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nFormGroupDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: FormGroupDirective, selector: \"[formGroup]\", inputs: { form: [\"formGroup\", \"form\"] }, outputs: { ngSubmit: \"ngSubmit\" }, host: { listeners: { \"submit\": \"onSubmit($event)\", \"reset\": \"onReset()\" } }, providers: [formDirectiveProvider], exportAs: [\"ngForm\"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: FormGroupDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[formGroup]',\n providers: [formDirectiveProvider],\n host: { '(submit)': 'onSubmit($event)', '(reset)': 'onReset()' },\n exportAs: 'ngForm'\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_ASYNC_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [CALL_SET_DISABLED_STATE]\n }] }]; }, propDecorators: { form: [{\n type: Input,\n args: ['formGroup']\n }], ngSubmit: [{\n type: Output\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst formGroupNameProvider = {\n provide: ControlContainer,\n useExisting: forwardRef(() => FormGroupName)\n};\n/**\n * @description\n *\n * Syncs a nested `FormGroup` or `FormRecord` to a DOM element.\n *\n * This directive can only be used with a parent `FormGroupDirective`.\n *\n * It accepts the string name of the nested `FormGroup` or `FormRecord` to link, and\n * looks for a `FormGroup` or `FormRecord` registered with that name in the parent\n * `FormGroup` instance you passed into `FormGroupDirective`.\n *\n * Use nested form groups to validate a sub-group of a\n * form separately from the rest or to group the values of certain\n * controls into their own nested object.\n *\n * @see [Reactive Forms Guide](guide/reactive-forms)\n *\n * @usageNotes\n *\n * ### Access the group by name\n *\n * The following example uses the `AbstractControl.get` method to access the\n * associated `FormGroup`\n *\n * ```ts\n * this.form.get('name');\n * ```\n *\n * ### Access individual controls in the group\n *\n * The following example uses the `AbstractControl.get` method to access\n * individual controls within the group using dot syntax.\n *\n * ```ts\n * this.form.get('name.first');\n * ```\n *\n * ### Register a nested `FormGroup`.\n *\n * The following example registers a nested *name* `FormGroup` within an existing `FormGroup`,\n * and provides methods to retrieve the nested `FormGroup` and individual controls.\n *\n * {@example forms/ts/nestedFormGroup/nested_form_group_example.ts region='Component'}\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\nclass FormGroupName extends AbstractFormGroupDirective {\n constructor(parent, validators, asyncValidators) {\n super();\n this._parent = parent;\n this._setValidators(validators);\n this._setAsyncValidators(asyncValidators);\n }\n /** @internal */\n _checkParentType() {\n if (_hasInvalidParent(this._parent) && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw groupParentException();\n }\n }\n}\nFormGroupName.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: FormGroupName, deps: [{ token: ControlContainer, host: true, optional: true, skipSelf: true }, { token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });\nFormGroupName.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: FormGroupName, selector: \"[formGroupName]\", inputs: { name: [\"formGroupName\", \"name\"] }, providers: [formGroupNameProvider], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: FormGroupName, decorators: [{\n type: Directive,\n args: [{ selector: '[formGroupName]', providers: [formGroupNameProvider] }]\n }], ctorParameters: function () { return [{ type: ControlContainer, decorators: [{\n type: Optional\n }, {\n type: Host\n }, {\n type: SkipSelf\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_ASYNC_VALIDATORS]\n }] }]; }, propDecorators: { name: [{\n type: Input,\n args: ['formGroupName']\n }] } });\nconst formArrayNameProvider = {\n provide: ControlContainer,\n useExisting: forwardRef(() => FormArrayName)\n};\n/**\n * @description\n *\n * Syncs a nested `FormArray` to a DOM element.\n *\n * This directive is designed to be used with a parent `FormGroupDirective` (selector:\n * `[formGroup]`).\n *\n * It accepts the string name of the nested `FormArray` you want to link, and\n * will look for a `FormArray` registered with that name in the parent\n * `FormGroup` instance you passed into `FormGroupDirective`.\n *\n * @see [Reactive Forms Guide](guide/reactive-forms)\n * @see `AbstractControl`\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example forms/ts/nestedFormArray/nested_form_array_example.ts region='Component'}\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\nclass FormArrayName extends ControlContainer {\n constructor(parent, validators, asyncValidators) {\n super();\n this._parent = parent;\n this._setValidators(validators);\n this._setAsyncValidators(asyncValidators);\n }\n /**\n * A lifecycle method called when the directive's inputs are initialized. For internal use only.\n * @throws If the directive does not have a valid parent.\n * @nodoc\n */\n ngOnInit() {\n this._checkParentType();\n this.formDirective.addFormArray(this);\n }\n /**\n * A lifecycle method called before the directive's instance is destroyed. For internal use only.\n * @nodoc\n */\n ngOnDestroy() {\n if (this.formDirective) {\n this.formDirective.removeFormArray(this);\n }\n }\n /**\n * @description\n * The `FormArray` bound to this directive.\n */\n get control() {\n return this.formDirective.getFormArray(this);\n }\n /**\n * @description\n * The top-level directive for this group if present, otherwise null.\n */\n get formDirective() {\n return this._parent ? this._parent.formDirective : null;\n }\n /**\n * @description\n * Returns an array that represents the path from the top-level form to this control.\n * Each index is the string name of the control on that level.\n */\n get path() {\n return controlPath(this.name == null ? this.name : this.name.toString(), this._parent);\n }\n _checkParentType() {\n if (_hasInvalidParent(this._parent) && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw arrayParentException();\n }\n }\n}\nFormArrayName.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: FormArrayName, deps: [{ token: ControlContainer, host: true, optional: true, skipSelf: true }, { token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });\nFormArrayName.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: FormArrayName, selector: \"[formArrayName]\", inputs: { name: [\"formArrayName\", \"name\"] }, providers: [formArrayNameProvider], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: FormArrayName, decorators: [{\n type: Directive,\n args: [{ selector: '[formArrayName]', providers: [formArrayNameProvider] }]\n }], ctorParameters: function () { return [{ type: ControlContainer, decorators: [{\n type: Optional\n }, {\n type: Host\n }, {\n type: SkipSelf\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_ASYNC_VALIDATORS]\n }] }]; }, propDecorators: { name: [{\n type: Input,\n args: ['formArrayName']\n }] } });\nfunction _hasInvalidParent(parent) {\n return !(parent instanceof FormGroupName) && !(parent instanceof FormGroupDirective) &&\n !(parent instanceof FormArrayName);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst controlNameBinding = {\n provide: NgControl,\n useExisting: forwardRef(() => FormControlName)\n};\n/**\n * @description\n * Syncs a `FormControl` in an existing `FormGroup` to a form control\n * element by name.\n *\n * @see [Reactive Forms Guide](guide/reactive-forms)\n * @see `FormControl`\n * @see `AbstractControl`\n *\n * @usageNotes\n *\n * ### Register `FormControl` within a group\n *\n * The following example shows how to register multiple form controls within a form group\n * and set their value.\n *\n * {@example forms/ts/simpleFormGroup/simple_form_group_example.ts region='Component'}\n *\n * To see `formControlName` examples with different form control types, see:\n *\n * * Radio buttons: `RadioControlValueAccessor`\n * * Selects: `SelectControlValueAccessor`\n *\n * ### Use with ngModel is deprecated\n *\n * Support for using the `ngModel` input property and `ngModelChange` event with reactive\n * form directives has been deprecated in Angular v6 and is scheduled for removal in\n * a future version of Angular.\n *\n * For details, see [Deprecated features](guide/deprecations#ngmodel-with-reactive-forms).\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\nclass FormControlName extends NgControl {\n constructor(parent, validators, asyncValidators, valueAccessors, _ngModelWarningConfig) {\n super();\n this._ngModelWarningConfig = _ngModelWarningConfig;\n this._added = false;\n /** @deprecated as of v6 */\n this.update = new EventEmitter();\n /**\n * @description\n * Instance property used to track whether an ngModel warning has been sent out for this\n * particular FormControlName instance. Used to support warning config of \"always\".\n *\n * @internal\n */\n this._ngModelWarningSent = false;\n this._parent = parent;\n this._setValidators(validators);\n this._setAsyncValidators(asyncValidators);\n this.valueAccessor = selectValueAccessor(this, valueAccessors);\n }\n /**\n * @description\n * Triggers a warning in dev mode that this input should not be used with reactive forms.\n */\n set isDisabled(isDisabled) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n console.warn(disabledAttrWarning);\n }\n }\n /** @nodoc */\n ngOnChanges(changes) {\n if (!this._added)\n this._setUpControl();\n if (isPropertyUpdated(changes, this.viewModel)) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n _ngModelWarning('formControlName', FormControlName, this, this._ngModelWarningConfig);\n }\n this.viewModel = this.model;\n this.formDirective.updateModel(this, this.model);\n }\n }\n /** @nodoc */\n ngOnDestroy() {\n if (this.formDirective) {\n this.formDirective.removeControl(this);\n }\n }\n /**\n * @description\n * Sets the new value for the view model and emits an `ngModelChange` event.\n *\n * @param newValue The new value for the view model.\n */\n viewToModelUpdate(newValue) {\n this.viewModel = newValue;\n this.update.emit(newValue);\n }\n /**\n * @description\n * Returns an array that represents the path from the top-level form to this control.\n * Each index is the string name of the control on that level.\n */\n get path() {\n return controlPath(this.name == null ? this.name : this.name.toString(), this._parent);\n }\n /**\n * @description\n * The top-level directive for this group if present, otherwise null.\n */\n get formDirective() {\n return this._parent ? this._parent.formDirective : null;\n }\n _checkParentType() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!(this._parent instanceof FormGroupName) &&\n this._parent instanceof AbstractFormGroupDirective) {\n throw ngModelGroupException();\n }\n else if (!(this._parent instanceof FormGroupName) &&\n !(this._parent instanceof FormGroupDirective) &&\n !(this._parent instanceof FormArrayName)) {\n throw controlParentException();\n }\n }\n }\n _setUpControl() {\n this._checkParentType();\n this.control = this.formDirective.addControl(this);\n this._added = true;\n }\n}\n/**\n * @description\n * Static property used to track whether any ngModel warnings have been sent across\n * all instances of FormControlName. Used to support warning config of \"once\".\n *\n * @internal\n */\nFormControlName._ngModelWarningSentOnce = false;\nFormControlName.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: FormControlName, deps: [{ token: ControlContainer, host: true, optional: true, skipSelf: true }, { token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }, { token: NG_VALUE_ACCESSOR, optional: true, self: true }, { token: NG_MODEL_WITH_FORM_CONTROL_WARNING, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nFormControlName.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: FormControlName, selector: \"[formControlName]\", inputs: { name: [\"formControlName\", \"name\"], isDisabled: [\"disabled\", \"isDisabled\"], model: [\"ngModel\", \"model\"] }, outputs: { update: \"ngModelChange\" }, providers: [controlNameBinding], usesInheritance: true, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: FormControlName, decorators: [{\n type: Directive,\n args: [{ selector: '[formControlName]', providers: [controlNameBinding] }]\n }], ctorParameters: function () { return [{ type: ControlContainer, decorators: [{\n type: Optional\n }, {\n type: Host\n }, {\n type: SkipSelf\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_ASYNC_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALUE_ACCESSOR]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [NG_MODEL_WITH_FORM_CONTROL_WARNING]\n }] }]; }, propDecorators: { name: [{\n type: Input,\n args: ['formControlName']\n }], isDisabled: [{\n type: Input,\n args: ['disabled']\n }], model: [{\n type: Input,\n args: ['ngModel']\n }], update: [{\n type: Output,\n args: ['ngModelChange']\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst SELECT_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SelectControlValueAccessor),\n multi: true\n};\nfunction _buildValueString$1(id, value) {\n if (id == null)\n return `${value}`;\n if (value && typeof value === 'object')\n value = 'Object';\n return `${id}: ${value}`.slice(0, 50);\n}\nfunction _extractId$1(valueString) {\n return valueString.split(':')[0];\n}\n/**\n * @description\n * The `ControlValueAccessor` for writing select control values and listening to select control\n * changes. The value accessor is used by the `FormControlDirective`, `FormControlName`, and\n * `NgModel` directives.\n *\n * @usageNotes\n *\n * ### Using select controls in a reactive form\n *\n * The following examples show how to use a select control in a reactive form.\n *\n * {@example forms/ts/reactiveSelectControl/reactive_select_control_example.ts region='Component'}\n *\n * ### Using select controls in a template-driven form\n *\n * To use a select in a template-driven form, simply add an `ngModel` and a `name`\n * attribute to the main `<select>` tag.\n *\n * {@example forms/ts/selectControl/select_control_example.ts region='Component'}\n *\n * ### Customizing option selection\n *\n * Angular uses object identity to select option. It's possible for the identities of items\n * to change while the data does not. This can happen, for example, if the items are produced\n * from an RPC to the server, and that RPC is re-run. Even if the data hasn't changed, the\n * second response will produce objects with different identities.\n *\n * To customize the default option comparison algorithm, `<select>` supports `compareWith` input.\n * `compareWith` takes a **function** which has two arguments: `option1` and `option2`.\n * If `compareWith` is given, Angular selects option by the return value of the function.\n *\n * ```ts\n * const selectedCountriesControl = new FormControl();\n * ```\n *\n * ```\n * <select [compareWith]=\"compareFn\" [formControl]=\"selectedCountriesControl\">\n * <option *ngFor=\"let country of countries\" [ngValue]=\"country\">\n * {{country.name}}\n * </option>\n * </select>\n *\n * compareFn(c1: Country, c2: Country): boolean {\n * return c1 && c2 ? c1.id === c2.id : c1 === c2;\n * }\n * ```\n *\n * **Note:** We listen to the 'change' event because 'input' events aren't fired\n * for selects in IE, see:\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/input_event#browser_compatibility\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass SelectControlValueAccessor extends BuiltInControlValueAccessor {\n constructor() {\n super(...arguments);\n /** @internal */\n this._optionMap = new Map();\n /** @internal */\n this._idCounter = 0;\n this._compareWith = Object.is;\n }\n /**\n * @description\n * Tracks the option comparison algorithm for tracking identities when\n * checking for changes.\n */\n set compareWith(fn) {\n if (typeof fn !== 'function' && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw new ɵRuntimeError(1201 /* RuntimeErrorCode.COMPAREWITH_NOT_A_FN */, `compareWith must be a function, but received ${JSON.stringify(fn)}`);\n }\n this._compareWith = fn;\n }\n /**\n * Sets the \"value\" property on the select element.\n * @nodoc\n */\n writeValue(value) {\n this.value = value;\n const id = this._getOptionId(value);\n const valueString = _buildValueString$1(id, value);\n this.setProperty('value', valueString);\n }\n /**\n * Registers a function called when the control value changes.\n * @nodoc\n */\n registerOnChange(fn) {\n this.onChange = (valueString) => {\n this.value = this._getOptionValue(valueString);\n fn(this.value);\n };\n }\n /** @internal */\n _registerOption() {\n return (this._idCounter++).toString();\n }\n /** @internal */\n _getOptionId(value) {\n for (const id of Array.from(this._optionMap.keys())) {\n if (this._compareWith(this._optionMap.get(id), value))\n return id;\n }\n return null;\n }\n /** @internal */\n _getOptionValue(valueString) {\n const id = _extractId$1(valueString);\n return this._optionMap.has(id) ? this._optionMap.get(id) : valueString;\n }\n}\nSelectControlValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: SelectControlValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nSelectControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: SelectControlValueAccessor, selector: \"select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]\", inputs: { compareWith: \"compareWith\" }, host: { listeners: { \"change\": \"onChange($event.target.value)\", \"blur\": \"onTouched()\" } }, providers: [SELECT_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: SelectControlValueAccessor, decorators: [{\n type: Directive,\n args: [{\n selector: 'select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]',\n host: { '(change)': 'onChange($event.target.value)', '(blur)': 'onTouched()' },\n providers: [SELECT_VALUE_ACCESSOR]\n }]\n }], propDecorators: { compareWith: [{\n type: Input\n }] } });\n/**\n * @description\n * Marks `<option>` as dynamic, so Angular can be notified when options change.\n *\n * @see `SelectControlValueAccessor`\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass NgSelectOption {\n constructor(_element, _renderer, _select) {\n this._element = _element;\n this._renderer = _renderer;\n this._select = _select;\n if (this._select)\n this.id = this._select._registerOption();\n }\n /**\n * @description\n * Tracks the value bound to the option element. Unlike the value binding,\n * ngValue supports binding to objects.\n */\n set ngValue(value) {\n if (this._select == null)\n return;\n this._select._optionMap.set(this.id, value);\n this._setElementValue(_buildValueString$1(this.id, value));\n this._select.writeValue(this._select.value);\n }\n /**\n * @description\n * Tracks simple string values bound to the option element.\n * For objects, use the `ngValue` input binding.\n */\n set value(value) {\n this._setElementValue(value);\n if (this._select)\n this._select.writeValue(this._select.value);\n }\n /** @internal */\n _setElementValue(value) {\n this._renderer.setProperty(this._element.nativeElement, 'value', value);\n }\n /** @nodoc */\n ngOnDestroy() {\n if (this._select) {\n this._select._optionMap.delete(this.id);\n this._select.writeValue(this._select.value);\n }\n }\n}\nNgSelectOption.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgSelectOption, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: SelectControlValueAccessor, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nNgSelectOption.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: NgSelectOption, selector: \"option\", inputs: { ngValue: \"ngValue\", value: \"value\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NgSelectOption, decorators: [{\n type: Directive,\n args: [{ selector: 'option' }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: SelectControlValueAccessor, decorators: [{\n type: Optional\n }, {\n type: Host\n }] }]; }, propDecorators: { ngValue: [{\n type: Input,\n args: ['ngValue']\n }], value: [{\n type: Input,\n args: ['value']\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst SELECT_MULTIPLE_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SelectMultipleControlValueAccessor),\n multi: true\n};\nfunction _buildValueString(id, value) {\n if (id == null)\n return `${value}`;\n if (typeof value === 'string')\n value = `'${value}'`;\n if (value && typeof value === 'object')\n value = 'Object';\n return `${id}: ${value}`.slice(0, 50);\n}\nfunction _extractId(valueString) {\n return valueString.split(':')[0];\n}\n/** Mock interface for HTMLCollection */\nclass HTMLCollection {\n}\n/**\n * @description\n * The `ControlValueAccessor` for writing multi-select control values and listening to multi-select\n * control changes. The value accessor is used by the `FormControlDirective`, `FormControlName`, and\n * `NgModel` directives.\n *\n * @see `SelectControlValueAccessor`\n *\n * @usageNotes\n *\n * ### Using a multi-select control\n *\n * The follow example shows you how to use a multi-select control with a reactive form.\n *\n * ```ts\n * const countryControl = new FormControl();\n * ```\n *\n * ```\n * <select multiple name=\"countries\" [formControl]=\"countryControl\">\n * <option *ngFor=\"let country of countries\" [ngValue]=\"country\">\n * {{ country.name }}\n * </option>\n * </select>\n * ```\n *\n * ### Customizing option selection\n *\n * To customize the default option comparison algorithm, `<select>` supports `compareWith` input.\n * See the `SelectControlValueAccessor` for usage.\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass SelectMultipleControlValueAccessor extends BuiltInControlValueAccessor {\n constructor() {\n super(...arguments);\n /** @internal */\n this._optionMap = new Map();\n /** @internal */\n this._idCounter = 0;\n this._compareWith = Object.is;\n }\n /**\n * @description\n * Tracks the option comparison algorithm for tracking identities when\n * checking for changes.\n */\n set compareWith(fn) {\n if (typeof fn !== 'function' && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw new ɵRuntimeError(1201 /* RuntimeErrorCode.COMPAREWITH_NOT_A_FN */, `compareWith must be a function, but received ${JSON.stringify(fn)}`);\n }\n this._compareWith = fn;\n }\n /**\n * Sets the \"value\" property on one or of more of the select's options.\n * @nodoc\n */\n writeValue(value) {\n this.value = value;\n let optionSelectedStateSetter;\n if (Array.isArray(value)) {\n // convert values to ids\n const ids = value.map((v) => this._getOptionId(v));\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(ids.indexOf(o.toString()) > -1);\n };\n }\n else {\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(false);\n };\n }\n this._optionMap.forEach(optionSelectedStateSetter);\n }\n /**\n * Registers a function called when the control value changes\n * and writes an array of the selected options.\n * @nodoc\n */\n registerOnChange(fn) {\n this.onChange = (element) => {\n const selected = [];\n const selectedOptions = element.selectedOptions;\n if (selectedOptions !== undefined) {\n const options = selectedOptions;\n for (let i = 0; i < options.length; i++) {\n const opt = options[i];\n const val = this._getOptionValue(opt.value);\n selected.push(val);\n }\n }\n // Degrade to use `options` when `selectedOptions` property is not available.\n // Note: the `selectedOptions` is available in all supported browsers, but the Domino lib\n // doesn't have it currently, see https://github.com/fgnass/domino/issues/177.\n else {\n const options = element.options;\n for (let i = 0; i < options.length; i++) {\n const opt = options[i];\n if (opt.selected) {\n const val = this._getOptionValue(opt.value);\n selected.push(val);\n }\n }\n }\n this.value = selected;\n fn(selected);\n };\n }\n /** @internal */\n _registerOption(value) {\n const id = (this._idCounter++).toString();\n this._optionMap.set(id, value);\n return id;\n }\n /** @internal */\n _getOptionId(value) {\n for (const id of Array.from(this._optionMap.keys())) {\n if (this._compareWith(this._optionMap.get(id)._value, value))\n return id;\n }\n return null;\n }\n /** @internal */\n _getOptionValue(valueString) {\n const id = _extractId(valueString);\n return this._optionMap.has(id) ? this._optionMap.get(id)._value : valueString;\n }\n}\nSelectMultipleControlValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: SelectMultipleControlValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nSelectMultipleControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: SelectMultipleControlValueAccessor, selector: \"select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]\", inputs: { compareWith: \"compareWith\" }, host: { listeners: { \"change\": \"onChange($event.target)\", \"blur\": \"onTouched()\" } }, providers: [SELECT_MULTIPLE_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: SelectMultipleControlValueAccessor, decorators: [{\n type: Directive,\n args: [{\n selector: 'select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]',\n host: { '(change)': 'onChange($event.target)', '(blur)': 'onTouched()' },\n providers: [SELECT_MULTIPLE_VALUE_ACCESSOR]\n }]\n }], propDecorators: { compareWith: [{\n type: Input\n }] } });\n/**\n * @description\n * Marks `<option>` as dynamic, so Angular can be notified when options change.\n *\n * @see `SelectMultipleControlValueAccessor`\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass ɵNgSelectMultipleOption {\n constructor(_element, _renderer, _select) {\n this._element = _element;\n this._renderer = _renderer;\n this._select = _select;\n if (this._select) {\n this.id = this._select._registerOption(this);\n }\n }\n /**\n * @description\n * Tracks the value bound to the option element. Unlike the value binding,\n * ngValue supports binding to objects.\n */\n set ngValue(value) {\n if (this._select == null)\n return;\n this._value = value;\n this._setElementValue(_buildValueString(this.id, value));\n this._select.writeValue(this._select.value);\n }\n /**\n * @description\n * Tracks simple string values bound to the option element.\n * For objects, use the `ngValue` input binding.\n */\n set value(value) {\n if (this._select) {\n this._value = value;\n this._setElementValue(_buildValueString(this.id, value));\n this._select.writeValue(this._select.value);\n }\n else {\n this._setElementValue(value);\n }\n }\n /** @internal */\n _setElementValue(value) {\n this._renderer.setProperty(this._element.nativeElement, 'value', value);\n }\n /** @internal */\n _setSelected(selected) {\n this._renderer.setProperty(this._element.nativeElement, 'selected', selected);\n }\n /** @nodoc */\n ngOnDestroy() {\n if (this._select) {\n this._select._optionMap.delete(this.id);\n this._select.writeValue(this._select.value);\n }\n }\n}\nɵNgSelectMultipleOption.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: ɵNgSelectMultipleOption, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: SelectMultipleControlValueAccessor, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nɵNgSelectMultipleOption.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: ɵNgSelectMultipleOption, selector: \"option\", inputs: { ngValue: \"ngValue\", value: \"value\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: ɵNgSelectMultipleOption, decorators: [{\n type: Directive,\n args: [{ selector: 'option' }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: SelectMultipleControlValueAccessor, decorators: [{\n type: Optional\n }, {\n type: Host\n }] }]; }, propDecorators: { ngValue: [{\n type: Input,\n args: ['ngValue']\n }], value: [{\n type: Input,\n args: ['value']\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Method that updates string to integer if not already a number\n *\n * @param value The value to convert to integer.\n * @returns value of parameter converted to number or integer.\n */\nfunction toInteger(value) {\n return typeof value === 'number' ? value : parseInt(value, 10);\n}\n/**\n * Method that ensures that provided value is a float (and converts it to float if needed).\n *\n * @param value The value to convert to float.\n * @returns value of parameter converted to number or float.\n */\nfunction toFloat(value) {\n return typeof value === 'number' ? value : parseFloat(value);\n}\n/**\n * A base class for Validator-based Directives. The class contains common logic shared across such\n * Directives.\n *\n * For internal use only, this class is not intended for use outside of the Forms package.\n */\nclass AbstractValidatorDirective {\n constructor() {\n this._validator = nullValidator;\n }\n /** @nodoc */\n ngOnChanges(changes) {\n if (this.inputName in changes) {\n const input = this.normalizeInput(changes[this.inputName].currentValue);\n this._enabled = this.enabled(input);\n this._validator = this._enabled ? this.createValidator(input) : nullValidator;\n if (this._onChange) {\n this._onChange();\n }\n }\n }\n /** @nodoc */\n validate(control) {\n return this._validator(control);\n }\n /** @nodoc */\n registerOnValidatorChange(fn) {\n this._onChange = fn;\n }\n /**\n * @description\n * Determines whether this validator should be active or not based on an input.\n * Base class implementation checks whether an input is defined (if the value is different from\n * `null` and `undefined`). Validator classes that extend this base class can override this\n * function with the logic specific to a particular validator directive.\n */\n enabled(input) {\n return input != null /* both `null` and `undefined` */;\n }\n}\nAbstractValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: AbstractValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nAbstractValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: AbstractValidatorDirective, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: AbstractValidatorDirective, decorators: [{\n type: Directive\n }] });\n/**\n * @description\n * Provider which adds `MaxValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nconst MAX_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MaxValidator),\n multi: true\n};\n/**\n * A directive which installs the {@link MaxValidator} for any `formControlName`,\n * `formControl`, or control with `ngModel` that also has a `max` attribute.\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a max validator\n *\n * The following example shows how to add a max validator to an input attached to an\n * ngModel binding.\n *\n * ```html\n * <input type=\"number\" ngModel max=\"4\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass MaxValidator extends AbstractValidatorDirective {\n constructor() {\n super(...arguments);\n /** @internal */\n this.inputName = 'max';\n /** @internal */\n this.normalizeInput = (input) => toFloat(input);\n /** @internal */\n this.createValidator = (max) => maxValidator(max);\n }\n}\nMaxValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: MaxValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMaxValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: MaxValidator, selector: \"input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]\", inputs: { max: \"max\" }, host: { properties: { \"attr.max\": \"_enabled ? max : null\" } }, providers: [MAX_VALIDATOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: MaxValidator, decorators: [{\n type: Directive,\n args: [{\n selector: 'input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]',\n providers: [MAX_VALIDATOR],\n host: { '[attr.max]': '_enabled ? max : null' }\n }]\n }], propDecorators: { max: [{\n type: Input\n }] } });\n/**\n * @description\n * Provider which adds `MinValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nconst MIN_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MinValidator),\n multi: true\n};\n/**\n * A directive which installs the {@link MinValidator} for any `formControlName`,\n * `formControl`, or control with `ngModel` that also has a `min` attribute.\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a min validator\n *\n * The following example shows how to add a min validator to an input attached to an\n * ngModel binding.\n *\n * ```html\n * <input type=\"number\" ngModel min=\"4\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass MinValidator extends AbstractValidatorDirective {\n constructor() {\n super(...arguments);\n /** @internal */\n this.inputName = 'min';\n /** @internal */\n this.normalizeInput = (input) => toFloat(input);\n /** @internal */\n this.createValidator = (min) => minValidator(min);\n }\n}\nMinValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: MinValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMinValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: MinValidator, selector: \"input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]\", inputs: { min: \"min\" }, host: { properties: { \"attr.min\": \"_enabled ? min : null\" } }, providers: [MIN_VALIDATOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: MinValidator, decorators: [{\n type: Directive,\n args: [{\n selector: 'input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]',\n providers: [MIN_VALIDATOR],\n host: { '[attr.min]': '_enabled ? min : null' }\n }]\n }], propDecorators: { min: [{\n type: Input\n }] } });\n/**\n * @description\n * Provider which adds `RequiredValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nconst REQUIRED_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => RequiredValidator),\n multi: true\n};\n/**\n * @description\n * Provider which adds `CheckboxRequiredValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nconst CHECKBOX_REQUIRED_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => CheckboxRequiredValidator),\n multi: true\n};\n/**\n * @description\n * A directive that adds the `required` validator to any controls marked with the\n * `required` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a required validator using template-driven forms\n *\n * ```\n * <input name=\"fullName\" ngModel required>\n * ```\n *\n * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\nclass RequiredValidator extends AbstractValidatorDirective {\n constructor() {\n super(...arguments);\n /** @internal */\n this.inputName = 'required';\n /** @internal */\n this.normalizeInput = ɵcoerceToBoolean;\n /** @internal */\n this.createValidator = (input) => requiredValidator;\n }\n /** @nodoc */\n enabled(input) {\n return input;\n }\n}\nRequiredValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: RequiredValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nRequiredValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: RequiredValidator, selector: \":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]\", inputs: { required: \"required\" }, host: { properties: { \"attr.required\": \"_enabled ? \\\"\\\" : null\" } }, providers: [REQUIRED_VALIDATOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: RequiredValidator, decorators: [{\n type: Directive,\n args: [{\n selector: ':not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]',\n providers: [REQUIRED_VALIDATOR],\n host: { '[attr.required]': '_enabled ? \"\" : null' }\n }]\n }], propDecorators: { required: [{\n type: Input\n }] } });\n/**\n * A Directive that adds the `required` validator to checkbox controls marked with the\n * `required` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a required checkbox validator using template-driven forms\n *\n * The following example shows how to add a checkbox required validator to an input attached to an\n * ngModel binding.\n *\n * ```\n * <input type=\"checkbox\" name=\"active\" ngModel required>\n * ```\n *\n * @publicApi\n * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\n */\nclass CheckboxRequiredValidator extends RequiredValidator {\n constructor() {\n super(...arguments);\n /** @internal */\n this.createValidator = (input) => requiredTrueValidator;\n }\n}\nCheckboxRequiredValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: CheckboxRequiredValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nCheckboxRequiredValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: CheckboxRequiredValidator, selector: \"input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]\", host: { properties: { \"attr.required\": \"_enabled ? \\\"\\\" : null\" } }, providers: [CHECKBOX_REQUIRED_VALIDATOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: CheckboxRequiredValidator, decorators: [{\n type: Directive,\n args: [{\n selector: 'input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]',\n providers: [CHECKBOX_REQUIRED_VALIDATOR],\n host: { '[attr.required]': '_enabled ? \"\" : null' }\n }]\n }] });\n/**\n * @description\n * Provider which adds `EmailValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nconst EMAIL_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => EmailValidator),\n multi: true\n};\n/**\n * A directive that adds the `email` validator to controls marked with the\n * `email` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * The email validation is based on the WHATWG HTML specification with some enhancements to\n * incorporate more RFC rules. More information can be found on the [Validators.email\n * page](api/forms/Validators#email).\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding an email validator\n *\n * The following example shows how to add an email validator to an input attached to an ngModel\n * binding.\n *\n * ```\n * <input type=\"email\" name=\"email\" ngModel email>\n * <input type=\"email\" name=\"email\" ngModel email=\"true\">\n * <input type=\"email\" name=\"email\" ngModel [email]=\"true\">\n * ```\n *\n * @publicApi\n * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\n */\nclass EmailValidator extends AbstractValidatorDirective {\n constructor() {\n super(...arguments);\n /** @internal */\n this.inputName = 'email';\n /** @internal */\n this.normalizeInput = ɵcoerceToBoolean;\n /** @internal */\n this.createValidator = (input) => emailValidator;\n }\n /** @nodoc */\n enabled(input) {\n return input;\n }\n}\nEmailValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: EmailValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nEmailValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: EmailValidator, selector: \"[email][formControlName],[email][formControl],[email][ngModel]\", inputs: { email: \"email\" }, providers: [EMAIL_VALIDATOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: EmailValidator, decorators: [{\n type: Directive,\n args: [{\n selector: '[email][formControlName],[email][formControl],[email][ngModel]',\n providers: [EMAIL_VALIDATOR]\n }]\n }], propDecorators: { email: [{\n type: Input\n }] } });\n/**\n * @description\n * Provider which adds `MinLengthValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nconst MIN_LENGTH_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MinLengthValidator),\n multi: true\n};\n/**\n * A directive that adds minimum length validation to controls marked with the\n * `minlength` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a minimum length validator\n *\n * The following example shows how to add a minimum length validator to an input attached to an\n * ngModel binding.\n *\n * ```html\n * <input name=\"firstName\" ngModel minlength=\"4\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass MinLengthValidator extends AbstractValidatorDirective {\n constructor() {\n super(...arguments);\n /** @internal */\n this.inputName = 'minlength';\n /** @internal */\n this.normalizeInput = (input) => toInteger(input);\n /** @internal */\n this.createValidator = (minlength) => minLengthValidator(minlength);\n }\n}\nMinLengthValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: MinLengthValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMinLengthValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: MinLengthValidator, selector: \"[minlength][formControlName],[minlength][formControl],[minlength][ngModel]\", inputs: { minlength: \"minlength\" }, host: { properties: { \"attr.minlength\": \"_enabled ? minlength : null\" } }, providers: [MIN_LENGTH_VALIDATOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: MinLengthValidator, decorators: [{\n type: Directive,\n args: [{\n selector: '[minlength][formControlName],[minlength][formControl],[minlength][ngModel]',\n providers: [MIN_LENGTH_VALIDATOR],\n host: { '[attr.minlength]': '_enabled ? minlength : null' }\n }]\n }], propDecorators: { minlength: [{\n type: Input\n }] } });\n/**\n * @description\n * Provider which adds `MaxLengthValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nconst MAX_LENGTH_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MaxLengthValidator),\n multi: true\n};\n/**\n * A directive that adds max length validation to controls marked with the\n * `maxlength` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a maximum length validator\n *\n * The following example shows how to add a maximum length validator to an input attached to an\n * ngModel binding.\n *\n * ```html\n * <input name=\"firstName\" ngModel maxlength=\"25\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass MaxLengthValidator extends AbstractValidatorDirective {\n constructor() {\n super(...arguments);\n /** @internal */\n this.inputName = 'maxlength';\n /** @internal */\n this.normalizeInput = (input) => toInteger(input);\n /** @internal */\n this.createValidator = (maxlength) => maxLengthValidator(maxlength);\n }\n}\nMaxLengthValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: MaxLengthValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMaxLengthValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: MaxLengthValidator, selector: \"[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]\", inputs: { maxlength: \"maxlength\" }, host: { properties: { \"attr.maxlength\": \"_enabled ? maxlength : null\" } }, providers: [MAX_LENGTH_VALIDATOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: MaxLengthValidator, decorators: [{\n type: Directive,\n args: [{\n selector: '[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]',\n providers: [MAX_LENGTH_VALIDATOR],\n host: { '[attr.maxlength]': '_enabled ? maxlength : null' }\n }]\n }], propDecorators: { maxlength: [{\n type: Input\n }] } });\n/**\n * @description\n * Provider which adds `PatternValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nconst PATTERN_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => PatternValidator),\n multi: true\n};\n/**\n * @description\n * A directive that adds regex pattern validation to controls marked with the\n * `pattern` attribute. The regex must match the entire control value.\n * The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a pattern validator\n *\n * The following example shows how to add a pattern validator to an input attached to an\n * ngModel binding.\n *\n * ```html\n * <input name=\"firstName\" ngModel pattern=\"[a-zA-Z ]*\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass PatternValidator extends AbstractValidatorDirective {\n constructor() {\n super(...arguments);\n /** @internal */\n this.inputName = 'pattern';\n /** @internal */\n this.normalizeInput = (input) => input;\n /** @internal */\n this.createValidator = (input) => patternValidator(input);\n }\n}\nPatternValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: PatternValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nPatternValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: PatternValidator, selector: \"[pattern][formControlName],[pattern][formControl],[pattern][ngModel]\", inputs: { pattern: \"pattern\" }, host: { properties: { \"attr.pattern\": \"_enabled ? pattern : null\" } }, providers: [PATTERN_VALIDATOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: PatternValidator, decorators: [{\n type: Directive,\n args: [{\n selector: '[pattern][formControlName],[pattern][formControl],[pattern][ngModel]',\n providers: [PATTERN_VALIDATOR],\n host: { '[attr.pattern]': '_enabled ? pattern : null' }\n }]\n }], propDecorators: { pattern: [{\n type: Input\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst SHARED_FORM_DIRECTIVES = [\n ɵNgNoValidate,\n NgSelectOption,\n ɵNgSelectMultipleOption,\n DefaultValueAccessor,\n NumberValueAccessor,\n RangeValueAccessor,\n CheckboxControlValueAccessor,\n SelectControlValueAccessor,\n SelectMultipleControlValueAccessor,\n RadioControlValueAccessor,\n NgControlStatus,\n NgControlStatusGroup,\n RequiredValidator,\n MinLengthValidator,\n MaxLengthValidator,\n PatternValidator,\n CheckboxRequiredValidator,\n EmailValidator,\n MinValidator,\n MaxValidator,\n];\nconst TEMPLATE_DRIVEN_DIRECTIVES = [NgModel, NgModelGroup, NgForm];\nconst REACTIVE_DRIVEN_DIRECTIVES = [FormControlDirective, FormGroupDirective, FormControlName, FormGroupName, FormArrayName];\n/**\n * Internal module used for sharing directives between FormsModule and ReactiveFormsModule\n */\nclass ɵInternalFormsSharedModule {\n}\nɵInternalFormsSharedModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: ɵInternalFormsSharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nɵInternalFormsSharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.0.4\", ngImport: i0, type: ɵInternalFormsSharedModule, declarations: [ɵNgNoValidate,\n NgSelectOption,\n ɵNgSelectMultipleOption,\n DefaultValueAccessor,\n NumberValueAccessor,\n RangeValueAccessor,\n CheckboxControlValueAccessor,\n SelectControlValueAccessor,\n SelectMultipleControlValueAccessor,\n RadioControlValueAccessor,\n NgControlStatus,\n NgControlStatusGroup,\n RequiredValidator,\n MinLengthValidator,\n MaxLengthValidator,\n PatternValidator,\n CheckboxRequiredValidator,\n EmailValidator,\n MinValidator,\n MaxValidator], imports: [RadioControlRegistryModule], exports: [ɵNgNoValidate,\n NgSelectOption,\n ɵNgSelectMultipleOption,\n DefaultValueAccessor,\n NumberValueAccessor,\n RangeValueAccessor,\n CheckboxControlValueAccessor,\n SelectControlValueAccessor,\n SelectMultipleControlValueAccessor,\n RadioControlValueAccessor,\n NgControlStatus,\n NgControlStatusGroup,\n RequiredValidator,\n MinLengthValidator,\n MaxLengthValidator,\n PatternValidator,\n CheckboxRequiredValidator,\n EmailValidator,\n MinValidator,\n MaxValidator] });\nɵInternalFormsSharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: ɵInternalFormsSharedModule, imports: [RadioControlRegistryModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: ɵInternalFormsSharedModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: SHARED_FORM_DIRECTIVES,\n imports: [RadioControlRegistryModule],\n exports: SHARED_FORM_DIRECTIVES,\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Exports the required providers and directives for template-driven forms,\n * making them available for import by NgModules that import this module.\n *\n * Providers associated with this module:\n * * `RadioControlRegistry`\n *\n * @see [Forms Overview](/guide/forms-overview)\n * @see [Template-driven Forms Guide](/guide/forms)\n *\n * @publicApi\n */\nclass FormsModule {\n /**\n * @description\n * Provides options for configuring the forms module.\n *\n * @param opts An object of configuration options\n * * `callSetDisabledState` Configures whether to `always` call `setDisabledState`, which is more\n * correct, or to only call it `whenDisabled`, which is the legacy behavior.\n */\n static withConfig(opts) {\n return {\n ngModule: FormsModule,\n providers: [{\n provide: CALL_SET_DISABLED_STATE,\n useValue: opts.callSetDisabledState ?? setDisabledStateDefault\n }]\n };\n }\n}\nFormsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: FormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.0.4\", ngImport: i0, type: FormsModule, declarations: [NgModel, NgModelGroup, NgForm], exports: [ɵInternalFormsSharedModule, NgModel, NgModelGroup, NgForm] });\nFormsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: FormsModule, imports: [ɵInternalFormsSharedModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: FormsModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: TEMPLATE_DRIVEN_DIRECTIVES,\n exports: [ɵInternalFormsSharedModule, TEMPLATE_DRIVEN_DIRECTIVES]\n }]\n }] });\n/**\n * Exports the required infrastructure and directives for reactive forms,\n * making them available for import by NgModules that import this module.\n *\n * Providers associated with this module:\n * * `FormBuilder`\n * * `RadioControlRegistry`\n *\n * @see [Forms Overview](guide/forms-overview)\n * @see [Reactive Forms Guide](guide/reactive-forms)\n *\n * @publicApi\n */\nclass ReactiveFormsModule {\n /**\n * @description\n * Provides options for configuring the reactive forms module.\n *\n * @param opts An object of configuration options\n * * `warnOnNgModelWithFormControl` Configures when to emit a warning when an `ngModel`\n * binding is used with reactive form directives.\n * * `callSetDisabledState` Configures whether to `always` call `setDisabledState`, which is more\n * correct, or to only call it `whenDisabled`, which is the legacy behavior.\n */\n static withConfig(opts) {\n return {\n ngModule: ReactiveFormsModule,\n providers: [\n {\n provide: NG_MODEL_WITH_FORM_CONTROL_WARNING,\n useValue: opts.warnOnNgModelWithFormControl ?? 'always'\n },\n {\n provide: CALL_SET_DISABLED_STATE,\n useValue: opts.callSetDisabledState ?? setDisabledStateDefault\n }\n ]\n };\n }\n}\nReactiveFormsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: ReactiveFormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nReactiveFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.0.4\", ngImport: i0, type: ReactiveFormsModule, declarations: [FormControlDirective, FormGroupDirective, FormControlName, FormGroupName, FormArrayName], exports: [ɵInternalFormsSharedModule, FormControlDirective, FormGroupDirective, FormControlName, FormGroupName, FormArrayName] });\nReactiveFormsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: ReactiveFormsModule, imports: [ɵInternalFormsSharedModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: ReactiveFormsModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [REACTIVE_DRIVEN_DIRECTIVES],\n exports: [ɵInternalFormsSharedModule, REACTIVE_DRIVEN_DIRECTIVES]\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Tracks the value and validity state of an array of `FormControl`,\n * `FormGroup` or `FormArray` instances.\n *\n * A `FormArray` aggregates the values of each child `FormControl` into an array.\n * It calculates its status by reducing the status values of its children. For example, if one of\n * the controls in a `FormArray` is invalid, the entire array becomes invalid.\n *\n * `FormArray` accepts one generic argument, which is the type of the controls inside.\n * If you need a heterogenous array, use {@link UntypedFormArray}.\n *\n * `FormArray` is one of the four fundamental building blocks used to define forms in Angular,\n * along with `FormControl`, `FormGroup`, and `FormRecord`.\n *\n * @usageNotes\n *\n * ### Create an array of form controls\n *\n * ```\n * const arr = new FormArray([\n * new FormControl('Nancy', Validators.minLength(2)),\n * new FormControl('Drew'),\n * ]);\n *\n * console.log(arr.value); // ['Nancy', 'Drew']\n * console.log(arr.status); // 'VALID'\n * ```\n *\n * ### Create a form array with array-level validators\n *\n * You include array-level validators and async validators. These come in handy\n * when you want to perform validation that considers the value of more than one child\n * control.\n *\n * The two types of validators are passed in separately as the second and third arg\n * respectively, or together as part of an options object.\n *\n * ```\n * const arr = new FormArray([\n * new FormControl('Nancy'),\n * new FormControl('Drew')\n * ], {validators: myValidator, asyncValidators: myAsyncValidator});\n * ```\n *\n * ### Set the updateOn property for all controls in a form array\n *\n * The options object is used to set a default value for each child\n * control's `updateOn` property. If you set `updateOn` to `'blur'` at the\n * array level, all child controls default to 'blur', unless the child\n * has explicitly specified a different `updateOn` value.\n *\n * ```ts\n * const arr = new FormArray([\n * new FormControl()\n * ], {updateOn: 'blur'});\n * ```\n *\n * ### Adding or removing controls from a form array\n *\n * To change the controls in the array, use the `push`, `insert`, `removeAt` or `clear` methods\n * in `FormArray` itself. These methods ensure the controls are properly tracked in the\n * form's hierarchy. Do not modify the array of `AbstractControl`s used to instantiate\n * the `FormArray` directly, as that result in strange and unexpected behavior such\n * as broken change detection.\n *\n * @publicApi\n */\nclass FormArray extends AbstractControl {\n /**\n * Creates a new `FormArray` instance.\n *\n * @param controls An array of child controls. Each child control is given an index\n * where it is registered.\n *\n * @param validatorOrOpts A synchronous validator function, or an array of\n * such functions, or an `AbstractControlOptions` object that contains validation functions\n * and a validation trigger.\n *\n * @param asyncValidator A single async validator or array of async validator functions\n *\n */\n constructor(controls, validatorOrOpts, asyncValidator) {\n super(pickValidators(validatorOrOpts), pickAsyncValidators(asyncValidator, validatorOrOpts));\n this.controls = controls;\n this._initObservables();\n this._setUpdateStrategy(validatorOrOpts);\n this._setUpControls();\n this.updateValueAndValidity({\n onlySelf: true,\n // If `asyncValidator` is present, it will trigger control status change from `PENDING` to\n // `VALID` or `INVALID`.\n // The status should be broadcasted via the `statusChanges` observable, so we set `emitEvent`\n // to `true` to allow that during the control creation process.\n emitEvent: !!this.asyncValidator\n });\n }\n /**\n * Get the `AbstractControl` at the given `index` in the array.\n *\n * @param index Index in the array to retrieve the control. If `index` is negative, it will wrap\n * around from the back, and if index is greatly negative (less than `-length`), the result is\n * undefined. This behavior is the same as `Array.at(index)`.\n */\n at(index) {\n return this.controls[this._adjustIndex(index)];\n }\n /**\n * Insert a new `AbstractControl` at the end of the array.\n *\n * @param control Form control to be inserted\n * @param options Specifies whether this FormArray instance should emit events after a new\n * control is added.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges` observables emit events with the latest status and value when the control is\n * inserted. When false, no events are emitted.\n */\n push(control, options = {}) {\n this.controls.push(control);\n this._registerControl(control);\n this.updateValueAndValidity({ emitEvent: options.emitEvent });\n this._onCollectionChange();\n }\n /**\n * Insert a new `AbstractControl` at the given `index` in the array.\n *\n * @param index Index in the array to insert the control. If `index` is negative, wraps around\n * from the back. If `index` is greatly negative (less than `-length`), prepends to the array.\n * This behavior is the same as `Array.splice(index, 0, control)`.\n * @param control Form control to be inserted\n * @param options Specifies whether this FormArray instance should emit events after a new\n * control is inserted.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges` observables emit events with the latest status and value when the control is\n * inserted. When false, no events are emitted.\n */\n insert(index, control, options = {}) {\n this.controls.splice(index, 0, control);\n this._registerControl(control);\n this.updateValueAndValidity({ emitEvent: options.emitEvent });\n }\n /**\n * Remove the control at the given `index` in the array.\n *\n * @param index Index in the array to remove the control. If `index` is negative, wraps around\n * from the back. If `index` is greatly negative (less than `-length`), removes the first\n * element. This behavior is the same as `Array.splice(index, 1)`.\n * @param options Specifies whether this FormArray instance should emit events after a\n * control is removed.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges` observables emit events with the latest status and value when the control is\n * removed. When false, no events are emitted.\n */\n removeAt(index, options = {}) {\n // Adjust the index, then clamp it at no less than 0 to prevent undesired underflows.\n let adjustedIndex = this._adjustIndex(index);\n if (adjustedIndex < 0)\n adjustedIndex = 0;\n if (this.controls[adjustedIndex])\n this.controls[adjustedIndex]._registerOnCollectionChange(() => { });\n this.controls.splice(adjustedIndex, 1);\n this.updateValueAndValidity({ emitEvent: options.emitEvent });\n }\n /**\n * Replace an existing control.\n *\n * @param index Index in the array to replace the control. If `index` is negative, wraps around\n * from the back. If `index` is greatly negative (less than `-length`), replaces the first\n * element. This behavior is the same as `Array.splice(index, 1, control)`.\n * @param control The `AbstractControl` control to replace the existing control\n * @param options Specifies whether this FormArray instance should emit events after an\n * existing control is replaced with a new one.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges` observables emit events with the latest status and value when the control is\n * replaced with a new one. When false, no events are emitted.\n */\n setControl(index, control, options = {}) {\n // Adjust the index, then clamp it at no less than 0 to prevent undesired underflows.\n let adjustedIndex = this._adjustIndex(index);\n if (adjustedIndex < 0)\n adjustedIndex = 0;\n if (this.controls[adjustedIndex])\n this.controls[adjustedIndex]._registerOnCollectionChange(() => { });\n this.controls.splice(adjustedIndex, 1);\n if (control) {\n this.controls.splice(adjustedIndex, 0, control);\n this._registerControl(control);\n }\n this.updateValueAndValidity({ emitEvent: options.emitEvent });\n this._onCollectionChange();\n }\n /**\n * Length of the control array.\n */\n get length() {\n return this.controls.length;\n }\n /**\n * Sets the value of the `FormArray`. It accepts an array that matches\n * the structure of the control.\n *\n * This method performs strict checks, and throws an error if you try\n * to set the value of a control that doesn't exist or if you exclude the\n * value of a control.\n *\n * @usageNotes\n * ### Set the values for the controls in the form array\n *\n * ```\n * const arr = new FormArray([\n * new FormControl(),\n * new FormControl()\n * ]);\n * console.log(arr.value); // [null, null]\n *\n * arr.setValue(['Nancy', 'Drew']);\n * console.log(arr.value); // ['Nancy', 'Drew']\n * ```\n *\n * @param value Array of values for the controls\n * @param options Configure options that determine how the control propagates changes and\n * emits events after the value changes\n *\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default\n * is false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control value is updated.\n * When false, no events are emitted.\n * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n * updateValueAndValidity} method.\n */\n setValue(value, options = {}) {\n assertAllValuesPresent(this, false, value);\n value.forEach((newValue, index) => {\n assertControlPresent(this, false, index);\n this.at(index).setValue(newValue, { onlySelf: true, emitEvent: options.emitEvent });\n });\n this.updateValueAndValidity(options);\n }\n /**\n * Patches the value of the `FormArray`. It accepts an array that matches the\n * structure of the control, and does its best to match the values to the correct\n * controls in the group.\n *\n * It accepts both super-sets and sub-sets of the array without throwing an error.\n *\n * @usageNotes\n * ### Patch the values for controls in a form array\n *\n * ```\n * const arr = new FormArray([\n * new FormControl(),\n * new FormControl()\n * ]);\n * console.log(arr.value); // [null, null]\n *\n * arr.patchValue(['Nancy']);\n * console.log(arr.value); // ['Nancy', null]\n * ```\n *\n * @param value Array of latest values for the controls\n * @param options Configure options that determine how the control propagates changes and\n * emits events after the value changes\n *\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default\n * is false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges` observables emit events with the latest status and value when the control\n * value is updated. When false, no events are emitted. The configuration options are passed to\n * the {@link AbstractControl#updateValueAndValidity updateValueAndValidity} method.\n */\n patchValue(value, options = {}) {\n // Even though the `value` argument type doesn't allow `null` and `undefined` values, the\n // `patchValue` can be called recursively and inner data structures might have these values,\n // so we just ignore such cases when a field containing FormArray instance receives `null` or\n // `undefined` as a value.\n if (value == null /* both `null` and `undefined` */)\n return;\n value.forEach((newValue, index) => {\n if (this.at(index)) {\n this.at(index).patchValue(newValue, { onlySelf: true, emitEvent: options.emitEvent });\n }\n });\n this.updateValueAndValidity(options);\n }\n /**\n * Resets the `FormArray` and all descendants are marked `pristine` and `untouched`, and the\n * value of all descendants to null or null maps.\n *\n * You reset to a specific form state by passing in an array of states\n * that matches the structure of the control. The state is a standalone value\n * or a form state object with both a value and a disabled status.\n *\n * @usageNotes\n * ### Reset the values in a form array\n *\n * ```ts\n * const arr = new FormArray([\n * new FormControl(),\n * new FormControl()\n * ]);\n * arr.reset(['name', 'last name']);\n *\n * console.log(arr.value); // ['name', 'last name']\n * ```\n *\n * ### Reset the values in a form array and the disabled status for the first control\n *\n * ```\n * arr.reset([\n * {value: 'name', disabled: true},\n * 'last'\n * ]);\n *\n * console.log(arr.value); // ['last']\n * console.log(arr.at(0).status); // 'DISABLED'\n * ```\n *\n * @param value Array of values for the controls\n * @param options Configure options that determine how the control propagates changes and\n * emits events after the value changes\n *\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default\n * is false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control is reset.\n * When false, no events are emitted.\n * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n * updateValueAndValidity} method.\n */\n reset(value = [], options = {}) {\n this._forEachChild((control, index) => {\n control.reset(value[index], { onlySelf: true, emitEvent: options.emitEvent });\n });\n this._updatePristine(options);\n this._updateTouched(options);\n this.updateValueAndValidity(options);\n }\n /**\n * The aggregate value of the array, including any disabled controls.\n *\n * Reports all values regardless of disabled status.\n */\n getRawValue() {\n return this.controls.map((control) => control.getRawValue());\n }\n /**\n * Remove all controls in the `FormArray`.\n *\n * @param options Specifies whether this FormArray instance should emit events after all\n * controls are removed.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges` observables emit events with the latest status and value when all controls\n * in this FormArray instance are removed. When false, no events are emitted.\n *\n * @usageNotes\n * ### Remove all elements from a FormArray\n *\n * ```ts\n * const arr = new FormArray([\n * new FormControl(),\n * new FormControl()\n * ]);\n * console.log(arr.length); // 2\n *\n * arr.clear();\n * console.log(arr.length); // 0\n * ```\n *\n * It's a simpler and more efficient alternative to removing all elements one by one:\n *\n * ```ts\n * const arr = new FormArray([\n * new FormControl(),\n * new FormControl()\n * ]);\n *\n * while (arr.length) {\n * arr.removeAt(0);\n * }\n * ```\n */\n clear(options = {}) {\n if (this.controls.length < 1)\n return;\n this._forEachChild((control) => control._registerOnCollectionChange(() => { }));\n this.controls.splice(0);\n this.updateValueAndValidity({ emitEvent: options.emitEvent });\n }\n /**\n * Adjusts a negative index by summing it with the length of the array. For very negative\n * indices, the result may remain negative.\n * @internal\n */\n _adjustIndex(index) {\n return index < 0 ? index + this.length : index;\n }\n /** @internal */\n _syncPendingControls() {\n let subtreeUpdated = this.controls.reduce((updated, child) => {\n return child._syncPendingControls() ? true : updated;\n }, false);\n if (subtreeUpdated)\n this.updateValueAndValidity({ onlySelf: true });\n return subtreeUpdated;\n }\n /** @internal */\n _forEachChild(cb) {\n this.controls.forEach((control, index) => {\n cb(control, index);\n });\n }\n /** @internal */\n _updateValue() {\n this.value =\n this.controls.filter((control) => control.enabled || this.disabled)\n .map((control) => control.value);\n }\n /** @internal */\n _anyControls(condition) {\n return this.controls.some((control) => control.enabled && condition(control));\n }\n /** @internal */\n _setUpControls() {\n this._forEachChild((control) => this._registerControl(control));\n }\n /** @internal */\n _allControlsDisabled() {\n for (const control of this.controls) {\n if (control.enabled)\n return false;\n }\n return this.controls.length > 0 || this.disabled;\n }\n _registerControl(control) {\n control.setParent(this);\n control._registerOnCollectionChange(this._onCollectionChange);\n }\n /** @internal */\n _find(name) {\n return this.at(name) ?? null;\n }\n}\nconst UntypedFormArray = FormArray;\n/**\n * @description\n * Asserts that the given control is an instance of `FormArray`\n *\n * @publicApi\n */\nconst isFormArray = (control) => control instanceof FormArray;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction isAbstractControlOptions(options) {\n return !!options &&\n (options.asyncValidators !== undefined ||\n options.validators !== undefined ||\n options.updateOn !== undefined);\n}\n// clang-format on\n/**\n * @description\n * Creates an `AbstractControl` from a user-specified configuration.\n *\n * The `FormBuilder` provides syntactic sugar that shortens creating instances of a\n * `FormControl`, `FormGroup`, or `FormArray`. It reduces the amount of boilerplate needed to\n * build complex forms.\n *\n * @see [Reactive Forms Guide](guide/reactive-forms)\n *\n * @publicApi\n */\nclass FormBuilder {\n constructor() {\n this.useNonNullable = false;\n }\n /**\n * @description\n * Returns a FormBuilder in which automatically constructed @see FormControl} elements\n * have `{nonNullable: true}` and are non-nullable.\n *\n * **Constructing non-nullable controls**\n *\n * When constructing a control, it will be non-nullable, and will reset to its initial value.\n *\n * ```ts\n * let nnfb = new FormBuilder().nonNullable;\n * let name = nnfb.control('Alex'); // FormControl<string>\n * name.reset();\n * console.log(name); // 'Alex'\n * ```\n *\n * **Constructing non-nullable groups or arrays**\n *\n * When constructing a group or array, all automatically created inner controls will be\n * non-nullable, and will reset to their initial values.\n *\n * ```ts\n * let nnfb = new FormBuilder().nonNullable;\n * let name = nnfb.group({who: 'Alex'}); // FormGroup<{who: FormControl<string>}>\n * name.reset();\n * console.log(name); // {who: 'Alex'}\n * ```\n * **Constructing *nullable* fields on groups or arrays**\n *\n * It is still possible to have a nullable field. In particular, any `FormControl` which is\n * *already* constructed will not be altered. For example:\n *\n * ```ts\n * let nnfb = new FormBuilder().nonNullable;\n * // FormGroup<{who: FormControl<string|null>}>\n * let name = nnfb.group({who: new FormControl('Alex')});\n * name.reset(); console.log(name); // {who: null}\n * ```\n *\n * Because the inner control is constructed explicitly by the caller, the builder has\n * no control over how it is created, and cannot exclude the `null`.\n */\n get nonNullable() {\n const nnfb = new FormBuilder();\n nnfb.useNonNullable = true;\n return nnfb;\n }\n group(controls, options = null) {\n const reducedControls = this._reduceControls(controls);\n let newOptions = {};\n if (isAbstractControlOptions(options)) {\n // `options` are `AbstractControlOptions`\n newOptions = options;\n }\n else if (options !== null) {\n // `options` are legacy form group options\n newOptions.validators = options.validator;\n newOptions.asyncValidators = options.asyncValidator;\n }\n return new FormGroup(reducedControls, newOptions);\n }\n /**\n * @description\n * Constructs a new `FormRecord` instance. Accepts a single generic argument, which is an object\n * containing all the keys and corresponding inner control types.\n *\n * @param controls A collection of child controls. The key for each child is the name\n * under which it is registered.\n *\n * @param options Configuration options object for the `FormRecord`. The object should have the\n * `AbstractControlOptions` type and might contain the following fields:\n * * `validators`: A synchronous validator function, or an array of validator functions.\n * * `asyncValidators`: A single async validator or array of async validator functions.\n * * `updateOn`: The event upon which the control should be updated (options: 'change' | 'blur'\n * | submit').\n */\n record(controls, options = null) {\n const reducedControls = this._reduceControls(controls);\n // Cast to `any` because the inferred types are not as specific as Element.\n return new FormRecord(reducedControls, options);\n }\n /**\n * @description\n * Constructs a new `FormControl` with the given state, validators and options. Sets\n * `{nonNullable: true}` in the options to get a non-nullable control. Otherwise, the\n * control will be nullable. Accepts a single generic argument, which is the type of the\n * control's value.\n *\n * @param formState Initializes the control with an initial state value, or\n * with an object that contains both a value and a disabled status.\n *\n * @param validatorOrOpts A synchronous validator function, or an array of\n * such functions, or a `FormControlOptions` object that contains\n * validation functions and a validation trigger.\n *\n * @param asyncValidator A single async validator or array of async validator\n * functions.\n *\n * @usageNotes\n *\n * ### Initialize a control as disabled\n *\n * The following example returns a control with an initial value in a disabled state.\n *\n * <code-example path=\"forms/ts/formBuilder/form_builder_example.ts\" region=\"disabled-control\">\n * </code-example>\n */\n control(formState, validatorOrOpts, asyncValidator) {\n let newOptions = {};\n if (!this.useNonNullable) {\n return new FormControl(formState, validatorOrOpts, asyncValidator);\n }\n if (isAbstractControlOptions(validatorOrOpts)) {\n // If the second argument is options, then they are copied.\n newOptions = validatorOrOpts;\n }\n else {\n // If the other arguments are validators, they are copied into an options object.\n newOptions.validators = validatorOrOpts;\n newOptions.asyncValidators = asyncValidator;\n }\n return new FormControl(formState, { ...newOptions, nonNullable: true });\n }\n /**\n * Constructs a new `FormArray` from the given array of configurations,\n * validators and options. Accepts a single generic argument, which is the type of each control\n * inside the array.\n *\n * @param controls An array of child controls or control configs. Each child control is given an\n * index when it is registered.\n *\n * @param validatorOrOpts A synchronous validator function, or an array of such functions, or an\n * `AbstractControlOptions` object that contains\n * validation functions and a validation trigger.\n *\n * @param asyncValidator A single async validator or array of async validator functions.\n */\n array(controls, validatorOrOpts, asyncValidator) {\n const createdControls = controls.map(c => this._createControl(c));\n // Cast to `any` because the inferred types are not as specific as Element.\n return new FormArray(createdControls, validatorOrOpts, asyncValidator);\n }\n /** @internal */\n _reduceControls(controls) {\n const createdControls = {};\n Object.keys(controls).forEach(controlName => {\n createdControls[controlName] = this._createControl(controls[controlName]);\n });\n return createdControls;\n }\n /** @internal */\n _createControl(controls) {\n if (controls instanceof FormControl) {\n return controls;\n }\n else if (controls instanceof AbstractControl) { // A control; just return it\n return controls;\n }\n else if (Array.isArray(controls)) { // ControlConfig Tuple\n const value = controls[0];\n const validator = controls.length > 1 ? controls[1] : null;\n const asyncValidator = controls.length > 2 ? controls[2] : null;\n return this.control(value, validator, asyncValidator);\n }\n else { // T or FormControlState<T>\n return this.control(controls);\n }\n }\n}\nFormBuilder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: FormBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nFormBuilder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: FormBuilder, providedIn: ReactiveFormsModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: FormBuilder, decorators: [{\n type: Injectable,\n args: [{ providedIn: ReactiveFormsModule }]\n }] });\n/**\n * @description\n * `NonNullableFormBuilder` is similar to {@link FormBuilder}, but automatically constructed\n * {@link FormControl} elements have `{nonNullable: true}` and are non-nullable.\n *\n * @publicApi\n */\nclass NonNullableFormBuilder {\n}\nNonNullableFormBuilder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NonNullableFormBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNonNullableFormBuilder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NonNullableFormBuilder, providedIn: ReactiveFormsModule, useFactory: () => inject(FormBuilder).nonNullable });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NonNullableFormBuilder, decorators: [{\n type: Injectable,\n args: [{\n providedIn: ReactiveFormsModule,\n useFactory: () => inject(FormBuilder).nonNullable,\n }]\n }] });\n/**\n * UntypedFormBuilder is the same as @see FormBuilder, but it provides untyped controls.\n */\nclass UntypedFormBuilder extends FormBuilder {\n group(controlsConfig, options = null) {\n return super.group(controlsConfig, options);\n }\n /**\n * Like `FormBuilder#control`, except the resulting control is untyped.\n */\n control(formState, validatorOrOpts, asyncValidator) {\n return super.control(formState, validatorOrOpts, asyncValidator);\n }\n /**\n * Like `FormBuilder#array`, except the resulting array is untyped.\n */\n array(controlsConfig, validatorOrOpts, asyncValidator) {\n return super.array(controlsConfig, validatorOrOpts, asyncValidator);\n }\n}\nUntypedFormBuilder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: UntypedFormBuilder, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\nUntypedFormBuilder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: UntypedFormBuilder, providedIn: ReactiveFormsModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: UntypedFormBuilder, decorators: [{\n type: Injectable,\n args: [{ providedIn: ReactiveFormsModule }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @publicApi\n */\nconst VERSION = new Version('15.0.4');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AbstractControl, AbstractControlDirective, AbstractFormGroupDirective, COMPOSITION_BUFFER_MODE, CheckboxControlValueAccessor, CheckboxRequiredValidator, ControlContainer, DefaultValueAccessor, EmailValidator, FormArray, FormArrayName, FormBuilder, FormControl, FormControlDirective, FormControlName, FormGroup, FormGroupDirective, FormGroupName, FormRecord, FormsModule, MaxLengthValidator, MaxValidator, MinLengthValidator, MinValidator, NG_ASYNC_VALIDATORS, NG_VALIDATORS, NG_VALUE_ACCESSOR, NgControl, NgControlStatus, NgControlStatusGroup, NgForm, NgModel, NgModelGroup, NgSelectOption, NonNullableFormBuilder, NumberValueAccessor, PatternValidator, RadioControlValueAccessor, RangeValueAccessor, ReactiveFormsModule, RequiredValidator, SelectControlValueAccessor, SelectMultipleControlValueAccessor, UntypedFormArray, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, VERSION, Validators, isFormArray, isFormControl, isFormGroup, isFormRecord, ɵInternalFormsSharedModule, ɵNgNoValidate, ɵNgSelectMultipleOption };\n","import { getDefaultCurrentScope, getDefaultIsolationScope } from '../defaultScopes.js';\nimport { Scope } from '../scope.js';\nimport { isThenable } from '../utils-hoist/is.js';\nimport { getMainCarrier, getSentryCarrier } from '../carrier.js';\n\n/**\n * This is an object that holds a stack of scopes.\n */\nclass AsyncContextStack {\n\n constructor(scope, isolationScope) {\n let assignedScope;\n if (!scope) {\n assignedScope = new Scope();\n } else {\n assignedScope = scope;\n }\n\n let assignedIsolationScope;\n if (!isolationScope) {\n assignedIsolationScope = new Scope();\n } else {\n assignedIsolationScope = isolationScope;\n }\n\n // scope stack for domains or the process\n this._stack = [{ scope: assignedScope }];\n this._isolationScope = assignedIsolationScope;\n }\n\n /**\n * Fork a scope for the stack.\n */\n withScope(callback) {\n const scope = this._pushScope();\n\n let maybePromiseResult;\n try {\n maybePromiseResult = callback(scope);\n } catch (e) {\n this._popScope();\n throw e;\n }\n\n if (isThenable(maybePromiseResult)) {\n // @ts-expect-error - isThenable returns the wrong type\n return maybePromiseResult.then(\n res => {\n this._popScope();\n return res;\n },\n e => {\n this._popScope();\n throw e;\n },\n );\n }\n\n this._popScope();\n return maybePromiseResult;\n }\n\n /**\n * Get the client of the stack.\n */\n getClient() {\n return this.getStackTop().client ;\n }\n\n /**\n * Returns the scope of the top stack.\n */\n getScope() {\n return this.getStackTop().scope;\n }\n\n /**\n * Get the isolation scope for the stack.\n */\n getIsolationScope() {\n return this._isolationScope;\n }\n\n /**\n * Returns the topmost scope layer in the order domain > local > process.\n */\n getStackTop() {\n return this._stack[this._stack.length - 1] ;\n }\n\n /**\n * Push a scope to the stack.\n */\n _pushScope() {\n // We want to clone the content of prev scope\n const scope = this.getScope().clone();\n this._stack.push({\n client: this.getClient(),\n scope,\n });\n return scope;\n }\n\n /**\n * Pop a scope from the stack.\n */\n _popScope() {\n if (this._stack.length <= 1) return false;\n return !!this._stack.pop();\n }\n}\n\n/**\n * Get the global async context stack.\n * This will be removed during the v8 cycle and is only here to make migration easier.\n */\nfunction getAsyncContextStack() {\n const registry = getMainCarrier();\n const sentry = getSentryCarrier(registry);\n\n return (sentry.stack = sentry.stack || new AsyncContextStack(getDefaultCurrentScope(), getDefaultIsolationScope()));\n}\n\nfunction withScope(callback) {\n return getAsyncContextStack().withScope(callback);\n}\n\nfunction withSetScope(scope, callback) {\n const stack = getAsyncContextStack() ;\n return stack.withScope(() => {\n stack.getStackTop().scope = scope;\n return callback(scope);\n });\n}\n\nfunction withIsolationScope(callback) {\n return getAsyncContextStack().withScope(() => {\n return callback(getAsyncContextStack().getIsolationScope());\n });\n}\n\n/**\n * Get the stack-based async context strategy.\n */\nfunction getStackAsyncContextStrategy() {\n return {\n withIsolationScope,\n withScope,\n withSetScope,\n withSetIsolationScope: (_isolationScope, callback) => {\n return withIsolationScope(callback);\n },\n getCurrentScope: () => getAsyncContextStack().getScope(),\n getIsolationScope: () => getAsyncContextStack().getIsolationScope(),\n };\n}\n\nexport { AsyncContextStack, getStackAsyncContextStrategy };\n","import { Scope } from './scope.js';\nimport { getGlobalSingleton } from './utils-hoist/worldwide.js';\n\n/** Get the default current scope. */\nfunction getDefaultCurrentScope() {\n return getGlobalSingleton('defaultCurrentScope', () => new Scope());\n}\n\n/** Get the default isolation scope. */\nfunction getDefaultIsolationScope() {\n return getGlobalSingleton('defaultIsolationScope', () => new Scope());\n}\n\nexport { getDefaultCurrentScope, getDefaultIsolationScope };\n","import { getMainCarrier, getSentryCarrier } from '../carrier.js';\nimport { getStackAsyncContextStrategy } from './stackStrategy.js';\n\n/**\n * @private Private API with no semver guarantees!\n *\n * Sets the global async context strategy\n */\nfunction setAsyncContextStrategy(strategy) {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n const sentry = getSentryCarrier(registry);\n sentry.acs = strategy;\n}\n\n/**\n * Get the current async context strategy.\n * If none has been setup, the default will be used.\n */\nfunction getAsyncContextStrategy(carrier) {\n const sentry = getSentryCarrier(carrier);\n\n if (sentry.acs) {\n return sentry.acs;\n }\n\n // Otherwise, use the default one (stack)\n return getStackAsyncContextStrategy();\n}\n\nexport { getAsyncContextStrategy, setAsyncContextStrategy };\n","import { Observable } from '../Observable';\nimport { isFunction } from './isFunction';\nexport function isObservable(obj) {\n return !!obj && (obj instanceof Observable || (isFunction(obj.lift) && isFunction(obj.subscribe)));\n}\n","/**\n * @license Angular v15.0.4\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { ɵAnimationGroupPlayer, NoopAnimationPlayer, AUTO_STYLE, ɵPRE_STYLE, sequence, style } from '@angular/animations';\nimport * as i0 from '@angular/core';\nimport { ɵRuntimeError, Injectable } from '@angular/core';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst LINE_START = '\\n - ';\nfunction invalidTimingValue(exp) {\n return new ɵRuntimeError(3000 /* RuntimeErrorCode.INVALID_TIMING_VALUE */, ngDevMode && `The provided timing value \"${exp}\" is invalid.`);\n}\nfunction negativeStepValue() {\n return new ɵRuntimeError(3100 /* RuntimeErrorCode.NEGATIVE_STEP_VALUE */, ngDevMode && 'Duration values below 0 are not allowed for this animation step.');\n}\nfunction negativeDelayValue() {\n return new ɵRuntimeError(3101 /* RuntimeErrorCode.NEGATIVE_DELAY_VALUE */, ngDevMode && 'Delay values below 0 are not allowed for this animation step.');\n}\nfunction invalidStyleParams(varName) {\n return new ɵRuntimeError(3001 /* RuntimeErrorCode.INVALID_STYLE_PARAMS */, ngDevMode &&\n `Unable to resolve the local animation param ${varName} in the given list of values`);\n}\nfunction invalidParamValue(varName) {\n return new ɵRuntimeError(3003 /* RuntimeErrorCode.INVALID_PARAM_VALUE */, ngDevMode && `Please provide a value for the animation param ${varName}`);\n}\nfunction invalidNodeType(nodeType) {\n return new ɵRuntimeError(3004 /* RuntimeErrorCode.INVALID_NODE_TYPE */, ngDevMode && `Unable to resolve animation metadata node #${nodeType}`);\n}\nfunction invalidCssUnitValue(userProvidedProperty, value) {\n return new ɵRuntimeError(3005 /* RuntimeErrorCode.INVALID_CSS_UNIT_VALUE */, ngDevMode && `Please provide a CSS unit value for ${userProvidedProperty}:${value}`);\n}\nfunction invalidTrigger() {\n return new ɵRuntimeError(3006 /* RuntimeErrorCode.INVALID_TRIGGER */, ngDevMode &&\n 'animation triggers cannot be prefixed with an `@` sign (e.g. trigger(\\'@foo\\', [...]))');\n}\nfunction invalidDefinition() {\n return new ɵRuntimeError(3007 /* RuntimeErrorCode.INVALID_DEFINITION */, ngDevMode && 'only state() and transition() definitions can sit inside of a trigger()');\n}\nfunction invalidState(metadataName, missingSubs) {\n return new ɵRuntimeError(3008 /* RuntimeErrorCode.INVALID_STATE */, ngDevMode &&\n `state(\"${metadataName}\", ...) must define default values for all the following style substitutions: ${missingSubs.join(', ')}`);\n}\nfunction invalidStyleValue(value) {\n return new ɵRuntimeError(3002 /* RuntimeErrorCode.INVALID_STYLE_VALUE */, ngDevMode && `The provided style string value ${value} is not allowed.`);\n}\nfunction invalidProperty(prop) {\n return new ɵRuntimeError(3009 /* RuntimeErrorCode.INVALID_PROPERTY */, ngDevMode &&\n `The provided animation property \"${prop}\" is not a supported CSS property for animations`);\n}\nfunction invalidParallelAnimation(prop, firstStart, firstEnd, secondStart, secondEnd) {\n return new ɵRuntimeError(3010 /* RuntimeErrorCode.INVALID_PARALLEL_ANIMATION */, ngDevMode &&\n `The CSS property \"${prop}\" that exists between the times of \"${firstStart}ms\" and \"${firstEnd}ms\" is also being animated in a parallel animation between the times of \"${secondStart}ms\" and \"${secondEnd}ms\"`);\n}\nfunction invalidKeyframes() {\n return new ɵRuntimeError(3011 /* RuntimeErrorCode.INVALID_KEYFRAMES */, ngDevMode && `keyframes() must be placed inside of a call to animate()`);\n}\nfunction invalidOffset() {\n return new ɵRuntimeError(3012 /* RuntimeErrorCode.INVALID_OFFSET */, ngDevMode && `Please ensure that all keyframe offsets are between 0 and 1`);\n}\nfunction keyframeOffsetsOutOfOrder() {\n return new ɵRuntimeError(3200 /* RuntimeErrorCode.KEYFRAME_OFFSETS_OUT_OF_ORDER */, ngDevMode && `Please ensure that all keyframe offsets are in order`);\n}\nfunction keyframesMissingOffsets() {\n return new ɵRuntimeError(3202 /* RuntimeErrorCode.KEYFRAMES_MISSING_OFFSETS */, ngDevMode && `Not all style() steps within the declared keyframes() contain offsets`);\n}\nfunction invalidStagger() {\n return new ɵRuntimeError(3013 /* RuntimeErrorCode.INVALID_STAGGER */, ngDevMode && `stagger() can only be used inside of query()`);\n}\nfunction invalidQuery(selector) {\n return new ɵRuntimeError(3014 /* RuntimeErrorCode.INVALID_QUERY */, ngDevMode &&\n `\\`query(\"${selector}\")\\` returned zero elements. (Use \\`query(\"${selector}\", { optional: true })\\` if you wish to allow this.)`);\n}\nfunction invalidExpression(expr) {\n return new ɵRuntimeError(3015 /* RuntimeErrorCode.INVALID_EXPRESSION */, ngDevMode && `The provided transition expression \"${expr}\" is not supported`);\n}\nfunction invalidTransitionAlias(alias) {\n return new ɵRuntimeError(3016 /* RuntimeErrorCode.INVALID_TRANSITION_ALIAS */, ngDevMode && `The transition alias value \"${alias}\" is not supported`);\n}\nfunction validationFailed(errors) {\n return new ɵRuntimeError(3500 /* RuntimeErrorCode.VALIDATION_FAILED */, ngDevMode && `animation validation failed:\\n${errors.map(err => err.message).join('\\n')}`);\n}\nfunction buildingFailed(errors) {\n return new ɵRuntimeError(3501 /* RuntimeErrorCode.BUILDING_FAILED */, ngDevMode && `animation building failed:\\n${errors.map(err => err.message).join('\\n')}`);\n}\nfunction triggerBuildFailed(name, errors) {\n return new ɵRuntimeError(3404 /* RuntimeErrorCode.TRIGGER_BUILD_FAILED */, ngDevMode &&\n `The animation trigger \"${name}\" has failed to build due to the following errors:\\n - ${errors.map(err => err.message).join('\\n - ')}`);\n}\nfunction animationFailed(errors) {\n return new ɵRuntimeError(3502 /* RuntimeErrorCode.ANIMATION_FAILED */, ngDevMode &&\n `Unable to animate due to the following errors:${LINE_START}${errors.map(err => err.message).join(LINE_START)}`);\n}\nfunction registerFailed(errors) {\n return new ɵRuntimeError(3503 /* RuntimeErrorCode.REGISTRATION_FAILED */, ngDevMode &&\n `Unable to build the animation due to the following errors: ${errors.map(err => err.message).join('\\n')}`);\n}\nfunction missingOrDestroyedAnimation() {\n return new ɵRuntimeError(3300 /* RuntimeErrorCode.MISSING_OR_DESTROYED_ANIMATION */, ngDevMode && 'The requested animation doesn\\'t exist or has already been destroyed');\n}\nfunction createAnimationFailed(errors) {\n return new ɵRuntimeError(3504 /* RuntimeErrorCode.CREATE_ANIMATION_FAILED */, ngDevMode &&\n `Unable to create the animation due to the following errors:${errors.map(err => err.message).join('\\n')}`);\n}\nfunction missingPlayer(id) {\n return new ɵRuntimeError(3301 /* RuntimeErrorCode.MISSING_PLAYER */, ngDevMode && `Unable to find the timeline player referenced by ${id}`);\n}\nfunction missingTrigger(phase, name) {\n return new ɵRuntimeError(3302 /* RuntimeErrorCode.MISSING_TRIGGER */, ngDevMode &&\n `Unable to listen on the animation trigger event \"${phase}\" because the animation trigger \"${name}\" doesn\\'t exist!`);\n}\nfunction missingEvent(name) {\n return new ɵRuntimeError(3303 /* RuntimeErrorCode.MISSING_EVENT */, ngDevMode &&\n `Unable to listen on the animation trigger \"${name}\" because the provided event is undefined!`);\n}\nfunction unsupportedTriggerEvent(phase, name) {\n return new ɵRuntimeError(3400 /* RuntimeErrorCode.UNSUPPORTED_TRIGGER_EVENT */, ngDevMode &&\n `The provided animation trigger event \"${phase}\" for the animation trigger \"${name}\" is not supported!`);\n}\nfunction unregisteredTrigger(name) {\n return new ɵRuntimeError(3401 /* RuntimeErrorCode.UNREGISTERED_TRIGGER */, ngDevMode && `The provided animation trigger \"${name}\" has not been registered!`);\n}\nfunction triggerTransitionsFailed(errors) {\n return new ɵRuntimeError(3402 /* RuntimeErrorCode.TRIGGER_TRANSITIONS_FAILED */, ngDevMode &&\n `Unable to process animations due to the following failed trigger transitions\\n ${errors.map(err => err.message).join('\\n')}`);\n}\nfunction triggerParsingFailed(name, errors) {\n return new ɵRuntimeError(3403 /* RuntimeErrorCode.TRIGGER_PARSING_FAILED */, ngDevMode &&\n `Animation parsing for the ${name} trigger have failed:${LINE_START}${errors.map(err => err.message).join(LINE_START)}`);\n}\nfunction transitionFailed(name, errors) {\n return new ɵRuntimeError(3505 /* RuntimeErrorCode.TRANSITION_FAILED */, ngDevMode && `@${name} has failed due to:\\n ${errors.map(err => err.message).join('\\n- ')}`);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Set of all animatable CSS properties\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_animated_properties\n */\nconst ANIMATABLE_PROP_SET = new Set([\n '-moz-outline-radius',\n '-moz-outline-radius-bottomleft',\n '-moz-outline-radius-bottomright',\n '-moz-outline-radius-topleft',\n '-moz-outline-radius-topright',\n '-ms-grid-columns',\n '-ms-grid-rows',\n '-webkit-line-clamp',\n '-webkit-text-fill-color',\n '-webkit-text-stroke',\n '-webkit-text-stroke-color',\n 'accent-color',\n 'all',\n 'backdrop-filter',\n 'background',\n 'background-color',\n 'background-position',\n 'background-size',\n 'block-size',\n 'border',\n 'border-block-end',\n 'border-block-end-color',\n 'border-block-end-width',\n 'border-block-start',\n 'border-block-start-color',\n 'border-block-start-width',\n 'border-bottom',\n 'border-bottom-color',\n 'border-bottom-left-radius',\n 'border-bottom-right-radius',\n 'border-bottom-width',\n 'border-color',\n 'border-end-end-radius',\n 'border-end-start-radius',\n 'border-image-outset',\n 'border-image-slice',\n 'border-image-width',\n 'border-inline-end',\n 'border-inline-end-color',\n 'border-inline-end-width',\n 'border-inline-start',\n 'border-inline-start-color',\n 'border-inline-start-width',\n 'border-left',\n 'border-left-color',\n 'border-left-width',\n 'border-radius',\n 'border-right',\n 'border-right-color',\n 'border-right-width',\n 'border-start-end-radius',\n 'border-start-start-radius',\n 'border-top',\n 'border-top-color',\n 'border-top-left-radius',\n 'border-top-right-radius',\n 'border-top-width',\n 'border-width',\n 'bottom',\n 'box-shadow',\n 'caret-color',\n 'clip',\n 'clip-path',\n 'color',\n 'column-count',\n 'column-gap',\n 'column-rule',\n 'column-rule-color',\n 'column-rule-width',\n 'column-width',\n 'columns',\n 'filter',\n 'flex',\n 'flex-basis',\n 'flex-grow',\n 'flex-shrink',\n 'font',\n 'font-size',\n 'font-size-adjust',\n 'font-stretch',\n 'font-variation-settings',\n 'font-weight',\n 'gap',\n 'grid-column-gap',\n 'grid-gap',\n 'grid-row-gap',\n 'grid-template-columns',\n 'grid-template-rows',\n 'height',\n 'inline-size',\n 'input-security',\n 'inset',\n 'inset-block',\n 'inset-block-end',\n 'inset-block-start',\n 'inset-inline',\n 'inset-inline-end',\n 'inset-inline-start',\n 'left',\n 'letter-spacing',\n 'line-clamp',\n 'line-height',\n 'margin',\n 'margin-block-end',\n 'margin-block-start',\n 'margin-bottom',\n 'margin-inline-end',\n 'margin-inline-start',\n 'margin-left',\n 'margin-right',\n 'margin-top',\n 'mask',\n 'mask-border',\n 'mask-position',\n 'mask-size',\n 'max-block-size',\n 'max-height',\n 'max-inline-size',\n 'max-lines',\n 'max-width',\n 'min-block-size',\n 'min-height',\n 'min-inline-size',\n 'min-width',\n 'object-position',\n 'offset',\n 'offset-anchor',\n 'offset-distance',\n 'offset-path',\n 'offset-position',\n 'offset-rotate',\n 'opacity',\n 'order',\n 'outline',\n 'outline-color',\n 'outline-offset',\n 'outline-width',\n 'padding',\n 'padding-block-end',\n 'padding-block-start',\n 'padding-bottom',\n 'padding-inline-end',\n 'padding-inline-start',\n 'padding-left',\n 'padding-right',\n 'padding-top',\n 'perspective',\n 'perspective-origin',\n 'right',\n 'rotate',\n 'row-gap',\n 'scale',\n 'scroll-margin',\n 'scroll-margin-block',\n 'scroll-margin-block-end',\n 'scroll-margin-block-start',\n 'scroll-margin-bottom',\n 'scroll-margin-inline',\n 'scroll-margin-inline-end',\n 'scroll-margin-inline-start',\n 'scroll-margin-left',\n 'scroll-margin-right',\n 'scroll-margin-top',\n 'scroll-padding',\n 'scroll-padding-block',\n 'scroll-padding-block-end',\n 'scroll-padding-block-start',\n 'scroll-padding-bottom',\n 'scroll-padding-inline',\n 'scroll-padding-inline-end',\n 'scroll-padding-inline-start',\n 'scroll-padding-left',\n 'scroll-padding-right',\n 'scroll-padding-top',\n 'scroll-snap-coordinate',\n 'scroll-snap-destination',\n 'scrollbar-color',\n 'shape-image-threshold',\n 'shape-margin',\n 'shape-outside',\n 'tab-size',\n 'text-decoration',\n 'text-decoration-color',\n 'text-decoration-thickness',\n 'text-emphasis',\n 'text-emphasis-color',\n 'text-indent',\n 'text-shadow',\n 'text-underline-offset',\n 'top',\n 'transform',\n 'transform-origin',\n 'translate',\n 'vertical-align',\n 'visibility',\n 'width',\n 'word-spacing',\n 'z-index',\n 'zoom',\n]);\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction isBrowser() {\n return (typeof window !== 'undefined' && typeof window.document !== 'undefined');\n}\nfunction isNode() {\n // Checking only for `process` isn't enough to identify whether or not we're in a Node\n // environment, because Webpack by default will polyfill the `process`. While we can discern\n // that Webpack polyfilled it by looking at `process.browser`, it's very Webpack-specific and\n // might not be future-proof. Instead we look at the stringified version of `process` which\n // is `[object process]` in Node and `[object Object]` when polyfilled.\n return typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n}\nfunction optimizeGroupPlayer(players) {\n switch (players.length) {\n case 0:\n return new NoopAnimationPlayer();\n case 1:\n return players[0];\n default:\n return new ɵAnimationGroupPlayer(players);\n }\n}\nfunction normalizeKeyframes$1(driver, normalizer, element, keyframes, preStyles = new Map(), postStyles = new Map()) {\n const errors = [];\n const normalizedKeyframes = [];\n let previousOffset = -1;\n let previousKeyframe = null;\n keyframes.forEach(kf => {\n const offset = kf.get('offset');\n const isSameOffset = offset == previousOffset;\n const normalizedKeyframe = (isSameOffset && previousKeyframe) || new Map();\n kf.forEach((val, prop) => {\n let normalizedProp = prop;\n let normalizedValue = val;\n if (prop !== 'offset') {\n normalizedProp = normalizer.normalizePropertyName(normalizedProp, errors);\n switch (normalizedValue) {\n case ɵPRE_STYLE:\n normalizedValue = preStyles.get(prop);\n break;\n case AUTO_STYLE:\n normalizedValue = postStyles.get(prop);\n break;\n default:\n normalizedValue =\n normalizer.normalizeStyleValue(prop, normalizedProp, normalizedValue, errors);\n break;\n }\n }\n normalizedKeyframe.set(normalizedProp, normalizedValue);\n });\n if (!isSameOffset) {\n normalizedKeyframes.push(normalizedKeyframe);\n }\n previousKeyframe = normalizedKeyframe;\n previousOffset = offset;\n });\n if (errors.length) {\n throw animationFailed(errors);\n }\n return normalizedKeyframes;\n}\nfunction listenOnPlayer(player, eventName, event, callback) {\n switch (eventName) {\n case 'start':\n player.onStart(() => callback(event && copyAnimationEvent(event, 'start', player)));\n break;\n case 'done':\n player.onDone(() => callback(event && copyAnimationEvent(event, 'done', player)));\n break;\n case 'destroy':\n player.onDestroy(() => callback(event && copyAnimationEvent(event, 'destroy', player)));\n break;\n }\n}\nfunction copyAnimationEvent(e, phaseName, player) {\n const totalTime = player.totalTime;\n const disabled = player.disabled ? true : false;\n const event = makeAnimationEvent(e.element, e.triggerName, e.fromState, e.toState, phaseName || e.phaseName, totalTime == undefined ? e.totalTime : totalTime, disabled);\n const data = e['_data'];\n if (data != null) {\n event['_data'] = data;\n }\n return event;\n}\nfunction makeAnimationEvent(element, triggerName, fromState, toState, phaseName = '', totalTime = 0, disabled) {\n return { element, triggerName, fromState, toState, phaseName, totalTime, disabled: !!disabled };\n}\nfunction getOrSetDefaultValue(map, key, defaultValue) {\n let value = map.get(key);\n if (!value) {\n map.set(key, value = defaultValue);\n }\n return value;\n}\nfunction parseTimelineCommand(command) {\n const separatorPos = command.indexOf(':');\n const id = command.substring(1, separatorPos);\n const action = command.slice(separatorPos + 1);\n return [id, action];\n}\nlet _contains = (elm1, elm2) => false;\nlet _query = (element, selector, multi) => {\n return [];\n};\nlet _documentElement = null;\nfunction getParentElement(element) {\n const parent = element.parentNode || element.host; // consider host to support shadow DOM\n if (parent === _documentElement) {\n return null;\n }\n return parent;\n}\n// Define utility methods for browsers and platform-server(domino) where Element\n// and utility methods exist.\nconst _isNode = isNode();\nif (_isNode || typeof Element !== 'undefined') {\n if (!isBrowser()) {\n _contains = (elm1, elm2) => elm1.contains(elm2);\n }\n else {\n // Read the document element in an IIFE that's been marked pure to avoid a top-level property\n // read that may prevent tree-shaking.\n _documentElement = /* @__PURE__ */ (() => document.documentElement)();\n _contains = (elm1, elm2) => {\n while (elm2) {\n if (elm2 === elm1) {\n return true;\n }\n elm2 = getParentElement(elm2);\n }\n return false;\n };\n }\n _query = (element, selector, multi) => {\n if (multi) {\n return Array.from(element.querySelectorAll(selector));\n }\n const elem = element.querySelector(selector);\n return elem ? [elem] : [];\n };\n}\nfunction containsVendorPrefix(prop) {\n // Webkit is the only real popular vendor prefix nowadays\n // cc: http://shouldiprefix.com/\n return prop.substring(1, 6) == 'ebkit'; // webkit or Webkit\n}\nlet _CACHED_BODY = null;\nlet _IS_WEBKIT = false;\nfunction validateStyleProperty(prop) {\n if (!_CACHED_BODY) {\n _CACHED_BODY = getBodyNode() || {};\n _IS_WEBKIT = _CACHED_BODY.style ? ('WebkitAppearance' in _CACHED_BODY.style) : false;\n }\n let result = true;\n if (_CACHED_BODY.style && !containsVendorPrefix(prop)) {\n result = prop in _CACHED_BODY.style;\n if (!result && _IS_WEBKIT) {\n const camelProp = 'Webkit' + prop.charAt(0).toUpperCase() + prop.slice(1);\n result = camelProp in _CACHED_BODY.style;\n }\n }\n return result;\n}\nfunction validateWebAnimatableStyleProperty(prop) {\n return ANIMATABLE_PROP_SET.has(prop);\n}\nfunction getBodyNode() {\n if (typeof document != 'undefined') {\n return document.body;\n }\n return null;\n}\nconst containsElement = _contains;\nconst invokeQuery = _query;\nfunction hypenatePropsKeys(original) {\n const newMap = new Map();\n original.forEach((val, prop) => {\n const newProp = prop.replace(/([a-z])([A-Z])/g, '$1-$2');\n newMap.set(newProp, val);\n });\n return newMap;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @publicApi\n */\nclass NoopAnimationDriver {\n validateStyleProperty(prop) {\n return validateStyleProperty(prop);\n }\n matchesElement(_element, _selector) {\n // This method is deprecated and no longer in use so we return false.\n return false;\n }\n containsElement(elm1, elm2) {\n return containsElement(elm1, elm2);\n }\n getParentElement(element) {\n return getParentElement(element);\n }\n query(element, selector, multi) {\n return invokeQuery(element, selector, multi);\n }\n computeStyle(element, prop, defaultValue) {\n return defaultValue || '';\n }\n animate(element, keyframes, duration, delay, easing, previousPlayers = [], scrubberAccessRequested) {\n return new NoopAnimationPlayer(duration, delay);\n }\n}\nNoopAnimationDriver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NoopAnimationDriver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNoopAnimationDriver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NoopAnimationDriver });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NoopAnimationDriver, decorators: [{\n type: Injectable\n }] });\n/**\n * @publicApi\n */\nclass AnimationDriver {\n}\nAnimationDriver.NOOP = ( /* @__PURE__ */new NoopAnimationDriver());\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst ONE_SECOND = 1000;\nconst SUBSTITUTION_EXPR_START = '{{';\nconst SUBSTITUTION_EXPR_END = '}}';\nconst ENTER_CLASSNAME = 'ng-enter';\nconst LEAVE_CLASSNAME = 'ng-leave';\nconst NG_TRIGGER_CLASSNAME = 'ng-trigger';\nconst NG_TRIGGER_SELECTOR = '.ng-trigger';\nconst NG_ANIMATING_CLASSNAME = 'ng-animating';\nconst NG_ANIMATING_SELECTOR = '.ng-animating';\nfunction resolveTimingValue(value) {\n if (typeof value == 'number')\n return value;\n const matches = value.match(/^(-?[\\.\\d]+)(m?s)/);\n if (!matches || matches.length < 2)\n return 0;\n return _convertTimeValueToMS(parseFloat(matches[1]), matches[2]);\n}\nfunction _convertTimeValueToMS(value, unit) {\n switch (unit) {\n case 's':\n return value * ONE_SECOND;\n default: // ms or something else\n return value;\n }\n}\nfunction resolveTiming(timings, errors, allowNegativeValues) {\n return timings.hasOwnProperty('duration') ?\n timings :\n parseTimeExpression(timings, errors, allowNegativeValues);\n}\nfunction parseTimeExpression(exp, errors, allowNegativeValues) {\n const regex = /^(-?[\\.\\d]+)(m?s)(?:\\s+(-?[\\.\\d]+)(m?s))?(?:\\s+([-a-z]+(?:\\(.+?\\))?))?$/i;\n let duration;\n let delay = 0;\n let easing = '';\n if (typeof exp === 'string') {\n const matches = exp.match(regex);\n if (matches === null) {\n errors.push(invalidTimingValue(exp));\n return { duration: 0, delay: 0, easing: '' };\n }\n duration = _convertTimeValueToMS(parseFloat(matches[1]), matches[2]);\n const delayMatch = matches[3];\n if (delayMatch != null) {\n delay = _convertTimeValueToMS(parseFloat(delayMatch), matches[4]);\n }\n const easingVal = matches[5];\n if (easingVal) {\n easing = easingVal;\n }\n }\n else {\n duration = exp;\n }\n if (!allowNegativeValues) {\n let containsErrors = false;\n let startIndex = errors.length;\n if (duration < 0) {\n errors.push(negativeStepValue());\n containsErrors = true;\n }\n if (delay < 0) {\n errors.push(negativeDelayValue());\n containsErrors = true;\n }\n if (containsErrors) {\n errors.splice(startIndex, 0, invalidTimingValue(exp));\n }\n }\n return { duration, delay, easing };\n}\nfunction copyObj(obj, destination = {}) {\n Object.keys(obj).forEach(prop => {\n destination[prop] = obj[prop];\n });\n return destination;\n}\nfunction convertToMap(obj) {\n const styleMap = new Map();\n Object.keys(obj).forEach(prop => {\n const val = obj[prop];\n styleMap.set(prop, val);\n });\n return styleMap;\n}\nfunction normalizeKeyframes(keyframes) {\n if (!keyframes.length) {\n return [];\n }\n if (keyframes[0] instanceof Map) {\n return keyframes;\n }\n return keyframes.map(kf => convertToMap(kf));\n}\nfunction normalizeStyles(styles) {\n const normalizedStyles = new Map();\n if (Array.isArray(styles)) {\n styles.forEach(data => copyStyles(data, normalizedStyles));\n }\n else {\n copyStyles(styles, normalizedStyles);\n }\n return normalizedStyles;\n}\nfunction copyStyles(styles, destination = new Map(), backfill) {\n if (backfill) {\n for (let [prop, val] of backfill) {\n destination.set(prop, val);\n }\n }\n for (let [prop, val] of styles) {\n destination.set(prop, val);\n }\n return destination;\n}\nfunction getStyleAttributeString(element, key, value) {\n // Return the key-value pair string to be added to the style attribute for the\n // given CSS style key.\n if (value) {\n return key + ':' + value + ';';\n }\n else {\n return '';\n }\n}\nfunction writeStyleAttribute(element) {\n // Read the style property of the element and manually reflect it to the\n // style attribute. This is needed because Domino on platform-server doesn't\n // understand the full set of allowed CSS properties and doesn't reflect some\n // of them automatically.\n let styleAttrValue = '';\n for (let i = 0; i < element.style.length; i++) {\n const key = element.style.item(i);\n styleAttrValue += getStyleAttributeString(element, key, element.style.getPropertyValue(key));\n }\n for (const key in element.style) {\n // Skip internal Domino properties that don't need to be reflected.\n if (!element.style.hasOwnProperty(key) || key.startsWith('_')) {\n continue;\n }\n const dashKey = camelCaseToDashCase(key);\n styleAttrValue += getStyleAttributeString(element, dashKey, element.style[key]);\n }\n element.setAttribute('style', styleAttrValue);\n}\nfunction setStyles(element, styles, formerStyles) {\n if (element['style']) {\n styles.forEach((val, prop) => {\n const camelProp = dashCaseToCamelCase(prop);\n if (formerStyles && !formerStyles.has(prop)) {\n formerStyles.set(prop, element.style[camelProp]);\n }\n element.style[camelProp] = val;\n });\n // On the server set the 'style' attribute since it's not automatically reflected.\n if (isNode()) {\n writeStyleAttribute(element);\n }\n }\n}\nfunction eraseStyles(element, styles) {\n if (element['style']) {\n styles.forEach((_, prop) => {\n const camelProp = dashCaseToCamelCase(prop);\n element.style[camelProp] = '';\n });\n // On the server set the 'style' attribute since it's not automatically reflected.\n if (isNode()) {\n writeStyleAttribute(element);\n }\n }\n}\nfunction normalizeAnimationEntry(steps) {\n if (Array.isArray(steps)) {\n if (steps.length == 1)\n return steps[0];\n return sequence(steps);\n }\n return steps;\n}\nfunction validateStyleParams(value, options, errors) {\n const params = options.params || {};\n const matches = extractStyleParams(value);\n if (matches.length) {\n matches.forEach(varName => {\n if (!params.hasOwnProperty(varName)) {\n errors.push(invalidStyleParams(varName));\n }\n });\n }\n}\nconst PARAM_REGEX = new RegExp(`${SUBSTITUTION_EXPR_START}\\\\s*(.+?)\\\\s*${SUBSTITUTION_EXPR_END}`, 'g');\nfunction extractStyleParams(value) {\n let params = [];\n if (typeof value === 'string') {\n let match;\n while (match = PARAM_REGEX.exec(value)) {\n params.push(match[1]);\n }\n PARAM_REGEX.lastIndex = 0;\n }\n return params;\n}\nfunction interpolateParams(value, params, errors) {\n const original = value.toString();\n const str = original.replace(PARAM_REGEX, (_, varName) => {\n let localVal = params[varName];\n // this means that the value was never overridden by the data passed in by the user\n if (localVal == null) {\n errors.push(invalidParamValue(varName));\n localVal = '';\n }\n return localVal.toString();\n });\n // we do this to assert that numeric values stay as they are\n return str == original ? value : str;\n}\nfunction iteratorToArray(iterator) {\n const arr = [];\n let item = iterator.next();\n while (!item.done) {\n arr.push(item.value);\n item = iterator.next();\n }\n return arr;\n}\nconst DASH_CASE_REGEXP = /-+([a-z0-9])/g;\nfunction dashCaseToCamelCase(input) {\n return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase());\n}\nfunction camelCaseToDashCase(input) {\n return input.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n}\nfunction allowPreviousPlayerStylesMerge(duration, delay) {\n return duration === 0 || delay === 0;\n}\nfunction balancePreviousStylesIntoKeyframes(element, keyframes, previousStyles) {\n if (previousStyles.size && keyframes.length) {\n let startingKeyframe = keyframes[0];\n let missingStyleProps = [];\n previousStyles.forEach((val, prop) => {\n if (!startingKeyframe.has(prop)) {\n missingStyleProps.push(prop);\n }\n startingKeyframe.set(prop, val);\n });\n if (missingStyleProps.length) {\n for (let i = 1; i < keyframes.length; i++) {\n let kf = keyframes[i];\n missingStyleProps.forEach(prop => kf.set(prop, computeStyle(element, prop)));\n }\n }\n }\n return keyframes;\n}\nfunction visitDslNode(visitor, node, context) {\n switch (node.type) {\n case 7 /* AnimationMetadataType.Trigger */:\n return visitor.visitTrigger(node, context);\n case 0 /* AnimationMetadataType.State */:\n return visitor.visitState(node, context);\n case 1 /* AnimationMetadataType.Transition */:\n return visitor.visitTransition(node, context);\n case 2 /* AnimationMetadataType.Sequence */:\n return visitor.visitSequence(node, context);\n case 3 /* AnimationMetadataType.Group */:\n return visitor.visitGroup(node, context);\n case 4 /* AnimationMetadataType.Animate */:\n return visitor.visitAnimate(node, context);\n case 5 /* AnimationMetadataType.Keyframes */:\n return visitor.visitKeyframes(node, context);\n case 6 /* AnimationMetadataType.Style */:\n return visitor.visitStyle(node, context);\n case 8 /* AnimationMetadataType.Reference */:\n return visitor.visitReference(node, context);\n case 9 /* AnimationMetadataType.AnimateChild */:\n return visitor.visitAnimateChild(node, context);\n case 10 /* AnimationMetadataType.AnimateRef */:\n return visitor.visitAnimateRef(node, context);\n case 11 /* AnimationMetadataType.Query */:\n return visitor.visitQuery(node, context);\n case 12 /* AnimationMetadataType.Stagger */:\n return visitor.visitStagger(node, context);\n default:\n throw invalidNodeType(node.type);\n }\n}\nfunction computeStyle(element, prop) {\n return window.getComputedStyle(element)[prop];\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst NG_DEV_MODE = typeof ngDevMode === 'undefined' || !!ngDevMode;\nfunction createListOfWarnings(warnings) {\n const LINE_START = '\\n - ';\n return `${LINE_START}${warnings.filter(Boolean).map(warning => warning).join(LINE_START)}`;\n}\nfunction warnValidation(warnings) {\n NG_DEV_MODE && console.warn(`animation validation warnings:${createListOfWarnings(warnings)}`);\n}\nfunction warnTriggerBuild(name, warnings) {\n NG_DEV_MODE &&\n console.warn(`The animation trigger \"${name}\" has built with the following warnings:${createListOfWarnings(warnings)}`);\n}\nfunction warnRegister(warnings) {\n NG_DEV_MODE &&\n console.warn(`Animation built with the following warnings:${createListOfWarnings(warnings)}`);\n}\nfunction triggerParsingWarnings(name, warnings) {\n NG_DEV_MODE &&\n console.warn(`Animation parsing for the ${name} trigger presents the following warnings:${createListOfWarnings(warnings)}`);\n}\nfunction pushUnrecognizedPropertiesWarning(warnings, props) {\n if (props.length) {\n warnings.push(`The following provided properties are not recognized: ${props.join(', ')}`);\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst ANY_STATE = '*';\nfunction parseTransitionExpr(transitionValue, errors) {\n const expressions = [];\n if (typeof transitionValue == 'string') {\n transitionValue.split(/\\s*,\\s*/).forEach(str => parseInnerTransitionStr(str, expressions, errors));\n }\n else {\n expressions.push(transitionValue);\n }\n return expressions;\n}\nfunction parseInnerTransitionStr(eventStr, expressions, errors) {\n if (eventStr[0] == ':') {\n const result = parseAnimationAlias(eventStr, errors);\n if (typeof result == 'function') {\n expressions.push(result);\n return;\n }\n eventStr = result;\n }\n const match = eventStr.match(/^(\\*|[-\\w]+)\\s*(<?[=-]>)\\s*(\\*|[-\\w]+)$/);\n if (match == null || match.length < 4) {\n errors.push(invalidExpression(eventStr));\n return expressions;\n }\n const fromState = match[1];\n const separator = match[2];\n const toState = match[3];\n expressions.push(makeLambdaFromStates(fromState, toState));\n const isFullAnyStateExpr = fromState == ANY_STATE && toState == ANY_STATE;\n if (separator[0] == '<' && !isFullAnyStateExpr) {\n expressions.push(makeLambdaFromStates(toState, fromState));\n }\n}\nfunction parseAnimationAlias(alias, errors) {\n switch (alias) {\n case ':enter':\n return 'void => *';\n case ':leave':\n return '* => void';\n case ':increment':\n return (fromState, toState) => parseFloat(toState) > parseFloat(fromState);\n case ':decrement':\n return (fromState, toState) => parseFloat(toState) < parseFloat(fromState);\n default:\n errors.push(invalidTransitionAlias(alias));\n return '* => *';\n }\n}\n// DO NOT REFACTOR ... keep the follow set instantiations\n// with the values intact (closure compiler for some reason\n// removes follow-up lines that add the values outside of\n// the constructor...\nconst TRUE_BOOLEAN_VALUES = new Set(['true', '1']);\nconst FALSE_BOOLEAN_VALUES = new Set(['false', '0']);\nfunction makeLambdaFromStates(lhs, rhs) {\n const LHS_MATCH_BOOLEAN = TRUE_BOOLEAN_VALUES.has(lhs) || FALSE_BOOLEAN_VALUES.has(lhs);\n const RHS_MATCH_BOOLEAN = TRUE_BOOLEAN_VALUES.has(rhs) || FALSE_BOOLEAN_VALUES.has(rhs);\n return (fromState, toState) => {\n let lhsMatch = lhs == ANY_STATE || lhs == fromState;\n let rhsMatch = rhs == ANY_STATE || rhs == toState;\n if (!lhsMatch && LHS_MATCH_BOOLEAN && typeof fromState === 'boolean') {\n lhsMatch = fromState ? TRUE_BOOLEAN_VALUES.has(lhs) : FALSE_BOOLEAN_VALUES.has(lhs);\n }\n if (!rhsMatch && RHS_MATCH_BOOLEAN && typeof toState === 'boolean') {\n rhsMatch = toState ? TRUE_BOOLEAN_VALUES.has(rhs) : FALSE_BOOLEAN_VALUES.has(rhs);\n }\n return lhsMatch && rhsMatch;\n };\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst SELF_TOKEN = ':self';\nconst SELF_TOKEN_REGEX = new RegExp(`\\s*${SELF_TOKEN}\\s*,?`, 'g');\n/*\n * [Validation]\n * The visitor code below will traverse the animation AST generated by the animation verb functions\n * (the output is a tree of objects) and attempt to perform a series of validations on the data. The\n * following corner-cases will be validated:\n *\n * 1. Overlap of animations\n * Given that a CSS property cannot be animated in more than one place at the same time, it's\n * important that this behavior is detected and validated. The way in which this occurs is that\n * each time a style property is examined, a string-map containing the property will be updated with\n * the start and end times for when the property is used within an animation step.\n *\n * If there are two or more parallel animations that are currently running (these are invoked by the\n * group()) on the same element then the validator will throw an error. Since the start/end timing\n * values are collected for each property then if the current animation step is animating the same\n * property and its timing values fall anywhere into the window of time that the property is\n * currently being animated within then this is what causes an error.\n *\n * 2. Timing values\n * The validator will validate to see if a timing value of `duration delay easing` or\n * `durationNumber` is valid or not.\n *\n * (note that upon validation the code below will replace the timing data with an object containing\n * {duration,delay,easing}.\n *\n * 3. Offset Validation\n * Each of the style() calls are allowed to have an offset value when placed inside of keyframes().\n * Offsets within keyframes() are considered valid when:\n *\n * - No offsets are used at all\n * - Each style() entry contains an offset value\n * - Each offset is between 0 and 1\n * - Each offset is greater to or equal than the previous one\n *\n * Otherwise an error will be thrown.\n */\nfunction buildAnimationAst(driver, metadata, errors, warnings) {\n return new AnimationAstBuilderVisitor(driver).build(metadata, errors, warnings);\n}\nconst ROOT_SELECTOR = '';\nclass AnimationAstBuilderVisitor {\n constructor(_driver) {\n this._driver = _driver;\n }\n build(metadata, errors, warnings) {\n const context = new AnimationAstBuilderContext(errors);\n this._resetContextStyleTimingState(context);\n const ast = visitDslNode(this, normalizeAnimationEntry(metadata), context);\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (context.unsupportedCSSPropertiesFound.size) {\n pushUnrecognizedPropertiesWarning(warnings, [...context.unsupportedCSSPropertiesFound.keys()]);\n }\n }\n return ast;\n }\n _resetContextStyleTimingState(context) {\n context.currentQuerySelector = ROOT_SELECTOR;\n context.collectedStyles = new Map();\n context.collectedStyles.set(ROOT_SELECTOR, new Map());\n context.currentTime = 0;\n }\n visitTrigger(metadata, context) {\n let queryCount = context.queryCount = 0;\n let depCount = context.depCount = 0;\n const states = [];\n const transitions = [];\n if (metadata.name.charAt(0) == '@') {\n context.errors.push(invalidTrigger());\n }\n metadata.definitions.forEach(def => {\n this._resetContextStyleTimingState(context);\n if (def.type == 0 /* AnimationMetadataType.State */) {\n const stateDef = def;\n const name = stateDef.name;\n name.toString().split(/\\s*,\\s*/).forEach(n => {\n stateDef.name = n;\n states.push(this.visitState(stateDef, context));\n });\n stateDef.name = name;\n }\n else if (def.type == 1 /* AnimationMetadataType.Transition */) {\n const transition = this.visitTransition(def, context);\n queryCount += transition.queryCount;\n depCount += transition.depCount;\n transitions.push(transition);\n }\n else {\n context.errors.push(invalidDefinition());\n }\n });\n return {\n type: 7 /* AnimationMetadataType.Trigger */,\n name: metadata.name,\n states,\n transitions,\n queryCount,\n depCount,\n options: null\n };\n }\n visitState(metadata, context) {\n const styleAst = this.visitStyle(metadata.styles, context);\n const astParams = (metadata.options && metadata.options.params) || null;\n if (styleAst.containsDynamicStyles) {\n const missingSubs = new Set();\n const params = astParams || {};\n styleAst.styles.forEach(style => {\n if (style instanceof Map) {\n style.forEach(value => {\n extractStyleParams(value).forEach(sub => {\n if (!params.hasOwnProperty(sub)) {\n missingSubs.add(sub);\n }\n });\n });\n }\n });\n if (missingSubs.size) {\n const missingSubsArr = iteratorToArray(missingSubs.values());\n context.errors.push(invalidState(metadata.name, missingSubsArr));\n }\n }\n return {\n type: 0 /* AnimationMetadataType.State */,\n name: metadata.name,\n style: styleAst,\n options: astParams ? { params: astParams } : null\n };\n }\n visitTransition(metadata, context) {\n context.queryCount = 0;\n context.depCount = 0;\n const animation = visitDslNode(this, normalizeAnimationEntry(metadata.animation), context);\n const matchers = parseTransitionExpr(metadata.expr, context.errors);\n return {\n type: 1 /* AnimationMetadataType.Transition */,\n matchers,\n animation,\n queryCount: context.queryCount,\n depCount: context.depCount,\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n visitSequence(metadata, context) {\n return {\n type: 2 /* AnimationMetadataType.Sequence */,\n steps: metadata.steps.map(s => visitDslNode(this, s, context)),\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n visitGroup(metadata, context) {\n const currentTime = context.currentTime;\n let furthestTime = 0;\n const steps = metadata.steps.map(step => {\n context.currentTime = currentTime;\n const innerAst = visitDslNode(this, step, context);\n furthestTime = Math.max(furthestTime, context.currentTime);\n return innerAst;\n });\n context.currentTime = furthestTime;\n return {\n type: 3 /* AnimationMetadataType.Group */,\n steps,\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n visitAnimate(metadata, context) {\n const timingAst = constructTimingAst(metadata.timings, context.errors);\n context.currentAnimateTimings = timingAst;\n let styleAst;\n let styleMetadata = metadata.styles ? metadata.styles : style({});\n if (styleMetadata.type == 5 /* AnimationMetadataType.Keyframes */) {\n styleAst = this.visitKeyframes(styleMetadata, context);\n }\n else {\n let styleMetadata = metadata.styles;\n let isEmpty = false;\n if (!styleMetadata) {\n isEmpty = true;\n const newStyleData = {};\n if (timingAst.easing) {\n newStyleData['easing'] = timingAst.easing;\n }\n styleMetadata = style(newStyleData);\n }\n context.currentTime += timingAst.duration + timingAst.delay;\n const _styleAst = this.visitStyle(styleMetadata, context);\n _styleAst.isEmptyStep = isEmpty;\n styleAst = _styleAst;\n }\n context.currentAnimateTimings = null;\n return {\n type: 4 /* AnimationMetadataType.Animate */,\n timings: timingAst,\n style: styleAst,\n options: null\n };\n }\n visitStyle(metadata, context) {\n const ast = this._makeStyleAst(metadata, context);\n this._validateStyleAst(ast, context);\n return ast;\n }\n _makeStyleAst(metadata, context) {\n const styles = [];\n const metadataStyles = Array.isArray(metadata.styles) ? metadata.styles : [metadata.styles];\n for (let styleTuple of metadataStyles) {\n if (typeof styleTuple === 'string') {\n if (styleTuple === AUTO_STYLE) {\n styles.push(styleTuple);\n }\n else {\n context.errors.push(invalidStyleValue(styleTuple));\n }\n }\n else {\n styles.push(convertToMap(styleTuple));\n }\n }\n let containsDynamicStyles = false;\n let collectedEasing = null;\n styles.forEach(styleData => {\n if (styleData instanceof Map) {\n if (styleData.has('easing')) {\n collectedEasing = styleData.get('easing');\n styleData.delete('easing');\n }\n if (!containsDynamicStyles) {\n for (let value of styleData.values()) {\n if (value.toString().indexOf(SUBSTITUTION_EXPR_START) >= 0) {\n containsDynamicStyles = true;\n break;\n }\n }\n }\n }\n });\n return {\n type: 6 /* AnimationMetadataType.Style */,\n styles,\n easing: collectedEasing,\n offset: metadata.offset,\n containsDynamicStyles,\n options: null\n };\n }\n _validateStyleAst(ast, context) {\n const timings = context.currentAnimateTimings;\n let endTime = context.currentTime;\n let startTime = context.currentTime;\n if (timings && startTime > 0) {\n startTime -= timings.duration + timings.delay;\n }\n ast.styles.forEach(tuple => {\n if (typeof tuple === 'string')\n return;\n tuple.forEach((value, prop) => {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!this._driver.validateStyleProperty(prop)) {\n tuple.delete(prop);\n context.unsupportedCSSPropertiesFound.add(prop);\n return;\n }\n }\n // This is guaranteed to have a defined Map at this querySelector location making it\n // safe to add the assertion here. It is set as a default empty map in prior methods.\n const collectedStyles = context.collectedStyles.get(context.currentQuerySelector);\n const collectedEntry = collectedStyles.get(prop);\n let updateCollectedStyle = true;\n if (collectedEntry) {\n if (startTime != endTime && startTime >= collectedEntry.startTime &&\n endTime <= collectedEntry.endTime) {\n context.errors.push(invalidParallelAnimation(prop, collectedEntry.startTime, collectedEntry.endTime, startTime, endTime));\n updateCollectedStyle = false;\n }\n // we always choose the smaller start time value since we\n // want to have a record of the entire animation window where\n // the style property is being animated in between\n startTime = collectedEntry.startTime;\n }\n if (updateCollectedStyle) {\n collectedStyles.set(prop, { startTime, endTime });\n }\n if (context.options) {\n validateStyleParams(value, context.options, context.errors);\n }\n });\n });\n }\n visitKeyframes(metadata, context) {\n const ast = { type: 5 /* AnimationMetadataType.Keyframes */, styles: [], options: null };\n if (!context.currentAnimateTimings) {\n context.errors.push(invalidKeyframes());\n return ast;\n }\n const MAX_KEYFRAME_OFFSET = 1;\n let totalKeyframesWithOffsets = 0;\n const offsets = [];\n let offsetsOutOfOrder = false;\n let keyframesOutOfRange = false;\n let previousOffset = 0;\n const keyframes = metadata.steps.map(styles => {\n const style = this._makeStyleAst(styles, context);\n let offsetVal = style.offset != null ? style.offset : consumeOffset(style.styles);\n let offset = 0;\n if (offsetVal != null) {\n totalKeyframesWithOffsets++;\n offset = style.offset = offsetVal;\n }\n keyframesOutOfRange = keyframesOutOfRange || offset < 0 || offset > 1;\n offsetsOutOfOrder = offsetsOutOfOrder || offset < previousOffset;\n previousOffset = offset;\n offsets.push(offset);\n return style;\n });\n if (keyframesOutOfRange) {\n context.errors.push(invalidOffset());\n }\n if (offsetsOutOfOrder) {\n context.errors.push(keyframeOffsetsOutOfOrder());\n }\n const length = metadata.steps.length;\n let generatedOffset = 0;\n if (totalKeyframesWithOffsets > 0 && totalKeyframesWithOffsets < length) {\n context.errors.push(keyframesMissingOffsets());\n }\n else if (totalKeyframesWithOffsets == 0) {\n generatedOffset = MAX_KEYFRAME_OFFSET / (length - 1);\n }\n const limit = length - 1;\n const currentTime = context.currentTime;\n const currentAnimateTimings = context.currentAnimateTimings;\n const animateDuration = currentAnimateTimings.duration;\n keyframes.forEach((kf, i) => {\n const offset = generatedOffset > 0 ? (i == limit ? 1 : (generatedOffset * i)) : offsets[i];\n const durationUpToThisFrame = offset * animateDuration;\n context.currentTime = currentTime + currentAnimateTimings.delay + durationUpToThisFrame;\n currentAnimateTimings.duration = durationUpToThisFrame;\n this._validateStyleAst(kf, context);\n kf.offset = offset;\n ast.styles.push(kf);\n });\n return ast;\n }\n visitReference(metadata, context) {\n return {\n type: 8 /* AnimationMetadataType.Reference */,\n animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context),\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n visitAnimateChild(metadata, context) {\n context.depCount++;\n return {\n type: 9 /* AnimationMetadataType.AnimateChild */,\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n visitAnimateRef(metadata, context) {\n return {\n type: 10 /* AnimationMetadataType.AnimateRef */,\n animation: this.visitReference(metadata.animation, context),\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n visitQuery(metadata, context) {\n const parentSelector = context.currentQuerySelector;\n const options = (metadata.options || {});\n context.queryCount++;\n context.currentQuery = metadata;\n const [selector, includeSelf] = normalizeSelector(metadata.selector);\n context.currentQuerySelector =\n parentSelector.length ? (parentSelector + ' ' + selector) : selector;\n getOrSetDefaultValue(context.collectedStyles, context.currentQuerySelector, new Map());\n const animation = visitDslNode(this, normalizeAnimationEntry(metadata.animation), context);\n context.currentQuery = null;\n context.currentQuerySelector = parentSelector;\n return {\n type: 11 /* AnimationMetadataType.Query */,\n selector,\n limit: options.limit || 0,\n optional: !!options.optional,\n includeSelf,\n animation,\n originalSelector: metadata.selector,\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n visitStagger(metadata, context) {\n if (!context.currentQuery) {\n context.errors.push(invalidStagger());\n }\n const timings = metadata.timings === 'full' ?\n { duration: 0, delay: 0, easing: 'full' } :\n resolveTiming(metadata.timings, context.errors, true);\n return {\n type: 12 /* AnimationMetadataType.Stagger */,\n animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context),\n timings,\n options: null\n };\n }\n}\nfunction normalizeSelector(selector) {\n const hasAmpersand = selector.split(/\\s*,\\s*/).find(token => token == SELF_TOKEN) ? true : false;\n if (hasAmpersand) {\n selector = selector.replace(SELF_TOKEN_REGEX, '');\n }\n // Note: the :enter and :leave aren't normalized here since those\n // selectors are filled in at runtime during timeline building\n selector = selector.replace(/@\\*/g, NG_TRIGGER_SELECTOR)\n .replace(/@\\w+/g, match => NG_TRIGGER_SELECTOR + '-' + match.slice(1))\n .replace(/:animating/g, NG_ANIMATING_SELECTOR);\n return [selector, hasAmpersand];\n}\nfunction normalizeParams(obj) {\n return obj ? copyObj(obj) : null;\n}\nclass AnimationAstBuilderContext {\n constructor(errors) {\n this.errors = errors;\n this.queryCount = 0;\n this.depCount = 0;\n this.currentTransition = null;\n this.currentQuery = null;\n this.currentQuerySelector = null;\n this.currentAnimateTimings = null;\n this.currentTime = 0;\n this.collectedStyles = new Map();\n this.options = null;\n this.unsupportedCSSPropertiesFound = new Set();\n }\n}\nfunction consumeOffset(styles) {\n if (typeof styles == 'string')\n return null;\n let offset = null;\n if (Array.isArray(styles)) {\n styles.forEach(styleTuple => {\n if (styleTuple instanceof Map && styleTuple.has('offset')) {\n const obj = styleTuple;\n offset = parseFloat(obj.get('offset'));\n obj.delete('offset');\n }\n });\n }\n else if (styles instanceof Map && styles.has('offset')) {\n const obj = styles;\n offset = parseFloat(obj.get('offset'));\n obj.delete('offset');\n }\n return offset;\n}\nfunction constructTimingAst(value, errors) {\n if (value.hasOwnProperty('duration')) {\n return value;\n }\n if (typeof value == 'number') {\n const duration = resolveTiming(value, errors).duration;\n return makeTimingAst(duration, 0, '');\n }\n const strValue = value;\n const isDynamic = strValue.split(/\\s+/).some(v => v.charAt(0) == '{' && v.charAt(1) == '{');\n if (isDynamic) {\n const ast = makeTimingAst(0, 0, '');\n ast.dynamic = true;\n ast.strValue = strValue;\n return ast;\n }\n const timings = resolveTiming(strValue, errors);\n return makeTimingAst(timings.duration, timings.delay, timings.easing);\n}\nfunction normalizeAnimationOptions(options) {\n if (options) {\n options = copyObj(options);\n if (options['params']) {\n options['params'] = normalizeParams(options['params']);\n }\n }\n else {\n options = {};\n }\n return options;\n}\nfunction makeTimingAst(duration, delay, easing) {\n return { duration, delay, easing };\n}\n\nfunction createTimelineInstruction(element, keyframes, preStyleProps, postStyleProps, duration, delay, easing = null, subTimeline = false) {\n return {\n type: 1 /* AnimationTransitionInstructionType.TimelineAnimation */,\n element,\n keyframes,\n preStyleProps,\n postStyleProps,\n duration,\n delay,\n totalTime: duration + delay,\n easing,\n subTimeline\n };\n}\n\nclass ElementInstructionMap {\n constructor() {\n this._map = new Map();\n }\n get(element) {\n return this._map.get(element) || [];\n }\n append(element, instructions) {\n let existingInstructions = this._map.get(element);\n if (!existingInstructions) {\n this._map.set(element, existingInstructions = []);\n }\n existingInstructions.push(...instructions);\n }\n has(element) {\n return this._map.has(element);\n }\n clear() {\n this._map.clear();\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst ONE_FRAME_IN_MILLISECONDS = 1;\nconst ENTER_TOKEN = ':enter';\nconst ENTER_TOKEN_REGEX = new RegExp(ENTER_TOKEN, 'g');\nconst LEAVE_TOKEN = ':leave';\nconst LEAVE_TOKEN_REGEX = new RegExp(LEAVE_TOKEN, 'g');\n/*\n * The code within this file aims to generate web-animations-compatible keyframes from Angular's\n * animation DSL code.\n *\n * The code below will be converted from:\n *\n * ```\n * sequence([\n * style({ opacity: 0 }),\n * animate(1000, style({ opacity: 0 }))\n * ])\n * ```\n *\n * To:\n * ```\n * keyframes = [{ opacity: 0, offset: 0 }, { opacity: 1, offset: 1 }]\n * duration = 1000\n * delay = 0\n * easing = ''\n * ```\n *\n * For this operation to cover the combination of animation verbs (style, animate, group, etc...) a\n * combination of AST traversal and merge-sort-like algorithms are used.\n *\n * [AST Traversal]\n * Each of the animation verbs, when executed, will return an string-map object representing what\n * type of action it is (style, animate, group, etc...) and the data associated with it. This means\n * that when functional composition mix of these functions is evaluated (like in the example above)\n * then it will end up producing a tree of objects representing the animation itself.\n *\n * When this animation object tree is processed by the visitor code below it will visit each of the\n * verb statements within the visitor. And during each visit it will build the context of the\n * animation keyframes by interacting with the `TimelineBuilder`.\n *\n * [TimelineBuilder]\n * This class is responsible for tracking the styles and building a series of keyframe objects for a\n * timeline between a start and end time. The builder starts off with an initial timeline and each\n * time the AST comes across a `group()`, `keyframes()` or a combination of the two within a\n * `sequence()` then it will generate a sub timeline for each step as well as a new one after\n * they are complete.\n *\n * As the AST is traversed, the timing state on each of the timelines will be incremented. If a sub\n * timeline was created (based on one of the cases above) then the parent timeline will attempt to\n * merge the styles used within the sub timelines into itself (only with group() this will happen).\n * This happens with a merge operation (much like how the merge works in mergeSort) and it will only\n * copy the most recently used styles from the sub timelines into the parent timeline. This ensures\n * that if the styles are used later on in another phase of the animation then they will be the most\n * up-to-date values.\n *\n * [How Missing Styles Are Updated]\n * Each timeline has a `backFill` property which is responsible for filling in new styles into\n * already processed keyframes if a new style shows up later within the animation sequence.\n *\n * ```\n * sequence([\n * style({ width: 0 }),\n * animate(1000, style({ width: 100 })),\n * animate(1000, style({ width: 200 })),\n * animate(1000, style({ width: 300 }))\n * animate(1000, style({ width: 400, height: 400 })) // notice how `height` doesn't exist anywhere\n * else\n * ])\n * ```\n *\n * What is happening here is that the `height` value is added later in the sequence, but is missing\n * from all previous animation steps. Therefore when a keyframe is created it would also be missing\n * from all previous keyframes up until where it is first used. For the timeline keyframe generation\n * to properly fill in the style it will place the previous value (the value from the parent\n * timeline) or a default value of `*` into the backFill map. The `copyStyles` method in util.ts\n * handles propagating that backfill map to the styles object.\n *\n * When a sub-timeline is created it will have its own backFill property. This is done so that\n * styles present within the sub-timeline do not accidentally seep into the previous/future timeline\n * keyframes\n *\n * [Validation]\n * The code in this file is not responsible for validation. That functionality happens with within\n * the `AnimationValidatorVisitor` code.\n */\nfunction buildAnimationTimelines(driver, rootElement, ast, enterClassName, leaveClassName, startingStyles = new Map(), finalStyles = new Map(), options, subInstructions, errors = []) {\n return new AnimationTimelineBuilderVisitor().buildKeyframes(driver, rootElement, ast, enterClassName, leaveClassName, startingStyles, finalStyles, options, subInstructions, errors);\n}\nclass AnimationTimelineBuilderVisitor {\n buildKeyframes(driver, rootElement, ast, enterClassName, leaveClassName, startingStyles, finalStyles, options, subInstructions, errors = []) {\n subInstructions = subInstructions || new ElementInstructionMap();\n const context = new AnimationTimelineContext(driver, rootElement, subInstructions, enterClassName, leaveClassName, errors, []);\n context.options = options;\n const delay = options.delay ? resolveTimingValue(options.delay) : 0;\n context.currentTimeline.delayNextStep(delay);\n context.currentTimeline.setStyles([startingStyles], null, context.errors, options);\n visitDslNode(this, ast, context);\n // this checks to see if an actual animation happened\n const timelines = context.timelines.filter(timeline => timeline.containsAnimation());\n // note: we just want to apply the final styles for the rootElement, so we do not\n // just apply the styles to the last timeline but the last timeline which\n // element is the root one (basically `*`-styles are replaced with the actual\n // state style values only for the root element)\n if (timelines.length && finalStyles.size) {\n let lastRootTimeline;\n for (let i = timelines.length - 1; i >= 0; i--) {\n const timeline = timelines[i];\n if (timeline.element === rootElement) {\n lastRootTimeline = timeline;\n break;\n }\n }\n if (lastRootTimeline && !lastRootTimeline.allowOnlyTimelineStyles()) {\n lastRootTimeline.setStyles([finalStyles], null, context.errors, options);\n }\n }\n return timelines.length ?\n timelines.map(timeline => timeline.buildKeyframes()) :\n [createTimelineInstruction(rootElement, [], [], [], 0, delay, '', false)];\n }\n visitTrigger(ast, context) {\n // these values are not visited in this AST\n }\n visitState(ast, context) {\n // these values are not visited in this AST\n }\n visitTransition(ast, context) {\n // these values are not visited in this AST\n }\n visitAnimateChild(ast, context) {\n const elementInstructions = context.subInstructions.get(context.element);\n if (elementInstructions) {\n const innerContext = context.createSubContext(ast.options);\n const startTime = context.currentTimeline.currentTime;\n const endTime = this._visitSubInstructions(elementInstructions, innerContext, innerContext.options);\n if (startTime != endTime) {\n // we do this on the upper context because we created a sub context for\n // the sub child animations\n context.transformIntoNewTimeline(endTime);\n }\n }\n context.previousNode = ast;\n }\n visitAnimateRef(ast, context) {\n const innerContext = context.createSubContext(ast.options);\n innerContext.transformIntoNewTimeline();\n this._applyAnimationRefDelays([ast.options, ast.animation.options], context, innerContext);\n this.visitReference(ast.animation, innerContext);\n context.transformIntoNewTimeline(innerContext.currentTimeline.currentTime);\n context.previousNode = ast;\n }\n _applyAnimationRefDelays(animationsRefsOptions, context, innerContext) {\n for (const animationRefOptions of animationsRefsOptions) {\n const animationDelay = animationRefOptions?.delay;\n if (animationDelay) {\n const animationDelayValue = typeof animationDelay === 'number' ?\n animationDelay :\n resolveTimingValue(interpolateParams(animationDelay, animationRefOptions?.params ?? {}, context.errors));\n innerContext.delayNextStep(animationDelayValue);\n }\n }\n }\n _visitSubInstructions(instructions, context, options) {\n const startTime = context.currentTimeline.currentTime;\n let furthestTime = startTime;\n // this is a special-case for when a user wants to skip a sub\n // animation from being fired entirely.\n const duration = options.duration != null ? resolveTimingValue(options.duration) : null;\n const delay = options.delay != null ? resolveTimingValue(options.delay) : null;\n if (duration !== 0) {\n instructions.forEach(instruction => {\n const instructionTimings = context.appendInstructionToTimeline(instruction, duration, delay);\n furthestTime =\n Math.max(furthestTime, instructionTimings.duration + instructionTimings.delay);\n });\n }\n return furthestTime;\n }\n visitReference(ast, context) {\n context.updateOptions(ast.options, true);\n visitDslNode(this, ast.animation, context);\n context.previousNode = ast;\n }\n visitSequence(ast, context) {\n const subContextCount = context.subContextCount;\n let ctx = context;\n const options = ast.options;\n if (options && (options.params || options.delay)) {\n ctx = context.createSubContext(options);\n ctx.transformIntoNewTimeline();\n if (options.delay != null) {\n if (ctx.previousNode.type == 6 /* AnimationMetadataType.Style */) {\n ctx.currentTimeline.snapshotCurrentStyles();\n ctx.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n }\n const delay = resolveTimingValue(options.delay);\n ctx.delayNextStep(delay);\n }\n }\n if (ast.steps.length) {\n ast.steps.forEach(s => visitDslNode(this, s, ctx));\n // this is here just in case the inner steps only contain or end with a style() call\n ctx.currentTimeline.applyStylesToKeyframe();\n // this means that some animation function within the sequence\n // ended up creating a sub timeline (which means the current\n // timeline cannot overlap with the contents of the sequence)\n if (ctx.subContextCount > subContextCount) {\n ctx.transformIntoNewTimeline();\n }\n }\n context.previousNode = ast;\n }\n visitGroup(ast, context) {\n const innerTimelines = [];\n let furthestTime = context.currentTimeline.currentTime;\n const delay = ast.options && ast.options.delay ? resolveTimingValue(ast.options.delay) : 0;\n ast.steps.forEach(s => {\n const innerContext = context.createSubContext(ast.options);\n if (delay) {\n innerContext.delayNextStep(delay);\n }\n visitDslNode(this, s, innerContext);\n furthestTime = Math.max(furthestTime, innerContext.currentTimeline.currentTime);\n innerTimelines.push(innerContext.currentTimeline);\n });\n // this operation is run after the AST loop because otherwise\n // if the parent timeline's collected styles were updated then\n // it would pass in invalid data into the new-to-be forked items\n innerTimelines.forEach(timeline => context.currentTimeline.mergeTimelineCollectedStyles(timeline));\n context.transformIntoNewTimeline(furthestTime);\n context.previousNode = ast;\n }\n _visitTiming(ast, context) {\n if (ast.dynamic) {\n const strValue = ast.strValue;\n const timingValue = context.params ? interpolateParams(strValue, context.params, context.errors) : strValue;\n return resolveTiming(timingValue, context.errors);\n }\n else {\n return { duration: ast.duration, delay: ast.delay, easing: ast.easing };\n }\n }\n visitAnimate(ast, context) {\n const timings = context.currentAnimateTimings = this._visitTiming(ast.timings, context);\n const timeline = context.currentTimeline;\n if (timings.delay) {\n context.incrementTime(timings.delay);\n timeline.snapshotCurrentStyles();\n }\n const style = ast.style;\n if (style.type == 5 /* AnimationMetadataType.Keyframes */) {\n this.visitKeyframes(style, context);\n }\n else {\n context.incrementTime(timings.duration);\n this.visitStyle(style, context);\n timeline.applyStylesToKeyframe();\n }\n context.currentAnimateTimings = null;\n context.previousNode = ast;\n }\n visitStyle(ast, context) {\n const timeline = context.currentTimeline;\n const timings = context.currentAnimateTimings;\n // this is a special case for when a style() call\n // directly follows an animate() call (but not inside of an animate() call)\n if (!timings && timeline.hasCurrentStyleProperties()) {\n timeline.forwardFrame();\n }\n const easing = (timings && timings.easing) || ast.easing;\n if (ast.isEmptyStep) {\n timeline.applyEmptyStep(easing);\n }\n else {\n timeline.setStyles(ast.styles, easing, context.errors, context.options);\n }\n context.previousNode = ast;\n }\n visitKeyframes(ast, context) {\n const currentAnimateTimings = context.currentAnimateTimings;\n const startTime = (context.currentTimeline).duration;\n const duration = currentAnimateTimings.duration;\n const innerContext = context.createSubContext();\n const innerTimeline = innerContext.currentTimeline;\n innerTimeline.easing = currentAnimateTimings.easing;\n ast.styles.forEach(step => {\n const offset = step.offset || 0;\n innerTimeline.forwardTime(offset * duration);\n innerTimeline.setStyles(step.styles, step.easing, context.errors, context.options);\n innerTimeline.applyStylesToKeyframe();\n });\n // this will ensure that the parent timeline gets all the styles from\n // the child even if the new timeline below is not used\n context.currentTimeline.mergeTimelineCollectedStyles(innerTimeline);\n // we do this because the window between this timeline and the sub timeline\n // should ensure that the styles within are exactly the same as they were before\n context.transformIntoNewTimeline(startTime + duration);\n context.previousNode = ast;\n }\n visitQuery(ast, context) {\n // in the event that the first step before this is a style step we need\n // to ensure the styles are applied before the children are animated\n const startTime = context.currentTimeline.currentTime;\n const options = (ast.options || {});\n const delay = options.delay ? resolveTimingValue(options.delay) : 0;\n if (delay &&\n (context.previousNode.type === 6 /* AnimationMetadataType.Style */ ||\n (startTime == 0 && context.currentTimeline.hasCurrentStyleProperties()))) {\n context.currentTimeline.snapshotCurrentStyles();\n context.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n }\n let furthestTime = startTime;\n const elms = context.invokeQuery(ast.selector, ast.originalSelector, ast.limit, ast.includeSelf, options.optional ? true : false, context.errors);\n context.currentQueryTotal = elms.length;\n let sameElementTimeline = null;\n elms.forEach((element, i) => {\n context.currentQueryIndex = i;\n const innerContext = context.createSubContext(ast.options, element);\n if (delay) {\n innerContext.delayNextStep(delay);\n }\n if (element === context.element) {\n sameElementTimeline = innerContext.currentTimeline;\n }\n visitDslNode(this, ast.animation, innerContext);\n // this is here just incase the inner steps only contain or end\n // with a style() call (which is here to signal that this is a preparatory\n // call to style an element before it is animated again)\n innerContext.currentTimeline.applyStylesToKeyframe();\n const endTime = innerContext.currentTimeline.currentTime;\n furthestTime = Math.max(furthestTime, endTime);\n });\n context.currentQueryIndex = 0;\n context.currentQueryTotal = 0;\n context.transformIntoNewTimeline(furthestTime);\n if (sameElementTimeline) {\n context.currentTimeline.mergeTimelineCollectedStyles(sameElementTimeline);\n context.currentTimeline.snapshotCurrentStyles();\n }\n context.previousNode = ast;\n }\n visitStagger(ast, context) {\n const parentContext = context.parentContext;\n const tl = context.currentTimeline;\n const timings = ast.timings;\n const duration = Math.abs(timings.duration);\n const maxTime = duration * (context.currentQueryTotal - 1);\n let delay = duration * context.currentQueryIndex;\n let staggerTransformer = timings.duration < 0 ? 'reverse' : timings.easing;\n switch (staggerTransformer) {\n case 'reverse':\n delay = maxTime - delay;\n break;\n case 'full':\n delay = parentContext.currentStaggerTime;\n break;\n }\n const timeline = context.currentTimeline;\n if (delay) {\n timeline.delayNextStep(delay);\n }\n const startingTime = timeline.currentTime;\n visitDslNode(this, ast.animation, context);\n context.previousNode = ast;\n // time = duration + delay\n // the reason why this computation is so complex is because\n // the inner timeline may either have a delay value or a stretched\n // keyframe depending on if a subtimeline is not used or is used.\n parentContext.currentStaggerTime =\n (tl.currentTime - startingTime) + (tl.startTime - parentContext.currentTimeline.startTime);\n }\n}\nconst DEFAULT_NOOP_PREVIOUS_NODE = {};\nclass AnimationTimelineContext {\n constructor(_driver, element, subInstructions, _enterClassName, _leaveClassName, errors, timelines, initialTimeline) {\n this._driver = _driver;\n this.element = element;\n this.subInstructions = subInstructions;\n this._enterClassName = _enterClassName;\n this._leaveClassName = _leaveClassName;\n this.errors = errors;\n this.timelines = timelines;\n this.parentContext = null;\n this.currentAnimateTimings = null;\n this.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n this.subContextCount = 0;\n this.options = {};\n this.currentQueryIndex = 0;\n this.currentQueryTotal = 0;\n this.currentStaggerTime = 0;\n this.currentTimeline = initialTimeline || new TimelineBuilder(this._driver, element, 0);\n timelines.push(this.currentTimeline);\n }\n get params() {\n return this.options.params;\n }\n updateOptions(options, skipIfExists) {\n if (!options)\n return;\n const newOptions = options;\n let optionsToUpdate = this.options;\n // NOTE: this will get patched up when other animation methods support duration overrides\n if (newOptions.duration != null) {\n optionsToUpdate.duration = resolveTimingValue(newOptions.duration);\n }\n if (newOptions.delay != null) {\n optionsToUpdate.delay = resolveTimingValue(newOptions.delay);\n }\n const newParams = newOptions.params;\n if (newParams) {\n let paramsToUpdate = optionsToUpdate.params;\n if (!paramsToUpdate) {\n paramsToUpdate = this.options.params = {};\n }\n Object.keys(newParams).forEach(name => {\n if (!skipIfExists || !paramsToUpdate.hasOwnProperty(name)) {\n paramsToUpdate[name] = interpolateParams(newParams[name], paramsToUpdate, this.errors);\n }\n });\n }\n }\n _copyOptions() {\n const options = {};\n if (this.options) {\n const oldParams = this.options.params;\n if (oldParams) {\n const params = options['params'] = {};\n Object.keys(oldParams).forEach(name => {\n params[name] = oldParams[name];\n });\n }\n }\n return options;\n }\n createSubContext(options = null, element, newTime) {\n const target = element || this.element;\n const context = new AnimationTimelineContext(this._driver, target, this.subInstructions, this._enterClassName, this._leaveClassName, this.errors, this.timelines, this.currentTimeline.fork(target, newTime || 0));\n context.previousNode = this.previousNode;\n context.currentAnimateTimings = this.currentAnimateTimings;\n context.options = this._copyOptions();\n context.updateOptions(options);\n context.currentQueryIndex = this.currentQueryIndex;\n context.currentQueryTotal = this.currentQueryTotal;\n context.parentContext = this;\n this.subContextCount++;\n return context;\n }\n transformIntoNewTimeline(newTime) {\n this.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n this.currentTimeline = this.currentTimeline.fork(this.element, newTime);\n this.timelines.push(this.currentTimeline);\n return this.currentTimeline;\n }\n appendInstructionToTimeline(instruction, duration, delay) {\n const updatedTimings = {\n duration: duration != null ? duration : instruction.duration,\n delay: this.currentTimeline.currentTime + (delay != null ? delay : 0) + instruction.delay,\n easing: ''\n };\n const builder = new SubTimelineBuilder(this._driver, instruction.element, instruction.keyframes, instruction.preStyleProps, instruction.postStyleProps, updatedTimings, instruction.stretchStartingKeyframe);\n this.timelines.push(builder);\n return updatedTimings;\n }\n incrementTime(time) {\n this.currentTimeline.forwardTime(this.currentTimeline.duration + time);\n }\n delayNextStep(delay) {\n // negative delays are not yet supported\n if (delay > 0) {\n this.currentTimeline.delayNextStep(delay);\n }\n }\n invokeQuery(selector, originalSelector, limit, includeSelf, optional, errors) {\n let results = [];\n if (includeSelf) {\n results.push(this.element);\n }\n if (selector.length > 0) { // only if :self is used then the selector can be empty\n selector = selector.replace(ENTER_TOKEN_REGEX, '.' + this._enterClassName);\n selector = selector.replace(LEAVE_TOKEN_REGEX, '.' + this._leaveClassName);\n const multi = limit != 1;\n let elements = this._driver.query(this.element, selector, multi);\n if (limit !== 0) {\n elements = limit < 0 ? elements.slice(elements.length + limit, elements.length) :\n elements.slice(0, limit);\n }\n results.push(...elements);\n }\n if (!optional && results.length == 0) {\n errors.push(invalidQuery(originalSelector));\n }\n return results;\n }\n}\nclass TimelineBuilder {\n constructor(_driver, element, startTime, _elementTimelineStylesLookup) {\n this._driver = _driver;\n this.element = element;\n this.startTime = startTime;\n this._elementTimelineStylesLookup = _elementTimelineStylesLookup;\n this.duration = 0;\n this._previousKeyframe = new Map();\n this._currentKeyframe = new Map();\n this._keyframes = new Map();\n this._styleSummary = new Map();\n this._localTimelineStyles = new Map();\n this._pendingStyles = new Map();\n this._backFill = new Map();\n this._currentEmptyStepKeyframe = null;\n if (!this._elementTimelineStylesLookup) {\n this._elementTimelineStylesLookup = new Map();\n }\n this._globalTimelineStyles = this._elementTimelineStylesLookup.get(element);\n if (!this._globalTimelineStyles) {\n this._globalTimelineStyles = this._localTimelineStyles;\n this._elementTimelineStylesLookup.set(element, this._localTimelineStyles);\n }\n this._loadKeyframe();\n }\n containsAnimation() {\n switch (this._keyframes.size) {\n case 0:\n return false;\n case 1:\n return this.hasCurrentStyleProperties();\n default:\n return true;\n }\n }\n hasCurrentStyleProperties() {\n return this._currentKeyframe.size > 0;\n }\n get currentTime() {\n return this.startTime + this.duration;\n }\n delayNextStep(delay) {\n // in the event that a style() step is placed right before a stagger()\n // and that style() step is the very first style() value in the animation\n // then we need to make a copy of the keyframe [0, copy, 1] so that the delay\n // properly applies the style() values to work with the stagger...\n const hasPreStyleStep = this._keyframes.size === 1 && this._pendingStyles.size;\n if (this.duration || hasPreStyleStep) {\n this.forwardTime(this.currentTime + delay);\n if (hasPreStyleStep) {\n this.snapshotCurrentStyles();\n }\n }\n else {\n this.startTime += delay;\n }\n }\n fork(element, currentTime) {\n this.applyStylesToKeyframe();\n return new TimelineBuilder(this._driver, element, currentTime || this.currentTime, this._elementTimelineStylesLookup);\n }\n _loadKeyframe() {\n if (this._currentKeyframe) {\n this._previousKeyframe = this._currentKeyframe;\n }\n this._currentKeyframe = this._keyframes.get(this.duration);\n if (!this._currentKeyframe) {\n this._currentKeyframe = new Map();\n this._keyframes.set(this.duration, this._currentKeyframe);\n }\n }\n forwardFrame() {\n this.duration += ONE_FRAME_IN_MILLISECONDS;\n this._loadKeyframe();\n }\n forwardTime(time) {\n this.applyStylesToKeyframe();\n this.duration = time;\n this._loadKeyframe();\n }\n _updateStyle(prop, value) {\n this._localTimelineStyles.set(prop, value);\n this._globalTimelineStyles.set(prop, value);\n this._styleSummary.set(prop, { time: this.currentTime, value });\n }\n allowOnlyTimelineStyles() {\n return this._currentEmptyStepKeyframe !== this._currentKeyframe;\n }\n applyEmptyStep(easing) {\n if (easing) {\n this._previousKeyframe.set('easing', easing);\n }\n // special case for animate(duration):\n // all missing styles are filled with a `*` value then\n // if any destination styles are filled in later on the same\n // keyframe then they will override the overridden styles\n // We use `_globalTimelineStyles` here because there may be\n // styles in previous keyframes that are not present in this timeline\n for (let [prop, value] of this._globalTimelineStyles) {\n this._backFill.set(prop, value || AUTO_STYLE);\n this._currentKeyframe.set(prop, AUTO_STYLE);\n }\n this._currentEmptyStepKeyframe = this._currentKeyframe;\n }\n setStyles(input, easing, errors, options) {\n if (easing) {\n this._previousKeyframe.set('easing', easing);\n }\n const params = (options && options.params) || {};\n const styles = flattenStyles(input, this._globalTimelineStyles);\n for (let [prop, value] of styles) {\n const val = interpolateParams(value, params, errors);\n this._pendingStyles.set(prop, val);\n if (!this._localTimelineStyles.has(prop)) {\n this._backFill.set(prop, this._globalTimelineStyles.get(prop) ?? AUTO_STYLE);\n }\n this._updateStyle(prop, val);\n }\n }\n applyStylesToKeyframe() {\n if (this._pendingStyles.size == 0)\n return;\n this._pendingStyles.forEach((val, prop) => {\n this._currentKeyframe.set(prop, val);\n });\n this._pendingStyles.clear();\n this._localTimelineStyles.forEach((val, prop) => {\n if (!this._currentKeyframe.has(prop)) {\n this._currentKeyframe.set(prop, val);\n }\n });\n }\n snapshotCurrentStyles() {\n for (let [prop, val] of this._localTimelineStyles) {\n this._pendingStyles.set(prop, val);\n this._updateStyle(prop, val);\n }\n }\n getFinalKeyframe() {\n return this._keyframes.get(this.duration);\n }\n get properties() {\n const properties = [];\n for (let prop in this._currentKeyframe) {\n properties.push(prop);\n }\n return properties;\n }\n mergeTimelineCollectedStyles(timeline) {\n timeline._styleSummary.forEach((details1, prop) => {\n const details0 = this._styleSummary.get(prop);\n if (!details0 || details1.time > details0.time) {\n this._updateStyle(prop, details1.value);\n }\n });\n }\n buildKeyframes() {\n this.applyStylesToKeyframe();\n const preStyleProps = new Set();\n const postStyleProps = new Set();\n const isEmpty = this._keyframes.size === 1 && this.duration === 0;\n let finalKeyframes = [];\n this._keyframes.forEach((keyframe, time) => {\n const finalKeyframe = copyStyles(keyframe, new Map(), this._backFill);\n finalKeyframe.forEach((value, prop) => {\n if (value === ɵPRE_STYLE) {\n preStyleProps.add(prop);\n }\n else if (value === AUTO_STYLE) {\n postStyleProps.add(prop);\n }\n });\n if (!isEmpty) {\n finalKeyframe.set('offset', time / this.duration);\n }\n finalKeyframes.push(finalKeyframe);\n });\n const preProps = preStyleProps.size ? iteratorToArray(preStyleProps.values()) : [];\n const postProps = postStyleProps.size ? iteratorToArray(postStyleProps.values()) : [];\n // special case for a 0-second animation (which is designed just to place styles onscreen)\n if (isEmpty) {\n const kf0 = finalKeyframes[0];\n const kf1 = new Map(kf0);\n kf0.set('offset', 0);\n kf1.set('offset', 1);\n finalKeyframes = [kf0, kf1];\n }\n return createTimelineInstruction(this.element, finalKeyframes, preProps, postProps, this.duration, this.startTime, this.easing, false);\n }\n}\nclass SubTimelineBuilder extends TimelineBuilder {\n constructor(driver, element, keyframes, preStyleProps, postStyleProps, timings, _stretchStartingKeyframe = false) {\n super(driver, element, timings.delay);\n this.keyframes = keyframes;\n this.preStyleProps = preStyleProps;\n this.postStyleProps = postStyleProps;\n this._stretchStartingKeyframe = _stretchStartingKeyframe;\n this.timings = { duration: timings.duration, delay: timings.delay, easing: timings.easing };\n }\n containsAnimation() {\n return this.keyframes.length > 1;\n }\n buildKeyframes() {\n let keyframes = this.keyframes;\n let { delay, duration, easing } = this.timings;\n if (this._stretchStartingKeyframe && delay) {\n const newKeyframes = [];\n const totalTime = duration + delay;\n const startingGap = delay / totalTime;\n // the original starting keyframe now starts once the delay is done\n const newFirstKeyframe = copyStyles(keyframes[0]);\n newFirstKeyframe.set('offset', 0);\n newKeyframes.push(newFirstKeyframe);\n const oldFirstKeyframe = copyStyles(keyframes[0]);\n oldFirstKeyframe.set('offset', roundOffset(startingGap));\n newKeyframes.push(oldFirstKeyframe);\n /*\n When the keyframe is stretched then it means that the delay before the animation\n starts is gone. Instead the first keyframe is placed at the start of the animation\n and it is then copied to where it starts when the original delay is over. This basically\n means nothing animates during that delay, but the styles are still rendered. For this\n to work the original offset values that exist in the original keyframes must be \"warped\"\n so that they can take the new keyframe + delay into account.\n \n delay=1000, duration=1000, keyframes = 0 .5 1\n \n turns into\n \n delay=0, duration=2000, keyframes = 0 .33 .66 1\n */\n // offsets between 1 ... n -1 are all warped by the keyframe stretch\n const limit = keyframes.length - 1;\n for (let i = 1; i <= limit; i++) {\n let kf = copyStyles(keyframes[i]);\n const oldOffset = kf.get('offset');\n const timeAtKeyframe = delay + oldOffset * duration;\n kf.set('offset', roundOffset(timeAtKeyframe / totalTime));\n newKeyframes.push(kf);\n }\n // the new starting keyframe should be added at the start\n duration = totalTime;\n delay = 0;\n easing = '';\n keyframes = newKeyframes;\n }\n return createTimelineInstruction(this.element, keyframes, this.preStyleProps, this.postStyleProps, duration, delay, easing, true);\n }\n}\nfunction roundOffset(offset, decimalPoints = 3) {\n const mult = Math.pow(10, decimalPoints - 1);\n return Math.round(offset * mult) / mult;\n}\nfunction flattenStyles(input, allStyles) {\n const styles = new Map();\n let allProperties;\n input.forEach(token => {\n if (token === '*') {\n allProperties = allProperties || allStyles.keys();\n for (let prop of allProperties) {\n styles.set(prop, AUTO_STYLE);\n }\n }\n else {\n copyStyles(token, styles);\n }\n });\n return styles;\n}\n\nclass Animation {\n constructor(_driver, input) {\n this._driver = _driver;\n const errors = [];\n const warnings = [];\n const ast = buildAnimationAst(_driver, input, errors, warnings);\n if (errors.length) {\n throw validationFailed(errors);\n }\n if (warnings.length) {\n warnValidation(warnings);\n }\n this._animationAst = ast;\n }\n buildTimelines(element, startingStyles, destinationStyles, options, subInstructions) {\n const start = Array.isArray(startingStyles) ? normalizeStyles(startingStyles) :\n startingStyles;\n const dest = Array.isArray(destinationStyles) ? normalizeStyles(destinationStyles) :\n destinationStyles;\n const errors = [];\n subInstructions = subInstructions || new ElementInstructionMap();\n const result = buildAnimationTimelines(this._driver, element, this._animationAst, ENTER_CLASSNAME, LEAVE_CLASSNAME, start, dest, options, subInstructions, errors);\n if (errors.length) {\n throw buildingFailed(errors);\n }\n return result;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @publicApi\n */\nclass AnimationStyleNormalizer {\n}\n/**\n * @publicApi\n */\nclass NoopAnimationStyleNormalizer {\n normalizePropertyName(propertyName, errors) {\n return propertyName;\n }\n normalizeStyleValue(userProvidedProperty, normalizedProperty, value, errors) {\n return value;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst DIMENSIONAL_PROP_SET = new Set([\n 'width',\n 'height',\n 'minWidth',\n 'minHeight',\n 'maxWidth',\n 'maxHeight',\n 'left',\n 'top',\n 'bottom',\n 'right',\n 'fontSize',\n 'outlineWidth',\n 'outlineOffset',\n 'paddingTop',\n 'paddingLeft',\n 'paddingBottom',\n 'paddingRight',\n 'marginTop',\n 'marginLeft',\n 'marginBottom',\n 'marginRight',\n 'borderRadius',\n 'borderWidth',\n 'borderTopWidth',\n 'borderLeftWidth',\n 'borderRightWidth',\n 'borderBottomWidth',\n 'textIndent',\n 'perspective'\n]);\nclass WebAnimationsStyleNormalizer extends AnimationStyleNormalizer {\n normalizePropertyName(propertyName, errors) {\n return dashCaseToCamelCase(propertyName);\n }\n normalizeStyleValue(userProvidedProperty, normalizedProperty, value, errors) {\n let unit = '';\n const strVal = value.toString().trim();\n if (DIMENSIONAL_PROP_SET.has(normalizedProperty) && value !== 0 && value !== '0') {\n if (typeof value === 'number') {\n unit = 'px';\n }\n else {\n const valAndSuffixMatch = value.match(/^[+-]?[\\d\\.]+([a-z]*)$/);\n if (valAndSuffixMatch && valAndSuffixMatch[1].length == 0) {\n errors.push(invalidCssUnitValue(userProvidedProperty, value));\n }\n }\n }\n return strVal + unit;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction createTransitionInstruction(element, triggerName, fromState, toState, isRemovalTransition, fromStyles, toStyles, timelines, queriedElements, preStyleProps, postStyleProps, totalTime, errors) {\n return {\n type: 0 /* AnimationTransitionInstructionType.TransitionAnimation */,\n element,\n triggerName,\n isRemovalTransition,\n fromState,\n fromStyles,\n toState,\n toStyles,\n timelines,\n queriedElements,\n preStyleProps,\n postStyleProps,\n totalTime,\n errors\n };\n}\n\nconst EMPTY_OBJECT = {};\nclass AnimationTransitionFactory {\n constructor(_triggerName, ast, _stateStyles) {\n this._triggerName = _triggerName;\n this.ast = ast;\n this._stateStyles = _stateStyles;\n }\n match(currentState, nextState, element, params) {\n return oneOrMoreTransitionsMatch(this.ast.matchers, currentState, nextState, element, params);\n }\n buildStyles(stateName, params, errors) {\n let styler = this._stateStyles.get('*');\n if (stateName !== undefined) {\n styler = this._stateStyles.get(stateName?.toString()) || styler;\n }\n return styler ? styler.buildStyles(params, errors) : new Map();\n }\n build(driver, element, currentState, nextState, enterClassName, leaveClassName, currentOptions, nextOptions, subInstructions, skipAstBuild) {\n const errors = [];\n const transitionAnimationParams = this.ast.options && this.ast.options.params || EMPTY_OBJECT;\n const currentAnimationParams = currentOptions && currentOptions.params || EMPTY_OBJECT;\n const currentStateStyles = this.buildStyles(currentState, currentAnimationParams, errors);\n const nextAnimationParams = nextOptions && nextOptions.params || EMPTY_OBJECT;\n const nextStateStyles = this.buildStyles(nextState, nextAnimationParams, errors);\n const queriedElements = new Set();\n const preStyleMap = new Map();\n const postStyleMap = new Map();\n const isRemoval = nextState === 'void';\n const animationOptions = {\n params: applyParamDefaults(nextAnimationParams, transitionAnimationParams),\n delay: this.ast.options?.delay,\n };\n const timelines = skipAstBuild ?\n [] :\n buildAnimationTimelines(driver, element, this.ast.animation, enterClassName, leaveClassName, currentStateStyles, nextStateStyles, animationOptions, subInstructions, errors);\n let totalTime = 0;\n timelines.forEach(tl => {\n totalTime = Math.max(tl.duration + tl.delay, totalTime);\n });\n if (errors.length) {\n return createTransitionInstruction(element, this._triggerName, currentState, nextState, isRemoval, currentStateStyles, nextStateStyles, [], [], preStyleMap, postStyleMap, totalTime, errors);\n }\n timelines.forEach(tl => {\n const elm = tl.element;\n const preProps = getOrSetDefaultValue(preStyleMap, elm, new Set());\n tl.preStyleProps.forEach(prop => preProps.add(prop));\n const postProps = getOrSetDefaultValue(postStyleMap, elm, new Set());\n tl.postStyleProps.forEach(prop => postProps.add(prop));\n if (elm !== element) {\n queriedElements.add(elm);\n }\n });\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n checkNonAnimatableInTimelines(timelines, this._triggerName, driver);\n }\n const queriedElementsList = iteratorToArray(queriedElements.values());\n return createTransitionInstruction(element, this._triggerName, currentState, nextState, isRemoval, currentStateStyles, nextStateStyles, timelines, queriedElementsList, preStyleMap, postStyleMap, totalTime);\n }\n}\n/**\n * Checks inside a set of timelines if they try to animate a css property which is not considered\n * animatable, in that case it prints a warning on the console.\n * Besides that the function doesn't have any other effect.\n *\n * Note: this check is done here after the timelines are built instead of doing on a lower level so\n * that we can make sure that the warning appears only once per instruction (we can aggregate here\n * all the issues instead of finding them separately).\n *\n * @param timelines The built timelines for the current instruction.\n * @param triggerName The name of the trigger for the current instruction.\n * @param driver Animation driver used to perform the check.\n *\n */\nfunction checkNonAnimatableInTimelines(timelines, triggerName, driver) {\n if (!driver.validateAnimatableStyleProperty) {\n return;\n }\n const invalidNonAnimatableProps = new Set();\n timelines.forEach(({ keyframes }) => {\n const nonAnimatablePropsInitialValues = new Map();\n keyframes.forEach(keyframe => {\n for (const [prop, value] of keyframe.entries()) {\n if (!driver.validateAnimatableStyleProperty(prop)) {\n if (nonAnimatablePropsInitialValues.has(prop) && !invalidNonAnimatableProps.has(prop)) {\n const propInitialValue = nonAnimatablePropsInitialValues.get(prop);\n if (propInitialValue !== value) {\n invalidNonAnimatableProps.add(prop);\n }\n }\n else {\n nonAnimatablePropsInitialValues.set(prop, value);\n }\n }\n }\n });\n });\n if (invalidNonAnimatableProps.size > 0) {\n console.warn(`Warning: The animation trigger \"${triggerName}\" is attempting to animate the following` +\n ' not animatable properties: ' + Array.from(invalidNonAnimatableProps).join(', ') + '\\n' +\n '(to check the list of all animatable properties visit https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_animated_properties)');\n }\n}\nfunction oneOrMoreTransitionsMatch(matchFns, currentState, nextState, element, params) {\n return matchFns.some(fn => fn(currentState, nextState, element, params));\n}\nfunction applyParamDefaults(userParams, defaults) {\n const result = copyObj(defaults);\n for (const key in userParams) {\n if (userParams.hasOwnProperty(key) && userParams[key] != null) {\n result[key] = userParams[key];\n }\n }\n return result;\n}\nclass AnimationStateStyles {\n constructor(styles, defaultParams, normalizer) {\n this.styles = styles;\n this.defaultParams = defaultParams;\n this.normalizer = normalizer;\n }\n buildStyles(params, errors) {\n const finalStyles = new Map();\n const combinedParams = copyObj(this.defaultParams);\n Object.keys(params).forEach(key => {\n const value = params[key];\n if (value !== null) {\n combinedParams[key] = value;\n }\n });\n this.styles.styles.forEach(value => {\n if (typeof value !== 'string') {\n value.forEach((val, prop) => {\n if (val) {\n val = interpolateParams(val, combinedParams, errors);\n }\n const normalizedProp = this.normalizer.normalizePropertyName(prop, errors);\n val = this.normalizer.normalizeStyleValue(prop, normalizedProp, val, errors);\n finalStyles.set(prop, val);\n });\n }\n });\n return finalStyles;\n }\n}\n\nfunction buildTrigger(name, ast, normalizer) {\n return new AnimationTrigger(name, ast, normalizer);\n}\nclass AnimationTrigger {\n constructor(name, ast, _normalizer) {\n this.name = name;\n this.ast = ast;\n this._normalizer = _normalizer;\n this.transitionFactories = [];\n this.states = new Map();\n ast.states.forEach(ast => {\n const defaultParams = (ast.options && ast.options.params) || {};\n this.states.set(ast.name, new AnimationStateStyles(ast.style, defaultParams, _normalizer));\n });\n balanceProperties(this.states, 'true', '1');\n balanceProperties(this.states, 'false', '0');\n ast.transitions.forEach(ast => {\n this.transitionFactories.push(new AnimationTransitionFactory(name, ast, this.states));\n });\n this.fallbackTransition = createFallbackTransition(name, this.states, this._normalizer);\n }\n get containsQueries() {\n return this.ast.queryCount > 0;\n }\n matchTransition(currentState, nextState, element, params) {\n const entry = this.transitionFactories.find(f => f.match(currentState, nextState, element, params));\n return entry || null;\n }\n matchStyles(currentState, params, errors) {\n return this.fallbackTransition.buildStyles(currentState, params, errors);\n }\n}\nfunction createFallbackTransition(triggerName, states, normalizer) {\n const matchers = [(fromState, toState) => true];\n const animation = { type: 2 /* AnimationMetadataType.Sequence */, steps: [], options: null };\n const transition = {\n type: 1 /* AnimationMetadataType.Transition */,\n animation,\n matchers,\n options: null,\n queryCount: 0,\n depCount: 0\n };\n return new AnimationTransitionFactory(triggerName, transition, states);\n}\nfunction balanceProperties(stateMap, key1, key2) {\n if (stateMap.has(key1)) {\n if (!stateMap.has(key2)) {\n stateMap.set(key2, stateMap.get(key1));\n }\n }\n else if (stateMap.has(key2)) {\n stateMap.set(key1, stateMap.get(key2));\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst EMPTY_INSTRUCTION_MAP = new ElementInstructionMap();\nclass TimelineAnimationEngine {\n constructor(bodyNode, _driver, _normalizer) {\n this.bodyNode = bodyNode;\n this._driver = _driver;\n this._normalizer = _normalizer;\n this._animations = new Map();\n this._playersById = new Map();\n this.players = [];\n }\n register(id, metadata) {\n const errors = [];\n const warnings = [];\n const ast = buildAnimationAst(this._driver, metadata, errors, warnings);\n if (errors.length) {\n throw registerFailed(errors);\n }\n else {\n if (warnings.length) {\n warnRegister(warnings);\n }\n this._animations.set(id, ast);\n }\n }\n _buildPlayer(i, preStyles, postStyles) {\n const element = i.element;\n const keyframes = normalizeKeyframes$1(this._driver, this._normalizer, element, i.keyframes, preStyles, postStyles);\n return this._driver.animate(element, keyframes, i.duration, i.delay, i.easing, [], true);\n }\n create(id, element, options = {}) {\n const errors = [];\n const ast = this._animations.get(id);\n let instructions;\n const autoStylesMap = new Map();\n if (ast) {\n instructions = buildAnimationTimelines(this._driver, element, ast, ENTER_CLASSNAME, LEAVE_CLASSNAME, new Map(), new Map(), options, EMPTY_INSTRUCTION_MAP, errors);\n instructions.forEach(inst => {\n const styles = getOrSetDefaultValue(autoStylesMap, inst.element, new Map());\n inst.postStyleProps.forEach(prop => styles.set(prop, null));\n });\n }\n else {\n errors.push(missingOrDestroyedAnimation());\n instructions = [];\n }\n if (errors.length) {\n throw createAnimationFailed(errors);\n }\n autoStylesMap.forEach((styles, element) => {\n styles.forEach((_, prop) => {\n styles.set(prop, this._driver.computeStyle(element, prop, AUTO_STYLE));\n });\n });\n const players = instructions.map(i => {\n const styles = autoStylesMap.get(i.element);\n return this._buildPlayer(i, new Map(), styles);\n });\n const player = optimizeGroupPlayer(players);\n this._playersById.set(id, player);\n player.onDestroy(() => this.destroy(id));\n this.players.push(player);\n return player;\n }\n destroy(id) {\n const player = this._getPlayer(id);\n player.destroy();\n this._playersById.delete(id);\n const index = this.players.indexOf(player);\n if (index >= 0) {\n this.players.splice(index, 1);\n }\n }\n _getPlayer(id) {\n const player = this._playersById.get(id);\n if (!player) {\n throw missingPlayer(id);\n }\n return player;\n }\n listen(id, element, eventName, callback) {\n // triggerName, fromState, toState are all ignored for timeline animations\n const baseEvent = makeAnimationEvent(element, '', '', '');\n listenOnPlayer(this._getPlayer(id), eventName, baseEvent, callback);\n return () => { };\n }\n command(id, element, command, args) {\n if (command == 'register') {\n this.register(id, args[0]);\n return;\n }\n if (command == 'create') {\n const options = (args[0] || {});\n this.create(id, element, options);\n return;\n }\n const player = this._getPlayer(id);\n switch (command) {\n case 'play':\n player.play();\n break;\n case 'pause':\n player.pause();\n break;\n case 'reset':\n player.reset();\n break;\n case 'restart':\n player.restart();\n break;\n case 'finish':\n player.finish();\n break;\n case 'init':\n player.init();\n break;\n case 'setPosition':\n player.setPosition(parseFloat(args[0]));\n break;\n case 'destroy':\n this.destroy(id);\n break;\n }\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst QUEUED_CLASSNAME = 'ng-animate-queued';\nconst QUEUED_SELECTOR = '.ng-animate-queued';\nconst DISABLED_CLASSNAME = 'ng-animate-disabled';\nconst DISABLED_SELECTOR = '.ng-animate-disabled';\nconst STAR_CLASSNAME = 'ng-star-inserted';\nconst STAR_SELECTOR = '.ng-star-inserted';\nconst EMPTY_PLAYER_ARRAY = [];\nconst NULL_REMOVAL_STATE = {\n namespaceId: '',\n setForRemoval: false,\n setForMove: false,\n hasAnimation: false,\n removedBeforeQueried: false\n};\nconst NULL_REMOVED_QUERIED_STATE = {\n namespaceId: '',\n setForMove: false,\n setForRemoval: false,\n hasAnimation: false,\n removedBeforeQueried: true\n};\nconst REMOVAL_FLAG = '__ng_removed';\nclass StateValue {\n constructor(input, namespaceId = '') {\n this.namespaceId = namespaceId;\n const isObj = input && input.hasOwnProperty('value');\n const value = isObj ? input['value'] : input;\n this.value = normalizeTriggerValue(value);\n if (isObj) {\n const options = copyObj(input);\n delete options['value'];\n this.options = options;\n }\n else {\n this.options = {};\n }\n if (!this.options.params) {\n this.options.params = {};\n }\n }\n get params() {\n return this.options.params;\n }\n absorbOptions(options) {\n const newParams = options.params;\n if (newParams) {\n const oldParams = this.options.params;\n Object.keys(newParams).forEach(prop => {\n if (oldParams[prop] == null) {\n oldParams[prop] = newParams[prop];\n }\n });\n }\n }\n}\nconst VOID_VALUE = 'void';\nconst DEFAULT_STATE_VALUE = new StateValue(VOID_VALUE);\nclass AnimationTransitionNamespace {\n constructor(id, hostElement, _engine) {\n this.id = id;\n this.hostElement = hostElement;\n this._engine = _engine;\n this.players = [];\n this._triggers = new Map();\n this._queue = [];\n this._elementListeners = new Map();\n this._hostClassName = 'ng-tns-' + id;\n addClass(hostElement, this._hostClassName);\n }\n listen(element, name, phase, callback) {\n if (!this._triggers.has(name)) {\n throw missingTrigger(phase, name);\n }\n if (phase == null || phase.length == 0) {\n throw missingEvent(name);\n }\n if (!isTriggerEventValid(phase)) {\n throw unsupportedTriggerEvent(phase, name);\n }\n const listeners = getOrSetDefaultValue(this._elementListeners, element, []);\n const data = { name, phase, callback };\n listeners.push(data);\n const triggersWithStates = getOrSetDefaultValue(this._engine.statesByElement, element, new Map());\n if (!triggersWithStates.has(name)) {\n addClass(element, NG_TRIGGER_CLASSNAME);\n addClass(element, NG_TRIGGER_CLASSNAME + '-' + name);\n triggersWithStates.set(name, DEFAULT_STATE_VALUE);\n }\n return () => {\n // the event listener is removed AFTER the flush has occurred such\n // that leave animations callbacks can fire (otherwise if the node\n // is removed in between then the listeners would be deregistered)\n this._engine.afterFlush(() => {\n const index = listeners.indexOf(data);\n if (index >= 0) {\n listeners.splice(index, 1);\n }\n if (!this._triggers.has(name)) {\n triggersWithStates.delete(name);\n }\n });\n };\n }\n register(name, ast) {\n if (this._triggers.has(name)) {\n // throw\n return false;\n }\n else {\n this._triggers.set(name, ast);\n return true;\n }\n }\n _getTrigger(name) {\n const trigger = this._triggers.get(name);\n if (!trigger) {\n throw unregisteredTrigger(name);\n }\n return trigger;\n }\n trigger(element, triggerName, value, defaultToFallback = true) {\n const trigger = this._getTrigger(triggerName);\n const player = new TransitionAnimationPlayer(this.id, triggerName, element);\n let triggersWithStates = this._engine.statesByElement.get(element);\n if (!triggersWithStates) {\n addClass(element, NG_TRIGGER_CLASSNAME);\n addClass(element, NG_TRIGGER_CLASSNAME + '-' + triggerName);\n this._engine.statesByElement.set(element, triggersWithStates = new Map());\n }\n let fromState = triggersWithStates.get(triggerName);\n const toState = new StateValue(value, this.id);\n const isObj = value && value.hasOwnProperty('value');\n if (!isObj && fromState) {\n toState.absorbOptions(fromState.options);\n }\n triggersWithStates.set(triggerName, toState);\n if (!fromState) {\n fromState = DEFAULT_STATE_VALUE;\n }\n const isRemoval = toState.value === VOID_VALUE;\n // normally this isn't reached by here, however, if an object expression\n // is passed in then it may be a new object each time. Comparing the value\n // is important since that will stay the same despite there being a new object.\n // The removal arc here is special cased because the same element is triggered\n // twice in the event that it contains animations on the outer/inner portions\n // of the host container\n if (!isRemoval && fromState.value === toState.value) {\n // this means that despite the value not changing, some inner params\n // have changed which means that the animation final styles need to be applied\n if (!objEquals(fromState.params, toState.params)) {\n const errors = [];\n const fromStyles = trigger.matchStyles(fromState.value, fromState.params, errors);\n const toStyles = trigger.matchStyles(toState.value, toState.params, errors);\n if (errors.length) {\n this._engine.reportError(errors);\n }\n else {\n this._engine.afterFlush(() => {\n eraseStyles(element, fromStyles);\n setStyles(element, toStyles);\n });\n }\n }\n return;\n }\n const playersOnElement = getOrSetDefaultValue(this._engine.playersByElement, element, []);\n playersOnElement.forEach(player => {\n // only remove the player if it is queued on the EXACT same trigger/namespace\n // we only also deal with queued players here because if the animation has\n // started then we want to keep the player alive until the flush happens\n // (which is where the previousPlayers are passed into the new player)\n if (player.namespaceId == this.id && player.triggerName == triggerName && player.queued) {\n player.destroy();\n }\n });\n let transition = trigger.matchTransition(fromState.value, toState.value, element, toState.params);\n let isFallbackTransition = false;\n if (!transition) {\n if (!defaultToFallback)\n return;\n transition = trigger.fallbackTransition;\n isFallbackTransition = true;\n }\n this._engine.totalQueuedPlayers++;\n this._queue.push({ element, triggerName, transition, fromState, toState, player, isFallbackTransition });\n if (!isFallbackTransition) {\n addClass(element, QUEUED_CLASSNAME);\n player.onStart(() => {\n removeClass(element, QUEUED_CLASSNAME);\n });\n }\n player.onDone(() => {\n let index = this.players.indexOf(player);\n if (index >= 0) {\n this.players.splice(index, 1);\n }\n const players = this._engine.playersByElement.get(element);\n if (players) {\n let index = players.indexOf(player);\n if (index >= 0) {\n players.splice(index, 1);\n }\n }\n });\n this.players.push(player);\n playersOnElement.push(player);\n return player;\n }\n deregister(name) {\n this._triggers.delete(name);\n this._engine.statesByElement.forEach(stateMap => stateMap.delete(name));\n this._elementListeners.forEach((listeners, element) => {\n this._elementListeners.set(element, listeners.filter(entry => {\n return entry.name != name;\n }));\n });\n }\n clearElementCache(element) {\n this._engine.statesByElement.delete(element);\n this._elementListeners.delete(element);\n const elementPlayers = this._engine.playersByElement.get(element);\n if (elementPlayers) {\n elementPlayers.forEach(player => player.destroy());\n this._engine.playersByElement.delete(element);\n }\n }\n _signalRemovalForInnerTriggers(rootElement, context) {\n const elements = this._engine.driver.query(rootElement, NG_TRIGGER_SELECTOR, true);\n // emulate a leave animation for all inner nodes within this node.\n // If there are no animations found for any of the nodes then clear the cache\n // for the element.\n elements.forEach(elm => {\n // this means that an inner remove() operation has already kicked off\n // the animation on this element...\n if (elm[REMOVAL_FLAG])\n return;\n const namespaces = this._engine.fetchNamespacesByElement(elm);\n if (namespaces.size) {\n namespaces.forEach(ns => ns.triggerLeaveAnimation(elm, context, false, true));\n }\n else {\n this.clearElementCache(elm);\n }\n });\n // If the child elements were removed along with the parent, their animations might not\n // have completed. Clear all the elements from the cache so we don't end up with a memory leak.\n this._engine.afterFlushAnimationsDone(() => elements.forEach(elm => this.clearElementCache(elm)));\n }\n triggerLeaveAnimation(element, context, destroyAfterComplete, defaultToFallback) {\n const triggerStates = this._engine.statesByElement.get(element);\n const previousTriggersValues = new Map();\n if (triggerStates) {\n const players = [];\n triggerStates.forEach((state, triggerName) => {\n previousTriggersValues.set(triggerName, state.value);\n // this check is here in the event that an element is removed\n // twice (both on the host level and the component level)\n if (this._triggers.has(triggerName)) {\n const player = this.trigger(element, triggerName, VOID_VALUE, defaultToFallback);\n if (player) {\n players.push(player);\n }\n }\n });\n if (players.length) {\n this._engine.markElementAsRemoved(this.id, element, true, context, previousTriggersValues);\n if (destroyAfterComplete) {\n optimizeGroupPlayer(players).onDone(() => this._engine.processLeaveNode(element));\n }\n return true;\n }\n }\n return false;\n }\n prepareLeaveAnimationListeners(element) {\n const listeners = this._elementListeners.get(element);\n const elementStates = this._engine.statesByElement.get(element);\n // if this statement fails then it means that the element was picked up\n // by an earlier flush (or there are no listeners at all to track the leave).\n if (listeners && elementStates) {\n const visitedTriggers = new Set();\n listeners.forEach(listener => {\n const triggerName = listener.name;\n if (visitedTriggers.has(triggerName))\n return;\n visitedTriggers.add(triggerName);\n const trigger = this._triggers.get(triggerName);\n const transition = trigger.fallbackTransition;\n const fromState = elementStates.get(triggerName) || DEFAULT_STATE_VALUE;\n const toState = new StateValue(VOID_VALUE);\n const player = new TransitionAnimationPlayer(this.id, triggerName, element);\n this._engine.totalQueuedPlayers++;\n this._queue.push({\n element,\n triggerName,\n transition,\n fromState,\n toState,\n player,\n isFallbackTransition: true\n });\n });\n }\n }\n removeNode(element, context) {\n const engine = this._engine;\n if (element.childElementCount) {\n this._signalRemovalForInnerTriggers(element, context);\n }\n // this means that a * => VOID animation was detected and kicked off\n if (this.triggerLeaveAnimation(element, context, true))\n return;\n // find the player that is animating and make sure that the\n // removal is delayed until that player has completed\n let containsPotentialParentTransition = false;\n if (engine.totalAnimations) {\n const currentPlayers = engine.players.length ? engine.playersByQueriedElement.get(element) : [];\n // when this `if statement` does not continue forward it means that\n // a previous animation query has selected the current element and\n // is animating it. In this situation want to continue forwards and\n // allow the element to be queued up for animation later.\n if (currentPlayers && currentPlayers.length) {\n containsPotentialParentTransition = true;\n }\n else {\n let parent = element;\n while (parent = parent.parentNode) {\n const triggers = engine.statesByElement.get(parent);\n if (triggers) {\n containsPotentialParentTransition = true;\n break;\n }\n }\n }\n }\n // at this stage we know that the element will either get removed\n // during flush or will be picked up by a parent query. Either way\n // we need to fire the listeners for this element when it DOES get\n // removed (once the query parent animation is done or after flush)\n this.prepareLeaveAnimationListeners(element);\n // whether or not a parent has an animation we need to delay the deferral of the leave\n // operation until we have more information (which we do after flush() has been called)\n if (containsPotentialParentTransition) {\n engine.markElementAsRemoved(this.id, element, false, context);\n }\n else {\n const removalFlag = element[REMOVAL_FLAG];\n if (!removalFlag || removalFlag === NULL_REMOVAL_STATE) {\n // we do this after the flush has occurred such\n // that the callbacks can be fired\n engine.afterFlush(() => this.clearElementCache(element));\n engine.destroyInnerAnimations(element);\n engine._onRemovalComplete(element, context);\n }\n }\n }\n insertNode(element, parent) {\n addClass(element, this._hostClassName);\n }\n drainQueuedTransitions(microtaskId) {\n const instructions = [];\n this._queue.forEach(entry => {\n const player = entry.player;\n if (player.destroyed)\n return;\n const element = entry.element;\n const listeners = this._elementListeners.get(element);\n if (listeners) {\n listeners.forEach((listener) => {\n if (listener.name == entry.triggerName) {\n const baseEvent = makeAnimationEvent(element, entry.triggerName, entry.fromState.value, entry.toState.value);\n baseEvent['_data'] = microtaskId;\n listenOnPlayer(entry.player, listener.phase, baseEvent, listener.callback);\n }\n });\n }\n if (player.markedForDestroy) {\n this._engine.afterFlush(() => {\n // now we can destroy the element properly since the event listeners have\n // been bound to the player\n player.destroy();\n });\n }\n else {\n instructions.push(entry);\n }\n });\n this._queue = [];\n return instructions.sort((a, b) => {\n // if depCount == 0 them move to front\n // otherwise if a contains b then move back\n const d0 = a.transition.ast.depCount;\n const d1 = b.transition.ast.depCount;\n if (d0 == 0 || d1 == 0) {\n return d0 - d1;\n }\n return this._engine.driver.containsElement(a.element, b.element) ? 1 : -1;\n });\n }\n destroy(context) {\n this.players.forEach(p => p.destroy());\n this._signalRemovalForInnerTriggers(this.hostElement, context);\n }\n elementContainsData(element) {\n let containsData = false;\n if (this._elementListeners.has(element))\n containsData = true;\n containsData =\n (this._queue.find(entry => entry.element === element) ? true : false) || containsData;\n return containsData;\n }\n}\nclass TransitionAnimationEngine {\n constructor(bodyNode, driver, _normalizer) {\n this.bodyNode = bodyNode;\n this.driver = driver;\n this._normalizer = _normalizer;\n this.players = [];\n this.newHostElements = new Map();\n this.playersByElement = new Map();\n this.playersByQueriedElement = new Map();\n this.statesByElement = new Map();\n this.disabledNodes = new Set();\n this.totalAnimations = 0;\n this.totalQueuedPlayers = 0;\n this._namespaceLookup = {};\n this._namespaceList = [];\n this._flushFns = [];\n this._whenQuietFns = [];\n this.namespacesByHostElement = new Map();\n this.collectedEnterElements = [];\n this.collectedLeaveElements = [];\n // this method is designed to be overridden by the code that uses this engine\n this.onRemovalComplete = (element, context) => { };\n }\n /** @internal */\n _onRemovalComplete(element, context) {\n this.onRemovalComplete(element, context);\n }\n get queuedPlayers() {\n const players = [];\n this._namespaceList.forEach(ns => {\n ns.players.forEach(player => {\n if (player.queued) {\n players.push(player);\n }\n });\n });\n return players;\n }\n createNamespace(namespaceId, hostElement) {\n const ns = new AnimationTransitionNamespace(namespaceId, hostElement, this);\n if (this.bodyNode && this.driver.containsElement(this.bodyNode, hostElement)) {\n this._balanceNamespaceList(ns, hostElement);\n }\n else {\n // defer this later until flush during when the host element has\n // been inserted so that we know exactly where to place it in\n // the namespace list\n this.newHostElements.set(hostElement, ns);\n // given that this host element is a part of the animation code, it\n // may or may not be inserted by a parent node that is of an\n // animation renderer type. If this happens then we can still have\n // access to this item when we query for :enter nodes. If the parent\n // is a renderer then the set data-structure will normalize the entry\n this.collectEnterElement(hostElement);\n }\n return this._namespaceLookup[namespaceId] = ns;\n }\n _balanceNamespaceList(ns, hostElement) {\n const namespaceList = this._namespaceList;\n const namespacesByHostElement = this.namespacesByHostElement;\n const limit = namespaceList.length - 1;\n if (limit >= 0) {\n let found = false;\n // Find the closest ancestor with an existing namespace so we can then insert `ns` after it,\n // establishing a top-down ordering of namespaces in `this._namespaceList`.\n let ancestor = this.driver.getParentElement(hostElement);\n while (ancestor) {\n const ancestorNs = namespacesByHostElement.get(ancestor);\n if (ancestorNs) {\n // An animation namespace has been registered for this ancestor, so we insert `ns`\n // right after it to establish top-down ordering of animation namespaces.\n const index = namespaceList.indexOf(ancestorNs);\n namespaceList.splice(index + 1, 0, ns);\n found = true;\n break;\n }\n ancestor = this.driver.getParentElement(ancestor);\n }\n if (!found) {\n // No namespace exists that is an ancestor of `ns`, so `ns` is inserted at the front to\n // ensure that any existing descendants are ordered after `ns`, retaining the desired\n // top-down ordering.\n namespaceList.unshift(ns);\n }\n }\n else {\n namespaceList.push(ns);\n }\n namespacesByHostElement.set(hostElement, ns);\n return ns;\n }\n register(namespaceId, hostElement) {\n let ns = this._namespaceLookup[namespaceId];\n if (!ns) {\n ns = this.createNamespace(namespaceId, hostElement);\n }\n return ns;\n }\n registerTrigger(namespaceId, name, trigger) {\n let ns = this._namespaceLookup[namespaceId];\n if (ns && ns.register(name, trigger)) {\n this.totalAnimations++;\n }\n }\n destroy(namespaceId, context) {\n if (!namespaceId)\n return;\n const ns = this._fetchNamespace(namespaceId);\n this.afterFlush(() => {\n this.namespacesByHostElement.delete(ns.hostElement);\n delete this._namespaceLookup[namespaceId];\n const index = this._namespaceList.indexOf(ns);\n if (index >= 0) {\n this._namespaceList.splice(index, 1);\n }\n });\n this.afterFlushAnimationsDone(() => ns.destroy(context));\n }\n _fetchNamespace(id) {\n return this._namespaceLookup[id];\n }\n fetchNamespacesByElement(element) {\n // normally there should only be one namespace per element, however\n // if @triggers are placed on both the component element and then\n // its host element (within the component code) then there will be\n // two namespaces returned. We use a set here to simply deduplicate\n // the namespaces in case (for the reason described above) there are multiple triggers\n const namespaces = new Set();\n const elementStates = this.statesByElement.get(element);\n if (elementStates) {\n for (let stateValue of elementStates.values()) {\n if (stateValue.namespaceId) {\n const ns = this._fetchNamespace(stateValue.namespaceId);\n if (ns) {\n namespaces.add(ns);\n }\n }\n }\n }\n return namespaces;\n }\n trigger(namespaceId, element, name, value) {\n if (isElementNode(element)) {\n const ns = this._fetchNamespace(namespaceId);\n if (ns) {\n ns.trigger(element, name, value);\n return true;\n }\n }\n return false;\n }\n insertNode(namespaceId, element, parent, insertBefore) {\n if (!isElementNode(element))\n return;\n // special case for when an element is removed and reinserted (move operation)\n // when this occurs we do not want to use the element for deletion later\n const details = element[REMOVAL_FLAG];\n if (details && details.setForRemoval) {\n details.setForRemoval = false;\n details.setForMove = true;\n const index = this.collectedLeaveElements.indexOf(element);\n if (index >= 0) {\n this.collectedLeaveElements.splice(index, 1);\n }\n }\n // in the event that the namespaceId is blank then the caller\n // code does not contain any animation code in it, but it is\n // just being called so that the node is marked as being inserted\n if (namespaceId) {\n const ns = this._fetchNamespace(namespaceId);\n // This if-statement is a workaround for router issue #21947.\n // The router sometimes hits a race condition where while a route\n // is being instantiated a new navigation arrives, triggering leave\n // animation of DOM that has not been fully initialized, until this\n // is resolved, we need to handle the scenario when DOM is not in a\n // consistent state during the animation.\n if (ns) {\n ns.insertNode(element, parent);\n }\n }\n // only *directives and host elements are inserted before\n if (insertBefore) {\n this.collectEnterElement(element);\n }\n }\n collectEnterElement(element) {\n this.collectedEnterElements.push(element);\n }\n markElementAsDisabled(element, value) {\n if (value) {\n if (!this.disabledNodes.has(element)) {\n this.disabledNodes.add(element);\n addClass(element, DISABLED_CLASSNAME);\n }\n }\n else if (this.disabledNodes.has(element)) {\n this.disabledNodes.delete(element);\n removeClass(element, DISABLED_CLASSNAME);\n }\n }\n removeNode(namespaceId, element, isHostElement, context) {\n if (isElementNode(element)) {\n const ns = namespaceId ? this._fetchNamespace(namespaceId) : null;\n if (ns) {\n ns.removeNode(element, context);\n }\n else {\n this.markElementAsRemoved(namespaceId, element, false, context);\n }\n if (isHostElement) {\n const hostNS = this.namespacesByHostElement.get(element);\n if (hostNS && hostNS.id !== namespaceId) {\n hostNS.removeNode(element, context);\n }\n }\n }\n else {\n this._onRemovalComplete(element, context);\n }\n }\n markElementAsRemoved(namespaceId, element, hasAnimation, context, previousTriggersValues) {\n this.collectedLeaveElements.push(element);\n element[REMOVAL_FLAG] = {\n namespaceId,\n setForRemoval: context,\n hasAnimation,\n removedBeforeQueried: false,\n previousTriggersValues\n };\n }\n listen(namespaceId, element, name, phase, callback) {\n if (isElementNode(element)) {\n return this._fetchNamespace(namespaceId).listen(element, name, phase, callback);\n }\n return () => { };\n }\n _buildInstruction(entry, subTimelines, enterClassName, leaveClassName, skipBuildAst) {\n return entry.transition.build(this.driver, entry.element, entry.fromState.value, entry.toState.value, enterClassName, leaveClassName, entry.fromState.options, entry.toState.options, subTimelines, skipBuildAst);\n }\n destroyInnerAnimations(containerElement) {\n let elements = this.driver.query(containerElement, NG_TRIGGER_SELECTOR, true);\n elements.forEach(element => this.destroyActiveAnimationsForElement(element));\n if (this.playersByQueriedElement.size == 0)\n return;\n elements = this.driver.query(containerElement, NG_ANIMATING_SELECTOR, true);\n elements.forEach(element => this.finishActiveQueriedAnimationOnElement(element));\n }\n destroyActiveAnimationsForElement(element) {\n const players = this.playersByElement.get(element);\n if (players) {\n players.forEach(player => {\n // special case for when an element is set for destruction, but hasn't started.\n // in this situation we want to delay the destruction until the flush occurs\n // so that any event listeners attached to the player are triggered.\n if (player.queued) {\n player.markedForDestroy = true;\n }\n else {\n player.destroy();\n }\n });\n }\n }\n finishActiveQueriedAnimationOnElement(element) {\n const players = this.playersByQueriedElement.get(element);\n if (players) {\n players.forEach(player => player.finish());\n }\n }\n whenRenderingDone() {\n return new Promise(resolve => {\n if (this.players.length) {\n return optimizeGroupPlayer(this.players).onDone(() => resolve());\n }\n else {\n resolve();\n }\n });\n }\n processLeaveNode(element) {\n const details = element[REMOVAL_FLAG];\n if (details && details.setForRemoval) {\n // this will prevent it from removing it twice\n element[REMOVAL_FLAG] = NULL_REMOVAL_STATE;\n if (details.namespaceId) {\n this.destroyInnerAnimations(element);\n const ns = this._fetchNamespace(details.namespaceId);\n if (ns) {\n ns.clearElementCache(element);\n }\n }\n this._onRemovalComplete(element, details.setForRemoval);\n }\n if (element.classList?.contains(DISABLED_CLASSNAME)) {\n this.markElementAsDisabled(element, false);\n }\n this.driver.query(element, DISABLED_SELECTOR, true).forEach(node => {\n this.markElementAsDisabled(node, false);\n });\n }\n flush(microtaskId = -1) {\n let players = [];\n if (this.newHostElements.size) {\n this.newHostElements.forEach((ns, element) => this._balanceNamespaceList(ns, element));\n this.newHostElements.clear();\n }\n if (this.totalAnimations && this.collectedEnterElements.length) {\n for (let i = 0; i < this.collectedEnterElements.length; i++) {\n const elm = this.collectedEnterElements[i];\n addClass(elm, STAR_CLASSNAME);\n }\n }\n if (this._namespaceList.length &&\n (this.totalQueuedPlayers || this.collectedLeaveElements.length)) {\n const cleanupFns = [];\n try {\n players = this._flushAnimations(cleanupFns, microtaskId);\n }\n finally {\n for (let i = 0; i < cleanupFns.length; i++) {\n cleanupFns[i]();\n }\n }\n }\n else {\n for (let i = 0; i < this.collectedLeaveElements.length; i++) {\n const element = this.collectedLeaveElements[i];\n this.processLeaveNode(element);\n }\n }\n this.totalQueuedPlayers = 0;\n this.collectedEnterElements.length = 0;\n this.collectedLeaveElements.length = 0;\n this._flushFns.forEach(fn => fn());\n this._flushFns = [];\n if (this._whenQuietFns.length) {\n // we move these over to a variable so that\n // if any new callbacks are registered in another\n // flush they do not populate the existing set\n const quietFns = this._whenQuietFns;\n this._whenQuietFns = [];\n if (players.length) {\n optimizeGroupPlayer(players).onDone(() => {\n quietFns.forEach(fn => fn());\n });\n }\n else {\n quietFns.forEach(fn => fn());\n }\n }\n }\n reportError(errors) {\n throw triggerTransitionsFailed(errors);\n }\n _flushAnimations(cleanupFns, microtaskId) {\n const subTimelines = new ElementInstructionMap();\n const skippedPlayers = [];\n const skippedPlayersMap = new Map();\n const queuedInstructions = [];\n const queriedElements = new Map();\n const allPreStyleElements = new Map();\n const allPostStyleElements = new Map();\n const disabledElementsSet = new Set();\n this.disabledNodes.forEach(node => {\n disabledElementsSet.add(node);\n const nodesThatAreDisabled = this.driver.query(node, QUEUED_SELECTOR, true);\n for (let i = 0; i < nodesThatAreDisabled.length; i++) {\n disabledElementsSet.add(nodesThatAreDisabled[i]);\n }\n });\n const bodyNode = this.bodyNode;\n const allTriggerElements = Array.from(this.statesByElement.keys());\n const enterNodeMap = buildRootMap(allTriggerElements, this.collectedEnterElements);\n // this must occur before the instructions are built below such that\n // the :enter queries match the elements (since the timeline queries\n // are fired during instruction building).\n const enterNodeMapIds = new Map();\n let i = 0;\n enterNodeMap.forEach((nodes, root) => {\n const className = ENTER_CLASSNAME + i++;\n enterNodeMapIds.set(root, className);\n nodes.forEach(node => addClass(node, className));\n });\n const allLeaveNodes = [];\n const mergedLeaveNodes = new Set();\n const leaveNodesWithoutAnimations = new Set();\n for (let i = 0; i < this.collectedLeaveElements.length; i++) {\n const element = this.collectedLeaveElements[i];\n const details = element[REMOVAL_FLAG];\n if (details && details.setForRemoval) {\n allLeaveNodes.push(element);\n mergedLeaveNodes.add(element);\n if (details.hasAnimation) {\n this.driver.query(element, STAR_SELECTOR, true).forEach(elm => mergedLeaveNodes.add(elm));\n }\n else {\n leaveNodesWithoutAnimations.add(element);\n }\n }\n }\n const leaveNodeMapIds = new Map();\n const leaveNodeMap = buildRootMap(allTriggerElements, Array.from(mergedLeaveNodes));\n leaveNodeMap.forEach((nodes, root) => {\n const className = LEAVE_CLASSNAME + i++;\n leaveNodeMapIds.set(root, className);\n nodes.forEach(node => addClass(node, className));\n });\n cleanupFns.push(() => {\n enterNodeMap.forEach((nodes, root) => {\n const className = enterNodeMapIds.get(root);\n nodes.forEach(node => removeClass(node, className));\n });\n leaveNodeMap.forEach((nodes, root) => {\n const className = leaveNodeMapIds.get(root);\n nodes.forEach(node => removeClass(node, className));\n });\n allLeaveNodes.forEach(element => {\n this.processLeaveNode(element);\n });\n });\n const allPlayers = [];\n const erroneousTransitions = [];\n for (let i = this._namespaceList.length - 1; i >= 0; i--) {\n const ns = this._namespaceList[i];\n ns.drainQueuedTransitions(microtaskId).forEach(entry => {\n const player = entry.player;\n const element = entry.element;\n allPlayers.push(player);\n if (this.collectedEnterElements.length) {\n const details = element[REMOVAL_FLAG];\n // animations for move operations (elements being removed and reinserted,\n // e.g. when the order of an *ngFor list changes) are currently not supported\n if (details && details.setForMove) {\n if (details.previousTriggersValues &&\n details.previousTriggersValues.has(entry.triggerName)) {\n const previousValue = details.previousTriggersValues.get(entry.triggerName);\n // we need to restore the previous trigger value since the element has\n // only been moved and hasn't actually left the DOM\n const triggersWithStates = this.statesByElement.get(entry.element);\n if (triggersWithStates && triggersWithStates.has(entry.triggerName)) {\n const state = triggersWithStates.get(entry.triggerName);\n state.value = previousValue;\n triggersWithStates.set(entry.triggerName, state);\n }\n }\n player.destroy();\n return;\n }\n }\n const nodeIsOrphaned = !bodyNode || !this.driver.containsElement(bodyNode, element);\n const leaveClassName = leaveNodeMapIds.get(element);\n const enterClassName = enterNodeMapIds.get(element);\n const instruction = this._buildInstruction(entry, subTimelines, enterClassName, leaveClassName, nodeIsOrphaned);\n if (instruction.errors && instruction.errors.length) {\n erroneousTransitions.push(instruction);\n return;\n }\n // even though the element may not be in the DOM, it may still\n // be added at a later point (due to the mechanics of content\n // projection and/or dynamic component insertion) therefore it's\n // important to still style the element.\n if (nodeIsOrphaned) {\n player.onStart(() => eraseStyles(element, instruction.fromStyles));\n player.onDestroy(() => setStyles(element, instruction.toStyles));\n skippedPlayers.push(player);\n return;\n }\n // if an unmatched transition is queued and ready to go\n // then it SHOULD NOT render an animation and cancel the\n // previously running animations.\n if (entry.isFallbackTransition) {\n player.onStart(() => eraseStyles(element, instruction.fromStyles));\n player.onDestroy(() => setStyles(element, instruction.toStyles));\n skippedPlayers.push(player);\n return;\n }\n // this means that if a parent animation uses this animation as a sub-trigger\n // then it will instruct the timeline builder not to add a player delay, but\n // instead stretch the first keyframe gap until the animation starts. This is\n // important in order to prevent extra initialization styles from being\n // required by the user for the animation.\n const timelines = [];\n instruction.timelines.forEach(tl => {\n tl.stretchStartingKeyframe = true;\n if (!this.disabledNodes.has(tl.element)) {\n timelines.push(tl);\n }\n });\n instruction.timelines = timelines;\n subTimelines.append(element, instruction.timelines);\n const tuple = { instruction, player, element };\n queuedInstructions.push(tuple);\n instruction.queriedElements.forEach(element => getOrSetDefaultValue(queriedElements, element, []).push(player));\n instruction.preStyleProps.forEach((stringMap, element) => {\n if (stringMap.size) {\n let setVal = allPreStyleElements.get(element);\n if (!setVal) {\n allPreStyleElements.set(element, setVal = new Set());\n }\n stringMap.forEach((_, prop) => setVal.add(prop));\n }\n });\n instruction.postStyleProps.forEach((stringMap, element) => {\n let setVal = allPostStyleElements.get(element);\n if (!setVal) {\n allPostStyleElements.set(element, setVal = new Set());\n }\n stringMap.forEach((_, prop) => setVal.add(prop));\n });\n });\n }\n if (erroneousTransitions.length) {\n const errors = [];\n erroneousTransitions.forEach(instruction => {\n errors.push(transitionFailed(instruction.triggerName, instruction.errors));\n });\n allPlayers.forEach(player => player.destroy());\n this.reportError(errors);\n }\n const allPreviousPlayersMap = new Map();\n // this map tells us which element in the DOM tree is contained by\n // which animation. Further down this map will get populated once\n // the players are built and in doing so we can use it to efficiently\n // figure out if a sub player is skipped due to a parent player having priority.\n const animationElementMap = new Map();\n queuedInstructions.forEach(entry => {\n const element = entry.element;\n if (subTimelines.has(element)) {\n animationElementMap.set(element, element);\n this._beforeAnimationBuild(entry.player.namespaceId, entry.instruction, allPreviousPlayersMap);\n }\n });\n skippedPlayers.forEach(player => {\n const element = player.element;\n const previousPlayers = this._getPreviousPlayers(element, false, player.namespaceId, player.triggerName, null);\n previousPlayers.forEach(prevPlayer => {\n getOrSetDefaultValue(allPreviousPlayersMap, element, []).push(prevPlayer);\n prevPlayer.destroy();\n });\n });\n // this is a special case for nodes that will be removed either by\n // having their own leave animations or by being queried in a container\n // that will be removed once a parent animation is complete. The idea\n // here is that * styles must be identical to ! styles because of\n // backwards compatibility (* is also filled in by default in many places).\n // Otherwise * styles will return an empty value or \"auto\" since the element\n // passed to getComputedStyle will not be visible (since * === destination)\n const replaceNodes = allLeaveNodes.filter(node => {\n return replacePostStylesAsPre(node, allPreStyleElements, allPostStyleElements);\n });\n // POST STAGE: fill the * styles\n const postStylesMap = new Map();\n const allLeaveQueriedNodes = cloakAndComputeStyles(postStylesMap, this.driver, leaveNodesWithoutAnimations, allPostStyleElements, AUTO_STYLE);\n allLeaveQueriedNodes.forEach(node => {\n if (replacePostStylesAsPre(node, allPreStyleElements, allPostStyleElements)) {\n replaceNodes.push(node);\n }\n });\n // PRE STAGE: fill the ! styles\n const preStylesMap = new Map();\n enterNodeMap.forEach((nodes, root) => {\n cloakAndComputeStyles(preStylesMap, this.driver, new Set(nodes), allPreStyleElements, ɵPRE_STYLE);\n });\n replaceNodes.forEach(node => {\n const post = postStylesMap.get(node);\n const pre = preStylesMap.get(node);\n postStylesMap.set(node, new Map([...Array.from(post?.entries() ?? []), ...Array.from(pre?.entries() ?? [])]));\n });\n const rootPlayers = [];\n const subPlayers = [];\n const NO_PARENT_ANIMATION_ELEMENT_DETECTED = {};\n queuedInstructions.forEach(entry => {\n const { element, player, instruction } = entry;\n // this means that it was never consumed by a parent animation which\n // means that it is independent and therefore should be set for animation\n if (subTimelines.has(element)) {\n if (disabledElementsSet.has(element)) {\n player.onDestroy(() => setStyles(element, instruction.toStyles));\n player.disabled = true;\n player.overrideTotalTime(instruction.totalTime);\n skippedPlayers.push(player);\n return;\n }\n // this will flow up the DOM and query the map to figure out\n // if a parent animation has priority over it. In the situation\n // that a parent is detected then it will cancel the loop. If\n // nothing is detected, or it takes a few hops to find a parent,\n // then it will fill in the missing nodes and signal them as having\n // a detected parent (or a NO_PARENT value via a special constant).\n let parentWithAnimation = NO_PARENT_ANIMATION_ELEMENT_DETECTED;\n if (animationElementMap.size > 1) {\n let elm = element;\n const parentsToAdd = [];\n while (elm = elm.parentNode) {\n const detectedParent = animationElementMap.get(elm);\n if (detectedParent) {\n parentWithAnimation = detectedParent;\n break;\n }\n parentsToAdd.push(elm);\n }\n parentsToAdd.forEach(parent => animationElementMap.set(parent, parentWithAnimation));\n }\n const innerPlayer = this._buildAnimation(player.namespaceId, instruction, allPreviousPlayersMap, skippedPlayersMap, preStylesMap, postStylesMap);\n player.setRealPlayer(innerPlayer);\n if (parentWithAnimation === NO_PARENT_ANIMATION_ELEMENT_DETECTED) {\n rootPlayers.push(player);\n }\n else {\n const parentPlayers = this.playersByElement.get(parentWithAnimation);\n if (parentPlayers && parentPlayers.length) {\n player.parentPlayer = optimizeGroupPlayer(parentPlayers);\n }\n skippedPlayers.push(player);\n }\n }\n else {\n eraseStyles(element, instruction.fromStyles);\n player.onDestroy(() => setStyles(element, instruction.toStyles));\n // there still might be a ancestor player animating this\n // element therefore we will still add it as a sub player\n // even if its animation may be disabled\n subPlayers.push(player);\n if (disabledElementsSet.has(element)) {\n skippedPlayers.push(player);\n }\n }\n });\n // find all of the sub players' corresponding inner animation players\n subPlayers.forEach(player => {\n // even if no players are found for a sub animation it\n // will still complete itself after the next tick since it's Noop\n const playersForElement = skippedPlayersMap.get(player.element);\n if (playersForElement && playersForElement.length) {\n const innerPlayer = optimizeGroupPlayer(playersForElement);\n player.setRealPlayer(innerPlayer);\n }\n });\n // the reason why we don't actually play the animation is\n // because all that a skipped player is designed to do is to\n // fire the start/done transition callback events\n skippedPlayers.forEach(player => {\n if (player.parentPlayer) {\n player.syncPlayerEvents(player.parentPlayer);\n }\n else {\n player.destroy();\n }\n });\n // run through all of the queued removals and see if they\n // were picked up by a query. If not then perform the removal\n // operation right away unless a parent animation is ongoing.\n for (let i = 0; i < allLeaveNodes.length; i++) {\n const element = allLeaveNodes[i];\n const details = element[REMOVAL_FLAG];\n removeClass(element, LEAVE_CLASSNAME);\n // this means the element has a removal animation that is being\n // taken care of and therefore the inner elements will hang around\n // until that animation is over (or the parent queried animation)\n if (details && details.hasAnimation)\n continue;\n let players = [];\n // if this element is queried or if it contains queried children\n // then we want for the element not to be removed from the page\n // until the queried animations have finished\n if (queriedElements.size) {\n let queriedPlayerResults = queriedElements.get(element);\n if (queriedPlayerResults && queriedPlayerResults.length) {\n players.push(...queriedPlayerResults);\n }\n let queriedInnerElements = this.driver.query(element, NG_ANIMATING_SELECTOR, true);\n for (let j = 0; j < queriedInnerElements.length; j++) {\n let queriedPlayers = queriedElements.get(queriedInnerElements[j]);\n if (queriedPlayers && queriedPlayers.length) {\n players.push(...queriedPlayers);\n }\n }\n }\n const activePlayers = players.filter(p => !p.destroyed);\n if (activePlayers.length) {\n removeNodesAfterAnimationDone(this, element, activePlayers);\n }\n else {\n this.processLeaveNode(element);\n }\n }\n // this is required so the cleanup method doesn't remove them\n allLeaveNodes.length = 0;\n rootPlayers.forEach(player => {\n this.players.push(player);\n player.onDone(() => {\n player.destroy();\n const index = this.players.indexOf(player);\n this.players.splice(index, 1);\n });\n player.play();\n });\n return rootPlayers;\n }\n elementContainsData(namespaceId, element) {\n let containsData = false;\n const details = element[REMOVAL_FLAG];\n if (details && details.setForRemoval)\n containsData = true;\n if (this.playersByElement.has(element))\n containsData = true;\n if (this.playersByQueriedElement.has(element))\n containsData = true;\n if (this.statesByElement.has(element))\n containsData = true;\n return this._fetchNamespace(namespaceId).elementContainsData(element) || containsData;\n }\n afterFlush(callback) {\n this._flushFns.push(callback);\n }\n afterFlushAnimationsDone(callback) {\n this._whenQuietFns.push(callback);\n }\n _getPreviousPlayers(element, isQueriedElement, namespaceId, triggerName, toStateValue) {\n let players = [];\n if (isQueriedElement) {\n const queriedElementPlayers = this.playersByQueriedElement.get(element);\n if (queriedElementPlayers) {\n players = queriedElementPlayers;\n }\n }\n else {\n const elementPlayers = this.playersByElement.get(element);\n if (elementPlayers) {\n const isRemovalAnimation = !toStateValue || toStateValue == VOID_VALUE;\n elementPlayers.forEach(player => {\n if (player.queued)\n return;\n if (!isRemovalAnimation && player.triggerName != triggerName)\n return;\n players.push(player);\n });\n }\n }\n if (namespaceId || triggerName) {\n players = players.filter(player => {\n if (namespaceId && namespaceId != player.namespaceId)\n return false;\n if (triggerName && triggerName != player.triggerName)\n return false;\n return true;\n });\n }\n return players;\n }\n _beforeAnimationBuild(namespaceId, instruction, allPreviousPlayersMap) {\n const triggerName = instruction.triggerName;\n const rootElement = instruction.element;\n // when a removal animation occurs, ALL previous players are collected\n // and destroyed (even if they are outside of the current namespace)\n const targetNameSpaceId = instruction.isRemovalTransition ? undefined : namespaceId;\n const targetTriggerName = instruction.isRemovalTransition ? undefined : triggerName;\n for (const timelineInstruction of instruction.timelines) {\n const element = timelineInstruction.element;\n const isQueriedElement = element !== rootElement;\n const players = getOrSetDefaultValue(allPreviousPlayersMap, element, []);\n const previousPlayers = this._getPreviousPlayers(element, isQueriedElement, targetNameSpaceId, targetTriggerName, instruction.toState);\n previousPlayers.forEach(player => {\n const realPlayer = player.getRealPlayer();\n if (realPlayer.beforeDestroy) {\n realPlayer.beforeDestroy();\n }\n player.destroy();\n players.push(player);\n });\n }\n // this needs to be done so that the PRE/POST styles can be\n // computed properly without interfering with the previous animation\n eraseStyles(rootElement, instruction.fromStyles);\n }\n _buildAnimation(namespaceId, instruction, allPreviousPlayersMap, skippedPlayersMap, preStylesMap, postStylesMap) {\n const triggerName = instruction.triggerName;\n const rootElement = instruction.element;\n // we first run this so that the previous animation player\n // data can be passed into the successive animation players\n const allQueriedPlayers = [];\n const allConsumedElements = new Set();\n const allSubElements = new Set();\n const allNewPlayers = instruction.timelines.map(timelineInstruction => {\n const element = timelineInstruction.element;\n allConsumedElements.add(element);\n // FIXME (matsko): make sure to-be-removed animations are removed properly\n const details = element[REMOVAL_FLAG];\n if (details && details.removedBeforeQueried)\n return new NoopAnimationPlayer(timelineInstruction.duration, timelineInstruction.delay);\n const isQueriedElement = element !== rootElement;\n const previousPlayers = flattenGroupPlayers((allPreviousPlayersMap.get(element) || EMPTY_PLAYER_ARRAY)\n .map(p => p.getRealPlayer()))\n .filter(p => {\n // the `element` is not apart of the AnimationPlayer definition, but\n // Mock/WebAnimations\n // use the element within their implementation. This will be added in Angular5 to\n // AnimationPlayer\n const pp = p;\n return pp.element ? pp.element === element : false;\n });\n const preStyles = preStylesMap.get(element);\n const postStyles = postStylesMap.get(element);\n const keyframes = normalizeKeyframes$1(this.driver, this._normalizer, element, timelineInstruction.keyframes, preStyles, postStyles);\n const player = this._buildPlayer(timelineInstruction, keyframes, previousPlayers);\n // this means that this particular player belongs to a sub trigger. It is\n // important that we match this player up with the corresponding (@trigger.listener)\n if (timelineInstruction.subTimeline && skippedPlayersMap) {\n allSubElements.add(element);\n }\n if (isQueriedElement) {\n const wrappedPlayer = new TransitionAnimationPlayer(namespaceId, triggerName, element);\n wrappedPlayer.setRealPlayer(player);\n allQueriedPlayers.push(wrappedPlayer);\n }\n return player;\n });\n allQueriedPlayers.forEach(player => {\n getOrSetDefaultValue(this.playersByQueriedElement, player.element, []).push(player);\n player.onDone(() => deleteOrUnsetInMap(this.playersByQueriedElement, player.element, player));\n });\n allConsumedElements.forEach(element => addClass(element, NG_ANIMATING_CLASSNAME));\n const player = optimizeGroupPlayer(allNewPlayers);\n player.onDestroy(() => {\n allConsumedElements.forEach(element => removeClass(element, NG_ANIMATING_CLASSNAME));\n setStyles(rootElement, instruction.toStyles);\n });\n // this basically makes all of the callbacks for sub element animations\n // be dependent on the upper players for when they finish\n allSubElements.forEach(element => {\n getOrSetDefaultValue(skippedPlayersMap, element, []).push(player);\n });\n return player;\n }\n _buildPlayer(instruction, keyframes, previousPlayers) {\n if (keyframes.length > 0) {\n return this.driver.animate(instruction.element, keyframes, instruction.duration, instruction.delay, instruction.easing, previousPlayers);\n }\n // special case for when an empty transition|definition is provided\n // ... there is no point in rendering an empty animation\n return new NoopAnimationPlayer(instruction.duration, instruction.delay);\n }\n}\nclass TransitionAnimationPlayer {\n constructor(namespaceId, triggerName, element) {\n this.namespaceId = namespaceId;\n this.triggerName = triggerName;\n this.element = element;\n this._player = new NoopAnimationPlayer();\n this._containsRealPlayer = false;\n this._queuedCallbacks = new Map();\n this.destroyed = false;\n this.markedForDestroy = false;\n this.disabled = false;\n this.queued = true;\n this.totalTime = 0;\n }\n setRealPlayer(player) {\n if (this._containsRealPlayer)\n return;\n this._player = player;\n this._queuedCallbacks.forEach((callbacks, phase) => {\n callbacks.forEach(callback => listenOnPlayer(player, phase, undefined, callback));\n });\n this._queuedCallbacks.clear();\n this._containsRealPlayer = true;\n this.overrideTotalTime(player.totalTime);\n this.queued = false;\n }\n getRealPlayer() {\n return this._player;\n }\n overrideTotalTime(totalTime) {\n this.totalTime = totalTime;\n }\n syncPlayerEvents(player) {\n const p = this._player;\n if (p.triggerCallback) {\n player.onStart(() => p.triggerCallback('start'));\n }\n player.onDone(() => this.finish());\n player.onDestroy(() => this.destroy());\n }\n _queueEvent(name, callback) {\n getOrSetDefaultValue(this._queuedCallbacks, name, []).push(callback);\n }\n onDone(fn) {\n if (this.queued) {\n this._queueEvent('done', fn);\n }\n this._player.onDone(fn);\n }\n onStart(fn) {\n if (this.queued) {\n this._queueEvent('start', fn);\n }\n this._player.onStart(fn);\n }\n onDestroy(fn) {\n if (this.queued) {\n this._queueEvent('destroy', fn);\n }\n this._player.onDestroy(fn);\n }\n init() {\n this._player.init();\n }\n hasStarted() {\n return this.queued ? false : this._player.hasStarted();\n }\n play() {\n !this.queued && this._player.play();\n }\n pause() {\n !this.queued && this._player.pause();\n }\n restart() {\n !this.queued && this._player.restart();\n }\n finish() {\n this._player.finish();\n }\n destroy() {\n this.destroyed = true;\n this._player.destroy();\n }\n reset() {\n !this.queued && this._player.reset();\n }\n setPosition(p) {\n if (!this.queued) {\n this._player.setPosition(p);\n }\n }\n getPosition() {\n return this.queued ? 0 : this._player.getPosition();\n }\n /** @internal */\n triggerCallback(phaseName) {\n const p = this._player;\n if (p.triggerCallback) {\n p.triggerCallback(phaseName);\n }\n }\n}\nfunction deleteOrUnsetInMap(map, key, value) {\n let currentValues = map.get(key);\n if (currentValues) {\n if (currentValues.length) {\n const index = currentValues.indexOf(value);\n currentValues.splice(index, 1);\n }\n if (currentValues.length == 0) {\n map.delete(key);\n }\n }\n return currentValues;\n}\nfunction normalizeTriggerValue(value) {\n // we use `!= null` here because it's the most simple\n // way to test against a \"falsy\" value without mixing\n // in empty strings or a zero value. DO NOT OPTIMIZE.\n return value != null ? value : null;\n}\nfunction isElementNode(node) {\n return node && node['nodeType'] === 1;\n}\nfunction isTriggerEventValid(eventName) {\n return eventName == 'start' || eventName == 'done';\n}\nfunction cloakElement(element, value) {\n const oldValue = element.style.display;\n element.style.display = value != null ? value : 'none';\n return oldValue;\n}\nfunction cloakAndComputeStyles(valuesMap, driver, elements, elementPropsMap, defaultStyle) {\n const cloakVals = [];\n elements.forEach(element => cloakVals.push(cloakElement(element)));\n const failedElements = [];\n elementPropsMap.forEach((props, element) => {\n const styles = new Map();\n props.forEach(prop => {\n const value = driver.computeStyle(element, prop, defaultStyle);\n styles.set(prop, value);\n // there is no easy way to detect this because a sub element could be removed\n // by a parent animation element being detached.\n if (!value || value.length == 0) {\n element[REMOVAL_FLAG] = NULL_REMOVED_QUERIED_STATE;\n failedElements.push(element);\n }\n });\n valuesMap.set(element, styles);\n });\n // we use a index variable here since Set.forEach(a, i) does not return\n // an index value for the closure (but instead just the value)\n let i = 0;\n elements.forEach(element => cloakElement(element, cloakVals[i++]));\n return failedElements;\n}\n/*\nSince the Angular renderer code will return a collection of inserted\nnodes in all areas of a DOM tree, it's up to this algorithm to figure\nout which nodes are roots for each animation @trigger.\n\nBy placing each inserted node into a Set and traversing upwards, it\nis possible to find the @trigger elements and well any direct *star\ninsertion nodes, if a @trigger root is found then the enter element\nis placed into the Map[@trigger] spot.\n */\nfunction buildRootMap(roots, nodes) {\n const rootMap = new Map();\n roots.forEach(root => rootMap.set(root, []));\n if (nodes.length == 0)\n return rootMap;\n const NULL_NODE = 1;\n const nodeSet = new Set(nodes);\n const localRootMap = new Map();\n function getRoot(node) {\n if (!node)\n return NULL_NODE;\n let root = localRootMap.get(node);\n if (root)\n return root;\n const parent = node.parentNode;\n if (rootMap.has(parent)) { // ngIf inside @trigger\n root = parent;\n }\n else if (nodeSet.has(parent)) { // ngIf inside ngIf\n root = NULL_NODE;\n }\n else { // recurse upwards\n root = getRoot(parent);\n }\n localRootMap.set(node, root);\n return root;\n }\n nodes.forEach(node => {\n const root = getRoot(node);\n if (root !== NULL_NODE) {\n rootMap.get(root).push(node);\n }\n });\n return rootMap;\n}\nfunction addClass(element, className) {\n element.classList?.add(className);\n}\nfunction removeClass(element, className) {\n element.classList?.remove(className);\n}\nfunction removeNodesAfterAnimationDone(engine, element, players) {\n optimizeGroupPlayer(players).onDone(() => engine.processLeaveNode(element));\n}\nfunction flattenGroupPlayers(players) {\n const finalPlayers = [];\n _flattenGroupPlayersRecur(players, finalPlayers);\n return finalPlayers;\n}\nfunction _flattenGroupPlayersRecur(players, finalPlayers) {\n for (let i = 0; i < players.length; i++) {\n const player = players[i];\n if (player instanceof ɵAnimationGroupPlayer) {\n _flattenGroupPlayersRecur(player.players, finalPlayers);\n }\n else {\n finalPlayers.push(player);\n }\n }\n}\nfunction objEquals(a, b) {\n const k1 = Object.keys(a);\n const k2 = Object.keys(b);\n if (k1.length != k2.length)\n return false;\n for (let i = 0; i < k1.length; i++) {\n const prop = k1[i];\n if (!b.hasOwnProperty(prop) || a[prop] !== b[prop])\n return false;\n }\n return true;\n}\nfunction replacePostStylesAsPre(element, allPreStyleElements, allPostStyleElements) {\n const postEntry = allPostStyleElements.get(element);\n if (!postEntry)\n return false;\n let preEntry = allPreStyleElements.get(element);\n if (preEntry) {\n postEntry.forEach(data => preEntry.add(data));\n }\n else {\n allPreStyleElements.set(element, postEntry);\n }\n allPostStyleElements.delete(element);\n return true;\n}\n\nclass AnimationEngine {\n constructor(bodyNode, _driver, _normalizer) {\n this.bodyNode = bodyNode;\n this._driver = _driver;\n this._normalizer = _normalizer;\n this._triggerCache = {};\n // this method is designed to be overridden by the code that uses this engine\n this.onRemovalComplete = (element, context) => { };\n this._transitionEngine = new TransitionAnimationEngine(bodyNode, _driver, _normalizer);\n this._timelineEngine = new TimelineAnimationEngine(bodyNode, _driver, _normalizer);\n this._transitionEngine.onRemovalComplete = (element, context) => this.onRemovalComplete(element, context);\n }\n registerTrigger(componentId, namespaceId, hostElement, name, metadata) {\n const cacheKey = componentId + '-' + name;\n let trigger = this._triggerCache[cacheKey];\n if (!trigger) {\n const errors = [];\n const warnings = [];\n const ast = buildAnimationAst(this._driver, metadata, errors, warnings);\n if (errors.length) {\n throw triggerBuildFailed(name, errors);\n }\n if (warnings.length) {\n warnTriggerBuild(name, warnings);\n }\n trigger = buildTrigger(name, ast, this._normalizer);\n this._triggerCache[cacheKey] = trigger;\n }\n this._transitionEngine.registerTrigger(namespaceId, name, trigger);\n }\n register(namespaceId, hostElement) {\n this._transitionEngine.register(namespaceId, hostElement);\n }\n destroy(namespaceId, context) {\n this._transitionEngine.destroy(namespaceId, context);\n }\n onInsert(namespaceId, element, parent, insertBefore) {\n this._transitionEngine.insertNode(namespaceId, element, parent, insertBefore);\n }\n onRemove(namespaceId, element, context, isHostElement) {\n this._transitionEngine.removeNode(namespaceId, element, isHostElement || false, context);\n }\n disableAnimations(element, disable) {\n this._transitionEngine.markElementAsDisabled(element, disable);\n }\n process(namespaceId, element, property, value) {\n if (property.charAt(0) == '@') {\n const [id, action] = parseTimelineCommand(property);\n const args = value;\n this._timelineEngine.command(id, element, action, args);\n }\n else {\n this._transitionEngine.trigger(namespaceId, element, property, value);\n }\n }\n listen(namespaceId, element, eventName, eventPhase, callback) {\n // @@listen\n if (eventName.charAt(0) == '@') {\n const [id, action] = parseTimelineCommand(eventName);\n return this._timelineEngine.listen(id, element, action, callback);\n }\n return this._transitionEngine.listen(namespaceId, element, eventName, eventPhase, callback);\n }\n flush(microtaskId = -1) {\n this._transitionEngine.flush(microtaskId);\n }\n get players() {\n return this._transitionEngine.players\n .concat(this._timelineEngine.players);\n }\n whenRenderingDone() {\n return this._transitionEngine.whenRenderingDone();\n }\n}\n\n/**\n * Returns an instance of `SpecialCasedStyles` if and when any special (non animateable) styles are\n * detected.\n *\n * In CSS there exist properties that cannot be animated within a keyframe animation\n * (whether it be via CSS keyframes or web-animations) and the animation implementation\n * will ignore them. This function is designed to detect those special cased styles and\n * return a container that will be executed at the start and end of the animation.\n *\n * @returns an instance of `SpecialCasedStyles` if any special styles are detected otherwise `null`\n */\nfunction packageNonAnimatableStyles(element, styles) {\n let startStyles = null;\n let endStyles = null;\n if (Array.isArray(styles) && styles.length) {\n startStyles = filterNonAnimatableStyles(styles[0]);\n if (styles.length > 1) {\n endStyles = filterNonAnimatableStyles(styles[styles.length - 1]);\n }\n }\n else if (styles instanceof Map) {\n startStyles = filterNonAnimatableStyles(styles);\n }\n return (startStyles || endStyles) ? new SpecialCasedStyles(element, startStyles, endStyles) :\n null;\n}\n/**\n * Designed to be executed during a keyframe-based animation to apply any special-cased styles.\n *\n * When started (when the `start()` method is run) then the provided `startStyles`\n * will be applied. When finished (when the `finish()` method is called) the\n * `endStyles` will be applied as well any any starting styles. Finally when\n * `destroy()` is called then all styles will be removed.\n */\nclass SpecialCasedStyles {\n constructor(_element, _startStyles, _endStyles) {\n this._element = _element;\n this._startStyles = _startStyles;\n this._endStyles = _endStyles;\n this._state = 0 /* SpecialCasedStylesState.Pending */;\n let initialStyles = SpecialCasedStyles.initialStylesByElement.get(_element);\n if (!initialStyles) {\n SpecialCasedStyles.initialStylesByElement.set(_element, initialStyles = new Map());\n }\n this._initialStyles = initialStyles;\n }\n start() {\n if (this._state < 1 /* SpecialCasedStylesState.Started */) {\n if (this._startStyles) {\n setStyles(this._element, this._startStyles, this._initialStyles);\n }\n this._state = 1 /* SpecialCasedStylesState.Started */;\n }\n }\n finish() {\n this.start();\n if (this._state < 2 /* SpecialCasedStylesState.Finished */) {\n setStyles(this._element, this._initialStyles);\n if (this._endStyles) {\n setStyles(this._element, this._endStyles);\n this._endStyles = null;\n }\n this._state = 1 /* SpecialCasedStylesState.Started */;\n }\n }\n destroy() {\n this.finish();\n if (this._state < 3 /* SpecialCasedStylesState.Destroyed */) {\n SpecialCasedStyles.initialStylesByElement.delete(this._element);\n if (this._startStyles) {\n eraseStyles(this._element, this._startStyles);\n this._endStyles = null;\n }\n if (this._endStyles) {\n eraseStyles(this._element, this._endStyles);\n this._endStyles = null;\n }\n setStyles(this._element, this._initialStyles);\n this._state = 3 /* SpecialCasedStylesState.Destroyed */;\n }\n }\n}\nSpecialCasedStyles.initialStylesByElement = ( /* @__PURE__ */new WeakMap());\nfunction filterNonAnimatableStyles(styles) {\n let result = null;\n styles.forEach((val, prop) => {\n if (isNonAnimatableStyle(prop)) {\n result = result || new Map();\n result.set(prop, val);\n }\n });\n return result;\n}\nfunction isNonAnimatableStyle(prop) {\n return prop === 'display' || prop === 'position';\n}\n\nclass WebAnimationsPlayer {\n constructor(element, keyframes, options, _specialStyles) {\n this.element = element;\n this.keyframes = keyframes;\n this.options = options;\n this._specialStyles = _specialStyles;\n this._onDoneFns = [];\n this._onStartFns = [];\n this._onDestroyFns = [];\n this._initialized = false;\n this._finished = false;\n this._started = false;\n this._destroyed = false;\n // the following original fns are persistent copies of the _onStartFns and _onDoneFns\n // and are used to reset the fns to their original values upon reset()\n // (since the _onStartFns and _onDoneFns get deleted after they are called)\n this._originalOnDoneFns = [];\n this._originalOnStartFns = [];\n this.time = 0;\n this.parentPlayer = null;\n this.currentSnapshot = new Map();\n this._duration = options['duration'];\n this._delay = options['delay'] || 0;\n this.time = this._duration + this._delay;\n }\n _onFinish() {\n if (!this._finished) {\n this._finished = true;\n this._onDoneFns.forEach(fn => fn());\n this._onDoneFns = [];\n }\n }\n init() {\n this._buildPlayer();\n this._preparePlayerBeforeStart();\n }\n _buildPlayer() {\n if (this._initialized)\n return;\n this._initialized = true;\n const keyframes = this.keyframes;\n this.domPlayer =\n this._triggerWebAnimation(this.element, keyframes, this.options);\n this._finalKeyframe = keyframes.length ? keyframes[keyframes.length - 1] : new Map();\n this.domPlayer.addEventListener('finish', () => this._onFinish());\n }\n _preparePlayerBeforeStart() {\n // this is required so that the player doesn't start to animate right away\n if (this._delay) {\n this._resetDomPlayerState();\n }\n else {\n this.domPlayer.pause();\n }\n }\n _convertKeyframesToObject(keyframes) {\n const kfs = [];\n keyframes.forEach(frame => {\n kfs.push(Object.fromEntries(frame));\n });\n return kfs;\n }\n /** @internal */\n _triggerWebAnimation(element, keyframes, options) {\n // jscompiler doesn't seem to know animate is a native property because it's not fully\n // supported yet across common browsers (we polyfill it for Edge/Safari) [CL #143630929]\n return element['animate'](this._convertKeyframesToObject(keyframes), options);\n }\n onStart(fn) {\n this._originalOnStartFns.push(fn);\n this._onStartFns.push(fn);\n }\n onDone(fn) {\n this._originalOnDoneFns.push(fn);\n this._onDoneFns.push(fn);\n }\n onDestroy(fn) {\n this._onDestroyFns.push(fn);\n }\n play() {\n this._buildPlayer();\n if (!this.hasStarted()) {\n this._onStartFns.forEach(fn => fn());\n this._onStartFns = [];\n this._started = true;\n if (this._specialStyles) {\n this._specialStyles.start();\n }\n }\n this.domPlayer.play();\n }\n pause() {\n this.init();\n this.domPlayer.pause();\n }\n finish() {\n this.init();\n if (this._specialStyles) {\n this._specialStyles.finish();\n }\n this._onFinish();\n this.domPlayer.finish();\n }\n reset() {\n this._resetDomPlayerState();\n this._destroyed = false;\n this._finished = false;\n this._started = false;\n this._onStartFns = this._originalOnStartFns;\n this._onDoneFns = this._originalOnDoneFns;\n }\n _resetDomPlayerState() {\n if (this.domPlayer) {\n this.domPlayer.cancel();\n }\n }\n restart() {\n this.reset();\n this.play();\n }\n hasStarted() {\n return this._started;\n }\n destroy() {\n if (!this._destroyed) {\n this._destroyed = true;\n this._resetDomPlayerState();\n this._onFinish();\n if (this._specialStyles) {\n this._specialStyles.destroy();\n }\n this._onDestroyFns.forEach(fn => fn());\n this._onDestroyFns = [];\n }\n }\n setPosition(p) {\n if (this.domPlayer === undefined) {\n this.init();\n }\n this.domPlayer.currentTime = p * this.time;\n }\n getPosition() {\n return this.domPlayer.currentTime / this.time;\n }\n get totalTime() {\n return this._delay + this._duration;\n }\n beforeDestroy() {\n const styles = new Map();\n if (this.hasStarted()) {\n // note: this code is invoked only when the `play` function was called prior to this\n // (thus `hasStarted` returns true), this implies that the code that initializes\n // `_finalKeyframe` has also been executed and the non-null assertion can be safely used here\n const finalKeyframe = this._finalKeyframe;\n finalKeyframe.forEach((val, prop) => {\n if (prop !== 'offset') {\n styles.set(prop, this._finished ? val : computeStyle(this.element, prop));\n }\n });\n }\n this.currentSnapshot = styles;\n }\n /** @internal */\n triggerCallback(phaseName) {\n const methods = phaseName === 'start' ? this._onStartFns : this._onDoneFns;\n methods.forEach(fn => fn());\n methods.length = 0;\n }\n}\n\nclass WebAnimationsDriver {\n validateStyleProperty(prop) {\n // Perform actual validation in dev mode only, in prod mode this check is a noop.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n return validateStyleProperty(prop);\n }\n return true;\n }\n validateAnimatableStyleProperty(prop) {\n // Perform actual validation in dev mode only, in prod mode this check is a noop.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const cssProp = camelCaseToDashCase(prop);\n return validateWebAnimatableStyleProperty(cssProp);\n }\n return true;\n }\n matchesElement(_element, _selector) {\n // This method is deprecated and no longer in use so we return false.\n return false;\n }\n containsElement(elm1, elm2) {\n return containsElement(elm1, elm2);\n }\n getParentElement(element) {\n return getParentElement(element);\n }\n query(element, selector, multi) {\n return invokeQuery(element, selector, multi);\n }\n computeStyle(element, prop, defaultValue) {\n return window.getComputedStyle(element)[prop];\n }\n animate(element, keyframes, duration, delay, easing, previousPlayers = []) {\n const fill = delay == 0 ? 'both' : 'forwards';\n const playerOptions = { duration, delay, fill };\n // we check for this to avoid having a null|undefined value be present\n // for the easing (which results in an error for certain browsers #9752)\n if (easing) {\n playerOptions['easing'] = easing;\n }\n const previousStyles = new Map();\n const previousWebAnimationPlayers = previousPlayers.filter(player => player instanceof WebAnimationsPlayer);\n if (allowPreviousPlayerStylesMerge(duration, delay)) {\n previousWebAnimationPlayers.forEach(player => {\n player.currentSnapshot.forEach((val, prop) => previousStyles.set(prop, val));\n });\n }\n let _keyframes = normalizeKeyframes(keyframes).map(styles => copyStyles(styles));\n _keyframes = balancePreviousStylesIntoKeyframes(element, _keyframes, previousStyles);\n const specialStyles = packageNonAnimatableStyles(element, _keyframes);\n return new WebAnimationsPlayer(element, _keyframes, playerOptions, specialStyles);\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AnimationDriver, Animation as ɵAnimation, AnimationEngine as ɵAnimationEngine, AnimationStyleNormalizer as ɵAnimationStyleNormalizer, NoopAnimationDriver as ɵNoopAnimationDriver, NoopAnimationStyleNormalizer as ɵNoopAnimationStyleNormalizer, WebAnimationsDriver as ɵWebAnimationsDriver, WebAnimationsPlayer as ɵWebAnimationsPlayer, WebAnimationsStyleNormalizer as ɵWebAnimationsStyleNormalizer, allowPreviousPlayerStylesMerge as ɵallowPreviousPlayerStylesMerge, containsElement as ɵcontainsElement, getParentElement as ɵgetParentElement, invokeQuery as ɵinvokeQuery, normalizeKeyframes as ɵnormalizeKeyframes, validateStyleProperty as ɵvalidateStyleProperty };\n","/**\n * @license Angular v15.0.4\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport * as i0 from '@angular/core';\nimport { ViewEncapsulation, Injectable, Inject, RendererFactory2, NgZone, ANIMATION_MODULE_TYPE, NgModule } from '@angular/core';\nexport { ANIMATION_MODULE_TYPE } from '@angular/core';\nimport { ɵDomRendererFactory2, BrowserModule } from '@angular/platform-browser';\nimport { AnimationBuilder, sequence, AnimationFactory } from '@angular/animations';\nimport * as i1 from '@angular/animations/browser';\nimport { ɵAnimationEngine, ɵWebAnimationsStyleNormalizer, ɵAnimationStyleNormalizer, AnimationDriver, ɵWebAnimationsDriver, ɵNoopAnimationDriver } from '@angular/animations/browser';\nimport { DOCUMENT } from '@angular/common';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass BrowserAnimationBuilder extends AnimationBuilder {\n constructor(rootRenderer, doc) {\n super();\n this._nextAnimationId = 0;\n const typeData = { id: '0', encapsulation: ViewEncapsulation.None, styles: [], data: { animation: [] } };\n this._renderer = rootRenderer.createRenderer(doc.body, typeData);\n }\n build(animation) {\n const id = this._nextAnimationId.toString();\n this._nextAnimationId++;\n const entry = Array.isArray(animation) ? sequence(animation) : animation;\n issueAnimationCommand(this._renderer, null, id, 'register', [entry]);\n return new BrowserAnimationFactory(id, this._renderer);\n }\n}\nBrowserAnimationBuilder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: BrowserAnimationBuilder, deps: [{ token: i0.RendererFactory2 }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nBrowserAnimationBuilder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: BrowserAnimationBuilder });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: BrowserAnimationBuilder, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i0.RendererFactory2 }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; } });\nclass BrowserAnimationFactory extends AnimationFactory {\n constructor(_id, _renderer) {\n super();\n this._id = _id;\n this._renderer = _renderer;\n }\n create(element, options) {\n return new RendererAnimationPlayer(this._id, element, options || {}, this._renderer);\n }\n}\nclass RendererAnimationPlayer {\n constructor(id, element, options, _renderer) {\n this.id = id;\n this.element = element;\n this._renderer = _renderer;\n this.parentPlayer = null;\n this._started = false;\n this.totalTime = 0;\n this._command('create', options);\n }\n _listen(eventName, callback) {\n return this._renderer.listen(this.element, `@@${this.id}:${eventName}`, callback);\n }\n _command(command, ...args) {\n return issueAnimationCommand(this._renderer, this.element, this.id, command, args);\n }\n onDone(fn) {\n this._listen('done', fn);\n }\n onStart(fn) {\n this._listen('start', fn);\n }\n onDestroy(fn) {\n this._listen('destroy', fn);\n }\n init() {\n this._command('init');\n }\n hasStarted() {\n return this._started;\n }\n play() {\n this._command('play');\n this._started = true;\n }\n pause() {\n this._command('pause');\n }\n restart() {\n this._command('restart');\n }\n finish() {\n this._command('finish');\n }\n destroy() {\n this._command('destroy');\n }\n reset() {\n this._command('reset');\n this._started = false;\n }\n setPosition(p) {\n this._command('setPosition', p);\n }\n getPosition() {\n return this._renderer.engine.players[+this.id]?.getPosition() ?? 0;\n }\n}\nfunction issueAnimationCommand(renderer, element, id, command, args) {\n return renderer.setProperty(element, `@@${id}:${command}`, args);\n}\n\nconst ANIMATION_PREFIX = '@';\nconst DISABLE_ANIMATIONS_FLAG = '@.disabled';\nclass AnimationRendererFactory {\n constructor(delegate, engine, _zone) {\n this.delegate = delegate;\n this.engine = engine;\n this._zone = _zone;\n this._currentId = 0;\n this._microtaskId = 1;\n this._animationCallbacksBuffer = [];\n this._rendererCache = new Map();\n this._cdRecurDepth = 0;\n this.promise = Promise.resolve(0);\n engine.onRemovalComplete = (element, delegate) => {\n // Note: if a component element has a leave animation, and a host leave animation,\n // the view engine will call `removeChild` for the parent\n // component renderer as well as for the child component renderer.\n // Therefore, we need to check if we already removed the element.\n const parentNode = delegate?.parentNode(element);\n if (parentNode) {\n delegate.removeChild(parentNode, element);\n }\n };\n }\n createRenderer(hostElement, type) {\n const EMPTY_NAMESPACE_ID = '';\n // cache the delegates to find out which cached delegate can\n // be used by which cached renderer\n const delegate = this.delegate.createRenderer(hostElement, type);\n if (!hostElement || !type || !type.data || !type.data['animation']) {\n let renderer = this._rendererCache.get(delegate);\n if (!renderer) {\n // Ensure that the renderer is removed from the cache on destroy\n // since it may contain references to detached DOM nodes.\n const onRendererDestroy = () => this._rendererCache.delete(delegate);\n renderer =\n new BaseAnimationRenderer(EMPTY_NAMESPACE_ID, delegate, this.engine, onRendererDestroy);\n // only cache this result when the base renderer is used\n this._rendererCache.set(delegate, renderer);\n }\n return renderer;\n }\n const componentId = type.id;\n const namespaceId = type.id + '-' + this._currentId;\n this._currentId++;\n this.engine.register(namespaceId, hostElement);\n const registerTrigger = (trigger) => {\n if (Array.isArray(trigger)) {\n trigger.forEach(registerTrigger);\n }\n else {\n this.engine.registerTrigger(componentId, namespaceId, hostElement, trigger.name, trigger);\n }\n };\n const animationTriggers = type.data['animation'];\n animationTriggers.forEach(registerTrigger);\n return new AnimationRenderer(this, namespaceId, delegate, this.engine);\n }\n begin() {\n this._cdRecurDepth++;\n if (this.delegate.begin) {\n this.delegate.begin();\n }\n }\n _scheduleCountTask() {\n // always use promise to schedule microtask instead of use Zone\n this.promise.then(() => {\n this._microtaskId++;\n });\n }\n /** @internal */\n scheduleListenerCallback(count, fn, data) {\n if (count >= 0 && count < this._microtaskId) {\n this._zone.run(() => fn(data));\n return;\n }\n if (this._animationCallbacksBuffer.length == 0) {\n Promise.resolve(null).then(() => {\n this._zone.run(() => {\n this._animationCallbacksBuffer.forEach(tuple => {\n const [fn, data] = tuple;\n fn(data);\n });\n this._animationCallbacksBuffer = [];\n });\n });\n }\n this._animationCallbacksBuffer.push([fn, data]);\n }\n end() {\n this._cdRecurDepth--;\n // this is to prevent animations from running twice when an inner\n // component does CD when a parent component instead has inserted it\n if (this._cdRecurDepth == 0) {\n this._zone.runOutsideAngular(() => {\n this._scheduleCountTask();\n this.engine.flush(this._microtaskId);\n });\n }\n if (this.delegate.end) {\n this.delegate.end();\n }\n }\n whenRenderingDone() {\n return this.engine.whenRenderingDone();\n }\n}\nAnimationRendererFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: AnimationRendererFactory, deps: [{ token: i0.RendererFactory2 }, { token: i1.ɵAnimationEngine }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });\nAnimationRendererFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: AnimationRendererFactory });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: AnimationRendererFactory, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i0.RendererFactory2 }, { type: i1.ɵAnimationEngine }, { type: i0.NgZone }]; } });\nclass BaseAnimationRenderer {\n constructor(namespaceId, delegate, engine, _onDestroy) {\n this.namespaceId = namespaceId;\n this.delegate = delegate;\n this.engine = engine;\n this._onDestroy = _onDestroy;\n this.destroyNode = this.delegate.destroyNode ? (n) => delegate.destroyNode(n) : null;\n }\n get data() {\n return this.delegate.data;\n }\n destroy() {\n this.engine.destroy(this.namespaceId, this.delegate);\n this.delegate.destroy();\n this._onDestroy?.();\n }\n createElement(name, namespace) {\n return this.delegate.createElement(name, namespace);\n }\n createComment(value) {\n return this.delegate.createComment(value);\n }\n createText(value) {\n return this.delegate.createText(value);\n }\n appendChild(parent, newChild) {\n this.delegate.appendChild(parent, newChild);\n this.engine.onInsert(this.namespaceId, newChild, parent, false);\n }\n insertBefore(parent, newChild, refChild, isMove = true) {\n this.delegate.insertBefore(parent, newChild, refChild);\n // If `isMove` true than we should animate this insert.\n this.engine.onInsert(this.namespaceId, newChild, parent, isMove);\n }\n removeChild(parent, oldChild, isHostElement) {\n this.engine.onRemove(this.namespaceId, oldChild, this.delegate, isHostElement);\n }\n selectRootElement(selectorOrNode, preserveContent) {\n return this.delegate.selectRootElement(selectorOrNode, preserveContent);\n }\n parentNode(node) {\n return this.delegate.parentNode(node);\n }\n nextSibling(node) {\n return this.delegate.nextSibling(node);\n }\n setAttribute(el, name, value, namespace) {\n this.delegate.setAttribute(el, name, value, namespace);\n }\n removeAttribute(el, name, namespace) {\n this.delegate.removeAttribute(el, name, namespace);\n }\n addClass(el, name) {\n this.delegate.addClass(el, name);\n }\n removeClass(el, name) {\n this.delegate.removeClass(el, name);\n }\n setStyle(el, style, value, flags) {\n this.delegate.setStyle(el, style, value, flags);\n }\n removeStyle(el, style, flags) {\n this.delegate.removeStyle(el, style, flags);\n }\n setProperty(el, name, value) {\n if (name.charAt(0) == ANIMATION_PREFIX && name == DISABLE_ANIMATIONS_FLAG) {\n this.disableAnimations(el, !!value);\n }\n else {\n this.delegate.setProperty(el, name, value);\n }\n }\n setValue(node, value) {\n this.delegate.setValue(node, value);\n }\n listen(target, eventName, callback) {\n return this.delegate.listen(target, eventName, callback);\n }\n disableAnimations(element, value) {\n this.engine.disableAnimations(element, value);\n }\n}\nclass AnimationRenderer extends BaseAnimationRenderer {\n constructor(factory, namespaceId, delegate, engine, onDestroy) {\n super(namespaceId, delegate, engine, onDestroy);\n this.factory = factory;\n this.namespaceId = namespaceId;\n }\n setProperty(el, name, value) {\n if (name.charAt(0) == ANIMATION_PREFIX) {\n if (name.charAt(1) == '.' && name == DISABLE_ANIMATIONS_FLAG) {\n value = value === undefined ? true : !!value;\n this.disableAnimations(el, value);\n }\n else {\n this.engine.process(this.namespaceId, el, name.slice(1), value);\n }\n }\n else {\n this.delegate.setProperty(el, name, value);\n }\n }\n listen(target, eventName, callback) {\n if (eventName.charAt(0) == ANIMATION_PREFIX) {\n const element = resolveElementFromTarget(target);\n let name = eventName.slice(1);\n let phase = '';\n // @listener.phase is for trigger animation callbacks\n // @@listener is for animation builder callbacks\n if (name.charAt(0) != ANIMATION_PREFIX) {\n [name, phase] = parseTriggerCallbackName(name);\n }\n return this.engine.listen(this.namespaceId, element, name, phase, event => {\n const countId = event['_data'] || -1;\n this.factory.scheduleListenerCallback(countId, callback, event);\n });\n }\n return this.delegate.listen(target, eventName, callback);\n }\n}\nfunction resolveElementFromTarget(target) {\n switch (target) {\n case 'body':\n return document.body;\n case 'document':\n return document;\n case 'window':\n return window;\n default:\n return target;\n }\n}\nfunction parseTriggerCallbackName(triggerName) {\n const dotIndex = triggerName.indexOf('.');\n const trigger = triggerName.substring(0, dotIndex);\n const phase = triggerName.slice(dotIndex + 1);\n return [trigger, phase];\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass InjectableAnimationEngine extends ɵAnimationEngine {\n // The `ApplicationRef` is injected here explicitly to force the dependency ordering.\n // Since the `ApplicationRef` should be created earlier before the `AnimationEngine`, they\n // both have `ngOnDestroy` hooks and `flush()` must be called after all views are destroyed.\n constructor(doc, driver, normalizer, appRef) {\n super(doc.body, driver, normalizer);\n }\n ngOnDestroy() {\n this.flush();\n }\n}\nInjectableAnimationEngine.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: InjectableAnimationEngine, deps: [{ token: DOCUMENT }, { token: i1.AnimationDriver }, { token: i1.ɵAnimationStyleNormalizer }, { token: i0.ApplicationRef }], target: i0.ɵɵFactoryTarget.Injectable });\nInjectableAnimationEngine.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: InjectableAnimationEngine });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: InjectableAnimationEngine, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i1.AnimationDriver }, { type: i1.ɵAnimationStyleNormalizer }, { type: i0.ApplicationRef }]; } });\nfunction instantiateDefaultStyleNormalizer() {\n return new ɵWebAnimationsStyleNormalizer();\n}\nfunction instantiateRendererFactory(renderer, engine, zone) {\n return new AnimationRendererFactory(renderer, engine, zone);\n}\nconst SHARED_ANIMATION_PROVIDERS = [\n { provide: AnimationBuilder, useClass: BrowserAnimationBuilder },\n { provide: ɵAnimationStyleNormalizer, useFactory: instantiateDefaultStyleNormalizer },\n { provide: ɵAnimationEngine, useClass: InjectableAnimationEngine }, {\n provide: RendererFactory2,\n useFactory: instantiateRendererFactory,\n deps: [ɵDomRendererFactory2, ɵAnimationEngine, NgZone]\n }\n];\n/**\n * Separate providers from the actual module so that we can do a local modification in Google3 to\n * include them in the BrowserModule.\n */\nconst BROWSER_ANIMATIONS_PROVIDERS = [\n { provide: AnimationDriver, useFactory: () => new ɵWebAnimationsDriver() },\n { provide: ANIMATION_MODULE_TYPE, useValue: 'BrowserAnimations' }, ...SHARED_ANIMATION_PROVIDERS\n];\n/**\n * Separate providers from the actual module so that we can do a local modification in Google3 to\n * include them in the BrowserTestingModule.\n */\nconst BROWSER_NOOP_ANIMATIONS_PROVIDERS = [\n { provide: AnimationDriver, useClass: ɵNoopAnimationDriver },\n { provide: ANIMATION_MODULE_TYPE, useValue: 'NoopAnimations' }, ...SHARED_ANIMATION_PROVIDERS\n];\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Exports `BrowserModule` with additional [dependency-injection providers](guide/glossary#provider)\n * for use with animations. See [Animations](guide/animations).\n * @publicApi\n */\nclass BrowserAnimationsModule {\n /**\n * Configures the module based on the specified object.\n *\n * @param config Object used to configure the behavior of the `BrowserAnimationsModule`.\n * @see `BrowserAnimationsModuleConfig`\n *\n * @usageNotes\n * When registering the `BrowserAnimationsModule`, you can use the `withConfig`\n * function as follows:\n * ```\n * @NgModule({\n * imports: [BrowserAnimationsModule.withConfig(config)]\n * })\n * class MyNgModule {}\n * ```\n */\n static withConfig(config) {\n return {\n ngModule: BrowserAnimationsModule,\n providers: config.disableAnimations ? BROWSER_NOOP_ANIMATIONS_PROVIDERS :\n BROWSER_ANIMATIONS_PROVIDERS\n };\n }\n}\nBrowserAnimationsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: BrowserAnimationsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nBrowserAnimationsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.0.4\", ngImport: i0, type: BrowserAnimationsModule, exports: [BrowserModule] });\nBrowserAnimationsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: BrowserAnimationsModule, providers: BROWSER_ANIMATIONS_PROVIDERS, imports: [BrowserModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: BrowserAnimationsModule, decorators: [{\n type: NgModule,\n args: [{\n exports: [BrowserModule],\n providers: BROWSER_ANIMATIONS_PROVIDERS,\n }]\n }] });\n/**\n * Returns the set of [dependency-injection providers](guide/glossary#provider)\n * to enable animations in an application. See [animations guide](guide/animations)\n * to learn more about animations in Angular.\n *\n * @usageNotes\n *\n * The function is useful when you want to enable animations in an application\n * bootstrapped using the `bootstrapApplication` function. In this scenario there\n * is no need to import the `BrowserAnimationsModule` NgModule at all, just add\n * providers returned by this function to the `providers` list as show below.\n *\n * ```typescript\n * bootstrapApplication(RootComponent, {\n * providers: [\n * provideAnimations()\n * ]\n * });\n * ```\n *\n * @publicApi\n */\nfunction provideAnimations() {\n // Return a copy to prevent changes to the original array in case any in-place\n // alterations are performed to the `provideAnimations` call results in app code.\n return [...BROWSER_ANIMATIONS_PROVIDERS];\n}\n/**\n * A null player that must be imported to allow disabling of animations.\n * @publicApi\n */\nclass NoopAnimationsModule {\n}\nNoopAnimationsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NoopAnimationsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nNoopAnimationsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.0.4\", ngImport: i0, type: NoopAnimationsModule, exports: [BrowserModule] });\nNoopAnimationsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NoopAnimationsModule, providers: BROWSER_NOOP_ANIMATIONS_PROVIDERS, imports: [BrowserModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NoopAnimationsModule, decorators: [{\n type: NgModule,\n args: [{\n exports: [BrowserModule],\n providers: BROWSER_NOOP_ANIMATIONS_PROVIDERS,\n }]\n }] });\n/**\n * Returns the set of [dependency-injection providers](guide/glossary#provider)\n * to disable animations in an application. See [animations guide](guide/animations)\n * to learn more about animations in Angular.\n *\n * @usageNotes\n *\n * The function is useful when you want to bootstrap an application using\n * the `bootstrapApplication` function, but you need to disable animations\n * (for example, when running tests).\n *\n * ```typescript\n * bootstrapApplication(RootComponent, {\n * providers: [\n * provideNoopAnimations()\n * ]\n * });\n * ```\n *\n * @publicApi\n */\nfunction provideNoopAnimations() {\n // Return a copy to prevent changes to the original array in case any in-place\n // alterations are performed to the `provideNoopAnimations` call results in app code.\n return [...BROWSER_NOOP_ANIMATIONS_PROVIDERS];\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { BrowserAnimationsModule, NoopAnimationsModule, provideAnimations, provideNoopAnimations, AnimationRenderer as ɵAnimationRenderer, AnimationRendererFactory as ɵAnimationRendererFactory, BrowserAnimationBuilder as ɵBrowserAnimationBuilder, BrowserAnimationFactory as ɵBrowserAnimationFactory, InjectableAnimationEngine as ɵInjectableAnimationEngine };\n","import { Injectable, EventEmitter, NgZone, Optional, Inject, PLATFORM_ID, NgModule } from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\nimport { Subscription, fromEvent, merge } from 'rxjs';\nimport { filter, throttleTime } from 'rxjs/operators';\n\n/*\n * Represents a base class for types that provide expiry detection for the Idle service.\n */\nimport * as ɵngcc0 from '@angular/core';\nclass IdleExpiry {\n constructor() {\n this.idValue = new Date();\n this.idlingValue = false;\n }\n /*\n * Gets or sets a unique ID for the window\n * @param id - The id.\n * @return The current id.\n */\n id(value) {\n if (value !== void 0) {\n if (!value) {\n throw new Error('A value must be specified for the ID.');\n }\n this.idValue = value;\n }\n return this.idValue;\n }\n /*\n * Gets or sets the idling value.\n * @param value - The value to set.\n * @return The idling value.\n */\n idling(value) {\n if (value !== void 0) {\n this.idlingValue = value;\n }\n return this.idlingValue;\n }\n /*\n * Returns the current Date.\n * @return The current Date.\n */\n now() {\n /* istanbul ignore next */\n return new Date();\n }\n /*\n * Returns whether or not it is expired.\n * @return True if expired; otherwise, false.\n */\n isExpired() {\n const expiry = this.last();\n return expiry != null && expiry <= this.now();\n }\n}\n\n/*\n * A class for managing an interrupt from an interrupt source.\n */\nclass Interrupt {\n constructor(source, options) {\n this.source = source;\n if (source.initialize) {\n source.initialize(options);\n }\n }\n /*\n * Subscribes to the interrupt using the specified function.\n * @param fn - The subscription function.\n */\n subscribe(fn) {\n this.sub = this.source.onInterrupt.subscribe(fn);\n }\n /*\n * Unsubscribes the interrupt.\n */\n unsubscribe() {\n this.sub.unsubscribe();\n this.sub = null;\n }\n /*\n * Keeps the subscription but resumes interrupt events.\n */\n resume() {\n this.source.attach();\n }\n /*\n * Keeps the subscription but pauses interrupt events.\n */\n pause() {\n this.source.detach();\n }\n}\n\nclass KeepaliveSvc {\n}\n\n/*\n * Represents an alternative storage for browser that doesn't support localstorage. (i.e. Safari in\n * private mode)\n * @implements Storage\n */\nclass AlternativeStorage {\n constructor() {\n this.storageMap = {};\n }\n /*\n * Returns an integer representing the number of data items stored in the storageMap object.\n */\n get length() {\n return Object.keys(this.storageMap).length;\n }\n /*\n * Remove all keys out of the storage.\n */\n clear() {\n this.storageMap = {};\n }\n /*\n * Return the key's value\n *\n * @param key - name of the key to retrieve the value of.\n * @return The key's value\n */\n getItem(key) {\n if (typeof this.storageMap[key] !== 'undefined') {\n return this.storageMap[key];\n }\n return null;\n }\n /*\n * Return the nth key in the storage\n *\n * @param index - the number of the key you want to get the name of.\n * @return The name of the key.\n */\n key(index) {\n return Object.keys(this.storageMap)[index] || null;\n }\n /*\n * Remove a key from the storage.\n *\n * @param key - the name of the key you want to remove.\n */\n removeItem(key) {\n this.storageMap[key] = undefined;\n }\n /*\n * Add a key to the storage, or update a key's value if it already exists.\n *\n * @param key - the name of the key.\n * @param value - the value you want to give to the key.\n */\n setItem(key, value) {\n this.storageMap[key] = value;\n }\n}\n\n/*\n * Represents a localStorage store.\n */\nclass LocalStorage {\n constructor() {\n this.storage = this.getStorage();\n }\n /*\n * Safari, in Private Browsing Mode, looks like it supports localStorage but all calls to setItem\n * throw QuotaExceededError. We're going to detect this and just silently drop any calls to\n * setItem\n * to avoid the entire page breaking, without having to do a check at each usage of Storage.\n */\n getStorage() {\n try {\n const storage = localStorage;\n storage.setItem('ng2IdleStorage', '');\n storage.removeItem('ng2IdleStorage');\n return storage;\n }\n catch (err) {\n return new AlternativeStorage();\n }\n }\n /*\n * Gets an item in the storage.\n *\n * @param value - The value to get.\n * @return The current value.\n */\n getItem(key) {\n return this.storage.getItem('ng2Idle.' + key);\n }\n /*\n * Removes an item in the storage.\n *\n * @param value - The value to remove.\n */\n removeItem(key) {\n this.storage.removeItem('ng2Idle.' + key);\n }\n /*\n * Sets an item in the storage.\n *\n * @param key - The key to set the value.\n * @param value - The value to set to the key.\n */\n setItem(key, data) {\n this.storage.setItem('ng2Idle.' + key, data);\n }\n /*\n * Represents the storage, commonly use for testing purposes.\n *\n * @param key - The key to set the value.\n * @param value - The value to set to the key.\n */\n _wrapped() {\n return this.storage;\n }\n}\nLocalStorage.ɵfac = function LocalStorage_Factory(t) { return new (t || LocalStorage)(); };\nLocalStorage.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: LocalStorage, factory: LocalStorage.ɵfac });\nLocalStorage.ctorParameters = () => [];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(LocalStorage, [{\n type: Injectable\n }], function () { return []; }, null); })();\n\n/*\n * Represents a localStorage store of expiry values.\n * @extends IdleExpiry\n */\nclass LocalStorageExpiry extends IdleExpiry {\n constructor(localStorage) {\n super();\n this.localStorage = localStorage;\n this.idleName = 'main';\n }\n /*\n * Gets or sets the last expiry date in localStorage.\n * If localStorage doesn't work correctly (i.e. Safari in private mode), we store the expiry value in memory.\n * @param value - The expiry value to set; omit to only return the value.\n * @return The current expiry value.\n */\n last(value) {\n if (value !== void 0) {\n this.setExpiry(value);\n }\n return this.getExpiry();\n }\n idling(value) {\n if (value !== void 0) {\n this.setIdling(value);\n }\n return this.getIdling();\n }\n /*\n * Gets the idle name.\n * @return The name of the idle.\n */\n getIdleName() {\n return this.idleName;\n }\n /*\n * Sets the idle name.\n * @param The name of the idle.\n */\n setIdleName(key) {\n if (key) {\n this.idleName = key;\n }\n }\n getExpiry() {\n const expiry = this.localStorage.getItem(this.idleName + '.expiry');\n if (expiry) {\n return new Date(parseInt(expiry, 10));\n }\n else {\n return null;\n }\n }\n setExpiry(value) {\n if (value) {\n this.localStorage.setItem(this.idleName + '.expiry', value.getTime().toString());\n }\n else {\n this.localStorage.removeItem(this.idleName + '.expiry');\n }\n }\n getIdling() {\n const idling = this.localStorage.getItem(this.idleName + '.idling');\n if (idling) {\n return idling === 'true';\n }\n else {\n return false;\n }\n }\n setIdling(value) {\n if (value) {\n this.localStorage.setItem(this.idleName + '.idling', value.toString());\n }\n else {\n this.localStorage.setItem(this.idleName + '.idling', 'false');\n }\n }\n}\nLocalStorageExpiry.ɵfac = function LocalStorageExpiry_Factory(t) { return new (t || LocalStorageExpiry)(ɵngcc0.ɵɵinject(LocalStorage)); };\nLocalStorageExpiry.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: LocalStorageExpiry, factory: LocalStorageExpiry.ɵfac });\nLocalStorageExpiry.ctorParameters = () => [\n { type: LocalStorage }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(LocalStorageExpiry, [{\n type: Injectable\n }], function () { return [{ type: LocalStorage }]; }, null); })();\n\n/*\n * Indicates the desired auto resume behavior.\n */\nvar AutoResume;\n(function (AutoResume) {\n /*\n * Auto resume functionality will be disabled.\n */\n AutoResume[AutoResume[\"disabled\"] = 0] = \"disabled\";\n /*\n * Can resume automatically even if they are idle.\n */\n AutoResume[AutoResume[\"idle\"] = 1] = \"idle\";\n /*\n * Can only resume automatically if they are not yet idle.\n */\n AutoResume[AutoResume[\"notIdle\"] = 2] = \"notIdle\";\n})(AutoResume || (AutoResume = {}));\n/**\n * A service for detecting and responding to user idleness.\n */\nclass Idle {\n constructor(expiry, zone, keepaliveSvc, \n // tslint:disable-next-line: ban-types platform id injection will fail with any other type\n platformId) {\n this.expiry = expiry;\n this.zone = zone;\n this.platformId = platformId;\n this.idle = 20 * 60; // in seconds\n this.timeoutVal = 30; // in seconds\n this.autoResume = AutoResume.idle;\n this.interrupts = new Array();\n this.running = false;\n this.keepaliveEnabled = false;\n this.onIdleStart = new EventEmitter();\n this.onIdleEnd = new EventEmitter();\n this.onTimeoutWarning = new EventEmitter();\n this.onTimeout = new EventEmitter();\n this.onInterrupt = new EventEmitter();\n if (keepaliveSvc) {\n this.keepaliveSvc = keepaliveSvc;\n this.keepaliveEnabled = true;\n }\n this.setIdling(false);\n }\n /*\n * Sets the idle name for localStorage.\n * Important to set if multiple instances of Idle with LocalStorageExpiry\n * @param The name of the idle.\n */\n setIdleName(key) {\n if (this.expiry instanceof LocalStorageExpiry) {\n this.expiry.setIdleName(key);\n }\n else {\n throw new Error('Cannot set expiry key name because no LocalStorageExpiry has been provided.');\n }\n }\n /*\n * Returns whether or not keepalive integration is enabled.\n * @return True if integration is enabled; otherwise, false.\n */\n getKeepaliveEnabled() {\n return this.keepaliveEnabled;\n }\n /*\n * Sets and returns whether or not keepalive integration is enabled.\n * @param True if the integration is enabled; otherwise, false.\n * @return The current value.\n */\n setKeepaliveEnabled(value) {\n if (!this.keepaliveSvc) {\n throw new Error('Cannot enable keepalive integration because no KeepaliveSvc has been provided.');\n }\n return (this.keepaliveEnabled = value);\n }\n /*\n * Returns the current timeout value.\n * @return The timeout value in seconds.\n */\n getTimeout() {\n return this.timeoutVal;\n }\n /*\n * Sets the timeout value.\n * @param seconds - The timeout value in seconds. 0 or false to disable timeout feature.\n * @return The current value. If disabled, the value will be 0.\n */\n setTimeout(seconds) {\n if (seconds === false) {\n this.timeoutVal = 0;\n }\n else if (typeof seconds === 'number' && seconds >= 0) {\n this.timeoutVal = seconds;\n }\n else {\n throw new Error(\"'seconds' can only be 'false' or a positive number.\");\n }\n return this.timeoutVal;\n }\n /*\n * Returns the current idle value.\n * @return The idle value in seconds.\n */\n getIdle() {\n return this.idle;\n }\n /*\n * Sets the idle value.\n * @param seconds - The idle value in seconds.\n * @return The idle value in seconds.\n */\n setIdle(seconds) {\n if (seconds <= 0) {\n throw new Error(\"'seconds' must be greater zero\");\n }\n return (this.idle = seconds);\n }\n /*\n * Returns the current autoresume value.\n * @return The current value.\n */\n getAutoResume() {\n return this.autoResume;\n }\n setAutoResume(value) {\n return (this.autoResume = value);\n }\n /*\n * Sets interrupts from the specified sources.\n * @param sources - Interrupt sources.\n * @return The resulting interrupts.\n */\n setInterrupts(sources) {\n this.clearInterrupts();\n const self = this;\n for (const source of sources) {\n const options = { platformId: this.platformId };\n const sub = new Interrupt(source, options);\n sub.subscribe((args) => {\n self.interrupt(args.force, args.innerArgs);\n });\n this.interrupts.push(sub);\n }\n return this.interrupts;\n }\n /*\n * Returns the current interrupts.\n * @return The current interrupts.\n */\n getInterrupts() {\n return this.interrupts;\n }\n /*\n * Pauses, unsubscribes, and clears the current interrupt subscriptions.\n */\n clearInterrupts() {\n for (const sub of this.interrupts) {\n sub.pause();\n sub.unsubscribe();\n }\n this.interrupts.length = 0;\n }\n /*\n * Returns whether or not the service is running i.e. watching for idleness.\n * @return True if service is watching; otherwise, false.\n */\n isRunning() {\n return this.running;\n }\n /*\n * Returns whether or not the user is considered idle.\n * @return True if the user is in the idle state; otherwise, false.\n */\n isIdling() {\n return this.idling;\n }\n /*\n * Starts watching for inactivity.\n */\n watch(skipExpiry) {\n this.safeClearInterval('idleHandle');\n this.safeClearInterval('timeoutHandle');\n const timeout = !this.timeoutVal ? 0 : this.timeoutVal;\n if (!skipExpiry) {\n const value = new Date(this.expiry.now().getTime() + (this.idle + timeout) * 1000);\n this.expiry.last(value);\n }\n if (this.idling) {\n this.toggleState();\n }\n if (!this.running) {\n this.startKeepalive();\n this.toggleInterrupts(true);\n }\n this.running = true;\n const watchFn = () => {\n this.zone.run(() => {\n const diff = this.getExpiryDiff(timeout);\n if (diff > 0) {\n this.safeClearInterval('idleHandle');\n this.setIdleIntervalOutsideOfZone(watchFn, diff);\n }\n else {\n this.toggleState();\n }\n });\n };\n this.setIdleIntervalOutsideOfZone(watchFn, this.idle * 1000);\n }\n /*\n * Allows protractor tests to call waitForAngular without hanging\n */\n setIdleIntervalOutsideOfZone(watchFn, frequency) {\n this.zone.runOutsideAngular(() => {\n this.idleHandle = setInterval(watchFn, frequency);\n });\n }\n /*\n * Stops watching for inactivity.\n */\n stop() {\n this.stopKeepalive();\n this.toggleInterrupts(false);\n this.safeClearInterval('idleHandle');\n this.safeClearInterval('timeoutHandle');\n this.setIdling(false);\n this.running = false;\n this.expiry.last(null);\n }\n /*\n * Forces a timeout event and state.\n */\n timeout() {\n this.stopKeepalive();\n this.toggleInterrupts(false);\n this.safeClearInterval('idleHandle');\n this.safeClearInterval('timeoutHandle');\n this.setIdling(true);\n this.running = false;\n this.countdown = 0;\n this.onTimeout.emit(null);\n }\n /*\n * Signals that user activity has occurred.\n * @param force - Forces watch to be called, unless they are timed out.\n * @param eventArgs - Optional source event arguments.\n */\n interrupt(force, eventArgs) {\n if (!this.running) {\n return;\n }\n if (this.timeoutVal && this.expiry.isExpired()) {\n this.timeout();\n return;\n }\n this.onInterrupt.emit(eventArgs);\n if (force === true ||\n this.autoResume === AutoResume.idle ||\n (this.autoResume === AutoResume.notIdle && !this.expiry.idling())) {\n this.watch(force);\n }\n }\n setIdling(value) {\n this.idling = value;\n this.expiry.idling(value);\n }\n toggleState() {\n this.setIdling(!this.idling);\n if (this.idling) {\n this.onIdleStart.emit(null);\n this.stopKeepalive();\n if (this.timeoutVal > 0) {\n this.countdown = this.timeoutVal;\n this.doCountdown();\n this.setTimoutIntervalOutsideZone(() => {\n this.doCountdownInZone();\n }, 1000);\n }\n }\n else {\n this.toggleInterrupts(true);\n this.onIdleEnd.emit(null);\n this.startKeepalive();\n }\n this.safeClearInterval('idleHandle');\n }\n setTimoutIntervalOutsideZone(intervalFn, frequency) {\n this.zone.runOutsideAngular(() => {\n this.timeoutHandle = setInterval(() => {\n intervalFn();\n }, frequency);\n });\n }\n toggleInterrupts(resume) {\n for (const interrupt of this.interrupts) {\n if (resume) {\n interrupt.resume();\n }\n else {\n interrupt.pause();\n }\n }\n }\n getExpiryDiff(timeout) {\n const now = this.expiry.now();\n const last = this.expiry.last() || now;\n return last.getTime() - now.getTime() - timeout * 1000;\n }\n doCountdownInZone() {\n this.zone.run(() => {\n this.doCountdown();\n });\n }\n doCountdown() {\n const diff = this.getExpiryDiff(this.timeoutVal);\n if (diff > 0) {\n this.safeClearInterval('timeoutHandle');\n this.interrupt(true);\n return;\n }\n if (!this.idling) {\n return;\n }\n if (this.countdown <= 0) {\n this.timeout();\n return;\n }\n this.onTimeoutWarning.emit(this.countdown);\n this.countdown--;\n }\n safeClearInterval(handleName) {\n const handle = this[handleName];\n if (handle !== null && typeof handle !== 'undefined') {\n clearInterval(this[handleName]);\n this[handleName] = null;\n }\n }\n startKeepalive() {\n if (!this.keepaliveSvc || !this.keepaliveEnabled) {\n return;\n }\n if (this.running) {\n this.keepaliveSvc.ping();\n }\n this.keepaliveSvc.start();\n }\n stopKeepalive() {\n if (!this.keepaliveSvc || !this.keepaliveEnabled) {\n return;\n }\n this.keepaliveSvc.stop();\n }\n /*\n * Called by Angular when destroying the instance.\n */\n ngOnDestroy() {\n this.stop();\n this.clearInterrupts();\n }\n}\nIdle.ɵfac = function Idle_Factory(t) { return new (t || Idle)(ɵngcc0.ɵɵinject(IdleExpiry), ɵngcc0.ɵɵinject(ɵngcc0.NgZone), ɵngcc0.ɵɵinject(KeepaliveSvc, 8), ɵngcc0.ɵɵinject(PLATFORM_ID, 8)); };\nIdle.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: Idle, factory: Idle.ɵfac });\nIdle.ctorParameters = () => [\n { type: IdleExpiry },\n { type: NgZone },\n { type: KeepaliveSvc, decorators: [{ type: Optional }] },\n { type: Object, decorators: [{ type: Optional }, { type: Inject, args: [PLATFORM_ID,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(Idle, [{\n type: Injectable\n }], function () { return [{ type: IdleExpiry }, { type: ɵngcc0.NgZone }, { type: KeepaliveSvc, decorators: [{\n type: Optional\n }] }, { type: Object, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [PLATFORM_ID]\n }] }]; }, null); })();\n\n/*\n * A class for expressing arguments to interrupt events.\n */\nclass InterruptArgs {\n constructor(source, innerArgs, force = false) {\n this.source = source;\n this.innerArgs = innerArgs;\n this.force = force;\n }\n}\n\n/*\n * A base for classes that act as a source for interrupts.\n */\nclass InterruptSource {\n constructor(attachFn, detachFn) {\n this.attachFn = attachFn;\n this.detachFn = detachFn;\n this.isAttached = false;\n this.onInterrupt = new EventEmitter();\n }\n /*\n * Attaches to the specified events on the specified source.\n */\n attach() {\n // If the current zone is the 'angular' zone (a.k.a. NgZone) then re-enter this method in its parent zone\n // The parent zone is usually the '<root>' zone but it can also be 'long-stack-trace-zone' in debug mode\n // In tests, the current zone is typically a 'ProxyZone' created by async/fakeAsync (from @angular/core/testing)\n if (Zone.current.get('isAngularZone') === true) {\n Zone.current.parent.run(() => this.attach());\n return;\n }\n if (!this.isAttached && this.attachFn) {\n this.attachFn(this);\n }\n this.isAttached = true;\n }\n /*\n * Detaches from the specified events on the specified source.\n */\n detach() {\n if (this.isAttached && this.detachFn) {\n this.detachFn(this);\n }\n this.isAttached = false;\n }\n}\n\nconst defaultThrottleDelay = 500;\n/*\n * An interrupt source on an EventTarget object, such as a Window or HTMLElement.\n */\nclass EventTargetInterruptSource extends InterruptSource {\n constructor(target, events, opts) {\n super(null, null);\n this.target = target;\n this.events = events;\n this.opts = opts;\n this.eventSubscription = new Subscription();\n if (typeof this.opts === 'number') {\n this.opts = { throttleDelay: this.opts, passive: false };\n }\n this.opts = this.opts || {\n passive: false,\n throttleDelay: defaultThrottleDelay\n };\n if (this.opts.throttleDelay === undefined || this.opts.throttleDelay === null) {\n this.opts.throttleDelay = defaultThrottleDelay;\n }\n this.throttleDelay = this.opts.throttleDelay;\n this.passive = !!this.opts.passive;\n }\n initialize(options) {\n if ((options === null || options === void 0 ? void 0 : options.platformId) && isPlatformServer(options.platformId)) {\n return;\n }\n const eventTarget = typeof this.target === 'function' ? this.target() : this.target;\n const opts = this.passive ? { passive: true } : null;\n const fromEvents = this.events\n .split(' ')\n .map(eventName => fromEvent(eventTarget, eventName, opts));\n this.eventSrc = merge(...fromEvents);\n this.eventSrc = this.eventSrc.pipe(filter(innerArgs => !this.filterEvent(innerArgs)));\n if (this.throttleDelay > 0) {\n this.eventSrc = this.eventSrc.pipe(throttleTime(this.throttleDelay));\n }\n const handler = (innerArgs) => this.onInterrupt.emit(new InterruptArgs(this, innerArgs));\n this.attachFn = () => (this.eventSubscription = this.eventSrc.subscribe(handler));\n this.detachFn = () => this.eventSubscription.unsubscribe();\n }\n /*\n * Checks to see if the event should be filtered. Always returns false unless overriden.\n * @param event - The original event object.\n * @return True if the event should be filtered (don't cause an interrupt); otherwise, false.\n */\n filterEvent(event) {\n return false;\n }\n /**\n * Returns the current options being used.\n * @return The current option values.\n */\n get options() {\n return {\n passive: this.passive,\n throttleDelay: this.throttleDelay\n };\n }\n}\n\n/*\n * An interrupt source that uses events on the document element (html tag).\n */\nclass DocumentInterruptSource extends EventTargetInterruptSource {\n constructor(events, options) {\n super(() => document.documentElement, events, options);\n }\n /*\n * Checks to see if the event should be filtered.\n * @param event - The original event object.\n * @return True if the event should be filtered (don't cause an interrupt); otherwise, false.\n */\n filterEvent(event) {\n // some browser bad input hacks\n if (event.type === 'mousemove' &&\n // fix for Chrome destop notifications\n ((event.originalEvent &&\n event.originalEvent.movementX === 0 &&\n event.originalEvent.movementY === 0) ||\n // fix for webkit fake mousemove\n ((event.movementX !== void 0 && !event.movementX) || !event.movementY))) {\n return true;\n }\n return false;\n }\n}\n\n/*\n * An interrupt source on the Window object.\n */\nclass WindowInterruptSource extends EventTargetInterruptSource {\n constructor(events, options) {\n super(() => window, events, options);\n }\n}\n\n/*\n * An interrupt source on the storage event of Window.\n */\nclass StorageInterruptSource extends WindowInterruptSource {\n constructor(options = 500) {\n super('storage', options);\n }\n /*\n * Checks to see if the event should be filtered.\n * @param event - The original event object.\n * @return True if the event should be filtered (don't cause an interrupt); otherwise, false.\n */\n filterEvent(event) {\n if (event.key &&\n event.key.indexOf('ng2Idle.') >= 0 &&\n event.key.indexOf('.expiry') >= 0) {\n return false;\n }\n return true;\n }\n}\n\n/*\n * Represents a simple in-memory store of expiry values.\n * @extends IdleExpiry\n */\nclass SimpleExpiry extends IdleExpiry {\n constructor() {\n super();\n this.lastValue = null;\n }\n /*\n * Gets or sets the last expiry date.\n * @param value - The expiry value to set; omit to only return the value.\n * @return The current expiry value.\n */\n last(value) {\n if (value !== void 0) {\n this.lastValue = value;\n }\n return this.lastValue;\n }\n}\n\nclass NgIdleModule {\n static forRoot() {\n return {\n ngModule: NgIdleModule,\n providers: [\n LocalStorageExpiry,\n { provide: IdleExpiry, useExisting: LocalStorageExpiry },\n Idle\n ]\n };\n }\n}\nNgIdleModule.ɵfac = function NgIdleModule_Factory(t) { return new (t || NgIdleModule)(); };\nNgIdleModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: NgIdleModule });\nNgIdleModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ providers: [LocalStorage] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgIdleModule, [{\n type: NgModule,\n args: [{\n providers: [LocalStorage]\n }]\n }], null, null); })();\n\nfunction createDefaultInterruptSources(options) {\n return [\n new DocumentInterruptSource('mousemove keydown DOMMouseScroll mousewheel mousedown touchstart touchmove scroll', options),\n new StorageInterruptSource(options)\n ];\n}\nconst DEFAULT_INTERRUPTSOURCES = createDefaultInterruptSources();\n\n/*\n * Public API Surface of core\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AutoResume, DEFAULT_INTERRUPTSOURCES, DocumentInterruptSource, EventTargetInterruptSource, Idle, IdleExpiry, InterruptArgs, InterruptSource, KeepaliveSvc, LocalStorage, LocalStorageExpiry, NgIdleModule, SimpleExpiry, StorageInterruptSource, WindowInterruptSource, createDefaultInterruptSources };\n\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { logger } from '../logger.js';\nimport { getFunctionName } from '../stacktrace.js';\n\n// We keep the handlers globally\nconst handlers = {};\nconst instrumented = {};\n\n/** Add a handler function. */\nfunction addHandler(type, handler) {\n handlers[type] = handlers[type] || [];\n (handlers[type] ).push(handler);\n}\n\n/**\n * Reset all instrumentation handlers.\n * This can be used by tests to ensure we have a clean slate of instrumentation handlers.\n */\nfunction resetInstrumentationHandlers() {\n Object.keys(handlers).forEach(key => {\n handlers[key ] = undefined;\n });\n}\n\n/** Maybe run an instrumentation function, unless it was already called. */\nfunction maybeInstrument(type, instrumentFn) {\n if (!instrumented[type]) {\n instrumented[type] = true;\n try {\n instrumentFn();\n } catch (e) {\n DEBUG_BUILD && logger.error(`Error while instrumenting ${type}`, e);\n }\n }\n}\n\n/** Trigger handlers for a given instrumentation type. */\nfunction triggerHandlers(type, data) {\n const typeHandlers = type && handlers[type];\n if (!typeHandlers) {\n return;\n }\n\n for (const handler of typeHandlers) {\n try {\n handler(data);\n } catch (e) {\n DEBUG_BUILD &&\n logger.error(\n `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(handler)}\\nError:`,\n e,\n );\n }\n }\n}\n\nexport { addHandler, maybeInstrument, resetInstrumentationHandlers, triggerHandlers };\n","import { GLOBAL_OBJ } from '@sentry/core';\n\nconst WINDOW = GLOBAL_OBJ\n\n;\n\nexport { WINDOW };\n","import { addHandler, maybeInstrument, triggerHandlers, fill, addNonEnumerableProperty, uuid4 } from '@sentry/core';\nimport { WINDOW } from '../types.js';\n\nconst DEBOUNCE_DURATION = 1000;\n\nlet debounceTimerID;\nlet lastCapturedEventType;\nlet lastCapturedEventTargetId;\n\n/**\n * Add an instrumentation handler for when a click or a keypress happens.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addClickKeypressInstrumentationHandler(handler) {\n const type = 'dom';\n addHandler(type, handler);\n maybeInstrument(type, instrumentDOM);\n}\n\n/** Exported for tests only. */\nfunction instrumentDOM() {\n if (!WINDOW.document) {\n return;\n }\n\n // Make it so that any click or keypress that is unhandled / bubbled up all the way to the document triggers our dom\n // handlers. (Normally we have only one, which captures a breadcrumb for each click or keypress.) Do this before\n // we instrument `addEventListener` so that we don't end up attaching this handler twice.\n const triggerDOMHandler = triggerHandlers.bind(null, 'dom');\n const globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true);\n WINDOW.document.addEventListener('click', globalDOMEventHandler, false);\n WINDOW.document.addEventListener('keypress', globalDOMEventHandler, false);\n\n // After hooking into click and keypress events bubbled up to `document`, we also hook into user-handled\n // clicks & keypresses, by adding an event listener of our own to any element to which they add a listener. That\n // way, whenever one of their handlers is triggered, ours will be, too. (This is needed because their handler\n // could potentially prevent the event from bubbling up to our global listeners. This way, our handler are still\n // guaranteed to fire at least once.)\n ['EventTarget', 'Node'].forEach((target) => {\n const globalObject = WINDOW ;\n const targetObj = globalObject[target];\n const proto = targetObj && targetObj.prototype;\n\n // eslint-disable-next-line no-prototype-builtins\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function (originalAddEventListener) {\n return function ( type, listener, options) {\n if (type === 'click' || type == 'keypress') {\n try {\n const handlers = (this.__sentry_instrumentation_handlers__ =\n this.__sentry_instrumentation_handlers__ || {});\n const handlerForType = (handlers[type] = handlers[type] || { refCount: 0 });\n\n if (!handlerForType.handler) {\n const handler = makeDOMEventHandler(triggerDOMHandler);\n handlerForType.handler = handler;\n originalAddEventListener.call(this, type, handler, options);\n }\n\n handlerForType.refCount++;\n } catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListeners` calls with no proper `this` context.\n }\n }\n\n return originalAddEventListener.call(this, type, listener, options);\n };\n });\n\n fill(\n proto,\n 'removeEventListener',\n function (originalRemoveEventListener) {\n return function ( type, listener, options) {\n if (type === 'click' || type == 'keypress') {\n try {\n const handlers = this.__sentry_instrumentation_handlers__ || {};\n const handlerForType = handlers[type];\n\n if (handlerForType) {\n handlerForType.refCount--;\n // If there are no longer any custom handlers of the current type on this element, we can remove ours, too.\n if (handlerForType.refCount <= 0) {\n originalRemoveEventListener.call(this, type, handlerForType.handler, options);\n handlerForType.handler = undefined;\n delete handlers[type]; // eslint-disable-line @typescript-eslint/no-dynamic-delete\n }\n\n // If there are no longer any custom handlers of any type on this element, cleanup everything.\n if (Object.keys(handlers).length === 0) {\n delete this.__sentry_instrumentation_handlers__;\n }\n }\n } catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListeners` calls with no proper `this` context.\n }\n }\n\n return originalRemoveEventListener.call(this, type, listener, options);\n };\n },\n );\n });\n}\n\n/**\n * Check whether the event is similar to the last captured one. For example, two click events on the same button.\n */\nfunction isSimilarToLastCapturedEvent(event) {\n // If both events have different type, then user definitely performed two separate actions. e.g. click + keypress.\n if (event.type !== lastCapturedEventType) {\n return false;\n }\n\n try {\n // If both events have the same type, it's still possible that actions were performed on different targets.\n // e.g. 2 clicks on different buttons.\n if (!event.target || (event.target )._sentryId !== lastCapturedEventTargetId) {\n return false;\n }\n } catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n }\n\n // If both events have the same type _and_ same `target` (an element which triggered an event, _not necessarily_\n // to which an event listener was attached), we treat them as the same action, as we want to capture\n // only one breadcrumb. e.g. multiple clicks on the same button, or typing inside a user input box.\n return true;\n}\n\n/**\n * Decide whether an event should be captured.\n * @param event event to be captured\n */\nfunction shouldSkipDOMEvent(eventType, target) {\n // We are only interested in filtering `keypress` events for now.\n if (eventType !== 'keypress') {\n return false;\n }\n\n if (!target || !target.tagName) {\n return true;\n }\n\n // Only consider keypress events on actual input elements. This will disregard keypresses targeting body\n // e.g.tabbing through elements, hotkeys, etc.\n if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {\n return false;\n }\n\n return true;\n}\n\n/**\n * Wraps addEventListener to capture UI breadcrumbs\n */\nfunction makeDOMEventHandler(\n handler,\n globalListener = false,\n) {\n return (event) => {\n // It's possible this handler might trigger multiple times for the same\n // event (e.g. event propagation through node ancestors).\n // Ignore if we've already captured that event.\n if (!event || event['_sentryCaptured']) {\n return;\n }\n\n const target = getEventTarget(event);\n\n // We always want to skip _some_ events.\n if (shouldSkipDOMEvent(event.type, target)) {\n return;\n }\n\n // Mark event as \"seen\"\n addNonEnumerableProperty(event, '_sentryCaptured', true);\n\n if (target && !target._sentryId) {\n // Add UUID to event target so we can identify if\n addNonEnumerableProperty(target, '_sentryId', uuid4());\n }\n\n const name = event.type === 'keypress' ? 'input' : event.type;\n\n // If there is no last captured event, it means that we can safely capture the new event and store it for future comparisons.\n // If there is a last captured event, see if the new event is different enough to treat it as a unique one.\n // If that's the case, emit the previous event and store locally the newly-captured DOM event.\n if (!isSimilarToLastCapturedEvent(event)) {\n const handlerData = { event, name, global: globalListener };\n handler(handlerData);\n lastCapturedEventType = event.type;\n lastCapturedEventTargetId = target ? target._sentryId : undefined;\n }\n\n // Start a new debounce timer that will prevent us from capturing multiple events that should be grouped together.\n clearTimeout(debounceTimerID);\n debounceTimerID = WINDOW.setTimeout(() => {\n lastCapturedEventTargetId = undefined;\n lastCapturedEventType = undefined;\n }, DEBOUNCE_DURATION);\n };\n}\n\nfunction getEventTarget(event) {\n try {\n return event.target ;\n } catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n return null;\n }\n}\n\nexport { addClickKeypressInstrumentationHandler, instrumentDOM };\n","import { addHandler, maybeInstrument, timestampInSeconds, isString, triggerHandlers } from '@sentry/core';\nimport { WINDOW } from '../types.js';\n\nconst SENTRY_XHR_DATA_KEY = '__sentry_xhr_v3__';\n\n/**\n * Add an instrumentation handler for when an XHR request happens.\n * The handler function is called once when the request starts and once when it ends,\n * which can be identified by checking if it has an `endTimestamp`.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addXhrInstrumentationHandler(handler) {\n const type = 'xhr';\n addHandler(type, handler);\n maybeInstrument(type, instrumentXHR);\n}\n\n/** Exported only for tests. */\nfunction instrumentXHR() {\n if (!(WINDOW ).XMLHttpRequest) {\n return;\n }\n\n const xhrproto = XMLHttpRequest.prototype;\n\n // eslint-disable-next-line @typescript-eslint/unbound-method\n xhrproto.open = new Proxy(xhrproto.open, {\n apply(originalOpen, xhrOpenThisArg, xhrOpenArgArray) {\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the error, that was caused by your XHR call did not\n // have a stack trace. If you are using HttpClient integration,\n // this is the expected behavior, as we are using this virtual error to capture\n // the location of your XHR call, and group your HttpClient events accordingly.\n const virtualError = new Error();\n\n const startTimestamp = timestampInSeconds() * 1000;\n\n // open() should always be called with two or more arguments\n // But to be on the safe side, we actually validate this and bail out if we don't have a method & url\n const method = isString(xhrOpenArgArray[0]) ? xhrOpenArgArray[0].toUpperCase() : undefined;\n const url = parseUrl(xhrOpenArgArray[1]);\n\n if (!method || !url) {\n return originalOpen.apply(xhrOpenThisArg, xhrOpenArgArray);\n }\n\n xhrOpenThisArg[SENTRY_XHR_DATA_KEY] = {\n method,\n url,\n request_headers: {},\n };\n\n // if Sentry key appears in URL, don't capture it as a request\n if (method === 'POST' && url.match(/sentry_key/)) {\n xhrOpenThisArg.__sentry_own_request__ = true;\n }\n\n const onreadystatechangeHandler = () => {\n // For whatever reason, this is not the same instance here as from the outer method\n const xhrInfo = xhrOpenThisArg[SENTRY_XHR_DATA_KEY];\n\n if (!xhrInfo) {\n return;\n }\n\n if (xhrOpenThisArg.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n xhrInfo.status_code = xhrOpenThisArg.status;\n } catch (e) {\n /* do nothing */\n }\n\n const handlerData = {\n endTimestamp: timestampInSeconds() * 1000,\n startTimestamp,\n xhr: xhrOpenThisArg,\n virtualError,\n };\n triggerHandlers('xhr', handlerData);\n }\n };\n\n if ('onreadystatechange' in xhrOpenThisArg && typeof xhrOpenThisArg.onreadystatechange === 'function') {\n xhrOpenThisArg.onreadystatechange = new Proxy(xhrOpenThisArg.onreadystatechange, {\n apply(originalOnreadystatechange, onreadystatechangeThisArg, onreadystatechangeArgArray) {\n onreadystatechangeHandler();\n return originalOnreadystatechange.apply(onreadystatechangeThisArg, onreadystatechangeArgArray);\n },\n });\n } else {\n xhrOpenThisArg.addEventListener('readystatechange', onreadystatechangeHandler);\n }\n\n // Intercepting `setRequestHeader` to access the request headers of XHR instance.\n // This will only work for user/library defined headers, not for the default/browser-assigned headers.\n // Request cookies are also unavailable for XHR, as `Cookie` header can't be defined by `setRequestHeader`.\n xhrOpenThisArg.setRequestHeader = new Proxy(xhrOpenThisArg.setRequestHeader, {\n apply(\n originalSetRequestHeader,\n setRequestHeaderThisArg,\n setRequestHeaderArgArray,\n ) {\n const [header, value] = setRequestHeaderArgArray;\n\n const xhrInfo = setRequestHeaderThisArg[SENTRY_XHR_DATA_KEY];\n\n if (xhrInfo && isString(header) && isString(value)) {\n xhrInfo.request_headers[header.toLowerCase()] = value;\n }\n\n return originalSetRequestHeader.apply(setRequestHeaderThisArg, setRequestHeaderArgArray);\n },\n });\n\n return originalOpen.apply(xhrOpenThisArg, xhrOpenArgArray);\n },\n });\n\n // eslint-disable-next-line @typescript-eslint/unbound-method\n xhrproto.send = new Proxy(xhrproto.send, {\n apply(originalSend, sendThisArg, sendArgArray) {\n const sentryXhrData = sendThisArg[SENTRY_XHR_DATA_KEY];\n\n if (!sentryXhrData) {\n return originalSend.apply(sendThisArg, sendArgArray);\n }\n\n if (sendArgArray[0] !== undefined) {\n sentryXhrData.body = sendArgArray[0];\n }\n\n const handlerData = {\n startTimestamp: timestampInSeconds() * 1000,\n xhr: sendThisArg,\n };\n triggerHandlers('xhr', handlerData);\n\n return originalSend.apply(sendThisArg, sendArgArray);\n },\n });\n}\n\nfunction parseUrl(url) {\n if (isString(url)) {\n return url;\n }\n\n try {\n // url can be a string or URL\n // but since URL is not available in IE11, we do not check for it,\n // but simply assume it is an URL and return `toString()` from it (which returns the full URL)\n // If that fails, we just return undefined\n return (url ).toString();\n } catch (e2) {} // eslint-disable-line no-empty\n\n return undefined;\n}\n\nexport { SENTRY_XHR_DATA_KEY, addXhrInstrumentationHandler, instrumentXHR };\n","import { GLOBAL_OBJ } from '../worldwide.js';\n\n// Based on https://github.com/angular/angular.js/pull/13945/files\n// The MIT License\n\n\nconst WINDOW = GLOBAL_OBJ ;\n\n/**\n * Tells whether current environment supports History API\n * {@link supportsHistory}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsHistory() {\n // NOTE: in Chrome App environment, touching history.pushState, *even inside\n // a try/catch block*, will cause Chrome to output an error to console.error\n // borrowed from: https://github.com/angular/angular.js/pull/13945/files\n // TODO(v9): Remove this custom check, it is pretty old and likely not needed anymore\n const chromeVar = (WINDOW ).chrome;\n const isChromePackagedApp = chromeVar && chromeVar.app && chromeVar.app.runtime;\n const hasHistoryApi = 'history' in WINDOW && !!WINDOW.history.pushState && !!WINDOW.history.replaceState;\n\n return !isChromePackagedApp && hasHistoryApi;\n}\n\nexport { supportsHistory };\n","import { addHandler, maybeInstrument, supportsHistory, triggerHandlers, fill } from '@sentry/core';\nimport { WINDOW } from '../types.js';\n\nlet lastHref;\n\n/**\n * Add an instrumentation handler for when a fetch request happens.\n * The handler function is called once when the request starts and once when it ends,\n * which can be identified by checking if it has an `endTimestamp`.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addHistoryInstrumentationHandler(handler) {\n const type = 'history';\n addHandler(type, handler);\n maybeInstrument(type, instrumentHistory);\n}\n\nfunction instrumentHistory() {\n if (!supportsHistory()) {\n return;\n }\n\n const oldOnPopState = WINDOW.onpopstate;\n WINDOW.onpopstate = function ( ...args) {\n const to = WINDOW.location.href;\n // keep track of the current URL state, as we always receive only the updated state\n const from = lastHref;\n lastHref = to;\n const handlerData = { from, to };\n triggerHandlers('history', handlerData);\n if (oldOnPopState) {\n // Apparently this can throw in Firefox when incorrectly implemented plugin is installed.\n // https://github.com/getsentry/sentry-javascript/issues/3344\n // https://github.com/bugsnag/bugsnag-js/issues/469\n try {\n return oldOnPopState.apply(this, args);\n } catch (_oO) {\n // no-empty\n }\n }\n };\n\n function historyReplacementFunction(originalHistoryFunction) {\n return function ( ...args) {\n const url = args.length > 2 ? args[2] : undefined;\n if (url) {\n // coerce to string (this is what pushState does)\n const from = lastHref;\n const to = String(url);\n // keep track of the current URL state, as we always receive only the updated state\n lastHref = to;\n const handlerData = { from, to };\n triggerHandlers('history', handlerData);\n }\n return originalHistoryFunction.apply(this, args);\n };\n }\n\n fill(WINDOW.history, 'pushState', historyReplacementFunction);\n fill(WINDOW.history, 'replaceState', historyReplacementFunction);\n}\n\nexport { addHistoryInstrumentationHandler };\n","import { CONSOLE_LEVELS, originalConsoleMethods } from '../logger.js';\nimport { fill } from '../object.js';\nimport { GLOBAL_OBJ } from '../worldwide.js';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers.js';\n\n/**\n * Add an instrumentation handler for when a console.xxx method is called.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addConsoleInstrumentationHandler(handler) {\n const type = 'console';\n addHandler(type, handler);\n maybeInstrument(type, instrumentConsole);\n}\n\nfunction instrumentConsole() {\n if (!('console' in GLOBAL_OBJ)) {\n return;\n }\n\n CONSOLE_LEVELS.forEach(function (level) {\n if (!(level in GLOBAL_OBJ.console)) {\n return;\n }\n\n fill(GLOBAL_OBJ.console, level, function (originalConsoleMethod) {\n originalConsoleMethods[level] = originalConsoleMethod;\n\n return function (...args) {\n const handlerData = { args, level };\n triggerHandlers('console', handlerData);\n\n const log = originalConsoleMethods[level];\n log && log.apply(GLOBAL_OBJ.console, args);\n };\n });\n });\n}\n\nexport { addConsoleInstrumentationHandler };\n","import { DEBUG_BUILD } from './debug-build.js';\nimport { logger } from './logger.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\nconst WINDOW = GLOBAL_OBJ ;\n\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsErrorEvent() {\n try {\n new ErrorEvent('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsDOMError() {\n try {\n // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n // 1 argument required, but only 0 present.\n // @ts-expect-error It really needs 1 argument, not 0.\n new DOMError('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsDOMException() {\n try {\n new DOMException('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsFetch() {\n if (!('fetch' in WINDOW)) {\n return false;\n }\n\n try {\n new Headers();\n new Request('http://www.example.com');\n new Response();\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * isNative checks if the given function is a native implementation\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction isNativeFunction(func) {\n return func && /^function\\s+\\w+\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\n\n/**\n * Tells whether current environment supports Fetch API natively\n * {@link supportsNativeFetch}.\n *\n * @returns true if `window.fetch` is natively implemented, false otherwise\n */\nfunction supportsNativeFetch() {\n if (typeof EdgeRuntime === 'string') {\n return true;\n }\n\n if (!supportsFetch()) {\n return false;\n }\n\n // Fast path to avoid DOM I/O\n // eslint-disable-next-line @typescript-eslint/unbound-method\n if (isNativeFunction(WINDOW.fetch)) {\n return true;\n }\n\n // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)\n // so create a \"pure\" iframe to see if that has native fetch\n let result = false;\n const doc = WINDOW.document;\n // eslint-disable-next-line deprecation/deprecation\n if (doc && typeof (doc.createElement ) === 'function') {\n try {\n const sandbox = doc.createElement('iframe');\n sandbox.hidden = true;\n doc.head.appendChild(sandbox);\n if (sandbox.contentWindow && sandbox.contentWindow.fetch) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n result = isNativeFunction(sandbox.contentWindow.fetch);\n }\n doc.head.removeChild(sandbox);\n } catch (err) {\n DEBUG_BUILD &&\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n }\n }\n\n return result;\n}\n\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsReportingObserver() {\n return 'ReportingObserver' in WINDOW;\n}\n\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsReferrerPolicy() {\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default'\n // (see https://caniuse.com/#feat=referrer-policy),\n // it doesn't. And it throws an exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n\n if (!supportsFetch()) {\n return false;\n }\n\n try {\n new Request('_', {\n referrerPolicy: 'origin' ,\n });\n return true;\n } catch (e) {\n return false;\n }\n}\n\nexport { isNativeFunction, supportsDOMError, supportsDOMException, supportsErrorEvent, supportsFetch, supportsNativeFetch, supportsReferrerPolicy, supportsReportingObserver };\n","import { isError } from '../is.js';\nimport { fill, addNonEnumerableProperty } from '../object.js';\nimport { supportsNativeFetch } from '../supports.js';\nimport { timestampInSeconds } from '../time.js';\nimport { GLOBAL_OBJ } from '../worldwide.js';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers.js';\n\n/**\n * Add an instrumentation handler for when a fetch request happens.\n * The handler function is called once when the request starts and once when it ends,\n * which can be identified by checking if it has an `endTimestamp`.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addFetchInstrumentationHandler(\n handler,\n skipNativeFetchCheck,\n) {\n const type = 'fetch';\n addHandler(type, handler);\n maybeInstrument(type, () => instrumentFetch(undefined, skipNativeFetchCheck));\n}\n\n/**\n * Add an instrumentation handler for long-lived fetch requests, like consuming server-sent events (SSE) via fetch.\n * The handler will resolve the request body and emit the actual `endTimestamp`, so that the\n * span can be updated accordingly.\n *\n * Only used internally\n * @hidden\n */\nfunction addFetchEndInstrumentationHandler(handler) {\n const type = 'fetch-body-resolved';\n addHandler(type, handler);\n maybeInstrument(type, () => instrumentFetch(streamHandler));\n}\n\nfunction instrumentFetch(onFetchResolved, skipNativeFetchCheck = false) {\n if (skipNativeFetchCheck && !supportsNativeFetch()) {\n return;\n }\n\n fill(GLOBAL_OBJ, 'fetch', function (originalFetch) {\n return function (...args) {\n // We capture the error right here and not in the Promise error callback because Safari (and probably other\n // browsers too) will wipe the stack trace up to this point, only leaving us with this file which is useless.\n\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the error, that was caused by your fetch call did not\n // have a stack trace, so the SDK backfilled the stack trace so\n // you can see which fetch call failed.\n const virtualError = new Error();\n\n const { method, url } = parseFetchArgs(args);\n const handlerData = {\n args,\n fetchData: {\n method,\n url,\n },\n startTimestamp: timestampInSeconds() * 1000,\n // // Adding the error to be able to fingerprint the failed fetch event in HttpClient instrumentation\n virtualError,\n };\n\n // if there is no callback, fetch is instrumented directly\n if (!onFetchResolved) {\n triggerHandlers('fetch', {\n ...handlerData,\n });\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return originalFetch.apply(GLOBAL_OBJ, args).then(\n async (response) => {\n if (onFetchResolved) {\n onFetchResolved(response);\n } else {\n triggerHandlers('fetch', {\n ...handlerData,\n endTimestamp: timestampInSeconds() * 1000,\n response,\n });\n }\n\n return response;\n },\n (error) => {\n triggerHandlers('fetch', {\n ...handlerData,\n endTimestamp: timestampInSeconds() * 1000,\n error,\n });\n\n if (isError(error) && error.stack === undefined) {\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the error, that was caused by your fetch call did not\n // have a stack trace, so the SDK backfilled the stack trace so\n // you can see which fetch call failed.\n error.stack = virtualError.stack;\n addNonEnumerableProperty(error, 'framesToPop', 1);\n }\n\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the sentry.javascript SDK caught an error invoking your application code.\n // This is expected behavior and NOT indicative of a bug with sentry.javascript.\n throw error;\n },\n );\n };\n });\n}\n\nasync function resolveResponse(res, onFinishedResolving) {\n if (res && res.body) {\n const body = res.body;\n const responseReader = body.getReader();\n\n // Define a maximum duration after which we just cancel\n const maxFetchDurationTimeout = setTimeout(\n () => {\n body.cancel().then(null, () => {\n // noop\n });\n },\n 90 * 1000, // 90s\n );\n\n let readingActive = true;\n while (readingActive) {\n let chunkTimeout;\n try {\n // abort reading if read op takes more than 5s\n chunkTimeout = setTimeout(() => {\n body.cancel().then(null, () => {\n // noop on error\n });\n }, 5000);\n\n // This .read() call will reject/throw when we abort due to timeouts through `body.cancel()`\n const { done } = await responseReader.read();\n\n clearTimeout(chunkTimeout);\n\n if (done) {\n onFinishedResolving();\n readingActive = false;\n }\n } catch (error) {\n readingActive = false;\n } finally {\n clearTimeout(chunkTimeout);\n }\n }\n\n clearTimeout(maxFetchDurationTimeout);\n\n responseReader.releaseLock();\n body.cancel().then(null, () => {\n // noop on error\n });\n }\n}\n\nfunction streamHandler(response) {\n // clone response for awaiting stream\n let clonedResponseForResolving;\n try {\n clonedResponseForResolving = response.clone();\n } catch (e) {\n return;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n resolveResponse(clonedResponseForResolving, () => {\n triggerHandlers('fetch-body-resolved', {\n endTimestamp: timestampInSeconds() * 1000,\n response,\n });\n });\n}\n\nfunction hasProp(obj, prop) {\n return !!obj && typeof obj === 'object' && !!(obj )[prop];\n}\n\nfunction getUrlFromResource(resource) {\n if (typeof resource === 'string') {\n return resource;\n }\n\n if (!resource) {\n return '';\n }\n\n if (hasProp(resource, 'url')) {\n return resource.url;\n }\n\n if (resource.toString) {\n return resource.toString();\n }\n\n return '';\n}\n\n/**\n * Parses the fetch arguments to find the used Http method and the url of the request.\n * Exported for tests only.\n */\nfunction parseFetchArgs(fetchArgs) {\n if (fetchArgs.length === 0) {\n return { method: 'GET', url: '' };\n }\n\n if (fetchArgs.length === 2) {\n const [url, options] = fetchArgs ;\n\n return {\n url: getUrlFromResource(url),\n method: hasProp(options, 'method') ? String(options.method).toUpperCase() : 'GET',\n };\n }\n\n const arg = fetchArgs[0];\n return {\n url: getUrlFromResource(arg ),\n method: hasProp(arg, 'method') ? String(arg.method).toUpperCase() : 'GET',\n };\n}\n\nexport { addFetchEndInstrumentationHandler, addFetchInstrumentationHandler, parseFetchArgs };\n","import { getClient } from './currentScopes.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { logger } from './utils-hoist/logger.js';\n\nconst installedIntegrations = [];\n\n/** Map of integrations assigned to a client */\n\n/**\n * Remove duplicates from the given array, preferring the last instance of any duplicate. Not guaranteed to\n * preserve the order of integrations in the array.\n *\n * @private\n */\nfunction filterDuplicates(integrations) {\n const integrationsByName = {};\n\n integrations.forEach((currentInstance) => {\n const { name } = currentInstance;\n\n const existingInstance = integrationsByName[name];\n\n // We want integrations later in the array to overwrite earlier ones of the same type, except that we never want a\n // default instance to overwrite an existing user instance\n if (existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance) {\n return;\n }\n\n integrationsByName[name] = currentInstance;\n });\n\n return Object.values(integrationsByName);\n}\n\n/** Gets integrations to install */\nfunction getIntegrationsToSetup(options) {\n const defaultIntegrations = options.defaultIntegrations || [];\n const userIntegrations = options.integrations;\n\n // We flag default instances, so that later we can tell them apart from any user-created instances of the same class\n defaultIntegrations.forEach((integration) => {\n integration.isDefaultInstance = true;\n });\n\n let integrations;\n\n if (Array.isArray(userIntegrations)) {\n integrations = [...defaultIntegrations, ...userIntegrations];\n } else if (typeof userIntegrations === 'function') {\n const resolvedUserIntegrations = userIntegrations(defaultIntegrations);\n integrations = Array.isArray(resolvedUserIntegrations) ? resolvedUserIntegrations : [resolvedUserIntegrations];\n } else {\n integrations = defaultIntegrations;\n }\n\n const finalIntegrations = filterDuplicates(integrations);\n\n // The `Debug` integration prints copies of the `event` and `hint` which will be passed to `beforeSend` or\n // `beforeSendTransaction`. It therefore has to run after all other integrations, so that the changes of all event\n // processors will be reflected in the printed values. For lack of a more elegant way to guarantee that, we therefore\n // locate it and, assuming it exists, pop it out of its current spot and shove it onto the end of the array.\n const debugIndex = finalIntegrations.findIndex(integration => integration.name === 'Debug');\n if (debugIndex > -1) {\n const [debugInstance] = finalIntegrations.splice(debugIndex, 1) ;\n finalIntegrations.push(debugInstance);\n }\n\n return finalIntegrations;\n}\n\n/**\n * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default\n * integrations are added unless they were already provided before.\n * @param integrations array of integration instances\n * @param withDefault should enable default integrations\n */\nfunction setupIntegrations(client, integrations) {\n const integrationIndex = {};\n\n integrations.forEach(integration => {\n // guard against empty provided integrations\n if (integration) {\n setupIntegration(client, integration, integrationIndex);\n }\n });\n\n return integrationIndex;\n}\n\n/**\n * Execute the `afterAllSetup` hooks of the given integrations.\n */\nfunction afterSetupIntegrations(client, integrations) {\n for (const integration of integrations) {\n // guard against empty provided integrations\n if (integration && integration.afterAllSetup) {\n integration.afterAllSetup(client);\n }\n }\n}\n\n/** Setup a single integration. */\nfunction setupIntegration(client, integration, integrationIndex) {\n if (integrationIndex[integration.name]) {\n DEBUG_BUILD && logger.log(`Integration skipped because it was already installed: ${integration.name}`);\n return;\n }\n integrationIndex[integration.name] = integration;\n\n // `setupOnce` is only called the first time\n if (installedIntegrations.indexOf(integration.name) === -1 && typeof integration.setupOnce === 'function') {\n integration.setupOnce();\n installedIntegrations.push(integration.name);\n }\n\n // `setup` is run for each client\n if (integration.setup && typeof integration.setup === 'function') {\n integration.setup(client);\n }\n\n if (typeof integration.preprocessEvent === 'function') {\n const callback = integration.preprocessEvent.bind(integration) ;\n client.on('preprocessEvent', (event, hint) => callback(event, hint, client));\n }\n\n if (typeof integration.processEvent === 'function') {\n const callback = integration.processEvent.bind(integration) ;\n\n const processor = Object.assign((event, hint) => callback(event, hint, client), {\n id: integration.name,\n });\n\n client.addEventProcessor(processor);\n }\n\n DEBUG_BUILD && logger.log(`Integration installed: ${integration.name}`);\n}\n\n/** Add an integration to the current scope's client. */\nfunction addIntegration(integration) {\n const client = getClient();\n\n if (!client) {\n DEBUG_BUILD && logger.warn(`Cannot add integration \"${integration.name}\" because no SDK Client is available.`);\n return;\n }\n\n client.addIntegration(integration);\n}\n\n/**\n * Define an integration function that can be used to create an integration instance.\n * Note that this by design hides the implementation details of the integration, as they are considered internal.\n */\nfunction defineIntegration(fn) {\n return fn;\n}\n\nexport { addIntegration, afterSetupIntegrations, defineIntegration, getIntegrationsToSetup, installedIntegrations, setupIntegration, setupIntegrations };\n","import { getClient, getIsolationScope } from './currentScopes.js';\nimport { consoleSandbox } from './utils-hoist/logger.js';\nimport { dateTimestampInSeconds } from './utils-hoist/time.js';\n\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\nconst DEFAULT_BREADCRUMBS = 100;\n\n/**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n */\nfunction addBreadcrumb(breadcrumb, hint) {\n const client = getClient();\n const isolationScope = getIsolationScope();\n\n if (!client) return;\n\n const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } = client.getOptions();\n\n if (maxBreadcrumbs <= 0) return;\n\n const timestamp = dateTimestampInSeconds();\n const mergedBreadcrumb = { timestamp, ...breadcrumb };\n const finalBreadcrumb = beforeBreadcrumb\n ? (consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) )\n : mergedBreadcrumb;\n\n if (finalBreadcrumb === null) return;\n\n if (client.emit) {\n client.emit('beforeAddBreadcrumb', finalBreadcrumb, hint);\n }\n\n isolationScope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);\n}\n\nexport { addBreadcrumb };\n","/**\n * @deprecated This variable has been deprecated and will be removed in the next major version.\n */\nconst validSeverityLevels = ['fatal', 'error', 'warning', 'log', 'info', 'debug'];\n\n/**\n * Converts a string-based level into a `SeverityLevel`, normalizing it along the way.\n *\n * @param level String representation of desired `SeverityLevel`.\n * @returns The `SeverityLevel` corresponding to the given string, or 'log' if the string isn't a valid level.\n */\nfunction severityLevelFromString(level) {\n return (\n level === 'warn' ? 'warning' : ['fatal', 'error', 'warning', 'log', 'info', 'debug'].includes(level) ? level : 'log'\n ) ;\n}\n\nexport { severityLevelFromString, validSeverityLevels };\n","/**\n * Determine a breadcrumb's log level (only `warning` or `error`) based on an HTTP status code.\n */\nfunction getBreadcrumbLogLevelFromHttpStatusCode(statusCode) {\n // NOTE: undefined defaults to 'info' in Sentry\n if (statusCode === undefined) {\n return undefined;\n } else if (statusCode >= 400 && statusCode < 500) {\n return 'warning';\n } else if (statusCode >= 500) {\n return 'error';\n } else {\n return undefined;\n }\n}\n\nexport { getBreadcrumbLogLevelFromHttpStatusCode };\n","/**\n * Parses string form of URL into an object\n * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B\n * // intentionally using regex and not <a/> href parsing trick because React Native and other\n * // environments where DOM might not be available\n * @returns parsed URL object\n */\nfunction parseUrl(url) {\n if (!url) {\n return {};\n }\n\n const match = url.match(/^(([^:/?#]+):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n\n if (!match) {\n return {};\n }\n\n // coerce to undefined values to empty string so we don't get 'undefined'\n const query = match[6] || '';\n const fragment = match[8] || '';\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n search: query,\n hash: fragment,\n relative: match[5] + query + fragment, // everything minus origin\n };\n}\n\n/**\n * Strip the query string and fragment off of a given URL or path (if present)\n *\n * @param urlPath Full URL or path, including possible query string and/or fragment\n * @returns URL or path without query string or fragment\n */\nfunction stripUrlQueryAndFragment(urlPath) {\n return (urlPath.split(/[?#]/, 1) )[0];\n}\n\n/**\n * Returns number of URL segments of a passed string URL.\n *\n * @deprecated This function will be removed in the next major version.\n */\n// TODO(v9): Hoist this function into the places where we use it. (as it stands only react router v6 instrumentation)\nfunction getNumberOfUrlSegments(url) {\n // split at '/' or at '\\/' to split regex urls correctly\n return url.split(/\\\\?\\//).filter(s => s.length > 0 && s !== ',').length;\n}\n\n/**\n * Takes a URL object and returns a sanitized string which is safe to use as span name\n * see: https://develop.sentry.dev/sdk/data-handling/#structuring-data\n */\nfunction getSanitizedUrlString(url) {\n const { protocol, host, path } = url;\n\n const filteredHost =\n (host &&\n host\n // Always filter out authority\n .replace(/^.*@/, '[filtered]:[filtered]@')\n // Don't show standard :80 (http) and :443 (https) ports to reduce the noise\n // TODO: Use new URL global if it exists\n .replace(/(:80)$/, '')\n .replace(/(:443)$/, '')) ||\n '';\n\n return `${protocol ? `${protocol}://` : ''}${filteredHost}${path}`;\n}\n\nexport { getNumberOfUrlSegments, getSanitizedUrlString, parseUrl, stripUrlQueryAndFragment };\n","/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nexport { DEBUG_BUILD };\n","import { GLOBAL_OBJ, getOriginalFunction, markFunctionWrapped, addNonEnumerableProperty, withScope, addExceptionTypeValue, addExceptionMechanism, captureException } from '@sentry/core';\n\nconst WINDOW = GLOBAL_OBJ ;\n\nlet ignoreOnError = 0;\n\n/**\n * @hidden\n */\nfunction shouldIgnoreOnError() {\n return ignoreOnError > 0;\n}\n\n/**\n * @hidden\n */\nfunction ignoreNextOnError() {\n // onerror should trigger before setTimeout\n ignoreOnError++;\n setTimeout(() => {\n ignoreOnError--;\n });\n}\n\n// eslint-disable-next-line @typescript-eslint/ban-types\n\n/**\n * Instruments the given function and sends an event to Sentry every time the\n * function throws an exception.\n *\n * @param fn A function to wrap. It is generally safe to pass an unbound function, because the returned wrapper always\n * has a correct `this` context.\n * @returns The wrapped function.\n * @hidden\n */\nfunction wrap(\n fn,\n options\n\n = {},\n) {\n // for future readers what this does is wrap a function and then create\n // a bi-directional wrapping between them.\n //\n // example: wrapped = wrap(original);\n // original.__sentry_wrapped__ -> wrapped\n // wrapped.__sentry_original__ -> original\n\n function isFunction(fn) {\n return typeof fn === 'function';\n }\n\n if (!isFunction(fn)) {\n return fn;\n }\n\n try {\n // if we're dealing with a function that was previously wrapped, return\n // the original wrapper.\n const wrapper = (fn ).__sentry_wrapped__;\n if (wrapper) {\n if (typeof wrapper === 'function') {\n return wrapper;\n } else {\n // If we find that the `__sentry_wrapped__` function is not a function at the time of accessing it, it means\n // that something messed with it. In that case we want to return the originally passed function.\n return fn;\n }\n }\n\n // We don't wanna wrap it twice\n if (getOriginalFunction(fn)) {\n return fn;\n }\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n // Bail on wrapping and return the function as-is (defers to window.onerror).\n return fn;\n }\n\n // Wrap the function itself\n // It is important that `sentryWrapped` is not an arrow function to preserve the context of `this`\n const sentryWrapped = function ( ...args) {\n try {\n // Also wrap arguments that are themselves functions\n const wrappedArguments = args.map(arg => wrap(arg, options));\n\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n return fn.apply(this, wrappedArguments);\n } catch (ex) {\n ignoreNextOnError();\n\n withScope(scope => {\n scope.addEventProcessor(event => {\n if (options.mechanism) {\n addExceptionTypeValue(event, undefined, undefined);\n addExceptionMechanism(event, options.mechanism);\n }\n\n event.extra = {\n ...event.extra,\n arguments: args,\n };\n\n return event;\n });\n\n captureException(ex);\n });\n\n throw ex;\n }\n } ;\n\n // Wrap the wrapped function in a proxy, to ensure any other properties of the original function remain available\n try {\n for (const property in fn) {\n if (Object.prototype.hasOwnProperty.call(fn, property)) {\n sentryWrapped[property ] = fn[property ];\n }\n }\n } catch (e2) {\n // Accessing some objects may throw\n // ref: https://github.com/getsentry/sentry-javascript/issues/1168\n }\n\n // Signal that this function has been wrapped/filled already\n // for both debugging and to prevent it to being wrapped/filled twice\n markFunctionWrapped(sentryWrapped, fn);\n\n addNonEnumerableProperty(fn, '__sentry_wrapped__', sentryWrapped);\n\n // Restore original function name (not all browsers allow that)\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name');\n if (descriptor.configurable) {\n Object.defineProperty(sentryWrapped, 'name', {\n get() {\n return fn.name;\n },\n });\n }\n } catch (e3) {\n // This may throw if e.g. the descriptor does not exist, or a browser does not allow redefining `name`.\n // to save some bytes we simply try-catch this\n }\n\n return sentryWrapped;\n}\n\nexport { WINDOW, ignoreNextOnError, shouldIgnoreOnError, wrap };\n","import { addClickKeypressInstrumentationHandler, addXhrInstrumentationHandler, addHistoryInstrumentationHandler, SENTRY_XHR_DATA_KEY } from '@sentry-internal/browser-utils';\nimport { defineIntegration, addConsoleInstrumentationHandler, addFetchInstrumentationHandler, getClient, addBreadcrumb, getEventDescription, logger, htmlTreeAsString, getComponentName, severityLevelFromString, safeJoin, getBreadcrumbLogLevelFromHttpStatusCode, parseUrl } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { WINDOW } from '../helpers.js';\n\n/* eslint-disable max-lines */\n\n\n/** maxStringLength gets capped to prevent 100 breadcrumbs exceeding 1MB event payload size */\nconst MAX_ALLOWED_STRING_LENGTH = 1024;\n\nconst INTEGRATION_NAME = 'Breadcrumbs';\n\nconst _breadcrumbsIntegration = ((options = {}) => {\n const _options = {\n console: true,\n dom: true,\n fetch: true,\n history: true,\n sentry: true,\n xhr: true,\n ...options,\n };\n\n return {\n name: INTEGRATION_NAME,\n setup(client) {\n if (_options.console) {\n addConsoleInstrumentationHandler(_getConsoleBreadcrumbHandler(client));\n }\n if (_options.dom) {\n addClickKeypressInstrumentationHandler(_getDomBreadcrumbHandler(client, _options.dom));\n }\n if (_options.xhr) {\n addXhrInstrumentationHandler(_getXhrBreadcrumbHandler(client));\n }\n if (_options.fetch) {\n addFetchInstrumentationHandler(_getFetchBreadcrumbHandler(client));\n }\n if (_options.history) {\n addHistoryInstrumentationHandler(_getHistoryBreadcrumbHandler(client));\n }\n if (_options.sentry) {\n client.on('beforeSendEvent', _getSentryBreadcrumbHandler(client));\n }\n },\n };\n}) ;\n\nconst breadcrumbsIntegration = defineIntegration(_breadcrumbsIntegration);\n\n/**\n * Adds a breadcrumb for Sentry events or transactions if this option is enabled.\n */\nfunction _getSentryBreadcrumbHandler(client) {\n return function addSentryBreadcrumb(event) {\n if (getClient() !== client) {\n return;\n }\n\n addBreadcrumb(\n {\n category: `sentry.${event.type === 'transaction' ? 'transaction' : 'event'}`,\n event_id: event.event_id,\n level: event.level,\n message: getEventDescription(event),\n },\n {\n event,\n },\n );\n };\n}\n\n/**\n * A HOC that creates a function that creates breadcrumbs from DOM API calls.\n * This is a HOC so that we get access to dom options in the closure.\n */\nfunction _getDomBreadcrumbHandler(\n client,\n dom,\n) {\n return function _innerDomBreadcrumb(handlerData) {\n if (getClient() !== client) {\n return;\n }\n\n let target;\n let componentName;\n let keyAttrs = typeof dom === 'object' ? dom.serializeAttribute : undefined;\n\n let maxStringLength =\n typeof dom === 'object' && typeof dom.maxStringLength === 'number' ? dom.maxStringLength : undefined;\n if (maxStringLength && maxStringLength > MAX_ALLOWED_STRING_LENGTH) {\n DEBUG_BUILD &&\n logger.warn(\n `\\`dom.maxStringLength\\` cannot exceed ${MAX_ALLOWED_STRING_LENGTH}, but a value of ${maxStringLength} was configured. Sentry will use ${MAX_ALLOWED_STRING_LENGTH} instead.`,\n );\n maxStringLength = MAX_ALLOWED_STRING_LENGTH;\n }\n\n if (typeof keyAttrs === 'string') {\n keyAttrs = [keyAttrs];\n }\n\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n const event = handlerData.event ;\n const element = _isEvent(event) ? event.target : event;\n\n target = htmlTreeAsString(element, { keyAttrs, maxStringLength });\n componentName = getComponentName(element);\n } catch (e) {\n target = '<unknown>';\n }\n\n if (target.length === 0) {\n return;\n }\n\n const breadcrumb = {\n category: `ui.${handlerData.name}`,\n message: target,\n };\n\n if (componentName) {\n breadcrumb.data = { 'ui.component_name': componentName };\n }\n\n addBreadcrumb(breadcrumb, {\n event: handlerData.event,\n name: handlerData.name,\n global: handlerData.global,\n });\n };\n}\n\n/**\n * Creates breadcrumbs from console API calls\n */\nfunction _getConsoleBreadcrumbHandler(client) {\n return function _consoleBreadcrumb(handlerData) {\n if (getClient() !== client) {\n return;\n }\n\n const breadcrumb = {\n category: 'console',\n data: {\n arguments: handlerData.args,\n logger: 'console',\n },\n level: severityLevelFromString(handlerData.level),\n message: safeJoin(handlerData.args, ' '),\n };\n\n if (handlerData.level === 'assert') {\n if (handlerData.args[0] === false) {\n breadcrumb.message = `Assertion failed: ${safeJoin(handlerData.args.slice(1), ' ') || 'console.assert'}`;\n breadcrumb.data.arguments = handlerData.args.slice(1);\n } else {\n // Don't capture a breadcrumb for passed assertions\n return;\n }\n }\n\n addBreadcrumb(breadcrumb, {\n input: handlerData.args,\n level: handlerData.level,\n });\n };\n}\n\n/**\n * Creates breadcrumbs from XHR API calls\n */\nfunction _getXhrBreadcrumbHandler(client) {\n return function _xhrBreadcrumb(handlerData) {\n if (getClient() !== client) {\n return;\n }\n\n const { startTimestamp, endTimestamp } = handlerData;\n\n const sentryXhrData = handlerData.xhr[SENTRY_XHR_DATA_KEY];\n\n // We only capture complete, non-sentry requests\n if (!startTimestamp || !endTimestamp || !sentryXhrData) {\n return;\n }\n\n const { method, url, status_code, body } = sentryXhrData;\n\n const data = {\n method,\n url,\n status_code,\n };\n\n const hint = {\n xhr: handlerData.xhr,\n input: body,\n startTimestamp,\n endTimestamp,\n };\n\n const level = getBreadcrumbLogLevelFromHttpStatusCode(status_code);\n\n addBreadcrumb(\n {\n category: 'xhr',\n data,\n type: 'http',\n level,\n },\n hint,\n );\n };\n}\n\n/**\n * Creates breadcrumbs from fetch API calls\n */\nfunction _getFetchBreadcrumbHandler(client) {\n return function _fetchBreadcrumb(handlerData) {\n if (getClient() !== client) {\n return;\n }\n\n const { startTimestamp, endTimestamp } = handlerData;\n\n // We only capture complete fetch requests\n if (!endTimestamp) {\n return;\n }\n\n if (handlerData.fetchData.url.match(/sentry_key/) && handlerData.fetchData.method === 'POST') {\n // We will not create breadcrumbs for fetch requests that contain `sentry_key` (internal sentry requests)\n return;\n }\n\n if (handlerData.error) {\n const data = handlerData.fetchData;\n const hint = {\n data: handlerData.error,\n input: handlerData.args,\n startTimestamp,\n endTimestamp,\n };\n\n addBreadcrumb(\n {\n category: 'fetch',\n data,\n level: 'error',\n type: 'http',\n },\n hint,\n );\n } else {\n const response = handlerData.response ;\n const data = {\n ...handlerData.fetchData,\n status_code: response && response.status,\n };\n const hint = {\n input: handlerData.args,\n response,\n startTimestamp,\n endTimestamp,\n };\n const level = getBreadcrumbLogLevelFromHttpStatusCode(data.status_code);\n\n addBreadcrumb(\n {\n category: 'fetch',\n data,\n type: 'http',\n level,\n },\n hint,\n );\n }\n };\n}\n\n/**\n * Creates breadcrumbs from history API calls\n */\nfunction _getHistoryBreadcrumbHandler(client) {\n return function _historyBreadcrumb(handlerData) {\n if (getClient() !== client) {\n return;\n }\n\n let from = handlerData.from;\n let to = handlerData.to;\n const parsedLoc = parseUrl(WINDOW.location.href);\n let parsedFrom = from ? parseUrl(from) : undefined;\n const parsedTo = parseUrl(to);\n\n // Initial pushState doesn't provide `from` information\n if (!parsedFrom || !parsedFrom.path) {\n parsedFrom = parsedLoc;\n }\n\n // Use only the path component of the URL if the URL matches the current\n // document (almost all the time when using pushState)\n if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {\n to = parsedTo.relative;\n }\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n from = parsedFrom.relative;\n }\n\n addBreadcrumb({\n category: 'navigation',\n data: {\n from,\n to,\n },\n });\n };\n}\n\nfunction _isEvent(event) {\n return !!event && !!(event ).target;\n}\n\nexport { breadcrumbsIntegration };\n","import { GLOBAL_OBJ } from '../worldwide.js';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers.js';\n\nlet _oldOnErrorHandler = null;\n\n/**\n * Add an instrumentation handler for when an error is captured by the global error handler.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addGlobalErrorInstrumentationHandler(handler) {\n const type = 'error';\n addHandler(type, handler);\n maybeInstrument(type, instrumentError);\n}\n\nfunction instrumentError() {\n _oldOnErrorHandler = GLOBAL_OBJ.onerror;\n\n // Note: The reason we are doing window.onerror instead of window.addEventListener('error')\n // is that we are using this handler in the Loader Script, to handle buffered errors consistently\n GLOBAL_OBJ.onerror = function (\n msg,\n url,\n line,\n column,\n error,\n ) {\n const handlerData = {\n column,\n error,\n line,\n msg,\n url,\n };\n triggerHandlers('error', handlerData);\n\n if (_oldOnErrorHandler) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnErrorHandler.apply(this, arguments);\n }\n\n return false;\n };\n\n GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__ = true;\n}\n\nexport { addGlobalErrorInstrumentationHandler };\n","import { GLOBAL_OBJ } from '../worldwide.js';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers.js';\n\nlet _oldOnUnhandledRejectionHandler = null;\n\n/**\n * Add an instrumentation handler for when an unhandled promise rejection is captured.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addGlobalUnhandledRejectionInstrumentationHandler(\n handler,\n) {\n const type = 'unhandledrejection';\n addHandler(type, handler);\n maybeInstrument(type, instrumentUnhandledRejection);\n}\n\nfunction instrumentUnhandledRejection() {\n _oldOnUnhandledRejectionHandler = GLOBAL_OBJ.onunhandledrejection;\n\n // Note: The reason we are doing window.onunhandledrejection instead of window.addEventListener('unhandledrejection')\n // is that we are using this handler in the Loader Script, to handle buffered rejections consistently\n GLOBAL_OBJ.onunhandledrejection = function (e) {\n const handlerData = e;\n triggerHandlers('unhandledrejection', handlerData);\n\n if (_oldOnUnhandledRejectionHandler) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n }\n\n return true;\n };\n\n GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true;\n}\n\nexport { addGlobalUnhandledRejectionInstrumentationHandler };\n","import { addExceptionMechanism, resolvedSyncPromise, isErrorEvent, isDOMError, isDOMException, addExceptionTypeValue, isError, isPlainObject, isEvent, isParameterizedString, getClient, normalizeToSize, extractExceptionKeysForMessage } from '@sentry/core';\n\n/**\n * This function creates an exception from a JavaScript Error\n */\nfunction exceptionFromError(stackParser, ex) {\n // Get the frames first since Opera can lose the stack if we touch anything else first\n const frames = parseStackFrames(stackParser, ex);\n\n const exception = {\n type: extractType(ex),\n value: extractMessage(ex),\n };\n\n if (frames.length) {\n exception.stacktrace = { frames };\n }\n\n if (exception.type === undefined && exception.value === '') {\n exception.value = 'Unrecoverable error caught';\n }\n\n return exception;\n}\n\nfunction eventFromPlainObject(\n stackParser,\n exception,\n syntheticException,\n isUnhandledRejection,\n) {\n const client = getClient();\n const normalizeDepth = client && client.getOptions().normalizeDepth;\n\n // If we can, we extract an exception from the object properties\n const errorFromProp = getErrorPropertyFromObject(exception);\n\n const extra = {\n __serialized__: normalizeToSize(exception, normalizeDepth),\n };\n\n if (errorFromProp) {\n return {\n exception: {\n values: [exceptionFromError(stackParser, errorFromProp)],\n },\n extra,\n };\n }\n\n const event = {\n exception: {\n values: [\n {\n type: isEvent(exception) ? exception.constructor.name : isUnhandledRejection ? 'UnhandledRejection' : 'Error',\n value: getNonErrorObjectExceptionValue(exception, { isUnhandledRejection }),\n } ,\n ],\n },\n extra,\n } ;\n\n if (syntheticException) {\n const frames = parseStackFrames(stackParser, syntheticException);\n if (frames.length) {\n // event.exception.values[0] has been set above\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values[0].stacktrace = { frames };\n }\n }\n\n return event;\n}\n\nfunction eventFromError(stackParser, ex) {\n return {\n exception: {\n values: [exceptionFromError(stackParser, ex)],\n },\n };\n}\n\n/** Parses stack frames from an error */\nfunction parseStackFrames(\n stackParser,\n ex,\n) {\n // Access and store the stacktrace property before doing ANYTHING\n // else to it because Opera is not very good at providing it\n // reliably in other circumstances.\n const stacktrace = ex.stacktrace || ex.stack || '';\n\n const skipLines = getSkipFirstStackStringLines(ex);\n const framesToPop = getPopFirstTopFrames(ex);\n\n try {\n return stackParser(stacktrace, skipLines, framesToPop);\n } catch (e) {\n // no-empty\n }\n\n return [];\n}\n\n// Based on our own mapping pattern - https://github.com/getsentry/sentry/blob/9f08305e09866c8bd6d0c24f5b0aabdd7dd6c59c/src/sentry/lang/javascript/errormapping.py#L83-L108\nconst reactMinifiedRegexp = /Minified React error #\\d+;/i;\n\n/**\n * Certain known React errors contain links that would be falsely\n * parsed as frames. This function check for these errors and\n * returns number of the stack string lines to skip.\n */\nfunction getSkipFirstStackStringLines(ex) {\n if (ex && reactMinifiedRegexp.test(ex.message)) {\n return 1;\n }\n\n return 0;\n}\n\n/**\n * If error has `framesToPop` property, it means that the\n * creator tells us the first x frames will be useless\n * and should be discarded. Typically error from wrapper function\n * which don't point to the actual location in the developer's code.\n *\n * Example: https://github.com/zertosh/invariant/blob/master/invariant.js#L46\n */\nfunction getPopFirstTopFrames(ex) {\n if (typeof ex.framesToPop === 'number') {\n return ex.framesToPop;\n }\n\n return 0;\n}\n\n// https://developer.mozilla.org/en-US/docs/WebAssembly/JavaScript_interface/Exception\n// @ts-expect-error - WebAssembly.Exception is a valid class\nfunction isWebAssemblyException(exception) {\n // Check for support\n // @ts-expect-error - WebAssembly.Exception is a valid class\n if (typeof WebAssembly !== 'undefined' && typeof WebAssembly.Exception !== 'undefined') {\n // @ts-expect-error - WebAssembly.Exception is a valid class\n return exception instanceof WebAssembly.Exception;\n } else {\n return false;\n }\n}\n\n/**\n * Extracts from errors what we use as the exception `type` in error events.\n *\n * Usually, this is the `name` property on Error objects but WASM errors need to be treated differently.\n */\nfunction extractType(ex) {\n const name = ex && ex.name;\n\n // The name for WebAssembly.Exception Errors needs to be extracted differently.\n // Context: https://github.com/getsentry/sentry-javascript/issues/13787\n if (!name && isWebAssemblyException(ex)) {\n // Emscripten sets array[type, message] to the \"message\" property on the WebAssembly.Exception object\n const hasTypeInMessage = ex.message && Array.isArray(ex.message) && ex.message.length == 2;\n return hasTypeInMessage ? ex.message[0] : 'WebAssembly.Exception';\n }\n\n return name;\n}\n\n/**\n * There are cases where stacktrace.message is an Event object\n * https://github.com/getsentry/sentry-javascript/issues/1949\n * In this specific case we try to extract stacktrace.message.error.message\n */\nfunction extractMessage(ex) {\n const message = ex && ex.message;\n\n if (!message) {\n return 'No error message';\n }\n\n if (message.error && typeof message.error.message === 'string') {\n return message.error.message;\n }\n\n // Emscripten sets array[type, message] to the \"message\" property on the WebAssembly.Exception object\n if (isWebAssemblyException(ex) && Array.isArray(ex.message) && ex.message.length == 2) {\n return ex.message[1];\n }\n\n return message;\n}\n\n/**\n * Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.\n * @hidden\n */\nfunction eventFromException(\n stackParser,\n exception,\n hint,\n attachStacktrace,\n) {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromUnknownInput(stackParser, exception, syntheticException, attachStacktrace);\n addExceptionMechanism(event); // defaults to { type: 'generic', handled: true }\n event.level = 'error';\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\n\n/**\n * Builds and Event from a Message\n * @hidden\n */\nfunction eventFromMessage(\n stackParser,\n message,\n level = 'info',\n hint,\n attachStacktrace,\n) {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n event.level = level;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\n\n/**\n * @hidden\n */\nfunction eventFromUnknownInput(\n stackParser,\n exception,\n syntheticException,\n attachStacktrace,\n isUnhandledRejection,\n) {\n let event;\n\n if (isErrorEvent(exception ) && (exception ).error) {\n // If it is an ErrorEvent with `error` property, extract it to get actual Error\n const errorEvent = exception ;\n return eventFromError(stackParser, errorEvent.error );\n }\n\n // If it is a `DOMError` (which is a legacy API, but still supported in some browsers) then we just extract the name\n // and message, as it doesn't provide anything else. According to the spec, all `DOMExceptions` should also be\n // `Error`s, but that's not the case in IE11, so in that case we treat it the same as we do a `DOMError`.\n //\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMError\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException\n // https://webidl.spec.whatwg.org/#es-DOMException-specialness\n if (isDOMError(exception) || isDOMException(exception )) {\n const domException = exception ;\n\n if ('stack' in (exception )) {\n event = eventFromError(stackParser, exception );\n } else {\n const name = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException');\n const message = domException.message ? `${name}: ${domException.message}` : name;\n event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n addExceptionTypeValue(event, message);\n }\n if ('code' in domException) {\n // eslint-disable-next-line deprecation/deprecation\n event.tags = { ...event.tags, 'DOMException.code': `${domException.code}` };\n }\n\n return event;\n }\n if (isError(exception)) {\n // we have a real Error object, do nothing\n return eventFromError(stackParser, exception);\n }\n if (isPlainObject(exception) || isEvent(exception)) {\n // If it's a plain object or an instance of `Event` (the built-in JS kind, not this SDK's `Event` type), serialize\n // it manually. This will allow us to group events based on top-level keys which is much better than creating a new\n // group on any key/value change.\n const objectException = exception ;\n event = eventFromPlainObject(stackParser, objectException, syntheticException, isUnhandledRejection);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n return event;\n }\n\n // If none of previous checks were valid, then it means that it's not:\n // - an instance of DOMError\n // - an instance of DOMException\n // - an instance of Event\n // - an instance of Error\n // - a valid ErrorEvent (one with an error property)\n // - a plain Object\n //\n // So bail out and capture it as a simple message:\n event = eventFromString(stackParser, exception , syntheticException, attachStacktrace);\n addExceptionTypeValue(event, `${exception}`, undefined);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n\n return event;\n}\n\nfunction eventFromString(\n stackParser,\n message,\n syntheticException,\n attachStacktrace,\n) {\n const event = {};\n\n if (attachStacktrace && syntheticException) {\n const frames = parseStackFrames(stackParser, syntheticException);\n if (frames.length) {\n event.exception = {\n values: [{ value: message, stacktrace: { frames } }],\n };\n }\n addExceptionMechanism(event, { synthetic: true });\n }\n\n if (isParameterizedString(message)) {\n const { __sentry_template_string__, __sentry_template_values__ } = message;\n\n event.logentry = {\n message: __sentry_template_string__,\n params: __sentry_template_values__,\n };\n return event;\n }\n\n event.message = message;\n return event;\n}\n\nfunction getNonErrorObjectExceptionValue(\n exception,\n { isUnhandledRejection },\n) {\n const keys = extractExceptionKeysForMessage(exception);\n const captureType = isUnhandledRejection ? 'promise rejection' : 'exception';\n\n // Some ErrorEvent instances do not have an `error` property, which is why they are not handled before\n // We still want to try to get a decent message for these cases\n if (isErrorEvent(exception)) {\n return `Event \\`ErrorEvent\\` captured as ${captureType} with message \\`${exception.message}\\``;\n }\n\n if (isEvent(exception)) {\n const className = getObjectClassName(exception);\n return `Event \\`${className}\\` (type=${exception.type}) captured as ${captureType}`;\n }\n\n return `Object captured as ${captureType} with keys: ${keys}`;\n}\n\nfunction getObjectClassName(obj) {\n try {\n const prototype = Object.getPrototypeOf(obj);\n return prototype ? prototype.constructor.name : undefined;\n } catch (e) {\n // ignore errors here\n }\n}\n\n/** If a plain object has a property that is an `Error`, return this error. */\nfunction getErrorPropertyFromObject(obj) {\n for (const prop in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, prop)) {\n const value = obj[prop];\n if (value instanceof Error) {\n return value;\n }\n }\n }\n\n return undefined;\n}\n\nexport { eventFromException, eventFromMessage, eventFromUnknownInput, exceptionFromError, extractMessage, extractType };\n","import { defineIntegration, addGlobalErrorInstrumentationHandler, getClient, captureEvent, addGlobalUnhandledRejectionInstrumentationHandler, isPrimitive, isString, getLocationHref, UNKNOWN_FUNCTION, logger } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { eventFromUnknownInput } from '../eventbuilder.js';\nimport { shouldIgnoreOnError } from '../helpers.js';\n\nconst INTEGRATION_NAME = 'GlobalHandlers';\n\nconst _globalHandlersIntegration = ((options = {}) => {\n const _options = {\n onerror: true,\n onunhandledrejection: true,\n ...options,\n };\n\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n Error.stackTraceLimit = 50;\n },\n setup(client) {\n if (_options.onerror) {\n _installGlobalOnErrorHandler(client);\n globalHandlerLog('onerror');\n }\n if (_options.onunhandledrejection) {\n _installGlobalOnUnhandledRejectionHandler(client);\n globalHandlerLog('onunhandledrejection');\n }\n },\n };\n}) ;\n\nconst globalHandlersIntegration = defineIntegration(_globalHandlersIntegration);\n\nfunction _installGlobalOnErrorHandler(client) {\n addGlobalErrorInstrumentationHandler(data => {\n const { stackParser, attachStacktrace } = getOptions();\n\n if (getClient() !== client || shouldIgnoreOnError()) {\n return;\n }\n\n const { msg, url, line, column, error } = data;\n\n const event = _enhanceEventWithInitialFrame(\n eventFromUnknownInput(stackParser, error || msg, undefined, attachStacktrace, false),\n url,\n line,\n column,\n );\n\n event.level = 'error';\n\n captureEvent(event, {\n originalException: error,\n mechanism: {\n handled: false,\n type: 'onerror',\n },\n });\n });\n}\n\nfunction _installGlobalOnUnhandledRejectionHandler(client) {\n addGlobalUnhandledRejectionInstrumentationHandler(e => {\n const { stackParser, attachStacktrace } = getOptions();\n\n if (getClient() !== client || shouldIgnoreOnError()) {\n return;\n }\n\n const error = _getUnhandledRejectionError(e );\n\n const event = isPrimitive(error)\n ? _eventFromRejectionWithPrimitive(error)\n : eventFromUnknownInput(stackParser, error, undefined, attachStacktrace, true);\n\n event.level = 'error';\n\n captureEvent(event, {\n originalException: error,\n mechanism: {\n handled: false,\n type: 'onunhandledrejection',\n },\n });\n });\n}\n\nfunction _getUnhandledRejectionError(error) {\n if (isPrimitive(error)) {\n return error;\n }\n\n // dig the object of the rejection out of known event types\n try {\n\n // PromiseRejectionEvents store the object of the rejection under 'reason'\n // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent\n if ('reason' in (error )) {\n return (error ).reason;\n }\n\n // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents\n // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into\n // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec\n // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and\n // https://github.com/getsentry/sentry-javascript/issues/2380\n if ('detail' in (error ) && 'reason' in (error ).detail) {\n return (error ).detail.reason;\n }\n } catch (e2) {} // eslint-disable-line no-empty\n\n return error;\n}\n\n/**\n * Create an event from a promise rejection where the `reason` is a primitive.\n *\n * @param reason: The `reason` property of the promise rejection\n * @returns An Event object with an appropriate `exception` value\n */\nfunction _eventFromRejectionWithPrimitive(reason) {\n return {\n exception: {\n values: [\n {\n type: 'UnhandledRejection',\n // String() is needed because the Primitive type includes symbols (which can't be automatically stringified)\n value: `Non-Error promise rejection captured with value: ${String(reason)}`,\n },\n ],\n },\n };\n}\n\nfunction _enhanceEventWithInitialFrame(\n event,\n url,\n line,\n column,\n) {\n // event.exception\n const e = (event.exception = event.exception || {});\n // event.exception.values\n const ev = (e.values = e.values || []);\n // event.exception.values[0]\n const ev0 = (ev[0] = ev[0] || {});\n // event.exception.values[0].stacktrace\n const ev0s = (ev0.stacktrace = ev0.stacktrace || {});\n // event.exception.values[0].stacktrace.frames\n const ev0sf = (ev0s.frames = ev0s.frames || []);\n\n const colno = column;\n const lineno = line;\n const filename = isString(url) && url.length > 0 ? url : getLocationHref();\n\n // event.exception.values[0].stacktrace.frames\n if (ev0sf.length === 0) {\n ev0sf.push({\n colno,\n filename,\n function: UNKNOWN_FUNCTION,\n in_app: true,\n lineno,\n });\n }\n\n return event;\n}\n\nfunction globalHandlerLog(type) {\n DEBUG_BUILD && logger.log(`Global Handler attached: ${type}`);\n}\n\nfunction getOptions() {\n const client = getClient();\n const options = (client && client.getOptions()) || {\n stackParser: () => [],\n attachStacktrace: false,\n };\n return options;\n}\n\nexport { globalHandlersIntegration };\n","import { isInstanceOf } from './is.js';\nimport { truncate } from './string.js';\n\n/**\n * Creates exceptions inside `event.exception.values` for errors that are nested on properties based on the `key` parameter.\n */\nfunction applyAggregateErrorsToEvent(\n exceptionFromErrorImplementation,\n parser,\n maxValueLimit = 250,\n key,\n limit,\n event,\n hint,\n) {\n if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return;\n }\n\n // Generally speaking the last item in `event.exception.values` is the exception originating from the original Error\n const originalException =\n event.exception.values.length > 0 ? event.exception.values[event.exception.values.length - 1] : undefined;\n\n // We only create exception grouping if there is an exception in the event.\n if (originalException) {\n event.exception.values = truncateAggregateExceptions(\n aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n hint.originalException ,\n key,\n event.exception.values,\n originalException,\n 0,\n ),\n maxValueLimit,\n );\n }\n}\n\nfunction aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n error,\n key,\n prevExceptions,\n exception,\n exceptionId,\n) {\n if (prevExceptions.length >= limit + 1) {\n return prevExceptions;\n }\n\n let newExceptions = [...prevExceptions];\n\n // Recursively call this function in order to walk down a chain of errors\n if (isInstanceOf(error[key], Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, error[key]);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, key, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n error[key],\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId,\n );\n }\n\n // This will create exception grouping for AggregateErrors\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError\n if (Array.isArray(error.errors)) {\n error.errors.forEach((childError, i) => {\n if (isInstanceOf(childError, Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, childError);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, `errors[${i}]`, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n childError,\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId,\n );\n }\n });\n }\n\n return newExceptions;\n}\n\nfunction applyExceptionGroupFieldsForParentException(exception, exceptionId) {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n exception.mechanism = {\n ...exception.mechanism,\n ...(exception.type === 'AggregateError' && { is_exception_group: true }),\n exception_id: exceptionId,\n };\n}\n\nfunction applyExceptionGroupFieldsForChildException(\n exception,\n source,\n exceptionId,\n parentId,\n) {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n exception.mechanism = {\n ...exception.mechanism,\n type: 'chained',\n source,\n exception_id: exceptionId,\n parent_id: parentId,\n };\n}\n\n/**\n * Truncate the message (exception.value) of all exceptions in the event.\n * Because this event processor is ran after `applyClientOptions`,\n * we need to truncate the message of the added exceptions here.\n */\nfunction truncateAggregateExceptions(exceptions, maxValueLength) {\n return exceptions.map(exception => {\n if (exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n return exception;\n });\n}\n\nexport { applyAggregateErrorsToEvent };\n","import { defineIntegration, applyAggregateErrorsToEvent } from '@sentry/core';\nimport { exceptionFromError } from '../eventbuilder.js';\n\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\n\nconst INTEGRATION_NAME = 'LinkedErrors';\n\nconst _linkedErrorsIntegration = ((options = {}) => {\n const limit = options.limit || DEFAULT_LIMIT;\n const key = options.key || DEFAULT_KEY;\n\n return {\n name: INTEGRATION_NAME,\n preprocessEvent(event, hint, client) {\n const options = client.getOptions();\n\n applyAggregateErrorsToEvent(\n // This differs from the LinkedErrors integration in core by using a different exceptionFromError function\n exceptionFromError,\n options.stackParser,\n options.maxValueLength,\n key,\n limit,\n event,\n hint,\n );\n },\n };\n}) ;\n\n/**\n * Aggregrate linked errors in an event.\n */\nconst linkedErrorsIntegration = defineIntegration(_linkedErrorsIntegration);\n\nexport { linkedErrorsIntegration };\n","import { defineIntegration } from '@sentry/core';\nimport { WINDOW } from '../helpers.js';\n\n/**\n * Collects information about HTTP request headers and\n * attaches them to the event.\n */\nconst httpContextIntegration = defineIntegration(() => {\n return {\n name: 'HttpContext',\n preprocessEvent(event) {\n // if none of the information we want exists, don't bother\n if (!WINDOW.navigator && !WINDOW.location && !WINDOW.document) {\n return;\n }\n\n // grab as much info as exists and add it to the event\n const url = (event.request && event.request.url) || (WINDOW.location && WINDOW.location.href);\n const { referrer } = WINDOW.document || {};\n const { userAgent } = WINDOW.navigator || {};\n\n const headers = {\n ...(event.request && event.request.headers),\n ...(referrer && { Referer: referrer }),\n ...(userAgent && { 'User-Agent': userAgent }),\n };\n const request = { ...event.request, ...(url && { url }), headers };\n\n event.request = request;\n },\n };\n});\n\nexport { httpContextIntegration };\n","import { addHistoryInstrumentationHandler } from '@sentry-internal/browser-utils';\nimport { defineIntegration, logger, startSession, captureSession } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { WINDOW } from '../helpers.js';\n\n/**\n * When added, automatically creates sessions which allow you to track adoption and crashes (crash free rate) in your Releases in Sentry.\n * More information: https://docs.sentry.io/product/releases/health/\n *\n * Note: In order for session tracking to work, you need to set up Releases: https://docs.sentry.io/product/releases/\n */\nconst browserSessionIntegration = defineIntegration(() => {\n return {\n name: 'BrowserSession',\n setupOnce() {\n if (typeof WINDOW.document === 'undefined') {\n DEBUG_BUILD &&\n logger.warn('Using the `browserSessionIntegration` in non-browser environments is not supported.');\n return;\n }\n\n // The session duration for browser sessions does not track a meaningful\n // concept that can be used as a metric.\n // Automatically captured sessions are akin to page views, and thus we\n // discard their duration.\n startSession({ ignoreDuration: true });\n captureSession();\n\n // We want to create a session for every navigation as well\n addHistoryInstrumentationHandler(({ from, to }) => {\n // Don't create an additional session for the initial route or if the location did not change\n if (from !== undefined && from !== to) {\n startSession({ ignoreDuration: true });\n captureSession();\n }\n });\n },\n };\n});\n\nexport { browserSessionIntegration };\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { defineIntegration } from '../integration.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { getEventDescription } from '../utils-hoist/misc.js';\nimport { stringMatchesSomePattern } from '../utils-hoist/string.js';\n\n// \"Script error.\" is hard coded into browsers for errors that it can't read.\n// this is the result of a script being pulled in from an external domain and CORS.\nconst DEFAULT_IGNORE_ERRORS = [\n /^Script error\\.?$/,\n /^Javascript error: Script error\\.? on line 0$/,\n /^ResizeObserver loop completed with undelivered notifications.$/, // The browser logs this when a ResizeObserver handler takes a bit longer. Usually this is not an actual issue though. It indicates slowness.\n /^Cannot redefine property: googletag$/, // This is thrown when google tag manager is used in combination with an ad blocker\n \"undefined is not an object (evaluating 'a.L')\", // Random error that happens but not actionable or noticeable to end-users.\n 'can\\'t redefine non-configurable property \"solana\"', // Probably a browser extension or custom browser (Brave) throwing this error\n \"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)\", // Error thrown by GTM, seemingly not affecting end-users\n \"Can't find variable: _AutofillCallbackHandler\", // Unactionable error in instagram webview https://developers.facebook.com/community/threads/320013549791141/\n /^Non-Error promise rejection captured with value: Object Not Found Matching Id:\\d+, MethodName:simulateEvent, ParamCount:\\d+$/, // unactionable error from CEFSharp, a .NET library that embeds chromium in .NET apps\n];\n\n/** Options for the InboundFilters integration */\n\nconst INTEGRATION_NAME = 'InboundFilters';\nconst _inboundFiltersIntegration = ((options = {}) => {\n return {\n name: INTEGRATION_NAME,\n processEvent(event, _hint, client) {\n const clientOptions = client.getOptions();\n const mergedOptions = _mergeOptions(options, clientOptions);\n return _shouldDropEvent(event, mergedOptions) ? null : event;\n },\n };\n}) ;\n\nconst inboundFiltersIntegration = defineIntegration(_inboundFiltersIntegration);\n\nfunction _mergeOptions(\n internalOptions = {},\n clientOptions = {},\n) {\n return {\n allowUrls: [...(internalOptions.allowUrls || []), ...(clientOptions.allowUrls || [])],\n denyUrls: [...(internalOptions.denyUrls || []), ...(clientOptions.denyUrls || [])],\n ignoreErrors: [\n ...(internalOptions.ignoreErrors || []),\n ...(clientOptions.ignoreErrors || []),\n ...(internalOptions.disableErrorDefaults ? [] : DEFAULT_IGNORE_ERRORS),\n ],\n ignoreTransactions: [...(internalOptions.ignoreTransactions || []), ...(clientOptions.ignoreTransactions || [])],\n ignoreInternal: internalOptions.ignoreInternal !== undefined ? internalOptions.ignoreInternal : true,\n };\n}\n\nfunction _shouldDropEvent(event, options) {\n if (options.ignoreInternal && _isSentryError(event)) {\n DEBUG_BUILD &&\n logger.warn(`Event dropped due to being internal Sentry Error.\\nEvent: ${getEventDescription(event)}`);\n return true;\n }\n if (_isIgnoredError(event, options.ignoreErrors)) {\n DEBUG_BUILD &&\n logger.warn(\n `Event dropped due to being matched by \\`ignoreErrors\\` option.\\nEvent: ${getEventDescription(event)}`,\n );\n return true;\n }\n if (_isUselessError(event)) {\n DEBUG_BUILD &&\n logger.warn(\n `Event dropped due to not having an error message, error type or stacktrace.\\nEvent: ${getEventDescription(\n event,\n )}`,\n );\n return true;\n }\n if (_isIgnoredTransaction(event, options.ignoreTransactions)) {\n DEBUG_BUILD &&\n logger.warn(\n `Event dropped due to being matched by \\`ignoreTransactions\\` option.\\nEvent: ${getEventDescription(event)}`,\n );\n return true;\n }\n if (_isDeniedUrl(event, options.denyUrls)) {\n DEBUG_BUILD &&\n logger.warn(\n `Event dropped due to being matched by \\`denyUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${_getEventFilterUrl(event)}`,\n );\n return true;\n }\n if (!_isAllowedUrl(event, options.allowUrls)) {\n DEBUG_BUILD &&\n logger.warn(\n `Event dropped due to not being matched by \\`allowUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${_getEventFilterUrl(event)}`,\n );\n return true;\n }\n return false;\n}\n\nfunction _isIgnoredError(event, ignoreErrors) {\n // If event.type, this is not an error\n if (event.type || !ignoreErrors || !ignoreErrors.length) {\n return false;\n }\n\n return _getPossibleEventMessages(event).some(message => stringMatchesSomePattern(message, ignoreErrors));\n}\n\nfunction _isIgnoredTransaction(event, ignoreTransactions) {\n if (event.type !== 'transaction' || !ignoreTransactions || !ignoreTransactions.length) {\n return false;\n }\n\n const name = event.transaction;\n return name ? stringMatchesSomePattern(name, ignoreTransactions) : false;\n}\n\nfunction _isDeniedUrl(event, denyUrls) {\n // TODO: Use Glob instead?\n if (!denyUrls || !denyUrls.length) {\n return false;\n }\n const url = _getEventFilterUrl(event);\n return !url ? false : stringMatchesSomePattern(url, denyUrls);\n}\n\nfunction _isAllowedUrl(event, allowUrls) {\n // TODO: Use Glob instead?\n if (!allowUrls || !allowUrls.length) {\n return true;\n }\n const url = _getEventFilterUrl(event);\n return !url ? true : stringMatchesSomePattern(url, allowUrls);\n}\n\nfunction _getPossibleEventMessages(event) {\n const possibleMessages = [];\n\n if (event.message) {\n possibleMessages.push(event.message);\n }\n\n let lastException;\n try {\n // @ts-expect-error Try catching to save bundle size\n lastException = event.exception.values[event.exception.values.length - 1];\n } catch (e) {\n // try catching to save bundle size checking existence of variables\n }\n\n if (lastException) {\n if (lastException.value) {\n possibleMessages.push(lastException.value);\n if (lastException.type) {\n possibleMessages.push(`${lastException.type}: ${lastException.value}`);\n }\n }\n }\n\n return possibleMessages;\n}\n\nfunction _isSentryError(event) {\n try {\n // @ts-expect-error can't be a sentry error if undefined\n return event.exception.values[0].type === 'SentryError';\n } catch (e) {\n // ignore\n }\n return false;\n}\n\nfunction _getLastValidUrl(frames = []) {\n for (let i = frames.length - 1; i >= 0; i--) {\n const frame = frames[i];\n\n if (frame && frame.filename !== '<anonymous>' && frame.filename !== '[native code]') {\n return frame.filename || null;\n }\n }\n\n return null;\n}\n\nfunction _getEventFilterUrl(event) {\n try {\n let frames;\n try {\n // @ts-expect-error we only care about frames if the whole thing here is defined\n frames = event.exception.values[0].stacktrace.frames;\n } catch (e) {\n // ignore\n }\n return frames ? _getLastValidUrl(frames) : null;\n } catch (oO) {\n DEBUG_BUILD && logger.error(`Cannot extract url for event ${getEventDescription(event)}`);\n return null;\n }\n}\n\nfunction _isUselessError(event) {\n if (event.type) {\n // event is not an error\n return false;\n }\n\n // We only want to consider events for dropping that actually have recorded exception values.\n if (!event.exception || !event.exception.values || event.exception.values.length === 0) {\n return false;\n }\n\n return (\n // No top-level message\n !event.message &&\n // There are no exception values that have a stacktrace, a non-generic-Error type or value\n !event.exception.values.some(value => value.stacktrace || (value.type && value.type !== 'Error') || value.value)\n );\n}\n\nexport { inboundFiltersIntegration };\n","import { getClient } from '../currentScopes.js';\nimport { defineIntegration } from '../integration.js';\nimport { getOriginalFunction } from '../utils-hoist/object.js';\n\nlet originalFunctionToString;\n\nconst INTEGRATION_NAME = 'FunctionToString';\n\nconst SETUP_CLIENTS = new WeakMap();\n\nconst _functionToStringIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n originalFunctionToString = Function.prototype.toString;\n\n // intrinsics (like Function.prototype) might be immutable in some environments\n // e.g. Node with --frozen-intrinsics, XS (an embedded JavaScript engine) or SES (a JavaScript proposal)\n try {\n Function.prototype.toString = function ( ...args) {\n const originalFunction = getOriginalFunction(this);\n const context =\n SETUP_CLIENTS.has(getClient() ) && originalFunction !== undefined ? originalFunction : this;\n return originalFunctionToString.apply(context, args);\n };\n } catch (e) {\n // ignore errors here, just don't patch this\n }\n },\n setup(client) {\n SETUP_CLIENTS.set(client, true);\n },\n };\n}) ;\n\n/**\n * Patch toString calls to return proper name for wrapped functions.\n *\n * ```js\n * Sentry.init({\n * integrations: [\n * functionToStringIntegration(),\n * ],\n * });\n * ```\n */\nconst functionToStringIntegration = defineIntegration(_functionToStringIntegration);\n\nexport { functionToStringIntegration };\n","import { defineIntegration } from '../integration.js';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { getFramesFromEvent } from '../utils-hoist/stacktrace.js';\n\nconst INTEGRATION_NAME = 'Dedupe';\n\nconst _dedupeIntegration = (() => {\n let previousEvent;\n\n return {\n name: INTEGRATION_NAME,\n processEvent(currentEvent) {\n // We want to ignore any non-error type events, e.g. transactions or replays\n // These should never be deduped, and also not be compared against as _previousEvent.\n if (currentEvent.type) {\n return currentEvent;\n }\n\n // Juuust in case something goes wrong\n try {\n if (_shouldDropEvent(currentEvent, previousEvent)) {\n DEBUG_BUILD && logger.warn('Event dropped due to being a duplicate of previously captured event.');\n return null;\n }\n } catch (_oO) {} // eslint-disable-line no-empty\n\n return (previousEvent = currentEvent);\n },\n };\n}) ;\n\n/**\n * Deduplication filter.\n */\nconst dedupeIntegration = defineIntegration(_dedupeIntegration);\n\n/** only exported for tests. */\nfunction _shouldDropEvent(currentEvent, previousEvent) {\n if (!previousEvent) {\n return false;\n }\n\n if (_isSameMessageEvent(currentEvent, previousEvent)) {\n return true;\n }\n\n if (_isSameExceptionEvent(currentEvent, previousEvent)) {\n return true;\n }\n\n return false;\n}\n\nfunction _isSameMessageEvent(currentEvent, previousEvent) {\n const currentMessage = currentEvent.message;\n const previousMessage = previousEvent.message;\n\n // If neither event has a message property, they were both exceptions, so bail out\n if (!currentMessage && !previousMessage) {\n return false;\n }\n\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentMessage && !previousMessage) || (!currentMessage && previousMessage)) {\n return false;\n }\n\n if (currentMessage !== previousMessage) {\n return false;\n }\n\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n\n return true;\n}\n\nfunction _isSameExceptionEvent(currentEvent, previousEvent) {\n const previousException = _getExceptionFromEvent(previousEvent);\n const currentException = _getExceptionFromEvent(currentEvent);\n\n if (!previousException || !currentException) {\n return false;\n }\n\n if (previousException.type !== currentException.type || previousException.value !== currentException.value) {\n return false;\n }\n\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n\n return true;\n}\n\nfunction _isSameStacktrace(currentEvent, previousEvent) {\n let currentFrames = getFramesFromEvent(currentEvent);\n let previousFrames = getFramesFromEvent(previousEvent);\n\n // If neither event has a stacktrace, they are assumed to be the same\n if (!currentFrames && !previousFrames) {\n return true;\n }\n\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentFrames && !previousFrames) || (!currentFrames && previousFrames)) {\n return false;\n }\n\n currentFrames = currentFrames ;\n previousFrames = previousFrames ;\n\n // If number of frames differ, they are not the same\n if (previousFrames.length !== currentFrames.length) {\n return false;\n }\n\n // Otherwise, compare the two\n for (let i = 0; i < previousFrames.length; i++) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const frameA = previousFrames[i];\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const frameB = currentFrames[i];\n\n if (\n frameA.filename !== frameB.filename ||\n frameA.lineno !== frameB.lineno ||\n frameA.colno !== frameB.colno ||\n frameA.function !== frameB.function\n ) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction _isSameFingerprint(currentEvent, previousEvent) {\n let currentFingerprint = currentEvent.fingerprint;\n let previousFingerprint = previousEvent.fingerprint;\n\n // If neither event has a fingerprint, they are assumed to be the same\n if (!currentFingerprint && !previousFingerprint) {\n return true;\n }\n\n // If only one event has a fingerprint, but not the other one, they are not the same\n if ((currentFingerprint && !previousFingerprint) || (!currentFingerprint && previousFingerprint)) {\n return false;\n }\n\n currentFingerprint = currentFingerprint ;\n previousFingerprint = previousFingerprint ;\n\n // Otherwise, compare the two\n try {\n return !!(currentFingerprint.join('') === previousFingerprint.join(''));\n } catch (_oO) {\n return false;\n }\n}\n\nfunction _getExceptionFromEvent(event) {\n return event.exception && event.exception.values && event.exception.values[0];\n}\n\nexport { _shouldDropEvent, dedupeIntegration };\n","import { makeDsn, dsnToString } from './utils-hoist/dsn.js';\n\nconst SENTRY_API_VERSION = '7';\n\n/** Returns the prefix to construct Sentry ingestion API endpoints. */\nfunction getBaseApiEndpoint(dsn) {\n const protocol = dsn.protocol ? `${dsn.protocol}:` : '';\n const port = dsn.port ? `:${dsn.port}` : '';\n return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : ''}/api/`;\n}\n\n/** Returns the ingest API endpoint for target. */\nfunction _getIngestEndpoint(dsn) {\n return `${getBaseApiEndpoint(dsn)}${dsn.projectId}/envelope/`;\n}\n\n/** Returns a URL-encoded string with auth config suitable for a query string. */\nfunction _encodedAuth(dsn, sdkInfo) {\n const params = {\n sentry_version: SENTRY_API_VERSION,\n };\n\n if (dsn.publicKey) {\n // We send only the minimum set of required information. See\n // https://github.com/getsentry/sentry-javascript/issues/2572.\n params.sentry_key = dsn.publicKey;\n }\n\n if (sdkInfo) {\n params.sentry_client = `${sdkInfo.name}/${sdkInfo.version}`;\n }\n\n return new URLSearchParams(params).toString();\n}\n\n/**\n * Returns the envelope endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\nfunction getEnvelopeEndpointWithUrlEncodedAuth(dsn, tunnel, sdkInfo) {\n return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, sdkInfo)}`;\n}\n\n/** Returns the url to the report dialog endpoint. */\nfunction getReportDialogEndpoint(\n dsnLike,\n dialogOptions\n\n,\n) {\n const dsn = makeDsn(dsnLike);\n if (!dsn) {\n return '';\n }\n\n const endpoint = `${getBaseApiEndpoint(dsn)}embed/error-page/`;\n\n let encodedOptions = `dsn=${dsnToString(dsn)}`;\n for (const key in dialogOptions) {\n if (key === 'dsn') {\n continue;\n }\n\n if (key === 'onClose') {\n continue;\n }\n\n if (key === 'user') {\n const user = dialogOptions.user;\n if (!user) {\n continue;\n }\n if (user.name) {\n encodedOptions += `&name=${encodeURIComponent(user.name)}`;\n }\n if (user.email) {\n encodedOptions += `&email=${encodeURIComponent(user.email)}`;\n }\n } else {\n encodedOptions += `&${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key] )}`;\n }\n }\n\n return `${endpoint}?${encodedOptions}`;\n}\n\nexport { getEnvelopeEndpointWithUrlEncodedAuth, getReportDialogEndpoint };\n","import { DEBUG_BUILD } from './debug-build.js';\nimport { consoleSandbox, logger } from './logger.js';\n\n/** Regular expression used to parse a Dsn. */\nconst DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+)?)?@)([\\w.-]+)(?::(\\d+))?\\/(.+)/;\n\nfunction isValidProtocol(protocol) {\n return protocol === 'http' || protocol === 'https';\n}\n\n/**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\nfunction dsnToString(dsn, withPassword = false) {\n const { host, path, pass, port, projectId, protocol, publicKey } = dsn;\n return (\n `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` +\n `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n );\n}\n\n/**\n * Parses a Dsn from a given string.\n *\n * @param str A Dsn as string\n * @returns Dsn as DsnComponents or undefined if @param str is not a valid DSN string\n */\nfunction dsnFromString(str) {\n const match = DSN_REGEX.exec(str);\n\n if (!match) {\n // This should be logged to the console\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.error(`Invalid Sentry Dsn: ${str}`);\n });\n return undefined;\n }\n\n const [protocol, publicKey, pass = '', host = '', port = '', lastPath = ''] = match.slice(1);\n let path = '';\n let projectId = lastPath;\n\n const split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop() ;\n }\n\n if (projectId) {\n const projectMatch = projectId.match(/^\\d+/);\n if (projectMatch) {\n projectId = projectMatch[0];\n }\n }\n\n return dsnFromComponents({ host, pass, path, projectId, port, protocol: protocol , publicKey });\n}\n\nfunction dsnFromComponents(components) {\n return {\n protocol: components.protocol,\n publicKey: components.publicKey || '',\n pass: components.pass || '',\n host: components.host,\n port: components.port || '',\n path: components.path || '',\n projectId: components.projectId,\n };\n}\n\nfunction validateDsn(dsn) {\n if (!DEBUG_BUILD) {\n return true;\n }\n\n const { port, projectId, protocol } = dsn;\n\n const requiredComponents = ['protocol', 'publicKey', 'host', 'projectId'];\n const hasMissingRequiredComponent = requiredComponents.find(component => {\n if (!dsn[component]) {\n logger.error(`Invalid Sentry Dsn: ${component} missing`);\n return true;\n }\n return false;\n });\n\n if (hasMissingRequiredComponent) {\n return false;\n }\n\n if (!projectId.match(/^\\d+$/)) {\n logger.error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`);\n return false;\n }\n\n if (!isValidProtocol(protocol)) {\n logger.error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`);\n return false;\n }\n\n if (port && isNaN(parseInt(port, 10))) {\n logger.error(`Invalid Sentry Dsn: Invalid port ${port}`);\n return false;\n }\n\n return true;\n}\n\n/**\n * Creates a valid Sentry Dsn object, identifying a Sentry instance and project.\n * @returns a valid DsnComponents object or `undefined` if @param from is an invalid DSN source\n */\nfunction makeDsn(from) {\n const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);\n if (!components || !validateDsn(components)) {\n return undefined;\n }\n return components;\n}\n\nexport { dsnFromString, dsnToString, makeDsn };\n","import { dsnToString } from './dsn.js';\nimport { normalize } from './normalize.js';\nimport { dropUndefinedKeys } from './object.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\n/**\n * Creates an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nfunction createEnvelope(headers, items = []) {\n return [headers, items] ;\n}\n\n/**\n * Add an item to an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nfunction addItemToEnvelope(envelope, newItem) {\n const [headers, items] = envelope;\n return [headers, [...items, newItem]] ;\n}\n\n/**\n * Convenience function to loop through the items and item types of an envelope.\n * (This function was mostly created because working with envelope types is painful at the moment)\n *\n * If the callback returns true, the rest of the items will be skipped.\n */\nfunction forEachEnvelopeItem(\n envelope,\n callback,\n) {\n const envelopeItems = envelope[1];\n\n for (const envelopeItem of envelopeItems) {\n const envelopeItemType = envelopeItem[0].type;\n const result = callback(envelopeItem, envelopeItemType);\n\n if (result) {\n return true;\n }\n }\n\n return false;\n}\n\n/**\n * Returns true if the envelope contains any of the given envelope item types\n */\nfunction envelopeContainsItemType(envelope, types) {\n return forEachEnvelopeItem(envelope, (_, type) => types.includes(type));\n}\n\n/**\n * Encode a string to UTF8 array.\n */\nfunction encodeUTF8(input) {\n return GLOBAL_OBJ.__SENTRY__ && GLOBAL_OBJ.__SENTRY__.encodePolyfill\n ? GLOBAL_OBJ.__SENTRY__.encodePolyfill(input)\n : new TextEncoder().encode(input);\n}\n\n/**\n * Decode a UTF8 array to string.\n */\nfunction decodeUTF8(input) {\n return GLOBAL_OBJ.__SENTRY__ && GLOBAL_OBJ.__SENTRY__.decodePolyfill\n ? GLOBAL_OBJ.__SENTRY__.decodePolyfill(input)\n : new TextDecoder().decode(input);\n}\n\n/**\n * Serializes an envelope.\n */\nfunction serializeEnvelope(envelope) {\n const [envHeaders, items] = envelope;\n\n // Initially we construct our envelope as a string and only convert to binary chunks if we encounter binary data\n let parts = JSON.stringify(envHeaders);\n\n function append(next) {\n if (typeof parts === 'string') {\n parts = typeof next === 'string' ? parts + next : [encodeUTF8(parts), next];\n } else {\n parts.push(typeof next === 'string' ? encodeUTF8(next) : next);\n }\n }\n\n for (const item of items) {\n const [itemHeaders, payload] = item;\n\n append(`\\n${JSON.stringify(itemHeaders)}\\n`);\n\n if (typeof payload === 'string' || payload instanceof Uint8Array) {\n append(payload);\n } else {\n let stringifiedPayload;\n try {\n stringifiedPayload = JSON.stringify(payload);\n } catch (e) {\n // In case, despite all our efforts to keep `payload` circular-dependency-free, `JSON.stringify()` still\n // fails, we try again after normalizing it again with infinite normalization depth. This of course has a\n // performance impact but in this case a performance hit is better than throwing.\n stringifiedPayload = JSON.stringify(normalize(payload));\n }\n append(stringifiedPayload);\n }\n }\n\n return typeof parts === 'string' ? parts : concatBuffers(parts);\n}\n\nfunction concatBuffers(buffers) {\n const totalLength = buffers.reduce((acc, buf) => acc + buf.length, 0);\n\n const merged = new Uint8Array(totalLength);\n let offset = 0;\n for (const buffer of buffers) {\n merged.set(buffer, offset);\n offset += buffer.length;\n }\n\n return merged;\n}\n\n/**\n * Parses an envelope\n */\nfunction parseEnvelope(env) {\n let buffer = typeof env === 'string' ? encodeUTF8(env) : env;\n\n function readBinary(length) {\n const bin = buffer.subarray(0, length);\n // Replace the buffer with the remaining data excluding trailing newline\n buffer = buffer.subarray(length + 1);\n return bin;\n }\n\n function readJson() {\n let i = buffer.indexOf(0xa);\n // If we couldn't find a newline, we must have found the end of the buffer\n if (i < 0) {\n i = buffer.length;\n }\n\n return JSON.parse(decodeUTF8(readBinary(i))) ;\n }\n\n const envelopeHeader = readJson();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const items = [];\n\n while (buffer.length) {\n const itemHeader = readJson();\n const binaryLength = typeof itemHeader.length === 'number' ? itemHeader.length : undefined;\n\n items.push([itemHeader, binaryLength ? readBinary(binaryLength) : readJson()]);\n }\n\n return [envelopeHeader, items];\n}\n\n/**\n * Creates envelope item for a single span\n */\nfunction createSpanEnvelopeItem(spanJson) {\n const spanHeaders = {\n type: 'span',\n };\n\n return [spanHeaders, spanJson];\n}\n\n/**\n * Creates attachment envelope items\n */\nfunction createAttachmentEnvelopeItem(attachment) {\n const buffer = typeof attachment.data === 'string' ? encodeUTF8(attachment.data) : attachment.data;\n\n return [\n dropUndefinedKeys({\n type: 'attachment',\n length: buffer.length,\n filename: attachment.filename,\n content_type: attachment.contentType,\n attachment_type: attachment.attachmentType,\n }),\n buffer,\n ];\n}\n\nconst ITEM_TYPE_TO_DATA_CATEGORY_MAP = {\n session: 'session',\n sessions: 'session',\n attachment: 'attachment',\n transaction: 'transaction',\n event: 'error',\n client_report: 'internal',\n user_report: 'default',\n profile: 'profile',\n profile_chunk: 'profile',\n replay_event: 'replay',\n replay_recording: 'replay',\n check_in: 'monitor',\n feedback: 'feedback',\n span: 'span',\n statsd: 'metric_bucket',\n raw_security: 'security',\n};\n\n/**\n * Maps the type of an envelope item to a data category.\n */\nfunction envelopeItemTypeToDataCategory(type) {\n return ITEM_TYPE_TO_DATA_CATEGORY_MAP[type];\n}\n\n/** Extracts the minimal SDK info from the metadata or an events */\nfunction getSdkMetadataForEnvelopeHeader(metadataOrEvent) {\n if (!metadataOrEvent || !metadataOrEvent.sdk) {\n return;\n }\n const { name, version } = metadataOrEvent.sdk;\n return { name, version };\n}\n\n/**\n * Creates event envelope headers, based on event, sdk info and tunnel\n * Note: This function was extracted from the core package to make it available in Replay\n */\nfunction createEventEnvelopeHeaders(\n event,\n sdkInfo,\n tunnel,\n dsn,\n) {\n const dynamicSamplingContext = event.sdkProcessingMetadata && event.sdkProcessingMetadata.dynamicSamplingContext;\n return {\n event_id: event.event_id ,\n sent_at: new Date().toISOString(),\n ...(sdkInfo && { sdk: sdkInfo }),\n ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n ...(dynamicSamplingContext && {\n trace: dropUndefinedKeys({ ...dynamicSamplingContext }),\n }),\n };\n}\n\nexport { addItemToEnvelope, createAttachmentEnvelopeItem, createEnvelope, createEventEnvelopeHeaders, createSpanEnvelopeItem, envelopeContainsItemType, envelopeItemTypeToDataCategory, forEachEnvelopeItem, getSdkMetadataForEnvelopeHeader, parseEnvelope, serializeEnvelope };\n","/** An error emitted by Sentry SDKs and related utilities. */\nclass SentryError extends Error {\n\n constructor(\n message,\n logLevel = 'warn',\n ) {\n super(message);this.message = message;\n this.logLevel = logLevel;\n }\n}\n\nexport { SentryError };\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { logger } from '../utils-hoist/logger.js';\n\n/**\n * Parse a sample rate from a given value.\n * This will either return a boolean or number sample rate, if the sample rate is valid (between 0 and 1).\n * If a string is passed, we try to convert it to a number.\n *\n * Any invalid sample rate will return `undefined`.\n */\nfunction parseSampleRate(sampleRate) {\n if (typeof sampleRate === 'boolean') {\n return Number(sampleRate);\n }\n\n const rate = typeof sampleRate === 'string' ? parseFloat(sampleRate) : sampleRate;\n if (typeof rate !== 'number' || isNaN(rate) || rate < 0 || rate > 1) {\n DEBUG_BUILD &&\n logger.warn(\n `[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(\n sampleRate,\n )} of type ${JSON.stringify(typeof sampleRate)}.`,\n );\n return undefined;\n }\n\n return rate;\n}\n\nexport { parseSampleRate };\n","import { getEnvelopeEndpointWithUrlEncodedAuth } from './api.js';\nimport { getTraceContextFromScope, getCurrentScope, getIsolationScope } from './currentScopes.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { createEventEnvelope, createSessionEnvelope } from './envelope.js';\nimport { setupIntegration, afterSetupIntegrations, setupIntegrations } from './integration.js';\nimport { updateSession } from './session.js';\nimport { getDynamicSamplingContextFromScope } from './tracing/dynamicSamplingContext.js';\nimport { createClientReportEnvelope } from './utils-hoist/clientreport.js';\nimport { makeDsn, dsnToString } from './utils-hoist/dsn.js';\nimport { addItemToEnvelope, createAttachmentEnvelopeItem } from './utils-hoist/envelope.js';\nimport { SentryError } from './utils-hoist/error.js';\nimport { isPrimitive, isThenable, isPlainObject, isParameterizedString } from './utils-hoist/is.js';\nimport { logger, consoleSandbox } from './utils-hoist/logger.js';\nimport { uuid4, checkOrSetAlreadyCaught } from './utils-hoist/misc.js';\nimport { resolvedSyncPromise, SyncPromise, rejectedSyncPromise } from './utils-hoist/syncpromise.js';\nimport { parseSampleRate } from './utils/parseSampleRate.js';\nimport { prepareEvent } from './utils/prepareEvent.js';\nimport { showSpanDropWarning } from './utils/spanUtils.js';\n\nconst ALREADY_SEEN_ERROR = \"Not capturing exception because it's already been captured.\";\n\n/**\n * Base implementation for all JavaScript SDK clients.\n *\n * Call the constructor with the corresponding options\n * specific to the client subclass. To access these options later, use\n * {@link Client.getOptions}.\n *\n * If a Dsn is specified in the options, it will be parsed and stored. Use\n * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is\n * invalid, the constructor will throw a {@link SentryException}. Note that\n * without a valid Dsn, the SDK will not send any events to Sentry.\n *\n * Before sending an event, it is passed through\n * {@link BaseClient._prepareEvent} to add SDK information and scope data\n * (breadcrumbs and context). To add more custom information, override this\n * method and extend the resulting prepared event.\n *\n * To issue automatically created events (e.g. via instrumentation), use\n * {@link Client.captureEvent}. It will prepare the event and pass it through\n * the callback lifecycle. To issue auto-breadcrumbs, use\n * {@link Client.addBreadcrumb}.\n *\n * @example\n * class NodeClient extends BaseClient<NodeOptions> {\n * public constructor(options: NodeOptions) {\n * super(options);\n * }\n *\n * // ...\n * }\n */\nclass BaseClient {\n /** Options passed to the SDK. */\n\n /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */\n\n /** Array of set up integrations. */\n\n /** Number of calls being processed */\n\n /** Holds flushable */\n\n // eslint-disable-next-line @typescript-eslint/ban-types\n\n /**\n * Initializes this client instance.\n *\n * @param options Options for the client.\n */\n constructor(options) {\n this._options = options;\n this._integrations = {};\n this._numProcessing = 0;\n this._outcomes = {};\n this._hooks = {};\n this._eventProcessors = [];\n\n if (options.dsn) {\n this._dsn = makeDsn(options.dsn);\n } else {\n DEBUG_BUILD && logger.warn('No DSN provided, client will not send events.');\n }\n\n if (this._dsn) {\n const url = getEnvelopeEndpointWithUrlEncodedAuth(\n this._dsn,\n options.tunnel,\n options._metadata ? options._metadata.sdk : undefined,\n );\n this._transport = options.transport({\n tunnel: this._options.tunnel,\n recordDroppedEvent: this.recordDroppedEvent.bind(this),\n ...options.transportOptions,\n url,\n });\n }\n\n // TODO(v9): Remove this deprecation warning\n const tracingOptions = ['enableTracing', 'tracesSampleRate', 'tracesSampler'] ;\n const undefinedOption = tracingOptions.find(option => option in options && options[option] == undefined);\n if (undefinedOption) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn(\n `[Sentry] Deprecation warning: \\`${undefinedOption}\\` is set to undefined, which leads to tracing being enabled. In v9, a value of \\`undefined\\` will result in tracing being disabled.`,\n );\n });\n }\n }\n\n /**\n * @inheritDoc\n */\n captureException(exception, hint, scope) {\n const eventId = uuid4();\n\n // ensure we haven't captured this very object before\n if (checkOrSetAlreadyCaught(exception)) {\n DEBUG_BUILD && logger.log(ALREADY_SEEN_ERROR);\n return eventId;\n }\n\n const hintWithEventId = {\n event_id: eventId,\n ...hint,\n };\n\n this._process(\n this.eventFromException(exception, hintWithEventId).then(event =>\n this._captureEvent(event, hintWithEventId, scope),\n ),\n );\n\n return hintWithEventId.event_id;\n }\n\n /**\n * @inheritDoc\n */\n captureMessage(\n message,\n level,\n hint,\n currentScope,\n ) {\n const hintWithEventId = {\n event_id: uuid4(),\n ...hint,\n };\n\n const eventMessage = isParameterizedString(message) ? message : String(message);\n\n const promisedEvent = isPrimitive(message)\n ? this.eventFromMessage(eventMessage, level, hintWithEventId)\n : this.eventFromException(message, hintWithEventId);\n\n this._process(promisedEvent.then(event => this._captureEvent(event, hintWithEventId, currentScope)));\n\n return hintWithEventId.event_id;\n }\n\n /**\n * @inheritDoc\n */\n captureEvent(event, hint, currentScope) {\n const eventId = uuid4();\n\n // ensure we haven't captured this very object before\n if (hint && hint.originalException && checkOrSetAlreadyCaught(hint.originalException)) {\n DEBUG_BUILD && logger.log(ALREADY_SEEN_ERROR);\n return eventId;\n }\n\n const hintWithEventId = {\n event_id: eventId,\n ...hint,\n };\n\n const sdkProcessingMetadata = event.sdkProcessingMetadata || {};\n const capturedSpanScope = sdkProcessingMetadata.capturedSpanScope;\n\n this._process(this._captureEvent(event, hintWithEventId, capturedSpanScope || currentScope));\n\n return hintWithEventId.event_id;\n }\n\n /**\n * @inheritDoc\n */\n captureSession(session) {\n if (!(typeof session.release === 'string')) {\n DEBUG_BUILD && logger.warn('Discarded session because of missing or non-string release');\n } else {\n this.sendSession(session);\n // After sending, we set init false to indicate it's not the first occurrence\n updateSession(session, { init: false });\n }\n }\n\n /**\n * @inheritDoc\n */\n getDsn() {\n return this._dsn;\n }\n\n /**\n * @inheritDoc\n */\n getOptions() {\n return this._options;\n }\n\n /**\n * @see SdkMetadata\n *\n * @return The metadata of the SDK\n */\n getSdkMetadata() {\n return this._options._metadata;\n }\n\n /**\n * @inheritDoc\n */\n getTransport() {\n return this._transport;\n }\n\n /**\n * @inheritDoc\n */\n flush(timeout) {\n const transport = this._transport;\n if (transport) {\n this.emit('flush');\n return this._isClientDoneProcessing(timeout).then(clientFinished => {\n return transport.flush(timeout).then(transportFlushed => clientFinished && transportFlushed);\n });\n } else {\n return resolvedSyncPromise(true);\n }\n }\n\n /**\n * @inheritDoc\n */\n close(timeout) {\n return this.flush(timeout).then(result => {\n this.getOptions().enabled = false;\n this.emit('close');\n return result;\n });\n }\n\n /** Get all installed event processors. */\n getEventProcessors() {\n return this._eventProcessors;\n }\n\n /** @inheritDoc */\n addEventProcessor(eventProcessor) {\n this._eventProcessors.push(eventProcessor);\n }\n\n /** @inheritdoc */\n init() {\n if (\n this._isEnabled() ||\n // Force integrations to be setup even if no DSN was set when we have\n // Spotlight enabled. This is particularly important for browser as we\n // don't support the `spotlight` option there and rely on the users\n // adding the `spotlightBrowserIntegration()` to their integrations which\n // wouldn't get initialized with the check below when there's no DSN set.\n this._options.integrations.some(({ name }) => name.startsWith('Spotlight'))\n ) {\n this._setupIntegrations();\n }\n }\n\n /**\n * Gets an installed integration by its name.\n *\n * @returns The installed integration or `undefined` if no integration with that `name` was installed.\n */\n getIntegrationByName(integrationName) {\n return this._integrations[integrationName] ;\n }\n\n /**\n * @inheritDoc\n */\n addIntegration(integration) {\n const isAlreadyInstalled = this._integrations[integration.name];\n\n // This hook takes care of only installing if not already installed\n setupIntegration(this, integration, this._integrations);\n // Here we need to check manually to make sure to not run this multiple times\n if (!isAlreadyInstalled) {\n afterSetupIntegrations(this, [integration]);\n }\n }\n\n /**\n * @inheritDoc\n */\n sendEvent(event, hint = {}) {\n this.emit('beforeSendEvent', event, hint);\n\n let env = createEventEnvelope(event, this._dsn, this._options._metadata, this._options.tunnel);\n\n for (const attachment of hint.attachments || []) {\n env = addItemToEnvelope(env, createAttachmentEnvelopeItem(attachment));\n }\n\n const promise = this.sendEnvelope(env);\n if (promise) {\n promise.then(sendResponse => this.emit('afterSendEvent', event, sendResponse), null);\n }\n }\n\n /**\n * @inheritDoc\n */\n sendSession(session) {\n const env = createSessionEnvelope(session, this._dsn, this._options._metadata, this._options.tunnel);\n\n // sendEnvelope should not throw\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.sendEnvelope(env);\n }\n\n /**\n * @inheritDoc\n */\n recordDroppedEvent(reason, category, eventOrCount) {\n if (this._options.sendClientReports) {\n // TODO v9: We do not need the `event` passed as third argument anymore, and can possibly remove this overload\n // If event is passed as third argument, we assume this is a count of 1\n const count = typeof eventOrCount === 'number' ? eventOrCount : 1;\n\n // We want to track each category (error, transaction, session, replay_event) separately\n // but still keep the distinction between different type of outcomes.\n // We could use nested maps, but it's much easier to read and type this way.\n // A correct type for map-based implementation if we want to go that route\n // would be `Partial<Record<SentryRequestType, Partial<Record<Outcome, number>>>>`\n // With typescript 4.1 we could even use template literal types\n const key = `${reason}:${category}`;\n DEBUG_BUILD && logger.log(`Recording outcome: \"${key}\"${count > 1 ? ` (${count} times)` : ''}`);\n this._outcomes[key] = (this._outcomes[key] || 0) + count;\n }\n }\n\n // Keep on() & emit() signatures in sync with types' client.ts interface\n /* eslint-disable @typescript-eslint/unified-signatures */\n\n /** @inheritdoc */\n\n /** @inheritdoc */\n on(hook, callback) {\n const hooks = (this._hooks[hook] = this._hooks[hook] || []);\n\n // @ts-expect-error We assume the types are correct\n hooks.push(callback);\n\n // This function returns a callback execution handler that, when invoked,\n // deregisters a callback. This is crucial for managing instances where callbacks\n // need to be unregistered to prevent self-referencing in callback closures,\n // ensuring proper garbage collection.\n return () => {\n // @ts-expect-error We assume the types are correct\n const cbIndex = hooks.indexOf(callback);\n if (cbIndex > -1) {\n hooks.splice(cbIndex, 1);\n }\n };\n }\n\n /** @inheritdoc */\n\n /** @inheritdoc */\n emit(hook, ...rest) {\n const callbacks = this._hooks[hook];\n if (callbacks) {\n callbacks.forEach(callback => callback(...rest));\n }\n }\n\n /**\n * @inheritdoc\n */\n sendEnvelope(envelope) {\n this.emit('beforeEnvelope', envelope);\n\n if (this._isEnabled() && this._transport) {\n return this._transport.send(envelope).then(null, reason => {\n DEBUG_BUILD && logger.error('Error while sending envelope:', reason);\n return reason;\n });\n }\n\n DEBUG_BUILD && logger.error('Transport disabled');\n\n return resolvedSyncPromise({});\n }\n\n /* eslint-enable @typescript-eslint/unified-signatures */\n\n /** Setup integrations for this client. */\n _setupIntegrations() {\n const { integrations } = this._options;\n this._integrations = setupIntegrations(this, integrations);\n afterSetupIntegrations(this, integrations);\n }\n\n /** Updates existing session based on the provided event */\n _updateSessionFromEvent(session, event) {\n let crashed = event.level === 'fatal';\n let errored = false;\n const exceptions = event.exception && event.exception.values;\n\n if (exceptions) {\n errored = true;\n\n for (const ex of exceptions) {\n const mechanism = ex.mechanism;\n if (mechanism && mechanism.handled === false) {\n crashed = true;\n break;\n }\n }\n }\n\n // A session is updated and that session update is sent in only one of the two following scenarios:\n // 1. Session with non terminal status and 0 errors + an error occurred -> Will set error count to 1 and send update\n // 2. Session with non terminal status and 1 error + a crash occurred -> Will set status crashed and send update\n const sessionNonTerminal = session.status === 'ok';\n const shouldUpdateAndSend = (sessionNonTerminal && session.errors === 0) || (sessionNonTerminal && crashed);\n\n if (shouldUpdateAndSend) {\n updateSession(session, {\n ...(crashed && { status: 'crashed' }),\n errors: session.errors || Number(errored || crashed),\n });\n this.captureSession(session);\n }\n }\n\n /**\n * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying\n * \"no\" (resolving to `false`) in order to give the client a chance to potentially finish first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not\n * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and\n * `false` otherwise\n */\n _isClientDoneProcessing(timeout) {\n return new SyncPromise(resolve => {\n let ticked = 0;\n const tick = 1;\n\n const interval = setInterval(() => {\n if (this._numProcessing == 0) {\n clearInterval(interval);\n resolve(true);\n } else {\n ticked += tick;\n if (timeout && ticked >= timeout) {\n clearInterval(interval);\n resolve(false);\n }\n }\n }, tick);\n });\n }\n\n /** Determines whether this SDK is enabled and a transport is present. */\n _isEnabled() {\n return this.getOptions().enabled !== false && this._transport !== undefined;\n }\n\n /**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param currentScope A scope containing event metadata.\n * @returns A new event with more information.\n */\n _prepareEvent(\n event,\n hint,\n currentScope = getCurrentScope(),\n isolationScope = getIsolationScope(),\n ) {\n const options = this.getOptions();\n const integrations = Object.keys(this._integrations);\n if (!hint.integrations && integrations.length > 0) {\n hint.integrations = integrations;\n }\n\n this.emit('preprocessEvent', event, hint);\n\n if (!event.type) {\n isolationScope.setLastEventId(event.event_id || hint.event_id);\n }\n\n return prepareEvent(options, event, hint, currentScope, this, isolationScope).then(evt => {\n if (evt === null) {\n return evt;\n }\n\n evt.contexts = {\n trace: getTraceContextFromScope(currentScope),\n ...evt.contexts,\n };\n\n const dynamicSamplingContext = getDynamicSamplingContextFromScope(this, currentScope);\n\n evt.sdkProcessingMetadata = {\n dynamicSamplingContext,\n ...evt.sdkProcessingMetadata,\n };\n\n return evt;\n });\n }\n\n /**\n * Processes the event and logs an error in case of rejection\n * @param event\n * @param hint\n * @param scope\n */\n _captureEvent(event, hint = {}, scope) {\n return this._processEvent(event, hint, scope).then(\n finalEvent => {\n return finalEvent.event_id;\n },\n reason => {\n if (DEBUG_BUILD) {\n // If something's gone wrong, log the error as a warning. If it's just us having used a `SentryError` for\n // control flow, log just the message (no stack) as a log-level log.\n if (reason instanceof SentryError && reason.logLevel === 'log') {\n logger.log(reason.message);\n } else {\n logger.warn(reason);\n }\n }\n return undefined;\n },\n );\n }\n\n /**\n * Processes an event (either error or message) and sends it to Sentry.\n *\n * This also adds breadcrumbs and context information to the event. However,\n * platform specific meta data (such as the User's IP address) must be added\n * by the SDK implementor.\n *\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n * @param currentScope A scope containing event metadata.\n * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.\n */\n _processEvent(event, hint, currentScope) {\n const options = this.getOptions();\n const { sampleRate } = options;\n\n const isTransaction = isTransactionEvent(event);\n const isError = isErrorEvent(event);\n const eventType = event.type || 'error';\n const beforeSendLabel = `before send for type \\`${eventType}\\``;\n\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n // Sampling for transaction happens somewhere else\n const parsedSampleRate = typeof sampleRate === 'undefined' ? undefined : parseSampleRate(sampleRate);\n if (isError && typeof parsedSampleRate === 'number' && Math.random() > parsedSampleRate) {\n this.recordDroppedEvent('sample_rate', 'error', event);\n return rejectedSyncPromise(\n new SentryError(\n `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`,\n 'log',\n ),\n );\n }\n\n const dataCategory = eventType === 'replay_event' ? 'replay' : eventType;\n\n const sdkProcessingMetadata = event.sdkProcessingMetadata || {};\n const capturedSpanIsolationScope = sdkProcessingMetadata.capturedSpanIsolationScope;\n\n return this._prepareEvent(event, hint, currentScope, capturedSpanIsolationScope)\n .then(prepared => {\n if (prepared === null) {\n this.recordDroppedEvent('event_processor', dataCategory, event);\n throw new SentryError('An event processor returned `null`, will not send event.', 'log');\n }\n\n const isInternalException = hint.data && (hint.data ).__sentry__ === true;\n if (isInternalException) {\n return prepared;\n }\n\n const result = processBeforeSend(this, options, prepared, hint);\n return _validateBeforeSendResult(result, beforeSendLabel);\n })\n .then(processedEvent => {\n if (processedEvent === null) {\n this.recordDroppedEvent('before_send', dataCategory, event);\n if (isTransaction) {\n const spans = event.spans || [];\n // the transaction itself counts as one span, plus all the child spans that are added\n const spanCount = 1 + spans.length;\n this.recordDroppedEvent('before_send', 'span', spanCount);\n }\n throw new SentryError(`${beforeSendLabel} returned \\`null\\`, will not send event.`, 'log');\n }\n\n const session = currentScope && currentScope.getSession();\n if (!isTransaction && session) {\n this._updateSessionFromEvent(session, processedEvent);\n }\n\n if (isTransaction) {\n const spanCountBefore =\n (processedEvent.sdkProcessingMetadata && processedEvent.sdkProcessingMetadata.spanCountBeforeProcessing) ||\n 0;\n const spanCountAfter = processedEvent.spans ? processedEvent.spans.length : 0;\n\n const droppedSpanCount = spanCountBefore - spanCountAfter;\n if (droppedSpanCount > 0) {\n this.recordDroppedEvent('before_send', 'span', droppedSpanCount);\n }\n }\n\n // None of the Sentry built event processor will update transaction name,\n // so if the transaction name has been changed by an event processor, we know\n // it has to come from custom event processor added by a user\n const transactionInfo = processedEvent.transaction_info;\n if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {\n const source = 'custom';\n processedEvent.transaction_info = {\n ...transactionInfo,\n source,\n };\n }\n\n this.sendEvent(processedEvent, hint);\n return processedEvent;\n })\n .then(null, reason => {\n if (reason instanceof SentryError) {\n throw reason;\n }\n\n this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason,\n });\n throw new SentryError(\n `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`,\n );\n });\n }\n\n /**\n * Occupies the client with processing and event\n */\n _process(promise) {\n this._numProcessing++;\n void promise.then(\n value => {\n this._numProcessing--;\n return value;\n },\n reason => {\n this._numProcessing--;\n return reason;\n },\n );\n }\n\n /**\n * Clears outcomes on this client and returns them.\n */\n _clearOutcomes() {\n const outcomes = this._outcomes;\n this._outcomes = {};\n return Object.entries(outcomes).map(([key, quantity]) => {\n const [reason, category] = key.split(':') ;\n return {\n reason,\n category,\n quantity,\n };\n });\n }\n\n /**\n * Sends client reports as an envelope.\n */\n _flushOutcomes() {\n DEBUG_BUILD && logger.log('Flushing outcomes...');\n\n const outcomes = this._clearOutcomes();\n\n if (outcomes.length === 0) {\n DEBUG_BUILD && logger.log('No outcomes to send');\n return;\n }\n\n // This is really the only place where we want to check for a DSN and only send outcomes then\n if (!this._dsn) {\n DEBUG_BUILD && logger.log('No dsn provided, will not send outcomes');\n return;\n }\n\n DEBUG_BUILD && logger.log('Sending outcomes:', outcomes);\n\n const envelope = createClientReportEnvelope(outcomes, this._options.tunnel && dsnToString(this._dsn));\n\n // sendEnvelope should not throw\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.sendEnvelope(envelope);\n }\n\n /**\n * @inheritDoc\n */\n\n}\n\n/**\n * Verifies that return value of configured `beforeSend` or `beforeSendTransaction` is of expected type, and returns the value if so.\n */\nfunction _validateBeforeSendResult(\n beforeSendResult,\n beforeSendLabel,\n) {\n const invalidValueError = `${beforeSendLabel} must return \\`null\\` or a valid event.`;\n if (isThenable(beforeSendResult)) {\n return beforeSendResult.then(\n event => {\n if (!isPlainObject(event) && event !== null) {\n throw new SentryError(invalidValueError);\n }\n return event;\n },\n e => {\n throw new SentryError(`${beforeSendLabel} rejected with ${e}`);\n },\n );\n } else if (!isPlainObject(beforeSendResult) && beforeSendResult !== null) {\n throw new SentryError(invalidValueError);\n }\n return beforeSendResult;\n}\n\n/**\n * Process the matching `beforeSendXXX` callback.\n */\nfunction processBeforeSend(\n client,\n options,\n event,\n hint,\n) {\n const { beforeSend, beforeSendTransaction, beforeSendSpan } = options;\n\n if (isErrorEvent(event) && beforeSend) {\n return beforeSend(event, hint);\n }\n\n if (isTransactionEvent(event)) {\n if (event.spans && beforeSendSpan) {\n const processedSpans = [];\n for (const span of event.spans) {\n const processedSpan = beforeSendSpan(span);\n if (processedSpan) {\n processedSpans.push(processedSpan);\n } else {\n showSpanDropWarning();\n client.recordDroppedEvent('before_send', 'span');\n }\n }\n event.spans = processedSpans;\n }\n\n if (beforeSendTransaction) {\n if (event.spans) {\n // We store the # of spans before processing in SDK metadata,\n // so we can compare it afterwards to determine how many spans were dropped\n const spanCountBefore = event.spans.length;\n event.sdkProcessingMetadata = {\n ...event.sdkProcessingMetadata,\n spanCountBeforeProcessing: spanCountBefore,\n };\n }\n return beforeSendTransaction(event, hint);\n }\n }\n\n return event;\n}\n\nfunction isErrorEvent(event) {\n return event.type === undefined;\n}\n\nfunction isTransactionEvent(event) {\n return event.type === 'transaction';\n}\n\nexport { BaseClient };\n","import { getDynamicSamplingContextFromSpan } from './tracing/dynamicSamplingContext.js';\nimport { dsnToString } from './utils-hoist/dsn.js';\nimport { getSdkMetadataForEnvelopeHeader, createEnvelope, createEventEnvelopeHeaders, createSpanEnvelopeItem } from './utils-hoist/envelope.js';\nimport './utils-hoist/debug-build.js';\nimport './utils-hoist/logger.js';\nimport { spanToJSON, showSpanDropWarning } from './utils/spanUtils.js';\n\n/**\n * Apply SdkInfo (name, version, packages, integrations) to the corresponding event key.\n * Merge with existing data if any.\n **/\nfunction enhanceEventWithSdkInfo(event, sdkInfo) {\n if (!sdkInfo) {\n return event;\n }\n event.sdk = event.sdk || {};\n event.sdk.name = event.sdk.name || sdkInfo.name;\n event.sdk.version = event.sdk.version || sdkInfo.version;\n event.sdk.integrations = [...(event.sdk.integrations || []), ...(sdkInfo.integrations || [])];\n event.sdk.packages = [...(event.sdk.packages || []), ...(sdkInfo.packages || [])];\n return event;\n}\n\n/** Creates an envelope from a Session */\nfunction createSessionEnvelope(\n session,\n dsn,\n metadata,\n tunnel,\n) {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n const envelopeHeaders = {\n sent_at: new Date().toISOString(),\n ...(sdkInfo && { sdk: sdkInfo }),\n ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n };\n\n const envelopeItem =\n 'aggregates' in session ? [{ type: 'sessions' }, session] : [{ type: 'session' }, session.toJSON()];\n\n return createEnvelope(envelopeHeaders, [envelopeItem]);\n}\n\n/**\n * Create an Envelope from an event.\n */\nfunction createEventEnvelope(\n event,\n dsn,\n metadata,\n tunnel,\n) {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n\n /*\n Note: Due to TS, event.type may be `replay_event`, theoretically.\n In practice, we never call `createEventEnvelope` with `replay_event` type,\n and we'd have to adjust a looot of types to make this work properly.\n We want to avoid casting this around, as that could lead to bugs (e.g. when we add another type)\n So the safe choice is to really guard against the replay_event type here.\n */\n const eventType = event.type && event.type !== 'replay_event' ? event.type : 'event';\n\n enhanceEventWithSdkInfo(event, metadata && metadata.sdk);\n\n const envelopeHeaders = createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn);\n\n // Prevent this data (which, if it exists, was used in earlier steps in the processing pipeline) from being sent to\n // sentry. (Note: Our use of this property comes and goes with whatever we might be debugging, whatever hacks we may\n // have temporarily added, etc. Even if we don't happen to be using it at some point in the future, let's not get rid\n // of this `delete`, lest we miss putting it back in the next time the property is in use.)\n delete event.sdkProcessingMetadata;\n\n const eventItem = [{ type: eventType }, event];\n return createEnvelope(envelopeHeaders, [eventItem]);\n}\n\n/**\n * Create envelope from Span item.\n *\n * Takes an optional client and runs spans through `beforeSendSpan` if available.\n */\nfunction createSpanEnvelope(spans, client) {\n function dscHasRequiredProps(dsc) {\n return !!dsc.trace_id && !!dsc.public_key;\n }\n\n // For the moment we'll obtain the DSC from the first span in the array\n // This might need to be changed if we permit sending multiple spans from\n // different segments in one envelope\n const dsc = getDynamicSamplingContextFromSpan(spans[0]);\n\n const dsn = client && client.getDsn();\n const tunnel = client && client.getOptions().tunnel;\n\n const headers = {\n sent_at: new Date().toISOString(),\n ...(dscHasRequiredProps(dsc) && { trace: dsc }),\n ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n };\n\n const beforeSendSpan = client && client.getOptions().beforeSendSpan;\n const convertToSpanJSON = beforeSendSpan\n ? (span) => {\n const spanJson = beforeSendSpan(spanToJSON(span) );\n if (!spanJson) {\n showSpanDropWarning();\n }\n return spanJson;\n }\n : (span) => spanToJSON(span);\n\n const items = [];\n for (const span of spans) {\n const spanJson = convertToSpanJSON(span);\n if (spanJson) {\n items.push(createSpanEnvelopeItem(spanJson));\n }\n }\n\n return createEnvelope(headers, items);\n}\n\nexport { createEventEnvelope, createSessionEnvelope, createSpanEnvelope };\n","import { createEnvelope } from './envelope.js';\nimport { dateTimestampInSeconds } from './time.js';\n\n/**\n * Creates client report envelope\n * @param discarded_events An array of discard events\n * @param dsn A DSN that can be set on the header. Optional.\n */\nfunction createClientReportEnvelope(\n discarded_events,\n dsn,\n timestamp,\n) {\n const clientReportItem = [\n { type: 'client_report' },\n {\n timestamp: timestamp || dateTimestampInSeconds(),\n discarded_events,\n },\n ];\n return createEnvelope(dsn ? { dsn } : {}, [clientReportItem]);\n}\n\nexport { createClientReportEnvelope };\n","import { SDK_VERSION } from '../utils-hoist/version.js';\n\n/**\n * A builder for the SDK metadata in the options for the SDK initialization.\n *\n * Note: This function is identical to `buildMetadata` in Remix and NextJS and SvelteKit.\n * We don't extract it for bundle size reasons.\n * @see https://github.com/getsentry/sentry-javascript/pull/7404\n * @see https://github.com/getsentry/sentry-javascript/pull/4196\n *\n * If you make changes to this function consider updating the others as well.\n *\n * @param options SDK options object that gets mutated\n * @param names list of package names\n */\nfunction applySdkMetadata(options, name, names = [name], source = 'npm') {\n const metadata = options._metadata || {};\n\n if (!metadata.sdk) {\n metadata.sdk = {\n name: `sentry.javascript.${name}`,\n packages: names.map(name => ({\n name: `${source}:@sentry/${name}`,\n version: SDK_VERSION,\n })),\n version: SDK_VERSION,\n };\n }\n\n options._metadata = metadata;\n}\n\nexport { applySdkMetadata };\n","import { BaseClient, getSDKSource, applySdkMetadata, logger } from '@sentry/core';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { eventFromException, eventFromMessage } from './eventbuilder.js';\nimport { WINDOW } from './helpers.js';\nimport { createUserFeedbackEnvelope } from './userfeedback.js';\n\n/**\n * Configuration options for the Sentry Browser SDK.\n * @see @sentry/core Options for more information.\n */\n\n/**\n * The Sentry Browser SDK Client.\n *\n * @see BrowserOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nclass BrowserClient extends BaseClient {\n /**\n * Creates a new Browser SDK instance.\n *\n * @param options Configuration options for this SDK.\n */\n constructor(options) {\n const opts = {\n // We default this to true, as it is the safer scenario\n parentSpanIsAlwaysRootSpan: true,\n ...options,\n };\n const sdkSource = WINDOW.SENTRY_SDK_SOURCE || getSDKSource();\n applySdkMetadata(opts, 'browser', ['browser'], sdkSource);\n\n super(opts);\n\n if (opts.sendClientReports && WINDOW.document) {\n WINDOW.document.addEventListener('visibilitychange', () => {\n if (WINDOW.document.visibilityState === 'hidden') {\n this._flushOutcomes();\n }\n });\n }\n }\n\n /**\n * @inheritDoc\n */\n eventFromException(exception, hint) {\n return eventFromException(this._options.stackParser, exception, hint, this._options.attachStacktrace);\n }\n\n /**\n * @inheritDoc\n */\n eventFromMessage(\n message,\n level = 'info',\n hint,\n ) {\n return eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace);\n }\n\n /**\n * Sends user feedback to Sentry.\n *\n * @deprecated Use `captureFeedback` instead.\n */\n captureUserFeedback(feedback) {\n if (!this._isEnabled()) {\n DEBUG_BUILD && logger.warn('SDK not enabled, will not capture user feedback.');\n return;\n }\n\n const envelope = createUserFeedbackEnvelope(feedback, {\n metadata: this.getSdkMetadata(),\n dsn: this.getDsn(),\n tunnel: this.getOptions().tunnel,\n });\n\n // sendEnvelope should not throw\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.sendEnvelope(envelope);\n }\n\n /**\n * @inheritDoc\n */\n _prepareEvent(event, hint, scope) {\n event.platform = event.platform || 'javascript';\n return super._prepareEvent(event, hint, scope);\n }\n}\n\nexport { BrowserClient };\n","/*\n * This module exists for optimizations in the build process through rollup and terser. We define some global\n * constants, which can be overridden during build. By guarding certain pieces of code with functions that return these\n * constants, we can control whether or not they appear in the final bundle. (Any code guarded by a false condition will\n * never run, and will hence be dropped during treeshaking.) The two primary uses for this are stripping out calls to\n * `logger` and preventing node-related code from appearing in browser bundles.\n *\n * Attention:\n * This file should not be used to define constants/flags that are intended to be used for tree-shaking conducted by\n * users. These flags should live in their respective packages, as we identified user tooling (specifically webpack)\n * having issues tree-shaking these constants across package boundaries.\n * An example for this is the __SENTRY_DEBUG__ constant. It is declared in each package individually because we want\n * users to be able to shake away expressions that it guards.\n */\n\n/**\n * Figures out if we're building a browser bundle.\n *\n * @returns true if this is a browser bundle build.\n */\nfunction isBrowserBundle() {\n return typeof __SENTRY_BROWSER_BUNDLE__ !== 'undefined' && !!__SENTRY_BROWSER_BUNDLE__;\n}\n\n/**\n * Get source of SDK.\n */\nfunction getSDKSource() {\n // This comment is used to identify this line in the CDN bundle build step and replace this with \"return 'cdn';\"\n /* __SENTRY_SDK_SOURCE__ */ return 'npm';\n}\n\nexport { getSDKSource, isBrowserBundle };\n","import { dsnToString, createEnvelope } from '@sentry/core';\n\n/**\n * Creates an envelope from a user feedback.\n */\nfunction createUserFeedbackEnvelope(\n feedback,\n {\n metadata,\n tunnel,\n dsn,\n }\n\n,\n) {\n const headers = {\n event_id: feedback.event_id,\n sent_at: new Date().toISOString(),\n ...(metadata &&\n metadata.sdk && {\n sdk: {\n name: metadata.sdk.name,\n version: metadata.sdk.version,\n },\n }),\n ...(!!tunnel && !!dsn && { dsn: dsnToString(dsn) }),\n };\n const item = createUserFeedbackEnvelopeItem(feedback);\n\n return createEnvelope(headers, [item]);\n}\n\nfunction createUserFeedbackEnvelopeItem(feedback) {\n const feedbackHeaders = {\n type: 'user_report',\n };\n return [feedbackHeaders, feedback];\n}\n\nexport { createUserFeedbackEnvelope };\n","import { defineIntegration, fill, getFunctionName, getOriginalFunction } from '@sentry/core';\nimport { WINDOW, wrap } from '../helpers.js';\n\nconst DEFAULT_EVENT_TARGET = [\n 'EventTarget',\n 'Window',\n 'Node',\n 'ApplicationCache',\n 'AudioTrackList',\n 'BroadcastChannel',\n 'ChannelMergerNode',\n 'CryptoOperation',\n 'EventSource',\n 'FileReader',\n 'HTMLUnknownElement',\n 'IDBDatabase',\n 'IDBRequest',\n 'IDBTransaction',\n 'KeyOperation',\n 'MediaController',\n 'MessagePort',\n 'ModalWindow',\n 'Notification',\n 'SVGElementInstance',\n 'Screen',\n 'SharedWorker',\n 'TextTrack',\n 'TextTrackCue',\n 'TextTrackList',\n 'WebSocket',\n 'WebSocketWorker',\n 'Worker',\n 'XMLHttpRequest',\n 'XMLHttpRequestEventTarget',\n 'XMLHttpRequestUpload',\n];\n\nconst INTEGRATION_NAME = 'BrowserApiErrors';\n\nconst _browserApiErrorsIntegration = ((options = {}) => {\n const _options = {\n XMLHttpRequest: true,\n eventTarget: true,\n requestAnimationFrame: true,\n setInterval: true,\n setTimeout: true,\n ...options,\n };\n\n return {\n name: INTEGRATION_NAME,\n // TODO: This currently only works for the first client this is setup\n // We may want to adjust this to check for client etc.\n setupOnce() {\n if (_options.setTimeout) {\n fill(WINDOW, 'setTimeout', _wrapTimeFunction);\n }\n\n if (_options.setInterval) {\n fill(WINDOW, 'setInterval', _wrapTimeFunction);\n }\n\n if (_options.requestAnimationFrame) {\n fill(WINDOW, 'requestAnimationFrame', _wrapRAF);\n }\n\n if (_options.XMLHttpRequest && 'XMLHttpRequest' in WINDOW) {\n fill(XMLHttpRequest.prototype, 'send', _wrapXHR);\n }\n\n const eventTargetOption = _options.eventTarget;\n if (eventTargetOption) {\n const eventTarget = Array.isArray(eventTargetOption) ? eventTargetOption : DEFAULT_EVENT_TARGET;\n eventTarget.forEach(_wrapEventTarget);\n }\n },\n };\n}) ;\n\n/**\n * Wrap timer functions and event targets to catch errors and provide better meta data.\n */\nconst browserApiErrorsIntegration = defineIntegration(_browserApiErrorsIntegration);\n\nfunction _wrapTimeFunction(original) {\n return function ( ...args) {\n const originalCallback = args[0];\n args[0] = wrap(originalCallback, {\n mechanism: {\n data: { function: getFunctionName(original) },\n handled: false,\n type: 'instrument',\n },\n });\n return original.apply(this, args);\n };\n}\n\nfunction _wrapRAF(original) {\n return function ( callback) {\n return original.apply(this, [\n wrap(callback, {\n mechanism: {\n data: {\n function: 'requestAnimationFrame',\n handler: getFunctionName(original),\n },\n handled: false,\n type: 'instrument',\n },\n }),\n ]);\n };\n}\n\nfunction _wrapXHR(originalSend) {\n return function ( ...args) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const xhr = this;\n const xmlHttpRequestProps = ['onload', 'onerror', 'onprogress', 'onreadystatechange'];\n\n xmlHttpRequestProps.forEach(prop => {\n if (prop in xhr && typeof xhr[prop] === 'function') {\n fill(xhr, prop, function (original) {\n const wrapOptions = {\n mechanism: {\n data: {\n function: prop,\n handler: getFunctionName(original),\n },\n handled: false,\n type: 'instrument',\n },\n };\n\n // If Instrument integration has been called before BrowserApiErrors, get the name of original function\n const originalFunction = getOriginalFunction(original);\n if (originalFunction) {\n wrapOptions.mechanism.data.handler = getFunctionName(originalFunction);\n }\n\n // Otherwise wrap directly\n return wrap(original, wrapOptions);\n });\n }\n });\n\n return originalSend.apply(this, args);\n };\n}\n\nfunction _wrapEventTarget(target) {\n const globalObject = WINDOW ;\n const targetObj = globalObject[target];\n const proto = targetObj && targetObj.prototype;\n\n // eslint-disable-next-line no-prototype-builtins\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function (original)\n\n {\n return function ( eventName, fn, options) {\n try {\n if (isEventListenerObject(fn)) {\n // ESlint disable explanation:\n // First, it is generally safe to call `wrap` with an unbound function. Furthermore, using `.bind()` would\n // introduce a bug here, because bind returns a new function that doesn't have our\n // flags(like __sentry_original__) attached. `wrap` checks for those flags to avoid unnecessary wrapping.\n // Without those flags, every call to addEventListener wraps the function again, causing a memory leak.\n // eslint-disable-next-line @typescript-eslint/unbound-method\n fn.handleEvent = wrap(fn.handleEvent, {\n mechanism: {\n data: {\n function: 'handleEvent',\n handler: getFunctionName(fn),\n target,\n },\n handled: false,\n type: 'instrument',\n },\n });\n }\n } catch (e2) {\n // can sometimes get 'Permission denied to access property \"handle Event'\n }\n\n return original.apply(this, [\n eventName,\n wrap(fn, {\n mechanism: {\n data: {\n function: 'addEventListener',\n handler: getFunctionName(fn),\n target,\n },\n handled: false,\n type: 'instrument',\n },\n }),\n options,\n ]);\n };\n });\n\n fill(proto, 'removeEventListener', function (originalRemoveEventListener)\n\n {\n return function ( eventName, fn, options) {\n /**\n * There are 2 possible scenarios here:\n *\n * 1. Someone passes a callback, which was attached prior to Sentry initialization, or by using unmodified\n * method, eg. `document.addEventListener.call(el, name, handler). In this case, we treat this function\n * as a pass-through, and call original `removeEventListener` with it.\n *\n * 2. Someone passes a callback, which was attached after Sentry was initialized, which means that it was using\n * our wrapped version of `addEventListener`, which internally calls `wrap` helper.\n * This helper \"wraps\" whole callback inside a try/catch statement, and attached appropriate metadata to it,\n * in order for us to make a distinction between wrapped/non-wrapped functions possible.\n * If a function was wrapped, it has additional property of `__sentry_wrapped__`, holding the handler.\n *\n * When someone adds a handler prior to initialization, and then do it again, but after,\n * then we have to detach both of them. Otherwise, if we'd detach only wrapped one, it'd be impossible\n * to get rid of the initial handler and it'd stick there forever.\n */\n try {\n const originalEventHandler = (fn ).__sentry_wrapped__;\n if (originalEventHandler) {\n originalRemoveEventListener.call(this, eventName, originalEventHandler, options);\n }\n } catch (e) {\n // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n return originalRemoveEventListener.call(this, eventName, fn, options);\n };\n });\n}\n\nfunction isEventListenerObject(obj) {\n return typeof (obj ).handleEvent === 'function';\n}\n\nexport { browserApiErrorsIntegration };\n","import { createStackParser, UNKNOWN_FUNCTION } from '@sentry/core';\n\n// This was originally forked from https://github.com/csnover/TraceKit, and was largely\n// re - written as part of raven - js.\n//\n// This code was later copied to the JavaScript mono - repo and further modified and\n// refactored over the years.\n\n\nconst OPERA10_PRIORITY = 10;\nconst OPERA11_PRIORITY = 20;\nconst CHROME_PRIORITY = 30;\nconst WINJS_PRIORITY = 40;\nconst GECKO_PRIORITY = 50;\n\nfunction createFrame(filename, func, lineno, colno) {\n const frame = {\n filename,\n function: func === '<anonymous>' ? UNKNOWN_FUNCTION : func,\n in_app: true, // All browser frames are considered in_app\n };\n\n if (lineno !== undefined) {\n frame.lineno = lineno;\n }\n\n if (colno !== undefined) {\n frame.colno = colno;\n }\n\n return frame;\n}\n\n// This regex matches frames that have no function name (ie. are at the top level of a module).\n// For example \"at http://localhost:5000//script.js:1:126\"\n// Frames _with_ function names usually look as follows: \"at commitLayoutEffects (react-dom.development.js:23426:1)\"\nconst chromeRegexNoFnName = /^\\s*at (\\S+?)(?::(\\d+))(?::(\\d+))\\s*$/i;\n\n// This regex matches all the frames that have a function name.\nconst chromeRegex =\n /^\\s*at (?:(.+?\\)(?: \\[.+\\])?|.*?) ?\\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\\/)?.*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\n\nconst chromeEvalRegex = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\n\n// Chromium based browsers: Chrome, Brave, new Opera, new Edge\n// We cannot call this variable `chrome` because it can conflict with global `chrome` variable in certain environments\n// See: https://github.com/getsentry/sentry-javascript/issues/6880\nconst chromeStackParserFn = line => {\n // If the stack line has no function name, we need to parse it differently\n const noFnParts = chromeRegexNoFnName.exec(line) ;\n\n if (noFnParts) {\n const [, filename, line, col] = noFnParts;\n return createFrame(filename, UNKNOWN_FUNCTION, +line, +col);\n }\n\n const parts = chromeRegex.exec(line) ;\n\n if (parts) {\n const isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n\n if (isEval) {\n const subMatch = chromeEvalRegex.exec(parts[2]) ;\n\n if (subMatch) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = subMatch[1]; // url\n parts[3] = subMatch[2]; // line\n parts[4] = subMatch[3]; // column\n }\n }\n\n // Kamil: One more hack won't hurt us right? Understanding and adding more rules on top of these regexps right now\n // would be way too time consuming. (TODO: Rewrite whole RegExp to be more readable)\n const [func, filename] = extractSafariExtensionDetails(parts[1] || UNKNOWN_FUNCTION, parts[2]);\n\n return createFrame(filename, func, parts[3] ? +parts[3] : undefined, parts[4] ? +parts[4] : undefined);\n }\n\n return;\n};\n\nconst chromeStackLineParser = [CHROME_PRIORITY, chromeStackParserFn];\n\n// gecko regex: `(?:bundle|\\d+\\.js)`: `bundle` is for react native, `\\d+\\.js` also but specifically for ram bundles because it\n// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js\n// We need this specific case for now because we want no other regex to match.\nconst geckoREgex =\n /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:[-a-z]+)?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js)|\\/[\\w\\-. /=]+)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nconst geckoEvalRegex = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\n\nconst gecko = line => {\n const parts = geckoREgex.exec(line) ;\n\n if (parts) {\n const isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n if (isEval) {\n const subMatch = geckoEvalRegex.exec(parts[3]) ;\n\n if (subMatch) {\n // throw out eval line/column and use top-most line number\n parts[1] = parts[1] || 'eval';\n parts[3] = subMatch[1];\n parts[4] = subMatch[2];\n parts[5] = ''; // no column when eval\n }\n }\n\n let filename = parts[3];\n let func = parts[1] || UNKNOWN_FUNCTION;\n [func, filename] = extractSafariExtensionDetails(func, filename);\n\n return createFrame(filename, func, parts[4] ? +parts[4] : undefined, parts[5] ? +parts[5] : undefined);\n }\n\n return;\n};\n\nconst geckoStackLineParser = [GECKO_PRIORITY, gecko];\n\nconst winjsRegex = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:[-a-z]+):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\n\nconst winjs = line => {\n const parts = winjsRegex.exec(line) ;\n\n return parts\n ? createFrame(parts[2], parts[1] || UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : undefined)\n : undefined;\n};\n\nconst winjsStackLineParser = [WINJS_PRIORITY, winjs];\n\nconst opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\n\nconst opera10 = line => {\n const parts = opera10Regex.exec(line) ;\n return parts ? createFrame(parts[2], parts[3] || UNKNOWN_FUNCTION, +parts[1]) : undefined;\n};\n\nconst opera10StackLineParser = [OPERA10_PRIORITY, opera10];\n\nconst opera11Regex =\n / line (\\d+), column (\\d+)\\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\\(.*\\))? in (.*):\\s*$/i;\n\nconst opera11 = line => {\n const parts = opera11Regex.exec(line) ;\n return parts ? createFrame(parts[5], parts[3] || parts[4] || UNKNOWN_FUNCTION, +parts[1], +parts[2]) : undefined;\n};\n\nconst opera11StackLineParser = [OPERA11_PRIORITY, opera11];\n\nconst defaultStackLineParsers = [chromeStackLineParser, geckoStackLineParser];\n\nconst defaultStackParser = createStackParser(...defaultStackLineParsers);\n\n/**\n * Safari web extensions, starting version unknown, can produce \"frames-only\" stacktraces.\n * What it means, is that instead of format like:\n *\n * Error: wat\n * at function@url:row:col\n * at function@url:row:col\n * at function@url:row:col\n *\n * it produces something like:\n *\n * function@url:row:col\n * function@url:row:col\n * function@url:row:col\n *\n * Because of that, it won't be captured by `chrome` RegExp and will fall into `Gecko` branch.\n * This function is extracted so that we can use it in both places without duplicating the logic.\n * Unfortunately \"just\" changing RegExp is too complicated now and making it pass all tests\n * and fix this case seems like an impossible, or at least way too time-consuming task.\n */\nconst extractSafariExtensionDetails = (func, filename) => {\n const isSafariExtension = func.indexOf('safari-extension') !== -1;\n const isSafariWebExtension = func.indexOf('safari-web-extension') !== -1;\n\n return isSafariExtension || isSafariWebExtension\n ? [\n func.indexOf('@') !== -1 ? (func.split('@')[0] ) : UNKNOWN_FUNCTION,\n isSafariExtension ? `safari-extension:${filename}` : `safari-web-extension:${filename}`,\n ]\n : [func, filename];\n};\n\nexport { chromeStackLineParser, defaultStackLineParsers, defaultStackParser, geckoStackLineParser, opera10StackLineParser, opera11StackLineParser, winjsStackLineParser };\n","/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nexport { DEBUG_BUILD };\n","import { isNativeFunction, logger } from '@sentry/core';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { WINDOW } from './types.js';\n\n/**\n * We generally want to use window.fetch / window.setTimeout.\n * However, in some cases this may be wrapped (e.g. by Zone.js for Angular),\n * so we try to get an unpatched version of this from a sandboxed iframe.\n */\n\nconst cachedImplementations = {};\n\n/**\n * Get the native implementation of a browser function.\n *\n * This can be used to ensure we get an unwrapped version of a function, in cases where a wrapped function can lead to problems.\n *\n * The following methods can be retrieved:\n * - `setTimeout`: This can be wrapped by e.g. Angular, causing change detection to be triggered.\n * - `fetch`: This can be wrapped by e.g. ad-blockers, causing an infinite loop when a request is blocked.\n */\nfunction getNativeImplementation(\n name,\n) {\n const cached = cachedImplementations[name];\n if (cached) {\n return cached;\n }\n\n let impl = WINDOW[name] ;\n\n // Fast path to avoid DOM I/O\n if (isNativeFunction(impl)) {\n return (cachedImplementations[name] = impl.bind(WINDOW) );\n }\n\n const document = WINDOW.document;\n // eslint-disable-next-line deprecation/deprecation\n if (document && typeof document.createElement === 'function') {\n try {\n const sandbox = document.createElement('iframe');\n sandbox.hidden = true;\n document.head.appendChild(sandbox);\n const contentWindow = sandbox.contentWindow;\n if (contentWindow && contentWindow[name]) {\n impl = contentWindow[name] ;\n }\n document.head.removeChild(sandbox);\n } catch (e) {\n // Could not create sandbox iframe, just use window.xxx\n DEBUG_BUILD && logger.warn(`Could not create sandbox iframe for ${name} check, bailing to window.${name}: `, e);\n }\n }\n\n // Sanity check: This _should_ not happen, but if it does, we just skip caching...\n // This can happen e.g. in tests where fetch may not be available in the env, or similar.\n if (!impl) {\n return impl;\n }\n\n return (cachedImplementations[name] = impl.bind(WINDOW) );\n}\n\n/** Clear a cached implementation. */\nfunction clearCachedImplementation(name) {\n cachedImplementations[name] = undefined;\n}\n\n/**\n * A special usecase for incorrectly wrapped Fetch APIs in conjunction with ad-blockers.\n * Whenever someone wraps the Fetch API and returns the wrong promise chain,\n * this chain becomes orphaned and there is no possible way to capture it's rejections\n * other than allowing it bubble up to this very handler. eg.\n *\n * const f = window.fetch;\n * window.fetch = function () {\n * const p = f.apply(this, arguments);\n *\n * p.then(function() {\n * console.log('hi.');\n * });\n *\n * return p;\n * }\n *\n * `p.then(function () { ... })` is producing a completely separate promise chain,\n * however, what's returned is `p` - the result of original `fetch` call.\n *\n * This mean, that whenever we use the Fetch API to send our own requests, _and_\n * some ad-blocker blocks it, this orphaned chain will _always_ reject,\n * effectively causing another event to be captured.\n * This makes a whole process become an infinite loop, which we need to somehow\n * deal with, and break it in one way or another.\n *\n * To deal with this issue, we are making sure that we _always_ use the real\n * browser Fetch API, instead of relying on what `window.fetch` exposes.\n * The only downside to this would be missing our own requests as breadcrumbs,\n * but because we are already not doing this, it should be just fine.\n *\n * Possible failed fetch error messages per-browser:\n *\n * Chrome: Failed to fetch\n * Edge: Failed to Fetch\n * Firefox: NetworkError when attempting to fetch resource\n * Safari: resource blocked by content blocker\n */\nfunction fetch(...rest) {\n return getNativeImplementation('fetch')(...rest);\n}\n\n/**\n * Get an unwrapped `setTimeout` method.\n * This ensures that even if e.g. Angular wraps `setTimeout`, we get the native implementation,\n * avoiding triggering change detection.\n */\nfunction setTimeout(...rest) {\n return getNativeImplementation('setTimeout')(...rest);\n}\n\nexport { clearCachedImplementation, fetch, getNativeImplementation, setTimeout };\n","// Intentionally keeping the key broad, as we don't know for sure what rate limit headers get returned from backend\n\nconst DEFAULT_RETRY_AFTER = 60 * 1000; // 60 seconds\n\n/**\n * Extracts Retry-After value from the request header or returns default value\n * @param header string representation of 'Retry-After' header\n * @param now current unix timestamp\n *\n */\nfunction parseRetryAfterHeader(header, now = Date.now()) {\n const headerDelay = parseInt(`${header}`, 10);\n if (!isNaN(headerDelay)) {\n return headerDelay * 1000;\n }\n\n const headerDate = Date.parse(`${header}`);\n if (!isNaN(headerDate)) {\n return headerDate - now;\n }\n\n return DEFAULT_RETRY_AFTER;\n}\n\n/**\n * Gets the time that the given category is disabled until for rate limiting.\n * In case no category-specific limit is set but a general rate limit across all categories is active,\n * that time is returned.\n *\n * @return the time in ms that the category is disabled until or 0 if there's no active rate limit.\n */\nfunction disabledUntil(limits, dataCategory) {\n return limits[dataCategory] || limits.all || 0;\n}\n\n/**\n * Checks if a category is rate limited\n */\nfunction isRateLimited(limits, dataCategory, now = Date.now()) {\n return disabledUntil(limits, dataCategory) > now;\n}\n\n/**\n * Update ratelimits from incoming headers.\n *\n * @return the updated RateLimits object.\n */\nfunction updateRateLimits(\n limits,\n { statusCode, headers },\n now = Date.now(),\n) {\n const updatedRateLimits = {\n ...limits,\n };\n\n // \"The name is case-insensitive.\"\n // https://developer.mozilla.org/en-US/docs/Web/API/Headers/get\n const rateLimitHeader = headers && headers['x-sentry-rate-limits'];\n const retryAfterHeader = headers && headers['retry-after'];\n\n if (rateLimitHeader) {\n /**\n * rate limit headers are of the form\n * <header>,<header>,..\n * where each <header> is of the form\n * <retry_after>: <categories>: <scope>: <reason_code>: <namespaces>\n * where\n * <retry_after> is a delay in seconds\n * <categories> is the event type(s) (error, transaction, etc) being rate limited and is of the form\n * <category>;<category>;...\n * <scope> is what's being limited (org, project, or key) - ignored by SDK\n * <reason_code> is an arbitrary string like \"org_quota\" - ignored by SDK\n * <namespaces> Semicolon-separated list of metric namespace identifiers. Defines which namespace(s) will be affected.\n * Only present if rate limit applies to the metric_bucket data category.\n */\n for (const limit of rateLimitHeader.trim().split(',')) {\n const [retryAfter, categories, , , namespaces] = limit.split(':', 5) ;\n const headerDelay = parseInt(retryAfter, 10);\n const delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1000; // 60sec default\n if (!categories) {\n updatedRateLimits.all = now + delay;\n } else {\n for (const category of categories.split(';')) {\n if (category === 'metric_bucket') {\n // namespaces will be present when category === 'metric_bucket'\n if (!namespaces || namespaces.split(';').includes('custom')) {\n updatedRateLimits[category] = now + delay;\n }\n } else {\n updatedRateLimits[category] = now + delay;\n }\n }\n }\n }\n } else if (retryAfterHeader) {\n updatedRateLimits.all = now + parseRetryAfterHeader(retryAfterHeader, now);\n } else if (statusCode === 429) {\n updatedRateLimits.all = now + 60 * 1000;\n }\n\n return updatedRateLimits;\n}\n\nexport { DEFAULT_RETRY_AFTER, disabledUntil, isRateLimited, parseRetryAfterHeader, updateRateLimits };\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { forEachEnvelopeItem, envelopeItemTypeToDataCategory, createEnvelope, serializeEnvelope } from '../utils-hoist/envelope.js';\nimport { SentryError } from '../utils-hoist/error.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { makePromiseBuffer } from '../utils-hoist/promisebuffer.js';\nimport { isRateLimited, updateRateLimits } from '../utils-hoist/ratelimit.js';\nimport { resolvedSyncPromise } from '../utils-hoist/syncpromise.js';\n\nconst DEFAULT_TRANSPORT_BUFFER_SIZE = 64;\n\n/**\n * Creates an instance of a Sentry `Transport`\n *\n * @param options\n * @param makeRequest\n */\nfunction createTransport(\n options,\n makeRequest,\n buffer = makePromiseBuffer(\n options.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE,\n ),\n) {\n let rateLimits = {};\n const flush = (timeout) => buffer.drain(timeout);\n\n function send(envelope) {\n const filteredEnvelopeItems = [];\n\n // Drop rate limited items from envelope\n forEachEnvelopeItem(envelope, (item, type) => {\n const dataCategory = envelopeItemTypeToDataCategory(type);\n if (isRateLimited(rateLimits, dataCategory)) {\n const event = getEventForEnvelopeItem(item, type);\n options.recordDroppedEvent('ratelimit_backoff', dataCategory, event);\n } else {\n filteredEnvelopeItems.push(item);\n }\n });\n\n // Skip sending if envelope is empty after filtering out rate limited events\n if (filteredEnvelopeItems.length === 0) {\n return resolvedSyncPromise({});\n }\n\n const filteredEnvelope = createEnvelope(envelope[0], filteredEnvelopeItems );\n\n // Creates client report for each item in an envelope\n const recordEnvelopeLoss = (reason) => {\n forEachEnvelopeItem(filteredEnvelope, (item, type) => {\n const event = getEventForEnvelopeItem(item, type);\n options.recordDroppedEvent(reason, envelopeItemTypeToDataCategory(type), event);\n });\n };\n\n const requestTask = () =>\n makeRequest({ body: serializeEnvelope(filteredEnvelope) }).then(\n response => {\n // We don't want to throw on NOK responses, but we want to at least log them\n if (response.statusCode !== undefined && (response.statusCode < 200 || response.statusCode >= 300)) {\n DEBUG_BUILD && logger.warn(`Sentry responded with status code ${response.statusCode} to sent event.`);\n }\n\n rateLimits = updateRateLimits(rateLimits, response);\n return response;\n },\n error => {\n recordEnvelopeLoss('network_error');\n throw error;\n },\n );\n\n return buffer.add(requestTask).then(\n result => result,\n error => {\n if (error instanceof SentryError) {\n DEBUG_BUILD && logger.error('Skipped sending event because buffer is full.');\n recordEnvelopeLoss('queue_overflow');\n return resolvedSyncPromise({});\n } else {\n throw error;\n }\n },\n );\n }\n\n return {\n send,\n flush,\n };\n}\n\nfunction getEventForEnvelopeItem(item, type) {\n if (type !== 'event' && type !== 'transaction') {\n return undefined;\n }\n\n return Array.isArray(item) ? (item )[1] : undefined;\n}\n\nexport { DEFAULT_TRANSPORT_BUFFER_SIZE, createTransport };\n","import { getNativeImplementation, clearCachedImplementation } from '@sentry-internal/browser-utils';\nimport { createTransport, rejectedSyncPromise } from '@sentry/core';\n\n/**\n * Creates a Transport that uses the Fetch API to send events to Sentry.\n */\nfunction makeFetchTransport(\n options,\n nativeFetch = getNativeImplementation('fetch'),\n) {\n let pendingBodySize = 0;\n let pendingCount = 0;\n\n function makeRequest(request) {\n const requestSize = request.body.length;\n pendingBodySize += requestSize;\n pendingCount++;\n\n const requestOptions = {\n body: request.body,\n method: 'POST',\n referrerPolicy: 'origin',\n headers: options.headers,\n // Outgoing requests are usually cancelled when navigating to a different page, causing a \"TypeError: Failed to\n // fetch\" error and sending a \"network_error\" client-outcome - in Chrome, the request status shows \"(cancelled)\".\n // The `keepalive` flag keeps outgoing requests alive, even when switching pages. We want this since we're\n // frequently sending events right before the user is switching pages (eg. when finishing navigation transactions).\n // Gotchas:\n // - `keepalive` isn't supported by Firefox\n // - As per spec (https://fetch.spec.whatwg.org/#http-network-or-cache-fetch):\n // If the sum of contentLength and inflightKeepaliveBytes is greater than 64 kibibytes, then return a network error.\n // We will therefore only activate the flag when we're below that limit.\n // There is also a limit of requests that can be open at the same time, so we also limit this to 15\n // See https://github.com/getsentry/sentry-javascript/pull/7553 for details\n keepalive: pendingBodySize <= 60000 && pendingCount < 15,\n ...options.fetchOptions,\n };\n\n if (!nativeFetch) {\n clearCachedImplementation('fetch');\n return rejectedSyncPromise('No fetch implementation available');\n }\n\n try {\n // TODO: This may need a `suppressTracing` call in the future when we switch the browser SDK to OTEL\n return nativeFetch(options.url, requestOptions).then(response => {\n pendingBodySize -= requestSize;\n pendingCount--;\n return {\n statusCode: response.status,\n headers: {\n 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),\n 'retry-after': response.headers.get('Retry-After'),\n },\n };\n });\n } catch (e) {\n clearCachedImplementation('fetch');\n pendingBodySize -= requestSize;\n pendingCount--;\n return rejectedSyncPromise(e);\n }\n }\n\n return createTransport(options, makeRequest);\n}\n\nexport { makeFetchTransport };\n","import { SentryError } from './error.js';\nimport { rejectedSyncPromise, SyncPromise, resolvedSyncPromise } from './syncpromise.js';\n\n/**\n * Creates an new PromiseBuffer object with the specified limit\n * @param limit max number of promises that can be stored in the buffer\n */\nfunction makePromiseBuffer(limit) {\n const buffer = [];\n\n function isReady() {\n return limit === undefined || buffer.length < limit;\n }\n\n /**\n * Remove a promise from the queue.\n *\n * @param task Can be any PromiseLike<T>\n * @returns Removed promise.\n */\n function remove(task) {\n return buffer.splice(buffer.indexOf(task), 1)[0] || Promise.resolve(undefined);\n }\n\n /**\n * Add a promise (representing an in-flight action) to the queue, and set it to remove itself on fulfillment.\n *\n * @param taskProducer A function producing any PromiseLike<T>; In previous versions this used to be `task:\n * PromiseLike<T>`, but under that model, Promises were instantly created on the call-site and their executor\n * functions therefore ran immediately. Thus, even if the buffer was full, the action still happened. By\n * requiring the promise to be wrapped in a function, we can defer promise creation until after the buffer\n * limit check.\n * @returns The original promise.\n */\n function add(taskProducer) {\n if (!isReady()) {\n return rejectedSyncPromise(new SentryError('Not adding Promise because buffer limit was reached.'));\n }\n\n // start the task and add its promise to the queue\n const task = taskProducer();\n if (buffer.indexOf(task) === -1) {\n buffer.push(task);\n }\n void task\n .then(() => remove(task))\n // Use `then(null, rejectionHandler)` rather than `catch(rejectionHandler)` so that we can use `PromiseLike`\n // rather than `Promise`. `PromiseLike` doesn't have a `.catch` method, making its polyfill smaller. (ES5 didn't\n // have promises, so TS has to polyfill when down-compiling.)\n .then(null, () =>\n remove(task).then(null, () => {\n // We have to add another catch here because `remove()` starts a new promise chain.\n }),\n );\n return task;\n }\n\n /**\n * Wait for all promises in the queue to resolve or for timeout to expire, whichever comes first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the queue is still non-empty. Passing `0` (or\n * not passing anything) will make the promise wait as long as it takes for the queue to drain before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if the queue is already empty or drains before the timeout, and\n * `false` otherwise\n */\n function drain(timeout) {\n return new SyncPromise((resolve, reject) => {\n let counter = buffer.length;\n\n if (!counter) {\n return resolve(true);\n }\n\n // wait for `timeout` ms and then resolve to `false` (if not cancelled first)\n const capturedSetTimeout = setTimeout(() => {\n if (timeout && timeout > 0) {\n resolve(false);\n }\n }, timeout);\n\n // if all promises resolve in time, cancel the timer and resolve to `true`\n buffer.forEach(item => {\n void resolvedSyncPromise(item).then(() => {\n if (!--counter) {\n clearTimeout(capturedSetTimeout);\n resolve(true);\n }\n }, reject);\n });\n });\n }\n\n return {\n $: buffer,\n add,\n drain,\n };\n}\n\nexport { makePromiseBuffer };\n","import { inboundFiltersIntegration, functionToStringIntegration, dedupeIntegration, consoleSandbox, supportsFetch, logger, stackParserFromStackParserOptions, getIntegrationsToSetup, initAndBind, getCurrentScope, lastEventId, getReportDialogEndpoint, getClient } from '@sentry/core';\nimport { BrowserClient } from './client.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { WINDOW } from './helpers.js';\nimport { breadcrumbsIntegration } from './integrations/breadcrumbs.js';\nimport { browserApiErrorsIntegration } from './integrations/browserapierrors.js';\nimport { browserSessionIntegration } from './integrations/browsersession.js';\nimport { globalHandlersIntegration } from './integrations/globalhandlers.js';\nimport { httpContextIntegration } from './integrations/httpcontext.js';\nimport { linkedErrorsIntegration } from './integrations/linkederrors.js';\nimport { defaultStackParser } from './stack-parsers.js';\nimport { makeFetchTransport } from './transports/fetch.js';\n\n/** Get the default integrations for the browser SDK. */\nfunction getDefaultIntegrations(options) {\n /**\n * Note: Please make sure this stays in sync with Angular SDK, which re-exports\n * `getDefaultIntegrations` but with an adjusted set of integrations.\n */\n const integrations = [\n inboundFiltersIntegration(),\n functionToStringIntegration(),\n browserApiErrorsIntegration(),\n breadcrumbsIntegration(),\n globalHandlersIntegration(),\n linkedErrorsIntegration(),\n dedupeIntegration(),\n httpContextIntegration(),\n ];\n\n // eslint-disable-next-line deprecation/deprecation\n if (options.autoSessionTracking !== false) {\n integrations.push(browserSessionIntegration());\n }\n\n return integrations;\n}\n\nfunction applyDefaultOptions(optionsArg = {}) {\n const defaultOptions = {\n defaultIntegrations: getDefaultIntegrations(optionsArg),\n release:\n typeof __SENTRY_RELEASE__ === 'string' // This allows build tooling to find-and-replace __SENTRY_RELEASE__ to inject a release value\n ? __SENTRY_RELEASE__\n : WINDOW.SENTRY_RELEASE && WINDOW.SENTRY_RELEASE.id // This supports the variable that sentry-webpack-plugin injects\n ? WINDOW.SENTRY_RELEASE.id\n : undefined,\n autoSessionTracking: true,\n sendClientReports: true,\n };\n\n // TODO: Instead of dropping just `defaultIntegrations`, we should simply\n // call `dropUndefinedKeys` on the entire `optionsArg`.\n // However, for this to work we need to adjust the `hasTracingEnabled()` logic\n // first as it differentiates between `undefined` and the key not being in the object.\n if (optionsArg.defaultIntegrations == null) {\n delete optionsArg.defaultIntegrations;\n }\n\n return { ...defaultOptions, ...optionsArg };\n}\n\nfunction shouldShowBrowserExtensionError() {\n const windowWithMaybeExtension =\n typeof WINDOW.window !== 'undefined' && (WINDOW );\n if (!windowWithMaybeExtension) {\n // No need to show the error if we're not in a browser window environment (e.g. service workers)\n return false;\n }\n\n const extensionKey = windowWithMaybeExtension.chrome ? 'chrome' : 'browser';\n const extensionObject = windowWithMaybeExtension[extensionKey];\n\n const runtimeId = extensionObject && extensionObject.runtime && extensionObject.runtime.id;\n const href = (WINDOW.location && WINDOW.location.href) || '';\n\n const extensionProtocols = ['chrome-extension:', 'moz-extension:', 'ms-browser-extension:', 'safari-web-extension:'];\n\n // Running the SDK in a dedicated extension page and calling Sentry.init is fine; no risk of data leakage\n const isDedicatedExtensionPage =\n !!runtimeId && WINDOW === WINDOW.top && extensionProtocols.some(protocol => href.startsWith(`${protocol}//`));\n\n // Running the SDK in NW.js, which appears like a browser extension but isn't, is also fine\n // see: https://github.com/getsentry/sentry-javascript/issues/12668\n const isNWjs = typeof windowWithMaybeExtension.nw !== 'undefined';\n\n return !!runtimeId && !isDedicatedExtensionPage && !isNWjs;\n}\n\n/**\n * A magic string that build tooling can leverage in order to inject a release value into the SDK.\n */\n\n/**\n * The Sentry Browser SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible when\n * loading the web page. To set context information or send manual events, use\n * the provided methods.\n *\n * @example\n *\n * ```\n *\n * import { init } from '@sentry/browser';\n *\n * init({\n * dsn: '__DSN__',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { addBreadcrumb } from '@sentry/browser';\n * addBreadcrumb({\n * message: 'My Breadcrumb',\n * // ...\n * });\n * ```\n *\n * @example\n *\n * ```\n *\n * import * as Sentry from '@sentry/browser';\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n * message: 'Manual',\n * stacktrace: [\n * // ...\n * ],\n * });\n * ```\n *\n * @see {@link BrowserOptions} for documentation on configuration options.\n */\nfunction init(browserOptions = {}) {\n const options = applyDefaultOptions(browserOptions);\n\n if (!options.skipBrowserExtensionCheck && shouldShowBrowserExtensionError()) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.error(\n '[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/',\n );\n });\n return;\n }\n\n if (DEBUG_BUILD) {\n if (!supportsFetch()) {\n logger.warn(\n 'No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill.',\n );\n }\n }\n const clientOptions = {\n ...options,\n stackParser: stackParserFromStackParserOptions(options.stackParser || defaultStackParser),\n integrations: getIntegrationsToSetup(options),\n transport: options.transport || makeFetchTransport,\n };\n\n return initAndBind(BrowserClient, clientOptions);\n}\n\n/**\n * All properties the report dialog supports\n */\n\n/**\n * Present the user with a report dialog.\n *\n * @param options Everything is optional, we try to fetch all info need from the global scope.\n */\nfunction showReportDialog(options = {}) {\n // doesn't work without a document (React Native)\n if (!WINDOW.document) {\n DEBUG_BUILD && logger.error('Global document not defined in showReportDialog call');\n return;\n }\n\n const scope = getCurrentScope();\n const client = scope.getClient();\n const dsn = client && client.getDsn();\n\n if (!dsn) {\n DEBUG_BUILD && logger.error('DSN not configured for showReportDialog call');\n return;\n }\n\n if (scope) {\n options.user = {\n ...scope.getUser(),\n ...options.user,\n };\n }\n\n if (!options.eventId) {\n const eventId = lastEventId();\n if (eventId) {\n options.eventId = eventId;\n }\n }\n\n const script = WINDOW.document.createElement('script');\n script.async = true;\n script.crossOrigin = 'anonymous';\n script.src = getReportDialogEndpoint(dsn, options);\n\n if (options.onLoad) {\n script.onload = options.onLoad;\n }\n\n const { onClose } = options;\n if (onClose) {\n const reportDialogClosedMessageHandler = (event) => {\n if (event.data === '__sentry_reportdialog_closed__') {\n try {\n onClose();\n } finally {\n WINDOW.removeEventListener('message', reportDialogClosedMessageHandler);\n }\n }\n };\n WINDOW.addEventListener('message', reportDialogClosedMessageHandler);\n }\n\n const injectionPoint = WINDOW.document.head || WINDOW.document.body;\n if (injectionPoint) {\n injectionPoint.appendChild(script);\n } else {\n DEBUG_BUILD && logger.error('Not injecting report dialog. No injection point found in HTML');\n }\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nfunction forceLoad() {\n // Noop\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nfunction onLoad(callback) {\n callback();\n}\n\n/**\n * Captures user feedback and sends it to Sentry.\n *\n * @deprecated Use `captureFeedback` instead.\n */\nfunction captureUserFeedback(feedback) {\n const client = getClient();\n if (client) {\n // eslint-disable-next-line deprecation/deprecation\n client.captureUserFeedback(feedback);\n }\n}\n\nexport { captureUserFeedback, forceLoad, getDefaultIntegrations, init, onLoad, showReportDialog };\n","import { getCurrentScope } from './currentScopes.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { logger, consoleSandbox } from './utils-hoist/logger.js';\n\n/** A class object that can instantiate Client objects. */\n\n/**\n * Internal function to create a new SDK client instance. The client is\n * installed and then bound to the current scope.\n *\n * @param clientClass The client class to instantiate.\n * @param options Options to pass to the client.\n */\nfunction initAndBind(\n clientClass,\n options,\n) {\n if (options.debug === true) {\n if (DEBUG_BUILD) {\n logger.enable();\n } else {\n // use `console.warn` rather than `logger.warn` since by non-debug bundles have all `logger.x` statements stripped\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn('[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.');\n });\n }\n }\n const scope = getCurrentScope();\n scope.update(options.initialScope);\n\n const client = new clientClass(options);\n setCurrentClient(client);\n client.init();\n return client;\n}\n\n/**\n * Make the given client the current client.\n */\nfunction setCurrentClient(client) {\n getCurrentScope().setClient(client);\n}\n\nexport { initAndBind, setCurrentClient };\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT } from '../semanticAttributes.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { getRootSpan, getActiveSpan } from '../utils/spanUtils.js';\n\n/**\n * Adds a measurement to the active transaction on the current global scope. You can optionally pass in a different span\n * as the 4th parameter.\n */\nfunction setMeasurement(name, value, unit, activeSpan = getActiveSpan()) {\n const rootSpan = activeSpan && getRootSpan(activeSpan);\n\n if (rootSpan) {\n DEBUG_BUILD && logger.log(`[Measurement] Setting measurement on root span: ${name} = ${value} ${unit}`);\n rootSpan.addEvent(name, {\n [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]: value,\n [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]: unit ,\n });\n }\n}\n\n/**\n * Convert timed events to measurements.\n */\nfunction timedEventsToMeasurements(events) {\n if (!events || events.length === 0) {\n return undefined;\n }\n\n const measurements = {};\n events.forEach(event => {\n const attributes = event.attributes || {};\n const unit = attributes[SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT] ;\n const value = attributes[SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE] ;\n\n if (typeof unit === 'string' && typeof value === 'number') {\n measurements[event.name] = { value, unit };\n }\n });\n\n return measurements;\n}\n\nexport { setMeasurement, timedEventsToMeasurements };\n","const getRating = (value, thresholds) => {\n if (value > thresholds[1]) {\n return 'poor';\n }\n if (value > thresholds[0]) {\n return 'needs-improvement';\n }\n return 'good';\n};\n\nconst bindReporter = (\n callback,\n metric,\n thresholds,\n reportAllChanges,\n) => {\n let prevValue;\n let delta;\n return (forceReport) => {\n if (metric.value >= 0) {\n if (forceReport || reportAllChanges) {\n delta = metric.value - (prevValue || 0);\n\n // Report the metric if there's a non-zero delta or if no previous\n // value exists (which can happen in the case of the document becoming\n // hidden when the metric value is 0).\n // See: https://github.com/GoogleChrome/web-vitals/issues/14\n if (delta || prevValue === undefined) {\n prevValue = metric.value;\n metric.delta = delta;\n metric.rating = getRating(metric.value, thresholds);\n callback(metric);\n }\n }\n }\n };\n};\n\nexport { bindReporter };\n","import { WINDOW } from '../../../types.js';\n\n/*\n * Copyright 2022 Google LLC\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 * https://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\n// sentry-specific change:\n// add optional param to not check for responseStart (see comment below)\nconst getNavigationEntry = (checkResponseStart = true) => {\n const navigationEntry =\n WINDOW.performance && WINDOW.performance.getEntriesByType && WINDOW.performance.getEntriesByType('navigation')[0];\n // Check to ensure the `responseStart` property is present and valid.\n // In some cases no value is reported by the browser (for\n // privacy/security reasons), and in other cases (bugs) the value is\n // negative or is larger than the current page time. Ignore these cases:\n // https://github.com/GoogleChrome/web-vitals/issues/137\n // https://github.com/GoogleChrome/web-vitals/issues/162\n // https://github.com/GoogleChrome/web-vitals/issues/275\n if (\n // sentry-specific change:\n // We don't want to check for responseStart for our own use of `getNavigationEntry`\n !checkResponseStart ||\n (navigationEntry && navigationEntry.responseStart > 0 && navigationEntry.responseStart < performance.now())\n ) {\n return navigationEntry;\n }\n};\n\nexport { getNavigationEntry };\n","import { getNavigationEntry } from './getNavigationEntry.js';\n\n/*\n * Copyright 2022 Google LLC\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 * https://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\nconst getActivationStart = () => {\n const navEntry = getNavigationEntry();\n return (navEntry && navEntry.activationStart) || 0;\n};\n\nexport { getActivationStart };\n","import { WINDOW } from '../../../types.js';\nimport { generateUniqueID } from './generateUniqueID.js';\nimport { getActivationStart } from './getActivationStart.js';\nimport { getNavigationEntry } from './getNavigationEntry.js';\n\n/*\n * Copyright 2020 Google LLC\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 * https://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\nconst initMetric = (name, value) => {\n const navEntry = getNavigationEntry();\n let navigationType = 'navigate';\n\n if (navEntry) {\n if ((WINDOW.document && WINDOW.document.prerendering) || getActivationStart() > 0) {\n navigationType = 'prerender';\n } else if (WINDOW.document && WINDOW.document.wasDiscarded) {\n navigationType = 'restore';\n } else if (navEntry.type) {\n navigationType = navEntry.type.replace(/_/g, '-') ;\n }\n }\n\n // Use `entries` type specific for the metric.\n const entries = [];\n\n return {\n name,\n value: typeof value === 'undefined' ? -1 : value,\n rating: 'good' , // If needed, will be updated when reported. `const` to keep the type from widening to `string`.\n delta: 0,\n entries,\n id: generateUniqueID(),\n navigationType,\n };\n};\n\nexport { initMetric };\n","/*\n * Copyright 2020 Google LLC\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 * https://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/**\n * Performantly generate a unique, 30-char string by combining a version\n * number, the current timestamp with a 13-digit number integer.\n * @return {string}\n */\nconst generateUniqueID = () => {\n return `v4-${Date.now()}-${Math.floor(Math.random() * (9e12 - 1)) + 1e12}`;\n};\n\nexport { generateUniqueID };\n","/*\n * Copyright 2020 Google LLC\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 * https://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/**\n * Takes a performance entry type and a callback function, and creates a\n * `PerformanceObserver` instance that will observe the specified entry type\n * with buffering enabled and call the callback _for each entry_.\n *\n * This function also feature-detects entry support and wraps the logic in a\n * try/catch to avoid errors in unsupporting browsers.\n */\nconst observe = (\n type,\n callback,\n opts,\n) => {\n try {\n if (PerformanceObserver.supportedEntryTypes.includes(type)) {\n const po = new PerformanceObserver(list => {\n // Delay by a microtask to workaround a bug in Safari where the\n // callback is invoked immediately, rather than in a separate task.\n // See: https://github.com/GoogleChrome/web-vitals/issues/277\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n Promise.resolve().then(() => {\n callback(list.getEntries() );\n });\n });\n po.observe(\n Object.assign(\n {\n type,\n buffered: true,\n },\n opts || {},\n ) ,\n );\n return po;\n }\n } catch (e) {\n // Do nothing.\n }\n return;\n};\n\nexport { observe };\n","import { WINDOW } from '../../../types.js';\n\n/*\n * Copyright 2020 Google LLC\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 * https://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\n// Sentry-specific change:\n// This function's logic was NOT updated to web-vitals 4.2.4 but we continue\n// to use the web-vitals 3.5.2 due to us having stricter browser support.\n// PR with context that made the changes: https://github.com/GoogleChrome/web-vitals/pull/442/files#r1530492402\n// The PR removed listening to the `pagehide` event, in favour of only listening to `visibilitychange` event.\n// This is \"more correct\" but some browsers we still support (Safari 12.1-14.0) don't fully support `visibilitychange`\n// or have known bugs w.r.t the `visibilitychange` event.\n// TODO (v9): If we decide to drop support for Safari 12.1-14.0, we can use the logic from web-vitals 4.2.4\n// In this case, we also need to update the integration tests that currently trigger the `pagehide` event to\n// simulate the page being hidden.\nconst onHidden = (cb) => {\n const onHiddenOrPageHide = (event) => {\n if (event.type === 'pagehide' || (WINDOW.document && WINDOW.document.visibilityState === 'hidden')) {\n cb(event);\n }\n };\n\n if (WINDOW.document) {\n addEventListener('visibilitychange', onHiddenOrPageHide, true);\n // Some browsers have buggy implementations of visibilitychange,\n // so we use pagehide in addition, just to be safe.\n addEventListener('pagehide', onHiddenOrPageHide, true);\n }\n};\n\nexport { onHidden };\n","/*\n * Copyright 2022 Google LLC\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 * https://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\nconst runOnce = (cb) => {\n let called = false;\n return () => {\n if (!called) {\n cb();\n called = true;\n }\n };\n};\n\nexport { runOnce };\n","import { WINDOW } from '../../../types.js';\n\n/*\n * Copyright 2020 Google LLC\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 * https://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\nlet firstHiddenTime = -1;\n\nconst initHiddenTime = () => {\n // If the document is hidden when this code runs, assume it was always\n // hidden and the page was loaded in the background, with the one exception\n // that visibility state is always 'hidden' during prerendering, so we have\n // to ignore that case until prerendering finishes (see: `prerenderingchange`\n // event logic below).\n return WINDOW.document.visibilityState === 'hidden' && !WINDOW.document.prerendering ? 0 : Infinity;\n};\n\nconst onVisibilityUpdate = (event) => {\n // If the document is 'hidden' and no previous hidden timestamp has been\n // set, update it based on the current event data.\n if (WINDOW.document.visibilityState === 'hidden' && firstHiddenTime > -1) {\n // If the event is a 'visibilitychange' event, it means the page was\n // visible prior to this change, so the event timestamp is the first\n // hidden time.\n // However, if the event is not a 'visibilitychange' event, then it must\n // be a 'prerenderingchange' event, and the fact that the document is\n // still 'hidden' from the above check means the tab was activated\n // in a background state and so has always been hidden.\n firstHiddenTime = event.type === 'visibilitychange' ? event.timeStamp : 0;\n\n // Remove all listeners now that a `firstHiddenTime` value has been set.\n removeChangeListeners();\n }\n};\n\nconst addChangeListeners = () => {\n addEventListener('visibilitychange', onVisibilityUpdate, true);\n // IMPORTANT: when a page is prerendering, its `visibilityState` is\n // 'hidden', so in order to account for cases where this module checks for\n // visibility during prerendering, an additional check after prerendering\n // completes is also required.\n addEventListener('prerenderingchange', onVisibilityUpdate, true);\n};\n\nconst removeChangeListeners = () => {\n removeEventListener('visibilitychange', onVisibilityUpdate, true);\n removeEventListener('prerenderingchange', onVisibilityUpdate, true);\n};\n\nconst getVisibilityWatcher = () => {\n if (WINDOW.document && firstHiddenTime < 0) {\n // If the document is hidden when this code runs, assume it was hidden\n // since navigation start. This isn't a perfect heuristic, but it's the\n // best we can do until an API is available to support querying past\n // visibilityState.\n firstHiddenTime = initHiddenTime();\n addChangeListeners();\n }\n return {\n get firstHiddenTime() {\n return firstHiddenTime;\n },\n };\n};\n\nexport { getVisibilityWatcher };\n","import { WINDOW } from '../../../types.js';\n\n/*\n * Copyright 2022 Google LLC\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 * https://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\nconst whenActivated = (callback) => {\n if (WINDOW.document && WINDOW.document.prerendering) {\n addEventListener('prerenderingchange', () => callback(), true);\n } else {\n callback();\n }\n};\n\nexport { whenActivated };\n","import { bindReporter } from './lib/bindReporter.js';\nimport { getActivationStart } from './lib/getActivationStart.js';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { observe } from './lib/observe.js';\nimport { whenActivated } from './lib/whenActivated.js';\n\n/*\n * Copyright 2020 Google LLC\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 * https://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\n/** Thresholds for FCP. See https://web.dev/articles/fcp#what_is_a_good_fcp_score */\nconst FCPThresholds = [1800, 3000];\n\n/**\n * Calculates the [FCP](https://web.dev/articles/fcp) value for the current page and\n * calls the `callback` function once the value is ready, along with the\n * relevant `paint` performance entry used to determine the value. The reported\n * value is a `DOMHighResTimeStamp`.\n */\nconst onFCP = (onReport, opts = {}) => {\n whenActivated(() => {\n const visibilityWatcher = getVisibilityWatcher();\n const metric = initMetric('FCP');\n let report;\n\n const handleEntries = (entries) => {\n entries.forEach(entry => {\n if (entry.name === 'first-contentful-paint') {\n po.disconnect();\n\n // Only report if the page wasn't hidden prior to the first paint.\n if (entry.startTime < visibilityWatcher.firstHiddenTime) {\n // The activationStart reference is used because FCP should be\n // relative to page activation rather than navigation start if the\n // page was prerendered. But in cases where `activationStart` occurs\n // after the FCP, this time should be clamped at 0.\n metric.value = Math.max(entry.startTime - getActivationStart(), 0);\n metric.entries.push(entry);\n report(true);\n }\n }\n });\n };\n\n const po = observe('paint', handleEntries);\n\n if (po) {\n report = bindReporter(onReport, metric, FCPThresholds, opts.reportAllChanges);\n }\n });\n};\n\nexport { FCPThresholds, onFCP };\n","import { bindReporter } from './lib/bindReporter.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { observe } from './lib/observe.js';\nimport { onHidden } from './lib/onHidden.js';\nimport { runOnce } from './lib/runOnce.js';\nimport { onFCP } from './onFCP.js';\n\n/*\n * Copyright 2020 Google LLC\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 * https://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\n/** Thresholds for CLS. See https://web.dev/articles/cls#what_is_a_good_cls_score */\nconst CLSThresholds = [0.1, 0.25];\n\n/**\n * Calculates the [CLS](https://web.dev/articles/cls) value for the current page and\n * calls the `callback` function once the value is ready to be reported, along\n * with all `layout-shift` performance entries that were used in the metric\n * value calculation. The reported value is a `double` (corresponding to a\n * [layout shift score](https://web.dev/articles/cls#layout_shift_score)).\n *\n * If the `reportAllChanges` configuration option is set to `true`, the\n * `callback` function will be called as soon as the value is initially\n * determined as well as any time the value changes throughout the page\n * lifespan.\n *\n * _**Important:** CLS should be continually monitored for changes throughout\n * the entire lifespan of a page—including if the user returns to the page after\n * it's been hidden/backgrounded. However, since browsers often [will not fire\n * additional callbacks once the user has backgrounded a\n * page](https://developer.chrome.com/blog/page-lifecycle-api/#advice-hidden),\n * `callback` is always called when the page's visibility state changes to\n * hidden. As a result, the `callback` function might be called multiple times\n * during the same page load._\n */\nconst onCLS = (onReport, opts = {}) => {\n // Start monitoring FCP so we can only report CLS if FCP is also reported.\n // Note: this is done to match the current behavior of CrUX.\n onFCP(\n runOnce(() => {\n const metric = initMetric('CLS', 0);\n let report;\n\n let sessionValue = 0;\n let sessionEntries = [];\n\n const handleEntries = (entries) => {\n entries.forEach(entry => {\n // Only count layout shifts without recent user input.\n if (!entry.hadRecentInput) {\n const firstSessionEntry = sessionEntries[0];\n const lastSessionEntry = sessionEntries[sessionEntries.length - 1];\n\n // If the entry occurred less than 1 second after the previous entry\n // and less than 5 seconds after the first entry in the session,\n // include the entry in the current session. Otherwise, start a new\n // session.\n if (\n sessionValue &&\n firstSessionEntry &&\n lastSessionEntry &&\n entry.startTime - lastSessionEntry.startTime < 1000 &&\n entry.startTime - firstSessionEntry.startTime < 5000\n ) {\n sessionValue += entry.value;\n sessionEntries.push(entry);\n } else {\n sessionValue = entry.value;\n sessionEntries = [entry];\n }\n }\n });\n\n // If the current session value is larger than the current CLS value,\n // update CLS and the entries contributing to it.\n if (sessionValue > metric.value) {\n metric.value = sessionValue;\n metric.entries = sessionEntries;\n report();\n }\n };\n\n const po = observe('layout-shift', handleEntries);\n if (po) {\n report = bindReporter(onReport, metric, CLSThresholds, opts.reportAllChanges);\n\n onHidden(() => {\n handleEntries(po.takeRecords() );\n report(true);\n });\n\n // Queue a task to report (if nothing else triggers a report first).\n // This allows CLS to be reported as soon as FCP fires when\n // `reportAllChanges` is true.\n setTimeout(report, 0);\n }\n }),\n );\n};\n\nexport { CLSThresholds, onCLS };\n","import { bindReporter } from './lib/bindReporter.js';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { observe } from './lib/observe.js';\nimport { onHidden } from './lib/onHidden.js';\nimport { runOnce } from './lib/runOnce.js';\nimport { whenActivated } from './lib/whenActivated.js';\n\n/*\n * Copyright 2020 Google LLC\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 * https://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\n/** Thresholds for FID. See https://web.dev/articles/fid#what_is_a_good_fid_score */\nconst FIDThresholds = [100, 300];\n\n/**\n * Calculates the [FID](https://web.dev/articles/fid) value for the current page and\n * calls the `callback` function once the value is ready, along with the\n * relevant `first-input` performance entry used to determine the value. The\n * reported value is a `DOMHighResTimeStamp`.\n *\n * _**Important:** since FID is only reported after the user interacts with the\n * page, it's possible that it will not be reported for some page loads._\n */\nconst onFID = (onReport, opts = {}) => {\n whenActivated(() => {\n const visibilityWatcher = getVisibilityWatcher();\n const metric = initMetric('FID');\n // eslint-disable-next-line prefer-const\n let report;\n\n const handleEntry = (entry) => {\n // Only report if the page wasn't hidden prior to the first input.\n if (entry.startTime < visibilityWatcher.firstHiddenTime) {\n metric.value = entry.processingStart - entry.startTime;\n metric.entries.push(entry);\n report(true);\n }\n };\n\n const handleEntries = (entries) => {\n (entries ).forEach(handleEntry);\n };\n\n const po = observe('first-input', handleEntries);\n\n report = bindReporter(onReport, metric, FIDThresholds, opts.reportAllChanges);\n\n if (po) {\n onHidden(\n runOnce(() => {\n handleEntries(po.takeRecords() );\n po.disconnect();\n }),\n );\n }\n });\n};\n\nexport { FIDThresholds, onFID };\n","import { observe } from '../observe.js';\n\n/*\n * Copyright 2022 Google LLC\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 * https://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\nlet interactionCountEstimate = 0;\nlet minKnownInteractionId = Infinity;\nlet maxKnownInteractionId = 0;\n\nconst updateEstimate = (entries) => {\n entries.forEach(e => {\n if (e.interactionId) {\n minKnownInteractionId = Math.min(minKnownInteractionId, e.interactionId);\n maxKnownInteractionId = Math.max(maxKnownInteractionId, e.interactionId);\n\n interactionCountEstimate = maxKnownInteractionId ? (maxKnownInteractionId - minKnownInteractionId) / 7 + 1 : 0;\n }\n });\n};\n\nlet po;\n\n/**\n * Returns the `interactionCount` value using the native API (if available)\n * or the polyfill estimate in this module.\n */\nconst getInteractionCount = () => {\n return po ? interactionCountEstimate : performance.interactionCount || 0;\n};\n\n/**\n * Feature detects native support or initializes the polyfill if needed.\n */\nconst initInteractionCountPolyfill = () => {\n if ('interactionCount' in performance || po) return;\n\n po = observe('event', updateEstimate, {\n type: 'event',\n buffered: true,\n durationThreshold: 0,\n } );\n};\n\nexport { getInteractionCount, initInteractionCountPolyfill };\n","import { getInteractionCount } from './polyfills/interactionCountPolyfill.js';\n\n/*\n * Copyright 2024 Google LLC\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 * https://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\n// A list of longest interactions on the page (by latency) sorted so the\n// longest one is first. The list is at most MAX_INTERACTIONS_TO_CONSIDER long.\nconst longestInteractionList = [];\n\n// A mapping of longest interactions by their interaction ID.\n// This is used for faster lookup.\nconst longestInteractionMap = new Map();\n\n// The default `durationThreshold` used across this library for observing\n// `event` entries via PerformanceObserver.\nconst DEFAULT_DURATION_THRESHOLD = 40;\n\n// Used to store the interaction count after a bfcache restore, since p98\n// interaction latencies should only consider the current navigation.\nlet prevInteractionCount = 0;\n\n/**\n * Returns the interaction count since the last bfcache restore (or for the\n * full page lifecycle if there were no bfcache restores).\n */\nconst getInteractionCountForNavigation = () => {\n return getInteractionCount() - prevInteractionCount;\n};\n\n/**\n * Returns the estimated p98 longest interaction based on the stored\n * interaction candidates and the interaction count for the current page.\n */\nconst estimateP98LongestInteraction = () => {\n const candidateInteractionIndex = Math.min(\n longestInteractionList.length - 1,\n Math.floor(getInteractionCountForNavigation() / 50),\n );\n\n return longestInteractionList[candidateInteractionIndex];\n};\n\n// To prevent unnecessary memory usage on pages with lots of interactions,\n// store at most 10 of the longest interactions to consider as INP candidates.\nconst MAX_INTERACTIONS_TO_CONSIDER = 10;\n\n/**\n * A list of callback functions to run before each entry is processed.\n * Exposing this list allows the attribution build to hook into the\n * entry processing pipeline.\n */\nconst entryPreProcessingCallbacks = [];\n\n/**\n * Takes a performance entry and adds it to the list of worst interactions\n * if its duration is long enough to make it among the worst. If the\n * entry is part of an existing interaction, it is merged and the latency\n * and entries list is updated as needed.\n */\nconst processInteractionEntry = (entry) => {\n entryPreProcessingCallbacks.forEach(cb => cb(entry));\n\n // Skip further processing for entries that cannot be INP candidates.\n if (!(entry.interactionId || entry.entryType === 'first-input')) return;\n\n // The least-long of the 10 longest interactions.\n const minLongestInteraction = longestInteractionList[longestInteractionList.length - 1];\n\n const existingInteraction = longestInteractionMap.get(entry.interactionId);\n\n // Only process the entry if it's possibly one of the ten longest,\n // or if it's part of an existing interaction.\n if (\n existingInteraction ||\n longestInteractionList.length < MAX_INTERACTIONS_TO_CONSIDER ||\n (minLongestInteraction && entry.duration > minLongestInteraction.latency)\n ) {\n // If the interaction already exists, update it. Otherwise create one.\n if (existingInteraction) {\n // If the new entry has a longer duration, replace the old entries,\n // otherwise add to the array.\n if (entry.duration > existingInteraction.latency) {\n existingInteraction.entries = [entry];\n existingInteraction.latency = entry.duration;\n } else if (\n entry.duration === existingInteraction.latency &&\n entry.startTime === (existingInteraction.entries[0] && existingInteraction.entries[0].startTime)\n ) {\n existingInteraction.entries.push(entry);\n }\n } else {\n const interaction = {\n id: entry.interactionId,\n latency: entry.duration,\n entries: [entry],\n };\n longestInteractionMap.set(interaction.id, interaction);\n longestInteractionList.push(interaction);\n }\n\n // Sort the entries by latency (descending) and keep only the top ten.\n longestInteractionList.sort((a, b) => b.latency - a.latency);\n if (longestInteractionList.length > MAX_INTERACTIONS_TO_CONSIDER) {\n longestInteractionList.splice(MAX_INTERACTIONS_TO_CONSIDER).forEach(i => longestInteractionMap.delete(i.id));\n }\n }\n};\n\nexport { DEFAULT_DURATION_THRESHOLD, entryPreProcessingCallbacks, estimateP98LongestInteraction, longestInteractionList, longestInteractionMap, processInteractionEntry };\n","import { WINDOW } from '../../../types.js';\nimport { onHidden } from './onHidden.js';\nimport { runOnce } from './runOnce.js';\n\n/*\n * Copyright 2024 Google LLC\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 * https://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\n/**\n * Runs the passed callback during the next idle period, or immediately\n * if the browser's visibility state is (or becomes) hidden.\n */\nconst whenIdle = (cb) => {\n const rIC = WINDOW.requestIdleCallback || WINDOW.setTimeout;\n\n let handle = -1;\n // eslint-disable-next-line no-param-reassign\n cb = runOnce(cb) ;\n // If the document is hidden, run the callback immediately, otherwise\n // race an idle callback with the next `visibilitychange` event.\n if (WINDOW.document && WINDOW.document.visibilityState === 'hidden') {\n cb();\n } else {\n handle = rIC(cb);\n onHidden(cb);\n }\n return handle;\n};\n\nexport { whenIdle };\n","import { WINDOW } from '../../types.js';\nimport { bindReporter } from './lib/bindReporter.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { DEFAULT_DURATION_THRESHOLD, processInteractionEntry, estimateP98LongestInteraction } from './lib/interactions.js';\nimport { observe } from './lib/observe.js';\nimport { onHidden } from './lib/onHidden.js';\nimport { initInteractionCountPolyfill } from './lib/polyfills/interactionCountPolyfill.js';\nimport { whenActivated } from './lib/whenActivated.js';\nimport { whenIdle } from './lib/whenIdle.js';\n\n/*\n * Copyright 2022 Google LLC\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 * https://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\n/** Thresholds for INP. See https://web.dev/articles/inp#what_is_a_good_inp_score */\nconst INPThresholds = [200, 500];\n\n/**\n * Calculates the [INP](https://web.dev/articles/inp) value for the current\n * page and calls the `callback` function once the value is ready, along with\n * the `event` performance entries reported for that interaction. The reported\n * value is a `DOMHighResTimeStamp`.\n *\n * A custom `durationThreshold` configuration option can optionally be passed to\n * control what `event-timing` entries are considered for INP reporting. The\n * default threshold is `40`, which means INP scores of less than 40 are\n * reported as 0. Note that this will not affect your 75th percentile INP value\n * unless that value is also less than 40 (well below the recommended\n * [good](https://web.dev/articles/inp#what_is_a_good_inp_score) threshold).\n *\n * If the `reportAllChanges` configuration option is set to `true`, the\n * `callback` function will be called as soon as the value is initially\n * determined as well as any time the value changes throughout the page\n * lifespan.\n *\n * _**Important:** INP should be continually monitored for changes throughout\n * the entire lifespan of a page—including if the user returns to the page after\n * it's been hidden/backgrounded. However, since browsers often [will not fire\n * additional callbacks once the user has backgrounded a\n * page](https://developer.chrome.com/blog/page-lifecycle-api/#advice-hidden),\n * `callback` is always called when the page's visibility state changes to\n * hidden. As a result, the `callback` function might be called multiple times\n * during the same page load._\n */\nconst onINP = (onReport, opts = {}) => {\n // Return if the browser doesn't support all APIs needed to measure INP.\n if (!('PerformanceEventTiming' in WINDOW && 'interactionId' in PerformanceEventTiming.prototype)) {\n return;\n }\n\n whenActivated(() => {\n // TODO(philipwalton): remove once the polyfill is no longer needed.\n initInteractionCountPolyfill();\n\n const metric = initMetric('INP');\n // eslint-disable-next-line prefer-const\n let report;\n\n const handleEntries = (entries) => {\n // Queue the `handleEntries()` callback in the next idle task.\n // This is needed to increase the chances that all event entries that\n // occurred between the user interaction and the next paint\n // have been dispatched. Note: there is currently an experiment\n // running in Chrome (EventTimingKeypressAndCompositionInteractionId)\n // 123+ that if rolled out fully may make this no longer necessary.\n whenIdle(() => {\n entries.forEach(processInteractionEntry);\n\n const inp = estimateP98LongestInteraction();\n\n if (inp && inp.latency !== metric.value) {\n metric.value = inp.latency;\n metric.entries = inp.entries;\n report();\n }\n });\n };\n\n const po = observe('event', handleEntries, {\n // Event Timing entries have their durations rounded to the nearest 8ms,\n // so a duration of 40ms would be any event that spans 2.5 or more frames\n // at 60Hz. This threshold is chosen to strike a balance between usefulness\n // and performance. Running this callback for any interaction that spans\n // just one or two frames is likely not worth the insight that could be\n // gained.\n durationThreshold: opts.durationThreshold != null ? opts.durationThreshold : DEFAULT_DURATION_THRESHOLD,\n });\n\n report = bindReporter(onReport, metric, INPThresholds, opts.reportAllChanges);\n\n if (po) {\n // Also observe entries of type `first-input`. This is useful in cases\n // where the first interaction is less than the `durationThreshold`.\n po.observe({ type: 'first-input', buffered: true });\n\n onHidden(() => {\n handleEntries(po.takeRecords() );\n report(true);\n });\n }\n });\n};\n\nexport { INPThresholds, onINP };\n","import { WINDOW } from '../../types.js';\nimport { bindReporter } from './lib/bindReporter.js';\nimport { getActivationStart } from './lib/getActivationStart.js';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { observe } from './lib/observe.js';\nimport { onHidden } from './lib/onHidden.js';\nimport { runOnce } from './lib/runOnce.js';\nimport { whenActivated } from './lib/whenActivated.js';\nimport { whenIdle } from './lib/whenIdle.js';\n\n/*\n * Copyright 2020 Google LLC\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 * https://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\n/** Thresholds for LCP. See https://web.dev/articles/lcp#what_is_a_good_lcp_score */\nconst LCPThresholds = [2500, 4000];\n\nconst reportedMetricIDs = {};\n\n/**\n * Calculates the [LCP](https://web.dev/articles/lcp) value for the current page and\n * calls the `callback` function once the value is ready (along with the\n * relevant `largest-contentful-paint` performance entry used to determine the\n * value). The reported value is a `DOMHighResTimeStamp`.\n *\n * If the `reportAllChanges` configuration option is set to `true`, the\n * `callback` function will be called any time a new `largest-contentful-paint`\n * performance entry is dispatched, or once the final value of the metric has\n * been determined.\n */\nconst onLCP = (onReport, opts = {}) => {\n whenActivated(() => {\n const visibilityWatcher = getVisibilityWatcher();\n const metric = initMetric('LCP');\n let report;\n\n const handleEntries = (entries) => {\n // If reportAllChanges is set then call this function for each entry,\n // otherwise only consider the last one.\n if (!opts.reportAllChanges) {\n // eslint-disable-next-line no-param-reassign\n entries = entries.slice(-1);\n }\n\n entries.forEach(entry => {\n // Only report if the page wasn't hidden prior to LCP.\n if (entry.startTime < visibilityWatcher.firstHiddenTime) {\n // The startTime attribute returns the value of the renderTime if it is\n // not 0, and the value of the loadTime otherwise. The activationStart\n // reference is used because LCP should be relative to page activation\n // rather than navigation start if the page was pre-rendered. But in cases\n // where `activationStart` occurs after the LCP, this time should be\n // clamped at 0.\n metric.value = Math.max(entry.startTime - getActivationStart(), 0);\n metric.entries = [entry];\n report();\n }\n });\n };\n\n const po = observe('largest-contentful-paint', handleEntries);\n\n if (po) {\n report = bindReporter(onReport, metric, LCPThresholds, opts.reportAllChanges);\n\n const stopListening = runOnce(() => {\n if (!reportedMetricIDs[metric.id]) {\n handleEntries(po.takeRecords() );\n po.disconnect();\n reportedMetricIDs[metric.id] = true;\n report(true);\n }\n });\n\n // Stop listening after input. Note: while scrolling is an input that\n // stops LCP observation, it's unreliable since it can be programmatically\n // generated. See: https://github.com/GoogleChrome/web-vitals/issues/75\n ['keydown', 'click'].forEach(type => {\n // Wrap in a setTimeout so the callback is run in a separate task\n // to avoid extending the keyboard/click handler to reduce INP impact\n // https://github.com/GoogleChrome/web-vitals/issues/383\n if (WINDOW.document) {\n addEventListener(type, () => whenIdle(stopListening ), {\n once: true,\n capture: true,\n });\n }\n });\n\n onHidden(stopListening);\n }\n });\n};\n\nexport { LCPThresholds, onLCP };\n","import { WINDOW } from '../../types.js';\nimport { bindReporter } from './lib/bindReporter.js';\nimport { getActivationStart } from './lib/getActivationStart.js';\nimport { getNavigationEntry } from './lib/getNavigationEntry.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { whenActivated } from './lib/whenActivated.js';\n\n/*\n * Copyright 2020 Google LLC\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 * https://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\n/** Thresholds for TTFB. See https://web.dev/articles/ttfb#what_is_a_good_ttfb_score */\nconst TTFBThresholds = [800, 1800];\n\n/**\n * Runs in the next task after the page is done loading and/or prerendering.\n * @param callback\n */\nconst whenReady = (callback) => {\n if (WINDOW.document && WINDOW.document.prerendering) {\n whenActivated(() => whenReady(callback));\n } else if (WINDOW.document && WINDOW.document.readyState !== 'complete') {\n addEventListener('load', () => whenReady(callback), true);\n } else {\n // Queue a task so the callback runs after `loadEventEnd`.\n setTimeout(callback, 0);\n }\n};\n\n/**\n * Calculates the [TTFB](https://web.dev/articles/ttfb) value for the\n * current page and calls the `callback` function once the page has loaded,\n * along with the relevant `navigation` performance entry used to determine the\n * value. The reported value is a `DOMHighResTimeStamp`.\n *\n * Note, this function waits until after the page is loaded to call `callback`\n * in order to ensure all properties of the `navigation` entry are populated.\n * This is useful if you want to report on other metrics exposed by the\n * [Navigation Timing API](https://w3c.github.io/navigation-timing/). For\n * example, the TTFB metric starts from the page's [time\n * origin](https://www.w3.org/TR/hr-time-2/#sec-time-origin), which means it\n * includes time spent on DNS lookup, connection negotiation, network latency,\n * and server processing time.\n */\nconst onTTFB = (onReport, opts = {}) => {\n const metric = initMetric('TTFB');\n const report = bindReporter(onReport, metric, TTFBThresholds, opts.reportAllChanges);\n\n whenReady(() => {\n const navigationEntry = getNavigationEntry();\n\n if (navigationEntry) {\n // The activationStart reference is used because TTFB should be\n // relative to page activation rather than navigation start if the\n // page was prerendered. But in cases where `activationStart` occurs\n // after the first byte is received, this time should be clamped at 0.\n metric.value = Math.max(navigationEntry.responseStart - getActivationStart(), 0);\n\n metric.entries = [navigationEntry];\n report(true);\n }\n });\n};\n\nexport { TTFBThresholds, onTTFB };\n","import { logger, getFunctionName } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { onCLS } from './web-vitals/getCLS.js';\nimport { onFID } from './web-vitals/getFID.js';\nimport { onINP } from './web-vitals/getINP.js';\nimport { onLCP } from './web-vitals/getLCP.js';\nimport { observe } from './web-vitals/lib/observe.js';\nimport { onTTFB } from './web-vitals/onTTFB.js';\n\nconst handlers = {};\nconst instrumented = {};\n\nlet _previousCls;\nlet _previousFid;\nlet _previousLcp;\nlet _previousTtfb;\nlet _previousInp;\n\n/**\n * Add a callback that will be triggered when a CLS metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n *\n * Pass `stopOnCallback = true` to stop listening for CLS when the cleanup callback is called.\n * This will lead to the CLS being finalized and frozen.\n */\nfunction addClsInstrumentationHandler(\n callback,\n stopOnCallback = false,\n) {\n return addMetricObserver('cls', callback, instrumentCls, _previousCls, stopOnCallback);\n}\n\n/**\n * Add a callback that will be triggered when a LCP metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n *\n * Pass `stopOnCallback = true` to stop listening for LCP when the cleanup callback is called.\n * This will lead to the LCP being finalized and frozen.\n */\nfunction addLcpInstrumentationHandler(\n callback,\n stopOnCallback = false,\n) {\n return addMetricObserver('lcp', callback, instrumentLcp, _previousLcp, stopOnCallback);\n}\n\n/**\n * Add a callback that will be triggered when a FID metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nfunction addFidInstrumentationHandler(callback) {\n return addMetricObserver('fid', callback, instrumentFid, _previousFid);\n}\n\n/**\n * Add a callback that will be triggered when a FID metric is available.\n */\nfunction addTtfbInstrumentationHandler(callback) {\n return addMetricObserver('ttfb', callback, instrumentTtfb, _previousTtfb);\n}\n\n/**\n * Add a callback that will be triggered when a INP metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nfunction addInpInstrumentationHandler(\n callback,\n) {\n return addMetricObserver('inp', callback, instrumentInp, _previousInp);\n}\n\n/**\n * Add a callback that will be triggered when a performance observer is triggered,\n * and receives the entries of the observer.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nfunction addPerformanceInstrumentationHandler(\n type,\n callback,\n) {\n addHandler(type, callback);\n\n if (!instrumented[type]) {\n instrumentPerformanceObserver(type);\n instrumented[type] = true;\n }\n\n return getCleanupCallback(type, callback);\n}\n\n/** Trigger all handlers of a given type. */\nfunction triggerHandlers(type, data) {\n const typeHandlers = handlers[type];\n\n if (!typeHandlers || !typeHandlers.length) {\n return;\n }\n\n for (const handler of typeHandlers) {\n try {\n handler(data);\n } catch (e) {\n DEBUG_BUILD &&\n logger.error(\n `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(handler)}\\nError:`,\n e,\n );\n }\n }\n}\n\nfunction instrumentCls() {\n return onCLS(\n metric => {\n triggerHandlers('cls', {\n metric,\n });\n _previousCls = metric;\n },\n // We want the callback to be called whenever the CLS value updates.\n // By default, the callback is only called when the tab goes to the background.\n { reportAllChanges: true },\n );\n}\n\nfunction instrumentFid() {\n return onFID(metric => {\n triggerHandlers('fid', {\n metric,\n });\n _previousFid = metric;\n });\n}\n\nfunction instrumentLcp() {\n return onLCP(\n metric => {\n triggerHandlers('lcp', {\n metric,\n });\n _previousLcp = metric;\n },\n // We want the callback to be called whenever the LCP value updates.\n // By default, the callback is only called when the tab goes to the background.\n { reportAllChanges: true },\n );\n}\n\nfunction instrumentTtfb() {\n return onTTFB(metric => {\n triggerHandlers('ttfb', {\n metric,\n });\n _previousTtfb = metric;\n });\n}\n\nfunction instrumentInp() {\n return onINP(metric => {\n triggerHandlers('inp', {\n metric,\n });\n _previousInp = metric;\n });\n}\n\nfunction addMetricObserver(\n type,\n callback,\n instrumentFn,\n previousValue,\n stopOnCallback = false,\n) {\n addHandler(type, callback);\n\n let stopListening;\n\n if (!instrumented[type]) {\n stopListening = instrumentFn();\n instrumented[type] = true;\n }\n\n if (previousValue) {\n callback({ metric: previousValue });\n }\n\n return getCleanupCallback(type, callback, stopOnCallback ? stopListening : undefined);\n}\n\nfunction instrumentPerformanceObserver(type) {\n const options = {};\n\n // Special per-type options we want to use\n if (type === 'event') {\n options.durationThreshold = 0;\n }\n\n observe(\n type,\n entries => {\n triggerHandlers(type, { entries });\n },\n options,\n );\n}\n\nfunction addHandler(type, handler) {\n handlers[type] = handlers[type] || [];\n (handlers[type] ).push(handler);\n}\n\n// Get a callback which can be called to remove the instrumentation handler\nfunction getCleanupCallback(\n type,\n callback,\n stopListening,\n) {\n return () => {\n if (stopListening) {\n stopListening();\n }\n\n const typeHandlers = handlers[type];\n\n if (!typeHandlers) {\n return;\n }\n\n const index = typeHandlers.indexOf(callback);\n if (index !== -1) {\n typeHandlers.splice(index, 1);\n }\n };\n}\n\n/**\n * Check if a PerformanceEntry is a PerformanceEventTiming by checking for the `duration` property.\n */\nfunction isPerformanceEventTiming(entry) {\n return 'duration' in entry;\n}\n\nexport { addClsInstrumentationHandler, addFidInstrumentationHandler, addInpInstrumentationHandler, addLcpInstrumentationHandler, addPerformanceInstrumentationHandler, addTtfbInstrumentationHandler, isPerformanceEventTiming };\n","import { generateTraceId, generateSpanId } from '../utils-hoist/propagationContext.js';\nimport { TRACE_FLAG_NONE } from '../utils/spanUtils.js';\n\n/**\n * A Sentry Span that is non-recording, meaning it will not be sent to Sentry.\n */\nclass SentryNonRecordingSpan {\n\n constructor(spanContext = {}) {\n this._traceId = spanContext.traceId || generateTraceId();\n this._spanId = spanContext.spanId || generateSpanId();\n }\n\n /** @inheritdoc */\n spanContext() {\n return {\n spanId: this._spanId,\n traceId: this._traceId,\n traceFlags: TRACE_FLAG_NONE,\n };\n }\n\n /** @inheritdoc */\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n end(_timestamp) {}\n\n /** @inheritdoc */\n setAttribute(_key, _value) {\n return this;\n }\n\n /** @inheritdoc */\n setAttributes(_values) {\n return this;\n }\n\n /** @inheritdoc */\n setStatus(_status) {\n return this;\n }\n\n /** @inheritdoc */\n updateName(_name) {\n return this;\n }\n\n /** @inheritdoc */\n isRecording() {\n return false;\n }\n\n /** @inheritdoc */\n addEvent(\n _name,\n _attributesOrStartTime,\n _startTime,\n ) {\n return this;\n }\n\n /**\n * This should generally not be used,\n * but we need it for being compliant with the OTEL Span interface.\n *\n * @hidden\n * @internal\n */\n addLink(_link) {\n return this;\n }\n\n /**\n * This should generally not be used,\n * but we need it for being compliant with the OTEL Span interface.\n *\n * @hidden\n * @internal\n */\n addLinks(_links) {\n return this;\n }\n\n /**\n * This should generally not be used,\n * but we need it for being compliant with the OTEL Span interface.\n *\n * @hidden\n * @internal\n */\n recordException(_exception, _time) {\n // noop\n }\n}\n\nexport { SentryNonRecordingSpan };\n","import { addNonEnumerableProperty } from '../utils-hoist/object.js';\n\nconst SCOPE_ON_START_SPAN_FIELD = '_sentryScope';\nconst ISOLATION_SCOPE_ON_START_SPAN_FIELD = '_sentryIsolationScope';\n\n/** Store the scope & isolation scope for a span, which can the be used when it is finished. */\nfunction setCapturedScopesOnSpan(span, scope, isolationScope) {\n if (span) {\n addNonEnumerableProperty(span, ISOLATION_SCOPE_ON_START_SPAN_FIELD, isolationScope);\n addNonEnumerableProperty(span, SCOPE_ON_START_SPAN_FIELD, scope);\n }\n}\n\n/**\n * Grabs the scope and isolation scope off a span that were active when the span was started.\n */\nfunction getCapturedScopesOnSpan(span) {\n return {\n scope: (span )[SCOPE_ON_START_SPAN_FIELD],\n isolationScope: (span )[ISOLATION_SCOPE_ON_START_SPAN_FIELD],\n };\n}\n\nexport { getCapturedScopesOnSpan, setCapturedScopesOnSpan };\n","import { getClient, getCurrentScope } from '../currentScopes.js';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { createSpanEnvelope } from '../envelope.js';\nimport { getMetricSummaryJsonForSpan } from '../metrics/metric-summary.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_PROFILE_ID, SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME, SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME } from '../semanticAttributes.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { dropUndefinedKeys } from '../utils-hoist/object.js';\nimport { generateTraceId, generateSpanId } from '../utils-hoist/propagationContext.js';\nimport { timestampInSeconds } from '../utils-hoist/time.js';\nimport { TRACE_FLAG_SAMPLED, TRACE_FLAG_NONE, spanTimeInputToSeconds, getStatusMessage, getRootSpan, spanToJSON, getSpanDescendants, spanToTransactionTraceContext } from '../utils/spanUtils.js';\nimport { getDynamicSamplingContextFromSpan } from './dynamicSamplingContext.js';\nimport { logSpanEnd } from './logSpans.js';\nimport { timedEventsToMeasurements } from './measurement.js';\nimport { getCapturedScopesOnSpan } from './utils.js';\n\nconst MAX_SPAN_COUNT = 1000;\n\n/**\n * Span contains all data about a span\n */\nclass SentrySpan {\n\n /** Epoch timestamp in seconds when the span started. */\n\n /** Epoch timestamp in seconds when the span ended. */\n\n /** Internal keeper of the status */\n\n /** The timed events added to this span. */\n\n /** if true, treat span as a standalone span (not part of a transaction) */\n\n /**\n * You should never call the constructor manually, always use `Sentry.startSpan()`\n * or other span methods.\n * @internal\n * @hideconstructor\n * @hidden\n */\n constructor(spanContext = {}) {\n this._traceId = spanContext.traceId || generateTraceId();\n this._spanId = spanContext.spanId || generateSpanId();\n this._startTime = spanContext.startTimestamp || timestampInSeconds();\n\n this._attributes = {};\n this.setAttributes({\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'manual',\n [SEMANTIC_ATTRIBUTE_SENTRY_OP]: spanContext.op,\n ...spanContext.attributes,\n });\n\n this._name = spanContext.name;\n\n if (spanContext.parentSpanId) {\n this._parentSpanId = spanContext.parentSpanId;\n }\n // We want to include booleans as well here\n if ('sampled' in spanContext) {\n this._sampled = spanContext.sampled;\n }\n if (spanContext.endTimestamp) {\n this._endTime = spanContext.endTimestamp;\n }\n\n this._events = [];\n\n this._isStandaloneSpan = spanContext.isStandalone;\n\n // If the span is already ended, ensure we finalize the span immediately\n if (this._endTime) {\n this._onSpanEnded();\n }\n }\n\n /**\n * This should generally not be used,\n * but it is needed for being compliant with the OTEL Span interface.\n *\n * @hidden\n * @internal\n */\n addLink(_link) {\n return this;\n }\n\n /**\n * This should generally not be used,\n * but it is needed for being compliant with the OTEL Span interface.\n *\n * @hidden\n * @internal\n */\n addLinks(_links) {\n return this;\n }\n\n /**\n * This should generally not be used,\n * but it is needed for being compliant with the OTEL Span interface.\n *\n * @hidden\n * @internal\n */\n recordException(_exception, _time) {\n // noop\n }\n\n /** @inheritdoc */\n spanContext() {\n const { _spanId: spanId, _traceId: traceId, _sampled: sampled } = this;\n return {\n spanId,\n traceId,\n traceFlags: sampled ? TRACE_FLAG_SAMPLED : TRACE_FLAG_NONE,\n };\n }\n\n /** @inheritdoc */\n setAttribute(key, value) {\n if (value === undefined) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._attributes[key];\n } else {\n this._attributes[key] = value;\n }\n\n return this;\n }\n\n /** @inheritdoc */\n setAttributes(attributes) {\n Object.keys(attributes).forEach(key => this.setAttribute(key, attributes[key]));\n return this;\n }\n\n /**\n * This should generally not be used,\n * but we need it for browser tracing where we want to adjust the start time afterwards.\n * USE THIS WITH CAUTION!\n *\n * @hidden\n * @internal\n */\n updateStartTime(timeInput) {\n this._startTime = spanTimeInputToSeconds(timeInput);\n }\n\n /**\n * @inheritDoc\n */\n setStatus(value) {\n this._status = value;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n updateName(name) {\n this._name = name;\n this.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'custom');\n return this;\n }\n\n /** @inheritdoc */\n end(endTimestamp) {\n // If already ended, skip\n if (this._endTime) {\n return;\n }\n\n this._endTime = spanTimeInputToSeconds(endTimestamp);\n logSpanEnd(this);\n\n this._onSpanEnded();\n }\n\n /**\n * Get JSON representation of this span.\n *\n * @hidden\n * @internal This method is purely for internal purposes and should not be used outside\n * of SDK code. If you need to get a JSON representation of a span,\n * use `spanToJSON(span)` instead.\n */\n getSpanJSON() {\n return dropUndefinedKeys({\n data: this._attributes,\n description: this._name,\n op: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP],\n parent_span_id: this._parentSpanId,\n span_id: this._spanId,\n start_timestamp: this._startTime,\n status: getStatusMessage(this._status),\n timestamp: this._endTime,\n trace_id: this._traceId,\n origin: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] ,\n _metrics_summary: getMetricSummaryJsonForSpan(this),\n profile_id: this._attributes[SEMANTIC_ATTRIBUTE_PROFILE_ID] ,\n exclusive_time: this._attributes[SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME] ,\n measurements: timedEventsToMeasurements(this._events),\n is_segment: (this._isStandaloneSpan && getRootSpan(this) === this) || undefined,\n segment_id: this._isStandaloneSpan ? getRootSpan(this).spanContext().spanId : undefined,\n });\n }\n\n /** @inheritdoc */\n isRecording() {\n return !this._endTime && !!this._sampled;\n }\n\n /**\n * @inheritdoc\n */\n addEvent(\n name,\n attributesOrStartTime,\n startTime,\n ) {\n DEBUG_BUILD && logger.log('[Tracing] Adding an event to span:', name);\n\n const time = isSpanTimeInput(attributesOrStartTime) ? attributesOrStartTime : startTime || timestampInSeconds();\n const attributes = isSpanTimeInput(attributesOrStartTime) ? {} : attributesOrStartTime || {};\n\n const event = {\n name,\n time: spanTimeInputToSeconds(time),\n attributes,\n };\n\n this._events.push(event);\n\n return this;\n }\n\n /**\n * This method should generally not be used,\n * but for now we need a way to publicly check if the `_isStandaloneSpan` flag is set.\n * USE THIS WITH CAUTION!\n * @internal\n * @hidden\n * @experimental\n */\n isStandaloneSpan() {\n return !!this._isStandaloneSpan;\n }\n\n /** Emit `spanEnd` when the span is ended. */\n _onSpanEnded() {\n const client = getClient();\n if (client) {\n client.emit('spanEnd', this);\n }\n\n // A segment span is basically the root span of a local span tree.\n // So for now, this is either what we previously refer to as the root span,\n // or a standalone span.\n const isSegmentSpan = this._isStandaloneSpan || this === getRootSpan(this);\n\n if (!isSegmentSpan) {\n return;\n }\n\n // if this is a standalone span, we send it immediately\n if (this._isStandaloneSpan) {\n if (this._sampled) {\n sendSpanEnvelope(createSpanEnvelope([this], client));\n } else {\n DEBUG_BUILD &&\n logger.log('[Tracing] Discarding standalone span because its trace was not chosen to be sampled.');\n if (client) {\n client.recordDroppedEvent('sample_rate', 'span');\n }\n }\n return;\n }\n\n const transactionEvent = this._convertSpanToTransaction();\n if (transactionEvent) {\n const scope = getCapturedScopesOnSpan(this).scope || getCurrentScope();\n scope.captureEvent(transactionEvent);\n }\n }\n\n /**\n * Finish the transaction & prepare the event to send to Sentry.\n */\n _convertSpanToTransaction() {\n // We can only convert finished spans\n if (!isFullFinishedSpan(spanToJSON(this))) {\n return undefined;\n }\n\n if (!this._name) {\n DEBUG_BUILD && logger.warn('Transaction has no name, falling back to `<unlabeled transaction>`.');\n this._name = '<unlabeled transaction>';\n }\n\n const { scope: capturedSpanScope, isolationScope: capturedSpanIsolationScope } = getCapturedScopesOnSpan(this);\n const scope = capturedSpanScope || getCurrentScope();\n const client = scope.getClient() || getClient();\n\n if (this._sampled !== true) {\n // At this point if `sampled !== true` we want to discard the transaction.\n DEBUG_BUILD && logger.log('[Tracing] Discarding transaction because its trace was not chosen to be sampled.');\n\n if (client) {\n client.recordDroppedEvent('sample_rate', 'transaction');\n }\n\n return undefined;\n }\n\n // The transaction span itself as well as any potential standalone spans should be filtered out\n const finishedSpans = getSpanDescendants(this).filter(span => span !== this && !isStandaloneSpan(span));\n\n const spans = finishedSpans.map(span => spanToJSON(span)).filter(isFullFinishedSpan);\n\n const source = this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] ;\n\n // remove internal root span attributes we don't need to send.\n /* eslint-disable @typescript-eslint/no-dynamic-delete */\n delete this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME];\n spans.forEach(span => {\n span.data && delete span.data[SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME];\n });\n // eslint-enabled-next-line @typescript-eslint/no-dynamic-delete\n\n const transaction = {\n contexts: {\n trace: spanToTransactionTraceContext(this),\n },\n spans:\n // spans.sort() mutates the array, but `spans` is already a copy so we can safely do this here\n // we do not use spans anymore after this point\n spans.length > MAX_SPAN_COUNT\n ? spans.sort((a, b) => a.start_timestamp - b.start_timestamp).slice(0, MAX_SPAN_COUNT)\n : spans,\n start_timestamp: this._startTime,\n timestamp: this._endTime,\n transaction: this._name,\n type: 'transaction',\n sdkProcessingMetadata: {\n capturedSpanScope,\n capturedSpanIsolationScope,\n ...dropUndefinedKeys({\n dynamicSamplingContext: getDynamicSamplingContextFromSpan(this),\n }),\n },\n _metrics_summary: getMetricSummaryJsonForSpan(this),\n ...(source && {\n transaction_info: {\n source,\n },\n }),\n };\n\n const measurements = timedEventsToMeasurements(this._events);\n const hasMeasurements = measurements && Object.keys(measurements).length;\n\n if (hasMeasurements) {\n DEBUG_BUILD &&\n logger.log(\n '[Measurements] Adding measurements to transaction event',\n JSON.stringify(measurements, undefined, 2),\n );\n transaction.measurements = measurements;\n }\n\n return transaction;\n }\n}\n\nfunction isSpanTimeInput(value) {\n return (value && typeof value === 'number') || value instanceof Date || Array.isArray(value);\n}\n\n// We want to filter out any incomplete SpanJSON objects\nfunction isFullFinishedSpan(input) {\n return !!input.start_timestamp && !!input.timestamp && !!input.span_id && !!input.trace_id;\n}\n\n/** `SentrySpan`s can be sent as a standalone span rather than belonging to a transaction */\nfunction isStandaloneSpan(span) {\n return span instanceof SentrySpan && span.isStandaloneSpan();\n}\n\n/**\n * Sends a `SpanEnvelope`.\n *\n * Note: If the envelope's spans are dropped, e.g. via `beforeSendSpan`,\n * the envelope will not be sent either.\n */\nfunction sendSpanEnvelope(envelope) {\n const client = getClient();\n if (!client) {\n return;\n }\n\n const spanItems = envelope[1];\n if (!spanItems || spanItems.length === 0) {\n client.recordDroppedEvent('before_send', 'span');\n return;\n }\n\n // sendEnvelope should not throw\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n client.sendEnvelope(envelope);\n}\n\nexport { SentrySpan };\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { spanToJSON, spanIsSampled, getRootSpan } from '../utils/spanUtils.js';\n\n/**\n * Print a log message for a started span.\n */\nfunction logSpanStart(span) {\n if (!DEBUG_BUILD) return;\n\n const { description = '< unknown name >', op = '< unknown op >', parent_span_id: parentSpanId } = spanToJSON(span);\n const { spanId } = span.spanContext();\n\n const sampled = spanIsSampled(span);\n const rootSpan = getRootSpan(span);\n const isRootSpan = rootSpan === span;\n\n const header = `[Tracing] Starting ${sampled ? 'sampled' : 'unsampled'} ${isRootSpan ? 'root ' : ''}span`;\n\n const infoParts = [`op: ${op}`, `name: ${description}`, `ID: ${spanId}`];\n\n if (parentSpanId) {\n infoParts.push(`parent ID: ${parentSpanId}`);\n }\n\n if (!isRootSpan) {\n const { op, description } = spanToJSON(rootSpan);\n infoParts.push(`root ID: ${rootSpan.spanContext().spanId}`);\n if (op) {\n infoParts.push(`root op: ${op}`);\n }\n if (description) {\n infoParts.push(`root description: ${description}`);\n }\n }\n\n logger.log(`${header}\n ${infoParts.join('\\n ')}`);\n}\n\n/**\n * Print a log message for an ended span.\n */\nfunction logSpanEnd(span) {\n if (!DEBUG_BUILD) return;\n\n const { description = '< unknown name >', op = '< unknown op >' } = spanToJSON(span);\n const { spanId } = span.spanContext();\n const rootSpan = getRootSpan(span);\n const isRootSpan = rootSpan === span;\n\n const msg = `[Tracing] Finishing \"${op}\" ${isRootSpan ? 'root ' : ''}span \"${description}\" with ID ${spanId}`;\n logger.log(msg);\n}\n\nexport { logSpanEnd, logSpanStart };\n","import { getMainCarrier } from '../carrier.js';\nimport { withScope, getCurrentScope, getIsolationScope, getClient } from '../currentScopes.js';\nimport { getAsyncContextStrategy } from '../asyncContext/index.js';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE } from '../semanticAttributes.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { generateTraceId } from '../utils-hoist/propagationContext.js';\nimport { propagationContextFromHeaders } from '../utils-hoist/tracing.js';\nimport { handleCallbackErrors } from '../utils/handleCallbackErrors.js';\nimport { hasTracingEnabled } from '../utils/hasTracingEnabled.js';\nimport { _setSpanForScope, _getSpanForScope } from '../utils/spanOnScope.js';\nimport { spanToJSON, addChildSpanToSpan, spanIsSampled, spanTimeInputToSeconds, getRootSpan } from '../utils/spanUtils.js';\nimport { getDynamicSamplingContextFromSpan, freezeDscOnSpan } from './dynamicSamplingContext.js';\nimport { logSpanStart } from './logSpans.js';\nimport { sampleSpan } from './sampling.js';\nimport { SentryNonRecordingSpan } from './sentryNonRecordingSpan.js';\nimport { SentrySpan } from './sentrySpan.js';\nimport { SPAN_STATUS_ERROR } from './spanstatus.js';\nimport { setCapturedScopesOnSpan } from './utils.js';\n\nconst SUPPRESS_TRACING_KEY = '__SENTRY_SUPPRESS_TRACING__';\n\n/**\n * Wraps a function with a transaction/span and finishes the span after the function is done.\n * The created span is the active span and will be used as parent by other spans created inside the function\n * and can be accessed via `Sentry.getActiveSpan()`, as long as the function is executed while the scope is active.\n *\n * If you want to create a span that is not set as active, use {@link startInactiveSpan}.\n *\n * You'll always get a span passed to the callback,\n * it may just be a non-recording span if the span is not sampled or if tracing is disabled.\n */\nfunction startSpan(options, callback) {\n const acs = getAcs();\n if (acs.startSpan) {\n return acs.startSpan(options, callback);\n }\n\n const spanArguments = parseSentrySpanArguments(options);\n const { forceTransaction, parentSpan: customParentSpan } = options;\n\n return withScope(options.scope, () => {\n // If `options.parentSpan` is defined, we want to wrap the callback in `withActiveSpan`\n const wrapper = getActiveSpanWrapper(customParentSpan);\n\n return wrapper(() => {\n const scope = getCurrentScope();\n const parentSpan = getParentSpan(scope);\n\n const shouldSkipSpan = options.onlyIfParent && !parentSpan;\n const activeSpan = shouldSkipSpan\n ? new SentryNonRecordingSpan()\n : createChildOrRootSpan({\n parentSpan,\n spanArguments,\n forceTransaction,\n scope,\n });\n\n _setSpanForScope(scope, activeSpan);\n\n return handleCallbackErrors(\n () => callback(activeSpan),\n () => {\n // Only update the span status if it hasn't been changed yet, and the span is not yet finished\n const { status } = spanToJSON(activeSpan);\n if (activeSpan.isRecording() && (!status || status === 'ok')) {\n activeSpan.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n }\n },\n () => activeSpan.end(),\n );\n });\n });\n}\n\n/**\n * Similar to `Sentry.startSpan`. Wraps a function with a transaction/span, but does not finish the span\n * after the function is done automatically. You'll have to call `span.end()` manually.\n *\n * The created span is the active span and will be used as parent by other spans created inside the function\n * and can be accessed via `Sentry.getActiveSpan()`, as long as the function is executed while the scope is active.\n *\n * You'll always get a span passed to the callback,\n * it may just be a non-recording span if the span is not sampled or if tracing is disabled.\n */\nfunction startSpanManual(options, callback) {\n const acs = getAcs();\n if (acs.startSpanManual) {\n return acs.startSpanManual(options, callback);\n }\n\n const spanArguments = parseSentrySpanArguments(options);\n const { forceTransaction, parentSpan: customParentSpan } = options;\n\n return withScope(options.scope, () => {\n // If `options.parentSpan` is defined, we want to wrap the callback in `withActiveSpan`\n const wrapper = getActiveSpanWrapper(customParentSpan);\n\n return wrapper(() => {\n const scope = getCurrentScope();\n const parentSpan = getParentSpan(scope);\n\n const shouldSkipSpan = options.onlyIfParent && !parentSpan;\n const activeSpan = shouldSkipSpan\n ? new SentryNonRecordingSpan()\n : createChildOrRootSpan({\n parentSpan,\n spanArguments,\n forceTransaction,\n scope,\n });\n\n _setSpanForScope(scope, activeSpan);\n\n function finishAndSetSpan() {\n activeSpan.end();\n }\n\n return handleCallbackErrors(\n () => callback(activeSpan, finishAndSetSpan),\n () => {\n // Only update the span status if it hasn't been changed yet, and the span is not yet finished\n const { status } = spanToJSON(activeSpan);\n if (activeSpan.isRecording() && (!status || status === 'ok')) {\n activeSpan.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n }\n },\n );\n });\n });\n}\n\n/**\n * Creates a span. This span is not set as active, so will not get automatic instrumentation spans\n * as children or be able to be accessed via `Sentry.getActiveSpan()`.\n *\n * If you want to create a span that is set as active, use {@link startSpan}.\n *\n * This function will always return a span,\n * it may just be a non-recording span if the span is not sampled or if tracing is disabled.\n */\nfunction startInactiveSpan(options) {\n const acs = getAcs();\n if (acs.startInactiveSpan) {\n return acs.startInactiveSpan(options);\n }\n\n const spanArguments = parseSentrySpanArguments(options);\n const { forceTransaction, parentSpan: customParentSpan } = options;\n\n // If `options.scope` is defined, we use this as as a wrapper,\n // If `options.parentSpan` is defined, we want to wrap the callback in `withActiveSpan`\n const wrapper = options.scope\n ? (callback) => withScope(options.scope, callback)\n : customParentSpan !== undefined\n ? (callback) => withActiveSpan(customParentSpan, callback)\n : (callback) => callback();\n\n return wrapper(() => {\n const scope = getCurrentScope();\n const parentSpan = getParentSpan(scope);\n\n const shouldSkipSpan = options.onlyIfParent && !parentSpan;\n\n if (shouldSkipSpan) {\n return new SentryNonRecordingSpan();\n }\n\n return createChildOrRootSpan({\n parentSpan,\n spanArguments,\n forceTransaction,\n scope,\n });\n });\n}\n\n/**\n * Continue a trace from `sentry-trace` and `baggage` values.\n * These values can be obtained from incoming request headers, or in the browser from `<meta name=\"sentry-trace\">`\n * and `<meta name=\"baggage\">` HTML tags.\n *\n * Spans started with `startSpan`, `startSpanManual` and `startInactiveSpan`, within the callback will automatically\n * be attached to the incoming trace.\n */\nconst continueTrace = (\n options\n\n,\n callback,\n) => {\n const carrier = getMainCarrier();\n const acs = getAsyncContextStrategy(carrier);\n if (acs.continueTrace) {\n return acs.continueTrace(options, callback);\n }\n\n const { sentryTrace, baggage } = options;\n\n return withScope(scope => {\n const propagationContext = propagationContextFromHeaders(sentryTrace, baggage);\n scope.setPropagationContext(propagationContext);\n return callback();\n });\n};\n\n/**\n * Forks the current scope and sets the provided span as active span in the context of the provided callback. Can be\n * passed `null` to start an entirely new span tree.\n *\n * @param span Spans started in the context of the provided callback will be children of this span. If `null` is passed,\n * spans started within the callback will not be attached to a parent span.\n * @param callback Execution context in which the provided span will be active. Is passed the newly forked scope.\n * @returns the value returned from the provided callback function.\n */\nfunction withActiveSpan(span, callback) {\n const acs = getAcs();\n if (acs.withActiveSpan) {\n return acs.withActiveSpan(span, callback);\n }\n\n return withScope(scope => {\n _setSpanForScope(scope, span || undefined);\n return callback(scope);\n });\n}\n\n/** Suppress tracing in the given callback, ensuring no spans are generated inside of it. */\nfunction suppressTracing(callback) {\n const acs = getAcs();\n\n if (acs.suppressTracing) {\n return acs.suppressTracing(callback);\n }\n\n return withScope(scope => {\n scope.setSDKProcessingMetadata({ [SUPPRESS_TRACING_KEY]: true });\n return callback();\n });\n}\n\n/**\n * Starts a new trace for the duration of the provided callback. Spans started within the\n * callback will be part of the new trace instead of a potentially previously started trace.\n *\n * Important: Only use this function if you want to override the default trace lifetime and\n * propagation mechanism of the SDK for the duration and scope of the provided callback.\n * The newly created trace will also be the root of a new distributed trace, for example if\n * you make http requests within the callback.\n * This function might be useful if the operation you want to instrument should not be part\n * of a potentially ongoing trace.\n *\n * Default behavior:\n * - Server-side: A new trace is started for each incoming request.\n * - Browser: A new trace is started for each page our route. Navigating to a new route\n * or page will automatically create a new trace.\n */\nfunction startNewTrace(callback) {\n return withScope(scope => {\n scope.setPropagationContext({ traceId: generateTraceId() });\n DEBUG_BUILD && logger.info(`Starting a new trace with id ${scope.getPropagationContext().traceId}`);\n return withActiveSpan(null, callback);\n });\n}\n\nfunction createChildOrRootSpan({\n parentSpan,\n spanArguments,\n forceTransaction,\n scope,\n}\n\n) {\n if (!hasTracingEnabled()) {\n return new SentryNonRecordingSpan();\n }\n\n const isolationScope = getIsolationScope();\n\n let span;\n if (parentSpan && !forceTransaction) {\n span = _startChildSpan(parentSpan, scope, spanArguments);\n addChildSpanToSpan(parentSpan, span);\n } else if (parentSpan) {\n // If we forced a transaction but have a parent span, make sure to continue from the parent span, not the scope\n const dsc = getDynamicSamplingContextFromSpan(parentSpan);\n const { traceId, spanId: parentSpanId } = parentSpan.spanContext();\n const parentSampled = spanIsSampled(parentSpan);\n\n span = _startRootSpan(\n {\n traceId,\n parentSpanId,\n ...spanArguments,\n },\n scope,\n parentSampled,\n );\n\n freezeDscOnSpan(span, dsc);\n } else {\n const {\n traceId,\n dsc,\n parentSpanId,\n sampled: parentSampled,\n } = {\n ...isolationScope.getPropagationContext(),\n ...scope.getPropagationContext(),\n };\n\n span = _startRootSpan(\n {\n traceId,\n parentSpanId,\n ...spanArguments,\n },\n scope,\n parentSampled,\n );\n\n if (dsc) {\n freezeDscOnSpan(span, dsc);\n }\n }\n\n logSpanStart(span);\n\n setCapturedScopesOnSpan(span, scope, isolationScope);\n\n return span;\n}\n\n/**\n * This converts StartSpanOptions to SentrySpanArguments.\n * For the most part (for now) we accept the same options,\n * but some of them need to be transformed.\n */\nfunction parseSentrySpanArguments(options) {\n const exp = options.experimental || {};\n const initialCtx = {\n isStandalone: exp.standalone,\n ...options,\n };\n\n if (options.startTime) {\n const ctx = { ...initialCtx };\n ctx.startTimestamp = spanTimeInputToSeconds(options.startTime);\n delete ctx.startTime;\n return ctx;\n }\n\n return initialCtx;\n}\n\nfunction getAcs() {\n const carrier = getMainCarrier();\n return getAsyncContextStrategy(carrier);\n}\n\nfunction _startRootSpan(spanArguments, scope, parentSampled) {\n const client = getClient();\n const options = (client && client.getOptions()) || {};\n\n const { name = '', attributes } = spanArguments;\n const [sampled, sampleRate] = scope.getScopeData().sdkProcessingMetadata[SUPPRESS_TRACING_KEY]\n ? [false]\n : sampleSpan(options, {\n name,\n parentSampled,\n attributes,\n transactionContext: {\n name,\n parentSampled,\n },\n });\n\n const rootSpan = new SentrySpan({\n ...spanArguments,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'custom',\n ...spanArguments.attributes,\n },\n sampled,\n });\n if (sampleRate !== undefined) {\n rootSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, sampleRate);\n }\n\n if (client) {\n client.emit('spanStart', rootSpan);\n }\n\n return rootSpan;\n}\n\n/**\n * Creates a new `Span` while setting the current `Span.id` as `parentSpanId`.\n * This inherits the sampling decision from the parent span.\n */\nfunction _startChildSpan(parentSpan, scope, spanArguments) {\n const { spanId, traceId } = parentSpan.spanContext();\n const sampled = scope.getScopeData().sdkProcessingMetadata[SUPPRESS_TRACING_KEY] ? false : spanIsSampled(parentSpan);\n\n const childSpan = sampled\n ? new SentrySpan({\n ...spanArguments,\n parentSpanId: spanId,\n traceId,\n sampled,\n })\n : new SentryNonRecordingSpan({ traceId });\n\n addChildSpanToSpan(parentSpan, childSpan);\n\n const client = getClient();\n if (client) {\n client.emit('spanStart', childSpan);\n // If it has an endTimestamp, it's already ended\n if (spanArguments.endTimestamp) {\n client.emit('spanEnd', childSpan);\n }\n }\n\n return childSpan;\n}\n\nfunction getParentSpan(scope) {\n const span = _getSpanForScope(scope) ;\n\n if (!span) {\n return undefined;\n }\n\n const client = getClient();\n const options = client ? client.getOptions() : {};\n if (options.parentSpanIsAlwaysRootSpan) {\n return getRootSpan(span) ;\n }\n\n return span;\n}\n\nfunction getActiveSpanWrapper(parentSpan) {\n return parentSpan !== undefined\n ? (callback) => {\n return withActiveSpan(parentSpan, callback);\n }\n : (callback) => callback();\n}\n\nexport { continueTrace, startInactiveSpan, startNewTrace, startSpan, startSpanManual, suppressTracing, withActiveSpan };\n","import { getIsolationScope } from '../currentScopes.js';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { hasTracingEnabled } from '../utils/hasTracingEnabled.js';\nimport { parseSampleRate } from '../utils/parseSampleRate.js';\n\n/**\n * Makes a sampling decision for the given options.\n *\n * Called every time a root span is created. Only root spans which emerge with a `sampled` value of `true` will be\n * sent to Sentry.\n */\nfunction sampleSpan(\n options,\n samplingContext,\n) {\n // nothing to do if tracing is not enabled\n if (!hasTracingEnabled(options)) {\n return [false];\n }\n\n // Casting this from unknown, as the type of `sdkProcessingMetadata` is only changed in v9 and `normalizedRequest` is set in SentryHttpInstrumentation\n const normalizedRequest = getIsolationScope().getScopeData().sdkProcessingMetadata\n .normalizedRequest ;\n\n const enhancedSamplingContext = {\n ...samplingContext,\n normalizedRequest: samplingContext.normalizedRequest || normalizedRequest,\n };\n\n // we would have bailed already if neither `tracesSampler` nor `tracesSampleRate` nor `enableTracing` were defined, so one of these should\n // work; prefer the hook if so\n let sampleRate;\n if (typeof options.tracesSampler === 'function') {\n sampleRate = options.tracesSampler(enhancedSamplingContext);\n } else if (enhancedSamplingContext.parentSampled !== undefined) {\n sampleRate = enhancedSamplingContext.parentSampled;\n } else if (typeof options.tracesSampleRate !== 'undefined') {\n sampleRate = options.tracesSampleRate;\n } else {\n // When `enableTracing === true`, we use a sample rate of 100%\n sampleRate = 1;\n }\n\n // Since this is coming from the user (or from a function provided by the user), who knows what we might get.\n // (The only valid values are booleans or numbers between 0 and 1.)\n const parsedSampleRate = parseSampleRate(sampleRate);\n\n if (parsedSampleRate === undefined) {\n DEBUG_BUILD && logger.warn('[Tracing] Discarding transaction because of invalid sample rate.');\n return [false];\n }\n\n // if the function returned 0 (or false), or if `tracesSampleRate` is 0, it's a sign the transaction should be dropped\n if (!parsedSampleRate) {\n DEBUG_BUILD &&\n logger.log(\n `[Tracing] Discarding transaction because ${\n typeof options.tracesSampler === 'function'\n ? 'tracesSampler returned 0 or false'\n : 'a negative sampling decision was inherited or tracesSampleRate is set to 0'\n }`,\n );\n return [false, parsedSampleRate];\n }\n\n // Now we roll the dice. Math.random is inclusive of 0, but not of 1, so strict < is safe here. In case sampleRate is\n // a boolean, the < comparison will cause it to be automatically cast to 1 if it's true and 0 if it's false.\n const shouldSample = Math.random() < parsedSampleRate;\n\n // if we're not going to keep it, we're done\n if (!shouldSample) {\n DEBUG_BUILD &&\n logger.log(\n `[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(\n sampleRate,\n )})`,\n );\n return [false, parsedSampleRate];\n }\n\n return [true, parsedSampleRate];\n}\n\nexport { sampleSpan };\n","import { spanToJSON, withActiveSpan, startInactiveSpan, getClient, getCurrentScope } from '@sentry/core';\nimport { WINDOW } from '../types.js';\n\n/**\n * Checks if a given value is a valid measurement value.\n */\nfunction isMeasurementValue(value) {\n return typeof value === 'number' && isFinite(value);\n}\n\n/**\n * Helper function to start child on transactions. This function will make sure that the transaction will\n * use the start timestamp of the created child span if it is earlier than the transactions actual\n * start timestamp.\n */\nfunction startAndEndSpan(\n parentSpan,\n startTimeInSeconds,\n endTime,\n { ...ctx },\n) {\n const parentStartTime = spanToJSON(parentSpan).start_timestamp;\n if (parentStartTime && parentStartTime > startTimeInSeconds) {\n // We can only do this for SentrySpans...\n if (typeof (parentSpan ).updateStartTime === 'function') {\n (parentSpan ).updateStartTime(startTimeInSeconds);\n }\n }\n\n // The return value only exists for tests\n return withActiveSpan(parentSpan, () => {\n const span = startInactiveSpan({\n startTime: startTimeInSeconds,\n ...ctx,\n });\n\n if (span) {\n span.end(endTime);\n }\n\n return span;\n });\n}\n\n/**\n * Starts an inactive, standalone span used to send web vital values to Sentry.\n * DO NOT use this for arbitrary spans, as these spans require special handling\n * during ingestion to extract metrics.\n *\n * This function adds a bunch of attributes and data to the span that's shared\n * by all web vital standalone spans. However, you need to take care of adding\n * the actual web vital value as an event to the span. Also, you need to assign\n * a transaction name and some other values that are specific to the web vital.\n *\n * Ultimately, you also need to take care of ending the span to send it off.\n *\n * @param options\n *\n * @returns an inactive, standalone and NOT YET ended span\n */\nfunction startStandaloneWebVitalSpan(options) {\n const client = getClient();\n if (!client) {\n return;\n }\n\n const { name, transaction, attributes: passedAttributes, startTime } = options;\n\n const { release, environment } = client.getOptions();\n // We need to get the replay, user, and activeTransaction from the current scope\n // so that we can associate replay id, profile id, and a user display to the span\n const replay = client.getIntegrationByName('Replay');\n const replayId = replay && replay.getReplayId();\n\n const scope = getCurrentScope();\n\n const user = scope.getUser();\n const userDisplay = user !== undefined ? user.email || user.id || user.ip_address : undefined;\n\n let profileId;\n try {\n // @ts-expect-error skip optional chaining to save bundle size with try catch\n profileId = scope.getScopeData().contexts.profile.profile_id;\n } catch (e) {\n // do nothing\n }\n\n const attributes = {\n release,\n environment,\n\n user: userDisplay || undefined,\n profile_id: profileId || undefined,\n replay_id: replayId || undefined,\n\n transaction,\n\n // Web vital score calculation relies on the user agent to account for different\n // browsers setting different thresholds for what is considered a good/meh/bad value.\n // For example: Chrome vs. Chrome Mobile\n 'user_agent.original': WINDOW.navigator && WINDOW.navigator.userAgent,\n\n ...passedAttributes,\n };\n\n return startInactiveSpan({\n name,\n attributes,\n startTime,\n experimental: {\n standalone: true,\n },\n });\n}\n\n/** Get the browser performance API. */\nfunction getBrowserPerformanceAPI() {\n // @ts-expect-error we want to make sure all of these are available, even if TS is sure they are\n return WINDOW && WINDOW.addEventListener && WINDOW.performance;\n}\n\n/**\n * Converts from milliseconds to seconds\n * @param time time in ms\n */\nfunction msToSec(time) {\n return time / 1000;\n}\n\n/**\n * Converts ALPN protocol ids to name and version.\n *\n * (https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids)\n * @param nextHopProtocol PerformanceResourceTiming.nextHopProtocol\n */\nfunction extractNetworkProtocol(nextHopProtocol) {\n let name = 'unknown';\n let version = 'unknown';\n let _name = '';\n for (const char of nextHopProtocol) {\n // http/1.1 etc.\n if (char === '/') {\n [name, version] = nextHopProtocol.split('/') ;\n break;\n }\n // h2, h3 etc.\n if (!isNaN(Number(char))) {\n name = _name === 'h' ? 'http' : _name;\n version = nextHopProtocol.split(_name)[1] ;\n break;\n }\n _name += char;\n }\n if (_name === nextHopProtocol) {\n // webrtc, ftp, etc.\n name = _name;\n }\n return { name, version };\n}\n\nexport { extractNetworkProtocol, getBrowserPerformanceAPI, isMeasurementValue, msToSec, startAndEndSpan, startStandaloneWebVitalSpan };\n","import { browserPerformanceTimeOrigin, getActiveSpan, spanToJSON, setMeasurement, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, parseUrl, htmlTreeAsString, getComponentName } from '@sentry/core';\nimport { WINDOW } from '../types.js';\nimport { trackClsAsStandaloneSpan } from './cls.js';\nimport { addPerformanceInstrumentationHandler, addClsInstrumentationHandler, addLcpInstrumentationHandler, addFidInstrumentationHandler, addTtfbInstrumentationHandler } from './instrument.js';\nimport { getBrowserPerformanceAPI, msToSec, startAndEndSpan, extractNetworkProtocol, isMeasurementValue } from './utils.js';\nimport { getActivationStart } from './web-vitals/lib/getActivationStart.js';\nimport { getNavigationEntry } from './web-vitals/lib/getNavigationEntry.js';\nimport { getVisibilityWatcher } from './web-vitals/lib/getVisibilityWatcher.js';\n\nconst MAX_INT_AS_BYTES = 2147483647;\n\nlet _performanceCursor = 0;\n\nlet _measurements = {};\nlet _lcpEntry;\nlet _clsEntry;\n\n/**\n * Start tracking web vitals.\n * The callback returned by this function can be used to stop tracking & ensure all measurements are final & captured.\n *\n * @returns A function that forces web vitals collection\n */\nfunction startTrackingWebVitals({ recordClsStandaloneSpans }) {\n const performance = getBrowserPerformanceAPI();\n if (performance && browserPerformanceTimeOrigin) {\n // @ts-expect-error we want to make sure all of these are available, even if TS is sure they are\n if (performance.mark) {\n WINDOW.performance.mark('sentry-tracing-init');\n }\n const fidCleanupCallback = _trackFID();\n const lcpCleanupCallback = _trackLCP();\n const ttfbCleanupCallback = _trackTtfb();\n const clsCleanupCallback = recordClsStandaloneSpans ? trackClsAsStandaloneSpan() : _trackCLS();\n\n return () => {\n fidCleanupCallback();\n lcpCleanupCallback();\n ttfbCleanupCallback();\n clsCleanupCallback && clsCleanupCallback();\n };\n }\n\n return () => undefined;\n}\n\n/**\n * Start tracking long tasks.\n */\nfunction startTrackingLongTasks() {\n addPerformanceInstrumentationHandler('longtask', ({ entries }) => {\n const parent = getActiveSpan();\n if (!parent) {\n return;\n }\n\n const { op: parentOp, start_timestamp: parentStartTimestamp } = spanToJSON(parent);\n\n for (const entry of entries) {\n const startTime = msToSec((browserPerformanceTimeOrigin ) + entry.startTime);\n const duration = msToSec(entry.duration);\n\n if (parentOp === 'navigation' && parentStartTimestamp && startTime < parentStartTimestamp) {\n // Skip adding a span if the long task started before the navigation started.\n // `startAndEndSpan` will otherwise adjust the parent's start time to the span's start\n // time, potentially skewing the duration of the actual navigation as reported via our\n // routing instrumentations\n continue;\n }\n\n startAndEndSpan(parent, startTime, startTime + duration, {\n name: 'Main UI thread blocked',\n op: 'ui.long-task',\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n },\n });\n }\n });\n}\n\n/**\n * Start tracking long animation frames.\n */\nfunction startTrackingLongAnimationFrames() {\n // NOTE: the current web-vitals version (3.5.2) does not support long-animation-frame, so\n // we directly observe `long-animation-frame` events instead of through the web-vitals\n // `observe` helper function.\n const observer = new PerformanceObserver(list => {\n const parent = getActiveSpan();\n if (!parent) {\n return;\n }\n for (const entry of list.getEntries() ) {\n if (!entry.scripts[0]) {\n continue;\n }\n\n const startTime = msToSec((browserPerformanceTimeOrigin ) + entry.startTime);\n\n const { start_timestamp: parentStartTimestamp, op: parentOp } = spanToJSON(parent);\n\n if (parentOp === 'navigation' && parentStartTimestamp && startTime < parentStartTimestamp) {\n // Skip adding the span if the long animation frame started before the navigation started.\n // `startAndEndSpan` will otherwise adjust the parent's start time to the span's start\n // time, potentially skewing the duration of the actual navigation as reported via our\n // routing instrumentations\n continue;\n }\n\n const duration = msToSec(entry.duration);\n\n const attributes = {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n };\n\n const initialScript = entry.scripts[0];\n const { invoker, invokerType, sourceURL, sourceFunctionName, sourceCharPosition } = initialScript;\n attributes['browser.script.invoker'] = invoker;\n attributes['browser.script.invoker_type'] = invokerType;\n if (sourceURL) {\n attributes['code.filepath'] = sourceURL;\n }\n if (sourceFunctionName) {\n attributes['code.function'] = sourceFunctionName;\n }\n if (sourceCharPosition !== -1) {\n attributes['browser.script.source_char_position'] = sourceCharPosition;\n }\n\n startAndEndSpan(parent, startTime, startTime + duration, {\n name: 'Main UI thread blocked',\n op: 'ui.long-animation-frame',\n attributes,\n });\n }\n });\n\n observer.observe({ type: 'long-animation-frame', buffered: true });\n}\n\n/**\n * Start tracking interaction events.\n */\nfunction startTrackingInteractions() {\n addPerformanceInstrumentationHandler('event', ({ entries }) => {\n const parent = getActiveSpan();\n if (!parent) {\n return;\n }\n for (const entry of entries) {\n if (entry.name === 'click') {\n const startTime = msToSec((browserPerformanceTimeOrigin ) + entry.startTime);\n const duration = msToSec(entry.duration);\n\n const spanOptions = {\n name: htmlTreeAsString(entry.target),\n op: `ui.interaction.${entry.name}`,\n startTime: startTime,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n },\n };\n\n const componentName = getComponentName(entry.target);\n if (componentName) {\n spanOptions.attributes['ui.component_name'] = componentName;\n }\n\n startAndEndSpan(parent, startTime, startTime + duration, spanOptions);\n }\n }\n });\n}\n\n/**\n * Starts tracking the Cumulative Layout Shift on the current page and collects the value and last entry\n * to the `_measurements` object which ultimately is applied to the pageload span's measurements.\n */\nfunction _trackCLS() {\n return addClsInstrumentationHandler(({ metric }) => {\n const entry = metric.entries[metric.entries.length - 1] ;\n if (!entry) {\n return;\n }\n _measurements['cls'] = { value: metric.value, unit: '' };\n _clsEntry = entry;\n }, true);\n}\n\n/** Starts tracking the Largest Contentful Paint on the current page. */\nfunction _trackLCP() {\n return addLcpInstrumentationHandler(({ metric }) => {\n const entry = metric.entries[metric.entries.length - 1];\n if (!entry) {\n return;\n }\n\n _measurements['lcp'] = { value: metric.value, unit: 'millisecond' };\n _lcpEntry = entry ;\n }, true);\n}\n\n/** Starts tracking the First Input Delay on the current page. */\nfunction _trackFID() {\n return addFidInstrumentationHandler(({ metric }) => {\n const entry = metric.entries[metric.entries.length - 1];\n if (!entry) {\n return;\n }\n\n const timeOrigin = msToSec(browserPerformanceTimeOrigin );\n const startTime = msToSec(entry.startTime);\n _measurements['fid'] = { value: metric.value, unit: 'millisecond' };\n _measurements['mark.fid'] = { value: timeOrigin + startTime, unit: 'second' };\n });\n}\n\nfunction _trackTtfb() {\n return addTtfbInstrumentationHandler(({ metric }) => {\n const entry = metric.entries[metric.entries.length - 1];\n if (!entry) {\n return;\n }\n\n _measurements['ttfb'] = { value: metric.value, unit: 'millisecond' };\n });\n}\n\n/** Add performance related spans to a transaction */\nfunction addPerformanceEntries(span, options) {\n const performance = getBrowserPerformanceAPI();\n if (!performance || !performance.getEntries || !browserPerformanceTimeOrigin) {\n // Gatekeeper if performance API not available\n return;\n }\n\n const timeOrigin = msToSec(browserPerformanceTimeOrigin);\n\n const performanceEntries = performance.getEntries();\n\n const { op, start_timestamp: transactionStartTime } = spanToJSON(span);\n\n performanceEntries.slice(_performanceCursor).forEach(entry => {\n const startTime = msToSec(entry.startTime);\n const duration = msToSec(\n // Inexplicably, Chrome sometimes emits a negative duration. We need to work around this.\n // There is a SO post attempting to explain this, but it leaves one with open questions: https://stackoverflow.com/questions/23191918/peformance-getentries-and-negative-duration-display\n // The way we clamp the value is probably not accurate, since we have observed this happen for things that may take a while to load, like for example the replay worker.\n // TODO: Investigate why this happens and how to properly mitigate. For now, this is a workaround to prevent transactions being dropped due to negative duration spans.\n Math.max(0, entry.duration),\n );\n\n if (op === 'navigation' && transactionStartTime && timeOrigin + startTime < transactionStartTime) {\n return;\n }\n\n switch (entry.entryType) {\n case 'navigation': {\n _addNavigationSpans(span, entry , timeOrigin);\n break;\n }\n case 'mark':\n case 'paint':\n case 'measure': {\n _addMeasureSpans(span, entry, startTime, duration, timeOrigin);\n\n // capture web vitals\n const firstHidden = getVisibilityWatcher();\n // Only report if the page wasn't hidden prior to the web vital.\n const shouldRecord = entry.startTime < firstHidden.firstHiddenTime;\n\n if (entry.name === 'first-paint' && shouldRecord) {\n _measurements['fp'] = { value: entry.startTime, unit: 'millisecond' };\n }\n if (entry.name === 'first-contentful-paint' && shouldRecord) {\n _measurements['fcp'] = { value: entry.startTime, unit: 'millisecond' };\n }\n break;\n }\n case 'resource': {\n _addResourceSpans(span, entry , entry.name, startTime, duration, timeOrigin);\n break;\n }\n // Ignore other entry types.\n }\n });\n\n _performanceCursor = Math.max(performanceEntries.length - 1, 0);\n\n _trackNavigator(span);\n\n // Measurements are only available for pageload transactions\n if (op === 'pageload') {\n _addTtfbRequestTimeToMeasurements(_measurements);\n\n const fidMark = _measurements['mark.fid'];\n if (fidMark && _measurements['fid']) {\n // create span for FID\n startAndEndSpan(span, fidMark.value, fidMark.value + msToSec(_measurements['fid'].value), {\n name: 'first input delay',\n op: 'ui.action',\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n },\n });\n\n // Delete mark.fid as we don't want it to be part of final payload\n delete _measurements['mark.fid'];\n }\n\n // If FCP is not recorded we should not record the cls value\n // according to the new definition of CLS.\n // TODO: Check if the first condition is still necessary: `onCLS` already only fires once `onFCP` was called.\n if (!('fcp' in _measurements) || !options.recordClsOnPageloadSpan) {\n delete _measurements.cls;\n }\n\n Object.entries(_measurements).forEach(([measurementName, measurement]) => {\n setMeasurement(measurementName, measurement.value, measurement.unit);\n });\n\n // Set timeOrigin which denotes the timestamp which to base the LCP/FCP/FP/TTFB measurements on\n span.setAttribute('performance.timeOrigin', timeOrigin);\n\n // In prerendering scenarios, where a page might be prefetched and pre-rendered before the user clicks the link,\n // the navigation starts earlier than when the user clicks it. Web Vitals should always be based on the\n // user-perceived time, so they are not reported from the actual start of the navigation, but rather from the\n // time where the user actively started the navigation, for example by clicking a link.\n // This is user action is called \"activation\" and the time between navigation and activation is stored in\n // the `activationStart` attribute of the \"navigation\" PerformanceEntry.\n span.setAttribute('performance.activationStart', getActivationStart());\n\n _setWebVitalAttributes(span);\n }\n\n _lcpEntry = undefined;\n _clsEntry = undefined;\n _measurements = {};\n}\n\n/**\n * Create measure related spans.\n * Exported only for tests.\n */\nfunction _addMeasureSpans(\n span,\n entry,\n startTime,\n duration,\n timeOrigin,\n) {\n const navEntry = getNavigationEntry(false);\n const requestTime = msToSec(navEntry ? navEntry.requestStart : 0);\n // Because performance.measure accepts arbitrary timestamps it can produce\n // spans that happen before the browser even makes a request for the page.\n //\n // An example of this is the automatically generated Next.js-before-hydration\n // spans created by the Next.js framework.\n //\n // To prevent this we will pin the start timestamp to the request start time\n // This does make duration inaccurate, so if this does happen, we will add\n // an attribute to the span\n const measureStartTimestamp = timeOrigin + Math.max(startTime, requestTime);\n const startTimeStamp = timeOrigin + startTime;\n const measureEndTimestamp = startTimeStamp + duration;\n\n const attributes = {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.resource.browser.metrics',\n };\n\n if (measureStartTimestamp !== startTimeStamp) {\n attributes['sentry.browser.measure_happened_before_request'] = true;\n attributes['sentry.browser.measure_start_time'] = measureStartTimestamp;\n }\n\n startAndEndSpan(span, measureStartTimestamp, measureEndTimestamp, {\n name: entry.name ,\n op: entry.entryType ,\n attributes,\n });\n\n return measureStartTimestamp;\n}\n\n/** Instrument navigation entries */\nfunction _addNavigationSpans(span, entry, timeOrigin) {\n (['unloadEvent', 'redirect', 'domContentLoadedEvent', 'loadEvent', 'connect'] ).forEach(event => {\n _addPerformanceNavigationTiming(span, entry, event, timeOrigin);\n });\n _addPerformanceNavigationTiming(span, entry, 'secureConnection', timeOrigin, 'TLS/SSL');\n _addPerformanceNavigationTiming(span, entry, 'fetch', timeOrigin, 'cache');\n _addPerformanceNavigationTiming(span, entry, 'domainLookup', timeOrigin, 'DNS');\n\n _addRequest(span, entry, timeOrigin);\n}\n\n/** Create performance navigation related spans */\nfunction _addPerformanceNavigationTiming(\n span,\n entry,\n event,\n timeOrigin,\n name = event,\n) {\n const eventEnd = _getEndPropertyNameForNavigationTiming(event) ;\n const end = entry[eventEnd];\n const start = entry[`${event}Start`];\n if (!start || !end) {\n return;\n }\n startAndEndSpan(span, timeOrigin + msToSec(start), timeOrigin + msToSec(end), {\n op: `browser.${name}`,\n name: entry.name,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n },\n });\n}\n\nfunction _getEndPropertyNameForNavigationTiming(event) {\n if (event === 'secureConnection') {\n return 'connectEnd';\n }\n if (event === 'fetch') {\n return 'domainLookupStart';\n }\n return `${event}End`;\n}\n\n/** Create request and response related spans */\nfunction _addRequest(span, entry, timeOrigin) {\n const requestStartTimestamp = timeOrigin + msToSec(entry.requestStart );\n const responseEndTimestamp = timeOrigin + msToSec(entry.responseEnd );\n const responseStartTimestamp = timeOrigin + msToSec(entry.responseStart );\n if (entry.responseEnd) {\n // It is possible that we are collecting these metrics when the page hasn't finished loading yet, for example when the HTML slowly streams in.\n // In this case, ie. when the document request hasn't finished yet, `entry.responseEnd` will be 0.\n // In order not to produce faulty spans, where the end timestamp is before the start timestamp, we will only collect\n // these spans when the responseEnd value is available. The backend (Relay) would drop the entire span if it contained faulty spans.\n startAndEndSpan(span, requestStartTimestamp, responseEndTimestamp, {\n op: 'browser.request',\n name: entry.name,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n },\n });\n\n startAndEndSpan(span, responseStartTimestamp, responseEndTimestamp, {\n op: 'browser.response',\n name: entry.name,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n },\n });\n }\n}\n\n/**\n * Create resource-related spans.\n * Exported only for tests.\n */\nfunction _addResourceSpans(\n span,\n entry,\n resourceUrl,\n startTime,\n duration,\n timeOrigin,\n) {\n // we already instrument based on fetch and xhr, so we don't need to\n // duplicate spans here.\n if (entry.initiatorType === 'xmlhttprequest' || entry.initiatorType === 'fetch') {\n return;\n }\n\n const parsedUrl = parseUrl(resourceUrl);\n\n const attributes = {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.resource.browser.metrics',\n };\n setResourceEntrySizeData(attributes, entry, 'transferSize', 'http.response_transfer_size');\n setResourceEntrySizeData(attributes, entry, 'encodedBodySize', 'http.response_content_length');\n setResourceEntrySizeData(attributes, entry, 'decodedBodySize', 'http.decoded_response_content_length');\n\n // `deliveryType` is experimental and does not exist everywhere\n const deliveryType = (entry ).deliveryType;\n if (deliveryType != null) {\n attributes['http.response_delivery_type'] = deliveryType;\n }\n\n // Types do not reflect this property yet\n const renderBlockingStatus = (entry )\n .renderBlockingStatus;\n if (renderBlockingStatus) {\n attributes['resource.render_blocking_status'] = renderBlockingStatus;\n }\n\n if (parsedUrl.protocol) {\n attributes['url.scheme'] = parsedUrl.protocol.split(':').pop(); // the protocol returned by parseUrl includes a :, but OTEL spec does not, so we remove it.\n }\n\n if (parsedUrl.host) {\n attributes['server.address'] = parsedUrl.host;\n }\n\n attributes['url.same_origin'] = resourceUrl.includes(WINDOW.location.origin);\n\n const { name, version } = extractNetworkProtocol(entry.nextHopProtocol);\n attributes['network.protocol.name'] = name;\n attributes['network.protocol.version'] = version;\n\n const startTimestamp = timeOrigin + startTime;\n const endTimestamp = startTimestamp + duration;\n\n startAndEndSpan(span, startTimestamp, endTimestamp, {\n name: resourceUrl.replace(WINDOW.location.origin, ''),\n op: entry.initiatorType ? `resource.${entry.initiatorType}` : 'resource.other',\n attributes,\n });\n}\n\n/**\n * Capture the information of the user agent.\n */\nfunction _trackNavigator(span) {\n const navigator = WINDOW.navigator ;\n if (!navigator) {\n return;\n }\n\n // track network connectivity\n const connection = navigator.connection;\n if (connection) {\n if (connection.effectiveType) {\n span.setAttribute('effectiveConnectionType', connection.effectiveType);\n }\n\n if (connection.type) {\n span.setAttribute('connectionType', connection.type);\n }\n\n if (isMeasurementValue(connection.rtt)) {\n _measurements['connection.rtt'] = { value: connection.rtt, unit: 'millisecond' };\n }\n }\n\n if (isMeasurementValue(navigator.deviceMemory)) {\n span.setAttribute('deviceMemory', `${navigator.deviceMemory} GB`);\n }\n\n if (isMeasurementValue(navigator.hardwareConcurrency)) {\n span.setAttribute('hardwareConcurrency', String(navigator.hardwareConcurrency));\n }\n}\n\n/** Add LCP / CLS data to span to allow debugging */\nfunction _setWebVitalAttributes(span) {\n if (_lcpEntry) {\n // Capture Properties of the LCP element that contributes to the LCP.\n\n if (_lcpEntry.element) {\n span.setAttribute('lcp.element', htmlTreeAsString(_lcpEntry.element));\n }\n\n if (_lcpEntry.id) {\n span.setAttribute('lcp.id', _lcpEntry.id);\n }\n\n if (_lcpEntry.url) {\n // Trim URL to the first 200 characters.\n span.setAttribute('lcp.url', _lcpEntry.url.trim().slice(0, 200));\n }\n\n if (_lcpEntry.loadTime != null) {\n // loadTime is the time of LCP that's related to receiving the LCP element response..\n span.setAttribute('lcp.loadTime', _lcpEntry.loadTime);\n }\n\n if (_lcpEntry.renderTime != null) {\n // renderTime is loadTime + rendering time\n // it's 0 if the LCP element is loaded from a 3rd party origin that doesn't send the\n // `Timing-Allow-Origin` header.\n span.setAttribute('lcp.renderTime', _lcpEntry.renderTime);\n }\n\n span.setAttribute('lcp.size', _lcpEntry.size);\n }\n\n // See: https://developer.mozilla.org/en-US/docs/Web/API/LayoutShift\n if (_clsEntry && _clsEntry.sources) {\n _clsEntry.sources.forEach((source, index) =>\n span.setAttribute(`cls.source.${index + 1}`, htmlTreeAsString(source.node)),\n );\n }\n}\n\nfunction setResourceEntrySizeData(\n attributes,\n entry,\n key,\n dataKey,\n) {\n const entryVal = entry[key];\n if (entryVal != null && entryVal < MAX_INT_AS_BYTES) {\n attributes[dataKey] = entryVal;\n }\n}\n\n/**\n * Add ttfb request time information to measurements.\n *\n * ttfb information is added via vendored web vitals library.\n */\nfunction _addTtfbRequestTimeToMeasurements(_measurements) {\n const navEntry = getNavigationEntry(false);\n if (!navEntry) {\n return;\n }\n\n const { responseStart, requestStart } = navEntry;\n\n if (requestStart <= responseStart) {\n _measurements['ttfb.requestTime'] = {\n value: responseStart - requestStart,\n unit: 'millisecond',\n };\n }\n}\n\nexport { _addMeasureSpans, _addResourceSpans, addPerformanceEntries, startTrackingInteractions, startTrackingLongAnimationFrames, startTrackingLongTasks, startTrackingWebVitals };\n","import { getClient, getActiveSpan, getRootSpan, spanToJSON, logger, browserPerformanceTimeOrigin, getCurrentScope, htmlTreeAsString, dropUndefinedKeys, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { addClsInstrumentationHandler } from './instrument.js';\nimport { msToSec, startStandaloneWebVitalSpan } from './utils.js';\nimport { onHidden } from './web-vitals/lib/onHidden.js';\n\n/**\n * Starts tracking the Cumulative Layout Shift on the current page and collects the value once\n *\n * - the page visibility is hidden\n * - a navigation span is started (to stop CLS measurement for SPA soft navigations)\n *\n * Once either of these events triggers, the CLS value is sent as a standalone span and we stop\n * measuring CLS.\n */\nfunction trackClsAsStandaloneSpan() {\n let standaloneCLsValue = 0;\n let standaloneClsEntry;\n let pageloadSpanId;\n\n if (!supportsLayoutShift()) {\n return;\n }\n\n let sentSpan = false;\n function _collectClsOnce() {\n if (sentSpan) {\n return;\n }\n sentSpan = true;\n if (pageloadSpanId) {\n sendStandaloneClsSpan(standaloneCLsValue, standaloneClsEntry, pageloadSpanId);\n }\n cleanupClsHandler();\n }\n\n const cleanupClsHandler = addClsInstrumentationHandler(({ metric }) => {\n const entry = metric.entries[metric.entries.length - 1] ;\n if (!entry) {\n return;\n }\n standaloneCLsValue = metric.value;\n standaloneClsEntry = entry;\n }, true);\n\n // use pagehide event from web-vitals\n onHidden(() => {\n _collectClsOnce();\n });\n\n // Since the call chain of this function is synchronous and evaluates before the SDK client is created,\n // we need to wait with subscribing to a client hook until the client is created. Therefore, we defer\n // to the next tick after the SDK setup.\n setTimeout(() => {\n const client = getClient();\n\n if (!client) {\n return;\n }\n\n const unsubscribeStartNavigation = client.on('startNavigationSpan', () => {\n _collectClsOnce();\n unsubscribeStartNavigation && unsubscribeStartNavigation();\n });\n\n const activeSpan = getActiveSpan();\n const rootSpan = activeSpan && getRootSpan(activeSpan);\n const spanJSON = rootSpan && spanToJSON(rootSpan);\n if (spanJSON && spanJSON.op === 'pageload') {\n pageloadSpanId = rootSpan.spanContext().spanId;\n }\n }, 0);\n}\n\nfunction sendStandaloneClsSpan(clsValue, entry, pageloadSpanId) {\n DEBUG_BUILD && logger.log(`Sending CLS span (${clsValue})`);\n\n const startTime = msToSec((browserPerformanceTimeOrigin || 0) + ((entry && entry.startTime) || 0));\n const routeName = getCurrentScope().getScopeData().transactionName;\n\n const name = entry ? htmlTreeAsString(entry.sources[0] && entry.sources[0].node) : 'Layout shift';\n\n const attributes = dropUndefinedKeys({\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.browser.cls',\n [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'ui.webvital.cls',\n [SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]: (entry && entry.duration) || 0,\n // attach the pageload span id to the CLS span so that we can link them in the UI\n 'sentry.pageload.span_id': pageloadSpanId,\n });\n\n const span = startStandaloneWebVitalSpan({\n name,\n transaction: routeName,\n attributes,\n startTime,\n });\n\n if (span) {\n span.addEvent('cls', {\n [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]: '',\n [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]: clsValue,\n });\n\n // LayoutShift performance entries always have a duration of 0, so we don't need to add `entry.duration` here\n // see: https://developer.mozilla.org/en-US/docs/Web/API/PerformanceEntry/duration\n span.end(startTime);\n }\n}\n\nfunction supportsLayoutShift() {\n try {\n return PerformanceObserver.supportedEntryTypes.includes('layout-shift');\n } catch (e) {\n return false;\n }\n}\n\nexport { trackClsAsStandaloneSpan };\n","import { browserPerformanceTimeOrigin, getActiveSpan, getRootSpan, spanToJSON, getCurrentScope, htmlTreeAsString, dropUndefinedKeys, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE } from '@sentry/core';\nimport { addInpInstrumentationHandler, addPerformanceInstrumentationHandler, isPerformanceEventTiming } from './instrument.js';\nimport { getBrowserPerformanceAPI, msToSec, startStandaloneWebVitalSpan } from './utils.js';\n\nconst LAST_INTERACTIONS = [];\nconst INTERACTIONS_SPAN_MAP = new Map();\n\n/**\n * Start tracking INP webvital events.\n */\nfunction startTrackingINP() {\n const performance = getBrowserPerformanceAPI();\n if (performance && browserPerformanceTimeOrigin) {\n const inpCallback = _trackINP();\n\n return () => {\n inpCallback();\n };\n }\n\n return () => undefined;\n}\n\nconst INP_ENTRY_MAP = {\n click: 'click',\n pointerdown: 'click',\n pointerup: 'click',\n mousedown: 'click',\n mouseup: 'click',\n touchstart: 'click',\n touchend: 'click',\n mouseover: 'hover',\n mouseout: 'hover',\n mouseenter: 'hover',\n mouseleave: 'hover',\n pointerover: 'hover',\n pointerout: 'hover',\n pointerenter: 'hover',\n pointerleave: 'hover',\n dragstart: 'drag',\n dragend: 'drag',\n drag: 'drag',\n dragenter: 'drag',\n dragleave: 'drag',\n dragover: 'drag',\n drop: 'drag',\n keydown: 'press',\n keyup: 'press',\n keypress: 'press',\n input: 'press',\n};\n\n/** Starts tracking the Interaction to Next Paint on the current page. */\nfunction _trackINP() {\n return addInpInstrumentationHandler(({ metric }) => {\n if (metric.value == undefined) {\n return;\n }\n\n const entry = metric.entries.find(entry => entry.duration === metric.value && INP_ENTRY_MAP[entry.name]);\n\n if (!entry) {\n return;\n }\n\n const { interactionId } = entry;\n const interactionType = INP_ENTRY_MAP[entry.name];\n\n /** Build the INP span, create an envelope from the span, and then send the envelope */\n const startTime = msToSec((browserPerformanceTimeOrigin ) + entry.startTime);\n const duration = msToSec(metric.value);\n const activeSpan = getActiveSpan();\n const rootSpan = activeSpan ? getRootSpan(activeSpan) : undefined;\n\n // We first try to lookup the span from our INTERACTIONS_SPAN_MAP,\n // where we cache the route per interactionId\n const cachedSpan = interactionId != null ? INTERACTIONS_SPAN_MAP.get(interactionId) : undefined;\n\n const spanToUse = cachedSpan || rootSpan;\n\n // Else, we try to use the active span.\n // Finally, we fall back to look at the transactionName on the scope\n const routeName = spanToUse ? spanToJSON(spanToUse).description : getCurrentScope().getScopeData().transactionName;\n\n const name = htmlTreeAsString(entry.target);\n const attributes = dropUndefinedKeys({\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.browser.inp',\n [SEMANTIC_ATTRIBUTE_SENTRY_OP]: `ui.interaction.${interactionType}`,\n [SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]: entry.duration,\n });\n\n const span = startStandaloneWebVitalSpan({\n name,\n transaction: routeName,\n attributes,\n startTime,\n });\n\n if (span) {\n span.addEvent('inp', {\n [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]: 'millisecond',\n [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]: metric.value,\n });\n\n span.end(startTime + duration);\n }\n });\n}\n\n/**\n * Register a listener to cache route information for INP interactions.\n * TODO(v9): `latestRoute` no longer needs to be passed in and will be removed in v9.\n */\nfunction registerInpInteractionListener(_latestRoute) {\n const handleEntries = ({ entries }) => {\n const activeSpan = getActiveSpan();\n const activeRootSpan = activeSpan && getRootSpan(activeSpan);\n\n entries.forEach(entry => {\n if (!isPerformanceEventTiming(entry) || !activeRootSpan) {\n return;\n }\n\n const interactionId = entry.interactionId;\n if (interactionId == null) {\n return;\n }\n\n // If the interaction was already recorded before, nothing more to do\n if (INTERACTIONS_SPAN_MAP.has(interactionId)) {\n return;\n }\n\n // We keep max. 10 interactions in the list, then remove the oldest one & clean up\n if (LAST_INTERACTIONS.length > 10) {\n const last = LAST_INTERACTIONS.shift() ;\n INTERACTIONS_SPAN_MAP.delete(last);\n }\n\n // We add the interaction to the list of recorded interactions\n // and store the span for this interaction\n LAST_INTERACTIONS.push(interactionId);\n INTERACTIONS_SPAN_MAP.set(interactionId, activeRootSpan);\n });\n };\n\n addPerformanceInstrumentationHandler('event', handleEntries);\n addPerformanceInstrumentationHandler('first-input', handleEntries);\n}\n\nexport { registerInpInteractionListener, startTrackingINP };\n","import { getClient, getCurrentScope } from '../currentScopes.js';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON } from '../semanticAttributes.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { timestampInSeconds } from '../utils-hoist/time.js';\nimport { hasTracingEnabled } from '../utils/hasTracingEnabled.js';\nimport { _setSpanForScope } from '../utils/spanOnScope.js';\nimport { getActiveSpan, spanTimeInputToSeconds, getSpanDescendants, spanToJSON, removeChildSpanFromSpan } from '../utils/spanUtils.js';\nimport { SentryNonRecordingSpan } from './sentryNonRecordingSpan.js';\nimport { SPAN_STATUS_ERROR } from './spanstatus.js';\nimport { startInactiveSpan } from './trace.js';\n\nconst TRACING_DEFAULTS = {\n idleTimeout: 1000,\n finalTimeout: 30000,\n childSpanTimeout: 15000,\n};\n\nconst FINISH_REASON_HEARTBEAT_FAILED = 'heartbeatFailed';\nconst FINISH_REASON_IDLE_TIMEOUT = 'idleTimeout';\nconst FINISH_REASON_FINAL_TIMEOUT = 'finalTimeout';\nconst FINISH_REASON_EXTERNAL_FINISH = 'externalFinish';\n\n/**\n * An idle span is a span that automatically finishes. It does this by tracking child spans as activities.\n * An idle span is always the active span.\n */\nfunction startIdleSpan(startSpanOptions, options = {}) {\n // Activities store a list of active spans\n const activities = new Map();\n\n // We should not use heartbeat if we finished a span\n let _finished = false;\n\n // Timer that tracks idleTimeout\n let _idleTimeoutID;\n\n // The reason why the span was finished\n let _finishReason = FINISH_REASON_EXTERNAL_FINISH;\n\n let _autoFinishAllowed = !options.disableAutoFinish;\n\n const _cleanupHooks = [];\n\n const {\n idleTimeout = TRACING_DEFAULTS.idleTimeout,\n finalTimeout = TRACING_DEFAULTS.finalTimeout,\n childSpanTimeout = TRACING_DEFAULTS.childSpanTimeout,\n beforeSpanEnd,\n } = options;\n\n const client = getClient();\n\n if (!client || !hasTracingEnabled()) {\n return new SentryNonRecordingSpan();\n }\n\n const scope = getCurrentScope();\n const previousActiveSpan = getActiveSpan();\n const span = _startIdleSpan(startSpanOptions);\n\n // We patch span.end to ensure we can run some things before the span is ended\n // eslint-disable-next-line @typescript-eslint/unbound-method\n span.end = new Proxy(span.end, {\n apply(target, thisArg, args) {\n if (beforeSpanEnd) {\n beforeSpanEnd(span);\n }\n\n // Just ensuring that this keeps working, even if we ever have more arguments here\n const [definedEndTimestamp, ...rest] = args;\n const timestamp = definedEndTimestamp || timestampInSeconds();\n const spanEndTimestamp = spanTimeInputToSeconds(timestamp);\n\n // Ensure we end with the last span timestamp, if possible\n const spans = getSpanDescendants(span).filter(child => child !== span);\n\n // If we have no spans, we just end, nothing else to do here\n if (!spans.length) {\n onIdleSpanEnded(spanEndTimestamp);\n return Reflect.apply(target, thisArg, [spanEndTimestamp, ...rest]);\n }\n\n const childEndTimestamps = spans\n .map(span => spanToJSON(span).timestamp)\n .filter(timestamp => !!timestamp) ;\n const latestSpanEndTimestamp = childEndTimestamps.length ? Math.max(...childEndTimestamps) : undefined;\n\n // In reality this should always exist here, but type-wise it may be undefined...\n const spanStartTimestamp = spanToJSON(span).start_timestamp;\n\n // The final endTimestamp should:\n // * Never be before the span start timestamp\n // * Be the latestSpanEndTimestamp, if there is one, and it is smaller than the passed span end timestamp\n // * Otherwise be the passed end timestamp\n // Final timestamp can never be after finalTimeout\n const endTimestamp = Math.min(\n spanStartTimestamp ? spanStartTimestamp + finalTimeout / 1000 : Infinity,\n Math.max(spanStartTimestamp || -Infinity, Math.min(spanEndTimestamp, latestSpanEndTimestamp || Infinity)),\n );\n\n onIdleSpanEnded(endTimestamp);\n return Reflect.apply(target, thisArg, [endTimestamp, ...rest]);\n },\n });\n\n /**\n * Cancels the existing idle timeout, if there is one.\n */\n function _cancelIdleTimeout() {\n if (_idleTimeoutID) {\n clearTimeout(_idleTimeoutID);\n _idleTimeoutID = undefined;\n }\n }\n\n /**\n * Restarts idle timeout, if there is no running idle timeout it will start one.\n */\n function _restartIdleTimeout(endTimestamp) {\n _cancelIdleTimeout();\n _idleTimeoutID = setTimeout(() => {\n if (!_finished && activities.size === 0 && _autoFinishAllowed) {\n _finishReason = FINISH_REASON_IDLE_TIMEOUT;\n span.end(endTimestamp);\n }\n }, idleTimeout);\n }\n\n /**\n * Restarts child span timeout, if there is none running it will start one.\n */\n function _restartChildSpanTimeout(endTimestamp) {\n _idleTimeoutID = setTimeout(() => {\n if (!_finished && _autoFinishAllowed) {\n _finishReason = FINISH_REASON_HEARTBEAT_FAILED;\n span.end(endTimestamp);\n }\n }, childSpanTimeout);\n }\n\n /**\n * Start tracking a specific activity.\n * @param spanId The span id that represents the activity\n */\n function _pushActivity(spanId) {\n _cancelIdleTimeout();\n activities.set(spanId, true);\n\n const endTimestamp = timestampInSeconds();\n // We need to add the timeout here to have the real endtimestamp of the idle span\n // Remember timestampInSeconds is in seconds, timeout is in ms\n _restartChildSpanTimeout(endTimestamp + childSpanTimeout / 1000);\n }\n\n /**\n * Remove an activity from usage\n * @param spanId The span id that represents the activity\n */\n function _popActivity(spanId) {\n if (activities.has(spanId)) {\n activities.delete(spanId);\n }\n\n if (activities.size === 0) {\n const endTimestamp = timestampInSeconds();\n // We need to add the timeout here to have the real endtimestamp of the idle span\n // Remember timestampInSeconds is in seconds, timeout is in ms\n _restartIdleTimeout(endTimestamp + idleTimeout / 1000);\n }\n }\n\n function onIdleSpanEnded(endTimestamp) {\n _finished = true;\n activities.clear();\n\n _cleanupHooks.forEach(cleanup => cleanup());\n\n _setSpanForScope(scope, previousActiveSpan);\n\n const spanJSON = spanToJSON(span);\n\n const { start_timestamp: startTimestamp } = spanJSON;\n // This should never happen, but to make TS happy...\n if (!startTimestamp) {\n return;\n }\n\n const attributes = spanJSON.data || {};\n if (!attributes[SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON]) {\n span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON, _finishReason);\n }\n\n logger.log(`[Tracing] Idle span \"${spanJSON.op}\" finished`);\n\n const childSpans = getSpanDescendants(span).filter(child => child !== span);\n\n let discardedSpans = 0;\n childSpans.forEach(childSpan => {\n // We cancel all pending spans with status \"cancelled\" to indicate the idle span was finished early\n if (childSpan.isRecording()) {\n childSpan.setStatus({ code: SPAN_STATUS_ERROR, message: 'cancelled' });\n childSpan.end(endTimestamp);\n DEBUG_BUILD &&\n logger.log('[Tracing] Cancelling span since span ended early', JSON.stringify(childSpan, undefined, 2));\n }\n\n const childSpanJSON = spanToJSON(childSpan);\n const { timestamp: childEndTimestamp = 0, start_timestamp: childStartTimestamp = 0 } = childSpanJSON;\n\n const spanStartedBeforeIdleSpanEnd = childStartTimestamp <= endTimestamp;\n\n // Add a delta with idle timeout so that we prevent false positives\n const timeoutWithMarginOfError = (finalTimeout + idleTimeout) / 1000;\n const spanEndedBeforeFinalTimeout = childEndTimestamp - childStartTimestamp <= timeoutWithMarginOfError;\n\n if (DEBUG_BUILD) {\n const stringifiedSpan = JSON.stringify(childSpan, undefined, 2);\n if (!spanStartedBeforeIdleSpanEnd) {\n logger.log('[Tracing] Discarding span since it happened after idle span was finished', stringifiedSpan);\n } else if (!spanEndedBeforeFinalTimeout) {\n logger.log('[Tracing] Discarding span since it finished after idle span final timeout', stringifiedSpan);\n }\n }\n\n if (!spanEndedBeforeFinalTimeout || !spanStartedBeforeIdleSpanEnd) {\n removeChildSpanFromSpan(span, childSpan);\n discardedSpans++;\n }\n });\n\n if (discardedSpans > 0) {\n span.setAttribute('sentry.idle_span_discarded_spans', discardedSpans);\n }\n }\n\n _cleanupHooks.push(\n client.on('spanStart', startedSpan => {\n // If we already finished the idle span,\n // or if this is the idle span itself being started,\n // or if the started span has already been closed,\n // we don't care about it for activity\n if (_finished || startedSpan === span || !!spanToJSON(startedSpan).timestamp) {\n return;\n }\n\n const allSpans = getSpanDescendants(span);\n\n // If the span that was just started is a child of the idle span, we should track it\n if (allSpans.includes(startedSpan)) {\n _pushActivity(startedSpan.spanContext().spanId);\n }\n }),\n );\n\n _cleanupHooks.push(\n client.on('spanEnd', endedSpan => {\n if (_finished) {\n return;\n }\n\n _popActivity(endedSpan.spanContext().spanId);\n }),\n );\n\n _cleanupHooks.push(\n client.on('idleSpanEnableAutoFinish', spanToAllowAutoFinish => {\n if (spanToAllowAutoFinish === span) {\n _autoFinishAllowed = true;\n _restartIdleTimeout();\n\n if (activities.size) {\n _restartChildSpanTimeout();\n }\n }\n }),\n );\n\n // We only start the initial idle timeout if we are not delaying the auto finish\n if (!options.disableAutoFinish) {\n _restartIdleTimeout();\n }\n\n setTimeout(() => {\n if (!_finished) {\n span.setStatus({ code: SPAN_STATUS_ERROR, message: 'deadline_exceeded' });\n _finishReason = FINISH_REASON_FINAL_TIMEOUT;\n span.end();\n }\n }, finalTimeout);\n\n return span;\n}\n\nfunction _startIdleSpan(options) {\n const span = startInactiveSpan(options);\n\n _setSpanForScope(getCurrentScope(), span);\n\n DEBUG_BUILD && logger.log('[Tracing] Started span is an idle span');\n\n return span;\n}\n\nexport { TRACING_DEFAULTS, startIdleSpan };\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { addGlobalErrorInstrumentationHandler } from '../utils-hoist/instrument/globalError.js';\nimport { addGlobalUnhandledRejectionInstrumentationHandler } from '../utils-hoist/instrument/globalUnhandledRejection.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { getActiveSpan, getRootSpan } from '../utils/spanUtils.js';\nimport { SPAN_STATUS_ERROR } from './spanstatus.js';\n\nlet errorsInstrumented = false;\n\n/**\n * Ensure that global errors automatically set the active span status.\n */\nfunction registerSpanErrorInstrumentation() {\n if (errorsInstrumented) {\n return;\n }\n\n errorsInstrumented = true;\n addGlobalErrorInstrumentationHandler(errorCallback);\n addGlobalUnhandledRejectionInstrumentationHandler(errorCallback);\n}\n\n/**\n * If an error or unhandled promise occurs, we mark the active root span as failed\n */\nfunction errorCallback() {\n const activeSpan = getActiveSpan();\n const rootSpan = activeSpan && getRootSpan(activeSpan);\n if (rootSpan) {\n const message = 'internal_error';\n DEBUG_BUILD && logger.log(`[Tracing] Root span: ${message} -> Global error occurred`);\n rootSpan.setStatus({ code: SPAN_STATUS_ERROR, message });\n }\n}\n\n// The function name will be lost when bundling but we need to be able to identify this listener later to maintain the\n// node.js default exit behaviour\nerrorCallback.tag = 'sentry_tracingErrorCallback';\n\nexport { registerSpanErrorInstrumentation };\n","import { getAsyncContextStrategy } from '../asyncContext/index.js';\nimport { getMainCarrier } from '../carrier.js';\nimport { getClient, getCurrentScope } from '../currentScopes.js';\nimport { isEnabled } from '../exports.js';\nimport '../tracing/errors.js';\nimport '../utils-hoist/debug-build.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport '../debug-build.js';\nimport '../utils-hoist/time.js';\nimport { getActiveSpan, spanToTraceHeader } from './spanUtils.js';\nimport { TRACEPARENT_REGEXP, generateSentryTraceHeader } from '../utils-hoist/tracing.js';\nimport { getDynamicSamplingContextFromSpan, getDynamicSamplingContextFromScope } from '../tracing/dynamicSamplingContext.js';\nimport { dynamicSamplingContextToSentryBaggageHeader } from '../utils-hoist/baggage.js';\n\n/**\n * Extracts trace propagation data from the current span or from the client's scope (via transaction or propagation\n * context) and serializes it to `sentry-trace` and `baggage` values to strings. These values can be used to propagate\n * a trace via our tracing Http headers or Html `<meta>` tags.\n *\n * This function also applies some validation to the generated sentry-trace and baggage values to ensure that\n * only valid strings are returned.\n *\n * @returns an object with the tracing data values. The object keys are the name of the tracing key to be used as header\n * or meta tag name.\n */\nfunction getTraceData(options = {}) {\n const client = getClient();\n if (!isEnabled() || !client) {\n return {};\n }\n\n const carrier = getMainCarrier();\n const acs = getAsyncContextStrategy(carrier);\n if (acs.getTraceData) {\n return acs.getTraceData(options);\n }\n\n const scope = getCurrentScope();\n const span = options.span || getActiveSpan();\n const sentryTrace = span ? spanToTraceHeader(span) : scopeToTraceHeader(scope);\n const dsc = span ? getDynamicSamplingContextFromSpan(span) : getDynamicSamplingContextFromScope(client, scope);\n const baggage = dynamicSamplingContextToSentryBaggageHeader(dsc);\n\n const isValidSentryTraceHeader = TRACEPARENT_REGEXP.test(sentryTrace);\n if (!isValidSentryTraceHeader) {\n logger.warn('Invalid sentry-trace data. Cannot generate trace data');\n return {};\n }\n\n return {\n 'sentry-trace': sentryTrace,\n baggage,\n };\n}\n\n/**\n * Get a sentry-trace header value for the given scope.\n */\nfunction scopeToTraceHeader(scope) {\n // TODO(v9): Use generateSpanId() instead of spanId\n // eslint-disable-next-line deprecation/deprecation\n const { traceId, sampled, spanId } = scope.getPropagationContext();\n return generateSentryTraceHeader(traceId, spanId, sampled);\n}\n\nexport { getTraceData };\n","import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_OP } from './semanticAttributes.js';\nimport './tracing/errors.js';\nimport { isInstanceOf } from './utils-hoist/is.js';\nimport './utils-hoist/debug-build.js';\nimport './utils-hoist/logger.js';\nimport './utils-hoist/time.js';\nimport './utils-hoist/syncpromise.js';\nimport { parseUrl } from './utils-hoist/url.js';\nimport { SENTRY_BAGGAGE_KEY_PREFIX } from './utils-hoist/baggage.js';\nimport './debug-build.js';\nimport { hasTracingEnabled } from './utils/hasTracingEnabled.js';\nimport { getActiveSpan } from './utils/spanUtils.js';\nimport { SentryNonRecordingSpan } from './tracing/sentryNonRecordingSpan.js';\nimport { setHttpStatus, SPAN_STATUS_ERROR } from './tracing/spanstatus.js';\nimport { startInactiveSpan } from './tracing/trace.js';\nimport { getTraceData } from './utils/traceData.js';\n\n/**\n * Create and track fetch request spans for usage in combination with `addFetchInstrumentationHandler`.\n *\n * @returns Span if a span was created, otherwise void.\n */\nfunction instrumentFetchRequest(\n handlerData,\n shouldCreateSpan,\n shouldAttachHeaders,\n spans,\n spanOrigin = 'auto.http.browser',\n) {\n if (!handlerData.fetchData) {\n return undefined;\n }\n\n const shouldCreateSpanResult = hasTracingEnabled() && shouldCreateSpan(handlerData.fetchData.url);\n\n if (handlerData.endTimestamp && shouldCreateSpanResult) {\n const spanId = handlerData.fetchData.__span;\n if (!spanId) return;\n\n const span = spans[spanId];\n if (span) {\n endSpan(span, handlerData);\n\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete spans[spanId];\n }\n return undefined;\n }\n\n const { method, url } = handlerData.fetchData;\n\n const fullUrl = getFullURL(url);\n const host = fullUrl ? parseUrl(fullUrl).host : undefined;\n\n const hasParent = !!getActiveSpan();\n\n const span =\n shouldCreateSpanResult && hasParent\n ? startInactiveSpan({\n name: `${method} ${url}`,\n attributes: {\n url,\n type: 'fetch',\n 'http.method': method,\n 'http.url': fullUrl,\n 'server.address': host,\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: spanOrigin,\n [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'http.client',\n },\n })\n : new SentryNonRecordingSpan();\n\n handlerData.fetchData.__span = span.spanContext().spanId;\n spans[span.spanContext().spanId] = span;\n\n if (shouldAttachHeaders(handlerData.fetchData.url)) {\n const request = handlerData.args[0];\n\n const options = handlerData.args[1] || {};\n\n const headers = _addTracingHeadersToFetchRequest(\n request,\n options,\n // If performance is disabled (TWP) or there's no active root span (pageload/navigation/interaction),\n // we do not want to use the span as base for the trace headers,\n // which means that the headers will be generated from the scope and the sampling decision is deferred\n hasTracingEnabled() && hasParent ? span : undefined,\n );\n if (headers) {\n // Ensure this is actually set, if no options have been passed previously\n handlerData.args[1] = options;\n options.headers = headers;\n }\n }\n\n return span;\n}\n\n/**\n * Adds sentry-trace and baggage headers to the various forms of fetch headers.\n */\nfunction _addTracingHeadersToFetchRequest(\n request,\n fetchOptionsObj\n\n,\n span,\n) {\n const traceHeaders = getTraceData({ span });\n const sentryTrace = traceHeaders['sentry-trace'];\n const baggage = traceHeaders.baggage;\n\n // Nothing to do, when we return undefined here, the original headers will be used\n if (!sentryTrace) {\n return undefined;\n }\n\n const headers = fetchOptionsObj.headers || (isRequest(request) ? request.headers : undefined);\n\n if (!headers) {\n return { ...traceHeaders };\n } else if (isHeaders(headers)) {\n const newHeaders = new Headers(headers);\n newHeaders.set('sentry-trace', sentryTrace);\n\n if (baggage) {\n const prevBaggageHeader = newHeaders.get('baggage');\n if (prevBaggageHeader) {\n const prevHeaderStrippedFromSentryBaggage = stripBaggageHeaderOfSentryBaggageValues(prevBaggageHeader);\n newHeaders.set(\n 'baggage',\n // If there are non-sentry entries (i.e. if the stripped string is non-empty/truthy) combine the stripped header and sentry baggage header\n // otherwise just set the sentry baggage header\n prevHeaderStrippedFromSentryBaggage ? `${prevHeaderStrippedFromSentryBaggage},${baggage}` : baggage,\n );\n } else {\n newHeaders.set('baggage', baggage);\n }\n }\n\n return newHeaders;\n } else if (Array.isArray(headers)) {\n const newHeaders = [\n ...headers\n // Remove any existing sentry-trace headers\n .filter(header => {\n return !(Array.isArray(header) && header[0] === 'sentry-trace');\n })\n // Get rid of previous sentry baggage values in baggage header\n .map(header => {\n if (Array.isArray(header) && header[0] === 'baggage' && typeof header[1] === 'string') {\n const [headerName, headerValue, ...rest] = header;\n return [headerName, stripBaggageHeaderOfSentryBaggageValues(headerValue), ...rest];\n } else {\n return header;\n }\n }),\n // Attach the new sentry-trace header\n ['sentry-trace', sentryTrace],\n ];\n\n if (baggage) {\n // If there are multiple entries with the same key, the browser will merge the values into a single request header.\n // Its therefore safe to simply push a \"baggage\" entry, even though there might already be another baggage header.\n newHeaders.push(['baggage', baggage]);\n }\n\n return newHeaders ;\n } else {\n const existingBaggageHeader = 'baggage' in headers ? headers.baggage : undefined;\n let newBaggageHeaders = [];\n\n if (Array.isArray(existingBaggageHeader)) {\n newBaggageHeaders = existingBaggageHeader\n .map(headerItem =>\n typeof headerItem === 'string' ? stripBaggageHeaderOfSentryBaggageValues(headerItem) : headerItem,\n )\n .filter(headerItem => headerItem === '');\n } else if (existingBaggageHeader) {\n newBaggageHeaders.push(stripBaggageHeaderOfSentryBaggageValues(existingBaggageHeader));\n }\n\n if (baggage) {\n newBaggageHeaders.push(baggage);\n }\n\n return {\n ...(headers ),\n 'sentry-trace': sentryTrace,\n baggage: newBaggageHeaders.length > 0 ? newBaggageHeaders.join(',') : undefined,\n };\n }\n}\n\n/**\n * Adds sentry-trace and baggage headers to the various forms of fetch headers.\n *\n * @deprecated This function will not be exported anymore in v9.\n */\nfunction addTracingHeadersToFetchRequest(\n request,\n _client,\n _scope,\n fetchOptionsObj\n\n,\n span,\n) {\n return _addTracingHeadersToFetchRequest(request , fetchOptionsObj, span);\n}\n\nfunction getFullURL(url) {\n try {\n const parsed = new URL(url);\n return parsed.href;\n } catch (e) {\n return undefined;\n }\n}\n\nfunction endSpan(span, handlerData) {\n if (handlerData.response) {\n setHttpStatus(span, handlerData.response.status);\n\n const contentLength =\n handlerData.response && handlerData.response.headers && handlerData.response.headers.get('content-length');\n\n if (contentLength) {\n const contentLengthNum = parseInt(contentLength);\n if (contentLengthNum > 0) {\n span.setAttribute('http.response_content_length', contentLengthNum);\n }\n }\n } else if (handlerData.error) {\n span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n }\n span.end();\n}\n\nfunction stripBaggageHeaderOfSentryBaggageValues(baggageHeader) {\n return (\n baggageHeader\n .split(',')\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n .filter(baggageEntry => !baggageEntry.split('=')[0].startsWith(SENTRY_BAGGAGE_KEY_PREFIX))\n .join(',')\n );\n}\n\nfunction isRequest(request) {\n return typeof Request !== 'undefined' && isInstanceOf(request, Request);\n}\n\nfunction isHeaders(headers) {\n return typeof Headers !== 'undefined' && isInstanceOf(headers, Headers);\n}\n\nexport { addTracingHeadersToFetchRequest, instrumentFetchRequest };\n","import { addXhrInstrumentationHandler, addPerformanceInstrumentationHandler, extractNetworkProtocol, SENTRY_XHR_DATA_KEY } from '@sentry-internal/browser-utils';\nimport { addFetchEndInstrumentationHandler, addFetchInstrumentationHandler, instrumentFetchRequest, parseUrl, spanToJSON, browserPerformanceTimeOrigin, hasTracingEnabled, setHttpStatus, getActiveSpan, startInactiveSpan, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_OP, SentryNonRecordingSpan, getTraceData, stringMatchesSomePattern } from '@sentry/core';\nimport { WINDOW } from '../helpers.js';\n\n/** Options for Request Instrumentation */\n\nconst responseToSpanId = new WeakMap();\nconst spanIdToEndTimestamp = new Map();\n\nconst defaultRequestInstrumentationOptions = {\n traceFetch: true,\n traceXHR: true,\n enableHTTPTimings: true,\n trackFetchStreamPerformance: false,\n};\n\n/** Registers span creators for xhr and fetch requests */\nfunction instrumentOutgoingRequests(client, _options) {\n const {\n traceFetch,\n traceXHR,\n trackFetchStreamPerformance,\n shouldCreateSpanForRequest,\n enableHTTPTimings,\n tracePropagationTargets,\n } = {\n traceFetch: defaultRequestInstrumentationOptions.traceFetch,\n traceXHR: defaultRequestInstrumentationOptions.traceXHR,\n trackFetchStreamPerformance: defaultRequestInstrumentationOptions.trackFetchStreamPerformance,\n ..._options,\n };\n\n const shouldCreateSpan =\n typeof shouldCreateSpanForRequest === 'function' ? shouldCreateSpanForRequest : (_) => true;\n\n const shouldAttachHeadersWithTargets = (url) => shouldAttachHeaders(url, tracePropagationTargets);\n\n const spans = {};\n\n if (traceFetch) {\n // Keeping track of http requests, whose body payloads resolved later than the initial resolved request\n // e.g. streaming using server sent events (SSE)\n client.addEventProcessor(event => {\n if (event.type === 'transaction' && event.spans) {\n event.spans.forEach(span => {\n if (span.op === 'http.client') {\n const updatedTimestamp = spanIdToEndTimestamp.get(span.span_id);\n if (updatedTimestamp) {\n span.timestamp = updatedTimestamp / 1000;\n spanIdToEndTimestamp.delete(span.span_id);\n }\n }\n });\n }\n return event;\n });\n\n if (trackFetchStreamPerformance) {\n addFetchEndInstrumentationHandler(handlerData => {\n if (handlerData.response) {\n const span = responseToSpanId.get(handlerData.response);\n if (span && handlerData.endTimestamp) {\n spanIdToEndTimestamp.set(span, handlerData.endTimestamp);\n }\n }\n });\n }\n\n addFetchInstrumentationHandler(handlerData => {\n const createdSpan = instrumentFetchRequest(handlerData, shouldCreateSpan, shouldAttachHeadersWithTargets, spans);\n\n if (handlerData.response && handlerData.fetchData.__span) {\n responseToSpanId.set(handlerData.response, handlerData.fetchData.__span);\n }\n\n // We cannot use `window.location` in the generic fetch instrumentation,\n // but we need it for reliable `server.address` attribute.\n // so we extend this in here\n if (createdSpan) {\n const fullUrl = getFullURL(handlerData.fetchData.url);\n const host = fullUrl ? parseUrl(fullUrl).host : undefined;\n createdSpan.setAttributes({\n 'http.url': fullUrl,\n 'server.address': host,\n });\n }\n\n if (enableHTTPTimings && createdSpan) {\n addHTTPTimings(createdSpan);\n }\n });\n }\n\n if (traceXHR) {\n addXhrInstrumentationHandler(handlerData => {\n const createdSpan = xhrCallback(handlerData, shouldCreateSpan, shouldAttachHeadersWithTargets, spans);\n if (enableHTTPTimings && createdSpan) {\n addHTTPTimings(createdSpan);\n }\n });\n }\n}\n\nfunction isPerformanceResourceTiming(entry) {\n return (\n entry.entryType === 'resource' &&\n 'initiatorType' in entry &&\n typeof (entry ).nextHopProtocol === 'string' &&\n (entry.initiatorType === 'fetch' || entry.initiatorType === 'xmlhttprequest')\n );\n}\n\n/**\n * Creates a temporary observer to listen to the next fetch/xhr resourcing timings,\n * so that when timings hit their per-browser limit they don't need to be removed.\n *\n * @param span A span that has yet to be finished, must contain `url` on data.\n */\nfunction addHTTPTimings(span) {\n const { url } = spanToJSON(span).data || {};\n\n if (!url || typeof url !== 'string') {\n return;\n }\n\n const cleanup = addPerformanceInstrumentationHandler('resource', ({ entries }) => {\n entries.forEach(entry => {\n if (isPerformanceResourceTiming(entry) && entry.name.endsWith(url)) {\n const spanData = resourceTimingEntryToSpanData(entry);\n spanData.forEach(data => span.setAttribute(...data));\n // In the next tick, clean this handler up\n // We have to wait here because otherwise this cleans itself up before it is fully done\n setTimeout(cleanup);\n }\n });\n });\n}\n\nfunction getAbsoluteTime(time = 0) {\n return ((browserPerformanceTimeOrigin || performance.timeOrigin) + time) / 1000;\n}\n\nfunction resourceTimingEntryToSpanData(resourceTiming) {\n const { name, version } = extractNetworkProtocol(resourceTiming.nextHopProtocol);\n\n const timingSpanData = [];\n\n timingSpanData.push(['network.protocol.version', version], ['network.protocol.name', name]);\n\n if (!browserPerformanceTimeOrigin) {\n return timingSpanData;\n }\n return [\n ...timingSpanData,\n ['http.request.redirect_start', getAbsoluteTime(resourceTiming.redirectStart)],\n ['http.request.fetch_start', getAbsoluteTime(resourceTiming.fetchStart)],\n ['http.request.domain_lookup_start', getAbsoluteTime(resourceTiming.domainLookupStart)],\n ['http.request.domain_lookup_end', getAbsoluteTime(resourceTiming.domainLookupEnd)],\n ['http.request.connect_start', getAbsoluteTime(resourceTiming.connectStart)],\n ['http.request.secure_connection_start', getAbsoluteTime(resourceTiming.secureConnectionStart)],\n ['http.request.connection_end', getAbsoluteTime(resourceTiming.connectEnd)],\n ['http.request.request_start', getAbsoluteTime(resourceTiming.requestStart)],\n ['http.request.response_start', getAbsoluteTime(resourceTiming.responseStart)],\n ['http.request.response_end', getAbsoluteTime(resourceTiming.responseEnd)],\n ];\n}\n\n/**\n * A function that determines whether to attach tracing headers to a request.\n * We only export this function for testing purposes.\n */\nfunction shouldAttachHeaders(\n targetUrl,\n tracePropagationTargets,\n) {\n // window.location.href not being defined is an edge case in the browser but we need to handle it.\n // Potentially dangerous situations where it may not be defined: Browser Extensions, Web Workers, patching of the location obj\n const href = WINDOW.location && WINDOW.location.href;\n\n if (!href) {\n // If there is no window.location.origin, we default to only attaching tracing headers to relative requests, i.e. ones that start with `/`\n // BIG DISCLAIMER: Users can call URLs with a double slash (fetch(\"//example.com/api\")), this is a shorthand for \"send to the same protocol\",\n // so we need a to exclude those requests, because they might be cross origin.\n const isRelativeSameOriginRequest = !!targetUrl.match(/^\\/(?!\\/)/);\n if (!tracePropagationTargets) {\n return isRelativeSameOriginRequest;\n } else {\n return stringMatchesSomePattern(targetUrl, tracePropagationTargets);\n }\n } else {\n let resolvedUrl;\n let currentOrigin;\n\n // URL parsing may fail, we default to not attaching trace headers in that case.\n try {\n resolvedUrl = new URL(targetUrl, href);\n currentOrigin = new URL(href).origin;\n } catch (e) {\n return false;\n }\n\n const isSameOriginRequest = resolvedUrl.origin === currentOrigin;\n if (!tracePropagationTargets) {\n return isSameOriginRequest;\n } else {\n return (\n stringMatchesSomePattern(resolvedUrl.toString(), tracePropagationTargets) ||\n (isSameOriginRequest && stringMatchesSomePattern(resolvedUrl.pathname, tracePropagationTargets))\n );\n }\n }\n}\n\n/**\n * Create and track xhr request spans\n *\n * @returns Span if a span was created, otherwise void.\n */\nfunction xhrCallback(\n handlerData,\n shouldCreateSpan,\n shouldAttachHeaders,\n spans,\n) {\n const xhr = handlerData.xhr;\n const sentryXhrData = xhr && xhr[SENTRY_XHR_DATA_KEY];\n\n if (!xhr || xhr.__sentry_own_request__ || !sentryXhrData) {\n return undefined;\n }\n\n const shouldCreateSpanResult = hasTracingEnabled() && shouldCreateSpan(sentryXhrData.url);\n\n // check first if the request has finished and is tracked by an existing span which should now end\n if (handlerData.endTimestamp && shouldCreateSpanResult) {\n const spanId = xhr.__sentry_xhr_span_id__;\n if (!spanId) return;\n\n const span = spans[spanId];\n if (span && sentryXhrData.status_code !== undefined) {\n setHttpStatus(span, sentryXhrData.status_code);\n span.end();\n\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete spans[spanId];\n }\n return undefined;\n }\n\n const fullUrl = getFullURL(sentryXhrData.url);\n const host = fullUrl ? parseUrl(fullUrl).host : undefined;\n\n const hasParent = !!getActiveSpan();\n\n const span =\n shouldCreateSpanResult && hasParent\n ? startInactiveSpan({\n name: `${sentryXhrData.method} ${sentryXhrData.url}`,\n attributes: {\n type: 'xhr',\n 'http.method': sentryXhrData.method,\n 'http.url': fullUrl,\n url: sentryXhrData.url,\n 'server.address': host,\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.browser',\n [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'http.client',\n },\n })\n : new SentryNonRecordingSpan();\n\n xhr.__sentry_xhr_span_id__ = span.spanContext().spanId;\n spans[xhr.__sentry_xhr_span_id__] = span;\n\n if (shouldAttachHeaders(sentryXhrData.url)) {\n addTracingHeadersToXhrRequest(\n xhr,\n // If performance is disabled (TWP) or there's no active root span (pageload/navigation/interaction),\n // we do not want to use the span as base for the trace headers,\n // which means that the headers will be generated from the scope and the sampling decision is deferred\n hasTracingEnabled() && hasParent ? span : undefined,\n );\n }\n\n return span;\n}\n\nfunction addTracingHeadersToXhrRequest(xhr, span) {\n const { 'sentry-trace': sentryTrace, baggage } = getTraceData({ span });\n\n if (sentryTrace) {\n setHeaderOnXhr(xhr, sentryTrace, baggage);\n }\n}\n\nfunction setHeaderOnXhr(\n xhr,\n sentryTraceHeader,\n sentryBaggageHeader,\n) {\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n xhr.setRequestHeader('sentry-trace', sentryTraceHeader);\n if (sentryBaggageHeader) {\n // From MDN: \"If this method is called several times with the same header, the values are merged into one single request header.\"\n // We can therefore simply set a baggage header without checking what was there before\n // https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/setRequestHeader\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n xhr.setRequestHeader('baggage', sentryBaggageHeader);\n }\n } catch (_) {\n // Error: InvalidStateError: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': The object's state must be OPENED.\n }\n}\n\nfunction getFullURL(url) {\n try {\n // By adding a base URL to new URL(), this will also work for relative urls\n // If `url` is a full URL, the base URL is ignored anyhow\n const parsed = new URL(url, WINDOW.location.origin);\n return parsed.href;\n } catch (e2) {\n return undefined;\n }\n}\n\nexport { defaultRequestInstrumentationOptions, instrumentOutgoingRequests, shouldAttachHeaders, xhrCallback };\n","import { startTrackingWebVitals, startTrackingINP, startTrackingLongAnimationFrames, startTrackingLongTasks, startTrackingInteractions, addHistoryInstrumentationHandler, registerInpInteractionListener, addPerformanceEntries } from '@sentry-internal/browser-utils';\nimport { TRACING_DEFAULTS, registerSpanErrorInstrumentation, GLOBAL_OBJ, getClient, propagationContextFromHeaders, getCurrentScope, spanToJSON, getRootSpan, spanIsSampled, getDynamicSamplingContextFromSpan, browserPerformanceTimeOrigin, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, getActiveSpan, getIsolationScope, generateTraceId, getDomElement, startIdleSpan, logger, SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { WINDOW } from '../helpers.js';\nimport { registerBackgroundTabDetection } from './backgroundtab.js';\nimport { defaultRequestInstrumentationOptions, instrumentOutgoingRequests } from './request.js';\n\n/* eslint-disable max-lines */\n\nconst BROWSER_TRACING_INTEGRATION_ID = 'BrowserTracing';\n\nconst DEFAULT_BROWSER_TRACING_OPTIONS = {\n ...TRACING_DEFAULTS,\n instrumentNavigation: true,\n instrumentPageLoad: true,\n markBackgroundSpan: true,\n enableLongTask: true,\n enableLongAnimationFrame: true,\n enableInp: true,\n _experiments: {},\n ...defaultRequestInstrumentationOptions,\n};\n\n/**\n * The Browser Tracing integration automatically instruments browser pageload/navigation\n * actions as transactions, and captures requests, metrics and errors as spans.\n *\n * The integration can be configured with a variety of options, and can be extended to use\n * any routing library.\n *\n * We explicitly export the proper type here, as this has to be extended in some cases.\n */\nconst browserTracingIntegration = ((_options = {}) => {\n registerSpanErrorInstrumentation();\n\n const {\n enableInp,\n enableLongTask,\n enableLongAnimationFrame,\n _experiments: { enableInteractions, enableStandaloneClsSpans },\n beforeStartSpan,\n idleTimeout,\n finalTimeout,\n childSpanTimeout,\n markBackgroundSpan,\n traceFetch,\n traceXHR,\n trackFetchStreamPerformance,\n shouldCreateSpanForRequest,\n enableHTTPTimings,\n instrumentPageLoad,\n instrumentNavigation,\n } = {\n ...DEFAULT_BROWSER_TRACING_OPTIONS,\n ..._options,\n };\n\n const _collectWebVitals = startTrackingWebVitals({ recordClsStandaloneSpans: enableStandaloneClsSpans || false });\n\n if (enableInp) {\n startTrackingINP();\n }\n\n if (\n enableLongAnimationFrame &&\n GLOBAL_OBJ.PerformanceObserver &&\n PerformanceObserver.supportedEntryTypes &&\n PerformanceObserver.supportedEntryTypes.includes('long-animation-frame')\n ) {\n startTrackingLongAnimationFrames();\n } else if (enableLongTask) {\n startTrackingLongTasks();\n }\n\n if (enableInteractions) {\n startTrackingInteractions();\n }\n\n const latestRoute = {\n name: undefined,\n source: undefined,\n };\n\n /** Create routing idle transaction. */\n function _createRouteSpan(client, startSpanOptions) {\n const isPageloadTransaction = startSpanOptions.op === 'pageload';\n\n const finalStartSpanOptions = beforeStartSpan\n ? beforeStartSpan(startSpanOptions)\n : startSpanOptions;\n\n const attributes = finalStartSpanOptions.attributes || {};\n\n // If `finalStartSpanOptions.name` is different than `startSpanOptions.name`\n // it is because `beforeStartSpan` set a custom name. Therefore we set the source to 'custom'.\n if (startSpanOptions.name !== finalStartSpanOptions.name) {\n attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] = 'custom';\n finalStartSpanOptions.attributes = attributes;\n }\n\n latestRoute.name = finalStartSpanOptions.name;\n latestRoute.source = attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];\n\n const idleSpan = startIdleSpan(finalStartSpanOptions, {\n idleTimeout,\n finalTimeout,\n childSpanTimeout,\n // should wait for finish signal if it's a pageload transaction\n disableAutoFinish: isPageloadTransaction,\n beforeSpanEnd: span => {\n _collectWebVitals();\n addPerformanceEntries(span, { recordClsOnPageloadSpan: !enableStandaloneClsSpans });\n },\n });\n\n function emitFinish() {\n if (['interactive', 'complete'].includes(WINDOW.document.readyState)) {\n client.emit('idleSpanEnableAutoFinish', idleSpan);\n }\n }\n\n if (isPageloadTransaction && WINDOW.document) {\n WINDOW.document.addEventListener('readystatechange', () => {\n emitFinish();\n });\n\n emitFinish();\n }\n\n return idleSpan;\n }\n\n return {\n name: BROWSER_TRACING_INTEGRATION_ID,\n afterAllSetup(client) {\n let activeSpan;\n let startingUrl = WINDOW.location && WINDOW.location.href;\n\n function maybeEndActiveSpan() {\n if (activeSpan && !spanToJSON(activeSpan).timestamp) {\n DEBUG_BUILD && logger.log(`[Tracing] Finishing current active span with op: ${spanToJSON(activeSpan).op}`);\n // If there's an open active span, we need to finish it before creating an new one.\n activeSpan.end();\n }\n }\n\n client.on('startNavigationSpan', startSpanOptions => {\n if (getClient() !== client) {\n return;\n }\n\n maybeEndActiveSpan();\n\n activeSpan = _createRouteSpan(client, {\n op: 'navigation',\n ...startSpanOptions,\n });\n });\n\n client.on('startPageLoadSpan', (startSpanOptions, traceOptions = {}) => {\n if (getClient() !== client) {\n return;\n }\n maybeEndActiveSpan();\n\n const sentryTrace = traceOptions.sentryTrace || getMetaContent('sentry-trace');\n const baggage = traceOptions.baggage || getMetaContent('baggage');\n\n const propagationContext = propagationContextFromHeaders(sentryTrace, baggage);\n getCurrentScope().setPropagationContext(propagationContext);\n\n activeSpan = _createRouteSpan(client, {\n op: 'pageload',\n ...startSpanOptions,\n });\n });\n\n // A trace should to stay the consistent over the entire time span of one route.\n // Therefore, when the initial pageload or navigation root span ends, we update the\n // scope's propagation context to keep span-specific attributes like the `sampled` decision and\n // the dynamic sampling context valid, even after the root span has ended.\n // This ensures that the trace data is consistent for the entire duration of the route.\n client.on('spanEnd', span => {\n const op = spanToJSON(span).op;\n if (span !== getRootSpan(span) || (op !== 'navigation' && op !== 'pageload')) {\n return;\n }\n\n const scope = getCurrentScope();\n const oldPropagationContext = scope.getPropagationContext();\n\n scope.setPropagationContext({\n ...oldPropagationContext,\n sampled: oldPropagationContext.sampled !== undefined ? oldPropagationContext.sampled : spanIsSampled(span),\n dsc: oldPropagationContext.dsc || getDynamicSamplingContextFromSpan(span),\n });\n });\n\n if (WINDOW.location) {\n if (instrumentPageLoad) {\n startBrowserTracingPageLoadSpan(client, {\n name: WINDOW.location.pathname,\n // pageload should always start at timeOrigin (and needs to be in s, not ms)\n startTime: browserPerformanceTimeOrigin ? browserPerformanceTimeOrigin / 1000 : undefined,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.pageload.browser',\n },\n });\n }\n\n if (instrumentNavigation) {\n addHistoryInstrumentationHandler(({ to, from }) => {\n /**\n * This early return is there to account for some cases where a navigation transaction starts right after\n * long-running pageload. We make sure that if `from` is undefined and a valid `startingURL` exists, we don't\n * create an uneccessary navigation transaction.\n *\n * This was hard to duplicate, but this behavior stopped as soon as this fix was applied. This issue might also\n * only be caused in certain development environments where the usage of a hot module reloader is causing\n * errors.\n */\n if (from === undefined && startingUrl && startingUrl.indexOf(to) !== -1) {\n startingUrl = undefined;\n return;\n }\n\n if (from !== to) {\n startingUrl = undefined;\n startBrowserTracingNavigationSpan(client, {\n name: WINDOW.location.pathname,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.navigation.browser',\n },\n });\n }\n });\n }\n }\n\n if (markBackgroundSpan) {\n registerBackgroundTabDetection();\n }\n\n if (enableInteractions) {\n registerInteractionListener(idleTimeout, finalTimeout, childSpanTimeout, latestRoute);\n }\n\n if (enableInp) {\n registerInpInteractionListener();\n }\n\n instrumentOutgoingRequests(client, {\n traceFetch,\n traceXHR,\n trackFetchStreamPerformance,\n tracePropagationTargets: client.getOptions().tracePropagationTargets,\n shouldCreateSpanForRequest,\n enableHTTPTimings,\n });\n },\n };\n}) ;\n\n/**\n * Manually start a page load span.\n * This will only do something if a browser tracing integration integration has been setup.\n *\n * If you provide a custom `traceOptions` object, it will be used to continue the trace\n * instead of the default behavior, which is to look it up on the <meta> tags.\n */\nfunction startBrowserTracingPageLoadSpan(\n client,\n spanOptions,\n traceOptions,\n) {\n client.emit('startPageLoadSpan', spanOptions, traceOptions);\n\n getCurrentScope().setTransactionName(spanOptions.name);\n\n const span = getActiveSpan();\n const op = span && spanToJSON(span).op;\n return op === 'pageload' ? span : undefined;\n}\n\n/**\n * Manually start a navigation span.\n * This will only do something if a browser tracing integration has been setup.\n */\nfunction startBrowserTracingNavigationSpan(client, spanOptions) {\n getIsolationScope().setPropagationContext({ traceId: generateTraceId() });\n getCurrentScope().setPropagationContext({ traceId: generateTraceId() });\n\n client.emit('startNavigationSpan', spanOptions);\n\n getCurrentScope().setTransactionName(spanOptions.name);\n\n const span = getActiveSpan();\n const op = span && spanToJSON(span).op;\n return op === 'navigation' ? span : undefined;\n}\n\n/** Returns the value of a meta tag */\nfunction getMetaContent(metaName) {\n // Can't specify generic to `getDomElement` because tracing can be used\n // in a variety of environments, have to disable `no-unsafe-member-access`\n // as a result.\n // eslint-disable-next-line deprecation/deprecation\n const metaTag = getDomElement(`meta[name=${metaName}]`);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return metaTag ? metaTag.getAttribute('content') : undefined;\n}\n\n/** Start listener for interaction transactions */\nfunction registerInteractionListener(\n idleTimeout,\n finalTimeout,\n childSpanTimeout,\n latestRoute,\n) {\n let inflightInteractionSpan;\n const registerInteractionTransaction = () => {\n const op = 'ui.action.click';\n\n const activeSpan = getActiveSpan();\n const rootSpan = activeSpan && getRootSpan(activeSpan);\n if (rootSpan) {\n const currentRootSpanOp = spanToJSON(rootSpan).op;\n if (['navigation', 'pageload'].includes(currentRootSpanOp )) {\n DEBUG_BUILD &&\n logger.warn(`[Tracing] Did not create ${op} span because a pageload or navigation span is in progress.`);\n return undefined;\n }\n }\n\n if (inflightInteractionSpan) {\n inflightInteractionSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON, 'interactionInterrupted');\n inflightInteractionSpan.end();\n inflightInteractionSpan = undefined;\n }\n\n if (!latestRoute.name) {\n DEBUG_BUILD && logger.warn(`[Tracing] Did not create ${op} transaction because _latestRouteName is missing.`);\n return undefined;\n }\n\n inflightInteractionSpan = startIdleSpan(\n {\n name: latestRoute.name,\n op,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: latestRoute.source || 'url',\n },\n },\n {\n idleTimeout,\n finalTimeout,\n childSpanTimeout,\n },\n );\n };\n\n if (WINDOW.document) {\n addEventListener('click', registerInteractionTransaction, { once: false, capture: true });\n }\n}\n\nexport { BROWSER_TRACING_INTEGRATION_ID, browserTracingIntegration, getMetaContent, startBrowserTracingNavigationSpan, startBrowserTracingPageLoadSpan };\n","import { getActiveSpan, getRootSpan, spanToJSON, logger, SPAN_STATUS_ERROR } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { WINDOW } from '../helpers.js';\n\n/**\n * Add a listener that cancels and finishes a transaction when the global\n * document is hidden.\n */\nfunction registerBackgroundTabDetection() {\n if (WINDOW && WINDOW.document) {\n WINDOW.document.addEventListener('visibilitychange', () => {\n const activeSpan = getActiveSpan();\n if (!activeSpan) {\n return;\n }\n\n const rootSpan = getRootSpan(activeSpan);\n\n if (WINDOW.document.hidden && rootSpan) {\n const cancelledStatus = 'cancelled';\n\n const { op, status } = spanToJSON(rootSpan);\n\n if (DEBUG_BUILD) {\n logger.log(`[Tracing] Transaction: ${cancelledStatus} -> since tab moved to the background, op: ${op}`);\n }\n\n // We should not set status if it is already set, this prevent important statuses like\n // error or data loss from being overwritten on transaction.\n if (!status) {\n rootSpan.setStatus({ code: SPAN_STATUS_ERROR, message: cancelledStatus });\n }\n\n rootSpan.setAttribute('sentry.cancellation_reason', 'document.hidden');\n rootSpan.end();\n }\n });\n } else {\n DEBUG_BUILD && logger.warn('[Tracing] Could not set up background tab detection due to lack of global document');\n }\n}\n\nexport { registerBackgroundTabDetection };\n","import * as Sentry from '@sentry/browser';\nimport { breadcrumbsIntegration, globalHandlersIntegration, linkedErrorsIntegration, httpContextIntegration, browserSessionIntegration, init as init$1, setContext, browserTracingIntegration as browserTracingIntegration$1, spanToJSON, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, getClient, startBrowserTracingNavigationSpan, startInactiveSpan, getCurrentScope, getActiveSpan, getRootSpan } from '@sentry/browser';\nexport * from '@sentry/browser';\nimport * as i0 from '@angular/core';\nimport { VERSION, Injectable, Inject, Directive, Input, NgModule } from '@angular/core';\nimport { inboundFiltersIntegration, functionToStringIntegration, dedupeIntegration, applySdkMetadata, logger, isString, consoleSandbox, stripUrlQueryAndFragment, timestampInSeconds } from '@sentry/core';\nimport { HttpErrorResponse } from '@angular/common/http';\nimport * as i1 from '@angular/router';\nimport { NavigationStart, ResolveEnd, NavigationEnd, NavigationCancel, NavigationError } from '@angular/router';\nimport { Subscription } from 'rxjs';\nimport { filter, tap } from 'rxjs/operators';\n\n/*\n * This file defines flags and constants that can be modified during compile time in order to facilitate tree shaking\n * for users.\n *\n * We define \"magic strings\" like `__SENTRY_DEBUG__` that may get replaced with actual values during our, or the user's\n * build process. Take care when introducing new flags - they must not throw if they are not replaced. See the Debug\n * Build Flags section in CONTRIBUTING.md.\n */\n/** Flag that is true for debug builds, false otherwise. */\nconst IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_DEBUG__;\n\n/**\n * Get the default integrations for the Angular SDK.\n */\nfunction getDefaultIntegrations(options = {}) {\n // Don't include the BrowserApiErrors integration as it interferes with the Angular SDK's `ErrorHandler`:\n // BrowserApiErrors would catch certain errors before they reach the `ErrorHandler` and\n // thus provide a lower fidelity error than what `SentryErrorHandler`\n // (see errorhandler.ts) would provide.\n //\n // see:\n // - https://github.com/getsentry/sentry-javascript/issues/5417#issuecomment-1453407097\n // - https://github.com/getsentry/sentry-javascript/issues/2744\n const integrations = [\n inboundFiltersIntegration(),\n functionToStringIntegration(),\n breadcrumbsIntegration(),\n globalHandlersIntegration(),\n linkedErrorsIntegration(),\n dedupeIntegration(),\n httpContextIntegration(),\n ];\n // eslint-disable-next-line deprecation/deprecation\n if (options.autoSessionTracking !== false) {\n integrations.push(browserSessionIntegration());\n }\n return integrations;\n}\n/**\n * Inits the Angular SDK\n */\nfunction init(options) {\n const opts = {\n defaultIntegrations: getDefaultIntegrations(),\n ...options,\n };\n applySdkMetadata(opts, 'angular');\n checkAndSetAngularVersion();\n return init$1(opts);\n}\nfunction checkAndSetAngularVersion() {\n const ANGULAR_MINIMUM_VERSION = 14;\n const angularVersion = VERSION && VERSION.major ? parseInt(VERSION.major, 10) : undefined;\n if (angularVersion) {\n if (angularVersion < ANGULAR_MINIMUM_VERSION) {\n IS_DEBUG_BUILD &&\n logger.warn(`This Sentry SDK does not officially support Angular ${angularVersion}.`, `This SDK only supports Angular ${ANGULAR_MINIMUM_VERSION} and above.`, \"If you're using lower Angular versions, check the Angular Version Compatibility table in our docs: https://docs.sentry.io/platforms/javascript/guides/angular/#angular-version-compatibility.\", 'Otherwise, please consider upgrading your Angular version.');\n }\n setContext('angular', { version: angularVersion });\n }\n}\n\n// In Angular 17 and future versions, zoneless support is forthcoming.\n// Therefore, it's advisable to safely check whether the `run` function is\n// available in the `<root>` context.\n// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\nconst isNgZoneEnabled = typeof Zone !== 'undefined' && Zone.root && Zone.root.run;\n/**\n * The function that does the same job as `NgZone.runOutsideAngular`.\n *\n * ⚠️ Note: All of the Sentry functionality called from inside the Angular\n * execution context must be wrapped in this function. Angular's rendering\n * relies on asynchronous tasks being scheduled within its execution context.\n * Since Sentry schedules tasks that do not interact with Angular's rendering,\n * it may prevent Angular from functioning reliably. Consequently, it may disrupt\n * processes such as server-side rendering or client-side hydration.\n */\nfunction runOutsideAngular(callback) {\n // Running the `callback` within the root execution context enables Angular\n // processes (such as SSR and hydration) to continue functioning normally without\n // timeouts and delays that could affect the user experience. This approach is\n // necessary because some of the Sentry functionality continues to run in the background.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return isNgZoneEnabled ? Zone.root.run(callback) : callback();\n}\n\n// https://github.com/angular/angular/blob/master/packages/core/src/util/errors.ts\nfunction tryToUnwrapZonejsError(error) {\n // TODO: once Angular14 is the minimum requirement ERROR_ORIGINAL_ERROR and\n // getOriginalError from error.ts can be used directly.\n return error && error.ngOriginalError\n ? error.ngOriginalError\n : error;\n}\nfunction extractHttpModuleError(error) {\n // The `error` property of http exception can be either an `Error` object, which we can use directly...\n if (isErrorOrErrorLikeObject(error.error)) {\n return error.error;\n }\n // ... or an`ErrorEvent`, which can provide us with the message but no stack...\n // guarding `ErrorEvent` against `undefined` as it's not defined in Node environments\n if (typeof ErrorEvent !== 'undefined' && error.error instanceof ErrorEvent && error.error.message) {\n return error.error.message;\n }\n // ...or the request body itself, which we can use as a message instead.\n if (typeof error.error === 'string') {\n return `Server returned code ${error.status} with body \"${error.error}\"`;\n }\n // If we don't have any detailed information, fallback to the request message itself.\n return error.message;\n}\nfunction isErrorOrErrorLikeObject(value) {\n if (value instanceof Error) {\n return true;\n }\n if (value === null || typeof value !== 'object') {\n return false;\n }\n const candidate = value;\n return (isString(candidate.name) &&\n isString(candidate.message) &&\n (undefined === candidate.stack || isString(candidate.stack)));\n}\n/**\n * Implementation of Angular's ErrorHandler provider that can be used as a drop-in replacement for the stock one.\n */\nclass SentryErrorHandler {\n constructor(options) {\n this._options = {\n logErrors: true,\n ...options,\n };\n }\n /**\n * Method executed when the injector is destroyed.\n */\n ngOnDestroy() {\n if (this._removeAfterSendEventListener) {\n this._removeAfterSendEventListener();\n }\n }\n /**\n * Method called for every value captured through the ErrorHandler\n */\n handleError(error) {\n const extractedError = this._extractError(error) || 'Handled unknown error';\n // Capture handled exception and send it to Sentry.\n const eventId = runOutsideAngular(() => Sentry.captureException(extractedError, {\n mechanism: { type: 'angular', handled: false },\n }));\n // When in development mode, log the error to console for immediate feedback.\n if (this._options.logErrors) {\n // eslint-disable-next-line no-console\n consoleSandbox(() => console.error(extractedError));\n }\n // Optionally show user dialog to provide details on what happened.\n if (this._options.showDialog) {\n const client = Sentry.getClient();\n if (client && !this._removeAfterSendEventListener) {\n this._removeAfterSendEventListener = client.on('afterSendEvent', (event) => {\n if (!event.type && event.event_id) {\n runOutsideAngular(() => {\n Sentry.showReportDialog({ ...this._options.dialogOptions, eventId: event.event_id });\n });\n }\n });\n }\n else if (!client) {\n runOutsideAngular(() => {\n Sentry.showReportDialog({ ...this._options.dialogOptions, eventId });\n });\n }\n }\n }\n /**\n * Used to pull a desired value that will be used to capture an event out of the raw value captured by ErrorHandler.\n */\n _extractError(error) {\n // Allow custom overrides of extracting function\n if (this._options.extractor) {\n const defaultExtractor = this._defaultExtractor.bind(this);\n return this._options.extractor(error, defaultExtractor);\n }\n return this._defaultExtractor(error);\n }\n /**\n * Default implementation of error extraction that handles default error wrapping, HTTP responses, ErrorEvent and few other known cases.\n */\n _defaultExtractor(errorCandidate) {\n const error = tryToUnwrapZonejsError(errorCandidate);\n // If it's http module error, extract as much information from it as we can.\n if (error instanceof HttpErrorResponse) {\n return extractHttpModuleError(error);\n }\n // We can handle messages and Error objects directly.\n if (typeof error === 'string' || isErrorOrErrorLikeObject(error)) {\n return error;\n }\n // Nothing was extracted, fallback to default error message.\n return null;\n }\n}\nSentryErrorHandler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.3.0\", ngImport: i0, type: SentryErrorHandler, deps: [{ token: 'errorHandlerOptions' }], target: i0.ɵɵFactoryTarget.Injectable });\nSentryErrorHandler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.3.0\", ngImport: i0, type: SentryErrorHandler, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.3.0\", ngImport: i0, type: SentryErrorHandler, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: ['errorHandlerOptions']\n }] }]; } });\n/**\n * Factory function that creates an instance of a preconfigured ErrorHandler provider.\n */\nfunction createErrorHandler(config) {\n return new SentryErrorHandler(config);\n}\n\nconst ANGULAR_ROUTING_OP = 'ui.angular.routing';\nconst ANGULAR_INIT_OP = 'ui.angular.init';\nconst ANGULAR_OP = 'ui.angular';\n\nlet instrumentationInitialized;\n/**\n * A custom browser tracing integration for Angular.\n *\n * Use this integration in combination with `TraceService`\n */\nfunction browserTracingIntegration(options = {}) {\n // If the user opts out to set this up, we just don't initialize this.\n // That way, the TraceService will not actually do anything, functionally disabling this.\n if (options.instrumentNavigation !== false) {\n instrumentationInitialized = true;\n }\n return browserTracingIntegration$1({\n ...options,\n instrumentNavigation: false,\n });\n}\n/**\n * This function is extracted to make unit testing easier.\n */\nfunction _updateSpanAttributesForParametrizedUrl(route, span) {\n const attributes = (span && spanToJSON(span).data) || {};\n if (span && attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] === 'url') {\n span.updateName(route);\n span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'route');\n span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, `auto.${spanToJSON(span).op}.angular`);\n }\n}\n/**\n * Angular's Service responsible for hooking into Angular Router and tracking current navigation process.\n * Creates a new transaction for every route change and measures a duration of routing process.\n */\nclass TraceService {\n constructor(_router) {\n this._router = _router;\n this.navStart$ = this._router.events.pipe(filter((event) => event instanceof NavigationStart), tap(navigationEvent => {\n if (!instrumentationInitialized) {\n IS_DEBUG_BUILD &&\n logger.error('Angular integration has tracing enabled, but Tracing integration is not configured');\n return;\n }\n if (this._routingSpan) {\n this._routingSpan.end();\n this._routingSpan = null;\n }\n const client = getClient();\n const strippedUrl = stripUrlQueryAndFragment(navigationEvent.url);\n if (client) {\n // see comment in `_isPageloadOngoing` for rationale\n if (!this._isPageloadOngoing()) {\n runOutsideAngular(() => {\n startBrowserTracingNavigationSpan(client, {\n name: strippedUrl,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.navigation.angular',\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',\n },\n });\n });\n }\n else {\n // The first time we end up here, we set the pageload flag to false\n // Subsequent navigations are going to get their own navigation root span\n // even if the pageload root span is still ongoing.\n this._pageloadOngoing = false;\n }\n this._routingSpan =\n runOutsideAngular(() => startInactiveSpan({\n name: `${navigationEvent.url}`,\n op: ANGULAR_ROUTING_OP,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.angular',\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',\n url: strippedUrl,\n ...(navigationEvent.navigationTrigger && {\n navigationTrigger: navigationEvent.navigationTrigger,\n }),\n },\n })) || null;\n return;\n }\n }));\n // The ResolveEnd event is fired when the Angular router has resolved the URL and\n // the parameter<->value mapping. It holds the new resolved router state with\n // the mapping and the new URL.\n // Only After this event, the route is activated, meaning that the transaction\n // can be updated with the parameterized route name before e.g. the route's root\n // component is initialized. This should be early enough before outgoing requests\n // are made from the new route, with the exceptions of requests being made during\n // a navigation.\n this.resEnd$ = this._router.events.pipe(filter((event) => event instanceof ResolveEnd), tap(event => {\n const route = getParameterizedRouteFromSnapshot(event.state.root);\n if (route) {\n getCurrentScope().setTransactionName(route);\n }\n const activeSpan = getActiveSpan();\n const rootSpan = activeSpan && getRootSpan(activeSpan);\n _updateSpanAttributesForParametrizedUrl(route, rootSpan);\n }));\n this.navEnd$ = this._router.events.pipe(filter(event => event instanceof NavigationEnd || event instanceof NavigationCancel || event instanceof NavigationError), tap(() => {\n if (this._routingSpan) {\n runOutsideAngular(() => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this._routingSpan.end();\n });\n this._routingSpan = null;\n }\n }));\n this._routingSpan = null;\n this._pageloadOngoing = true;\n this._subscription = new Subscription();\n this._subscription.add(this.navStart$.subscribe());\n this._subscription.add(this.resEnd$.subscribe());\n this._subscription.add(this.navEnd$.subscribe());\n }\n /**\n * This is used to prevent memory leaks when the root view is created and destroyed multiple times,\n * since `subscribe` callbacks capture `this` and prevent many resources from being GC'd.\n */\n ngOnDestroy() {\n this._subscription.unsubscribe();\n }\n /**\n * We only _avoid_ creating a navigation root span in one case:\n *\n * There is an ongoing pageload span AND the router didn't yet emit the first navigation start event\n *\n * The first navigation start event will create the child routing span\n * and update the pageload root span name on ResolveEnd.\n *\n * There's an edge case we need to avoid here: If the router fires the first navigation start event\n * _after_ the pageload root span finished. This is why we check for the pageload root span.\n * Possible real-world scenario: Angular application and/or router is bootstrapped after the pageload\n * idle root span finished\n *\n * The overall rationale is:\n * - if we already avoided creating a navigation root span once, we don't avoid it again\n * (i.e. set `_pageloadOngoing` to `false`)\n * - if `_pageloadOngoing` is already `false`, create a navigation root span\n * - if there's no active/pageload root span, create a navigation root span\n * - only if there's an ongoing pageload root span AND `_pageloadOngoing` is still `true,\n * don't create a navigation root span\n */\n _isPageloadOngoing() {\n if (!this._pageloadOngoing) {\n // pageload is already finished, no need to update\n return false;\n }\n const activeSpan = getActiveSpan();\n if (!activeSpan) {\n this._pageloadOngoing = false;\n return false;\n }\n const rootSpan = getRootSpan(activeSpan);\n this._pageloadOngoing = spanToJSON(rootSpan).op === 'pageload';\n return this._pageloadOngoing;\n }\n}\nTraceService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.3.0\", ngImport: i0, type: TraceService, deps: [{ token: i1.Router }], target: i0.ɵɵFactoryTarget.Injectable });\nTraceService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.3.0\", ngImport: i0, type: TraceService, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.3.0\", ngImport: i0, type: TraceService, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: i1.Router }]; } });\n/**\n * Captures the initialization lifecycle of the component this directive is applied to.\n * Specifically, this directive measures the time between `ngOnInit` and `ngAfterViewInit`\n * of the component.\n *\n * Falls back to the component's selector if no name is provided.\n *\n * @example\n * ```html\n * <app-my-component trace=\"myComponent\"></app-my-component>\n * ```\n */\nclass TraceDirective {\n constructor(_host) {\n this._host = _host;\n }\n /**\n * Implementation of OnInit lifecycle method\n * @inheritdoc\n */\n ngOnInit() {\n if (!this.componentName) {\n // Technically, the `trace` binding should always be provided.\n // However, if it is incorrectly declared on the element without a\n // value (e.g., `<app-component trace />`), we fall back to using `tagName`\n // (which is e.g. `APP-COMPONENT`).\n this.componentName = this._host.nativeElement.tagName.toLowerCase();\n }\n if (getActiveSpan()) {\n this._tracingSpan = runOutsideAngular(() => startInactiveSpan({\n name: `<${this.componentName}>`,\n op: ANGULAR_INIT_OP,\n attributes: { [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.angular.trace_directive' },\n }));\n }\n }\n /**\n * Implementation of AfterViewInit lifecycle method\n * @inheritdoc\n */\n ngAfterViewInit() {\n const span = this._tracingSpan;\n if (span) {\n runOutsideAngular(() => span.end());\n }\n }\n}\nTraceDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.3.0\", ngImport: i0, type: TraceDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nTraceDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.3.0\", type: TraceDirective, selector: \"[trace]\", inputs: { componentName: [\"trace\", \"componentName\"] }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.3.0\", ngImport: i0, type: TraceDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[trace]' }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { componentName: [{\n type: Input,\n args: ['trace']\n }] } });\n/**\n * A module serves as a single compilation unit for the `TraceDirective` and can be re-used by any other module.\n */\nclass TraceModule {\n}\nTraceModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.3.0\", ngImport: i0, type: TraceModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nTraceModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.3.0\", ngImport: i0, type: TraceModule, declarations: [TraceDirective], exports: [TraceDirective] });\nTraceModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.3.0\", ngImport: i0, type: TraceModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.3.0\", ngImport: i0, type: TraceModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [TraceDirective],\n exports: [TraceDirective],\n }]\n }] });\n/**\n * Decorator function that can be used to capture initialization lifecycle of the whole component.\n */\nfunction TraceClass(options) {\n let tracingSpan;\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n return target => {\n const originalOnInit = target.prototype.ngOnInit;\n target.prototype.ngOnInit = function (...args) {\n tracingSpan = runOutsideAngular(() => startInactiveSpan({\n onlyIfParent: true,\n name: `<${options && options.name ? options.name : 'unnamed'}>`,\n op: ANGULAR_INIT_OP,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.angular.trace_class_decorator',\n },\n }));\n if (originalOnInit) {\n return originalOnInit.apply(this, args);\n }\n };\n const originalAfterViewInit = target.prototype.ngAfterViewInit;\n target.prototype.ngAfterViewInit = function (...args) {\n if (tracingSpan) {\n runOutsideAngular(() => tracingSpan.end());\n }\n if (originalAfterViewInit) {\n return originalAfterViewInit.apply(this, args);\n }\n };\n };\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n}\n/**\n * Decorator function that can be used to capture a single lifecycle methods of the component.\n */\nfunction TraceMethod(options) {\n return (_target, propertyKey, descriptor) => {\n const originalMethod = descriptor.value;\n descriptor.value = function (...args) {\n const now = timestampInSeconds();\n runOutsideAngular(() => {\n startInactiveSpan({\n onlyIfParent: true,\n name: `<${options && options.name ? options.name : 'unnamed'}>`,\n op: `${ANGULAR_OP}.${String(propertyKey)}`,\n startTime: now,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.angular.trace_method_decorator',\n },\n }).end(now);\n });\n if (originalMethod) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return originalMethod.apply(this, args);\n }\n };\n return descriptor;\n };\n}\n/**\n * Takes the parameterized route from a given ActivatedRouteSnapshot and concatenates the snapshot's\n * child route with its parent to produce the complete parameterized URL of the activated route.\n * This happens recursively until the last child (i.e. the end of the URL) is reached.\n *\n * @param route the ActivatedRouteSnapshot of which its path and its child's path is concatenated\n *\n * @returns the concatenated parameterized route string\n */\nfunction getParameterizedRouteFromSnapshot(route) {\n const parts = [];\n let currentRoute = route && route.firstChild;\n while (currentRoute) {\n const path = currentRoute && currentRoute.routeConfig && currentRoute.routeConfig.path;\n if (path === null || path === undefined) {\n break;\n }\n parts.push(path);\n currentRoute = currentRoute.firstChild;\n }\n const fullPath = parts.filter(part => part).join('/');\n return fullPath ? `/${fullPath}/` : '/';\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { SentryErrorHandler, TraceClass, TraceDirective, TraceMethod, TraceModule, TraceService, browserTracingIntegration, createErrorHandler, getDefaultIntegrations, init };\n","import * as i0 from '@angular/core';\nimport { PLATFORM_ID, Injectable, Inject } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\n\n/**\r\n * Created by ahsanayaz on 08/11/2016.\r\n */\r\nconst GENERAL = {\r\n UKNOWN: 'Unknown',\r\n};\r\nconst BROWSERS = {\r\n CHROME: 'Chrome',\r\n FIREFOX: 'Firefox',\r\n SAFARI: 'Safari',\r\n OPERA: 'Opera',\r\n IE: 'IE',\r\n MS_EDGE: 'MS-Edge',\r\n MS_EDGE_CHROMIUM: 'MS-Edge-Chromium',\r\n FB_MESSANGER: 'FB-Messanger',\r\n SAMSUNG: 'Samsung',\r\n UCBROWSER: 'UC-Browser',\r\n UNKNOWN: GENERAL.UKNOWN,\r\n};\r\nconst MOBILES_RE = {\r\n // tslint:disable-next-line:max-line-length\r\n HTC: /HTC|HTC.*(Sensation|Evo|Vision|Explorer|6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT|HD_mini|Sensation.*Z710e|PG86100|Z715e|Desire.*(A8181|HD)|ADR6200|ADR6400L|ADR6425|001HT|Inspire 4G|Android.*\\bEVO\\b|T-Mobile G1|Z520m|Android [0-9.]+; Pixel/,\r\n NEXUS_PHONE: /Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile|Nexus 4|Nexus 5|Nexus 6/,\r\n DELL: /Dell[;]? (Streak|Aero|Venue|Venue Pro|Flash|Smoke|Mini 3iX)|XCD28|XCD35|\\b001DL\\b|\\b101DL\\b|\\bGS01\\b/,\r\n MOTOROLA: new RegExp(`Motorola|DROIDX|DROID BIONIC|\\\\bDroid\\\\b.*Build|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|\n A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|\n MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|\n ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|\n WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|\n XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT901|XT907|XT909|\n XT910|XT912|XT928|XT926|XT915|XT919|XT925|XT1021|\\\\bMoto E\\\\b|XT1068|XT1092|XT1052`),\r\n SAMSUNG: new RegExp(`\\\\bSamsung\\\\b|SM-G950F|SM-G955F|SM-G9250|GT-19300|SGH-I337|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|\n GT-B3210|GT-B3310|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|\n GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|\n GT-C3262|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|\n GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|\n GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|\n GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|\n GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|\n GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|\n GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8190|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|\n GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9082|GT-I9100|GT-I9103|\n GT-I9220|GT-I9250|GT-I9300|GT-I9305|GT-I9500|GT-I9505|GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|\n GT-M8800|GT-M8910|GT-N7000|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|\n GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|\n GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|\n GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|\n GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S7562|\n GT-S7710|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|\n SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|\n SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|\n SCH-I910|SCH-I920|SCH-I959|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|\n SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|\n SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|\n SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|\n SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|\n SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|\n SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|\n SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|\n SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|\n SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|\n SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|\n SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-i747M|SGH-I777|\n SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|\n SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|\n SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|\n SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|\n SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|\n SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|\n SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|\n SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|\n SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|\n SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|\n SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|\n SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|\n SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|\n SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|\n SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|\n SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|\n SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100|SCH-i909|GT-N7100|\n GT-N7105|SCH-I535|SM-N900A|SM-N900T|SGH-I317|SGH-T999L|GT-S5360B|GT-I8262|GT-S6802|GT-S6312|GT-S6310|GT-S5312|\n GT-S5310|GT-I9105|GT-I8510|GT-S6790N|SM-G7105|SM-N9005|GT-S5301|GT-I9295|GT-I9195|SM-C101|GT-S7392|GT-S7560|\n GT-B7610|GT-I5510|GT-S7582|GT-S7530E|GT-I8750|SM-G9006V|SM-G9008V|SM-G9009D|SM-G900A|SM-G900D|SM-G900F|\n SM-G900H|SM-G900I|SM-G900J|SM-G900K|SM-G900L|SM-G900M|SM-G900P|SM-G900R4|SM-G900S|SM-G900T|SM-G900V|\n SM-G900W8|SHV-E160K|SCH-P709|SCH-P729|SM-T2558|GT-I9205|SM-G9350|SM-J120F|SM-G920F|SM-G920V|SM-G930F|\n SM-N910C|SM-A310F|GT-I9190|SM-J500FN|SM-G903F|SM-J330F`),\r\n LG: new RegExp(`\\\\bLG\\\\b;|LG[- ]?(C800|C900|E400|E610|E900|E-900|F160|F180K|F180L|F180S|730|855|L160|LS740|LS840|LS970|\n LU6200|MS690|MS695|MS770|MS840|MS870|MS910|P500|P700|P705|VM696|AS680|AS695|AX840|C729|E970|GS505|272|\n C395|E739BK|E960|L55C|L75C|LS696|LS860|P769BK|P350|P500|P509|P870|UN272|US730|VS840|VS950|LN272|LN510|\n LS670|LS855|LW690|MN270|MN510|P509|P769|P930|UN200|UN270|UN510|UN610|US670|US740|US760|UX265|UX840|VN271|\n VN530|VS660|VS700|VS740|VS750|VS910|VS920|VS930|VX9200|VX11000|AX840A|LW770|P506|P925|P999|E612|D955|D802|\n MS323|M257)`),\r\n SONY: /SonyST|SonyLT|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i|LT28h|LT26w|SonyEricssonMT27i|C5303|C6902|C6903|C6906|C6943|D2533/,\r\n ASUS: /Asus.*Galaxy|PadFone.*Mobile/,\r\n NOKIA_LUMIA: /Lumia [0-9]{3,4}/,\r\n MICROMAX: /Micromax.*\\b(A210|A92|A88|A72|A111|A110Q|A115|A116|A110|A90S|A26|A51|A35|A54|A25|A27|A89|A68|A65|A57|A90)\\b/,\r\n PALM: /PalmSource|Palm/,\r\n VERTU: /Vertu|Vertu.*Ltd|Vertu.*Ascent|Vertu.*Ayxta|Vertu.*Constellation(F|Quest)?|Vertu.*Monika|Vertu.*Signature/,\r\n PANTECH: new RegExp(`PANTECH|IM-A850S|IM-A840S|IM-A830L|IM-A830K|IM-A830S|IM-A820L|IM-A810K|IM-A810S|IM-A800S|IM-T100K|\n IM-A725L|IM-A780L|IM-A775C|IM-A770K|IM-A760S|IM-A750K|IM-A740S|IM-A730S|IM-A720L|IM-A710K|IM-A690L|\n IM-A690S|IM-A650S|IM-A630K|IM-A600S|VEGA PTL21|PT003|P8010|ADR910L|P6030|P6020|P9070|P4100|P9060|P5000|\n CDM8992|TXT8045|ADR8995|IS11PT|P2030|P6010|P8000|PT002|IS06|CDM8999|P9050|PT001|TXT8040|P2020|P9020|\n P2000|P7040|P7000|C790`),\r\n FLY: /IQ230|IQ444|IQ450|IQ440|IQ442|IQ441|IQ245|IQ256|IQ236|IQ255|IQ235|IQ245|IQ275|IQ240|IQ285|IQ280|IQ270|IQ260|IQ250/,\r\n WIKO: new RegExp(`KITE 4G|HIGHWAY|GETAWAY|STAIRWAY|DARKSIDE|DARKFULL|DARKNIGHT|DARKMOON|SLIDE|WAX 4G|RAINBOW|BLOOM|\n SUNSET|GOA(?!nna)|LENNY|BARRY|IGGY|OZZY|CINK FIVE|CINK PEAX|CINK PEAX 2|CINK SLIM|CINK SLIM 2|CINK +|\n CINK KING|CINK PEAX|CINK SLIM|SUBLIM`),\r\n I_MOBILE: /i-mobile (IQ|i-STYLE|idea|ZAA|Hitz)/,\r\n SIMVALLEY: /\\b(SP-80|XT-930|SX-340|XT-930|SX-310|SP-360|SP60|SPT-800|SP-120|SPT-800|SP-140|SPX-5|SPX-8|SP-100|SPX-8|SPX-12)\\b/,\r\n WOLFGANG: /AT-B24D|AT-AS50HD|AT-AS40W|AT-AS55HD|AT-AS45q2|AT-B26D|AT-AS50Q/,\r\n ALCATEL: /Alcatel|Mobile; rv:49.0|Mobile; ALCATEL 4052R; rv:48.0/,\r\n NINTENDO: /Nintendo (3DS|Switch)/,\r\n AMOI: /Amoi/,\r\n INQ: /INQ/,\r\n VITA: /\\bVita\\b/,\r\n BLACKBERRY: /\\bBlackBerry\\b|\\bBB10\\b|rim[0-9]+/,\r\n FIREFOX_OS: /\\bFirefox-OS\\b/,\r\n IPHONE: /\\biPhone\\b/,\r\n iPod: /\\biPod\\b/,\r\n ANDROID: /\\bAndroid\\b/,\r\n WINDOWS_PHONE: /\\bWindows-Phone\\b/,\r\n GENERIC_PHONE: new RegExp(`Tapatalk|PDA;|SAGEM|\\\\bmmp\\\\b|pocket|\\\\bpsp\\\\b|symbian|Smartphone|smartfon|treo|up.browser|\n up.link|vodafone|\\\\bwap\\\\b|nokia|Nokia|Series40|Series60|S60|SonyEricsson|N900|MAUI.*WAP.*Browser`),\r\n};\r\nconst TABLETS_RE = {\r\n iPad: /iPad|iPad.*Mobile/,\r\n NexusTablet: /Android.*Nexus[\\s]+(7|9|10)/,\r\n GoogleTablet: /Android.*Pixel C/,\r\n SamsungTablet: new RegExp(`SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1003|GT-P1010|GT-P3105|GT-P6210|\n GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|\n SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3108|GT-P3110|GT-P5100|\n GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|\n SCH-I915|GT-N8013|GT-P3113|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|\n GT-P7501|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|\n SHV-E230S|SHW-M180K|SHW-M180L|SM-T865|SM-T290|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|\n SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|\n GT-I9200|GT-P5200|GT-P5210|GT-P5210X|SM-T385M|SM-P585M|SM-T311|SM-T310|SM-T310X|SM-T210|SM-T210R|SM-T211|SM-P600|\n SM-P601|SM-P605|SM-P615|SM-P900|SM-P901|SM-T217|SM-T217A|SM-T217S|SM-P6000|SM-T3100|SGH-I467|XE500|SM-T110|\n GT-P5220|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|SM-T111|SM-T2105|SM-T315|SM-T320|SM-T320X|SM-T321|\n SM-T510|SM-T520|SM-T525|SM-T530NU|SM-T230NU|SM-T330NU|SM-T900|XE500T1C|SM-P605V|SM-P905V|SM-T337V|SM-T537V|\n SM-T707V|SM-T807V|SM-P600X|SM-P900X|SM-T210X|SM-T230|SM-T230X|SM-T325|GT-P7503|SM-T531|SM-T500|SM-T330|\n SM-T530|SM-T705|SM-T705C|SM-T535|SM-T331|SM-T800|SM-T700|SM-T537|SM-T807|SM-P907A|SM-T337A|SM-T537A|\n SM-T707A|SM-T807A|SM-T237|SM-T807P|SM-P607T|SM-T217T|SM-T337T|SM-T807T|SM-T116NQ|SM-T116BU|SM-P550|\n SM-T350|SM-T550|SM-T9000|SM-P9000|SM-T705Y|SM-T805|GT-P3113|SM-T710|SM-T810|SM-T815|SM-T360|SM-T533|\n SM-T113|SM-T335|SM-T715|SM-T560|SM-T670|SM-T677|SM-T377|SM-T567|SM-T357T|SM-T555|SM-T561|SM-T713|\n SM-T719|SM-T725|SM-T813|SM-T819|SM-T580|SM-T590|SM-T355Y?|SM-T280|SM-T817A|SM-T820|SM-W700|SM-P580|SM-T587|SM-P350|\n SM-P555M|SM-P355M|SM-T113NU|SM-T815Y|SM-T585|SM-T285|SM-T825|SM-W708|SM-T835|SM-P585Y|SM-X200`),\r\n Kindle: new RegExp(`Kindle|Silk.*Accelerated|Android.*\\\\b(KFOT|KFTT|KFJWI|KFJWA|KFOTE|KFSOWI|KFTHWI|KFTHWA|KFAPWI|\n KFAPWA|WFJWAE|KFSAWA|KFSAWI|KFASWI|KFARWI|KFFOWI|KFGIWI|KFMEWI)\\\\b|Android.*Silk\\/[0-9.]+ like Chrome\\\n /[0-9.]+ (?!Mobile)`),\r\n SurfaceTablet: /Windows NT [0-9.]+; ARM;.*(Tablet|ARMBJS)/,\r\n HPTablet: /HP Slate (7|8|10)|HP ElitePad 900|hp-tablet|EliteBook.*Touch|HP 8|Slate 21|HP SlateBook 10/,\r\n AsusTablet: new RegExp(`^.*PadFone((?!Mobile).)*$|Transformer|TF101|TF101G|TF300T|TF300TG|TF300TL|TF700T|TF700KL|\n TF701T|TF810C|ME171|ME301T|ME302C|ME371MG|ME370T|ME372MG|ME172V|ME173X|ME400C|\n Slider SL101|\\\\bK00F\\\\b|\\\\bK00C\\\\b|\\\\bK00E\\\\b|\\\\bK00L\\\\b|TX201LA|ME176C|ME102A|\\\\bM80TA\\\\b|ME372CL|\n ME560CG|ME372CG|ME302KL| K010 | K011 | K017 | K01E |ME572C|ME103K|ME170C|ME171C|\\\\bME70C\\\\b|ME581C|\n ME581CL|ME8510C|ME181C|P01Y|PO1MA|P01Z|\\\\bP027\\\\b|\\\\bP024\\\\b|\\\\bP00C\\\\b`),\r\n BlackBerryTablet: /PlayBook|RIM Tablet/,\r\n HTCtablet: /HTC_Flyer_P512|HTC Flyer|HTC Jetstream|HTC-P715a|HTC EVO View 4G|PG41200|PG09410/,\r\n MotorolaTablet: /xoom|sholest|MZ615|MZ605|MZ505|MZ601|MZ602|MZ603|MZ604|MZ606|MZ607|MZ608|MZ609|MZ615|MZ616|MZ617/,\r\n NookTablet: /Android.*Nook|NookColor|nook browser|BNRV200|BNRV200A|BNTV250|BNTV250A|BNTV400|BNTV600|LogicPD Zoom2/,\r\n AcerTablet: new RegExp(`Android.*; \\\\b(A100|A101|A110|A200|A210|A211|A500|A501|A510|A511|A700|A701|W500|W500P|W501|\n W501P|W510|W511|W700|G100|G100W|B1-A71|B1-710|B1-711|A1-810|A1-811|A1-830)\\\\b|W3-810|\\\\bA3-A10\\\\b|\\\\bA3-A11\\\\b|\n \\\\bA3-A20\\\\b|\\\\bA3-A30`),\r\n ToshibaTablet: /Android.*(AT100|AT105|AT200|AT205|AT270|AT275|AT300|AT305|AT1S5|AT500|AT570|AT700|AT830)|TOSHIBA.*FOLIO/,\r\n LGTablet: /\\bL-06C|LG-V909|LG-V900|LG-V700|LG-V510|LG-V500|LG-V410|LG-V400|LG-VK810\\b/,\r\n FujitsuTablet: /Android.*\\b(F-01D|F-02F|F-05E|F-10D|M532|Q572)\\b/,\r\n PrestigioTablet: new RegExp(`PMP3170B|PMP3270B|PMP3470B|PMP7170B|PMP3370B|PMP3570C|PMP5870C|PMP3670B|PMP5570C|\n PMP5770D|PMP3970B|PMP3870C|PMP5580C|PMP5880D|PMP5780D|PMP5588C|PMP7280C|PMP7280C3G|PMP7280|PMP7880D|\n PMP5597D|PMP5597|PMP7100D|PER3464|PER3274|PER3574|PER3884|PER5274|PER5474|PMP5097CPRO|PMP5097|PMP7380D|\n PMP5297C|PMP5297C_QUAD|PMP812E|PMP812E3G|PMP812F|PMP810E|PMP880TD|PMT3017|PMT3037|PMT3047|PMT3057|PMT7008|\n PMT5887|PMT5001|PMT5002`),\r\n LenovoTablet: new RegExp(`Lenovo TAB|Idea(Tab|Pad)( A1|A10| K1|)|ThinkPad([ ]+)?Tablet|YT3-850M|YT3-X90L|YT3-X90F|\n YT3-X90X|Lenovo.*(S2109|S2110|S5000|S6000|K3011|A3000|A3500|A1000|A2107|A2109|A1107|A5500|A7600|B6000|\n B8000|B8080)(-|)(FL|F|HV|H|)|TB-X606F|TB-X103F|TB-X304F|TB-X304L|TB-X704F|TB-8703F|Tab2A7-10F|TB2-X30L|TB-8504F`),\r\n DellTablet: /Venue 11|Venue 8|Venue 7|Dell Streak 10|Dell Streak 7/,\r\n YarvikTablet: new RegExp(`Android.*\\\\b(TAB210|TAB211|TAB224|TAB250|TAB260|TAB264|TAB310|TAB360|TAB364|TAB410|TAB411|\n TAB420|TAB424|TAB450|TAB460|TAB461|TAB464|TAB465|TAB467|TAB468|TAB07-100|TAB07-101|TAB07-150|TAB07-151|\n TAB07-152|TAB07-200|TAB07-201-3G|TAB07-210|TAB07-211|TAB07-212|TAB07-214|TAB07-220|TAB07-400|TAB07-485|\n TAB08-150|TAB08-200|TAB08-201-3G|TAB08-201-30|TAB09-100|TAB09-211|TAB09-410|TAB10-150|TAB10-201|TAB10-211|\n TAB10-400|TAB10-410|TAB13-201|TAB274EUK|TAB275EUK|TAB374EUK|TAB462EUK|TAB474EUK|TAB9-200)\\\\b`),\r\n MedionTablet: /Android.*\\bOYO\\b|LIFE.*(P9212|P9514|P9516|S9512)|LIFETAB/,\r\n ArnovaTablet: /97G4|AN10G2|AN7bG3|AN7fG3|AN8G3|AN8cG3|AN7G3|AN9G3|AN7dG3|AN7dG3ST|AN7dG3ChildPad|AN10bG3|AN10bG3DT|AN9G2/,\r\n IntensoTablet: /INM8002KP|INM1010FP|INM805ND|Intenso Tab|TAB1004/,\r\n IRUTablet: /M702pro/,\r\n MegafonTablet: /MegaFon V9|\\bZTE V9\\b|Android.*\\bMT7A\\b/,\r\n EbodaTablet: /E-Boda (Supreme|Impresspeed|Izzycomm|Essential)/,\r\n AllViewTablet: /Allview.*(Viva|Alldro|City|Speed|All TV|Frenzy|Quasar|Shine|TX1|AX1|AX2)/,\r\n ArchosTablet: new RegExp(`\\\\b(101G9|80G9|A101IT)\\\\b|Qilive 97R|Archos5|\\\\bARCHOS (70|79|80|90|97|101|FAMILYPAD|)(b|c|)(G10|\n Cobalt| TITANIUM(HD|)| Xenon| Neon|XSK| 2| XS 2| PLATINUM| CARBON|GAMEPAD)\\\\b`),\r\n AinolTablet: /NOVO7|NOVO8|NOVO10|Novo7Aurora|Novo7Basic|NOVO7PALADIN|novo9-Spark/,\r\n NokiaLumiaTablet: /Lumia 2520/,\r\n SonyTablet: new RegExp(`Sony.*Tablet|Xperia Tablet|Sony Tablet S|SO-03E|SGPT12|SGPT13|SGPT114|SGPT121|SGPT122|SGPT123|\n SGPT111|SGPT112|SGPT113|SGPT131|SGPT132|SGPT133|SGPT211|SGPT212|SGPT213|SGP311|SGP312|SGP321|EBRD1101|\n EBRD1102|EBRD1201|SGP351|SGP341|SGP511|SGP512|SGP521|SGP541|SGP551|SGP621|SGP641|SGP612|SOT31|SGP771|SGP611|\n SGP612|SGP712`),\r\n PhilipsTablet: /\\b(PI2010|PI3000|PI3100|PI3105|PI3110|PI3205|PI3210|PI3900|PI4010|PI7000|PI7100)\\b/,\r\n CubeTablet: /Android.*(K8GT|U9GT|U10GT|U16GT|U17GT|U18GT|U19GT|U20GT|U23GT|U30GT)|CUBE U8GT/,\r\n CobyTablet: new RegExp(`MID1042|MID1045|MID1125|MID1126|MID7012|MID7014|MID7015|MID7034|MID7035|MID7036|MID7042|MID7048|\n MID7127|MID8042|MID8048|MID8127|MID9042|MID9740|MID9742|MID7022|MID7010`),\r\n MIDTablet: new RegExp(`M9701|M9000|M9100|M806|M1052|M806|T703|MID701|MID713|MID710|MID727|MID760|MID830|MID728|MID933|\n MID125|MID810|MID732|MID120|MID930|MID800|MID731|MID900|MID100|MID820|MID735|MID980|MID130|MID833|MID737|\n MID960|MID135|MID860|MID736|MID140|MID930|MID835|MID733|MID4X10`),\r\n MSITablet: new RegExp(`MSI \\\\b(Primo 73K|Primo 73L|Primo 81L|Primo 77|Primo 93|Primo 75|Primo 76|Primo 73|Primo 81|\n Primo 91|Primo 90|Enjoy 71|Enjoy 7|Enjoy 10)\\\\b`),\r\n SMiTTablet: /Android.*(\\bMID\\b|MID-560|MTV-T1200|MTV-PND531|MTV-P1101|MTV-PND530)/,\r\n RockChipTablet: /Android.*(RK2818|RK2808A|RK2918|RK3066)|RK2738|RK2808A/,\r\n FlyTablet: /IQ310|Fly Vision/,\r\n bqTablet: new RegExp(`Android.*(bq)?.*(Elcano|Curie|Edison|Maxwell|Kepler|Pascal|Tesla|Hypatia|Platon|Newton|\n Livingstone|Cervantes|Avant|Aquaris ([E|M]10|M8))|Maxwell.*Lite|Maxwell.*Plus`),\r\n HuaweiTablet: new RegExp(`MediaPad|MediaPad 7 Youth|MediaPad T3 10|IDEOS S7|S7-201c|S7-202u|S7-101|S7-103|S7-104|S7-105|S7-106|\n S7-201|S7-Slim|M2-A01L|BAH-L09|BAH-W09|AGS-W09`),\r\n NecTablet: /\\bN-06D|\\bN-08D/,\r\n PantechTablet: /Pantech.*P4100/,\r\n BronchoTablet: /Broncho.*(N701|N708|N802|a710)/,\r\n VersusTablet: /TOUCHPAD.*[78910]|\\bTOUCHTAB\\b/,\r\n ZyncTablet: /z1000|Z99 2G|z99|z930|z999|z990|z909|Z919|z900/,\r\n PositivoTablet: /TB07STA|TB10STA|TB07FTA|TB10FTA/,\r\n NabiTablet: /Android.*\\bNabi/,\r\n KoboTablet: /Kobo Touch|\\bK080\\b|\\bVox\\b Build|\\bArc\\b Build/,\r\n DanewTablet: /DSlide.*\\b(700|701R|702|703R|704|802|970|971|972|973|974|1010|1012)\\b/,\r\n TexetTablet: new RegExp(`NaviPad|TB-772A|TM-7045|TM-7055|TM-9750|TM-7016|TM-7024|TM-7026|TM-7041|TM-7043|TM-7047|\n TM-8041|TM-9741|TM-9747|TM-9748|TM-9751|TM-7022|TM-7021|TM-7020|TM-7011|TM-7010|TM-7023|TM-7025|\n TM-7037W|TM-7038W|TM-7027W|TM-9720|TM-9725|TM-9737W|TM-1020|TM-9738W|TM-9740|TM-9743W|TB-807A|TB-771A|\n TB-727A|TB-725A|TB-719A|TB-823A|TB-805A|TB-723A|TB-715A|TB-707A|TB-705A|TB-709A|TB-711A|TB-890HD|\n TB-880HD|TB-790HD|TB-780HD|TB-770HD|TB-721HD|TB-710HD|TB-434HD|TB-860HD|TB-840HD|TB-760HD|TB-750HD|\n TB-740HD|TB-730HD|TB-722HD|TB-720HD|TB-700HD|TB-500HD|TB-470HD|TB-431HD|TB-430HD|TB-506|TB-504|TB-446|\n TB-436|TB-416|TB-146SE|TB-126SE`),\r\n PlaystationTablet: /Playstation.*(Portable|Vita)/,\r\n TrekstorTablet: /ST10416-1|VT10416-1|ST70408-1|ST702xx-1|ST702xx-2|ST80208|ST97216|ST70104-2|VT10416-2|ST10216-2A|SurfTab/,\r\n PyleAudioTablet: /\\b(PTBL10CEU|PTBL10C|PTBL72BC|PTBL72BCEU|PTBL7CEU|PTBL7C|PTBL92BC|PTBL92BCEU|PTBL9CEU|PTBL9CUK|PTBL9C)\\b/,\r\n AdvanTablet: new RegExp(`Android.* \\\\b(E3A|T3X|T5C|T5B|T3E|T3C|T3B|T1J|T1F|T2A|T1H|T1i|E1C|T1-E|T5-A|T4|E1-B|T2Ci|\n T1-B|T1-D|O1-A|E1-A|T1-A|T3A|T4i)\\\\b`),\r\n DanyTechTablet: `Genius Tab G3|Genius Tab S2|Genius Tab Q3|Genius Tab G4|Genius Tab Q4|Genius Tab G-II|\n Genius TAB GII|Genius TAB GIII|Genius Tab S1`,\r\n GalapadTablet: /Android.*\\bG1\\b(?!\\))/,\r\n MicromaxTablet: /Funbook|Micromax.*\\b(P250|P560|P360|P362|P600|P300|P350|P500|P275)\\b/,\r\n KarbonnTablet: /Android.*\\b(A39|A37|A34|ST8|ST10|ST7|Smart Tab3|Smart Tab2)\\b/,\r\n AllFineTablet: /Fine7 Genius|Fine7 Shine|Fine7 Air|Fine8 Style|Fine9 More|Fine10 Joy|Fine11 Wide/,\r\n PROSCANTablet: new RegExp(`\\\\b(PEM63|PLT1023G|PLT1041|PLT1044|PLT1044G|PLT1091|PLT4311|PLT4311PL|PLT4315|PLT7030|\n PLT7033|PLT7033D|PLT7035|PLT7035D|PLT7044K|PLT7045K|PLT7045KB|PLT7071KG|PLT7072|PLT7223G|PLT7225G|\n PLT7777G|PLT7810K|PLT7849G|PLT7851G|PLT7852G|PLT8015|PLT8031|PLT8034|PLT8036|PLT8080K|PLT8082|PLT8088|\n PLT8223G|PLT8234G|PLT8235G|PLT8816K|PLT9011|PLT9045K|PLT9233G|PLT9735|PLT9760G|PLT9770G)\\\\b`),\r\n YONESTablet: /BQ1078|BC1003|BC1077|RK9702|BC9730|BC9001|IT9001|BC7008|BC7010|BC708|BC728|BC7012|BC7030|BC7027|BC7026/,\r\n ChangJiaTablet: new RegExp(`TPC7102|TPC7103|TPC7105|TPC7106|TPC7107|TPC7201|TPC7203|TPC7205|TPC7210|TPC7708|TPC7709|\n TPC7712|TPC7110|TPC8101|TPC8103|TPC8105|TPC8106|TPC8203|TPC8205|TPC8503|TPC9106|TPC9701|TPC97101|TPC97103|\n TPC97105|TPC97106|TPC97111|TPC97113|TPC97203|TPC97603|TPC97809|TPC97205|TPC10101|TPC10103|TPC10106|\n TPC10111|TPC10203|TPC10205|TPC10503`),\r\n GUTablet: /TX-A1301|TX-M9002|Q702|kf026/,\r\n PointOfViewTablet: new RegExp(`TAB-P506|TAB-navi-7-3G-M|TAB-P517|TAB-P-527|TAB-P701|TAB-P703|TAB-P721|TAB-P731N|\n TAB-P741|TAB-P825|TAB-P905|TAB-P925|TAB-PR945|TAB-PL1015|TAB-P1025|TAB-PI1045|TAB-P1325|TAB-PROTAB[0-9]+|\n TAB-PROTAB25|TAB-PROTAB26|TAB-PROTAB27|TAB-PROTAB26XL|TAB-PROTAB2-IPS9|TAB-PROTAB30-IPS9|TAB-PROTAB25XXL|\n TAB-PROTAB26-IPS10|TAB-PROTAB30-IPS10`),\r\n OvermaxTablet: new RegExp(`OV-(SteelCore|NewBase|Basecore|Baseone|Exellen|Quattor|EduTab|Solution|ACTION|BasicTab|TeddyTab|\n MagicTab|Stream|TB-08|TB-09)|Qualcore 1027`),\r\n HCLTablet: /HCL.*Tablet|Connect-3G-2.0|Connect-2G-2.0|ME Tablet U1|ME Tablet U2|ME Tablet G1|ME Tablet X1|ME Tablet Y2|ME Tablet Sync/,\r\n DPSTablet: /DPS Dream 9|DPS Dual 7/,\r\n VistureTablet: /V97 HD|i75 3G|Visture V4( HD)?|Visture V5( HD)?|Visture V10/,\r\n CrestaTablet: /CTP(-)?810|CTP(-)?818|CTP(-)?828|CTP(-)?838|CTP(-)?888|CTP(-)?978|CTP(-)?980|CTP(-)?987|CTP(-)?988|CTP(-)?989/,\r\n MediatekTablet: /\\bMT8125|MT8389|MT8135|MT8377\\b/,\r\n ConcordeTablet: /Concorde([ ]+)?Tab|ConCorde ReadMan/,\r\n GoCleverTablet: new RegExp(`GOCLEVER TAB|A7GOCLEVER|M1042|M7841|M742|R1042BK|R1041|TAB A975|TAB A7842|TAB A741|TAB A741L|TAB M723G|\n TAB M721|TAB A1021|TAB I921|TAB R721|TAB I720|TAB T76|TAB R70|TAB R76.2|TAB R106|TAB R83.2|TAB M813G|TAB I721|\n GCTA722|TAB I70|TAB I71|TAB S73|TAB R73|TAB R74|TAB R93|TAB R75|TAB R76.1|TAB A73|TAB A93|TAB A93.2|TAB T72|\n TAB R83|TAB R974|TAB R973|TAB A101|TAB A103|TAB A104|TAB A104.2|R105BK|M713G|A972BK|TAB A971|TAB R974.2|\n TAB R104|TAB R83.3|TAB A1042`),\r\n ModecomTablet: new RegExp(`FreeTAB 9000|FreeTAB 7.4|FreeTAB 7004|FreeTAB 7800|FreeTAB 2096|FreeTAB 7.5|FreeTAB 1014|\n FreeTAB 1001 |FreeTAB 8001|FreeTAB 9706|FreeTAB 9702|FreeTAB 7003|FreeTAB 7002|FreeTAB 1002|FreeTAB 7801|\n FreeTAB 1331|FreeTAB 1004|FreeTAB 8002|FreeTAB 8014|FreeTAB 9704|FreeTAB 1003`),\r\n VoninoTablet: new RegExp(`\\\\b(Argus[ _]?S|Diamond[ _]?79HD|Emerald[ _]?78E|Luna[ _]?70C|Onyx[ _]?S|Onyx[ _]?Z|\n Orin[ _]?HD|Orin[ _]?S|Otis[ _]?S|SpeedStar[ _]?S|Magnet[ _]?M9|Primus[ _]?94[ _]?3G|Primus[ _]?94HD|\n Primus[ _]?QS|Android.*\\\\bQ8\\\\b|Sirius[ _]?EVO[ _]?QS|Sirius[ _]?QS|Spirit[ _]?S)\\\\b`),\r\n ECSTablet: /V07OT2|TM105A|S10OT1|TR10CS1/,\r\n StorexTablet: /eZee[_']?(Tab|Go)[0-9]+|TabLC7|Looney Tunes Tab/,\r\n VodafoneTablet: /SmartTab([ ]+)?[0-9]+|SmartTabII10|SmartTabII7|VF-1497/,\r\n EssentielBTablet: /Smart[ ']?TAB[ ]+?[0-9]+|Family[ ']?TAB2/,\r\n RossMoorTablet: /RM-790|RM-997|RMD-878G|RMD-974R|RMT-705A|RMT-701|RME-601|RMT-501|RMT-711/,\r\n iMobileTablet: /i-mobile i-note/,\r\n TolinoTablet: /tolino tab [0-9.]+|tolino shine/,\r\n AudioSonicTablet: /\\bC-22Q|T7-QC|T-17B|T-17P\\b/,\r\n AMPETablet: /Android.* A78 /,\r\n SkkTablet: /Android.* (SKYPAD|PHOENIX|CYCLOPS)/,\r\n TecnoTablet: /TECNO P9|TECNO DP8D/,\r\n JXDTablet: new RegExp(`Android.* \\\\b(F3000|A3300|JXD5000|JXD3000|JXD2000|JXD300B|JXD300|S5800|S7800|S602b|S5110b|S7300|\n S5300|S602|S603|S5100|S5110|S601|S7100a|P3000F|P3000s|P101|P200s|P1000m|P200m|P9100|P1000s|S6600b|S908|\n P1000|P300|S18|S6600|S9100)\\\\b`),\r\n iJoyTablet: new RegExp(`Tablet (Spirit 7|Essentia|Galatea|Fusion|Onix 7|Landa|Titan|Scooby|Deox|Stella|Themis|Argon|\n Unique 7|Sygnus|Hexen|Finity 7|Cream|Cream X2|Jade|Neon 7|Neron 7|Kandy|Scape|Saphyr 7|Rebel|Biox|Rebel|\n Rebel 8GB|Myst|Draco 7|Myst|Tab7-004|Myst|Tadeo Jones|Tablet Boing|Arrow|Draco Dual Cam|Aurix|Mint|Amity|\n Revolution|Finity 9|Neon 9|T9w|Amity 4GB Dual Cam|Stone 4GB|Stone 8GB|Andromeda|Silken|X2|Andromeda II|\n Halley|Flame|Saphyr 9,7|Touch 8|Planet|Triton|Unique 10|Hexen 10|Memphis 4GB|Memphis 8GB|Onix 10)`),\r\n FX2Tablet: /FX2 PAD7|FX2 PAD10/,\r\n XoroTablet: new RegExp(`KidsPAD 701|PAD[ ]?712|PAD[ ]?714|PAD[ ]?716|PAD[ ]?717|PAD[ ]?718|PAD[ ]?720|PAD[ ]?721|\n PAD[ ]?722|PAD[ ]?790|PAD[ ]?792|PAD[ ]?900|PAD[ ]?9715D|PAD[ ]?9716DR|PAD[ ]?9718DR|PAD[ ]?9719QR|\n PAD[ ]?9720QR|TelePAD1030|Telepad1032|TelePAD730|TelePAD731|TelePAD732|TelePAD735Q|TelePAD830|TelePAD9730|\n TelePAD795|MegaPAD 1331|MegaPAD 1851|MegaPAD 2151`),\r\n ViewsonicTablet: /ViewPad 10pi|ViewPad 10e|ViewPad 10s|ViewPad E72|ViewPad7|ViewPad E100|ViewPad 7e|ViewSonic VB733|VB100a/,\r\n VerizonTablet: /QTAQZ3|QTAIR7|QTAQTZ3|QTASUN1|QTASUN2|QTAXIA1/,\r\n OdysTablet: /LOOX|XENO10|ODYS[ -](Space|EVO|Xpress|NOON)|\\bXELIO\\b|Xelio10Pro|XELIO7PHONETAB|XELIO10EXTREME|XELIOPT2|NEO_QUAD10/,\r\n CaptivaTablet: /CAPTIVA PAD/,\r\n IconbitTablet: new RegExp(`NetTAB|NT-3702|NT-3702S|NT-3702S|NT-3603P|NT-3603P|NT-0704S|NT-0704S|NT-3805C|NT-3805C|\n NT-0806C|NT-0806C|NT-0909T|NT-0909T|NT-0907S|NT-0907S|NT-0902S|NT-0902S`),\r\n TeclastTablet: new RegExp(`T98 4G|\\\\bP80\\\\b|\\\\bX90HD\\\\b|X98 Air|X98 Air 3G|\\\\bX89\\\\b|P80 3G|\\\\bX80h\\\\b|P98 Air|\n \\\\bX89HD\\\\b|P98 3G|\\\\bP90HD\\\\b|P89 3G|X98 3G|\\\\bP70h\\\\b|P79HD 3G|G18d 3G|\\\\bP79HD\\\\b|\\\\bP89s\\\\b|\\\\bA88\\\\b|\n \\\\bP10HD\\\\b|\\\\bP19HD\\\\b|G18 3G|\\\\bP78HD\\\\b|\\\\bA78\\\\b|\\\\bP75\\\\b|G17s 3G|G17h 3G|\\\\bP85t\\\\b|\\\\bP90\\\\b|\n \\\\bP11\\\\b|\\\\bP98t\\\\b|\\\\bP98HD\\\\b|\\\\bG18d\\\\b|\\\\bP85s\\\\b|\\\\bP11HD\\\\b|\\\\bP88s\\\\b|\\\\bA80HD\\\\b|\\\\bA80se\\\\b|\n \\\\bA10h\\\\b|\\\\bP89\\\\b|\\\\bP78s\\\\b|\\\\bG18\\\\b|\\\\bP85\\\\b|\\\\bA70h\\\\b|\\\\bA70\\\\b|\\\\bG17\\\\b|\\\\bP18\\\\b|\\\\bA80s\\\\b|\n \\\\bA11s\\\\b|\\\\bP88HD\\\\b|\\\\bA80h\\\\b|\\\\bP76s\\\\b|\\\\bP76h\\\\b|\\\\bP98\\\\b|\\\\bA10HD\\\\b|\\\\bP78\\\\b|\\\\bP88\\\\b|\\\\bA11\\\\b|\n \\\\bA10t\\\\b|\\\\bP76a\\\\b|\\\\bP76t\\\\b|\\\\bP76e\\\\b|\\\\bP85HD\\\\b|\\\\bP85a\\\\b|\\\\bP86\\\\b|\\\\bP75HD\\\\b|\\\\bP76v\\\\b|\\\\bA12\\\\b|\n \\\\bP75a\\\\b|\\\\bA15\\\\b|\\\\bP76Ti\\\\b|\\\\bP81HD\\\\b|\\\\bA10\\\\b|\\\\bT760VE\\\\b|\\\\bT720HD\\\\b|\\\\bP76\\\\b|\\\\bP73\\\\b|\\\\bP71\\\\b|\n \\\\bP72\\\\b|\\\\bT720SE\\\\b|\\\\bC520Ti\\\\b|\\\\bT760\\\\b|\\\\bT720VE\\\\b|T720-3GE|T720-WiFi`),\r\n OndaTablet: new RegExp(`\\\\b(V975i|Vi30|VX530|V701|Vi60|V701s|Vi50|V801s|V719|Vx610w|VX610W|V819i|Vi10|VX580W|Vi10|\n V711s|V813|V811|V820w|V820|Vi20|V711|VI30W|V712|V891w|V972|V819w|V820w|Vi60|V820w|V711|V813s|V801|V819|\n V975s|V801|V819|V819|V818|V811|V712|V975m|V101w|V961w|V812|V818|V971|V971s|V919|V989|V116w|V102w|V973|\n Vi40)\\\\b[\\s]+|V10 \\\\b4G\\\\b`),\r\n JaytechTablet: /TPC-PA762/,\r\n BlaupunktTablet: /Endeavour 800NG|Endeavour 1010/,\r\n DigmaTablet: /\\b(iDx10|iDx9|iDx8|iDx7|iDxD7|iDxD8|iDsQ8|iDsQ7|iDsQ8|iDsD10|iDnD7|3TS804H|iDsQ11|iDj7|iDs10)\\b/,\r\n EvolioTablet: /ARIA_Mini_wifi|Aria[ _]Mini|Evolio X10|Evolio X7|Evolio X8|\\bEvotab\\b|\\bNeura\\b/,\r\n LavaTablet: /QPAD E704|\\bIvoryS\\b|E-TAB IVORY|\\bE-TAB\\b/,\r\n AocTablet: /MW0811|MW0812|MW0922|MTK8382|MW1031|MW0831|MW0821|MW0931|MW0712/,\r\n MpmanTablet: new RegExp(`MP11 OCTA|MP10 OCTA|MPQC1114|MPQC1004|MPQC994|MPQC974|MPQC973|MPQC804|MPQC784|MPQC780|\n \\\\bMPG7\\\\b|MPDCG75|MPDCG71|MPDC1006|MP101DC|MPDC9000|MPDC905|MPDC706HD|MPDC706|MPDC705|MPDC110|\n MPDC100|MPDC99|MPDC97|MPDC88|MPDC8|MPDC77|MP709|MID701|MID711|MID170|MPDC703|MPQC1010`),\r\n CelkonTablet: /CT695|CT888|CT[\\s]?910|CT7 Tab|CT9 Tab|CT3 Tab|CT2 Tab|CT1 Tab|C820|C720|\\bCT-1\\b/,\r\n WolderTablet: new RegExp(`miTab \\\\b(DIAMOND|SPACE|BROOKLYN|NEO|FLY|MANHATTAN|FUNK|EVOLUTION|SKY|GOCAR|IRON|GENIUS|\n POP|MINT|EPSILON|BROADWAY|JUMP|HOP|LEGEND|NEW AGE|LINE|ADVANCE|FEEL|FOLLOW|LIKE|LINK|LIVE|THINK|\n FREEDOM|CHICAGO|CLEVELAND|BALTIMORE-GH|IOWA|BOSTON|SEATTLE|PHOENIX|DALLAS|IN 101|MasterChef)\\\\b`),\r\n MediacomTablet: 'M-MPI10C3G|M-SP10EG|M-SP10EGP|M-SP10HXAH|M-SP7HXAH|M-SP10HXBH|M-SP8HXAH|M-SP8MXA',\r\n MiTablet: /\\bMI PAD\\b|\\bHM NOTE 1W\\b/,\r\n NibiruTablet: /Nibiru M1|Nibiru Jupiter One/,\r\n NexoTablet: /NEXO NOVA|NEXO 10|NEXO AVIO|NEXO FREE|NEXO GO|NEXO EVO|NEXO 3G|NEXO SMART|NEXO KIDDO|NEXO MOBI/,\r\n LeaderTablet: new RegExp(`TBLT10Q|TBLT10I|TBL-10WDKB|TBL-10WDKBO2013|TBL-W230V2|TBL-W450|TBL-W500|SV572|TBLT7I|\n TBA-AC7-8G|TBLT79|TBL-8W16|TBL-10W32|TBL-10WKB|TBL-W100`),\r\n UbislateTablet: /UbiSlate[\\s]?7C/,\r\n PocketBookTablet: /Pocketbook/,\r\n KocasoTablet: /\\b(TB-1207)\\b/,\r\n HisenseTablet: /\\b(F5281|E2371)\\b/,\r\n Hudl: /Hudl HT7S3|Hudl 2/,\r\n TelstraTablet: /T-Hub2/,\r\n Honeywell: /RT10A/,\r\n GenericTablet: new RegExp(`Android.*\\\\b97D\\\\b|Tablet(?!.*PC)|BNTV250A|MID-WCDMA|LogicPD Zoom2|\\\\bA7EB\\\\b|CatNova8|\n A1_07|CT704|CT1002|\\\\bM721\\\\b|rk30sdk|\\\\bEVOTAB\\\\b|M758A|ET904|ALUMIUM10|Smartfren Tab|Endeavour 1010|\n Tablet-PC-4|Tagi Tab|\\\\bM6pro\\\\b|CT1020W|arc 10HD|\\\\bTP750\\\\b|\\\\bQTAQZ3\\\\b|WVT101|TM1088|KT107`),\r\n};\r\nconst DEVICES = {\r\n BLACKBERRY: 'Blackberry',\r\n FIREFOX_OS: 'Firefox-OS',\r\n CHROME_BOOK: 'Chrome-Book',\r\n WINDOWS_PHONE: 'Windows-Phone',\r\n VITA: 'Vita',\r\n PS4: 'PS4',\r\n MAC: 'Macintosh',\r\n CHROMECAST: 'Chromecast',\r\n APPLE_TV: 'Apple-TV',\r\n GOOGLE_TV: 'Google-TV',\r\n ANDROID: 'Android',\r\n Tesla: 'Tesla',\r\n iPad: 'iPad',\r\n IPHONE: 'iPhone',\r\n iPod: 'iPod',\r\n UNKNOWN: GENERAL.UKNOWN,\r\n HTC: 'HTC',\r\n NEXUS_PHONE: 'Nexus Phone',\r\n NexusTablet: 'Nexus Tablet',\r\n DELL: 'Dell',\r\n MOTOROLA: 'Motorola',\r\n SAMSUNG: 'Samsung',\r\n LG: 'LG',\r\n SONY: 'Sony',\r\n ASUS: 'Asus',\r\n NOKIA_LUMIA: 'Nokia Lumia',\r\n MICROMAX: 'Micromax',\r\n PALM: 'Palm',\r\n VERTU: 'Vertu',\r\n PANTECH: 'PANTECH',\r\n FLY: 'Fly',\r\n WIKO: `WIKO`,\r\n I_MOBILE: 'i-mobile',\r\n SIMVALLEY: 'Simvalley',\r\n WOLFGANG: 'Wolfgang',\r\n ALCATEL: 'Alcatel',\r\n HONEYWELL: 'Honeywell',\r\n NINTENDO: 'Nintendo',\r\n AMOI: 'Amoi',\r\n INQ: 'INQ',\r\n GENERIC_PHONE: 'Generic Phone',\r\n MI_SE_9: 'Mi SE 9',\r\n};\r\nconst DESKTOP_DEVICES = [\r\n DEVICES.PS4,\r\n DEVICES.CHROME_BOOK,\r\n DEVICES.MAC,\r\n DEVICES.DELL,\r\n DEVICES.ASUS,\r\n DEVICES.UNKNOWN,\r\n];\r\nconst OS = {\r\n WINDOWS: 'Windows',\r\n MAC: 'Mac',\r\n IOS: 'iOS',\r\n ANDROID: 'Android',\r\n LINUX: 'Linux',\r\n UNIX: 'Unix',\r\n FIREFOX_OS: 'Firefox-OS',\r\n CHROME_OS: 'Chrome-OS',\r\n WINDOWS_PHONE: 'Windows-Phone',\r\n UNKNOWN: GENERAL.UKNOWN,\r\n};\r\nconst OS_VERSIONS = {\r\n WINDOWS_3_11: 'windows-3-11',\r\n WINDOWS_95: 'windows-95',\r\n WINDOWS_ME: 'windows-me',\r\n WINDOWS_98: 'windows-98',\r\n WINDOWS_CE: 'windows-ce',\r\n WINDOWS_2000: 'windows-2000',\r\n WINDOWS_XP: 'windows-xp',\r\n WINDOWS_SERVER_2003: 'windows-server-2003',\r\n WINDOWS_VISTA: 'windows-vista',\r\n WINDOWS_7: 'windows-7',\r\n WINDOWS_8_1: 'windows-8-1',\r\n WINDOWS_8: 'windows-8',\r\n WINDOWS_10: 'windows-10',\r\n WINDOWS_PHONE_7_5: 'windows-phone-7-5',\r\n WINDOWS_PHONE_8_1: 'windows-phone-8-1',\r\n WINDOWS_PHONE_10: 'windows-phone-10',\r\n WINDOWS_NT_4_0: 'windows-nt-4-0',\r\n MACOSX_11_0: 'mac-os-x-11-0',\r\n MACOSX_16: 'mac-os-x-16',\r\n MACOSX_15: 'mac-os-x-15',\r\n MACOSX_14: 'mac-os-x-14',\r\n MACOSX_13: 'mac-os-x-13',\r\n MACOSX_12: 'mac-os-x-12',\r\n MACOSX_11: 'mac-os-x-11',\r\n MACOSX_10: 'mac-os-x-10',\r\n MACOSX_9: 'mac-os-x-9',\r\n MACOSX_8: 'mac-os-x-8',\r\n MACOSX_7: 'mac-os-x-7',\r\n MACOSX_6: 'mac-os-x-6',\r\n MACOSX_5: 'mac-os-x-5',\r\n MACOSX_4: 'mac-os-x-4',\r\n MACOSX_3: 'mac-os-x-3',\r\n MACOSX_2: 'mac-os-x-2',\r\n MACOSX: 'mac-os-x',\r\n iOS: 'iOS',\r\n ANDROID_9: 'android-9',\r\n UNKNOWN: GENERAL.UKNOWN.toLowerCase(),\r\n};\r\nconst OS_RE = {\r\n WINDOWS: {\r\n and: [{ or: [/\\bWindows|(Win\\d\\d)\\b/, /\\bWin 9x\\b/] }, { not: /\\bWindows Phone\\b/ }],\r\n },\r\n MAC: {\r\n and: [/\\bMac OS\\b/, { not: { or: [/\\biPhone\\b/, /\\biPad\\b/, /\\biPod\\b/, /\\bWindows Phone\\b/] } }],\r\n },\r\n IOS: {\r\n and: [{ or: [/\\biPad\\b/, /\\biPhone\\b/, /\\biPod\\b/] }, { not: /\\bWindows Phone\\b/ }],\r\n },\r\n ANDROID: { and: [/\\bAndroid\\b/, { not: /\\bWindows Phone\\b/ }] },\r\n LINUX: /\\bLinux\\b/,\r\n UNIX: /\\bUNIX\\b/,\r\n FIREFOX_OS: { and: [/\\bFirefox\\b/, /Mobile\\b/] },\r\n CHROME_OS: /\\bCrOS\\b/,\r\n WINDOWS_PHONE: { or: [/\\bIEMobile\\b/, /\\bWindows Phone\\b/] },\r\n PS4: /\\bMozilla\\/5.0 \\(PlayStation 4\\b/,\r\n VITA: /\\bMozilla\\/5.0 \\(Play(S|s)tation Vita\\b/,\r\n};\r\nconst BROWSERS_RE = {\r\n CHROME: {\r\n and: [\r\n { or: [/\\bChrome\\b/, /\\bCriOS\\b/, /\\bHeadlessChrome\\b/] },\r\n {\r\n not: {\r\n or: [/\\bOPR\\b/, /\\bEdg(e|A|iOS)\\b/, /\\bEdg\\/\\b/, /\\bSamsungBrowser\\b/, /\\bUCBrowser\\b/],\r\n },\r\n },\r\n ],\r\n },\r\n FIREFOX: { or: [/\\bFirefox\\b/, /\\bFxiOS\\b/] },\r\n SAFARI: {\r\n and: [\r\n /^((?!CriOS).)*\\Safari\\b.*$/,\r\n {\r\n not: {\r\n or: [/\\bOPR\\b/, /\\bEdg(e|A|iOS)\\b/, /\\bEdg\\/\\b/, /\\bWindows Phone\\b/, /\\bSamsungBrowser\\b/, /\\bUCBrowser\\b/],\r\n },\r\n },\r\n ],\r\n },\r\n OPERA: { or: [/Opera\\b/, /\\bOPR\\b/] },\r\n IE: {\r\n or: [/\\bMSIE\\b/, /\\bTrident\\b/, /^Mozilla\\/5\\.0 \\(Windows NT 10\\.0; Win64; x64\\)$/],\r\n },\r\n MS_EDGE: { or: [/\\bEdg(e|A|iOS)\\b/] },\r\n MS_EDGE_CHROMIUM: /\\bEdg\\/\\b/,\r\n PS4: /\\bMozilla\\/5.0 \\(PlayStation 4\\b/,\r\n VITA: /\\bMozilla\\/5.0 \\(Play(S|s)tation Vita\\b/,\r\n FB_MESSANGER: /\\bFBAN\\/MessengerForiOS\\b/,\r\n SAMSUNG: /\\bSamsungBrowser\\b/,\r\n UCBROWSER: /\\bUCBrowser\\b/,\r\n};\r\nconst DEVICES_RE = {\r\n ...MOBILES_RE,\r\n ...TABLETS_RE,\r\n ...OS_RE,\r\n FIREFOX_OS: { and: [/\\bFirefox\\b/, /\\bMobile\\b/] },\r\n CHROME_BOOK: /\\bCrOS\\b/,\r\n PS4: /\\bMozilla\\/5.0 \\(PlayStation 4\\b/,\r\n CHROMECAST: /\\bCrKey\\b/,\r\n APPLE_TV: /^iTunes-AppleTV\\/4.1$/,\r\n GOOGLE_TV: /\\bGoogleTV\\b/,\r\n Tesla: /Tesla\\/([0-9]{4}.[0-9]{1,2}.?[0-9]{0,2}.?[0-9]{0,2})-(.{7})/,\r\n MI_SE_9: /\\bXiaomi\\b/,\r\n MAC: {\r\n and: [/\\bMac OS\\b/, { not: { or: [/\\biPhone\\b/, /\\biPad\\b/, /\\biPod\\b/, /\\bWindows Phone\\b/] } }],\r\n },\r\n};\r\nconst OS_VERSIONS_RE_MAP = {\r\n WINDOWS_3_11: /Win16/,\r\n WINDOWS_95: /(Windows 95|Win95|Windows_95)/,\r\n WINDOWS_ME: /(Win 9x 4.90|Windows ME)/,\r\n WINDOWS_98: /(Windows 98|Win98)/,\r\n WINDOWS_CE: /Windows CE/,\r\n WINDOWS_2000: /(Windows NT 5.0|Windows 2000)/,\r\n WINDOWS_XP: /(Windows NT 5.1|Windows XP)/,\r\n WINDOWS_SERVER_2003: /Windows NT 5.2/,\r\n WINDOWS_VISTA: /Windows NT 6.0/,\r\n WINDOWS_7: /(Windows 7|Windows NT 6.1)/,\r\n WINDOWS_8_1: /(Windows 8.1|Windows NT 6.3)/,\r\n WINDOWS_8: /(Windows 8|Windows NT 6.2)/,\r\n WINDOWS_10: /(Windows NT 10.0)/,\r\n WINDOWS_PHONE_7_5: /(Windows Phone OS 7.5)/,\r\n WINDOWS_PHONE_8_1: /(Windows Phone 8.1)/,\r\n WINDOWS_PHONE_10: /(Windows Phone 10)/,\r\n WINDOWS_NT_4_0: {\r\n and: [/(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/, { not: /Windows NT 10.0/ }],\r\n },\r\n MACOSX: /(MAC OS X\\s*[^ 0-9])/,\r\n MACOSX_3: /(Darwin 10.3|Mac OS X 10.3)/,\r\n MACOSX_4: /(Darwin 10.4|Mac OS X 10.4)/,\r\n MACOSX_5: /(Mac OS X 10.5)/,\r\n MACOSX_6: /(Mac OS X 10.6)/,\r\n MACOSX_7: /(Mac OS X 10.7)/,\r\n MACOSX_8: /(Mac OS X 10.8)/,\r\n MACOSX_9: /(Mac OS X 10.9)/,\r\n MACOSX_10: /(Mac OS X 10.10)/,\r\n MACOSX_11: /(Mac OS X 10.11)/,\r\n MACOSX_12: /(Mac OS X 10.12)/,\r\n MACOSX_13: /(Mac OS X 10.13)/,\r\n MACOSX_14: /(Mac OS X 10.14)/,\r\n MACOSX_15: /(Mac OS X 10.15)/,\r\n MACOSX_16: /(Mac OS X 10.16)/,\r\n MACOSX_11_0: {\r\n or: [/11_0 like Mac OS X/, /Mac OS X 11/],\r\n },\r\n iOS: /(iPhone OS\\s*[0-9_]+)/,\r\n ANDROID_9: /(Android 9)/,\r\n};\r\nconst BROWSER_VERSIONS_RE_MAP = {\r\n CHROME: [/\\bChrome\\/([\\d\\.]+)\\b/, /\\bCriOS\\/([\\d\\.]+)\\b/, /\\bHeadlessChrome\\/([\\d\\.]+)\\b/],\r\n FIREFOX: [/\\bFirefox\\/([\\d\\.]+)\\b/, /\\bFxiOS\\/([\\d\\.]+)\\b/],\r\n SAFARI: [/\\bVersion\\/([\\d\\.]+)\\b/, /\\bSafari\\/([\\d\\.]+)\\b/],\r\n OPERA: [/\\bVersion\\/([\\d\\.]+)\\b/, /\\bOPR\\/([\\d\\.]+)\\b/],\r\n IE: [/\\bMSIE ([\\d\\.]+\\w?)\\b/, /\\brv:([\\d\\.]+\\w?)\\b/],\r\n MS_EDGE: /\\bEdg(?:e|A|iOS)\\/([\\d\\.]+)\\b/,\r\n MS_EDGE_CHROMIUM: /\\bEdg\\/([\\d\\.]+)\\b/,\r\n SAMSUNG: /\\bSamsungBrowser\\/([\\d\\.]+)\\b/,\r\n UCBROWSER: /\\bUCBrowser\\/([\\d\\.]+)\\b/,\r\n};\r\nconst OS_VERSIONS_RE = Object.keys(OS_VERSIONS_RE_MAP).reduce((obj, key) => {\r\n obj[key] = OS_VERSIONS_RE_MAP[key];\r\n return obj;\r\n}, {});\r\nconst BROWSER_VERSIONS_RE = Object.keys(BROWSER_VERSIONS_RE_MAP).reduce((obj, key) => {\r\n obj[BROWSERS[key]] = BROWSER_VERSIONS_RE_MAP[key];\r\n return obj;\r\n}, {});\n\nvar Constants = /*#__PURE__*/Object.freeze({\n __proto__: null,\n GENERAL: GENERAL,\n BROWSERS: BROWSERS,\n MOBILES_RE: MOBILES_RE,\n TABLETS_RE: TABLETS_RE,\n DEVICES: DEVICES,\n DESKTOP_DEVICES: DESKTOP_DEVICES,\n OS: OS,\n OS_VERSIONS: OS_VERSIONS,\n OS_RE: OS_RE,\n BROWSERS_RE: BROWSERS_RE,\n DEVICES_RE: DEVICES_RE,\n OS_VERSIONS_RE_MAP: OS_VERSIONS_RE_MAP,\n BROWSER_VERSIONS_RE_MAP: BROWSER_VERSIONS_RE_MAP,\n OS_VERSIONS_RE: OS_VERSIONS_RE,\n BROWSER_VERSIONS_RE: BROWSER_VERSIONS_RE\n});\n\n/**\r\n * Created by ahsanayaz on 08/11/2016.\r\n */\r\nclass ReTree {\r\n constructor() { }\r\n test(str, regex) {\r\n if (typeof regex === 'string') {\r\n regex = new RegExp(regex);\r\n }\r\n if (regex instanceof RegExp) {\r\n return regex.test(str);\r\n }\r\n else if (regex && Array.isArray(regex.and)) {\r\n return regex.and.every((item) => {\r\n return this.test(str, item);\r\n });\r\n }\r\n else if (regex && Array.isArray(regex.or)) {\r\n return regex.or.some((item) => {\r\n return this.test(str, item);\r\n });\r\n }\r\n else if (regex && regex.not) {\r\n return !this.test(str, regex.not);\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n exec(str, regex) {\r\n if (typeof regex === 'string') {\r\n regex = new RegExp(regex);\r\n }\r\n if (regex instanceof RegExp) {\r\n return regex.exec(str);\r\n }\r\n else if (regex && Array.isArray(regex)) {\r\n return regex.reduce((res, item) => {\r\n return !!res ? res : this.exec(str, item);\r\n }, null);\r\n }\r\n else {\r\n return null;\r\n }\r\n }\r\n}\n\n// tslint:disable: variable-name\r\nvar DeviceType;\r\n(function (DeviceType) {\r\n DeviceType[\"Mobile\"] = \"mobile\";\r\n DeviceType[\"Tablet\"] = \"tablet\";\r\n DeviceType[\"Desktop\"] = \"desktop\";\r\n DeviceType[\"Unknown\"] = \"unknown\";\r\n})(DeviceType || (DeviceType = {}));\r\nvar OrientationType;\r\n(function (OrientationType) {\r\n OrientationType[\"Portrait\"] = \"portrait\";\r\n OrientationType[\"Landscape\"] = \"landscape\";\r\n})(OrientationType || (OrientationType = {}));\r\nconst iPad = 'iPad';\r\nclass DeviceDetectorService {\r\n constructor(platformId) {\r\n this.platformId = platformId;\r\n this.ua = '';\r\n this.userAgent = '';\r\n this.os = '';\r\n this.browser = '';\r\n this.device = '';\r\n this.os_version = '';\r\n this.browser_version = '';\r\n this.reTree = new ReTree();\r\n this.deviceType = '';\r\n this.orientation = '';\r\n if (isPlatformBrowser(this.platformId) && typeof window !== 'undefined') {\r\n this.userAgent = window.navigator.userAgent;\r\n }\r\n this.setDeviceInfo(this.userAgent);\r\n }\r\n /**\r\n * @author Ahsan Ayaz\r\n * @desc Sets the initial value of the device when the service is initiated.\r\n * This value is later accessible for usage\r\n */\r\n setDeviceInfo(ua = this.userAgent) {\r\n if (ua !== this.userAgent) {\r\n this.userAgent = ua;\r\n }\r\n const mappings = [\r\n { const: 'OS', prop: 'os' },\r\n { const: 'BROWSERS', prop: 'browser' },\r\n { const: 'DEVICES', prop: 'device' },\r\n { const: 'OS_VERSIONS', prop: 'os_version' },\r\n ];\r\n mappings.forEach(mapping => {\r\n this[mapping.prop] = Object.keys(Constants[mapping.const]).reduce((obj, item) => {\r\n if (Constants[mapping.const][item] === 'device') {\r\n // hack for iOS 13 Tablet\r\n if (isPlatformBrowser(this.platformId) &&\r\n (!!this.reTree.test(this.userAgent, TABLETS_RE[iPad]) ||\r\n (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1))) {\r\n obj[Constants[mapping.const][item]] = iPad;\r\n return Object;\r\n }\r\n }\r\n obj[Constants[mapping.const][item]] = this.reTree.test(ua, Constants[`${mapping.const}_RE`][item]);\r\n return obj;\r\n }, {});\r\n });\r\n mappings.forEach(mapping => {\r\n this[mapping.prop] = Object.keys(Constants[mapping.const])\r\n .map(key => {\r\n return Constants[mapping.const][key];\r\n })\r\n .reduce((previousValue, currentValue) => {\r\n if (mapping.prop === 'device' && previousValue === Constants[mapping.const].ANDROID) {\r\n // if we have the actual device found, instead of 'Android', return the actual device\r\n return this[mapping.prop][currentValue] ? currentValue : previousValue;\r\n }\r\n else {\r\n return previousValue === Constants[mapping.const].UNKNOWN && this[mapping.prop][currentValue]\r\n ? currentValue\r\n : previousValue;\r\n }\r\n }, Constants[mapping.const].UNKNOWN);\r\n });\r\n this.browser_version = '0';\r\n if (this.browser !== BROWSERS.UNKNOWN) {\r\n const re = BROWSER_VERSIONS_RE[this.browser];\r\n const res = this.reTree.exec(ua, re);\r\n if (!!res) {\r\n this.browser_version = res[1];\r\n }\r\n }\r\n if (typeof window !== 'undefined' && window.matchMedia) {\r\n this.orientation = window.matchMedia('(orientation: landscape)').matches\r\n ? OrientationType.Landscape\r\n : OrientationType.Portrait;\r\n }\r\n else {\r\n this.orientation = GENERAL.UKNOWN;\r\n }\r\n this.deviceType = this.isTablet()\r\n ? DeviceType.Tablet\r\n : this.isMobile(this.userAgent)\r\n ? DeviceType.Mobile\r\n : this.isDesktop(this.userAgent)\r\n ? DeviceType.Desktop\r\n : DeviceType.Unknown;\r\n }\r\n /**\r\n * @author Ahsan Ayaz\r\n * @desc Returns the device information\r\n * @returns the device information object.\r\n */\r\n getDeviceInfo() {\r\n const deviceInfo = {\r\n userAgent: this.userAgent,\r\n os: this.os,\r\n browser: this.browser,\r\n device: this.device,\r\n os_version: this.os_version,\r\n browser_version: this.browser_version,\r\n deviceType: this.deviceType,\r\n orientation: this.orientation,\r\n };\r\n return deviceInfo;\r\n }\r\n /**\r\n * @author Ahsan Ayaz\r\n * @desc Compares the current device info with the mobile devices to check\r\n * if the current device is a mobile and also check current device is tablet so it will return false.\r\n * @returns whether the current device is a mobile\r\n */\r\n isMobile(userAgent = this.userAgent) {\r\n if (this.isTablet(userAgent)) {\r\n return false;\r\n }\r\n const match = Object.keys(MOBILES_RE).find(mobile => {\r\n return this.reTree.test(userAgent, MOBILES_RE[mobile]);\r\n });\r\n return !!match;\r\n }\r\n /**\r\n * @author Ahsan Ayaz\r\n * @desc Compares the current device info with the tablet devices to check\r\n * if the current device is a tablet.\r\n * @returns whether the current device is a tablet\r\n */\r\n isTablet(userAgent = this.userAgent) {\r\n if (isPlatformBrowser(this.platformId) &&\r\n (!!this.reTree.test(this.userAgent, TABLETS_RE[iPad]) ||\r\n (typeof navigator !== 'undefined' && navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1))) {\r\n return true;\r\n }\r\n const match = Object.keys(TABLETS_RE).find(mobile => {\r\n return !!this.reTree.test(userAgent, TABLETS_RE[mobile]);\r\n });\r\n return !!match;\r\n }\r\n /**\r\n * @author Ahsan Ayaz\r\n * @desc Compares the current device info with the desktop devices to check\r\n * if the current device is a desktop device.\r\n * @returns whether the current device is a desktop device\r\n */\r\n isDesktop(userAgent = this.userAgent) {\r\n if (this.device === DEVICES.UNKNOWN) {\r\n if (this.isMobile(userAgent) || this.isTablet(userAgent)) {\r\n return false;\r\n }\r\n }\r\n return DESKTOP_DEVICES.indexOf(this.device) > -1;\r\n }\r\n}\r\nDeviceDetectorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.2\", ngImport: i0, type: DeviceDetectorService, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable });\r\nDeviceDetectorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.2\", ngImport: i0, type: DeviceDetectorService, providedIn: 'root' });\r\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.2\", ngImport: i0, type: DeviceDetectorService, decorators: [{\r\n type: Injectable,\r\n args: [{\r\n providedIn: 'root',\r\n }]\r\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\r\n type: Inject,\r\n args: [PLATFORM_ID]\r\n }] }]; } });\n\n/*\r\n * Public API Surface of ngx-device-detector\r\n */\n\n/**\r\n * Generated bundle index. Do not edit.\r\n */\n\nexport { BROWSERS, BROWSERS_RE, BROWSER_VERSIONS_RE, BROWSER_VERSIONS_RE_MAP, DESKTOP_DEVICES, DEVICES, DEVICES_RE, DeviceDetectorService, DeviceType, GENERAL, MOBILES_RE, OS, OS_RE, OS_VERSIONS, OS_VERSIONS_RE, OS_VERSIONS_RE_MAP, OrientationType, ReTree, TABLETS_RE };\n//# sourceMappingURL=ngx-device-detector.mjs.map\n","import * as i0 from '@angular/core';\nimport { InjectionToken, Injectable, Optional, Inject, NgModule } from '@angular/core';\n\nconst GoogleTagManagerConfigService = new InjectionToken('google-tag-manager-config');\n// adapted from https://github.com/auth0/auth0-angular#dynamic-configuration\nclass GoogleTagManagerConfiguration {\n constructor(googleTagManagerConfig) {\n this._googleTagManagerConfig = {\n id: null,\n gtm_auth: '',\n gtm_preview: '',\n };\n if (googleTagManagerConfig) {\n this.set(googleTagManagerConfig);\n }\n }\n set(googleTagManagerConfig) {\n this._googleTagManagerConfig = googleTagManagerConfig;\n }\n get() {\n return this._googleTagManagerConfig;\n }\n}\nGoogleTagManagerConfiguration.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.2\", ngImport: i0, type: GoogleTagManagerConfiguration, deps: [{ token: GoogleTagManagerConfigService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\nGoogleTagManagerConfiguration.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.2\", ngImport: i0, type: GoogleTagManagerConfiguration, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.2\", ngImport: i0, type: GoogleTagManagerConfiguration, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [GoogleTagManagerConfigService]\n }] }]; } });\n\nclass GoogleTagManagerService {\n constructor(googleTagManagerConfiguration, googleTagManagerId, googleTagManagerAuth, googleTagManagerPreview, googleTagManagerResourcePath, googleTagManagerCSPNonce) {\n this.googleTagManagerConfiguration = googleTagManagerConfiguration;\n this.googleTagManagerId = googleTagManagerId;\n this.googleTagManagerAuth = googleTagManagerAuth;\n this.googleTagManagerPreview = googleTagManagerPreview;\n this.googleTagManagerResourcePath = googleTagManagerResourcePath;\n this.googleTagManagerCSPNonce = googleTagManagerCSPNonce;\n this.isLoaded = false;\n this.browserGlobals = {\n windowRef() {\n return window;\n },\n documentRef() {\n return document;\n },\n };\n this.config = this.googleTagManagerConfiguration?.get();\n if (this.config == null) {\n this.config = { id: null };\n }\n this.config = {\n ...this.config,\n id: googleTagManagerId || this.config.id,\n gtm_auth: googleTagManagerAuth || this.config.gtm_auth,\n gtm_preview: googleTagManagerPreview || this.config.gtm_preview,\n gtm_resource_path: googleTagManagerResourcePath || this.config.gtm_resource_path,\n };\n if (this.config.id == null) {\n throw new Error('Google tag manager ID not provided.');\n }\n }\n getDataLayer() {\n const window = this.browserGlobals.windowRef();\n window.dataLayer = window.dataLayer || [];\n return window.dataLayer;\n }\n pushOnDataLayer(obj) {\n const dataLayer = this.getDataLayer();\n dataLayer.push(obj);\n }\n addGtmToDom() {\n return new Promise((resolve, reject) => {\n if (this.isLoaded) {\n return resolve(this.isLoaded);\n }\n const doc = this.browserGlobals.documentRef();\n this.pushOnDataLayer({\n 'gtm.start': new Date().getTime(),\n event: 'gtm.js',\n });\n const gtmScript = doc.createElement('script');\n gtmScript.id = 'GTMscript';\n gtmScript.async = true;\n gtmScript.src = this.applyGtmQueryParams(this.config.gtm_resource_path\n ? this.config.gtm_resource_path\n : 'https://www.googletagmanager.com/gtm.js');\n gtmScript.addEventListener('load', () => {\n return resolve((this.isLoaded = true));\n });\n gtmScript.addEventListener('error', () => {\n return reject(false);\n });\n if (this.googleTagManagerCSPNonce) {\n gtmScript.setAttribute('nonce', this.googleTagManagerCSPNonce);\n }\n doc.head.insertBefore(gtmScript, doc.head.firstChild);\n });\n }\n pushTag(item) {\n return new Promise((resolve, reject) => {\n if (!this.isLoaded) {\n this.addGtmToDom()\n .then(() => {\n this.pushOnDataLayer(item);\n return resolve();\n })\n .catch(() => reject());\n }\n else {\n this.pushOnDataLayer(item);\n return resolve();\n }\n });\n }\n applyGtmQueryParams(url) {\n if (url.indexOf('?') === -1) {\n url += '?';\n }\n return (url +\n Object.keys(this.config)\n .filter((k) => this.config[k])\n .map((k) => `${k}=${this.config[k]}`)\n .join('&'));\n }\n}\nGoogleTagManagerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.2\", ngImport: i0, type: GoogleTagManagerService, deps: [{ token: GoogleTagManagerConfiguration, optional: true }, { token: 'googleTagManagerId', optional: true }, { token: 'googleTagManagerAuth', optional: true }, { token: 'googleTagManagerPreview', optional: true }, { token: 'googleTagManagerResourcePath', optional: true }, { token: 'googleTagManagerCSPNonce', optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\nGoogleTagManagerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.2\", ngImport: i0, type: GoogleTagManagerService, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.2\", ngImport: i0, type: GoogleTagManagerService, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root',\n }]\n }], ctorParameters: function () { return [{ type: GoogleTagManagerConfiguration, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [GoogleTagManagerConfiguration]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: ['googleTagManagerId']\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: ['googleTagManagerAuth']\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: ['googleTagManagerPreview']\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: ['googleTagManagerResourcePath']\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: ['googleTagManagerCSPNonce']\n }] }]; } });\n\nclass GoogleTagManagerModule {\n static forRoot(config) {\n return {\n ngModule: GoogleTagManagerModule,\n providers: [{ provide: GoogleTagManagerConfigService, useValue: config }],\n };\n }\n}\nGoogleTagManagerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.2\", ngImport: i0, type: GoogleTagManagerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nGoogleTagManagerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.0.2\", ngImport: i0, type: GoogleTagManagerModule });\nGoogleTagManagerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.0.2\", ngImport: i0, type: GoogleTagManagerModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.2\", ngImport: i0, type: GoogleTagManagerModule, decorators: [{\n type: NgModule\n }] });\n\n/*\n * Public API Surface of angular-google-tag-manager\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { GoogleTagManagerModule, GoogleTagManagerService };\n//# sourceMappingURL=angular-google-tag-manager.mjs.map\n","import { Component, OnInit, ViewEncapsulation, Input, Renderer2 } from '@angular/core';\nimport { DeviceDetectorService } from 'ngx-device-detector';\n\n@Component({\n selector: 'bw-theme, [bw-theme]',\n templateUrl: './theme.component.html',\n styleUrls: ['./theme.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class ThemeComponent implements OnInit {\n deviceInfo: any;\n isMobile: boolean;\n isTablet: boolean;\n isDesktop: boolean;\n\n constructor(private deviceService: DeviceDetectorService, private renderer: Renderer2) {\n if (this.deviceInfo) {\n this.getDevice();\n }\n }\n\n ngOnInit() {\n this.screenSizeClasses();\n if (this.deviceInfo) {\n this.renderer.addClass(document.documentElement, this.deviceInfo.os);\n if (this.isMobile) {\n this.renderer.addClass(document.documentElement, 'mobile-device');\n }\n if (this.isTablet) {\n this.renderer.addClass(document.documentElement, 'tablet-device');\n }\n if (this.isDesktop) {\n this.renderer.addClass(document.documentElement, 'desktop-device');\n }\n }\n }\n\n screenSizeClasses() {\n if (window.innerWidth < 640) {\n this.renderer.removeClass(document.documentElement, 'tablet-view');\n this.renderer.removeClass(document.documentElement, 'desktop-view');\n this.renderer.addClass(document.documentElement, 'mobile-view');\n } else if (window.innerWidth >= 640 && window.innerWidth < 1007) {\n this.renderer.removeClass(document.documentElement, 'mobile-view');\n this.renderer.removeClass(document.documentElement, 'desktop-view');\n this.renderer.addClass(document.documentElement, 'tablet-view');\n } else { \n this.renderer.removeClass(document.documentElement, 'tablet-view');\n this.renderer.removeClass(document.documentElement, 'mobile-view');\n this.renderer.addClass(document.documentElement, 'desktop-view');\n }\n }\n\n onResize(event: Event) {\n this.screenSizeClasses();\n }\n\n getDevice() {\n this.deviceInfo = this.deviceService.getDeviceInfo();\n this.isMobile = this.deviceService.isMobile();\n this.isTablet = this.deviceService.isTablet();\n this.isDesktop = this.deviceService.isDesktop();\n }\n}\n","<div (window:resize)=\"onResize($event)\">\n <ng-content></ng-content>\n</div>","import { Component, OnInit, Output, EventEmitter } from '@angular/core';\n\n@Component({\n selector: 'bw-topbar',\n templateUrl: './topbar.component.html',\n styleUrls: ['./topbar.component.scss']\n})\nexport class TopbarComponent {\n @Output() logo = new EventEmitter();\n constructor() {}\n\n\n logoClick() {\n this.logo.emit();\n }\n}\n","<div class=\"topbar-wrapper\">\n <div class=\"topbar\">\n <div class=\"logo\" >\n <img (click)=\"logoClick()\"\n src=\"../assets/brightsideLockup.svg\"\n alt=\"Brightside logo\"\n height=\"24\"\n class=\"pointer\"\n />\n <ng-content select=\".customer-logo\"></ng-content>\n </div>\n <div class=\"actions\">\n <ng-content select=\".action\"></ng-content>\n </div>\n <ng-content select=\"bw-toast\"></ng-content>\n </div>\n</div>\n","import { Component, OnInit, ChangeDetectionStrategy, OnChanges, Input, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'bw-page, [bw-page]',\n templateUrl: './page.component.html',\n styleUrls: ['./page.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class PageComponent implements OnInit, OnChanges {\n _currentTemplate: string;\n\n @Input() template: string;\n\n ngOnInit() {\n this._currentTemplate = this.template;\n }\n\n ngOnChanges() {\n const body = document.getElementsByTagName('body')[0];\n \n if (this.template) {\n body.classList.remove(this._currentTemplate);\n body.classList.add(this.template);\n this._currentTemplate = this.template;\n }\n }\n}\n","<article class=\"page-article\">\n <div class=\"page-cover\"></div>\n <header class=\"page-header\"><ng-content select=\"[page-header]\"></ng-content></header>\n <div class=\"page-sections\">\n <section class=\"page-primary-section\"><ng-content select=\"[page-primary-section]\"></ng-content></section>\n <section class=\"page-secondary-section\"><ng-content select=\"[page-secondary-section]\"></ng-content></section>\n </div>\n <footer class=\"page-footer\"><ng-content select=\"[page-footer]\"></ng-content></footer>\n</article>\n\n","<bw-modal\n *ngIf=\"currentModal$|async as modal\"\n [modalWidth]=\"modal.size\"\n [modalHeight]=\"modal.minHeight\"\n [showCloseButton]=\"modal.displayCloseButton\"\n (closeModal)=\"closeModal(modal)\">\n <ng-container [ngSwitch]=\"modal.isError\">\n <ng-container *ngSwitchCase=\"true\">\n <div [brightsideWebFb]=\"{ event_name: 'error_shown', custom: { 'error id': modal.eventName || 'modal unknown' }}\"></div>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <div *ngIf=\"modal.eventName\" [brightsideWebFb]=\"{ event_name: modal.eventName}\"></div>\n </ng-container>\n </ng-container>\n <div *ngIf=\"modal.headerImagePath || modal.title\" title-medium>\n <div *ngIf=\"modal.headerImagePath\" class=\"modal-header-img mb-sm\">\n <img [attr.src]=\"modal.headerImagePath\">\n </div>\n <typography\n *ngIf=\"modal.subtitle && modal.eyebrow\"\n text-medium-regular\n color=\"var(--secondary-text)\"\n class=\"mt-sm\">\n {{modal.subtitle|translate}}\n </typography>\n <typography\n *ngIf=\"modal.title\">\n {{ modal.title | translate }}\n </typography>\n </div>\n <section class=\"body\" [ngClass]=\"modal.bodyClass\">\n <ng-container *ngIf=\"modal.templateRef; else defaultContent\">\n <ng-container *ngTemplateOutlet=\"modal.templateRef\"></ng-container>\n </ng-container>\n <ng-template #defaultContent>\n <bw-spinner *ngIf=\"modal.showSpinner\"></bw-spinner>\n <typography\n *ngIf=\"modal.subtitle && !modal.eyebrow\"\n text-medium-regular\n color=\"var(--secondary-text)\"\n class=\"mb-sm\">\n {{modal.subtitle|translate}}\n </typography>\n <typography\n *ngIf=\"modal.contentKey\"\n text-medium-regular\n class=\"mb-sm\">\n <div [innerHTML]=\"modal.contentKey|translate\"></div>\n </typography>\n </ng-template>\n </section>\n <footer\n *ngIf=\"modal.ctaKey || modal.secondaryCtaKey\"\n class=\"footer\">\n <div class=\"flex-row row-reverse\">\n <button\n *ngIf=\"modal.ctaKey\" bw-button\n [ngClass]=\"modal.ctaType || ''\"\n (click)=\"handleCtaClick(modal.ctaAction, modal.loadingAfterCta)\"\n [brightsideWebFb]=\"{ event_name: modal.eventName}\"\n [processing]=\"modalLoadingCta$ | async\">\n {{ modal.ctaKey | translate }}\n </button>\n\n <button\n *ngIf=\"modal.secondaryCtaKey\"\n bw-link-button\n class=\"bs-blue pr-xl\"\n (click)=\"handleCtaClick(modal.secondaryCtaAction)\"\n [brightsideWebFb]=\"{ event_name: modal.eventName}\" [secondaryCta]=\"true\">\n {{ modal.secondaryCtaKey | translate }}\n </button>\n </div>\n </footer>\n</bw-modal>\n","import { Component, OnInit } from '@angular/core';\nimport {\n SimpleGlobalModalInterface,\n SimpleGlobalModalService\n} from \"@brightside-web/desktop/data-access/core-services\";\nimport { Observable, Subject, tap } from 'rxjs';\nimport {Router} from \"@angular/router\";\n\n@Component({\n selector: 'brightside-web-simple-global-modal',\n templateUrl: './simple-global-modal.component.html',\n styleUrls: ['./simple-global-modal.component.scss']\n})\nexport class SimpleGlobalModalComponent implements OnInit {\n\n currentModal$: Observable<SimpleGlobalModalInterface | null>;\n private _modalLoadingCta$ = new Subject<boolean>();\n public readonly modalLoadingCta$ : Observable<boolean> = this._modalLoadingCta$.asObservable();\n\n constructor(\n private sGlobalModalSvc: SimpleGlobalModalService,\n private router: Router\n ) {\n\n }\n\n ngOnInit(): void {\n this.currentModal$ = this.sGlobalModalSvc.modalObject;\n this._modalLoadingCta$.next(false);\n this.currentModal$.pipe(\n tap(()=>{\n this._modalLoadingCta$.next(false);\n })\n ).subscribe();\n }\n\n handleCtaClick(ctaAction: () => void, loadingAfterCta: boolean = false) {\n if (!loadingAfterCta) this.sGlobalModalSvc.clearModal();\n else this._modalLoadingCta$.next(true);\n\n if (typeof ctaAction === 'function') {\n ctaAction();\n } else {\n this.router.navigate(['home']);\n }\n }\n\n closeModal(modal?:SimpleGlobalModalInterface) {\n if (modal?.closeRoute) {\n this.router.navigate(modal?.closeRoute);\n } else if (modal?.closeAction && typeof modal?.closeAction === 'function') {\n modal.closeAction();\n } else {\n this.sGlobalModalSvc.clearModal();\n }\n }\n}\n","<bw-theme>\n <ng-container *ngIf=\"isMobileDevice && mobileLayoutType !== LayoutStyle.PUBLIC_ACCESS; else desktopContent\">\n <bw-toast (emit)=\"toastClicked($event)\" [toastObs]=\"toastService.onShowToast()\"></bw-toast>\n <div *ngIf=\"mobileViewEvent\" [brightsideWebFb]=\"{event_name: mobileViewEvent, custom: {'company': customerName}}\"></div>\n <div class=\"mobile-layout flex-column center\">\n <div class=\"mobile-layout-logo hidden-print mb-md\">\n <img src=\"../assets/brightsideLockup.svg\" alt=\"Brightside logo\" width=\"124\" class=\"mb-xs\">\n <div class=\"customer-logo\" *ngIf=\"customerLanding\">\n <typography text-small-regular class=\"secondary-text mr-xxs no-wrap\"><span [innerHTML]=\"'BROUGHT_BY' | translate\"></span></typography>\n <img src=\"/cdn.gobrightside.com/resources/assets/{{customerName}}-logo.png\" alt=\"\" height=\"16\">\n </div>\n </div>\n <div class=\"mobile-layout-graphic mb-smd flex-item-rigid\">\n <img [src]=\"mobileGraphic\" alt=\"brightside welcome graphic, a guy with a key\" style=\"max-width: fit-content;\">\n </div>\n <div class=\"mobile-layout-content flex-item-flexible mb-smd\" style=\"width: 260px; margin: auto;\">\n <typography headline-semibold>{{mobileHeadline | translate}}</typography>\n <bw-paragraph textStyle=\"Body2\">{{mobileParagraph | translate}}</bw-paragraph>\n <!-- Must be hidden, but required for email verification -->\n <div class=\"hidden-router\" *ngIf=\"isVerify\">\n <router-outlet></router-outlet>\n </div>\n </div>\n <div class=\"mobile-layout-footer flex-item-rigid\" *ngIf=\"!isVerifyV3\">\n <button bw-button fluidWidth (click)=\"downloadApp()\">{{mobileCta | translate}}</button>\n </div>\n </div>\n </ng-container>\n</bw-theme>\n\n<ng-template #desktopContent>\n <ng-container *ngIf=\"isLandingLayout || !isLoggedIn; else loggedInTemplate\">\n <bw-toast (emit)=\"toastClicked($event)\" [toastObs]=\"toastService.onShowToast()\"></bw-toast>\n <bw-page class=\"pt-lg\">\n <bw-topbar page-header class=\"hidden-print\" (logo)=\"logoClick()\">\n <div class=\"customer-logo flex-row\" *ngIf=\"customerLanding\">\n <typography text-small-regular class=\"secondary-text bs-mid-gray no-wrap mr-xs\"><span [innerHTML]=\"'BROUGHT_BY' | translate\"></span></typography>\n <img src=\"{{ env.cdnUrl }}resources/assets/{{customerName}}-logo.png\" alt=\"\"></div>\n <div class=\"action\">\n <div class=\"flex-row\">\n <div class=\"flex-item\" *ngIf=\"displayLangSelector\">\n <brightside-web-language-selector [bypassPut]=\"true\"></brightside-web-language-selector>\n </div>\n <ng-container *ngIf=\"!isLoggedIn && showAppLink\">\n <ng-template #appLinkNotSent >\n <div class=\"flex-item\"><button bw-outlined-button (click)=\"getTheApp()\">{{ 'DOWNLOAD_MOBILE_APP' | translate }}</button></div>\n </ng-template>\n <div class=\"flex-row\" *ngIf=\"appLinkSent; else appLinkNotSent\">\n <span class=\"body mr-sm bs-mid-gray\" >{{ 'APP_LINK_SENT' | translate }}</span> <a bw-anchor class=\"bs-blue\" (click)=\"getTheApp()\">{{ 'RETRY' | translate }}</a>\n </div>\n </ng-container>\n </div>\n </div>\n </bw-topbar>\n <div page-primary-section *ngIf=\"isLandingLayout && showCopy\" [ngClass]=\"{'mr-md': !isMobileWidth}\">\n <brightside-web-how-we-help [heading]=\"landingHeading\" [bodyCopy]=\"landingBodyCopy\" [iconGroupTitle]=\"landingIconGroupTitle\" (introVideoClicked)=\"showIntroVideo = true;\"></brightside-web-how-we-help>\n <ng-container *ngIf=\"!isMobileWidth\">\n <ng-container *ngTemplateOutlet=\"FAContact\"></ng-container>\n </ng-container>\n\n <div class=\"media-small-center\" [ngClass]=\"{'mr-lg': !isMobileWidth}\">\n <bw-paragraph color=\"var(--gray-50)\">\n <span [innerHTML]=\"'BS_CUSTOMER_MSG' | translate\"></span>\n </bw-paragraph>\n </div>\n </div>\n <div page-secondary-section>\n <router-outlet></router-outlet>\n </div>\n <div page-footer *ngIf=\"isLandingLayout\">\n <ng-container *ngIf=\"isMobileWidth && customerLanding\">\n <ng-container *ngTemplateOutlet=\"FAContact\"></ng-container>\n </ng-container>\n <div class=\"media-small-center\">\n <bw-caption>© {{currentYear}} Brightside |\n <a bw-anchor anchorStyle=\"text-small-regular\" target=\"_blank\" (click)=\"(true)\" [href]=\"'//www.gobrightside.com/terms-of-service' | safe\">\n Terms\n </a> |\n <a bw-anchor anchorStyle=\"text-small-regular\" target=\"_blank\" (click)=\"(true)\" [href]=\"'//www.gobrightside.com/privacy-policy' | safe\">\n Privacy\n </a>\n <span style='color:white'>\n {{buildVersion}}\n </span>\n </bw-caption>\n </div>\n </div>\n </bw-page>\n </ng-container>\n\n <router-outlet name=\"modal\"></router-outlet>\n\n <bw-modal *ngIf=\"showLogoutWarningModal\" modalWidth=\"medium\">\n <typography title-medium>{{ 'SESSION_EXP_TITLE' | translate }}</typography>\n <div class=\"body\">\n <bw-paragraph >{{ 'SESSION_EXP_DESC' | translate:{timeout:timeToLogout} }}</bw-paragraph>\n </div>\n <div class=\"footer\">\n <div class=\"flex-row row-reverse\">\n <button bw-button (click)=\"dismissAutoLogout()\">{{ 'SESSION_EXP_CONT_CTA' | translate }}</button>\n <a bw-anchor (click)=\"logout()\" style=\"margin: 0 16px;\">{{ 'SIGN_OUT' | translate }}</a>\n </div>\n </div>\n </bw-modal>\n\n <ng-template #loggedInTemplate>\n <div *ngIf=\"!isFullScreenLayout; else loggedInTemplateFullScreen\" class=\"left-nav-wrapper\">\n <bw-topbar page-header (logo)=\"logoClick()\" *ngIf=\"!isOnboardingComplete\">\n <div class=\"customer-logo flex-row\" *ngIf=\"customerLanding\"><typography text-small-regular class=\"secondary-text bs-mid-gray no-wrap mr-xs\">{{ 'BROUGHT_BY' | translate }}</typography><img src=\"//cdn.gobrightside.com/resources/assets/{{customerName}}-logo.png\" alt=\"\"></div>\n </bw-topbar>\n <div class=\"left-nav hidden-print\" *ngIf=\"isOnboardingComplete\">\n <div class=\"brightside-logo pointer hidden-print\" (click)=\"logoClick()\"><img src=\"../assets/brightsideLockup.svg\" alt=\"\"></div>\n <nav class=\"app-menu\">\n <ul>\n <li routerLinkActive=\"active\"><a [routerLink]=\"[ 'home' ]\"><bw-icon [iconName]=\"'home'\" horizontalSpace=\"mr-xs\"></bw-icon> <span class=\"link-text\">{{ 'HOME' | translate }}</span> </a></li>\n <li routerLinkActive=\"active\"><a [routerLink]=\"[ 'ways-we-can-help' ]\"><bw-icon [iconName]=\"'search'\" horizontalSpace=\"mr-xs\"></bw-icon> <span class=\"link-text\">{{ 'WAYS_WE_CAN_HELP' | translate }}</span></a></li>\n <li><a [routerLink]=\"[ {outlets: { modal: 'settings/profile'} } ]\"><bw-icon [iconName]=\"'user'\" horizontalSpace=\"mr-xs\"></bw-icon> <span class=\"link-text\">{{ 'PROFILE' | translate }}</span></a></li>\n <li><a [routerLink]=\"[ {outlets: { modal: 'settings/settings'} } ]\"><bw-icon [iconName]=\"'cog'\" horizontalSpace=\"mr-xs\"></bw-icon> <span class=\"link-text\">{{ 'SETTINGS' | translate }}</span></a></li>\n <li routerLinkActive=\"active\"><a [routerLink]=\"[ 'invite' ]\"><bw-icon [iconName]=\"'invite'\" horizontalSpace=\"mr-xs\"></bw-icon> <span class=\"link-text\">{{ 'INVITE' | translate }}</span></a></li>\n <li><a (click)=\"logout()\"><bw-icon [iconName]=\"'sign_out'\" horizontalSpace=\"mr-xs\"></bw-icon> <span class=\"link-text\">{{ 'SIGN_OUT' | translate }}</span> </a></li>\n </ul>\n </nav>\n <div class='versionStamp'>{{buildVersion}}</div>\n </div>\n <div class=\"content-wrapper\">\n <bw-toast (emit)=\"toastClicked($event)\" [toastObs]=\"toastService.onShowToast()\"></bw-toast>\n <div class=\"content-inner\" [ngClass]=\"{'onboarding-complete': isOnboardingComplete}\">\n <div class=\"content-inner-container\">\n <router-outlet></router-outlet>\n </div>\n </div>\n </div>\n </div>\n\n <ng-template #loggedInTemplateFullScreen>\n <div class=\"left-nav-wrapper full-screen\">\n <bw-topbar page-header (logo)=\"logoClick()\">\n <div class=\"customer-logo flex-row\" *ngIf=\"customerLanding\"><typography text-small-regular class=\"secondary-text bs-mid-gray no-wrap mr-xs\">{{ 'BROUGHT_BY' | translate }}</typography><img src=\"//cdn.gobrightside.com/resources/assets/{{customerName}}-logo.png\" alt=\"\"></div>\n </bw-topbar>\n\n <div class=\"content-wrapper\">\n <bw-toast (emit)=\"toastClicked($event)\" [toastObs]=\"toastService.onShowToast()\"></bw-toast>\n <div class=\"content-inner\">\n <div class=\"content-inner-container\">\n <router-outlet></router-outlet>\n </div>\n </div>\n </div>\n </div>\n </ng-template>\n </ng-template>\n</ng-template>\n\n<ng-template #FAContact>\n <div *ngIf=\"customerNumberLoaded\" class=\"media-small-center mr-md mb-sm\" [ngClass]=\"{'mr-md': !isMobileWidth}\">\n <bw-paragraph color=\"var(--gray-50)\" verticalSpace=\"4\">\n <div [innerHTML]=\"'BRIGHTSIDE_REGISTER_CALL' | translate:{customerNumber:'1'+customerNumber}\"> </div>\n </bw-paragraph>\n <bw-caption>({{ 'BRIGHTSIDE_LANDING_FAHOURS' | translate }})</bw-caption>\n </div>\n</ng-template>\n\n<brightside-web-mobile-app-modal *ngIf=\"showMobileModal\" (ctaClick)=\"showMobileModal = false\"></brightside-web-mobile-app-modal>\n\n<bw-video *ngIf=\"showIntroVideo\"\n [cdnBase]=\"env.cdnUrl\"\n [path]=\"'videos/explainer/' + languageSelectorService.activeLang + '/explainer.mp4'\"\n (modalClosed)=\"showIntroVideo = false;\">\n</bw-video>\n\n<bw-modal *ngIf=\"bannerModal.displayMe\"\n [showCloseButton]=\"true\" (closeModal)=\"onBannerModalClose(bannerModal.id)\"\n modalWidth=\"medium\" [brightsideWebFb]=\"{event_name: bannerModal.id}\">\n <typography title-medium>\n {{ bannerModal.titleKey | translate }}\n </typography>\n <div class=\"body\">\n <div [innerHTML]=\"bannerModal.bodyKey | translate\"></div>\n </div>\n <div class=\"footer\">\n <div class=\"flex-row row-reverse\">\n <button *ngIf=\"bannerModal.ctaKey\" bw-button (click)=\"onBannerModalClose(bannerModal.id)\">{{ bannerModal.ctaKey | translate }}</button>\n </div>\n </div>\n</bw-modal>\n\n\n<brightside-web-simple-global-modal></brightside-web-simple-global-modal>\n","import {\n Component,\n OnDestroy,\n OnInit,\n ViewChild,\n AfterViewInit,\n Inject,\n NgZone,\n HostListener,\n inject\n} from '@angular/core';\nimport {DOCUMENT, Location, TitleCasePipe} from '@angular/common';\nimport {\n ActivatedRoute, convertToParamMap,\n NavigationEnd,\n NavigationError,\n NavigationStart,\n Params,\n Router,\n RouterEvent\n} from '@angular/router';\n\nimport { HubPayload } from '@aws-amplify/core';\nimport { DEFAULT_INTERRUPTSOURCES, Idle } from '@ng-idle/core';\nimport {\n AuthService,\n FirebaseService,\n ProfileService,\n ProfileResponse,\n RemoteConfig_SupportNumber,\n MobileStateResponse,\n RequiredVerificationService,\n CompanyService,\n InternalLinkRoutingService, GlobalModalService, GlobalModalInterface, CacheStorageService, KnownFeatureFlags\n} from '@brightside-web/desktop/data-access/shared';\nimport { RegistrationService } from '@brightside-web/desktop/data-access/onboarding';\nimport { RoutingStateService, ToastService, Toast, ToastType } from '@brightside/brightside-ui-services';\nimport { CacheKeys, Environment } from '@brightside-web/micro/core/environment';\nimport { ToastComponent, MessageService, MenuItem } from '@brightside/brightside-ui';\n\nimport {\n AwsApiWrapperService,\n BsAuthService,\n BsCacheService, BsChatService,\n BsHubService, FeatureFlagService, UserAttributesInterface,\n} from '@brightside-web/desktop/data-access/core-services';\n\nimport { GoogleTagManagerService } from 'angular-google-tag-manager';\nimport { Intercom } from 'ng-intercom';\nimport { DeviceDetectorService, OS } from 'ngx-device-detector';\nimport {from, forkJoin, Subscription, tap} from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { RoutingService, RoutingServiceDispatchEvent, LayoutStyle } from './routing.service';\nimport { HttpClient } from '@angular/common/http';\nimport * as moment from \"moment\";\nimport {TranslateService} from \"@ngx-translate/core\";\nimport {LanguageSelectorService} from \"@brightside-web/desktop/feature/language-selection\";\n\nimport * as Sentry from '@sentry/angular';\n\ndeclare let fbq: Function;\n\ndeclare const BuildVersion: string;\ndeclare const Sprig: Function;\ndeclare const amazon_connect: Function;\ndeclare const vanilla_setupSprig: Function;\ndeclare const vanilla_setupAmazonConnect: Function;\n\ndeclare global {\n interface Window {\n gTag: Function;\n }\n}\n\ninterface MappingDetail {\n path: string;\n queryParams?: Record<string, string>;\n queryParamsType?: MappingParamType;\n}\n\ninterface CompanyConfig {\n supportNumber: string;\n}\n\nenum UtmParamEnum {\n utm_source = 'utm_source',\n utm_medium = 'utm_medium',\n utm_campaign = 'utm_campaign',\n utm_content = 'utm_content',\n utm_term = 'utm_term'\n}\n\nenum MappingParamType {\n AUTO = 'auto',\n DEFAULT = 'default',\n}\n\ninterface MobileRouteIgnoreInterface {\n pattern: RegExp | string\n}\n\n@Component({\n selector: 'brightside-web-desktop',\n templateUrl: './app.component.html',\n styleUrls: ['./app.component.scss'],\n})\nexport class AppComponent implements OnInit, AfterViewInit, OnDestroy {\n\n awsApiWrapperService: AwsApiWrapperService = inject(AwsApiWrapperService);\n bsAuthService: BsAuthService = inject(BsAuthService);\n bsCacheService: BsCacheService = inject(BsCacheService);\n bsHubService: BsHubService = inject(BsHubService);\n _bsChatService: BsChatService = inject(BsChatService);\n\n\n @ViewChild(ToastComponent) toastCmpt: ToastComponent;\n\n LayoutStyle = LayoutStyle;\n\n showLogoutWarningModal = false;\n showMobileModal = false;\n\n //defaults for the mobile content\n isVerifyV2 = false;\n isVerifyV3 = false;\n mobileGraphic = '../assets/Illustration-iOS-LandingPage.svg';\n mobileHeadline = 'DESKTOP_MOBILE_HEADER';\n mobileParagraph = 'DESKTOP_MOBILE_DESC';\n mobileCta = 'DOWNLOAD_MOBILE_APP';\n mobileViewEvent = '';\n mobileLayoutType: LayoutStyle = LayoutStyle.DEFAULT;\n timeToLogout: string;\n showAppLink = true;\n isLoggedIn: boolean;\n isDoneCheckingOnboarding = false;\n isOnboardingComplete = false;\n sub = new Subscription();\n signOutMessage = 'You have successfully signed out.';\n timeOutMessage = 'You have been signed out due to inactivity.';\n signedOutMessage = this.signOutMessage;\n isMobileDevice = false;\n isMobileWidth = false;\n customerLanding: boolean;\n customerName: string;\n customerNumber: string;\n customerNumberLoaded = false;\n subdomain: string;\n timeout: number;\n appLinkSent: boolean;\n currentYear = new Date().getFullYear();\n chatfashown = 0;\n verifyV2 = false;\n showCopy = true;\n isWaitlist = false;\n isReviewApp = false;\n isLandingLayout = false;\n landingHeading = 'BRIGHTSIDE_HEADING';\n landingBodyCopy = 'BRIGHTSIDE_BODY';\n landingIconGroupTitle = 'BRIGHTSIDE_ICON_TITLE';\n isVerify = false;\n showCustomerMessage: boolean;\n customerMessage =\n '*Brightside is an employee benefit. If you’re not sure your company offers Brightside, talk to your HR representative.';\n isLegrand = false;\n isFullScreenLayout = false;\n\n buildVersion: string = typeof BuildVersion === 'string' ? BuildVersion : 'Local/Develop';\n\n calledUpdateOwner = false;\n\n _showIntroVideo: boolean;\n displayLangSelector: boolean;\n\n mobileRouteIgnoreList: MobileRouteIgnoreInterface[]= [\n {pattern: /^\\/verification\\/smfa\\/\\w+$/gm},\n ]\n private _enableSalesforce: boolean;\n\n set showIntroVideo(value: boolean) {\n if (value) this.analytics.logEvent('video tapped');\n this._showIntroVideo = value;\n }\n\n get showIntroVideo(): boolean {\n return this._showIntroVideo;\n }\n\n nativeToDesktopMapping: { [key: string]: any };\n connectedToWatcher = false;\n amazonConnect: Function =\n typeof amazon_connect === 'function'\n ? amazon_connect\n : () => {\n console.log(`Amazon Connect not enabled\")`);\n };\n\n sprig: Function =\n typeof Sprig === 'function'\n ? Sprig\n : () => {\n console.log(`Sprig not enabled\")`);\n };\n globalSetupSpring: Function =\n typeof vanilla_setupSprig === 'function'\n ? vanilla_setupSprig\n : () => {\n console.log(`Sprig not enabled\")`);\n };\n\n globalSetupAmazonConnect: Function =\n typeof vanilla_setupAmazonConnect === 'function'\n ? vanilla_setupAmazonConnect\n : () => {\n console.log(`Amazon Connect not enabled\")`);\n };\n\n //This is only used by the router events and should be cleared on navigation end\n private tempRouteURL = '';\n\n private displayStyle = 'default';\n private displayLastPathKey = '';\n private displayMapping: { [key: string]: string } = {};\n private onboardingChannelReceived = false;\n\n //Used to stop delayed events if layouts change back to back\n private appLayoutStyleEventTimer: number;\n\n private faHours = '(Weekdays, 10 a.m. to 7 p.m. ET)';\n\n bannerModal: GlobalModalInterface = { displayMe: false, type: 'banner', id: '' };\n\n companyRemapping: { [key: string]: string } = {\n caregiver: 'providence',\n };\n\n @HostListener('click', ['$event'])\n appOnClick(event: Event) {\n const target = <HTMLElement>event.target;\n if (target.nodeName === 'A') {\n const path = target.getAttribute('href');\n if (path?.startsWith('gobrightside:')) {\n event.stopPropagation();\n event.preventDefault();\n this.internalLinkRouting.routeToLink(path);\n }\n }\n }\n\n constructor(\n private authService: AuthService,\n private deviceService: DeviceDetectorService,\n private gtmService: GoogleTagManagerService,\n private messageService: MessageService,\n private routingService: RoutingService,\n private routingStateService: RoutingStateService,\n private activatedRoute: ActivatedRoute,\n private router: Router,\n public env: Environment,\n private idle: Idle,\n private intercom: Intercom,\n private http: HttpClient,\n private titleCase: TitleCasePipe,\n public toastService: ToastService,\n protected analytics: FirebaseService,\n private profileService: ProfileService,\n private _ngZone: NgZone,\n private requiredVerificationService: RequiredVerificationService,\n private companyService: CompanyService,\n private internalLinkRouting: InternalLinkRoutingService,\n private globalModalService: GlobalModalService,\n private translateService: TranslateService,\n @Inject(DOCUMENT) private _document: Document,\n private location: Location,\n private cacheStorageSvc: CacheStorageService,\n private languageSelectorService: LanguageSelectorService,\n private featureFlagSvc: FeatureFlagService\n ) {\n this.sub.add(\n this.languageSelectorService.ready.subscribe(\n isReady => {\n if (isReady && this.languageSelectorService.supportedLanguages.length > 1) {\n this.displayLangSelector = true;\n }\n }\n )\n );\n\n const queryParams = window.location.href.split('?');\n\n if (queryParams.length > 1) {\n let hasUtm = false;\n const pairs = queryParams[1].split('&');\n // eslint-disable-next-line guard-for-in\n for (const i in pairs) {\n const keyval = pairs[i].split('=');\n if (keyval[0].includes('utm')) {\n hasUtm = true;\n this.bsCacheService.setItem(keyval[0], keyval[1]);\n }\n if (keyval[0].includes('referrerType')) {\n this.bsCacheService.setItem('referralLink', window.location.href, { expires: moment().add(60000, 'seconds').valueOf() });\n }\n }\n }\n\n this.setUpRoutingEventWatcher();\n\n this.faHours = 'Weekdays, 8 a.m. to 9 p.m. ET';\n this.bsCacheService.setItem('FAHOURS', this.faHours);\n\n this.sub.add(\n this.globalModalService.getModal.subscribe((response) => {\n if (response.type === 'banner') {\n this.bannerModal = response;\n } else if (response.type === 'default') {\n this.bannerModal = response;\n }\n })\n );\n }\n\n onBannerModalClose(modalId: string) {\n this.analytics.logEvent(`${modalId}_dismissed`);\n this.globalModalService.hideModal();\n }\n\n // eslint-disable-next-line @typescript-eslint/member-ordering\n public crumbs: MenuItem[];\n\n ngOnInit() {\n\n if (this.location.path().includes('review-app')) {\n this.isReviewApp = true;\n }\n this.activatedRoute.queryParams.subscribe((params) => {\n\n if (document.referrer.includes('link.gobrightside.com') && Object.keys(params).length > 0) this.trackDynamicLink(params);\n\n // NOTE non-routable components cannot get params from the snapshot, they have to subscribe\n // also see https://medium.com/@tomastrajan/how-to-get-route-path-parameters-in-non-routed-angular-components-32fc90d9cb52\n this.bsCacheService.setItem('referrer', params['referrer'], { expires: moment().add(6000, 'seconds').valueOf() });\n this.bsCacheService.setItem('referrerType', params['referrerType'], { expires: moment().add(6000, 'seconds').valueOf() });\n if (!this.env.production) {\n //this is for automated testing purposes to reach hard-to-access content\n if (this.activatedRoute.snapshot.queryParams['mobile']) {\n this.isMobileDevice = true;\n }\n if (this.activatedRoute.snapshot.queryParams['timeout']) {\n this.idle.setTimeout(+this.activatedRoute.snapshot.queryParams['timeout']);\n this.idle.setIdle(+this.activatedRoute.snapshot.queryParams['timeout']);\n }\n }\n\n //This is pulled out from the production flag because we need logo during waitlist flow\n if (this.activatedRoute.snapshot.queryParams['company']) {\n let company = this.activatedRoute.snapshot.queryParams['company'];\n company = this.companyRemapping[company] ?? company;\n this.bsCacheService.setItem('fromSubdomain', true);\n this.subdomain = company;\n this.customerLanding = true;\n this.customerName = company;\n this.fetchCompanyFile();\n this.companyService.setCompany(company);\n this.showCustomerMessage = false;\n this.landingHeading = 'BRIGHTSIDE_HEADING_CL';\n this.landingBodyCopy = 'BRIGHTSIDE_BODY_CL';\n this.landingIconGroupTitle = 'BRIGHTSIDE_ICON_TITLE_CL';\n }\n\n if (params['welcomevideo'] && params['welcomevideo'] === 'true') {\n this._showIntroVideo = true;\n }\n });\n\n this.isMobileWidth = window.innerWidth < 1024;\n\n if (this.deviceService.isMobile() || this.deviceService.isTablet()) {\n const hasIgnoredRoute = this.mobileRouteIgnoreList.find(match => {\n const pattern = match.pattern;\n return window.location.pathname.match(pattern) ?? false;\n });\n this.isMobileDevice = hasIgnoredRoute ? false : true;\n }\n\n /**\n * TODO: want to test this in constructor on dev. would be best to set company into cache ASAP\n * for copy retrieval\n **/\n this.getCustomerBySubDomain();\n\n this.routingStateService.loadRouting();\n\n // overrides the default 30 sec timeout setting to 2 min\n this.idle.setTimeout(120);\n\n // overrides the default 20 min idle setting to 15 min\n this.idle.setIdle(900 - this.idle.getTimeout());\n\n this.setInterrupts();\n\n this.sub.add(\n this.idle.onTimeoutWarning.subscribe(() => {\n // show modal with logout and continue\n this.showLogoutWarningModal = true;\n\n // Stop the interrupts, only want the dismiss to stop the clock\n this.idle.setInterrupts([]);\n })\n );\n\n // idle.onTimeoutWarning fires every second 2 minutes from timeout\n this.sub.add(\n this.idle.onTimeoutWarning.subscribe((countdown: number) => {\n const minutesToLogout = Math.floor(countdown / 60);\n const currentSecond = countdown - minutesToLogout * 60;\n const secondsStringPluralize = currentSecond === 1 ?\n this.translateService.instant('SECOND') : this.translateService.instant('SECONDS');\n const minutesStringPluralize = minutesToLogout > 1 ?\n this.translateService.instant('MINUTE') : this.translateService.instant('MINUTES');\n\n // Build time to logout countdown string\n if (minutesToLogout < 1) {\n this.timeToLogout = currentSecond + ' ' + secondsStringPluralize;\n } else {\n this.timeToLogout =\n minutesToLogout + ' ' + minutesStringPluralize + ' ' + this.translateService.instant('AND') + ' ' + currentSecond + ' ' + secondsStringPluralize;\n }\n })\n );\n\n this.sub.add(\n this.idle.onTimeout.subscribe(() => {\n this.signedOutMessage = this.timeOutMessage;\n this.logout();\n this.analytics.logEvent('sign_out_forced');\n })\n );\n\n this.bsHubService.listen('bsAuth', (data)=>{\n switch (data.payload.event) {\n case 'signedIn':\n this.setupSprig();\n this.isLoggedIn = true;\n this.bsAuthService.fetchUserAttributes().subscribe(\n attributes => {\n const guid = attributes['guid'];\n if (guid) Sentry.setUser({id: guid})\n }\n );\n this.idle.watch();\n break;\n case 'oAuthSignOut':\n case 'signedOut':\n this.idle.stop();\n break;\n }\n });\n\n this.bsHubService.listen('OnboardingChannel', (data) => {\n const { payload } = data;\n this.onOnboardingEvent(payload);\n });\n\n this.bsHubService.listen('IntercomChannel', (data) => {\n if (data.payload.event === 'close') {\n this.featureFlagSvc.getFlag(KnownFeatureFlags.ENABLESALESFORCEMESSAGING)\n .pipe(\n tap(enableSalesforce => {\n if(!enableSalesforce) {\n this.intercom.hide();\n }\n })\n )\n .subscribe();\n }\n });\n\n this.bsHubService.listen('IntercomChannel', (data) => {\n if (data.payload.event === 'open') {\n this._bsChatService.showChat();\n }\n });\n\n this.bsHubService.listen('AppChannel', (data) => {\n if (data.payload.event === 'signOut') {\n this.logout();\n }\n });\n\n\n\n this.router.events.pipe(filter((e) => e instanceof RouterEvent)).subscribe((e) => {\n if (e instanceof NavigationError && e.url.length > 1) {\n this.authService.redirectUrl = e.url;\n }\n });\n\n this.router.events.forEach((item) => {\n if (item instanceof NavigationStart) {\n this.setupMobileContent(item.url);\n } else if (item instanceof NavigationEnd) {\n const { urlAfterRedirects } = item;\n\n this.isLandingLayout = (urlAfterRedirects.includes('registration') ||\n urlAfterRedirects.includes('waitlist')) &&\n !urlAfterRedirects.includes('verification/identity/registration');\n this.isWaitlist = urlAfterRedirects.includes('waitlist');\n\n if (this.isLandingLayout) {\n if (this.isWaitlist || urlAfterRedirects.includes('get_started')) {\n this.showCopy = false;\n\n if (this.isWaitlist) {\n this.showAppLink = false;\n }\n }\n }\n }\n });\n\n this.analytics.ensureInitialized().then(() => {\n this.analytics.fetchConfig().then(() => {\n if (!this.customerNumberLoaded) {\n const rcSupportNumber = this.analytics.getValueAsString(RemoteConfig_SupportNumber);\n this.customerNumber = rcSupportNumber.replace(/[^0-9]/g, '');\n this.customerNumberLoaded = true;\n this.companyService.setSupportNumber(this.customerNumber);\n }\n })\n .catch(error => {\n Sentry.withScope(function (scope) {\n scope.setFingerprint(['Firebase', 'fetchConfig']);\n Sentry.captureException(error);\n });\n });\n })\n .catch(error => {\n Sentry.withScope(function (scope) {\n scope.setFingerprint(['Firebase', 'ensureInitialized']);\n Sentry.captureException(error);\n });\n });\n }\n\n private trackDynamicLink(queryParams: Params) {\n const eventParams: {[key: string]: string} = {source: 'dynamic link', url: document.referrer};\n let sendEvent = false;\n const utmArray = Object.keys(queryParams).filter((x:string) => {\n const paramArray: string[] = Object.values(UtmParamEnum);\n return paramArray.includes(x.toLowerCase())\n });\n const paramMap = convertToParamMap(queryParams);\n utmArray.forEach(utm => {\n sendEvent = true;\n eventParams[utm] = paramMap.get(utm) as string;\n });\n if (sendEvent) this.analytics.logEvent('link_tapped', eventParams);\n }\n\n private setupMobileContent(isVerifyV2: string) {\n this.isVerifyV2 = isVerifyV2 === '/verify?v=2';\n this.isVerifyV3 = isVerifyV2 === '/verify?v=3';\n if (this.isVerifyV3) {\n this.mobileViewEvent = 'email_verified';\n this.mobileGraphic = '../assets/verified.svg';\n this.mobileHeadline = 'DESKTOP_EMAIL_NOW_VERIFIED_TITLE';\n this.mobileParagraph = 'DESKTOP_EMAIL_NOW_VERIFIED_DESC';\n this.mobileCta = '';\n } else if (isVerifyV2) {\n this.mobileViewEvent = 'email_verified';\n this.mobileGraphic = '../assets/verified.svg';\n this.mobileHeadline = 'DESKTOP_EMAIL_NOW_VERIFIED_TITLE';\n this.mobileParagraph = 'DESKTOP_EMAIL_NOW_VERIFIED_DESC';\n this.mobileCta = 'DESKTOP_EMAIL_NOW_VERIFIED_CTA';\n } else {\n this.mobileGraphic = '../assets/Illustration-iOS-LandingPage.svg';\n this.mobileHeadline = 'DESKTOP_MOBILE_HEADER';\n this.mobileParagraph = 'DESKTOP_MOBILE_DESC';\n this.mobileCta = 'DOWNLOAD_MOBILE_APP';\n this.mobileViewEvent = 'app_store_redirect';\n }\n }\n\n private setupSprig() {\n this.globalSetupSpring(this._document, 'https://cdn.sprig.com/shim.js', this.env.sprigId);\n if (this.sprig) {\n console.log(`Sprig setup.`);\n } else {\n console.error(`Sprig not yet setup.`);\n }\n }\n\n ngAfterViewInit() {\n this.isVerify = window.location.pathname.startsWith('/verify');\n }\n\n private fetchCompanyFile(file: string = ''): void {\n if (file === '') {\n if (this.customerName) {\n file = this.customerName.toLowerCase();\n } else {\n file = 'app';\n }\n }\n\n this.awsApiWrapperService.get('api-mobile-noauth', `/cdn-resource/resources/configs/${file}.json`, {body: null})\n .then((data) => {\n this.customerNumber = data.supportNumber;\n this.customerNumberLoaded = true;\n this.companyService.setSupportNumber(this.customerNumber);\n })\n .catch((_) => {\n if (file !== 'app') {\n this.fetchCompanyFile('app');\n } else {\n console.error(`Error, fallback failed~`);\n }\n });\n\n }\n\n showMobileDownloadIfApplicable() {\n //ToDo: WHY>? Why do we have all these checks like this. Need to do something about this.\n const isWaitList = window.location.pathname === '/waitlist';\n\n //Exit if any of these\n if (isWaitList || this.isVerify || this.isReviewApp) {\n return;\n }\n\n if (this.isMobileDevice) {\n this.downloadApp();\n }\n }\n\n private setUpRoutingEventWatcher() {\n this.routingService.addOnEventFunction(() => {\n if (!this.isLoggedIn && this.env.production) {\n fbq('track', 'PageView');\n }\n });\n\n this.bsHubService.listen(RoutingService.DISPATCH_KEY, (data) => {\n const { payload } = data;\n if (payload.event === RoutingServiceDispatchEvent.LAYOUT_CHANGE) {\n this.onAppLayoutStyleEvent(payload.message as LayoutStyle);\n }\n });\n }\n\n // TODO: maybe move this into BsAuthService, or possibly into authservice and run all calls there\n\n logout() {\n this._bsChatService.clearSession();\n this.showLogoutWarningModal = false;\n RegistrationService.clearOnboardingCache();\n this.authService.clearConfirmationState();\n this.messageService.clear();\n this.toastService.deleteAll();\n this.toastService.info(this.signOutMessage);\n // this.isLoggedIn = false;\n // this.isDoneCheckingOnboarding = false;\n // this.isOnboardingComplete = false;\n // this.appLinkSent = false;\n this.onboardingChannelReceived = false;\n this.cacheStorageSvc.clear();\n this.signedOutMessage = this.signOutMessage;\n this.crumbs = [];\n this.analytics.logEvent('sign_out_completed');\n this.idle.stop();\n\n this.bsAuthService.logout().subscribe({\n next: () => {\n\n }\n })\n }\n\n signIn() {\n this.router.navigate(['/sign_in']);\n }\n\n ngOnDestroy(): void {\n this.sub.unsubscribe();\n clearTimeout(this.timeout);\n }\n\n logoClick() {\n if (this.isLoggedIn) {\n this.router.navigate(['/home']);\n } else {\n this.analytics.logEvent('logo tapped');\n window.location.href = '//www.gobrightside.com/employees/';\n }\n }\n\n onAppLayoutStyleEvent(style: LayoutStyle = LayoutStyle.DEFAULT) {\n //Same layout style\n this.mobileLayoutType = style;\n\n if (this.appLayoutStyleEventTimer) {\n window.clearTimeout(this.appLayoutStyleEventTimer);\n }\n\n switch (style) {\n case LayoutStyle.FULL_SCREEN:\n this.isFullScreenLayout = true;\n\n this.appLayoutStyleEventTimer = window.setTimeout(() => {\n this.showMobileDownloadIfApplicable();\n this.featureFlagSvc.getFlag(KnownFeatureFlags.ENABLESALESFORCEMESSAGING)\n .pipe(\n tap(enableSalesforce => {\n if(!enableSalesforce) {\n this.intercom.update({ vertical_padding: 8000 });\n }\n })\n )\n .subscribe();\n\n }, 100);\n break;\n\n case LayoutStyle.PUBLIC_ACCESS:\n this.isFullScreenLayout = true;\n\n this.appLayoutStyleEventTimer = window.setTimeout(() => {\n this.featureFlagSvc.getFlag(KnownFeatureFlags.ENABLESALESFORCEMESSAGING)\n .pipe(\n tap(enableSalesforce => {\n if(!enableSalesforce) {\n this.intercom.update({ vertical_padding: 8000 });\n }\n })\n )\n .subscribe();\n }, 100);\n break;\n\n default:\n this.isFullScreenLayout = false;\n\n this.appLayoutStyleEventTimer = window.setTimeout(() => {\n this.showMobileDownloadIfApplicable();\n this.featureFlagSvc.getFlag(KnownFeatureFlags.ENABLESALESFORCEMESSAGING)\n .pipe(\n tap(enableSalesforce => {\n if(!enableSalesforce) {\n this.intercom.update({ vertical_padding: 0 });\n }\n })\n )\n .subscribe();\n }, 100);\n }\n }\n\n onOnboardingEvent(payload: HubPayload) {\n\n switch (payload.event) {\n case 'SurveyComplete':\n this.loadChat();\n break;\n case 'OnboardingComplete':\n this.isOnboardingComplete = true;\n this.loadChat();\n break;\n case 'GetTheAppComplete':\n this.appLinkSent = true;\n break;\n case 'SignUp':\n break;\n default:\n this.isOnboardingComplete = true;\n }\n }\n\n loadChat() {\n this.featureFlagSvc.getFlag<boolean>(KnownFeatureFlags.ENABLESALESFORCEMESSAGING)\n .pipe(\n tap(enableSalesforce => {\n this._enableSalesforce = enableSalesforce;\n if(enableSalesforce) {\n this._bsChatService.loadChat();\n } else {\n this.loadIntercom();\n this.intercomLauncherFrame();\n }\n })\n )\n .subscribe();\n }\n\n toastClicked($event: Toast) {\n if ($event.type === ToastType.Error) {\n this.bsHubService.dispatch('ErrorChannel', { event: 'RetryEvent', message: 'user clicked toast retry link' });\n } else {\n this.bsHubService.dispatch('ToastChannel', { event: 'ToastEvent', data: $event, message: 'user clicked toast link' });\n }\n }\n\n dismissAutoLogout() {\n // stop idle timers so we can restart the watch later\n this.idle.stop();\n\n // hide warning modal\n this.showLogoutWarningModal = false;\n\n // wait a sec and then reset the interupts and start watching for idle\n this.timeout = window.setTimeout(() => {\n this.setInterrupts();\n this.idle.watch();\n }, 1000);\n }\n\n downloadApp() {\n if (this.deviceService.getDeviceInfo().os === OS.ANDROID) {\n document.location.href = 'https://play.google.com/store/apps/details?id=com.androidapp.gobrightside.mobile';\n } else if (this.deviceService.getDeviceInfo().os === OS.IOS) {\n document.location.href = 'https://itunes.apple.com/us/app/brightsidebenefit/id1250624924?mt=8';\n }\n }\n\n private setInterrupts() {\n // sets the default interrupts, in this case, things like clicks, scrolls, touches to the document\n this.idle.setInterrupts(DEFAULT_INTERRUPTSOURCES);\n }\n\n getCustomerBySubDomain() {\n const hostnameSplit = window.location.hostname.toLowerCase().split('.');\n const domain = hostnameSplit[hostnameSplit.length - 2];\n if (hostnameSplit[0] === 'app' || (domain !== 'gobrightside' && domain !== 'brightsidefinancial')) {\n this.subdomain = '';\n this.customerLanding = false;\n this.showCustomerMessage = true;\n this.customerMessage =\n '*Brightside is an employee benefit. If you’re not sure your company offers Brightside, talk to your HR representative.';\n } else {\n this.subdomain = hostnameSplit[0];\n this.customerLanding = true;\n this.customerName = this.companyRemapping[this.subdomain] ?? this.subdomain;\n this.companyService.setCompany(this.customerName);\n this.bsCacheService.setItem('fromSubdomain', true);\n }\n // this will get picked up for all subdomains, need to do something about it (can we remove?)\n if (this.customerLanding) {\n const customerNameFormatted = this.titleCase.transform(this.customerName);\n\n this.showCustomerMessage = false;\n this.landingHeading = 'BRIGHTSIDE_HEADING_CL';\n this.landingBodyCopy = 'BRIGHTSIDE_BODY_CL';\n this.landingIconGroupTitle = 'BRIGHTSIDE_ICON_TITLE_CL';\n // this.landingHeading = 'Want more money? You’re in the right place.';\n // this.landingBodyCopy = `No matter what your financial needs might be—anything from simply making rent to saving for retirement—Brightside can take care of it. And it’s completely free for ${customerNameFormatted} employees!`;\n // this.landingIconGroupTitle = 'With your expert Brightside Financial Assistant, you can:';\n }\n if (this.subdomain === 'legrand') {\n this.showCustomerMessage = true;\n this.isLegrand = true;\n }\n const subdomains = ['providence', 'caregiver', 'amyskitchen', 'amazon', 'meijer'];\n if (subdomains.includes(this.subdomain)) {\n this.showCustomerMessage = true;\n }\n\n this.fetchCompanyFile();\n }\n\n getTheApp() {\n this.appLinkSent = false;\n this.router.navigate(['/registration', 'get-the-app']);\n }\n\n async intercomLauncherFrame() {\n const launcherClass = 'intercom-launcher-frame';\n const hasBeenClosed = await this.bsCacheService.getItem('INTERCOM_HAS_BEEN_CLOSED_BEFORE');\n const maxRetryAttempts = 5;\n const tryToConnectWatcher = () => {\n setTimeout(() => {\n try {\n const nodeLists = document.getElementsByName(launcherClass);\n const iFrameElement = nodeLists[0] as HTMLIFrameElement;\n const contentDocument = iFrameElement?.contentDocument as HTMLDocument;\n\n contentDocument.removeEventListener(`click`, () => {});\n contentDocument.addEventListener(`click`, (_) => {\n if (hasBeenClosed) return;\n\n this.bsCacheService.setItem('INTERCOM_HAS_BEEN_CLOSED_BEFORE', true, {\n expires: new Date().setFullYear(new Date().getFullYear() + 1),\n });\n });\n } catch (error) {\n if (maxRetryAttempts > 0 && maxRetryAttempts < retriesCompleted) {\n return;\n }\n setTimeout(() => {\n tryToConnectWatcher();\n retriesCompleted++;\n }, 500);\n }\n }, 500);\n };\n let retriesCompleted = 0;\n\n tryToConnectWatcher();\n }\n\n /**\n * This method will check the DOM for the correct iframe and attached listeners as needed\n * withFrame string Target frame name to attach listeners to DEFAULTS to intercom main messenger frame\n * maxRetryAttempts number This should be used to limit the amount of times the DOM will be searched for a given frame DEFAULT 0 will go forever\n *\n * These mappings will come back in sprint 109 queryParams will also need to be covered there\n * ['finsol/deep/savings/autosave/once']: { path: 'home' },\n */\n startIntercomClickWatcher(withFrame: string = 'intercom-messenger-frame', maxRetryAttempts: number = 0) {\n this.nativeToDesktopMapping = this.nativeToDesktopMapping\n ? this.nativeToDesktopMapping\n : this.analytics.remoteConfigMapping();\n\n const logDeepEvent = (redirectTo: string, isError: boolean = false) => {\n this.analytics.logEvent(isError ? 'error' : 'click', {\n action: 'submit',\n page: 'global',\n category: 'deep_link',\n custom: {\n redirect: redirectTo,\n },\n });\n };\n\n const routeMainAppTo = (routeToString: string, routeQueryToString: string) => {\n if (Object.keys(this.nativeToDesktopMapping).includes(routeToString)) {\n const routeToOptions: MappingDetail = this.nativeToDesktopMapping[routeToString] || { path: '' };\n const additionalOptions = { queryParams: {} };\n\n logDeepEvent(routeToOptions.path);\n\n if (routeToOptions.queryParamsType === MappingParamType.AUTO && routeQueryToString) {\n const splitRouteQuery = routeQueryToString.split('&');\n\n additionalOptions.queryParams = splitRouteQuery.reduce((finalParams: { [key: string]: string }, paramValue: string) => {\n const brokenValue = paramValue.split('=');\n\n finalParams[brokenValue[0]] = brokenValue[1];\n\n return finalParams;\n }, {});\n }\n\n //This needs to be run inside angular to correctly handle routing later\n this._ngZone.run(() => {\n this.router.navigate(routeToOptions.path.split('/'), additionalOptions).finally(() => {\n this.featureFlagSvc.getFlag(KnownFeatureFlags.ENABLESALESFORCEMESSAGING)\n .pipe(\n tap(enableSalesforce => {\n if(!enableSalesforce) {\n this.intercom.hide();\n }\n })\n )\n .subscribe();\n });\n });\n } else {\n this.showMobileModal = true;\n logDeepEvent(routeToString, true);\n }\n };\n\n const tryToConnectWatcher = () => {\n setTimeout(() => {\n try {\n const nodeLists = document.getElementsByName(withFrame);\n const iFrameElement = nodeLists[0] as HTMLIFrameElement;\n const contentDocument = iFrameElement?.contentDocument as HTMLDocument;\n\n //If anything is null try to watch again\n if (!nodeLists || !iFrameElement || !contentDocument) {\n this.startIntercomClickWatcher();\n return;\n }\n\n contentDocument.removeEventListener(`click`, () => {});\n contentDocument.addEventListener(`click`, (e: any) => {\n const origin = e.target.closest('a') as HTMLAnchorElement;\n if (origin && origin.href.includes('gobrightside://')) {\n e.preventDefault();\n this.internalLinkRouting.routeToLink(origin.href);\n }\n });\n this.connectedToWatcher = true;\n } catch (error) {\n if (maxRetryAttempts > 0 && maxRetryAttempts < retriesCompleted) {\n return;\n }\n\n setTimeout(() => {\n tryToConnectWatcher();\n\n retriesCompleted++;\n }, 1000);\n }\n }, 1000);\n };\n\n let retriesCompleted = 0;\n\n tryToConnectWatcher();\n }\n\n async checkAndSetupSprig(profile: UserAttributesInterface) {\n const mobileState = await this.bsCacheService.getItem('/client/mobilestate') as MobileStateResponse;\n\n let enableSprig = false;\n\n if (mobileState && mobileState.flags) {\n enableSprig = mobileState.flags.enableSprig;\n } else if (profile.company === 'brightside') {\n enableSprig = true;\n }\n\n if (enableSprig) {\n //ensure these are set, they are getting unset after called.\n this.sprig =\n typeof Sprig === 'function'\n ? Sprig\n : () => {\n console.log(`Sprig not enabled\")`);\n };\n this.globalSetupSpring =\n typeof vanilla_setupSprig === 'function'\n ? vanilla_setupSprig\n : () => {\n console.log(`Sprig not enabled\")`);\n };\n\n console.log(`Enabling sprig...`);\n this.setupSprig();\n this.bsCacheService.getItem(CacheKeys.Guid).then(\n guid => {\n if (this.sprig) {\n console.log(`Setting up email for Sprig`);\n this.sprig('setEmail', profile.email);\n this.sprig('setUserId', guid);\n }\n }\n )\n }\n }\n\n async loadIntercom() {\n const obs = this.bsAuthService.fetchUserAttributes();\n const fromOnboarding = await this.bsCacheService.getItem('fromOnboarding');\n\n this.sub.add(\n obs.subscribe((attribs) => {\n const attributes: UserAttributesInterface = attribs;\n\n this.checkAndSetupSprig(attributes);\n\n const intercomUserId = attributes['intercom_external_id']\n ? attributes['intercom_external_id']\n : attributes.phone_number;\n const regex = /%1\\$s/gi;\n const data = {\n app_id: this.env.intercomAppId,\n // Supports all optional configuration.\n widget: {\n activator: '#intercom',\n },\n name: attributes['first_name'] + ' ' + attributes['last_name'],\n phone: attributes['phone_number'],\n email: attributes['email'],\n user_id: intercomUserId,\n guid: attributes['guid'],\n 'crm link': this.env.crmUrl.replace(regex, attributes['sf_contact_id'] as string),\n hide_default_launcher: false,\n };\n\n this.intercom.boot(data);\n if (fromOnboarding && !this.calledUpdateOwner) {\n this.calledUpdateOwner = true;\n setTimeout(() => {\n this.bsHubService.dispatch('ReportIntercomFirstTime', { event: 'ReportIntercomFirstTime' });\n }, 1000);\n }\n this.intercom.onHide(() => {\n document.getElementById('body')?.classList.remove('intercom-open');\n });\n\n this.intercom.onShow(() => {\n // if fa sends a message and a client opens chat within 15 sec we will attribute the chat to the fa message\n const cutoff = Date.now() - 15000;\n\n setTimeout(() => {\n if (this.chatfashown > cutoff) {\n this.analytics.logEvent('chat_shown', { source: 'fa' }, true);\n } else {\n this.analytics.logEvent('chat_shown', { source: 'client' }, true);\n }\n }, 250);\n\n document.getElementById('body')?.classList.add('intercom-open');\n this.startIntercomClickWatcher();\n });\n\n this.intercom.onUnreadCountChange(() => {\n this.chatfashown = Date.now();\n this.startIntercomClickWatcher('intercom-notifications-frame', 5);\n });\n\n //ToDo: Find smarter way to do this instead of polling :(\n this.startIntercomClickWatcher('intercom-borderless-frame');\n\n },\n err => {\n // catching no active session error\n }\n )\n );\n }\n}\n","import { Component, OnInit } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { ToastService } from '@brightside/brightside-ui-services';\nimport { DeviceDetectorService } from 'ngx-device-detector';\n\nconst VersionTwoIndicator = 'v';\n\n\n@Component({\n selector: 'brightside-web-verify',\n templateUrl: './verify.component.html',\n styleUrls: ['./verify.component.scss']\n})\nexport class VerifyComponent implements OnInit {\n constructor(private router:Router, private route:ActivatedRoute, private toastSvc: ToastService, private deviceService: DeviceDetectorService) { }\n\n ngOnInit(): void {\n const v2 = this.route.snapshot.queryParams[VersionTwoIndicator] === '2';\n const v3 = this.route.snapshot.queryParams[VersionTwoIndicator] === '3';\n\n if ( v3 ) {\n if ( !this.deviceService.isMobile() && !this.deviceService.isTablet() ) {\n this.router.navigate(['/registration', 'create_account']);\n }\n } else if ( v2 ) {\n if ( !this.deviceService.isMobile() && !this.deviceService.isTablet() ) {\n this.toastSvc.success(\"Your email has been confirmed!\");\n this.router.navigate(['/registration', 'create_account']);\n }\n }\n else {\n if (this.route.snapshot.queryParams['id']) {\n\n }\n this.router.navigate(['/registration', 'create_account']);\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n ActivatedRouteSnapshot,\n CanActivate,\n Router,\n RouterStateSnapshot,\n UrlTree\n} from '@angular/router';\nimport { Observable, of} from 'rxjs';\nimport { FirebaseService } from '@brightside-web/desktop/data-access/shared';\nimport {DeviceDetectorService, DeviceInfo, OS} from \"ngx-device-detector\";\n\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ReviewAppGuard implements CanActivate {\n deviceInfo: DeviceInfo;\n\n constructor(\n private analytics: FirebaseService,\n private deviceService: DeviceDetectorService,\n private router: Router,\n ) {\n this.deviceInfo = this.deviceService.getDeviceInfo();\n setTimeout(()=>{\n if (this.deviceInfo.os === OS.ANDROID) {\n document.location.href = 'https://play.google.com/store/apps/details?id=com.androidapp.gobrightside.mobile';\n } else if (this.deviceInfo.os === OS.IOS) {\n document.location.href = 'https://apps.apple.com/app/id1250624924?action=write-review';\n } else {\n this.router.navigate(['/']);\n }\n }, 250);\n }\n\n\n canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {\n this.analytics.logEvent('review app redirect shown');\n return of(true);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { from } from 'rxjs';\nimport {\n AwsApiWrapperService,\n} from '@brightside-web/desktop/data-access/core-services';\n\nexport interface WaitlistPayload {\n last_name:string;\n first_name:string;\n phone_number:string;\n company:string;\n email:string;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class WaitlistService {\n\n constructor(private awsApiWrapperService: AwsApiWrapperService) { }\n\n submitEntry(payload: WaitlistPayload) {\n /**\n {\n \"last_name\": \"tester\",\n \"email\": \"faker@faker.com\",\n \"first_name\": \"Kate\",\n \"phone_number\": \"6028675309\",\n \"company\": \"zappos\"\n }\n */\n return from(this.awsApiWrapperService.post('api-mobile-noauth', '/waitlist', { body: payload }));\n }\n}\n","<bw-panel>\n <section class='flex-column'>\n <ng-container *ngIf='submitted'>\n\n <header>\n <typography title-medium class=\"mb-sm\" >Thanks, {{firstName.value}}!</typography>\n </header>\n <section class='flex-grow'>\n <p text-large-regular class=\"secondary-text mb-md\">You'll receive an email when Brightside becomes available to setup your account</p>\n <div class=\"mb-md\">\n  \n </div>\n <div class='center'>\n <img src=\"../assets/waitlist.svg\" alt=\"Airplane man\" width=\"222\" class=\"mb-xs\">\n </div>\n <div class=\"mb-xl\"></div>\n <!-- can the button be at the bottom? -->\n </section>\n <footer>\n <div class=\"flex-column full-width\">\n <button\n bw-button\n fluidWidth\n type=\"submit\"\n (click)='clearThankYou()'\n [disabled]=\"false\"\n >\n Close\n </button>\n\n </div>\n </footer>\n\n </ng-container>\n <ng-container *ngIf='!submitted'>\n <header>\n <typography title-medium class=\"mb-sm\" *ngIf='!submitted'>Join the waiting list</typography>\n </header>\n <form [formGroup]=\"waitlistForm\" (ngSubmit)=\"onSubmit()\">\n <section>\n <p text-large-regular class=\"secondary-text mb-md\">Please enter your details to be notified when Brightside is available to you</p>\n\n <bw-input\n label=\"First Name\"\n placeholder=\"\"\n formControlName=\"firstName\"\n [inputError]=\"firstName?.invalid && firstName?.touched\"\n inputErrorText=\"Please enter your first name.\"\n minlength=\"2\"\n >\n </bw-input>\n <bw-input\n label=\"Last Name\"\n placeholder=\"\"\n formControlName=\"lastName\"\n [inputError]=\"lastName?.invalid && lastName?.touched\"\n inputErrorText=\"Please enter your last name.\"\n minlength=\"2\">\n </bw-input>\n <bw-input\n label=\"Personal Email\"\n placeholder=\"\"\n type=\"email\"\n required=\"true\"\n formControlName=\"email\"\n [inputError]=\"email?.invalid && email?.touched\"\n inputErrorText=\"Please enter a valid email address.\"\n [pattern]=\"email_pattern\"\n >\n </bw-input>\n <bw-input\n label=\"Mobile Number\"\n [formControlName]=\"'phone'\"\n type=\"text\"\n inputMask=\"000-000-0000\"\n pattern=\"\\d{3}-\\d{3}-\\d{4}\"\n minlength=\"12\"\n maxlength=\"12\"\n >\n </bw-input>\n </section>\n <div class=\"mb-md\"></div>\n <footer>\n <div class=\"flex-column full-width\">\n <button\n bw-button\n fluidWidth\n type=\"submit\"\n [processing]=\"processing\"\n [disabled]=\"waitlistForm.invalid\"\n >\n Submit\n </button>\n\n </div>\n </footer>\n </form>\n </ng-container>\n\n </section>\n</bw-panel>\n","import { Component, OnInit } from '@angular/core';\nimport { FormControl, FormGroup, Validators } from '@angular/forms';\nimport { Subscription } from 'rxjs';\nimport { EMAIL_PATTERN } from '@brightside-web/shared/desktop';\nimport { FirebaseService, RemoteConfig_Companies } from '@brightside-web/desktop/data-access/shared';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { phoneValidator } from '@brightside/brightside-ui';\nimport { WaitlistService } from '../waitlist.service';\nimport { AxiosError } from 'axios';\nimport * as libphonenumber from 'libphonenumber-js/max';\n\n@Component({\n selector: 'brightside-web-waitlist',\n templateUrl: './waitlist.component.html',\n styleUrls: ['./waitlist.component.scss'],\n})\nexport class WaitlistComponent implements OnInit {\n submitted = false;\n public waitlistForm: FormGroup;\n error: boolean;\n processing: boolean;\n sub = new Subscription();\n email_pattern = EMAIL_PATTERN;\n signInModalVisible: boolean;\n showSubmittedModal: boolean;\n company = 'unknown';\n\n _bodyEl = document.getElementsByTagName('body')[0];\n\n constructor(\n protected analytics: FirebaseService,\n protected activatedRoute: ActivatedRoute,\n protected router: Router,\n protected service: WaitlistService\n ) {\n this._bodyEl.classList.add('waitlist', 'brightside', 'signup');\n\n this.waitlistForm = new FormGroup({\n email: new FormControl('', [Validators.required, Validators.email, Validators.pattern(new RegExp(this.email_pattern))]),\n firstName: new FormControl('', [Validators.required, Validators.minLength(2)]),\n lastName: new FormControl('', [Validators.required, Validators.minLength(2)]),\n });\n\n this.waitlistForm.addControl(\n 'phone',\n new FormControl('', [\n Validators.required,\n Validators.minLength(12),\n Validators.maxLength(12),\n Validators.pattern('\\\\d{3}-\\\\d{3}-\\\\d{4}'),\n phoneValidator(),\n ])\n );\n }\n\n ngOnInit(): void {\n if (this.activatedRoute.snapshot.queryParams.customer) {\n this.company = this.activatedRoute.snapshot.queryParams.customer;\n } else if (this.activatedRoute.snapshot.queryParams.company) {\n this.company = this.activatedRoute.snapshot.queryParams.company;\n } else {\n this.company = 'missing';\n }\n\n if (this.company && this.company !== 'missing') {\n this.analytics\n .ensureInitialized()\n .then((_) => {\n if (this.analytics.getValueAsString(RemoteConfig_Companies).includes(this.company)) {\n this.router.navigate(['get_started']);\n }\n });\n }\n\n console.log(`company is ${this.company}`);\n }\n\n clearThankYou() {\n this.waitlistForm.controls['firstName'].reset('');\n this.waitlistForm.controls['lastName'].reset('');\n this.waitlistForm.controls['email'].reset('');\n this.waitlistForm.controls['phone'].reset('');\n\n this.submitted = false;\n }\n\n onSubmit() {\n this.processing = true;\n\n const phone_number = libphonenumber.parseDigits(this.waitlistForm.controls['phone'].value);\n\n this.service\n .submitEntry({\n company: this.company ?? 'unknown',\n first_name: this.waitlistForm.controls['firstName'].value,\n last_name: this.waitlistForm.controls['lastName'].value,\n email: this.waitlistForm.controls['email'].value,\n phone_number,\n })\n .subscribe(\n () => {\n this.processing = false;\n this.handleResponse(true);\n },\n (err: AxiosError) => {\n this.processing = false;\n this.handleResponse(false);\n }\n );\n }\n\n handleResponse(success: boolean) {\n this.submitted = true;\n }\n\n get email() {\n return this.waitlistForm.get('email');\n }\n\n get firstName() {\n return this.waitlistForm.get('firstName');\n }\n\n get lastName() {\n return this.waitlistForm.get('lastName');\n }\n\n get phone() {\n return this.waitlistForm.get('phone');\n }\n}\n","import { Injector } from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport {\n CONTROL_DOB,\n CONTROL_EMAIL,\n CONTROL_FNAME,\n CONTROL_LAST_FOUR,\n CONTROL_LNAME,\n CONTROL_PHONE,\n DisplayCardsComponent,\n DisplayFormComponent,\n DisplayFormProcessResponse, HouseholdInviteGuard\n} from '@brightside-web/shared/desktop';\nimport { InviteHouseholdCache, InviteReferralType, InviteService, InviteType } from '@brightside-web/desktop/data-access/shared';\nimport { ToastService } from '@brightside/brightside-ui-services';\n\nimport { Observable } from 'rxjs';\nimport * as libphonenumber from 'libphonenumber-js/max';\n\nconst sendConfirmToast = (toastService: ToastService) => {\n if (toastService) {\n toastService.info(INVITE_SUCCESS_MESSAGE, {\n key: 'confirmInviteToast',\n transient: true,\n });\n }\n};\n\nconst INVITE_SUCCESS_MESSAGE = 'Your invite has been sent';\nconst INVITE_ERROR_MESSAGE = 'It looks like we could not send this invite right now.';\n\nconst BREADCRUMB_LABEL = 'Invite';\n\nconst ROUTES_PATH = 'invite';\nconst ROUTES = [\n {\n path: '',\n canActivate: [],\n component: DisplayCardsComponent,\n data: {\n breadcrumb: { skip: true },\n pageConfig: {\n fbPage: 'home',\n fbCategory: 'invite',\n fbEventName: 'invite_shown',\n pageTitleKey: 'INVITE_HALFSHEET_TITLE',\n pageCards: [\n {\n key: 'householdCard',\n ctaPath: `${ROUTES_PATH}/household/info`,\n titleKey: 'INVITE_HOUSEHOLD_MEMBER',\n textKey: 'INVITE_INTRO_TITLE',\n },\n {\n key: 'colleagueCard',\n ctaPath: `${ROUTES_PATH}/colleague/phone`,\n titleKey: 'INVITE_COLLEAGUE',\n textKey: 'REFERRAL_SUBTITLE',\n },\n ],\n\n pageHideBackButton: true,\n },\n },\n },\n {\n path: 'colleague',\n data: { breadcrumb: { label: 'Invite', routeInterceptor: () => `/${ROUTES_PATH}` } },\n children: [\n {\n path: 'phone',\n canActivate: [],\n component: DisplayFormComponent,\n data: {\n breadcrumb: 'Colleague',\n pageConfig: {\n fbPage: 'colleague',\n fbCategory: 'invite',\n fbEventName: 'invite_colleague',\n pageTitleKey: 'INVITE_COLLEAGUE_DETAILS_TITLE',\n pageSubTitleKey: 'INVITE_COLLEAGUE_DETAILS_DESC',\n pageCtaLabelKey: 'SEND_INVITE',\n pageCtaEventName: 'invite_colleague_tapped',\n pageFormControls: [\n { ...CONTROL_FNAME, errorTextKey: 'ERROR_COLLEAGUE_INVITE_FIRSTNAME_WEB' },\n {\n ...CONTROL_PHONE,\n errorTextKey: 'ERROR_COLLEAGUE_INVITE_PHONE_WEB',\n inputOptions: {\n ...CONTROL_PHONE.inputOptions,\n link: {\n path: [ROUTES_PATH, 'colleague', 'email'],\n textKey: 'INVITE_VIA_EMAIL',\n },\n },\n },\n ],\n\n pageOnForwardCtaPath: [ROUTES_PATH],\n pageOnBackCtaPath: [ROUTES_PATH],\n\n processUpdater: (injector: Injector, form: FormGroup) => {\n const observable = new Observable<DisplayFormProcessResponse>((subscriber) => {\n const inviteService: InviteService = injector.get(InviteService);\n const fName = form.get(CONTROL_FNAME.key)?.value;\n const phone = libphonenumber.parseDigits(form.get(CONTROL_PHONE.key)?.value);\n\n inviteService\n .sendSMS({\n referredClientName: fName,\n type: InviteType.SMS,\n referralType: InviteReferralType.CLIENT,\n sms: phone,\n })\n .subscribe(\n () => {\n sendConfirmToast(injector.get(ToastService));\n\n subscriber.next({ status: 'success' });\n subscriber.complete();\n },\n (_) => {\n subscriber.next({ status: 'failed', errorMessage: INVITE_ERROR_MESSAGE });\n subscriber.complete();\n }\n );\n });\n\n return observable;\n },\n },\n },\n },\n {\n path: 'email',\n canActivate: [],\n component: DisplayFormComponent,\n data: {\n breadcrumb: 'Colleague',\n pageConfig: {\n fbPage: 'colleague',\n fbCategory: 'invite',\n fbEventName: 'invite_colleague_email',\n pageTitleKey: 'INVITE_COLLEAGUE_DETAILS_TITLE',\n pageSubTitleKey: 'INVITE_COLLEAGUE_DETAILS_DESC',\n pageCtaLabelKey: 'SEND_INVITE',\n\n pageFormControls: [\n { ...CONTROL_FNAME, errorTextKEY: 'ERROR_COLLEAGUE_INVITE_FIRSTNAME_WEB' },\n {\n ...CONTROL_EMAIL,\n errorTextKey: 'ERROR_COLLEAGUE_INVITE_EMAIL_WEB',\n inputOptions: {\n ...CONTROL_EMAIL.inputOptions,\n link: {\n path: [ROUTES_PATH, 'colleague', 'phone'],\n textKEY: 'INVITE_VIA_SMS',\n },\n },\n },\n ],\n\n pageOnForwardCtaPath: [ROUTES_PATH],\n pageOnBackCtaPath: [ROUTES_PATH, 'colleague', 'phone'],\n\n processUpdater: (injector: Injector, form: FormGroup) =>\n new Observable<DisplayFormProcessResponse>((subscriber) => {\n const inviteService: InviteService = injector.get(InviteService);\n const fName = form.get(CONTROL_FNAME.key)?.value;\n const email = form.get(CONTROL_EMAIL.key)?.value;\n\n inviteService\n .sendEmail({\n referredClientName: fName,\n type: InviteType.EMAIL,\n referralType: InviteReferralType.CLIENT,\n email: email,\n })\n .subscribe(\n () => {\n sendConfirmToast(injector.get(ToastService));\n\n subscriber.next({ status: 'success' });\n subscriber.complete();\n },\n (_) => {\n subscriber.next({ status: 'failed', errorMessage: INVITE_ERROR_MESSAGE });\n subscriber.complete();\n }\n );\n }),\n },\n },\n },\n ],\n },\n {\n path: 'household',\n data: { breadcrumb: { label: 'Invite', routeInterceptor: () => `/${ROUTES_PATH}` } },\n canActivate: [HouseholdInviteGuard],\n children: [\n {\n path: 'info',\n canActivate: [],\n component: DisplayFormComponent,\n data: {\n breadcrumb: 'Household member',\n pageConfig: {\n fbPage: 'household',\n fbCategory: 'invite',\n fbEventName: 'invite_household',\n pageTitleKey: 'INVITE_TITLE',\n pageSubTitleKey: 'INVITE_INTRO_DESC',\n pageCtaLabelKey: 'BUTTON_CONTINUE',\n pageCtaEventName: 'invite_household_tapped',\n pageFormControls: [\n { ...CONTROL_FNAME, errorTextKey: 'ERROR_INVITE_FIRST_NAME' },\n { ...CONTROL_LNAME, errorTextKey: 'ERROR_INVITE_LAST_NAME' },\n { ...CONTROL_DOB, errorTextKey: 'ERROR_INVITE_DOB' },\n { ...CONTROL_LAST_FOUR, errorTextKey: 'ERROR_INVITE_SSN' },\n ],\n\n pageOnForwardCtaPath: [ROUTES_PATH, 'household', 'phone'],\n pageOnBackCtaPath: [ROUTES_PATH],\n\n processUpdater: (injector: Injector, form: FormGroup) =>\n new Observable<DisplayFormProcessResponse>((subscriber) => {\n const inviteService: InviteService = injector.get(InviteService);\n const householdInfo: InviteHouseholdCache = {\n fName: form.get(CONTROL_FNAME.key)?.value || '',\n lName: form.get(CONTROL_LNAME.key)?.value || '',\n dateOfBirth: form.get(CONTROL_DOB.key)?.value || '',\n lastFourSSN: form.get(CONTROL_LAST_FOUR.key)?.value || '',\n };\n\n inviteService.saveDependent(householdInfo).subscribe(\n () => {\n subscriber.next({ status: 'success' });\n subscriber.complete();\n },\n (error) => {\n let errorMessage = '';\n\n if (error.response.data.statusCode === 409) {\n errorMessage = error.response.data.errorMessage || '';\n }\n\n subscriber.next({ status: 'failed', errorMessage });\n subscriber.complete();\n }\n );\n }),\n },\n },\n },\n {\n path: 'phone',\n canActivate: [],\n component: DisplayFormComponent,\n data: {\n breadcrumb: 'Household member',\n pageConfig: {\n fbPage: 'household-phone',\n fbCategory: 'invite',\n fbEventName: 'invite_household_phone',\n pageTitleKey: 'INVITE_TITLE',\n pageSubTitleKey: 'ENTER_RECIPIENTS_PHONE',\n pageCtaLabelKey: 'SEND_INVITE',\n\n pageOnForwardCtaPath: [ROUTES_PATH],\n pageOnBackCtaPath: [ROUTES_PATH, 'household', 'info'],\n\n pageFormControls: [\n {\n ...CONTROL_PHONE,\n inputOptions: {\n ...CONTROL_PHONE.inputOptions,\n link: {\n path: [ROUTES_PATH, 'household', 'email'],\n textKey: 'INVITE_VIA_EMAIL',\n },\n },\n },\n ],\n\n processUpdater: (injector: Injector, form: FormGroup) => {\n const observable = new Observable<DisplayFormProcessResponse>((subscriber) => {\n const inviteService: InviteService = injector.get(InviteService);\n InviteService.getPreCacheHousehold().then(\n cachedInfo => {\n const phone = libphonenumber.parseDigits(form.get(CONTROL_PHONE.key)?.value);\n\n inviteService\n .sendSMS({\n referredClientName: cachedInfo.fName,\n type: InviteType.SMS,\n referralType: InviteReferralType.HOUSEHOLD,\n sms: phone,\n })\n .subscribe(\n () => {\n sendConfirmToast(injector.get(ToastService));\n\n subscriber.next({ status: 'success' });\n subscriber.complete();\n },\n (error) => {\n subscriber.next({ status: 'failed', errorMessage: INVITE_ERROR_MESSAGE });\n subscriber.complete();\n }\n );\n }\n )\n });\n\n return observable;\n },\n },\n },\n },\n {\n path: 'email',\n canActivate: [],\n component: DisplayFormComponent,\n data: {\n breadcrumb: 'Household member',\n pageConfig: {\n fbPage: 'household-phone',\n fbCategory: 'invite',\n fbEventName: 'invite_household_email',\n pageTitleKey: 'INVITE_TITLE',\n pageSubTitleKey: 'ENTER_RECIPIENTS_EMAIL',\n pageCtaLabelKey: 'SEND_INVITE',\n\n pageOnForwardCtaPath: [ROUTES_PATH],\n pageOnBackCtaPath: [ROUTES_PATH, 'household', 'phone'],\n\n pageFormControls: [\n {\n ...CONTROL_EMAIL,\n inputOptions: {\n ...CONTROL_EMAIL.inputOptions,\n link: {\n path: [ROUTES_PATH, 'household', 'phone'],\n textKey: 'INVITE_VIA_SMS',\n },\n },\n },\n ],\n\n processUpdater: (injector: Injector, form: FormGroup) => {\n const observable = new Observable<DisplayFormProcessResponse>((subscriber) => {\n const inviteService: InviteService = injector.get(InviteService);\n InviteService.getPreCacheHousehold().then(\n cachedInfo => {\n const email = form.get(CONTROL_EMAIL.key)?.value;\n\n inviteService\n .sendEmail({\n referredClientName: cachedInfo.fName,\n type: InviteType.EMAIL,\n referralType: InviteReferralType.HOUSEHOLD,\n email: email,\n })\n .subscribe(\n () => {\n sendConfirmToast(injector.get(ToastService));\n\n subscriber.next({ status: 'success' });\n subscriber.complete();\n },\n (error) => {\n subscriber.next({ status: 'failed', errorMessage: INVITE_ERROR_MESSAGE });\n subscriber.complete();\n }\n );\n }\n )\n });\n\n return observable;\n },\n },\n },\n },\n ],\n },\n];\n\nexport { BREADCRUMB_LABEL, ROUTES_PATH, ROUTES };\n","import { NgModule } from '@angular/core';\nimport { PreloadAllModules, RouterModule, Routes } from '@angular/router';\nimport {\n AuthGuard,\n DisplayLoaderComponent,\n GuidGuard,\n OnboardingCompleteGuard,\n ProductVerificationGuard,\n RequiredVerificationGuard,\n SequentialGuard,\n SequentialGuardMode,\n} from '@brightside-web/shared/desktop';\n\nimport { VerifyComponent } from './verify/verify.component';\n\n//NOTE: all canLoad guards here must also be applied as canActivate guards in the modules\n// see https://stackoverflow.com/questions/43933595/angular2-authguard-not-working-when-using-browser-navigation-buttons\nimport { BsCacheService, FeatureFlagKillSwitchGuard } from '@brightside-web/desktop/data-access/core-services';\nimport { ReviewAppGuard } from './review-app.guard';\nimport { WaitlistComponent } from './waitlist/waitlist.component';\n\nimport { LayoutStyle } from './routing.service';\n\nimport {\n BREADCRUMB_LABEL as INVITE_BREADCRUMB_LABEL,\n ROUTES as INVITE_ROUTES,\n ROUTES_PATH as INVITE_ROUTES_PATH,\n} from './routes/invite';\n\nimport { HasTermsUpdateGuard } from '@brightside-web/micro/terms-update';\nimport { KnownFeatureFlags } from '@brightside-web/desktop/data-access/shared';\nimport { SharedDisplayWaitingComponent } from '@brightside-web/shared/display';\nimport { MaintenanceGuard, MaintenanceProductType } from '@brightside-web/desktop/feature/maintenance';\nimport { ExternalLendersGuard } from '@brightside-web/desktop/feature/external-lenders';\n\nconst microAppRoutes = [\n {\n path: 'financialsnapshot',\n data: { breadcrumb: { skip: true } },\n loadChildren: () => import('@brightside-web/micro/financial-snapshot').then((m) => m.MicroFinancialSnapshotModule),\n canLoad: [AuthGuard],\n },\n {\n path: 'helping-hands',\n data: { product: MaintenanceProductType.HelpingHands, breadcrumb: { skip: true } },\n canLoad: [AuthGuard, OnboardingCompleteGuard, MaintenanceGuard],\n canActivate: [AuthGuard, MaintenanceGuard],\n loadChildren: () => import('@brightside-web/micro/helping-hands').then((m) => m.MicroHelpingHandsModule),\n },\n {\n path: 'mpap',\n data: { product: MaintenanceProductType.Mpap, breadcrumb: { skip: true } },\n canLoad: [AuthGuard, OnboardingCompleteGuard, MaintenanceGuard],\n canActivate: [AuthGuard, MaintenanceGuard],\n loadChildren: () => import('@brightside-web/micro/mpap').then((m) => m.MicroMpapModule),\n },\n {\n path: 'terms-update',\n data: { product: MaintenanceProductType.TermsUpdate, breadcrumb: { skip: true }, appDisplayStyle: LayoutStyle.FULL_SCREEN },\n canLoad: [AuthGuard, HasTermsUpdateGuard, MaintenanceGuard],\n loadChildren: () => import('@brightside-web/micro/terms-update').then((m) => m.MicroTermsUpdateModule),\n },\n {\n //Please pass the forwarding path in the query param like: ?pageOnForwardCtaPath=<route>\n path: 'loader',\n component: DisplayLoaderComponent,\n data: {\n breadcrumb: { skip: true },\n pageConfig: {\n fbPage: 'loader',\n fbCategory: 'pls-loader',\n pageOnForwardCtaPath: [],\n },\n },\n },\n {\n path: 'financialsnapshot-loader',\n component: DisplayLoaderComponent,\n data: {\n breadcrumb: { skip: true },\n pageConfig: {\n fbPage: 'loader',\n fbCategory: 'financial-snapshot',\n pageOnForwardCtaPath: ['financialsnapshot', 'intro'],\n },\n },\n },\n];\n\nconst accountRoutes: Routes = [\n {\n path: 'accounts',\n canLoad: [AuthGuard, OnboardingCompleteGuard],\n canActivate: [AuthGuard, OnboardingCompleteGuard],\n children: [\n {\n path: 'savings',\n loadChildren: () =>\n import('@brightside-web/desktop/feature/savings-account').then((m) => m.DesktopFeatureSavingsAccountModule),\n canLoad: [MaintenanceGuard],\n canActivate: [MaintenanceGuard],\n data: {\n breadcrumb: 'SAVINGS',\n product: MaintenanceProductType.Savings,\n },\n },\n {\n path: 'spending',\n loadChildren: () =>\n import('@brightside-web/desktop/feature/spending-account').then((m) => m.DesktopFeatureSpendingAccountModule),\n canLoad: [MaintenanceGuard],\n canActivate: [MaintenanceGuard],\n data: {\n breadcrumb: 'SPENDING',\n product: MaintenanceProductType.Spending,\n },\n },\n {\n path: 'external',\n loadChildren: () =>\n import('@brightside-web/desktop/feature/external-accounts').then((m) => m.DesktopFeatureExternalAccountsModule),\n canLoad: [MaintenanceGuard],\n canActivate: [MaintenanceGuard],\n data: {\n product: MaintenanceProductType.External,\n },\n },\n {\n path: 'transfer-funds',\n loadChildren: () =>\n import('@brightside-web/desktop/feature/new-transfer-funds').then((m) => m.DesktopFeatureNewTransferFundsModule),\n canLoad: [MaintenanceGuard],\n canActivate: [MaintenanceGuard],\n },\n {\n path: 'loans',\n loadChildren: () =>\n import('@brightside-web/desktop/feature/loans').then((m) => m.DesktopFeatureLoansModule),\n canLoad: [MaintenanceGuard],\n canActivate: [MaintenanceGuard],\n data: {\n product: MaintenanceProductType.Loans,\n },\n },\n ],\n },\n];\n\n\nconst routes: Routes = [\n ...microAppRoutes,\n ...accountRoutes,\n {\n path: 'lender-alternatives',\n loadChildren: () =>\n import('@brightside-web/desktop/feature/external-lenders').then((m)=>m.DesktopFeatureExternalLendersModule),\n canLoad: [AuthGuard, OnboardingCompleteGuard, ExternalLendersGuard, FeatureFlagKillSwitchGuard],\n canActivate: [AuthGuard, OnboardingCompleteGuard, ExternalLendersGuard, FeatureFlagKillSwitchGuard],\n data: {\n featureFlagInfo: {\n flag: KnownFeatureFlags.ENABLELENDERALTERNATIVES\n }\n }\n },\n {\n path: 'maintenance',\n loadChildren: () =>\n import('@brightside-web/desktop/feature/maintenance').then((m)=>m.DesktopFeatureMaintenanceModule),\n },\n {\n path: 'chathistory',\n loadChildren: () =>\n import('@brightside-web/desktop/feature/chat-history').then((m)=> m.DesktopFeatureChatHistoryModule),\n canLoad: [AuthGuard, OnboardingCompleteGuard],\n canActivate: [AuthGuard],\n },\n {\n path: 'eligibility',\n loadChildren: () =>\n import('@brightside-web/desktop/feature/user-eligibility').then((m) => m.DesktopFeatureUserEligibilityModule),\n },\n {\n path: 'registration',\n loadChildren: () => import('@brightside-web/desktop/feature/registration').then((m) => m.DesktopFeatureRegistrationModule),\n },\n {\n path: 'onboarding',\n loadChildren: () => import('@brightside-web/desktop/feature/onboarding').then((m) => m.DesktopFeatureOnboardingModule),\n canLoad: [RequiredVerificationGuard, AuthGuard],\n canActivate: [AuthGuard],\n data: { appDisplayStyle: LayoutStyle.FULL_SCREEN },\n },\n {\n path: 'credit',\n loadChildren: () => import('@brightside-web/desktop/feature/credit').then((m) => m.DesktopFeatureCreditModule),\n canLoad: [AuthGuard, MaintenanceGuard],\n canActivate: [AuthGuard, MaintenanceGuard],\n data: { product: MaintenanceProductType.Credit, breadcrumb: { label: 'Home', routeInterceptor: () => '/home' } },\n },\n {\n path: 'credit-setup',\n loadChildren: () => import('@brightside-web/desktop/feature/credit-setup').then((m) => m.DesktopFeatureCreditSetupModule),\n canLoad: [AuthGuard, MaintenanceGuard],\n canActivateChild: [FeatureFlagKillSwitchGuard, ProductVerificationGuard],\n canActivate: [AuthGuard, MaintenanceGuard],\n data: {\n breadcrumb: { label: 'Home', routeInterceptor: () => '/home' },\n featureFlagInfo: {\n flag: KnownFeatureFlags.CREDITSETUP,\n },\n product: MaintenanceProductType.Credit\n },\n resolve: {\n appDisplayStyle: 'CreditLayoutResolver',\n },\n },\n {\n path: 'home',\n loadChildren: () => import('@brightside-web/desktop/feature/home').then((m) => m.DesktopFeatureHomeModule),\n canLoad: [AuthGuard],\n canActivate: [AuthGuard, SequentialGuard],\n data: {\n breadcrumb: 'Home',\n appDisplayStyle: LayoutStyle.DEFAULT,\n guards: [GuidGuard, OnboardingCompleteGuard],\n guardsRelation: SequentialGuardMode.AND,\n },\n },\n {\n //https://netbasal.com/give-your-modals-url-address-with-auxiliary-routes-in-angular-eb76497c0bca\n path: 'settings',\n outlet: 'modal',\n loadChildren: () => import('@brightside-web/desktop/feature/settings').then((m) => m.DesktopFeatureSettingsModule),\n canLoad: [AuthGuard],\n canActivate: [AuthGuard],\n },\n {\n path: 'ways-we-can-help',\n canLoad: [AuthGuard],\n canActivate: [AuthGuard],\n loadChildren: () => import('@brightside-web/desktop/feature/wwch').then((m) => m.DesktopFeatureWwchModule),\n data: { breadcrumb: 'Ways we can help' },\n },\n {\n path: 'verification',\n loadChildren: () => import('@brightside-web/desktop/feature/verification').then((m) => m.DesktopFeatureVerificationModule),\n },\n {\n path: 'program',\n canLoad: [AuthGuard, OnboardingCompleteGuard],\n loadChildren: () => import('@brightside-web/desktop/feature/programs').then((m) => m.DesktopFeatureProgramsModule),\n },\n {\n path: 'survey',\n loadChildren: () =>\n import('@brightside-web/desktop/feature/survey-questionnaire').then((m) => m.DesktopFeatureSurveyQuestionnaireModule),\n canLoad: [AuthGuard, OnboardingCompleteGuard, MaintenanceGuard],\n canActivate: [AuthGuard, OnboardingCompleteGuard, MaintenanceGuard],\n data: {product: MaintenanceProductType.Survey}\n },\n {\n path: 'pls',\n loadChildren: () =>\n import('@brightside-web/desktop/feature/prize-link-savings').then((m) => m.DesktopFeaturePrizeLinkSavingsModule),\n canLoad: [AuthGuard, OnboardingCompleteGuard, MaintenanceGuard],\n canActivate: [AuthGuard, OnboardingCompleteGuard, MaintenanceGuard],\n data: {product: MaintenanceProductType.Contest}\n },\n {\n path: 'contest-legal/sweepstakes-amoe',\n loadComponent: () => import('@brightside-web/desktop/feature/prize-link-savings')\n .then((c) => c.SweepstakesAmoeComponent),\n data: { appDisplayStyle: LayoutStyle.PUBLIC_ACCESS }\n },\n {\n path: 'find-money',\n loadChildren: () => import('@brightside-web/desktop/feature/find-money').then((m) => m.DesktopFeatureFindMoneyModule),\n canLoad: [AuthGuard, OnboardingCompleteGuard,MaintenanceGuard],\n canActivate: [AuthGuard, OnboardingCompleteGuard,MaintenanceGuard],\n data: {product: MaintenanceProductType.FindMoney}\n },\n {\n path: INVITE_ROUTES_PATH,\n canLoad: [AuthGuard],\n canActivate: [AuthGuard],\n children: INVITE_ROUTES,\n data: { breadcrumb: INVITE_BREADCRUMB_LABEL },\n },\n { path: 'sign_in', redirectTo: 'registration/sign_in' },\n { path: 'get_started', redirectTo: 'registration/create-account' },\n { path: 'verify', component: VerifyComponent },\n { path: 'waitlist', component: WaitlistComponent, data: { appDisplayStyle: LayoutStyle.PUBLIC_ACCESS } },\n {\n path: 'review-app',\n canActivate: [ReviewAppGuard],\n component: DisplayLoaderComponent,\n data: { appDisplayStyle: LayoutStyle.PUBLIC_ACCESS },\n },\n {\n path: 'setupcredit',\n redirectTo: 'credit-setup/creation',\n },\n {\n path: 'savings' /* the default card route ? */,\n redirectTo: 'home/savings',\n },\n {\n path: 'contestintro',\n redirectTo: 'pls/contest-intro',\n },\n {\n path: 'loans/dashboard',\n redirectTo: 'accounts/loans/dashboard'\n },\n {\n path: 'authenticating',\n component: SharedDisplayWaitingComponent,\n data: {\n config: { pageHideBackButton: true },\n },\n },\n { path: '**', redirectTo: 'registration/create-account' },\n];\n\n@NgModule({\n imports: [RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })],\n exports: [RouterModule],\n providers: [\n {\n provide: 'CreditLayoutResolver',\n useFactory: creditLayoutResolverFactory,\n },\n ],\n})\nexport class AppRoutingModule {}\n\nexport function creditLayoutResolverFactory() {\n // This will return a function that returns a promise\n return () =>\n BsCacheService.getItemStatic('ONBOARDING_FLOW_ACTIVE').then((active: any) =>\n active === true ? LayoutStyle.FULL_SCREEN : LayoutStyle.DEFAULT\n );\n}\n","import { Environment } from '@brightside-web/micro/core/environment';\n\n/**\n * PLEASE DO NOT ADD ANYTHING HERE THAT CAN BE FETCHED FROM FIREBASE REMOTE CONFIG\n * THIS SHOULD ONLY BE FOR INITIALIZING SERVICES THAT CANNOT DEPEND ON FRC BEING AVAILABLE YET\n */\nexport const env = {\n awsConnectSnippetId:\n 'QVFJREFIZ2FmaHlLVlhzMXdOM213U09zSVJiNFhEdjVTNFI4YWdlakN5c2NqL2w4R2dINHczb3IwOFZJOEpyZ1haNE9JUmE0QUFBQWJqQnNCZ2txaGtpRzl3MEJCd2FnWHpCZEFnRUFNRmdHQ1NxR1NJYjNEUUVIQVRBZUJnbGdoa2dCWlFNRUFTNHdFUVFNSURLMEdOcld5cEpGd1JkdUFnRVFnQ3Znb2x6djRXN3RSQzhoRnBCNnJ6cWw5d1F0eUJacXAzTUpRWXNldDVqVjIrRVVaWXllVnlVaE9TN3A6Om1FZ1lYRUcxWWR5azUyVDN4bEhSNHpnTDI2c0o3ak53c3NPOERMN3dTL2JLZ3hHV2RiOTZXZUYyMGxYYnFaUGI3NFBNVVh1eXpDamFOQUNiYVFYT0Y0L1N6Rm4vY3RqMWdrVFgzeUxvUkUxL3M0cGNWcHNIYmFHdmkwWC95R1pwNHNHWXdXY3pGYnJDNHd2SHVGMU5mSUlpVXByTDFCMD0=',\n awsConnectWidgetId: '9aadd46f-a8f8-457a-853a-b5ebe59e23de',\n sprigId: 'Q1EPELlXcF',\n hostedDomain: 'gobrightside',\n amplitude: {\n apiKey: 'ae415196f49971fcdbe49870c2a2e936',\n },\n awsmobile: {\n aws_project_region: 'us-west-2',\n endpoints: {\n 'api-mobile': {\n name: 'api-mobile',\n endpoint: 'https://api2.gobrightside.com/v1',\n },\n 'api-mobile-noauth': {\n name: 'api-mobile-noauth',\n endpoint: 'https://api2.gobrightside.com/v1',\n },\n 'cdn-mobile-noauth': {\n name: 'cdn-mobile-noauth',\n endpoint: 'https://cdn.gobrightside.com',\n },\n },\n },\n performance: {\n sentry: {\n dsn: 'https://a6017af255a6428b81626003a57ba2cc@o4505166779187200.ingest.sentry.io/4505166830895104',\n environment: \"prod\",\n },\n },\n crmUrl: 'https://brightsidebenefit.lightning.force.com/lightning/r/Contact/%1$s/view',\n cdnUrl: 'https://cdn.gobrightside.com/',\n firebase: {\n apiKey: 'AIzaSyDQ0ig6nM9ZHo_ZSfUSpcojgCyNxfaUgvo',\n authDomain: 'healhtydollar-android.firebaseapp.com',\n databaseURL: 'https://healhtydollar-android.firebaseio.com',\n projectId: 'healhtydollar-android',\n storageBucket: 'healhtydollar-android.appspot.com',\n messagingSenderId: '812435151064',\n appId: '1:812435151064:web:0a24b1f19f1c8233005fad',\n measurementId: 'G-6KZ5ZTH1T3',\n },\n intercomAppId: 't6b4cxfz',\n googleTagManagerId: 'GTM-PCSDF63',\n googleTrackingId: 'UA-113184142-9',\n production: true,\n baseEnv: '',\n featureFlags: {},\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n appVersion: require('package.json').version,\n featureFlagApp: {\n clientSideId: '6543e85e4997e61321f7598b'\n },\n smfaDynamicLink: 'https://link.gobrightside.com/verify-smfa',\n socure: '4ef684c2-c297-4e39-9514-41b6b9b5e0e0',\n auth0: {\n domain: 'login.gobrightside.com',\n clientId: 'U1ryflUsWSIRrKqUclvJ37pSlfGfdvti',\n audience: 'https://api2.gobrightside.com/v1/'\n },\n chat: {\n organizationId: '00D1N000002bRM8',\n developerName: 'Messaging_for_Web',\n url: 'https://brightsidebenefit.my.site.com/ESWMessagingforWeb1730307039579',\n scrt2URL: 'https://brightsidebenefit.my.salesforce-scrt.com',\n chatScript: 'https://brightsidebenefit.my.site.com/ESWMessagingforWeb1730307039579/assets/js/bootstrap.min.js'\n }\n};\nclass EnvironmentImpl implements Environment {\n auth0 = env.auth0;\n awsConnectSnippetId = env.awsConnectSnippetId;\n awsConnectWidgetId = env.awsConnectWidgetId;\n hostedDomain = env.hostedDomain;\n awsmobile = env.awsmobile;\n intercomAppId = env.intercomAppId;\n production = env.production;\n baseEnv = env.baseEnv;\n firebase = env.firebase;\n crmUrl = env.crmUrl;\n cdnUrl = env.cdnUrl;\n googleTagManagerId = env.googleTagManagerId;\n googleTrackingId = env.googleTrackingId;\n sprigId = env.sprigId;\n featureFlags = env.featureFlags;\n amplitude = env.amplitude;\n appVersion = env.appVersion;\n performance = env.performance;\n featureFlagApp = env.featureFlagApp;\n smfaDynamicLink = env.smfaDynamicLink;\n socure = env.socure;\n chat = env.chat;\n}\nexport const environment = new EnvironmentImpl();\n","class TranslateHttpLoader {\r\n constructor(http, prefix = \"/assets/i18n/\", suffix = \".json\") {\r\n this.http = http;\r\n this.prefix = prefix;\r\n this.suffix = suffix;\r\n }\r\n /**\r\n * Gets the translations from the server\r\n */\r\n getTranslation(lang) {\r\n return this.http.get(`${this.prefix}${lang}${this.suffix}`);\r\n }\r\n}\n\n/**\r\n * Generated bundle index. Do not edit.\r\n */\n\nexport { TranslateHttpLoader };\n","import { BrowserModule } from '@angular/platform-browser';\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\nimport { ErrorHandler, NgModule, NgZone } from '@angular/core';\nimport { Router, RouteReuseStrategy } from '@angular/router';\n\nimport { CurrencyPipe, TitleCasePipe } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { NgIdleModule } from '@ng-idle/core';\nimport { TraceService } from '@sentry/angular';\nimport { DesktopDataAccessCoreServicesModule } from \"@brightside-web/desktop/data-access/core-services\";\nimport { BrightsideUiModule, NgxMaskModule, ngxMaskOptions, MessageService } from '@brightside/brightside-ui';\nimport {\n DesktopDataAccessSharedModule,\n FirebaseAnalyticsService,\n FirebaseService,\n AmplitudeService,\n BrightsideTranslateService,\n CompanyService,\n StatusNotificationsService,\n} from '@brightside-web/desktop/data-access/shared';\nimport { BsErrorHandler, SharedDesktopModule } from '@brightside-web/shared/desktop';\nimport { BrightsideUiServicesModule } from '@brightside/brightside-ui-services';\nimport { MicroMessageBusModule, MessageBusIncomingService } from '@brightside-web/micro/core/message-bus';\nimport { Environment } from '@brightside-web/micro/core/environment';\n\nimport { IntercomModule } from 'ng-intercom';\n\nimport { AppComponent } from './app.component';\nimport { AppRoutingModule } from './app-routing.module';\nimport { VerifyComponent } from './verify/verify.component';\nimport { env, environment } from '../environments/environment';\nimport { WaitlistComponent } from './waitlist/waitlist.component';\nimport { WaitlistService } from './waitlist.service';\nimport { RoutingService } from './routing.service';\nimport { SharedMobileModule } from '@brightside-web/shared/mobile';\n\nimport {HttpClient, HttpClientModule} from \"@angular/common/http\";\nimport {TranslateHttpLoader} from \"@ngx-translate/http-loader\";\nimport {TranslateLoader, TranslateModule, TranslateService} from \"@ngx-translate/core\";\nimport {\n LanguageSelectionModule\n} from \"@brightside-web/desktop/feature/language-selection\";\n\nimport { BsApiService, FeatureFlagService } from \"@brightside-web/desktop/data-access/core-services\";\n\nimport { SimpleGlobalModalComponent } from \"./global-modal/simple-global-modal.component\";\n\nimport {DesktopFeatureFinancialAccountsCoreModule} from \"@brightside-web/desktop/feature/financial-accounts-core\";\n\nimport { BsHubService, BsAuthService, BsCacheService } from \"@brightside-web/desktop/data-access/core-services\";\nimport {AuthModule} from \"@auth0/auth0-angular\";\nimport { LottieModule } from 'ngx-lottie';\nimport player from 'lottie-web';\n\n// Note this function is required for ngx-lottie\nexport function playerFactory() {\n return player;\n}\n\n\nexport function HttpLoaderFactory(http: HttpClient) {\n const origin = window.location.origin;\n return new TranslateHttpLoader(\n http,\n `${origin}/assets/i18n/`,\n '.json'\n );\n}\n\n@NgModule({\n declarations: [AppComponent, VerifyComponent, WaitlistComponent, SimpleGlobalModalComponent],\n imports: [\n BrowserModule,\n BrowserAnimationsModule,\n AppRoutingModule,\n BrightsideUiModule,\n NgIdleModule.forRoot(),\n DesktopDataAccessSharedModule,\n IntercomModule.forRoot({\n appId: env.intercomAppId,\n }),\n SharedDesktopModule,\n ReactiveFormsModule,\n BrightsideUiServicesModule,\n NgxMaskModule.forRoot(ngxMaskOptions),\n SharedMobileModule,\n MicroMessageBusModule,\n HttpClientModule,\n TranslateModule.forRoot({\n defaultLanguage: 'en',\n loader: {\n provide: TranslateLoader,\n useFactory: HttpLoaderFactory,\n deps: [HttpClient],\n },\n }),\n LanguageSelectionModule,\n DesktopDataAccessCoreServicesModule,\n DesktopFeatureFinancialAccountsCoreModule,\n AuthModule.forRoot({\n domain: env.auth0.domain,\n clientId: env.auth0.clientId,\n authorizationParams: {\n redirect_uri: window.location.origin + '/authenticating',\n audience: env.auth0.audience,\n scope: 'openid profile email phone_number read:current_user read:current_user_metadata offline_access'\n },\n cacheLocation: 'localstorage',\n useRefreshTokens: true,\n\n }),\n LottieModule.forRoot({ player: playerFactory }),\n ],\n providers: [\n BsHubService, BsAuthService, BsCacheService,\n AmplitudeService,\n { provide: Environment, useValue: environment },\n {\n provide: TraceService,\n deps: [Router],\n },\n { provide: FirebaseService, useClass: FirebaseAnalyticsService },\n { provide: ErrorHandler, useClass: BsErrorHandler },\n { provide: 'googleTagManagerId', useValue: environment.googleTagManagerId },\n { provide: TranslateService, useClass: BrightsideTranslateService },\n CurrencyPipe,\n TitleCasePipe,\n MessageService,\n WaitlistService,\n RoutingService,\n CompanyService,\n StatusNotificationsService,\n BsApiService,\n FeatureFlagService,\n ],\n bootstrap: [AppComponent],\n})\nexport class AppModule {\n constructor(\n private messageBusIncomingService: MessageBusIncomingService,\n private _ngZone: NgZone,\n private _traceService: TraceService\n ) {\n (window as any).BsCrossCom = {};\n (window as any).BsCrossCom.publishMessage = this.publishMessage.bind(this);\n }\n\n /**\n *\n * @param rawNativeMessage: string - Example: 'auth <tokenId>'\n */\n publishMessage(rawNativeMessage: string): void {\n this._ngZone.run(() => this.messageBusIncomingService.handleIncoming(rawNativeMessage));\n }\n}\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst deepFreeze = (object) => {\n const propNames = Reflect.ownKeys(object);\n for (const name of propNames) {\n const value = object[name];\n if ((value && typeof value === 'object') || typeof value === 'function') {\n deepFreeze(value);\n }\n }\n return Object.freeze(object);\n};\n\nexport { deepFreeze };\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst ADD_OAUTH_LISTENER = Symbol('oauth-listener');\n\nexport { ADD_OAUTH_LISTENER };\n","import { ConsoleLogger } from './Logger/ConsoleLogger.mjs';\nimport { AmplifyError } from './errors/AmplifyError.mjs';\nimport './types/errors.mjs';\nimport './errors/errorHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst logger = new ConsoleLogger('parseAWSExports');\nconst authTypeMapping = {\n API_KEY: 'apiKey',\n AWS_IAM: 'iam',\n AMAZON_COGNITO_USER_POOLS: 'userPool',\n OPENID_CONNECT: 'oidc',\n NONE: 'none',\n AWS_LAMBDA: 'lambda',\n // `LAMBDA` is an incorrect value that was added during the v6 rewrite.\n // Keeping it as a valid value until v7 to prevent breaking customers who might\n // be relying on it as a workaround.\n // ref: https://github.com/aws-amplify/amplify-js/pull/12922\n // TODO: @v7 remove next line\n LAMBDA: 'lambda',\n};\n/**\n * Converts the object imported from `aws-exports.js` or `amplifyconfiguration.json` files generated by\n * the Amplify CLI into an object that conforms to the {@link ResourcesConfig}.\n *\n * @param config A configuration object imported from `aws-exports.js` or `amplifyconfiguration.json`.\n *\n * @returns An object that conforms to the {@link ResourcesConfig} .\n */\nconst parseAWSExports = (config = {}) => {\n if (!Object.prototype.hasOwnProperty.call(config, 'aws_project_region')) {\n throw new AmplifyError({\n name: 'InvalidParameterException',\n message: 'Invalid config parameter.',\n recoverySuggestion: 'Ensure passing the config object imported from `amplifyconfiguration.json`.',\n });\n }\n const { aws_appsync_apiKey, aws_appsync_authenticationType, aws_appsync_graphqlEndpoint, aws_appsync_region, aws_bots_config, aws_cognito_identity_pool_id, aws_cognito_sign_up_verification_method, aws_cognito_mfa_configuration, aws_cognito_mfa_types, aws_cognito_password_protection_settings, aws_cognito_verification_mechanisms, aws_cognito_signup_attributes, aws_cognito_social_providers, aws_cognito_username_attributes, aws_mandatory_sign_in, aws_mobile_analytics_app_id, aws_mobile_analytics_app_region, aws_user_files_s3_bucket, aws_user_files_s3_bucket_region, aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing, aws_user_pools_id, aws_user_pools_web_client_id, geo, oauth, predictions, aws_cloud_logic_custom, Notifications, modelIntrospection, } = config;\n const amplifyConfig = {};\n // Analytics\n if (aws_mobile_analytics_app_id) {\n amplifyConfig.Analytics = {\n Pinpoint: {\n appId: aws_mobile_analytics_app_id,\n region: aws_mobile_analytics_app_region,\n },\n };\n }\n // Notifications\n const { InAppMessaging, Push } = Notifications ?? {};\n if (InAppMessaging?.AWSPinpoint || Push?.AWSPinpoint) {\n if (InAppMessaging?.AWSPinpoint) {\n const { appId, region } = InAppMessaging.AWSPinpoint;\n amplifyConfig.Notifications = {\n InAppMessaging: {\n Pinpoint: {\n appId,\n region,\n },\n },\n };\n }\n if (Push?.AWSPinpoint) {\n const { appId, region } = Push.AWSPinpoint;\n amplifyConfig.Notifications = {\n ...amplifyConfig.Notifications,\n PushNotification: {\n Pinpoint: {\n appId,\n region,\n },\n },\n };\n }\n }\n // Interactions\n if (Array.isArray(aws_bots_config)) {\n amplifyConfig.Interactions = {\n LexV1: Object.fromEntries(aws_bots_config.map(bot => [bot.name, bot])),\n };\n }\n // API\n if (aws_appsync_graphqlEndpoint) {\n const defaultAuthMode = authTypeMapping[aws_appsync_authenticationType];\n if (!defaultAuthMode) {\n logger.debug(`Invalid authentication type ${aws_appsync_authenticationType}. Falling back to IAM.`);\n }\n amplifyConfig.API = {\n GraphQL: {\n endpoint: aws_appsync_graphqlEndpoint,\n apiKey: aws_appsync_apiKey,\n region: aws_appsync_region,\n defaultAuthMode: defaultAuthMode ?? 'iam',\n },\n };\n if (modelIntrospection) {\n amplifyConfig.API.GraphQL.modelIntrospection = modelIntrospection;\n }\n }\n // Auth\n const mfaConfig = aws_cognito_mfa_configuration\n ? {\n status: aws_cognito_mfa_configuration &&\n aws_cognito_mfa_configuration.toLowerCase(),\n totpEnabled: aws_cognito_mfa_types?.includes('TOTP') ?? false,\n smsEnabled: aws_cognito_mfa_types?.includes('SMS') ?? false,\n }\n : undefined;\n const passwordFormatConfig = aws_cognito_password_protection_settings\n ? {\n minLength: aws_cognito_password_protection_settings.passwordPolicyMinLength,\n requireLowercase: aws_cognito_password_protection_settings.passwordPolicyCharacters?.includes('REQUIRES_LOWERCASE') ?? false,\n requireUppercase: aws_cognito_password_protection_settings.passwordPolicyCharacters?.includes('REQUIRES_UPPERCASE') ?? false,\n requireNumbers: aws_cognito_password_protection_settings.passwordPolicyCharacters?.includes('REQUIRES_NUMBERS') ?? false,\n requireSpecialCharacters: aws_cognito_password_protection_settings.passwordPolicyCharacters?.includes('REQUIRES_SYMBOLS') ?? false,\n }\n : undefined;\n const mergedUserAttributes = Array.from(new Set([\n ...(aws_cognito_verification_mechanisms ?? []),\n ...(aws_cognito_signup_attributes ?? []),\n ]));\n const userAttributes = mergedUserAttributes.reduce((attributes, key) => ({\n ...attributes,\n // All user attributes generated by the CLI are required\n [key.toLowerCase()]: { required: true },\n }), {});\n const loginWithEmailEnabled = aws_cognito_username_attributes?.includes('EMAIL') ?? false;\n const loginWithPhoneEnabled = aws_cognito_username_attributes?.includes('PHONE_NUMBER') ?? false;\n if (aws_cognito_identity_pool_id || aws_user_pools_id) {\n amplifyConfig.Auth = {\n Cognito: {\n identityPoolId: aws_cognito_identity_pool_id,\n allowGuestAccess: aws_mandatory_sign_in !== 'enable',\n signUpVerificationMethod: aws_cognito_sign_up_verification_method,\n userAttributes,\n userPoolClientId: aws_user_pools_web_client_id,\n userPoolId: aws_user_pools_id,\n mfa: mfaConfig,\n passwordFormat: passwordFormatConfig,\n loginWith: {\n username: !(loginWithEmailEnabled || loginWithPhoneEnabled),\n email: loginWithEmailEnabled,\n phone: loginWithPhoneEnabled,\n },\n },\n };\n }\n const hasOAuthConfig = oauth ? Object.keys(oauth).length > 0 : false;\n const hasSocialProviderConfig = aws_cognito_social_providers\n ? aws_cognito_social_providers.length > 0\n : false;\n if (amplifyConfig.Auth && hasOAuthConfig) {\n amplifyConfig.Auth.Cognito.loginWith = {\n ...amplifyConfig.Auth.Cognito.loginWith,\n oauth: {\n ...getOAuthConfig(oauth),\n ...(hasSocialProviderConfig && {\n providers: parseSocialProviders(aws_cognito_social_providers),\n }),\n },\n };\n }\n // Storage\n if (aws_user_files_s3_bucket) {\n amplifyConfig.Storage = {\n S3: {\n bucket: aws_user_files_s3_bucket,\n region: aws_user_files_s3_bucket_region,\n dangerouslyConnectToHttpEndpointForTesting: aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing,\n },\n };\n }\n // Geo\n if (geo) {\n const { amazon_location_service } = geo;\n amplifyConfig.Geo = {\n LocationService: {\n maps: amazon_location_service.maps,\n geofenceCollections: amazon_location_service.geofenceCollections,\n searchIndices: amazon_location_service.search_indices,\n region: amazon_location_service.region,\n },\n };\n }\n // REST API\n if (aws_cloud_logic_custom) {\n amplifyConfig.API = {\n ...amplifyConfig.API,\n REST: aws_cloud_logic_custom.reduce((acc, api) => {\n const { name, endpoint, region, service } = api;\n return {\n ...acc,\n [name]: {\n endpoint,\n ...(service ? { service } : undefined),\n ...(region ? { region } : undefined),\n },\n };\n }, {}),\n };\n }\n // Predictions\n if (predictions) {\n // map VoiceId from speechGenerator defaults to voiceId\n const { VoiceId: voiceId } = predictions?.convert?.speechGenerator?.defaults ?? {};\n amplifyConfig.Predictions = voiceId\n ? {\n ...predictions,\n convert: {\n ...predictions.convert,\n speechGenerator: {\n ...predictions.convert.speechGenerator,\n defaults: { voiceId },\n },\n },\n }\n : predictions;\n }\n return amplifyConfig;\n};\nconst getRedirectUrl = (redirectStr) => redirectStr?.split(',') ?? [];\nconst getOAuthConfig = ({ domain, scope, redirectSignIn, redirectSignOut, responseType, }) => ({\n domain,\n scopes: scope,\n redirectSignIn: getRedirectUrl(redirectSignIn),\n redirectSignOut: getRedirectUrl(redirectSignOut),\n responseType,\n});\nconst parseSocialProviders = (aws_cognito_social_providers) => {\n return aws_cognito_social_providers.map((provider) => {\n const updatedProvider = provider.toLowerCase();\n return updatedProvider.charAt(0).toUpperCase() + updatedProvider.slice(1);\n });\n};\n\nexport { parseAWSExports };\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction isAmplifyOutputs(config) {\n // version format initially will be '1' but is expected to be something like x.y where x is major and y minor version\n const { version } = config;\n if (!version) {\n return false;\n }\n return version.startsWith('1');\n}\nfunction parseStorage(amplifyOutputsStorageProperties) {\n if (!amplifyOutputsStorageProperties) {\n return undefined;\n }\n const { bucket_name, aws_region, buckets } = amplifyOutputsStorageProperties;\n return {\n S3: {\n bucket: bucket_name,\n region: aws_region,\n buckets: buckets && createBucketInfoMap(buckets),\n },\n };\n}\nfunction parseAuth(amplifyOutputsAuthProperties) {\n if (!amplifyOutputsAuthProperties) {\n return undefined;\n }\n const { user_pool_id, user_pool_client_id, identity_pool_id, password_policy, mfa_configuration, mfa_methods, unauthenticated_identities_enabled, oauth, username_attributes, standard_required_attributes, groups, } = amplifyOutputsAuthProperties;\n const authConfig = {\n Cognito: {\n userPoolId: user_pool_id,\n userPoolClientId: user_pool_client_id,\n groups,\n },\n };\n if (identity_pool_id) {\n authConfig.Cognito = {\n ...authConfig.Cognito,\n identityPoolId: identity_pool_id,\n };\n }\n if (password_policy) {\n authConfig.Cognito.passwordFormat = {\n requireLowercase: password_policy.require_lowercase,\n requireNumbers: password_policy.require_numbers,\n requireUppercase: password_policy.require_uppercase,\n requireSpecialCharacters: password_policy.require_symbols,\n minLength: password_policy.min_length ?? 6,\n };\n }\n if (mfa_configuration) {\n authConfig.Cognito.mfa = {\n status: getMfaStatus(mfa_configuration),\n smsEnabled: mfa_methods?.includes('SMS'),\n totpEnabled: mfa_methods?.includes('TOTP'),\n };\n }\n if (unauthenticated_identities_enabled) {\n authConfig.Cognito.allowGuestAccess = unauthenticated_identities_enabled;\n }\n if (oauth) {\n authConfig.Cognito.loginWith = {\n oauth: {\n domain: oauth.domain,\n redirectSignIn: oauth.redirect_sign_in_uri,\n redirectSignOut: oauth.redirect_sign_out_uri,\n responseType: oauth.response_type === 'token' ? 'token' : 'code',\n scopes: oauth.scopes,\n providers: getOAuthProviders(oauth.identity_providers),\n },\n };\n }\n if (username_attributes) {\n authConfig.Cognito.loginWith = {\n ...authConfig.Cognito.loginWith,\n email: username_attributes.includes('email'),\n phone: username_attributes.includes('phone_number'),\n // Signing in with a username is not currently supported in Gen2, this should always evaluate to false\n username: username_attributes.includes('username'),\n };\n }\n if (standard_required_attributes) {\n authConfig.Cognito.userAttributes = standard_required_attributes.reduce((acc, curr) => ({ ...acc, [curr]: { required: true } }), {});\n }\n return authConfig;\n}\nfunction parseAnalytics(amplifyOutputsAnalyticsProperties) {\n if (!amplifyOutputsAnalyticsProperties?.amazon_pinpoint) {\n return undefined;\n }\n const { amazon_pinpoint } = amplifyOutputsAnalyticsProperties;\n return {\n Pinpoint: {\n appId: amazon_pinpoint.app_id,\n region: amazon_pinpoint.aws_region,\n },\n };\n}\nfunction parseGeo(amplifyOutputsAnalyticsProperties) {\n if (!amplifyOutputsAnalyticsProperties) {\n return undefined;\n }\n const { aws_region, geofence_collections, maps, search_indices } = amplifyOutputsAnalyticsProperties;\n return {\n LocationService: {\n region: aws_region,\n searchIndices: search_indices,\n geofenceCollections: geofence_collections,\n maps,\n },\n };\n}\nfunction parseData(amplifyOutputsDataProperties) {\n if (!amplifyOutputsDataProperties) {\n return undefined;\n }\n const { aws_region, default_authorization_type, url, api_key, model_introspection, } = amplifyOutputsDataProperties;\n const GraphQL = {\n endpoint: url,\n defaultAuthMode: getGraphQLAuthMode(default_authorization_type),\n region: aws_region,\n apiKey: api_key,\n modelIntrospection: model_introspection,\n };\n return {\n GraphQL,\n };\n}\nfunction parseCustom(amplifyOutputsCustomProperties) {\n if (!amplifyOutputsCustomProperties?.events) {\n return undefined;\n }\n const { url, aws_region, api_key, default_authorization_type } = amplifyOutputsCustomProperties.events;\n const Events = {\n endpoint: url,\n defaultAuthMode: getGraphQLAuthMode(default_authorization_type),\n region: aws_region,\n apiKey: api_key,\n };\n return {\n Events,\n };\n}\nfunction parseNotifications(amplifyOutputsNotificationsProperties) {\n if (!amplifyOutputsNotificationsProperties) {\n return undefined;\n }\n const { aws_region, channels, amazon_pinpoint_app_id } = amplifyOutputsNotificationsProperties;\n const hasInAppMessaging = channels.includes('IN_APP_MESSAGING');\n const hasPushNotification = channels.includes('APNS') || channels.includes('FCM');\n if (!(hasInAppMessaging || hasPushNotification)) {\n return undefined;\n }\n // At this point, we know the Amplify outputs contains at least one supported channel\n const notificationsConfig = {};\n if (hasInAppMessaging) {\n notificationsConfig.InAppMessaging = {\n Pinpoint: {\n appId: amazon_pinpoint_app_id,\n region: aws_region,\n },\n };\n }\n if (hasPushNotification) {\n notificationsConfig.PushNotification = {\n Pinpoint: {\n appId: amazon_pinpoint_app_id,\n region: aws_region,\n },\n };\n }\n return notificationsConfig;\n}\nfunction parseAmplifyOutputs(amplifyOutputs) {\n const resourcesConfig = {};\n if (amplifyOutputs.storage) {\n resourcesConfig.Storage = parseStorage(amplifyOutputs.storage);\n }\n if (amplifyOutputs.auth) {\n resourcesConfig.Auth = parseAuth(amplifyOutputs.auth);\n }\n if (amplifyOutputs.analytics) {\n resourcesConfig.Analytics = parseAnalytics(amplifyOutputs.analytics);\n }\n if (amplifyOutputs.geo) {\n resourcesConfig.Geo = parseGeo(amplifyOutputs.geo);\n }\n if (amplifyOutputs.data) {\n resourcesConfig.API = parseData(amplifyOutputs.data);\n }\n if (amplifyOutputs.custom) {\n const customConfig = parseCustom(amplifyOutputs.custom);\n if (customConfig && 'Events' in customConfig) {\n resourcesConfig.API = { ...resourcesConfig.API, ...customConfig };\n }\n }\n if (amplifyOutputs.notifications) {\n resourcesConfig.Notifications = parseNotifications(amplifyOutputs.notifications);\n }\n return resourcesConfig;\n}\nconst authModeNames = {\n AMAZON_COGNITO_USER_POOLS: 'userPool',\n API_KEY: 'apiKey',\n AWS_IAM: 'iam',\n AWS_LAMBDA: 'lambda',\n OPENID_CONNECT: 'oidc',\n};\nfunction getGraphQLAuthMode(authType) {\n return authModeNames[authType];\n}\nconst providerNames = {\n GOOGLE: 'Google',\n LOGIN_WITH_AMAZON: 'Amazon',\n FACEBOOK: 'Facebook',\n SIGN_IN_WITH_APPLE: 'Apple',\n};\nfunction getOAuthProviders(providers = []) {\n return providers.reduce((oAuthProviders, provider) => {\n if (providerNames[provider] !== undefined) {\n oAuthProviders.push(providerNames[provider]);\n }\n return oAuthProviders;\n }, []);\n}\nfunction getMfaStatus(mfaConfiguration) {\n if (mfaConfiguration === 'OPTIONAL')\n return 'optional';\n if (mfaConfiguration === 'REQUIRED')\n return 'on';\n return 'off';\n}\nfunction createBucketInfoMap(buckets) {\n const mappedBuckets = {};\n buckets.forEach(({ name, bucket_name: bucketName, aws_region: region, paths }) => {\n if (name in mappedBuckets) {\n throw new Error(`Duplicate friendly name found: ${name}. Name must be unique.`);\n }\n const sanitizedPaths = paths\n ? Object.entries(paths).reduce((acc, [key, value]) => {\n if (value !== undefined) {\n acc[key] = value;\n }\n return acc;\n }, {})\n : undefined;\n mappedBuckets[name] = {\n bucketName,\n region,\n paths: sanitizedPaths,\n };\n });\n return mappedBuckets;\n}\n\nexport { isAmplifyOutputs, parseAmplifyOutputs, parseAnalytics };\n","import { parseAWSExports } from '../parseAWSExports.mjs';\nimport { isAmplifyOutputs, parseAmplifyOutputs } from '../parseAmplifyOutputs.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Parses the variety of configuration shapes that Amplify can accept into a ResourcesConfig.\n *\n * @param amplifyConfig An Amplify configuration object conforming to one of the supported schemas.\n * @return A ResourcesConfig for the provided configuration object.\n */\nconst parseAmplifyConfig = (amplifyConfig) => {\n if (Object.keys(amplifyConfig).some(key => key.startsWith('aws_'))) {\n return parseAWSExports(amplifyConfig);\n }\n else if (isAmplifyOutputs(amplifyConfig)) {\n return parseAmplifyOutputs(amplifyConfig);\n }\n else {\n return amplifyConfig;\n }\n};\n\nexport { parseAmplifyConfig };\n","/**\n * @internal\n */\nexport var BLOCK_SIZE = 64;\n/**\n * @internal\n */\nexport var DIGEST_LENGTH = 32;\n/**\n * @internal\n */\nexport var KEY = new Uint32Array([\n 0x428a2f98,\n 0x71374491,\n 0xb5c0fbcf,\n 0xe9b5dba5,\n 0x3956c25b,\n 0x59f111f1,\n 0x923f82a4,\n 0xab1c5ed5,\n 0xd807aa98,\n 0x12835b01,\n 0x243185be,\n 0x550c7dc3,\n 0x72be5d74,\n 0x80deb1fe,\n 0x9bdc06a7,\n 0xc19bf174,\n 0xe49b69c1,\n 0xefbe4786,\n 0x0fc19dc6,\n 0x240ca1cc,\n 0x2de92c6f,\n 0x4a7484aa,\n 0x5cb0a9dc,\n 0x76f988da,\n 0x983e5152,\n 0xa831c66d,\n 0xb00327c8,\n 0xbf597fc7,\n 0xc6e00bf3,\n 0xd5a79147,\n 0x06ca6351,\n 0x14292967,\n 0x27b70a85,\n 0x2e1b2138,\n 0x4d2c6dfc,\n 0x53380d13,\n 0x650a7354,\n 0x766a0abb,\n 0x81c2c92e,\n 0x92722c85,\n 0xa2bfe8a1,\n 0xa81a664b,\n 0xc24b8b70,\n 0xc76c51a3,\n 0xd192e819,\n 0xd6990624,\n 0xf40e3585,\n 0x106aa070,\n 0x19a4c116,\n 0x1e376c08,\n 0x2748774c,\n 0x34b0bcb5,\n 0x391c0cb3,\n 0x4ed8aa4a,\n 0x5b9cca4f,\n 0x682e6ff3,\n 0x748f82ee,\n 0x78a5636f,\n 0x84c87814,\n 0x8cc70208,\n 0x90befffa,\n 0xa4506ceb,\n 0xbef9a3f7,\n 0xc67178f2\n]);\n/**\n * @internal\n */\nexport var INIT = [\n 0x6a09e667,\n 0xbb67ae85,\n 0x3c6ef372,\n 0xa54ff53a,\n 0x510e527f,\n 0x9b05688c,\n 0x1f83d9ab,\n 0x5be0cd19\n];\n/**\n * @internal\n */\nexport var MAX_HASHABLE_LENGTH = Math.pow(2, 53) - 1;\n","import { BLOCK_SIZE, DIGEST_LENGTH, INIT, KEY, MAX_HASHABLE_LENGTH } from \"./constants\";\n/**\n * @internal\n */\nvar RawSha256 = /** @class */ (function () {\n function RawSha256() {\n this.state = Int32Array.from(INIT);\n this.temp = new Int32Array(64);\n this.buffer = new Uint8Array(64);\n this.bufferLength = 0;\n this.bytesHashed = 0;\n /**\n * @internal\n */\n this.finished = false;\n }\n RawSha256.prototype.update = function (data) {\n if (this.finished) {\n throw new Error(\"Attempted to update an already finished hash.\");\n }\n var position = 0;\n var byteLength = data.byteLength;\n this.bytesHashed += byteLength;\n if (this.bytesHashed * 8 > MAX_HASHABLE_LENGTH) {\n throw new Error(\"Cannot hash more than 2^53 - 1 bits\");\n }\n while (byteLength > 0) {\n this.buffer[this.bufferLength++] = data[position++];\n byteLength--;\n if (this.bufferLength === BLOCK_SIZE) {\n this.hashBuffer();\n this.bufferLength = 0;\n }\n }\n };\n RawSha256.prototype.digest = function () {\n if (!this.finished) {\n var bitsHashed = this.bytesHashed * 8;\n var bufferView = new DataView(this.buffer.buffer, this.buffer.byteOffset, this.buffer.byteLength);\n var undecoratedLength = this.bufferLength;\n bufferView.setUint8(this.bufferLength++, 0x80);\n // Ensure the final block has enough room for the hashed length\n if (undecoratedLength % BLOCK_SIZE >= BLOCK_SIZE - 8) {\n for (var i = this.bufferLength; i < BLOCK_SIZE; i++) {\n bufferView.setUint8(i, 0);\n }\n this.hashBuffer();\n this.bufferLength = 0;\n }\n for (var i = this.bufferLength; i < BLOCK_SIZE - 8; i++) {\n bufferView.setUint8(i, 0);\n }\n bufferView.setUint32(BLOCK_SIZE - 8, Math.floor(bitsHashed / 0x100000000), true);\n bufferView.setUint32(BLOCK_SIZE - 4, bitsHashed);\n this.hashBuffer();\n this.finished = true;\n }\n // The value in state is little-endian rather than big-endian, so flip\n // each word into a new Uint8Array\n var out = new Uint8Array(DIGEST_LENGTH);\n for (var i = 0; i < 8; i++) {\n out[i * 4] = (this.state[i] >>> 24) & 0xff;\n out[i * 4 + 1] = (this.state[i] >>> 16) & 0xff;\n out[i * 4 + 2] = (this.state[i] >>> 8) & 0xff;\n out[i * 4 + 3] = (this.state[i] >>> 0) & 0xff;\n }\n return out;\n };\n RawSha256.prototype.hashBuffer = function () {\n var _a = this, buffer = _a.buffer, state = _a.state;\n var state0 = state[0], state1 = state[1], state2 = state[2], state3 = state[3], state4 = state[4], state5 = state[5], state6 = state[6], state7 = state[7];\n for (var i = 0; i < BLOCK_SIZE; i++) {\n if (i < 16) {\n this.temp[i] =\n ((buffer[i * 4] & 0xff) << 24) |\n ((buffer[i * 4 + 1] & 0xff) << 16) |\n ((buffer[i * 4 + 2] & 0xff) << 8) |\n (buffer[i * 4 + 3] & 0xff);\n }\n else {\n var u = this.temp[i - 2];\n var t1_1 = ((u >>> 17) | (u << 15)) ^ ((u >>> 19) | (u << 13)) ^ (u >>> 10);\n u = this.temp[i - 15];\n var t2_1 = ((u >>> 7) | (u << 25)) ^ ((u >>> 18) | (u << 14)) ^ (u >>> 3);\n this.temp[i] =\n ((t1_1 + this.temp[i - 7]) | 0) + ((t2_1 + this.temp[i - 16]) | 0);\n }\n var t1 = ((((((state4 >>> 6) | (state4 << 26)) ^\n ((state4 >>> 11) | (state4 << 21)) ^\n ((state4 >>> 25) | (state4 << 7))) +\n ((state4 & state5) ^ (~state4 & state6))) |\n 0) +\n ((state7 + ((KEY[i] + this.temp[i]) | 0)) | 0)) |\n 0;\n var t2 = ((((state0 >>> 2) | (state0 << 30)) ^\n ((state0 >>> 13) | (state0 << 19)) ^\n ((state0 >>> 22) | (state0 << 10))) +\n ((state0 & state1) ^ (state0 & state2) ^ (state1 & state2))) |\n 0;\n state7 = state6;\n state6 = state5;\n state5 = state4;\n state4 = (state3 + t1) | 0;\n state3 = state2;\n state2 = state1;\n state1 = state0;\n state0 = (t1 + t2) | 0;\n }\n state[0] += state0;\n state[1] += state1;\n state[2] += state2;\n state[3] += state3;\n state[4] += state4;\n state[5] += state5;\n state[6] += state6;\n state[7] += state7;\n };\n return RawSha256;\n}());\nexport { RawSha256 };\n","// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { fromUtf8 as fromUtf8Browser } from \"@smithy/util-utf8\";\n// Quick polyfill\nvar fromUtf8 = typeof Buffer !== \"undefined\" && Buffer.from\n ? function (input) { return Buffer.from(input, \"utf8\"); }\n : fromUtf8Browser;\nexport function convertToBuffer(data) {\n // Already a Uint8, do nothing\n if (data instanceof Uint8Array)\n return data;\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n}\n","export const fromUtf8 = (input) => new TextEncoder().encode(input);\n","import { __awaiter, __generator } from \"tslib\";\nimport { BLOCK_SIZE } from \"./constants\";\nimport { RawSha256 } from \"./RawSha256\";\nimport { isEmptyData, convertToBuffer } from \"@aws-crypto/util\";\nvar Sha256 = /** @class */ (function () {\n function Sha256(secret) {\n this.secret = secret;\n this.hash = new RawSha256();\n this.reset();\n }\n Sha256.prototype.update = function (toHash) {\n if (isEmptyData(toHash) || this.error) {\n return;\n }\n try {\n this.hash.update(convertToBuffer(toHash));\n }\n catch (e) {\n this.error = e;\n }\n };\n /* This synchronous method keeps compatibility\n * with the v2 aws-sdk.\n */\n Sha256.prototype.digestSync = function () {\n if (this.error) {\n throw this.error;\n }\n if (this.outer) {\n if (!this.outer.finished) {\n this.outer.update(this.hash.digest());\n }\n return this.outer.digest();\n }\n return this.hash.digest();\n };\n /* The underlying digest method here is synchronous.\n * To keep the same interface with the other hash functions\n * the default is to expose this as an async method.\n * However, it can sometimes be useful to have a sync method.\n */\n Sha256.prototype.digest = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.digestSync()];\n });\n });\n };\n Sha256.prototype.reset = function () {\n this.hash = new RawSha256();\n if (this.secret) {\n this.outer = new RawSha256();\n var inner = bufferFromSecret(this.secret);\n var outer = new Uint8Array(BLOCK_SIZE);\n outer.set(inner);\n for (var i = 0; i < BLOCK_SIZE; i++) {\n inner[i] ^= 0x36;\n outer[i] ^= 0x5c;\n }\n this.hash.update(inner);\n this.outer.update(outer);\n // overwrite the copied key in memory\n for (var i = 0; i < inner.byteLength; i++) {\n inner[i] = 0;\n }\n }\n };\n return Sha256;\n}());\nexport { Sha256 };\nfunction bufferFromSecret(secret) {\n var input = convertToBuffer(secret);\n if (input.byteLength > BLOCK_SIZE) {\n var bufferHash = new RawSha256();\n bufferHash.update(input);\n input = bufferHash.digest();\n }\n var buffer = new Uint8Array(BLOCK_SIZE);\n buffer.set(input);\n return buffer;\n}\n","// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport function isEmptyData(data) {\n if (typeof data === \"string\") {\n return data.length === 0;\n }\n return data.byteLength === 0;\n}\n","const SHORT_TO_HEX = {};\nconst HEX_TO_SHORT = {};\nfor (let i = 0; i < 256; i++) {\n let encodedByte = i.toString(16).toLowerCase();\n if (encodedByte.length === 1) {\n encodedByte = `0${encodedByte}`;\n }\n SHORT_TO_HEX[i] = encodedByte;\n HEX_TO_SHORT[encodedByte] = i;\n}\nexport function fromHex(encoded) {\n if (encoded.length % 2 !== 0) {\n throw new Error(\"Hex encoded strings must have an even number length\");\n }\n const out = new Uint8Array(encoded.length / 2);\n for (let i = 0; i < encoded.length; i += 2) {\n const encodedByte = encoded.slice(i, i + 2).toLowerCase();\n if (encodedByte in HEX_TO_SHORT) {\n out[i / 2] = HEX_TO_SHORT[encodedByte];\n }\n else {\n throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`);\n }\n }\n return out;\n}\nexport function toHex(bytes) {\n let out = \"\";\n for (let i = 0; i < bytes.byteLength; i++) {\n out += SHORT_TO_HEX[bytes[i]];\n }\n return out;\n}\n","class AuthClass {\n /**\n * Configure Auth category\n *\n * @internal\n *\n * @param authResourcesConfig - Resources configurations required by Auth providers.\n * @param authOptions - Client options used by library\n *\n * @returns void\n */\n configure(authResourcesConfig, authOptions) {\n this.authConfig = authResourcesConfig;\n this.authOptions = authOptions;\n }\n /**\n * Fetch the auth tokens, and the temporary AWS credentials and identity if they are configured. By default it\n * does not refresh the auth tokens or credentials if they are loaded in storage already. You can force a refresh\n * with `{ forceRefresh: true }` input.\n *\n * @param options - Options configuring the fetch behavior.\n *\n * @returns Promise of current auth session {@link AuthSession}.\n */\n async fetchAuthSession(options = {}) {\n let credentialsAndIdentityId;\n let userSub;\n // Get tokens will throw if session cannot be refreshed (network or service error) or return null if not available\n const tokens = await this.getTokens(options);\n if (tokens) {\n userSub = tokens.accessToken?.payload?.sub;\n // getCredentialsAndIdentityId will throw if cannot get credentials (network or service error)\n credentialsAndIdentityId =\n await this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({\n authConfig: this.authConfig,\n tokens,\n authenticated: true,\n forceRefresh: options.forceRefresh,\n });\n }\n else {\n // getCredentialsAndIdentityId will throw if cannot get credentials (network or service error)\n credentialsAndIdentityId =\n await this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({\n authConfig: this.authConfig,\n authenticated: false,\n forceRefresh: options.forceRefresh,\n });\n }\n return {\n tokens,\n credentials: credentialsAndIdentityId?.credentials,\n identityId: credentialsAndIdentityId?.identityId,\n userSub,\n };\n }\n async clearCredentials() {\n await this.authOptions?.credentialsProvider?.clearCredentialsAndIdentityId();\n }\n async getTokens(options) {\n return ((await this.authOptions?.tokenProvider?.getTokens(options)) ?? undefined);\n }\n}\n\nexport { AuthClass };\n","import { Hub, AMPLIFY_SYMBOL } from '../Hub/index.mjs';\nimport '../types/errors.mjs';\nimport '../errors/errorHelpers.mjs';\nimport '../utils/getClientInfo/getClientInfo.mjs';\nimport '../utils/retry/retry.mjs';\nimport { deepFreeze } from '../utils/deepFreeze.mjs';\nimport '../parseAWSExports.mjs';\nimport { ADD_OAUTH_LISTENER } from './constants.mjs';\nimport 'uuid';\nimport { parseAmplifyConfig } from '../utils/parseAmplifyConfig.mjs';\nimport './Auth/utils/errorHelpers.mjs';\nimport '@aws-crypto/sha256-js';\nimport '@smithy/util-hex-encoding';\nimport '../Platform/index.mjs';\nimport '../Platform/types.mjs';\nimport '../BackgroundProcessManager/types.mjs';\nimport '../Reachability/Reachability.mjs';\nimport '../utils/sessionListener/index.mjs';\nimport { AuthClass } from './Auth/index.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nclass AmplifyClass {\n constructor() {\n this.oAuthListener = undefined;\n this.resourcesConfig = {};\n this.libraryOptions = {};\n this.Auth = new AuthClass();\n }\n /**\n * Configures Amplify for use with your back-end resources.\n *\n * @remarks\n * This API does not perform any merging of either `resourcesConfig` or `libraryOptions`. The most recently\n * provided values will be used after configuration.\n *\n * @remarks\n * `configure` can be used to specify additional library options where available for supported categories.\n *\n * @param resourceConfig - Back-end resource configuration. Typically provided via the `aws-exports.js` file.\n * @param libraryOptions - Additional options for customizing the behavior of the library.\n */\n configure(resourcesConfig, libraryOptions) {\n const resolvedResourceConfig = parseAmplifyConfig(resourcesConfig);\n this.resourcesConfig = resolvedResourceConfig;\n if (libraryOptions) {\n this.libraryOptions = libraryOptions;\n }\n // Make resource config immutable\n this.resourcesConfig = deepFreeze(this.resourcesConfig);\n this.Auth.configure(this.resourcesConfig.Auth, this.libraryOptions.Auth);\n Hub.dispatch('core', {\n event: 'configure',\n data: this.resourcesConfig,\n }, 'Configure', AMPLIFY_SYMBOL);\n this.notifyOAuthListener();\n }\n /**\n * Provides access to the current back-end resource configuration for the Library.\n *\n * @returns Returns the immutable back-end resource configuration.\n */\n getConfig() {\n return this.resourcesConfig;\n }\n /** @internal */\n [ADD_OAUTH_LISTENER](listener) {\n if (this.resourcesConfig.Auth?.Cognito.loginWith?.oauth) {\n // when Amplify has been configured with a valid OAuth config while adding the listener, run it directly\n listener(this.resourcesConfig.Auth?.Cognito);\n }\n else {\n // otherwise register the listener and run it later when Amplify gets configured with a valid oauth config\n this.oAuthListener = listener;\n }\n }\n notifyOAuthListener() {\n if (!this.resourcesConfig.Auth?.Cognito.loginWith?.oauth ||\n !this.oAuthListener) {\n return;\n }\n this.oAuthListener(this.resourcesConfig.Auth?.Cognito);\n // the listener should only be notified once with a valid oauth config\n this.oAuthListener = undefined;\n }\n}\n/**\n * The `Amplify` utility is used to configure the library.\n *\n * @remarks\n * `Amplify` orchestrates cross-category communication within the library.\n */\nconst Amplify = new AmplifyClass();\n\nexport { Amplify, AmplifyClass };\n","/*! js-cookie v3.0.5 | MIT */\n/* eslint-disable no-var */\nfunction assign (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n target[key] = source[key];\n }\n }\n return target\n}\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\nvar defaultConverter = {\n read: function (value) {\n if (value[0] === '\"') {\n value = value.slice(1, -1);\n }\n return value.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent)\n },\n write: function (value) {\n return encodeURIComponent(value).replace(\n /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,\n decodeURIComponent\n )\n }\n};\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\n\nfunction init (converter, defaultAttributes) {\n function set (name, value, attributes) {\n if (typeof document === 'undefined') {\n return\n }\n\n attributes = assign({}, defaultAttributes, attributes);\n\n if (typeof attributes.expires === 'number') {\n attributes.expires = new Date(Date.now() + attributes.expires * 864e5);\n }\n if (attributes.expires) {\n attributes.expires = attributes.expires.toUTCString();\n }\n\n name = encodeURIComponent(name)\n .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)\n .replace(/[()]/g, escape);\n\n var stringifiedAttributes = '';\n for (var attributeName in attributes) {\n if (!attributes[attributeName]) {\n continue\n }\n\n stringifiedAttributes += '; ' + attributeName;\n\n if (attributes[attributeName] === true) {\n continue\n }\n\n // Considers RFC 6265 section 5.2:\n // ...\n // 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n // character:\n // Consume the characters of the unparsed-attributes up to,\n // not including, the first %x3B (\";\") character.\n // ...\n stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n }\n\n return (document.cookie =\n name + '=' + converter.write(value, name) + stringifiedAttributes)\n }\n\n function get (name) {\n if (typeof document === 'undefined' || (arguments.length && !name)) {\n return\n }\n\n // To prevent the for loop in the first place assign an empty array\n // in case there are no cookies at all.\n var cookies = document.cookie ? document.cookie.split('; ') : [];\n var jar = {};\n for (var i = 0; i < cookies.length; i++) {\n var parts = cookies[i].split('=');\n var value = parts.slice(1).join('=');\n\n try {\n var found = decodeURIComponent(parts[0]);\n jar[found] = converter.read(value, found);\n\n if (name === found) {\n break\n }\n } catch (e) {}\n }\n\n return name ? jar[name] : jar\n }\n\n return Object.create(\n {\n set,\n get,\n remove: function (name, attributes) {\n set(\n name,\n '',\n assign({}, attributes, {\n expires: -1\n })\n );\n },\n withAttributes: function (attributes) {\n return init(this.converter, assign({}, this.attributes, attributes))\n },\n withConverter: function (converter) {\n return init(assign({}, this.converter, converter), this.attributes)\n }\n },\n {\n attributes: { value: Object.freeze(defaultAttributes) },\n converter: { value: Object.freeze(converter) }\n }\n )\n}\n\nvar api = init(defaultConverter, { path: '/' });\n/* eslint-enable no-var */\n\nexport { api as default };\n","import JsCookie from 'js-cookie';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nclass CookieStorage {\n constructor(data = {}) {\n const { path, domain, expires, sameSite, secure } = data;\n this.domain = domain;\n this.path = path || '/';\n this.expires = Object.prototype.hasOwnProperty.call(data, 'expires')\n ? expires\n : 365;\n this.secure = Object.prototype.hasOwnProperty.call(data, 'secure')\n ? secure\n : true;\n if (Object.prototype.hasOwnProperty.call(data, 'sameSite')) {\n if (!sameSite || !['strict', 'lax', 'none'].includes(sameSite)) {\n throw new Error('The sameSite value of cookieStorage must be \"lax\", \"strict\" or \"none\".');\n }\n if (sameSite === 'none' && !this.secure) {\n throw new Error('sameSite = None requires the Secure attribute in latest browser versions.');\n }\n this.sameSite = sameSite;\n }\n }\n async setItem(key, value) {\n JsCookie.set(key, value, this.getData());\n }\n async getItem(key) {\n const item = JsCookie.get(key);\n return item ?? null;\n }\n async removeItem(key) {\n JsCookie.remove(key, this.getData());\n }\n async clear() {\n const cookie = JsCookie.get();\n const promises = Object.keys(cookie).map(key => this.removeItem(key));\n await Promise.all(promises);\n }\n getData() {\n return {\n path: this.path,\n expires: this.expires,\n domain: this.domain,\n secure: this.secure,\n ...(this.sameSite && { sameSite: this.sameSite }),\n };\n }\n}\n\nexport { CookieStorage };\n","import { PlatformNotSupportedError } from '../errors/PlatformNotSupportedError.mjs';\nimport '../errors/errorHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */\nclass SyncKeyValueStorage {\n constructor(storage) {\n this._storage = storage;\n }\n get storage() {\n if (!this._storage)\n throw new PlatformNotSupportedError();\n return this._storage;\n }\n /**\n * This is used to set a specific item in storage\n * @param {string} key - the key for the item\n * @param {object} value - the value\n * @returns {string} value that was set\n */\n setItem(key, value) {\n this.storage.setItem(key, value);\n }\n /**\n * This is used to get a specific key from storage\n * @param {string} key - the key for the item\n * This is used to clear the storage\n * @returns {string} the data item\n */\n getItem(key) {\n return this.storage.getItem(key);\n }\n /**\n * This is used to remove an item from storage\n * @param {string} key - the key being set\n * @returns {string} value - value that was deleted\n */\n removeItem(key) {\n this.storage.removeItem(key);\n }\n /**\n * This is used to clear the storage\n * @returns {string} nothing\n */\n clear() {\n this.storage.clear();\n }\n}\n\nexport { SyncKeyValueStorage };\n","import { DefaultStorage } from './DefaultStorage.mjs';\nimport { InMemoryStorage } from './InMemoryStorage.mjs';\nimport { KeyValueStorage } from './KeyValueStorage.mjs';\nimport { SessionStorage } from './SessionStorage.mjs';\nimport { SyncSessionStorage } from './SyncSessionStorage.mjs';\nexport { CookieStorage } from './CookieStorage.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst defaultStorage = new DefaultStorage();\nconst sessionStorage = new SessionStorage();\nconst syncSessionStorage = new SyncSessionStorage();\nconst sharedInMemoryStorage = new KeyValueStorage(new InMemoryStorage());\n\nexport { defaultStorage, sessionStorage, sharedInMemoryStorage, syncSessionStorage };\n","import { KeyValueStorage } from './KeyValueStorage.mjs';\nimport { getLocalStorageWithFallback } from './utils.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */\nclass DefaultStorage extends KeyValueStorage {\n constructor() {\n super(getLocalStorageWithFallback());\n }\n}\n\nexport { DefaultStorage };\n","import { getAtob } from '../../globalHelpers/index.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst base64Decoder = {\n convert(input, options) {\n let inputStr = input;\n // urlSafe character replacement options conform to the base64 url spec\n // https://datatracker.ietf.org/doc/html/rfc4648#page-7\n if (options?.urlSafe) {\n inputStr = inputStr.replace(/-/g, '+').replace(/_/g, '/');\n }\n return getAtob()(inputStr);\n },\n};\n\nexport { base64Decoder };\n","import { KeyValueStorage } from './KeyValueStorage.mjs';\nimport { getSessionStorageWithFallback } from './utils.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */\nclass SessionStorage extends KeyValueStorage {\n constructor() {\n super(getSessionStorageWithFallback());\n }\n}\n\nexport { SessionStorage };\n","import { SyncKeyValueStorage } from './SyncKeyValueStorage.mjs';\nimport { getSessionStorageWithFallback } from './utils.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */\nclass SyncSessionStorage extends SyncKeyValueStorage {\n constructor() {\n super(getSessionStorageWithFallback());\n }\n}\n\nexport { SyncSessionStorage };\n","import { AmplifyError } from '../../errors/AmplifyError.mjs';\nimport '../../types/errors.mjs';\nimport '../../errors/errorHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst getCrypto = () => {\n if (typeof window === 'object' && typeof window.crypto === 'object') {\n return window.crypto;\n }\n // Next.js global polyfill\n if (typeof crypto === 'object') {\n return crypto;\n }\n throw new AmplifyError({\n name: 'MissingPolyfill',\n message: 'Cannot resolve the `crypto` function from the environment.',\n });\n};\nconst getBtoa = () => {\n // browser\n if (typeof window !== 'undefined' && typeof window.btoa === 'function') {\n return window.btoa;\n }\n // Next.js global polyfill\n if (typeof btoa === 'function') {\n return btoa;\n }\n throw new AmplifyError({\n name: 'Base64EncoderError',\n message: 'Cannot resolve the `btoa` function from the environment.',\n });\n};\nconst getAtob = () => {\n // browser\n if (typeof window !== 'undefined' && typeof window.atob === 'function') {\n return window.atob;\n }\n // Next.js global polyfill\n if (typeof atob === 'function') {\n return atob;\n }\n throw new AmplifyError({\n name: 'Base64EncoderError',\n message: 'Cannot resolve the `atob` function from the environment.',\n });\n};\n\nexport { getAtob, getBtoa, getCrypto };\n","import { createAssertionFunction } from '../../../errors/createAssertionFunction.mjs';\nimport '../../../types/errors.mjs';\nimport '../../../errors/errorHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar AuthConfigurationErrorCode;\n(function (AuthConfigurationErrorCode) {\n AuthConfigurationErrorCode[\"AuthTokenConfigException\"] = \"AuthTokenConfigException\";\n AuthConfigurationErrorCode[\"AuthUserPoolAndIdentityPoolException\"] = \"AuthUserPoolAndIdentityPoolException\";\n AuthConfigurationErrorCode[\"AuthUserPoolException\"] = \"AuthUserPoolException\";\n AuthConfigurationErrorCode[\"InvalidIdentityPoolIdException\"] = \"InvalidIdentityPoolIdException\";\n AuthConfigurationErrorCode[\"OAuthNotConfigureException\"] = \"OAuthNotConfigureException\";\n})(AuthConfigurationErrorCode || (AuthConfigurationErrorCode = {}));\nconst authConfigurationErrorMap = {\n [AuthConfigurationErrorCode.AuthTokenConfigException]: {\n message: 'Auth Token Provider not configured.',\n recoverySuggestion: 'Make sure to call Amplify.configure in your app.',\n },\n [AuthConfigurationErrorCode.AuthUserPoolAndIdentityPoolException]: {\n message: 'Auth UserPool or IdentityPool not configured.',\n recoverySuggestion: 'Make sure to call Amplify.configure in your app with UserPoolId and IdentityPoolId.',\n },\n [AuthConfigurationErrorCode.AuthUserPoolException]: {\n message: 'Auth UserPool not configured.',\n recoverySuggestion: 'Make sure to call Amplify.configure in your app with userPoolId and userPoolClientId.',\n },\n [AuthConfigurationErrorCode.InvalidIdentityPoolIdException]: {\n message: 'Invalid identity pool id provided.',\n recoverySuggestion: 'Make sure a valid identityPoolId is given in the config.',\n },\n [AuthConfigurationErrorCode.OAuthNotConfigureException]: {\n message: 'oauth param not configured.',\n recoverySuggestion: 'Make sure to call Amplify.configure with oauth parameter in your app.',\n },\n};\nconst assert = createAssertionFunction(authConfigurationErrorMap);\n\nexport { AuthConfigurationErrorCode, assert };\n","import { base64Decoder } from '../../../utils/convert/base64/base64Decoder.mjs';\nimport '../../../types/errors.mjs';\nimport '../../../errors/errorHelpers.mjs';\nimport { assert, AuthConfigurationErrorCode } from './errorHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction assertTokenProviderConfig(cognitoConfig) {\n let assertionValid = true; // assume valid until otherwise proveed\n if (!cognitoConfig) {\n assertionValid = false;\n }\n else {\n assertionValid =\n !!cognitoConfig.userPoolId && !!cognitoConfig.userPoolClientId;\n }\n assert(assertionValid, AuthConfigurationErrorCode.AuthUserPoolException);\n}\nfunction assertOAuthConfig(cognitoConfig) {\n const validOAuthConfig = !!cognitoConfig?.loginWith?.oauth?.domain &&\n !!cognitoConfig?.loginWith?.oauth?.redirectSignOut &&\n !!cognitoConfig?.loginWith?.oauth?.redirectSignIn &&\n !!cognitoConfig?.loginWith?.oauth?.responseType;\n assert(validOAuthConfig, AuthConfigurationErrorCode.OAuthNotConfigureException);\n}\nfunction assertIdentityPoolIdConfig(cognitoConfig) {\n const validConfig = !!cognitoConfig?.identityPoolId;\n assert(validConfig, AuthConfigurationErrorCode.InvalidIdentityPoolIdException);\n}\n/**\n * Decodes payload of JWT token\n *\n * @param {String} token A string representing a token to be decoded\n * @throws {@link Error} - Throws error when token is invalid or payload malformed.\n */\nfunction decodeJWT(token) {\n const tokenParts = token.split('.');\n if (tokenParts.length !== 3) {\n throw new Error('Invalid token');\n }\n try {\n const base64WithUrlSafe = tokenParts[1];\n const base64 = base64WithUrlSafe.replace(/-/g, '+').replace(/_/g, '/');\n const jsonStr = decodeURIComponent(base64Decoder\n .convert(base64)\n .split('')\n .map(char => `%${`00${char.charCodeAt(0).toString(16)}`.slice(-2)}`)\n .join(''));\n const payload = JSON.parse(jsonStr);\n return {\n toString: () => token,\n payload,\n };\n }\n catch (err) {\n throw new Error('Invalid token payload');\n }\n}\n\nexport { assertIdentityPoolIdConfig, assertOAuthConfig, assertTokenProviderConfig, decodeJWT };\n","import { AmplifyError } from '@aws-amplify/core/internals/utils';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nclass AuthError extends AmplifyError {\n constructor(params) {\n super(params);\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = AuthError;\n Object.setPrototypeOf(this, AuthError.prototype);\n }\n}\n\nexport { AuthError };\n","import { AuthError } from '../../errors/AuthError.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction getRegionFromUserPoolId(userPoolId) {\n const region = userPoolId?.split('_')[0];\n if (!userPoolId ||\n userPoolId.indexOf('_') < 0 ||\n !region ||\n typeof region !== 'string')\n throw new AuthError({\n name: 'InvalidUserPoolId',\n message: 'Invalid user pool id provided.',\n });\n return region;\n}\nfunction getRegionFromIdentityPoolId(identityPoolId) {\n if (!identityPoolId || !identityPoolId.includes(':')) {\n throw new AuthError({\n name: 'InvalidIdentityPoolIdException',\n message: 'Invalid identity pool id provided.',\n recoverySuggestion: 'Make sure a valid identityPoolId is given in the config.',\n });\n }\n return identityPoolId.split(':')[0];\n}\n\nexport { getRegionFromIdentityPoolId, getRegionFromUserPoolId };\n","import { AuthError } from './AuthError.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst USER_UNAUTHENTICATED_EXCEPTION = 'UserUnAuthenticatedException';\nconst USER_ALREADY_AUTHENTICATED_EXCEPTION = 'UserAlreadyAuthenticatedException';\nconst DEVICE_METADATA_NOT_FOUND_EXCEPTION = 'DeviceMetadataNotFoundException';\nconst AUTO_SIGN_IN_EXCEPTION = 'AutoSignInException';\nconst INVALID_REDIRECT_EXCEPTION = 'InvalidRedirectException';\nconst INVALID_APP_SCHEME_EXCEPTION = 'InvalidAppSchemeException';\nconst INVALID_PREFERRED_REDIRECT_EXCEPTION = 'InvalidPreferredRedirectUrlException';\nconst invalidRedirectException = new AuthError({\n name: INVALID_REDIRECT_EXCEPTION,\n message: 'signInRedirect or signOutRedirect had an invalid format or was not found.',\n recoverySuggestion: 'Please make sure the signIn/Out redirect in your oauth config is valid.',\n});\nconst invalidAppSchemeException = new AuthError({\n name: INVALID_APP_SCHEME_EXCEPTION,\n message: 'A valid non-http app scheme was not found in the config.',\n recoverySuggestion: 'Please make sure a valid custom app scheme is present in the config.',\n});\nconst invalidPreferredRedirectUrlException = new AuthError({\n name: INVALID_PREFERRED_REDIRECT_EXCEPTION,\n message: 'The given preferredRedirectUrl does not match any items in the redirectSignOutUrls array from the config.',\n recoverySuggestion: 'Please make sure a matching preferredRedirectUrl is provided.',\n});\nconst INVALID_ORIGIN_EXCEPTION = 'InvalidOriginException';\nconst invalidOriginException = new AuthError({\n name: INVALID_ORIGIN_EXCEPTION,\n message: 'redirect is coming from a different origin. The oauth flow needs to be initiated from the same origin',\n recoverySuggestion: 'Please call signInWithRedirect from the same origin.',\n});\nconst OAUTH_SIGNOUT_EXCEPTION = 'OAuthSignOutException';\nconst TOKEN_REFRESH_EXCEPTION = 'TokenRefreshException';\nconst UNEXPECTED_SIGN_IN_INTERRUPTION_EXCEPTION = 'UnexpectedSignInInterruptionException';\n\nexport { AUTO_SIGN_IN_EXCEPTION, DEVICE_METADATA_NOT_FOUND_EXCEPTION, INVALID_APP_SCHEME_EXCEPTION, INVALID_ORIGIN_EXCEPTION, INVALID_PREFERRED_REDIRECT_EXCEPTION, INVALID_REDIRECT_EXCEPTION, OAUTH_SIGNOUT_EXCEPTION, TOKEN_REFRESH_EXCEPTION, UNEXPECTED_SIGN_IN_INTERRUPTION_EXCEPTION, USER_ALREADY_AUTHENTICATED_EXCEPTION, USER_UNAUTHENTICATED_EXCEPTION, invalidAppSchemeException, invalidOriginException, invalidPreferredRedirectUrlException, invalidRedirectException };\n","import { AuthError } from '../../../errors/AuthError.mjs';\nimport { TOKEN_REFRESH_EXCEPTION, USER_UNAUTHENTICATED_EXCEPTION, DEVICE_METADATA_NOT_FOUND_EXCEPTION } from '../../../errors/constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction isTypeUserPoolConfig(authConfig) {\n if (authConfig &&\n authConfig.Cognito.userPoolId &&\n authConfig.Cognito.userPoolClientId) {\n return true;\n }\n return false;\n}\nfunction assertAuthTokens(tokens) {\n if (!tokens || !tokens.accessToken) {\n throw new AuthError({\n name: USER_UNAUTHENTICATED_EXCEPTION,\n message: 'User needs to be authenticated to call this API.',\n recoverySuggestion: 'Sign in before calling this API again.',\n });\n }\n}\nfunction assertIdTokenInAuthTokens(tokens) {\n if (!tokens || !tokens.idToken) {\n throw new AuthError({\n name: USER_UNAUTHENTICATED_EXCEPTION,\n message: 'User needs to be authenticated to call this API.',\n recoverySuggestion: 'Sign in before calling this API again.',\n });\n }\n}\nconst oAuthTokenRefreshException = new AuthError({\n name: TOKEN_REFRESH_EXCEPTION,\n message: `Token refresh is not supported when authenticated with the 'implicit grant' (token) oauth flow. \n\tPlease change your oauth configuration to use 'code grant' flow.`,\n recoverySuggestion: `Please logout and change your Amplify configuration to use \"code grant\" flow. \n\tE.g { responseType: 'code' }`,\n});\nconst tokenRefreshException = new AuthError({\n name: USER_UNAUTHENTICATED_EXCEPTION,\n message: 'User needs to be authenticated to call this API.',\n recoverySuggestion: 'Sign in before calling this API again.',\n});\nfunction assertAuthTokensWithRefreshToken(tokens) {\n if (isAuthenticatedWithImplicitOauthFlow(tokens)) {\n throw oAuthTokenRefreshException;\n }\n if (!isAuthenticatedWithRefreshToken(tokens)) {\n throw tokenRefreshException;\n }\n}\nfunction assertDeviceMetadata(deviceMetadata) {\n if (!deviceMetadata ||\n !deviceMetadata.deviceKey ||\n !deviceMetadata.deviceGroupKey ||\n !deviceMetadata.randomPassword) {\n throw new AuthError({\n name: DEVICE_METADATA_NOT_FOUND_EXCEPTION,\n message: 'Either deviceKey, deviceGroupKey or secretPassword were not found during the sign-in process.',\n recoverySuggestion: 'Make sure to not clear storage after calling the signIn API.',\n });\n }\n}\nconst OAuthStorageKeys = {\n inflightOAuth: 'inflightOAuth',\n oauthSignIn: 'oauthSignIn',\n oauthPKCE: 'oauthPKCE',\n oauthState: 'oauthState',\n};\nfunction isAuthenticated(tokens) {\n return tokens?.accessToken || tokens?.idToken;\n}\nfunction isAuthenticatedWithRefreshToken(tokens) {\n return isAuthenticated(tokens) && tokens?.refreshToken;\n}\nfunction isAuthenticatedWithImplicitOauthFlow(tokens) {\n return isAuthenticated(tokens) && !tokens?.refreshToken;\n}\n\nexport { OAuthStorageKeys, assertAuthTokens, assertAuthTokensWithRefreshToken, assertDeviceMetadata, assertIdTokenInAuthTokens, isTypeUserPoolConfig, oAuthTokenRefreshException, tokenRefreshException };\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Compose a service API handler that accepts input as defined shape and responds conforming to defined output shape.\n * A service API handler is composed with:\n * * A transfer handler\n * * A serializer function\n * * A deserializer function\n * * A default config object\n *\n * The returned service API handler, when called, will trigger the following workflow:\n * 1. When calling the service API handler function, the default config object is merged into the input config\n * object to assign the default values of some omitted configs, resulting to a resolved config object.\n * 2. The `endpointResolver` function from the default config object will be invoked with the resolved config object and\n * API input object resulting to an endpoint instance.\n * 3. The serializer function is invoked with API input object and the endpoint instance resulting to an HTTP request\n * instance.\n * 4. The HTTP request instance and the resolved config object is passed to the transfer handler function.\n * 5. The transfer handler function resolves to an HTTP response instance(can be either successful or failed status code).\n * 6. The deserializer function is invoked with the HTTP response instance resulting to the API output object, and\n * return to the caller.\n *\n *\n * @param transferHandler Async function for dispatching HTTP requests and returning HTTP response.\n * @param serializer Async function for converting object in defined input shape into HTTP request targeting a given\n * \tendpoint.\n * @param deserializer Async function for converting HTTP response into output object in defined output shape, or error\n * \tshape.\n * @param defaultConfig object containing default options to be consumed by transfer handler, serializer and\n * deserializer.\n * @returns a async service API handler function that accepts a config object and input object in defined shape, returns\n * \tan output object in defined shape. It may also throw error instance in defined shape in deserializer. The config\n * object type is composed with options type of transferHandler, endpointResolver function as well as endpointResolver\n * function's input options type, region string. The config object property will be marked as optional if it's also\n * \tdefined in defaultConfig.\n *\n * @internal\n */\nconst composeServiceApi = (transferHandler, serializer, deserializer, defaultConfig) => {\n return async (config, input) => {\n const resolvedConfig = {\n ...defaultConfig,\n ...config,\n };\n // We need to allow different endpoints based on both given config(other than region) and input.\n // However for most of non-S3 services, region is the only input for endpoint resolver.\n const endpoint = await resolvedConfig.endpointResolver(resolvedConfig, input);\n // Unlike AWS SDK clients, a serializer should NOT populate the `host` or `content-length` headers.\n // Both of these headers are prohibited per Spec(https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name).\n // They will be populated automatically by browser, or node-fetch polyfill.\n const request = await serializer(input, endpoint);\n const response = await transferHandler(request, {\n ...resolvedConfig,\n });\n return deserializer(response);\n };\n};\n\nexport { composeServiceApi };\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst parseMetadata = (response) => {\n const { headers, statusCode } = response;\n return {\n ...(isMetadataBearer(response) ? response.$metadata : {}),\n httpStatusCode: statusCode,\n requestId: headers['x-amzn-requestid'] ??\n headers['x-amzn-request-id'] ??\n headers['x-amz-request-id'],\n extendedRequestId: headers['x-amz-id-2'],\n cfId: headers['x-amz-cf-id'],\n };\n};\nconst isMetadataBearer = (response) => typeof response?.$metadata === 'object';\n\nexport { parseMetadata };\n","import { parseMetadata } from './responseInfo.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Utility functions for serializing and deserializing of JSON protocol in general(including: REST-JSON, JSON-RPC, etc.)\n */\n/**\n * Error parser for AWS JSON protocol.\n */\nconst parseJsonError = async (response) => {\n if (!response || response.statusCode < 300) {\n return;\n }\n const body = await parseJsonBody(response);\n const sanitizeErrorCode = (rawValue) => {\n const [cleanValue] = rawValue.toString().split(/[,:]+/);\n if (cleanValue.includes('#')) {\n return cleanValue.split('#')[1];\n }\n return cleanValue;\n };\n const code = sanitizeErrorCode(response.headers['x-amzn-errortype'] ??\n body.code ??\n body.__type ??\n 'UnknownError');\n const message = body.message ?? body.Message ?? 'Unknown error';\n const error = new Error(message);\n return Object.assign(error, {\n name: code,\n $metadata: parseMetadata(response),\n });\n};\n/**\n * Parse JSON response body to JavaScript object.\n */\nconst parseJsonBody = async (response) => {\n if (!response.body) {\n throw new Error('Missing response payload');\n }\n const output = await response.body.json();\n return Object.assign(output, {\n $metadata: parseMetadata(response),\n });\n};\n\nexport { parseJsonBody, parseJsonError };\n","import { AmplifyErrorCode } from '@aws-amplify/core/internals/utils';\nimport { AuthError } from '../AuthError.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction assertServiceError(error) {\n if (!error ||\n error.name === 'Error' ||\n error instanceof TypeError) {\n throw new AuthError({\n name: AmplifyErrorCode.Unknown,\n message: 'An unknown error has occurred.',\n underlyingError: error,\n });\n }\n}\n\nexport { assertServiceError };\n","import { parseJsonError, parseJsonBody } from '@aws-amplify/core/internals/aws-client-utils';\nimport { assertServiceError } from '../../../../../../errors/utils/assertServiceError.mjs';\nimport { AuthError } from '../../../../../../errors/AuthError.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createUserPoolDeserializer = () => async (response) => {\n if (response.statusCode >= 300) {\n const error = await parseJsonError(response);\n assertServiceError(error);\n throw new AuthError({ name: error.name, message: error.message });\n }\n return parseJsonBody(response);\n};\n\nexport { createUserPoolDeserializer };\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Compose a transfer handler with a core transfer handler and a list of middleware.\n * @param coreHandler Core transfer handler\n * @param middleware\tList of middleware\n * @returns A transfer handler whose option type is the union of the core\n * \ttransfer handler's option type and the middleware's option type.\n * @internal\n */\nconst composeTransferHandler = (coreHandler, middleware) => (request, options) => {\n const context = {};\n let composedHandler = (composeHandlerRequest) => coreHandler(composeHandlerRequest, options);\n for (let i = middleware.length - 1; i >= 0; i--) {\n const m = middleware[i];\n const resolvedMiddleware = m(options);\n composedHandler = resolvedMiddleware(composedHandler, context);\n }\n return composedHandler(request);\n};\n\nexport { composeTransferHandler };\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst DEFAULT_RETRY_ATTEMPTS = 3;\n/**\n * Retry middleware\n */\nconst retryMiddlewareFactory = ({ maxAttempts = DEFAULT_RETRY_ATTEMPTS, retryDecider, computeDelay, abortSignal, }) => {\n if (maxAttempts < 1) {\n throw new Error('maxAttempts must be greater than 0');\n }\n return (next, context) => async function retryMiddleware(request) {\n let error;\n let attemptsCount = context.attemptsCount ?? 0;\n let response;\n // When retry is not needed or max attempts is reached, either error or response will be set. This function handles either cases.\n const handleTerminalErrorOrResponse = () => {\n if (response) {\n addOrIncrementMetadataAttempts(response, attemptsCount);\n return response;\n }\n else {\n addOrIncrementMetadataAttempts(error, attemptsCount);\n throw error;\n }\n };\n while (!abortSignal?.aborted && attemptsCount < maxAttempts) {\n try {\n response = await next(request);\n error = undefined;\n }\n catch (e) {\n error = e;\n response = undefined;\n }\n // context.attemptsCount may be updated after calling next handler which may retry the request by itself.\n attemptsCount =\n (context.attemptsCount ?? 0) > attemptsCount\n ? (context.attemptsCount ?? 0)\n : attemptsCount + 1;\n context.attemptsCount = attemptsCount;\n const { isCredentialsExpiredError, retryable } = await retryDecider(response, error, context);\n if (retryable) {\n // Setting isCredentialsInvalid flag to notify signing middleware to forceRefresh credentials provider.\n context.isCredentialsExpired = !!isCredentialsExpiredError;\n if (!abortSignal?.aborted && attemptsCount < maxAttempts) {\n // prevent sleep for last attempt or cancelled request;\n const delay = computeDelay(attemptsCount);\n await cancellableSleep(delay, abortSignal);\n }\n continue;\n }\n else {\n return handleTerminalErrorOrResponse();\n }\n }\n if (abortSignal?.aborted) {\n throw new Error('Request aborted.');\n }\n else {\n return handleTerminalErrorOrResponse();\n }\n };\n};\nconst cancellableSleep = (timeoutMs, abortSignal) => {\n if (abortSignal?.aborted) {\n return Promise.resolve();\n }\n let timeoutId;\n let sleepPromiseResolveFn;\n const sleepPromise = new Promise(resolve => {\n sleepPromiseResolveFn = resolve;\n timeoutId = setTimeout(resolve, timeoutMs);\n });\n abortSignal?.addEventListener('abort', function cancelSleep(_) {\n clearTimeout(timeoutId);\n abortSignal?.removeEventListener('abort', cancelSleep);\n sleepPromiseResolveFn();\n });\n return sleepPromise;\n};\nconst addOrIncrementMetadataAttempts = (nextHandlerOutput, attempts) => {\n if (Object.prototype.toString.call(nextHandlerOutput) !== '[object Object]') {\n return;\n }\n nextHandlerOutput.$metadata = {\n ...(nextHandlerOutput.$metadata ?? {}),\n attempts,\n };\n};\n\nexport { retryMiddlewareFactory };\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Cache the payload of a response body. It allows multiple calls to the body,\n * for example, when reading the body in both retry decider and error deserializer.\n * Caching body is allowed here because we call the body accessor(blob(), json(),\n * etc.) when body is small or streaming implementation is not available(RN).\n *\n * @internal\n */\nconst withMemoization = (payloadAccessor) => {\n let cached;\n return () => {\n if (!cached) {\n // Explicitly not awaiting. Intermediate await would add overhead and\n // introduce a possible race in the event that this wrapper is called\n // again before the first `payloadAccessor` call resolves.\n cached = payloadAccessor();\n }\n return cached;\n };\n};\n\nexport { withMemoization };\n","import { AmplifyError } from '../../errors/AmplifyError.mjs';\nimport { AmplifyErrorCode } from '../../types/errors.mjs';\nimport '../../errors/errorHelpers.mjs';\nimport { withMemoization } from '../utils/memoization.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst shouldSendBody = (method) => !['HEAD', 'GET', 'DELETE'].includes(method.toUpperCase());\n// TODO[AllanZhengYP]: we need to provide isCanceledError utility\nconst fetchTransferHandler = async ({ url, method, headers, body }, { abortSignal, cache, withCrossDomainCredentials }) => {\n let resp;\n try {\n resp = await fetch(url, {\n method,\n headers,\n body: shouldSendBody(method) ? body : undefined,\n signal: abortSignal,\n cache,\n credentials: withCrossDomainCredentials ? 'include' : 'same-origin',\n });\n }\n catch (e) {\n if (e instanceof TypeError) {\n throw new AmplifyError({\n name: AmplifyErrorCode.NetworkError,\n message: 'A network error has occurred.',\n underlyingError: e,\n });\n }\n throw e;\n }\n const responseHeaders = {};\n resp.headers?.forEach((value, key) => {\n responseHeaders[key.toLowerCase()] = value;\n });\n const httpResponse = {\n statusCode: resp.status,\n headers: responseHeaders,\n body: null,\n };\n // resp.body is a ReadableStream according to Fetch API spec, but React Native\n // does not implement it.\n const bodyWithMixin = Object.assign(resp.body ?? {}, {\n text: withMemoization(() => resp.text()),\n blob: withMemoization(() => resp.blob()),\n json: withMemoization(() => resp.json()),\n });\n return {\n ...httpResponse,\n body: bodyWithMixin,\n };\n};\n\nexport { fetchTransferHandler };\n","import { retryMiddlewareFactory } from '../middleware/retry/middleware.mjs';\nimport '../../types/errors.mjs';\nimport '../../errors/errorHelpers.mjs';\nimport '../../utils/getClientInfo/getClientInfo.mjs';\nimport '../../utils/retry/retry.mjs';\nimport { userAgentMiddlewareFactory } from '../middleware/userAgent/middleware.mjs';\nimport { composeTransferHandler } from '../internal/composeTransferHandler.mjs';\nimport { fetchTransferHandler } from './fetch.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst unauthenticatedHandler = composeTransferHandler(fetchTransferHandler, [userAgentMiddlewareFactory, retryMiddlewareFactory]);\n\nexport { unauthenticatedHandler };\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Middleware injects user agent string to specified header(default to 'x-amz-user-agent'),\n * if the header is not set already.\n *\n * TODO: incorporate new user agent design\n */\nconst userAgentMiddlewareFactory = ({ userAgentHeader = 'x-amz-user-agent', userAgentValue = '', }) => next => {\n return async function userAgentMiddleware(request) {\n if (userAgentValue.trim().length === 0) {\n const result = await next(request);\n return result;\n }\n else {\n const headerName = userAgentHeader.toLowerCase();\n request.headers[headerName] = request.headers[headerName]\n ? `${request.headers[headerName]} ${userAgentValue}`\n : userAgentValue;\n const response = await next(request);\n return response;\n }\n };\n};\n\nexport { userAgentMiddlewareFactory };\n","import { composeTransferHandler } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { unauthenticatedHandler } from '@aws-amplify/core/internals/aws-client-utils';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * A Cognito Identity-specific middleware that disables caching for all requests.\n */\nconst disableCacheMiddlewareFactory = () => (next, _) => async function disableCacheMiddleware(request) {\n request.headers['cache-control'] = 'no-store';\n return next(request);\n};\n/**\n * A Cognito Identity-specific transfer handler that does NOT sign requests, and\n * disables caching.\n *\n * @internal\n */\nconst cognitoUserPoolTransferHandler = composeTransferHandler(unauthenticatedHandler, [disableCacheMiddlewareFactory]);\n\nexport { cognitoUserPoolTransferHandler };\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// via https://github.com/aws/aws-sdk-js-v3/blob/ab0e7be36e7e7f8a0c04834357aaad643c7912c3/packages/service-error-classification/src/constants.ts#L8\nconst CLOCK_SKEW_ERROR_CODES = [\n 'AuthFailure',\n 'InvalidSignatureException',\n 'RequestExpired',\n 'RequestInTheFuture',\n 'RequestTimeTooSkewed',\n 'SignatureDoesNotMatch',\n 'BadRequestException', // API Gateway\n];\n/**\n * Given an error code, returns true if it is related to a clock skew error.\n *\n * @param errorCode String representation of some error.\n * @returns True if given error is present in `CLOCK_SKEW_ERROR_CODES`, false otherwise.\n *\n * @internal\n */\nconst isClockSkewError = (errorCode) => !!errorCode && CLOCK_SKEW_ERROR_CODES.includes(errorCode);\n\nexport { isClockSkewError };\n","import { AmplifyErrorCode } from '../../../types/errors.mjs';\nimport { isClockSkewError } from './isClockSkewError.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Get retry decider function\n * @param errorParser Function to load JavaScript error from HTTP response\n */\nconst getRetryDecider = (errorParser) => async (response, error) => {\n const parsedError = error ??\n (await errorParser(response)) ??\n undefined;\n const errorCode = parsedError?.code || parsedError?.name;\n const statusCode = response?.statusCode;\n const isRetryable = isConnectionError(error) ||\n isThrottlingError(statusCode, errorCode) ||\n isClockSkewError(errorCode) ||\n isServerSideError(statusCode, errorCode);\n return {\n retryable: isRetryable,\n };\n};\n// reference: https://github.com/aws/aws-sdk-js-v3/blob/ab0e7be36e7e7f8a0c04834357aaad643c7912c3/packages/service-error-classification/src/constants.ts#L22-L37\nconst THROTTLING_ERROR_CODES = [\n 'BandwidthLimitExceeded',\n 'EC2ThrottledException',\n 'LimitExceededException',\n 'PriorRequestNotComplete',\n 'ProvisionedThroughputExceededException',\n 'RequestLimitExceeded',\n 'RequestThrottled',\n 'RequestThrottledException',\n 'SlowDown',\n 'ThrottledException',\n 'Throttling',\n 'ThrottlingException',\n 'TooManyRequestsException',\n];\nconst TIMEOUT_ERROR_CODES = [\n 'TimeoutError',\n 'RequestTimeout',\n 'RequestTimeoutException',\n];\nconst isThrottlingError = (statusCode, errorCode) => statusCode === 429 ||\n (!!errorCode && THROTTLING_ERROR_CODES.includes(errorCode));\nconst isConnectionError = (error) => [\n AmplifyErrorCode.NetworkError,\n // TODO(vNext): unify the error code `ERR_NETWORK` used by the Storage XHR handler\n 'ERR_NETWORK',\n].includes(error?.name);\nconst isServerSideError = (statusCode, errorCode) => (!!statusCode && [500, 502, 503, 504].includes(statusCode)) ||\n (!!errorCode && TIMEOUT_ERROR_CODES.includes(errorCode));\n\nexport { getRetryDecider };\n","import '../../../types/errors.mjs';\nimport '../../../errors/errorHelpers.mjs';\nimport '../../../utils/getClientInfo/getClientInfo.mjs';\nimport { jitteredBackoff as jitteredBackoff$1 } from '../../../utils/retry/jitteredBackoff.mjs';\nimport '../../../utils/retry/retry.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// TODO: [v6] The separate retry utility is used by Data packages now and will replaced by retry middleware.\nconst DEFAULT_MAX_DELAY_MS = 5 * 60 * 1000;\nconst jitteredBackoff = attempt => {\n const delayFunction = jitteredBackoff$1(DEFAULT_MAX_DELAY_MS);\n const delay = delayFunction(attempt);\n // The delayFunction returns false when the delay is greater than the max delay(5 mins).\n // In this case, the retry middleware will delay 5 mins instead, as a ceiling of the delay.\n return delay === false ? DEFAULT_MAX_DELAY_MS : delay;\n};\n\nexport { jitteredBackoff };\n","import { MAX_DELAY_MS } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @private\n * Internal use of Amplify only\n */\nfunction jitteredBackoff(maxDelayMs = MAX_DELAY_MS) {\n const BASE_TIME_MS = 100;\n const JITTER_FACTOR = 100;\n return attempt => {\n const delay = 2 ** attempt * BASE_TIME_MS + JITTER_FACTOR * Math.random();\n return delay > maxDelayMs ? false : delay;\n };\n}\n\nexport { jitteredBackoff };\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst MAX_DELAY_MS = 5 * 60 * 1000;\n\nexport { MAX_DELAY_MS };\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar Framework;\n(function (Framework) {\n // < 100 - Web frameworks\n Framework[\"WebUnknown\"] = \"0\";\n Framework[\"React\"] = \"1\";\n Framework[\"NextJs\"] = \"2\";\n Framework[\"Angular\"] = \"3\";\n Framework[\"VueJs\"] = \"4\";\n Framework[\"Nuxt\"] = \"5\";\n Framework[\"Svelte\"] = \"6\";\n // 100s - Server side frameworks\n Framework[\"ServerSideUnknown\"] = \"100\";\n Framework[\"ReactSSR\"] = \"101\";\n Framework[\"NextJsSSR\"] = \"102\";\n Framework[\"AngularSSR\"] = \"103\";\n Framework[\"VueJsSSR\"] = \"104\";\n Framework[\"NuxtSSR\"] = \"105\";\n Framework[\"SvelteSSR\"] = \"106\";\n // 200s - Mobile framework\n Framework[\"ReactNative\"] = \"201\";\n Framework[\"Expo\"] = \"202\";\n})(Framework || (Framework = {}));\nvar Category;\n(function (Category) {\n Category[\"AI\"] = \"ai\";\n Category[\"API\"] = \"api\";\n Category[\"Auth\"] = \"auth\";\n Category[\"Analytics\"] = \"analytics\";\n Category[\"DataStore\"] = \"datastore\";\n Category[\"Geo\"] = \"geo\";\n Category[\"InAppMessaging\"] = \"inappmessaging\";\n Category[\"Interactions\"] = \"interactions\";\n Category[\"Predictions\"] = \"predictions\";\n Category[\"PubSub\"] = \"pubsub\";\n Category[\"PushNotification\"] = \"pushnotification\";\n Category[\"Storage\"] = \"storage\";\n})(Category || (Category = {}));\nvar AiAction;\n(function (AiAction) {\n AiAction[\"CreateConversation\"] = \"1\";\n AiAction[\"GetConversation\"] = \"2\";\n AiAction[\"ListConversations\"] = \"3\";\n AiAction[\"DeleteConversation\"] = \"4\";\n AiAction[\"SendMessage\"] = \"5\";\n AiAction[\"ListMessages\"] = \"6\";\n AiAction[\"OnMessage\"] = \"7\";\n AiAction[\"Generation\"] = \"8\";\n AiAction[\"UpdateConversation\"] = \"9\";\n})(AiAction || (AiAction = {}));\nvar AnalyticsAction;\n(function (AnalyticsAction) {\n AnalyticsAction[\"Record\"] = \"1\";\n AnalyticsAction[\"IdentifyUser\"] = \"2\";\n})(AnalyticsAction || (AnalyticsAction = {}));\nvar ApiAction;\n(function (ApiAction) {\n ApiAction[\"GraphQl\"] = \"1\";\n ApiAction[\"Get\"] = \"2\";\n ApiAction[\"Post\"] = \"3\";\n ApiAction[\"Put\"] = \"4\";\n ApiAction[\"Patch\"] = \"5\";\n ApiAction[\"Del\"] = \"6\";\n ApiAction[\"Head\"] = \"7\";\n})(ApiAction || (ApiAction = {}));\nvar AuthAction;\n(function (AuthAction) {\n AuthAction[\"SignUp\"] = \"1\";\n AuthAction[\"ConfirmSignUp\"] = \"2\";\n AuthAction[\"ResendSignUpCode\"] = \"3\";\n AuthAction[\"SignIn\"] = \"4\";\n AuthAction[\"FetchMFAPreference\"] = \"6\";\n AuthAction[\"UpdateMFAPreference\"] = \"7\";\n AuthAction[\"SetUpTOTP\"] = \"10\";\n AuthAction[\"VerifyTOTPSetup\"] = \"11\";\n AuthAction[\"ConfirmSignIn\"] = \"12\";\n AuthAction[\"DeleteUserAttributes\"] = \"15\";\n AuthAction[\"DeleteUser\"] = \"16\";\n AuthAction[\"UpdateUserAttributes\"] = \"17\";\n AuthAction[\"FetchUserAttributes\"] = \"18\";\n AuthAction[\"ConfirmUserAttribute\"] = \"22\";\n AuthAction[\"SignOut\"] = \"26\";\n AuthAction[\"UpdatePassword\"] = \"27\";\n AuthAction[\"ResetPassword\"] = \"28\";\n AuthAction[\"ConfirmResetPassword\"] = \"29\";\n AuthAction[\"FederatedSignIn\"] = \"30\";\n AuthAction[\"RememberDevice\"] = \"32\";\n AuthAction[\"ForgetDevice\"] = \"33\";\n AuthAction[\"FetchDevices\"] = \"34\";\n AuthAction[\"SendUserAttributeVerificationCode\"] = \"35\";\n AuthAction[\"SignInWithRedirect\"] = \"36\";\n AuthAction[\"StartWebAuthnRegistration\"] = \"37\";\n AuthAction[\"CompleteWebAuthnRegistration\"] = \"38\";\n AuthAction[\"ListWebAuthnCredentials\"] = \"39\";\n AuthAction[\"DeleteWebAuthnCredential\"] = \"40\";\n})(AuthAction || (AuthAction = {}));\nvar DataStoreAction;\n(function (DataStoreAction) {\n DataStoreAction[\"Subscribe\"] = \"1\";\n DataStoreAction[\"GraphQl\"] = \"2\";\n})(DataStoreAction || (DataStoreAction = {}));\nvar GeoAction;\n(function (GeoAction) {\n GeoAction[\"SearchByText\"] = \"0\";\n GeoAction[\"SearchByCoordinates\"] = \"1\";\n GeoAction[\"SearchForSuggestions\"] = \"2\";\n GeoAction[\"SearchByPlaceId\"] = \"3\";\n GeoAction[\"SaveGeofences\"] = \"4\";\n GeoAction[\"GetGeofence\"] = \"5\";\n GeoAction[\"ListGeofences\"] = \"6\";\n GeoAction[\"DeleteGeofences\"] = \"7\";\n})(GeoAction || (GeoAction = {}));\nvar InAppMessagingAction;\n(function (InAppMessagingAction) {\n InAppMessagingAction[\"SyncMessages\"] = \"1\";\n InAppMessagingAction[\"IdentifyUser\"] = \"2\";\n InAppMessagingAction[\"NotifyMessageInteraction\"] = \"3\";\n})(InAppMessagingAction || (InAppMessagingAction = {}));\nvar InteractionsAction;\n(function (InteractionsAction) {\n InteractionsAction[\"None\"] = \"0\";\n})(InteractionsAction || (InteractionsAction = {}));\nvar PredictionsAction;\n(function (PredictionsAction) {\n PredictionsAction[\"Convert\"] = \"1\";\n PredictionsAction[\"Identify\"] = \"2\";\n PredictionsAction[\"Interpret\"] = \"3\";\n})(PredictionsAction || (PredictionsAction = {}));\nvar PubSubAction;\n(function (PubSubAction) {\n PubSubAction[\"Subscribe\"] = \"1\";\n})(PubSubAction || (PubSubAction = {}));\nvar PushNotificationAction;\n(function (PushNotificationAction) {\n PushNotificationAction[\"InitializePushNotifications\"] = \"1\";\n PushNotificationAction[\"IdentifyUser\"] = \"2\";\n})(PushNotificationAction || (PushNotificationAction = {}));\nvar StorageAction;\n(function (StorageAction) {\n StorageAction[\"UploadData\"] = \"1\";\n StorageAction[\"DownloadData\"] = \"2\";\n StorageAction[\"List\"] = \"3\";\n StorageAction[\"Copy\"] = \"4\";\n StorageAction[\"Remove\"] = \"5\";\n StorageAction[\"GetProperties\"] = \"6\";\n StorageAction[\"GetUrl\"] = \"7\";\n StorageAction[\"GetDataAccess\"] = \"8\";\n StorageAction[\"ListCallerAccessGrants\"] = \"9\";\n})(StorageAction || (StorageAction = {}));\n\nexport { AiAction, AnalyticsAction, ApiAction, AuthAction, Category, DataStoreAction, Framework, GeoAction, InAppMessagingAction, InteractionsAction, PredictionsAction, PubSubAction, PushNotificationAction, StorageAction };\n","// generated by genversion\nconst version = '6.13.1';\n\nexport { version };\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst globalExists = () => {\n return typeof global !== 'undefined';\n};\nconst globalThisExists = () => {\n return typeof globalThis !== 'undefined';\n};\nconst windowExists = () => {\n return typeof window !== 'undefined';\n};\nconst documentExists = () => {\n return typeof document !== 'undefined';\n};\nconst processExists = () => {\n return typeof process !== 'undefined';\n};\nconst keyPrefixMatch = (object, prefix) => {\n return !!Object.keys(object).find(key => key.startsWith(prefix));\n};\n\nexport { documentExists, globalExists, globalThisExists, keyPrefixMatch, processExists, windowExists };\n","import { Framework } from '../types.mjs';\nimport { reactWebDetect, reactSSRDetect } from './React.mjs';\nimport { vueWebDetect, vueSSRDetect } from './Vue.mjs';\nimport { svelteWebDetect, svelteSSRDetect } from './Svelte.mjs';\nimport { nextWebDetect, nextSSRDetect } from './Next.mjs';\nimport { nuxtWebDetect, nuxtSSRDetect } from './Nuxt.mjs';\nimport { angularWebDetect, angularSSRDetect } from './Angular.mjs';\nimport { reactNativeDetect } from './ReactNative.mjs';\nimport { expoDetect } from './Expo.mjs';\nimport { webDetect } from './Web.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// These are in the order of detection where when both are detectable, the early Framework will be reported\nconst detectionMap = [\n // First, detect mobile\n { platform: Framework.Expo, detectionMethod: expoDetect },\n { platform: Framework.ReactNative, detectionMethod: reactNativeDetect },\n // Next, detect web frameworks\n { platform: Framework.NextJs, detectionMethod: nextWebDetect },\n { platform: Framework.Nuxt, detectionMethod: nuxtWebDetect },\n { platform: Framework.Angular, detectionMethod: angularWebDetect },\n { platform: Framework.React, detectionMethod: reactWebDetect },\n { platform: Framework.VueJs, detectionMethod: vueWebDetect },\n { platform: Framework.Svelte, detectionMethod: svelteWebDetect },\n { platform: Framework.WebUnknown, detectionMethod: webDetect },\n // Last, detect ssr frameworks\n { platform: Framework.NextJsSSR, detectionMethod: nextSSRDetect },\n { platform: Framework.NuxtSSR, detectionMethod: nuxtSSRDetect },\n { platform: Framework.ReactSSR, detectionMethod: reactSSRDetect },\n { platform: Framework.VueJsSSR, detectionMethod: vueSSRDetect },\n { platform: Framework.AngularSSR, detectionMethod: angularSSRDetect },\n { platform: Framework.SvelteSSR, detectionMethod: svelteSSRDetect },\n];\nfunction detect() {\n return (detectionMap.find(detectionEntry => detectionEntry.detectionMethod())\n ?.platform || Framework.ServerSideUnknown);\n}\n\nexport { detect };\n","import { globalExists } from './helpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Tested with expo 48 / react-native 0.71.3\nfunction expoDetect() {\n return globalExists() && typeof global.expo !== 'undefined';\n}\n\nexport { expoDetect };\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Tested with react-native 0.17.7\nfunction reactNativeDetect() {\n return (typeof navigator !== 'undefined' &&\n typeof navigator.product !== 'undefined' &&\n navigator.product === 'ReactNative');\n}\n\nexport { reactNativeDetect };\n","import { windowExists, globalExists, keyPrefixMatch } from './helpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Tested with next 13.4 / react 18.2\nfunction nextWebDetect() {\n return (windowExists() &&\n window.next &&\n typeof window.next === 'object');\n}\nfunction nextSSRDetect() {\n return (globalExists() &&\n (keyPrefixMatch(global, '__next') || keyPrefixMatch(global, '__NEXT')));\n}\n\nexport { nextSSRDetect, nextWebDetect };\n","import { windowExists, globalExists } from './helpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Tested with nuxt 2.15 / vue 2.7\nfunction nuxtWebDetect() {\n return (windowExists() &&\n (window.__NUXT__ !== undefined ||\n window.$nuxt !== undefined));\n}\nfunction nuxtSSRDetect() {\n return (globalExists() && typeof global.__NUXT_PATHS__ !== 'undefined');\n}\n\nexport { nuxtSSRDetect, nuxtWebDetect };\n","import { documentExists, processExists, windowExists } from './helpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Tested with @angular/core 16.0.0\nfunction angularWebDetect() {\n const angularVersionSetInDocument = Boolean(documentExists() && document.querySelector('[ng-version]'));\n const angularContentSetInWindow = Boolean(windowExists() && typeof window.ng !== 'undefined');\n return angularVersionSetInDocument || angularContentSetInWindow;\n}\nfunction angularSSRDetect() {\n return ((processExists() &&\n typeof process.env === 'object' &&\n process.env.npm_lifecycle_script?.startsWith('ng ')) ||\n false);\n}\n\nexport { angularSSRDetect, angularWebDetect };\n","import { documentExists, processExists } from './helpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Tested with react 18.2 - built using Vite\nfunction reactWebDetect() {\n const elementKeyPrefixedWithReact = (key) => {\n return key.startsWith('_react') || key.startsWith('__react');\n };\n const elementIsReactEnabled = (element) => {\n return Object.keys(element).find(elementKeyPrefixedWithReact);\n };\n const allElementsWithId = () => Array.from(document.querySelectorAll('[id]'));\n return documentExists() && allElementsWithId().some(elementIsReactEnabled);\n}\nfunction reactSSRDetect() {\n return (processExists() &&\n typeof process.env !== 'undefined' &&\n !!Object.keys(process.env).find(key => key.includes('react')));\n}\n// use the some\n\nexport { reactSSRDetect, reactWebDetect };\n","import { windowExists, keyPrefixMatch, globalExists } from './helpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Tested with vue 3.3.2\nfunction vueWebDetect() {\n return windowExists() && keyPrefixMatch(window, '__VUE');\n}\nfunction vueSSRDetect() {\n return globalExists() && keyPrefixMatch(global, '__VUE');\n}\n\nexport { vueSSRDetect, vueWebDetect };\n","import { windowExists, keyPrefixMatch, processExists } from './helpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Tested with svelte 3.59\nfunction svelteWebDetect() {\n return windowExists() && keyPrefixMatch(window, '__SVELTE');\n}\nfunction svelteSSRDetect() {\n return (processExists() &&\n typeof process.env !== 'undefined' &&\n !!Object.keys(process.env).find(key => key.includes('svelte')));\n}\n\nexport { svelteSSRDetect, svelteWebDetect };\n","import { windowExists } from './helpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction webDetect() {\n return windowExists();\n}\n\nexport { webDetect };\n","import { Framework } from './types.mjs';\nimport { detect } from './detection/index.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// We want to cache detection since the framework won't change\nlet frameworkCache;\nconst frameworkChangeObservers = [];\n// Setup the detection reset tracking / timeout delays\nlet resetTriggered = false;\nconst SSR_RESET_TIMEOUT = 10; // ms\nconst WEB_RESET_TIMEOUT = 10; // ms\nconst PRIME_FRAMEWORK_DELAY = 1000; // ms\nconst detectFramework = () => {\n if (!frameworkCache) {\n frameworkCache = detect();\n if (resetTriggered) {\n // The final run of detectFramework:\n // Starting from this point, the `frameworkCache` becomes \"final\".\n // So we don't need to notify the observers again so the observer\n // can be removed after the final notice.\n while (frameworkChangeObservers.length) {\n frameworkChangeObservers.pop()?.();\n }\n }\n else {\n // The first run of detectFramework:\n // Every time we update the cache, call each observer function\n frameworkChangeObservers.forEach(fcn => {\n fcn();\n });\n }\n // Retry once for either Unknown type after a delay (explained below)\n resetTimeout(Framework.ServerSideUnknown, SSR_RESET_TIMEOUT);\n resetTimeout(Framework.WebUnknown, WEB_RESET_TIMEOUT);\n }\n return frameworkCache;\n};\n/**\n * @internal Setup observer callback that will be called everytime the framework changes\n */\nconst observeFrameworkChanges = (fcn) => {\n // When the `frameworkCache` won't be updated again, we ignore all incoming\n // observers.\n if (resetTriggered) {\n return;\n }\n frameworkChangeObservers.push(fcn);\n};\nfunction clearCache() {\n frameworkCache = undefined;\n}\n// For a framework type and a delay amount, setup the event to re-detect\n// During the runtime boot, it is possible that framework detection will\n// be triggered before the framework has made modifications to the\n// global/window/etc needed for detection. When no framework is detected\n// we will reset and try again to ensure we don't use a cached\n// non-framework detection result for all requests.\nfunction resetTimeout(framework, delay) {\n if (frameworkCache === framework && !resetTriggered) {\n setTimeout(() => {\n clearCache();\n resetTriggered = true;\n setTimeout(detectFramework, PRIME_FRAMEWORK_DELAY);\n }, delay);\n }\n}\n\nexport { clearCache, detectFramework, frameworkChangeObservers, observeFrameworkChanges };\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Maintains custom user-agent state set by external consumers.\nconst customUserAgentState = {};\n/**\n * Sets custom user agent state which will be appended to applicable requests. Returns a function that can be used to\n * clean up any custom state set with this API.\n *\n * @note\n * This API operates globally. Calling this API multiple times will result in the most recently set values for a\n * particular API being used.\n *\n * @note\n * This utility IS NOT compatible with SSR.\n *\n * @param input - SetCustomUserAgentInput that defines custom state to apply to the specified APIs.\n */\nconst setCustomUserAgent = (input) => {\n // Save custom user-agent state & increment reference counter\n // TODO Remove `any` when we upgrade to TypeScript 5.2, see: https://github.com/microsoft/TypeScript/issues/44373\n customUserAgentState[input.category] = input.apis.reduce((acc, api) => ({\n ...acc,\n [api]: {\n refCount: acc[api]?.refCount ? acc[api].refCount + 1 : 1,\n additionalDetails: input.additionalDetails,\n },\n }), customUserAgentState[input.category] ?? {});\n // Callback that cleans up state for APIs recorded by this call\n let cleanUpCallbackCalled = false;\n const cleanUpCallback = () => {\n // Only allow the cleanup callback to be called once\n if (cleanUpCallbackCalled) {\n return;\n }\n cleanUpCallbackCalled = true;\n input.apis.forEach(api => {\n const apiRefCount = customUserAgentState[input.category][api].refCount;\n if (apiRefCount > 1) {\n customUserAgentState[input.category][api].refCount = apiRefCount - 1;\n }\n else {\n delete customUserAgentState[input.category][api];\n // Clean up category if no more APIs set\n if (!Object.keys(customUserAgentState[input.category]).length) {\n delete customUserAgentState[input.category];\n }\n }\n });\n };\n return cleanUpCallback;\n};\nconst getCustomUserAgent = (category, api) => customUserAgentState[category]?.[api]?.additionalDetails;\n\nexport { getCustomUserAgent, setCustomUserAgent };\n","import { Framework } from './types.mjs';\nimport { version } from './version.mjs';\nimport { detectFramework, observeFrameworkChanges } from './detectFramework.mjs';\nimport { getCustomUserAgent } from './customUserAgent.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst BASE_USER_AGENT = `aws-amplify`;\n/** Sanitize Amplify version string be removing special character + and character post the special character */\nconst sanitizeAmplifyVersion = (amplifyVersion) => amplifyVersion.replace(/\\+.*/, '');\nclass PlatformBuilder {\n constructor() {\n this.userAgent = `${BASE_USER_AGENT}/${sanitizeAmplifyVersion(version)}`;\n }\n get framework() {\n return detectFramework();\n }\n get isReactNative() {\n return (this.framework === Framework.ReactNative ||\n this.framework === Framework.Expo);\n }\n observeFrameworkChanges(fcn) {\n observeFrameworkChanges(fcn);\n }\n}\nconst Platform = new PlatformBuilder();\nconst getAmplifyUserAgentObject = ({ category, action, } = {}) => {\n const userAgent = [\n [BASE_USER_AGENT, sanitizeAmplifyVersion(version)],\n ];\n if (category) {\n userAgent.push([category, action]);\n }\n userAgent.push(['framework', detectFramework()]);\n if (category && action) {\n const customState = getCustomUserAgent(category, action);\n if (customState) {\n customState.forEach(state => {\n userAgent.push(state);\n });\n }\n }\n return userAgent;\n};\nconst getAmplifyUserAgent = (customUserAgentDetails) => {\n const userAgent = getAmplifyUserAgentObject(customUserAgentDetails);\n const userAgentString = userAgent\n .map(([agentKey, agentValue]) => agentKey && agentValue ? `${agentKey}/${agentValue}` : agentKey)\n .join(' ');\n return userAgentString;\n};\n\nexport { Platform, getAmplifyUserAgent, getAmplifyUserAgentObject, sanitizeAmplifyVersion };\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * The service name used to sign requests if the API requires authentication.\n */\nconst COGNITO_IDP_SERVICE_NAME = 'cognito-idp';\n\nexport { COGNITO_IDP_SERVICE_NAME };\n","import { getRetryDecider, parseJsonError, jitteredBackoff } from '@aws-amplify/core/internals/aws-client-utils';\nimport { getAmplifyUserAgent } from '@aws-amplify/core/internals/utils';\nimport { COGNITO_IDP_SERVICE_NAME } from '../../../constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst DEFAULT_SERVICE_CLIENT_API_CONFIG = {\n service: COGNITO_IDP_SERVICE_NAME,\n retryDecider: getRetryDecider(parseJsonError),\n computeDelay: jitteredBackoff,\n userAgentValue: getAmplifyUserAgent(),\n cache: 'no-store',\n};\n\nexport { DEFAULT_SERVICE_CLIENT_API_CONFIG };\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst AmplifyUrl = URL;\nconst AmplifyUrlSearchParams = URLSearchParams;\n\nexport { AmplifyUrl, AmplifyUrlSearchParams };\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Default partition for AWS services. This is used when the region is not provided or the region is not recognized.\n *\n * @internal\n */\nconst defaultPartition = {\n id: 'aws',\n outputs: {\n dnsSuffix: 'amazonaws.com',\n },\n regionRegex: '^(us|eu|ap|sa|ca|me|af)\\\\-\\\\w+\\\\-\\\\d+$',\n regions: ['aws-global'],\n};\n/**\n * This data is adapted from the partition file from AWS SDK shared utilities but remove some contents for bundle size\n * concern. Information removed are `dualStackDnsSuffix`, `supportDualStack`, `supportFIPS`, restricted partitions, and\n * list of regions for each partition other than global regions.\n *\n * * Ref: https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints\n * * Ref: https://github.com/aws/aws-sdk-js-v3/blob/0201baef03c2379f1f6f7150b9d401d4b230d488/packages/util-endpoints/src/lib/aws/partitions.json#L1\n *\n * @internal\n */\nconst partitionsInfo = {\n partitions: [\n defaultPartition,\n {\n id: 'aws-cn',\n outputs: {\n dnsSuffix: 'amazonaws.com.cn',\n },\n regionRegex: '^cn\\\\-\\\\w+\\\\-\\\\d+$',\n regions: ['aws-cn-global'],\n },\n ],\n};\n\nexport { defaultPartition, partitionsInfo };\n","import { defaultPartition, partitionsInfo } from './partitions.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Get the AWS Services endpoint URL's DNS suffix for a given region. A typical AWS regional service endpoint URL will\n * follow this pattern: {endpointPrefix}.{region}.{dnsSuffix}. For example, the endpoint URL for Cognito Identity in\n * us-east-1 will be cognito-identity.us-east-1.amazonaws.com. Here the DnsSuffix is `amazonaws.com`.\n *\n * @param region\n * @returns The DNS suffix\n *\n * @internal\n */\nconst getDnsSuffix = (region) => {\n const { partitions } = partitionsInfo;\n for (const { regions, outputs, regionRegex } of partitions) {\n const regex = new RegExp(regionRegex);\n if (regions.includes(region) || regex.test(region)) {\n return outputs.dnsSuffix;\n }\n }\n return defaultPartition.outputs.dnsSuffix;\n};\n\nexport { getDnsSuffix };\n","import { AmplifyUrl } from '@aws-amplify/core/internals/utils';\nimport { cognitoUserPoolEndpointResolver } from '../../../foundation/cognitoUserPoolEndpointResolver.mjs';\n\nconst createCognitoUserPoolEndpointResolver = ({ endpointOverride }) => (input) => {\n if (endpointOverride) {\n return { url: new AmplifyUrl(endpointOverride) };\n }\n return cognitoUserPoolEndpointResolver(input);\n};\n\nexport { createCognitoUserPoolEndpointResolver };\n","import { getDnsSuffix } from '@aws-amplify/core/internals/aws-client-utils';\nimport { AmplifyUrl } from '@aws-amplify/core/internals/utils';\nimport { COGNITO_IDP_SERVICE_NAME } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst cognitoUserPoolEndpointResolver = ({ region, }) => ({\n url: new AmplifyUrl(`https://${COGNITO_IDP_SERVICE_NAME}.${region}.${getDnsSuffix(region)}`),\n});\n\nexport { cognitoUserPoolEndpointResolver };\n","import { deDupeAsyncFunction, assertTokenProviderConfig, decodeJWT } from '@aws-amplify/core/internals/utils';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { assertAuthTokensWithRefreshToken } from './types.mjs';\nimport { AuthError } from '../../../errors/AuthError.mjs';\nimport { createInitiateAuthClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createInitiateAuthClient.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../../../errors/types/validation.mjs';\nimport '../types/errors.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\nimport { getUserContextData } from './userContextData.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst refreshAuthTokensFunction = async ({ tokens, authConfig, username, }) => {\n assertTokenProviderConfig(authConfig?.Cognito);\n const { userPoolId, userPoolClientId, userPoolEndpoint } = authConfig.Cognito;\n const region = getRegionFromUserPoolId(userPoolId);\n assertAuthTokensWithRefreshToken(tokens);\n const refreshTokenString = tokens.refreshToken;\n const AuthParameters = {\n REFRESH_TOKEN: refreshTokenString,\n };\n if (tokens.deviceMetadata?.deviceKey) {\n AuthParameters.DEVICE_KEY = tokens.deviceMetadata.deviceKey;\n }\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const initiateAuth = createInitiateAuthClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const { AuthenticationResult } = await initiateAuth({ region }, {\n ClientId: userPoolClientId,\n AuthFlow: 'REFRESH_TOKEN_AUTH',\n AuthParameters,\n UserContextData,\n });\n const accessToken = decodeJWT(AuthenticationResult?.AccessToken ?? '');\n const idToken = AuthenticationResult?.IdToken\n ? decodeJWT(AuthenticationResult.IdToken)\n : undefined;\n const { iat } = accessToken.payload;\n // This should never happen. If it does, it's a bug from the service.\n if (!iat) {\n throw new AuthError({\n name: 'iatNotFoundException',\n message: 'iat not found in access token',\n });\n }\n const clockDrift = iat * 1000 - new Date().getTime();\n return {\n accessToken,\n idToken,\n clockDrift,\n refreshToken: refreshTokenString,\n username,\n };\n};\nconst refreshAuthTokens = deDupeAsyncFunction(refreshAuthTokensFunction);\nconst refreshAuthTokensWithoutDedupe = refreshAuthTokensFunction;\n\nexport { refreshAuthTokens, refreshAuthTokensWithoutDedupe };\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * returns in-flight promise if there is one\n *\n * @param asyncFunction - asyncFunction to be deduped.\n * @returns - the return type of the callback\n */\nconst deDupeAsyncFunction = (asyncFunction) => {\n let inflightPromise;\n return async (...args) => {\n if (inflightPromise)\n return inflightPromise;\n inflightPromise = new Promise((resolve, reject) => {\n asyncFunction(...args)\n .then(result => {\n resolve(result);\n })\n .catch(error => {\n reject(error);\n })\n .finally(() => {\n inflightPromise = undefined;\n });\n });\n return inflightPromise;\n };\n};\n\nexport { deDupeAsyncFunction };\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction getUserContextData({ username, userPoolId, userPoolClientId, }) {\n if (typeof window === 'undefined') {\n return undefined;\n }\n const amazonCognitoAdvancedSecurityData = window\n .AmazonCognitoAdvancedSecurityData;\n if (typeof amazonCognitoAdvancedSecurityData === 'undefined') {\n return undefined;\n }\n const advancedSecurityData = amazonCognitoAdvancedSecurityData.getData(username, userPoolId, userPoolClientId);\n if (advancedSecurityData) {\n const userContextData = {\n EncodedData: advancedSecurityData,\n };\n return userContextData;\n }\n return {};\n}\n\nexport { getUserContextData };\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createInitiateAuthClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('InitiateAuth'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createInitiateAuthClient };\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createUserPoolSerializer = (operation) => (input, endpoint) => {\n const headers = getSharedHeaders(operation);\n const body = JSON.stringify(input);\n return buildHttpRpcRequest(endpoint, headers, body);\n};\nconst getSharedHeaders = (operation) => ({\n 'content-type': 'application/x-amz-json-1.1',\n 'x-amz-target': `AWSCognitoIdentityProviderService.${operation}`,\n});\nconst buildHttpRpcRequest = ({ url }, headers, body) => ({\n headers,\n url,\n body,\n method: 'POST',\n});\n\nexport { createUserPoolSerializer };\n","const AuthTokenStorageKeys = {\n accessToken: 'accessToken',\n idToken: 'idToken',\n oidcProvider: 'oidcProvider',\n clockDrift: 'clockDrift',\n refreshToken: 'refreshToken',\n deviceKey: 'deviceKey',\n randomPasswordKey: 'randomPasswordKey',\n deviceGroupKey: 'deviceGroupKey',\n signInDetails: 'signInDetails',\n oauthMetadata: 'oauthMetadata',\n};\n\nexport { AuthTokenStorageKeys };\n","import { createAssertionFunction } from '@aws-amplify/core/internals/utils';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar TokenProviderErrorCode;\n(function (TokenProviderErrorCode) {\n TokenProviderErrorCode[\"InvalidAuthTokens\"] = \"InvalidAuthTokens\";\n})(TokenProviderErrorCode || (TokenProviderErrorCode = {}));\nconst tokenValidationErrorMap = {\n [TokenProviderErrorCode.InvalidAuthTokens]: {\n message: 'Invalid tokens.',\n recoverySuggestion: 'Make sure the tokens are valid.',\n },\n};\nconst assert = createAssertionFunction(tokenValidationErrorMap);\n\nexport { TokenProviderErrorCode, assert };\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst AUTH_KEY_PREFIX = 'CognitoIdentityServiceProvider';\n\nexport { AUTH_KEY_PREFIX };\n","import { decodeJWT, assertTokenProviderConfig } from '@aws-amplify/core/internals/utils';\nimport { AuthError } from '../../../errors/AuthError.mjs';\nimport { AuthTokenStorageKeys } from './types.mjs';\nimport { assert, TokenProviderErrorCode } from './errorHelpers.mjs';\nimport { AUTH_KEY_PREFIX } from './constants.mjs';\n\nclass DefaultTokenStore {\n getKeyValueStorage() {\n if (!this.keyValueStorage) {\n throw new AuthError({\n name: 'KeyValueStorageNotFoundException',\n message: 'KeyValueStorage was not found in TokenStore',\n });\n }\n return this.keyValueStorage;\n }\n setKeyValueStorage(keyValueStorage) {\n this.keyValueStorage = keyValueStorage;\n }\n setAuthConfig(authConfig) {\n this.authConfig = authConfig;\n }\n async loadTokens() {\n // TODO(v6): migration logic should be here\n // Reading V5 tokens old format\n try {\n const authKeys = await this.getAuthKeys();\n const accessTokenString = await this.getKeyValueStorage().getItem(authKeys.accessToken);\n if (!accessTokenString) {\n throw new AuthError({\n name: 'NoSessionFoundException',\n message: 'Auth session was not found. Make sure to call signIn.',\n });\n }\n const accessToken = decodeJWT(accessTokenString);\n const itString = await this.getKeyValueStorage().getItem(authKeys.idToken);\n const idToken = itString ? decodeJWT(itString) : undefined;\n const refreshToken = (await this.getKeyValueStorage().getItem(authKeys.refreshToken)) ??\n undefined;\n const clockDriftString = (await this.getKeyValueStorage().getItem(authKeys.clockDrift)) ?? '0';\n const clockDrift = Number.parseInt(clockDriftString);\n const signInDetails = await this.getKeyValueStorage().getItem(authKeys.signInDetails);\n const tokens = {\n accessToken,\n idToken,\n refreshToken,\n deviceMetadata: (await this.getDeviceMetadata()) ?? undefined,\n clockDrift,\n username: await this.getLastAuthUser(),\n };\n if (signInDetails) {\n tokens.signInDetails = JSON.parse(signInDetails);\n }\n return tokens;\n }\n catch (err) {\n return null;\n }\n }\n async storeTokens(tokens) {\n assert(tokens !== undefined, TokenProviderErrorCode.InvalidAuthTokens);\n const lastAuthUser = tokens.username;\n await this.getKeyValueStorage().setItem(this.getLastAuthUserKey(), lastAuthUser);\n const authKeys = await this.getAuthKeys();\n await this.getKeyValueStorage().setItem(authKeys.accessToken, tokens.accessToken.toString());\n if (tokens.idToken) {\n await this.getKeyValueStorage().setItem(authKeys.idToken, tokens.idToken.toString());\n }\n else {\n await this.getKeyValueStorage().removeItem(authKeys.idToken);\n }\n if (tokens.refreshToken) {\n await this.getKeyValueStorage().setItem(authKeys.refreshToken, tokens.refreshToken);\n }\n else {\n await this.getKeyValueStorage().removeItem(authKeys.refreshToken);\n }\n if (tokens.deviceMetadata) {\n if (tokens.deviceMetadata.deviceKey) {\n await this.getKeyValueStorage().setItem(authKeys.deviceKey, tokens.deviceMetadata.deviceKey);\n }\n if (tokens.deviceMetadata.deviceGroupKey) {\n await this.getKeyValueStorage().setItem(authKeys.deviceGroupKey, tokens.deviceMetadata.deviceGroupKey);\n }\n await this.getKeyValueStorage().setItem(authKeys.randomPasswordKey, tokens.deviceMetadata.randomPassword);\n }\n if (tokens.signInDetails) {\n await this.getKeyValueStorage().setItem(authKeys.signInDetails, JSON.stringify(tokens.signInDetails));\n }\n else {\n await this.getKeyValueStorage().removeItem(authKeys.signInDetails);\n }\n await this.getKeyValueStorage().setItem(authKeys.clockDrift, `${tokens.clockDrift}`);\n }\n async clearTokens() {\n const authKeys = await this.getAuthKeys();\n // Not calling clear because it can remove data that is not managed by AuthTokenStore\n await Promise.all([\n this.getKeyValueStorage().removeItem(authKeys.accessToken),\n this.getKeyValueStorage().removeItem(authKeys.idToken),\n this.getKeyValueStorage().removeItem(authKeys.clockDrift),\n this.getKeyValueStorage().removeItem(authKeys.refreshToken),\n this.getKeyValueStorage().removeItem(authKeys.signInDetails),\n this.getKeyValueStorage().removeItem(this.getLastAuthUserKey()),\n this.getKeyValueStorage().removeItem(authKeys.oauthMetadata),\n ]);\n }\n async getDeviceMetadata(username) {\n const authKeys = await this.getAuthKeys(username);\n const deviceKey = await this.getKeyValueStorage().getItem(authKeys.deviceKey);\n const deviceGroupKey = await this.getKeyValueStorage().getItem(authKeys.deviceGroupKey);\n const randomPassword = await this.getKeyValueStorage().getItem(authKeys.randomPasswordKey);\n return randomPassword && deviceGroupKey && deviceKey\n ? {\n deviceKey,\n deviceGroupKey,\n randomPassword,\n }\n : null;\n }\n async clearDeviceMetadata(username) {\n const authKeys = await this.getAuthKeys(username);\n await Promise.all([\n this.getKeyValueStorage().removeItem(authKeys.deviceKey),\n this.getKeyValueStorage().removeItem(authKeys.deviceGroupKey),\n this.getKeyValueStorage().removeItem(authKeys.randomPasswordKey),\n ]);\n }\n async getAuthKeys(username) {\n assertTokenProviderConfig(this.authConfig?.Cognito);\n const lastAuthUser = username ?? (await this.getLastAuthUser());\n return createKeysForAuthStorage(AUTH_KEY_PREFIX, `${this.authConfig.Cognito.userPoolClientId}.${lastAuthUser}`);\n }\n getLastAuthUserKey() {\n assertTokenProviderConfig(this.authConfig?.Cognito);\n const identifier = this.authConfig.Cognito.userPoolClientId;\n return `${AUTH_KEY_PREFIX}.${identifier}.LastAuthUser`;\n }\n async getLastAuthUser() {\n const lastAuthUser = (await this.getKeyValueStorage().getItem(this.getLastAuthUserKey())) ??\n 'username';\n return lastAuthUser;\n }\n async setOAuthMetadata(metadata) {\n const { oauthMetadata: oauthMetadataKey } = await this.getAuthKeys();\n await this.getKeyValueStorage().setItem(oauthMetadataKey, JSON.stringify(metadata));\n }\n async getOAuthMetadata() {\n const { oauthMetadata: oauthMetadataKey } = await this.getAuthKeys();\n const oauthMetadata = await this.getKeyValueStorage().getItem(oauthMetadataKey);\n return oauthMetadata && JSON.parse(oauthMetadata);\n }\n}\nconst createKeysForAuthStorage = (provider, identifier) => {\n return getAuthStorageKeys(AuthTokenStorageKeys)(`${provider}`, identifier);\n};\nfunction getAuthStorageKeys(authKeys) {\n const keys = Object.values({ ...authKeys });\n return (prefix, identifier) => keys.reduce((acc, authKey) => ({\n ...acc,\n [authKey]: `${prefix}.${identifier}.${authKey}`,\n }), {});\n}\n\nexport { DefaultTokenStore, createKeysForAuthStorage, getAuthStorageKeys };\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction isTokenExpired({ expiresAt, clockDrift, tolerance = 5000, }) {\n const currentTime = Date.now();\n return currentTime + clockDrift + tolerance > expiresAt;\n}\n\nexport { isTokenExpired };\n","import { assertTokenProviderConfig } from '@aws-amplify/core/internals/utils';\nimport { getAuthStorageKeys } from '../tokenProvider/TokenStore.mjs';\nimport { OAuthStorageKeys } from './types.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst V5_HOSTED_UI_KEY = 'amplify-signin-with-hostedUI';\nconst name = 'CognitoIdentityServiceProvider';\nclass DefaultOAuthStore {\n constructor(keyValueStorage) {\n this.keyValueStorage = keyValueStorage;\n }\n async clearOAuthInflightData() {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n await Promise.all([\n this.keyValueStorage.removeItem(authKeys.inflightOAuth),\n this.keyValueStorage.removeItem(authKeys.oauthPKCE),\n this.keyValueStorage.removeItem(authKeys.oauthState),\n ]);\n }\n async clearOAuthData() {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n await this.clearOAuthInflightData();\n await this.keyValueStorage.removeItem(V5_HOSTED_UI_KEY); // remove in case a customer migrated an App from v5 to v6\n return this.keyValueStorage.removeItem(authKeys.oauthSignIn);\n }\n loadOAuthState() {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n return this.keyValueStorage.getItem(authKeys.oauthState);\n }\n storeOAuthState(state) {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n return this.keyValueStorage.setItem(authKeys.oauthState, state);\n }\n loadPKCE() {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n return this.keyValueStorage.getItem(authKeys.oauthPKCE);\n }\n storePKCE(pkce) {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n return this.keyValueStorage.setItem(authKeys.oauthPKCE, pkce);\n }\n setAuthConfig(authConfigParam) {\n this.cognitoConfig = authConfigParam;\n }\n async loadOAuthInFlight() {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n return ((await this.keyValueStorage.getItem(authKeys.inflightOAuth)) === 'true');\n }\n async storeOAuthInFlight(inflight) {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n await this.keyValueStorage.setItem(authKeys.inflightOAuth, `${inflight}`);\n }\n async loadOAuthSignIn() {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n const isLegacyHostedUISignIn = await this.keyValueStorage.getItem(V5_HOSTED_UI_KEY);\n const [isOAuthSignIn, preferPrivateSession] = (await this.keyValueStorage.getItem(authKeys.oauthSignIn))?.split(',') ??\n [];\n return {\n isOAuthSignIn: isOAuthSignIn === 'true' || isLegacyHostedUISignIn === 'true',\n preferPrivateSession: preferPrivateSession === 'true',\n };\n }\n async storeOAuthSignIn(oauthSignIn, preferPrivateSession = false) {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n await this.keyValueStorage.setItem(authKeys.oauthSignIn, `${oauthSignIn},${preferPrivateSession}`);\n }\n}\nconst createKeysForAuthStorage = (provider, identifier) => {\n return getAuthStorageKeys(OAuthStorageKeys)(provider, identifier);\n};\n\nexport { DefaultOAuthStore };\n","import { defaultStorage } from '@aws-amplify/core';\nimport { DefaultOAuthStore } from '../signInWithRedirectStore.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst oAuthStore = new DefaultOAuthStore(defaultStorage);\n\nexport { oAuthStore };\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst inflightPromises = [];\nconst addInflightPromise = (resolver) => {\n inflightPromises.push(resolver);\n};\nconst resolveAndClearInflightPromises = () => {\n while (inflightPromises.length) {\n inflightPromises.pop()?.();\n }\n};\n\nexport { addInflightPromise, resolveAndClearInflightPromises };\n","import { Hub } from '@aws-amplify/core';\nimport { isBrowser, assertTokenProviderConfig, isTokenExpired, AMPLIFY_SYMBOL, AmplifyErrorCode } from '@aws-amplify/core/internals/utils';\nimport { assertServiceError } from '../../../errors/utils/assertServiceError.mjs';\nimport { AuthError } from '../../../errors/AuthError.mjs';\nimport { oAuthStore } from '../utils/oauth/oAuthStore.mjs';\nimport { addInflightPromise } from '../utils/oauth/inflightPromise.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nclass TokenOrchestrator {\n constructor() {\n this.waitForInflightOAuth = isBrowser()\n ? async () => {\n if (!(await oAuthStore.loadOAuthInFlight())) {\n return;\n }\n if (this.inflightPromise) {\n return this.inflightPromise;\n }\n // when there is valid oauth config and there is an inflight oauth flow, try\n // to block async calls that require fetching tokens before the oauth flow completes\n // e.g. getCurrentUser, fetchAuthSession etc.\n this.inflightPromise = new Promise((resolve, _reject) => {\n addInflightPromise(resolve);\n });\n return this.inflightPromise;\n }\n : async () => {\n // no-op for non-browser environments\n };\n }\n setAuthConfig(authConfig) {\n oAuthStore.setAuthConfig(authConfig.Cognito);\n this.authConfig = authConfig;\n }\n setTokenRefresher(tokenRefresher) {\n this.tokenRefresher = tokenRefresher;\n }\n setAuthTokenStore(tokenStore) {\n this.tokenStore = tokenStore;\n }\n getTokenStore() {\n if (!this.tokenStore) {\n throw new AuthError({\n name: 'EmptyTokenStoreException',\n message: 'TokenStore not set',\n });\n }\n return this.tokenStore;\n }\n getTokenRefresher() {\n if (!this.tokenRefresher) {\n throw new AuthError({\n name: 'EmptyTokenRefresherException',\n message: 'TokenRefresher not set',\n });\n }\n return this.tokenRefresher;\n }\n async getTokens(options) {\n let tokens;\n try {\n assertTokenProviderConfig(this.authConfig?.Cognito);\n }\n catch (_err) {\n // Token provider not configured\n return null;\n }\n await this.waitForInflightOAuth();\n this.inflightPromise = undefined;\n tokens = await this.getTokenStore().loadTokens();\n const username = await this.getTokenStore().getLastAuthUser();\n if (tokens === null) {\n return null;\n }\n const idTokenExpired = !!tokens?.idToken &&\n isTokenExpired({\n expiresAt: (tokens.idToken?.payload?.exp ?? 0) * 1000,\n clockDrift: tokens.clockDrift ?? 0,\n });\n const accessTokenExpired = isTokenExpired({\n expiresAt: (tokens.accessToken?.payload?.exp ?? 0) * 1000,\n clockDrift: tokens.clockDrift ?? 0,\n });\n if (options?.forceRefresh || idTokenExpired || accessTokenExpired) {\n tokens = await this.refreshTokens({\n tokens,\n username,\n });\n if (tokens === null) {\n return null;\n }\n }\n return {\n accessToken: tokens?.accessToken,\n idToken: tokens?.idToken,\n signInDetails: tokens?.signInDetails,\n };\n }\n async refreshTokens({ tokens, username, }) {\n try {\n const { signInDetails } = tokens;\n const newTokens = await this.getTokenRefresher()({\n tokens,\n authConfig: this.authConfig,\n username,\n });\n newTokens.signInDetails = signInDetails;\n await this.setTokens({ tokens: newTokens });\n Hub.dispatch('auth', { event: 'tokenRefresh' }, 'Auth', AMPLIFY_SYMBOL);\n return newTokens;\n }\n catch (err) {\n return this.handleErrors(err);\n }\n }\n handleErrors(err) {\n assertServiceError(err);\n if (err.name !== AmplifyErrorCode.NetworkError) {\n // TODO(v6): Check errors on client\n this.clearTokens();\n }\n Hub.dispatch('auth', {\n event: 'tokenRefresh_failure',\n data: { error: err },\n }, 'Auth', AMPLIFY_SYMBOL);\n if (err.name.startsWith('NotAuthorizedException')) {\n return null;\n }\n throw err;\n }\n async setTokens({ tokens }) {\n return this.getTokenStore().storeTokens(tokens);\n }\n async clearTokens() {\n return this.getTokenStore().clearTokens();\n }\n getDeviceMetadata(username) {\n return this.getTokenStore().getDeviceMetadata(username);\n }\n clearDeviceMetadata(username) {\n return this.getTokenStore().clearDeviceMetadata(username);\n }\n setOAuthMetadata(metadata) {\n return this.getTokenStore().setOAuthMetadata(metadata);\n }\n getOAuthMetadata() {\n return this.getTokenStore().getOAuthMetadata();\n }\n}\n\nexport { TokenOrchestrator };\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst isBrowser = () => typeof window !== 'undefined' && typeof window.document !== 'undefined';\n\nexport { isBrowser };\n","import { CognitoUserPoolsTokenProvider } from './CognitoUserPoolsTokenProvider.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * The default provider for the JWT access token and ID token issued from the configured Cognito user pool. It manages\n * the refresh and storage of the tokens. It stores the tokens in `window.localStorage` if available, and falls back to\n * in-memory storage if not.\n */\nconst cognitoUserPoolsTokenProvider = new CognitoUserPoolsTokenProvider();\nconst { tokenOrchestrator } = cognitoUserPoolsTokenProvider;\n\nexport { cognitoUserPoolsTokenProvider, tokenOrchestrator };\n","import { defaultStorage } from '@aws-amplify/core';\nimport { refreshAuthTokens } from '../utils/refreshAuthTokens.mjs';\nimport { DefaultTokenStore } from './TokenStore.mjs';\nimport { TokenOrchestrator } from './TokenOrchestrator.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nclass CognitoUserPoolsTokenProvider {\n constructor() {\n this.authTokenStore = new DefaultTokenStore();\n this.authTokenStore.setKeyValueStorage(defaultStorage);\n this.tokenOrchestrator = new TokenOrchestrator();\n this.tokenOrchestrator.setAuthTokenStore(this.authTokenStore);\n this.tokenOrchestrator.setTokenRefresher(refreshAuthTokens);\n }\n getTokens({ forceRefresh } = { forceRefresh: false }) {\n return this.tokenOrchestrator.getTokens({ forceRefresh });\n }\n setKeyValueStorage(keyValueStorage) {\n this.authTokenStore.setKeyValueStorage(keyValueStorage);\n }\n setAuthConfig(authConfig) {\n this.authTokenStore.setAuthConfig(authConfig);\n this.tokenOrchestrator.setAuthConfig(authConfig);\n }\n}\n\nexport { CognitoUserPoolsTokenProvider };\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst IdentityIdStorageKeys = {\n identityId: 'identityId',\n};\n\nexport { IdentityIdStorageKeys };\n","import { ConsoleLogger } from '@aws-amplify/core';\nimport { assertIdentityPoolIdConfig } from '@aws-amplify/core/internals/utils';\nimport { getAuthStorageKeys } from '../tokenProvider/TokenStore.mjs';\nimport { IdentityIdStorageKeys } from './types.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst logger = new ConsoleLogger('DefaultIdentityIdStore');\nclass DefaultIdentityIdStore {\n setAuthConfig(authConfigParam) {\n assertIdentityPoolIdConfig(authConfigParam.Cognito);\n this.authConfig = authConfigParam;\n this._authKeys = createKeysForAuthStorage('Cognito', authConfigParam.Cognito.identityPoolId);\n }\n constructor(keyValueStorage) {\n this._authKeys = {};\n this._hasGuestIdentityId = false;\n this.keyValueStorage = keyValueStorage;\n }\n async loadIdentityId() {\n assertIdentityPoolIdConfig(this.authConfig?.Cognito);\n try {\n if (this._primaryIdentityId) {\n return {\n id: this._primaryIdentityId,\n type: 'primary',\n };\n }\n else {\n const storedIdentityId = await this.keyValueStorage.getItem(this._authKeys.identityId);\n if (storedIdentityId) {\n this._hasGuestIdentityId = true;\n return {\n id: storedIdentityId,\n type: 'guest',\n };\n }\n return null;\n }\n }\n catch (err) {\n logger.log('Error getting stored IdentityId.', err);\n return null;\n }\n }\n async storeIdentityId(identity) {\n assertIdentityPoolIdConfig(this.authConfig?.Cognito);\n if (identity.type === 'guest') {\n this.keyValueStorage.setItem(this._authKeys.identityId, identity.id);\n // Clear in-memory storage of primary identityId\n this._primaryIdentityId = undefined;\n this._hasGuestIdentityId = true;\n }\n else {\n this._primaryIdentityId = identity.id;\n // Clear locally stored guest id\n if (this._hasGuestIdentityId) {\n this.keyValueStorage.removeItem(this._authKeys.identityId);\n this._hasGuestIdentityId = false;\n }\n }\n }\n async clearIdentityId() {\n this._primaryIdentityId = undefined;\n await this.keyValueStorage.removeItem(this._authKeys.identityId);\n }\n}\nconst createKeysForAuthStorage = (provider, identifier) => {\n return getAuthStorageKeys(IdentityIdStorageKeys)(`com.amplify.${provider}`, identifier);\n};\n\nexport { DefaultIdentityIdStore };\n","import { getDnsSuffix } from '../../clients/endpoints/getDnsSuffix.mjs';\nimport '../../types/errors.mjs';\nimport '../../errors/errorHelpers.mjs';\nimport { unauthenticatedHandler } from '../../clients/handlers/unauthenticated.mjs';\nimport { jitteredBackoff } from '../../clients/middleware/retry/jitteredBackoff.mjs';\nimport { getRetryDecider } from '../../clients/middleware/retry/defaultRetryDecider.mjs';\nimport '@aws-crypto/sha256-js';\nimport '@smithy/util-hex-encoding';\nimport { AmplifyUrl } from '../../utils/amplifyUrl/index.mjs';\nimport { composeTransferHandler } from '../../clients/internal/composeTransferHandler.mjs';\nimport { parseJsonError } from '../../clients/serde/json.mjs';\nimport { getAmplifyUserAgent } from '../../Platform/index.mjs';\nimport { observeFrameworkChanges } from '../../Platform/detectFramework.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * The service name used to sign requests if the API requires authentication.\n */\nconst SERVICE_NAME = 'cognito-identity';\n/**\n * The endpoint resolver function that returns the endpoint URL for a given region.\n */\nconst endpointResolver = ({ region }) => ({\n url: new AmplifyUrl(`https://cognito-identity.${region}.${getDnsSuffix(region)}`),\n});\n/**\n * A Cognito Identity-specific middleware that disables caching for all requests.\n */\nconst disableCacheMiddlewareFactory = () => next => async function disableCacheMiddleware(request) {\n request.headers['cache-control'] = 'no-store';\n return next(request);\n};\n/**\n * A Cognito Identity-specific transfer handler that does NOT sign requests, and\n * disables caching.\n *\n * @internal\n */\nconst cognitoIdentityTransferHandler = composeTransferHandler(unauthenticatedHandler, [disableCacheMiddlewareFactory]);\n/**\n * @internal\n */\nconst defaultConfig = {\n service: SERVICE_NAME,\n endpointResolver,\n retryDecider: getRetryDecider(parseJsonError),\n computeDelay: jitteredBackoff,\n userAgentValue: getAmplifyUserAgent(),\n cache: 'no-store',\n};\nobserveFrameworkChanges(() => {\n defaultConfig.userAgentValue = getAmplifyUserAgent();\n});\n/**\n * @internal\n */\nconst getSharedHeaders = (operation) => ({\n 'content-type': 'application/x-amz-json-1.1',\n 'x-amz-target': `AWSCognitoIdentityService.${operation}`,\n});\n/**\n * @internal\n */\nconst buildHttpRpcRequest = ({ url }, headers, body) => ({\n headers,\n url,\n body,\n method: 'POST',\n});\n\nexport { buildHttpRpcRequest, cognitoIdentityTransferHandler, defaultConfig, getSharedHeaders };\n","import '../../types/errors.mjs';\nimport '../../errors/errorHelpers.mjs';\nimport '../../utils/getClientInfo/getClientInfo.mjs';\nimport '../../utils/retry/retry.mjs';\nimport '@aws-crypto/sha256-js';\nimport '@smithy/util-hex-encoding';\nimport { parseMetadata } from '../../clients/serde/responseInfo.mjs';\nimport { parseJsonError, parseJsonBody } from '../../clients/serde/json.mjs';\nimport { composeServiceApi } from '../../clients/internal/composeServiceApi.mjs';\nimport { defaultConfig, cognitoIdentityTransferHandler, buildHttpRpcRequest, getSharedHeaders } from './base.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst getCredentialsForIdentitySerializer = (input, endpoint) => {\n const headers = getSharedHeaders('GetCredentialsForIdentity');\n const body = JSON.stringify(input);\n return buildHttpRpcRequest(endpoint, headers, body);\n};\nconst getCredentialsForIdentityDeserializer = async (response) => {\n if (response.statusCode >= 300) {\n const error = await parseJsonError(response);\n throw error;\n }\n else {\n const body = await parseJsonBody(response);\n return {\n IdentityId: body.IdentityId,\n Credentials: deserializeCredentials(body.Credentials),\n $metadata: parseMetadata(response),\n };\n }\n};\nconst deserializeCredentials = ({ AccessKeyId, SecretKey, SessionToken, Expiration, } = {}) => {\n return {\n AccessKeyId,\n SecretKey,\n SessionToken,\n Expiration: Expiration && new Date(Expiration * 1000),\n };\n};\n/**\n * @internal\n */\nconst getCredentialsForIdentity = composeServiceApi(cognitoIdentityTransferHandler, getCredentialsForIdentitySerializer, getCredentialsForIdentityDeserializer, defaultConfig);\n\nexport { getCredentialsForIdentity };\n","import '../../types/errors.mjs';\nimport '../../errors/errorHelpers.mjs';\nimport '../../utils/getClientInfo/getClientInfo.mjs';\nimport '../../utils/retry/retry.mjs';\nimport '@aws-crypto/sha256-js';\nimport '@smithy/util-hex-encoding';\nimport { parseMetadata } from '../../clients/serde/responseInfo.mjs';\nimport { parseJsonError, parseJsonBody } from '../../clients/serde/json.mjs';\nimport { composeServiceApi } from '../../clients/internal/composeServiceApi.mjs';\nimport { defaultConfig, cognitoIdentityTransferHandler, buildHttpRpcRequest, getSharedHeaders } from './base.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst getIdSerializer = (input, endpoint) => {\n const headers = getSharedHeaders('GetId');\n const body = JSON.stringify(input);\n return buildHttpRpcRequest(endpoint, headers, body);\n};\nconst getIdDeserializer = async (response) => {\n if (response.statusCode >= 300) {\n const error = await parseJsonError(response);\n throw error;\n }\n else {\n const body = await parseJsonBody(response);\n return {\n IdentityId: body.IdentityId,\n $metadata: parseMetadata(response),\n };\n }\n};\n/**\n * @internal\n */\nconst getId = composeServiceApi(cognitoIdentityTransferHandler, getIdSerializer, getIdDeserializer, defaultConfig);\n\nexport { getId };\n","import { decodeJWT } from '@aws-amplify/core/internals/utils';\nimport { AuthError } from '../../../errors/AuthError.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction formLoginsMap(idToken) {\n const issuer = decodeJWT(idToken).payload.iss;\n const res = {};\n if (!issuer) {\n throw new AuthError({\n name: 'InvalidIdTokenException',\n message: 'Invalid Idtoken.',\n });\n }\n const domainName = issuer.replace(/(^\\w+:|^)\\/\\//, '');\n res[domainName] = idToken;\n return res;\n}\n\nexport { formLoginsMap };\n","import { ConsoleLogger, getId } from '@aws-amplify/core';\nimport { AuthError } from '../../../errors/AuthError.mjs';\nimport { getRegionFromIdentityPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { formLoginsMap } from './utils.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst logger = new ConsoleLogger('CognitoIdentityIdProvider');\n/**\n * Provides a Cognito identityId\n *\n * @param tokens - The AuthTokens received after SignIn\n * @returns string\n * @throws configuration exceptions: `InvalidIdentityPoolIdException`\n * - Auth errors that may arise from misconfiguration.\n * @throws service exceptions: {@link GetIdException }\n */\nasync function cognitoIdentityIdProvider({ tokens, authConfig, identityIdStore, }) {\n identityIdStore.setAuthConfig({ Cognito: authConfig });\n // will return null only if there is no identityId cached or if there is an error retrieving it\n let identityId = await identityIdStore.loadIdentityId();\n // Tokens are available so return primary identityId\n if (tokens) {\n // If there is existing primary identityId in-memory return that\n if (identityId && identityId.type === 'primary') {\n return identityId.id;\n }\n else {\n const logins = tokens.idToken\n ? formLoginsMap(tokens.idToken.toString())\n : {};\n const generatedIdentityId = await generateIdentityId(logins, authConfig);\n if (identityId && identityId.id === generatedIdentityId) {\n logger.debug(`The guest identity ${identityId.id} has become the primary identity.`);\n }\n identityId = {\n id: generatedIdentityId,\n type: 'primary',\n };\n }\n }\n else {\n // If there is existing guest identityId cached return that\n if (identityId && identityId.type === 'guest') {\n return identityId.id;\n }\n else {\n identityId = {\n id: await generateIdentityId({}, authConfig),\n type: 'guest',\n };\n }\n }\n // Store in-memory or local storage depending on guest or primary identityId\n identityIdStore.storeIdentityId(identityId);\n return identityId.id;\n}\nasync function generateIdentityId(logins, authConfig) {\n const identityPoolId = authConfig?.identityPoolId;\n const region = getRegionFromIdentityPoolId(identityPoolId);\n // IdentityId is absent so get it using IdentityPoolId with Cognito's GetId API\n const idResult = \n // for a first-time user, this will return a brand new identity\n // for a returning user, this will retrieve the previous identity assocaited with the logins\n (await getId({\n region,\n }, {\n IdentityPoolId: identityPoolId,\n Logins: logins,\n })).IdentityId;\n if (!idResult) {\n throw new AuthError({\n name: 'GetIdResponseException',\n message: 'Received undefined response from getId operation',\n recoverySuggestion: 'Make sure to pass a valid identityPoolId in the configuration.',\n });\n }\n return idResult;\n}\n\nexport { cognitoIdentityIdProvider };\n","import { ConsoleLogger, getCredentialsForIdentity } from '@aws-amplify/core';\nimport { assertIdentityPoolIdConfig } from '@aws-amplify/core/internals/utils';\nimport { AuthError } from '../../../errors/AuthError.mjs';\nimport { getRegionFromIdentityPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { assertIdTokenInAuthTokens } from '../utils/types.mjs';\nimport { cognitoIdentityIdProvider } from './IdentityIdProvider.mjs';\nimport { formLoginsMap } from './utils.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst logger = new ConsoleLogger('CognitoCredentialsProvider');\nconst CREDENTIALS_TTL = 50 * 60 * 1000; // 50 min, can be modified on config if required in the future\nclass CognitoAWSCredentialsAndIdentityIdProvider {\n constructor(identityIdStore) {\n this._nextCredentialsRefresh = 0;\n this._identityIdStore = identityIdStore;\n }\n async clearCredentialsAndIdentityId() {\n logger.debug('Clearing out credentials and identityId');\n this._credentialsAndIdentityId = undefined;\n await this._identityIdStore.clearIdentityId();\n }\n async clearCredentials() {\n logger.debug('Clearing out in-memory credentials');\n this._credentialsAndIdentityId = undefined;\n }\n async getCredentialsAndIdentityId(getCredentialsOptions) {\n const isAuthenticated = getCredentialsOptions.authenticated;\n const { tokens } = getCredentialsOptions;\n const { authConfig } = getCredentialsOptions;\n try {\n assertIdentityPoolIdConfig(authConfig?.Cognito);\n }\n catch {\n // No identity pool configured, skipping\n return;\n }\n if (!isAuthenticated && !authConfig.Cognito.allowGuestAccess) {\n // TODO(V6): return partial result like Native platforms\n return;\n }\n const { forceRefresh } = getCredentialsOptions;\n const tokenHasChanged = this.hasTokenChanged(tokens);\n const identityId = await cognitoIdentityIdProvider({\n tokens,\n authConfig: authConfig.Cognito,\n identityIdStore: this._identityIdStore,\n });\n // Clear cached credentials when forceRefresh is true OR the cache token has changed\n if (forceRefresh || tokenHasChanged) {\n this.clearCredentials();\n }\n if (!isAuthenticated) {\n return this.getGuestCredentials(identityId, authConfig.Cognito);\n }\n else {\n assertIdTokenInAuthTokens(tokens);\n return this.credsForOIDCTokens(authConfig.Cognito, tokens, identityId);\n }\n }\n async getGuestCredentials(identityId, authConfig) {\n // Return existing in-memory cached credentials only if it exists, is not past it's lifetime and is unauthenticated credentials\n if (this._credentialsAndIdentityId &&\n !this.isPastTTL() &&\n this._credentialsAndIdentityId.isAuthenticatedCreds === false) {\n logger.info('returning stored credentials as they neither past TTL nor expired.');\n return this._credentialsAndIdentityId;\n }\n // Clear to discard if any authenticated credentials are set and start with a clean slate\n this.clearCredentials();\n const region = getRegionFromIdentityPoolId(authConfig.identityPoolId);\n // use identityId to obtain guest credentials\n // save credentials in-memory\n // No logins params should be passed for guest creds:\n // https://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_GetCredentialsForIdentity.html\n const clientResult = await getCredentialsForIdentity({ region }, {\n IdentityId: identityId,\n });\n if (clientResult.Credentials &&\n clientResult.Credentials.AccessKeyId &&\n clientResult.Credentials.SecretKey) {\n this._nextCredentialsRefresh = new Date().getTime() + CREDENTIALS_TTL;\n const res = {\n credentials: {\n accessKeyId: clientResult.Credentials.AccessKeyId,\n secretAccessKey: clientResult.Credentials.SecretKey,\n sessionToken: clientResult.Credentials.SessionToken,\n expiration: clientResult.Credentials.Expiration,\n },\n identityId,\n };\n const identityIdRes = clientResult.IdentityId;\n if (identityIdRes) {\n res.identityId = identityIdRes;\n this._identityIdStore.storeIdentityId({\n id: identityIdRes,\n type: 'guest',\n });\n }\n this._credentialsAndIdentityId = {\n ...res,\n isAuthenticatedCreds: false,\n };\n return res;\n }\n else {\n throw new AuthError({\n name: 'CredentialsNotFoundException',\n message: `Cognito did not respond with either Credentials, AccessKeyId or SecretKey.`,\n });\n }\n }\n async credsForOIDCTokens(authConfig, authTokens, identityId) {\n if (this._credentialsAndIdentityId &&\n !this.isPastTTL() &&\n this._credentialsAndIdentityId.isAuthenticatedCreds === true) {\n logger.debug('returning stored credentials as they neither past TTL nor expired.');\n return this._credentialsAndIdentityId;\n }\n // Clear to discard if any unauthenticated credentials are set and start with a clean slate\n this.clearCredentials();\n const logins = authTokens.idToken\n ? formLoginsMap(authTokens.idToken.toString())\n : {};\n const region = getRegionFromIdentityPoolId(authConfig.identityPoolId);\n const clientResult = await getCredentialsForIdentity({ region }, {\n IdentityId: identityId,\n Logins: logins,\n });\n if (clientResult.Credentials &&\n clientResult.Credentials.AccessKeyId &&\n clientResult.Credentials.SecretKey) {\n const res = {\n credentials: {\n accessKeyId: clientResult.Credentials.AccessKeyId,\n secretAccessKey: clientResult.Credentials.SecretKey,\n sessionToken: clientResult.Credentials.SessionToken,\n expiration: clientResult.Credentials.Expiration,\n },\n identityId,\n };\n // Store the credentials in-memory along with the expiration\n this._credentialsAndIdentityId = {\n ...res,\n isAuthenticatedCreds: true,\n associatedIdToken: authTokens.idToken?.toString(),\n };\n this._nextCredentialsRefresh = new Date().getTime() + CREDENTIALS_TTL;\n const identityIdRes = clientResult.IdentityId;\n if (identityIdRes) {\n res.identityId = identityIdRes;\n this._identityIdStore.storeIdentityId({\n id: identityIdRes,\n type: 'primary',\n });\n }\n return res;\n }\n else {\n throw new AuthError({\n name: 'CredentialsException',\n message: `Cognito did not respond with either Credentials, AccessKeyId or SecretKey.`,\n });\n }\n }\n isPastTTL() {\n return this._nextCredentialsRefresh === undefined\n ? true\n : this._nextCredentialsRefresh <= Date.now();\n }\n hasTokenChanged(tokens) {\n return (!!tokens &&\n !!this._credentialsAndIdentityId?.associatedIdToken &&\n tokens.idToken?.toString() !==\n this._credentialsAndIdentityId.associatedIdToken);\n }\n}\n\nexport { CognitoAWSCredentialsAndIdentityIdProvider };\n","import { defaultStorage } from '@aws-amplify/core';\nimport { DefaultIdentityIdStore } from './IdentityIdStore.mjs';\nimport { CognitoAWSCredentialsAndIdentityIdProvider } from './credentialsProvider.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Cognito specific implmentation of the CredentialsProvider interface\n * that manages setting and getting of AWS Credentials.\n *\n * @throws configuration expections: `InvalidIdentityPoolIdException`\n * - Auth errors that may arise from misconfiguration.\n * @throws service expections: {@link GetCredentialsForIdentityException}, {@link GetIdException}\n *\n */\nconst cognitoCredentialsProvider = new CognitoAWSCredentialsAndIdentityIdProvider(new DefaultIdentityIdStore(defaultStorage));\n\nexport { CognitoAWSCredentialsAndIdentityIdProvider, DefaultIdentityIdStore, cognitoCredentialsProvider };\n","import { Amplify, CookieStorage, defaultStorage } from '@aws-amplify/core';\nimport { parseAmplifyConfig } from '@aws-amplify/core/internals/utils';\nimport { cognitoUserPoolsTokenProvider, cognitoCredentialsProvider } from '@aws-amplify/auth/cognito';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst DefaultAmplify = {\n /**\n * Configures Amplify with the {@link resourceConfig} and {@link libraryOptions}.\n *\n * @param resourceConfig The {@link ResourcesConfig} object that is typically imported from the\n * `amplifyconfiguration.json` file. It can also be an object literal created inline when calling `Amplify.configure`.\n * @param libraryOptions The {@link LibraryOptions} additional options for the library.\n *\n * @example\n * import config from './amplifyconfiguration.json';\n *\n * Amplify.configure(config);\n */\n configure(resourceConfig, libraryOptions) {\n const resolvedResourceConfig = parseAmplifyConfig(resourceConfig);\n // If no Auth config is provided, no special handling will be required, configure as is.\n // Otherwise, we can assume an Auth config is provided from here on.\n if (!resolvedResourceConfig.Auth) {\n Amplify.configure(resolvedResourceConfig, libraryOptions);\n return;\n }\n // If Auth options are provided, always just configure as is.\n // Otherwise, we can assume no Auth libraryOptions were provided from here on.\n if (libraryOptions?.Auth) {\n Amplify.configure(resolvedResourceConfig, libraryOptions);\n return;\n }\n // If no Auth libraryOptions were previously configured, then always add default providers.\n if (!Amplify.libraryOptions.Auth) {\n cognitoUserPoolsTokenProvider.setAuthConfig(resolvedResourceConfig.Auth);\n cognitoUserPoolsTokenProvider.setKeyValueStorage(\n // TODO: allow configure with a public interface\n libraryOptions?.ssr\n ? new CookieStorage({ sameSite: 'lax' })\n : defaultStorage);\n Amplify.configure(resolvedResourceConfig, {\n ...libraryOptions,\n Auth: {\n tokenProvider: cognitoUserPoolsTokenProvider,\n credentialsProvider: cognitoCredentialsProvider,\n },\n });\n return;\n }\n // At this point, Auth libraryOptions would have been previously configured and no overriding\n // Auth options were given, so we should preserve the currently configured Auth libraryOptions.\n if (libraryOptions) {\n // If ssr is provided through libraryOptions, we should respect the intentional reconfiguration.\n if (libraryOptions.ssr !== undefined) {\n cognitoUserPoolsTokenProvider.setKeyValueStorage(\n // TODO: allow configure with a public interface\n libraryOptions.ssr\n ? new CookieStorage({ sameSite: 'lax' })\n : defaultStorage);\n }\n Amplify.configure(resolvedResourceConfig, {\n Auth: Amplify.libraryOptions.Auth,\n ...libraryOptions,\n });\n return;\n }\n // Finally, if there were no libraryOptions given at all, we should simply not touch the currently\n // configured libraryOptions.\n Amplify.configure(resolvedResourceConfig);\n },\n /**\n * Returns the {@link ResourcesConfig} object passed in as the `resourceConfig` parameter when calling\n * `Amplify.configure`.\n *\n * @returns An {@link ResourcesConfig} object.\n */\n getConfig() {\n return Amplify.getConfig();\n },\n};\n\nexport { DefaultAmplify };\n","/**\n * Polyfill for the optional chain operator, `?.`, given previous conversion of the expression into an array of values,\n * descriptors, and functions.\n *\n * Adapted from Sucrase (https://github.com/alangpierce/sucrase)\n * See https://github.com/alangpierce/sucrase/blob/265887868966917f3b924ce38dfad01fbab1329f/src/transformers/OptionalChainingNullishTransformer.ts#L15\n *\n * @param ops Array result of expression conversion\n * @returns The value of the expression\n */\nfunction _optionalChain(ops) {\n let lastAccessLHS = undefined;\n let value = ops[0];\n let i = 1;\n while (i < ops.length) {\n const op = ops[i] ;\n const fn = ops[i + 1] ;\n i += 2;\n // by checking for loose equality to `null`, we catch both `null` and `undefined`\n if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\n // really we're meaning to return `undefined` as an actual value here, but it saves bytes not to write it\n return;\n }\n if (op === 'access' || op === 'optionalAccess') {\n lastAccessLHS = value;\n value = fn(value);\n } else if (op === 'call' || op === 'optionalCall') {\n value = fn((...args) => (value ).call(lastAccessLHS, ...args));\n lastAccessLHS = undefined;\n }\n }\n return value;\n}\n\n// Sucrase version\n// function _optionalChain(ops) {\n// let lastAccessLHS = undefined;\n// let value = ops[0];\n// let i = 1;\n// while (i < ops.length) {\n// const op = ops[i];\n// const fn = ops[i + 1];\n// i += 2;\n// if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\n// return undefined;\n// }\n// if (op === 'access' || op === 'optionalAccess') {\n// lastAccessLHS = value;\n// value = fn(value);\n// } else if (op === 'call' || op === 'optionalCall') {\n// value = fn((...args) => value.call(lastAccessLHS, ...args));\n// lastAccessLHS = undefined;\n// }\n// }\n// return value;\n// }\n\nexport { _optionalChain };\n","/**\n * Checks whether given url points to Sentry server\n *\n * @param url url to verify\n */\nfunction isSentryRequestUrl(url, client) {\n const dsn = client && client.getDsn();\n const tunnel = client && client.getOptions().tunnel;\n return checkDsn(url, dsn) || checkTunnel(url, tunnel);\n}\n\nfunction checkTunnel(url, tunnel) {\n if (!tunnel) {\n return false;\n }\n\n return removeTrailingSlash(url) === removeTrailingSlash(tunnel);\n}\n\nfunction checkDsn(url, dsn) {\n return dsn ? url.includes(dsn.host) : false;\n}\n\nfunction removeTrailingSlash(str) {\n return str[str.length - 1] === '/' ? str.slice(0, -1) : str;\n}\n\nexport { isSentryRequestUrl };\n","import { isNodeEnv } from './node.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\n/**\n * Returns true if we are in the browser.\n */\nfunction isBrowser() {\n // eslint-disable-next-line no-restricted-globals\n return typeof window !== 'undefined' && (!isNodeEnv() || isElectronNodeRenderer());\n}\n\n// Electron renderers with nodeIntegration enabled are detected as Node.js so we specifically test for them\nfunction isElectronNodeRenderer() {\n const process = (GLOBAL_OBJ ).process;\n return !!process && process.type === 'renderer';\n}\n\nexport { isBrowser };\n","import { isBrowserBundle } from './env.js';\n\n/**\n * NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,\n * you must either a) use `console.log` rather than the logger, or b) put your function elsewhere.\n */\n\n\n/**\n * Checks whether we're in the Node.js or Browser environment\n *\n * @returns Answer to given question\n */\nfunction isNodeEnv() {\n // explicitly check for browser bundles as those can be optimized statically\n // by terser/rollup.\n return (\n !isBrowserBundle() &&\n Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]'\n );\n}\n\n/**\n * Requires a module which is protected against bundler minification.\n *\n * @param request The module path to resolve\n * @deprecated This function will be removed in the next major version.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction dynamicRequire(mod, request) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return mod.require(request);\n}\n\n/**\n * Helper for dynamically loading module that should work with linked dependencies.\n * The problem is that we _should_ be using `require(require.resolve(moduleName, { paths: [cwd()] }))`\n * However it's _not possible_ to do that with Webpack, as it has to know all the dependencies during\n * build time. `require.resolve` is also not available in any other way, so we cannot create,\n * a fake helper like we do with `dynamicRequire`.\n *\n * We always prefer to use local package, thus the value is not returned early from each `try/catch` block.\n * That is to mimic the behavior of `require.resolve` exactly.\n *\n * @param moduleName module name to require\n * @param existingModule module to use for requiring\n * @returns possibly required module\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction loadModule(moduleName, existingModule = module) {\n let mod;\n\n try {\n // eslint-disable-next-line deprecation/deprecation\n mod = dynamicRequire(existingModule, moduleName);\n } catch (e) {\n // no-empty\n }\n\n if (!mod) {\n try {\n // eslint-disable-next-line deprecation/deprecation\n const { cwd } = dynamicRequire(existingModule, 'process');\n // eslint-disable-next-line deprecation/deprecation\n mod = dynamicRequire(existingModule, `${cwd()}/node_modules/${moduleName}`) ;\n } catch (e) {\n // no-empty\n }\n }\n\n return mod;\n}\n\nexport { dynamicRequire, isNodeEnv, loadModule };\n","import { _nullishCoalesce, _optionalChain } from '@sentry/core';\nimport { GLOBAL_OBJ, normalize, fill, htmlTreeAsString, browserPerformanceTimeOrigin, logger as logger$1, severityLevelFromString, captureException, addBreadcrumb, uuid4, getClient, getLocationHref, getCurrentScope, getActiveSpan, getDynamicSamplingContextFromSpan, isSentryRequestUrl, dropUndefinedKeys, stringMatchesSomePattern, addEventProcessor, createEnvelope, createEventEnvelopeHeaders, getSdkMetadataForEnvelopeHeader, prepareEvent, getIsolationScope, resolvedSyncPromise, updateRateLimits, isRateLimited, setContext, getRootSpan, spanToJSON, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, isBrowser, parseSampleRate, consoleSandbox } from '@sentry/core';\nimport { setTimeout as setTimeout$3, addPerformanceInstrumentationHandler, addLcpInstrumentationHandler, addClsInstrumentationHandler, addFidInstrumentationHandler, addInpInstrumentationHandler, SENTRY_XHR_DATA_KEY, addClickKeypressInstrumentationHandler, addHistoryInstrumentationHandler } from '@sentry-internal/browser-utils';\n\n// exporting a separate copy of `WINDOW` rather than exporting the one from `@sentry/browser`\n// prevents the browser package from being bundled in the CDN bundle, and avoids a\n// circular dependency between the browser and replay packages should `@sentry/browser` import\n// from `@sentry/replay` in the future\nconst WINDOW = GLOBAL_OBJ ;\n\nconst REPLAY_SESSION_KEY = 'sentryReplaySession';\nconst REPLAY_EVENT_NAME = 'replay_event';\nconst UNABLE_TO_SEND_REPLAY = 'Unable to send Replay';\n\n// The idle limit for a session after which recording is paused.\nconst SESSION_IDLE_PAUSE_DURATION = 300000; // 5 minutes in ms\n\n// The idle limit for a session after which the session expires.\nconst SESSION_IDLE_EXPIRE_DURATION = 900000; // 15 minutes in ms\n\n/** Default flush delays */\nconst DEFAULT_FLUSH_MIN_DELAY = 5000;\n// XXX: Temp fix for our debounce logic where `maxWait` would never occur if it\n// was the same as `wait`\nconst DEFAULT_FLUSH_MAX_DELAY = 5500;\n\n/* How long to wait for error checkouts */\nconst BUFFER_CHECKOUT_TIME = 60000;\n\nconst RETRY_BASE_INTERVAL = 5000;\nconst RETRY_MAX_COUNT = 3;\n\n/* The max (uncompressed) size in bytes of a network body. Any body larger than this will be truncated. */\nconst NETWORK_BODY_MAX_SIZE = 150000;\n\n/* The max size of a single console arg that is captured. Any arg larger than this will be truncated. */\nconst CONSOLE_ARG_MAX_SIZE = 5000;\n\n/* Min. time to wait before we consider something a slow click. */\nconst SLOW_CLICK_THRESHOLD = 3000;\n/* For scroll actions after a click, we only look for a very short time period to detect programmatic scrolling. */\nconst SLOW_CLICK_SCROLL_TIMEOUT = 300;\n\n/** When encountering a total segment size exceeding this size, stop the replay (as we cannot properly ingest it). */\nconst REPLAY_MAX_EVENT_BUFFER_SIZE = 20000000; // ~20MB\n\n/** Replays must be min. 5s long before we send them. */\nconst MIN_REPLAY_DURATION = 4999;\n/* The max. allowed value that the minReplayDuration can be set to. */\nconst MIN_REPLAY_DURATION_LIMIT = 15000;\n\n/** The max. length of a replay. */\nconst MAX_REPLAY_DURATION = 3600000; // 60 minutes in ms;\n\nfunction _nullishCoalesce$1(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }function _optionalChain$5(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var NodeType$3;\n(function (NodeType) {\n NodeType[NodeType[\"Document\"] = 0] = \"Document\";\n NodeType[NodeType[\"DocumentType\"] = 1] = \"DocumentType\";\n NodeType[NodeType[\"Element\"] = 2] = \"Element\";\n NodeType[NodeType[\"Text\"] = 3] = \"Text\";\n NodeType[NodeType[\"CDATA\"] = 4] = \"CDATA\";\n NodeType[NodeType[\"Comment\"] = 5] = \"Comment\";\n})(NodeType$3 || (NodeType$3 = {}));\n\nfunction isElement$1(n) {\n return n.nodeType === n.ELEMENT_NODE;\n}\nfunction isShadowRoot(n) {\n const host = _optionalChain$5([n, 'optionalAccess', _ => _.host]);\n return Boolean(_optionalChain$5([host, 'optionalAccess', _2 => _2.shadowRoot]) === n);\n}\nfunction isNativeShadowDom(shadowRoot) {\n return Object.prototype.toString.call(shadowRoot) === '[object ShadowRoot]';\n}\nfunction fixBrowserCompatibilityIssuesInCSS(cssText) {\n if (cssText.includes(' background-clip: text;') &&\n !cssText.includes(' -webkit-background-clip: text;')) {\n cssText = cssText.replace(/\\sbackground-clip:\\s*text;/g, ' -webkit-background-clip: text; background-clip: text;');\n }\n return cssText;\n}\nfunction escapeImportStatement(rule) {\n const { cssText } = rule;\n if (cssText.split('\"').length < 3)\n return cssText;\n const statement = ['@import', `url(${JSON.stringify(rule.href)})`];\n if (rule.layerName === '') {\n statement.push(`layer`);\n }\n else if (rule.layerName) {\n statement.push(`layer(${rule.layerName})`);\n }\n if (rule.supportsText) {\n statement.push(`supports(${rule.supportsText})`);\n }\n if (rule.media.length) {\n statement.push(rule.media.mediaText);\n }\n return statement.join(' ') + ';';\n}\nfunction stringifyStylesheet(s) {\n try {\n const rules = s.rules || s.cssRules;\n return rules\n ? fixBrowserCompatibilityIssuesInCSS(Array.from(rules, stringifyRule).join(''))\n : null;\n }\n catch (error) {\n return null;\n }\n}\nfunction fixAllCssProperty(rule) {\n let styles = '';\n for (let i = 0; i < rule.style.length; i++) {\n const styleDeclaration = rule.style;\n const attribute = styleDeclaration[i];\n const isImportant = styleDeclaration.getPropertyPriority(attribute);\n styles += `${attribute}:${styleDeclaration.getPropertyValue(attribute)}${isImportant ? ` !important` : ''};`;\n }\n return `${rule.selectorText} { ${styles} }`;\n}\nfunction stringifyRule(rule) {\n let importStringified;\n if (isCSSImportRule(rule)) {\n try {\n importStringified =\n stringifyStylesheet(rule.styleSheet) ||\n escapeImportStatement(rule);\n }\n catch (error) {\n }\n }\n else if (isCSSStyleRule(rule)) {\n let cssText = rule.cssText;\n const needsSafariColonFix = rule.selectorText.includes(':');\n const needsAllFix = typeof rule.style['all'] === 'string' && rule.style['all'];\n if (needsAllFix) {\n cssText = fixAllCssProperty(rule);\n }\n if (needsSafariColonFix) {\n cssText = fixSafariColons(cssText);\n }\n if (needsSafariColonFix || needsAllFix) {\n return cssText;\n }\n }\n return importStringified || rule.cssText;\n}\nfunction fixSafariColons(cssStringified) {\n const regex = /(\\[(?:[\\w-]+)[^\\\\])(:(?:[\\w-]+)\\])/gm;\n return cssStringified.replace(regex, '$1\\\\$2');\n}\nfunction isCSSImportRule(rule) {\n return 'styleSheet' in rule;\n}\nfunction isCSSStyleRule(rule) {\n return 'selectorText' in rule;\n}\nclass Mirror {\n constructor() {\n this.idNodeMap = new Map();\n this.nodeMetaMap = new WeakMap();\n }\n getId(n) {\n if (!n)\n return -1;\n const id = _optionalChain$5([this, 'access', _3 => _3.getMeta, 'call', _4 => _4(n), 'optionalAccess', _5 => _5.id]);\n return _nullishCoalesce$1(id, () => ( -1));\n }\n getNode(id) {\n return this.idNodeMap.get(id) || null;\n }\n getIds() {\n return Array.from(this.idNodeMap.keys());\n }\n getMeta(n) {\n return this.nodeMetaMap.get(n) || null;\n }\n removeNodeFromMap(n) {\n const id = this.getId(n);\n this.idNodeMap.delete(id);\n if (n.childNodes) {\n n.childNodes.forEach((childNode) => this.removeNodeFromMap(childNode));\n }\n }\n has(id) {\n return this.idNodeMap.has(id);\n }\n hasNode(node) {\n return this.nodeMetaMap.has(node);\n }\n add(n, meta) {\n const id = meta.id;\n this.idNodeMap.set(id, n);\n this.nodeMetaMap.set(n, meta);\n }\n replace(id, n) {\n const oldNode = this.getNode(id);\n if (oldNode) {\n const meta = this.nodeMetaMap.get(oldNode);\n if (meta)\n this.nodeMetaMap.set(n, meta);\n }\n this.idNodeMap.set(id, n);\n }\n reset() {\n this.idNodeMap = new Map();\n this.nodeMetaMap = new WeakMap();\n }\n}\nfunction createMirror() {\n return new Mirror();\n}\nfunction shouldMaskInput({ maskInputOptions, tagName, type, }) {\n if (tagName === 'OPTION') {\n tagName = 'SELECT';\n }\n return Boolean(maskInputOptions[tagName.toLowerCase()] ||\n (type && maskInputOptions[type]) ||\n type === 'password' ||\n (tagName === 'INPUT' && !type && maskInputOptions['text']));\n}\nfunction maskInputValue({ isMasked, element, value, maskInputFn, }) {\n let text = value || '';\n if (!isMasked) {\n return text;\n }\n if (maskInputFn) {\n text = maskInputFn(text, element);\n }\n return '*'.repeat(text.length);\n}\nfunction toLowerCase(str) {\n return str.toLowerCase();\n}\nfunction toUpperCase(str) {\n return str.toUpperCase();\n}\nconst ORIGINAL_ATTRIBUTE_NAME = '__rrweb_original__';\nfunction is2DCanvasBlank(canvas) {\n const ctx = canvas.getContext('2d');\n if (!ctx)\n return true;\n const chunkSize = 50;\n for (let x = 0; x < canvas.width; x += chunkSize) {\n for (let y = 0; y < canvas.height; y += chunkSize) {\n const getImageData = ctx.getImageData;\n const originalGetImageData = ORIGINAL_ATTRIBUTE_NAME in getImageData\n ? getImageData[ORIGINAL_ATTRIBUTE_NAME]\n : getImageData;\n const pixelBuffer = new Uint32Array(originalGetImageData.call(ctx, x, y, Math.min(chunkSize, canvas.width - x), Math.min(chunkSize, canvas.height - y)).data.buffer);\n if (pixelBuffer.some((pixel) => pixel !== 0))\n return false;\n }\n }\n return true;\n}\nfunction getInputType(element) {\n const type = element.type;\n return element.hasAttribute('data-rr-is-password')\n ? 'password'\n : type\n ?\n toLowerCase(type)\n : null;\n}\nfunction getInputValue(el, tagName, type) {\n if (tagName === 'INPUT' && (type === 'radio' || type === 'checkbox')) {\n return el.getAttribute('value') || '';\n }\n return el.value;\n}\nfunction extractFileExtension(path, baseURL) {\n let url;\n try {\n url = new URL(path, _nullishCoalesce$1(baseURL, () => ( window.location.href)));\n }\n catch (err) {\n return null;\n }\n const regex = /\\.([0-9a-z]+)(?:$)/i;\n const match = url.pathname.match(regex);\n return _nullishCoalesce$1(_optionalChain$5([match, 'optionalAccess', _6 => _6[1]]), () => ( null));\n}\nconst cachedImplementations$1 = {};\nfunction getImplementation$1(name) {\n const cached = cachedImplementations$1[name];\n if (cached) {\n return cached;\n }\n const document = window.document;\n let impl = window[name];\n if (document && typeof document.createElement === 'function') {\n try {\n const sandbox = document.createElement('iframe');\n sandbox.hidden = true;\n document.head.appendChild(sandbox);\n const contentWindow = sandbox.contentWindow;\n if (contentWindow && contentWindow[name]) {\n impl =\n contentWindow[name];\n }\n document.head.removeChild(sandbox);\n }\n catch (e) {\n }\n }\n return (cachedImplementations$1[name] = impl.bind(window));\n}\nfunction setTimeout$2(...rest) {\n return getImplementation$1('setTimeout')(...rest);\n}\nfunction clearTimeout$2(...rest) {\n return getImplementation$1('clearTimeout')(...rest);\n}\nfunction getIframeContentDocument(iframe) {\n try {\n return iframe.contentDocument;\n }\n catch (e) {\n }\n}\n\nlet _id = 1;\nconst tagNameRegex = new RegExp('[^a-z0-9-_:]');\nconst IGNORED_NODE = -2;\nfunction genId() {\n return _id++;\n}\nfunction getValidTagName(element) {\n if (element instanceof HTMLFormElement) {\n return 'form';\n }\n const processedTagName = toLowerCase(element.tagName);\n if (tagNameRegex.test(processedTagName)) {\n return 'div';\n }\n return processedTagName;\n}\nfunction extractOrigin(url) {\n let origin = '';\n if (url.indexOf('//') > -1) {\n origin = url.split('/').slice(0, 3).join('/');\n }\n else {\n origin = url.split('/')[0];\n }\n origin = origin.split('?')[0];\n return origin;\n}\nlet canvasService;\nlet canvasCtx;\nconst URL_IN_CSS_REF = /url\\((?:(')([^']*)'|(\")(.*?)\"|([^)]*))\\)/gm;\nconst URL_PROTOCOL_MATCH = /^(?:[a-z+]+:)?\\/\\//i;\nconst URL_WWW_MATCH = /^www\\..*/i;\nconst DATA_URI = /^(data:)([^,]*),(.*)/i;\nfunction absoluteToStylesheet(cssText, href) {\n return (cssText || '').replace(URL_IN_CSS_REF, (origin, quote1, path1, quote2, path2, path3) => {\n const filePath = path1 || path2 || path3;\n const maybeQuote = quote1 || quote2 || '';\n if (!filePath) {\n return origin;\n }\n if (URL_PROTOCOL_MATCH.test(filePath) || URL_WWW_MATCH.test(filePath)) {\n return `url(${maybeQuote}${filePath}${maybeQuote})`;\n }\n if (DATA_URI.test(filePath)) {\n return `url(${maybeQuote}${filePath}${maybeQuote})`;\n }\n if (filePath[0] === '/') {\n return `url(${maybeQuote}${extractOrigin(href) + filePath}${maybeQuote})`;\n }\n const stack = href.split('/');\n const parts = filePath.split('/');\n stack.pop();\n for (const part of parts) {\n if (part === '.') {\n continue;\n }\n else if (part === '..') {\n stack.pop();\n }\n else {\n stack.push(part);\n }\n }\n return `url(${maybeQuote}${stack.join('/')}${maybeQuote})`;\n });\n}\nconst SRCSET_NOT_SPACES = /^[^ \\t\\n\\r\\u000c]+/;\nconst SRCSET_COMMAS_OR_SPACES = /^[, \\t\\n\\r\\u000c]+/;\nfunction getAbsoluteSrcsetString(doc, attributeValue) {\n if (attributeValue.trim() === '') {\n return attributeValue;\n }\n let pos = 0;\n function collectCharacters(regEx) {\n let chars;\n const match = regEx.exec(attributeValue.substring(pos));\n if (match) {\n chars = match[0];\n pos += chars.length;\n return chars;\n }\n return '';\n }\n const output = [];\n while (true) {\n collectCharacters(SRCSET_COMMAS_OR_SPACES);\n if (pos >= attributeValue.length) {\n break;\n }\n let url = collectCharacters(SRCSET_NOT_SPACES);\n if (url.slice(-1) === ',') {\n url = absoluteToDoc(doc, url.substring(0, url.length - 1));\n output.push(url);\n }\n else {\n let descriptorsStr = '';\n url = absoluteToDoc(doc, url);\n let inParens = false;\n while (true) {\n const c = attributeValue.charAt(pos);\n if (c === '') {\n output.push((url + descriptorsStr).trim());\n break;\n }\n else if (!inParens) {\n if (c === ',') {\n pos += 1;\n output.push((url + descriptorsStr).trim());\n break;\n }\n else if (c === '(') {\n inParens = true;\n }\n }\n else {\n if (c === ')') {\n inParens = false;\n }\n }\n descriptorsStr += c;\n pos += 1;\n }\n }\n }\n return output.join(', ');\n}\nconst cachedDocument = new WeakMap();\nfunction absoluteToDoc(doc, attributeValue) {\n if (!attributeValue || attributeValue.trim() === '') {\n return attributeValue;\n }\n return getHref(doc, attributeValue);\n}\nfunction isSVGElement(el) {\n return Boolean(el.tagName === 'svg' || el.ownerSVGElement);\n}\nfunction getHref(doc, customHref) {\n let a = cachedDocument.get(doc);\n if (!a) {\n a = doc.createElement('a');\n cachedDocument.set(doc, a);\n }\n if (!customHref) {\n customHref = '';\n }\n else if (customHref.startsWith('blob:') || customHref.startsWith('data:')) {\n return customHref;\n }\n a.setAttribute('href', customHref);\n return a.href;\n}\nfunction transformAttribute(doc, tagName, name, value, element, maskAttributeFn) {\n if (!value) {\n return value;\n }\n if (name === 'src' ||\n (name === 'href' && !(tagName === 'use' && value[0] === '#'))) {\n return absoluteToDoc(doc, value);\n }\n else if (name === 'xlink:href' && value[0] !== '#') {\n return absoluteToDoc(doc, value);\n }\n else if (name === 'background' &&\n (tagName === 'table' || tagName === 'td' || tagName === 'th')) {\n return absoluteToDoc(doc, value);\n }\n else if (name === 'srcset') {\n return getAbsoluteSrcsetString(doc, value);\n }\n else if (name === 'style') {\n return absoluteToStylesheet(value, getHref(doc));\n }\n else if (tagName === 'object' && name === 'data') {\n return absoluteToDoc(doc, value);\n }\n if (typeof maskAttributeFn === 'function') {\n return maskAttributeFn(name, value, element);\n }\n return value;\n}\nfunction ignoreAttribute(tagName, name, _value) {\n return (tagName === 'video' || tagName === 'audio') && name === 'autoplay';\n}\nfunction _isBlockedElement(element, blockClass, blockSelector, unblockSelector) {\n try {\n if (unblockSelector && element.matches(unblockSelector)) {\n return false;\n }\n if (typeof blockClass === 'string') {\n if (element.classList.contains(blockClass)) {\n return true;\n }\n }\n else {\n for (let eIndex = element.classList.length; eIndex--;) {\n const className = element.classList[eIndex];\n if (blockClass.test(className)) {\n return true;\n }\n }\n }\n if (blockSelector) {\n return element.matches(blockSelector);\n }\n }\n catch (e) {\n }\n return false;\n}\nfunction elementClassMatchesRegex(el, regex) {\n for (let eIndex = el.classList.length; eIndex--;) {\n const className = el.classList[eIndex];\n if (regex.test(className)) {\n return true;\n }\n }\n return false;\n}\nfunction distanceToMatch(node, matchPredicate, limit = Infinity, distance = 0) {\n if (!node)\n return -1;\n if (node.nodeType !== node.ELEMENT_NODE)\n return -1;\n if (distance > limit)\n return -1;\n if (matchPredicate(node))\n return distance;\n return distanceToMatch(node.parentNode, matchPredicate, limit, distance + 1);\n}\nfunction createMatchPredicate(className, selector) {\n return (node) => {\n const el = node;\n if (el === null)\n return false;\n try {\n if (className) {\n if (typeof className === 'string') {\n if (el.matches(`.${className}`))\n return true;\n }\n else if (elementClassMatchesRegex(el, className)) {\n return true;\n }\n }\n if (selector && el.matches(selector))\n return true;\n return false;\n }\n catch (e2) {\n return false;\n }\n };\n}\nfunction needMaskingText(node, maskTextClass, maskTextSelector, unmaskTextClass, unmaskTextSelector, maskAllText) {\n try {\n const el = node.nodeType === node.ELEMENT_NODE\n ? node\n : node.parentElement;\n if (el === null)\n return false;\n if (el.tagName === 'INPUT') {\n const autocomplete = el.getAttribute('autocomplete');\n const disallowedAutocompleteValues = [\n 'current-password',\n 'new-password',\n 'cc-number',\n 'cc-exp',\n 'cc-exp-month',\n 'cc-exp-year',\n 'cc-csc',\n ];\n if (disallowedAutocompleteValues.includes(autocomplete)) {\n return true;\n }\n }\n let maskDistance = -1;\n let unmaskDistance = -1;\n if (maskAllText) {\n unmaskDistance = distanceToMatch(el, createMatchPredicate(unmaskTextClass, unmaskTextSelector));\n if (unmaskDistance < 0) {\n return true;\n }\n maskDistance = distanceToMatch(el, createMatchPredicate(maskTextClass, maskTextSelector), unmaskDistance >= 0 ? unmaskDistance : Infinity);\n }\n else {\n maskDistance = distanceToMatch(el, createMatchPredicate(maskTextClass, maskTextSelector));\n if (maskDistance < 0) {\n return false;\n }\n unmaskDistance = distanceToMatch(el, createMatchPredicate(unmaskTextClass, unmaskTextSelector), maskDistance >= 0 ? maskDistance : Infinity);\n }\n return maskDistance >= 0\n ? unmaskDistance >= 0\n ? maskDistance <= unmaskDistance\n : true\n : unmaskDistance >= 0\n ? false\n : !!maskAllText;\n }\n catch (e) {\n }\n return !!maskAllText;\n}\nfunction onceIframeLoaded(iframeEl, listener, iframeLoadTimeout) {\n const win = iframeEl.contentWindow;\n if (!win) {\n return;\n }\n let fired = false;\n let readyState;\n try {\n readyState = win.document.readyState;\n }\n catch (error) {\n return;\n }\n if (readyState !== 'complete') {\n const timer = setTimeout$2(() => {\n if (!fired) {\n listener();\n fired = true;\n }\n }, iframeLoadTimeout);\n iframeEl.addEventListener('load', () => {\n clearTimeout$2(timer);\n fired = true;\n listener();\n });\n return;\n }\n const blankUrl = 'about:blank';\n if (win.location.href !== blankUrl ||\n iframeEl.src === blankUrl ||\n iframeEl.src === '') {\n setTimeout$2(listener, 0);\n return iframeEl.addEventListener('load', listener);\n }\n iframeEl.addEventListener('load', listener);\n}\nfunction onceStylesheetLoaded(link, listener, styleSheetLoadTimeout) {\n let fired = false;\n let styleSheetLoaded;\n try {\n styleSheetLoaded = link.sheet;\n }\n catch (error) {\n return;\n }\n if (styleSheetLoaded)\n return;\n const timer = setTimeout$2(() => {\n if (!fired) {\n listener();\n fired = true;\n }\n }, styleSheetLoadTimeout);\n link.addEventListener('load', () => {\n clearTimeout$2(timer);\n fired = true;\n listener();\n });\n}\nfunction serializeNode(n, options) {\n const { doc, mirror, blockClass, blockSelector, unblockSelector, maskAllText, maskAttributeFn, maskTextClass, unmaskTextClass, maskTextSelector, unmaskTextSelector, inlineStylesheet, maskInputOptions = {}, maskTextFn, maskInputFn, dataURLOptions = {}, inlineImages, recordCanvas, keepIframeSrcFn, newlyAddedElement = false, } = options;\n const rootId = getRootId(doc, mirror);\n switch (n.nodeType) {\n case n.DOCUMENT_NODE:\n if (n.compatMode !== 'CSS1Compat') {\n return {\n type: NodeType$3.Document,\n childNodes: [],\n compatMode: n.compatMode,\n };\n }\n else {\n return {\n type: NodeType$3.Document,\n childNodes: [],\n };\n }\n case n.DOCUMENT_TYPE_NODE:\n return {\n type: NodeType$3.DocumentType,\n name: n.name,\n publicId: n.publicId,\n systemId: n.systemId,\n rootId,\n };\n case n.ELEMENT_NODE:\n return serializeElementNode(n, {\n doc,\n blockClass,\n blockSelector,\n unblockSelector,\n inlineStylesheet,\n maskAttributeFn,\n maskInputOptions,\n maskInputFn,\n dataURLOptions,\n inlineImages,\n recordCanvas,\n keepIframeSrcFn,\n newlyAddedElement,\n rootId,\n maskAllText,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n });\n case n.TEXT_NODE:\n return serializeTextNode(n, {\n doc,\n maskAllText,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n maskTextFn,\n maskInputOptions,\n maskInputFn,\n rootId,\n });\n case n.CDATA_SECTION_NODE:\n return {\n type: NodeType$3.CDATA,\n textContent: '',\n rootId,\n };\n case n.COMMENT_NODE:\n return {\n type: NodeType$3.Comment,\n textContent: n.textContent || '',\n rootId,\n };\n default:\n return false;\n }\n}\nfunction getRootId(doc, mirror) {\n if (!mirror.hasNode(doc))\n return undefined;\n const docId = mirror.getId(doc);\n return docId === 1 ? undefined : docId;\n}\nfunction serializeTextNode(n, options) {\n const { maskAllText, maskTextClass, unmaskTextClass, maskTextSelector, unmaskTextSelector, maskTextFn, maskInputOptions, maskInputFn, rootId, } = options;\n const parentTagName = n.parentNode && n.parentNode.tagName;\n let textContent = n.textContent;\n const isStyle = parentTagName === 'STYLE' ? true : undefined;\n const isScript = parentTagName === 'SCRIPT' ? true : undefined;\n const isTextarea = parentTagName === 'TEXTAREA' ? true : undefined;\n if (isStyle && textContent) {\n try {\n if (n.nextSibling || n.previousSibling) {\n }\n else if (_optionalChain$5([n, 'access', _7 => _7.parentNode, 'access', _8 => _8.sheet, 'optionalAccess', _9 => _9.cssRules])) {\n textContent = stringifyStylesheet(n.parentNode.sheet);\n }\n }\n catch (err) {\n console.warn(`Cannot get CSS styles from text's parentNode. Error: ${err}`, n);\n }\n textContent = absoluteToStylesheet(textContent, getHref(options.doc));\n }\n if (isScript) {\n textContent = 'SCRIPT_PLACEHOLDER';\n }\n const forceMask = needMaskingText(n, maskTextClass, maskTextSelector, unmaskTextClass, unmaskTextSelector, maskAllText);\n if (!isStyle && !isScript && !isTextarea && textContent && forceMask) {\n textContent = maskTextFn\n ? maskTextFn(textContent, n.parentElement)\n : textContent.replace(/[\\S]/g, '*');\n }\n if (isTextarea && textContent && (maskInputOptions.textarea || forceMask)) {\n textContent = maskInputFn\n ? maskInputFn(textContent, n.parentNode)\n : textContent.replace(/[\\S]/g, '*');\n }\n if (parentTagName === 'OPTION' && textContent) {\n const isInputMasked = shouldMaskInput({\n type: null,\n tagName: parentTagName,\n maskInputOptions,\n });\n textContent = maskInputValue({\n isMasked: needMaskingText(n, maskTextClass, maskTextSelector, unmaskTextClass, unmaskTextSelector, isInputMasked),\n element: n,\n value: textContent,\n maskInputFn,\n });\n }\n return {\n type: NodeType$3.Text,\n textContent: textContent || '',\n isStyle,\n rootId,\n };\n}\nfunction serializeElementNode(n, options) {\n const { doc, blockClass, blockSelector, unblockSelector, inlineStylesheet, maskInputOptions = {}, maskAttributeFn, maskInputFn, dataURLOptions = {}, inlineImages, recordCanvas, keepIframeSrcFn, newlyAddedElement = false, rootId, maskAllText, maskTextClass, unmaskTextClass, maskTextSelector, unmaskTextSelector, } = options;\n const needBlock = _isBlockedElement(n, blockClass, blockSelector, unblockSelector);\n const tagName = getValidTagName(n);\n let attributes = {};\n const len = n.attributes.length;\n for (let i = 0; i < len; i++) {\n const attr = n.attributes[i];\n if (attr.name && !ignoreAttribute(tagName, attr.name, attr.value)) {\n attributes[attr.name] = transformAttribute(doc, tagName, toLowerCase(attr.name), attr.value, n, maskAttributeFn);\n }\n }\n if (tagName === 'link' && inlineStylesheet) {\n const stylesheet = Array.from(doc.styleSheets).find((s) => {\n return s.href === n.href;\n });\n let cssText = null;\n if (stylesheet) {\n cssText = stringifyStylesheet(stylesheet);\n }\n if (cssText) {\n attributes.rel = null;\n attributes.href = null;\n attributes.crossorigin = null;\n attributes._cssText = absoluteToStylesheet(cssText, stylesheet.href);\n }\n }\n if (tagName === 'style' &&\n n.sheet &&\n !(n.innerText || n.textContent || '').trim().length) {\n const cssText = stringifyStylesheet(n.sheet);\n if (cssText) {\n attributes._cssText = absoluteToStylesheet(cssText, getHref(doc));\n }\n }\n if (tagName === 'input' ||\n tagName === 'textarea' ||\n tagName === 'select' ||\n tagName === 'option') {\n const el = n;\n const type = getInputType(el);\n const value = getInputValue(el, toUpperCase(tagName), type);\n const checked = el.checked;\n if (type !== 'submit' && type !== 'button' && value) {\n const forceMask = needMaskingText(el, maskTextClass, maskTextSelector, unmaskTextClass, unmaskTextSelector, shouldMaskInput({\n type,\n tagName: toUpperCase(tagName),\n maskInputOptions,\n }));\n attributes.value = maskInputValue({\n isMasked: forceMask,\n element: el,\n value,\n maskInputFn,\n });\n }\n if (checked) {\n attributes.checked = checked;\n }\n }\n if (tagName === 'option') {\n if (n.selected && !maskInputOptions['select']) {\n attributes.selected = true;\n }\n else {\n delete attributes.selected;\n }\n }\n if (tagName === 'canvas' && recordCanvas) {\n if (n.__context === '2d') {\n if (!is2DCanvasBlank(n)) {\n attributes.rr_dataURL = n.toDataURL(dataURLOptions.type, dataURLOptions.quality);\n }\n }\n else if (!('__context' in n)) {\n const canvasDataURL = n.toDataURL(dataURLOptions.type, dataURLOptions.quality);\n const blankCanvas = doc.createElement('canvas');\n blankCanvas.width = n.width;\n blankCanvas.height = n.height;\n const blankCanvasDataURL = blankCanvas.toDataURL(dataURLOptions.type, dataURLOptions.quality);\n if (canvasDataURL !== blankCanvasDataURL) {\n attributes.rr_dataURL = canvasDataURL;\n }\n }\n }\n if (tagName === 'img' && inlineImages) {\n if (!canvasService) {\n canvasService = doc.createElement('canvas');\n canvasCtx = canvasService.getContext('2d');\n }\n const image = n;\n const imageSrc = image.currentSrc || image.getAttribute('src') || '<unknown-src>';\n const priorCrossOrigin = image.crossOrigin;\n const recordInlineImage = () => {\n image.removeEventListener('load', recordInlineImage);\n try {\n canvasService.width = image.naturalWidth;\n canvasService.height = image.naturalHeight;\n canvasCtx.drawImage(image, 0, 0);\n attributes.rr_dataURL = canvasService.toDataURL(dataURLOptions.type, dataURLOptions.quality);\n }\n catch (err) {\n if (image.crossOrigin !== 'anonymous') {\n image.crossOrigin = 'anonymous';\n if (image.complete && image.naturalWidth !== 0)\n recordInlineImage();\n else\n image.addEventListener('load', recordInlineImage);\n return;\n }\n else {\n console.warn(`Cannot inline img src=${imageSrc}! Error: ${err}`);\n }\n }\n if (image.crossOrigin === 'anonymous') {\n priorCrossOrigin\n ? (attributes.crossOrigin = priorCrossOrigin)\n : image.removeAttribute('crossorigin');\n }\n };\n if (image.complete && image.naturalWidth !== 0)\n recordInlineImage();\n else\n image.addEventListener('load', recordInlineImage);\n }\n if (tagName === 'audio' || tagName === 'video') {\n attributes.rr_mediaState = n.paused\n ? 'paused'\n : 'played';\n attributes.rr_mediaCurrentTime = n.currentTime;\n }\n if (!newlyAddedElement) {\n if (n.scrollLeft) {\n attributes.rr_scrollLeft = n.scrollLeft;\n }\n if (n.scrollTop) {\n attributes.rr_scrollTop = n.scrollTop;\n }\n }\n if (needBlock) {\n const { width, height } = n.getBoundingClientRect();\n attributes = {\n class: attributes.class,\n rr_width: `${width}px`,\n rr_height: `${height}px`,\n };\n }\n if (tagName === 'iframe' && !keepIframeSrcFn(attributes.src)) {\n if (!needBlock && !getIframeContentDocument(n)) {\n attributes.rr_src = attributes.src;\n }\n delete attributes.src;\n }\n let isCustomElement;\n try {\n if (customElements.get(tagName))\n isCustomElement = true;\n }\n catch (e) {\n }\n return {\n type: NodeType$3.Element,\n tagName,\n attributes,\n childNodes: [],\n isSVG: isSVGElement(n) || undefined,\n needBlock,\n rootId,\n isCustom: isCustomElement,\n };\n}\nfunction lowerIfExists(maybeAttr) {\n if (maybeAttr === undefined || maybeAttr === null) {\n return '';\n }\n else {\n return maybeAttr.toLowerCase();\n }\n}\nfunction slimDOMExcluded(sn, slimDOMOptions) {\n if (slimDOMOptions.comment && sn.type === NodeType$3.Comment) {\n return true;\n }\n else if (sn.type === NodeType$3.Element) {\n if (slimDOMOptions.script &&\n (sn.tagName === 'script' ||\n (sn.tagName === 'link' &&\n (sn.attributes.rel === 'preload' ||\n sn.attributes.rel === 'modulepreload')) ||\n (sn.tagName === 'link' &&\n sn.attributes.rel === 'prefetch' &&\n typeof sn.attributes.href === 'string' &&\n extractFileExtension(sn.attributes.href) === 'js'))) {\n return true;\n }\n else if (slimDOMOptions.headFavicon &&\n ((sn.tagName === 'link' && sn.attributes.rel === 'shortcut icon') ||\n (sn.tagName === 'meta' &&\n (lowerIfExists(sn.attributes.name).match(/^msapplication-tile(image|color)$/) ||\n lowerIfExists(sn.attributes.name) === 'application-name' ||\n lowerIfExists(sn.attributes.rel) === 'icon' ||\n lowerIfExists(sn.attributes.rel) === 'apple-touch-icon' ||\n lowerIfExists(sn.attributes.rel) === 'shortcut icon')))) {\n return true;\n }\n else if (sn.tagName === 'meta') {\n if (slimDOMOptions.headMetaDescKeywords &&\n lowerIfExists(sn.attributes.name).match(/^description|keywords$/)) {\n return true;\n }\n else if (slimDOMOptions.headMetaSocial &&\n (lowerIfExists(sn.attributes.property).match(/^(og|twitter|fb):/) ||\n lowerIfExists(sn.attributes.name).match(/^(og|twitter):/) ||\n lowerIfExists(sn.attributes.name) === 'pinterest')) {\n return true;\n }\n else if (slimDOMOptions.headMetaRobots &&\n (lowerIfExists(sn.attributes.name) === 'robots' ||\n lowerIfExists(sn.attributes.name) === 'googlebot' ||\n lowerIfExists(sn.attributes.name) === 'bingbot')) {\n return true;\n }\n else if (slimDOMOptions.headMetaHttpEquiv &&\n sn.attributes['http-equiv'] !== undefined) {\n return true;\n }\n else if (slimDOMOptions.headMetaAuthorship &&\n (lowerIfExists(sn.attributes.name) === 'author' ||\n lowerIfExists(sn.attributes.name) === 'generator' ||\n lowerIfExists(sn.attributes.name) === 'framework' ||\n lowerIfExists(sn.attributes.name) === 'publisher' ||\n lowerIfExists(sn.attributes.name) === 'progid' ||\n lowerIfExists(sn.attributes.property).match(/^article:/) ||\n lowerIfExists(sn.attributes.property).match(/^product:/))) {\n return true;\n }\n else if (slimDOMOptions.headMetaVerification &&\n (lowerIfExists(sn.attributes.name) === 'google-site-verification' ||\n lowerIfExists(sn.attributes.name) === 'yandex-verification' ||\n lowerIfExists(sn.attributes.name) === 'csrf-token' ||\n lowerIfExists(sn.attributes.name) === 'p:domain_verify' ||\n lowerIfExists(sn.attributes.name) === 'verify-v1' ||\n lowerIfExists(sn.attributes.name) === 'verification' ||\n lowerIfExists(sn.attributes.name) === 'shopify-checkout-api-token')) {\n return true;\n }\n }\n }\n return false;\n}\nfunction serializeNodeWithId(n, options) {\n const { doc, mirror, blockClass, blockSelector, unblockSelector, maskAllText, maskTextClass, unmaskTextClass, maskTextSelector, unmaskTextSelector, skipChild = false, inlineStylesheet = true, maskInputOptions = {}, maskAttributeFn, maskTextFn, maskInputFn, slimDOMOptions, dataURLOptions = {}, inlineImages = false, recordCanvas = false, onSerialize, onIframeLoad, iframeLoadTimeout = 5000, onStylesheetLoad, stylesheetLoadTimeout = 5000, keepIframeSrcFn = () => false, newlyAddedElement = false, } = options;\n let { preserveWhiteSpace = true } = options;\n const _serializedNode = serializeNode(n, {\n doc,\n mirror,\n blockClass,\n blockSelector,\n maskAllText,\n unblockSelector,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n inlineStylesheet,\n maskInputOptions,\n maskAttributeFn,\n maskTextFn,\n maskInputFn,\n dataURLOptions,\n inlineImages,\n recordCanvas,\n keepIframeSrcFn,\n newlyAddedElement,\n });\n if (!_serializedNode) {\n console.warn(n, 'not serialized');\n return null;\n }\n let id;\n if (mirror.hasNode(n)) {\n id = mirror.getId(n);\n }\n else if (slimDOMExcluded(_serializedNode, slimDOMOptions) ||\n (!preserveWhiteSpace &&\n _serializedNode.type === NodeType$3.Text &&\n !_serializedNode.isStyle &&\n !_serializedNode.textContent.replace(/^\\s+|\\s+$/gm, '').length)) {\n id = IGNORED_NODE;\n }\n else {\n id = genId();\n }\n const serializedNode = Object.assign(_serializedNode, { id });\n mirror.add(n, serializedNode);\n if (id === IGNORED_NODE) {\n return null;\n }\n if (onSerialize) {\n onSerialize(n);\n }\n let recordChild = !skipChild;\n if (serializedNode.type === NodeType$3.Element) {\n recordChild = recordChild && !serializedNode.needBlock;\n delete serializedNode.needBlock;\n const shadowRoot = n.shadowRoot;\n if (shadowRoot && isNativeShadowDom(shadowRoot))\n serializedNode.isShadowHost = true;\n }\n if ((serializedNode.type === NodeType$3.Document ||\n serializedNode.type === NodeType$3.Element) &&\n recordChild) {\n if (slimDOMOptions.headWhitespace &&\n serializedNode.type === NodeType$3.Element &&\n serializedNode.tagName === 'head') {\n preserveWhiteSpace = false;\n }\n const bypassOptions = {\n doc,\n mirror,\n blockClass,\n blockSelector,\n maskAllText,\n unblockSelector,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n skipChild,\n inlineStylesheet,\n maskInputOptions,\n maskAttributeFn,\n maskTextFn,\n maskInputFn,\n slimDOMOptions,\n dataURLOptions,\n inlineImages,\n recordCanvas,\n preserveWhiteSpace,\n onSerialize,\n onIframeLoad,\n iframeLoadTimeout,\n onStylesheetLoad,\n stylesheetLoadTimeout,\n keepIframeSrcFn,\n };\n for (const childN of Array.from(n.childNodes)) {\n const serializedChildNode = serializeNodeWithId(childN, bypassOptions);\n if (serializedChildNode) {\n serializedNode.childNodes.push(serializedChildNode);\n }\n }\n if (isElement$1(n) && n.shadowRoot) {\n for (const childN of Array.from(n.shadowRoot.childNodes)) {\n const serializedChildNode = serializeNodeWithId(childN, bypassOptions);\n if (serializedChildNode) {\n isNativeShadowDom(n.shadowRoot) &&\n (serializedChildNode.isShadow = true);\n serializedNode.childNodes.push(serializedChildNode);\n }\n }\n }\n }\n if (n.parentNode &&\n isShadowRoot(n.parentNode) &&\n isNativeShadowDom(n.parentNode)) {\n serializedNode.isShadow = true;\n }\n if (serializedNode.type === NodeType$3.Element &&\n serializedNode.tagName === 'iframe') {\n onceIframeLoaded(n, () => {\n const iframeDoc = getIframeContentDocument(n);\n if (iframeDoc && onIframeLoad) {\n const serializedIframeNode = serializeNodeWithId(iframeDoc, {\n doc: iframeDoc,\n mirror,\n blockClass,\n blockSelector,\n unblockSelector,\n maskAllText,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n skipChild: false,\n inlineStylesheet,\n maskInputOptions,\n maskAttributeFn,\n maskTextFn,\n maskInputFn,\n slimDOMOptions,\n dataURLOptions,\n inlineImages,\n recordCanvas,\n preserveWhiteSpace,\n onSerialize,\n onIframeLoad,\n iframeLoadTimeout,\n onStylesheetLoad,\n stylesheetLoadTimeout,\n keepIframeSrcFn,\n });\n if (serializedIframeNode) {\n onIframeLoad(n, serializedIframeNode);\n }\n }\n }, iframeLoadTimeout);\n }\n if (serializedNode.type === NodeType$3.Element &&\n serializedNode.tagName === 'link' &&\n typeof serializedNode.attributes.rel === 'string' &&\n (serializedNode.attributes.rel === 'stylesheet' ||\n (serializedNode.attributes.rel === 'preload' &&\n typeof serializedNode.attributes.href === 'string' &&\n extractFileExtension(serializedNode.attributes.href) === 'css'))) {\n onceStylesheetLoaded(n, () => {\n if (onStylesheetLoad) {\n const serializedLinkNode = serializeNodeWithId(n, {\n doc,\n mirror,\n blockClass,\n blockSelector,\n unblockSelector,\n maskAllText,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n skipChild: false,\n inlineStylesheet,\n maskInputOptions,\n maskAttributeFn,\n maskTextFn,\n maskInputFn,\n slimDOMOptions,\n dataURLOptions,\n inlineImages,\n recordCanvas,\n preserveWhiteSpace,\n onSerialize,\n onIframeLoad,\n iframeLoadTimeout,\n onStylesheetLoad,\n stylesheetLoadTimeout,\n keepIframeSrcFn,\n });\n if (serializedLinkNode) {\n onStylesheetLoad(n, serializedLinkNode);\n }\n }\n }, stylesheetLoadTimeout);\n }\n return serializedNode;\n}\nfunction snapshot(n, options) {\n const { mirror = new Mirror(), blockClass = 'rr-block', blockSelector = null, unblockSelector = null, maskAllText = false, maskTextClass = 'rr-mask', unmaskTextClass = null, maskTextSelector = null, unmaskTextSelector = null, inlineStylesheet = true, inlineImages = false, recordCanvas = false, maskAllInputs = false, maskAttributeFn, maskTextFn, maskInputFn, slimDOM = false, dataURLOptions, preserveWhiteSpace, onSerialize, onIframeLoad, iframeLoadTimeout, onStylesheetLoad, stylesheetLoadTimeout, keepIframeSrcFn = () => false, } = options || {};\n const maskInputOptions = maskAllInputs === true\n ? {\n color: true,\n date: true,\n 'datetime-local': true,\n email: true,\n month: true,\n number: true,\n range: true,\n search: true,\n tel: true,\n text: true,\n time: true,\n url: true,\n week: true,\n textarea: true,\n select: true,\n }\n : maskAllInputs === false\n ? {}\n : maskAllInputs;\n const slimDOMOptions = slimDOM === true || slimDOM === 'all'\n ?\n {\n script: true,\n comment: true,\n headFavicon: true,\n headWhitespace: true,\n headMetaDescKeywords: slimDOM === 'all',\n headMetaSocial: true,\n headMetaRobots: true,\n headMetaHttpEquiv: true,\n headMetaAuthorship: true,\n headMetaVerification: true,\n }\n : slimDOM === false\n ? {}\n : slimDOM;\n return serializeNodeWithId(n, {\n doc: n,\n mirror,\n blockClass,\n blockSelector,\n unblockSelector,\n maskAllText,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n skipChild: false,\n inlineStylesheet,\n maskInputOptions,\n maskAttributeFn,\n maskTextFn,\n maskInputFn,\n slimDOMOptions,\n dataURLOptions,\n inlineImages,\n recordCanvas,\n preserveWhiteSpace,\n onSerialize,\n onIframeLoad,\n iframeLoadTimeout,\n onStylesheetLoad,\n stylesheetLoadTimeout,\n keepIframeSrcFn,\n newlyAddedElement: false,\n });\n}\n\nfunction _optionalChain$4(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }\nfunction on(type, fn, target = document) {\n const options = { capture: true, passive: true };\n target.addEventListener(type, fn, options);\n return () => target.removeEventListener(type, fn, options);\n}\nconst DEPARTED_MIRROR_ACCESS_WARNING = 'Please stop import mirror directly. Instead of that,' +\n '\\r\\n' +\n 'now you can use replayer.getMirror() to access the mirror instance of a replayer,' +\n '\\r\\n' +\n 'or you can use record.mirror to access the mirror instance during recording.';\nlet _mirror = {\n map: {},\n getId() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n return -1;\n },\n getNode() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n return null;\n },\n removeNodeFromMap() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n },\n has() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n return false;\n },\n reset() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n },\n};\nif (typeof window !== 'undefined' && window.Proxy && window.Reflect) {\n _mirror = new Proxy(_mirror, {\n get(target, prop, receiver) {\n if (prop === 'map') {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n }\n return Reflect.get(target, prop, receiver);\n },\n });\n}\nfunction throttle$1(func, wait, options = {}) {\n let timeout = null;\n let previous = 0;\n return function (...args) {\n const now = Date.now();\n if (!previous && options.leading === false) {\n previous = now;\n }\n const remaining = wait - (now - previous);\n const context = this;\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout$1(timeout);\n timeout = null;\n }\n previous = now;\n func.apply(context, args);\n }\n else if (!timeout && options.trailing !== false) {\n timeout = setTimeout$1(() => {\n previous = options.leading === false ? 0 : Date.now();\n timeout = null;\n func.apply(context, args);\n }, remaining);\n }\n };\n}\nfunction hookSetter(target, key, d, isRevoked, win = window) {\n const original = win.Object.getOwnPropertyDescriptor(target, key);\n win.Object.defineProperty(target, key, isRevoked\n ? d\n : {\n set(value) {\n setTimeout$1(() => {\n d.set.call(this, value);\n }, 0);\n if (original && original.set) {\n original.set.call(this, value);\n }\n },\n });\n return () => hookSetter(target, key, original || {}, true);\n}\nfunction patch(source, name, replacement) {\n try {\n if (!(name in source)) {\n return () => {\n };\n }\n const original = source[name];\n const wrapped = replacement(original);\n if (typeof wrapped === 'function') {\n wrapped.prototype = wrapped.prototype || {};\n Object.defineProperties(wrapped, {\n __rrweb_original__: {\n enumerable: false,\n value: original,\n },\n });\n }\n source[name] = wrapped;\n return () => {\n source[name] = original;\n };\n }\n catch (e2) {\n return () => {\n };\n }\n}\nlet nowTimestamp = Date.now;\nif (!(/[1-9][0-9]{12}/.test(Date.now().toString()))) {\n nowTimestamp = () => new Date().getTime();\n}\nfunction getWindowScroll(win) {\n const doc = win.document;\n return {\n left: doc.scrollingElement\n ? doc.scrollingElement.scrollLeft\n : win.pageXOffset !== undefined\n ? win.pageXOffset\n : _optionalChain$4([doc, 'optionalAccess', _ => _.documentElement, 'access', _2 => _2.scrollLeft]) ||\n _optionalChain$4([doc, 'optionalAccess', _3 => _3.body, 'optionalAccess', _4 => _4.parentElement, 'optionalAccess', _5 => _5.scrollLeft]) ||\n _optionalChain$4([doc, 'optionalAccess', _6 => _6.body, 'optionalAccess', _7 => _7.scrollLeft]) ||\n 0,\n top: doc.scrollingElement\n ? doc.scrollingElement.scrollTop\n : win.pageYOffset !== undefined\n ? win.pageYOffset\n : _optionalChain$4([doc, 'optionalAccess', _8 => _8.documentElement, 'access', _9 => _9.scrollTop]) ||\n _optionalChain$4([doc, 'optionalAccess', _10 => _10.body, 'optionalAccess', _11 => _11.parentElement, 'optionalAccess', _12 => _12.scrollTop]) ||\n _optionalChain$4([doc, 'optionalAccess', _13 => _13.body, 'optionalAccess', _14 => _14.scrollTop]) ||\n 0,\n };\n}\nfunction getWindowHeight() {\n return (window.innerHeight ||\n (document.documentElement && document.documentElement.clientHeight) ||\n (document.body && document.body.clientHeight));\n}\nfunction getWindowWidth() {\n return (window.innerWidth ||\n (document.documentElement && document.documentElement.clientWidth) ||\n (document.body && document.body.clientWidth));\n}\nfunction closestElementOfNode(node) {\n if (!node) {\n return null;\n }\n const el = node.nodeType === node.ELEMENT_NODE\n ? node\n : node.parentElement;\n return el;\n}\nfunction isBlocked(node, blockClass, blockSelector, unblockSelector, checkAncestors) {\n if (!node) {\n return false;\n }\n const el = closestElementOfNode(node);\n if (!el) {\n return false;\n }\n const blockedPredicate = createMatchPredicate(blockClass, blockSelector);\n if (!checkAncestors) {\n const isUnblocked = unblockSelector && el.matches(unblockSelector);\n return blockedPredicate(el) && !isUnblocked;\n }\n const blockDistance = distanceToMatch(el, blockedPredicate);\n let unblockDistance = -1;\n if (blockDistance < 0) {\n return false;\n }\n if (unblockSelector) {\n unblockDistance = distanceToMatch(el, createMatchPredicate(null, unblockSelector));\n }\n if (blockDistance > -1 && unblockDistance < 0) {\n return true;\n }\n return blockDistance < unblockDistance;\n}\nfunction isSerialized(n, mirror) {\n return mirror.getId(n) !== -1;\n}\nfunction isIgnored(n, mirror) {\n return mirror.getId(n) === IGNORED_NODE;\n}\nfunction isAncestorRemoved(target, mirror) {\n if (isShadowRoot(target)) {\n return false;\n }\n const id = mirror.getId(target);\n if (!mirror.has(id)) {\n return true;\n }\n if (target.parentNode &&\n target.parentNode.nodeType === target.DOCUMENT_NODE) {\n return false;\n }\n if (!target.parentNode) {\n return true;\n }\n return isAncestorRemoved(target.parentNode, mirror);\n}\nfunction legacy_isTouchEvent(event) {\n return Boolean(event.changedTouches);\n}\nfunction polyfill(win = window) {\n if ('NodeList' in win && !win.NodeList.prototype.forEach) {\n win.NodeList.prototype.forEach = Array.prototype\n .forEach;\n }\n if ('DOMTokenList' in win && !win.DOMTokenList.prototype.forEach) {\n win.DOMTokenList.prototype.forEach = Array.prototype\n .forEach;\n }\n if (!Node.prototype.contains) {\n Node.prototype.contains = (...args) => {\n let node = args[0];\n if (!(0 in args)) {\n throw new TypeError('1 argument is required');\n }\n do {\n if (this === node) {\n return true;\n }\n } while ((node = node && node.parentNode));\n return false;\n };\n }\n}\nfunction isSerializedIframe(n, mirror) {\n return Boolean(n.nodeName === 'IFRAME' && mirror.getMeta(n));\n}\nfunction isSerializedStylesheet(n, mirror) {\n return Boolean(n.nodeName === 'LINK' &&\n n.nodeType === n.ELEMENT_NODE &&\n n.getAttribute &&\n n.getAttribute('rel') === 'stylesheet' &&\n mirror.getMeta(n));\n}\nfunction hasShadowRoot(n) {\n return Boolean(_optionalChain$4([n, 'optionalAccess', _18 => _18.shadowRoot]));\n}\nclass StyleSheetMirror {\n constructor() {\n this.id = 1;\n this.styleIDMap = new WeakMap();\n this.idStyleMap = new Map();\n }\n getId(stylesheet) {\n return _nullishCoalesce(this.styleIDMap.get(stylesheet), () => ( -1));\n }\n has(stylesheet) {\n return this.styleIDMap.has(stylesheet);\n }\n add(stylesheet, id) {\n if (this.has(stylesheet))\n return this.getId(stylesheet);\n let newId;\n if (id === undefined) {\n newId = this.id++;\n }\n else\n newId = id;\n this.styleIDMap.set(stylesheet, newId);\n this.idStyleMap.set(newId, stylesheet);\n return newId;\n }\n getStyle(id) {\n return this.idStyleMap.get(id) || null;\n }\n reset() {\n this.styleIDMap = new WeakMap();\n this.idStyleMap = new Map();\n this.id = 1;\n }\n generateId() {\n return this.id++;\n }\n}\nfunction getShadowHost(n) {\n let shadowHost = null;\n if (_optionalChain$4([n, 'access', _19 => _19.getRootNode, 'optionalCall', _20 => _20(), 'optionalAccess', _21 => _21.nodeType]) === Node.DOCUMENT_FRAGMENT_NODE &&\n n.getRootNode().host)\n shadowHost = n.getRootNode().host;\n return shadowHost;\n}\nfunction getRootShadowHost(n) {\n let rootShadowHost = n;\n let shadowHost;\n while ((shadowHost = getShadowHost(rootShadowHost)))\n rootShadowHost = shadowHost;\n return rootShadowHost;\n}\nfunction shadowHostInDom(n) {\n const doc = n.ownerDocument;\n if (!doc)\n return false;\n const shadowHost = getRootShadowHost(n);\n return doc.contains(shadowHost);\n}\nfunction inDom(n) {\n const doc = n.ownerDocument;\n if (!doc)\n return false;\n return doc.contains(n) || shadowHostInDom(n);\n}\nconst cachedImplementations = {};\nfunction getImplementation(name) {\n const cached = cachedImplementations[name];\n if (cached) {\n return cached;\n }\n const document = window.document;\n let impl = window[name];\n if (document && typeof document.createElement === 'function') {\n try {\n const sandbox = document.createElement('iframe');\n sandbox.hidden = true;\n document.head.appendChild(sandbox);\n const contentWindow = sandbox.contentWindow;\n if (contentWindow && contentWindow[name]) {\n impl =\n contentWindow[name];\n }\n document.head.removeChild(sandbox);\n }\n catch (e) {\n }\n }\n return (cachedImplementations[name] = impl.bind(window));\n}\nfunction onRequestAnimationFrame(...rest) {\n return getImplementation('requestAnimationFrame')(...rest);\n}\nfunction setTimeout$1(...rest) {\n return getImplementation('setTimeout')(...rest);\n}\nfunction clearTimeout$1(...rest) {\n return getImplementation('clearTimeout')(...rest);\n}\n\nvar EventType = /* @__PURE__ */ ((EventType2) => {\n EventType2[EventType2[\"DomContentLoaded\"] = 0] = \"DomContentLoaded\";\n EventType2[EventType2[\"Load\"] = 1] = \"Load\";\n EventType2[EventType2[\"FullSnapshot\"] = 2] = \"FullSnapshot\";\n EventType2[EventType2[\"IncrementalSnapshot\"] = 3] = \"IncrementalSnapshot\";\n EventType2[EventType2[\"Meta\"] = 4] = \"Meta\";\n EventType2[EventType2[\"Custom\"] = 5] = \"Custom\";\n EventType2[EventType2[\"Plugin\"] = 6] = \"Plugin\";\n return EventType2;\n})(EventType || {});\nvar IncrementalSource = /* @__PURE__ */ ((IncrementalSource2) => {\n IncrementalSource2[IncrementalSource2[\"Mutation\"] = 0] = \"Mutation\";\n IncrementalSource2[IncrementalSource2[\"MouseMove\"] = 1] = \"MouseMove\";\n IncrementalSource2[IncrementalSource2[\"MouseInteraction\"] = 2] = \"MouseInteraction\";\n IncrementalSource2[IncrementalSource2[\"Scroll\"] = 3] = \"Scroll\";\n IncrementalSource2[IncrementalSource2[\"ViewportResize\"] = 4] = \"ViewportResize\";\n IncrementalSource2[IncrementalSource2[\"Input\"] = 5] = \"Input\";\n IncrementalSource2[IncrementalSource2[\"TouchMove\"] = 6] = \"TouchMove\";\n IncrementalSource2[IncrementalSource2[\"MediaInteraction\"] = 7] = \"MediaInteraction\";\n IncrementalSource2[IncrementalSource2[\"StyleSheetRule\"] = 8] = \"StyleSheetRule\";\n IncrementalSource2[IncrementalSource2[\"CanvasMutation\"] = 9] = \"CanvasMutation\";\n IncrementalSource2[IncrementalSource2[\"Font\"] = 10] = \"Font\";\n IncrementalSource2[IncrementalSource2[\"Log\"] = 11] = \"Log\";\n IncrementalSource2[IncrementalSource2[\"Drag\"] = 12] = \"Drag\";\n IncrementalSource2[IncrementalSource2[\"StyleDeclaration\"] = 13] = \"StyleDeclaration\";\n IncrementalSource2[IncrementalSource2[\"Selection\"] = 14] = \"Selection\";\n IncrementalSource2[IncrementalSource2[\"AdoptedStyleSheet\"] = 15] = \"AdoptedStyleSheet\";\n IncrementalSource2[IncrementalSource2[\"CustomElement\"] = 16] = \"CustomElement\";\n return IncrementalSource2;\n})(IncrementalSource || {});\nvar MouseInteractions = /* @__PURE__ */ ((MouseInteractions2) => {\n MouseInteractions2[MouseInteractions2[\"MouseUp\"] = 0] = \"MouseUp\";\n MouseInteractions2[MouseInteractions2[\"MouseDown\"] = 1] = \"MouseDown\";\n MouseInteractions2[MouseInteractions2[\"Click\"] = 2] = \"Click\";\n MouseInteractions2[MouseInteractions2[\"ContextMenu\"] = 3] = \"ContextMenu\";\n MouseInteractions2[MouseInteractions2[\"DblClick\"] = 4] = \"DblClick\";\n MouseInteractions2[MouseInteractions2[\"Focus\"] = 5] = \"Focus\";\n MouseInteractions2[MouseInteractions2[\"Blur\"] = 6] = \"Blur\";\n MouseInteractions2[MouseInteractions2[\"TouchStart\"] = 7] = \"TouchStart\";\n MouseInteractions2[MouseInteractions2[\"TouchMove_Departed\"] = 8] = \"TouchMove_Departed\";\n MouseInteractions2[MouseInteractions2[\"TouchEnd\"] = 9] = \"TouchEnd\";\n MouseInteractions2[MouseInteractions2[\"TouchCancel\"] = 10] = \"TouchCancel\";\n return MouseInteractions2;\n})(MouseInteractions || {});\nvar PointerTypes = /* @__PURE__ */ ((PointerTypes2) => {\n PointerTypes2[PointerTypes2[\"Mouse\"] = 0] = \"Mouse\";\n PointerTypes2[PointerTypes2[\"Pen\"] = 1] = \"Pen\";\n PointerTypes2[PointerTypes2[\"Touch\"] = 2] = \"Touch\";\n return PointerTypes2;\n})(PointerTypes || {});\n\nvar NodeType$1;\n(function (NodeType) {\n NodeType[NodeType[\"Document\"] = 0] = \"Document\";\n NodeType[NodeType[\"DocumentType\"] = 1] = \"DocumentType\";\n NodeType[NodeType[\"Element\"] = 2] = \"Element\";\n NodeType[NodeType[\"Text\"] = 3] = \"Text\";\n NodeType[NodeType[\"CDATA\"] = 4] = \"CDATA\";\n NodeType[NodeType[\"Comment\"] = 5] = \"Comment\";\n})(NodeType$1 || (NodeType$1 = {}));\nvar NodeType$2;\n(function (NodeType) {\n NodeType[NodeType[\"PLACEHOLDER\"] = 0] = \"PLACEHOLDER\";\n NodeType[NodeType[\"ELEMENT_NODE\"] = 1] = \"ELEMENT_NODE\";\n NodeType[NodeType[\"ATTRIBUTE_NODE\"] = 2] = \"ATTRIBUTE_NODE\";\n NodeType[NodeType[\"TEXT_NODE\"] = 3] = \"TEXT_NODE\";\n NodeType[NodeType[\"CDATA_SECTION_NODE\"] = 4] = \"CDATA_SECTION_NODE\";\n NodeType[NodeType[\"ENTITY_REFERENCE_NODE\"] = 5] = \"ENTITY_REFERENCE_NODE\";\n NodeType[NodeType[\"ENTITY_NODE\"] = 6] = \"ENTITY_NODE\";\n NodeType[NodeType[\"PROCESSING_INSTRUCTION_NODE\"] = 7] = \"PROCESSING_INSTRUCTION_NODE\";\n NodeType[NodeType[\"COMMENT_NODE\"] = 8] = \"COMMENT_NODE\";\n NodeType[NodeType[\"DOCUMENT_NODE\"] = 9] = \"DOCUMENT_NODE\";\n NodeType[NodeType[\"DOCUMENT_TYPE_NODE\"] = 10] = \"DOCUMENT_TYPE_NODE\";\n NodeType[NodeType[\"DOCUMENT_FRAGMENT_NODE\"] = 11] = \"DOCUMENT_FRAGMENT_NODE\";\n})(NodeType$2 || (NodeType$2 = {}));\n\nfunction getIFrameContentDocument(iframe) {\n try {\n return iframe.contentDocument;\n }\n catch (e) {\n }\n}\nfunction getIFrameContentWindow(iframe) {\n try {\n return iframe.contentWindow;\n }\n catch (e) {\n }\n}\n\nfunction _optionalChain$3(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }\nfunction isNodeInLinkedList(n) {\n return '__ln' in n;\n}\nclass DoubleLinkedList {\n constructor() {\n this.length = 0;\n this.head = null;\n this.tail = null;\n }\n get(position) {\n if (position >= this.length) {\n throw new Error('Position outside of list range');\n }\n let current = this.head;\n for (let index = 0; index < position; index++) {\n current = _optionalChain$3([current, 'optionalAccess', _ => _.next]) || null;\n }\n return current;\n }\n addNode(n) {\n const node = {\n value: n,\n previous: null,\n next: null,\n };\n n.__ln = node;\n if (n.previousSibling && isNodeInLinkedList(n.previousSibling)) {\n const current = n.previousSibling.__ln.next;\n node.next = current;\n node.previous = n.previousSibling.__ln;\n n.previousSibling.__ln.next = node;\n if (current) {\n current.previous = node;\n }\n }\n else if (n.nextSibling &&\n isNodeInLinkedList(n.nextSibling) &&\n n.nextSibling.__ln.previous) {\n const current = n.nextSibling.__ln.previous;\n node.previous = current;\n node.next = n.nextSibling.__ln;\n n.nextSibling.__ln.previous = node;\n if (current) {\n current.next = node;\n }\n }\n else {\n if (this.head) {\n this.head.previous = node;\n }\n node.next = this.head;\n this.head = node;\n }\n if (node.next === null) {\n this.tail = node;\n }\n this.length++;\n }\n removeNode(n) {\n const current = n.__ln;\n if (!this.head) {\n return;\n }\n if (!current.previous) {\n this.head = current.next;\n if (this.head) {\n this.head.previous = null;\n }\n else {\n this.tail = null;\n }\n }\n else {\n current.previous.next = current.next;\n if (current.next) {\n current.next.previous = current.previous;\n }\n else {\n this.tail = current.previous;\n }\n }\n if (n.__ln) {\n delete n.__ln;\n }\n this.length--;\n }\n}\nconst moveKey = (id, parentId) => `${id}@${parentId}`;\nclass MutationBuffer {\n constructor() {\n this.frozen = false;\n this.locked = false;\n this.texts = [];\n this.attributes = [];\n this.attributeMap = new WeakMap();\n this.removes = [];\n this.mapRemoves = [];\n this.movedMap = {};\n this.addedSet = new Set();\n this.movedSet = new Set();\n this.droppedSet = new Set();\n this.processMutations = (mutations) => {\n mutations.forEach(this.processMutation);\n this.emit();\n };\n this.emit = () => {\n if (this.frozen || this.locked) {\n return;\n }\n const adds = [];\n const addedIds = new Set();\n const addList = new DoubleLinkedList();\n const getNextId = (n) => {\n let ns = n;\n let nextId = IGNORED_NODE;\n while (nextId === IGNORED_NODE) {\n ns = ns && ns.nextSibling;\n nextId = ns && this.mirror.getId(ns);\n }\n return nextId;\n };\n const pushAdd = (n) => {\n if (!n.parentNode || !inDom(n)) {\n return;\n }\n const parentId = isShadowRoot(n.parentNode)\n ? this.mirror.getId(getShadowHost(n))\n : this.mirror.getId(n.parentNode);\n const nextId = getNextId(n);\n if (parentId === -1 || nextId === -1) {\n return addList.addNode(n);\n }\n const sn = serializeNodeWithId(n, {\n doc: this.doc,\n mirror: this.mirror,\n blockClass: this.blockClass,\n blockSelector: this.blockSelector,\n maskAllText: this.maskAllText,\n unblockSelector: this.unblockSelector,\n maskTextClass: this.maskTextClass,\n unmaskTextClass: this.unmaskTextClass,\n maskTextSelector: this.maskTextSelector,\n unmaskTextSelector: this.unmaskTextSelector,\n skipChild: true,\n newlyAddedElement: true,\n inlineStylesheet: this.inlineStylesheet,\n maskInputOptions: this.maskInputOptions,\n maskAttributeFn: this.maskAttributeFn,\n maskTextFn: this.maskTextFn,\n maskInputFn: this.maskInputFn,\n slimDOMOptions: this.slimDOMOptions,\n dataURLOptions: this.dataURLOptions,\n recordCanvas: this.recordCanvas,\n inlineImages: this.inlineImages,\n onSerialize: (currentN) => {\n if (isSerializedIframe(currentN, this.mirror) &&\n !isBlocked(currentN, this.blockClass, this.blockSelector, this.unblockSelector, false)) {\n this.iframeManager.addIframe(currentN);\n }\n if (isSerializedStylesheet(currentN, this.mirror)) {\n this.stylesheetManager.trackLinkElement(currentN);\n }\n if (hasShadowRoot(n)) {\n this.shadowDomManager.addShadowRoot(n.shadowRoot, this.doc);\n }\n },\n onIframeLoad: (iframe, childSn) => {\n if (isBlocked(iframe, this.blockClass, this.blockSelector, this.unblockSelector, false)) {\n return;\n }\n this.iframeManager.attachIframe(iframe, childSn);\n if (iframe.contentWindow) {\n this.canvasManager.addWindow(iframe.contentWindow);\n }\n this.shadowDomManager.observeAttachShadow(iframe);\n },\n onStylesheetLoad: (link, childSn) => {\n this.stylesheetManager.attachLinkElement(link, childSn);\n },\n });\n if (sn) {\n adds.push({\n parentId,\n nextId,\n node: sn,\n });\n addedIds.add(sn.id);\n }\n };\n while (this.mapRemoves.length) {\n this.mirror.removeNodeFromMap(this.mapRemoves.shift());\n }\n for (const n of this.movedSet) {\n if (isParentRemoved(this.removes, n, this.mirror) &&\n !this.movedSet.has(n.parentNode)) {\n continue;\n }\n pushAdd(n);\n }\n for (const n of this.addedSet) {\n if (!isAncestorInSet(this.droppedSet, n) &&\n !isParentRemoved(this.removes, n, this.mirror)) {\n pushAdd(n);\n }\n else if (isAncestorInSet(this.movedSet, n)) {\n pushAdd(n);\n }\n else {\n this.droppedSet.add(n);\n }\n }\n let candidate = null;\n while (addList.length) {\n let node = null;\n if (candidate) {\n const parentId = this.mirror.getId(candidate.value.parentNode);\n const nextId = getNextId(candidate.value);\n if (parentId !== -1 && nextId !== -1) {\n node = candidate;\n }\n }\n if (!node) {\n let tailNode = addList.tail;\n while (tailNode) {\n const _node = tailNode;\n tailNode = tailNode.previous;\n if (_node) {\n const parentId = this.mirror.getId(_node.value.parentNode);\n const nextId = getNextId(_node.value);\n if (nextId === -1)\n continue;\n else if (parentId !== -1) {\n node = _node;\n break;\n }\n else {\n const unhandledNode = _node.value;\n if (unhandledNode.parentNode &&\n unhandledNode.parentNode.nodeType ===\n Node.DOCUMENT_FRAGMENT_NODE) {\n const shadowHost = unhandledNode.parentNode\n .host;\n const parentId = this.mirror.getId(shadowHost);\n if (parentId !== -1) {\n node = _node;\n break;\n }\n }\n }\n }\n }\n }\n if (!node) {\n while (addList.head) {\n addList.removeNode(addList.head.value);\n }\n break;\n }\n candidate = node.previous;\n addList.removeNode(node.value);\n pushAdd(node.value);\n }\n const payload = {\n texts: this.texts\n .map((text) => ({\n id: this.mirror.getId(text.node),\n value: text.value,\n }))\n .filter((text) => !addedIds.has(text.id))\n .filter((text) => this.mirror.has(text.id)),\n attributes: this.attributes\n .map((attribute) => {\n const { attributes } = attribute;\n if (typeof attributes.style === 'string') {\n const diffAsStr = JSON.stringify(attribute.styleDiff);\n const unchangedAsStr = JSON.stringify(attribute._unchangedStyles);\n if (diffAsStr.length < attributes.style.length) {\n if ((diffAsStr + unchangedAsStr).split('var(').length ===\n attributes.style.split('var(').length) {\n attributes.style = attribute.styleDiff;\n }\n }\n }\n return {\n id: this.mirror.getId(attribute.node),\n attributes: attributes,\n };\n })\n .filter((attribute) => !addedIds.has(attribute.id))\n .filter((attribute) => this.mirror.has(attribute.id)),\n removes: this.removes,\n adds,\n };\n if (!payload.texts.length &&\n !payload.attributes.length &&\n !payload.removes.length &&\n !payload.adds.length) {\n return;\n }\n this.texts = [];\n this.attributes = [];\n this.attributeMap = new WeakMap();\n this.removes = [];\n this.addedSet = new Set();\n this.movedSet = new Set();\n this.droppedSet = new Set();\n this.movedMap = {};\n this.mutationCb(payload);\n };\n this.processMutation = (m) => {\n if (isIgnored(m.target, this.mirror)) {\n return;\n }\n switch (m.type) {\n case 'characterData': {\n const value = m.target.textContent;\n if (!isBlocked(m.target, this.blockClass, this.blockSelector, this.unblockSelector, false) &&\n value !== m.oldValue) {\n this.texts.push({\n value: needMaskingText(m.target, this.maskTextClass, this.maskTextSelector, this.unmaskTextClass, this.unmaskTextSelector, this.maskAllText) && value\n ? this.maskTextFn\n ? this.maskTextFn(value, closestElementOfNode(m.target))\n : value.replace(/[\\S]/g, '*')\n : value,\n node: m.target,\n });\n }\n break;\n }\n case 'attributes': {\n const target = m.target;\n let attributeName = m.attributeName;\n let value = m.target.getAttribute(attributeName);\n if (attributeName === 'value') {\n const type = getInputType(target);\n const tagName = target.tagName;\n value = getInputValue(target, tagName, type);\n const isInputMasked = shouldMaskInput({\n maskInputOptions: this.maskInputOptions,\n tagName,\n type,\n });\n const forceMask = needMaskingText(m.target, this.maskTextClass, this.maskTextSelector, this.unmaskTextClass, this.unmaskTextSelector, isInputMasked);\n value = maskInputValue({\n isMasked: forceMask,\n element: target,\n value,\n maskInputFn: this.maskInputFn,\n });\n }\n if (isBlocked(m.target, this.blockClass, this.blockSelector, this.unblockSelector, false) ||\n value === m.oldValue) {\n return;\n }\n let item = this.attributeMap.get(m.target);\n if (target.tagName === 'IFRAME' &&\n attributeName === 'src' &&\n !this.keepIframeSrcFn(value)) {\n const iframeDoc = getIFrameContentDocument(target);\n if (!iframeDoc) {\n attributeName = 'rr_src';\n }\n else {\n return;\n }\n }\n if (!item) {\n item = {\n node: m.target,\n attributes: {},\n styleDiff: {},\n _unchangedStyles: {},\n };\n this.attributes.push(item);\n this.attributeMap.set(m.target, item);\n }\n if (attributeName === 'type' &&\n target.tagName === 'INPUT' &&\n (m.oldValue || '').toLowerCase() === 'password') {\n target.setAttribute('data-rr-is-password', 'true');\n }\n if (!ignoreAttribute(target.tagName, attributeName)) {\n item.attributes[attributeName] = transformAttribute(this.doc, toLowerCase(target.tagName), toLowerCase(attributeName), value, target, this.maskAttributeFn);\n if (attributeName === 'style') {\n if (!this.unattachedDoc) {\n try {\n this.unattachedDoc =\n document.implementation.createHTMLDocument();\n }\n catch (e) {\n this.unattachedDoc = this.doc;\n }\n }\n const old = this.unattachedDoc.createElement('span');\n if (m.oldValue) {\n old.setAttribute('style', m.oldValue);\n }\n for (const pname of Array.from(target.style)) {\n const newValue = target.style.getPropertyValue(pname);\n const newPriority = target.style.getPropertyPriority(pname);\n if (newValue !== old.style.getPropertyValue(pname) ||\n newPriority !== old.style.getPropertyPriority(pname)) {\n if (newPriority === '') {\n item.styleDiff[pname] = newValue;\n }\n else {\n item.styleDiff[pname] = [newValue, newPriority];\n }\n }\n else {\n item._unchangedStyles[pname] = [newValue, newPriority];\n }\n }\n for (const pname of Array.from(old.style)) {\n if (target.style.getPropertyValue(pname) === '') {\n item.styleDiff[pname] = false;\n }\n }\n }\n }\n break;\n }\n case 'childList': {\n if (isBlocked(m.target, this.blockClass, this.blockSelector, this.unblockSelector, true)) {\n return;\n }\n m.addedNodes.forEach((n) => this.genAdds(n, m.target));\n m.removedNodes.forEach((n) => {\n const nodeId = this.mirror.getId(n);\n const parentId = isShadowRoot(m.target)\n ? this.mirror.getId(m.target.host)\n : this.mirror.getId(m.target);\n if (isBlocked(m.target, this.blockClass, this.blockSelector, this.unblockSelector, false) ||\n isIgnored(n, this.mirror) ||\n !isSerialized(n, this.mirror)) {\n return;\n }\n if (this.addedSet.has(n)) {\n deepDelete(this.addedSet, n);\n this.droppedSet.add(n);\n }\n else if (this.addedSet.has(m.target) && nodeId === -1) ;\n else if (isAncestorRemoved(m.target, this.mirror)) ;\n else if (this.movedSet.has(n) &&\n this.movedMap[moveKey(nodeId, parentId)]) {\n deepDelete(this.movedSet, n);\n }\n else {\n this.removes.push({\n parentId,\n id: nodeId,\n isShadow: isShadowRoot(m.target) && isNativeShadowDom(m.target)\n ? true\n : undefined,\n });\n }\n this.mapRemoves.push(n);\n });\n break;\n }\n }\n };\n this.genAdds = (n, target) => {\n if (this.processedNodeManager.inOtherBuffer(n, this))\n return;\n if (this.addedSet.has(n) || this.movedSet.has(n))\n return;\n if (this.mirror.hasNode(n)) {\n if (isIgnored(n, this.mirror)) {\n return;\n }\n this.movedSet.add(n);\n let targetId = null;\n if (target && this.mirror.hasNode(target)) {\n targetId = this.mirror.getId(target);\n }\n if (targetId && targetId !== -1) {\n this.movedMap[moveKey(this.mirror.getId(n), targetId)] = true;\n }\n }\n else {\n this.addedSet.add(n);\n this.droppedSet.delete(n);\n }\n if (!isBlocked(n, this.blockClass, this.blockSelector, this.unblockSelector, false)) {\n n.childNodes.forEach((childN) => this.genAdds(childN));\n if (hasShadowRoot(n)) {\n n.shadowRoot.childNodes.forEach((childN) => {\n this.processedNodeManager.add(childN, this);\n this.genAdds(childN, n);\n });\n }\n }\n };\n }\n init(options) {\n [\n 'mutationCb',\n 'blockClass',\n 'blockSelector',\n 'unblockSelector',\n 'maskAllText',\n 'maskTextClass',\n 'unmaskTextClass',\n 'maskTextSelector',\n 'unmaskTextSelector',\n 'inlineStylesheet',\n 'maskInputOptions',\n 'maskAttributeFn',\n 'maskTextFn',\n 'maskInputFn',\n 'keepIframeSrcFn',\n 'recordCanvas',\n 'inlineImages',\n 'slimDOMOptions',\n 'dataURLOptions',\n 'doc',\n 'mirror',\n 'iframeManager',\n 'stylesheetManager',\n 'shadowDomManager',\n 'canvasManager',\n 'processedNodeManager',\n ].forEach((key) => {\n this[key] = options[key];\n });\n }\n freeze() {\n this.frozen = true;\n this.canvasManager.freeze();\n }\n unfreeze() {\n this.frozen = false;\n this.canvasManager.unfreeze();\n this.emit();\n }\n isFrozen() {\n return this.frozen;\n }\n lock() {\n this.locked = true;\n this.canvasManager.lock();\n }\n unlock() {\n this.locked = false;\n this.canvasManager.unlock();\n this.emit();\n }\n reset() {\n this.shadowDomManager.reset();\n this.canvasManager.reset();\n }\n}\nfunction deepDelete(addsSet, n) {\n addsSet.delete(n);\n n.childNodes.forEach((childN) => deepDelete(addsSet, childN));\n}\nfunction isParentRemoved(removes, n, mirror) {\n if (removes.length === 0)\n return false;\n return _isParentRemoved(removes, n, mirror);\n}\nfunction _isParentRemoved(removes, n, mirror) {\n let node = n.parentNode;\n while (node) {\n const parentId = mirror.getId(node);\n if (removes.some((r) => r.id === parentId)) {\n return true;\n }\n node = node.parentNode;\n }\n return false;\n}\nfunction isAncestorInSet(set, n) {\n if (set.size === 0)\n return false;\n return _isAncestorInSet(set, n);\n}\nfunction _isAncestorInSet(set, n) {\n const { parentNode } = n;\n if (!parentNode) {\n return false;\n }\n if (set.has(parentNode)) {\n return true;\n }\n return _isAncestorInSet(set, parentNode);\n}\n\nlet errorHandler;\nfunction registerErrorHandler(handler) {\n errorHandler = handler;\n}\nfunction unregisterErrorHandler() {\n errorHandler = undefined;\n}\nconst callbackWrapper = (cb) => {\n if (!errorHandler) {\n return cb;\n }\n const rrwebWrapped = ((...rest) => {\n try {\n return cb(...rest);\n }\n catch (error) {\n if (errorHandler && errorHandler(error) === true) {\n return () => {\n };\n }\n throw error;\n }\n });\n return rrwebWrapped;\n};\n\nfunction _optionalChain$2(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }\nconst mutationBuffers = [];\nfunction getEventTarget(event) {\n try {\n if ('composedPath' in event) {\n const path = event.composedPath();\n if (path.length) {\n return path[0];\n }\n }\n else if ('path' in event && event.path.length) {\n return event.path[0];\n }\n }\n catch (e2) {\n }\n return event && event.target;\n}\nfunction initMutationObserver(options, rootEl) {\n const mutationBuffer = new MutationBuffer();\n mutationBuffers.push(mutationBuffer);\n mutationBuffer.init(options);\n let mutationObserverCtor = window.MutationObserver ||\n window.__rrMutationObserver;\n const angularZoneSymbol = _optionalChain$2([window, 'optionalAccess', _ => _.Zone, 'optionalAccess', _2 => _2.__symbol__, 'optionalCall', _3 => _3('MutationObserver')]);\n if (angularZoneSymbol &&\n window[angularZoneSymbol]) {\n mutationObserverCtor = window[angularZoneSymbol];\n }\n const observer = new mutationObserverCtor(callbackWrapper((mutations) => {\n if (options.onMutation && options.onMutation(mutations) === false) {\n return;\n }\n mutationBuffer.processMutations.bind(mutationBuffer)(mutations);\n }));\n observer.observe(rootEl, {\n attributes: true,\n attributeOldValue: true,\n characterData: true,\n characterDataOldValue: true,\n childList: true,\n subtree: true,\n });\n return observer;\n}\nfunction initMoveObserver({ mousemoveCb, sampling, doc, mirror, }) {\n if (sampling.mousemove === false) {\n return () => {\n };\n }\n const threshold = typeof sampling.mousemove === 'number' ? sampling.mousemove : 50;\n const callbackThreshold = typeof sampling.mousemoveCallback === 'number'\n ? sampling.mousemoveCallback\n : 500;\n let positions = [];\n let timeBaseline;\n const wrappedCb = throttle$1(callbackWrapper((source) => {\n const totalOffset = Date.now() - timeBaseline;\n mousemoveCb(positions.map((p) => {\n p.timeOffset -= totalOffset;\n return p;\n }), source);\n positions = [];\n timeBaseline = null;\n }), callbackThreshold);\n const updatePosition = callbackWrapper(throttle$1(callbackWrapper((evt) => {\n const target = getEventTarget(evt);\n const { clientX, clientY } = legacy_isTouchEvent(evt)\n ? evt.changedTouches[0]\n : evt;\n if (!timeBaseline) {\n timeBaseline = nowTimestamp();\n }\n positions.push({\n x: clientX,\n y: clientY,\n id: mirror.getId(target),\n timeOffset: nowTimestamp() - timeBaseline,\n });\n wrappedCb(typeof DragEvent !== 'undefined' && evt instanceof DragEvent\n ? IncrementalSource.Drag\n : evt instanceof MouseEvent\n ? IncrementalSource.MouseMove\n : IncrementalSource.TouchMove);\n }), threshold, {\n trailing: false,\n }));\n const handlers = [\n on('mousemove', updatePosition, doc),\n on('touchmove', updatePosition, doc),\n on('drag', updatePosition, doc),\n ];\n return callbackWrapper(() => {\n handlers.forEach((h) => h());\n });\n}\nfunction initMouseInteractionObserver({ mouseInteractionCb, doc, mirror, blockClass, blockSelector, unblockSelector, sampling, }) {\n if (sampling.mouseInteraction === false) {\n return () => {\n };\n }\n const disableMap = sampling.mouseInteraction === true ||\n sampling.mouseInteraction === undefined\n ? {}\n : sampling.mouseInteraction;\n const handlers = [];\n let currentPointerType = null;\n const getHandler = (eventKey) => {\n return (event) => {\n const target = getEventTarget(event);\n if (isBlocked(target, blockClass, blockSelector, unblockSelector, true)) {\n return;\n }\n let pointerType = null;\n let thisEventKey = eventKey;\n if ('pointerType' in event) {\n switch (event.pointerType) {\n case 'mouse':\n pointerType = PointerTypes.Mouse;\n break;\n case 'touch':\n pointerType = PointerTypes.Touch;\n break;\n case 'pen':\n pointerType = PointerTypes.Pen;\n break;\n }\n if (pointerType === PointerTypes.Touch) {\n if (MouseInteractions[eventKey] === MouseInteractions.MouseDown) {\n thisEventKey = 'TouchStart';\n }\n else if (MouseInteractions[eventKey] === MouseInteractions.MouseUp) {\n thisEventKey = 'TouchEnd';\n }\n }\n else if (pointerType === PointerTypes.Pen) ;\n }\n else if (legacy_isTouchEvent(event)) {\n pointerType = PointerTypes.Touch;\n }\n if (pointerType !== null) {\n currentPointerType = pointerType;\n if ((thisEventKey.startsWith('Touch') &&\n pointerType === PointerTypes.Touch) ||\n (thisEventKey.startsWith('Mouse') &&\n pointerType === PointerTypes.Mouse)) {\n pointerType = null;\n }\n }\n else if (MouseInteractions[eventKey] === MouseInteractions.Click) {\n pointerType = currentPointerType;\n currentPointerType = null;\n }\n const e = legacy_isTouchEvent(event) ? event.changedTouches[0] : event;\n if (!e) {\n return;\n }\n const id = mirror.getId(target);\n const { clientX, clientY } = e;\n callbackWrapper(mouseInteractionCb)({\n type: MouseInteractions[thisEventKey],\n id,\n x: clientX,\n y: clientY,\n ...(pointerType !== null && { pointerType }),\n });\n };\n };\n Object.keys(MouseInteractions)\n .filter((key) => Number.isNaN(Number(key)) &&\n !key.endsWith('_Departed') &&\n disableMap[key] !== false)\n .forEach((eventKey) => {\n let eventName = toLowerCase(eventKey);\n const handler = getHandler(eventKey);\n if (window.PointerEvent) {\n switch (MouseInteractions[eventKey]) {\n case MouseInteractions.MouseDown:\n case MouseInteractions.MouseUp:\n eventName = eventName.replace('mouse', 'pointer');\n break;\n case MouseInteractions.TouchStart:\n case MouseInteractions.TouchEnd:\n return;\n }\n }\n handlers.push(on(eventName, handler, doc));\n });\n return callbackWrapper(() => {\n handlers.forEach((h) => h());\n });\n}\nfunction initScrollObserver({ scrollCb, doc, mirror, blockClass, blockSelector, unblockSelector, sampling, }) {\n const updatePosition = callbackWrapper(throttle$1(callbackWrapper((evt) => {\n const target = getEventTarget(evt);\n if (!target ||\n isBlocked(target, blockClass, blockSelector, unblockSelector, true)) {\n return;\n }\n const id = mirror.getId(target);\n if (target === doc && doc.defaultView) {\n const scrollLeftTop = getWindowScroll(doc.defaultView);\n scrollCb({\n id,\n x: scrollLeftTop.left,\n y: scrollLeftTop.top,\n });\n }\n else {\n scrollCb({\n id,\n x: target.scrollLeft,\n y: target.scrollTop,\n });\n }\n }), sampling.scroll || 100));\n return on('scroll', updatePosition, doc);\n}\nfunction initViewportResizeObserver({ viewportResizeCb }, { win }) {\n let lastH = -1;\n let lastW = -1;\n const updateDimension = callbackWrapper(throttle$1(callbackWrapper(() => {\n const height = getWindowHeight();\n const width = getWindowWidth();\n if (lastH !== height || lastW !== width) {\n viewportResizeCb({\n width: Number(width),\n height: Number(height),\n });\n lastH = height;\n lastW = width;\n }\n }), 200));\n return on('resize', updateDimension, win);\n}\nconst INPUT_TAGS = ['INPUT', 'TEXTAREA', 'SELECT'];\nconst lastInputValueMap = new WeakMap();\nfunction initInputObserver({ inputCb, doc, mirror, blockClass, blockSelector, unblockSelector, ignoreClass, ignoreSelector, maskInputOptions, maskInputFn, sampling, userTriggeredOnInput, maskTextClass, unmaskTextClass, maskTextSelector, unmaskTextSelector, }) {\n function eventHandler(event) {\n let target = getEventTarget(event);\n const userTriggered = event.isTrusted;\n const tagName = target && toUpperCase(target.tagName);\n if (tagName === 'OPTION')\n target = target.parentElement;\n if (!target ||\n !tagName ||\n INPUT_TAGS.indexOf(tagName) < 0 ||\n isBlocked(target, blockClass, blockSelector, unblockSelector, true)) {\n return;\n }\n const el = target;\n if (el.classList.contains(ignoreClass) ||\n (ignoreSelector && el.matches(ignoreSelector))) {\n return;\n }\n const type = getInputType(target);\n let text = getInputValue(el, tagName, type);\n let isChecked = false;\n const isInputMasked = shouldMaskInput({\n maskInputOptions,\n tagName,\n type,\n });\n const forceMask = needMaskingText(target, maskTextClass, maskTextSelector, unmaskTextClass, unmaskTextSelector, isInputMasked);\n if (type === 'radio' || type === 'checkbox') {\n isChecked = target.checked;\n }\n text = maskInputValue({\n isMasked: forceMask,\n element: target,\n value: text,\n maskInputFn,\n });\n cbWithDedup(target, userTriggeredOnInput\n ? { text, isChecked, userTriggered }\n : { text, isChecked });\n const name = target.name;\n if (type === 'radio' && name && isChecked) {\n doc\n .querySelectorAll(`input[type=\"radio\"][name=\"${name}\"]`)\n .forEach((el) => {\n if (el !== target) {\n const text = maskInputValue({\n isMasked: forceMask,\n element: el,\n value: getInputValue(el, tagName, type),\n maskInputFn,\n });\n cbWithDedup(el, userTriggeredOnInput\n ? { text, isChecked: !isChecked, userTriggered: false }\n : { text, isChecked: !isChecked });\n }\n });\n }\n }\n function cbWithDedup(target, v) {\n const lastInputValue = lastInputValueMap.get(target);\n if (!lastInputValue ||\n lastInputValue.text !== v.text ||\n lastInputValue.isChecked !== v.isChecked) {\n lastInputValueMap.set(target, v);\n const id = mirror.getId(target);\n callbackWrapper(inputCb)({\n ...v,\n id,\n });\n }\n }\n const events = sampling.input === 'last' ? ['change'] : ['input', 'change'];\n const handlers = events.map((eventName) => on(eventName, callbackWrapper(eventHandler), doc));\n const currentWindow = doc.defaultView;\n if (!currentWindow) {\n return () => {\n handlers.forEach((h) => h());\n };\n }\n const propertyDescriptor = currentWindow.Object.getOwnPropertyDescriptor(currentWindow.HTMLInputElement.prototype, 'value');\n const hookProperties = [\n [currentWindow.HTMLInputElement.prototype, 'value'],\n [currentWindow.HTMLInputElement.prototype, 'checked'],\n [currentWindow.HTMLSelectElement.prototype, 'value'],\n [currentWindow.HTMLTextAreaElement.prototype, 'value'],\n [currentWindow.HTMLSelectElement.prototype, 'selectedIndex'],\n [currentWindow.HTMLOptionElement.prototype, 'selected'],\n ];\n if (propertyDescriptor && propertyDescriptor.set) {\n handlers.push(...hookProperties.map((p) => hookSetter(p[0], p[1], {\n set() {\n callbackWrapper(eventHandler)({\n target: this,\n isTrusted: false,\n });\n },\n }, false, currentWindow)));\n }\n return callbackWrapper(() => {\n handlers.forEach((h) => h());\n });\n}\nfunction getNestedCSSRulePositions(rule) {\n const positions = [];\n function recurse(childRule, pos) {\n if ((hasNestedCSSRule('CSSGroupingRule') &&\n childRule.parentRule instanceof CSSGroupingRule) ||\n (hasNestedCSSRule('CSSMediaRule') &&\n childRule.parentRule instanceof CSSMediaRule) ||\n (hasNestedCSSRule('CSSSupportsRule') &&\n childRule.parentRule instanceof CSSSupportsRule) ||\n (hasNestedCSSRule('CSSConditionRule') &&\n childRule.parentRule instanceof CSSConditionRule)) {\n const rules = Array.from(childRule.parentRule.cssRules);\n const index = rules.indexOf(childRule);\n pos.unshift(index);\n }\n else if (childRule.parentStyleSheet) {\n const rules = Array.from(childRule.parentStyleSheet.cssRules);\n const index = rules.indexOf(childRule);\n pos.unshift(index);\n }\n return pos;\n }\n return recurse(rule, positions);\n}\nfunction getIdAndStyleId(sheet, mirror, styleMirror) {\n let id, styleId;\n if (!sheet)\n return {};\n if (sheet.ownerNode)\n id = mirror.getId(sheet.ownerNode);\n else\n styleId = styleMirror.getId(sheet);\n return {\n styleId,\n id,\n };\n}\nfunction initStyleSheetObserver({ styleSheetRuleCb, mirror, stylesheetManager }, { win }) {\n if (!win.CSSStyleSheet || !win.CSSStyleSheet.prototype) {\n return () => {\n };\n }\n const insertRule = win.CSSStyleSheet.prototype.insertRule;\n win.CSSStyleSheet.prototype.insertRule = new Proxy(insertRule, {\n apply: callbackWrapper((target, thisArg, argumentsList) => {\n const [rule, index] = argumentsList;\n const { id, styleId } = getIdAndStyleId(thisArg, mirror, stylesheetManager.styleMirror);\n if ((id && id !== -1) || (styleId && styleId !== -1)) {\n styleSheetRuleCb({\n id,\n styleId,\n adds: [{ rule, index }],\n });\n }\n return target.apply(thisArg, argumentsList);\n }),\n });\n const deleteRule = win.CSSStyleSheet.prototype.deleteRule;\n win.CSSStyleSheet.prototype.deleteRule = new Proxy(deleteRule, {\n apply: callbackWrapper((target, thisArg, argumentsList) => {\n const [index] = argumentsList;\n const { id, styleId } = getIdAndStyleId(thisArg, mirror, stylesheetManager.styleMirror);\n if ((id && id !== -1) || (styleId && styleId !== -1)) {\n styleSheetRuleCb({\n id,\n styleId,\n removes: [{ index }],\n });\n }\n return target.apply(thisArg, argumentsList);\n }),\n });\n let replace;\n if (win.CSSStyleSheet.prototype.replace) {\n replace = win.CSSStyleSheet.prototype.replace;\n win.CSSStyleSheet.prototype.replace = new Proxy(replace, {\n apply: callbackWrapper((target, thisArg, argumentsList) => {\n const [text] = argumentsList;\n const { id, styleId } = getIdAndStyleId(thisArg, mirror, stylesheetManager.styleMirror);\n if ((id && id !== -1) || (styleId && styleId !== -1)) {\n styleSheetRuleCb({\n id,\n styleId,\n replace: text,\n });\n }\n return target.apply(thisArg, argumentsList);\n }),\n });\n }\n let replaceSync;\n if (win.CSSStyleSheet.prototype.replaceSync) {\n replaceSync = win.CSSStyleSheet.prototype.replaceSync;\n win.CSSStyleSheet.prototype.replaceSync = new Proxy(replaceSync, {\n apply: callbackWrapper((target, thisArg, argumentsList) => {\n const [text] = argumentsList;\n const { id, styleId } = getIdAndStyleId(thisArg, mirror, stylesheetManager.styleMirror);\n if ((id && id !== -1) || (styleId && styleId !== -1)) {\n styleSheetRuleCb({\n id,\n styleId,\n replaceSync: text,\n });\n }\n return target.apply(thisArg, argumentsList);\n }),\n });\n }\n const supportedNestedCSSRuleTypes = {};\n if (canMonkeyPatchNestedCSSRule('CSSGroupingRule')) {\n supportedNestedCSSRuleTypes.CSSGroupingRule = win.CSSGroupingRule;\n }\n else {\n if (canMonkeyPatchNestedCSSRule('CSSMediaRule')) {\n supportedNestedCSSRuleTypes.CSSMediaRule = win.CSSMediaRule;\n }\n if (canMonkeyPatchNestedCSSRule('CSSConditionRule')) {\n supportedNestedCSSRuleTypes.CSSConditionRule = win.CSSConditionRule;\n }\n if (canMonkeyPatchNestedCSSRule('CSSSupportsRule')) {\n supportedNestedCSSRuleTypes.CSSSupportsRule = win.CSSSupportsRule;\n }\n }\n const unmodifiedFunctions = {};\n Object.entries(supportedNestedCSSRuleTypes).forEach(([typeKey, type]) => {\n unmodifiedFunctions[typeKey] = {\n insertRule: type.prototype.insertRule,\n deleteRule: type.prototype.deleteRule,\n };\n type.prototype.insertRule = new Proxy(unmodifiedFunctions[typeKey].insertRule, {\n apply: callbackWrapper((target, thisArg, argumentsList) => {\n const [rule, index] = argumentsList;\n const { id, styleId } = getIdAndStyleId(thisArg.parentStyleSheet, mirror, stylesheetManager.styleMirror);\n if ((id && id !== -1) || (styleId && styleId !== -1)) {\n styleSheetRuleCb({\n id,\n styleId,\n adds: [\n {\n rule,\n index: [\n ...getNestedCSSRulePositions(thisArg),\n index || 0,\n ],\n },\n ],\n });\n }\n return target.apply(thisArg, argumentsList);\n }),\n });\n type.prototype.deleteRule = new Proxy(unmodifiedFunctions[typeKey].deleteRule, {\n apply: callbackWrapper((target, thisArg, argumentsList) => {\n const [index] = argumentsList;\n const { id, styleId } = getIdAndStyleId(thisArg.parentStyleSheet, mirror, stylesheetManager.styleMirror);\n if ((id && id !== -1) || (styleId && styleId !== -1)) {\n styleSheetRuleCb({\n id,\n styleId,\n removes: [\n { index: [...getNestedCSSRulePositions(thisArg), index] },\n ],\n });\n }\n return target.apply(thisArg, argumentsList);\n }),\n });\n });\n return callbackWrapper(() => {\n win.CSSStyleSheet.prototype.insertRule = insertRule;\n win.CSSStyleSheet.prototype.deleteRule = deleteRule;\n replace && (win.CSSStyleSheet.prototype.replace = replace);\n replaceSync && (win.CSSStyleSheet.prototype.replaceSync = replaceSync);\n Object.entries(supportedNestedCSSRuleTypes).forEach(([typeKey, type]) => {\n type.prototype.insertRule = unmodifiedFunctions[typeKey].insertRule;\n type.prototype.deleteRule = unmodifiedFunctions[typeKey].deleteRule;\n });\n });\n}\nfunction initAdoptedStyleSheetObserver({ mirror, stylesheetManager, }, host) {\n let hostId = null;\n if (host.nodeName === '#document')\n hostId = mirror.getId(host);\n else\n hostId = mirror.getId(host.host);\n const patchTarget = host.nodeName === '#document'\n ? _optionalChain$2([host, 'access', _4 => _4.defaultView, 'optionalAccess', _5 => _5.Document])\n : _optionalChain$2([host, 'access', _6 => _6.ownerDocument, 'optionalAccess', _7 => _7.defaultView, 'optionalAccess', _8 => _8.ShadowRoot]);\n const originalPropertyDescriptor = _optionalChain$2([patchTarget, 'optionalAccess', _9 => _9.prototype])\n ? Object.getOwnPropertyDescriptor(_optionalChain$2([patchTarget, 'optionalAccess', _10 => _10.prototype]), 'adoptedStyleSheets')\n : undefined;\n if (hostId === null ||\n hostId === -1 ||\n !patchTarget ||\n !originalPropertyDescriptor)\n return () => {\n };\n Object.defineProperty(host, 'adoptedStyleSheets', {\n configurable: originalPropertyDescriptor.configurable,\n enumerable: originalPropertyDescriptor.enumerable,\n get() {\n return _optionalChain$2([originalPropertyDescriptor, 'access', _11 => _11.get, 'optionalAccess', _12 => _12.call, 'call', _13 => _13(this)]);\n },\n set(sheets) {\n const result = _optionalChain$2([originalPropertyDescriptor, 'access', _14 => _14.set, 'optionalAccess', _15 => _15.call, 'call', _16 => _16(this, sheets)]);\n if (hostId !== null && hostId !== -1) {\n try {\n stylesheetManager.adoptStyleSheets(sheets, hostId);\n }\n catch (e) {\n }\n }\n return result;\n },\n });\n return callbackWrapper(() => {\n Object.defineProperty(host, 'adoptedStyleSheets', {\n configurable: originalPropertyDescriptor.configurable,\n enumerable: originalPropertyDescriptor.enumerable,\n get: originalPropertyDescriptor.get,\n set: originalPropertyDescriptor.set,\n });\n });\n}\nfunction initStyleDeclarationObserver({ styleDeclarationCb, mirror, ignoreCSSAttributes, stylesheetManager, }, { win }) {\n const setProperty = win.CSSStyleDeclaration.prototype.setProperty;\n win.CSSStyleDeclaration.prototype.setProperty = new Proxy(setProperty, {\n apply: callbackWrapper((target, thisArg, argumentsList) => {\n const [property, value, priority] = argumentsList;\n if (ignoreCSSAttributes.has(property)) {\n return setProperty.apply(thisArg, [property, value, priority]);\n }\n const { id, styleId } = getIdAndStyleId(_optionalChain$2([thisArg, 'access', _17 => _17.parentRule, 'optionalAccess', _18 => _18.parentStyleSheet]), mirror, stylesheetManager.styleMirror);\n if ((id && id !== -1) || (styleId && styleId !== -1)) {\n styleDeclarationCb({\n id,\n styleId,\n set: {\n property,\n value,\n priority,\n },\n index: getNestedCSSRulePositions(thisArg.parentRule),\n });\n }\n return target.apply(thisArg, argumentsList);\n }),\n });\n const removeProperty = win.CSSStyleDeclaration.prototype.removeProperty;\n win.CSSStyleDeclaration.prototype.removeProperty = new Proxy(removeProperty, {\n apply: callbackWrapper((target, thisArg, argumentsList) => {\n const [property] = argumentsList;\n if (ignoreCSSAttributes.has(property)) {\n return removeProperty.apply(thisArg, [property]);\n }\n const { id, styleId } = getIdAndStyleId(_optionalChain$2([thisArg, 'access', _19 => _19.parentRule, 'optionalAccess', _20 => _20.parentStyleSheet]), mirror, stylesheetManager.styleMirror);\n if ((id && id !== -1) || (styleId && styleId !== -1)) {\n styleDeclarationCb({\n id,\n styleId,\n remove: {\n property,\n },\n index: getNestedCSSRulePositions(thisArg.parentRule),\n });\n }\n return target.apply(thisArg, argumentsList);\n }),\n });\n return callbackWrapper(() => {\n win.CSSStyleDeclaration.prototype.setProperty = setProperty;\n win.CSSStyleDeclaration.prototype.removeProperty = removeProperty;\n });\n}\nfunction initMediaInteractionObserver({ mediaInteractionCb, blockClass, blockSelector, unblockSelector, mirror, sampling, doc, }) {\n const handler = callbackWrapper((type) => throttle$1(callbackWrapper((event) => {\n const target = getEventTarget(event);\n if (!target ||\n isBlocked(target, blockClass, blockSelector, unblockSelector, true)) {\n return;\n }\n const { currentTime, volume, muted, playbackRate } = target;\n mediaInteractionCb({\n type,\n id: mirror.getId(target),\n currentTime,\n volume,\n muted,\n playbackRate,\n });\n }), sampling.media || 500));\n const handlers = [\n on('play', handler(0), doc),\n on('pause', handler(1), doc),\n on('seeked', handler(2), doc),\n on('volumechange', handler(3), doc),\n on('ratechange', handler(4), doc),\n ];\n return callbackWrapper(() => {\n handlers.forEach((h) => h());\n });\n}\nfunction initFontObserver({ fontCb, doc }) {\n const win = doc.defaultView;\n if (!win) {\n return () => {\n };\n }\n const handlers = [];\n const fontMap = new WeakMap();\n const originalFontFace = win.FontFace;\n win.FontFace = function FontFace(family, source, descriptors) {\n const fontFace = new originalFontFace(family, source, descriptors);\n fontMap.set(fontFace, {\n family,\n buffer: typeof source !== 'string',\n descriptors,\n fontSource: typeof source === 'string'\n ? source\n : JSON.stringify(Array.from(new Uint8Array(source))),\n });\n return fontFace;\n };\n const restoreHandler = patch(doc.fonts, 'add', function (original) {\n return function (fontFace) {\n setTimeout$1(callbackWrapper(() => {\n const p = fontMap.get(fontFace);\n if (p) {\n fontCb(p);\n fontMap.delete(fontFace);\n }\n }), 0);\n return original.apply(this, [fontFace]);\n };\n });\n handlers.push(() => {\n win.FontFace = originalFontFace;\n });\n handlers.push(restoreHandler);\n return callbackWrapper(() => {\n handlers.forEach((h) => h());\n });\n}\nfunction initSelectionObserver(param) {\n const { doc, mirror, blockClass, blockSelector, unblockSelector, selectionCb, } = param;\n let collapsed = true;\n const updateSelection = callbackWrapper(() => {\n const selection = doc.getSelection();\n if (!selection || (collapsed && _optionalChain$2([selection, 'optionalAccess', _21 => _21.isCollapsed])))\n return;\n collapsed = selection.isCollapsed || false;\n const ranges = [];\n const count = selection.rangeCount || 0;\n for (let i = 0; i < count; i++) {\n const range = selection.getRangeAt(i);\n const { startContainer, startOffset, endContainer, endOffset } = range;\n const blocked = isBlocked(startContainer, blockClass, blockSelector, unblockSelector, true) ||\n isBlocked(endContainer, blockClass, blockSelector, unblockSelector, true);\n if (blocked)\n continue;\n ranges.push({\n start: mirror.getId(startContainer),\n startOffset,\n end: mirror.getId(endContainer),\n endOffset,\n });\n }\n selectionCb({ ranges });\n });\n updateSelection();\n return on('selectionchange', updateSelection);\n}\nfunction initCustomElementObserver({ doc, customElementCb, }) {\n const win = doc.defaultView;\n if (!win || !win.customElements)\n return () => { };\n const restoreHandler = patch(win.customElements, 'define', function (original) {\n return function (name, constructor, options) {\n try {\n customElementCb({\n define: {\n name,\n },\n });\n }\n catch (e) {\n }\n return original.apply(this, [name, constructor, options]);\n };\n });\n return restoreHandler;\n}\nfunction initObservers(o, _hooks = {}) {\n const currentWindow = o.doc.defaultView;\n if (!currentWindow) {\n return () => {\n };\n }\n let mutationObserver;\n if (o.recordDOM) {\n mutationObserver = initMutationObserver(o, o.doc);\n }\n const mousemoveHandler = initMoveObserver(o);\n const mouseInteractionHandler = initMouseInteractionObserver(o);\n const scrollHandler = initScrollObserver(o);\n const viewportResizeHandler = initViewportResizeObserver(o, {\n win: currentWindow,\n });\n const inputHandler = initInputObserver(o);\n const mediaInteractionHandler = initMediaInteractionObserver(o);\n let styleSheetObserver = () => { };\n let adoptedStyleSheetObserver = () => { };\n let styleDeclarationObserver = () => { };\n let fontObserver = () => { };\n if (o.recordDOM) {\n styleSheetObserver = initStyleSheetObserver(o, { win: currentWindow });\n adoptedStyleSheetObserver = initAdoptedStyleSheetObserver(o, o.doc);\n styleDeclarationObserver = initStyleDeclarationObserver(o, {\n win: currentWindow,\n });\n if (o.collectFonts) {\n fontObserver = initFontObserver(o);\n }\n }\n const selectionObserver = initSelectionObserver(o);\n const customElementObserver = initCustomElementObserver(o);\n const pluginHandlers = [];\n for (const plugin of o.plugins) {\n pluginHandlers.push(plugin.observer(plugin.callback, currentWindow, plugin.options));\n }\n return callbackWrapper(() => {\n mutationBuffers.forEach((b) => b.reset());\n _optionalChain$2([mutationObserver, 'optionalAccess', _22 => _22.disconnect, 'call', _23 => _23()]);\n mousemoveHandler();\n mouseInteractionHandler();\n scrollHandler();\n viewportResizeHandler();\n inputHandler();\n mediaInteractionHandler();\n styleSheetObserver();\n adoptedStyleSheetObserver();\n styleDeclarationObserver();\n fontObserver();\n selectionObserver();\n customElementObserver();\n pluginHandlers.forEach((h) => h());\n });\n}\nfunction hasNestedCSSRule(prop) {\n return typeof window[prop] !== 'undefined';\n}\nfunction canMonkeyPatchNestedCSSRule(prop) {\n return Boolean(typeof window[prop] !== 'undefined' &&\n window[prop].prototype &&\n 'insertRule' in window[prop].prototype &&\n 'deleteRule' in window[prop].prototype);\n}\n\nclass CrossOriginIframeMirror {\n constructor(generateIdFn) {\n this.generateIdFn = generateIdFn;\n this.iframeIdToRemoteIdMap = new WeakMap();\n this.iframeRemoteIdToIdMap = new WeakMap();\n }\n getId(iframe, remoteId, idToRemoteMap, remoteToIdMap) {\n const idToRemoteIdMap = idToRemoteMap || this.getIdToRemoteIdMap(iframe);\n const remoteIdToIdMap = remoteToIdMap || this.getRemoteIdToIdMap(iframe);\n let id = idToRemoteIdMap.get(remoteId);\n if (!id) {\n id = this.generateIdFn();\n idToRemoteIdMap.set(remoteId, id);\n remoteIdToIdMap.set(id, remoteId);\n }\n return id;\n }\n getIds(iframe, remoteId) {\n const idToRemoteIdMap = this.getIdToRemoteIdMap(iframe);\n const remoteIdToIdMap = this.getRemoteIdToIdMap(iframe);\n return remoteId.map((id) => this.getId(iframe, id, idToRemoteIdMap, remoteIdToIdMap));\n }\n getRemoteId(iframe, id, map) {\n const remoteIdToIdMap = map || this.getRemoteIdToIdMap(iframe);\n if (typeof id !== 'number')\n return id;\n const remoteId = remoteIdToIdMap.get(id);\n if (!remoteId)\n return -1;\n return remoteId;\n }\n getRemoteIds(iframe, ids) {\n const remoteIdToIdMap = this.getRemoteIdToIdMap(iframe);\n return ids.map((id) => this.getRemoteId(iframe, id, remoteIdToIdMap));\n }\n reset(iframe) {\n if (!iframe) {\n this.iframeIdToRemoteIdMap = new WeakMap();\n this.iframeRemoteIdToIdMap = new WeakMap();\n return;\n }\n this.iframeIdToRemoteIdMap.delete(iframe);\n this.iframeRemoteIdToIdMap.delete(iframe);\n }\n getIdToRemoteIdMap(iframe) {\n let idToRemoteIdMap = this.iframeIdToRemoteIdMap.get(iframe);\n if (!idToRemoteIdMap) {\n idToRemoteIdMap = new Map();\n this.iframeIdToRemoteIdMap.set(iframe, idToRemoteIdMap);\n }\n return idToRemoteIdMap;\n }\n getRemoteIdToIdMap(iframe) {\n let remoteIdToIdMap = this.iframeRemoteIdToIdMap.get(iframe);\n if (!remoteIdToIdMap) {\n remoteIdToIdMap = new Map();\n this.iframeRemoteIdToIdMap.set(iframe, remoteIdToIdMap);\n }\n return remoteIdToIdMap;\n }\n}\n\nfunction _optionalChain$1(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }\nclass IframeManagerNoop {\n constructor() {\n this.crossOriginIframeMirror = new CrossOriginIframeMirror(genId);\n this.crossOriginIframeRootIdMap = new WeakMap();\n }\n addIframe() {\n }\n addLoadListener() {\n }\n attachIframe() {\n }\n}\nclass IframeManager {\n constructor(options) {\n this.iframes = new WeakMap();\n this.crossOriginIframeMap = new WeakMap();\n this.crossOriginIframeMirror = new CrossOriginIframeMirror(genId);\n this.crossOriginIframeRootIdMap = new WeakMap();\n this.mutationCb = options.mutationCb;\n this.wrappedEmit = options.wrappedEmit;\n this.stylesheetManager = options.stylesheetManager;\n this.recordCrossOriginIframes = options.recordCrossOriginIframes;\n this.crossOriginIframeStyleMirror = new CrossOriginIframeMirror(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror));\n this.mirror = options.mirror;\n if (this.recordCrossOriginIframes) {\n window.addEventListener('message', this.handleMessage.bind(this));\n }\n }\n addIframe(iframeEl) {\n this.iframes.set(iframeEl, true);\n if (iframeEl.contentWindow)\n this.crossOriginIframeMap.set(iframeEl.contentWindow, iframeEl);\n }\n addLoadListener(cb) {\n this.loadListener = cb;\n }\n attachIframe(iframeEl, childSn) {\n this.mutationCb({\n adds: [\n {\n parentId: this.mirror.getId(iframeEl),\n nextId: null,\n node: childSn,\n },\n ],\n removes: [],\n texts: [],\n attributes: [],\n isAttachIframe: true,\n });\n _optionalChain$1([this, 'access', _ => _.loadListener, 'optionalCall', _2 => _2(iframeEl)]);\n const iframeDoc = getIFrameContentDocument(iframeEl);\n if (iframeDoc &&\n iframeDoc.adoptedStyleSheets &&\n iframeDoc.adoptedStyleSheets.length > 0)\n this.stylesheetManager.adoptStyleSheets(iframeDoc.adoptedStyleSheets, this.mirror.getId(iframeDoc));\n }\n handleMessage(message) {\n const crossOriginMessageEvent = message;\n if (crossOriginMessageEvent.data.type !== 'rrweb' ||\n crossOriginMessageEvent.origin !== crossOriginMessageEvent.data.origin)\n return;\n const iframeSourceWindow = message.source;\n if (!iframeSourceWindow)\n return;\n const iframeEl = this.crossOriginIframeMap.get(message.source);\n if (!iframeEl)\n return;\n const transformedEvent = this.transformCrossOriginEvent(iframeEl, crossOriginMessageEvent.data.event);\n if (transformedEvent)\n this.wrappedEmit(transformedEvent, crossOriginMessageEvent.data.isCheckout);\n }\n transformCrossOriginEvent(iframeEl, e) {\n switch (e.type) {\n case EventType.FullSnapshot: {\n this.crossOriginIframeMirror.reset(iframeEl);\n this.crossOriginIframeStyleMirror.reset(iframeEl);\n this.replaceIdOnNode(e.data.node, iframeEl);\n const rootId = e.data.node.id;\n this.crossOriginIframeRootIdMap.set(iframeEl, rootId);\n this.patchRootIdOnNode(e.data.node, rootId);\n return {\n timestamp: e.timestamp,\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.Mutation,\n adds: [\n {\n parentId: this.mirror.getId(iframeEl),\n nextId: null,\n node: e.data.node,\n },\n ],\n removes: [],\n texts: [],\n attributes: [],\n isAttachIframe: true,\n },\n };\n }\n case EventType.Meta:\n case EventType.Load:\n case EventType.DomContentLoaded: {\n return false;\n }\n case EventType.Plugin: {\n return e;\n }\n case EventType.Custom: {\n this.replaceIds(e.data.payload, iframeEl, ['id', 'parentId', 'previousId', 'nextId']);\n return e;\n }\n case EventType.IncrementalSnapshot: {\n switch (e.data.source) {\n case IncrementalSource.Mutation: {\n e.data.adds.forEach((n) => {\n this.replaceIds(n, iframeEl, [\n 'parentId',\n 'nextId',\n 'previousId',\n ]);\n this.replaceIdOnNode(n.node, iframeEl);\n const rootId = this.crossOriginIframeRootIdMap.get(iframeEl);\n rootId && this.patchRootIdOnNode(n.node, rootId);\n });\n e.data.removes.forEach((n) => {\n this.replaceIds(n, iframeEl, ['parentId', 'id']);\n });\n e.data.attributes.forEach((n) => {\n this.replaceIds(n, iframeEl, ['id']);\n });\n e.data.texts.forEach((n) => {\n this.replaceIds(n, iframeEl, ['id']);\n });\n return e;\n }\n case IncrementalSource.Drag:\n case IncrementalSource.TouchMove:\n case IncrementalSource.MouseMove: {\n e.data.positions.forEach((p) => {\n this.replaceIds(p, iframeEl, ['id']);\n });\n return e;\n }\n case IncrementalSource.ViewportResize: {\n return false;\n }\n case IncrementalSource.MediaInteraction:\n case IncrementalSource.MouseInteraction:\n case IncrementalSource.Scroll:\n case IncrementalSource.CanvasMutation:\n case IncrementalSource.Input: {\n this.replaceIds(e.data, iframeEl, ['id']);\n return e;\n }\n case IncrementalSource.StyleSheetRule:\n case IncrementalSource.StyleDeclaration: {\n this.replaceIds(e.data, iframeEl, ['id']);\n this.replaceStyleIds(e.data, iframeEl, ['styleId']);\n return e;\n }\n case IncrementalSource.Font: {\n return e;\n }\n case IncrementalSource.Selection: {\n e.data.ranges.forEach((range) => {\n this.replaceIds(range, iframeEl, ['start', 'end']);\n });\n return e;\n }\n case IncrementalSource.AdoptedStyleSheet: {\n this.replaceIds(e.data, iframeEl, ['id']);\n this.replaceStyleIds(e.data, iframeEl, ['styleIds']);\n _optionalChain$1([e, 'access', _3 => _3.data, 'access', _4 => _4.styles, 'optionalAccess', _5 => _5.forEach, 'call', _6 => _6((style) => {\n this.replaceStyleIds(style, iframeEl, ['styleId']);\n })]);\n return e;\n }\n }\n }\n }\n return false;\n }\n replace(iframeMirror, obj, iframeEl, keys) {\n for (const key of keys) {\n if (!Array.isArray(obj[key]) && typeof obj[key] !== 'number')\n continue;\n if (Array.isArray(obj[key])) {\n obj[key] = iframeMirror.getIds(iframeEl, obj[key]);\n }\n else {\n obj[key] = iframeMirror.getId(iframeEl, obj[key]);\n }\n }\n return obj;\n }\n replaceIds(obj, iframeEl, keys) {\n return this.replace(this.crossOriginIframeMirror, obj, iframeEl, keys);\n }\n replaceStyleIds(obj, iframeEl, keys) {\n return this.replace(this.crossOriginIframeStyleMirror, obj, iframeEl, keys);\n }\n replaceIdOnNode(node, iframeEl) {\n this.replaceIds(node, iframeEl, ['id', 'rootId']);\n if ('childNodes' in node) {\n node.childNodes.forEach((child) => {\n this.replaceIdOnNode(child, iframeEl);\n });\n }\n }\n patchRootIdOnNode(node, rootId) {\n if (node.type !== NodeType$3.Document && !node.rootId)\n node.rootId = rootId;\n if ('childNodes' in node) {\n node.childNodes.forEach((child) => {\n this.patchRootIdOnNode(child, rootId);\n });\n }\n }\n}\n\nclass ShadowDomManagerNoop {\n init() {\n }\n addShadowRoot() {\n }\n observeAttachShadow() {\n }\n reset() {\n }\n}\nclass ShadowDomManager {\n constructor(options) {\n this.shadowDoms = new WeakSet();\n this.restoreHandlers = [];\n this.mutationCb = options.mutationCb;\n this.scrollCb = options.scrollCb;\n this.bypassOptions = options.bypassOptions;\n this.mirror = options.mirror;\n this.init();\n }\n init() {\n this.reset();\n this.patchAttachShadow(Element, document);\n }\n addShadowRoot(shadowRoot, doc) {\n if (!isNativeShadowDom(shadowRoot))\n return;\n if (this.shadowDoms.has(shadowRoot))\n return;\n this.shadowDoms.add(shadowRoot);\n this.bypassOptions.canvasManager.addShadowRoot(shadowRoot);\n const observer = initMutationObserver({\n ...this.bypassOptions,\n doc,\n mutationCb: this.mutationCb,\n mirror: this.mirror,\n shadowDomManager: this,\n }, shadowRoot);\n this.restoreHandlers.push(() => observer.disconnect());\n this.restoreHandlers.push(initScrollObserver({\n ...this.bypassOptions,\n scrollCb: this.scrollCb,\n doc: shadowRoot,\n mirror: this.mirror,\n }));\n setTimeout$1(() => {\n if (shadowRoot.adoptedStyleSheets &&\n shadowRoot.adoptedStyleSheets.length > 0)\n this.bypassOptions.stylesheetManager.adoptStyleSheets(shadowRoot.adoptedStyleSheets, this.mirror.getId(shadowRoot.host));\n this.restoreHandlers.push(initAdoptedStyleSheetObserver({\n mirror: this.mirror,\n stylesheetManager: this.bypassOptions.stylesheetManager,\n }, shadowRoot));\n }, 0);\n }\n observeAttachShadow(iframeElement) {\n const iframeDoc = getIFrameContentDocument(iframeElement);\n const iframeWindow = getIFrameContentWindow(iframeElement);\n if (!iframeDoc || !iframeWindow)\n return;\n this.patchAttachShadow(iframeWindow.Element, iframeDoc);\n }\n patchAttachShadow(element, doc) {\n const manager = this;\n this.restoreHandlers.push(patch(element.prototype, 'attachShadow', function (original) {\n return function (option) {\n const shadowRoot = original.call(this, option);\n if (this.shadowRoot && inDom(this))\n manager.addShadowRoot(this.shadowRoot, doc);\n return shadowRoot;\n };\n }));\n }\n reset() {\n this.restoreHandlers.forEach((handler) => {\n try {\n handler();\n }\n catch (e) {\n }\n });\n this.restoreHandlers = [];\n this.shadowDoms = new WeakSet();\n this.bypassOptions.canvasManager.resetShadowRoots();\n }\n}\n\nclass CanvasManagerNoop {\n reset() {\n }\n freeze() {\n }\n unfreeze() {\n }\n lock() {\n }\n unlock() {\n }\n snapshot() {\n }\n addWindow() {\n }\n addShadowRoot() {\n }\n resetShadowRoots() {\n }\n}\n\nclass StylesheetManager {\n constructor(options) {\n this.trackedLinkElements = new WeakSet();\n this.styleMirror = new StyleSheetMirror();\n this.mutationCb = options.mutationCb;\n this.adoptedStyleSheetCb = options.adoptedStyleSheetCb;\n }\n attachLinkElement(linkEl, childSn) {\n if ('_cssText' in childSn.attributes)\n this.mutationCb({\n adds: [],\n removes: [],\n texts: [],\n attributes: [\n {\n id: childSn.id,\n attributes: childSn\n .attributes,\n },\n ],\n });\n this.trackLinkElement(linkEl);\n }\n trackLinkElement(linkEl) {\n if (this.trackedLinkElements.has(linkEl))\n return;\n this.trackedLinkElements.add(linkEl);\n this.trackStylesheetInLinkElement(linkEl);\n }\n adoptStyleSheets(sheets, hostId) {\n if (sheets.length === 0)\n return;\n const adoptedStyleSheetData = {\n id: hostId,\n styleIds: [],\n };\n const styles = [];\n for (const sheet of sheets) {\n let styleId;\n if (!this.styleMirror.has(sheet)) {\n styleId = this.styleMirror.add(sheet);\n styles.push({\n styleId,\n rules: Array.from(sheet.rules || CSSRule, (r, index) => ({\n rule: stringifyRule(r),\n index,\n })),\n });\n }\n else\n styleId = this.styleMirror.getId(sheet);\n adoptedStyleSheetData.styleIds.push(styleId);\n }\n if (styles.length > 0)\n adoptedStyleSheetData.styles = styles;\n this.adoptedStyleSheetCb(adoptedStyleSheetData);\n }\n reset() {\n this.styleMirror.reset();\n this.trackedLinkElements = new WeakSet();\n }\n trackStylesheetInLinkElement(linkEl) {\n }\n}\n\nclass ProcessedNodeManager {\n constructor() {\n this.nodeMap = new WeakMap();\n this.active = false;\n }\n inOtherBuffer(node, thisBuffer) {\n const buffers = this.nodeMap.get(node);\n return (buffers && Array.from(buffers).some((buffer) => buffer !== thisBuffer));\n }\n add(node, buffer) {\n if (!this.active) {\n this.active = true;\n onRequestAnimationFrame(() => {\n this.nodeMap = new WeakMap();\n this.active = false;\n });\n }\n this.nodeMap.set(node, (this.nodeMap.get(node) || new Set()).add(buffer));\n }\n destroy() {\n }\n}\n\nlet wrappedEmit;\nlet _takeFullSnapshot;\ntry {\n if (Array.from([1], (x) => x * 2)[0] !== 2) {\n const cleanFrame = document.createElement('iframe');\n document.body.appendChild(cleanFrame);\n Array.from = _optionalChain([cleanFrame, 'access', _ => _.contentWindow, 'optionalAccess', _2 => _2.Array, 'access', _3 => _3.from]) || Array.from;\n document.body.removeChild(cleanFrame);\n }\n}\ncatch (err) {\n console.debug('Unable to override Array.from', err);\n}\nconst mirror = createMirror();\nfunction record(options = {}) {\n const { emit, checkoutEveryNms, checkoutEveryNth, blockClass = 'rr-block', blockSelector = null, unblockSelector = null, ignoreClass = 'rr-ignore', ignoreSelector = null, maskAllText = false, maskTextClass = 'rr-mask', unmaskTextClass = null, maskTextSelector = null, unmaskTextSelector = null, inlineStylesheet = true, maskAllInputs, maskInputOptions: _maskInputOptions, slimDOMOptions: _slimDOMOptions, maskAttributeFn, maskInputFn, maskTextFn, maxCanvasSize = null, packFn, sampling = {}, dataURLOptions = {}, mousemoveWait, recordDOM = true, recordCanvas = false, recordCrossOriginIframes = false, recordAfter = options.recordAfter === 'DOMContentLoaded'\n ? options.recordAfter\n : 'load', userTriggeredOnInput = false, collectFonts = false, inlineImages = false, plugins, keepIframeSrcFn = () => false, ignoreCSSAttributes = new Set([]), errorHandler, onMutation, getCanvasManager, } = options;\n registerErrorHandler(errorHandler);\n const inEmittingFrame = recordCrossOriginIframes\n ? window.parent === window\n : true;\n let passEmitsToParent = false;\n if (!inEmittingFrame) {\n try {\n if (window.parent.document) {\n passEmitsToParent = false;\n }\n }\n catch (e) {\n passEmitsToParent = true;\n }\n }\n if (inEmittingFrame && !emit) {\n throw new Error('emit function is required');\n }\n if (!inEmittingFrame && !passEmitsToParent) {\n return () => {\n };\n }\n if (mousemoveWait !== undefined && sampling.mousemove === undefined) {\n sampling.mousemove = mousemoveWait;\n }\n mirror.reset();\n const maskInputOptions = maskAllInputs === true\n ? {\n color: true,\n date: true,\n 'datetime-local': true,\n email: true,\n month: true,\n number: true,\n range: true,\n search: true,\n tel: true,\n text: true,\n time: true,\n url: true,\n week: true,\n textarea: true,\n select: true,\n radio: true,\n checkbox: true,\n }\n : _maskInputOptions !== undefined\n ? _maskInputOptions\n : {};\n const slimDOMOptions = _slimDOMOptions === true || _slimDOMOptions === 'all'\n ? {\n script: true,\n comment: true,\n headFavicon: true,\n headWhitespace: true,\n headMetaSocial: true,\n headMetaRobots: true,\n headMetaHttpEquiv: true,\n headMetaVerification: true,\n headMetaAuthorship: _slimDOMOptions === 'all',\n headMetaDescKeywords: _slimDOMOptions === 'all',\n }\n : _slimDOMOptions\n ? _slimDOMOptions\n : {};\n polyfill();\n let lastFullSnapshotEvent;\n let incrementalSnapshotCount = 0;\n const eventProcessor = (e) => {\n for (const plugin of plugins || []) {\n if (plugin.eventProcessor) {\n e = plugin.eventProcessor(e);\n }\n }\n if (packFn &&\n !passEmitsToParent) {\n e = packFn(e);\n }\n return e;\n };\n wrappedEmit = (r, isCheckout) => {\n const e = r;\n e.timestamp = nowTimestamp();\n if (_optionalChain([mutationBuffers, 'access', _4 => _4[0], 'optionalAccess', _5 => _5.isFrozen, 'call', _6 => _6()]) &&\n e.type !== EventType.FullSnapshot &&\n !(e.type === EventType.IncrementalSnapshot &&\n e.data.source === IncrementalSource.Mutation)) {\n mutationBuffers.forEach((buf) => buf.unfreeze());\n }\n if (inEmittingFrame) {\n _optionalChain([emit, 'optionalCall', _7 => _7(eventProcessor(e), isCheckout)]);\n }\n else if (passEmitsToParent) {\n const message = {\n type: 'rrweb',\n event: eventProcessor(e),\n origin: window.location.origin,\n isCheckout,\n };\n window.parent.postMessage(message, '*');\n }\n if (e.type === EventType.FullSnapshot) {\n lastFullSnapshotEvent = e;\n incrementalSnapshotCount = 0;\n }\n else if (e.type === EventType.IncrementalSnapshot) {\n if (e.data.source === IncrementalSource.Mutation &&\n e.data.isAttachIframe) {\n return;\n }\n incrementalSnapshotCount++;\n const exceedCount = checkoutEveryNth && incrementalSnapshotCount >= checkoutEveryNth;\n const exceedTime = checkoutEveryNms &&\n lastFullSnapshotEvent &&\n e.timestamp - lastFullSnapshotEvent.timestamp > checkoutEveryNms;\n if (exceedCount || exceedTime) {\n takeFullSnapshot(true);\n }\n }\n };\n const wrappedMutationEmit = (m) => {\n wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.Mutation,\n ...m,\n },\n });\n };\n const wrappedScrollEmit = (p) => wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.Scroll,\n ...p,\n },\n });\n const wrappedCanvasMutationEmit = (p) => wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.CanvasMutation,\n ...p,\n },\n });\n const wrappedAdoptedStyleSheetEmit = (a) => wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.AdoptedStyleSheet,\n ...a,\n },\n });\n const stylesheetManager = new StylesheetManager({\n mutationCb: wrappedMutationEmit,\n adoptedStyleSheetCb: wrappedAdoptedStyleSheetEmit,\n });\n const iframeManager = typeof __RRWEB_EXCLUDE_IFRAME__ === 'boolean' && __RRWEB_EXCLUDE_IFRAME__\n ? new IframeManagerNoop()\n : new IframeManager({\n mirror,\n mutationCb: wrappedMutationEmit,\n stylesheetManager: stylesheetManager,\n recordCrossOriginIframes,\n wrappedEmit,\n });\n for (const plugin of plugins || []) {\n if (plugin.getMirror)\n plugin.getMirror({\n nodeMirror: mirror,\n crossOriginIframeMirror: iframeManager.crossOriginIframeMirror,\n crossOriginIframeStyleMirror: iframeManager.crossOriginIframeStyleMirror,\n });\n }\n const processedNodeManager = new ProcessedNodeManager();\n const canvasManager = _getCanvasManager(getCanvasManager, {\n mirror,\n win: window,\n mutationCb: (p) => wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.CanvasMutation,\n ...p,\n },\n }),\n recordCanvas,\n blockClass,\n blockSelector,\n unblockSelector,\n maxCanvasSize,\n sampling: sampling['canvas'],\n dataURLOptions,\n errorHandler,\n });\n const shadowDomManager = typeof __RRWEB_EXCLUDE_SHADOW_DOM__ === 'boolean' &&\n __RRWEB_EXCLUDE_SHADOW_DOM__\n ? new ShadowDomManagerNoop()\n : new ShadowDomManager({\n mutationCb: wrappedMutationEmit,\n scrollCb: wrappedScrollEmit,\n bypassOptions: {\n onMutation,\n blockClass,\n blockSelector,\n unblockSelector,\n maskAllText,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n inlineStylesheet,\n maskInputOptions,\n dataURLOptions,\n maskAttributeFn,\n maskTextFn,\n maskInputFn,\n recordCanvas,\n inlineImages,\n sampling,\n slimDOMOptions,\n iframeManager,\n stylesheetManager,\n canvasManager,\n keepIframeSrcFn,\n processedNodeManager,\n },\n mirror,\n });\n const takeFullSnapshot = (isCheckout = false) => {\n if (!recordDOM) {\n return;\n }\n wrappedEmit({\n type: EventType.Meta,\n data: {\n href: window.location.href,\n width: getWindowWidth(),\n height: getWindowHeight(),\n },\n }, isCheckout);\n stylesheetManager.reset();\n shadowDomManager.init();\n mutationBuffers.forEach((buf) => buf.lock());\n const node = snapshot(document, {\n mirror,\n blockClass,\n blockSelector,\n unblockSelector,\n maskAllText,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n inlineStylesheet,\n maskAllInputs: maskInputOptions,\n maskAttributeFn,\n maskInputFn,\n maskTextFn,\n slimDOM: slimDOMOptions,\n dataURLOptions,\n recordCanvas,\n inlineImages,\n onSerialize: (n) => {\n if (isSerializedIframe(n, mirror)) {\n iframeManager.addIframe(n);\n }\n if (isSerializedStylesheet(n, mirror)) {\n stylesheetManager.trackLinkElement(n);\n }\n if (hasShadowRoot(n)) {\n shadowDomManager.addShadowRoot(n.shadowRoot, document);\n }\n },\n onIframeLoad: (iframe, childSn) => {\n iframeManager.attachIframe(iframe, childSn);\n if (iframe.contentWindow) {\n canvasManager.addWindow(iframe.contentWindow);\n }\n shadowDomManager.observeAttachShadow(iframe);\n },\n onStylesheetLoad: (linkEl, childSn) => {\n stylesheetManager.attachLinkElement(linkEl, childSn);\n },\n keepIframeSrcFn,\n });\n if (!node) {\n return console.warn('Failed to snapshot the document');\n }\n wrappedEmit({\n type: EventType.FullSnapshot,\n data: {\n node,\n initialOffset: getWindowScroll(window),\n },\n });\n mutationBuffers.forEach((buf) => buf.unlock());\n if (document.adoptedStyleSheets && document.adoptedStyleSheets.length > 0)\n stylesheetManager.adoptStyleSheets(document.adoptedStyleSheets, mirror.getId(document));\n };\n _takeFullSnapshot = takeFullSnapshot;\n try {\n const handlers = [];\n const observe = (doc) => {\n return callbackWrapper(initObservers)({\n onMutation,\n mutationCb: wrappedMutationEmit,\n mousemoveCb: (positions, source) => wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source,\n positions,\n },\n }),\n mouseInteractionCb: (d) => wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.MouseInteraction,\n ...d,\n },\n }),\n scrollCb: wrappedScrollEmit,\n viewportResizeCb: (d) => wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.ViewportResize,\n ...d,\n },\n }),\n inputCb: (v) => wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.Input,\n ...v,\n },\n }),\n mediaInteractionCb: (p) => wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.MediaInteraction,\n ...p,\n },\n }),\n styleSheetRuleCb: (r) => wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.StyleSheetRule,\n ...r,\n },\n }),\n styleDeclarationCb: (r) => wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.StyleDeclaration,\n ...r,\n },\n }),\n canvasMutationCb: wrappedCanvasMutationEmit,\n fontCb: (p) => wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.Font,\n ...p,\n },\n }),\n selectionCb: (p) => {\n wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.Selection,\n ...p,\n },\n });\n },\n customElementCb: (c) => {\n wrappedEmit({\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.CustomElement,\n ...c,\n },\n });\n },\n blockClass,\n ignoreClass,\n ignoreSelector,\n maskAllText,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n maskInputOptions,\n inlineStylesheet,\n sampling,\n recordDOM,\n recordCanvas,\n inlineImages,\n userTriggeredOnInput,\n collectFonts,\n doc,\n maskAttributeFn,\n maskInputFn,\n maskTextFn,\n keepIframeSrcFn,\n blockSelector,\n unblockSelector,\n slimDOMOptions,\n dataURLOptions,\n mirror,\n iframeManager,\n stylesheetManager,\n shadowDomManager,\n processedNodeManager,\n canvasManager,\n ignoreCSSAttributes,\n plugins: _optionalChain([plugins\n, 'optionalAccess', _8 => _8.filter, 'call', _9 => _9((p) => p.observer)\n, 'optionalAccess', _10 => _10.map, 'call', _11 => _11((p) => ({\n observer: p.observer,\n options: p.options,\n callback: (payload) => wrappedEmit({\n type: EventType.Plugin,\n data: {\n plugin: p.name,\n payload,\n },\n }),\n }))]) || [],\n }, {});\n };\n iframeManager.addLoadListener((iframeEl) => {\n try {\n handlers.push(observe(iframeEl.contentDocument));\n }\n catch (error) {\n console.warn(error);\n }\n });\n const init = () => {\n takeFullSnapshot();\n handlers.push(observe(document));\n };\n if (document.readyState === 'interactive' ||\n document.readyState === 'complete') {\n init();\n }\n else {\n handlers.push(on('DOMContentLoaded', () => {\n wrappedEmit({\n type: EventType.DomContentLoaded,\n data: {},\n });\n if (recordAfter === 'DOMContentLoaded')\n init();\n }));\n handlers.push(on('load', () => {\n wrappedEmit({\n type: EventType.Load,\n data: {},\n });\n if (recordAfter === 'load')\n init();\n }, window));\n }\n return () => {\n handlers.forEach((h) => h());\n processedNodeManager.destroy();\n _takeFullSnapshot = undefined;\n unregisterErrorHandler();\n };\n }\n catch (error) {\n console.warn(error);\n }\n}\nfunction takeFullSnapshot(isCheckout) {\n if (!_takeFullSnapshot) {\n throw new Error('please take full snapshot after start recording');\n }\n _takeFullSnapshot(isCheckout);\n}\nrecord.mirror = mirror;\nrecord.takeFullSnapshot = takeFullSnapshot;\nfunction _getCanvasManager(getCanvasManagerFn, options) {\n try {\n return getCanvasManagerFn\n ? getCanvasManagerFn(options)\n : new CanvasManagerNoop();\n }\n catch (e2) {\n console.warn('Unable to initialize CanvasManager');\n return new CanvasManagerNoop();\n }\n}\n\nconst ReplayEventTypeIncrementalSnapshot = 3;\nconst ReplayEventTypeCustom = 5;\n\n/**\n * Converts a timestamp to ms, if it was in s, or keeps it as ms.\n */\nfunction timestampToMs(timestamp) {\n const isMs = timestamp > 9999999999;\n return isMs ? timestamp : timestamp * 1000;\n}\n\n/**\n * Converts a timestamp to s, if it was in ms, or keeps it as s.\n */\nfunction timestampToS(timestamp) {\n const isMs = timestamp > 9999999999;\n return isMs ? timestamp / 1000 : timestamp;\n}\n\n/**\n * Add a breadcrumb event to replay.\n */\nfunction addBreadcrumbEvent(replay, breadcrumb) {\n if (breadcrumb.category === 'sentry.transaction') {\n return;\n }\n\n if (['ui.click', 'ui.input'].includes(breadcrumb.category )) {\n replay.triggerUserActivity();\n } else {\n replay.checkAndHandleExpiredSession();\n }\n\n replay.addUpdate(() => {\n // This should never reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n replay.throttledAddEvent({\n type: EventType.Custom,\n // TODO: We were converting from ms to seconds for breadcrumbs, spans,\n // but maybe we should just keep them as milliseconds\n timestamp: (breadcrumb.timestamp || 0) * 1000,\n data: {\n tag: 'breadcrumb',\n // normalize to max. 10 depth and 1_000 properties per object\n payload: normalize(breadcrumb, 10, 1000),\n },\n });\n\n // Do not flush after console log messages\n return breadcrumb.category === 'console';\n });\n}\n\nconst INTERACTIVE_SELECTOR = 'button,a';\n\n/** Get the closest interactive parent element, or else return the given element. */\nfunction getClosestInteractive(element) {\n const closestInteractive = element.closest(INTERACTIVE_SELECTOR);\n return closestInteractive || element;\n}\n\n/**\n * For clicks, we check if the target is inside of a button or link\n * If so, we use this as the target instead\n * This is useful because if you click on the image in <button><img></button>,\n * The target will be the image, not the button, which we don't want here\n */\nfunction getClickTargetNode(event) {\n const target = getTargetNode(event);\n\n if (!target || !(target instanceof Element)) {\n return target;\n }\n\n return getClosestInteractive(target);\n}\n\n/** Get the event target node. */\nfunction getTargetNode(event) {\n if (isEventWithTarget(event)) {\n return event.target ;\n }\n\n return event;\n}\n\nfunction isEventWithTarget(event) {\n return typeof event === 'object' && !!event && 'target' in event;\n}\n\nlet handlers;\n\n/**\n * Register a handler to be called when `window.open()` is called.\n * Returns a cleanup function.\n */\nfunction onWindowOpen(cb) {\n // Ensure to only register this once\n if (!handlers) {\n handlers = [];\n monkeyPatchWindowOpen();\n }\n\n handlers.push(cb);\n\n return () => {\n const pos = handlers ? handlers.indexOf(cb) : -1;\n if (pos > -1) {\n (handlers ).splice(pos, 1);\n }\n };\n}\n\nfunction monkeyPatchWindowOpen() {\n fill(WINDOW, 'open', function (originalWindowOpen) {\n return function (...args) {\n if (handlers) {\n try {\n handlers.forEach(handler => handler());\n } catch (e) {\n // ignore errors in here\n }\n }\n\n return originalWindowOpen.apply(WINDOW, args);\n };\n });\n}\n\n/** Any IncrementalSource for rrweb that we interpret as a kind of mutation. */\nconst IncrementalMutationSources = new Set([\n IncrementalSource.Mutation,\n IncrementalSource.StyleSheetRule,\n IncrementalSource.StyleDeclaration,\n IncrementalSource.AdoptedStyleSheet,\n IncrementalSource.CanvasMutation,\n IncrementalSource.Selection,\n IncrementalSource.MediaInteraction,\n]);\n\n/** Handle a click. */\nfunction handleClick(clickDetector, clickBreadcrumb, node) {\n clickDetector.handleClick(clickBreadcrumb, node);\n}\n\n/** A click detector class that can be used to detect slow or rage clicks on elements. */\nclass ClickDetector {\n // protected for testing\n\n constructor(\n replay,\n slowClickConfig,\n // Just for easier testing\n _addBreadcrumbEvent = addBreadcrumbEvent,\n ) {\n this._lastMutation = 0;\n this._lastScroll = 0;\n this._clicks = [];\n\n // We want everything in s, but options are in ms\n this._timeout = slowClickConfig.timeout / 1000;\n this._threshold = slowClickConfig.threshold / 1000;\n this._scrollTimeout = slowClickConfig.scrollTimeout / 1000;\n this._replay = replay;\n this._ignoreSelector = slowClickConfig.ignoreSelector;\n this._addBreadcrumbEvent = _addBreadcrumbEvent;\n }\n\n /** Register click detection handlers on mutation or scroll. */\n addListeners() {\n const cleanupWindowOpen = onWindowOpen(() => {\n // Treat window.open as mutation\n this._lastMutation = nowInSeconds();\n });\n\n this._teardown = () => {\n cleanupWindowOpen();\n\n this._clicks = [];\n this._lastMutation = 0;\n this._lastScroll = 0;\n };\n }\n\n /** Clean up listeners. */\n removeListeners() {\n if (this._teardown) {\n this._teardown();\n }\n\n if (this._checkClickTimeout) {\n clearTimeout(this._checkClickTimeout);\n }\n }\n\n /** @inheritDoc */\n handleClick(breadcrumb, node) {\n if (ignoreElement(node, this._ignoreSelector) || !isClickBreadcrumb(breadcrumb)) {\n return;\n }\n\n const newClick = {\n timestamp: timestampToS(breadcrumb.timestamp),\n clickBreadcrumb: breadcrumb,\n // Set this to 0 so we know it originates from the click breadcrumb\n clickCount: 0,\n node,\n };\n\n // If there was a click in the last 1s on the same element, ignore it - only keep a single reference per second\n if (\n this._clicks.some(click => click.node === newClick.node && Math.abs(click.timestamp - newClick.timestamp) < 1)\n ) {\n return;\n }\n\n this._clicks.push(newClick);\n\n // If this is the first new click, set a timeout to check for multi clicks\n if (this._clicks.length === 1) {\n this._scheduleCheckClicks();\n }\n }\n\n /** @inheritDoc */\n registerMutation(timestamp = Date.now()) {\n this._lastMutation = timestampToS(timestamp);\n }\n\n /** @inheritDoc */\n registerScroll(timestamp = Date.now()) {\n this._lastScroll = timestampToS(timestamp);\n }\n\n /** @inheritDoc */\n registerClick(element) {\n const node = getClosestInteractive(element);\n this._handleMultiClick(node );\n }\n\n /** Count multiple clicks on elements. */\n _handleMultiClick(node) {\n this._getClicks(node).forEach(click => {\n click.clickCount++;\n });\n }\n\n /** Get all pending clicks for a given node. */\n _getClicks(node) {\n return this._clicks.filter(click => click.node === node);\n }\n\n /** Check the clicks that happened. */\n _checkClicks() {\n const timedOutClicks = [];\n\n const now = nowInSeconds();\n\n this._clicks.forEach(click => {\n if (!click.mutationAfter && this._lastMutation) {\n click.mutationAfter = click.timestamp <= this._lastMutation ? this._lastMutation - click.timestamp : undefined;\n }\n if (!click.scrollAfter && this._lastScroll) {\n click.scrollAfter = click.timestamp <= this._lastScroll ? this._lastScroll - click.timestamp : undefined;\n }\n\n // All of these are in seconds!\n if (click.timestamp + this._timeout <= now) {\n timedOutClicks.push(click);\n }\n });\n\n // Remove \"old\" clicks\n for (const click of timedOutClicks) {\n const pos = this._clicks.indexOf(click);\n\n if (pos > -1) {\n this._generateBreadcrumbs(click);\n this._clicks.splice(pos, 1);\n }\n }\n\n // Trigger new check, unless no clicks left\n if (this._clicks.length) {\n this._scheduleCheckClicks();\n }\n }\n\n /** Generate matching breadcrumb(s) for the click. */\n _generateBreadcrumbs(click) {\n const replay = this._replay;\n const hadScroll = click.scrollAfter && click.scrollAfter <= this._scrollTimeout;\n const hadMutation = click.mutationAfter && click.mutationAfter <= this._threshold;\n\n const isSlowClick = !hadScroll && !hadMutation;\n const { clickCount, clickBreadcrumb } = click;\n\n // Slow click\n if (isSlowClick) {\n // If `mutationAfter` is set, it means a mutation happened after the threshold, but before the timeout\n // If not, it means we just timed out without scroll & mutation\n const timeAfterClickMs = Math.min(click.mutationAfter || this._timeout, this._timeout) * 1000;\n const endReason = timeAfterClickMs < this._timeout * 1000 ? 'mutation' : 'timeout';\n\n const breadcrumb = {\n type: 'default',\n message: clickBreadcrumb.message,\n timestamp: clickBreadcrumb.timestamp,\n category: 'ui.slowClickDetected',\n data: {\n ...clickBreadcrumb.data,\n url: WINDOW.location.href,\n route: replay.getCurrentRoute(),\n timeAfterClickMs,\n endReason,\n // If clickCount === 0, it means multiClick was not correctly captured here\n // - we still want to send 1 in this case\n clickCount: clickCount || 1,\n },\n };\n\n this._addBreadcrumbEvent(replay, breadcrumb);\n return;\n }\n\n // Multi click\n if (clickCount > 1) {\n const breadcrumb = {\n type: 'default',\n message: clickBreadcrumb.message,\n timestamp: clickBreadcrumb.timestamp,\n category: 'ui.multiClick',\n data: {\n ...clickBreadcrumb.data,\n url: WINDOW.location.href,\n route: replay.getCurrentRoute(),\n clickCount,\n metric: true,\n },\n };\n\n this._addBreadcrumbEvent(replay, breadcrumb);\n }\n }\n\n /** Schedule to check current clicks. */\n _scheduleCheckClicks() {\n if (this._checkClickTimeout) {\n clearTimeout(this._checkClickTimeout);\n }\n\n this._checkClickTimeout = setTimeout$3(() => this._checkClicks(), 1000);\n }\n}\n\nconst SLOW_CLICK_TAGS = ['A', 'BUTTON', 'INPUT'];\n\n/** exported for tests only */\nfunction ignoreElement(node, ignoreSelector) {\n if (!SLOW_CLICK_TAGS.includes(node.tagName)) {\n return true;\n }\n\n // If <input> tag, we only want to consider input[type='submit'] & input[type='button']\n if (node.tagName === 'INPUT' && !['submit', 'button'].includes(node.getAttribute('type') || '')) {\n return true;\n }\n\n // If <a> tag, detect special variants that may not lead to an action\n // If target !== _self, we may open the link somewhere else, which would lead to no action\n // Also, when downloading a file, we may not leave the page, but still not trigger an action\n if (\n node.tagName === 'A' &&\n (node.hasAttribute('download') || (node.hasAttribute('target') && node.getAttribute('target') !== '_self'))\n ) {\n return true;\n }\n\n if (ignoreSelector && node.matches(ignoreSelector)) {\n return true;\n }\n\n return false;\n}\n\nfunction isClickBreadcrumb(breadcrumb) {\n return !!(breadcrumb.data && typeof breadcrumb.data.nodeId === 'number' && breadcrumb.timestamp);\n}\n\n// This is good enough for us, and is easier to test/mock than `timestampInSeconds`\nfunction nowInSeconds() {\n return Date.now() / 1000;\n}\n\n/** Update the click detector based on a recording event of rrweb. */\nfunction updateClickDetectorForRecordingEvent(clickDetector, event) {\n try {\n // note: We only consider incremental snapshots here\n // This means that any full snapshot is ignored for mutation detection - the reason is that we simply cannot know if a mutation happened here.\n // E.g. think that we are buffering, an error happens and we take a full snapshot because we switched to session mode -\n // in this scenario, we would not know if a dead click happened because of the error, which is a key dead click scenario.\n // Instead, by ignoring full snapshots, we have the risk that we generate a false positive\n // (if a mutation _did_ happen but was \"swallowed\" by the full snapshot)\n // But this should be more unlikely as we'd generally capture the incremental snapshot right away\n\n if (!isIncrementalEvent(event)) {\n return;\n }\n\n const { source } = event.data;\n if (IncrementalMutationSources.has(source)) {\n clickDetector.registerMutation(event.timestamp);\n }\n\n if (source === IncrementalSource.Scroll) {\n clickDetector.registerScroll(event.timestamp);\n }\n\n if (isIncrementalMouseInteraction(event)) {\n const { type, id } = event.data;\n const node = record.mirror.getNode(id);\n\n if (node instanceof HTMLElement && type === MouseInteractions.Click) {\n clickDetector.registerClick(node);\n }\n }\n } catch (e) {\n // ignore errors here, e.g. if accessing something that does not exist\n }\n}\n\nfunction isIncrementalEvent(event) {\n return event.type === ReplayEventTypeIncrementalSnapshot;\n}\n\nfunction isIncrementalMouseInteraction(\n event,\n) {\n return event.data.source === IncrementalSource.MouseInteraction;\n}\n\n/**\n * Create a breadcrumb for a replay.\n */\nfunction createBreadcrumb(\n breadcrumb,\n) {\n return {\n timestamp: Date.now() / 1000,\n type: 'default',\n ...breadcrumb,\n };\n}\n\nvar NodeType;\n(function (NodeType) {\n NodeType[NodeType[\"Document\"] = 0] = \"Document\";\n NodeType[NodeType[\"DocumentType\"] = 1] = \"DocumentType\";\n NodeType[NodeType[\"Element\"] = 2] = \"Element\";\n NodeType[NodeType[\"Text\"] = 3] = \"Text\";\n NodeType[NodeType[\"CDATA\"] = 4] = \"CDATA\";\n NodeType[NodeType[\"Comment\"] = 5] = \"Comment\";\n})(NodeType || (NodeType = {}));\n\n// Note that these are the serialized attributes and not attributes directly on\n// the DOM Node. Attributes we are interested in:\nconst ATTRIBUTES_TO_RECORD = new Set([\n 'id',\n 'class',\n 'aria-label',\n 'role',\n 'name',\n 'alt',\n 'title',\n 'data-test-id',\n 'data-testid',\n 'disabled',\n 'aria-disabled',\n 'data-sentry-component',\n]);\n\n/**\n * Inclusion list of attributes that we want to record from the DOM element\n */\nfunction getAttributesToRecord(attributes) {\n const obj = {};\n if (!attributes['data-sentry-component'] && attributes['data-sentry-element']) {\n attributes['data-sentry-component'] = attributes['data-sentry-element'];\n }\n for (const key in attributes) {\n if (ATTRIBUTES_TO_RECORD.has(key)) {\n let normalizedKey = key;\n\n if (key === 'data-testid' || key === 'data-test-id') {\n normalizedKey = 'testId';\n }\n\n obj[normalizedKey] = attributes[key];\n }\n }\n\n return obj;\n}\n\nconst handleDomListener = (\n replay,\n) => {\n return (handlerData) => {\n if (!replay.isEnabled()) {\n return;\n }\n\n const result = handleDom(handlerData);\n\n if (!result) {\n return;\n }\n\n const isClick = handlerData.name === 'click';\n const event = isClick ? (handlerData.event ) : undefined;\n // Ignore clicks if ctrl/alt/meta/shift keys are held down as they alter behavior of clicks (e.g. open in new tab)\n if (\n isClick &&\n replay.clickDetector &&\n event &&\n event.target &&\n !event.altKey &&\n !event.metaKey &&\n !event.ctrlKey &&\n !event.shiftKey\n ) {\n handleClick(\n replay.clickDetector,\n result ,\n getClickTargetNode(handlerData.event ) ,\n );\n }\n\n addBreadcrumbEvent(replay, result);\n };\n};\n\n/** Get the base DOM breadcrumb. */\nfunction getBaseDomBreadcrumb(target, message) {\n const nodeId = record.mirror.getId(target);\n const node = nodeId && record.mirror.getNode(nodeId);\n const meta = node && record.mirror.getMeta(node);\n const element = meta && isElement(meta) ? meta : null;\n\n return {\n message,\n data: element\n ? {\n nodeId,\n node: {\n id: nodeId,\n tagName: element.tagName,\n textContent: Array.from(element.childNodes)\n .map((node) => node.type === NodeType.Text && node.textContent)\n .filter(Boolean) // filter out empty values\n .map(text => (text ).trim())\n .join(''),\n attributes: getAttributesToRecord(element.attributes),\n },\n }\n : {},\n };\n}\n\n/**\n * An event handler to react to DOM events.\n * Exported for tests.\n */\nfunction handleDom(handlerData) {\n const { target, message } = getDomTarget(handlerData);\n\n return createBreadcrumb({\n category: `ui.${handlerData.name}`,\n ...getBaseDomBreadcrumb(target, message),\n });\n}\n\nfunction getDomTarget(handlerData) {\n const isClick = handlerData.name === 'click';\n\n let message;\n let target = null;\n\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n target = isClick ? getClickTargetNode(handlerData.event ) : getTargetNode(handlerData.event );\n message = htmlTreeAsString(target, { maxStringLength: 200 }) || '<unknown>';\n } catch (e) {\n message = '<unknown>';\n }\n\n return { target, message };\n}\n\nfunction isElement(node) {\n return node.type === NodeType.Element;\n}\n\n/** Handle keyboard events & create breadcrumbs. */\nfunction handleKeyboardEvent(replay, event) {\n if (!replay.isEnabled()) {\n return;\n }\n\n // Update user activity, but do not restart recording as it can create\n // noisy/low-value replays (e.g. user comes back from idle, hits alt-tab, new\n // session with a single \"keydown\" breadcrumb is created)\n replay.updateUserActivity();\n\n const breadcrumb = getKeyboardBreadcrumb(event);\n\n if (!breadcrumb) {\n return;\n }\n\n addBreadcrumbEvent(replay, breadcrumb);\n}\n\n/** exported only for tests */\nfunction getKeyboardBreadcrumb(event) {\n const { metaKey, shiftKey, ctrlKey, altKey, key, target } = event;\n\n // never capture for input fields\n if (!target || isInputElement(target ) || !key) {\n return null;\n }\n\n // Note: We do not consider shift here, as that means \"uppercase\"\n const hasModifierKey = metaKey || ctrlKey || altKey;\n const isCharacterKey = key.length === 1; // other keys like Escape, Tab, etc have a longer length\n\n // Do not capture breadcrumb if only a word key is pressed\n // This could leak e.g. user input\n if (!hasModifierKey && isCharacterKey) {\n return null;\n }\n\n const message = htmlTreeAsString(target, { maxStringLength: 200 }) || '<unknown>';\n const baseBreadcrumb = getBaseDomBreadcrumb(target , message);\n\n return createBreadcrumb({\n category: 'ui.keyDown',\n message,\n data: {\n ...baseBreadcrumb.data,\n metaKey,\n shiftKey,\n ctrlKey,\n altKey,\n key,\n },\n });\n}\n\nfunction isInputElement(target) {\n return target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable;\n}\n\n// Map entryType -> function to normalize data for event\nconst ENTRY_TYPES\n\n = {\n // @ts-expect-error TODO: entry type does not fit the create* functions entry type\n resource: createResourceEntry,\n paint: createPaintEntry,\n // @ts-expect-error TODO: entry type does not fit the create* functions entry type\n navigation: createNavigationEntry,\n};\n\n/**\n * Handler creater for web vitals\n */\nfunction webVitalHandler(\n getter,\n replay,\n) {\n return ({ metric }) => void replay.replayPerformanceEntries.push(getter(metric));\n}\n\n/**\n * Create replay performance entries from the browser performance entries.\n */\nfunction createPerformanceEntries(\n entries,\n) {\n return entries.map(createPerformanceEntry).filter(Boolean) ;\n}\n\nfunction createPerformanceEntry(entry) {\n const entryType = ENTRY_TYPES[entry.entryType];\n if (!entryType) {\n return null;\n }\n\n return entryType(entry);\n}\n\nfunction getAbsoluteTime(time) {\n // browserPerformanceTimeOrigin can be undefined if `performance` or\n // `performance.now` doesn't exist, but this is already checked by this integration\n return ((browserPerformanceTimeOrigin || WINDOW.performance.timeOrigin) + time) / 1000;\n}\n\nfunction createPaintEntry(entry) {\n const { duration, entryType, name, startTime } = entry;\n\n const start = getAbsoluteTime(startTime);\n return {\n type: entryType,\n name,\n start,\n end: start + duration,\n data: undefined,\n };\n}\n\nfunction createNavigationEntry(entry) {\n const {\n entryType,\n name,\n decodedBodySize,\n duration,\n domComplete,\n encodedBodySize,\n domContentLoadedEventStart,\n domContentLoadedEventEnd,\n domInteractive,\n loadEventStart,\n loadEventEnd,\n redirectCount,\n startTime,\n transferSize,\n type,\n } = entry;\n\n // Ignore entries with no duration, they do not seem to be useful and cause dupes\n if (duration === 0) {\n return null;\n }\n\n return {\n type: `${entryType}.${type}`,\n start: getAbsoluteTime(startTime),\n end: getAbsoluteTime(domComplete),\n name,\n data: {\n size: transferSize,\n decodedBodySize,\n encodedBodySize,\n duration,\n domInteractive,\n domContentLoadedEventStart,\n domContentLoadedEventEnd,\n loadEventStart,\n loadEventEnd,\n domComplete,\n redirectCount,\n },\n };\n}\n\nfunction createResourceEntry(\n entry,\n) {\n const {\n entryType,\n initiatorType,\n name,\n responseEnd,\n startTime,\n decodedBodySize,\n encodedBodySize,\n responseStatus,\n transferSize,\n } = entry;\n\n // Core SDK handles these\n if (['fetch', 'xmlhttprequest'].includes(initiatorType)) {\n return null;\n }\n\n return {\n type: `${entryType}.${initiatorType}`,\n start: getAbsoluteTime(startTime),\n end: getAbsoluteTime(responseEnd),\n name,\n data: {\n size: transferSize,\n statusCode: responseStatus,\n decodedBodySize,\n encodedBodySize,\n },\n };\n}\n\n/**\n * Add a LCP event to the replay based on a LCP metric.\n */\nfunction getLargestContentfulPaint(metric) {\n const lastEntry = metric.entries[metric.entries.length - 1] ;\n const node = lastEntry && lastEntry.element ? [lastEntry.element] : undefined;\n return getWebVital(metric, 'largest-contentful-paint', node);\n}\n\nfunction isLayoutShift(entry) {\n return (entry ).sources !== undefined;\n}\n\n/**\n * Add a CLS event to the replay based on a CLS metric.\n */\nfunction getCumulativeLayoutShift(metric) {\n const layoutShifts = [];\n const nodes = [];\n for (const entry of metric.entries) {\n if (isLayoutShift(entry)) {\n const nodeIds = [];\n for (const source of entry.sources) {\n if (source.node) {\n nodes.push(source.node);\n const nodeId = record.mirror.getId(source.node);\n if (nodeId) {\n nodeIds.push(nodeId);\n }\n }\n }\n layoutShifts.push({ value: entry.value, nodeIds: nodeIds.length ? nodeIds : undefined });\n }\n }\n\n return getWebVital(metric, 'cumulative-layout-shift', nodes, layoutShifts);\n}\n\n/**\n * Add a FID event to the replay based on a FID metric.\n */\nfunction getFirstInputDelay(metric) {\n const lastEntry = metric.entries[metric.entries.length - 1] ;\n const node = lastEntry && lastEntry.target ? [lastEntry.target] : undefined;\n return getWebVital(metric, 'first-input-delay', node);\n}\n\n/**\n * Add an INP event to the replay based on an INP metric.\n */\nfunction getInteractionToNextPaint(metric) {\n const lastEntry = metric.entries[metric.entries.length - 1] ;\n const node = lastEntry && lastEntry.target ? [lastEntry.target] : undefined;\n return getWebVital(metric, 'interaction-to-next-paint', node);\n}\n\n/**\n * Add an web vital event to the replay based on the web vital metric.\n */\nfunction getWebVital(\n metric,\n name,\n nodes,\n attributions,\n) {\n const value = metric.value;\n const rating = metric.rating;\n\n const end = getAbsoluteTime(value);\n\n return {\n type: 'web-vital',\n name,\n start: end,\n end,\n data: {\n value,\n size: value,\n rating,\n nodeIds: nodes ? nodes.map(node => record.mirror.getId(node)) : undefined,\n attributions,\n },\n };\n}\n\n/**\n * Sets up a PerformanceObserver to listen to all performance entry types.\n * Returns a callback to stop observing.\n */\nfunction setupPerformanceObserver(replay) {\n function addPerformanceEntry(entry) {\n // It is possible for entries to come up multiple times\n if (!replay.performanceEntries.includes(entry)) {\n replay.performanceEntries.push(entry);\n }\n }\n\n function onEntries({ entries }) {\n entries.forEach(addPerformanceEntry);\n }\n\n const clearCallbacks = [];\n\n (['navigation', 'paint', 'resource'] ).forEach(type => {\n clearCallbacks.push(addPerformanceInstrumentationHandler(type, onEntries));\n });\n\n clearCallbacks.push(\n addLcpInstrumentationHandler(webVitalHandler(getLargestContentfulPaint, replay)),\n addClsInstrumentationHandler(webVitalHandler(getCumulativeLayoutShift, replay)),\n addFidInstrumentationHandler(webVitalHandler(getFirstInputDelay, replay)),\n addInpInstrumentationHandler(webVitalHandler(getInteractionToNextPaint, replay)),\n );\n\n // A callback to cleanup all handlers\n return () => {\n clearCallbacks.forEach(clearCallback => clearCallback());\n };\n}\n\n/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nconst r = `var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,a=0,s=new n(r);a<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=[\"unexpected EOF\",\"invalid block type\",\"invalid length/literal\",\"invalid distance\",\"stream finished\",\"no stream handler\",,\"no callback\",\"invalid UTF-8 data\",\"extra field too long\",\"date not in range 1980-2099\",\"filename too long\",\"stream finishing\",\"invalid zip data\"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],a=0;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(d=o[a].s);var g=new n(d+1),w=A(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},U=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=x(f,15),M=b.t,E=b.l,A=x(h,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[a[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}},L=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=e+=r[s];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},O=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=C[s-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(a[t]^a[t+1]<<A^a[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!w)){p=U(a,g,0,F,I,S,O,q,G,j-G,p),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(a[j+Q]==a[j+Q-W]){for(var $=0;$<Z&&a[j+$]==a[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=a[j],++I[a[j]];p=U(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},j=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},q=function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&j(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}},B=function(t){return 10+(t.filename?t.filename.length+1:0)},G=function(){function n(n,r){if(\"function\"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(O(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(a),32768),this.s.z=n.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n}();var H=function(){function t(t,n){this.c=L(),this.v=1,G.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),G.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=O(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=L();i.p(n.dictionary),j(t,2,i.d())}}(r,this.o),this.v=0),n&&j(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),J=\"undefined\"!=typeof TextEncoder&&new TextEncoder,K=\"undefined\"!=typeof TextDecoder&&new TextDecoder;try{K.decode(F,{stream:!0})}catch(t){}var N=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(P(t),this.d=n||!1)},t}();function P(n,r){if(J)return J.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),a=0,s=function(t){i[a++]=t},o=0;o<e;++o){if(a+5>i.length){var f=new t(a+8+(e-o<<1));f.set(i),i=f}var h=n.charCodeAt(o);h<128||r?s(h):h<2048?(s(192|h>>6),s(128|63&h)):h>55295&&h<57344?(s(240|(h=65536+(1047552&h)|1023&n.charCodeAt(++o))>>18),s(128|h>>12&63),s(128|h>>6&63),s(128|63&h)):(s(224|h>>12),s(128|h>>6&63),s(128|63&h))}return b(i,0,a)}function Q(t){return function(t,n){n||(n={});var r=S(),e=t.length;r.p(t);var i=O(t,n,B(n),8),a=i.length;return q(i,n),j(i,a-8,r.d()),j(i,a-4,e),i}(P(t))}const R=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error(\"Adding invalid event\");const n=this._hasEvents?\",\":\"\";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push(\"]\",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new H,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new N(((t,n)=>{this.deflate.push(t,n)})),this.stream.push(\"[\")}},V={clear:()=>{R.clear()},addEvent:t=>R.addEvent(t),finish:()=>R.finish(),compress:t=>Q(t)};addEventListener(\"message\",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in V&&\"function\"==typeof V[n])try{const t=V[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:\"init\",success:!0,response:void 0});`;\n\nfunction e(){const e=new Blob([r]);return URL.createObjectURL(e)}\n\nconst CONSOLE_LEVELS = ['info', 'warn', 'error', 'log'] ;\nconst PREFIX = '[Replay] ';\n\nfunction _addBreadcrumb(message, level = 'info') {\n addBreadcrumb(\n {\n category: 'console',\n data: {\n logger: 'replay',\n },\n level,\n message: `${PREFIX}${message}`,\n },\n { level },\n );\n}\n\nfunction makeReplayLogger() {\n let _capture = false;\n let _trace = false;\n\n const _logger = {\n exception: () => undefined,\n infoTick: () => undefined,\n setConfig: (opts) => {\n _capture = opts.captureExceptions;\n _trace = opts.traceInternals;\n },\n };\n\n if (DEBUG_BUILD) {\n CONSOLE_LEVELS.forEach(name => {\n _logger[name] = (...args) => {\n logger$1[name](PREFIX, ...args);\n if (_trace) {\n _addBreadcrumb(args.join(''), severityLevelFromString(name));\n }\n };\n });\n\n _logger.exception = (error, ...message) => {\n if (message.length && _logger.error) {\n _logger.error(...message);\n }\n\n logger$1.error(PREFIX, error);\n\n if (_capture) {\n captureException(error);\n } else if (_trace) {\n // No need for a breadcrumb if `_capture` is enabled since it should be\n // captured as an exception\n _addBreadcrumb(error, 'error');\n }\n };\n\n _logger.infoTick = (...args) => {\n logger$1.info(PREFIX, ...args);\n if (_trace) {\n // Wait a tick here to avoid race conditions for some initial logs\n // which may be added before replay is initialized\n setTimeout(() => _addBreadcrumb(args[0]), 0);\n }\n };\n } else {\n CONSOLE_LEVELS.forEach(name => {\n _logger[name] = () => undefined;\n });\n }\n\n return _logger ;\n}\n\nconst logger = makeReplayLogger();\n\n/** This error indicates that the event buffer size exceeded the limit.. */\nclass EventBufferSizeExceededError extends Error {\n constructor() {\n super(`Event buffer exceeded maximum size of ${REPLAY_MAX_EVENT_BUFFER_SIZE}.`);\n }\n}\n\n/**\n * A basic event buffer that does not do any compression.\n * Used as fallback if the compression worker cannot be loaded or is disabled.\n */\nclass EventBufferArray {\n /** All the events that are buffered to be sent. */\n\n /** @inheritdoc */\n\n /** @inheritdoc */\n\n constructor() {\n this.events = [];\n this._totalSize = 0;\n this.hasCheckout = false;\n this.waitForCheckout = false;\n }\n\n /** @inheritdoc */\n get hasEvents() {\n return this.events.length > 0;\n }\n\n /** @inheritdoc */\n get type() {\n return 'sync';\n }\n\n /** @inheritdoc */\n destroy() {\n this.events = [];\n }\n\n /** @inheritdoc */\n async addEvent(event) {\n const eventSize = JSON.stringify(event).length;\n this._totalSize += eventSize;\n if (this._totalSize > REPLAY_MAX_EVENT_BUFFER_SIZE) {\n throw new EventBufferSizeExceededError();\n }\n\n this.events.push(event);\n }\n\n /** @inheritdoc */\n finish() {\n return new Promise(resolve => {\n // Make a copy of the events array reference and immediately clear the\n // events member so that we do not lose new events while uploading\n // attachment.\n const eventsRet = this.events;\n this.clear();\n resolve(JSON.stringify(eventsRet));\n });\n }\n\n /** @inheritdoc */\n clear() {\n this.events = [];\n this._totalSize = 0;\n this.hasCheckout = false;\n }\n\n /** @inheritdoc */\n getEarliestTimestamp() {\n const timestamp = this.events.map(event => event.timestamp).sort()[0];\n\n if (!timestamp) {\n return null;\n }\n\n return timestampToMs(timestamp);\n }\n}\n\n/**\n * Event buffer that uses a web worker to compress events.\n * Exported only for testing.\n */\nclass WorkerHandler {\n\n constructor(worker) {\n this._worker = worker;\n this._id = 0;\n }\n\n /**\n * Ensure the worker is ready (or not).\n * This will either resolve when the worker is ready, or reject if an error occurred.\n */\n ensureReady() {\n // Ensure we only check once\n if (this._ensureReadyPromise) {\n return this._ensureReadyPromise;\n }\n\n this._ensureReadyPromise = new Promise((resolve, reject) => {\n this._worker.addEventListener(\n 'message',\n ({ data }) => {\n if ((data ).success) {\n resolve();\n } else {\n reject();\n }\n },\n { once: true },\n );\n\n this._worker.addEventListener(\n 'error',\n error => {\n reject(error);\n },\n { once: true },\n );\n });\n\n return this._ensureReadyPromise;\n }\n\n /**\n * Destroy the worker.\n */\n destroy() {\n DEBUG_BUILD && logger.info('Destroying compression worker');\n this._worker.terminate();\n }\n\n /**\n * Post message to worker and wait for response before resolving promise.\n */\n postMessage(method, arg) {\n const id = this._getAndIncrementId();\n\n return new Promise((resolve, reject) => {\n const listener = ({ data }) => {\n const response = data ;\n if (response.method !== method) {\n return;\n }\n\n // There can be multiple listeners for a single method, the id ensures\n // that the response matches the caller.\n if (response.id !== id) {\n return;\n }\n\n // At this point, we'll always want to remove listener regardless of result status\n this._worker.removeEventListener('message', listener);\n\n if (!response.success) {\n // TODO: Do some error handling, not sure what\n DEBUG_BUILD && logger.error('Error in compression worker: ', response.response);\n\n reject(new Error('Error in compression worker'));\n return;\n }\n\n resolve(response.response );\n };\n\n // Note: we can't use `once` option because it's possible it needs to\n // listen to multiple messages\n this._worker.addEventListener('message', listener);\n this._worker.postMessage({ id, method, arg });\n });\n }\n\n /** Get the current ID and increment it for the next call. */\n _getAndIncrementId() {\n return this._id++;\n }\n}\n\n/**\n * Event buffer that uses a web worker to compress events.\n * Exported only for testing.\n */\nclass EventBufferCompressionWorker {\n /** @inheritdoc */\n\n /** @inheritdoc */\n\n constructor(worker) {\n this._worker = new WorkerHandler(worker);\n this._earliestTimestamp = null;\n this._totalSize = 0;\n this.hasCheckout = false;\n this.waitForCheckout = false;\n }\n\n /** @inheritdoc */\n get hasEvents() {\n return !!this._earliestTimestamp;\n }\n\n /** @inheritdoc */\n get type() {\n return 'worker';\n }\n\n /**\n * Ensure the worker is ready (or not).\n * This will either resolve when the worker is ready, or reject if an error occurred.\n */\n ensureReady() {\n return this._worker.ensureReady();\n }\n\n /**\n * Destroy the event buffer.\n */\n destroy() {\n this._worker.destroy();\n }\n\n /**\n * Add an event to the event buffer.\n *\n * Returns true if event was successfully received and processed by worker.\n */\n addEvent(event) {\n const timestamp = timestampToMs(event.timestamp);\n if (!this._earliestTimestamp || timestamp < this._earliestTimestamp) {\n this._earliestTimestamp = timestamp;\n }\n\n const data = JSON.stringify(event);\n this._totalSize += data.length;\n\n if (this._totalSize > REPLAY_MAX_EVENT_BUFFER_SIZE) {\n return Promise.reject(new EventBufferSizeExceededError());\n }\n\n return this._sendEventToWorker(data);\n }\n\n /**\n * Finish the event buffer and return the compressed data.\n */\n finish() {\n return this._finishRequest();\n }\n\n /** @inheritdoc */\n clear() {\n this._earliestTimestamp = null;\n this._totalSize = 0;\n this.hasCheckout = false;\n\n // We do not wait on this, as we assume the order of messages is consistent for the worker\n this._worker.postMessage('clear').then(null, e => {\n DEBUG_BUILD && logger.exception(e, 'Sending \"clear\" message to worker failed', e);\n });\n }\n\n /** @inheritdoc */\n getEarliestTimestamp() {\n return this._earliestTimestamp;\n }\n\n /**\n * Send the event to the worker.\n */\n _sendEventToWorker(data) {\n return this._worker.postMessage('addEvent', data);\n }\n\n /**\n * Finish the request and return the compressed data from the worker.\n */\n async _finishRequest() {\n const response = await this._worker.postMessage('finish');\n\n this._earliestTimestamp = null;\n this._totalSize = 0;\n\n return response;\n }\n}\n\n/**\n * This proxy will try to use the compression worker, and fall back to use the simple buffer if an error occurs there.\n * This can happen e.g. if the worker cannot be loaded.\n * Exported only for testing.\n */\nclass EventBufferProxy {\n\n constructor(worker) {\n this._fallback = new EventBufferArray();\n this._compression = new EventBufferCompressionWorker(worker);\n this._used = this._fallback;\n\n this._ensureWorkerIsLoadedPromise = this._ensureWorkerIsLoaded();\n }\n\n /** @inheritdoc */\n get waitForCheckout() {\n return this._used.waitForCheckout;\n }\n\n /** @inheritdoc */\n get type() {\n return this._used.type;\n }\n\n /** @inheritDoc */\n get hasEvents() {\n return this._used.hasEvents;\n }\n\n /** @inheritdoc */\n get hasCheckout() {\n return this._used.hasCheckout;\n }\n /** @inheritdoc */\n set hasCheckout(value) {\n this._used.hasCheckout = value;\n }\n\n /** @inheritdoc */\n // eslint-disable-next-line @typescript-eslint/adjacent-overload-signatures\n set waitForCheckout(value) {\n this._used.waitForCheckout = value;\n }\n\n /** @inheritDoc */\n destroy() {\n this._fallback.destroy();\n this._compression.destroy();\n }\n\n /** @inheritdoc */\n clear() {\n return this._used.clear();\n }\n\n /** @inheritdoc */\n getEarliestTimestamp() {\n return this._used.getEarliestTimestamp();\n }\n\n /**\n * Add an event to the event buffer.\n *\n * Returns true if event was successfully added.\n */\n addEvent(event) {\n return this._used.addEvent(event);\n }\n\n /** @inheritDoc */\n async finish() {\n // Ensure the worker is loaded, so the sent event is compressed\n await this.ensureWorkerIsLoaded();\n\n return this._used.finish();\n }\n\n /** Ensure the worker has loaded. */\n ensureWorkerIsLoaded() {\n return this._ensureWorkerIsLoadedPromise;\n }\n\n /** Actually check if the worker has been loaded. */\n async _ensureWorkerIsLoaded() {\n try {\n await this._compression.ensureReady();\n } catch (error) {\n // If the worker fails to load, we fall back to the simple buffer.\n // Nothing more to do from our side here\n DEBUG_BUILD && logger.exception(error, 'Failed to load the compression worker, falling back to simple buffer');\n return;\n }\n\n // Now we need to switch over the array buffer to the compression worker\n await this._switchToCompressionWorker();\n }\n\n /** Switch the used buffer to the compression worker. */\n async _switchToCompressionWorker() {\n const { events, hasCheckout, waitForCheckout } = this._fallback;\n\n const addEventPromises = [];\n for (const event of events) {\n addEventPromises.push(this._compression.addEvent(event));\n }\n\n this._compression.hasCheckout = hasCheckout;\n this._compression.waitForCheckout = waitForCheckout;\n\n // We switch over to the new buffer immediately - any further events will be added\n // after the previously buffered ones\n this._used = this._compression;\n\n // Wait for original events to be re-added before resolving\n try {\n await Promise.all(addEventPromises);\n\n // Can now clear fallback buffer as it's no longer necessary\n this._fallback.clear();\n } catch (error) {\n DEBUG_BUILD && logger.exception(error, 'Failed to add events when switching buffers.');\n }\n }\n}\n\n/**\n * Create an event buffer for replays.\n */\nfunction createEventBuffer({\n useCompression,\n workerUrl: customWorkerUrl,\n}) {\n if (\n useCompression &&\n // eslint-disable-next-line no-restricted-globals\n window.Worker\n ) {\n const worker = _loadWorker(customWorkerUrl);\n\n if (worker) {\n return worker;\n }\n }\n\n DEBUG_BUILD && logger.info('Using simple buffer');\n return new EventBufferArray();\n}\n\nfunction _loadWorker(customWorkerUrl) {\n try {\n const workerUrl = customWorkerUrl || _getWorkerUrl();\n\n if (!workerUrl) {\n return;\n }\n\n DEBUG_BUILD && logger.info(`Using compression worker${customWorkerUrl ? ` from ${customWorkerUrl}` : ''}`);\n const worker = new Worker(workerUrl);\n return new EventBufferProxy(worker);\n } catch (error) {\n DEBUG_BUILD && logger.exception(error, 'Failed to create compression worker');\n // Fall back to use simple event buffer array\n }\n}\n\nfunction _getWorkerUrl() {\n if (typeof __SENTRY_EXCLUDE_REPLAY_WORKER__ === 'undefined' || !__SENTRY_EXCLUDE_REPLAY_WORKER__) {\n return e();\n }\n\n return '';\n}\n\n/** If sessionStorage is available. */\nfunction hasSessionStorage() {\n try {\n // This can throw, e.g. when being accessed in a sandboxed iframe\n return 'sessionStorage' in WINDOW && !!WINDOW.sessionStorage;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Removes the session from Session Storage and unsets session in replay instance\n */\nfunction clearSession(replay) {\n deleteSession();\n replay.session = undefined;\n}\n\n/**\n * Deletes a session from storage\n */\nfunction deleteSession() {\n if (!hasSessionStorage()) {\n return;\n }\n\n try {\n WINDOW.sessionStorage.removeItem(REPLAY_SESSION_KEY);\n } catch (e) {\n // Ignore potential SecurityError exceptions\n }\n}\n\n/**\n * Given a sample rate, returns true if replay should be sampled.\n *\n * 1.0 = 100% sampling\n * 0.0 = 0% sampling\n */\nfunction isSampled(sampleRate) {\n if (sampleRate === undefined) {\n return false;\n }\n\n // Math.random() returns a number in range of 0 to 1 (inclusive of 0, but not 1)\n return Math.random() < sampleRate;\n}\n\n/**\n * Get a session with defaults & applied sampling.\n */\nfunction makeSession(session) {\n const now = Date.now();\n const id = session.id || uuid4();\n // Note that this means we cannot set a started/lastActivity of `0`, but this should not be relevant outside of tests.\n const started = session.started || now;\n const lastActivity = session.lastActivity || now;\n const segmentId = session.segmentId || 0;\n const sampled = session.sampled;\n const previousSessionId = session.previousSessionId;\n\n return {\n id,\n started,\n lastActivity,\n segmentId,\n sampled,\n previousSessionId,\n };\n}\n\n/**\n * Save a session to session storage.\n */\nfunction saveSession(session) {\n if (!hasSessionStorage()) {\n return;\n }\n\n try {\n WINDOW.sessionStorage.setItem(REPLAY_SESSION_KEY, JSON.stringify(session));\n } catch (e) {\n // Ignore potential SecurityError exceptions\n }\n}\n\n/**\n * Get the sampled status for a session based on sample rates & current sampled status.\n */\nfunction getSessionSampleType(sessionSampleRate, allowBuffering) {\n return isSampled(sessionSampleRate) ? 'session' : allowBuffering ? 'buffer' : false;\n}\n\n/**\n * Create a new session, which in its current implementation is a Sentry event\n * that all replays will be saved to as attachments. Currently, we only expect\n * one of these Sentry events per \"replay session\".\n */\nfunction createSession(\n { sessionSampleRate, allowBuffering, stickySession = false },\n { previousSessionId } = {},\n) {\n const sampled = getSessionSampleType(sessionSampleRate, allowBuffering);\n const session = makeSession({\n sampled,\n previousSessionId,\n });\n\n if (stickySession) {\n saveSession(session);\n }\n\n return session;\n}\n\n/**\n * Fetches a session from storage\n */\nfunction fetchSession() {\n if (!hasSessionStorage()) {\n return null;\n }\n\n try {\n // This can throw if cookies are disabled\n const sessionStringFromStorage = WINDOW.sessionStorage.getItem(REPLAY_SESSION_KEY);\n\n if (!sessionStringFromStorage) {\n return null;\n }\n\n const sessionObj = JSON.parse(sessionStringFromStorage) ;\n\n DEBUG_BUILD && logger.infoTick('Loading existing session');\n\n return makeSession(sessionObj);\n } catch (e) {\n return null;\n }\n}\n\n/**\n * Given an initial timestamp and an expiry duration, checks to see if current\n * time should be considered as expired.\n */\nfunction isExpired(\n initialTime,\n expiry,\n targetTime = +new Date(),\n) {\n // Always expired if < 0\n if (initialTime === null || expiry === undefined || expiry < 0) {\n return true;\n }\n\n // Never expires if == 0\n if (expiry === 0) {\n return false;\n }\n\n return initialTime + expiry <= targetTime;\n}\n\n/**\n * Checks to see if session is expired\n */\nfunction isSessionExpired(\n session,\n {\n maxReplayDuration,\n sessionIdleExpire,\n targetTime = Date.now(),\n },\n) {\n return (\n // First, check that maximum session length has not been exceeded\n isExpired(session.started, maxReplayDuration, targetTime) ||\n // check that the idle timeout has not been exceeded (i.e. user has\n // performed an action within the last `sessionIdleExpire` ms)\n isExpired(session.lastActivity, sessionIdleExpire, targetTime)\n );\n}\n\n/** If the session should be refreshed or not. */\nfunction shouldRefreshSession(\n session,\n { sessionIdleExpire, maxReplayDuration },\n) {\n // If not expired, all good, just keep the session\n if (!isSessionExpired(session, { sessionIdleExpire, maxReplayDuration })) {\n return false;\n }\n\n // If we are buffering & haven't ever flushed yet, always continue\n if (session.sampled === 'buffer' && session.segmentId === 0) {\n return false;\n }\n\n return true;\n}\n\n/**\n * Get or create a session, when initializing the replay.\n * Returns a session that may be unsampled.\n */\nfunction loadOrCreateSession(\n {\n sessionIdleExpire,\n maxReplayDuration,\n previousSessionId,\n }\n\n,\n sessionOptions,\n) {\n const existingSession = sessionOptions.stickySession && fetchSession();\n\n // No session exists yet, just create a new one\n if (!existingSession) {\n DEBUG_BUILD && logger.infoTick('Creating new session');\n return createSession(sessionOptions, { previousSessionId });\n }\n\n if (!shouldRefreshSession(existingSession, { sessionIdleExpire, maxReplayDuration })) {\n return existingSession;\n }\n\n DEBUG_BUILD && logger.infoTick('Session in sessionStorage is expired, creating new one...');\n return createSession(sessionOptions, { previousSessionId: existingSession.id });\n}\n\nfunction isCustomEvent(event) {\n return event.type === EventType.Custom;\n}\n\n/**\n * Add an event to the event buffer.\n * In contrast to `addEvent`, this does not return a promise & does not wait for the adding of the event to succeed/fail.\n * Instead this returns `true` if we tried to add the event, else false.\n * It returns `false` e.g. if we are paused, disabled, or out of the max replay duration.\n *\n * `isCheckout` is true if this is either the very first event, or an event triggered by `checkoutEveryNms`.\n */\nfunction addEventSync(replay, event, isCheckout) {\n if (!shouldAddEvent(replay, event)) {\n return false;\n }\n\n // This should never reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n _addEvent(replay, event, isCheckout);\n\n return true;\n}\n\n/**\n * Add an event to the event buffer.\n * Resolves to `null` if no event was added, else to `void`.\n *\n * `isCheckout` is true if this is either the very first event, or an event triggered by `checkoutEveryNms`.\n */\nfunction addEvent(\n replay,\n event,\n isCheckout,\n) {\n if (!shouldAddEvent(replay, event)) {\n return Promise.resolve(null);\n }\n\n return _addEvent(replay, event, isCheckout);\n}\n\nasync function _addEvent(\n replay,\n event,\n isCheckout,\n) {\n const { eventBuffer } = replay;\n\n if (!eventBuffer || (eventBuffer.waitForCheckout && !isCheckout)) {\n return null;\n }\n\n const isBufferMode = replay.recordingMode === 'buffer';\n\n try {\n if (isCheckout && isBufferMode) {\n eventBuffer.clear();\n }\n\n if (isCheckout) {\n eventBuffer.hasCheckout = true;\n eventBuffer.waitForCheckout = false;\n }\n\n const replayOptions = replay.getOptions();\n\n const eventAfterPossibleCallback = maybeApplyCallback(event, replayOptions.beforeAddRecordingEvent);\n\n if (!eventAfterPossibleCallback) {\n return;\n }\n\n return await eventBuffer.addEvent(eventAfterPossibleCallback);\n } catch (error) {\n const isExceeded = error && error instanceof EventBufferSizeExceededError;\n const reason = isExceeded ? 'addEventSizeExceeded' : 'addEvent';\n\n if (isExceeded && isBufferMode) {\n // Clear buffer and wait for next checkout\n eventBuffer.clear();\n eventBuffer.waitForCheckout = true;\n\n return null;\n }\n\n replay.handleException(error);\n\n await replay.stop({ reason });\n\n const client = getClient();\n\n if (client) {\n client.recordDroppedEvent('internal_sdk_error', 'replay');\n }\n }\n}\n\n/** Exported only for tests. */\nfunction shouldAddEvent(replay, event) {\n if (!replay.eventBuffer || replay.isPaused() || !replay.isEnabled()) {\n return false;\n }\n\n const timestampInMs = timestampToMs(event.timestamp);\n\n // Throw out events that happen more than 5 minutes ago. This can happen if\n // page has been left open and idle for a long period of time and user\n // comes back to trigger a new session. The performance entries rely on\n // `performance.timeOrigin`, which is when the page first opened.\n if (timestampInMs + replay.timeouts.sessionIdlePause < Date.now()) {\n return false;\n }\n\n // Throw out events that are +60min from the initial timestamp\n if (timestampInMs > replay.getContext().initialTimestamp + replay.getOptions().maxReplayDuration) {\n DEBUG_BUILD &&\n logger.infoTick(`Skipping event with timestamp ${timestampInMs} because it is after maxReplayDuration`);\n return false;\n }\n\n return true;\n}\n\nfunction maybeApplyCallback(\n event,\n callback,\n) {\n try {\n if (typeof callback === 'function' && isCustomEvent(event)) {\n return callback(event);\n }\n } catch (error) {\n DEBUG_BUILD &&\n logger.exception(error, 'An error occurred in the `beforeAddRecordingEvent` callback, skipping the event...');\n return null;\n }\n\n return event;\n}\n\n/** If the event is an error event */\nfunction isErrorEvent(event) {\n return !event.type;\n}\n\n/** If the event is a transaction event */\nfunction isTransactionEvent(event) {\n return event.type === 'transaction';\n}\n\n/** If the event is an replay event */\nfunction isReplayEvent(event) {\n return event.type === 'replay_event';\n}\n\n/** If the event is a feedback event */\nfunction isFeedbackEvent(event) {\n return event.type === 'feedback';\n}\n\n/**\n * Returns a listener to be added to `client.on('afterSendErrorEvent, listener)`.\n */\nfunction handleAfterSendEvent(replay) {\n return (event, sendResponse) => {\n if (!replay.isEnabled() || (!isErrorEvent(event) && !isTransactionEvent(event))) {\n return;\n }\n\n const statusCode = sendResponse && sendResponse.statusCode;\n\n // We only want to do stuff on successful error sending, otherwise you get error replays without errors attached\n // If not using the base transport, we allow `undefined` response (as a custom transport may not implement this correctly yet)\n // If we do use the base transport, we skip if we encountered an non-OK status code\n if (!statusCode || statusCode < 200 || statusCode >= 300) {\n return;\n }\n\n if (isTransactionEvent(event)) {\n handleTransactionEvent(replay, event);\n return;\n }\n\n handleErrorEvent(replay, event);\n };\n}\n\nfunction handleTransactionEvent(replay, event) {\n const replayContext = replay.getContext();\n\n // Collect traceIds in _context regardless of `recordingMode`\n // In error mode, _context gets cleared on every checkout\n // We limit to max. 100 transactions linked\n if (event.contexts && event.contexts.trace && event.contexts.trace.trace_id && replayContext.traceIds.size < 100) {\n replayContext.traceIds.add(event.contexts.trace.trace_id );\n }\n}\n\nfunction handleErrorEvent(replay, event) {\n const replayContext = replay.getContext();\n\n // Add error to list of errorIds of replay. This is ok to do even if not\n // sampled because context will get reset at next checkout.\n // XXX: There is also a race condition where it's possible to capture an\n // error to Sentry before Replay SDK has loaded, but response returns after\n // it was loaded, and this gets called.\n // We limit to max. 100 errors linked\n if (event.event_id && replayContext.errorIds.size < 100) {\n replayContext.errorIds.add(event.event_id);\n }\n\n // If error event is tagged with replay id it means it was sampled (when in buffer mode)\n // Need to be very careful that this does not cause an infinite loop\n if (replay.recordingMode !== 'buffer' || !event.tags || !event.tags.replayId) {\n return;\n }\n\n const { beforeErrorSampling } = replay.getOptions();\n if (typeof beforeErrorSampling === 'function' && !beforeErrorSampling(event)) {\n return;\n }\n\n setTimeout$3(async () => {\n try {\n // Capture current event buffer as new replay\n await replay.sendBufferedReplayOrFlush();\n } catch (err) {\n replay.handleException(err);\n }\n });\n}\n\n/**\n * Returns a listener to be added to `client.on('afterSendErrorEvent, listener)`.\n */\nfunction handleBeforeSendEvent(replay) {\n return (event) => {\n if (!replay.isEnabled() || !isErrorEvent(event)) {\n return;\n }\n\n handleHydrationError(replay, event);\n };\n}\n\nfunction handleHydrationError(replay, event) {\n const exceptionValue =\n event.exception && event.exception.values && event.exception.values[0] && event.exception.values[0].value;\n if (typeof exceptionValue !== 'string') {\n return;\n }\n\n if (\n // Only matches errors in production builds of react-dom\n // Example https://reactjs.org/docs/error-decoder.html?invariant=423\n // With newer React versions, the messages changed to a different website https://react.dev/errors/418\n exceptionValue.match(\n /(reactjs\\.org\\/docs\\/error-decoder\\.html\\?invariant=|react\\.dev\\/errors\\/)(418|419|422|423|425)/,\n ) ||\n // Development builds of react-dom\n // Error 1: Hydration failed because the initial UI does not match what was rendered on the server.\n // Error 2: Text content does not match server-rendered HTML. Warning: Text content did not match.\n exceptionValue.match(/(does not match server-rendered HTML|Hydration failed because)/i)\n ) {\n const breadcrumb = createBreadcrumb({\n category: 'replay.hydrate-error',\n data: {\n url: getLocationHref(),\n },\n });\n addBreadcrumbEvent(replay, breadcrumb);\n }\n}\n\n/**\n * Handle breadcrumbs that Sentry captures, and make sure to capture relevant breadcrumbs to Replay as well.\n */\nfunction handleBreadcrumbs(replay) {\n const client = getClient();\n\n if (!client) {\n return;\n }\n\n client.on('beforeAddBreadcrumb', breadcrumb => beforeAddBreadcrumb(replay, breadcrumb));\n}\n\nfunction beforeAddBreadcrumb(replay, breadcrumb) {\n if (!replay.isEnabled() || !isBreadcrumbWithCategory(breadcrumb)) {\n return;\n }\n\n const result = normalizeBreadcrumb(breadcrumb);\n if (result) {\n addBreadcrumbEvent(replay, result);\n }\n}\n\n/** Exported only for tests. */\nfunction normalizeBreadcrumb(breadcrumb) {\n if (\n !isBreadcrumbWithCategory(breadcrumb) ||\n [\n // fetch & xhr are handled separately,in handleNetworkBreadcrumbs\n 'fetch',\n 'xhr',\n // These two are breadcrumbs for emitted sentry events, we don't care about them\n 'sentry.event',\n 'sentry.transaction',\n ].includes(breadcrumb.category) ||\n // We capture UI breadcrumbs separately\n breadcrumb.category.startsWith('ui.')\n ) {\n return null;\n }\n\n if (breadcrumb.category === 'console') {\n return normalizeConsoleBreadcrumb(breadcrumb);\n }\n\n return createBreadcrumb(breadcrumb);\n}\n\n/** exported for tests only */\nfunction normalizeConsoleBreadcrumb(\n breadcrumb,\n) {\n const args = breadcrumb.data && breadcrumb.data.arguments;\n\n if (!Array.isArray(args) || args.length === 0) {\n return createBreadcrumb(breadcrumb);\n }\n\n let isTruncated = false;\n\n // Avoid giant args captures\n const normalizedArgs = args.map(arg => {\n if (!arg) {\n return arg;\n }\n if (typeof arg === 'string') {\n if (arg.length > CONSOLE_ARG_MAX_SIZE) {\n isTruncated = true;\n return `${arg.slice(0, CONSOLE_ARG_MAX_SIZE)}…`;\n }\n\n return arg;\n }\n if (typeof arg === 'object') {\n try {\n const normalizedArg = normalize(arg, 7);\n const stringified = JSON.stringify(normalizedArg);\n if (stringified.length > CONSOLE_ARG_MAX_SIZE) {\n isTruncated = true;\n // We use the pretty printed JSON string here as a base\n return `${JSON.stringify(normalizedArg, null, 2).slice(0, CONSOLE_ARG_MAX_SIZE)}…`;\n }\n return normalizedArg;\n } catch (e) {\n // fall back to default\n }\n }\n\n return arg;\n });\n\n return createBreadcrumb({\n ...breadcrumb,\n data: {\n ...breadcrumb.data,\n arguments: normalizedArgs,\n ...(isTruncated ? { _meta: { warnings: ['CONSOLE_ARG_TRUNCATED'] } } : {}),\n },\n });\n}\n\nfunction isBreadcrumbWithCategory(breadcrumb) {\n return !!breadcrumb.category;\n}\n\n/**\n * Returns true if we think the given event is an error originating inside of rrweb.\n */\nfunction isRrwebError(event, hint) {\n if (event.type || !event.exception || !event.exception.values || !event.exception.values.length) {\n return false;\n }\n\n // @ts-expect-error this may be set by rrweb when it finds errors\n if (hint.originalException && hint.originalException.__rrweb__) {\n return true;\n }\n\n return false;\n}\n\n/**\n * Reset the `replay_id` field on the DSC.\n */\nfunction resetReplayIdOnDynamicSamplingContext() {\n // Reset DSC on the current scope, if there is one\n const dsc = getCurrentScope().getPropagationContext().dsc;\n if (dsc) {\n delete dsc.replay_id;\n }\n\n // Clear it from frozen DSC on the active span\n const activeSpan = getActiveSpan();\n if (activeSpan) {\n const dsc = getDynamicSamplingContextFromSpan(activeSpan);\n delete (dsc ).replay_id;\n }\n}\n\n/**\n * Add a feedback breadcrumb event to replay.\n */\nfunction addFeedbackBreadcrumb(replay, event) {\n replay.triggerUserActivity();\n replay.addUpdate(() => {\n if (!event.timestamp) {\n // Ignore events that don't have timestamps (this shouldn't happen, more of a typing issue)\n // Return true here so that we don't flush\n return true;\n }\n\n // This should never reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n replay.throttledAddEvent({\n type: EventType.Custom,\n timestamp: event.timestamp * 1000,\n data: {\n tag: 'breadcrumb',\n payload: {\n timestamp: event.timestamp,\n type: 'default',\n category: 'sentry.feedback',\n data: {\n feedbackId: event.event_id,\n },\n },\n },\n } );\n\n return false;\n });\n}\n\n/**\n * Determine if event should be sampled (only applies in buffer mode).\n * When an event is captured by `handleGlobalEvent`, when in buffer mode\n * we determine if we want to sample the error or not.\n */\nfunction shouldSampleForBufferEvent(replay, event) {\n if (replay.recordingMode !== 'buffer') {\n return false;\n }\n\n // ignore this error because otherwise we could loop indefinitely with\n // trying to capture replay and failing\n if (event.message === UNABLE_TO_SEND_REPLAY) {\n return false;\n }\n\n // Require the event to be an error event & to have an exception\n if (!event.exception || event.type) {\n return false;\n }\n\n return isSampled(replay.getOptions().errorSampleRate);\n}\n\n/**\n * Returns a listener to be added to `addEventProcessor(listener)`.\n */\nfunction handleGlobalEventListener(replay) {\n return Object.assign(\n (event, hint) => {\n // Do nothing if replay has been disabled or paused\n if (!replay.isEnabled() || replay.isPaused()) {\n return event;\n }\n\n if (isReplayEvent(event)) {\n // Replays have separate set of breadcrumbs, do not include breadcrumbs\n // from core SDK\n delete event.breadcrumbs;\n return event;\n }\n\n // We only want to handle errors, transactions, and feedbacks, nothing else\n if (!isErrorEvent(event) && !isTransactionEvent(event) && !isFeedbackEvent(event)) {\n return event;\n }\n\n // Ensure we do not add replay_id if the session is expired\n const isSessionActive = replay.checkAndHandleExpiredSession();\n if (!isSessionActive) {\n // prevent exceeding replay durations by removing the expired replayId from the DSC\n resetReplayIdOnDynamicSamplingContext();\n return event;\n }\n\n if (isFeedbackEvent(event)) {\n // This should never reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n replay.flush();\n event.contexts.feedback.replay_id = replay.getSessionId();\n // Add a replay breadcrumb for this piece of feedback\n addFeedbackBreadcrumb(replay, event);\n return event;\n }\n\n // Unless `captureExceptions` is enabled, we want to ignore errors coming from rrweb\n // As there can be a bunch of stuff going wrong in internals there, that we don't want to bubble up to users\n if (isRrwebError(event, hint) && !replay.getOptions()._experiments.captureExceptions) {\n DEBUG_BUILD && logger.log('Ignoring error from rrweb internals', event);\n return null;\n }\n\n // When in buffer mode, we decide to sample here.\n // Later, in `handleAfterSendEvent`, if the replayId is set, we know that we sampled\n // And convert the buffer session to a full session\n const isErrorEventSampled = shouldSampleForBufferEvent(replay, event);\n\n // Tag errors if it has been sampled in buffer mode, or if it is session mode\n // Only tag transactions if in session mode\n const shouldTagReplayId = isErrorEventSampled || replay.recordingMode === 'session';\n\n if (shouldTagReplayId) {\n event.tags = { ...event.tags, replayId: replay.getSessionId() };\n }\n\n return event;\n },\n { id: 'Replay' },\n );\n}\n\n/**\n * Create a \"span\" for each performance entry.\n */\nfunction createPerformanceSpans(\n replay,\n entries,\n) {\n return entries.map(({ type, start, end, name, data }) => {\n const response = replay.throttledAddEvent({\n type: EventType.Custom,\n timestamp: start,\n data: {\n tag: 'performanceSpan',\n payload: {\n op: type,\n description: name,\n startTimestamp: start,\n endTimestamp: end,\n data,\n },\n },\n });\n\n // If response is a string, it means its either THROTTLED or SKIPPED\n return typeof response === 'string' ? Promise.resolve(null) : response;\n });\n}\n\nfunction handleHistory(handlerData) {\n const { from, to } = handlerData;\n\n const now = Date.now() / 1000;\n\n return {\n type: 'navigation.push',\n start: now,\n end: now,\n name: to,\n data: {\n previous: from,\n },\n };\n}\n\n/**\n * Returns a listener to be added to `addHistoryInstrumentationHandler(listener)`.\n */\nfunction handleHistorySpanListener(replay) {\n return (handlerData) => {\n if (!replay.isEnabled()) {\n return;\n }\n\n const result = handleHistory(handlerData);\n\n if (result === null) {\n return;\n }\n\n // Need to collect visited URLs\n replay.getContext().urls.push(result.name);\n replay.triggerUserActivity();\n\n replay.addUpdate(() => {\n createPerformanceSpans(replay, [result]);\n // Returning false to flush\n return false;\n });\n };\n}\n\n/**\n * Check whether a given request URL should be filtered out. This is so we\n * don't log Sentry ingest requests.\n */\nfunction shouldFilterRequest(replay, url) {\n // If we enabled the `traceInternals` experiment, we want to trace everything\n if (DEBUG_BUILD && replay.getOptions()._experiments.traceInternals) {\n return false;\n }\n\n return isSentryRequestUrl(url, getClient());\n}\n\n/** Add a performance entry breadcrumb */\nfunction addNetworkBreadcrumb(\n replay,\n result,\n) {\n if (!replay.isEnabled()) {\n return;\n }\n\n if (result === null) {\n return;\n }\n\n if (shouldFilterRequest(replay, result.name)) {\n return;\n }\n\n replay.addUpdate(() => {\n createPerformanceSpans(replay, [result]);\n // Returning true will cause `addUpdate` to not flush\n // We do not want network requests to cause a flush. This will prevent\n // recurring/polling requests from keeping the replay session alive.\n return true;\n });\n}\n\n/** Get the size of a body. */\nfunction getBodySize(body) {\n if (!body) {\n return undefined;\n }\n\n const textEncoder = new TextEncoder();\n\n try {\n if (typeof body === 'string') {\n return textEncoder.encode(body).length;\n }\n\n if (body instanceof URLSearchParams) {\n return textEncoder.encode(body.toString()).length;\n }\n\n if (body instanceof FormData) {\n const formDataStr = _serializeFormData(body);\n return textEncoder.encode(formDataStr).length;\n }\n\n if (body instanceof Blob) {\n return body.size;\n }\n\n if (body instanceof ArrayBuffer) {\n return body.byteLength;\n }\n\n // Currently unhandled types: ArrayBufferView, ReadableStream\n } catch (e) {\n // just return undefined\n }\n\n return undefined;\n}\n\n/** Convert a Content-Length header to number/undefined. */\nfunction parseContentLengthHeader(header) {\n if (!header) {\n return undefined;\n }\n\n const size = parseInt(header, 10);\n return isNaN(size) ? undefined : size;\n}\n\n/** Get the string representation of a body. */\nfunction getBodyString(body) {\n try {\n if (typeof body === 'string') {\n return [body];\n }\n\n if (body instanceof URLSearchParams) {\n return [body.toString()];\n }\n\n if (body instanceof FormData) {\n return [_serializeFormData(body)];\n }\n\n if (!body) {\n return [undefined];\n }\n } catch (error) {\n DEBUG_BUILD && logger.exception(error, 'Failed to serialize body', body);\n return [undefined, 'BODY_PARSE_ERROR'];\n }\n\n DEBUG_BUILD && logger.info('Skipping network body because of body type', body);\n\n return [undefined, 'UNPARSEABLE_BODY_TYPE'];\n}\n\n/** Merge a warning into an existing network request/response. */\nfunction mergeWarning(\n info,\n warning,\n) {\n if (!info) {\n return {\n headers: {},\n size: undefined,\n _meta: {\n warnings: [warning],\n },\n };\n }\n\n const newMeta = { ...info._meta };\n const existingWarnings = newMeta.warnings || [];\n newMeta.warnings = [...existingWarnings, warning];\n\n info._meta = newMeta;\n return info;\n}\n\n/** Convert ReplayNetworkRequestData to a PerformanceEntry. */\nfunction makeNetworkReplayBreadcrumb(\n type,\n data,\n) {\n if (!data) {\n return null;\n }\n\n const { startTimestamp, endTimestamp, url, method, statusCode, request, response } = data;\n\n const result = {\n type,\n start: startTimestamp / 1000,\n end: endTimestamp / 1000,\n name: url,\n data: dropUndefinedKeys({\n method,\n statusCode,\n request,\n response,\n }),\n };\n\n return result;\n}\n\n/** Build the request or response part of a replay network breadcrumb that was skipped. */\nfunction buildSkippedNetworkRequestOrResponse(bodySize) {\n return {\n headers: {},\n size: bodySize,\n _meta: {\n warnings: ['URL_SKIPPED'],\n },\n };\n}\n\n/** Build the request or response part of a replay network breadcrumb. */\nfunction buildNetworkRequestOrResponse(\n headers,\n bodySize,\n body,\n) {\n if (!bodySize && Object.keys(headers).length === 0) {\n return undefined;\n }\n\n if (!bodySize) {\n return {\n headers,\n };\n }\n\n if (!body) {\n return {\n headers,\n size: bodySize,\n };\n }\n\n const info = {\n headers,\n size: bodySize,\n };\n\n const { body: normalizedBody, warnings } = normalizeNetworkBody(body);\n info.body = normalizedBody;\n if (warnings && warnings.length > 0) {\n info._meta = {\n warnings,\n };\n }\n\n return info;\n}\n\n/** Filter a set of headers */\nfunction getAllowedHeaders(headers, allowedHeaders) {\n return Object.entries(headers).reduce((filteredHeaders, [key, value]) => {\n const normalizedKey = key.toLowerCase();\n // Avoid putting empty strings into the headers\n if (allowedHeaders.includes(normalizedKey) && headers[key]) {\n filteredHeaders[normalizedKey] = value;\n }\n return filteredHeaders;\n }, {});\n}\n\nfunction _serializeFormData(formData) {\n // This is a bit simplified, but gives us a decent estimate\n // This converts e.g. { name: 'Anne Smith', age: 13 } to 'name=Anne+Smith&age=13'\n // @ts-expect-error passing FormData to URLSearchParams actually works\n return new URLSearchParams(formData).toString();\n}\n\nfunction normalizeNetworkBody(body)\n\n {\n if (!body || typeof body !== 'string') {\n return {\n body,\n };\n }\n\n const exceedsSizeLimit = body.length > NETWORK_BODY_MAX_SIZE;\n const isProbablyJson = _strIsProbablyJson(body);\n\n if (exceedsSizeLimit) {\n const truncatedBody = body.slice(0, NETWORK_BODY_MAX_SIZE);\n\n if (isProbablyJson) {\n return {\n body: truncatedBody,\n warnings: ['MAYBE_JSON_TRUNCATED'],\n };\n }\n\n return {\n body: `${truncatedBody}…`,\n warnings: ['TEXT_TRUNCATED'],\n };\n }\n\n if (isProbablyJson) {\n try {\n const jsonBody = JSON.parse(body);\n return {\n body: jsonBody,\n };\n } catch (e2) {\n // fall back to just send the body as string\n }\n }\n\n return {\n body,\n };\n}\n\nfunction _strIsProbablyJson(str) {\n const first = str[0];\n const last = str[str.length - 1];\n\n // Simple check: If this does not start & end with {} or [], it's not JSON\n return (first === '[' && last === ']') || (first === '{' && last === '}');\n}\n\n/** Match an URL against a list of strings/Regex. */\nfunction urlMatches(url, urls) {\n const fullUrl = getFullUrl(url);\n\n return stringMatchesSomePattern(fullUrl, urls);\n}\n\n/** exported for tests */\nfunction getFullUrl(url, baseURI = WINDOW.document.baseURI) {\n // Short circuit for common cases:\n if (url.startsWith('http://') || url.startsWith('https://') || url.startsWith(WINDOW.location.origin)) {\n return url;\n }\n const fixedUrl = new URL(url, baseURI);\n\n // If these do not match, we are not dealing with a relative URL, so just return it\n if (fixedUrl.origin !== new URL(baseURI).origin) {\n return url;\n }\n\n const fullUrl = fixedUrl.href;\n\n // Remove trailing slashes, if they don't match the original URL\n if (!url.endsWith('/') && fullUrl.endsWith('/')) {\n return fullUrl.slice(0, -1);\n }\n\n return fullUrl;\n}\n\n/**\n * Capture a fetch breadcrumb to a replay.\n * This adds additional data (where appropriate).\n */\nasync function captureFetchBreadcrumbToReplay(\n breadcrumb,\n hint,\n options\n\n,\n) {\n try {\n const data = await _prepareFetchData(breadcrumb, hint, options);\n\n // Create a replay performance entry from this breadcrumb\n const result = makeNetworkReplayBreadcrumb('resource.fetch', data);\n addNetworkBreadcrumb(options.replay, result);\n } catch (error) {\n DEBUG_BUILD && logger.exception(error, 'Failed to capture fetch breadcrumb');\n }\n}\n\n/**\n * Enrich a breadcrumb with additional data.\n * This has to be sync & mutate the given breadcrumb,\n * as the breadcrumb is afterwards consumed by other handlers.\n */\nfunction enrichFetchBreadcrumb(\n breadcrumb,\n hint,\n) {\n const { input, response } = hint;\n\n const body = input ? _getFetchRequestArgBody(input) : undefined;\n const reqSize = getBodySize(body);\n\n const resSize = response ? parseContentLengthHeader(response.headers.get('content-length')) : undefined;\n\n if (reqSize !== undefined) {\n breadcrumb.data.request_body_size = reqSize;\n }\n if (resSize !== undefined) {\n breadcrumb.data.response_body_size = resSize;\n }\n}\n\nasync function _prepareFetchData(\n breadcrumb,\n hint,\n options,\n) {\n const now = Date.now();\n const { startTimestamp = now, endTimestamp = now } = hint;\n\n const {\n url,\n method,\n status_code: statusCode = 0,\n request_body_size: requestBodySize,\n response_body_size: responseBodySize,\n } = breadcrumb.data;\n\n const captureDetails =\n urlMatches(url, options.networkDetailAllowUrls) && !urlMatches(url, options.networkDetailDenyUrls);\n\n const request = captureDetails\n ? _getRequestInfo(options, hint.input, requestBodySize)\n : buildSkippedNetworkRequestOrResponse(requestBodySize);\n const response = await _getResponseInfo(captureDetails, options, hint.response, responseBodySize);\n\n return {\n startTimestamp,\n endTimestamp,\n url,\n method,\n statusCode,\n request,\n response,\n };\n}\n\nfunction _getRequestInfo(\n { networkCaptureBodies, networkRequestHeaders },\n input,\n requestBodySize,\n) {\n const headers = input ? getRequestHeaders(input, networkRequestHeaders) : {};\n\n if (!networkCaptureBodies) {\n return buildNetworkRequestOrResponse(headers, requestBodySize, undefined);\n }\n\n // We only want to transmit string or string-like bodies\n const requestBody = _getFetchRequestArgBody(input);\n const [bodyStr, warning] = getBodyString(requestBody);\n const data = buildNetworkRequestOrResponse(headers, requestBodySize, bodyStr);\n\n if (warning) {\n return mergeWarning(data, warning);\n }\n\n return data;\n}\n\n/** Exported only for tests. */\nasync function _getResponseInfo(\n captureDetails,\n {\n networkCaptureBodies,\n networkResponseHeaders,\n },\n response,\n responseBodySize,\n) {\n if (!captureDetails && responseBodySize !== undefined) {\n return buildSkippedNetworkRequestOrResponse(responseBodySize);\n }\n\n const headers = response ? getAllHeaders(response.headers, networkResponseHeaders) : {};\n\n if (!response || (!networkCaptureBodies && responseBodySize !== undefined)) {\n return buildNetworkRequestOrResponse(headers, responseBodySize, undefined);\n }\n\n const [bodyText, warning] = await _parseFetchResponseBody(response);\n const result = getResponseData(bodyText, {\n networkCaptureBodies,\n\n responseBodySize,\n captureDetails,\n headers,\n });\n\n if (warning) {\n return mergeWarning(result, warning);\n }\n\n return result;\n}\n\nfunction getResponseData(\n bodyText,\n {\n networkCaptureBodies,\n responseBodySize,\n captureDetails,\n headers,\n }\n\n,\n) {\n try {\n const size =\n bodyText && bodyText.length && responseBodySize === undefined ? getBodySize(bodyText) : responseBodySize;\n\n if (!captureDetails) {\n return buildSkippedNetworkRequestOrResponse(size);\n }\n\n if (networkCaptureBodies) {\n return buildNetworkRequestOrResponse(headers, size, bodyText);\n }\n\n return buildNetworkRequestOrResponse(headers, size, undefined);\n } catch (error) {\n DEBUG_BUILD && logger.exception(error, 'Failed to serialize response body');\n // fallback\n return buildNetworkRequestOrResponse(headers, responseBodySize, undefined);\n }\n}\n\nasync function _parseFetchResponseBody(response) {\n const res = _tryCloneResponse(response);\n\n if (!res) {\n return [undefined, 'BODY_PARSE_ERROR'];\n }\n\n try {\n const text = await _tryGetResponseText(res);\n return [text];\n } catch (error) {\n if (error instanceof Error && error.message.indexOf('Timeout') > -1) {\n DEBUG_BUILD && logger.warn('Parsing text body from response timed out');\n return [undefined, 'BODY_PARSE_TIMEOUT'];\n }\n\n DEBUG_BUILD && logger.exception(error, 'Failed to get text body from response');\n return [undefined, 'BODY_PARSE_ERROR'];\n }\n}\n\nfunction _getFetchRequestArgBody(fetchArgs = []) {\n // We only support getting the body from the fetch options\n if (fetchArgs.length !== 2 || typeof fetchArgs[1] !== 'object') {\n return undefined;\n }\n\n return (fetchArgs[1] ).body;\n}\n\nfunction getAllHeaders(headers, allowedHeaders) {\n const allHeaders = {};\n\n allowedHeaders.forEach(header => {\n if (headers.get(header)) {\n allHeaders[header] = headers.get(header) ;\n }\n });\n\n return allHeaders;\n}\n\nfunction getRequestHeaders(fetchArgs, allowedHeaders) {\n if (fetchArgs.length === 1 && typeof fetchArgs[0] !== 'string') {\n return getHeadersFromOptions(fetchArgs[0] , allowedHeaders);\n }\n\n if (fetchArgs.length === 2) {\n return getHeadersFromOptions(fetchArgs[1] , allowedHeaders);\n }\n\n return {};\n}\n\nfunction getHeadersFromOptions(\n input,\n allowedHeaders,\n) {\n if (!input) {\n return {};\n }\n\n const headers = input.headers;\n\n if (!headers) {\n return {};\n }\n\n if (headers instanceof Headers) {\n return getAllHeaders(headers, allowedHeaders);\n }\n\n // We do not support this, as it is not really documented (anymore?)\n if (Array.isArray(headers)) {\n return {};\n }\n\n return getAllowedHeaders(headers, allowedHeaders);\n}\n\nfunction _tryCloneResponse(response) {\n try {\n // We have to clone this, as the body can only be read once\n return response.clone();\n } catch (error) {\n // this can throw if the response was already consumed before\n DEBUG_BUILD && logger.exception(error, 'Failed to clone response body');\n }\n}\n\n/**\n * Get the response body of a fetch request, or timeout after 500ms.\n * Fetch can return a streaming body, that may not resolve (or not for a long time).\n * If that happens, we rather abort after a short time than keep waiting for this.\n */\nfunction _tryGetResponseText(response) {\n return new Promise((resolve, reject) => {\n const timeout = setTimeout$3(() => reject(new Error('Timeout while trying to read response body')), 500);\n\n _getResponseText(response)\n .then(\n txt => resolve(txt),\n reason => reject(reason),\n )\n .finally(() => clearTimeout(timeout));\n });\n}\n\nasync function _getResponseText(response) {\n // Force this to be a promise, just to be safe\n // eslint-disable-next-line no-return-await\n return await response.text();\n}\n\n/**\n * Capture an XHR breadcrumb to a replay.\n * This adds additional data (where appropriate).\n */\nasync function captureXhrBreadcrumbToReplay(\n breadcrumb,\n hint,\n options,\n) {\n try {\n const data = _prepareXhrData(breadcrumb, hint, options);\n\n // Create a replay performance entry from this breadcrumb\n const result = makeNetworkReplayBreadcrumb('resource.xhr', data);\n addNetworkBreadcrumb(options.replay, result);\n } catch (error) {\n DEBUG_BUILD && logger.exception(error, 'Failed to capture xhr breadcrumb');\n }\n}\n\n/**\n * Enrich a breadcrumb with additional data.\n * This has to be sync & mutate the given breadcrumb,\n * as the breadcrumb is afterwards consumed by other handlers.\n */\nfunction enrichXhrBreadcrumb(\n breadcrumb,\n hint,\n) {\n const { xhr, input } = hint;\n\n if (!xhr) {\n return;\n }\n\n const reqSize = getBodySize(input);\n const resSize = xhr.getResponseHeader('content-length')\n ? parseContentLengthHeader(xhr.getResponseHeader('content-length'))\n : _getBodySize(xhr.response, xhr.responseType);\n\n if (reqSize !== undefined) {\n breadcrumb.data.request_body_size = reqSize;\n }\n if (resSize !== undefined) {\n breadcrumb.data.response_body_size = resSize;\n }\n}\n\nfunction _prepareXhrData(\n breadcrumb,\n hint,\n options,\n) {\n const now = Date.now();\n const { startTimestamp = now, endTimestamp = now, input, xhr } = hint;\n\n const {\n url,\n method,\n status_code: statusCode = 0,\n request_body_size: requestBodySize,\n response_body_size: responseBodySize,\n } = breadcrumb.data;\n\n if (!url) {\n return null;\n }\n\n if (!xhr || !urlMatches(url, options.networkDetailAllowUrls) || urlMatches(url, options.networkDetailDenyUrls)) {\n const request = buildSkippedNetworkRequestOrResponse(requestBodySize);\n const response = buildSkippedNetworkRequestOrResponse(responseBodySize);\n return {\n startTimestamp,\n endTimestamp,\n url,\n method,\n statusCode,\n request,\n response,\n };\n }\n\n const xhrInfo = xhr[SENTRY_XHR_DATA_KEY];\n const networkRequestHeaders = xhrInfo\n ? getAllowedHeaders(xhrInfo.request_headers, options.networkRequestHeaders)\n : {};\n const networkResponseHeaders = getAllowedHeaders(getResponseHeaders(xhr), options.networkResponseHeaders);\n\n const [requestBody, requestWarning] = options.networkCaptureBodies ? getBodyString(input) : [undefined];\n const [responseBody, responseWarning] = options.networkCaptureBodies ? _getXhrResponseBody(xhr) : [undefined];\n\n const request = buildNetworkRequestOrResponse(networkRequestHeaders, requestBodySize, requestBody);\n const response = buildNetworkRequestOrResponse(networkResponseHeaders, responseBodySize, responseBody);\n\n return {\n startTimestamp,\n endTimestamp,\n url,\n method,\n statusCode,\n request: requestWarning ? mergeWarning(request, requestWarning) : request,\n response: responseWarning ? mergeWarning(response, responseWarning) : response,\n };\n}\n\nfunction getResponseHeaders(xhr) {\n const headers = xhr.getAllResponseHeaders();\n\n if (!headers) {\n return {};\n }\n\n return headers.split('\\r\\n').reduce((acc, line) => {\n const [key, value] = line.split(': ') ;\n if (value) {\n acc[key.toLowerCase()] = value;\n }\n return acc;\n }, {});\n}\n\nfunction _getXhrResponseBody(xhr) {\n // We collect errors that happen, but only log them if we can't get any response body\n const errors = [];\n\n try {\n return [xhr.responseText];\n } catch (e) {\n errors.push(e);\n }\n\n // Try to manually parse the response body, if responseText fails\n try {\n return _parseXhrResponse(xhr.response, xhr.responseType);\n } catch (e) {\n errors.push(e);\n }\n\n DEBUG_BUILD && logger.warn('Failed to get xhr response body', ...errors);\n\n return [undefined];\n}\n\n/**\n * Get the string representation of the XHR response.\n * Based on MDN, these are the possible types of the response:\n * string\n * ArrayBuffer\n * Blob\n * Document\n * POJO\n *\n * Exported only for tests.\n */\nfunction _parseXhrResponse(\n body,\n responseType,\n) {\n try {\n if (typeof body === 'string') {\n return [body];\n }\n\n if (body instanceof Document) {\n return [body.body.outerHTML];\n }\n\n if (responseType === 'json' && body && typeof body === 'object') {\n return [JSON.stringify(body)];\n }\n\n if (!body) {\n return [undefined];\n }\n } catch (error) {\n DEBUG_BUILD && logger.exception(error, 'Failed to serialize body', body);\n return [undefined, 'BODY_PARSE_ERROR'];\n }\n\n DEBUG_BUILD && logger.info('Skipping network body because of body type', body);\n\n return [undefined, 'UNPARSEABLE_BODY_TYPE'];\n}\n\nfunction _getBodySize(\n body,\n responseType,\n) {\n try {\n const bodyStr = responseType === 'json' && body && typeof body === 'object' ? JSON.stringify(body) : body;\n return getBodySize(bodyStr);\n } catch (e2) {\n return undefined;\n }\n}\n\n/**\n * This method does two things:\n * - It enriches the regular XHR/fetch breadcrumbs with request/response size data\n * - It captures the XHR/fetch breadcrumbs to the replay\n * (enriching it with further data that is _not_ added to the regular breadcrumbs)\n */\nfunction handleNetworkBreadcrumbs(replay) {\n const client = getClient();\n\n try {\n const {\n networkDetailAllowUrls,\n networkDetailDenyUrls,\n networkCaptureBodies,\n networkRequestHeaders,\n networkResponseHeaders,\n } = replay.getOptions();\n\n const options = {\n replay,\n networkDetailAllowUrls,\n networkDetailDenyUrls,\n networkCaptureBodies,\n networkRequestHeaders,\n networkResponseHeaders,\n };\n\n if (client) {\n client.on('beforeAddBreadcrumb', (breadcrumb, hint) => beforeAddNetworkBreadcrumb(options, breadcrumb, hint));\n }\n } catch (e2) {\n // Do nothing\n }\n}\n\n/** just exported for tests */\nfunction beforeAddNetworkBreadcrumb(\n options,\n breadcrumb,\n hint,\n) {\n if (!breadcrumb.data) {\n return;\n }\n\n try {\n if (_isXhrBreadcrumb(breadcrumb) && _isXhrHint(hint)) {\n // This has to be sync, as we need to ensure the breadcrumb is enriched in the same tick\n // Because the hook runs synchronously, and the breadcrumb is afterwards passed on\n // So any async mutations to it will not be reflected in the final breadcrumb\n enrichXhrBreadcrumb(breadcrumb, hint);\n\n // This call should not reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n captureXhrBreadcrumbToReplay(breadcrumb, hint, options);\n }\n\n if (_isFetchBreadcrumb(breadcrumb) && _isFetchHint(hint)) {\n // This has to be sync, as we need to ensure the breadcrumb is enriched in the same tick\n // Because the hook runs synchronously, and the breadcrumb is afterwards passed on\n // So any async mutations to it will not be reflected in the final breadcrumb\n enrichFetchBreadcrumb(breadcrumb, hint);\n\n // This call should not reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n captureFetchBreadcrumbToReplay(breadcrumb, hint, options);\n }\n } catch (e) {\n DEBUG_BUILD && logger.exception(e, 'Error when enriching network breadcrumb');\n }\n}\n\nfunction _isXhrBreadcrumb(breadcrumb) {\n return breadcrumb.category === 'xhr';\n}\n\nfunction _isFetchBreadcrumb(breadcrumb) {\n return breadcrumb.category === 'fetch';\n}\n\nfunction _isXhrHint(hint) {\n return hint && hint.xhr;\n}\n\nfunction _isFetchHint(hint) {\n return hint && hint.response;\n}\n\n/**\n * Add global listeners that cannot be removed.\n */\nfunction addGlobalListeners(replay) {\n // Listeners from core SDK //\n const client = getClient();\n\n addClickKeypressInstrumentationHandler(handleDomListener(replay));\n addHistoryInstrumentationHandler(handleHistorySpanListener(replay));\n handleBreadcrumbs(replay);\n handleNetworkBreadcrumbs(replay);\n\n // Tag all (non replay) events that get sent to Sentry with the current\n // replay ID so that we can reference them later in the UI\n const eventProcessor = handleGlobalEventListener(replay);\n addEventProcessor(eventProcessor);\n\n // If a custom client has no hooks yet, we continue to use the \"old\" implementation\n if (client) {\n client.on('beforeSendEvent', handleBeforeSendEvent(replay));\n client.on('afterSendEvent', handleAfterSendEvent(replay));\n client.on('createDsc', (dsc) => {\n const replayId = replay.getSessionId();\n // We do not want to set the DSC when in buffer mode, as that means the replay has not been sent (yet)\n if (replayId && replay.isEnabled() && replay.recordingMode === 'session') {\n // Ensure to check that the session is still active - it could have expired in the meanwhile\n const isSessionActive = replay.checkAndHandleExpiredSession();\n if (isSessionActive) {\n dsc.replay_id = replayId;\n }\n }\n });\n\n client.on('spanStart', span => {\n replay.lastActiveSpan = span;\n });\n\n // We may be missing the initial spanStart due to timing issues,\n // so we capture it on finish again.\n client.on('spanEnd', span => {\n replay.lastActiveSpan = span;\n });\n\n // We want to flush replay\n client.on('beforeSendFeedback', (feedbackEvent, options) => {\n const replayId = replay.getSessionId();\n if (options && options.includeReplay && replay.isEnabled() && replayId) {\n // This should never reject\n if (feedbackEvent.contexts && feedbackEvent.contexts.feedback) {\n feedbackEvent.contexts.feedback.replay_id = replayId;\n }\n }\n });\n }\n}\n\n/**\n * Create a \"span\" for the total amount of memory being used by JS objects\n * (including v8 internal objects).\n */\nasync function addMemoryEntry(replay) {\n // window.performance.memory is a non-standard API and doesn't work on all browsers, so we try-catch this\n try {\n return Promise.all(\n createPerformanceSpans(replay, [\n // @ts-expect-error memory doesn't exist on type Performance as the API is non-standard (we check that it exists above)\n createMemoryEntry(WINDOW.performance.memory),\n ]),\n );\n } catch (error) {\n // Do nothing\n return [];\n }\n}\n\nfunction createMemoryEntry(memoryEntry) {\n const { jsHeapSizeLimit, totalJSHeapSize, usedJSHeapSize } = memoryEntry;\n // we don't want to use `getAbsoluteTime` because it adds the event time to the\n // time origin, so we get the current timestamp instead\n const time = Date.now() / 1000;\n return {\n type: 'memory',\n name: 'memory',\n start: time,\n end: time,\n data: {\n memory: {\n jsHeapSizeLimit,\n totalJSHeapSize,\n usedJSHeapSize,\n },\n },\n };\n}\n\n/**\n * Heavily simplified debounce function based on lodash.debounce.\n *\n * This function takes a callback function (@param fun) and delays its invocation\n * by @param wait milliseconds. Optionally, a maxWait can be specified in @param options,\n * which ensures that the callback is invoked at least once after the specified max. wait time.\n *\n * @param func the function whose invocation is to be debounced\n * @param wait the minimum time until the function is invoked after it was called once\n * @param options the options object, which can contain the `maxWait` property\n *\n * @returns the debounced version of the function, which needs to be called at least once to start the\n * debouncing process. Subsequent calls will reset the debouncing timer and, in case @paramfunc\n * was already invoked in the meantime, return @param func's return value.\n * The debounced function has two additional properties:\n * - `flush`: Invokes the debounced function immediately and returns its return value\n * - `cancel`: Cancels the debouncing process and resets the debouncing timer\n */\nfunction debounce(func, wait, options) {\n let callbackReturnValue;\n\n let timerId;\n let maxTimerId;\n\n const maxWait = options && options.maxWait ? Math.max(options.maxWait, wait) : 0;\n\n function invokeFunc() {\n cancelTimers();\n callbackReturnValue = func();\n return callbackReturnValue;\n }\n\n function cancelTimers() {\n timerId !== undefined && clearTimeout(timerId);\n maxTimerId !== undefined && clearTimeout(maxTimerId);\n timerId = maxTimerId = undefined;\n }\n\n function flush() {\n if (timerId !== undefined || maxTimerId !== undefined) {\n return invokeFunc();\n }\n return callbackReturnValue;\n }\n\n function debounced() {\n if (timerId) {\n clearTimeout(timerId);\n }\n timerId = setTimeout$3(invokeFunc, wait);\n\n if (maxWait && maxTimerId === undefined) {\n maxTimerId = setTimeout$3(invokeFunc, maxWait);\n }\n\n return callbackReturnValue;\n }\n\n debounced.cancel = cancelTimers;\n debounced.flush = flush;\n return debounced;\n}\n\nconst NAVIGATOR = GLOBAL_OBJ.navigator;\n\n/**\n * Disable sampling mousemove events on iOS browsers as this can cause blocking the main thread\n * https://github.com/getsentry/sentry-javascript/issues/14534\n */\nfunction getRecordingSamplingOptions() {\n if (\n /iPhone|iPad|iPod/i.test((NAVIGATOR && NAVIGATOR.userAgent) || '') ||\n (/Macintosh/i.test((NAVIGATOR && NAVIGATOR.userAgent) || '') &&\n NAVIGATOR &&\n NAVIGATOR.maxTouchPoints &&\n NAVIGATOR.maxTouchPoints > 1)\n ) {\n return {\n sampling: {\n mousemove: false,\n },\n };\n }\n\n return {};\n}\n\n/**\n * Handler for recording events.\n *\n * Adds to event buffer, and has varying flushing behaviors if the event was a checkout.\n */\nfunction getHandleRecordingEmit(replay) {\n let hadFirstEvent = false;\n\n return (event, _isCheckout) => {\n // If this is false, it means session is expired, create and a new session and wait for checkout\n if (!replay.checkAndHandleExpiredSession()) {\n DEBUG_BUILD && logger.warn('Received replay event after session expired.');\n\n return;\n }\n\n // `_isCheckout` is only set when the checkout is due to `checkoutEveryNms`\n // We also want to treat the first event as a checkout, so we handle this specifically here\n const isCheckout = _isCheckout || !hadFirstEvent;\n hadFirstEvent = true;\n\n if (replay.clickDetector) {\n updateClickDetectorForRecordingEvent(replay.clickDetector, event);\n }\n\n // The handler returns `true` if we do not want to trigger debounced flush, `false` if we want to debounce flush.\n replay.addUpdate(() => {\n // The session is always started immediately on pageload/init, but for\n // error-only replays, it should reflect the most recent checkout\n // when an error occurs. Clear any state that happens before this current\n // checkout. This needs to happen before `addEvent()` which updates state\n // dependent on this reset.\n if (replay.recordingMode === 'buffer' && isCheckout) {\n replay.setInitialState();\n }\n\n // If the event is not added (e.g. due to being paused, disabled, or out of the max replay duration),\n // Skip all further steps\n if (!addEventSync(replay, event, isCheckout)) {\n // Return true to skip scheduling a debounced flush\n return true;\n }\n\n // Different behavior for full snapshots (type=2), ignore other event types\n // See https://github.com/rrweb-io/rrweb/blob/d8f9290ca496712aa1e7d472549480c4e7876594/packages/rrweb/src/types.ts#L16\n if (!isCheckout) {\n return false;\n }\n\n const session = replay.session;\n\n // Additionally, create a meta event that will capture certain SDK settings.\n // In order to handle buffer mode, this needs to either be done when we\n // receive checkout events or at flush time. We have an experimental mode\n // to perform multiple checkouts a session (the idea is to improve\n // seeking during playback), so also only include if segmentId is 0\n // (handled in `addSettingsEvent`).\n //\n // `isCheckout` is always true, but want to be explicit that it should\n // only be added for checkouts\n addSettingsEvent(replay, isCheckout);\n\n // When in buffer mode, make sure we adjust the session started date to the current earliest event of the buffer\n // this should usually be the timestamp of the checkout event, but to be safe...\n if (replay.recordingMode === 'buffer' && session && replay.eventBuffer) {\n const earliestEvent = replay.eventBuffer.getEarliestTimestamp();\n if (earliestEvent) {\n DEBUG_BUILD &&\n logger.info(`Updating session start time to earliest event in buffer to ${new Date(earliestEvent)}`);\n\n session.started = earliestEvent;\n\n if (replay.getOptions().stickySession) {\n saveSession(session);\n }\n }\n }\n\n // If there is a previousSessionId after a full snapshot occurs, then\n // the replay session was started due to session expiration. The new session\n // is started before triggering a new checkout and contains the id\n // of the previous session. Do not immediately flush in this case\n // to avoid capturing only the checkout and instead the replay will\n // be captured if they perform any follow-up actions.\n if (session && session.previousSessionId) {\n return true;\n }\n\n if (replay.recordingMode === 'session') {\n // If the full snapshot is due to an initial load, we will not have\n // a previous session ID. In this case, we want to buffer events\n // for a set amount of time before flushing. This can help avoid\n // capturing replays of users that immediately close the window.\n\n // This should never reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n void replay.flush();\n }\n\n return true;\n });\n };\n}\n\n/**\n * Exported for tests\n */\nfunction createOptionsEvent(replay) {\n const options = replay.getOptions();\n return {\n type: EventType.Custom,\n timestamp: Date.now(),\n data: {\n tag: 'options',\n payload: {\n shouldRecordCanvas: replay.isRecordingCanvas(),\n sessionSampleRate: options.sessionSampleRate,\n errorSampleRate: options.errorSampleRate,\n useCompressionOption: options.useCompression,\n blockAllMedia: options.blockAllMedia,\n maskAllText: options.maskAllText,\n maskAllInputs: options.maskAllInputs,\n useCompression: replay.eventBuffer ? replay.eventBuffer.type === 'worker' : false,\n networkDetailHasUrls: options.networkDetailAllowUrls.length > 0,\n networkCaptureBodies: options.networkCaptureBodies,\n networkRequestHasHeaders: options.networkRequestHeaders.length > 0,\n networkResponseHasHeaders: options.networkResponseHeaders.length > 0,\n },\n },\n };\n}\n\n/**\n * Add a \"meta\" event that contains a simplified view on current configuration\n * options. This should only be included on the first segment of a recording.\n */\nfunction addSettingsEvent(replay, isCheckout) {\n // Only need to add this event when sending the first segment\n if (!isCheckout || !replay.session || replay.session.segmentId !== 0) {\n return;\n }\n\n addEventSync(replay, createOptionsEvent(replay), false);\n}\n\n/**\n * Create a replay envelope ready to be sent.\n * This includes both the replay event, as well as the recording data.\n */\nfunction createReplayEnvelope(\n replayEvent,\n recordingData,\n dsn,\n tunnel,\n) {\n return createEnvelope(\n createEventEnvelopeHeaders(replayEvent, getSdkMetadataForEnvelopeHeader(replayEvent), tunnel, dsn),\n [\n [{ type: 'replay_event' }, replayEvent],\n [\n {\n type: 'replay_recording',\n // If string then we need to encode to UTF8, otherwise will have\n // wrong size. TextEncoder has similar browser support to\n // MutationObserver, although it does not accept IE11.\n length:\n typeof recordingData === 'string' ? new TextEncoder().encode(recordingData).length : recordingData.length,\n },\n recordingData,\n ],\n ],\n );\n}\n\n/**\n * Prepare the recording data ready to be sent.\n */\nfunction prepareRecordingData({\n recordingData,\n headers,\n}\n\n) {\n let payloadWithSequence;\n\n // XXX: newline is needed to separate sequence id from events\n const replayHeaders = `${JSON.stringify(headers)}\n`;\n\n if (typeof recordingData === 'string') {\n payloadWithSequence = `${replayHeaders}${recordingData}`;\n } else {\n const enc = new TextEncoder();\n // XXX: newline is needed to separate sequence id from events\n const sequence = enc.encode(replayHeaders);\n // Merge the two Uint8Arrays\n payloadWithSequence = new Uint8Array(sequence.length + recordingData.length);\n payloadWithSequence.set(sequence);\n payloadWithSequence.set(recordingData, sequence.length);\n }\n\n return payloadWithSequence;\n}\n\n/**\n * Prepare a replay event & enrich it with the SDK metadata.\n */\nasync function prepareReplayEvent({\n client,\n scope,\n replayId: event_id,\n event,\n}\n\n) {\n const integrations =\n typeof client._integrations === 'object' && client._integrations !== null && !Array.isArray(client._integrations)\n ? Object.keys(client._integrations)\n : undefined;\n\n const eventHint = { event_id, integrations };\n\n client.emit('preprocessEvent', event, eventHint);\n\n const preparedEvent = (await prepareEvent(\n client.getOptions(),\n event,\n eventHint,\n scope,\n client,\n getIsolationScope(),\n )) ;\n\n // If e.g. a global event processor returned null\n if (!preparedEvent) {\n return null;\n }\n\n // This normally happens in browser client \"_prepareEvent\"\n // but since we do not use this private method from the client, but rather the plain import\n // we need to do this manually.\n preparedEvent.platform = preparedEvent.platform || 'javascript';\n\n // extract the SDK name because `client._prepareEvent` doesn't add it to the event\n const metadata = client.getSdkMetadata();\n const { name, version } = (metadata && metadata.sdk) || {};\n\n preparedEvent.sdk = {\n ...preparedEvent.sdk,\n name: name || 'sentry.javascript.unknown',\n version: version || '0.0.0',\n };\n\n return preparedEvent;\n}\n\n/**\n * Send replay attachment using `fetch()`\n */\nasync function sendReplayRequest({\n recordingData,\n replayId,\n segmentId: segment_id,\n eventContext,\n timestamp,\n session,\n}) {\n const preparedRecordingData = prepareRecordingData({\n recordingData,\n headers: {\n segment_id,\n },\n });\n\n const { urls, errorIds, traceIds, initialTimestamp } = eventContext;\n\n const client = getClient();\n const scope = getCurrentScope();\n const transport = client && client.getTransport();\n const dsn = client && client.getDsn();\n\n if (!client || !transport || !dsn || !session.sampled) {\n return resolvedSyncPromise({});\n }\n\n const baseEvent = {\n type: REPLAY_EVENT_NAME,\n replay_start_timestamp: initialTimestamp / 1000,\n timestamp: timestamp / 1000,\n error_ids: errorIds,\n trace_ids: traceIds,\n urls,\n replay_id: replayId,\n segment_id,\n replay_type: session.sampled,\n };\n\n const replayEvent = await prepareReplayEvent({ scope, client, replayId, event: baseEvent });\n\n if (!replayEvent) {\n // Taken from baseclient's `_processEvent` method, where this is handled for errors/transactions\n client.recordDroppedEvent('event_processor', 'replay', baseEvent);\n DEBUG_BUILD && logger.info('An event processor returned `null`, will not send event.');\n return resolvedSyncPromise({});\n }\n\n /*\n For reference, the fully built event looks something like this:\n {\n \"type\": \"replay_event\",\n \"timestamp\": 1670837008.634,\n \"error_ids\": [\n \"errorId\"\n ],\n \"trace_ids\": [\n \"traceId\"\n ],\n \"urls\": [\n \"https://example.com\"\n ],\n \"replay_id\": \"eventId\",\n \"segment_id\": 3,\n \"replay_type\": \"error\",\n \"platform\": \"javascript\",\n \"event_id\": \"eventId\",\n \"environment\": \"production\",\n \"sdk\": {\n \"integrations\": [\n \"BrowserTracing\",\n \"Replay\"\n ],\n \"name\": \"sentry.javascript.browser\",\n \"version\": \"7.25.0\"\n },\n \"sdkProcessingMetadata\": {},\n \"contexts\": {\n },\n }\n */\n\n // Prevent this data (which, if it exists, was used in earlier steps in the processing pipeline) from being sent to\n // sentry. (Note: Our use of this property comes and goes with whatever we might be debugging, whatever hacks we may\n // have temporarily added, etc. Even if we don't happen to be using it at some point in the future, let's not get rid\n // of this `delete`, lest we miss putting it back in the next time the property is in use.)\n delete replayEvent.sdkProcessingMetadata;\n\n const envelope = createReplayEnvelope(replayEvent, preparedRecordingData, dsn, client.getOptions().tunnel);\n\n let response;\n\n try {\n response = await transport.send(envelope);\n } catch (err) {\n const error = new Error(UNABLE_TO_SEND_REPLAY);\n\n try {\n // In case browsers don't allow this property to be writable\n // @ts-expect-error This needs lib es2022 and newer\n error.cause = err;\n } catch (e) {\n // nothing to do\n }\n throw error;\n }\n\n // If the status code is invalid, we want to immediately stop & not retry\n if (typeof response.statusCode === 'number' && (response.statusCode < 200 || response.statusCode >= 300)) {\n throw new TransportStatusCodeError(response.statusCode);\n }\n\n const rateLimits = updateRateLimits({}, response);\n if (isRateLimited(rateLimits, 'replay')) {\n throw new RateLimitError(rateLimits);\n }\n\n return response;\n}\n\n/**\n * This error indicates that the transport returned an invalid status code.\n */\nclass TransportStatusCodeError extends Error {\n constructor(statusCode) {\n super(`Transport returned status code ${statusCode}`);\n }\n}\n\n/**\n * This error indicates that we hit a rate limit API error.\n */\nclass RateLimitError extends Error {\n\n constructor(rateLimits) {\n super('Rate limit hit');\n this.rateLimits = rateLimits;\n }\n}\n\n/**\n * Finalize and send the current replay event to Sentry\n */\nasync function sendReplay(\n replayData,\n retryConfig = {\n count: 0,\n interval: RETRY_BASE_INTERVAL,\n },\n) {\n const { recordingData, onError } = replayData;\n\n // short circuit if there's no events to upload (this shouldn't happen as _runFlush makes this check)\n if (!recordingData.length) {\n return;\n }\n\n try {\n await sendReplayRequest(replayData);\n return true;\n } catch (err) {\n if (err instanceof TransportStatusCodeError || err instanceof RateLimitError) {\n throw err;\n }\n\n // Capture error for every failed replay\n setContext('Replays', {\n _retryCount: retryConfig.count,\n });\n\n if (onError) {\n onError(err);\n }\n\n // If an error happened here, it's likely that uploading the attachment\n // failed, we'll can retry with the same events payload\n if (retryConfig.count >= RETRY_MAX_COUNT) {\n const error = new Error(`${UNABLE_TO_SEND_REPLAY} - max retries exceeded`);\n\n try {\n // In case browsers don't allow this property to be writable\n // @ts-expect-error This needs lib es2022 and newer\n error.cause = err;\n } catch (e) {\n // nothing to do\n }\n\n throw error;\n }\n\n // will retry in intervals of 5, 10, 30\n retryConfig.interval *= ++retryConfig.count;\n\n return new Promise((resolve, reject) => {\n setTimeout$3(async () => {\n try {\n await sendReplay(replayData, retryConfig);\n resolve(true);\n } catch (err) {\n reject(err);\n }\n }, retryConfig.interval);\n });\n }\n}\n\nconst THROTTLED = '__THROTTLED';\nconst SKIPPED = '__SKIPPED';\n\n/**\n * Create a throttled function off a given function.\n * When calling the throttled function, it will call the original function only\n * if it hasn't been called more than `maxCount` times in the last `durationSeconds`.\n *\n * Returns `THROTTLED` if throttled for the first time, after that `SKIPPED`,\n * or else the return value of the original function.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction throttle(\n fn,\n maxCount,\n durationSeconds,\n) {\n const counter = new Map();\n\n const _cleanup = (now) => {\n const threshold = now - durationSeconds;\n counter.forEach((_value, key) => {\n if (key < threshold) {\n counter.delete(key);\n }\n });\n };\n\n const _getTotalCount = () => {\n return [...counter.values()].reduce((a, b) => a + b, 0);\n };\n\n let isThrottled = false;\n\n return (...rest) => {\n // Date in second-precision, which we use as basis for the throttling\n const now = Math.floor(Date.now() / 1000);\n\n // First, make sure to delete any old entries\n _cleanup(now);\n\n // If already over limit, do nothing\n if (_getTotalCount() >= maxCount) {\n const wasThrottled = isThrottled;\n isThrottled = true;\n return wasThrottled ? SKIPPED : THROTTLED;\n }\n\n isThrottled = false;\n const count = counter.get(now) || 0;\n counter.set(now, count + 1);\n\n return fn(...rest);\n };\n}\n\n/* eslint-disable max-lines */ // TODO: We might want to split this file up\n\n/**\n * The main replay container class, which holds all the state and methods for recording and sending replays.\n */\nclass ReplayContainer {\n\n /**\n * Recording can happen in one of two modes:\n * - session: Record the whole session, sending it continuously\n * - buffer: Always keep the last 60s of recording, requires:\n * - having replaysOnErrorSampleRate > 0 to capture replay when an error occurs\n * - or calling `flush()` to send the replay\n */\n\n /**\n * The current or last active span.\n * This is only available when performance is enabled.\n */\n\n /**\n * These are here so we can overwrite them in tests etc.\n * @hidden\n */\n\n /** The replay has to be manually started, because no sample rate (neither session or error) was provided. */\n\n /**\n * Options to pass to `rrweb.record()`\n */\n\n /**\n * Timestamp of the last user activity. This lives across sessions.\n */\n\n /**\n * Is the integration currently active?\n */\n\n /**\n * Paused is a state where:\n * - DOM Recording is not listening at all\n * - Nothing will be added to event buffer (e.g. core SDK events)\n */\n\n /**\n * Have we attached listeners to the core SDK?\n * Note we have to track this as there is no way to remove instrumentation handlers.\n */\n\n /**\n * Function to stop recording\n */\n\n /**\n * Internal use for canvas recording options\n */\n\n constructor({\n options,\n recordingOptions,\n }\n\n) {ReplayContainer.prototype.__init.call(this);ReplayContainer.prototype.__init2.call(this);ReplayContainer.prototype.__init3.call(this);ReplayContainer.prototype.__init4.call(this);ReplayContainer.prototype.__init5.call(this);ReplayContainer.prototype.__init6.call(this);\n this.eventBuffer = null;\n this.performanceEntries = [];\n this.replayPerformanceEntries = [];\n this.recordingMode = 'session';\n this.timeouts = {\n sessionIdlePause: SESSION_IDLE_PAUSE_DURATION,\n sessionIdleExpire: SESSION_IDLE_EXPIRE_DURATION,\n } ;\n this._lastActivity = Date.now();\n this._isEnabled = false;\n this._isPaused = false;\n this._requiresManualStart = false;\n this._hasInitializedCoreListeners = false;\n this._context = {\n errorIds: new Set(),\n traceIds: new Set(),\n urls: [],\n initialTimestamp: Date.now(),\n initialUrl: '',\n };\n\n this._recordingOptions = recordingOptions;\n this._options = options;\n\n this._debouncedFlush = debounce(() => this._flush(), this._options.flushMinDelay, {\n maxWait: this._options.flushMaxDelay,\n });\n\n this._throttledAddEvent = throttle(\n (event, isCheckout) => addEvent(this, event, isCheckout),\n // Max 300 events...\n 300,\n // ... per 5s\n 5,\n );\n\n const { slowClickTimeout, slowClickIgnoreSelectors } = this.getOptions();\n\n const slowClickConfig = slowClickTimeout\n ? {\n threshold: Math.min(SLOW_CLICK_THRESHOLD, slowClickTimeout),\n timeout: slowClickTimeout,\n scrollTimeout: SLOW_CLICK_SCROLL_TIMEOUT,\n ignoreSelector: slowClickIgnoreSelectors ? slowClickIgnoreSelectors.join(',') : '',\n }\n : undefined;\n\n if (slowClickConfig) {\n this.clickDetector = new ClickDetector(this, slowClickConfig);\n }\n\n // Configure replay logger w/ experimental options\n if (DEBUG_BUILD) {\n const experiments = options._experiments;\n logger.setConfig({\n captureExceptions: !!experiments.captureExceptions,\n traceInternals: !!experiments.traceInternals,\n });\n }\n }\n\n /** Get the event context. */\n getContext() {\n return this._context;\n }\n\n /** If recording is currently enabled. */\n isEnabled() {\n return this._isEnabled;\n }\n\n /** If recording is currently paused. */\n isPaused() {\n return this._isPaused;\n }\n\n /**\n * Determine if canvas recording is enabled\n */\n isRecordingCanvas() {\n return Boolean(this._canvas);\n }\n\n /** Get the replay integration options. */\n getOptions() {\n return this._options;\n }\n\n /** A wrapper to conditionally capture exceptions. */\n handleException(error) {\n DEBUG_BUILD && logger.exception(error);\n if (this._options.onError) {\n this._options.onError(error);\n }\n }\n\n /**\n * Initializes the plugin based on sampling configuration. Should not be\n * called outside of constructor.\n */\n initializeSampling(previousSessionId) {\n const { errorSampleRate, sessionSampleRate } = this._options;\n\n // If neither sample rate is > 0, then do nothing - user will need to call one of\n // `start()` or `startBuffering` themselves.\n const requiresManualStart = errorSampleRate <= 0 && sessionSampleRate <= 0;\n\n this._requiresManualStart = requiresManualStart;\n\n if (requiresManualStart) {\n return;\n }\n\n // Otherwise if there is _any_ sample rate set, try to load an existing\n // session, or create a new one.\n this._initializeSessionForSampling(previousSessionId);\n\n if (!this.session) {\n // This should not happen, something wrong has occurred\n DEBUG_BUILD && logger.exception(new Error('Unable to initialize and create session'));\n return;\n }\n\n if (this.session.sampled === false) {\n // This should only occur if `errorSampleRate` is 0 and was unsampled for\n // session-based replay. In this case there is nothing to do.\n return;\n }\n\n // If segmentId > 0, it means we've previously already captured this session\n // In this case, we still want to continue in `session` recording mode\n this.recordingMode = this.session.sampled === 'buffer' && this.session.segmentId === 0 ? 'buffer' : 'session';\n\n DEBUG_BUILD && logger.infoTick(`Starting replay in ${this.recordingMode} mode`);\n\n this._initializeRecording();\n }\n\n /**\n * Start a replay regardless of sampling rate. Calling this will always\n * create a new session. Will log a message if replay is already in progress.\n *\n * Creates or loads a session, attaches listeners to varying events (DOM,\n * _performanceObserver, Recording, Sentry SDK, etc)\n */\n start() {\n if (this._isEnabled && this.recordingMode === 'session') {\n DEBUG_BUILD && logger.info('Recording is already in progress');\n return;\n }\n\n if (this._isEnabled && this.recordingMode === 'buffer') {\n DEBUG_BUILD && logger.info('Buffering is in progress, call `flush()` to save the replay');\n return;\n }\n\n DEBUG_BUILD && logger.infoTick('Starting replay in session mode');\n\n // Required as user activity is initially set in\n // constructor, so if `start()` is called after\n // session idle expiration, a replay will not be\n // created due to an idle timeout.\n this._updateUserActivity();\n\n const session = loadOrCreateSession(\n {\n maxReplayDuration: this._options.maxReplayDuration,\n sessionIdleExpire: this.timeouts.sessionIdleExpire,\n },\n {\n stickySession: this._options.stickySession,\n // This is intentional: create a new session-based replay when calling `start()`\n sessionSampleRate: 1,\n allowBuffering: false,\n },\n );\n\n this.session = session;\n\n this._initializeRecording();\n }\n\n /**\n * Start replay buffering. Buffers until `flush()` is called or, if\n * `replaysOnErrorSampleRate` > 0, an error occurs.\n */\n startBuffering() {\n if (this._isEnabled) {\n DEBUG_BUILD && logger.info('Buffering is in progress, call `flush()` to save the replay');\n return;\n }\n\n DEBUG_BUILD && logger.infoTick('Starting replay in buffer mode');\n\n const session = loadOrCreateSession(\n {\n sessionIdleExpire: this.timeouts.sessionIdleExpire,\n maxReplayDuration: this._options.maxReplayDuration,\n },\n {\n stickySession: this._options.stickySession,\n sessionSampleRate: 0,\n allowBuffering: true,\n },\n );\n\n this.session = session;\n\n this.recordingMode = 'buffer';\n this._initializeRecording();\n }\n\n /**\n * Start recording.\n *\n * Note that this will cause a new DOM checkout\n */\n startRecording() {\n try {\n const canvasOptions = this._canvas;\n\n this._stopRecording = record({\n ...this._recordingOptions,\n // When running in error sampling mode, we need to overwrite `checkoutEveryNms`\n // Without this, it would record forever, until an error happens, which we don't want\n // instead, we'll always keep the last 60 seconds of replay before an error happened\n ...(this.recordingMode === 'buffer'\n ? { checkoutEveryNms: BUFFER_CHECKOUT_TIME }\n : // Otherwise, use experimental option w/ min checkout time of 6 minutes\n // This is to improve playback seeking as there could potentially be\n // less mutations to process in the worse cases.\n //\n // checkout by \"N\" events is probably ideal, but means we have less\n // control about the number of checkouts we make (which generally\n // increases replay size)\n this._options._experiments.continuousCheckout && {\n // Minimum checkout time is 6 minutes\n checkoutEveryNms: Math.max(360000, this._options._experiments.continuousCheckout),\n }),\n emit: getHandleRecordingEmit(this),\n ...getRecordingSamplingOptions(),\n onMutation: this._onMutationHandler,\n ...(canvasOptions\n ? {\n recordCanvas: canvasOptions.recordCanvas,\n getCanvasManager: canvasOptions.getCanvasManager,\n sampling: canvasOptions.sampling,\n dataURLOptions: canvasOptions.dataURLOptions,\n }\n : {}),\n });\n } catch (err) {\n this.handleException(err);\n }\n }\n\n /**\n * Stops the recording, if it was running.\n *\n * Returns true if it was previously stopped, or is now stopped,\n * otherwise false.\n */\n stopRecording() {\n try {\n if (this._stopRecording) {\n this._stopRecording();\n this._stopRecording = undefined;\n }\n\n return true;\n } catch (err) {\n this.handleException(err);\n return false;\n }\n }\n\n /**\n * Currently, this needs to be manually called (e.g. for tests). Sentry SDK\n * does not support a teardown\n */\n async stop({ forceFlush = false, reason } = {}) {\n if (!this._isEnabled) {\n return;\n }\n\n // We can't move `_isEnabled` after awaiting a flush, otherwise we can\n // enter into an infinite loop when `stop()` is called while flushing.\n this._isEnabled = false;\n\n try {\n DEBUG_BUILD && logger.info(`Stopping Replay${reason ? ` triggered by ${reason}` : ''}`);\n\n resetReplayIdOnDynamicSamplingContext();\n\n this._removeListeners();\n this.stopRecording();\n\n this._debouncedFlush.cancel();\n // See comment above re: `_isEnabled`, we \"force\" a flush, ignoring the\n // `_isEnabled` state of the plugin since it was disabled above.\n if (forceFlush) {\n await this._flush({ force: true });\n }\n\n // After flush, destroy event buffer\n this.eventBuffer && this.eventBuffer.destroy();\n this.eventBuffer = null;\n\n // Clear session from session storage, note this means if a new session\n // is started after, it will not have `previousSessionId`\n clearSession(this);\n } catch (err) {\n this.handleException(err);\n }\n }\n\n /**\n * Pause some replay functionality. See comments for `_isPaused`.\n * This differs from stop as this only stops DOM recording, it is\n * not as thorough of a shutdown as `stop()`.\n */\n pause() {\n if (this._isPaused) {\n return;\n }\n\n this._isPaused = true;\n this.stopRecording();\n\n DEBUG_BUILD && logger.info('Pausing replay');\n }\n\n /**\n * Resumes recording, see notes for `pause().\n *\n * Note that calling `startRecording()` here will cause a\n * new DOM checkout.`\n */\n resume() {\n if (!this._isPaused || !this._checkSession()) {\n return;\n }\n\n this._isPaused = false;\n this.startRecording();\n\n DEBUG_BUILD && logger.info('Resuming replay');\n }\n\n /**\n * If not in \"session\" recording mode, flush event buffer which will create a new replay.\n * Unless `continueRecording` is false, the replay will continue to record and\n * behave as a \"session\"-based replay.\n *\n * Otherwise, queue up a flush.\n */\n async sendBufferedReplayOrFlush({ continueRecording = true } = {}) {\n if (this.recordingMode === 'session') {\n return this.flushImmediate();\n }\n\n const activityTime = Date.now();\n\n DEBUG_BUILD && logger.info('Converting buffer to session');\n\n // Allow flush to complete before resuming as a session recording, otherwise\n // the checkout from `startRecording` may be included in the payload.\n // Prefer to keep the error replay as a separate (and smaller) segment\n // than the session replay.\n await this.flushImmediate();\n\n const hasStoppedRecording = this.stopRecording();\n\n if (!continueRecording || !hasStoppedRecording) {\n return;\n }\n\n // To avoid race conditions where this is called multiple times, we check here again that we are still buffering\n if ((this.recordingMode ) === 'session') {\n return;\n }\n\n // Re-start recording in session-mode\n this.recordingMode = 'session';\n\n // Once this session ends, we do not want to refresh it\n if (this.session) {\n this._updateUserActivity(activityTime);\n this._updateSessionActivity(activityTime);\n this._maybeSaveSession();\n }\n\n this.startRecording();\n }\n\n /**\n * We want to batch uploads of replay events. Save events only if\n * `<flushMinDelay>` milliseconds have elapsed since the last event\n * *OR* if `<flushMaxDelay>` milliseconds have elapsed.\n *\n * Accepts a callback to perform side-effects and returns true to stop batch\n * processing and hand back control to caller.\n */\n addUpdate(cb) {\n // We need to always run `cb` (e.g. in the case of `this.recordingMode == 'buffer'`)\n const cbResult = cb();\n\n // If this option is turned on then we will only want to call `flush`\n // explicitly\n if (this.recordingMode === 'buffer') {\n return;\n }\n\n // If callback is true, we do not want to continue with flushing -- the\n // caller will need to handle it.\n if (cbResult === true) {\n return;\n }\n\n // addUpdate is called quite frequently - use _debouncedFlush so that it\n // respects the flush delays and does not flush immediately\n this._debouncedFlush();\n }\n\n /**\n * Updates the user activity timestamp and resumes recording. This should be\n * called in an event handler for a user action that we consider as the user\n * being \"active\" (e.g. a mouse click).\n */\n triggerUserActivity() {\n this._updateUserActivity();\n\n // This case means that recording was once stopped due to inactivity.\n // Ensure that recording is resumed.\n if (!this._stopRecording) {\n // Create a new session, otherwise when the user action is flushed, it\n // will get rejected due to an expired session.\n if (!this._checkSession()) {\n return;\n }\n\n // Note: This will cause a new DOM checkout\n this.resume();\n return;\n }\n\n // Otherwise... recording was never suspended, continue as normalish\n this.checkAndHandleExpiredSession();\n\n this._updateSessionActivity();\n }\n\n /**\n * Updates the user activity timestamp *without* resuming\n * recording. Some user events (e.g. keydown) can be create\n * low-value replays that only contain the keypress as a\n * breadcrumb. Instead this would require other events to\n * create a new replay after a session has expired.\n */\n updateUserActivity() {\n this._updateUserActivity();\n this._updateSessionActivity();\n }\n\n /**\n * Only flush if `this.recordingMode === 'session'`\n */\n conditionalFlush() {\n if (this.recordingMode === 'buffer') {\n return Promise.resolve();\n }\n\n return this.flushImmediate();\n }\n\n /**\n * Flush using debounce flush\n */\n flush() {\n return this._debouncedFlush() ;\n }\n\n /**\n * Always flush via `_debouncedFlush` so that we do not have flushes triggered\n * from calling both `flush` and `_debouncedFlush`. Otherwise, there could be\n * cases of multiple flushes happening closely together.\n */\n flushImmediate() {\n this._debouncedFlush();\n // `.flush` is provided by the debounced function, analogously to lodash.debounce\n return this._debouncedFlush.flush() ;\n }\n\n /**\n * Cancels queued up flushes.\n */\n cancelFlush() {\n this._debouncedFlush.cancel();\n }\n\n /** Get the current session (=replay) ID */\n getSessionId() {\n return this.session && this.session.id;\n }\n\n /**\n * Checks if recording should be stopped due to user inactivity. Otherwise\n * check if session is expired and create a new session if so. Triggers a new\n * full snapshot on new session.\n *\n * Returns true if session is not expired, false otherwise.\n * @hidden\n */\n checkAndHandleExpiredSession() {\n // Prevent starting a new session if the last user activity is older than\n // SESSION_IDLE_PAUSE_DURATION. Otherwise non-user activity can trigger a new\n // session+recording. This creates noisy replays that do not have much\n // content in them.\n if (\n this._lastActivity &&\n isExpired(this._lastActivity, this.timeouts.sessionIdlePause) &&\n this.session &&\n this.session.sampled === 'session'\n ) {\n // Pause recording only for session-based replays. Otherwise, resuming\n // will create a new replay and will conflict with users who only choose\n // to record error-based replays only. (e.g. the resumed replay will not\n // contain a reference to an error)\n this.pause();\n return;\n }\n\n // --- There is recent user activity --- //\n // This will create a new session if expired, based on expiry length\n if (!this._checkSession()) {\n // Check session handles the refreshing itself\n return false;\n }\n\n return true;\n }\n\n /**\n * Capture some initial state that can change throughout the lifespan of the\n * replay. This is required because otherwise they would be captured at the\n * first flush.\n */\n setInitialState() {\n const urlPath = `${WINDOW.location.pathname}${WINDOW.location.hash}${WINDOW.location.search}`;\n const url = `${WINDOW.location.origin}${urlPath}`;\n\n this.performanceEntries = [];\n this.replayPerformanceEntries = [];\n\n // Reset _context as well\n this._clearContext();\n\n this._context.initialUrl = url;\n this._context.initialTimestamp = Date.now();\n this._context.urls.push(url);\n }\n\n /**\n * Add a breadcrumb event, that may be throttled.\n * If it was throttled, we add a custom breadcrumb to indicate that.\n */\n throttledAddEvent(\n event,\n isCheckout,\n ) {\n const res = this._throttledAddEvent(event, isCheckout);\n\n // If this is THROTTLED, it means we have throttled the event for the first time\n // In this case, we want to add a breadcrumb indicating that something was skipped\n if (res === THROTTLED) {\n const breadcrumb = createBreadcrumb({\n category: 'replay.throttled',\n });\n\n this.addUpdate(() => {\n // Return `false` if the event _was_ added, as that means we schedule a flush\n return !addEventSync(this, {\n type: ReplayEventTypeCustom,\n timestamp: breadcrumb.timestamp || 0,\n data: {\n tag: 'breadcrumb',\n payload: breadcrumb,\n metric: true,\n },\n });\n });\n }\n\n return res;\n }\n\n /**\n * This will get the parametrized route name of the current page.\n * This is only available if performance is enabled, and if an instrumented router is used.\n */\n getCurrentRoute() {\n const lastActiveSpan = this.lastActiveSpan || getActiveSpan();\n const lastRootSpan = lastActiveSpan && getRootSpan(lastActiveSpan);\n\n const attributes = (lastRootSpan && spanToJSON(lastRootSpan).data) || {};\n const source = attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];\n if (!lastRootSpan || !source || !['route', 'custom'].includes(source)) {\n return undefined;\n }\n\n return spanToJSON(lastRootSpan).description;\n }\n\n /**\n * Initialize and start all listeners to varying events (DOM,\n * Performance Observer, Recording, Sentry SDK, etc)\n */\n _initializeRecording() {\n this.setInitialState();\n\n // this method is generally called on page load or manually - in both cases\n // we should treat it as an activity\n this._updateSessionActivity();\n\n this.eventBuffer = createEventBuffer({\n useCompression: this._options.useCompression,\n workerUrl: this._options.workerUrl,\n });\n\n this._removeListeners();\n this._addListeners();\n\n // Need to set as enabled before we start recording, as `record()` can trigger a flush with a new checkout\n this._isEnabled = true;\n this._isPaused = false;\n\n this.startRecording();\n }\n\n /**\n * Loads (or refreshes) the current session.\n */\n _initializeSessionForSampling(previousSessionId) {\n // Whenever there is _any_ error sample rate, we always allow buffering\n // Because we decide on sampling when an error occurs, we need to buffer at all times if sampling for errors\n const allowBuffering = this._options.errorSampleRate > 0;\n\n const session = loadOrCreateSession(\n {\n sessionIdleExpire: this.timeouts.sessionIdleExpire,\n maxReplayDuration: this._options.maxReplayDuration,\n previousSessionId,\n },\n {\n stickySession: this._options.stickySession,\n sessionSampleRate: this._options.sessionSampleRate,\n allowBuffering,\n },\n );\n\n this.session = session;\n }\n\n /**\n * Checks and potentially refreshes the current session.\n * Returns false if session is not recorded.\n */\n _checkSession() {\n // If there is no session yet, we do not want to refresh anything\n // This should generally not happen, but to be safe....\n if (!this.session) {\n return false;\n }\n\n const currentSession = this.session;\n\n if (\n shouldRefreshSession(currentSession, {\n sessionIdleExpire: this.timeouts.sessionIdleExpire,\n maxReplayDuration: this._options.maxReplayDuration,\n })\n ) {\n // This should never reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this._refreshSession(currentSession);\n return false;\n }\n\n return true;\n }\n\n /**\n * Refresh a session with a new one.\n * This stops the current session (without forcing a flush, as that would never work since we are expired),\n * and then does a new sampling based on the refreshed session.\n */\n async _refreshSession(session) {\n if (!this._isEnabled) {\n return;\n }\n await this.stop({ reason: 'refresh session' });\n this.initializeSampling(session.id);\n }\n\n /**\n * Adds listeners to record events for the replay\n */\n _addListeners() {\n try {\n WINDOW.document.addEventListener('visibilitychange', this._handleVisibilityChange);\n WINDOW.addEventListener('blur', this._handleWindowBlur);\n WINDOW.addEventListener('focus', this._handleWindowFocus);\n WINDOW.addEventListener('keydown', this._handleKeyboardEvent);\n\n if (this.clickDetector) {\n this.clickDetector.addListeners();\n }\n\n // There is no way to remove these listeners, so ensure they are only added once\n if (!this._hasInitializedCoreListeners) {\n addGlobalListeners(this);\n\n this._hasInitializedCoreListeners = true;\n }\n } catch (err) {\n this.handleException(err);\n }\n\n this._performanceCleanupCallback = setupPerformanceObserver(this);\n }\n\n /**\n * Cleans up listeners that were created in `_addListeners`\n */\n _removeListeners() {\n try {\n WINDOW.document.removeEventListener('visibilitychange', this._handleVisibilityChange);\n\n WINDOW.removeEventListener('blur', this._handleWindowBlur);\n WINDOW.removeEventListener('focus', this._handleWindowFocus);\n WINDOW.removeEventListener('keydown', this._handleKeyboardEvent);\n\n if (this.clickDetector) {\n this.clickDetector.removeListeners();\n }\n\n if (this._performanceCleanupCallback) {\n this._performanceCleanupCallback();\n }\n } catch (err) {\n this.handleException(err);\n }\n }\n\n /**\n * Handle when visibility of the page content changes. Opening a new tab will\n * cause the state to change to hidden because of content of current page will\n * be hidden. Likewise, moving a different window to cover the contents of the\n * page will also trigger a change to a hidden state.\n */\n __init() {this._handleVisibilityChange = () => {\n if (WINDOW.document.visibilityState === 'visible') {\n this._doChangeToForegroundTasks();\n } else {\n this._doChangeToBackgroundTasks();\n }\n };}\n\n /**\n * Handle when page is blurred\n */\n __init2() {this._handleWindowBlur = () => {\n const breadcrumb = createBreadcrumb({\n category: 'ui.blur',\n });\n\n // Do not count blur as a user action -- it's part of the process of them\n // leaving the page\n this._doChangeToBackgroundTasks(breadcrumb);\n };}\n\n /**\n * Handle when page is focused\n */\n __init3() {this._handleWindowFocus = () => {\n const breadcrumb = createBreadcrumb({\n category: 'ui.focus',\n });\n\n // Do not count focus as a user action -- instead wait until they focus and\n // interactive with page\n this._doChangeToForegroundTasks(breadcrumb);\n };}\n\n /** Ensure page remains active when a key is pressed. */\n __init4() {this._handleKeyboardEvent = (event) => {\n handleKeyboardEvent(this, event);\n };}\n\n /**\n * Tasks to run when we consider a page to be hidden (via blurring and/or visibility)\n */\n _doChangeToBackgroundTasks(breadcrumb) {\n if (!this.session) {\n return;\n }\n\n const expired = isSessionExpired(this.session, {\n maxReplayDuration: this._options.maxReplayDuration,\n sessionIdleExpire: this.timeouts.sessionIdleExpire,\n });\n\n if (expired) {\n return;\n }\n\n if (breadcrumb) {\n this._createCustomBreadcrumb(breadcrumb);\n }\n\n // Send replay when the page/tab becomes hidden. There is no reason to send\n // replay if it becomes visible, since no actions we care about were done\n // while it was hidden\n // This should never reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n void this.conditionalFlush();\n }\n\n /**\n * Tasks to run when we consider a page to be visible (via focus and/or visibility)\n */\n _doChangeToForegroundTasks(breadcrumb) {\n if (!this.session) {\n return;\n }\n\n const isSessionActive = this.checkAndHandleExpiredSession();\n\n if (!isSessionActive) {\n // If the user has come back to the page within SESSION_IDLE_PAUSE_DURATION\n // ms, we will re-use the existing session, otherwise create a new\n // session\n DEBUG_BUILD && logger.info('Document has become active, but session has expired');\n return;\n }\n\n if (breadcrumb) {\n this._createCustomBreadcrumb(breadcrumb);\n }\n }\n\n /**\n * Update user activity (across session lifespans)\n */\n _updateUserActivity(_lastActivity = Date.now()) {\n this._lastActivity = _lastActivity;\n }\n\n /**\n * Updates the session's last activity timestamp\n */\n _updateSessionActivity(_lastActivity = Date.now()) {\n if (this.session) {\n this.session.lastActivity = _lastActivity;\n this._maybeSaveSession();\n }\n }\n\n /**\n * Helper to create (and buffer) a replay breadcrumb from a core SDK breadcrumb\n */\n _createCustomBreadcrumb(breadcrumb) {\n this.addUpdate(() => {\n // This should never reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.throttledAddEvent({\n type: EventType.Custom,\n timestamp: breadcrumb.timestamp || 0,\n data: {\n tag: 'breadcrumb',\n payload: breadcrumb,\n },\n });\n });\n }\n\n /**\n * Observed performance events are added to `this.performanceEntries`. These\n * are included in the replay event before it is finished and sent to Sentry.\n */\n _addPerformanceEntries() {\n let performanceEntries = createPerformanceEntries(this.performanceEntries).concat(this.replayPerformanceEntries);\n\n this.performanceEntries = [];\n this.replayPerformanceEntries = [];\n\n // If we are manually starting, we want to ensure we only include performance entries\n // that are after the initial timestamp\n // The reason for this is that we may have performance entries from the page load, but may decide to start\n // the replay later on, in which case we do not want to include these entries.\n // without this, manually started replays can have events long before the actual replay recording starts,\n // which messes with the timeline etc.\n if (this._requiresManualStart) {\n const initialTimestampInSeconds = this._context.initialTimestamp / 1000;\n performanceEntries = performanceEntries.filter(entry => entry.start >= initialTimestampInSeconds);\n }\n\n return Promise.all(createPerformanceSpans(this, performanceEntries));\n }\n\n /**\n * Clear _context\n */\n _clearContext() {\n // XXX: `initialTimestamp` and `initialUrl` do not get cleared\n this._context.errorIds.clear();\n this._context.traceIds.clear();\n this._context.urls = [];\n }\n\n /** Update the initial timestamp based on the buffer content. */\n _updateInitialTimestampFromEventBuffer() {\n const { session, eventBuffer } = this;\n // If replay was started manually (=no sample rate was given),\n // We do not want to back-port the initial timestamp\n if (!session || !eventBuffer || this._requiresManualStart) {\n return;\n }\n\n // we only ever update this on the initial segment\n if (session.segmentId) {\n return;\n }\n\n const earliestEvent = eventBuffer.getEarliestTimestamp();\n if (earliestEvent && earliestEvent < this._context.initialTimestamp) {\n this._context.initialTimestamp = earliestEvent;\n }\n }\n\n /**\n * Return and clear _context\n */\n _popEventContext() {\n const _context = {\n initialTimestamp: this._context.initialTimestamp,\n initialUrl: this._context.initialUrl,\n errorIds: Array.from(this._context.errorIds),\n traceIds: Array.from(this._context.traceIds),\n urls: this._context.urls,\n };\n\n this._clearContext();\n\n return _context;\n }\n\n /**\n * Flushes replay event buffer to Sentry.\n *\n * Performance events are only added right before flushing - this is\n * due to the buffered performance observer events.\n *\n * Should never be called directly, only by `flush`\n */\n async _runFlush() {\n const replayId = this.getSessionId();\n\n if (!this.session || !this.eventBuffer || !replayId) {\n DEBUG_BUILD && logger.error('No session or eventBuffer found to flush.');\n return;\n }\n\n await this._addPerformanceEntries();\n\n // Check eventBuffer again, as it could have been stopped in the meanwhile\n if (!this.eventBuffer || !this.eventBuffer.hasEvents) {\n return;\n }\n\n // Only attach memory event if eventBuffer is not empty\n await addMemoryEntry(this);\n\n // Check eventBuffer again, as it could have been stopped in the meanwhile\n if (!this.eventBuffer) {\n return;\n }\n\n // if this changed in the meanwhile, e.g. because the session was refreshed or similar, we abort here\n if (replayId !== this.getSessionId()) {\n return;\n }\n\n try {\n // This uses the data from the eventBuffer, so we need to call this before `finish()\n this._updateInitialTimestampFromEventBuffer();\n\n const timestamp = Date.now();\n\n // Check total duration again, to avoid sending outdated stuff\n // We leave 30s wiggle room to accommodate late flushing etc.\n // This _could_ happen when the browser is suspended during flushing, in which case we just want to stop\n if (timestamp - this._context.initialTimestamp > this._options.maxReplayDuration + 30000) {\n throw new Error('Session is too long, not sending replay');\n }\n\n const eventContext = this._popEventContext();\n // Always increment segmentId regardless of outcome of sending replay\n const segmentId = this.session.segmentId++;\n this._maybeSaveSession();\n\n // Note this empties the event buffer regardless of outcome of sending replay\n const recordingData = await this.eventBuffer.finish();\n\n await sendReplay({\n replayId,\n recordingData,\n segmentId,\n eventContext,\n session: this.session,\n timestamp,\n onError: err => this.handleException(err),\n });\n } catch (err) {\n this.handleException(err);\n\n // This means we retried 3 times and all of them failed,\n // or we ran into a problem we don't want to retry, like rate limiting.\n // In this case, we want to completely stop the replay - otherwise, we may get inconsistent segments\n // This should never reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.stop({ reason: 'sendReplay' });\n\n const client = getClient();\n\n if (client) {\n const dropReason = err instanceof RateLimitError ? 'ratelimit_backoff' : 'send_error';\n client.recordDroppedEvent(dropReason, 'replay');\n }\n }\n }\n\n /**\n * Flush recording data to Sentry. Creates a lock so that only a single flush\n * can be active at a time. Do not call this directly.\n */\n __init5() {this._flush = async ({\n force = false,\n }\n\n = {}) => {\n if (!this._isEnabled && !force) {\n // This can happen if e.g. the replay was stopped because of exceeding the retry limit\n return;\n }\n\n if (!this.checkAndHandleExpiredSession()) {\n DEBUG_BUILD && logger.error('Attempting to finish replay event after session expired.');\n return;\n }\n\n if (!this.session) {\n // should never happen, as we would have bailed out before\n return;\n }\n\n const start = this.session.started;\n const now = Date.now();\n const duration = now - start;\n\n // A flush is about to happen, cancel any queued flushes\n this._debouncedFlush.cancel();\n\n // If session is too short, or too long (allow some wiggle room over maxReplayDuration), do not send it\n // This _should_ not happen, but it may happen if flush is triggered due to a page activity change or similar\n const tooShort = duration < this._options.minReplayDuration;\n const tooLong = duration > this._options.maxReplayDuration + 5000;\n if (tooShort || tooLong) {\n DEBUG_BUILD &&\n logger.info(\n `Session duration (${Math.floor(duration / 1000)}s) is too ${\n tooShort ? 'short' : 'long'\n }, not sending replay.`,\n );\n\n if (tooShort) {\n this._debouncedFlush();\n }\n return;\n }\n\n const eventBuffer = this.eventBuffer;\n if (eventBuffer && this.session.segmentId === 0 && !eventBuffer.hasCheckout) {\n DEBUG_BUILD && logger.info('Flushing initial segment without checkout.');\n // TODO FN: Evaluate if we want to stop here, or remove this again?\n }\n\n const _flushInProgress = !!this._flushLock;\n\n // this._flushLock acts as a lock so that future calls to `_flush()` will\n // be blocked until current flush is finished (i.e. this promise resolves)\n if (!this._flushLock) {\n this._flushLock = this._runFlush();\n }\n\n try {\n await this._flushLock;\n } catch (err) {\n this.handleException(err);\n } finally {\n this._flushLock = undefined;\n\n if (_flushInProgress) {\n // Wait for previous flush to finish, then call the debounced\n // `_flush()`. It's possible there are other flush requests queued and\n // waiting for it to resolve. We want to reduce all outstanding\n // requests (as well as any new flush requests that occur within a\n // second of the locked flush completing) into a single flush.\n this._debouncedFlush();\n }\n }\n };}\n\n /** Save the session, if it is sticky */\n _maybeSaveSession() {\n if (this.session && this._options.stickySession) {\n saveSession(this.session);\n }\n }\n\n /** Handler for rrweb.record.onMutation */\n __init6() {this._onMutationHandler = (mutations) => {\n const count = mutations.length;\n\n const mutationLimit = this._options.mutationLimit;\n const mutationBreadcrumbLimit = this._options.mutationBreadcrumbLimit;\n const overMutationLimit = mutationLimit && count > mutationLimit;\n\n // Create a breadcrumb if a lot of mutations happen at the same time\n // We can show this in the UI as an information with potential performance improvements\n if (count > mutationBreadcrumbLimit || overMutationLimit) {\n const breadcrumb = createBreadcrumb({\n category: 'replay.mutations',\n data: {\n count,\n limit: overMutationLimit,\n },\n });\n this._createCustomBreadcrumb(breadcrumb);\n }\n\n // Stop replay if over the mutation limit\n if (overMutationLimit) {\n // This should never reject\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.stop({ reason: 'mutationLimit', forceFlush: this.recordingMode === 'session' });\n return false;\n }\n\n // `true` means we use the regular mutation handling by rrweb\n return true;\n };}\n}\n\nfunction getOption(selectors, defaultSelectors) {\n return [\n ...selectors,\n // sentry defaults\n ...defaultSelectors,\n ].join(',');\n}\n\n/**\n * Returns privacy related configuration for use in rrweb\n */\nfunction getPrivacyOptions({ mask, unmask, block, unblock, ignore }) {\n const defaultBlockedElements = ['base', 'iframe[srcdoc]:not([src])'];\n\n const maskSelector = getOption(mask, ['.sentry-mask', '[data-sentry-mask]']);\n const unmaskSelector = getOption(unmask, []);\n\n const options = {\n // We are making the decision to make text and input selectors the same\n maskTextSelector: maskSelector,\n unmaskTextSelector: unmaskSelector,\n\n blockSelector: getOption(block, ['.sentry-block', '[data-sentry-block]', ...defaultBlockedElements]),\n unblockSelector: getOption(unblock, []),\n ignoreSelector: getOption(ignore, ['.sentry-ignore', '[data-sentry-ignore]', 'input[type=\"file\"]']),\n };\n\n return options;\n}\n\n/**\n * Masks an attribute if necessary, otherwise return attribute value as-is.\n */\nfunction maskAttribute({\n el,\n key,\n maskAttributes,\n maskAllText,\n privacyOptions,\n value,\n}) {\n // We only mask attributes if `maskAllText` is true\n if (!maskAllText) {\n return value;\n }\n\n // unmaskTextSelector takes precedence\n if (privacyOptions.unmaskTextSelector && el.matches(privacyOptions.unmaskTextSelector)) {\n return value;\n }\n\n if (\n maskAttributes.includes(key) ||\n // Need to mask `value` attribute for `<input>` if it's a button-like\n // type\n (key === 'value' && el.tagName === 'INPUT' && ['submit', 'button'].includes(el.getAttribute('type') || ''))\n ) {\n return value.replace(/[\\S]/g, '*');\n }\n\n return value;\n}\n\nconst MEDIA_SELECTORS =\n 'img,image,svg,video,object,picture,embed,map,audio,link[rel=\"icon\"],link[rel=\"apple-touch-icon\"]';\n\nconst DEFAULT_NETWORK_HEADERS = ['content-length', 'content-type', 'accept'];\n\nlet _initialized = false;\n\n/**\n * Sentry integration for [Session Replay](https://sentry.io/for/session-replay/).\n *\n * See the [Replay documentation](https://docs.sentry.io/platforms/javascript/guides/session-replay/) for more information.\n *\n * @example\n *\n * ```\n * Sentry.init({\n * dsn: '__DSN__',\n * integrations: [Sentry.replayIntegration()],\n * });\n * ```\n */\nconst replayIntegration = ((options) => {\n return new Replay(options);\n}) ;\n\n/**\n * Replay integration\n *\n * TODO: Rewrite this to be functional integration\n * Exported for tests.\n */\nclass Replay {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'Replay';}\n\n /**\n * @inheritDoc\n */\n\n /**\n * Options to pass to `rrweb.record()`\n */\n\n /**\n * Initial options passed to the replay integration, merged with default values.\n * Note: `sessionSampleRate` and `errorSampleRate` are not required here, as they\n * can only be finally set when setupOnce() is called.\n *\n * @private\n */\n\n constructor({\n flushMinDelay = DEFAULT_FLUSH_MIN_DELAY,\n flushMaxDelay = DEFAULT_FLUSH_MAX_DELAY,\n minReplayDuration = MIN_REPLAY_DURATION,\n maxReplayDuration = MAX_REPLAY_DURATION,\n stickySession = true,\n useCompression = true,\n workerUrl,\n _experiments = {},\n maskAllText = true,\n maskAllInputs = true,\n blockAllMedia = true,\n\n mutationBreadcrumbLimit = 750,\n mutationLimit = 10000,\n\n slowClickTimeout = 7000,\n slowClickIgnoreSelectors = [],\n\n networkDetailAllowUrls = [],\n networkDetailDenyUrls = [],\n networkCaptureBodies = true,\n networkRequestHeaders = [],\n networkResponseHeaders = [],\n\n mask = [],\n maskAttributes = ['title', 'placeholder'],\n unmask = [],\n block = [],\n unblock = [],\n ignore = [],\n maskFn,\n\n beforeAddRecordingEvent,\n beforeErrorSampling,\n onError,\n } = {}) {\n this.name = Replay.id;\n\n const privacyOptions = getPrivacyOptions({\n mask,\n unmask,\n block,\n unblock,\n ignore,\n });\n\n this._recordingOptions = {\n maskAllInputs,\n maskAllText,\n maskInputOptions: { password: true },\n maskTextFn: maskFn,\n maskInputFn: maskFn,\n maskAttributeFn: (key, value, el) =>\n maskAttribute({\n maskAttributes,\n maskAllText,\n privacyOptions,\n key,\n value,\n el,\n }),\n\n ...privacyOptions,\n\n // Our defaults\n slimDOMOptions: 'all',\n inlineStylesheet: true,\n // Disable inline images as it will increase segment/replay size\n inlineImages: false,\n // collect fonts, but be aware that `sentry.io` needs to be an allowed\n // origin for playback\n collectFonts: true,\n errorHandler: (err) => {\n try {\n err.__rrweb__ = true;\n } catch (error) {\n // ignore errors here\n // this can happen if the error is frozen or does not allow mutation for other reasons\n }\n },\n };\n\n this._initialOptions = {\n flushMinDelay,\n flushMaxDelay,\n minReplayDuration: Math.min(minReplayDuration, MIN_REPLAY_DURATION_LIMIT),\n maxReplayDuration: Math.min(maxReplayDuration, MAX_REPLAY_DURATION),\n stickySession,\n useCompression,\n workerUrl,\n blockAllMedia,\n maskAllInputs,\n maskAllText,\n mutationBreadcrumbLimit,\n mutationLimit,\n slowClickTimeout,\n slowClickIgnoreSelectors,\n networkDetailAllowUrls,\n networkDetailDenyUrls,\n networkCaptureBodies,\n networkRequestHeaders: _getMergedNetworkHeaders(networkRequestHeaders),\n networkResponseHeaders: _getMergedNetworkHeaders(networkResponseHeaders),\n beforeAddRecordingEvent,\n beforeErrorSampling,\n onError,\n\n _experiments,\n };\n\n if (this._initialOptions.blockAllMedia) {\n // `blockAllMedia` is a more user friendly option to configure blocking\n // embedded media elements\n this._recordingOptions.blockSelector = !this._recordingOptions.blockSelector\n ? MEDIA_SELECTORS\n : `${this._recordingOptions.blockSelector},${MEDIA_SELECTORS}`;\n }\n\n if (this._isInitialized && isBrowser()) {\n throw new Error('Multiple Sentry Session Replay instances are not supported');\n }\n\n this._isInitialized = true;\n }\n\n /** If replay has already been initialized */\n get _isInitialized() {\n return _initialized;\n }\n\n /** Update _isInitialized */\n set _isInitialized(value) {\n _initialized = value;\n }\n\n /**\n * Setup and initialize replay container\n */\n afterAllSetup(client) {\n if (!isBrowser() || this._replay) {\n return;\n }\n\n this._setup(client);\n this._initialize(client);\n }\n\n /**\n * Start a replay regardless of sampling rate. Calling this will always\n * create a new session. Will log a message if replay is already in progress.\n *\n * Creates or loads a session, attaches listeners to varying events (DOM,\n * PerformanceObserver, Recording, Sentry SDK, etc)\n */\n start() {\n if (!this._replay) {\n return;\n }\n this._replay.start();\n }\n\n /**\n * Start replay buffering. Buffers until `flush()` is called or, if\n * `replaysOnErrorSampleRate` > 0, until an error occurs.\n */\n startBuffering() {\n if (!this._replay) {\n return;\n }\n\n this._replay.startBuffering();\n }\n\n /**\n * Currently, this needs to be manually called (e.g. for tests). Sentry SDK\n * does not support a teardown\n */\n stop() {\n if (!this._replay) {\n return Promise.resolve();\n }\n\n return this._replay.stop({ forceFlush: this._replay.recordingMode === 'session' });\n }\n\n /**\n * If not in \"session\" recording mode, flush event buffer which will create a new replay.\n * If replay is not enabled, a new session replay is started.\n * Unless `continueRecording` is false, the replay will continue to record and\n * behave as a \"session\"-based replay.\n *\n * Otherwise, queue up a flush.\n */\n flush(options) {\n if (!this._replay) {\n return Promise.resolve();\n }\n\n // assuming a session should be recorded in this case\n if (!this._replay.isEnabled()) {\n this._replay.start();\n return Promise.resolve();\n }\n\n return this._replay.sendBufferedReplayOrFlush(options);\n }\n\n /**\n * Get the current session ID.\n */\n getReplayId() {\n if (!this._replay || !this._replay.isEnabled()) {\n return;\n }\n\n return this._replay.getSessionId();\n }\n\n /**\n * Get the current recording mode. This can be either `session` or `buffer`.\n *\n * `session`: Recording the whole session, sending it continuously\n * `buffer`: Always keeping the last 60s of recording, requires:\n * - having replaysOnErrorSampleRate > 0 to capture replay when an error occurs\n * - or calling `flush()` to send the replay\n */\n getRecordingMode() {\n if (!this._replay || !this._replay.isEnabled()) {\n return;\n }\n\n return this._replay.recordingMode;\n }\n\n /**\n * Initializes replay.\n */\n _initialize(client) {\n if (!this._replay) {\n return;\n }\n\n this._maybeLoadFromReplayCanvasIntegration(client);\n this._replay.initializeSampling();\n }\n\n /** Setup the integration. */\n _setup(client) {\n // Client is not available in constructor, so we need to wait until setupOnce\n const finalOptions = loadReplayOptionsFromClient(this._initialOptions, client);\n\n this._replay = new ReplayContainer({\n options: finalOptions,\n recordingOptions: this._recordingOptions,\n });\n }\n\n /** Get canvas options from ReplayCanvas integration, if it is also added. */\n _maybeLoadFromReplayCanvasIntegration(client) {\n // To save bundle size, we skip checking for stuff here\n // and instead just try-catch everything - as generally this should all be defined\n /* eslint-disable @typescript-eslint/no-non-null-assertion */\n try {\n const canvasIntegration = client.getIntegrationByName('ReplayCanvas')\n\n;\n if (!canvasIntegration) {\n return;\n }\n\n this._replay['_canvas'] = canvasIntegration.getOptions();\n } catch (e) {\n // ignore errors here\n }\n /* eslint-enable @typescript-eslint/no-non-null-assertion */\n }\n}Replay.__initStatic();\n\n/** Parse Replay-related options from SDK options */\nfunction loadReplayOptionsFromClient(initialOptions, client) {\n const opt = client.getOptions() ;\n\n const finalOptions = {\n sessionSampleRate: 0,\n errorSampleRate: 0,\n ...dropUndefinedKeys(initialOptions),\n };\n\n const replaysSessionSampleRate = parseSampleRate(opt.replaysSessionSampleRate);\n const replaysOnErrorSampleRate = parseSampleRate(opt.replaysOnErrorSampleRate);\n\n if (replaysSessionSampleRate == null && replaysOnErrorSampleRate == null) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn(\n 'Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.',\n );\n });\n }\n\n if (replaysSessionSampleRate != null) {\n finalOptions.sessionSampleRate = replaysSessionSampleRate;\n }\n\n if (replaysOnErrorSampleRate != null) {\n finalOptions.errorSampleRate = replaysOnErrorSampleRate;\n }\n\n return finalOptions;\n}\n\nfunction _getMergedNetworkHeaders(headers) {\n return [...DEFAULT_NETWORK_HEADERS, ...headers.map(header => header.toLowerCase())];\n}\n\n/**\n * This is a small utility to get a type-safe instance of the Replay integration.\n */\nfunction getReplay() {\n const client = getClient();\n return client && client.getIntegrationByName('Replay');\n}\n\nexport { getReplay, replayIntegration };\n","// https://github.com/alangpierce/sucrase/tree/265887868966917f3b924ce38dfad01fbab1329f\n//\n// The MIT License (MIT)\n//\n// Copyright (c) 2012-2018 various contributors (see AUTHORS)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\n\n/**\n * Polyfill for the nullish coalescing operator (`??`).\n *\n * Note that the RHS is wrapped in a function so that if it's a computed value, that evaluation won't happen unless the\n * LHS evaluates to a nullish value, to mimic the operator's short-circuiting behavior.\n *\n * Adapted from Sucrase (https://github.com/alangpierce/sucrase)\n *\n * @param lhs The value of the expression to the left of the `??`\n * @param rhsFn A function returning the value of the expression to the right of the `??`\n * @returns The LHS value, unless it's `null` or `undefined`, in which case, the RHS value\n */\nfunction _nullishCoalesce(lhs, rhsFn) {\n // by checking for loose equality to `null`, we catch both `null` and `undefined`\n return lhs != null ? lhs : rhsFn();\n}\n\n// Sucrase version:\n// function _nullishCoalesce(lhs, rhsFn) {\n// if (lhs != null) {\n// return lhs;\n// } else {\n// return rhsFn();\n// }\n// }\n\nexport { _nullishCoalesce };\n","import { arrayify, logger } from '@sentry/utils';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { addGlobalEventProcessor } from './eventProcessors.js';\nimport { getClient } from './exports.js';\nimport { getCurrentHub } from './hub.js';\n\nconst installedIntegrations = [];\n\n/** Map of integrations assigned to a client */\n\n/**\n * Remove duplicates from the given array, preferring the last instance of any duplicate. Not guaranteed to\n * preseve the order of integrations in the array.\n *\n * @private\n */\nfunction filterDuplicates(integrations) {\n const integrationsByName = {};\n\n integrations.forEach(currentInstance => {\n const { name } = currentInstance;\n\n const existingInstance = integrationsByName[name];\n\n // We want integrations later in the array to overwrite earlier ones of the same type, except that we never want a\n // default instance to overwrite an existing user instance\n if (existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance) {\n return;\n }\n\n integrationsByName[name] = currentInstance;\n });\n\n return Object.keys(integrationsByName).map(k => integrationsByName[k]);\n}\n\n/** Gets integrations to install */\nfunction getIntegrationsToSetup(options) {\n const defaultIntegrations = options.defaultIntegrations || [];\n const userIntegrations = options.integrations;\n\n // We flag default instances, so that later we can tell them apart from any user-created instances of the same class\n defaultIntegrations.forEach(integration => {\n integration.isDefaultInstance = true;\n });\n\n let integrations;\n\n if (Array.isArray(userIntegrations)) {\n integrations = [...defaultIntegrations, ...userIntegrations];\n } else if (typeof userIntegrations === 'function') {\n integrations = arrayify(userIntegrations(defaultIntegrations));\n } else {\n integrations = defaultIntegrations;\n }\n\n const finalIntegrations = filterDuplicates(integrations);\n\n // The `Debug` integration prints copies of the `event` and `hint` which will be passed to `beforeSend` or\n // `beforeSendTransaction`. It therefore has to run after all other integrations, so that the changes of all event\n // processors will be reflected in the printed values. For lack of a more elegant way to guarantee that, we therefore\n // locate it and, assuming it exists, pop it out of its current spot and shove it onto the end of the array.\n const debugIndex = findIndex(finalIntegrations, integration => integration.name === 'Debug');\n if (debugIndex !== -1) {\n const [debugInstance] = finalIntegrations.splice(debugIndex, 1);\n finalIntegrations.push(debugInstance);\n }\n\n return finalIntegrations;\n}\n\n/**\n * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default\n * integrations are added unless they were already provided before.\n * @param integrations array of integration instances\n * @param withDefault should enable default integrations\n */\nfunction setupIntegrations(client, integrations) {\n const integrationIndex = {};\n\n integrations.forEach(integration => {\n // guard against empty provided integrations\n if (integration) {\n setupIntegration(client, integration, integrationIndex);\n }\n });\n\n return integrationIndex;\n}\n\n/**\n * Execute the `afterAllSetup` hooks of the given integrations.\n */\nfunction afterSetupIntegrations(client, integrations) {\n for (const integration of integrations) {\n // guard against empty provided integrations\n if (integration && integration.afterAllSetup) {\n integration.afterAllSetup(client);\n }\n }\n}\n\n/** Setup a single integration. */\nfunction setupIntegration(client, integration, integrationIndex) {\n if (integrationIndex[integration.name]) {\n DEBUG_BUILD && logger.log(`Integration skipped because it was already installed: ${integration.name}`);\n return;\n }\n integrationIndex[integration.name] = integration;\n\n // `setupOnce` is only called the first time\n if (installedIntegrations.indexOf(integration.name) === -1) {\n // eslint-disable-next-line deprecation/deprecation\n integration.setupOnce(addGlobalEventProcessor, getCurrentHub);\n installedIntegrations.push(integration.name);\n }\n\n // `setup` is run for each client\n if (integration.setup && typeof integration.setup === 'function') {\n integration.setup(client);\n }\n\n if (client.on && typeof integration.preprocessEvent === 'function') {\n const callback = integration.preprocessEvent.bind(integration) ;\n client.on('preprocessEvent', (event, hint) => callback(event, hint, client));\n }\n\n if (client.addEventProcessor && typeof integration.processEvent === 'function') {\n const callback = integration.processEvent.bind(integration) ;\n\n const processor = Object.assign((event, hint) => callback(event, hint, client), {\n id: integration.name,\n });\n\n client.addEventProcessor(processor);\n }\n\n DEBUG_BUILD && logger.log(`Integration installed: ${integration.name}`);\n}\n\n/** Add an integration to the current hub's client. */\nfunction addIntegration(integration) {\n const client = getClient();\n\n if (!client || !client.addIntegration) {\n DEBUG_BUILD && logger.warn(`Cannot add integration \"${integration.name}\" because no SDK Client is available.`);\n return;\n }\n\n client.addIntegration(integration);\n}\n\n// Polyfill for Array.findIndex(), which is not supported in ES5\nfunction findIndex(arr, callback) {\n for (let i = 0; i < arr.length; i++) {\n if (callback(arr[i]) === true) {\n return i;\n }\n }\n\n return -1;\n}\n\n/**\n * Convert a new integration function to the legacy class syntax.\n * In v8, we can remove this and instead export the integration functions directly.\n *\n * @deprecated This will be removed in v8!\n */\nfunction convertIntegrationFnToClass(\n name,\n fn,\n) {\n return Object.assign(\n function ConvertedIntegration(...args) {\n return fn(...args);\n },\n { id: name },\n ) ;\n}\n\n/**\n * Define an integration function that can be used to create an integration instance.\n * Note that this by design hides the implementation details of the integration, as they are considered internal.\n */\nfunction defineIntegration(fn) {\n return fn;\n}\n\nexport { addIntegration, afterSetupIntegrations, convertIntegrationFnToClass, defineIntegration, getIntegrationsToSetup, installedIntegrations, setupIntegration, setupIntegrations };\n","// eslint-disable-next-line @typescript-eslint/unbound-method\nconst objectToString = Object.prototype.toString;\n\n/**\n * Checks whether given value's type is one of a few Error or Error-like\n * {@link isError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isError(wat) {\n switch (objectToString.call(wat)) {\n case '[object Error]':\n case '[object Exception]':\n case '[object DOMException]':\n return true;\n default:\n return isInstanceOf(wat, Error);\n }\n}\n/**\n * Checks whether given value is an instance of the given built-in class.\n *\n * @param wat The value to be checked\n * @param className\n * @returns A boolean representing the result.\n */\nfunction isBuiltin(wat, className) {\n return objectToString.call(wat) === `[object ${className}]`;\n}\n\n/**\n * Checks whether given value's type is ErrorEvent\n * {@link isErrorEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isErrorEvent(wat) {\n return isBuiltin(wat, 'ErrorEvent');\n}\n\n/**\n * Checks whether given value's type is DOMError\n * {@link isDOMError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isDOMError(wat) {\n return isBuiltin(wat, 'DOMError');\n}\n\n/**\n * Checks whether given value's type is DOMException\n * {@link isDOMException}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isDOMException(wat) {\n return isBuiltin(wat, 'DOMException');\n}\n\n/**\n * Checks whether given value's type is a string\n * {@link isString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isString(wat) {\n return isBuiltin(wat, 'String');\n}\n\n/**\n * Checks whether given string is parameterized\n * {@link isParameterizedString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isParameterizedString(wat) {\n return (\n typeof wat === 'object' &&\n wat !== null &&\n '__sentry_template_string__' in wat &&\n '__sentry_template_values__' in wat\n );\n}\n\n/**\n * Checks whether given value is a primitive (undefined, null, number, boolean, string, bigint, symbol)\n * {@link isPrimitive}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isPrimitive(wat) {\n return wat === null || isParameterizedString(wat) || (typeof wat !== 'object' && typeof wat !== 'function');\n}\n\n/**\n * Checks whether given value's type is an object literal, or a class instance.\n * {@link isPlainObject}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isPlainObject(wat) {\n return isBuiltin(wat, 'Object');\n}\n\n/**\n * Checks whether given value's type is an Event instance\n * {@link isEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isEvent(wat) {\n return typeof Event !== 'undefined' && isInstanceOf(wat, Event);\n}\n\n/**\n * Checks whether given value's type is an Element instance\n * {@link isElement}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isElement(wat) {\n return typeof Element !== 'undefined' && isInstanceOf(wat, Element);\n}\n\n/**\n * Checks whether given value's type is an regexp\n * {@link isRegExp}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isRegExp(wat) {\n return isBuiltin(wat, 'RegExp');\n}\n\n/**\n * Checks whether given value has a then function.\n * @param wat A value to be checked.\n */\nfunction isThenable(wat) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return Boolean(wat && wat.then && typeof wat.then === 'function');\n}\n\n/**\n * Checks whether given value's type is a SyntheticEvent\n * {@link isSyntheticEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isSyntheticEvent(wat) {\n return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;\n}\n\n/**\n * Checks whether given value is NaN\n * {@link isNaN}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isNaN(wat) {\n return typeof wat === 'number' && wat !== wat;\n}\n\n/**\n * Checks whether given value's type is an instance of provided constructor.\n * {@link isInstanceOf}.\n *\n * @param wat A value to be checked.\n * @param base A constructor to be used in a check.\n * @returns A boolean representing the result.\n */\nfunction isInstanceOf(wat, base) {\n try {\n return wat instanceof base;\n } catch (_e) {\n return false;\n }\n}\n\n/**\n * Checks whether given value's type is a Vue ViewModel.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isVueViewModel(wat) {\n // Not using Object.prototype.toString because in Vue 3 it would read the instance's Symbol(Symbol.toStringTag) property.\n return !!(typeof wat === 'object' && wat !== null && ((wat ).__isVue || (wat )._isVue));\n}\n\nexport { isDOMError, isDOMException, isElement, isError, isErrorEvent, isEvent, isInstanceOf, isNaN, isParameterizedString, isPlainObject, isPrimitive, isRegExp, isString, isSyntheticEvent, isThenable, isVueViewModel };\n","/** Internal global with common properties and Sentry extensions */\n\n// The code below for 'isGlobalObj' and 'GLOBAL_OBJ' was copied from core-js before modification\n// https://github.com/zloirock/core-js/blob/1b944df55282cdc99c90db5f49eb0b6eda2cc0a3/packages/core-js/internals/global.js\n// core-js has the following licence:\n//\n// Copyright (c) 2014-2022 Denis Pushkarev\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/** Returns 'obj' if it's the global object, otherwise returns undefined */\nfunction isGlobalObj(obj) {\n return obj && obj.Math == Math ? obj : undefined;\n}\n\n/** Get's the global object for the current JavaScript runtime */\nconst GLOBAL_OBJ =\n (typeof globalThis == 'object' && isGlobalObj(globalThis)) ||\n // eslint-disable-next-line no-restricted-globals\n (typeof window == 'object' && isGlobalObj(window)) ||\n (typeof self == 'object' && isGlobalObj(self)) ||\n (typeof global == 'object' && isGlobalObj(global)) ||\n (function () {\n return this;\n })() ||\n {};\n\n/**\n * @deprecated Use GLOBAL_OBJ instead or WINDOW from @sentry/browser. This will be removed in v8\n */\nfunction getGlobalObject() {\n return GLOBAL_OBJ ;\n}\n\n/**\n * Returns a global singleton contained in the global `__SENTRY__` object.\n *\n * If the singleton doesn't already exist in `__SENTRY__`, it will be created using the given factory\n * function and added to the `__SENTRY__` object.\n *\n * @param name name of the global singleton on __SENTRY__\n * @param creator creator Factory function to create the singleton if it doesn't already exist on `__SENTRY__`\n * @param obj (Optional) The global object on which to look for `__SENTRY__`, if not `GLOBAL_OBJ`'s return value\n * @returns the singleton\n */\nfunction getGlobalSingleton(name, creator, obj) {\n const gbl = (obj || GLOBAL_OBJ) ;\n const __SENTRY__ = (gbl.__SENTRY__ = gbl.__SENTRY__ || {});\n const singleton = __SENTRY__[name] || (__SENTRY__[name] = creator());\n return singleton;\n}\n\nexport { GLOBAL_OBJ, getGlobalObject, getGlobalSingleton };\n","import { isString } from './is.js';\nimport { getGlobalObject } from './worldwide.js';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\nconst DEFAULT_MAX_STRING_LENGTH = 80;\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction htmlTreeAsString(\n elem,\n options = {},\n) {\n if (!elem) {\n return '<unknown>';\n }\n\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n let currentElem = elem ;\n const MAX_TRAVERSE_HEIGHT = 5;\n const out = [];\n let height = 0;\n let len = 0;\n const separator = ' > ';\n const sepLength = separator.length;\n let nextStr;\n const keyAttrs = Array.isArray(options) ? options : options.keyAttrs;\n const maxStringLength = (!Array.isArray(options) && options.maxStringLength) || DEFAULT_MAX_STRING_LENGTH;\n\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem, keyAttrs);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds maxStringLength\n // (ignore this limit if we are on the first iteration)\n if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength)) {\n break;\n }\n\n out.push(nextStr);\n\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n\n return out.reverse().join(separator);\n } catch (_oO) {\n return '<unknown>';\n }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el, keyAttrs) {\n const elem = el\n\n;\n\n const out = [];\n let className;\n let classes;\n let key;\n let attr;\n let i;\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n // @ts-expect-error WINDOW has HTMLElement\n if (WINDOW.HTMLElement) {\n // If using the component name annotation plugin, this value may be available on the DOM node\n if (elem instanceof HTMLElement && elem.dataset && elem.dataset['sentryComponent']) {\n return elem.dataset['sentryComponent'];\n }\n }\n\n out.push(elem.tagName.toLowerCase());\n\n // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n const keyAttrPairs =\n keyAttrs && keyAttrs.length\n ? keyAttrs.filter(keyAttr => elem.getAttribute(keyAttr)).map(keyAttr => [keyAttr, elem.getAttribute(keyAttr)])\n : null;\n\n if (keyAttrPairs && keyAttrPairs.length) {\n keyAttrPairs.forEach(keyAttrPair => {\n out.push(`[${keyAttrPair[0]}=\"${keyAttrPair[1]}\"]`);\n });\n } else {\n if (elem.id) {\n out.push(`#${elem.id}`);\n }\n\n // eslint-disable-next-line prefer-const\n className = elem.className;\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push(`.${classes[i]}`);\n }\n }\n }\n const allowedAttrs = ['aria-label', 'type', 'name', 'title', 'alt'];\n for (i = 0; i < allowedAttrs.length; i++) {\n key = allowedAttrs[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push(`[${key}=\"${attr}\"]`);\n }\n }\n return out.join('');\n}\n\n/**\n * A safe form of location.href\n */\nfunction getLocationHref() {\n try {\n return WINDOW.document.location.href;\n } catch (oO) {\n return '';\n }\n}\n\n/**\n * Gets a DOM element by using document.querySelector.\n *\n * This wrapper will first check for the existance of the function before\n * actually calling it so that we don't have to take care of this check,\n * every time we want to access the DOM.\n *\n * Reason: DOM/querySelector is not available in all environments.\n *\n * We have to cast to any because utils can be consumed by a variety of environments,\n * and we don't want to break TS users. If you know what element will be selected by\n * `document.querySelector`, specify it as part of the generic call. For example,\n * `const element = getDomElement<Element>('selector');`\n *\n * @param selector the selector string passed on to document.querySelector\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getDomElement(selector) {\n if (WINDOW.document && WINDOW.document.querySelector) {\n return WINDOW.document.querySelector(selector) ;\n }\n return null;\n}\n\n/**\n * Given a DOM element, traverses up the tree until it finds the first ancestor node\n * that has the `data-sentry-component` attribute. This attribute is added at build-time\n * by projects that have the component name annotation plugin installed.\n *\n * @returns a string representation of the component for the provided DOM element, or `null` if not found\n */\nfunction getComponentName(elem) {\n // @ts-expect-error WINDOW has HTMLElement\n if (!WINDOW.HTMLElement) {\n return null;\n }\n\n let currentElem = elem ;\n const MAX_TRAVERSE_HEIGHT = 5;\n for (let i = 0; i < MAX_TRAVERSE_HEIGHT; i++) {\n if (!currentElem) {\n return null;\n }\n\n if (currentElem instanceof HTMLElement && currentElem.dataset['sentryComponent']) {\n return currentElem.dataset['sentryComponent'];\n }\n\n currentElem = currentElem.parentNode;\n }\n\n return null;\n}\n\nexport { getComponentName, getDomElement, getLocationHref, htmlTreeAsString };\n","/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nexport { DEBUG_BUILD };\n","import { DEBUG_BUILD } from './debug-build.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\n/** Prefix for logging strings */\nconst PREFIX = 'Sentry Logger ';\n\nconst CONSOLE_LEVELS = [\n 'debug',\n 'info',\n 'warn',\n 'error',\n 'log',\n 'assert',\n 'trace',\n] ;\n\n/** This may be mutated by the console instrumentation. */\nconst originalConsoleMethods\n\n = {};\n\n/** JSDoc */\n\n/**\n * Temporarily disable sentry console instrumentations.\n *\n * @param callback The function to run against the original `console` messages\n * @returns The results of the callback\n */\nfunction consoleSandbox(callback) {\n if (!('console' in GLOBAL_OBJ)) {\n return callback();\n }\n\n const console = GLOBAL_OBJ.console ;\n const wrappedFuncs = {};\n\n const wrappedLevels = Object.keys(originalConsoleMethods) ;\n\n // Restore all wrapped console methods\n wrappedLevels.forEach(level => {\n const originalConsoleMethod = originalConsoleMethods[level] ;\n wrappedFuncs[level] = console[level] ;\n console[level] = originalConsoleMethod;\n });\n\n try {\n return callback();\n } finally {\n // Revert restoration to wrapped state\n wrappedLevels.forEach(level => {\n console[level] = wrappedFuncs[level] ;\n });\n }\n}\n\nfunction makeLogger() {\n let enabled = false;\n const logger = {\n enable: () => {\n enabled = true;\n },\n disable: () => {\n enabled = false;\n },\n isEnabled: () => enabled,\n };\n\n if (DEBUG_BUILD) {\n CONSOLE_LEVELS.forEach(name => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n logger[name] = (...args) => {\n if (enabled) {\n consoleSandbox(() => {\n GLOBAL_OBJ.console[name](`${PREFIX}[${name}]:`, ...args);\n });\n }\n };\n });\n } else {\n CONSOLE_LEVELS.forEach(name => {\n logger[name] = () => undefined;\n });\n }\n\n return logger ;\n}\n\nconst logger = makeLogger();\n\nexport { CONSOLE_LEVELS, consoleSandbox, logger, originalConsoleMethods };\n","import { htmlTreeAsString } from './browser.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { isError, isEvent, isInstanceOf, isElement, isPlainObject, isPrimitive } from './is.js';\nimport { logger } from './logger.js';\nimport { truncate } from './string.js';\n\n/**\n * Replace a method in an object with a wrapped version of itself.\n *\n * @param source An object that contains a method to be wrapped.\n * @param name The name of the method to be wrapped.\n * @param replacementFactory A higher-order function that takes the original version of the given method and returns a\n * wrapped version. Note: The function returned by `replacementFactory` needs to be a non-arrow function, in order to\n * preserve the correct value of `this`, and the original method must be called using `origMethod.call(this, <other\n * args>)` or `origMethod.apply(this, [<other args>])` (rather than being called directly), again to preserve `this`.\n * @returns void\n */\nfunction fill(source, name, replacementFactory) {\n if (!(name in source)) {\n return;\n }\n\n const original = source[name] ;\n const wrapped = replacementFactory(original) ;\n\n // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work\n // otherwise it'll throw \"TypeError: Object.defineProperties called on non-object\"\n if (typeof wrapped === 'function') {\n markFunctionWrapped(wrapped, original);\n }\n\n source[name] = wrapped;\n}\n\n/**\n * Defines a non-enumerable property on the given object.\n *\n * @param obj The object on which to set the property\n * @param name The name of the property to be set\n * @param value The value to which to set the property\n */\nfunction addNonEnumerableProperty(obj, name, value) {\n try {\n Object.defineProperty(obj, name, {\n // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it\n value: value,\n writable: true,\n configurable: true,\n });\n } catch (o_O) {\n DEBUG_BUILD && logger.log(`Failed to add non-enumerable property \"${name}\" to object`, obj);\n }\n}\n\n/**\n * Remembers the original function on the wrapped function and\n * patches up the prototype.\n *\n * @param wrapped the wrapper function\n * @param original the original function that gets wrapped\n */\nfunction markFunctionWrapped(wrapped, original) {\n try {\n const proto = original.prototype || {};\n wrapped.prototype = original.prototype = proto;\n addNonEnumerableProperty(wrapped, '__sentry_original__', original);\n } catch (o_O) {} // eslint-disable-line no-empty\n}\n\n/**\n * This extracts the original function if available. See\n * `markFunctionWrapped` for more information.\n *\n * @param func the function to unwrap\n * @returns the unwrapped version of the function if available.\n */\nfunction getOriginalFunction(func) {\n return func.__sentry_original__;\n}\n\n/**\n * Encodes given object into url-friendly format\n *\n * @param object An object that contains serializable values\n * @returns string Encoded\n */\nfunction urlEncode(object) {\n return Object.keys(object)\n .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(object[key])}`)\n .join('&');\n}\n\n/**\n * Transforms any `Error` or `Event` into a plain object with all of their enumerable properties, and some of their\n * non-enumerable properties attached.\n *\n * @param value Initial source that we have to transform in order for it to be usable by the serializer\n * @returns An Event or Error turned into an object - or the value argurment itself, when value is neither an Event nor\n * an Error.\n */\nfunction convertToPlainObject(\n value,\n)\n\n {\n if (isError(value)) {\n return {\n message: value.message,\n name: value.name,\n stack: value.stack,\n ...getOwnProperties(value),\n };\n } else if (isEvent(value)) {\n const newObj\n\n = {\n type: value.type,\n target: serializeEventTarget(value.target),\n currentTarget: serializeEventTarget(value.currentTarget),\n ...getOwnProperties(value),\n };\n\n if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) {\n newObj.detail = value.detail;\n }\n\n return newObj;\n } else {\n return value;\n }\n}\n\n/** Creates a string representation of the target of an `Event` object */\nfunction serializeEventTarget(target) {\n try {\n return isElement(target) ? htmlTreeAsString(target) : Object.prototype.toString.call(target);\n } catch (_oO) {\n return '<unknown>';\n }\n}\n\n/** Filters out all but an object's own properties */\nfunction getOwnProperties(obj) {\n if (typeof obj === 'object' && obj !== null) {\n const extractedProps = {};\n for (const property in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, property)) {\n extractedProps[property] = (obj )[property];\n }\n }\n return extractedProps;\n } else {\n return {};\n }\n}\n\n/**\n * Given any captured exception, extract its keys and create a sorted\n * and truncated list that will be used inside the event message.\n * eg. `Non-error exception captured with keys: foo, bar, baz`\n */\nfunction extractExceptionKeysForMessage(exception, maxLength = 40) {\n const keys = Object.keys(convertToPlainObject(exception));\n keys.sort();\n\n if (!keys.length) {\n return '[object has no keys]';\n }\n\n if (keys[0].length >= maxLength) {\n return truncate(keys[0], maxLength);\n }\n\n for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) {\n const serialized = keys.slice(0, includedKeys).join(', ');\n if (serialized.length > maxLength) {\n continue;\n }\n if (includedKeys === keys.length) {\n return serialized;\n }\n return truncate(serialized, maxLength);\n }\n\n return '';\n}\n\n/**\n * Given any object, return a new object having removed all fields whose value was `undefined`.\n * Works recursively on objects and arrays.\n *\n * Attention: This function keeps circular references in the returned object.\n */\nfunction dropUndefinedKeys(inputValue) {\n // This map keeps track of what already visited nodes map to.\n // Our Set - based memoBuilder doesn't work here because we want to the output object to have the same circular\n // references as the input object.\n const memoizationMap = new Map();\n\n // This function just proxies `_dropUndefinedKeys` to keep the `memoBuilder` out of this function's API\n return _dropUndefinedKeys(inputValue, memoizationMap);\n}\n\nfunction _dropUndefinedKeys(inputValue, memoizationMap) {\n if (isPojo(inputValue)) {\n // If this node has already been visited due to a circular reference, return the object it was mapped to in the new object\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== undefined) {\n return memoVal ;\n }\n\n const returnValue = {};\n // Store the mapping of this value in case we visit it again, in case of circular data\n memoizationMap.set(inputValue, returnValue);\n\n for (const key of Object.keys(inputValue)) {\n if (typeof inputValue[key] !== 'undefined') {\n returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap);\n }\n }\n\n return returnValue ;\n }\n\n if (Array.isArray(inputValue)) {\n // If this node has already been visited due to a circular reference, return the array it was mapped to in the new object\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== undefined) {\n return memoVal ;\n }\n\n const returnValue = [];\n // Store the mapping of this value in case we visit it again, in case of circular data\n memoizationMap.set(inputValue, returnValue);\n\n inputValue.forEach((item) => {\n returnValue.push(_dropUndefinedKeys(item, memoizationMap));\n });\n\n return returnValue ;\n }\n\n return inputValue;\n}\n\nfunction isPojo(input) {\n if (!isPlainObject(input)) {\n return false;\n }\n\n try {\n const name = (Object.getPrototypeOf(input) ).constructor.name;\n return !name || name === 'Object';\n } catch (e) {\n return true;\n }\n}\n\n/**\n * Ensure that something is an object.\n *\n * Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper\n * classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives.\n *\n * @param wat The subject of the objectification\n * @returns A version of `wat` which can safely be used with `Object` class methods\n */\nfunction objectify(wat) {\n let objectified;\n switch (true) {\n case wat === undefined || wat === null:\n objectified = new String(wat);\n break;\n\n // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason\n // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as\n // an object in order to wrap it.\n case typeof wat === 'symbol' || typeof wat === 'bigint':\n objectified = Object(wat);\n break;\n\n // this will catch the remaining primitives: `String`, `Number`, and `Boolean`\n case isPrimitive(wat):\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n objectified = new (wat ).constructor(wat);\n break;\n\n // by process of elimination, at this point we know that `wat` must already be an object\n default:\n objectified = wat;\n break;\n }\n return objectified;\n}\n\nexport { addNonEnumerableProperty, convertToPlainObject, dropUndefinedKeys, extractExceptionKeysForMessage, fill, getOriginalFunction, markFunctionWrapped, objectify, urlEncode };\n","import { node } from './node-stack-trace.js';\nexport { filenameIsInApp } from './node-stack-trace.js';\n\nconst STACKTRACE_FRAME_LIMIT = 50;\n// Used to sanitize webpack (error: *) wrapped stack errors\nconst WEBPACK_ERROR_REGEXP = /\\(error: (.*)\\)/;\nconst STRIP_FRAME_REGEXP = /captureMessage|captureException/;\n\n/**\n * Creates a stack parser with the supplied line parsers\n *\n * StackFrames are returned in the correct order for Sentry Exception\n * frames and with Sentry SDK internal frames removed from the top and bottom\n *\n */\nfunction createStackParser(...parsers) {\n const sortedParsers = parsers.sort((a, b) => a[0] - b[0]).map(p => p[1]);\n\n return (stack, skipFirst = 0) => {\n const frames = [];\n const lines = stack.split('\\n');\n\n for (let i = skipFirst; i < lines.length; i++) {\n const line = lines[i];\n // Ignore lines over 1kb as they are unlikely to be stack frames.\n // Many of the regular expressions use backtracking which results in run time that increases exponentially with\n // input size. Huge strings can result in hangs/Denial of Service:\n // https://github.com/getsentry/sentry-javascript/issues/2286\n if (line.length > 1024) {\n continue;\n }\n\n // https://github.com/getsentry/sentry-javascript/issues/5459\n // Remove webpack (error: *) wrappers\n const cleanedLine = WEBPACK_ERROR_REGEXP.test(line) ? line.replace(WEBPACK_ERROR_REGEXP, '$1') : line;\n\n // https://github.com/getsentry/sentry-javascript/issues/7813\n // Skip Error: lines\n if (cleanedLine.match(/\\S*Error: /)) {\n continue;\n }\n\n for (const parser of sortedParsers) {\n const frame = parser(cleanedLine);\n\n if (frame) {\n frames.push(frame);\n break;\n }\n }\n\n if (frames.length >= STACKTRACE_FRAME_LIMIT) {\n break;\n }\n }\n\n return stripSentryFramesAndReverse(frames);\n };\n}\n\n/**\n * Gets a stack parser implementation from Options.stackParser\n * @see Options\n *\n * If options contains an array of line parsers, it is converted into a parser\n */\nfunction stackParserFromStackParserOptions(stackParser) {\n if (Array.isArray(stackParser)) {\n return createStackParser(...stackParser);\n }\n return stackParser;\n}\n\n/**\n * Removes Sentry frames from the top and bottom of the stack if present and enforces a limit of max number of frames.\n * Assumes stack input is ordered from top to bottom and returns the reverse representation so call site of the\n * function that caused the crash is the last frame in the array.\n * @hidden\n */\nfunction stripSentryFramesAndReverse(stack) {\n if (!stack.length) {\n return [];\n }\n\n const localStack = Array.from(stack);\n\n // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)\n if (/sentryWrapped/.test(localStack[localStack.length - 1].function || '')) {\n localStack.pop();\n }\n\n // Reversing in the middle of the procedure allows us to just pop the values off the stack\n localStack.reverse();\n\n // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)\n if (STRIP_FRAME_REGEXP.test(localStack[localStack.length - 1].function || '')) {\n localStack.pop();\n\n // When using synthetic events, we will have a 2 levels deep stack, as `new Error('Sentry syntheticException')`\n // is produced within the hub itself, making it:\n //\n // Sentry.captureException()\n // getCurrentHub().captureException()\n //\n // instead of just the top `Sentry` call itself.\n // This forces us to possibly strip an additional frame in the exact same was as above.\n if (STRIP_FRAME_REGEXP.test(localStack[localStack.length - 1].function || '')) {\n localStack.pop();\n }\n }\n\n return localStack.slice(0, STACKTRACE_FRAME_LIMIT).map(frame => ({\n ...frame,\n filename: frame.filename || localStack[localStack.length - 1].filename,\n function: frame.function || '?',\n }));\n}\n\nconst defaultFunctionName = '<anonymous>';\n\n/**\n * Safely extract function name from itself\n */\nfunction getFunctionName(fn) {\n try {\n if (!fn || typeof fn !== 'function') {\n return defaultFunctionName;\n }\n return fn.name || defaultFunctionName;\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n return defaultFunctionName;\n }\n}\n\n/**\n * Node.js stack line parser\n *\n * This is in @sentry/utils so it can be used from the Electron SDK in the browser for when `nodeIntegration == true`.\n * This allows it to be used without referencing or importing any node specific code which causes bundlers to complain\n */\nfunction nodeStackLineParser(getModule) {\n return [90, node(getModule)];\n}\n\nexport { createStackParser, getFunctionName, nodeStackLineParser, stackParserFromStackParserOptions, stripSentryFramesAndReverse };\n","import { isNaN, isVueViewModel, isSyntheticEvent } from './is.js';\nimport { memoBuilder } from './memo.js';\nimport { convertToPlainObject } from './object.js';\nimport { getFunctionName } from './stacktrace.js';\n\n/**\n * Recursively normalizes the given object.\n *\n * - Creates a copy to prevent original input mutation\n * - Skips non-enumerable properties\n * - When stringifying, calls `toJSON` if implemented\n * - Removes circular references\n * - Translates non-serializable values (`undefined`/`NaN`/functions) to serializable format\n * - Translates known global objects/classes to a string representations\n * - Takes care of `Error` object serialization\n * - Optionally limits depth of final output\n * - Optionally limits number of properties/elements included in any single object/array\n *\n * @param input The object to be normalized.\n * @param depth The max depth to which to normalize the object. (Anything deeper stringified whole.)\n * @param maxProperties The max number of elements or properties to be included in any single array or\n * object in the normallized output.\n * @returns A normalized version of the object, or `\"**non-serializable**\"` if any errors are thrown during normalization.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction normalize(input, depth = 100, maxProperties = +Infinity) {\n try {\n // since we're at the outermost level, we don't provide a key\n return visit('', input, depth, maxProperties);\n } catch (err) {\n return { ERROR: `**non-serializable** (${err})` };\n }\n}\n\n/** JSDoc */\nfunction normalizeToSize(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n object,\n // Default Node.js REPL depth\n depth = 3,\n // 100kB, as 200kB is max payload size, so half sounds reasonable\n maxSize = 100 * 1024,\n) {\n const normalized = normalize(object, depth);\n\n if (jsonSize(normalized) > maxSize) {\n return normalizeToSize(object, depth - 1, maxSize);\n }\n\n return normalized ;\n}\n\n/**\n * Visits a node to perform normalization on it\n *\n * @param key The key corresponding to the given node\n * @param value The node to be visited\n * @param depth Optional number indicating the maximum recursion depth\n * @param maxProperties Optional maximum number of properties/elements included in any single object/array\n * @param memo Optional Memo class handling decycling\n */\nfunction visit(\n key,\n value,\n depth = +Infinity,\n maxProperties = +Infinity,\n memo = memoBuilder(),\n) {\n const [memoize, unmemoize] = memo;\n\n // Get the simple cases out of the way first\n if (\n value == null || // this matches null and undefined -> eqeq not eqeqeq\n (['number', 'boolean', 'string'].includes(typeof value) && !isNaN(value))\n ) {\n return value ;\n }\n\n const stringified = stringifyValue(key, value);\n\n // Anything we could potentially dig into more (objects or arrays) will have come back as `\"[object XXXX]\"`.\n // Everything else will have already been serialized, so if we don't see that pattern, we're done.\n if (!stringified.startsWith('[object ')) {\n return stringified;\n }\n\n // From here on, we can assert that `value` is either an object or an array.\n\n // Do not normalize objects that we know have already been normalized. As a general rule, the\n // \"__sentry_skip_normalization__\" property should only be used sparingly and only should only be set on objects that\n // have already been normalized.\n if ((value )['__sentry_skip_normalization__']) {\n return value ;\n }\n\n // We can set `__sentry_override_normalization_depth__` on an object to ensure that from there\n // We keep a certain amount of depth.\n // This should be used sparingly, e.g. we use it for the redux integration to ensure we get a certain amount of state.\n const remainingDepth =\n typeof (value )['__sentry_override_normalization_depth__'] === 'number'\n ? ((value )['__sentry_override_normalization_depth__'] )\n : depth;\n\n // We're also done if we've reached the max depth\n if (remainingDepth === 0) {\n // At this point we know `serialized` is a string of the form `\"[object XXXX]\"`. Clean it up so it's just `\"[XXXX]\"`.\n return stringified.replace('object ', '');\n }\n\n // If we've already visited this branch, bail out, as it's circular reference. If not, note that we're seeing it now.\n if (memoize(value)) {\n return '[Circular ~]';\n }\n\n // If the value has a `toJSON` method, we call it to extract more information\n const valueWithToJSON = value ;\n if (valueWithToJSON && typeof valueWithToJSON.toJSON === 'function') {\n try {\n const jsonValue = valueWithToJSON.toJSON();\n // We need to normalize the return value of `.toJSON()` in case it has circular references\n return visit('', jsonValue, remainingDepth - 1, maxProperties, memo);\n } catch (err) {\n // pass (The built-in `toJSON` failed, but we can still try to do it ourselves)\n }\n }\n\n // At this point we know we either have an object or an array, we haven't seen it before, and we're going to recurse\n // because we haven't yet reached the max depth. Create an accumulator to hold the results of visiting each\n // property/entry, and keep track of the number of items we add to it.\n const normalized = (Array.isArray(value) ? [] : {}) ;\n let numAdded = 0;\n\n // Before we begin, convert`Error` and`Event` instances into plain objects, since some of each of their relevant\n // properties are non-enumerable and otherwise would get missed.\n const visitable = convertToPlainObject(value );\n\n for (const visitKey in visitable) {\n // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.\n if (!Object.prototype.hasOwnProperty.call(visitable, visitKey)) {\n continue;\n }\n\n if (numAdded >= maxProperties) {\n normalized[visitKey] = '[MaxProperties ~]';\n break;\n }\n\n // Recursively visit all the child nodes\n const visitValue = visitable[visitKey];\n normalized[visitKey] = visit(visitKey, visitValue, remainingDepth - 1, maxProperties, memo);\n\n numAdded++;\n }\n\n // Once we've visited all the branches, remove the parent from memo storage\n unmemoize(value);\n\n // Return accumulated values\n return normalized;\n}\n\n/* eslint-disable complexity */\n/**\n * Stringify the given value. Handles various known special values and types.\n *\n * Not meant to be used on simple primitives which already have a string representation, as it will, for example, turn\n * the number 1231 into \"[Object Number]\", nor on `null`, as it will throw.\n *\n * @param value The value to stringify\n * @returns A stringified representation of the given value\n */\nfunction stringifyValue(\n key,\n // this type is a tiny bit of a cheat, since this function does handle NaN (which is technically a number), but for\n // our internal use, it'll do\n value,\n) {\n try {\n if (key === 'domain' && value && typeof value === 'object' && (value )._events) {\n return '[Domain]';\n }\n\n if (key === 'domainEmitter') {\n return '[DomainEmitter]';\n }\n\n // It's safe to use `global`, `window`, and `document` here in this manner, as we are asserting using `typeof` first\n // which won't throw if they are not present.\n\n if (typeof global !== 'undefined' && value === global) {\n return '[Global]';\n }\n\n // eslint-disable-next-line no-restricted-globals\n if (typeof window !== 'undefined' && value === window) {\n return '[Window]';\n }\n\n // eslint-disable-next-line no-restricted-globals\n if (typeof document !== 'undefined' && value === document) {\n return '[Document]';\n }\n\n if (isVueViewModel(value)) {\n return '[VueViewModel]';\n }\n\n // React's SyntheticEvent thingy\n if (isSyntheticEvent(value)) {\n return '[SyntheticEvent]';\n }\n\n if (typeof value === 'number' && value !== value) {\n return '[NaN]';\n }\n\n if (typeof value === 'function') {\n return `[Function: ${getFunctionName(value)}]`;\n }\n\n if (typeof value === 'symbol') {\n return `[${String(value)}]`;\n }\n\n // stringified BigInts are indistinguishable from regular numbers, so we need to label them to avoid confusion\n if (typeof value === 'bigint') {\n return `[BigInt: ${String(value)}]`;\n }\n\n // Now that we've knocked out all the special cases and the primitives, all we have left are objects. Simply casting\n // them to strings means that instances of classes which haven't defined their `toStringTag` will just come out as\n // `\"[object Object]\"`. If we instead look at the constructor's name (which is the same as the name of the class),\n // we can make sure that only plain objects come out that way.\n const objName = getConstructorName(value);\n\n // Handle HTML Elements\n if (/^HTML(\\w*)Element$/.test(objName)) {\n return `[HTMLElement: ${objName}]`;\n }\n\n return `[object ${objName}]`;\n } catch (err) {\n return `**non-serializable** (${err})`;\n }\n}\n/* eslint-enable complexity */\n\nfunction getConstructorName(value) {\n const prototype = Object.getPrototypeOf(value);\n\n return prototype ? prototype.constructor.name : 'null prototype';\n}\n\n/** Calculates bytes size of input string */\nfunction utf8Length(value) {\n // eslint-disable-next-line no-bitwise\n return ~-encodeURI(value).split(/%..|./).length;\n}\n\n/** Calculates bytes size of input object */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction jsonSize(value) {\n return utf8Length(JSON.stringify(value));\n}\n\n/**\n * Normalizes URLs in exceptions and stacktraces to a base path so Sentry can fingerprint\n * across platforms and working directory.\n *\n * @param url The URL to be normalized.\n * @param basePath The application base path.\n * @returns The normalized URL.\n */\nfunction normalizeUrlToBase(url, basePath) {\n const escapedBase = basePath\n // Backslash to forward\n .replace(/\\\\/g, '/')\n // Escape RegExp special characters\n .replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&');\n\n let newUrl = url;\n try {\n newUrl = decodeURI(url);\n } catch (_Oo) {\n // Sometime this breaks\n }\n return (\n newUrl\n .replace(/\\\\/g, '/')\n .replace(/webpack:\\/?/g, '') // Remove intermediate base path\n // eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor\n .replace(new RegExp(`(file://)?/*${escapedBase}/*`, 'ig'), 'app:///')\n );\n}\n\nexport { normalize, normalizeToSize, normalizeUrlToBase, visit as walk };\n","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/**\n * Helper to decycle json objects\n */\nfunction memoBuilder() {\n const hasWeakSet = typeof WeakSet === 'function';\n const inner = hasWeakSet ? new WeakSet() : [];\n function memoize(obj) {\n if (hasWeakSet) {\n if (inner.has(obj)) {\n return true;\n }\n inner.add(obj);\n return false;\n }\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < inner.length; i++) {\n const value = inner[i];\n if (value === obj) {\n return true;\n }\n }\n inner.push(obj);\n return false;\n }\n\n function unmemoize(obj) {\n if (hasWeakSet) {\n inner.delete(obj);\n } else {\n for (let i = 0; i < inner.length; i++) {\n if (inner[i] === obj) {\n inner.splice(i, 1);\n break;\n }\n }\n }\n }\n return [memoize, unmemoize];\n}\n\nexport { memoBuilder };\n","/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nexport { DEBUG_BUILD };\n","import { defineIntegration, convertIntegrationFnToClass } from '@sentry/core';\nimport { isError, normalize, isPlainObject, addNonEnumerableProperty, logger } from '@sentry/utils';\nimport { DEBUG_BUILD } from './debug-build.js';\n\nconst INTEGRATION_NAME = 'ExtraErrorData';\n\nconst _extraErrorDataIntegration = ((options = {}) => {\n const depth = options.depth || 3;\n\n // TODO(v8): Flip the default for this option to true\n const captureErrorCause = options.captureErrorCause || false;\n\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function\n processEvent(event, hint) {\n return _enhanceEventWithErrorData(event, hint, depth, captureErrorCause);\n },\n };\n}) ;\n\nconst extraErrorDataIntegration = defineIntegration(_extraErrorDataIntegration);\n\n/**\n * Extract additional data for from original exceptions.\n * @deprecated Use `extraErrorDataIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst ExtraErrorData = convertIntegrationFnToClass(\n INTEGRATION_NAME,\n extraErrorDataIntegration,\n)\n\n;\n\nfunction _enhanceEventWithErrorData(\n event,\n hint = {},\n depth,\n captureErrorCause,\n) {\n if (!hint.originalException || !isError(hint.originalException)) {\n return event;\n }\n const exceptionName = (hint.originalException ).name || hint.originalException.constructor.name;\n\n const errorData = _extractErrorData(hint.originalException , captureErrorCause);\n\n if (errorData) {\n const contexts = {\n ...event.contexts,\n };\n\n const normalizedErrorData = normalize(errorData, depth);\n\n if (isPlainObject(normalizedErrorData)) {\n // We mark the error data as \"already normalized\" here, because we don't want other normalization procedures to\n // potentially truncate the data we just already normalized, with a certain depth setting.\n addNonEnumerableProperty(normalizedErrorData, '__sentry_skip_normalization__', true);\n contexts[exceptionName] = normalizedErrorData;\n }\n\n return {\n ...event,\n contexts,\n };\n }\n\n return event;\n}\n\n/**\n * Extract extra information from the Error object\n */\nfunction _extractErrorData(error, captureErrorCause) {\n // We are trying to enhance already existing event, so no harm done if it won't succeed\n try {\n const nativeKeys = [\n 'name',\n 'message',\n 'stack',\n 'line',\n 'column',\n 'fileName',\n 'lineNumber',\n 'columnNumber',\n 'toJSON',\n ];\n\n const extraErrorInfo = {};\n\n // We want only enumerable properties, thus `getOwnPropertyNames` is redundant here, as we filter keys anyway.\n for (const key of Object.keys(error)) {\n if (nativeKeys.indexOf(key) !== -1) {\n continue;\n }\n const value = error[key];\n extraErrorInfo[key] = isError(value) ? value.toString() : value;\n }\n\n // Error.cause is a standard property that is non enumerable, we therefore need to access it separately.\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause\n if (captureErrorCause && error.cause !== undefined) {\n extraErrorInfo.cause = isError(error.cause) ? error.cause.toString() : error.cause;\n }\n\n // Check if someone attached `toJSON` method to grab even more properties (eg. axios is doing that)\n if (typeof error.toJSON === 'function') {\n const serializedError = error.toJSON() ;\n\n for (const key of Object.keys(serializedError)) {\n const value = serializedError[key];\n extraErrorInfo[key] = isError(value) ? value.toString() : value;\n }\n }\n\n return extraErrorInfo;\n } catch (oO) {\n DEBUG_BUILD && logger.error('Unable to extract extra data from the Error object:', oO);\n }\n\n return null;\n}\n\nexport { ExtraErrorData, extraErrorDataIntegration };\n","import { defineIntegration, convertIntegrationFnToClass } from '@sentry/core';\nimport { consoleSandbox } from '@sentry/utils';\n\nconst INTEGRATION_NAME = 'Debug';\n\nconst _debugIntegration = ((options = {}) => {\n const _options = {\n debugger: false,\n stringify: false,\n ...options,\n };\n\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function\n setup(client) {\n if (!client.on) {\n return;\n }\n\n client.on('beforeSendEvent', (event, hint) => {\n if (_options.debugger) {\n // eslint-disable-next-line no-debugger\n debugger;\n }\n\n /* eslint-disable no-console */\n consoleSandbox(() => {\n if (_options.stringify) {\n console.log(JSON.stringify(event, null, 2));\n if (hint && Object.keys(hint).length) {\n console.log(JSON.stringify(hint, null, 2));\n }\n } else {\n console.log(event);\n if (hint && Object.keys(hint).length) {\n console.log(hint);\n }\n }\n });\n /* eslint-enable no-console */\n });\n },\n };\n}) ;\n\nconst debugIntegration = defineIntegration(_debugIntegration);\n\n/**\n * Integration to debug sent Sentry events.\n * This integration should not be used in production.\n *\n * @deprecated Use `debugIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst Debug = convertIntegrationFnToClass(INTEGRATION_NAME, debugIntegration)\n\n;\n\nexport { Debug, debugIntegration };\n","import { addNonEnumerableProperty } from './object.js';\nimport { snipLine } from './string.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\n/**\n * UUID4 generator\n *\n * @returns string Generated UUID4.\n */\nfunction uuid4() {\n const gbl = GLOBAL_OBJ ;\n const crypto = gbl.crypto || gbl.msCrypto;\n\n let getRandomByte = () => Math.random() * 16;\n try {\n if (crypto && crypto.randomUUID) {\n return crypto.randomUUID().replace(/-/g, '');\n }\n if (crypto && crypto.getRandomValues) {\n getRandomByte = () => {\n // crypto.getRandomValues might return undefined instead of the typed array\n // in old Chromium versions (e.g. 23.0.1235.0 (151422))\n // However, `typedArray` is still filled in-place.\n // @see https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues#typedarray\n const typedArray = new Uint8Array(1);\n crypto.getRandomValues(typedArray);\n return typedArray[0];\n };\n }\n } catch (_) {\n // some runtimes can crash invoking crypto\n // https://github.com/getsentry/sentry-javascript/issues/8935\n }\n\n // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n // Concatenating the following numbers as strings results in '10000000100040008000100000000000'\n return (([1e7] ) + 1e3 + 4e3 + 8e3 + 1e11).replace(/[018]/g, c =>\n // eslint-disable-next-line no-bitwise\n ((c ) ^ ((getRandomByte() & 15) >> ((c ) / 4))).toString(16),\n );\n}\n\nfunction getFirstException(event) {\n return event.exception && event.exception.values ? event.exception.values[0] : undefined;\n}\n\n/**\n * Extracts either message or type+value from an event that can be used for user-facing logs\n * @returns event's description\n */\nfunction getEventDescription(event) {\n const { message, event_id: eventId } = event;\n if (message) {\n return message;\n }\n\n const firstException = getFirstException(event);\n if (firstException) {\n if (firstException.type && firstException.value) {\n return `${firstException.type}: ${firstException.value}`;\n }\n return firstException.type || firstException.value || eventId || '<unknown>';\n }\n return eventId || '<unknown>';\n}\n\n/**\n * Adds exception values, type and value to an synthetic Exception.\n * @param event The event to modify.\n * @param value Value of the exception.\n * @param type Type of the exception.\n * @hidden\n */\nfunction addExceptionTypeValue(event, value, type) {\n const exception = (event.exception = event.exception || {});\n const values = (exception.values = exception.values || []);\n const firstException = (values[0] = values[0] || {});\n if (!firstException.value) {\n firstException.value = value || '';\n }\n if (!firstException.type) {\n firstException.type = type || 'Error';\n }\n}\n\n/**\n * Adds exception mechanism data to a given event. Uses defaults if the second parameter is not passed.\n *\n * @param event The event to modify.\n * @param newMechanism Mechanism data to add to the event.\n * @hidden\n */\nfunction addExceptionMechanism(event, newMechanism) {\n const firstException = getFirstException(event);\n if (!firstException) {\n return;\n }\n\n const defaultMechanism = { type: 'generic', handled: true };\n const currentMechanism = firstException.mechanism;\n firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism };\n\n if (newMechanism && 'data' in newMechanism) {\n const mergedData = { ...(currentMechanism && currentMechanism.data), ...newMechanism.data };\n firstException.mechanism.data = mergedData;\n }\n}\n\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nconst SEMVER_REGEXP =\n /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/;\n\n/**\n * Represents Semantic Versioning object\n */\n\n/**\n * Parses input into a SemVer interface\n * @param input string representation of a semver version\n */\nfunction parseSemver(input) {\n const match = input.match(SEMVER_REGEXP) || [];\n const major = parseInt(match[1], 10);\n const minor = parseInt(match[2], 10);\n const patch = parseInt(match[3], 10);\n return {\n buildmetadata: match[5],\n major: isNaN(major) ? undefined : major,\n minor: isNaN(minor) ? undefined : minor,\n patch: isNaN(patch) ? undefined : patch,\n prerelease: match[4],\n };\n}\n\n/**\n * This function adds context (pre/post/line) lines to the provided frame\n *\n * @param lines string[] containing all lines\n * @param frame StackFrame that will be mutated\n * @param linesOfContext number of context lines we want to add pre/post\n */\nfunction addContextToFrame(lines, frame, linesOfContext = 5) {\n // When there is no line number in the frame, attaching context is nonsensical and will even break grouping\n if (frame.lineno === undefined) {\n return;\n }\n\n const maxLines = lines.length;\n const sourceLine = Math.max(Math.min(maxLines - 1, frame.lineno - 1), 0);\n\n frame.pre_context = lines\n .slice(Math.max(0, sourceLine - linesOfContext), sourceLine)\n .map((line) => snipLine(line, 0));\n\n frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);\n\n frame.post_context = lines\n .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)\n .map((line) => snipLine(line, 0));\n}\n\n/**\n * Checks whether or not we've already captured the given exception (note: not an identical exception - the very object\n * in question), and marks it captured if not.\n *\n * This is useful because it's possible for an error to get captured by more than one mechanism. After we intercept and\n * record an error, we rethrow it (assuming we've intercepted it before it's reached the top-level global handlers), so\n * that we don't interfere with whatever effects the error might have had were the SDK not there. At that point, because\n * the error has been rethrown, it's possible for it to bubble up to some other code we've instrumented. If it's not\n * caught after that, it will bubble all the way up to the global handlers (which of course we also instrument). This\n * function helps us ensure that even if we encounter the same error more than once, we only record it the first time we\n * see it.\n *\n * Note: It will ignore primitives (always return `false` and not mark them as seen), as properties can't be set on\n * them. {@link: Object.objectify} can be used on exceptions to convert any that are primitives into their equivalent\n * object wrapper forms so that this check will always work. However, because we need to flag the exact object which\n * will get rethrown, and because that rethrowing happens outside of the event processing pipeline, the objectification\n * must be done before the exception captured.\n *\n * @param A thrown exception to check or flag as having been seen\n * @returns `true` if the exception has already been captured, `false` if not (with the side effect of marking it seen)\n */\nfunction checkOrSetAlreadyCaught(exception) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (exception && (exception ).__sentry_captured__) {\n return true;\n }\n\n try {\n // set it this way rather than by assignment so that it's not ennumerable and therefore isn't recorded by the\n // `ExtraErrorData` integration\n addNonEnumerableProperty(exception , '__sentry_captured__', true);\n } catch (err) {\n // `exception` is a primitive, so we can't mark it seen\n }\n\n return false;\n}\n\n/**\n * Checks whether the given input is already an array, and if it isn't, wraps it in one.\n *\n * @param maybeArray Input to turn into an array, if necessary\n * @returns The input, if already an array, or an array with the input as the only element, if not\n */\nfunction arrayify(maybeArray) {\n return Array.isArray(maybeArray) ? maybeArray : [maybeArray];\n}\n\nexport { addContextToFrame, addExceptionMechanism, addExceptionTypeValue, arrayify, checkOrSetAlreadyCaught, getEventDescription, parseSemver, uuid4 };\n","import { GLOBAL_OBJ } from './worldwide.js';\n\nconst ONE_SECOND_IN_MS = 1000;\n\n/**\n * A partial definition of the [Performance Web API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Performance}\n * for accessing a high-resolution monotonic clock.\n */\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using the Date API.\n *\n * TODO(v8): Return type should be rounded.\n */\nfunction dateTimestampInSeconds() {\n return Date.now() / ONE_SECOND_IN_MS;\n}\n\n/**\n * Returns a wrapper around the native Performance API browser implementation, or undefined for browsers that do not\n * support the API.\n *\n * Wrapping the native API works around differences in behavior from different browsers.\n */\nfunction createUnixTimestampInSecondsFunc() {\n const { performance } = GLOBAL_OBJ ;\n if (!performance || !performance.now) {\n return dateTimestampInSeconds;\n }\n\n // Some browser and environments don't have a timeOrigin, so we fallback to\n // using Date.now() to compute the starting time.\n const approxStartingTimeOrigin = Date.now() - performance.now();\n const timeOrigin = performance.timeOrigin == undefined ? approxStartingTimeOrigin : performance.timeOrigin;\n\n // performance.now() is a monotonic clock, which means it starts at 0 when the process begins. To get the current\n // wall clock time (actual UNIX timestamp), we need to add the starting time origin and the current time elapsed.\n //\n // TODO: This does not account for the case where the monotonic clock that powers performance.now() drifts from the\n // wall clock time, which causes the returned timestamp to be inaccurate. We should investigate how to detect and\n // correct for this.\n // See: https://github.com/getsentry/sentry-javascript/issues/2590\n // See: https://github.com/mdn/content/issues/4713\n // See: https://dev.to/noamr/when-a-millisecond-is-not-a-millisecond-3h6\n return () => {\n return (timeOrigin + performance.now()) / ONE_SECOND_IN_MS;\n };\n}\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using either the Performance or Date APIs, depending on the\n * availability of the Performance API.\n *\n * BUG: Note that because of how browsers implement the Performance API, the clock might stop when the computer is\n * asleep. This creates a skew between `dateTimestampInSeconds` and `timestampInSeconds`. The\n * skew can grow to arbitrary amounts like days, weeks or months.\n * See https://github.com/getsentry/sentry-javascript/issues/2590.\n */\nconst timestampInSeconds = createUnixTimestampInSecondsFunc();\n\n/**\n * Re-exported with an old name for backwards-compatibility.\n * TODO (v8): Remove this\n *\n * @deprecated Use `timestampInSeconds` instead.\n */\nconst timestampWithMs = timestampInSeconds;\n\n/**\n * Internal helper to store what is the source of browserPerformanceTimeOrigin below. For debugging only.\n */\nlet _browserPerformanceTimeOriginMode;\n\n/**\n * The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the\n * performance API is available.\n */\nconst browserPerformanceTimeOrigin = (() => {\n // Unfortunately browsers may report an inaccurate time origin data, through either performance.timeOrigin or\n // performance.timing.navigationStart, which results in poor results in performance data. We only treat time origin\n // data as reliable if they are within a reasonable threshold of the current time.\n\n const { performance } = GLOBAL_OBJ ;\n if (!performance || !performance.now) {\n _browserPerformanceTimeOriginMode = 'none';\n return undefined;\n }\n\n const threshold = 3600 * 1000;\n const performanceNow = performance.now();\n const dateNow = Date.now();\n\n // if timeOrigin isn't available set delta to threshold so it isn't used\n const timeOriginDelta = performance.timeOrigin\n ? Math.abs(performance.timeOrigin + performanceNow - dateNow)\n : threshold;\n const timeOriginIsReliable = timeOriginDelta < threshold;\n\n // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin\n // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.\n // Also as of writing, performance.timing is not available in Web Workers in mainstream browsers, so it is not always\n // a valid fallback. In the absence of an initial time provided by the browser, fallback to the current time from the\n // Date API.\n // eslint-disable-next-line deprecation/deprecation\n const navigationStart = performance.timing && performance.timing.navigationStart;\n const hasNavigationStart = typeof navigationStart === 'number';\n // if navigationStart isn't available set delta to threshold so it isn't used\n const navigationStartDelta = hasNavigationStart ? Math.abs(navigationStart + performanceNow - dateNow) : threshold;\n const navigationStartIsReliable = navigationStartDelta < threshold;\n\n if (timeOriginIsReliable || navigationStartIsReliable) {\n // Use the more reliable time origin\n if (timeOriginDelta <= navigationStartDelta) {\n _browserPerformanceTimeOriginMode = 'timeOrigin';\n return performance.timeOrigin;\n } else {\n _browserPerformanceTimeOriginMode = 'navigationStart';\n return navigationStart;\n }\n }\n\n // Either both timeOrigin and navigationStart are skewed or neither is available, fallback to Date.\n _browserPerformanceTimeOriginMode = 'dateNow';\n return dateNow;\n})();\n\nexport { _browserPerformanceTimeOriginMode, browserPerformanceTimeOrigin, dateTimestampInSeconds, timestampInSeconds, timestampWithMs };\n","const DEFAULT_ENVIRONMENT = 'production';\n\nexport { DEFAULT_ENVIRONMENT };\n","/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nexport { DEBUG_BUILD };\n","import { isThenable } from './is.js';\n\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\n\n/** SyncPromise internal states */\nvar States; (function (States) {\n /** Pending */\n const PENDING = 0; States[States[\"PENDING\"] = PENDING] = \"PENDING\";\n /** Resolved / OK */\n const RESOLVED = 1; States[States[\"RESOLVED\"] = RESOLVED] = \"RESOLVED\";\n /** Rejected / Error */\n const REJECTED = 2; States[States[\"REJECTED\"] = REJECTED] = \"REJECTED\";\n})(States || (States = {}));\n\n// Overloads so we can call resolvedSyncPromise without arguments and generic argument\n\n/**\n * Creates a resolved sync promise.\n *\n * @param value the value to resolve the promise with\n * @returns the resolved sync promise\n */\nfunction resolvedSyncPromise(value) {\n return new SyncPromise(resolve => {\n resolve(value);\n });\n}\n\n/**\n * Creates a rejected sync promise.\n *\n * @param value the value to reject the promise with\n * @returns the rejected sync promise\n */\nfunction rejectedSyncPromise(reason) {\n return new SyncPromise((_, reject) => {\n reject(reason);\n });\n}\n\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\nclass SyncPromise {\n\n constructor(\n executor,\n ) {SyncPromise.prototype.__init.call(this);SyncPromise.prototype.__init2.call(this);SyncPromise.prototype.__init3.call(this);SyncPromise.prototype.__init4.call(this);\n this._state = States.PENDING;\n this._handlers = [];\n\n try {\n executor(this._resolve, this._reject);\n } catch (e) {\n this._reject(e);\n }\n }\n\n /** JSDoc */\n then(\n onfulfilled,\n onrejected,\n ) {\n return new SyncPromise((resolve, reject) => {\n this._handlers.push([\n false,\n result => {\n if (!onfulfilled) {\n // TODO: ¯\\_(ツ)_/¯\n // TODO: FIXME\n resolve(result );\n } else {\n try {\n resolve(onfulfilled(result));\n } catch (e) {\n reject(e);\n }\n }\n },\n reason => {\n if (!onrejected) {\n reject(reason);\n } else {\n try {\n resolve(onrejected(reason));\n } catch (e) {\n reject(e);\n }\n }\n },\n ]);\n this._executeHandlers();\n });\n }\n\n /** JSDoc */\n catch(\n onrejected,\n ) {\n return this.then(val => val, onrejected);\n }\n\n /** JSDoc */\n finally(onfinally) {\n return new SyncPromise((resolve, reject) => {\n let val;\n let isRejected;\n\n return this.then(\n value => {\n isRejected = false;\n val = value;\n if (onfinally) {\n onfinally();\n }\n },\n reason => {\n isRejected = true;\n val = reason;\n if (onfinally) {\n onfinally();\n }\n },\n ).then(() => {\n if (isRejected) {\n reject(val);\n return;\n }\n\n resolve(val );\n });\n });\n }\n\n /** JSDoc */\n __init() {this._resolve = (value) => {\n this._setResult(States.RESOLVED, value);\n };}\n\n /** JSDoc */\n __init2() {this._reject = (reason) => {\n this._setResult(States.REJECTED, reason);\n };}\n\n /** JSDoc */\n __init3() {this._setResult = (state, value) => {\n if (this._state !== States.PENDING) {\n return;\n }\n\n if (isThenable(value)) {\n void (value ).then(this._resolve, this._reject);\n return;\n }\n\n this._state = state;\n this._value = value;\n\n this._executeHandlers();\n };}\n\n /** JSDoc */\n __init4() {this._executeHandlers = () => {\n if (this._state === States.PENDING) {\n return;\n }\n\n const cachedHandlers = this._handlers.slice();\n this._handlers = [];\n\n cachedHandlers.forEach(handler => {\n if (handler[0]) {\n return;\n }\n\n if (this._state === States.RESOLVED) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n handler[1](this._value );\n }\n\n if (this._state === States.REJECTED) {\n handler[2](this._value);\n }\n\n handler[0] = true;\n });\n };}\n}\n\nexport { SyncPromise, rejectedSyncPromise, resolvedSyncPromise };\n","import { SyncPromise, logger, isThenable, getGlobalSingleton } from '@sentry/utils';\nimport { DEBUG_BUILD } from './debug-build.js';\n\n/**\n * Returns the global event processors.\n * @deprecated Global event processors will be removed in v8.\n */\nfunction getGlobalEventProcessors() {\n return getGlobalSingleton('globalEventProcessors', () => []);\n}\n\n/**\n * Add a EventProcessor to be kept globally.\n * @deprecated Use `addEventProcessor` instead. Global event processors will be removed in v8.\n */\nfunction addGlobalEventProcessor(callback) {\n // eslint-disable-next-line deprecation/deprecation\n getGlobalEventProcessors().push(callback);\n}\n\n/**\n * Process an array of event processors, returning the processed event (or `null` if the event was dropped).\n */\nfunction notifyEventProcessors(\n processors,\n event,\n hint,\n index = 0,\n) {\n return new SyncPromise((resolve, reject) => {\n const processor = processors[index];\n if (event === null || typeof processor !== 'function') {\n resolve(event);\n } else {\n const result = processor({ ...event }, hint) ;\n\n DEBUG_BUILD && processor.id && result === null && logger.log(`Event processor \"${processor.id}\" dropped event`);\n\n if (isThenable(result)) {\n void result\n .then(final => notifyEventProcessors(processors, final, hint, index + 1).then(resolve))\n .then(null, reject);\n } else {\n void notifyEventProcessors(processors, result, hint, index + 1)\n .then(resolve)\n .then(null, reject);\n }\n }\n });\n}\n\nexport { addGlobalEventProcessor, getGlobalEventProcessors, notifyEventProcessors };\n","import { timestampInSeconds, uuid4, dropUndefinedKeys } from '@sentry/utils';\n\n/**\n * Creates a new `Session` object by setting certain default parameters. If optional @param context\n * is passed, the passed properties are applied to the session object.\n *\n * @param context (optional) additional properties to be applied to the returned session object\n *\n * @returns a new `Session` object\n */\nfunction makeSession(context) {\n // Both timestamp and started are in seconds since the UNIX epoch.\n const startingTime = timestampInSeconds();\n\n const session = {\n sid: uuid4(),\n init: true,\n timestamp: startingTime,\n started: startingTime,\n duration: 0,\n status: 'ok',\n errors: 0,\n ignoreDuration: false,\n toJSON: () => sessionToJSON(session),\n };\n\n if (context) {\n updateSession(session, context);\n }\n\n return session;\n}\n\n/**\n * Updates a session object with the properties passed in the context.\n *\n * Note that this function mutates the passed object and returns void.\n * (Had to do this instead of returning a new and updated session because closing and sending a session\n * makes an update to the session after it was passed to the sending logic.\n * @see BaseClient.captureSession )\n *\n * @param session the `Session` to update\n * @param context the `SessionContext` holding the properties that should be updated in @param session\n */\n// eslint-disable-next-line complexity\nfunction updateSession(session, context = {}) {\n if (context.user) {\n if (!session.ipAddress && context.user.ip_address) {\n session.ipAddress = context.user.ip_address;\n }\n\n if (!session.did && !context.did) {\n session.did = context.user.id || context.user.email || context.user.username;\n }\n }\n\n session.timestamp = context.timestamp || timestampInSeconds();\n\n if (context.abnormal_mechanism) {\n session.abnormal_mechanism = context.abnormal_mechanism;\n }\n\n if (context.ignoreDuration) {\n session.ignoreDuration = context.ignoreDuration;\n }\n if (context.sid) {\n // Good enough uuid validation. — Kamil\n session.sid = context.sid.length === 32 ? context.sid : uuid4();\n }\n if (context.init !== undefined) {\n session.init = context.init;\n }\n if (!session.did && context.did) {\n session.did = `${context.did}`;\n }\n if (typeof context.started === 'number') {\n session.started = context.started;\n }\n if (session.ignoreDuration) {\n session.duration = undefined;\n } else if (typeof context.duration === 'number') {\n session.duration = context.duration;\n } else {\n const duration = session.timestamp - session.started;\n session.duration = duration >= 0 ? duration : 0;\n }\n if (context.release) {\n session.release = context.release;\n }\n if (context.environment) {\n session.environment = context.environment;\n }\n if (!session.ipAddress && context.ipAddress) {\n session.ipAddress = context.ipAddress;\n }\n if (!session.userAgent && context.userAgent) {\n session.userAgent = context.userAgent;\n }\n if (typeof context.errors === 'number') {\n session.errors = context.errors;\n }\n if (context.status) {\n session.status = context.status;\n }\n}\n\n/**\n * Closes a session by setting its status and updating the session object with it.\n * Internally calls `updateSession` to update the passed session object.\n *\n * Note that this function mutates the passed session (@see updateSession for explanation).\n *\n * @param session the `Session` object to be closed\n * @param status the `SessionStatus` with which the session was closed. If you don't pass a status,\n * this function will keep the previously set status, unless it was `'ok'` in which case\n * it is changed to `'exited'`.\n */\nfunction closeSession(session, status) {\n let context = {};\n if (status) {\n context = { status };\n } else if (session.status === 'ok') {\n context = { status: 'exited' };\n }\n\n updateSession(session, context);\n}\n\n/**\n * Serializes a passed session object to a JSON object with a slightly different structure.\n * This is necessary because the Sentry backend requires a slightly different schema of a session\n * than the one the JS SDKs use internally.\n *\n * @param session the session to be converted\n *\n * @returns a JSON object of the passed session\n */\nfunction sessionToJSON(session) {\n return dropUndefinedKeys({\n sid: `${session.sid}`,\n init: session.init,\n // Make sure that sec is converted to ms for date constructor\n started: new Date(session.started * 1000).toISOString(),\n timestamp: new Date(session.timestamp * 1000).toISOString(),\n status: session.status,\n errors: session.errors,\n did: typeof session.did === 'number' || typeof session.did === 'string' ? `${session.did}` : undefined,\n duration: session.duration,\n abnormal_mechanism: session.abnormal_mechanism,\n attrs: {\n release: session.release,\n environment: session.environment,\n ip_address: session.ipAddress,\n user_agent: session.userAgent,\n },\n });\n}\n\nexport { closeSession, makeSession, updateSession };\n","/**\n * Returns the root span of a given span.\n *\n * As long as we use `Transaction`s internally, the returned root span\n * will be a `Transaction` but be aware that this might change in the future.\n *\n * If the given span has no root span or transaction, `undefined` is returned.\n */\nfunction getRootSpan(span) {\n // TODO (v8): Remove this check and just return span\n // eslint-disable-next-line deprecation/deprecation\n return span.transaction;\n}\n\nexport { getRootSpan };\n","import { dropUndefinedKeys, generateSentryTraceHeader, timestampInSeconds } from '@sentry/utils';\n\n// These are aligned with OpenTelemetry trace flags\nconst TRACE_FLAG_NONE = 0x0;\nconst TRACE_FLAG_SAMPLED = 0x1;\n\n/**\n * Convert a span to a trace context, which can be sent as the `trace` context in an event.\n */\nfunction spanToTraceContext(span) {\n const { spanId: span_id, traceId: trace_id } = span.spanContext();\n const { data, op, parent_span_id, status, tags, origin } = spanToJSON(span);\n\n return dropUndefinedKeys({\n data,\n op,\n parent_span_id,\n span_id,\n status,\n tags,\n trace_id,\n origin,\n });\n}\n\n/**\n * Convert a Span to a Sentry trace header.\n */\nfunction spanToTraceHeader(span) {\n const { traceId, spanId } = span.spanContext();\n const sampled = spanIsSampled(span);\n return generateSentryTraceHeader(traceId, spanId, sampled);\n}\n\n/**\n * Convert a span time input intp a timestamp in seconds.\n */\nfunction spanTimeInputToSeconds(input) {\n if (typeof input === 'number') {\n return ensureTimestampInSeconds(input);\n }\n\n if (Array.isArray(input)) {\n // See {@link HrTime} for the array-based time format\n return input[0] + input[1] / 1e9;\n }\n\n if (input instanceof Date) {\n return ensureTimestampInSeconds(input.getTime());\n }\n\n return timestampInSeconds();\n}\n\n/**\n * Converts a timestamp to second, if it was in milliseconds, or keeps it as second.\n */\nfunction ensureTimestampInSeconds(timestamp) {\n const isMs = timestamp > 9999999999;\n return isMs ? timestamp / 1000 : timestamp;\n}\n\n/**\n * Convert a span to a JSON representation.\n * Note that all fields returned here are optional and need to be guarded against.\n *\n * Note: Because of this, we currently have a circular type dependency (which we opted out of in package.json).\n * This is not avoidable as we need `spanToJSON` in `spanUtils.ts`, which in turn is needed by `span.ts` for backwards compatibility.\n * And `spanToJSON` needs the Span class from `span.ts` to check here.\n * TODO v8: When we remove the deprecated stuff from `span.ts`, we can remove the circular dependency again.\n */\nfunction spanToJSON(span) {\n if (spanIsSpanClass(span)) {\n return span.getSpanJSON();\n }\n\n // Fallback: We also check for `.toJSON()` here...\n // eslint-disable-next-line deprecation/deprecation\n if (typeof span.toJSON === 'function') {\n // eslint-disable-next-line deprecation/deprecation\n return span.toJSON();\n }\n\n return {};\n}\n\n/**\n * Sadly, due to circular dependency checks we cannot actually import the Span class here and check for instanceof.\n * :( So instead we approximate this by checking if it has the `getSpanJSON` method.\n */\nfunction spanIsSpanClass(span) {\n return typeof (span ).getSpanJSON === 'function';\n}\n\n/**\n * Returns true if a span is sampled.\n * In most cases, you should just use `span.isRecording()` instead.\n * However, this has a slightly different semantic, as it also returns false if the span is finished.\n * So in the case where this distinction is important, use this method.\n */\nfunction spanIsSampled(span) {\n // We align our trace flags with the ones OpenTelemetry use\n // So we also check for sampled the same way they do.\n const { traceFlags } = span.spanContext();\n // eslint-disable-next-line no-bitwise\n return Boolean(traceFlags & TRACE_FLAG_SAMPLED);\n}\n\nexport { TRACE_FLAG_NONE, TRACE_FLAG_SAMPLED, spanIsSampled, spanTimeInputToSeconds, spanToJSON, spanToTraceContext, spanToTraceHeader };\n","import { dropUndefinedKeys } from '@sentry/utils';\nimport { DEFAULT_ENVIRONMENT } from '../constants.js';\nimport { getClient, getCurrentScope } from '../exports.js';\nimport { getRootSpan } from '../utils/getRootSpan.js';\nimport { spanToJSON, spanIsSampled } from '../utils/spanUtils.js';\n\n/**\n * Creates a dynamic sampling context from a client.\n *\n * Dispatches the `createDsc` lifecycle hook as a side effect.\n */\nfunction getDynamicSamplingContextFromClient(\n trace_id,\n client,\n scope,\n) {\n const options = client.getOptions();\n\n const { publicKey: public_key } = client.getDsn() || {};\n // TODO(v8): Remove segment from User\n // eslint-disable-next-line deprecation/deprecation\n const { segment: user_segment } = (scope && scope.getUser()) || {};\n\n const dsc = dropUndefinedKeys({\n environment: options.environment || DEFAULT_ENVIRONMENT,\n release: options.release,\n user_segment,\n public_key,\n trace_id,\n }) ;\n\n client.emit && client.emit('createDsc', dsc);\n\n return dsc;\n}\n\n/**\n * A Span with a frozen dynamic sampling context.\n */\n\n/**\n * Creates a dynamic sampling context from a span (and client and scope)\n *\n * @param span the span from which a few values like the root span name and sample rate are extracted.\n *\n * @returns a dynamic sampling context\n */\nfunction getDynamicSamplingContextFromSpan(span) {\n const client = getClient();\n if (!client) {\n return {};\n }\n\n // passing emit=false here to only emit later once the DSC is actually populated\n const dsc = getDynamicSamplingContextFromClient(spanToJSON(span).trace_id || '', client, getCurrentScope());\n\n // TODO (v8): Remove v7FrozenDsc as a Transaction will no longer have _frozenDynamicSamplingContext\n const txn = getRootSpan(span) ;\n if (!txn) {\n return dsc;\n }\n\n // TODO (v8): Remove v7FrozenDsc as a Transaction will no longer have _frozenDynamicSamplingContext\n // For now we need to avoid breaking users who directly created a txn with a DSC, where this field is still set.\n // @see Transaction class constructor\n const v7FrozenDsc = txn && txn._frozenDynamicSamplingContext;\n if (v7FrozenDsc) {\n return v7FrozenDsc;\n }\n\n // TODO (v8): Replace txn.metadata with txn.attributes[]\n // We can't do this yet because attributes aren't always set yet.\n // eslint-disable-next-line deprecation/deprecation\n const { sampleRate: maybeSampleRate, source } = txn.metadata;\n if (maybeSampleRate != null) {\n dsc.sample_rate = `${maybeSampleRate}`;\n }\n\n // We don't want to have a transaction name in the DSC if the source is \"url\" because URLs might contain PII\n const jsonSpan = spanToJSON(txn);\n\n // after JSON conversion, txn.name becomes jsonSpan.description\n if (source && source !== 'url') {\n dsc.transaction = jsonSpan.description;\n }\n\n dsc.sampled = String(spanIsSampled(txn));\n\n client.emit && client.emit('createDsc', dsc);\n\n return dsc;\n}\n\nexport { getDynamicSamplingContextFromClient, getDynamicSamplingContextFromSpan };\n","import { logger, uuid4, timestampInSeconds, isThenable, GLOBAL_OBJ } from '@sentry/utils';\nimport { DEFAULT_ENVIRONMENT } from './constants.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { getCurrentHub, runWithAsyncContext, getIsolationScope } from './hub.js';\nimport { makeSession, updateSession, closeSession } from './session.js';\nimport { parseEventHintOrCaptureContext } from './utils/prepareEvent.js';\n\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception The exception to capture.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured Sentry event.\n */\nfunction captureException(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n exception,\n hint,\n) {\n // eslint-disable-next-line deprecation/deprecation\n return getCurrentHub().captureException(exception, parseEventHintOrCaptureContext(hint));\n}\n\n/**\n * Captures a message event and sends it to Sentry.\n *\n * @param exception The exception to capture.\n * @param captureContext Define the level of the message or pass in additional data to attach to the message.\n * @returns the id of the captured message.\n */\nfunction captureMessage(\n message,\n // eslint-disable-next-line deprecation/deprecation\n captureContext,\n) {\n // This is necessary to provide explicit scopes upgrade, without changing the original\n // arity of the `captureMessage(message, level)` method.\n const level = typeof captureContext === 'string' ? captureContext : undefined;\n const context = typeof captureContext !== 'string' ? { captureContext } : undefined;\n // eslint-disable-next-line deprecation/deprecation\n return getCurrentHub().captureMessage(message, level, context);\n}\n\n/**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param exception The event to send to Sentry.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured event.\n */\nfunction captureEvent(event, hint) {\n // eslint-disable-next-line deprecation/deprecation\n return getCurrentHub().captureEvent(event, hint);\n}\n\n/**\n * Callback to set context information onto the scope.\n * @param callback Callback function that receives Scope.\n *\n * @deprecated Use getCurrentScope() directly.\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction configureScope(callback) {\n // eslint-disable-next-line deprecation/deprecation\n getCurrentHub().configureScope(callback);\n}\n\n/**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n *\n * @param breadcrumb The breadcrumb to record.\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction addBreadcrumb(breadcrumb, hint) {\n // eslint-disable-next-line deprecation/deprecation\n getCurrentHub().addBreadcrumb(breadcrumb, hint);\n}\n\n/**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normalized.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, deprecation/deprecation\nfunction setContext(name, context) {\n // eslint-disable-next-line deprecation/deprecation\n getCurrentHub().setContext(name, context);\n}\n\n/**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction setExtras(extras) {\n // eslint-disable-next-line deprecation/deprecation\n getCurrentHub().setExtras(extras);\n}\n\n/**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normalized.\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction setExtra(key, extra) {\n // eslint-disable-next-line deprecation/deprecation\n getCurrentHub().setExtra(key, extra);\n}\n\n/**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction setTags(tags) {\n // eslint-disable-next-line deprecation/deprecation\n getCurrentHub().setTags(tags);\n}\n\n/**\n * Set key:value that will be sent as tags data with the event.\n *\n * Can also be used to unset a tag, by passing `undefined`.\n *\n * @param key String key of tag\n * @param value Value of tag\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction setTag(key, value) {\n // eslint-disable-next-line deprecation/deprecation\n getCurrentHub().setTag(key, value);\n}\n\n/**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction setUser(user) {\n // eslint-disable-next-line deprecation/deprecation\n getCurrentHub().setUser(user);\n}\n\n/**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n *\n * This is essentially a convenience function for:\n *\n * pushScope();\n * callback();\n * popScope();\n */\n\n/**\n * Either creates a new active scope, or sets the given scope as active scope in the given callback.\n */\nfunction withScope(\n ...rest\n) {\n // eslint-disable-next-line deprecation/deprecation\n const hub = getCurrentHub();\n\n // If a scope is defined, we want to make this the active scope instead of the default one\n if (rest.length === 2) {\n const [scope, callback] = rest;\n if (!scope) {\n // eslint-disable-next-line deprecation/deprecation\n return hub.withScope(callback);\n }\n\n // eslint-disable-next-line deprecation/deprecation\n return hub.withScope(() => {\n // eslint-disable-next-line deprecation/deprecation\n hub.getStackTop().scope = scope ;\n return callback(scope );\n });\n }\n\n // eslint-disable-next-line deprecation/deprecation\n return hub.withScope(rest[0]);\n}\n\n/**\n * Attempts to fork the current isolation scope and the current scope based on the current async context strategy. If no\n * async context strategy is set, the isolation scope and the current scope will not be forked (this is currently the\n * case, for example, in the browser).\n *\n * Usage of this function in environments without async context strategy is discouraged and may lead to unexpected behaviour.\n *\n * This function is intended for Sentry SDK and SDK integration development. It is not recommended to be used in \"normal\"\n * applications directly because it comes with pitfalls. Use at your own risk!\n *\n * @param callback The callback in which the passed isolation scope is active. (Note: In environments without async\n * context strategy, the currently active isolation scope may change within execution of the callback.)\n * @returns The same value that `callback` returns.\n */\nfunction withIsolationScope(callback) {\n return runWithAsyncContext(() => {\n return callback(getIsolationScope());\n });\n}\n\n/**\n * Forks the current scope and sets the provided span as active span in the context of the provided callback.\n *\n * @param span Spans started in the context of the provided callback will be children of this span.\n * @param callback Execution context in which the provided span will be active. Is passed the newly forked scope.\n * @returns the value returned from the provided callback function.\n */\nfunction withActiveSpan(span, callback) {\n return withScope(scope => {\n // eslint-disable-next-line deprecation/deprecation\n scope.setSpan(span);\n return callback(scope);\n });\n}\n\n/**\n * Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.\n *\n * A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a\n * new child span within the transaction or any span, call the respective `.startChild()` method.\n *\n * Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.\n *\n * The transaction must be finished with a call to its `.end()` method, at which point the transaction with all its\n * finished child spans will be sent to Sentry.\n *\n * NOTE: This function should only be used for *manual* instrumentation. Auto-instrumentation should call\n * `startTransaction` directly on the hub.\n *\n * @param context Properties of the new `Transaction`.\n * @param customSamplingContext Information given to the transaction sampling function (along with context-dependent\n * default values). See {@link Options.tracesSampler}.\n *\n * @returns The transaction which was just started\n *\n * @deprecated Use `startSpan()`, `startSpanManual()` or `startInactiveSpan()` instead.\n */\nfunction startTransaction(\n context,\n customSamplingContext,\n // eslint-disable-next-line deprecation/deprecation\n) {\n // eslint-disable-next-line deprecation/deprecation\n return getCurrentHub().startTransaction({ ...context }, customSamplingContext);\n}\n\n/**\n * Create a cron monitor check in and send it to Sentry.\n *\n * @param checkIn An object that describes a check in.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\nfunction captureCheckIn(checkIn, upsertMonitorConfig) {\n const scope = getCurrentScope();\n const client = getClient();\n if (!client) {\n DEBUG_BUILD && logger.warn('Cannot capture check-in. No client defined.');\n } else if (!client.captureCheckIn) {\n DEBUG_BUILD && logger.warn('Cannot capture check-in. Client does not support sending check-ins.');\n } else {\n return client.captureCheckIn(checkIn, upsertMonitorConfig, scope);\n }\n\n return uuid4();\n}\n\n/**\n * Wraps a callback with a cron monitor check in. The check in will be sent to Sentry when the callback finishes.\n *\n * @param monitorSlug The distinct slug of the monitor.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\nfunction withMonitor(\n monitorSlug,\n callback,\n upsertMonitorConfig,\n) {\n const checkInId = captureCheckIn({ monitorSlug, status: 'in_progress' }, upsertMonitorConfig);\n const now = timestampInSeconds();\n\n function finishCheckIn(status) {\n captureCheckIn({ monitorSlug, status, checkInId, duration: timestampInSeconds() - now });\n }\n\n let maybePromiseResult;\n try {\n maybePromiseResult = callback();\n } catch (e) {\n finishCheckIn('error');\n throw e;\n }\n\n if (isThenable(maybePromiseResult)) {\n Promise.resolve(maybePromiseResult).then(\n () => {\n finishCheckIn('ok');\n },\n () => {\n finishCheckIn('error');\n },\n );\n } else {\n finishCheckIn('ok');\n }\n\n return maybePromiseResult;\n}\n\n/**\n * Call `flush()` on the current client, if there is one. See {@link Client.flush}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause\n * the client to wait until all events are sent before resolving the promise.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nasync function flush(timeout) {\n const client = getClient();\n if (client) {\n return client.flush(timeout);\n }\n DEBUG_BUILD && logger.warn('Cannot flush events. No client defined.');\n return Promise.resolve(false);\n}\n\n/**\n * Call `close()` on the current client, if there is one. See {@link Client.close}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this\n * parameter will cause the client to wait until all events are sent before disabling itself.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nasync function close(timeout) {\n const client = getClient();\n if (client) {\n return client.close(timeout);\n }\n DEBUG_BUILD && logger.warn('Cannot flush events and disable SDK. No client defined.');\n return Promise.resolve(false);\n}\n\n/**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\nfunction lastEventId() {\n // eslint-disable-next-line deprecation/deprecation\n return getCurrentHub().lastEventId();\n}\n\n/**\n * Get the currently active client.\n */\nfunction getClient() {\n // eslint-disable-next-line deprecation/deprecation\n return getCurrentHub().getClient();\n}\n\n/**\n * Returns true if Sentry has been properly initialized.\n */\nfunction isInitialized() {\n return !!getClient();\n}\n\n/**\n * Get the currently active scope.\n */\nfunction getCurrentScope() {\n // eslint-disable-next-line deprecation/deprecation\n return getCurrentHub().getScope();\n}\n\n/**\n * Start a session on the current isolation scope.\n *\n * @param context (optional) additional properties to be applied to the returned session object\n *\n * @returns the new active session\n */\nfunction startSession(context) {\n const client = getClient();\n const isolationScope = getIsolationScope();\n const currentScope = getCurrentScope();\n\n const { release, environment = DEFAULT_ENVIRONMENT } = (client && client.getOptions()) || {};\n\n // Will fetch userAgent if called from browser sdk\n const { userAgent } = GLOBAL_OBJ.navigator || {};\n\n const session = makeSession({\n release,\n environment,\n user: currentScope.getUser() || isolationScope.getUser(),\n ...(userAgent && { userAgent }),\n ...context,\n });\n\n // End existing session if there's one\n const currentSession = isolationScope.getSession();\n if (currentSession && currentSession.status === 'ok') {\n updateSession(currentSession, { status: 'exited' });\n }\n\n endSession();\n\n // Afterwards we set the new session on the scope\n isolationScope.setSession(session);\n\n // TODO (v8): Remove this and only use the isolation scope(?).\n // For v7 though, we can't \"soft-break\" people using getCurrentHub().getScope().setSession()\n currentScope.setSession(session);\n\n return session;\n}\n\n/**\n * End the session on the current isolation scope.\n */\nfunction endSession() {\n const isolationScope = getIsolationScope();\n const currentScope = getCurrentScope();\n\n const session = currentScope.getSession() || isolationScope.getSession();\n if (session) {\n closeSession(session);\n }\n _sendSessionUpdate();\n\n // the session is over; take it off of the scope\n isolationScope.setSession();\n\n // TODO (v8): Remove this and only use the isolation scope(?).\n // For v7 though, we can't \"soft-break\" people using getCurrentHub().getScope().setSession()\n currentScope.setSession();\n}\n\n/**\n * Sends the current Session on the scope\n */\nfunction _sendSessionUpdate() {\n const isolationScope = getIsolationScope();\n const currentScope = getCurrentScope();\n const client = getClient();\n // TODO (v8): Remove currentScope and only use the isolation scope(?).\n // For v7 though, we can't \"soft-break\" people using getCurrentHub().getScope().setSession()\n const session = currentScope.getSession() || isolationScope.getSession();\n if (session && client && client.captureSession) {\n client.captureSession(session);\n }\n}\n\n/**\n * Sends the current session on the scope to Sentry\n *\n * @param end If set the session will be marked as exited and removed from the scope.\n * Defaults to `false`.\n */\nfunction captureSession(end = false) {\n // both send the update and pull the session from the scope\n if (end) {\n endSession();\n return;\n }\n\n // only send the update\n _sendSessionUpdate();\n}\n\nexport { addBreadcrumb, captureCheckIn, captureEvent, captureException, captureMessage, captureSession, close, configureScope, endSession, flush, getClient, getCurrentScope, isInitialized, lastEventId, setContext, setExtra, setExtras, setTag, setTags, setUser, startSession, startTransaction, withActiveSpan, withIsolationScope, withMonitor, withScope };\n","import { isPlainObject, dateTimestampInSeconds, uuid4, logger } from '@sentry/utils';\nimport { getGlobalEventProcessors, notifyEventProcessors } from './eventProcessors.js';\nimport { updateSession } from './session.js';\nimport { applyScopeDataToEvent } from './utils/applyScopeDataToEvent.js';\n\n/**\n * Default value for maximum number of breadcrumbs added to an event.\n */\nconst DEFAULT_MAX_BREADCRUMBS = 100;\n\n/**\n * The global scope is kept in this module.\n * When accessing this via `getGlobalScope()` we'll make sure to set one if none is currently present.\n */\nlet globalScope;\n\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nclass Scope {\n /** Flag if notifying is happening. */\n\n /** Callback for client to receive scope changes. */\n\n /** Callback list that will be called after {@link applyToEvent}. */\n\n /** Array of breadcrumbs. */\n\n /** User */\n\n /** Tags */\n\n /** Extra */\n\n /** Contexts */\n\n /** Attachments */\n\n /** Propagation Context for distributed tracing */\n\n /**\n * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get\n * sent to Sentry\n */\n\n /** Fingerprint */\n\n /** Severity */\n // eslint-disable-next-line deprecation/deprecation\n\n /**\n * Transaction Name\n */\n\n /** Span */\n\n /** Session */\n\n /** Request Mode Session Status */\n\n /** The client on this scope */\n\n // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method.\n\n constructor() {\n this._notifyingListeners = false;\n this._scopeListeners = [];\n this._eventProcessors = [];\n this._breadcrumbs = [];\n this._attachments = [];\n this._user = {};\n this._tags = {};\n this._extra = {};\n this._contexts = {};\n this._sdkProcessingMetadata = {};\n this._propagationContext = generatePropagationContext();\n }\n\n /**\n * Inherit values from the parent scope.\n * @deprecated Use `scope.clone()` and `new Scope()` instead.\n */\n static clone(scope) {\n return scope ? scope.clone() : new Scope();\n }\n\n /**\n * Clone this scope instance.\n */\n clone() {\n const newScope = new Scope();\n newScope._breadcrumbs = [...this._breadcrumbs];\n newScope._tags = { ...this._tags };\n newScope._extra = { ...this._extra };\n newScope._contexts = { ...this._contexts };\n newScope._user = this._user;\n newScope._level = this._level;\n newScope._span = this._span;\n newScope._session = this._session;\n newScope._transactionName = this._transactionName;\n newScope._fingerprint = this._fingerprint;\n newScope._eventProcessors = [...this._eventProcessors];\n newScope._requestSession = this._requestSession;\n newScope._attachments = [...this._attachments];\n newScope._sdkProcessingMetadata = { ...this._sdkProcessingMetadata };\n newScope._propagationContext = { ...this._propagationContext };\n newScope._client = this._client;\n\n return newScope;\n }\n\n /** Update the client on the scope. */\n setClient(client) {\n this._client = client;\n }\n\n /**\n * Get the client assigned to this scope.\n *\n * It is generally recommended to use the global function `Sentry.getClient()` instead, unless you know what you are doing.\n */\n getClient() {\n return this._client;\n }\n\n /**\n * Add internal on change listener. Used for sub SDKs that need to store the scope.\n * @hidden\n */\n addScopeListener(callback) {\n this._scopeListeners.push(callback);\n }\n\n /**\n * @inheritDoc\n */\n addEventProcessor(callback) {\n this._eventProcessors.push(callback);\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setUser(user) {\n // If null is passed we want to unset everything, but still define keys,\n // so that later down in the pipeline any existing values are cleared.\n this._user = user || {\n email: undefined,\n id: undefined,\n ip_address: undefined,\n segment: undefined,\n username: undefined,\n };\n\n if (this._session) {\n updateSession(this._session, { user });\n }\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getUser() {\n return this._user;\n }\n\n /**\n * @inheritDoc\n */\n getRequestSession() {\n return this._requestSession;\n }\n\n /**\n * @inheritDoc\n */\n setRequestSession(requestSession) {\n this._requestSession = requestSession;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setTags(tags) {\n this._tags = {\n ...this._tags,\n ...tags,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setTag(key, value) {\n this._tags = { ...this._tags, [key]: value };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setExtras(extras) {\n this._extra = {\n ...this._extra,\n ...extras,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setExtra(key, extra) {\n this._extra = { ...this._extra, [key]: extra };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setFingerprint(fingerprint) {\n this._fingerprint = fingerprint;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setLevel(\n // eslint-disable-next-line deprecation/deprecation\n level,\n ) {\n this._level = level;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Sets the transaction name on the scope for future events.\n */\n setTransactionName(name) {\n this._transactionName = name;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setContext(key, context) {\n if (context === null) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._contexts[key];\n } else {\n this._contexts[key] = context;\n }\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Sets the Span on the scope.\n * @param span Span\n * @deprecated Instead of setting a span on a scope, use `startSpan()`/`startSpanManual()` instead.\n */\n setSpan(span) {\n this._span = span;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Returns the `Span` if there is one.\n * @deprecated Use `getActiveSpan()` instead.\n */\n getSpan() {\n return this._span;\n }\n\n /**\n * Returns the `Transaction` attached to the scope (if there is one).\n * @deprecated You should not rely on the transaction, but just use `startSpan()` APIs instead.\n */\n getTransaction() {\n // Often, this span (if it exists at all) will be a transaction, but it's not guaranteed to be. Regardless, it will\n // have a pointer to the currently-active transaction.\n const span = this._span;\n // Cannot replace with getRootSpan because getRootSpan returns a span, not a transaction\n // Also, this method will be removed anyway.\n // eslint-disable-next-line deprecation/deprecation\n return span && span.transaction;\n }\n\n /**\n * @inheritDoc\n */\n setSession(session) {\n if (!session) {\n delete this._session;\n } else {\n this._session = session;\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getSession() {\n return this._session;\n }\n\n /**\n * @inheritDoc\n */\n update(captureContext) {\n if (!captureContext) {\n return this;\n }\n\n const scopeToMerge = typeof captureContext === 'function' ? captureContext(this) : captureContext;\n\n if (scopeToMerge instanceof Scope) {\n const scopeData = scopeToMerge.getScopeData();\n\n this._tags = { ...this._tags, ...scopeData.tags };\n this._extra = { ...this._extra, ...scopeData.extra };\n this._contexts = { ...this._contexts, ...scopeData.contexts };\n if (scopeData.user && Object.keys(scopeData.user).length) {\n this._user = scopeData.user;\n }\n if (scopeData.level) {\n this._level = scopeData.level;\n }\n if (scopeData.fingerprint.length) {\n this._fingerprint = scopeData.fingerprint;\n }\n if (scopeToMerge.getRequestSession()) {\n this._requestSession = scopeToMerge.getRequestSession();\n }\n if (scopeData.propagationContext) {\n this._propagationContext = scopeData.propagationContext;\n }\n } else if (isPlainObject(scopeToMerge)) {\n const scopeContext = captureContext ;\n this._tags = { ...this._tags, ...scopeContext.tags };\n this._extra = { ...this._extra, ...scopeContext.extra };\n this._contexts = { ...this._contexts, ...scopeContext.contexts };\n if (scopeContext.user) {\n this._user = scopeContext.user;\n }\n if (scopeContext.level) {\n this._level = scopeContext.level;\n }\n if (scopeContext.fingerprint) {\n this._fingerprint = scopeContext.fingerprint;\n }\n if (scopeContext.requestSession) {\n this._requestSession = scopeContext.requestSession;\n }\n if (scopeContext.propagationContext) {\n this._propagationContext = scopeContext.propagationContext;\n }\n }\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n clear() {\n this._breadcrumbs = [];\n this._tags = {};\n this._extra = {};\n this._user = {};\n this._contexts = {};\n this._level = undefined;\n this._transactionName = undefined;\n this._fingerprint = undefined;\n this._requestSession = undefined;\n this._span = undefined;\n this._session = undefined;\n this._notifyScopeListeners();\n this._attachments = [];\n this._propagationContext = generatePropagationContext();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n addBreadcrumb(breadcrumb, maxBreadcrumbs) {\n const maxCrumbs = typeof maxBreadcrumbs === 'number' ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS;\n\n // No data has been changed, so don't notify scope listeners\n if (maxCrumbs <= 0) {\n return this;\n }\n\n const mergedBreadcrumb = {\n timestamp: dateTimestampInSeconds(),\n ...breadcrumb,\n };\n\n const breadcrumbs = this._breadcrumbs;\n breadcrumbs.push(mergedBreadcrumb);\n this._breadcrumbs = breadcrumbs.length > maxCrumbs ? breadcrumbs.slice(-maxCrumbs) : breadcrumbs;\n\n this._notifyScopeListeners();\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getLastBreadcrumb() {\n return this._breadcrumbs[this._breadcrumbs.length - 1];\n }\n\n /**\n * @inheritDoc\n */\n clearBreadcrumbs() {\n this._breadcrumbs = [];\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n addAttachment(attachment) {\n this._attachments.push(attachment);\n return this;\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `getScopeData()` instead.\n */\n getAttachments() {\n const data = this.getScopeData();\n\n return data.attachments;\n }\n\n /**\n * @inheritDoc\n */\n clearAttachments() {\n this._attachments = [];\n return this;\n }\n\n /** @inheritDoc */\n getScopeData() {\n const {\n _breadcrumbs,\n _attachments,\n _contexts,\n _tags,\n _extra,\n _user,\n _level,\n _fingerprint,\n _eventProcessors,\n _propagationContext,\n _sdkProcessingMetadata,\n _transactionName,\n _span,\n } = this;\n\n return {\n breadcrumbs: _breadcrumbs,\n attachments: _attachments,\n contexts: _contexts,\n tags: _tags,\n extra: _extra,\n user: _user,\n level: _level,\n fingerprint: _fingerprint || [],\n eventProcessors: _eventProcessors,\n propagationContext: _propagationContext,\n sdkProcessingMetadata: _sdkProcessingMetadata,\n transactionName: _transactionName,\n span: _span,\n };\n }\n\n /**\n * Applies data from the scope to the event and runs all event processors on it.\n *\n * @param event Event\n * @param hint Object containing additional information about the original exception, for use by the event processors.\n * @hidden\n * @deprecated Use `applyScopeDataToEvent()` directly\n */\n applyToEvent(\n event,\n hint = {},\n additionalEventProcessors = [],\n ) {\n applyScopeDataToEvent(event, this.getScopeData());\n\n // TODO (v8): Update this order to be: Global > Client > Scope\n const eventProcessors = [\n ...additionalEventProcessors,\n // eslint-disable-next-line deprecation/deprecation\n ...getGlobalEventProcessors(),\n ...this._eventProcessors,\n ];\n\n return notifyEventProcessors(eventProcessors, event, hint);\n }\n\n /**\n * Add data which will be accessible during event processing but won't get sent to Sentry\n */\n setSDKProcessingMetadata(newData) {\n this._sdkProcessingMetadata = { ...this._sdkProcessingMetadata, ...newData };\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setPropagationContext(context) {\n this._propagationContext = context;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getPropagationContext() {\n return this._propagationContext;\n }\n\n /**\n * Capture an exception for this scope.\n *\n * @param exception The exception to capture.\n * @param hint Optinal additional data to attach to the Sentry event.\n * @returns the id of the captured Sentry event.\n */\n captureException(exception, hint) {\n const eventId = hint && hint.event_id ? hint.event_id : uuid4();\n\n if (!this._client) {\n logger.warn('No client configured on scope - will not capture exception!');\n return eventId;\n }\n\n const syntheticException = new Error('Sentry syntheticException');\n\n this._client.captureException(\n exception,\n {\n originalException: exception,\n syntheticException,\n ...hint,\n event_id: eventId,\n },\n this,\n );\n\n return eventId;\n }\n\n /**\n * Capture a message for this scope.\n *\n * @param message The message to capture.\n * @param level An optional severity level to report the message with.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured message.\n */\n captureMessage(message, level, hint) {\n const eventId = hint && hint.event_id ? hint.event_id : uuid4();\n\n if (!this._client) {\n logger.warn('No client configured on scope - will not capture message!');\n return eventId;\n }\n\n const syntheticException = new Error(message);\n\n this._client.captureMessage(\n message,\n level,\n {\n originalException: message,\n syntheticException,\n ...hint,\n event_id: eventId,\n },\n this,\n );\n\n return eventId;\n }\n\n /**\n * Captures a manually created event for this scope and sends it to Sentry.\n *\n * @param exception The event to capture.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured event.\n */\n captureEvent(event, hint) {\n const eventId = hint && hint.event_id ? hint.event_id : uuid4();\n\n if (!this._client) {\n logger.warn('No client configured on scope - will not capture event!');\n return eventId;\n }\n\n this._client.captureEvent(event, { ...hint, event_id: eventId }, this);\n\n return eventId;\n }\n\n /**\n * This will be called on every set call.\n */\n _notifyScopeListeners() {\n // We need this check for this._notifyingListeners to be able to work on scope during updates\n // If this check is not here we'll produce endless recursion when something is done with the scope\n // during the callback.\n if (!this._notifyingListeners) {\n this._notifyingListeners = true;\n this._scopeListeners.forEach(callback => {\n callback(this);\n });\n this._notifyingListeners = false;\n }\n }\n}\n\n/**\n * Get the global scope.\n * This scope is applied to _all_ events.\n */\nfunction getGlobalScope() {\n if (!globalScope) {\n globalScope = new Scope();\n }\n\n return globalScope;\n}\n\n/**\n * This is mainly needed for tests.\n * DO NOT USE this, as this is an internal API and subject to change.\n * @hidden\n */\nfunction setGlobalScope(scope) {\n globalScope = scope;\n}\n\nfunction generatePropagationContext() {\n return {\n traceId: uuid4(),\n spanId: uuid4().substring(16),\n };\n}\n\nexport { Scope, getGlobalScope, setGlobalScope };\n","import { dropUndefinedKeys, arrayify } from '@sentry/utils';\nimport { getDynamicSamplingContextFromSpan } from '../tracing/dynamicSamplingContext.js';\nimport { getRootSpan } from './getRootSpan.js';\nimport { spanToTraceContext, spanToJSON } from './spanUtils.js';\n\n/**\n * Applies data from the scope to the event and runs all event processors on it.\n */\nfunction applyScopeDataToEvent(event, data) {\n const { fingerprint, span, breadcrumbs, sdkProcessingMetadata } = data;\n\n // Apply general data\n applyDataToEvent(event, data);\n\n // We want to set the trace context for normal events only if there isn't already\n // a trace context on the event. There is a product feature in place where we link\n // errors with transaction and it relies on that.\n if (span) {\n applySpanToEvent(event, span);\n }\n\n applyFingerprintToEvent(event, fingerprint);\n applyBreadcrumbsToEvent(event, breadcrumbs);\n applySdkMetadataToEvent(event, sdkProcessingMetadata);\n}\n\n/** Merge data of two scopes together. */\nfunction mergeScopeData(data, mergeData) {\n const {\n extra,\n tags,\n user,\n contexts,\n level,\n sdkProcessingMetadata,\n breadcrumbs,\n fingerprint,\n eventProcessors,\n attachments,\n propagationContext,\n // eslint-disable-next-line deprecation/deprecation\n transactionName,\n span,\n } = mergeData;\n\n mergeAndOverwriteScopeData(data, 'extra', extra);\n mergeAndOverwriteScopeData(data, 'tags', tags);\n mergeAndOverwriteScopeData(data, 'user', user);\n mergeAndOverwriteScopeData(data, 'contexts', contexts);\n mergeAndOverwriteScopeData(data, 'sdkProcessingMetadata', sdkProcessingMetadata);\n\n if (level) {\n data.level = level;\n }\n\n if (transactionName) {\n // eslint-disable-next-line deprecation/deprecation\n data.transactionName = transactionName;\n }\n\n if (span) {\n data.span = span;\n }\n\n if (breadcrumbs.length) {\n data.breadcrumbs = [...data.breadcrumbs, ...breadcrumbs];\n }\n\n if (fingerprint.length) {\n data.fingerprint = [...data.fingerprint, ...fingerprint];\n }\n\n if (eventProcessors.length) {\n data.eventProcessors = [...data.eventProcessors, ...eventProcessors];\n }\n\n if (attachments.length) {\n data.attachments = [...data.attachments, ...attachments];\n }\n\n data.propagationContext = { ...data.propagationContext, ...propagationContext };\n}\n\n/**\n * Merges certain scope data. Undefined values will overwrite any existing values.\n * Exported only for tests.\n */\nfunction mergeAndOverwriteScopeData\n\n(data, prop, mergeVal) {\n if (mergeVal && Object.keys(mergeVal).length) {\n // Clone object\n data[prop] = { ...data[prop] };\n for (const key in mergeVal) {\n if (Object.prototype.hasOwnProperty.call(mergeVal, key)) {\n data[prop][key] = mergeVal[key];\n }\n }\n }\n}\n\nfunction applyDataToEvent(event, data) {\n const {\n extra,\n tags,\n user,\n contexts,\n level,\n // eslint-disable-next-line deprecation/deprecation\n transactionName,\n } = data;\n\n const cleanedExtra = dropUndefinedKeys(extra);\n if (cleanedExtra && Object.keys(cleanedExtra).length) {\n event.extra = { ...cleanedExtra, ...event.extra };\n }\n\n const cleanedTags = dropUndefinedKeys(tags);\n if (cleanedTags && Object.keys(cleanedTags).length) {\n event.tags = { ...cleanedTags, ...event.tags };\n }\n\n const cleanedUser = dropUndefinedKeys(user);\n if (cleanedUser && Object.keys(cleanedUser).length) {\n event.user = { ...cleanedUser, ...event.user };\n }\n\n const cleanedContexts = dropUndefinedKeys(contexts);\n if (cleanedContexts && Object.keys(cleanedContexts).length) {\n event.contexts = { ...cleanedContexts, ...event.contexts };\n }\n\n if (level) {\n event.level = level;\n }\n\n if (transactionName) {\n event.transaction = transactionName;\n }\n}\n\nfunction applyBreadcrumbsToEvent(event, breadcrumbs) {\n const mergedBreadcrumbs = [...(event.breadcrumbs || []), ...breadcrumbs];\n event.breadcrumbs = mergedBreadcrumbs.length ? mergedBreadcrumbs : undefined;\n}\n\nfunction applySdkMetadataToEvent(event, sdkProcessingMetadata) {\n event.sdkProcessingMetadata = {\n ...event.sdkProcessingMetadata,\n ...sdkProcessingMetadata,\n };\n}\n\nfunction applySpanToEvent(event, span) {\n event.contexts = { trace: spanToTraceContext(span), ...event.contexts };\n const rootSpan = getRootSpan(span);\n if (rootSpan) {\n event.sdkProcessingMetadata = {\n dynamicSamplingContext: getDynamicSamplingContextFromSpan(span),\n ...event.sdkProcessingMetadata,\n };\n const transactionName = spanToJSON(rootSpan).description;\n if (transactionName) {\n event.tags = { transaction: transactionName, ...event.tags };\n }\n }\n}\n\n/**\n * Applies fingerprint from the scope to the event if there's one,\n * uses message if there's one instead or get rid of empty fingerprint\n */\nfunction applyFingerprintToEvent(event, fingerprint) {\n // Make sure it's an array first and we actually have something in place\n event.fingerprint = event.fingerprint ? arrayify(event.fingerprint) : [];\n\n // If we have something on the scope, then merge it with event\n if (fingerprint) {\n event.fingerprint = event.fingerprint.concat(fingerprint);\n }\n\n // If we have no data at all, remove empty array default\n if (event.fingerprint && !event.fingerprint.length) {\n delete event.fingerprint;\n }\n}\n\nexport { applyScopeDataToEvent, mergeAndOverwriteScopeData, mergeScopeData };\n","import { isThenable, uuid4, dateTimestampInSeconds, consoleSandbox, logger, GLOBAL_OBJ, getGlobalSingleton } from '@sentry/utils';\nimport { DEFAULT_ENVIRONMENT } from './constants.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { Scope } from './scope.js';\nimport { closeSession, makeSession, updateSession } from './session.js';\nimport { SDK_VERSION } from './version.js';\n\n/**\n * API compatibility version of this hub.\n *\n * WARNING: This number should only be increased when the global interface\n * changes and new methods are introduced.\n *\n * @hidden\n */\nconst API_VERSION = parseFloat(SDK_VERSION);\n\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\nconst DEFAULT_BREADCRUMBS = 100;\n\n/**\n * @deprecated The `Hub` class will be removed in version 8 of the SDK in favour of `Scope` and `Client` objects.\n *\n * If you previously used the `Hub` class directly, replace it with `Scope` and `Client` objects. More information:\n * - [Multiple Sentry Instances](https://docs.sentry.io/platforms/javascript/best-practices/multiple-sentry-instances/)\n * - [Browser Extensions](https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/)\n *\n * Some of our APIs are typed with the Hub class instead of the interface (e.g. `getCurrentHub`). Most of them are deprecated\n * themselves and will also be removed in version 8. More information:\n * - [Migration Guide](https://github.com/getsentry/sentry-javascript/blob/develop/MIGRATION.md#deprecate-hub)\n */\n// eslint-disable-next-line deprecation/deprecation\nclass Hub {\n /** Is a {@link Layer}[] containing the client and scope */\n\n /** Contains the last event id of a captured event. */\n\n /**\n * Creates a new instance of the hub, will push one {@link Layer} into the\n * internal stack on creation.\n *\n * @param client bound to the hub.\n * @param scope bound to the hub.\n * @param version number, higher number means higher priority.\n *\n * @deprecated Instantiation of Hub objects is deprecated and the constructor will be removed in version 8 of the SDK.\n *\n * If you are currently using the Hub for multi-client use like so:\n *\n * ```\n * // OLD\n * const hub = new Hub();\n * hub.bindClient(client);\n * makeMain(hub)\n * ```\n *\n * instead initialize the client as follows:\n *\n * ```\n * // NEW\n * Sentry.withIsolationScope(() => {\n * Sentry.setCurrentClient(client);\n * client.init();\n * });\n * ```\n *\n * If you are using the Hub to capture events like so:\n *\n * ```\n * // OLD\n * const client = new Client();\n * const hub = new Hub(client);\n * hub.captureException()\n * ```\n *\n * instead capture isolated events as follows:\n *\n * ```\n * // NEW\n * const client = new Client();\n * const scope = new Scope();\n * scope.setClient(client);\n * scope.captureException();\n * ```\n */\n constructor(\n client,\n scope,\n isolationScope,\n _version = API_VERSION,\n ) {this._version = _version;\n let assignedScope;\n if (!scope) {\n assignedScope = new Scope();\n assignedScope.setClient(client);\n } else {\n assignedScope = scope;\n }\n\n let assignedIsolationScope;\n if (!isolationScope) {\n assignedIsolationScope = new Scope();\n assignedIsolationScope.setClient(client);\n } else {\n assignedIsolationScope = isolationScope;\n }\n\n this._stack = [{ scope: assignedScope }];\n\n if (client) {\n // eslint-disable-next-line deprecation/deprecation\n this.bindClient(client);\n }\n\n this._isolationScope = assignedIsolationScope;\n }\n\n /**\n * Checks if this hub's version is older than the given version.\n *\n * @param version A version number to compare to.\n * @return True if the given version is newer; otherwise false.\n *\n * @deprecated This will be removed in v8.\n */\n isOlderThan(version) {\n return this._version < version;\n }\n\n /**\n * This binds the given client to the current scope.\n * @param client An SDK client (client) instance.\n *\n * @deprecated Use `initAndBind()` directly, or `setCurrentClient()` and/or `client.init()` instead.\n */\n bindClient(client) {\n // eslint-disable-next-line deprecation/deprecation\n const top = this.getStackTop();\n top.client = client;\n top.scope.setClient(client);\n // eslint-disable-next-line deprecation/deprecation\n if (client && client.setupIntegrations) {\n // eslint-disable-next-line deprecation/deprecation\n client.setupIntegrations();\n }\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `withScope` instead.\n */\n pushScope() {\n // We want to clone the content of prev scope\n // eslint-disable-next-line deprecation/deprecation\n const scope = this.getScope().clone();\n // eslint-disable-next-line deprecation/deprecation\n this.getStack().push({\n // eslint-disable-next-line deprecation/deprecation\n client: this.getClient(),\n scope,\n });\n return scope;\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `withScope` instead.\n */\n popScope() {\n // eslint-disable-next-line deprecation/deprecation\n if (this.getStack().length <= 1) return false;\n // eslint-disable-next-line deprecation/deprecation\n return !!this.getStack().pop();\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `Sentry.withScope()` instead.\n */\n withScope(callback) {\n // eslint-disable-next-line deprecation/deprecation\n const scope = this.pushScope();\n\n let maybePromiseResult;\n try {\n maybePromiseResult = callback(scope);\n } catch (e) {\n // eslint-disable-next-line deprecation/deprecation\n this.popScope();\n throw e;\n }\n\n if (isThenable(maybePromiseResult)) {\n // @ts-expect-error - isThenable returns the wrong type\n return maybePromiseResult.then(\n res => {\n // eslint-disable-next-line deprecation/deprecation\n this.popScope();\n return res;\n },\n e => {\n // eslint-disable-next-line deprecation/deprecation\n this.popScope();\n throw e;\n },\n );\n }\n\n // eslint-disable-next-line deprecation/deprecation\n this.popScope();\n return maybePromiseResult;\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `Sentry.getClient()` instead.\n */\n getClient() {\n // eslint-disable-next-line deprecation/deprecation\n return this.getStackTop().client ;\n }\n\n /**\n * Returns the scope of the top stack.\n *\n * @deprecated Use `Sentry.getCurrentScope()` instead.\n */\n getScope() {\n // eslint-disable-next-line deprecation/deprecation\n return this.getStackTop().scope;\n }\n\n /**\n * @deprecated Use `Sentry.getIsolationScope()` instead.\n */\n getIsolationScope() {\n return this._isolationScope;\n }\n\n /**\n * Returns the scope stack for domains or the process.\n * @deprecated This will be removed in v8.\n */\n getStack() {\n return this._stack;\n }\n\n /**\n * Returns the topmost scope layer in the order domain > local > process.\n * @deprecated This will be removed in v8.\n */\n getStackTop() {\n return this._stack[this._stack.length - 1];\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `Sentry.captureException()` instead.\n */\n captureException(exception, hint) {\n const eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : uuid4());\n const syntheticException = new Error('Sentry syntheticException');\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().captureException(exception, {\n originalException: exception,\n syntheticException,\n ...hint,\n event_id: eventId,\n });\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `Sentry.captureMessage()` instead.\n */\n captureMessage(\n message,\n // eslint-disable-next-line deprecation/deprecation\n level,\n hint,\n ) {\n const eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : uuid4());\n const syntheticException = new Error(message);\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().captureMessage(message, level, {\n originalException: message,\n syntheticException,\n ...hint,\n event_id: eventId,\n });\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `Sentry.captureEvent()` instead.\n */\n captureEvent(event, hint) {\n const eventId = hint && hint.event_id ? hint.event_id : uuid4();\n if (!event.type) {\n this._lastEventId = eventId;\n }\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().captureEvent(event, { ...hint, event_id: eventId });\n return eventId;\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated This will be removed in v8.\n */\n lastEventId() {\n return this._lastEventId;\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `Sentry.addBreadcrumb()` instead.\n */\n addBreadcrumb(breadcrumb, hint) {\n // eslint-disable-next-line deprecation/deprecation\n const { scope, client } = this.getStackTop();\n\n if (!client) return;\n\n const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } =\n (client.getOptions && client.getOptions()) || {};\n\n if (maxBreadcrumbs <= 0) return;\n\n const timestamp = dateTimestampInSeconds();\n const mergedBreadcrumb = { timestamp, ...breadcrumb };\n const finalBreadcrumb = beforeBreadcrumb\n ? (consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) )\n : mergedBreadcrumb;\n\n if (finalBreadcrumb === null) return;\n\n if (client.emit) {\n client.emit('beforeAddBreadcrumb', finalBreadcrumb, hint);\n }\n\n // TODO(v8): I know this comment doesn't make much sense because the hub will be deprecated but I still wanted to\n // write it down. In theory, we would have to add the breadcrumbs to the isolation scope here, however, that would\n // duplicate all of the breadcrumbs. There was the possibility of adding breadcrumbs to both, the isolation scope\n // and the normal scope, and deduplicating it down the line in the event processing pipeline. However, that would\n // have been very fragile, because the breadcrumb objects would have needed to keep their identity all throughout\n // the event processing pipeline.\n // In the new implementation, the top level `Sentry.addBreadcrumb()` should ONLY write to the isolation scope.\n\n scope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `Sentry.setUser()` instead.\n */\n setUser(user) {\n // TODO(v8): The top level `Sentry.setUser()` function should write ONLY to the isolation scope.\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().setUser(user);\n // eslint-disable-next-line deprecation/deprecation\n this.getIsolationScope().setUser(user);\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `Sentry.setTags()` instead.\n */\n setTags(tags) {\n // TODO(v8): The top level `Sentry.setTags()` function should write ONLY to the isolation scope.\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().setTags(tags);\n // eslint-disable-next-line deprecation/deprecation\n this.getIsolationScope().setTags(tags);\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `Sentry.setExtras()` instead.\n */\n setExtras(extras) {\n // TODO(v8): The top level `Sentry.setExtras()` function should write ONLY to the isolation scope.\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().setExtras(extras);\n // eslint-disable-next-line deprecation/deprecation\n this.getIsolationScope().setExtras(extras);\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `Sentry.setTag()` instead.\n */\n setTag(key, value) {\n // TODO(v8): The top level `Sentry.setTag()` function should write ONLY to the isolation scope.\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().setTag(key, value);\n // eslint-disable-next-line deprecation/deprecation\n this.getIsolationScope().setTag(key, value);\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `Sentry.setExtra()` instead.\n */\n setExtra(key, extra) {\n // TODO(v8): The top level `Sentry.setExtra()` function should write ONLY to the isolation scope.\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().setExtra(key, extra);\n // eslint-disable-next-line deprecation/deprecation\n this.getIsolationScope().setExtra(key, extra);\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `Sentry.setContext()` instead.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n setContext(name, context) {\n // TODO(v8): The top level `Sentry.setContext()` function should write ONLY to the isolation scope.\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().setContext(name, context);\n // eslint-disable-next-line deprecation/deprecation\n this.getIsolationScope().setContext(name, context);\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `getScope()` directly.\n */\n configureScope(callback) {\n // eslint-disable-next-line deprecation/deprecation\n const { scope, client } = this.getStackTop();\n if (client) {\n callback(scope);\n }\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line deprecation/deprecation\n run(callback) {\n // eslint-disable-next-line deprecation/deprecation\n const oldHub = makeMain(this);\n try {\n callback(this);\n } finally {\n // eslint-disable-next-line deprecation/deprecation\n makeMain(oldHub);\n }\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `Sentry.getClient().getIntegrationByName()` instead.\n */\n getIntegration(integration) {\n // eslint-disable-next-line deprecation/deprecation\n const client = this.getClient();\n if (!client) return null;\n try {\n // eslint-disable-next-line deprecation/deprecation\n return client.getIntegration(integration);\n } catch (_oO) {\n DEBUG_BUILD && logger.warn(`Cannot retrieve integration ${integration.id} from the current Hub`);\n return null;\n }\n }\n\n /**\n * Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.\n *\n * A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a\n * new child span within the transaction or any span, call the respective `.startChild()` method.\n *\n * Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.\n *\n * The transaction must be finished with a call to its `.end()` method, at which point the transaction with all its\n * finished child spans will be sent to Sentry.\n *\n * @param context Properties of the new `Transaction`.\n * @param customSamplingContext Information given to the transaction sampling function (along with context-dependent\n * default values). See {@link Options.tracesSampler}.\n *\n * @returns The transaction which was just started\n *\n * @deprecated Use `startSpan()`, `startSpanManual()` or `startInactiveSpan()` instead.\n */\n startTransaction(context, customSamplingContext) {\n const result = this._callExtensionMethod('startTransaction', context, customSamplingContext);\n\n if (DEBUG_BUILD && !result) {\n // eslint-disable-next-line deprecation/deprecation\n const client = this.getClient();\n if (!client) {\n logger.warn(\n \"Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'\",\n );\n } else {\n logger.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n`);\n }\n }\n\n return result;\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `spanToTraceHeader()` instead.\n */\n traceHeaders() {\n return this._callExtensionMethod('traceHeaders');\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use top level `captureSession` instead.\n */\n captureSession(endSession = false) {\n // both send the update and pull the session from the scope\n if (endSession) {\n // eslint-disable-next-line deprecation/deprecation\n return this.endSession();\n }\n\n // only send the update\n this._sendSessionUpdate();\n }\n\n /**\n * @inheritDoc\n * @deprecated Use top level `endSession` instead.\n */\n endSession() {\n // eslint-disable-next-line deprecation/deprecation\n const layer = this.getStackTop();\n const scope = layer.scope;\n const session = scope.getSession();\n if (session) {\n closeSession(session);\n }\n this._sendSessionUpdate();\n\n // the session is over; take it off of the scope\n scope.setSession();\n }\n\n /**\n * @inheritDoc\n * @deprecated Use top level `startSession` instead.\n */\n startSession(context) {\n // eslint-disable-next-line deprecation/deprecation\n const { scope, client } = this.getStackTop();\n const { release, environment = DEFAULT_ENVIRONMENT } = (client && client.getOptions()) || {};\n\n // Will fetch userAgent if called from browser sdk\n const { userAgent } = GLOBAL_OBJ.navigator || {};\n\n const session = makeSession({\n release,\n environment,\n user: scope.getUser(),\n ...(userAgent && { userAgent }),\n ...context,\n });\n\n // End existing session if there's one\n const currentSession = scope.getSession && scope.getSession();\n if (currentSession && currentSession.status === 'ok') {\n updateSession(currentSession, { status: 'exited' });\n }\n // eslint-disable-next-line deprecation/deprecation\n this.endSession();\n\n // Afterwards we set the new session on the scope\n scope.setSession(session);\n\n return session;\n }\n\n /**\n * Returns if default PII should be sent to Sentry and propagated in ourgoing requests\n * when Tracing is used.\n *\n * @deprecated Use top-level `getClient().getOptions().sendDefaultPii` instead. This function\n * only unnecessarily increased API surface but only wrapped accessing the option.\n */\n shouldSendDefaultPii() {\n // eslint-disable-next-line deprecation/deprecation\n const client = this.getClient();\n const options = client && client.getOptions();\n return Boolean(options && options.sendDefaultPii);\n }\n\n /**\n * Sends the current Session on the scope\n */\n _sendSessionUpdate() {\n // eslint-disable-next-line deprecation/deprecation\n const { scope, client } = this.getStackTop();\n\n const session = scope.getSession();\n if (session && client && client.captureSession) {\n client.captureSession(session);\n }\n }\n\n /**\n * Calls global extension method and binding current instance to the function call\n */\n // @ts-expect-error Function lacks ending return statement and return type does not include 'undefined'. ts(2366)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n _callExtensionMethod(method, ...args) {\n const carrier = getMainCarrier();\n const sentry = carrier.__SENTRY__;\n if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') {\n return sentry.extensions[method].apply(this, args);\n }\n DEBUG_BUILD && logger.warn(`Extension method ${method} couldn't be found, doing nothing.`);\n }\n}\n\n/**\n * Returns the global shim registry.\n *\n * FIXME: This function is problematic, because despite always returning a valid Carrier,\n * it has an optional `__SENTRY__` property, which then in turn requires us to always perform an unnecessary check\n * at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there.\n **/\nfunction getMainCarrier() {\n GLOBAL_OBJ.__SENTRY__ = GLOBAL_OBJ.__SENTRY__ || {\n extensions: {},\n hub: undefined,\n };\n return GLOBAL_OBJ;\n}\n\n/**\n * Replaces the current main hub with the passed one on the global object\n *\n * @returns The old replaced hub\n *\n * @deprecated Use `setCurrentClient()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction makeMain(hub) {\n const registry = getMainCarrier();\n const oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}\n\n/**\n * Returns the default hub instance.\n *\n * If a hub is already registered in the global carrier but this module\n * contains a more recent version, it replaces the registered version.\n * Otherwise, the currently registered hub will be returned.\n *\n * @deprecated Use the respective replacement method directly instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction getCurrentHub() {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n\n if (registry.__SENTRY__ && registry.__SENTRY__.acs) {\n const hub = registry.__SENTRY__.acs.getCurrentHub();\n\n if (hub) {\n return hub;\n }\n }\n\n // Return hub that lives on a global object\n return getGlobalHub(registry);\n}\n\n/**\n * Get the currently active isolation scope.\n * The isolation scope is active for the current exection context,\n * meaning that it will remain stable for the same Hub.\n */\nfunction getIsolationScope() {\n // eslint-disable-next-line deprecation/deprecation\n return getCurrentHub().getIsolationScope();\n}\n\n// eslint-disable-next-line deprecation/deprecation\nfunction getGlobalHub(registry = getMainCarrier()) {\n // If there's no hub, or its an old API, assign a new one\n\n if (\n !hasHubOnCarrier(registry) ||\n // eslint-disable-next-line deprecation/deprecation\n getHubFromCarrier(registry).isOlderThan(API_VERSION)\n ) {\n // eslint-disable-next-line deprecation/deprecation\n setHubOnCarrier(registry, new Hub());\n }\n\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}\n\n/**\n * @private Private API with no semver guarantees!\n *\n * If the carrier does not contain a hub, a new hub is created with the global hub client and scope.\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction ensureHubOnCarrier(carrier, parent = getGlobalHub()) {\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (\n !hasHubOnCarrier(carrier) ||\n // eslint-disable-next-line deprecation/deprecation\n getHubFromCarrier(carrier).isOlderThan(API_VERSION)\n ) {\n // eslint-disable-next-line deprecation/deprecation\n const client = parent.getClient();\n // eslint-disable-next-line deprecation/deprecation\n const scope = parent.getScope();\n // eslint-disable-next-line deprecation/deprecation\n const isolationScope = parent.getIsolationScope();\n // eslint-disable-next-line deprecation/deprecation\n setHubOnCarrier(carrier, new Hub(client, scope.clone(), isolationScope.clone()));\n }\n}\n\n/**\n * @private Private API with no semver guarantees!\n *\n * Sets the global async context strategy\n */\nfunction setAsyncContextStrategy(strategy) {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n registry.__SENTRY__ = registry.__SENTRY__ || {};\n registry.__SENTRY__.acs = strategy;\n}\n\n/**\n * Runs the supplied callback in its own async context. Async Context strategies are defined per SDK.\n *\n * @param callback The callback to run in its own async context\n * @param options Options to pass to the async context strategy\n * @returns The result of the callback\n */\nfunction runWithAsyncContext(callback, options = {}) {\n const registry = getMainCarrier();\n\n if (registry.__SENTRY__ && registry.__SENTRY__.acs) {\n return registry.__SENTRY__.acs.runWithAsyncContext(callback, options);\n }\n\n // if there was no strategy, fallback to just calling the callback\n return callback();\n}\n\n/**\n * This will tell whether a carrier has a hub on it or not\n * @param carrier object\n */\nfunction hasHubOnCarrier(carrier) {\n return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);\n}\n\n/**\n * This will create a new {@link Hub} and add to the passed object on\n * __SENTRY__.hub.\n * @param carrier object\n * @hidden\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction getHubFromCarrier(carrier) {\n // eslint-disable-next-line deprecation/deprecation\n return getGlobalSingleton('hub', () => new Hub(), carrier);\n}\n\n/**\n * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute\n * @param carrier object\n * @param hub Hub\n * @returns A boolean indicating success or failure\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction setHubOnCarrier(carrier, hub) {\n if (!carrier) return false;\n const __SENTRY__ = (carrier.__SENTRY__ = carrier.__SENTRY__ || {});\n __SENTRY__.hub = hub;\n return true;\n}\n\nexport { API_VERSION, Hub, ensureHubOnCarrier, getCurrentHub, getHubFromCarrier, getIsolationScope, getMainCarrier, makeMain, runWithAsyncContext, setAsyncContextStrategy, setHubOnCarrier };\n","const SDK_VERSION = '7.120.3';\n\nexport { SDK_VERSION };\n","/**\n * Checks whether given url points to Sentry server\n * @param url url to verify\n *\n * TODO(v8): Remove Hub fallback type\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction isSentryRequestUrl(url, hubOrClient) {\n const client =\n hubOrClient && isHub(hubOrClient)\n ? // eslint-disable-next-line deprecation/deprecation\n hubOrClient.getClient()\n : hubOrClient;\n const dsn = client && client.getDsn();\n const tunnel = client && client.getOptions().tunnel;\n\n return checkDsn(url, dsn) || checkTunnel(url, tunnel);\n}\n\nfunction checkTunnel(url, tunnel) {\n if (!tunnel) {\n return false;\n }\n\n return removeTrailingSlash(url) === removeTrailingSlash(tunnel);\n}\n\nfunction checkDsn(url, dsn) {\n return dsn ? url.includes(dsn.host) : false;\n}\n\nfunction removeTrailingSlash(str) {\n return str[str.length - 1] === '/' ? str.slice(0, -1) : str;\n}\n\n// eslint-disable-next-line deprecation/deprecation\nfunction isHub(hubOrClient) {\n // eslint-disable-next-line deprecation/deprecation\n return (hubOrClient ).getClient !== undefined;\n}\n\nexport { isSentryRequestUrl };\n","import { DEBUG_BUILD } from './debug-build.js';\nimport { logger } from './logger.js';\nimport { getGlobalObject } from './worldwide.js';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsErrorEvent() {\n try {\n new ErrorEvent('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsDOMError() {\n try {\n // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n // 1 argument required, but only 0 present.\n // @ts-expect-error It really needs 1 argument, not 0.\n new DOMError('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsDOMException() {\n try {\n new DOMException('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsFetch() {\n if (!('fetch' in WINDOW)) {\n return false;\n }\n\n try {\n new Headers();\n new Request('http://www.example.com');\n new Response();\n return true;\n } catch (e) {\n return false;\n }\n}\n/**\n * isNativeFetch checks if the given function is a native implementation of fetch()\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction isNativeFetch(func) {\n return func && /^function fetch\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\n\n/**\n * Tells whether current environment supports Fetch API natively\n * {@link supportsNativeFetch}.\n *\n * @returns true if `window.fetch` is natively implemented, false otherwise\n */\nfunction supportsNativeFetch() {\n if (typeof EdgeRuntime === 'string') {\n return true;\n }\n\n if (!supportsFetch()) {\n return false;\n }\n\n // Fast path to avoid DOM I/O\n // eslint-disable-next-line @typescript-eslint/unbound-method\n if (isNativeFetch(WINDOW.fetch)) {\n return true;\n }\n\n // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)\n // so create a \"pure\" iframe to see if that has native fetch\n let result = false;\n const doc = WINDOW.document;\n // eslint-disable-next-line deprecation/deprecation\n if (doc && typeof (doc.createElement ) === 'function') {\n try {\n const sandbox = doc.createElement('iframe');\n sandbox.hidden = true;\n doc.head.appendChild(sandbox);\n if (sandbox.contentWindow && sandbox.contentWindow.fetch) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n result = isNativeFetch(sandbox.contentWindow.fetch);\n }\n doc.head.removeChild(sandbox);\n } catch (err) {\n DEBUG_BUILD &&\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n }\n }\n\n return result;\n}\n\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsReportingObserver() {\n return 'ReportingObserver' in WINDOW;\n}\n\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsReferrerPolicy() {\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default'\n // (see https://caniuse.com/#feat=referrer-policy),\n // it doesn't. And it throws an exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n\n if (!supportsFetch()) {\n return false;\n }\n\n try {\n new Request('_', {\n referrerPolicy: 'origin' ,\n });\n return true;\n } catch (e) {\n return false;\n }\n}\n\nexport { isNativeFetch, supportsDOMError, supportsDOMException, supportsErrorEvent, supportsFetch, supportsNativeFetch, supportsReferrerPolicy, supportsReportingObserver };\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { logger } from '../logger.js';\nimport { getFunctionName } from '../stacktrace.js';\n\n// We keep the handlers globally\nconst handlers = {};\nconst instrumented = {};\n\n/** Add a handler function. */\nfunction addHandler(type, handler) {\n handlers[type] = handlers[type] || [];\n (handlers[type] ).push(handler);\n}\n\n/**\n * Reset all instrumentation handlers.\n * This can be used by tests to ensure we have a clean slate of instrumentation handlers.\n */\nfunction resetInstrumentationHandlers() {\n Object.keys(handlers).forEach(key => {\n handlers[key ] = undefined;\n });\n}\n\n/** Maybe run an instrumentation function, unless it was already called. */\nfunction maybeInstrument(type, instrumentFn) {\n if (!instrumented[type]) {\n instrumentFn();\n instrumented[type] = true;\n }\n}\n\n/** Trigger handlers for a given instrumentation type. */\nfunction triggerHandlers(type, data) {\n const typeHandlers = type && handlers[type];\n if (!typeHandlers) {\n return;\n }\n\n for (const handler of typeHandlers) {\n try {\n handler(data);\n } catch (e) {\n DEBUG_BUILD &&\n logger.error(\n `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(handler)}\\nError:`,\n e,\n );\n }\n }\n}\n\nexport { addHandler, maybeInstrument, resetInstrumentationHandlers, triggerHandlers };\n","import { fill } from '../object.js';\nimport { supportsNativeFetch } from '../supports.js';\nimport { GLOBAL_OBJ } from '../worldwide.js';\nimport { addHandler, maybeInstrument, triggerHandlers } from './_handlers.js';\n\n/**\n * Add an instrumentation handler for when a fetch request happens.\n * The handler function is called once when the request starts and once when it ends,\n * which can be identified by checking if it has an `endTimestamp`.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addFetchInstrumentationHandler(handler) {\n const type = 'fetch';\n addHandler(type, handler);\n maybeInstrument(type, instrumentFetch);\n}\n\nfunction instrumentFetch() {\n if (!supportsNativeFetch()) {\n return;\n }\n\n fill(GLOBAL_OBJ, 'fetch', function (originalFetch) {\n return function (...args) {\n const { method, url } = parseFetchArgs(args);\n\n const handlerData = {\n args,\n fetchData: {\n method,\n url,\n },\n startTimestamp: Date.now(),\n };\n\n triggerHandlers('fetch', {\n ...handlerData,\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return originalFetch.apply(GLOBAL_OBJ, args).then(\n (response) => {\n const finishedHandlerData = {\n ...handlerData,\n endTimestamp: Date.now(),\n response,\n };\n\n triggerHandlers('fetch', finishedHandlerData);\n return response;\n },\n (error) => {\n const erroredHandlerData = {\n ...handlerData,\n endTimestamp: Date.now(),\n error,\n };\n\n triggerHandlers('fetch', erroredHandlerData);\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the sentry.javascript SDK caught an error invoking your application code.\n // This is expected behavior and NOT indicative of a bug with sentry.javascript.\n throw error;\n },\n );\n };\n });\n}\n\nfunction hasProp(obj, prop) {\n return !!obj && typeof obj === 'object' && !!(obj )[prop];\n}\n\nfunction getUrlFromResource(resource) {\n if (typeof resource === 'string') {\n return resource;\n }\n\n if (!resource) {\n return '';\n }\n\n if (hasProp(resource, 'url')) {\n return resource.url;\n }\n\n if (resource.toString) {\n return resource.toString();\n }\n\n return '';\n}\n\n/**\n * Parses the fetch arguments to find the used Http method and the url of the request.\n * Exported for tests only.\n */\nfunction parseFetchArgs(fetchArgs) {\n if (fetchArgs.length === 0) {\n return { method: 'GET', url: '' };\n }\n\n if (fetchArgs.length === 2) {\n const [url, options] = fetchArgs ;\n\n return {\n url: getUrlFromResource(url),\n method: hasProp(options, 'method') ? String(options.method).toUpperCase() : 'GET',\n };\n }\n\n const arg = fetchArgs[0];\n return {\n url: getUrlFromResource(arg ),\n method: hasProp(arg, 'method') ? String(arg.method).toUpperCase() : 'GET',\n };\n}\n\nexport { addFetchInstrumentationHandler, parseFetchArgs };\n","import { isString } from '../is.js';\nimport { fill } from '../object.js';\nimport { GLOBAL_OBJ } from '../worldwide.js';\nimport { addHandler, maybeInstrument, triggerHandlers } from './_handlers.js';\n\nconst WINDOW = GLOBAL_OBJ ;\n\nconst SENTRY_XHR_DATA_KEY = '__sentry_xhr_v3__';\n\n/**\n * Add an instrumentation handler for when an XHR request happens.\n * The handler function is called once when the request starts and once when it ends,\n * which can be identified by checking if it has an `endTimestamp`.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addXhrInstrumentationHandler(handler) {\n const type = 'xhr';\n addHandler(type, handler);\n maybeInstrument(type, instrumentXHR);\n}\n\n/** Exported only for tests. */\nfunction instrumentXHR() {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (!(WINDOW ).XMLHttpRequest) {\n return;\n }\n\n const xhrproto = XMLHttpRequest.prototype;\n\n fill(xhrproto, 'open', function (originalOpen) {\n return function ( ...args) {\n const startTimestamp = Date.now();\n\n // open() should always be called with two or more arguments\n // But to be on the safe side, we actually validate this and bail out if we don't have a method & url\n const method = isString(args[0]) ? args[0].toUpperCase() : undefined;\n const url = parseUrl(args[1]);\n\n if (!method || !url) {\n return originalOpen.apply(this, args);\n }\n\n this[SENTRY_XHR_DATA_KEY] = {\n method,\n url,\n request_headers: {},\n };\n\n // if Sentry key appears in URL, don't capture it as a request\n if (method === 'POST' && url.match(/sentry_key/)) {\n this.__sentry_own_request__ = true;\n }\n\n const onreadystatechangeHandler = () => {\n // For whatever reason, this is not the same instance here as from the outer method\n const xhrInfo = this[SENTRY_XHR_DATA_KEY];\n\n if (!xhrInfo) {\n return;\n }\n\n if (this.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n xhrInfo.status_code = this.status;\n } catch (e) {\n /* do nothing */\n }\n\n const handlerData = {\n args: [method, url],\n endTimestamp: Date.now(),\n startTimestamp,\n xhr: this,\n };\n triggerHandlers('xhr', handlerData);\n }\n };\n\n if ('onreadystatechange' in this && typeof this.onreadystatechange === 'function') {\n fill(this, 'onreadystatechange', function (original) {\n return function ( ...readyStateArgs) {\n onreadystatechangeHandler();\n return original.apply(this, readyStateArgs);\n };\n });\n } else {\n this.addEventListener('readystatechange', onreadystatechangeHandler);\n }\n\n // Intercepting `setRequestHeader` to access the request headers of XHR instance.\n // This will only work for user/library defined headers, not for the default/browser-assigned headers.\n // Request cookies are also unavailable for XHR, as `Cookie` header can't be defined by `setRequestHeader`.\n fill(this, 'setRequestHeader', function (original) {\n return function ( ...setRequestHeaderArgs) {\n const [header, value] = setRequestHeaderArgs;\n\n const xhrInfo = this[SENTRY_XHR_DATA_KEY];\n\n if (xhrInfo && isString(header) && isString(value)) {\n xhrInfo.request_headers[header.toLowerCase()] = value;\n }\n\n return original.apply(this, setRequestHeaderArgs);\n };\n });\n\n return originalOpen.apply(this, args);\n };\n });\n\n fill(xhrproto, 'send', function (originalSend) {\n return function ( ...args) {\n const sentryXhrData = this[SENTRY_XHR_DATA_KEY];\n\n if (!sentryXhrData) {\n return originalSend.apply(this, args);\n }\n\n if (args[0] !== undefined) {\n sentryXhrData.body = args[0];\n }\n\n const handlerData = {\n args: [sentryXhrData.method, sentryXhrData.url],\n startTimestamp: Date.now(),\n xhr: this,\n };\n triggerHandlers('xhr', handlerData);\n\n return originalSend.apply(this, args);\n };\n });\n}\n\nfunction parseUrl(url) {\n if (isString(url)) {\n return url;\n }\n\n try {\n // url can be a string or URL\n // but since URL is not available in IE11, we do not check for it,\n // but simply assume it is an URL and return `toString()` from it (which returns the full URL)\n // If that fails, we just return undefined\n return (url ).toString();\n } catch (e2) {} // eslint-disable-line no-empty\n\n return undefined;\n}\n\nexport { SENTRY_XHR_DATA_KEY, addXhrInstrumentationHandler, instrumentXHR };\n","import { defineIntegration, convertIntegrationFnToClass, getClient, captureEvent, isSentryRequestUrl } from '@sentry/core';\nimport { supportsNativeFetch, addFetchInstrumentationHandler, GLOBAL_OBJ, addXhrInstrumentationHandler, SENTRY_XHR_DATA_KEY, logger, addExceptionMechanism } from '@sentry/utils';\nimport { DEBUG_BUILD } from './debug-build.js';\n\nconst INTEGRATION_NAME = 'HttpClient';\n\nconst _httpClientIntegration = ((options = {}) => {\n const _options = {\n failedRequestStatusCodes: [[500, 599]],\n failedRequestTargets: [/.*/],\n ...options,\n };\n\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function\n setup(client) {\n _wrapFetch(client, _options);\n _wrapXHR(client, _options);\n },\n };\n}) ;\n\nconst httpClientIntegration = defineIntegration(_httpClientIntegration);\n\n/**\n * Create events for failed client side HTTP requests.\n * @deprecated Use `httpClientIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst HttpClient = convertIntegrationFnToClass(INTEGRATION_NAME, httpClientIntegration)\n\n;\n\n/**\n * Interceptor function for fetch requests\n *\n * @param requestInfo The Fetch API request info\n * @param response The Fetch API response\n * @param requestInit The request init object\n */\nfunction _fetchResponseHandler(\n options,\n requestInfo,\n response,\n requestInit,\n) {\n if (_shouldCaptureResponse(options, response.status, response.url)) {\n const request = _getRequest(requestInfo, requestInit);\n\n let requestHeaders, responseHeaders, requestCookies, responseCookies;\n\n if (_shouldSendDefaultPii()) {\n [{ headers: requestHeaders, cookies: requestCookies }, { headers: responseHeaders, cookies: responseCookies }] = [\n { cookieHeader: 'Cookie', obj: request },\n { cookieHeader: 'Set-Cookie', obj: response },\n ].map(({ cookieHeader, obj }) => {\n const headers = _extractFetchHeaders(obj.headers);\n let cookies;\n\n try {\n const cookieString = headers[cookieHeader] || headers[cookieHeader.toLowerCase()] || undefined;\n\n if (cookieString) {\n cookies = _parseCookieString(cookieString);\n }\n } catch (e) {\n DEBUG_BUILD && logger.log(`Could not extract cookies from header ${cookieHeader}`);\n }\n\n return {\n headers,\n cookies,\n };\n });\n }\n\n const event = _createEvent({\n url: request.url,\n method: request.method,\n status: response.status,\n requestHeaders,\n responseHeaders,\n requestCookies,\n responseCookies,\n });\n\n captureEvent(event);\n }\n}\n\n/**\n * Interceptor function for XHR requests\n *\n * @param xhr The XHR request\n * @param method The HTTP method\n * @param headers The HTTP headers\n */\nfunction _xhrResponseHandler(\n options,\n xhr,\n method,\n headers,\n) {\n if (_shouldCaptureResponse(options, xhr.status, xhr.responseURL)) {\n let requestHeaders, responseCookies, responseHeaders;\n\n if (_shouldSendDefaultPii()) {\n try {\n const cookieString = xhr.getResponseHeader('Set-Cookie') || xhr.getResponseHeader('set-cookie') || undefined;\n\n if (cookieString) {\n responseCookies = _parseCookieString(cookieString);\n }\n } catch (e) {\n DEBUG_BUILD && logger.log('Could not extract cookies from response headers');\n }\n\n try {\n responseHeaders = _getXHRResponseHeaders(xhr);\n } catch (e) {\n DEBUG_BUILD && logger.log('Could not extract headers from response');\n }\n\n requestHeaders = headers;\n }\n\n const event = _createEvent({\n url: xhr.responseURL,\n method,\n status: xhr.status,\n requestHeaders,\n // Can't access request cookies from XHR\n responseHeaders,\n responseCookies,\n });\n\n captureEvent(event);\n }\n}\n\n/**\n * Extracts response size from `Content-Length` header when possible\n *\n * @param headers\n * @returns The response size in bytes or undefined\n */\nfunction _getResponseSizeFromHeaders(headers) {\n if (headers) {\n const contentLength = headers['Content-Length'] || headers['content-length'];\n\n if (contentLength) {\n return parseInt(contentLength, 10);\n }\n }\n\n return undefined;\n}\n\n/**\n * Creates an object containing cookies from the given cookie string\n *\n * @param cookieString The cookie string to parse\n * @returns The parsed cookies\n */\nfunction _parseCookieString(cookieString) {\n return cookieString.split('; ').reduce((acc, cookie) => {\n const [key, value] = cookie.split('=');\n acc[key] = value;\n return acc;\n }, {});\n}\n\n/**\n * Extracts the headers as an object from the given Fetch API request or response object\n *\n * @param headers The headers to extract\n * @returns The extracted headers as an object\n */\nfunction _extractFetchHeaders(headers) {\n const result = {};\n\n headers.forEach((value, key) => {\n result[key] = value;\n });\n\n return result;\n}\n\n/**\n * Extracts the response headers as an object from the given XHR object\n *\n * @param xhr The XHR object to extract the response headers from\n * @returns The response headers as an object\n */\nfunction _getXHRResponseHeaders(xhr) {\n const headers = xhr.getAllResponseHeaders();\n\n if (!headers) {\n return {};\n }\n\n return headers.split('\\r\\n').reduce((acc, line) => {\n const [key, value] = line.split(': ');\n acc[key] = value;\n return acc;\n }, {});\n}\n\n/**\n * Checks if the given target url is in the given list of targets\n *\n * @param target The target url to check\n * @returns true if the target url is in the given list of targets, false otherwise\n */\nfunction _isInGivenRequestTargets(\n failedRequestTargets,\n target,\n) {\n return failedRequestTargets.some((givenRequestTarget) => {\n if (typeof givenRequestTarget === 'string') {\n return target.includes(givenRequestTarget);\n }\n\n return givenRequestTarget.test(target);\n });\n}\n\n/**\n * Checks if the given status code is in the given range\n *\n * @param status The status code to check\n * @returns true if the status code is in the given range, false otherwise\n */\nfunction _isInGivenStatusRanges(\n failedRequestStatusCodes,\n status,\n) {\n return failedRequestStatusCodes.some((range) => {\n if (typeof range === 'number') {\n return range === status;\n }\n\n return status >= range[0] && status <= range[1];\n });\n}\n\n/**\n * Wraps `fetch` function to capture request and response data\n */\nfunction _wrapFetch(client, options) {\n if (!supportsNativeFetch()) {\n return;\n }\n\n addFetchInstrumentationHandler(handlerData => {\n if (getClient() !== client) {\n return;\n }\n\n const { response, args } = handlerData;\n const [requestInfo, requestInit] = args ;\n\n if (!response) {\n return;\n }\n\n _fetchResponseHandler(options, requestInfo, response , requestInit);\n });\n}\n\n/**\n * Wraps XMLHttpRequest to capture request and response data\n */\nfunction _wrapXHR(client, options) {\n if (!('XMLHttpRequest' in GLOBAL_OBJ)) {\n return;\n }\n\n addXhrInstrumentationHandler(handlerData => {\n if (getClient() !== client) {\n return;\n }\n\n const xhr = handlerData.xhr ;\n\n const sentryXhrData = xhr[SENTRY_XHR_DATA_KEY];\n\n if (!sentryXhrData) {\n return;\n }\n\n const { method, request_headers: headers } = sentryXhrData;\n\n try {\n _xhrResponseHandler(options, xhr, method, headers);\n } catch (e) {\n DEBUG_BUILD && logger.warn('Error while extracting response event form XHR response', e);\n }\n });\n}\n\n/**\n * Checks whether to capture given response as an event\n *\n * @param status response status code\n * @param url response url\n */\nfunction _shouldCaptureResponse(options, status, url) {\n return (\n _isInGivenStatusRanges(options.failedRequestStatusCodes, status) &&\n _isInGivenRequestTargets(options.failedRequestTargets, url) &&\n !isSentryRequestUrl(url, getClient())\n );\n}\n\n/**\n * Creates a synthetic Sentry event from given response data\n *\n * @param data response data\n * @returns event\n */\nfunction _createEvent(data\n\n) {\n const message = `HTTP Client Error with status code: ${data.status}`;\n\n const event = {\n message,\n exception: {\n values: [\n {\n type: 'Error',\n value: message,\n },\n ],\n },\n request: {\n url: data.url,\n method: data.method,\n headers: data.requestHeaders,\n cookies: data.requestCookies,\n },\n contexts: {\n response: {\n status_code: data.status,\n headers: data.responseHeaders,\n cookies: data.responseCookies,\n body_size: _getResponseSizeFromHeaders(data.responseHeaders),\n },\n },\n };\n\n addExceptionMechanism(event, {\n type: 'http.client',\n handled: false,\n });\n\n return event;\n}\n\nfunction _getRequest(requestInfo, requestInit) {\n if (!requestInit && requestInfo instanceof Request) {\n return requestInfo;\n }\n\n // If both are set, we try to construct a new Request with the given arguments\n // However, if e.g. the original request has a `body`, this will throw an error because it was already accessed\n // In this case, as a fallback, we just use the original request - using both is rather an edge case\n if (requestInfo instanceof Request && requestInfo.bodyUsed) {\n return requestInfo;\n }\n\n return new Request(requestInfo, requestInit);\n}\n\nfunction _shouldSendDefaultPii() {\n const client = getClient();\n return client ? Boolean(client.getOptions().sendDefaultPii) : false;\n}\n\nexport { HttpClient, httpClientIntegration };\n","import { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app/app.module';\nimport { environment } from './environments/environment';\n\nimport { Amplify } from 'aws-amplify';\n\nimport { initializeApp } from \"firebase/app\"\nimport { getRemoteConfig, fetchAndActivate, getValue } from \"firebase/remote-config\";\nimport { getAnalytics, setUserProperties } from \"firebase/analytics\";\n\nimport amplitude from 'amplitude-js';\nimport { RemoteConfig_SupportNumber } from '@brightside-web/desktop/data-access/shared';\nimport { PerformanceTrackingConfigure } from '@micro-core/lib-config';\nimport * as Sentry from \"@sentry/angular\";\nimport * as SentryIntegrations from \"@sentry/integrations\";\n\nconst getSubDomain = () => {\n const hostnameSplit = window.location.hostname.toLowerCase().split('.');\n const tldDomain = hostnameSplit[hostnameSplit.length - 2];\n if (hostnameSplit[0] === 'app' || tldDomain !== 'gobrightside') {\n return '';\n } else {\n return hostnameSplit[0];\n }\n};\n\nconst getEnvironment = () => {\n const hostname = window.location.hostname.toLowerCase();\n\n if (environment.production) {\n return 'prod';\n } else if (hostname.includes('stage')) {\n return 'stage';\n } else {\n return 'dev2';\n }\n};\n\nconst firebaseApp = initializeApp(environment.firebase);\nconst remoteConfig = getRemoteConfig(firebaseApp);\nconst fbAnalytics = getAnalytics(firebaseApp);\nnew PerformanceTrackingConfigure().setUpConfig(environment);\n\nconst SentryClient = Sentry.getCurrentHub().getClient();\n\n// SENTRY INTEGRATIONS DON'T LIKE iOS webview\n\nif (SentryClient) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n SentryClient.addIntegration(new SentryIntegrations.ExtraErrorData());\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n SentryClient.addIntegration(new SentryIntegrations.Debug());\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n SentryClient.addIntegration(new SentryIntegrations.HttpClient());\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // SentryClient.addIntegration(new SentryIntegrations.CaptureConsole({levels: ['error']}));\n} else {\n console.error('Sentry not ready');\n}\n\namplitude.getInstance().init(environment.amplitude.apiKey, undefined, {\n includeUtm: true,\n includeGclid: true,\n includeFbclid: true,\n includeReferrer: true,\n});\n\namplitude.getInstance().setVersionName(environment.appVersion);\n\n\n// default configs for RemoteConfig.\nremoteConfig.defaultConfig = {\n supportNumber: '8559401507',\n bankHolidays:\n '2021-09-06,2021-10-11,2021-11-11,2021-11-25,2022-01-17,2022-02-21,2022-05-30,2022-06-20,2022-07-04,2022-09-05,2022-10-10,2022-11-11,2022-11-24,2022-12-26,2023-01-02,2023-01-16,2023-02-20,2023-05-29,2023-06-19,2023-07-04,2023-09-04,2023-10-09,2023-11-23,2023-12-25,2024-01-01,2024-01-15,2024-02-19,2024-05-27,2024-06-19,2024-07-04,2024-09-02,2024-10-14,2024-11-11,2024-11-28,2024-12-25,2025-01-01,2025-01-20,2025-02-17,2025-05-26,2025-06-19,2025-07-04,2025-09-01,2025-10-13,2025-11-11,2025-11-27,2025-12-25',\n unlockedCaseTypes: 'Emergency_Savings,Emergency_Cash,Credit_Score',\n};\n\nconst company = getSubDomain();\nconst properties: any = {};\nif (company) {\n properties['company'] = company;\n}\nconst env = getEnvironment();\nif (env) {\n properties['environment'] = env;\n}\n\n\nsetUserProperties(fbAnalytics, properties);\n\nremoteConfig.settings.minimumFetchIntervalMillis = environment.production ? 3000 : 0;\n\nfetchAndActivate(remoteConfig).then(\n () => {\n console.log(`Support number: ${getValue(remoteConfig, RemoteConfig_SupportNumber).asString()}`);\n })\n .catch((err)=> {\n if (!environment.production) {\n console.log('debug: a firebase error has occurred', err);\n }\n });\n\nconst getTimeZone = () => {\n const formatParts = Intl.DateTimeFormat('en', { timeZoneName: 'short' }).format().split(' ');\n\n return formatParts[formatParts.length - 1];\n};\n\nconst getBrowser = () => {\n const userAgent = navigator.userAgent;\n const browserMapping: { [key: string]: { validMatch: string[]; extraChecks?: Function[] } } = {\n Opera: {\n validMatch: ['Opera', 'OPR'],\n },\n Chrome: {\n validMatch: ['Chrome'],\n },\n Safari: {\n validMatch: ['Safari'],\n },\n Firefox: {\n validMatch: ['Firefox'],\n },\n IE: {\n validMatch: ['MSIE'],\n extraChecks: [() => Object.keys(document).includes('documentMode')],\n },\n };\n\n return (\n Object.keys(browserMapping).filter((key: string) => {\n const checkDetails = browserMapping[key];\n\n if (checkDetails.validMatch.some((browserName) => userAgent.includes(browserName))) {\n //If there are extra checks, make sure they all return true\n if (checkDetails.extraChecks && !checkDetails.extraChecks.every((checkFunc) => checkFunc())) {\n return false;\n }\n\n return true;\n }\n\n return false;\n })[0] || 'Unknown'\n );\n};\n\n// does anybody know why we are not simply using a UUID library to generate a UUID???\nconst generateUUID = () => {\n let d = new Date().getTime(); //Timestamp\n let d2 = (typeof performance !== 'undefined' && performance.now && performance.now() * 1000) || 0; //Time in microseconds since page-load or 0 if unsupported\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n let r = Math.random() * 16; //random number between 0 and 16\n if (d > 0) {\n //Use timestamp until depleted\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line no-bitwise\n r = (d + r) % 16 | 0;\n d = Math.floor(d / 16);\n } else {\n //Use microseconds since page-load if supported\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line no-bitwise\n r = (d2 + r) % 16 | 0;\n d2 = Math.floor(d2 / 16);\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line no-bitwise\n return (c === 'x' ? r : (r & 0x3) | 0x8).toString(16);\n });\n};\n// tslint:enable:no-bitwise\n\nconst getDeviceId = () => {\n //don't want to use SessionStorage here.\n let deviceId = window.localStorage['DEVICE_ID'];\n if (!deviceId) {\n deviceId = generateUUID();\n window.localStorage['DEVICE_ID'] = deviceId;\n }\n return deviceId;\n};\n\nconst getStandardHeaders = () => {\n const headers: { [key: string]: any } = {\n 'Content-Type': 'application/json',\n 'X-BS-OS-Name': 'Desktop',\n 'X-BS-Model': getBrowser(),\n 'X-BS-Timezone': getTimeZone(),\n 'X-BS-GmtOffset': `${new Date().getTimezoneOffset() / -60}`,\n 'X-BS-DeviceId': getDeviceId(),\n };\n\n return headers;\n};\n\n//sso domain for hosted ui\nconst domain = environment.hostedDomain;\n\n//sso callback\nlet location = window.location.origin;\nif (!location.endsWith('/')) {\n location = `${location}/`;\n}\n\nif (environment.production) {\n enableProdMode();\n}\n\nplatformBrowserDynamic()\n .bootstrapModule(AppModule)\n .then((module) => {\n //The code is needed to support the native application sending bridge events\n //into the message bus for the micro application\n window.app = module;\n })\n .catch((err) => console.error(err));\n\n// allow both formats.\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\n// eslint-disable-next-line no-bitwise\n\nAmplify.configure({\n API: {\n REST: {\n 'api-mobile' : {\n endpoint: environment.awsmobile.endpoints['api-mobile'].endpoint,\n region: 'us-west-2',\n },\n 'api-mobile-noauth' : {\n endpoint: environment.awsmobile.endpoints['api-mobile-noauth'].endpoint,\n region: 'us-west-2'\n },\n 'cdn-mobile-noauth' : {\n endpoint: environment.awsmobile.endpoints['cdn-mobile-noauth'].endpoint,\n region: 'us-west-2',\n },\n },\n },\n});\n// import { bootstrapApplication } from '@angular/platform-browser';\n// import { provideAuth0 } from '@auth0/auth0-angular';\n// import { AppComponent } from './app/app.component';\n//\n// bootstrapApplication(AppComponent, {\n// providers: [\n// provideAuth0({\n// domain: 'brightside-dev.us.auth0.com',\n// clientId: '0ODvgDRGb5hmSnuSwFHFDfNwXna5VsGV',\n// authorizationParams: {\n// redirect_uri: window.location.origin\n// }\n// }),\n// ]\n// });\n","import * as Sentry from '@sentry/angular'\nimport { Environment } from '@micro-core/environment';\n\nexport class PerformanceTrackingConfigure {\n constructor() {}\n\n public setUpConfig(environment: Environment) {\n Sentry.init({\n dsn: environment.performance.sentry.dsn,\n environment: environment.performance.sentry.environment,\n release: environment.appVersion || window.location.hostname.split('.')[1],\n integrations: [\n Sentry.browserTracingIntegration({\n instrumentNavigation: true \n }),\n Sentry.replayIntegration({\n maskAllText: true,\n blockAllMedia: true,\n }),\n ],\n\n tracesSampleRate: 1.0,\n replaysSessionSampleRate: 0.1,\n replaysOnErrorSampleRate: 1.0,\n });\n\n }\n}\n","import { addBreadcrumb } from './breadcrumbs.js';\nimport { getCurrentScope, withScope, getClient, getIsolationScope } from './currentScopes.js';\nimport { captureEvent, setUser, setTags, setTag, setExtra, setExtras, setContext, startSession, endSession } from './exports.js';\n\n/**\n * This is for legacy reasons, and returns a proxy object instead of a hub to be used.\n *\n * @deprecated Use the methods directly from the top level Sentry API (e.g. `Sentry.withScope`)\n * For more information see our migration guide for\n * [replacing `getCurrentHub` and `Hub`](https://github.com/getsentry/sentry-javascript/blob/develop/MIGRATION.md#deprecate-hub)\n * usage\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction getCurrentHubShim() {\n return {\n bindClient(client) {\n const scope = getCurrentScope();\n scope.setClient(client);\n },\n\n withScope,\n getClient: () => getClient() ,\n getScope: getCurrentScope,\n getIsolationScope,\n captureException: (exception, hint) => {\n return getCurrentScope().captureException(exception, hint);\n },\n captureMessage: (message, level, hint) => {\n return getCurrentScope().captureMessage(message, level, hint);\n },\n captureEvent,\n addBreadcrumb,\n setUser,\n setTags,\n setTag,\n setExtra,\n setExtras,\n setContext,\n\n getIntegration(integration) {\n const client = getClient();\n return (client && client.getIntegrationByName(integration.id)) || null;\n },\n\n startSession,\n endSession,\n captureSession(end) {\n // both send the update and pull the session from the scope\n if (end) {\n return endSession();\n }\n\n // only send the update\n _sendSessionUpdate();\n },\n };\n}\n\n/**\n * Returns the default hub instance.\n *\n * If a hub is already registered in the global carrier but this module\n * contains a more recent version, it replaces the registered version.\n * Otherwise, the currently registered hub will be returned.\n *\n * @deprecated Use the respective replacement method directly instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst getCurrentHub = getCurrentHubShim;\n\n/**\n * Sends the current Session on the scope\n */\nfunction _sendSessionUpdate() {\n const scope = getCurrentScope();\n const client = getClient();\n\n const session = scope.getSession();\n if (client && session) {\n client.captureSession(session);\n }\n}\n\nexport { getCurrentHub, getCurrentHubShim };\n","//! moment.js locale configuration\n//! locale : German (Austria) [de-at]\n//! author : lluchs : https://github.com/lluchs\n//! author: Menelion Elensúle: https://github.com/Oire\n//! author : Martin Groller : https://github.com/MadMG\n//! author : Mikolaj Dadela : https://github.com/mik01aj\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n m: ['eine Minute', 'einer Minute'],\n h: ['eine Stunde', 'einer Stunde'],\n d: ['ein Tag', 'einem Tag'],\n dd: [number + ' Tage', number + ' Tagen'],\n w: ['eine Woche', 'einer Woche'],\n M: ['ein Monat', 'einem Monat'],\n MM: [number + ' Monate', number + ' Monaten'],\n y: ['ein Jahr', 'einem Jahr'],\n yy: [number + ' Jahre', number + ' Jahren'],\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n }\n\n var deAt = moment.defineLocale('de-at', {\n months: 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(\n '_'\n ),\n monthsShort:\n 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),\n monthsParseExact: true,\n weekdays:\n 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(\n '_'\n ),\n weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),\n weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY HH:mm',\n LLLL: 'dddd, D. MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[heute um] LT [Uhr]',\n sameElse: 'L',\n nextDay: '[morgen um] LT [Uhr]',\n nextWeek: 'dddd [um] LT [Uhr]',\n lastDay: '[gestern um] LT [Uhr]',\n lastWeek: '[letzten] dddd [um] LT [Uhr]',\n },\n relativeTime: {\n future: 'in %s',\n past: 'vor %s',\n s: 'ein paar Sekunden',\n ss: '%d Sekunden',\n m: processRelativeTime,\n mm: '%d Minuten',\n h: processRelativeTime,\n hh: '%d Stunden',\n d: processRelativeTime,\n dd: processRelativeTime,\n w: processRelativeTime,\n ww: '%d Wochen',\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return deAt;\n\n})));\n","import { animate, query, style } from '@angular/animations';\n\nconst ANIMATION_QUERY_OPTIONS = {\n optional: true,\n};\n\nconst ANIMATION_SLIDE_TIME = '500ms';\nconst ANIMATION_SLIDE_EASING = 'ease-out';\nconst ANIMATION_SLIDE_META = `${ANIMATION_SLIDE_TIME} ${ANIMATION_SLIDE_EASING}`;\n\nconst ANIMATION_STAY_TIME = '2s';\nconst ANIMATION_STAY_EASING = 'ease-in';\nconst ANIMATION_STAY_META = `${ANIMATION_STAY_TIME} ${ANIMATION_STAY_EASING}`;\n\nconst ANIMATION_TRANSFORM_OFF_SCREEN = { transform: 'translateX(100vw)' };\nconst ANIMATION_TRANSFORM_ON_SCREEN = { transform: 'translateX(0)' };\n\nconst ANIMATION_OPACITY_HIDE = { opacity: 0 };\nconst ANIMATION_OPACITY_SHOW = { opacity: 1 };\n\nconst ANIMATION_ZINDEX_BELOW = { 'z-index': 1 };\nconst ANIMATION_ZINDEX_ABOVE = { 'z-index': 2 };\n\nconst ANIMATION_FROM_RIGHT = (useSelector: string) =>\n query(\n useSelector,\n [style(ANIMATION_TRANSFORM_OFF_SCREEN), animate(ANIMATION_SLIDE_META, style(ANIMATION_TRANSFORM_ON_SCREEN))],\n ANIMATION_QUERY_OPTIONS\n );\n\nconst ANIMATION_TO_RIGHT = (useSelector: string) =>\n query(\n useSelector,\n [\n style(ANIMATION_ZINDEX_ABOVE),\n animate(ANIMATION_SLIDE_META, style(ANIMATION_TRANSFORM_OFF_SCREEN)),\n style(ANIMATION_OPACITY_HIDE),\n ],\n ANIMATION_QUERY_OPTIONS\n );\n\nconst ANIMATION_STAY_ENTER = (useSelector: string) =>\n query(\n useSelector,\n [\n style({ ...ANIMATION_TRANSFORM_ON_SCREEN, ...ANIMATION_ZINDEX_BELOW }),\n animate(ANIMATION_STAY_META, style(ANIMATION_OPACITY_HIDE)),\n ],\n ANIMATION_QUERY_OPTIONS\n );\n\nconst ANIMATION_STAY_EXIT = (useSelector: string) =>\n query(\n useSelector,\n [\n style({ ...ANIMATION_TRANSFORM_ON_SCREEN, ...ANIMATION_ZINDEX_BELOW }),\n animate(ANIMATION_STAY_META, style(ANIMATION_OPACITY_SHOW)),\n ],\n ANIMATION_QUERY_OPTIONS\n );\n\nexport {\n ANIMATION_FROM_RIGHT,\n ANIMATION_STAY_ENTER,\n ANIMATION_STAY_EXIT,\n ANIMATION_TO_RIGHT,\n ANIMATION_TRANSFORM_OFF_SCREEN,\n ANIMATION_TRANSFORM_ON_SCREEN,\n};\n","import { ChangeDetectorRef, Component, Input, OnDestroy } from '@angular/core';\nimport { AnimationEvent, state, style, transition, trigger } from '@angular/animations';\n\nimport { UseThisForStandaloneOrThat } from '@micro-core/message-bus';\n\nimport { UiTemplatePageTransitionService, UiTemplatePageTransitionAnimationLog } from './page-transition.service';\n\nimport {\n ANIMATION_FROM_RIGHT,\n ANIMATION_STAY_ENTER,\n ANIMATION_STAY_EXIT,\n ANIMATION_TO_RIGHT,\n ANIMATION_TRANSFORM_OFF_SCREEN,\n ANIMATION_TRANSFORM_ON_SCREEN,\n} from './page-transition.animations';\n\nenum PageTransitionTriggerName {\n UNSET = 'unset',\n VOID = 'void',\n PAGE_BLANK = 'pageBlank',\n PAGE = 'page',\n PAGE_REVERSE = 'pageReverse',\n PAGE_EXIT = 'pageExit',\n PAGE_EXIT_REVERSE = 'pageExitReverse',\n}\n\nconst ANIMATION_TARGET_TRIGGER = 'pageTransitionTrigger';\nconst ANIMATION_TARGET_SELECTOR = '.action-article';\n\nconst AllStates = [\n state(PageTransitionTriggerName.PAGE_BLANK, style(ANIMATION_TRANSFORM_OFF_SCREEN)),\n state(PageTransitionTriggerName.PAGE_REVERSE, style(ANIMATION_TRANSFORM_ON_SCREEN)),\n];\nconst AllTransitions = [\n transition(`${PageTransitionTriggerName.PAGE_BLANK} => ${PageTransitionTriggerName.PAGE}`, [\n ANIMATION_FROM_RIGHT(ANIMATION_TARGET_SELECTOR),\n ]),\n transition(`${PageTransitionTriggerName.PAGE_BLANK} => ${PageTransitionTriggerName.PAGE_REVERSE}`, [\n ANIMATION_STAY_EXIT(ANIMATION_TARGET_SELECTOR),\n ]),\n transition(`${PageTransitionTriggerName.PAGE} => ${PageTransitionTriggerName.VOID}`, [\n ANIMATION_STAY_ENTER(ANIMATION_TARGET_SELECTOR),\n ]),\n transition(`${PageTransitionTriggerName.PAGE_EXIT} => ${PageTransitionTriggerName.VOID}`, [\n ANIMATION_STAY_ENTER(ANIMATION_TARGET_SELECTOR),\n ]),\n transition(`${PageTransitionTriggerName.PAGE_EXIT_REVERSE} => ${PageTransitionTriggerName.VOID}`, [\n ANIMATION_TO_RIGHT(ANIMATION_TARGET_SELECTOR),\n ]),\n];\n\n//We are using \"UseThisForStandaloneOrThat\" to make sure animations are only applied in micro app setting.\nexport const PageTransitionAnimationTriggers = [\n trigger(ANIMATION_TARGET_TRIGGER, UseThisForStandaloneOrThat([...AllStates, ...AllTransitions], [])),\n];\n\n@Component({\n animations: PageTransitionAnimationTriggers,\n selector: 'ui-page-transition',\n template: `<span\n [@pageTransitionTrigger]=\"getTransitionTriggerName()\"\n (@pageTransitionTrigger.start)=\"onAnimationStartEvent($event)\"\n (@pageTransitionTrigger.done)=\"onAnimationDoneEvent($event)\"\n >\n <ng-content select=\"[page-template]\"></ng-content>\n </span>`,\n})\nexport class UiTemplatePageTransitionComponent implements OnDestroy {\n @Input() reverseExitAnimation = false;\n\n private animationLog: UiTemplatePageTransitionAnimationLog[] = [];\n\n transitionTriggerName = PageTransitionTriggerName.VOID;\n lastTriggerNameCompleted = PageTransitionTriggerName.VOID;\n\n constructor(protected pageTransitionService: UiTemplatePageTransitionService, protected changeDetectorRef: ChangeDetectorRef) {\n this.pageTransitionService.insertAnimationStackTrace(this.animationLog);\n }\n\n ngOnDestroy(): void {\n this.pageTransitionService.setNeedsReverseTransition(this.reverseExitAnimation);\n }\n\n private getCorrectPageEnterTrigger() {\n return this.reverseExitAnimation || this.pageTransitionService.needsReverseTransition\n ? PageTransitionTriggerName.PAGE_REVERSE\n : PageTransitionTriggerName.PAGE;\n }\n\n private getCorrectPageExitTrigger() {\n return this.reverseExitAnimation ? PageTransitionTriggerName.PAGE_EXIT_REVERSE : PageTransitionTriggerName.PAGE_EXIT;\n }\n\n getTransitionTriggerName() {\n const matchForEnterTriggers = [PageTransitionTriggerName.PAGE, PageTransitionTriggerName.PAGE_REVERSE];\n const matchForExitTriggers = [PageTransitionTriggerName.PAGE_EXIT, PageTransitionTriggerName.PAGE_EXIT_REVERSE];\n\n if (this.lastTriggerNameCompleted === this.transitionTriggerName) {\n if (this.transitionTriggerName === PageTransitionTriggerName.VOID) {\n this.transitionTriggerName = PageTransitionTriggerName.PAGE_BLANK;\n } else if (this.transitionTriggerName === PageTransitionTriggerName.PAGE_BLANK) {\n this.transitionTriggerName = this.getCorrectPageEnterTrigger();\n } else if (\n matchForExitTriggers.includes(this.transitionTriggerName) ||\n matchForEnterTriggers.includes(this.transitionTriggerName)\n ) {\n this.transitionTriggerName = this.getCorrectPageExitTrigger();\n }\n }\n\n return this.transitionTriggerName;\n }\n\n onAnimationStartEvent(event: AnimationEvent) {\n this.animationLog.push({\n phase: event.phaseName,\n from: (event.fromState || PageTransitionTriggerName.UNSET) as PageTransitionTriggerName,\n to: (event.toState || PageTransitionTriggerName.UNSET) as PageTransitionTriggerName,\n });\n }\n\n onAnimationDoneEvent(event: AnimationEvent) {\n if (event.phaseName === 'done') {\n this.lastTriggerNameCompleted = event.toState as PageTransitionTriggerName;\n }\n }\n}\n","import { ConsoleLogger } from '../Logger/ConsoleLogger.mjs';\nimport { NO_HUBCALLBACK_PROVIDED_EXCEPTION } from '../constants.mjs';\nimport { AmplifyError } from '../errors/AmplifyError.mjs';\nimport '../types/errors.mjs';\nimport '../errors/errorHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst AMPLIFY_SYMBOL = (typeof Symbol !== 'undefined'\n ? Symbol('amplify_default')\n : '@@amplify_default');\nconst logger = new ConsoleLogger('Hub');\nclass HubClass {\n constructor(name) {\n this.listeners = new Map();\n this.protectedChannels = [\n 'core',\n 'auth',\n 'api',\n 'analytics',\n 'interactions',\n 'pubsub',\n 'storage',\n 'ui',\n 'xr',\n ];\n this.name = name;\n }\n /**\n * Used internally to remove a Hub listener.\n *\n * @remarks\n * This private method is for internal use only. Instead of calling Hub.remove, call the result of Hub.listen.\n */\n _remove(channel, listener) {\n const holder = this.listeners.get(channel);\n if (!holder) {\n logger.warn(`No listeners for ${channel}`);\n return;\n }\n this.listeners.set(channel, [\n ...holder.filter(({ callback }) => callback !== listener),\n ]);\n }\n dispatch(channel, payload, source, ampSymbol) {\n if (typeof channel === 'string' &&\n this.protectedChannels.indexOf(channel) > -1) {\n const hasAccess = ampSymbol === AMPLIFY_SYMBOL;\n if (!hasAccess) {\n logger.warn(`WARNING: ${channel} is protected and dispatching on it can have unintended consequences`);\n }\n }\n const capsule = {\n channel,\n payload: { ...payload },\n source,\n patternInfo: [],\n };\n try {\n this._toListeners(capsule);\n }\n catch (e) {\n logger.error(e);\n }\n }\n listen(channel, callback, listenerName = 'noname') {\n let cb;\n if (typeof callback !== 'function') {\n throw new AmplifyError({\n name: NO_HUBCALLBACK_PROVIDED_EXCEPTION,\n message: 'No callback supplied to Hub',\n });\n }\n else {\n // Needs to be casted as a more generic type\n cb = callback;\n }\n let holder = this.listeners.get(channel);\n if (!holder) {\n holder = [];\n this.listeners.set(channel, holder);\n }\n holder.push({\n name: listenerName,\n callback: cb,\n });\n return () => {\n this._remove(channel, cb);\n };\n }\n _toListeners(capsule) {\n const { channel, payload } = capsule;\n const holder = this.listeners.get(channel);\n if (holder) {\n holder.forEach(listener => {\n logger.debug(`Dispatching to ${channel} with `, payload);\n try {\n listener.callback(capsule);\n }\n catch (e) {\n logger.error(e);\n }\n });\n }\n }\n}\n/* We export a __default__ instance of HubClass to use it as a\npseudo Singleton for the main messaging bus, however you can still create\nyour own instance of HubClass() for a separate \"private bus\" of events. */\nconst Hub = new HubClass('__default__');\n/**\n * @internal\n *\n * Internal hub used for core Amplify functionality. Not intended for use outside of Amplify.\n *\n */\nconst HubInternal = new HubClass('internal-hub');\n\nexport { AMPLIFY_SYMBOL, Hub, HubClass, HubInternal };\n","import { inject, Injectable } from '@angular/core';\nimport { BehaviorSubject, distinctUntilChanged, filter, interval, Observable, of } from 'rxjs';\nimport { catchError, map, switchMap, take, tap } from 'rxjs/operators';\nimport { UserAttributesInterface } from '../Auth/bs-auth.service';\nimport { BsApiService } from '../API/bs-api.service';\nimport { SimpleGlobalModalService } from '../GlobalModal/simple-global-modal.service';\n\nexport interface FeatureFlags {\n flags: { [key: string]: string | null };\n expirationTS: string;\n}\n\nexport interface FeatureFlagPayload {\n payload: FeatureFlags;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class FeatureFlagService {\n private _bsApi: BsApiService = inject(BsApiService);\n private _globalModalSvc: SimpleGlobalModalService = inject(SimpleGlobalModalService);\n private _featureFlags = new BehaviorSubject<FeatureFlags | null>(null);\n private _featureFlagsReady = new BehaviorSubject<boolean>(false);\n public readonly featureFlagsReady: Observable<boolean> = this._featureFlagsReady.asObservable();\n private readonly CACHE_KEY = 'featureFlags';\n private readonly CHECK_INTERVAL = 10000; // 10 seconds\n private _isInitialized: boolean;\n\n constructor() {}\n\n disableClient(): void {\n this._featureFlagsReady.next(false);\n this._featureFlags.next(null);\n localStorage.removeItem(this.CACHE_KEY);\n }\n\n initializeFeatureFlag(user: UserAttributesInterface): void {\n if (!user.guid || this._isInitialized) {\n return;\n }\n this._isInitialized = true;\n this._fetchFeatureFlags().pipe(\n tap(() => this._featureFlagsReady.next(true)),\n switchMap(() => interval(this.CHECK_INTERVAL).pipe(\n distinctUntilChanged(),\n filter(() => this._shouldFetchFlags()),\n switchMap(() => this._fetchFeatureFlags())\n ))\n ).subscribe();\n }\n\n private _fetchFeatureFlags(): Observable<FeatureFlags | null> {\n return this._bsApi.get<FeatureFlagPayload>('api-mobile', '/flag').pipe(\n map(response => response.payload),\n tap(flags => {\n this._featureFlags.next(flags);\n localStorage.setItem(this.CACHE_KEY, JSON.stringify(flags));\n }),\n catchError((error): Observable<FeatureFlags | null> => {\n console.error('Feature flags fetch failed', error);\n const cachedFlags = this._getCachedFlags();\n if (cachedFlags) {\n this._featureFlags.next(cachedFlags);\n return of(cachedFlags);\n } else {\n this._globalModalSvc.createGenericErrorModal('feature_flag_error', ()=>{\n this._fetchFeatureFlags();\n this._globalModalSvc.clearModal();\n });\n return of(null);\n }\n })\n );\n }\n\n private _shouldFetchFlags(): boolean {\n const flags = this._featureFlags.getValue();\n if (!flags) return true;\n const expirationTS = Date.parse(flags.expirationTS);\n return Date.now() >= expirationTS;\n }\n\n private _getCachedFlags(): FeatureFlags | null {\n const cachedData = localStorage.getItem(this.CACHE_KEY);\n return cachedData ? JSON.parse(cachedData) : null;\n }\n\n getFlag<T>(flag: string, defaultVal?: T): Observable<T> {\n return this.featureFlagsReady.pipe(\n filter(ready => ready),\n take(1),\n map(() => {\n const flags = this._featureFlags.getValue();\n return (flags?.flags[flag] ?? defaultVal) as T;\n })\n );\n }\n\n checkMultipleFlags(flags: string[]): Observable<boolean> {\n return this.featureFlagsReady.pipe(\n filter(ready => ready),\n take(1),\n map(() => {\n const flagValues = flags.map(flag => this._featureFlags.getValue()?.flags[flag] ?? false);\n return !flagValues.includes(false);\n })\n );\n }\n}\n","import { asyncScheduler } from '../scheduler/async';\nimport { timer } from './timer';\nexport function interval(period = 0, scheduler = asyncScheduler) {\n if (period < 0) {\n period = 0;\n }\n return timer(period, period, scheduler);\n}\n","import { DEBUG_BUILD } from './debug-build.js';\nimport { isString } from './is.js';\nimport { logger } from './logger.js';\n\n/**\n * @deprecated Use a `\"baggage\"` string directly\n */\nconst BAGGAGE_HEADER_NAME = 'baggage';\n\nconst SENTRY_BAGGAGE_KEY_PREFIX = 'sentry-';\n\nconst SENTRY_BAGGAGE_KEY_PREFIX_REGEX = /^sentry-/;\n\n/**\n * Max length of a serialized baggage string\n *\n * https://www.w3.org/TR/baggage/#limits\n */\nconst MAX_BAGGAGE_STRING_LENGTH = 8192;\n\n/**\n * Takes a baggage header and turns it into Dynamic Sampling Context, by extracting all the \"sentry-\" prefixed values\n * from it.\n *\n * @param baggageHeader A very bread definition of a baggage header as it might appear in various frameworks.\n * @returns The Dynamic Sampling Context that was found on `baggageHeader`, if there was any, `undefined` otherwise.\n */\nfunction baggageHeaderToDynamicSamplingContext(\n // Very liberal definition of what any incoming header might look like\n baggageHeader,\n) {\n const baggageObject = parseBaggageHeader(baggageHeader);\n\n if (!baggageObject) {\n return undefined;\n }\n\n // Read all \"sentry-\" prefixed values out of the baggage object and put it onto a dynamic sampling context object.\n const dynamicSamplingContext = Object.entries(baggageObject).reduce((acc, [key, value]) => {\n if (key.match(SENTRY_BAGGAGE_KEY_PREFIX_REGEX)) {\n const nonPrefixedKey = key.slice(SENTRY_BAGGAGE_KEY_PREFIX.length);\n acc[nonPrefixedKey] = value;\n }\n return acc;\n }, {});\n\n // Only return a dynamic sampling context object if there are keys in it.\n // A keyless object means there were no sentry values on the header, which means that there is no DSC.\n if (Object.keys(dynamicSamplingContext).length > 0) {\n return dynamicSamplingContext ;\n } else {\n return undefined;\n }\n}\n\n/**\n * Turns a Dynamic Sampling Object into a baggage header by prefixing all the keys on the object with \"sentry-\".\n *\n * @param dynamicSamplingContext The Dynamic Sampling Context to turn into a header. For convenience and compatibility\n * with the `getDynamicSamplingContext` method on the Transaction class ,this argument can also be `undefined`. If it is\n * `undefined` the function will return `undefined`.\n * @returns a baggage header, created from `dynamicSamplingContext`, or `undefined` either if `dynamicSamplingContext`\n * was `undefined`, or if `dynamicSamplingContext` didn't contain any values.\n */\nfunction dynamicSamplingContextToSentryBaggageHeader(\n // this also takes undefined for convenience and bundle size in other places\n dynamicSamplingContext,\n) {\n if (!dynamicSamplingContext) {\n return undefined;\n }\n\n // Prefix all DSC keys with \"sentry-\" and put them into a new object\n const sentryPrefixedDSC = Object.entries(dynamicSamplingContext).reduce(\n (acc, [dscKey, dscValue]) => {\n if (dscValue) {\n acc[`${SENTRY_BAGGAGE_KEY_PREFIX}${dscKey}`] = dscValue;\n }\n return acc;\n },\n {},\n );\n\n return objectToBaggageHeader(sentryPrefixedDSC);\n}\n\n/**\n * Take a baggage header and parse it into an object.\n */\nfunction parseBaggageHeader(\n baggageHeader,\n) {\n if (!baggageHeader || (!isString(baggageHeader) && !Array.isArray(baggageHeader))) {\n return undefined;\n }\n\n if (Array.isArray(baggageHeader)) {\n // Combine all baggage headers into one object containing the baggage values so we can later read the Sentry-DSC-values from it\n return baggageHeader.reduce((acc, curr) => {\n const currBaggageObject = baggageHeaderToObject(curr);\n Object.entries(currBaggageObject).forEach(([key, value]) => {\n acc[key] = value;\n });\n return acc;\n }, {});\n }\n\n return baggageHeaderToObject(baggageHeader);\n}\n\n/**\n * Will parse a baggage header, which is a simple key-value map, into a flat object.\n *\n * @param baggageHeader The baggage header to parse.\n * @returns a flat object containing all the key-value pairs from `baggageHeader`.\n */\nfunction baggageHeaderToObject(baggageHeader) {\n return baggageHeader\n .split(',')\n .map(baggageEntry => baggageEntry.split('=').map(keyOrValue => decodeURIComponent(keyOrValue.trim())))\n .reduce((acc, [key, value]) => {\n if (key && value) {\n acc[key] = value;\n }\n return acc;\n }, {});\n}\n\n/**\n * Turns a flat object (key-value pairs) into a baggage header, which is also just key-value pairs.\n *\n * @param object The object to turn into a baggage header.\n * @returns a baggage header string, or `undefined` if the object didn't have any values, since an empty baggage header\n * is not spec compliant.\n */\nfunction objectToBaggageHeader(object) {\n if (Object.keys(object).length === 0) {\n // An empty baggage header is not spec compliant: We return undefined.\n return undefined;\n }\n\n return Object.entries(object).reduce((baggageHeader, [objectKey, objectValue], currentIndex) => {\n const baggageEntry = `${encodeURIComponent(objectKey)}=${encodeURIComponent(objectValue)}`;\n const newBaggageHeader = currentIndex === 0 ? baggageEntry : `${baggageHeader},${baggageEntry}`;\n if (newBaggageHeader.length > MAX_BAGGAGE_STRING_LENGTH) {\n DEBUG_BUILD &&\n logger.warn(\n `Not adding key: ${objectKey} with val: ${objectValue} to baggage header due to exceeding baggage size limits.`,\n );\n return baggageHeader;\n } else {\n return newBaggageHeader;\n }\n }, '');\n}\n\nexport { BAGGAGE_HEADER_NAME, MAX_BAGGAGE_STRING_LENGTH, SENTRY_BAGGAGE_KEY_PREFIX, SENTRY_BAGGAGE_KEY_PREFIX_REGEX, baggageHeaderToDynamicSamplingContext, dynamicSamplingContextToSentryBaggageHeader, parseBaggageHeader };\n","//! moment.js locale configuration\n//! locale : Scottish Gaelic [gd]\n//! author : Jon Ashdown : https://github.com/jonashdown\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var months = [\n 'Am Faoilleach',\n 'An Gearran',\n 'Am Màrt',\n 'An Giblean',\n 'An Cèitean',\n 'An t-Ògmhios',\n 'An t-Iuchar',\n 'An Lùnastal',\n 'An t-Sultain',\n 'An Dàmhair',\n 'An t-Samhain',\n 'An Dùbhlachd',\n ],\n monthsShort = [\n 'Faoi',\n 'Gear',\n 'Màrt',\n 'Gibl',\n 'Cèit',\n 'Ògmh',\n 'Iuch',\n 'Lùn',\n 'Sult',\n 'Dàmh',\n 'Samh',\n 'Dùbh',\n ],\n weekdays = [\n 'Didòmhnaich',\n 'Diluain',\n 'Dimàirt',\n 'Diciadain',\n 'Diardaoin',\n 'Dihaoine',\n 'Disathairne',\n ],\n weekdaysShort = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'],\n weekdaysMin = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa'];\n\n var gd = moment.defineLocale('gd', {\n months: months,\n monthsShort: monthsShort,\n monthsParseExact: true,\n weekdays: weekdays,\n weekdaysShort: weekdaysShort,\n weekdaysMin: weekdaysMin,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[An-diugh aig] LT',\n nextDay: '[A-màireach aig] LT',\n nextWeek: 'dddd [aig] LT',\n lastDay: '[An-dè aig] LT',\n lastWeek: 'dddd [seo chaidh] [aig] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'ann an %s',\n past: 'bho chionn %s',\n s: 'beagan diogan',\n ss: '%d diogan',\n m: 'mionaid',\n mm: '%d mionaidean',\n h: 'uair',\n hh: '%d uairean',\n d: 'latha',\n dd: '%d latha',\n M: 'mìos',\n MM: '%d mìosan',\n y: 'bliadhna',\n yy: '%d bliadhna',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(d|na|mh)/,\n ordinal: function (number) {\n var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return gd;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic (Saudi Arabia) [ar-sa]\n//! author : Suhail Alkowaileet : https://github.com/xsoh\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '١',\n 2: '٢',\n 3: '٣',\n 4: '٤',\n 5: '٥',\n 6: '٦',\n 7: '٧',\n 8: '٨',\n 9: '٩',\n 0: '٠',\n },\n numberMap = {\n '١': '1',\n '٢': '2',\n '٣': '3',\n '٤': '4',\n '٥': '5',\n '٦': '6',\n '٧': '7',\n '٨': '8',\n '٩': '9',\n '٠': '0',\n };\n\n var arSa = moment.defineLocale('ar-sa', {\n months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n '_'\n ),\n monthsShort:\n 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n '_'\n ),\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n meridiemParse: /ص|م/,\n isPM: function (input) {\n return 'م' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات',\n },\n preparse: function (string) {\n return string\n .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n return numberMap[match];\n })\n .replace(/،/g, ',');\n },\n postformat: function (string) {\n return string\n .replace(/\\d/g, function (match) {\n return symbolMap[match];\n })\n .replace(/,/g, '،');\n },\n week: {\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 });\n\n return arSa;\n\n})));\n","import { __asyncGenerator, __await } from \"tslib\";\nimport { isFunction } from './isFunction';\nexport function readableStreamLikeToAsyncGenerator(readableStream) {\n return __asyncGenerator(this, arguments, function* readableStreamLikeToAsyncGenerator_1() {\n const reader = readableStream.getReader();\n try {\n while (true) {\n const { value, done } = yield __await(reader.read());\n if (done) {\n return yield __await(void 0);\n }\n yield yield __await(value);\n }\n }\n finally {\n reader.releaseLock();\n }\n });\n}\nexport function isReadableStreamLike(obj) {\n return isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader);\n}\n","<div id=\"uiHeaderDefault\">\n <ng-container *ngTemplateOutlet=\"headerTemplate; context: { title: title | translate, subTitle: subTitle | translate }\"></ng-container>\n</div>\n\n<ng-template #headerTemplate let-title=\"title\" let-subTitle=\"subTitle\">\n <div title class=\"mt-xs mb-sm\">\n <typography *ngIf=\"title\" title-medium>{{ title }}</typography>\n <bw-icon *ngIf=\"icon\" [size]=\"41.6\" [iconName]=\"icon\" color=\"var(--brand)\" backgroundColor=\"var(--bg-blue)\"></bw-icon>\n </div>\n <p *ngIf=\"subTitle\" text-large-regular class=\"pt-xs\" color=\"var(--secondary-text)\" [innerHtml]=\"subTitle\"></p>\n</ng-template>\n","import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\n\nimport { UiHeaderType } from '../header.enum';\nimport { UiHeaderDefaultInputs } from '../header.interface';\n\n@Component({\n selector: 'ui-header-default',\n templateUrl: './header-default.component.html',\n styleUrls: ['./header-default.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class UiHeaderDefaultComponent implements UiHeaderDefaultInputs {\n type: UiHeaderType = UiHeaderType.DEFAULT;\n\n @Input() title: string;\n @Input() subTitle: string;\n @Input() icon: string;\n}\n","//! moment.js locale configuration\n//! locale : Greek [el]\n//! author : Aggelos Karalias : https://github.com/mehiel\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n }\n\n var el = moment.defineLocale('el', {\n monthsNominativeEl:\n 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split(\n '_'\n ),\n monthsGenitiveEl:\n 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split(\n '_'\n ),\n months: function (momentToFormat, format) {\n if (!momentToFormat) {\n return this._monthsNominativeEl;\n } else if (\n typeof format === 'string' &&\n /D/.test(format.substring(0, format.indexOf('MMMM')))\n ) {\n // if there is a day number before 'MMMM'\n return this._monthsGenitiveEl[momentToFormat.month()];\n } else {\n return this._monthsNominativeEl[momentToFormat.month()];\n }\n },\n monthsShort: 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'),\n weekdays: 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split(\n '_'\n ),\n weekdaysShort: 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'),\n weekdaysMin: 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'),\n meridiem: function (hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'μμ' : 'ΜΜ';\n } else {\n return isLower ? 'πμ' : 'ΠΜ';\n }\n },\n isPM: function (input) {\n return (input + '').toLowerCase()[0] === 'μ';\n },\n meridiemParse: /[ΠΜ]\\.?Μ?\\.?/i,\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A',\n },\n calendarEl: {\n sameDay: '[Σήμερα {}] LT',\n nextDay: '[Αύριο {}] LT',\n nextWeek: 'dddd [{}] LT',\n lastDay: '[Χθες {}] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 6:\n return '[το προηγούμενο] dddd [{}] LT';\n default:\n return '[την προηγούμενη] dddd [{}] LT';\n }\n },\n sameElse: 'L',\n },\n calendar: function (key, mom) {\n var output = this._calendarEl[key],\n hours = mom && mom.hours();\n if (isFunction(output)) {\n output = output.apply(mom);\n }\n return output.replace('{}', hours % 12 === 1 ? 'στη' : 'στις');\n },\n relativeTime: {\n future: 'σε %s',\n past: '%s πριν',\n s: 'λίγα δευτερόλεπτα',\n ss: '%d δευτερόλεπτα',\n m: 'ένα λεπτό',\n mm: '%d λεπτά',\n h: 'μία ώρα',\n hh: '%d ώρες',\n d: 'μία μέρα',\n dd: '%d μέρες',\n M: 'ένας μήνας',\n MM: '%d μήνες',\n y: 'ένας χρόνος',\n yy: '%d χρόνια',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}η/,\n ordinal: '%dη',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4st is the first week of the year.\n },\n });\n\n return el;\n\n})));\n","import {Component, OnInit, Input} from '@angular/core';\n\n@Component({\n selector: 'bw-spinner',\n templateUrl: './spinner.component.html',\n styleUrls: ['./spinner.component.scss']\n})\nexport class SpinnerComponent implements OnInit {\n @Input() percentProgress?: string;\n @Input() color? = 'blue';\n\n ngOnInit() {\n switch (this.color) {\n case 'blue':\n this.color = '#005fff';\n break;\n case 'green':\n this.color = 'green';\n break;\n default:\n this.color = '#005fff';\n break;\n }\n }\n\n}\n","<div class=\"spinner-container\">\n <div class=\"lds-css ng-scope\">\n <div class=\"lds-spin\" style=\"width:100%;height:100%\">\n <div><div></div></div>\n <div><div></div></div>\n <div><div></div></div>\n <div><div></div></div>\n <div><div></div></div>\n <div><div></div></div>\n <div><div></div></div>\n <div><div></div></div>\n <div><div></div></div>\n <div><div></div></div>\n <div><div></div></div>\n <div><div></div></div>\n <div><div></div></div>\n <div><div></div></div>\n <div><div></div></div>\n <div><div></div></div>\n <div><div></div></div>\n <div><div></div></div>\n </div>\n </div>\n</div>\n<div class=\"percent-progress\">{{ percentProgress }}</div>\n","import { Inject, Injectable } from '@angular/core';\n\nimport { config, IConfig } from './config';\n\n@Injectable()\nexport class MaskApplierService {\n public dropSpecialCharacters: IConfig['dropSpecialCharacters'];\n public hiddenInput: IConfig['hiddenInput'];\n public showTemplate!: IConfig['showTemplate'];\n public clearIfNotMatch!: IConfig['clearIfNotMatch'];\n public maskExpression = '';\n public actualValue = '';\n public shownMaskExpression = '';\n public maskSpecialCharacters!: IConfig['specialCharacters'];\n public maskAvailablePatterns!: IConfig['patterns'];\n public prefix!: IConfig['prefix'];\n public suffix!: IConfig['suffix'];\n public thousandSeparator!: IConfig['thousandSeparator'];\n public decimalMarker!: IConfig['decimalMarker'];\n public customPattern!: IConfig['patterns'];\n public ipError?: boolean;\n public cpfCnpjError?: boolean;\n public showMaskTyped!: IConfig['showMaskTyped'];\n public placeHolderCharacter!: IConfig['placeHolderCharacter'];\n public validation: IConfig['validation'];\n public separatorLimit: IConfig['separatorLimit'];\n public allowNegativeNumbers: IConfig['allowNegativeNumbers'];\n\n private _shift!: Set<number>;\n\n public constructor(@Inject(config) protected _config: IConfig) {\n this._shift = new Set();\n this.clearIfNotMatch = this._config.clearIfNotMatch;\n this.dropSpecialCharacters = this._config.dropSpecialCharacters;\n this.maskSpecialCharacters = this._config.specialCharacters;\n this.maskAvailablePatterns = this._config.patterns;\n this.prefix = this._config.prefix;\n this.suffix = this._config.suffix;\n this.thousandSeparator = this._config.thousandSeparator;\n this.decimalMarker = this._config.decimalMarker;\n this.hiddenInput = this._config.hiddenInput;\n this.showMaskTyped = this._config.showMaskTyped;\n this.placeHolderCharacter = this._config.placeHolderCharacter;\n this.validation = this._config.validation;\n this.separatorLimit = this._config.separatorLimit;\n this.allowNegativeNumbers = this._config.allowNegativeNumbers;\n }\n\n public applyMaskWithPattern(inputValue: string, maskAndPattern: [string, IConfig['patterns']]): string {\n const [mask, customPattern] = maskAndPattern;\n this.customPattern = customPattern;\n return this.applyMask(inputValue, mask);\n }\n public applyMask(inputValue: string, maskExpression: string, position: number = 0, cb: Function = () => {}): string {\n if (inputValue === undefined || inputValue === null || maskExpression === undefined) {\n return '';\n }\n let cursor = 0;\n let result = '';\n let multi = false;\n let backspaceShift = false;\n let shift = 1;\n let stepBack = false;\n if (inputValue.slice(0, this.prefix.length) === this.prefix) {\n inputValue = inputValue.slice(this.prefix.length, inputValue.length);\n }\n if (!!this.suffix && inputValue.endsWith(this.suffix)) {\n inputValue = inputValue.slice(0, inputValue.length - this.suffix.length);\n }\n const inputArray: string[] = inputValue.toString().split('');\n if (maskExpression === 'IP') {\n this.ipError = !!(inputArray.filter((i: string) => i === '.').length < 3 && inputArray.length < 7);\n maskExpression = '099.099.099.099';\n }\n const arr: string[] = [];\n for (let i = 0; i < inputValue.length; i++) {\n if (inputValue[i].match('\\\\d')) {\n arr.push(inputValue[i]);\n }\n }\n if (maskExpression === 'CPF_CNPJ') {\n this.cpfCnpjError = !!(arr.length !== 11 && arr.length !== 14);\n if (arr.length > 11) {\n maskExpression = '00.000.000/0000-00';\n } else {\n maskExpression = '000.000.000-00';\n }\n }\n if (maskExpression.startsWith('percent')) {\n if (inputValue.match('[a-z]|[A-Z]') || inputValue.match(/[-!$%^&*()_+|~=`{}\\[\\]:\";'<>?,\\/]/)) {\n inputValue = this._stripToDecimal(inputValue);\n const precision: number = this.getPrecision(maskExpression);\n inputValue = this.checkInputPrecision(inputValue, precision, '.');\n }\n if (inputValue.indexOf('.') > 0 && !this.percentage(inputValue.substring(0, inputValue.indexOf('.')))) {\n const base: string = inputValue.substring(0, inputValue.indexOf('.') - 1);\n inputValue = `${base}${inputValue.substring(inputValue.indexOf('.'), inputValue.length)}`;\n }\n if (this.percentage(inputValue)) {\n result = inputValue;\n } else {\n result = inputValue.substring(0, inputValue.length - 1);\n }\n } else if (maskExpression.startsWith('separator')) {\n if (\n inputValue.match('[wа-яА-Я]') ||\n inputValue.match('[ЁёА-я]') ||\n inputValue.match('[a-z]|[A-Z]') ||\n inputValue.match(/[-@#!$%\\\\^&*()_£¬'+|~=`{}\\[\\]:\";<>.?\\/]/) ||\n inputValue.match('[^A-Za-z0-9,]')\n ) {\n inputValue = this._stripToDecimal(inputValue);\n }\n\n inputValue =\n inputValue.length > 1 && inputValue[0] === '0' && inputValue[1] !== this.decimalMarker\n ? inputValue.slice(1, inputValue.length)\n : inputValue;\n\n // TODO: we had different rexexps here for the different cases... but tests dont seam to bother - check this\n // separator: no COMMA, dot-sep: no SPACE, COMMA OK, comma-sep: no SPACE, COMMA OK\n\n const thousandSeperatorCharEscaped: string = this._charToRegExpExpression(this.thousandSeparator);\n const decimalMarkerEscaped: string = this._charToRegExpExpression(this.decimalMarker);\n const invalidChars: string = '@#!$%^&*()_+|~=`{}\\\\[\\\\]:\\\\s,\\\\.\";<>?\\\\/'\n .replace(thousandSeperatorCharEscaped, '')\n .replace(decimalMarkerEscaped, '');\n\n const invalidCharRegexp: RegExp = new RegExp('[' + invalidChars + ']');\n\n if (inputValue.match(invalidCharRegexp)) {\n inputValue = inputValue.substring(0, inputValue.length - 1);\n }\n\n const precision: number = this.getPrecision(maskExpression);\n inputValue = this.checkInputPrecision(inputValue, precision, this.decimalMarker);\n const strForSep: string = inputValue.replace(new RegExp(thousandSeperatorCharEscaped, 'g'), '');\n result = this._formatWithSeparators(strForSep, this.thousandSeparator, this.decimalMarker, precision);\n\n const commaShift: number = result.indexOf(',') - inputValue.indexOf(',');\n const shiftStep: number = result.length - inputValue.length;\n\n if (shiftStep > 0 && result[position] !== ',') {\n backspaceShift = true;\n let _shift = 0;\n do {\n this._shift.add(position + _shift);\n _shift++;\n } while (_shift < shiftStep);\n } else if (\n (commaShift !== 0 && position > 0 && !(result.indexOf(',') >= position && position > 3)) ||\n (!(result.indexOf('.') >= position && position > 3) && shiftStep <= 0)\n ) {\n this._shift.clear();\n backspaceShift = true;\n shift = shiftStep;\n position += shiftStep;\n this._shift.add(position);\n } else {\n this._shift.clear();\n }\n } else {\n for (\n // tslint:disable-next-line\n let i: number = 0, inputSymbol: string = inputArray[0];\n i < inputArray.length;\n i++, inputSymbol = inputArray[i]\n ) {\n if (cursor === maskExpression.length) {\n break;\n }\n if (this._checkSymbolMask(inputSymbol, maskExpression[cursor]) && maskExpression[cursor + 1] === '?') {\n result += inputSymbol;\n cursor += 2;\n } else if (\n maskExpression[cursor + 1] === '*' &&\n multi &&\n this._checkSymbolMask(inputSymbol, maskExpression[cursor + 2])\n ) {\n result += inputSymbol;\n cursor += 3;\n multi = false;\n } else if (this._checkSymbolMask(inputSymbol, maskExpression[cursor]) && maskExpression[cursor + 1] === '*') {\n result += inputSymbol;\n multi = true;\n } else if (\n maskExpression[cursor + 1] === '?' &&\n this._checkSymbolMask(inputSymbol, maskExpression[cursor + 2])\n ) {\n result += inputSymbol;\n cursor += 3;\n } else if (\n this._checkSymbolMask(inputSymbol, maskExpression[cursor]) ||\n (this.hiddenInput &&\n this.maskAvailablePatterns[maskExpression[cursor]] &&\n this.maskAvailablePatterns[maskExpression[cursor]].symbol === inputSymbol)\n ) {\n if (maskExpression[cursor] === 'H') {\n if (Number(inputSymbol) > 2) {\n cursor += 1;\n const shiftStep: number = /[*?]/g.test(maskExpression.slice(0, cursor)) ? inputArray.length : cursor;\n this._shift.add(shiftStep + this.prefix.length || 0);\n i--;\n continue;\n }\n }\n if (maskExpression[cursor] === 'h') {\n if (result === '2' && Number(inputSymbol) > 3) {\n cursor += 1;\n i--;\n continue;\n }\n }\n if (maskExpression[cursor] === 'm') {\n if (Number(inputSymbol) > 5) {\n cursor += 1;\n const shiftStep: number = /[*?]/g.test(maskExpression.slice(0, cursor)) ? inputArray.length : cursor;\n this._shift.add(shiftStep + this.prefix.length || 0);\n i--;\n continue;\n }\n }\n if (maskExpression[cursor] === 's') {\n if (Number(inputSymbol) > 5) {\n cursor += 1;\n const shiftStep: number = /[*?]/g.test(maskExpression.slice(0, cursor)) ? inputArray.length : cursor;\n this._shift.add(shiftStep + this.prefix.length || 0);\n i--;\n continue;\n }\n }\n const daysCount = 31;\n if (maskExpression[cursor] === 'd') {\n if (Number(inputValue.slice(cursor, cursor + 2)) > daysCount || inputValue[cursor + 1] === '/') {\n cursor += 1;\n const shiftStep: number = /[*?]/g.test(maskExpression.slice(0, cursor)) ? inputArray.length : cursor;\n this._shift.add(shiftStep + this.prefix.length || 0);\n i--;\n continue;\n }\n }\n if (maskExpression[cursor] === 'M') {\n const monthsCount = 12;\n // mask without day\n const withoutDays: boolean =\n cursor === 0 &&\n (Number(inputSymbol) > 2 ||\n Number(inputValue.slice(cursor, cursor + 2)) > monthsCount ||\n inputValue[cursor + 1] === '/');\n // day<10 && month<12 for input\n const day1monthInput: boolean =\n inputValue.slice(cursor - 3, cursor - 1).includes('/') &&\n ((inputValue[cursor - 2] === '/' &&\n Number(inputValue.slice(cursor - 1, cursor + 1)) > monthsCount &&\n inputValue[cursor] !== '/') ||\n inputValue[cursor] === '/' ||\n (inputValue[cursor - 3] === '/' &&\n Number(inputValue.slice(cursor - 2, cursor)) > monthsCount &&\n inputValue[cursor - 1] !== '/') ||\n inputValue[cursor - 1] === '/');\n // 10<day<31 && month<12 for input\n const day2monthInput: boolean =\n Number(inputValue.slice(cursor - 3, cursor - 1)) <= daysCount &&\n !inputValue.slice(cursor - 3, cursor - 1).includes('/') &&\n inputValue[cursor - 1] === '/' &&\n (Number(inputValue.slice(cursor, cursor + 2)) > monthsCount || inputValue[cursor + 1] === '/');\n // day<10 && month<12 for paste whole data\n const day1monthPaste: boolean =\n Number(inputValue.slice(cursor - 3, cursor - 1)) > daysCount &&\n !inputValue.slice(cursor - 3, cursor - 1).includes('/') &&\n !inputValue.slice(cursor - 2, cursor).includes('/') &&\n Number(inputValue.slice(cursor - 2, cursor)) > monthsCount;\n // 10<day<31 && month<12 for paste whole data\n const day2monthPaste: boolean =\n Number(inputValue.slice(cursor - 3, cursor - 1)) <= daysCount &&\n !inputValue.slice(cursor - 3, cursor - 1).includes('/') &&\n inputValue[cursor - 1] !== '/' &&\n Number(inputValue.slice(cursor - 1, cursor + 1)) > monthsCount;\n\n if (withoutDays || day1monthInput || day2monthInput || day1monthPaste || day2monthPaste) {\n cursor += 1;\n const shiftStep: number = /[*?]/g.test(maskExpression.slice(0, cursor)) ? inputArray.length : cursor;\n this._shift.add(shiftStep + this.prefix.length || 0);\n i--;\n continue;\n }\n }\n result += inputSymbol;\n cursor++;\n } else if (this.maskSpecialCharacters.indexOf(maskExpression[cursor]) !== -1) {\n result += maskExpression[cursor];\n cursor++;\n const shiftStep: number = /[*?]/g.test(maskExpression.slice(0, cursor)) ? inputArray.length : cursor;\n this._shift.add(shiftStep + this.prefix.length || 0);\n i--;\n } else if (\n this.maskSpecialCharacters.indexOf(inputSymbol) > -1 &&\n this.maskAvailablePatterns[maskExpression[cursor]] &&\n this.maskAvailablePatterns[maskExpression[cursor]].optional\n ) {\n if (\n !!inputArray[cursor] &&\n maskExpression !== '099.099.099.099' &&\n maskExpression !== '000.000.000-00' &&\n maskExpression !== '00.000.000/0000-00'\n ) {\n result += inputArray[cursor];\n }\n cursor++;\n i--;\n } else if (\n this.maskExpression[cursor + 1] === '*' &&\n this._findSpecialChar(this.maskExpression[cursor + 2]) &&\n this._findSpecialChar(inputSymbol) === this.maskExpression[cursor + 2] &&\n multi\n ) {\n cursor += 3;\n result += inputSymbol;\n } else if (\n this.maskExpression[cursor + 1] === '?' &&\n this._findSpecialChar(this.maskExpression[cursor + 2]) &&\n this._findSpecialChar(inputSymbol) === this.maskExpression[cursor + 2] &&\n multi\n ) {\n cursor += 3;\n result += inputSymbol;\n } else if (\n this.showMaskTyped &&\n this.maskSpecialCharacters.indexOf(inputSymbol) < 0 &&\n inputSymbol !== this.placeHolderCharacter\n ) {\n stepBack = true;\n }\n }\n }\n if (\n result.length + 1 === maskExpression.length &&\n this.maskSpecialCharacters.indexOf(maskExpression[maskExpression.length - 1]) !== -1\n ) {\n result += maskExpression[maskExpression.length - 1];\n }\n\n let newPosition: number = position + 1;\n\n while (this._shift.has(newPosition)) {\n shift++;\n newPosition++;\n }\n\n let actualShift: number = this._shift.has(position) ? shift : 0;\n if (stepBack) {\n actualShift--;\n }\n\n cb(actualShift, backspaceShift);\n if (shift < 0) {\n this._shift.clear();\n }\n let res = `${this.prefix}${result}${this.suffix}`;\n if (result.length === 0) {\n res = `${this.prefix}${result}`;\n }\n return res;\n }\n\n public _findSpecialChar(inputSymbol: string): undefined | string {\n return this.maskSpecialCharacters.find((val: string) => val === inputSymbol);\n }\n\n protected _checkSymbolMask(inputSymbol: string, maskSymbol: string): boolean {\n this.maskAvailablePatterns = this.customPattern ? this.customPattern : this.maskAvailablePatterns;\n return (\n this.maskAvailablePatterns[maskSymbol] &&\n this.maskAvailablePatterns[maskSymbol].pattern &&\n this.maskAvailablePatterns[maskSymbol].pattern.test(inputSymbol)\n );\n }\n\n private _formatWithSeparators = (\n str: string,\n thousandSeparatorChar: string,\n decimalChar: string,\n precision: number\n ) => {\n const x: string[] = str.split(decimalChar);\n const decimals: string = x.length > 1 ? `${decimalChar}${x[1]}` : '';\n let res: string = x[0];\n const separatorLimit: string = this.separatorLimit.replace(/\\s/g, '');\n if (separatorLimit && +separatorLimit) {\n if (res[0] === '-') {\n res = `-${res.slice(1, res.length).slice(0, separatorLimit.length)}`;\n } else {\n res = res.slice(0, separatorLimit.length);\n }\n }\n const rgx: RegExp = /(\\d+)(\\d{3})/;\n\n while (thousandSeparatorChar && rgx.test(res)) {\n res = res.replace(rgx, '$1' + thousandSeparatorChar + '$2');\n }\n\n if (precision === undefined) {\n return res + decimals;\n } else if (precision === 0) {\n return res;\n }\n return res + decimals.substr(0, precision + 1);\n };\n\n private percentage = (str: string): boolean => {\n return Number(str) >= 0 && Number(str) <= 100;\n };\n\n private getPrecision = (maskExpression: string): number => {\n const x: string[] = maskExpression.split('.');\n if (x.length > 1) {\n return Number(x[x.length - 1]);\n }\n\n return Infinity;\n };\n\n private checkInputPrecision = (\n inputValue: string,\n precision: number,\n decimalMarker: IConfig['decimalMarker']\n ): string => {\n if (precision < Infinity) {\n const precisionRegEx: RegExp = new RegExp(this._charToRegExpExpression(decimalMarker) + `\\\\d{${precision}}.*$`);\n\n const precisionMatch: RegExpMatchArray | null = inputValue.match(precisionRegEx);\n if (precisionMatch && precisionMatch[0].length - 1 > precision) {\n inputValue = inputValue.substring(0, inputValue.length - 1);\n } else if (precision === 0 && inputValue.endsWith(decimalMarker)) {\n inputValue = inputValue.substring(0, inputValue.length - 1);\n }\n }\n return inputValue;\n };\n\n private _stripToDecimal(str: string): string {\n return str\n .split('')\n .filter((i: string, idx: number) => {\n return i.match('^-?\\\\d') || i === '.' || i === ',' || (i === '-' && idx === 0 && this.allowNegativeNumbers);\n })\n .join('');\n }\n\n private _charToRegExpExpression(char: string): string {\n if (char) {\n const charsToEscape = '[\\\\^$.|?*+()';\n return char === ' ' ? '\\\\s' : charsToEscape.indexOf(char) >= 0 ? '\\\\' + char : char;\n }\n return char;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { HubCapsule } from 'aws-amplify/utils';\n\nimport {\n AwsApiWrapperService,\n BsHubService,\n} from '@brightside-web/desktop/data-access/core-services';\nimport { forkJoin, from, Observable } from 'rxjs';\nimport { catchError, map } from 'rxjs/operators';\n\nimport { MicroCoreUtilRemoteConfigService } from '@micro-core/utility';\n// tslint:disable-next-line:nx-enforce-module-boundaries\nimport {\n ApiCacheService,\n ApiResponse,\n EligibleProduct, KnownFeatureFlags,\n LinkedBank,\n LinkedBankStatus,\n MobileStateService,\n SavingsAccount,\n SavingsAch,\n SavingsGoal,\n SavingsScheduleCreateRequest,\n SavingsSchedulePatchRequest,\n SavingsScheduleResponse,\n SavingsSetupStatus,\n SavingsStatementsResponse,\n SavingsTransaction,\n SavingsTransactionCategory,\n SpendingAccount,\n TransferAccountDisplay,\n TransferAccountType,\n TransferRequest,\n} from '@brightside-web/desktop/data-access/shared';\nimport {FeatureFlagService} from \"@brightside-web/desktop/data-access/core-services\";\n\nconst NoAccountStatuses = [undefined, SavingsSetupStatus.canceled];\nconst FailedCreationStatuses = [SavingsSetupStatus.errorCustodialCreation, SavingsSetupStatus.errorFboCreation];\nconst PendingAccountStatuses = [SavingsSetupStatus.accountCreated, ...FailedCreationStatuses];\nconst TransferableLinkedBankStatuses = [LinkedBankStatus.LINKED, LinkedBankStatus.ACTIVE];\n\nexport interface SavingsScheduleRequest {\n schedule_type: string;\n next_transfer_date: string;\n amount: number;\n source: string | null;\n}\n\nexport enum InitiatingSource {\n DEFAULT = 'default',\n ONBOARDING = 'onboarding',\n LOAN = 'loan',\n ONE_CLICK = 'one-click',\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SavingsAccountService {\n\n constructor(\n private apiCache: ApiCacheService,\n private mobile: MobileStateService,\n private featureFlagSvc: FeatureFlagService,\n private awsApiWrapperService: AwsApiWrapperService,\n private bsHubService: BsHubService,) {\n this.bsHubService.listen('SavingsAccountChannel', (data: HubCapsule<any, any>) => {\n if (data.payload.event === 'refreshStatus') {\n this.mobile\n .get(true)\n .subscribe((response) =>\n this.bsHubService.dispatch('SavingsAccountChannel', { event: 'accountRefresh', data: response.savingsSetup?.status })\n );\n } else if (data.payload.event === 'clearAllCache') {\n this.clearSavingsCache();\n }\n });\n }\n\n static AutosaveInitialAmount(microCoreUtilRemoteConfigService: MicroCoreUtilRemoteConfigService) {\n try {\n return JSON.parse(microCoreUtilRemoteConfigService.getValueAsString('internalAutosaveDefaults'))?.initialAmount;\n } catch (_) {\n return 20;\n }\n }\n\n static isFunctional(isPayrollEligible: boolean, status?: SavingsSetupStatus): boolean {\n if (typeof status === undefined) {\n return false;\n }\n if (isPayrollEligible) {\n return status === SavingsSetupStatus.payrollSetup;\n }\n\n return [SavingsSetupStatus.accountCreated, SavingsSetupStatus.payrollSetup].includes(status as SavingsSetupStatus);\n }\n\n static isFailedCreation(status?: SavingsSetupStatus) {\n return FailedCreationStatuses.includes(status as SavingsSetupStatus);\n }\n\n static isAutoSaving(savingsAccount: SavingsAccount): boolean {\n return Boolean(this.hasSetupAutosaveBefore(savingsAccount) && !savingsAccount.schedule_paused);\n }\n\n static isLinkedBankPresent(savingsAccount: SavingsAccount): boolean {\n return savingsAccount.banks && savingsAccount.banks.length > 0;\n }\n\n static hasTransferableBank(savingsAccount: SavingsAccount): boolean {\n return savingsAccount.banks.some((bank) => TransferableLinkedBankStatuses.includes(bank.status));\n }\n\n static hasSetupAutosaveBefore(savingsAccount: SavingsAccount ): boolean {\n return Boolean(savingsAccount.next_deposit_amount && savingsAccount.schedule_type);\n }\n\n static allowDelete(savingsAccount: SavingsAccount): boolean {\n return savingsAccount.balance === 0 || SavingsAccountService.hasTransferableBank(savingsAccount);\n }\n\n //MW MobileService fetchMobileState & others\n hasFunctionalSavingsAccount(): Observable<boolean> {\n return this.mobile\n .get()\n .pipe(\n map((mobileState) =>\n SavingsAccountService.isFunctional(\n Boolean(mobileState.products?.includes(EligibleProduct.payrollSavings)),\n mobileState?.savingsSetup?.status\n )\n )\n );\n }\n\n hasPendingSavingsAccount(): Observable<boolean> {\n return this.mobile\n .get()\n .pipe(map((mobileState) => PendingAccountStatuses.includes(mobileState?.savingsSetup?.status as SavingsSetupStatus)));\n }\n\n hasFailedCreationSavingsAccount(): Observable<boolean> {\n return this.mobile\n .get()\n .pipe(\n map((mobileState) => SavingsAccountService.isFailedCreation(mobileState?.savingsSetup?.status as SavingsSetupStatus))\n );\n }\n //MW finsol SavingsService.getAccount\n getSavingsAccount(): Observable<SavingsAccount | undefined> {\n return this.apiCache.get<SavingsAccount>('api-mobile', '/savings');\n }\n\n //MW finsol SavingsService.getTransactions\n getSavingsTransactions(filterCategory?: SavingsTransactionCategory): Observable<SavingsTransaction[]> {\n return this.apiCache\n .get<SavingsTransaction[]>('api-mobile', '/savings/transactions')\n .pipe(map((rewards) => rewards.filter((reward) => !filterCategory || reward.category === filterCategory)));\n }\n\n hasSavingsGoal(): Observable<boolean> {\n return this.apiCache\n .get<SavingsGoal>('api-mobile', '/savings/goals')\n .pipe(map((goal) => Boolean(Object.keys(goal).length > 0)));\n }\n // should always call hasSavingsGoal first to avoid encountering the empty goal\n // MW savings.service getGoals\n getSavingsGoal(): Observable<SavingsGoal | undefined> {\n return this.apiCache\n .get<SavingsGoal>('api-mobile', '/savings/goals')\n .pipe(map((goal: SavingsGoal) => (Object.keys(goal).length > 0 ? goal : undefined)));\n }\n\n getStatements(): Observable<SavingsStatementsResponse | undefined> {\n return this.apiCache.get<SavingsStatementsResponse>('api-mobile', '/savings?filter=statementrange');\n }\n\n getStatement(month: string, year: string): Observable<any> {\n return this.apiCache.get<any>('api-mobile', `/savings/statement?month=${month}&year=${year}`);\n }\n\n //MW uses finsol.service GET /deposit/link which is same response as GET /savings banks BUT deposit is better since it doesnt assume the existence of BS accounts\n getLinkedBanks(): Observable<LinkedBank[]> {\n return this.apiCache.get<{ banks: LinkedBank[] }>('api-mobile', '/deposit/link').pipe(\n map((response) => response?.banks ?? []),\n catchError(() => [])\n );\n }\n\n getTransferableLinkedBanks(): Observable<LinkedBank[]> {\n return this.getLinkedBanks().pipe(\n map((banks) => banks.filter((bank) => TransferableLinkedBankStatuses.includes(bank.status)))\n );\n }\n\n getDepositAccount(): Observable<SpendingAccount> {\n return this.apiCache.get<SpendingAccount>('api-mobile', '/deposit');\n }\n\n getTransferAccounts(): Observable<TransferAccountDisplay[]> {\n return forkJoin([\n this.getSavingsAccount(),\n this.getTransferableLinkedBanks(),\n this.getDepositAccount(),\n this.featureFlagSvc.getFlag<boolean>(KnownFeatureFlags.FREEZETRANSFERPULL)\n ]).pipe(\n map((accounts) => {\n const transferAccounts: TransferAccountDisplay[] = [];\n if (accounts[0]) {\n transferAccounts.push({\n type: TransferAccountType.SAVINGS,\n name: accounts[0]?.name,\n balance: accounts[0]?.available_balance,\n lastFour: accounts[0].last_four_accnum,\n });\n }\n accounts[1].map((linkedBank) =>\n transferAccounts.push({\n type: TransferAccountType.ACH,\n id: linkedBank.id,\n name: linkedBank.bank_name,\n lastFour: linkedBank.last_four,\n balance: 0,\n })\n );\n if (accounts[2]) {\n transferAccounts.push({\n type: TransferAccountType.SPENDING,\n name: accounts[2].name,\n lastFour: accounts[2].last_four_accnum,\n balance: accounts[2].balance,\n });\n }\n return transferAccounts;\n })\n );\n }\n\n //MW savings.service getAccountDetails\n getSavingsAch(): Observable<SavingsAch | undefined> {\n return this.apiCache.get<SavingsAch>('api-mobile', '/savings?filter=accountRoutingNum');\n }\n\n clearSavingsCache() {\n this.apiCache.refreshItem('/savings');\n this.apiCache.refreshItem('/savings?filter=accountRoutingNum');\n this.apiCache.refreshItem('/savings?filter=statementrange');\n this.apiCache.refreshItem('/savings/transactions');\n this.apiCache.refreshItem('/client/mobilestate');\n }\n\n //MW savings.service\n createAccount(): Observable<ApiResponse> {\n this.clearSavingsCache();\n return from(this.awsApiWrapperService.post('api-mobile', '/savings', { headers: { 'Content-Type': 'application/json' } }));\n }\n\n createAccountWithSchedule(payload: SavingsScheduleRequest, source: InitiatingSource): Observable<ApiResponse> {\n this.clearSavingsCache();\n return from(\n this.awsApiWrapperService.post('api-mobile', '/savings', {\n body: { schedule: payload, initiating_source: source },\n })\n );\n }\n\n updateSchedule(requestBody: SavingsSchedulePatchRequest): Observable<SavingsScheduleResponse> {\n this.clearSavingsCache();\n\n return from(this.awsApiWrapperService.patch('api-mobile', '/savings/schedule', { body: requestBody }));\n }\n\n createSchedule(requestBody: SavingsScheduleCreateRequest): Observable<SavingsScheduleResponse> {\n this.clearSavingsCache();\n\n return from(this.awsApiWrapperService.post('api-mobile', '/savings/schedule', { body: requestBody }));\n }\n\n //MW finsol service transferFunds\n // NOTE there is a deposit api version of this same call but the logic is identical\n createTransfer(request: TransferRequest): Observable<ApiResponse> {\n this.clearSavingsCache();\n return from(this.awsApiWrapperService.post('api-mobile', '/savings/transactions', { body: request }));\n }\n\n //MW savings service deleteAccount\n deleteAccount(): Observable<ApiResponse> {\n this.clearSavingsCache();\n return from(this.awsApiWrapperService.del('api-mobile', '/savings', { headers: { 'Content-Type': 'application/json' } }));\n }\n\n canAccessAutosave(): Observable<boolean> {\n return forkJoin([this.getSavingsAccount(), this.mobile.getProductOnboardingEligibility(EligibleProduct.payrollSavings)]).pipe(\n // @ts-ignore\n map(([account, eligibility]) => !!(account && (eligibility || SavingsAccountService.hasSetupAutosaveBefore(account))))\n );\n }\n}\n","//! moment.js locale configuration\n//! locale : Galician [gl]\n//! author : Juan G. Hurtado : https://github.com/juanghurtado\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var gl = moment.defineLocale('gl', {\n months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split(\n '_'\n ),\n monthsShort:\n 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY H:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',\n },\n calendar: {\n sameDay: function () {\n return '[hoxe ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';\n },\n nextDay: function () {\n return '[mañá ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';\n },\n nextWeek: function () {\n return 'dddd [' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT';\n },\n lastDay: function () {\n return '[onte ' + (this.hours() !== 1 ? 'á' : 'a') + '] LT';\n },\n lastWeek: function () {\n return (\n '[o] dddd [pasado ' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT'\n );\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: function (str) {\n if (str.indexOf('un') === 0) {\n return 'n' + str;\n }\n return 'en ' + str;\n },\n past: 'hai %s',\n s: 'uns segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'unha hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n M: 'un mes',\n MM: '%d meses',\n y: 'un ano',\n yy: '%d anos',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return gl;\n\n})));\n","import { Subscription } from '../Subscription';\nexport class Action extends Subscription {\n constructor(scheduler, work) {\n super();\n }\n schedule(state, delay = 0) {\n return this;\n }\n}\n","export const intervalProvider = {\n setInterval(handler, timeout, ...args) {\n const { delegate } = intervalProvider;\n if (delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) {\n return delegate.setInterval(handler, timeout, ...args);\n }\n return setInterval(handler, timeout, ...args);\n },\n clearInterval(handle) {\n const { delegate } = intervalProvider;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle);\n },\n delegate: undefined,\n};\n","import { Action } from './Action';\nimport { intervalProvider } from './intervalProvider';\nimport { arrRemove } from '../util/arrRemove';\nexport class AsyncAction extends Action {\n constructor(scheduler, work) {\n super(scheduler, work);\n this.scheduler = scheduler;\n this.work = work;\n this.pending = false;\n }\n schedule(state, delay = 0) {\n var _a;\n if (this.closed) {\n return this;\n }\n this.state = state;\n const id = this.id;\n const scheduler = this.scheduler;\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, delay);\n }\n this.pending = true;\n this.delay = delay;\n this.id = (_a = this.id) !== null && _a !== void 0 ? _a : this.requestAsyncId(scheduler, this.id, delay);\n return this;\n }\n requestAsyncId(scheduler, _id, delay = 0) {\n return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay);\n }\n recycleAsyncId(_scheduler, id, delay = 0) {\n if (delay != null && this.delay === delay && this.pending === false) {\n return id;\n }\n if (id != null) {\n intervalProvider.clearInterval(id);\n }\n return undefined;\n }\n execute(state, delay) {\n if (this.closed) {\n return new Error('executing a cancelled action');\n }\n this.pending = false;\n const error = this._execute(state, delay);\n if (error) {\n return error;\n }\n else if (this.pending === false && this.id != null) {\n this.id = this.recycleAsyncId(this.scheduler, this.id, null);\n }\n }\n _execute(state, _delay) {\n let errored = false;\n let errorValue;\n try {\n this.work(state);\n }\n catch (e) {\n errored = true;\n errorValue = e ? e : new Error('Scheduled action threw falsy error');\n }\n if (errored) {\n this.unsubscribe();\n return errorValue;\n }\n }\n unsubscribe() {\n if (!this.closed) {\n const { id, scheduler } = this;\n const { actions } = scheduler;\n this.work = this.state = this.scheduler = null;\n this.pending = false;\n arrRemove(actions, this);\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, null);\n }\n this.delay = null;\n super.unsubscribe();\n }\n }\n}\n","import { Subject } from './Subject';\nimport { dateTimestampProvider } from './scheduler/dateTimestampProvider';\nexport class ReplaySubject extends Subject {\n constructor(_bufferSize = Infinity, _windowTime = Infinity, _timestampProvider = dateTimestampProvider) {\n super();\n this._bufferSize = _bufferSize;\n this._windowTime = _windowTime;\n this._timestampProvider = _timestampProvider;\n this._buffer = [];\n this._infiniteTimeWindow = true;\n this._infiniteTimeWindow = _windowTime === Infinity;\n this._bufferSize = Math.max(1, _bufferSize);\n this._windowTime = Math.max(1, _windowTime);\n }\n next(value) {\n const { isStopped, _buffer, _infiniteTimeWindow, _timestampProvider, _windowTime } = this;\n if (!isStopped) {\n _buffer.push(value);\n !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime);\n }\n this._trimBuffer();\n super.next(value);\n }\n _subscribe(subscriber) {\n this._throwIfClosed();\n this._trimBuffer();\n const subscription = this._innerSubscribe(subscriber);\n const { _infiniteTimeWindow, _buffer } = this;\n const copy = _buffer.slice();\n for (let i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) {\n subscriber.next(copy[i]);\n }\n this._checkFinalizedStatuses(subscriber);\n return subscription;\n }\n _trimBuffer() {\n const { _bufferSize, _timestampProvider, _buffer, _infiniteTimeWindow } = this;\n const adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize;\n _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize);\n if (!_infiniteTimeWindow) {\n const now = _timestampProvider.now();\n let last = 0;\n for (let i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) {\n last = i;\n }\n last && _buffer.splice(0, last + 1);\n }\n }\n}\n","//! moment.js locale configuration\n//! locale : Croatian [hr]\n//! author : Bojan Marković : https://github.com/bmarkovic\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function translate(number, withoutSuffix, key) {\n var result = number + ' ';\n switch (key) {\n case 'ss':\n if (number === 1) {\n result += 'sekunda';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'sekunde';\n } else {\n result += 'sekundi';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'jedna minuta' : 'jedne minute';\n case 'mm':\n if (number === 1) {\n result += 'minuta';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'minute';\n } else {\n result += 'minuta';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'jedan sat' : 'jednog sata';\n case 'hh':\n if (number === 1) {\n result += 'sat';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'sata';\n } else {\n result += 'sati';\n }\n return result;\n case 'dd':\n if (number === 1) {\n result += 'dan';\n } else {\n result += 'dana';\n }\n return result;\n case 'MM':\n if (number === 1) {\n result += 'mjesec';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'mjeseca';\n } else {\n result += 'mjeseci';\n }\n return result;\n case 'yy':\n if (number === 1) {\n result += 'godina';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'godine';\n } else {\n result += 'godina';\n }\n return result;\n }\n }\n\n var hr = moment.defineLocale('hr', {\n months: {\n format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split(\n '_'\n ),\n standalone:\n 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split(\n '_'\n ),\n },\n monthsShort:\n 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(\n '_'\n ),\n weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'Do MMMM YYYY',\n LLL: 'Do MMMM YYYY H:mm',\n LLLL: 'dddd, Do MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[danas u] LT',\n nextDay: '[sutra u] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[u] [nedjelju] [u] LT';\n case 3:\n return '[u] [srijedu] [u] LT';\n case 6:\n return '[u] [subotu] [u] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[u] dddd [u] LT';\n }\n },\n lastDay: '[jučer u] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[prošlu] [nedjelju] [u] LT';\n case 3:\n return '[prošlu] [srijedu] [u] LT';\n case 6:\n return '[prošle] [subote] [u] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[prošli] dddd [u] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'za %s',\n past: 'prije %s',\n s: 'par sekundi',\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: 'dan',\n dd: translate,\n M: 'mjesec',\n MM: translate,\n y: 'godinu',\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return hr;\n\n})));\n","import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';\n\nimport { UiMoleculeBaseData } from '../shared.interface';\n\n/**\n * @description\n * A base molecule component to be utilized when your component supports passing\n * input info via a data object or direct key/value inputs\n *\n * @usageNotes\n * None\n *\n */\nexport declare interface UiBaseDataMoleculeSchema {\n schemaValidationConfig: UiBaseDataMoleculeSchemaValidationConfig;\n\n /**\n * Components must contain a data object defined.\n *\n * Example: @Input() data: <yourDataInterface>;\n */\n data: unknown;\n\n /**\n * This method will be called when you are using a data object instead\n * of direct input key/values. The idea is anytime you want to update local\n */\n uiOnDirectInputsFromDataObject(): void;\n}\n\nexport interface UiBaseDataMoleculeSchemaValidationConfig {\n directInputValues: unknown[];\n}\n\n@Component({\n template: '',\n})\nexport class UiBaseDataMoleculeComponent implements UiBaseDataMoleculeSchema, OnInit, OnChanges {\n /**\n * These properties will be set inside validateDataSchemeUsage based\n * on the developer input.\n */\n private hasDataObjectUsed = false;\n private hasDirectInputsSet = false;\n\n /**\n * Flag should be marked true when data object is being used\n * over direct inputs.\n */\n private shouldUpdateWithDataChanges = false;\n\n /**\n * If you wish to have developer logging turn this on\n *\n * Default: true\n */\n protected allowVerboseDebugMode = true;\n\n public schemaValidationConfig: UiBaseDataMoleculeSchemaValidationConfig;\n\n /**\n * Allow developer to pass in data with an object\n *\n * Interface UiMoleculeBaseData\n */\n @Input() data: UiMoleculeBaseData;\n\n ngOnInit(): void {\n this.validateDataSchemeUsage();\n this.updateDirectInputsFromDataObject();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n //We need to check: updateWithData flag and that this is NOT the first change\n if (this.shouldUpdateWithDataChanges) {\n if (changes.data?.isFirstChange()) {\n return;\n }\n\n this.updateDirectInputsFromDataObject();\n }\n }\n\n protected logForDebugging(message?: any, ...optionalParams: any[]): void {\n if (this.allowVerboseDebugMode) console.log('debug: UiBaseDataMoleculeComponent - ', message, optionalParams);\n }\n\n /**\n * We should be calling this method on the init of the component to ensure\n * correct usage of the data schema. Example: Don't support data object\n * and direct value inputs\n *\n * Matching against direct input values from this.schemaValidationConfig\n */\n private validateDataSchemeUsage(): void {\n this.hasDataObjectUsed = this.data === undefined ? false : Object.keys(this.data).length > 0;\n this.hasDirectInputsSet = this.schemaValidationConfig.directInputValues.filter((value) => Boolean(value)).length > 0;\n\n //If we have have both patterns used, we need to warn the developer\n //that we are going to ignore the data object entirely\n if (this.hasDataObjectUsed && this.hasDirectInputsSet) {\n console.warn(\n 'Inside your usage of the UiFooterDefaultComponent class, you must not pass both patterns. Please utilize data object or direct input values.'\n );\n }\n }\n\n /**\n * Should be called when the data object was passed without direct\n * inputs also being defined.\n *\n */\n private updateDirectInputsFromDataObject(): void {\n //Ensure we have a data object and no direct inputs defined\n //Valid case: hasDataObjectUsed === true && hasDirectInputsSet === false\n if (this.hasDataObjectUsed && !this.hasDirectInputsSet) {\n this.uiOnDirectInputsFromDataObject();\n this.shouldUpdateWithDataChanges = true;\n }\n }\n\n public uiOnDirectInputsFromDataObject(): void {\n this.logForDebugging('Oops, you forgot to handle updating values when the data object changes.');\n }\n}\n","//! moment.js locale configuration\n//! locale : Tagalog (Philippines) [tl-ph]\n//! author : Dan Hagman : https://github.com/hagmandan\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var tlPh = moment.defineLocale('tl-ph', {\n months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(\n '_'\n ),\n monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),\n weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(\n '_'\n ),\n weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),\n weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'MM/D/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY HH:mm',\n LLLL: 'dddd, MMMM DD, YYYY HH:mm',\n },\n calendar: {\n sameDay: 'LT [ngayong araw]',\n nextDay: '[Bukas ng] LT',\n nextWeek: 'LT [sa susunod na] dddd',\n lastDay: 'LT [kahapon]',\n lastWeek: 'LT [noong nakaraang] dddd',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'sa loob ng %s',\n past: '%s ang nakalipas',\n s: 'ilang segundo',\n ss: '%d segundo',\n m: 'isang minuto',\n mm: '%d minuto',\n h: 'isang oras',\n hh: '%d oras',\n d: 'isang araw',\n dd: '%d araw',\n M: 'isang buwan',\n MM: '%d buwan',\n y: 'isang taon',\n yy: '%d taon',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}/,\n ordinal: function (number) {\n return number;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return tlPh;\n\n})));\n","export const dateTimestampProvider = {\n now() {\n return (dateTimestampProvider.delegate || Date).now();\n },\n delegate: undefined,\n};\n","<div class=\"bw-radio-wrapper\"\n [ngClass]=\"{\n 'radio-list': radioList,\n 'radio-block': radioBlock,\n 'checked': radio.checked,\n 'radio-single-margin': singleMargin,\n 'radio-list_border': radioList && listStyle === 'border'}\">\n <div class=\"bw-radio-hidden\">\n <input\n #radio\n type=\"radio\"\n [attr.id]=\"inputId\"\n [attr.name]=\"name\"\n [attr.value]=\"value\"\n [attr.tabindex]=\"tabindex\"\n [checked]=\"checked\"\n (change)=\"onChange($event)\"\n (focus)=\"onRadioFocus($event)\"\n (blur)=\"onRadioBlur($event)\"\n [disabled]=\"disabled\"\n />\n </div>\n <div\n (click)=\"handleClick($event, radio, true)\"\n role=\"radio\"\n [attr.aria-checked]=\"checked\"\n class=\"bw-faux-radio\"\n [ngClass]=\"{\n 'bw-radio-active': radio.checked,\n 'bw-radio-disabled': disabled,\n 'bw-radio-focus': focused,\n 'bw-radio-single-margin': singleMargin\n }\"\n ></div>\n <label class=\"body\" (click)=\"select($event)\" *ngIf=\"label\" [attr.for]=\"inputId\">\n <span *ngIf=\"preLabel\" class=\"type-xs-bold brand\" [innerHTML]=\"preLabel\"></span>\n <span [ngClass]=\"{'type-xl-bold mb-xxs': isBoldLabel}\" [innerHTML]=\"label\"></span>\n <span *ngIf=\"postLabel\" class=\"type-sm secondary-text\" [innerHTML]=\"postLabel\"></span>\n </label>\n</div>\n","import { Component, Input, Output, ElementRef, EventEmitter, forwardRef, ViewChild, ChangeDetectorRef, OnInit, AfterViewInit, HostListener } from '@angular/core';\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\n\nexport const RADIO_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RadioComponent),\n multi: true,\n};\n\n@Component({\n selector: 'bw-radio',\n templateUrl: './radio.component.html',\n styleUrls: ['./radio.component.scss'],\n providers: [RADIO_VALUE_ACCESSOR],\n})\nexport class RadioComponent implements OnInit, ControlValueAccessor {\n /** The radio control value */\n @Input() value: any;\n\n /** The name attribute that is used to associate the radio control with a radio group */\n @Input() name: string;\n\n /** Whether the input is disabled */\n @Input() disabled: boolean;\n\n /** The HTML label element for the radio control */\n @Input() label: string;\n\n /** The text line that appears above the label */\n @Input() preLabel: string;\n\n /** The text line that appears below the label */\n @Input() postLabel: string;\n\n /** The id of the input, used to associate the radio control with its label tag */\n @Input() inputId: string;\n @Input() tabindex: number;\n @Input() startSelected = false;\n @Input() radioList = false;\n @Input() listStyle = '';\n @Input() radioBlock = false;\n @Input() singleMargin = false;\n @Output() radioClick: EventEmitter<any> = new EventEmitter();\n //@Output() radioChanged: EventEmitter<boolean> = new EventEmitter();\n @Output() radioFocus: EventEmitter<any> = new EventEmitter();\n @Output() radioBlur: EventEmitter<any> = new EventEmitter();\n\n @ViewChild('radio', { static: true }) inputViewChild: ElementRef;\n\n/* @HostListener('change', ['$event'])\n // tslint:disable-next-line: no-any\n public onModelChanged(e: any): void {\n if (!e) {\n console.log('FROM HOSTLISTENER:', e);\n }\n } */\n\n isBoldLabel = false;\n\n public checked: boolean;\n public focused: boolean;\n public onModelChange: Function = () => {console.log('change')};\n public onModelTouched: Function = ($event: any) => {console.log($event)};\n\n constructor(private cd: ChangeDetectorRef) {}\n\n ngOnInit() {\n if(this.startSelected) {\n this.inputViewChild.nativeElement.checked = true;\n this.checked = true;\n }\n if (this.radioBlock && this.postLabel) {\n this.isBoldLabel = true;\n }\n }\n\n handleClick(event: { preventDefault: () => void }, radioButton: { focus: () => void }, focus: any) {\n event.preventDefault();\n\n if (this.disabled) {\n return;\n }\n\n this.select(event);\n\n if (focus) {\n radioButton.focus();\n }\n }\n\n select(event: any) {\n if (!this.disabled) {\n this.inputViewChild.nativeElement.checked = true;\n this.checked = true;\n this.onModelChange(this.value);\n this.radioClick.emit({ event, value: this.value });\n }\n }\n\n writeValue(value: any): void {\n this.checked = value === this.value;\n\n if (this.inputViewChild && this.inputViewChild.nativeElement) {\n this.inputViewChild.nativeElement.checked = this.checked;\n }\n\n this.cd.markForCheck();\n }\n\n registerOnChange(fn: Function): void {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn: Function): void {\n this.onModelTouched = fn;\n }\n\n setDisabledState(val: boolean): void {\n this.disabled = val;\n }\n\n onRadioFocus(event: any) {\n this.focused = true;\n this.radioFocus.emit(event);\n }\n\n onRadioBlur(event: any) {\n this.focused = false;\n this.onModelTouched();\n this.radioBlur.emit(event);\n }\n\n onChange(event: any) {\n this.select(event);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { TranslateModule } from '@ngx-translate/core';\n\nimport { BrightsideUiModule } from '@brightside/brightside-ui';\nimport { BrightsideUiServicesModule } from '@brightside/brightside-ui-services';\n\nimport { MicroCoreUtilityModule, FirebaseAnalyticsService, FirebaseService } from '@micro-core/utility';\n\nimport { UiMediaComponent } from './media/media.component';\nimport { UiProductPromoCardComponent } from './product-promo-card/product-promo-card.component';\n\nimport { UiNavigationExitBackComponent } from './navigation/exit/back/exit-back.component';\nimport { UiNavigationExitCloseComponent } from './navigation/exit/close/exit-close.component';\n\nimport { UiHeaderDefaultComponent } from './header/default/header-default.component';\nimport { UiHeaderEyebrowComponent } from './header/eyebrow/header-eyebrow.component';\nimport { UiHeaderMenuComponent } from './header/menu/header-menu.component';\n\nimport { UiFooterDefaultComponent } from './footer/default/footer-default.component';\n\nconst Molecules = [\n UiFooterDefaultComponent,\n UiHeaderDefaultComponent,\n UiHeaderEyebrowComponent,\n UiHeaderMenuComponent,\n UiMediaComponent,\n UiNavigationExitBackComponent,\n UiNavigationExitCloseComponent,\n UiProductPromoCardComponent,\n];\n\n@NgModule({\n imports: [BrightsideUiModule, BrightsideUiServicesModule, CommonModule, MicroCoreUtilityModule, TranslateModule],\n exports: [...Molecules],\n providers: [{ provide: FirebaseService, useClass: FirebaseAnalyticsService }],\n declarations: [...Molecules],\n})\nexport class MicroUiMoleculeModule {}\n","//! moment.js locale configuration\n//! locale : Hungarian [hu]\n//! author : Adam Brunner : https://github.com/adambrunner\n//! author : Peter Viszt : https://github.com/passatgt\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var weekEndings =\n 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');\n function translate(number, withoutSuffix, key, isFuture) {\n var num = number;\n switch (key) {\n case 's':\n return isFuture || withoutSuffix\n ? 'néhány másodperc'\n : 'néhány másodperce';\n case 'ss':\n return num + (isFuture || withoutSuffix)\n ? ' másodperc'\n : ' másodperce';\n case 'm':\n return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');\n case 'mm':\n return num + (isFuture || withoutSuffix ? ' perc' : ' perce');\n case 'h':\n return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');\n case 'hh':\n return num + (isFuture || withoutSuffix ? ' óra' : ' órája');\n case 'd':\n return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');\n case 'dd':\n return num + (isFuture || withoutSuffix ? ' nap' : ' napja');\n case 'M':\n return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');\n case 'MM':\n return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');\n case 'y':\n return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');\n case 'yy':\n return num + (isFuture || withoutSuffix ? ' év' : ' éve');\n }\n return '';\n }\n function week(isFuture) {\n return (\n (isFuture ? '' : '[múlt] ') +\n '[' +\n weekEndings[this.day()] +\n '] LT[-kor]'\n );\n }\n\n var hu = moment.defineLocale('hu', {\n months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split(\n '_'\n ),\n monthsShort:\n 'jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),\n weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),\n weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'YYYY.MM.DD.',\n LL: 'YYYY. MMMM D.',\n LLL: 'YYYY. MMMM D. H:mm',\n LLLL: 'YYYY. MMMM D., dddd H:mm',\n },\n meridiemParse: /de|du/i,\n isPM: function (input) {\n return input.charAt(1).toLowerCase() === 'u';\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours < 12) {\n return isLower === true ? 'de' : 'DE';\n } else {\n return isLower === true ? 'du' : 'DU';\n }\n },\n calendar: {\n sameDay: '[ma] LT[-kor]',\n nextDay: '[holnap] LT[-kor]',\n nextWeek: function () {\n return week.call(this, true);\n },\n lastDay: '[tegnap] LT[-kor]',\n lastWeek: function () {\n return week.call(this, false);\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s múlva',\n past: '%s',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return hu;\n\n})));\n","import { getClient } from '../currentScopes.js';\n\n// Treeshakable guard to remove all code related to tracing\n\n/**\n * Determines if tracing is currently enabled.\n *\n * Tracing is enabled when at least one of `tracesSampleRate` and `tracesSampler` is defined in the SDK config.\n */\nfunction hasTracingEnabled(\n maybeOptions,\n) {\n if (typeof __SENTRY_TRACING__ === 'boolean' && !__SENTRY_TRACING__) {\n return false;\n }\n\n const client = getClient();\n const options = maybeOptions || (client && client.getOptions());\n // eslint-disable-next-line deprecation/deprecation\n return !!options && (options.enableTracing || 'tracesSampleRate' in options || 'tracesSampler' in options);\n}\n\nexport { hasTracingEnabled };\n","//! moment.js locale configuration\n//! locale : Chinese (Taiwan) [zh-tw]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var zhTw = moment.defineLocale('zh-tw', {\n months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n '_'\n ),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n '_'\n ),\n weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日 HH:mm',\n LLLL: 'YYYY年M月D日dddd HH:mm',\n l: 'YYYY/M/D',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日dddd HH:mm',\n },\n meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n return hour;\n } else if (meridiem === '中午') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === '下午' || meridiem === '晚上') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n var hm = hour * 100 + minute;\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1130) {\n return '上午';\n } else if (hm < 1230) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n } else {\n return '晚上';\n }\n },\n calendar: {\n sameDay: '[今天] LT',\n nextDay: '[明天] LT',\n nextWeek: '[下]dddd LT',\n lastDay: '[昨天] LT',\n lastWeek: '[上]dddd LT',\n sameElse: 'L',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n case 'M':\n return number + '月';\n case 'w':\n case 'W':\n return number + '週';\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s後',\n past: '%s前',\n s: '幾秒',\n ss: '%d 秒',\n m: '1 分鐘',\n mm: '%d 分鐘',\n h: '1 小時',\n hh: '%d 小時',\n d: '1 天',\n dd: '%d 天',\n M: '1 個月',\n MM: '%d 個月',\n y: '1 年',\n yy: '%d 年',\n },\n });\n\n return zhTw;\n\n})));\n","//! moment.js locale configuration\n//! locale : Korean [ko]\n//! author : Kyungwook, Park : https://github.com/kyungw00k\n//! author : Jeeeyul Lee <jeeeyul@gmail.com>\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ko = moment.defineLocale('ko', {\n months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),\n monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split(\n '_'\n ),\n weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),\n weekdaysShort: '일_월_화_수_목_금_토'.split('_'),\n weekdaysMin: '일_월_화_수_목_금_토'.split('_'),\n longDateFormat: {\n LT: 'A h:mm',\n LTS: 'A h:mm:ss',\n L: 'YYYY.MM.DD.',\n LL: 'YYYY년 MMMM D일',\n LLL: 'YYYY년 MMMM D일 A h:mm',\n LLLL: 'YYYY년 MMMM D일 dddd A h:mm',\n l: 'YYYY.MM.DD.',\n ll: 'YYYY년 MMMM D일',\n lll: 'YYYY년 MMMM D일 A h:mm',\n llll: 'YYYY년 MMMM D일 dddd A h:mm',\n },\n calendar: {\n sameDay: '오늘 LT',\n nextDay: '내일 LT',\n nextWeek: 'dddd LT',\n lastDay: '어제 LT',\n lastWeek: '지난주 dddd LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s 후',\n past: '%s 전',\n s: '몇 초',\n ss: '%d초',\n m: '1분',\n mm: '%d분',\n h: '한 시간',\n hh: '%d시간',\n d: '하루',\n dd: '%d일',\n M: '한 달',\n MM: '%d달',\n y: '일 년',\n yy: '%d년',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(일|월|주)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '일';\n case 'M':\n return number + '월';\n case 'w':\n case 'W':\n return number + '주';\n default:\n return number;\n }\n },\n meridiemParse: /오전|오후/,\n isPM: function (token) {\n return token === '오후';\n },\n meridiem: function (hour, minute, isUpper) {\n return hour < 12 ? '오전' : '오후';\n },\n });\n\n return ko;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic (Palestine) [ar-ps]\n//! author : Majd Al-Shihabi : https://github.com/majdal\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '١',\n 2: '٢',\n 3: '٣',\n 4: '٤',\n 5: '٥',\n 6: '٦',\n 7: '٧',\n 8: '٨',\n 9: '٩',\n 0: '٠',\n },\n numberMap = {\n '١': '1',\n '٢': '2',\n '٣': '3',\n '٤': '4',\n '٥': '5',\n '٦': '6',\n '٧': '7',\n '٨': '8',\n '٩': '9',\n '٠': '0',\n };\n\n var arPs = moment.defineLocale('ar-ps', {\n months: 'كانون الثاني_شباط_آذار_نيسان_أيّار_حزيران_تمّوز_آب_أيلول_تشري الأوّل_تشرين الثاني_كانون الأوّل'.split(\n '_'\n ),\n monthsShort:\n 'ك٢_شباط_آذار_نيسان_أيّار_حزيران_تمّوز_آب_أيلول_ت١_ت٢_ك١'.split('_'),\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n meridiemParse: /ص|م/,\n isPM: function (input) {\n return 'م' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات',\n },\n preparse: function (string) {\n return string\n .replace(/[٣٤٥٦٧٨٩٠]/g, function (match) {\n return numberMap[match];\n })\n .split('') // reversed since negative lookbehind not supported everywhere\n .reverse()\n .join('')\n .replace(/[١٢](?![\\u062a\\u0643])/g, function (match) {\n return numberMap[match];\n })\n .split('')\n .reverse()\n .join('')\n .replace(/،/g, ',');\n },\n postformat: function (string) {\n return string\n .replace(/\\d/g, function (match) {\n return symbolMap[match];\n })\n .replace(/,/g, '،');\n },\n week: {\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 });\n\n return arPs;\n\n})));\n","import { dateTimestampProvider } from './scheduler/dateTimestampProvider';\nexport class Scheduler {\n constructor(schedulerActionCtor, now = Scheduler.now) {\n this.schedulerActionCtor = schedulerActionCtor;\n this.now = now;\n }\n schedule(work, delay = 0, state) {\n return new this.schedulerActionCtor(this, work).schedule(state, delay);\n }\n}\nScheduler.now = dateTimestampProvider.now;\n","import { Scheduler } from '../Scheduler';\nexport class AsyncScheduler extends Scheduler {\n constructor(SchedulerAction, now = Scheduler.now) {\n super(SchedulerAction, now);\n this.actions = [];\n this._active = false;\n }\n flush(action) {\n const { actions } = this;\n if (this._active) {\n actions.push(action);\n return;\n }\n let error;\n this._active = true;\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions.shift()));\n this._active = false;\n if (error) {\n while ((action = actions.shift())) {\n action.unsubscribe();\n }\n throw error;\n }\n }\n}\n","import { Observable } from '../Observable';\nexport const EMPTY = new Observable((subscriber) => subscriber.complete());\nexport function empty(scheduler) {\n return scheduler ? emptyScheduled(scheduler) : EMPTY;\n}\nfunction emptyScheduled(scheduler) {\n return new Observable((subscriber) => scheduler.schedule(() => subscriber.complete()));\n}\n","import { mergeMap } from './mergeMap';\nimport { isFunction } from '../util/isFunction';\nexport function concatMap(project, resultSelector) {\n return isFunction(resultSelector) ? mergeMap(project, resultSelector, 1) : mergeMap(project, 1);\n}\n","export const observable = (() => (typeof Symbol === 'function' && Symbol.observable) || '@@observable')();\n","var map = {\n\t\"./af\": 9638,\n\t\"./af.js\": 9638,\n\t\"./ar\": 6117,\n\t\"./ar-dz\": 9808,\n\t\"./ar-dz.js\": 9808,\n\t\"./ar-kw\": 8100,\n\t\"./ar-kw.js\": 8100,\n\t\"./ar-ly\": 4497,\n\t\"./ar-ly.js\": 4497,\n\t\"./ar-ma\": 7744,\n\t\"./ar-ma.js\": 7744,\n\t\"./ar-ps\": 5267,\n\t\"./ar-ps.js\": 5267,\n\t\"./ar-sa\": 4826,\n\t\"./ar-sa.js\": 4826,\n\t\"./ar-tn\": 9948,\n\t\"./ar-tn.js\": 9948,\n\t\"./ar.js\": 6117,\n\t\"./az\": 141,\n\t\"./az.js\": 141,\n\t\"./be\": 6639,\n\t\"./be.js\": 6639,\n\t\"./bg\": 2161,\n\t\"./bg.js\": 2161,\n\t\"./bm\": 2583,\n\t\"./bm.js\": 2583,\n\t\"./bn\": 5674,\n\t\"./bn-bd\": 5533,\n\t\"./bn-bd.js\": 5533,\n\t\"./bn.js\": 5674,\n\t\"./bo\": 8457,\n\t\"./bo.js\": 8457,\n\t\"./br\": 9150,\n\t\"./br.js\": 9150,\n\t\"./bs\": 1194,\n\t\"./bs.js\": 1194,\n\t\"./ca\": 1162,\n\t\"./ca.js\": 1162,\n\t\"./cs\": 3376,\n\t\"./cs.js\": 3376,\n\t\"./cv\": 1315,\n\t\"./cv.js\": 1315,\n\t\"./cy\": 1906,\n\t\"./cy.js\": 1906,\n\t\"./da\": 2385,\n\t\"./da.js\": 2385,\n\t\"./de\": 5517,\n\t\"./de-at\": 4687,\n\t\"./de-at.js\": 4687,\n\t\"./de-ch\": 6345,\n\t\"./de-ch.js\": 6345,\n\t\"./de.js\": 5517,\n\t\"./dv\": 1668,\n\t\"./dv.js\": 1668,\n\t\"./el\": 4899,\n\t\"./el.js\": 4899,\n\t\"./en-au\": 3728,\n\t\"./en-au.js\": 3728,\n\t\"./en-ca\": 5626,\n\t\"./en-ca.js\": 5626,\n\t\"./en-gb\": 304,\n\t\"./en-gb.js\": 304,\n\t\"./en-ie\": 840,\n\t\"./en-ie.js\": 840,\n\t\"./en-il\": 3095,\n\t\"./en-il.js\": 3095,\n\t\"./en-in\": 6585,\n\t\"./en-in.js\": 6585,\n\t\"./en-nz\": 6954,\n\t\"./en-nz.js\": 6954,\n\t\"./en-sg\": 8028,\n\t\"./en-sg.js\": 8028,\n\t\"./eo\": 3670,\n\t\"./eo.js\": 3670,\n\t\"./es\": 7858,\n\t\"./es-do\": 8390,\n\t\"./es-do.js\": 8390,\n\t\"./es-mx\": 1986,\n\t\"./es-mx.js\": 1986,\n\t\"./es-us\": 7199,\n\t\"./es-us.js\": 7199,\n\t\"./es.js\": 7858,\n\t\"./et\": 3771,\n\t\"./et.js\": 3771,\n\t\"./eu\": 420,\n\t\"./eu.js\": 420,\n\t\"./fa\": 7783,\n\t\"./fa.js\": 7783,\n\t\"./fi\": 1839,\n\t\"./fi.js\": 1839,\n\t\"./fil\": 5451,\n\t\"./fil.js\": 5451,\n\t\"./fo\": 1261,\n\t\"./fo.js\": 1261,\n\t\"./fr\": 6810,\n\t\"./fr-ca\": 8835,\n\t\"./fr-ca.js\": 8835,\n\t\"./fr-ch\": 292,\n\t\"./fr-ch.js\": 292,\n\t\"./fr.js\": 6810,\n\t\"./fy\": 5503,\n\t\"./fy.js\": 5503,\n\t\"./ga\": 6342,\n\t\"./ga.js\": 6342,\n\t\"./gd\": 4825,\n\t\"./gd.js\": 4825,\n\t\"./gl\": 4993,\n\t\"./gl.js\": 4993,\n\t\"./gom-deva\": 7948,\n\t\"./gom-deva.js\": 7948,\n\t\"./gom-latn\": 7703,\n\t\"./gom-latn.js\": 7703,\n\t\"./gu\": 186,\n\t\"./gu.js\": 186,\n\t\"./he\": 6321,\n\t\"./he.js\": 6321,\n\t\"./hi\": 5941,\n\t\"./hi.js\": 5941,\n\t\"./hr\": 5092,\n\t\"./hr.js\": 5092,\n\t\"./hu\": 5217,\n\t\"./hu.js\": 5217,\n\t\"./hy-am\": 9880,\n\t\"./hy-am.js\": 9880,\n\t\"./id\": 8671,\n\t\"./id.js\": 8671,\n\t\"./is\": 4510,\n\t\"./is.js\": 4510,\n\t\"./it\": 463,\n\t\"./it-ch\": 6755,\n\t\"./it-ch.js\": 6755,\n\t\"./it.js\": 463,\n\t\"./ja\": 8211,\n\t\"./ja.js\": 8211,\n\t\"./jv\": 6634,\n\t\"./jv.js\": 6634,\n\t\"./ka\": 6930,\n\t\"./ka.js\": 6930,\n\t\"./kk\": 5872,\n\t\"./kk.js\": 5872,\n\t\"./km\": 1478,\n\t\"./km.js\": 1478,\n\t\"./kn\": 3235,\n\t\"./kn.js\": 3235,\n\t\"./ko\": 5244,\n\t\"./ko.js\": 5244,\n\t\"./ku\": 254,\n\t\"./ku-kmr\": 3941,\n\t\"./ku-kmr.js\": 3941,\n\t\"./ku.js\": 254,\n\t\"./ky\": 9434,\n\t\"./ky.js\": 9434,\n\t\"./lb\": 9888,\n\t\"./lb.js\": 9888,\n\t\"./lo\": 6603,\n\t\"./lo.js\": 6603,\n\t\"./lt\": 6502,\n\t\"./lt.js\": 6502,\n\t\"./lv\": 6444,\n\t\"./lv.js\": 6444,\n\t\"./me\": 1932,\n\t\"./me.js\": 1932,\n\t\"./mi\": 6232,\n\t\"./mi.js\": 6232,\n\t\"./mk\": 7986,\n\t\"./mk.js\": 7986,\n\t\"./ml\": 3947,\n\t\"./ml.js\": 3947,\n\t\"./mn\": 3437,\n\t\"./mn.js\": 3437,\n\t\"./mr\": 3081,\n\t\"./mr.js\": 3081,\n\t\"./ms\": 3594,\n\t\"./ms-my\": 9849,\n\t\"./ms-my.js\": 9849,\n\t\"./ms.js\": 3594,\n\t\"./mt\": 7811,\n\t\"./mt.js\": 7811,\n\t\"./my\": 6648,\n\t\"./my.js\": 6648,\n\t\"./nb\": 9938,\n\t\"./nb.js\": 9938,\n\t\"./ne\": 3371,\n\t\"./ne.js\": 3371,\n\t\"./nl\": 1356,\n\t\"./nl-be\": 5656,\n\t\"./nl-be.js\": 5656,\n\t\"./nl.js\": 1356,\n\t\"./nn\": 9174,\n\t\"./nn.js\": 9174,\n\t\"./oc-lnc\": 7090,\n\t\"./oc-lnc.js\": 7090,\n\t\"./pa-in\": 41,\n\t\"./pa-in.js\": 41,\n\t\"./pl\": 6498,\n\t\"./pl.js\": 6498,\n\t\"./pt\": 8266,\n\t\"./pt-br\": 6527,\n\t\"./pt-br.js\": 6527,\n\t\"./pt.js\": 8266,\n\t\"./ro\": 9065,\n\t\"./ro.js\": 9065,\n\t\"./ru\": 9935,\n\t\"./ru.js\": 9935,\n\t\"./sd\": 6357,\n\t\"./sd.js\": 6357,\n\t\"./se\": 8086,\n\t\"./se.js\": 8086,\n\t\"./si\": 8850,\n\t\"./si.js\": 8850,\n\t\"./sk\": 392,\n\t\"./sk.js\": 392,\n\t\"./sl\": 7597,\n\t\"./sl.js\": 7597,\n\t\"./sq\": 1930,\n\t\"./sq.js\": 1930,\n\t\"./sr\": 7031,\n\t\"./sr-cyrl\": 1082,\n\t\"./sr-cyrl.js\": 1082,\n\t\"./sr.js\": 7031,\n\t\"./ss\": 7312,\n\t\"./ss.js\": 7312,\n\t\"./sv\": 5619,\n\t\"./sv.js\": 5619,\n\t\"./sw\": 9532,\n\t\"./sw.js\": 9532,\n\t\"./ta\": 8705,\n\t\"./ta.js\": 8705,\n\t\"./te\": 6269,\n\t\"./te.js\": 6269,\n\t\"./tet\": 8589,\n\t\"./tet.js\": 8589,\n\t\"./tg\": 6779,\n\t\"./tg.js\": 6779,\n\t\"./th\": 2714,\n\t\"./th.js\": 2714,\n\t\"./tk\": 6439,\n\t\"./tk.js\": 6439,\n\t\"./tl-ph\": 5103,\n\t\"./tl-ph.js\": 5103,\n\t\"./tlh\": 6028,\n\t\"./tlh.js\": 6028,\n\t\"./tr\": 9480,\n\t\"./tr.js\": 9480,\n\t\"./tzl\": 1526,\n\t\"./tzl.js\": 1526,\n\t\"./tzm\": 9269,\n\t\"./tzm-latn\": 4287,\n\t\"./tzm-latn.js\": 4287,\n\t\"./tzm.js\": 9269,\n\t\"./ug-cn\": 9790,\n\t\"./ug-cn.js\": 9790,\n\t\"./uk\": 6826,\n\t\"./uk.js\": 6826,\n\t\"./ur\": 5457,\n\t\"./ur.js\": 5457,\n\t\"./uz\": 1993,\n\t\"./uz-latn\": 6235,\n\t\"./uz-latn.js\": 6235,\n\t\"./uz.js\": 1993,\n\t\"./vi\": 8047,\n\t\"./vi.js\": 8047,\n\t\"./x-pseudo\": 275,\n\t\"./x-pseudo.js\": 275,\n\t\"./yo\": 6602,\n\t\"./yo.js\": 6602,\n\t\"./zh-cn\": 872,\n\t\"./zh-cn.js\": 872,\n\t\"./zh-hk\": 208,\n\t\"./zh-hk.js\": 208,\n\t\"./zh-mo\": 5717,\n\t\"./zh-mo.js\": 5717,\n\t\"./zh-tw\": 5232,\n\t\"./zh-tw.js\": 5232\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 5358;","export function createObject(keys, values) {\n return keys.reduce((result, key, i) => ((result[key] = values[i]), result), {});\n}\n","import { asyncScheduler } from '../scheduler/async';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function debounceTime(dueTime, scheduler = asyncScheduler) {\n return operate((source, subscriber) => {\n let activeTask = null;\n let lastValue = null;\n let lastTime = null;\n const emit = () => {\n if (activeTask) {\n activeTask.unsubscribe();\n activeTask = null;\n const value = lastValue;\n lastValue = null;\n subscriber.next(value);\n }\n };\n function emitWhenIdle() {\n const targetTime = lastTime + dueTime;\n const now = scheduler.now();\n if (now < targetTime) {\n activeTask = this.schedule(undefined, targetTime - now);\n subscriber.add(activeTask);\n return;\n }\n emit();\n }\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n lastValue = value;\n lastTime = scheduler.now();\n if (!activeTask) {\n activeTask = scheduler.schedule(emitWhenIdle, dueTime);\n subscriber.add(activeTask);\n }\n }, () => {\n emit();\n subscriber.complete();\n }, undefined, () => {\n lastValue = activeTask = null;\n }));\n });\n}\n","//! moment.js locale configuration\n//! locale : Filipino [fil]\n//! author : Dan Hagman : https://github.com/hagmandan\n//! author : Matthew Co : https://github.com/matthewdeeco\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var fil = moment.defineLocale('fil', {\n months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(\n '_'\n ),\n monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),\n weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(\n '_'\n ),\n weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),\n weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'MM/D/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY HH:mm',\n LLLL: 'dddd, MMMM DD, YYYY HH:mm',\n },\n calendar: {\n sameDay: 'LT [ngayong araw]',\n nextDay: '[Bukas ng] LT',\n nextWeek: 'LT [sa susunod na] dddd',\n lastDay: 'LT [kahapon]',\n lastWeek: 'LT [noong nakaraang] dddd',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'sa loob ng %s',\n past: '%s ang nakalipas',\n s: 'ilang segundo',\n ss: '%d segundo',\n m: 'isang minuto',\n mm: '%d minuto',\n h: 'isang oras',\n hh: '%d oras',\n d: 'isang araw',\n dd: '%d araw',\n M: 'isang buwan',\n MM: '%d buwan',\n y: 'isang taon',\n yy: '%d taon',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}/,\n ordinal: function (number) {\n return number;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return fil;\n\n})));\n","//! moment.js locale configuration\n//! locale : Urdu [ur]\n//! author : Sawood Alam : https://github.com/ibnesayeed\n//! author : Zack : https://github.com/ZackVision\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var months = [\n 'جنوری',\n 'فروری',\n 'مارچ',\n 'اپریل',\n 'مئی',\n 'جون',\n 'جولائی',\n 'اگست',\n 'ستمبر',\n 'اکتوبر',\n 'نومبر',\n 'دسمبر',\n ],\n days = ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'ہفتہ'];\n\n var ur = moment.defineLocale('ur', {\n months: months,\n monthsShort: months,\n weekdays: days,\n weekdaysShort: days,\n weekdaysMin: days,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd، D MMMM YYYY HH:mm',\n },\n meridiemParse: /صبح|شام/,\n isPM: function (input) {\n return 'شام' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'صبح';\n }\n return 'شام';\n },\n calendar: {\n sameDay: '[آج بوقت] LT',\n nextDay: '[کل بوقت] LT',\n nextWeek: 'dddd [بوقت] LT',\n lastDay: '[گذشتہ روز بوقت] LT',\n lastWeek: '[گذشتہ] dddd [بوقت] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s بعد',\n past: '%s قبل',\n s: 'چند سیکنڈ',\n ss: '%d سیکنڈ',\n m: 'ایک منٹ',\n mm: '%d منٹ',\n h: 'ایک گھنٹہ',\n hh: '%d گھنٹے',\n d: 'ایک دن',\n dd: '%d دن',\n M: 'ایک ماہ',\n MM: '%d ماہ',\n y: 'ایک سال',\n yy: '%d سال',\n },\n preparse: function (string) {\n return string.replace(/،/g, ',');\n },\n postformat: function (string) {\n return string.replace(/,/g, '،');\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return ur;\n\n})));\n","import { _getProvider, getApp, _registerComponent, registerVersion } from '@firebase/app';\nimport { Logger } from '@firebase/logger';\nimport { ErrorFactory, calculateBackoffMillis, FirebaseError, isIndexedDBAvailable, validateIndexedDBOpenable, isBrowserExtension, areCookiesEnabled, getModularInstance, deepEqual } from '@firebase/util';\nimport { Component } from '@firebase/component';\nimport '@firebase/installations';\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 * Type constant for Firebase Analytics.\n */\nconst ANALYTICS_TYPE = 'analytics';\n// Key to attach FID to in gtag params.\nconst GA_FID_KEY = 'firebase_id';\nconst ORIGIN_KEY = 'origin';\nconst FETCH_TIMEOUT_MILLIS = 60 * 1000;\nconst DYNAMIC_CONFIG_URL = 'https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig';\nconst GTAG_URL = 'https://www.googletagmanager.com/gtag/js';\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 */\nconst logger = new Logger('@firebase/analytics');\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 */\nconst ERRORS = {\n [\"already-exists\" /* AnalyticsError.ALREADY_EXISTS */]: 'A Firebase Analytics instance with the appId {$id} ' +\n ' already exists. ' +\n 'Only one Firebase Analytics instance can be created for each appId.',\n [\"already-initialized\" /* AnalyticsError.ALREADY_INITIALIZED */]: 'initializeAnalytics() cannot be called again with different options than those ' +\n 'it was initially called with. It can be called again with the same options to ' +\n 'return the existing instance, or getAnalytics() can be used ' +\n 'to get a reference to the already-initialized instance.',\n [\"already-initialized-settings\" /* AnalyticsError.ALREADY_INITIALIZED_SETTINGS */]: 'Firebase Analytics has already been initialized.' +\n 'settings() must be called before initializing any Analytics instance' +\n 'or it will have no effect.',\n [\"interop-component-reg-failed\" /* AnalyticsError.INTEROP_COMPONENT_REG_FAILED */]: 'Firebase Analytics Interop Component failed to instantiate: {$reason}',\n [\"invalid-analytics-context\" /* AnalyticsError.INVALID_ANALYTICS_CONTEXT */]: 'Firebase Analytics is not supported in this environment. ' +\n 'Wrap initialization of analytics in analytics.isSupported() ' +\n 'to prevent initialization in unsupported environments. Details: {$errorInfo}',\n [\"indexeddb-unavailable\" /* AnalyticsError.INDEXEDDB_UNAVAILABLE */]: 'IndexedDB unavailable or restricted in this environment. ' +\n 'Wrap initialization of analytics in analytics.isSupported() ' +\n 'to prevent initialization in unsupported environments. Details: {$errorInfo}',\n [\"fetch-throttle\" /* AnalyticsError.FETCH_THROTTLE */]: 'The config fetch request timed out while in an exponential backoff state.' +\n ' Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.',\n [\"config-fetch-failed\" /* AnalyticsError.CONFIG_FETCH_FAILED */]: 'Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}',\n [\"no-api-key\" /* AnalyticsError.NO_API_KEY */]: 'The \"apiKey\" field is empty in the local Firebase config. Firebase Analytics requires this field to' +\n 'contain a valid API key.',\n [\"no-app-id\" /* AnalyticsError.NO_APP_ID */]: 'The \"appId\" field is empty in the local Firebase config. Firebase Analytics requires this field to' +\n 'contain a valid app ID.',\n [\"no-client-id\" /* AnalyticsError.NO_CLIENT_ID */]: 'The \"client_id\" field is empty.',\n [\"invalid-gtag-resource\" /* AnalyticsError.INVALID_GTAG_RESOURCE */]: 'Trusted Types detected an invalid gtag resource: {$gtagURL}.'\n};\nconst ERROR_FACTORY = new ErrorFactory('analytics', 'Analytics', ERRORS);\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 * Verifies and creates a TrustedScriptURL.\n */\nfunction createGtagTrustedTypesScriptURL(url) {\n if (!url.startsWith(GTAG_URL)) {\n const err = ERROR_FACTORY.create(\"invalid-gtag-resource\" /* AnalyticsError.INVALID_GTAG_RESOURCE */, {\n gtagURL: url\n });\n logger.warn(err.message);\n return '';\n }\n return url;\n}\n/**\n * Makeshift polyfill for Promise.allSettled(). Resolves when all promises\n * have either resolved or rejected.\n *\n * @param promises Array of promises to wait for.\n */\nfunction promiseAllSettled(promises) {\n return Promise.all(promises.map(promise => promise.catch(e => e)));\n}\n/**\n * Creates a TrustedTypePolicy object that implements the rules passed as policyOptions.\n *\n * @param policyName A string containing the name of the policy\n * @param policyOptions Object containing implementations of instance methods for TrustedTypesPolicy, see {@link https://developer.mozilla.org/en-US/docs/Web/API/TrustedTypePolicy#instance_methods\n * | the TrustedTypePolicy reference documentation}.\n */\nfunction createTrustedTypesPolicy(policyName, policyOptions) {\n // Create a TrustedTypes policy that we can use for updating src\n // properties\n let trustedTypesPolicy;\n if (window.trustedTypes) {\n trustedTypesPolicy = window.trustedTypes.createPolicy(policyName, policyOptions);\n }\n return trustedTypesPolicy;\n}\n/**\n * Inserts gtag script tag into the page to asynchronously download gtag.\n * @param dataLayerName Name of datalayer (most often the default, \"_dataLayer\").\n */\nfunction insertScriptTag(dataLayerName, measurementId) {\n const trustedTypesPolicy = createTrustedTypesPolicy('firebase-js-sdk-policy', {\n createScriptURL: createGtagTrustedTypesScriptURL\n });\n const script = document.createElement('script');\n // We are not providing an analyticsId in the URL because it would trigger a `page_view`\n // without fid. We will initialize ga-id using gtag (config) command together with fid.\n const gtagScriptURL = `${GTAG_URL}?l=${dataLayerName}&id=${measurementId}`;\n script.src = trustedTypesPolicy\n ? trustedTypesPolicy === null || trustedTypesPolicy === void 0 ? void 0 : trustedTypesPolicy.createScriptURL(gtagScriptURL)\n : gtagScriptURL;\n script.async = true;\n document.head.appendChild(script);\n}\n/**\n * Get reference to, or create, global datalayer.\n * @param dataLayerName Name of datalayer (most often the default, \"_dataLayer\").\n */\nfunction getOrCreateDataLayer(dataLayerName) {\n // Check for existing dataLayer and create if needed.\n let dataLayer = [];\n if (Array.isArray(window[dataLayerName])) {\n dataLayer = window[dataLayerName];\n }\n else {\n window[dataLayerName] = dataLayer;\n }\n return dataLayer;\n}\n/**\n * Wrapped gtag logic when gtag is called with 'config' command.\n *\n * @param gtagCore Basic gtag function that just appends to dataLayer.\n * @param initializationPromisesMap Map of appIds to their initialization promises.\n * @param dynamicConfigPromisesList Array of dynamic config fetch promises.\n * @param measurementIdToAppId Map of GA measurementIDs to corresponding Firebase appId.\n * @param measurementId GA Measurement ID to set config for.\n * @param gtagParams Gtag config params to set.\n */\nasync function gtagOnConfig(gtagCore, initializationPromisesMap, dynamicConfigPromisesList, measurementIdToAppId, measurementId, gtagParams) {\n // If config is already fetched, we know the appId and can use it to look up what FID promise we\n /// are waiting for, and wait only on that one.\n const correspondingAppId = measurementIdToAppId[measurementId];\n try {\n if (correspondingAppId) {\n await initializationPromisesMap[correspondingAppId];\n }\n else {\n // If config is not fetched yet, wait for all configs (we don't know which one we need) and\n // find the appId (if any) corresponding to this measurementId. If there is one, wait on\n // that appId's initialization promise. If there is none, promise resolves and gtag\n // call goes through.\n const dynamicConfigResults = await promiseAllSettled(dynamicConfigPromisesList);\n const foundConfig = dynamicConfigResults.find(config => config.measurementId === measurementId);\n if (foundConfig) {\n await initializationPromisesMap[foundConfig.appId];\n }\n }\n }\n catch (e) {\n logger.error(e);\n }\n gtagCore(\"config\" /* GtagCommand.CONFIG */, measurementId, gtagParams);\n}\n/**\n * Wrapped gtag logic when gtag is called with 'event' command.\n *\n * @param gtagCore Basic gtag function that just appends to dataLayer.\n * @param initializationPromisesMap Map of appIds to their initialization promises.\n * @param dynamicConfigPromisesList Array of dynamic config fetch promises.\n * @param measurementId GA Measurement ID to log event to.\n * @param gtagParams Params to log with this event.\n */\nasync function gtagOnEvent(gtagCore, initializationPromisesMap, dynamicConfigPromisesList, measurementId, gtagParams) {\n try {\n let initializationPromisesToWaitFor = [];\n // If there's a 'send_to' param, check if any ID specified matches\n // an initializeIds() promise we are waiting for.\n if (gtagParams && gtagParams['send_to']) {\n let gaSendToList = gtagParams['send_to'];\n // Make it an array if is isn't, so it can be dealt with the same way.\n if (!Array.isArray(gaSendToList)) {\n gaSendToList = [gaSendToList];\n }\n // Checking 'send_to' fields requires having all measurement ID results back from\n // the dynamic config fetch.\n const dynamicConfigResults = await promiseAllSettled(dynamicConfigPromisesList);\n for (const sendToId of gaSendToList) {\n // Any fetched dynamic measurement ID that matches this 'send_to' ID\n const foundConfig = dynamicConfigResults.find(config => config.measurementId === sendToId);\n const initializationPromise = foundConfig && initializationPromisesMap[foundConfig.appId];\n if (initializationPromise) {\n initializationPromisesToWaitFor.push(initializationPromise);\n }\n else {\n // Found an item in 'send_to' that is not associated\n // directly with an FID, possibly a group. Empty this array,\n // exit the loop early, and let it get populated below.\n initializationPromisesToWaitFor = [];\n break;\n }\n }\n }\n // This will be unpopulated if there was no 'send_to' field , or\n // if not all entries in the 'send_to' field could be mapped to\n // a FID. In these cases, wait on all pending initialization promises.\n if (initializationPromisesToWaitFor.length === 0) {\n /* eslint-disable-next-line @typescript-eslint/no-floating-promises */\n initializationPromisesToWaitFor = Object.values(initializationPromisesMap);\n }\n // Run core gtag function with args after all relevant initialization\n // promises have been resolved.\n await Promise.all(initializationPromisesToWaitFor);\n // Workaround for http://b/141370449 - third argument cannot be undefined.\n gtagCore(\"event\" /* GtagCommand.EVENT */, measurementId, gtagParams || {});\n }\n catch (e) {\n logger.error(e);\n }\n}\n/**\n * Wraps a standard gtag function with extra code to wait for completion of\n * relevant initialization promises before sending requests.\n *\n * @param gtagCore Basic gtag function that just appends to dataLayer.\n * @param initializationPromisesMap Map of appIds to their initialization promises.\n * @param dynamicConfigPromisesList Array of dynamic config fetch promises.\n * @param measurementIdToAppId Map of GA measurementIDs to corresponding Firebase appId.\n */\nfunction wrapGtag(gtagCore, \n/**\n * Allows wrapped gtag calls to wait on whichever initialization promises are required,\n * depending on the contents of the gtag params' `send_to` field, if any.\n */\ninitializationPromisesMap, \n/**\n * Wrapped gtag calls sometimes require all dynamic config fetches to have returned\n * before determining what initialization promises (which include FIDs) to wait for.\n */\ndynamicConfigPromisesList, \n/**\n * Wrapped gtag config calls can narrow down which initialization promise (with FID)\n * to wait for if the measurementId is already fetched, by getting the corresponding appId,\n * which is the key for the initialization promises map.\n */\nmeasurementIdToAppId) {\n /**\n * Wrapper around gtag that ensures FID is sent with gtag calls.\n * @param command Gtag command type.\n * @param idOrNameOrParams Measurement ID if command is EVENT/CONFIG, params if command is SET.\n * @param gtagParams Params if event is EVENT/CONFIG.\n */\n async function gtagWrapper(command, ...args) {\n try {\n // If event, check that relevant initialization promises have completed.\n if (command === \"event\" /* GtagCommand.EVENT */) {\n const [measurementId, gtagParams] = args;\n // If EVENT, second arg must be measurementId.\n await gtagOnEvent(gtagCore, initializationPromisesMap, dynamicConfigPromisesList, measurementId, gtagParams);\n }\n else if (command === \"config\" /* GtagCommand.CONFIG */) {\n const [measurementId, gtagParams] = args;\n // If CONFIG, second arg must be measurementId.\n await gtagOnConfig(gtagCore, initializationPromisesMap, dynamicConfigPromisesList, measurementIdToAppId, measurementId, gtagParams);\n }\n else if (command === \"consent\" /* GtagCommand.CONSENT */) {\n const [consentAction, gtagParams] = args;\n // consentAction can be one of 'default' or 'update'.\n gtagCore(\"consent\" /* GtagCommand.CONSENT */, consentAction, gtagParams);\n }\n else if (command === \"get\" /* GtagCommand.GET */) {\n const [measurementId, fieldName, callback] = args;\n gtagCore(\"get\" /* GtagCommand.GET */, measurementId, fieldName, callback);\n }\n else if (command === \"set\" /* GtagCommand.SET */) {\n const [customParams] = args;\n // If SET, second arg must be params.\n gtagCore(\"set\" /* GtagCommand.SET */, customParams);\n }\n else {\n gtagCore(command, ...args);\n }\n }\n catch (e) {\n logger.error(e);\n }\n }\n return gtagWrapper;\n}\n/**\n * Creates global gtag function or wraps existing one if found.\n * This wrapped function attaches Firebase instance ID (FID) to gtag 'config' and\n * 'event' calls that belong to the GAID associated with this Firebase instance.\n *\n * @param initializationPromisesMap Map of appIds to their initialization promises.\n * @param dynamicConfigPromisesList Array of dynamic config fetch promises.\n * @param measurementIdToAppId Map of GA measurementIDs to corresponding Firebase appId.\n * @param dataLayerName Name of global GA datalayer array.\n * @param gtagFunctionName Name of global gtag function (\"gtag\" if not user-specified).\n */\nfunction wrapOrCreateGtag(initializationPromisesMap, dynamicConfigPromisesList, measurementIdToAppId, dataLayerName, gtagFunctionName) {\n // Create a basic core gtag function\n let gtagCore = function (..._args) {\n // Must push IArguments object, not an array.\n window[dataLayerName].push(arguments);\n };\n // Replace it with existing one if found\n if (window[gtagFunctionName] &&\n typeof window[gtagFunctionName] === 'function') {\n // @ts-ignore\n gtagCore = window[gtagFunctionName];\n }\n window[gtagFunctionName] = wrapGtag(gtagCore, initializationPromisesMap, dynamicConfigPromisesList, measurementIdToAppId);\n return {\n gtagCore,\n wrappedGtag: window[gtagFunctionName]\n };\n}\n/**\n * Returns the script tag in the DOM matching both the gtag url pattern\n * and the provided data layer name.\n */\nfunction findGtagScriptOnPage(dataLayerName) {\n const scriptTags = window.document.getElementsByTagName('script');\n for (const tag of Object.values(scriptTags)) {\n if (tag.src &&\n tag.src.includes(GTAG_URL) &&\n tag.src.includes(dataLayerName)) {\n return tag;\n }\n }\n return null;\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\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 * Backoff factor for 503 errors, which we want to be conservative about\n * to avoid overloading servers. Each retry interval will be\n * BASE_INTERVAL_MILLIS * LONG_RETRY_FACTOR ^ retryCount, so the second one\n * will be ~30 seconds (with fuzzing).\n */\nconst LONG_RETRY_FACTOR = 30;\n/**\n * Base wait interval to multiplied by backoffFactor^backoffCount.\n */\nconst BASE_INTERVAL_MILLIS = 1000;\n/**\n * Stubbable retry data storage class.\n */\nclass RetryData {\n constructor(throttleMetadata = {}, intervalMillis = BASE_INTERVAL_MILLIS) {\n this.throttleMetadata = throttleMetadata;\n this.intervalMillis = intervalMillis;\n }\n getThrottleMetadata(appId) {\n return this.throttleMetadata[appId];\n }\n setThrottleMetadata(appId, metadata) {\n this.throttleMetadata[appId] = metadata;\n }\n deleteThrottleMetadata(appId) {\n delete this.throttleMetadata[appId];\n }\n}\nconst defaultRetryData = new RetryData();\n/**\n * Set GET request headers.\n * @param apiKey App API key.\n */\nfunction getHeaders(apiKey) {\n return new Headers({\n Accept: 'application/json',\n 'x-goog-api-key': apiKey\n });\n}\n/**\n * Fetches dynamic config from backend.\n * @param app Firebase app to fetch config for.\n */\nasync function fetchDynamicConfig(appFields) {\n var _a;\n const { appId, apiKey } = appFields;\n const request = {\n method: 'GET',\n headers: getHeaders(apiKey)\n };\n const appUrl = DYNAMIC_CONFIG_URL.replace('{app-id}', appId);\n const response = await fetch(appUrl, request);\n if (response.status !== 200 && response.status !== 304) {\n let errorMessage = '';\n try {\n // Try to get any error message text from server response.\n const jsonResponse = (await response.json());\n if ((_a = jsonResponse.error) === null || _a === void 0 ? void 0 : _a.message) {\n errorMessage = jsonResponse.error.message;\n }\n }\n catch (_ignored) { }\n throw ERROR_FACTORY.create(\"config-fetch-failed\" /* AnalyticsError.CONFIG_FETCH_FAILED */, {\n httpStatus: response.status,\n responseMessage: errorMessage\n });\n }\n return response.json();\n}\n/**\n * Fetches dynamic config from backend, retrying if failed.\n * @param app Firebase app to fetch config for.\n */\nasync function fetchDynamicConfigWithRetry(app, \n// retryData and timeoutMillis are parameterized to allow passing a different value for testing.\nretryData = defaultRetryData, timeoutMillis) {\n const { appId, apiKey, measurementId } = app.options;\n if (!appId) {\n throw ERROR_FACTORY.create(\"no-app-id\" /* AnalyticsError.NO_APP_ID */);\n }\n if (!apiKey) {\n if (measurementId) {\n return {\n measurementId,\n appId\n };\n }\n throw ERROR_FACTORY.create(\"no-api-key\" /* AnalyticsError.NO_API_KEY */);\n }\n const throttleMetadata = retryData.getThrottleMetadata(appId) || {\n backoffCount: 0,\n throttleEndTimeMillis: Date.now()\n };\n const signal = new AnalyticsAbortSignal();\n setTimeout(async () => {\n // Note a very low delay, eg < 10ms, can elapse before listeners are initialized.\n signal.abort();\n }, timeoutMillis !== undefined ? timeoutMillis : FETCH_TIMEOUT_MILLIS);\n return attemptFetchDynamicConfigWithRetry({ appId, apiKey, measurementId }, throttleMetadata, signal, retryData);\n}\n/**\n * Runs one retry attempt.\n * @param appFields Necessary app config fields.\n * @param throttleMetadata Ongoing metadata to determine throttling times.\n * @param signal Abort signal.\n */\nasync function attemptFetchDynamicConfigWithRetry(appFields, { throttleEndTimeMillis, backoffCount }, signal, retryData = defaultRetryData // for testing\n) {\n var _a;\n const { appId, measurementId } = appFields;\n // Starts with a (potentially zero) timeout to support resumption from stored state.\n // Ensures the throttle end time is honored if the last attempt timed out.\n // Note the SDK will never make a request if the fetch timeout expires at this point.\n try {\n await setAbortableTimeout(signal, throttleEndTimeMillis);\n }\n catch (e) {\n if (measurementId) {\n logger.warn(`Timed out fetching this Firebase app's measurement ID from the server.` +\n ` Falling back to the measurement ID ${measurementId}` +\n ` provided in the \"measurementId\" field in the local Firebase config. [${e === null || e === void 0 ? void 0 : e.message}]`);\n return { appId, measurementId };\n }\n throw e;\n }\n try {\n const response = await fetchDynamicConfig(appFields);\n // Note the SDK only clears throttle state if response is success or non-retriable.\n retryData.deleteThrottleMetadata(appId);\n return response;\n }\n catch (e) {\n const error = e;\n if (!isRetriableError(error)) {\n retryData.deleteThrottleMetadata(appId);\n if (measurementId) {\n logger.warn(`Failed to fetch this Firebase app's measurement ID from the server.` +\n ` Falling back to the measurement ID ${measurementId}` +\n ` provided in the \"measurementId\" field in the local Firebase config. [${error === null || error === void 0 ? void 0 : error.message}]`);\n return { appId, measurementId };\n }\n else {\n throw e;\n }\n }\n const backoffMillis = Number((_a = error === null || error === void 0 ? void 0 : error.customData) === null || _a === void 0 ? void 0 : _a.httpStatus) === 503\n ? calculateBackoffMillis(backoffCount, retryData.intervalMillis, LONG_RETRY_FACTOR)\n : calculateBackoffMillis(backoffCount, retryData.intervalMillis);\n // Increments backoff state.\n const throttleMetadata = {\n throttleEndTimeMillis: Date.now() + backoffMillis,\n backoffCount: backoffCount + 1\n };\n // Persists state.\n retryData.setThrottleMetadata(appId, throttleMetadata);\n logger.debug(`Calling attemptFetch again in ${backoffMillis} millis`);\n return attemptFetchDynamicConfigWithRetry(appFields, throttleMetadata, signal, retryData);\n }\n}\n/**\n * Supports waiting on a backoff by:\n *\n * <ul>\n * <li>Promisifying setTimeout, so we can set a timeout in our Promise chain</li>\n * <li>Listening on a signal bus for abort events, just like the Fetch API</li>\n * <li>Failing in the same way the Fetch API fails, so timing out a live request and a throttled\n * request appear the same.</li>\n * </ul>\n *\n * <p>Visible for testing.\n */\nfunction setAbortableTimeout(signal, throttleEndTimeMillis) {\n return new Promise((resolve, reject) => {\n // Derives backoff from given end time, normalizing negative numbers to zero.\n const backoffMillis = Math.max(throttleEndTimeMillis - Date.now(), 0);\n const timeout = setTimeout(resolve, backoffMillis);\n // Adds listener, rather than sets onabort, because signal is a shared object.\n signal.addEventListener(() => {\n clearTimeout(timeout);\n // If the request completes before this timeout, the rejection has no effect.\n reject(ERROR_FACTORY.create(\"fetch-throttle\" /* AnalyticsError.FETCH_THROTTLE */, {\n throttleEndTimeMillis\n }));\n });\n });\n}\n/**\n * Returns true if the {@link Error} indicates a fetch request may succeed later.\n */\nfunction isRetriableError(e) {\n if (!(e instanceof FirebaseError) || !e.customData) {\n return false;\n }\n // Uses string index defined by ErrorData, which FirebaseError implements.\n const httpStatus = Number(e.customData['httpStatus']);\n return (httpStatus === 429 ||\n httpStatus === 500 ||\n httpStatus === 503 ||\n httpStatus === 504);\n}\n/**\n * Shims a minimal AbortSignal (copied from Remote Config).\n *\n * <p>AbortController's AbortSignal conveniently decouples fetch timeout logic from other aspects\n * of networking, such as retries. Firebase doesn't use AbortController enough to justify a\n * polyfill recommendation, like we do with the Fetch API, but this minimal shim can easily be\n * swapped out if/when we do.\n */\nclass AnalyticsAbortSignal {\n constructor() {\n this.listeners = [];\n }\n addEventListener(listener) {\n this.listeners.push(listener);\n }\n abort() {\n this.listeners.forEach(listener => listener());\n }\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 * Event parameters to set on 'gtag' during initialization.\n */\nlet defaultEventParametersForInit;\n/**\n * Logs an analytics event through the Firebase SDK.\n *\n * @param gtagFunction Wrapped gtag function that waits for fid to be set before sending an event\n * @param eventName Google Analytics event name, choose from standard list or use a custom string.\n * @param eventParams Analytics event parameters.\n */\nasync function logEvent$1(gtagFunction, initializationPromise, eventName, eventParams, options) {\n if (options && options.global) {\n gtagFunction(\"event\" /* GtagCommand.EVENT */, eventName, eventParams);\n return;\n }\n else {\n const measurementId = await initializationPromise;\n const params = Object.assign(Object.assign({}, eventParams), { 'send_to': measurementId });\n gtagFunction(\"event\" /* GtagCommand.EVENT */, eventName, params);\n }\n}\n/**\n * Set screen_name parameter for this Google Analytics ID.\n *\n * @deprecated Use {@link logEvent} with `eventName` as 'screen_view' and add relevant `eventParams`.\n * See {@link https://firebase.google.com/docs/analytics/screenviews | Track Screenviews}.\n *\n * @param gtagFunction Wrapped gtag function that waits for fid to be set before sending an event\n * @param screenName Screen name string to set.\n */\nasync function setCurrentScreen$1(gtagFunction, initializationPromise, screenName, options) {\n if (options && options.global) {\n gtagFunction(\"set\" /* GtagCommand.SET */, { 'screen_name': screenName });\n return Promise.resolve();\n }\n else {\n const measurementId = await initializationPromise;\n gtagFunction(\"config\" /* GtagCommand.CONFIG */, measurementId, {\n update: true,\n 'screen_name': screenName\n });\n }\n}\n/**\n * Set user_id parameter for this Google Analytics ID.\n *\n * @param gtagFunction Wrapped gtag function that waits for fid to be set before sending an event\n * @param id User ID string to set\n */\nasync function setUserId$1(gtagFunction, initializationPromise, id, options) {\n if (options && options.global) {\n gtagFunction(\"set\" /* GtagCommand.SET */, { 'user_id': id });\n return Promise.resolve();\n }\n else {\n const measurementId = await initializationPromise;\n gtagFunction(\"config\" /* GtagCommand.CONFIG */, measurementId, {\n update: true,\n 'user_id': id\n });\n }\n}\n/**\n * Set all other user properties other than user_id and screen_name.\n *\n * @param gtagFunction Wrapped gtag function that waits for fid to be set before sending an event\n * @param properties Map of user properties to set\n */\nasync function setUserProperties$1(gtagFunction, initializationPromise, properties, options) {\n if (options && options.global) {\n const flatProperties = {};\n for (const key of Object.keys(properties)) {\n // use dot notation for merge behavior in gtag.js\n flatProperties[`user_properties.${key}`] = properties[key];\n }\n gtagFunction(\"set\" /* GtagCommand.SET */, flatProperties);\n return Promise.resolve();\n }\n else {\n const measurementId = await initializationPromise;\n gtagFunction(\"config\" /* GtagCommand.CONFIG */, measurementId, {\n update: true,\n 'user_properties': properties\n });\n }\n}\n/**\n * Retrieves a unique Google Analytics identifier for the web client.\n * See {@link https://developers.google.com/analytics/devguides/collection/ga4/reference/config#client_id | client_id}.\n *\n * @param gtagFunction Wrapped gtag function that waits for fid to be set before sending an event\n */\nasync function internalGetGoogleAnalyticsClientId(gtagFunction, initializationPromise) {\n const measurementId = await initializationPromise;\n return new Promise((resolve, reject) => {\n gtagFunction(\"get\" /* GtagCommand.GET */, measurementId, 'client_id', (clientId) => {\n if (!clientId) {\n reject(ERROR_FACTORY.create(\"no-client-id\" /* AnalyticsError.NO_CLIENT_ID */));\n }\n resolve(clientId);\n });\n });\n}\n/**\n * Set whether collection is enabled for this ID.\n *\n * @param enabled If true, collection is enabled for this ID.\n */\nasync function setAnalyticsCollectionEnabled$1(initializationPromise, enabled) {\n const measurementId = await initializationPromise;\n window[`ga-disable-${measurementId}`] = !enabled;\n}\n/**\n * Consent parameters to default to during 'gtag' initialization.\n */\nlet defaultConsentSettingsForInit;\n/**\n * Sets the variable {@link defaultConsentSettingsForInit} for use in the initialization of\n * analytics.\n *\n * @param consentSettings Maps the applicable end user consent state for gtag.js.\n */\nfunction _setConsentDefaultForInit(consentSettings) {\n defaultConsentSettingsForInit = consentSettings;\n}\n/**\n * Sets the variable `defaultEventParametersForInit` for use in the initialization of\n * analytics.\n *\n * @param customParams Any custom params the user may pass to gtag.js.\n */\nfunction _setDefaultEventParametersForInit(customParams) {\n defaultEventParametersForInit = customParams;\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\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 */\nasync function validateIndexedDB() {\n if (!isIndexedDBAvailable()) {\n logger.warn(ERROR_FACTORY.create(\"indexeddb-unavailable\" /* AnalyticsError.INDEXEDDB_UNAVAILABLE */, {\n errorInfo: 'IndexedDB is not available in this environment.'\n }).message);\n return false;\n }\n else {\n try {\n await validateIndexedDBOpenable();\n }\n catch (e) {\n logger.warn(ERROR_FACTORY.create(\"indexeddb-unavailable\" /* AnalyticsError.INDEXEDDB_UNAVAILABLE */, {\n errorInfo: e === null || e === void 0 ? void 0 : e.toString()\n }).message);\n return false;\n }\n }\n return true;\n}\n/**\n * Initialize the analytics instance in gtag.js by calling config command with fid.\n *\n * NOTE: We combine analytics initialization and setting fid together because we want fid to be\n * part of the `page_view` event that's sent during the initialization\n * @param app Firebase app\n * @param gtagCore The gtag function that's not wrapped.\n * @param dynamicConfigPromisesList Array of all dynamic config promises.\n * @param measurementIdToAppId Maps measurementID to appID.\n * @param installations _FirebaseInstallationsInternal instance.\n *\n * @returns Measurement ID.\n */\nasync function _initializeAnalytics(app, dynamicConfigPromisesList, measurementIdToAppId, installations, gtagCore, dataLayerName, options) {\n var _a;\n const dynamicConfigPromise = fetchDynamicConfigWithRetry(app);\n // Once fetched, map measurementIds to appId, for ease of lookup in wrapped gtag function.\n dynamicConfigPromise\n .then(config => {\n measurementIdToAppId[config.measurementId] = config.appId;\n if (app.options.measurementId &&\n config.measurementId !== app.options.measurementId) {\n logger.warn(`The measurement ID in the local Firebase config (${app.options.measurementId})` +\n ` does not match the measurement ID fetched from the server (${config.measurementId}).` +\n ` To ensure analytics events are always sent to the correct Analytics property,` +\n ` update the` +\n ` measurement ID field in the local config or remove it from the local config.`);\n }\n })\n .catch(e => logger.error(e));\n // Add to list to track state of all dynamic config promises.\n dynamicConfigPromisesList.push(dynamicConfigPromise);\n const fidPromise = validateIndexedDB().then(envIsValid => {\n if (envIsValid) {\n return installations.getId();\n }\n else {\n return undefined;\n }\n });\n const [dynamicConfig, fid] = await Promise.all([\n dynamicConfigPromise,\n fidPromise\n ]);\n // Detect if user has already put the gtag <script> tag on this page with the passed in\n // data layer name.\n if (!findGtagScriptOnPage(dataLayerName)) {\n insertScriptTag(dataLayerName, dynamicConfig.measurementId);\n }\n // Detects if there are consent settings that need to be configured.\n if (defaultConsentSettingsForInit) {\n gtagCore(\"consent\" /* GtagCommand.CONSENT */, 'default', defaultConsentSettingsForInit);\n _setConsentDefaultForInit(undefined);\n }\n // This command initializes gtag.js and only needs to be called once for the entire web app,\n // but since it is idempotent, we can call it multiple times.\n // We keep it together with other initialization logic for better code structure.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n gtagCore('js', new Date());\n // User config added first. We don't want users to accidentally overwrite\n // base Firebase config properties.\n const configProperties = (_a = options === null || options === void 0 ? void 0 : options.config) !== null && _a !== void 0 ? _a : {};\n // guard against developers accidentally setting properties with prefix `firebase_`\n configProperties[ORIGIN_KEY] = 'firebase';\n configProperties.update = true;\n if (fid != null) {\n configProperties[GA_FID_KEY] = fid;\n }\n // It should be the first config command called on this GA-ID\n // Initialize this GA-ID and set FID on it using the gtag config API.\n // Note: This will trigger a page_view event unless 'send_page_view' is set to false in\n // `configProperties`.\n gtagCore(\"config\" /* GtagCommand.CONFIG */, dynamicConfig.measurementId, configProperties);\n // Detects if there is data that will be set on every event logged from the SDK.\n if (defaultEventParametersForInit) {\n gtagCore(\"set\" /* GtagCommand.SET */, defaultEventParametersForInit);\n _setDefaultEventParametersForInit(undefined);\n }\n return dynamicConfig.measurementId;\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 * Analytics Service class.\n */\nclass AnalyticsService {\n constructor(app) {\n this.app = app;\n }\n _delete() {\n delete initializationPromisesMap[this.app.options.appId];\n return Promise.resolve();\n }\n}\n/**\n * Maps appId to full initialization promise. Wrapped gtag calls must wait on\n * all or some of these, depending on the call's `send_to` param and the status\n * of the dynamic config fetches (see below).\n */\nlet initializationPromisesMap = {};\n/**\n * List of dynamic config fetch promises. In certain cases, wrapped gtag calls\n * wait on all these to be complete in order to determine if it can selectively\n * wait for only certain initialization (FID) promises or if it must wait for all.\n */\nlet dynamicConfigPromisesList = [];\n/**\n * Maps fetched measurementIds to appId. Populated when the app's dynamic config\n * fetch completes. If already populated, gtag config calls can use this to\n * selectively wait for only this app's initialization promise (FID) instead of all\n * initialization promises.\n */\nconst measurementIdToAppId = {};\n/**\n * Name for window global data layer array used by GA: defaults to 'dataLayer'.\n */\nlet dataLayerName = 'dataLayer';\n/**\n * Name for window global gtag function used by GA: defaults to 'gtag'.\n */\nlet gtagName = 'gtag';\n/**\n * Reproduction of standard gtag function or reference to existing\n * gtag function on window object.\n */\nlet gtagCoreFunction;\n/**\n * Wrapper around gtag function that ensures FID is sent with all\n * relevant event and config calls.\n */\nlet wrappedGtagFunction;\n/**\n * Flag to ensure page initialization steps (creation or wrapping of\n * dataLayer and gtag script) are only run once per page load.\n */\nlet globalInitDone = false;\n/**\n * Configures Firebase Analytics to use custom `gtag` or `dataLayer` names.\n * Intended to be used if `gtag.js` script has been installed on\n * this page independently of Firebase Analytics, and is using non-default\n * names for either the `gtag` function or for `dataLayer`.\n * Must be called before calling `getAnalytics()` or it won't\n * have any effect.\n *\n * @public\n *\n * @param options - Custom gtag and dataLayer names.\n */\nfunction settings(options) {\n if (globalInitDone) {\n throw ERROR_FACTORY.create(\"already-initialized\" /* AnalyticsError.ALREADY_INITIALIZED */);\n }\n if (options.dataLayerName) {\n dataLayerName = options.dataLayerName;\n }\n if (options.gtagName) {\n gtagName = options.gtagName;\n }\n}\n/**\n * Returns true if no environment mismatch is found.\n * If environment mismatches are found, throws an INVALID_ANALYTICS_CONTEXT\n * error that also lists details for each mismatch found.\n */\nfunction warnOnBrowserContextMismatch() {\n const mismatchedEnvMessages = [];\n if (isBrowserExtension()) {\n mismatchedEnvMessages.push('This is a browser extension environment.');\n }\n if (!areCookiesEnabled()) {\n mismatchedEnvMessages.push('Cookies are not available.');\n }\n if (mismatchedEnvMessages.length > 0) {\n const details = mismatchedEnvMessages\n .map((message, index) => `(${index + 1}) ${message}`)\n .join(' ');\n const err = ERROR_FACTORY.create(\"invalid-analytics-context\" /* AnalyticsError.INVALID_ANALYTICS_CONTEXT */, {\n errorInfo: details\n });\n logger.warn(err.message);\n }\n}\n/**\n * Analytics instance factory.\n * @internal\n */\nfunction factory(app, installations, options) {\n warnOnBrowserContextMismatch();\n const appId = app.options.appId;\n if (!appId) {\n throw ERROR_FACTORY.create(\"no-app-id\" /* AnalyticsError.NO_APP_ID */);\n }\n if (!app.options.apiKey) {\n if (app.options.measurementId) {\n logger.warn(`The \"apiKey\" field is empty in the local Firebase config. This is needed to fetch the latest` +\n ` measurement ID for this Firebase app. Falling back to the measurement ID ${app.options.measurementId}` +\n ` provided in the \"measurementId\" field in the local Firebase config.`);\n }\n else {\n throw ERROR_FACTORY.create(\"no-api-key\" /* AnalyticsError.NO_API_KEY */);\n }\n }\n if (initializationPromisesMap[appId] != null) {\n throw ERROR_FACTORY.create(\"already-exists\" /* AnalyticsError.ALREADY_EXISTS */, {\n id: appId\n });\n }\n if (!globalInitDone) {\n // Steps here should only be done once per page: creation or wrapping\n // of dataLayer and global gtag function.\n getOrCreateDataLayer(dataLayerName);\n const { wrappedGtag, gtagCore } = wrapOrCreateGtag(initializationPromisesMap, dynamicConfigPromisesList, measurementIdToAppId, dataLayerName, gtagName);\n wrappedGtagFunction = wrappedGtag;\n gtagCoreFunction = gtagCore;\n globalInitDone = true;\n }\n // Async but non-blocking.\n // This map reflects the completion state of all promises for each appId.\n initializationPromisesMap[appId] = _initializeAnalytics(app, dynamicConfigPromisesList, measurementIdToAppId, installations, gtagCoreFunction, dataLayerName, options);\n const analyticsInstance = new AnalyticsService(app);\n return analyticsInstance;\n}\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * Returns an {@link Analytics} instance for the given app.\n *\n * @public\n *\n * @param app - The {@link @firebase/app#FirebaseApp} to use.\n */\nfunction getAnalytics(app = getApp()) {\n app = getModularInstance(app);\n // Dependencies\n const analyticsProvider = _getProvider(app, ANALYTICS_TYPE);\n if (analyticsProvider.isInitialized()) {\n return analyticsProvider.getImmediate();\n }\n return initializeAnalytics(app);\n}\n/**\n * Returns an {@link Analytics} instance for the given app.\n *\n * @public\n *\n * @param app - The {@link @firebase/app#FirebaseApp} to use.\n */\nfunction initializeAnalytics(app, options = {}) {\n // Dependencies\n const analyticsProvider = _getProvider(app, ANALYTICS_TYPE);\n if (analyticsProvider.isInitialized()) {\n const existingInstance = analyticsProvider.getImmediate();\n if (deepEqual(options, analyticsProvider.getOptions())) {\n return existingInstance;\n }\n else {\n throw ERROR_FACTORY.create(\"already-initialized\" /* AnalyticsError.ALREADY_INITIALIZED */);\n }\n }\n const analyticsInstance = analyticsProvider.initialize({ options });\n return analyticsInstance;\n}\n/**\n * This is a public static method provided to users that wraps four different checks:\n *\n * 1. Check if it's not a browser extension environment.\n * 2. Check if cookies are enabled in current browser.\n * 3. Check if IndexedDB is supported by the browser environment.\n * 4. Check if the current browser context is valid for using `IndexedDB.open()`.\n *\n * @public\n *\n */\nasync function isSupported() {\n if (isBrowserExtension()) {\n return false;\n }\n if (!areCookiesEnabled()) {\n return false;\n }\n if (!isIndexedDBAvailable()) {\n return false;\n }\n try {\n const isDBOpenable = await validateIndexedDBOpenable();\n return isDBOpenable;\n }\n catch (error) {\n return false;\n }\n}\n/**\n * Use gtag `config` command to set `screen_name`.\n *\n * @public\n *\n * @deprecated Use {@link logEvent} with `eventName` as 'screen_view' and add relevant `eventParams`.\n * See {@link https://firebase.google.com/docs/analytics/screenviews | Track Screenviews}.\n *\n * @param analyticsInstance - The {@link Analytics} instance.\n * @param screenName - Screen name to set.\n */\nfunction setCurrentScreen(analyticsInstance, screenName, options) {\n analyticsInstance = getModularInstance(analyticsInstance);\n setCurrentScreen$1(wrappedGtagFunction, initializationPromisesMap[analyticsInstance.app.options.appId], screenName, options).catch(e => logger.error(e));\n}\n/**\n * Retrieves a unique Google Analytics identifier for the web client.\n * See {@link https://developers.google.com/analytics/devguides/collection/ga4/reference/config#client_id | client_id}.\n *\n * @public\n *\n * @param app - The {@link @firebase/app#FirebaseApp} to use.\n */\nasync function getGoogleAnalyticsClientId(analyticsInstance) {\n analyticsInstance = getModularInstance(analyticsInstance);\n return internalGetGoogleAnalyticsClientId(wrappedGtagFunction, initializationPromisesMap[analyticsInstance.app.options.appId]);\n}\n/**\n * Use gtag `config` command to set `user_id`.\n *\n * @public\n *\n * @param analyticsInstance - The {@link Analytics} instance.\n * @param id - User ID to set.\n */\nfunction setUserId(analyticsInstance, id, options) {\n analyticsInstance = getModularInstance(analyticsInstance);\n setUserId$1(wrappedGtagFunction, initializationPromisesMap[analyticsInstance.app.options.appId], id, options).catch(e => logger.error(e));\n}\n/**\n * Use gtag `config` command to set all params specified.\n *\n * @public\n */\nfunction setUserProperties(analyticsInstance, properties, options) {\n analyticsInstance = getModularInstance(analyticsInstance);\n setUserProperties$1(wrappedGtagFunction, initializationPromisesMap[analyticsInstance.app.options.appId], properties, options).catch(e => logger.error(e));\n}\n/**\n * Sets whether Google Analytics collection is enabled for this app on this device.\n * Sets global `window['ga-disable-analyticsId'] = true;`\n *\n * @public\n *\n * @param analyticsInstance - The {@link Analytics} instance.\n * @param enabled - If true, enables collection, if false, disables it.\n */\nfunction setAnalyticsCollectionEnabled(analyticsInstance, enabled) {\n analyticsInstance = getModularInstance(analyticsInstance);\n setAnalyticsCollectionEnabled$1(initializationPromisesMap[analyticsInstance.app.options.appId], enabled).catch(e => logger.error(e));\n}\n/**\n * Adds data that will be set on every event logged from the SDK, including automatic ones.\n * With gtag's \"set\" command, the values passed persist on the current page and are passed with\n * all subsequent events.\n * @public\n * @param customParams - Any custom params the user may pass to gtag.js.\n */\nfunction setDefaultEventParameters(customParams) {\n // Check if reference to existing gtag function on window object exists\n if (wrappedGtagFunction) {\n wrappedGtagFunction(\"set\" /* GtagCommand.SET */, customParams);\n }\n else {\n _setDefaultEventParametersForInit(customParams);\n }\n}\n/**\n * Sends a Google Analytics event with given `eventParams`. This method\n * automatically associates this logged event with this Firebase web\n * app instance on this device.\n * List of official event parameters can be found in the gtag.js\n * reference documentation:\n * {@link https://developers.google.com/gtagjs/reference/ga4-events\n * | the GA4 reference documentation}.\n *\n * @public\n */\nfunction logEvent(analyticsInstance, eventName, eventParams, options) {\n analyticsInstance = getModularInstance(analyticsInstance);\n logEvent$1(wrappedGtagFunction, initializationPromisesMap[analyticsInstance.app.options.appId], eventName, eventParams, options).catch(e => logger.error(e));\n}\n/**\n * Sets the applicable end user consent state for this web app across all gtag references once\n * Firebase Analytics is initialized.\n *\n * Use the {@link ConsentSettings} to specify individual consent type values. By default consent\n * types are set to \"granted\".\n * @public\n * @param consentSettings - Maps the applicable end user consent state for gtag.js.\n */\nfunction setConsent(consentSettings) {\n // Check if reference to existing gtag function on window object exists\n if (wrappedGtagFunction) {\n wrappedGtagFunction(\"consent\" /* GtagCommand.CONSENT */, 'update', consentSettings);\n }\n else {\n _setConsentDefaultForInit(consentSettings);\n }\n}\n\nconst name = \"@firebase/analytics\";\nconst version = \"0.10.11\";\n\n/**\n * The Firebase Analytics Web SDK.\n * This SDK does not work in a Node.js environment.\n *\n * @packageDocumentation\n */\nfunction registerAnalytics() {\n _registerComponent(new Component(ANALYTICS_TYPE, (container, { options: analyticsOptions }) => {\n // getImmediate for FirebaseApp will always succeed\n const app = container.getProvider('app').getImmediate();\n const installations = container\n .getProvider('installations-internal')\n .getImmediate();\n return factory(app, installations, analyticsOptions);\n }, \"PUBLIC\" /* ComponentType.PUBLIC */));\n _registerComponent(new Component('analytics-internal', internalFactory, \"PRIVATE\" /* ComponentType.PRIVATE */));\n registerVersion(name, version);\n // BUILD_TARGET will be replaced by values like esm2017, cjs2017, etc during the compilation\n registerVersion(name, version, 'esm2017');\n function internalFactory(container) {\n try {\n const analytics = container.getProvider(ANALYTICS_TYPE).getImmediate();\n return {\n logEvent: (eventName, eventParams, options) => logEvent(analytics, eventName, eventParams, options)\n };\n }\n catch (e) {\n throw ERROR_FACTORY.create(\"interop-component-reg-failed\" /* AnalyticsError.INTEROP_COMPONENT_REG_FAILED */, {\n reason: e\n });\n }\n }\n}\nregisterAnalytics();\n\nexport { getAnalytics, getGoogleAnalyticsClientId, initializeAnalytics, isSupported, logEvent, setAnalyticsCollectionEnabled, setConsent, setCurrentScreen, setDefaultEventParameters, setUserId, setUserProperties, settings };\n","//! moment.js locale configuration\n//! locale : Frisian [fy]\n//! author : Robin van der Vliet : https://github.com/robin0van0der0v\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsShortWithDots =\n 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_'),\n monthsShortWithoutDots =\n 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_');\n\n var fy = moment.defineLocale('fy', {\n months: 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split(\n '_'\n ),\n monthsShort: function (m, format) {\n if (!m) {\n return monthsShortWithDots;\n } else if (/-MMM-/.test(format)) {\n return monthsShortWithoutDots[m.month()];\n } else {\n return monthsShortWithDots[m.month()];\n }\n },\n monthsParseExact: true,\n weekdays: 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split(\n '_'\n ),\n weekdaysShort: 'si._mo._ti._wo._to._fr._so.'.split('_'),\n weekdaysMin: 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD-MM-YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[hjoed om] LT',\n nextDay: '[moarn om] LT',\n nextWeek: 'dddd [om] LT',\n lastDay: '[juster om] LT',\n lastWeek: '[ôfrûne] dddd [om] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'oer %s',\n past: '%s lyn',\n s: 'in pear sekonden',\n ss: '%d sekonden',\n m: 'ien minút',\n mm: '%d minuten',\n h: 'ien oere',\n hh: '%d oeren',\n d: 'ien dei',\n dd: '%d dagen',\n M: 'ien moanne',\n MM: '%d moannen',\n y: 'ien jier',\n yy: '%d jierren',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal: function (number) {\n return (\n number +\n (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n );\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return fy;\n\n})));\n","//! moment.js locale configuration\n//! locale : German [de]\n//! author : lluchs : https://github.com/lluchs\n//! author: Menelion Elensúle: https://github.com/Oire\n//! author : Mikolaj Dadela : https://github.com/mik01aj\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n m: ['eine Minute', 'einer Minute'],\n h: ['eine Stunde', 'einer Stunde'],\n d: ['ein Tag', 'einem Tag'],\n dd: [number + ' Tage', number + ' Tagen'],\n w: ['eine Woche', 'einer Woche'],\n M: ['ein Monat', 'einem Monat'],\n MM: [number + ' Monate', number + ' Monaten'],\n y: ['ein Jahr', 'einem Jahr'],\n yy: [number + ' Jahre', number + ' Jahren'],\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n }\n\n var de = moment.defineLocale('de', {\n months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(\n '_'\n ),\n monthsShort:\n 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),\n monthsParseExact: true,\n weekdays:\n 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(\n '_'\n ),\n weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),\n weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY HH:mm',\n LLLL: 'dddd, D. MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[heute um] LT [Uhr]',\n sameElse: 'L',\n nextDay: '[morgen um] LT [Uhr]',\n nextWeek: 'dddd [um] LT [Uhr]',\n lastDay: '[gestern um] LT [Uhr]',\n lastWeek: '[letzten] dddd [um] LT [Uhr]',\n },\n relativeTime: {\n future: 'in %s',\n past: 'vor %s',\n s: 'ein paar Sekunden',\n ss: '%d Sekunden',\n m: processRelativeTime,\n mm: '%d Minuten',\n h: processRelativeTime,\n hh: '%d Stunden',\n d: processRelativeTime,\n dd: processRelativeTime,\n w: processRelativeTime,\n ww: '%d Wochen',\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return de;\n\n})));\n","import { __asyncValues, __awaiter } from \"tslib\";\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isPromise } from '../util/isPromise';\nimport { Observable } from '../Observable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isAsyncIterable } from '../util/isAsyncIterable';\nimport { createInvalidObservableTypeError } from '../util/throwUnobservableError';\nimport { isIterable } from '../util/isIterable';\nimport { isReadableStreamLike, readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike';\nimport { isFunction } from '../util/isFunction';\nimport { reportUnhandledError } from '../util/reportUnhandledError';\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport function innerFrom(input) {\n if (input instanceof Observable) {\n return input;\n }\n if (input != null) {\n if (isInteropObservable(input)) {\n return fromInteropObservable(input);\n }\n if (isArrayLike(input)) {\n return fromArrayLike(input);\n }\n if (isPromise(input)) {\n return fromPromise(input);\n }\n if (isAsyncIterable(input)) {\n return fromAsyncIterable(input);\n }\n if (isIterable(input)) {\n return fromIterable(input);\n }\n if (isReadableStreamLike(input)) {\n return fromReadableStreamLike(input);\n }\n }\n throw createInvalidObservableTypeError(input);\n}\nexport function fromInteropObservable(obj) {\n return new Observable((subscriber) => {\n const obs = obj[Symbol_observable]();\n if (isFunction(obs.subscribe)) {\n return obs.subscribe(subscriber);\n }\n throw new TypeError('Provided object does not correctly implement Symbol.observable');\n });\n}\nexport function fromArrayLike(array) {\n return new Observable((subscriber) => {\n for (let i = 0; i < array.length && !subscriber.closed; i++) {\n subscriber.next(array[i]);\n }\n subscriber.complete();\n });\n}\nexport function fromPromise(promise) {\n return new Observable((subscriber) => {\n promise\n .then((value) => {\n if (!subscriber.closed) {\n subscriber.next(value);\n subscriber.complete();\n }\n }, (err) => subscriber.error(err))\n .then(null, reportUnhandledError);\n });\n}\nexport function fromIterable(iterable) {\n return new Observable((subscriber) => {\n for (const value of iterable) {\n subscriber.next(value);\n if (subscriber.closed) {\n return;\n }\n }\n subscriber.complete();\n });\n}\nexport function fromAsyncIterable(asyncIterable) {\n return new Observable((subscriber) => {\n process(asyncIterable, subscriber).catch((err) => subscriber.error(err));\n });\n}\nexport function fromReadableStreamLike(readableStream) {\n return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream));\n}\nfunction process(asyncIterable, subscriber) {\n var asyncIterable_1, asyncIterable_1_1;\n var e_1, _a;\n return __awaiter(this, void 0, void 0, function* () {\n try {\n for (asyncIterable_1 = __asyncValues(asyncIterable); asyncIterable_1_1 = yield asyncIterable_1.next(), !asyncIterable_1_1.done;) {\n const value = asyncIterable_1_1.value;\n subscriber.next(value);\n if (subscriber.closed) {\n return;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return)) yield _a.call(asyncIterable_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n subscriber.complete();\n });\n}\n","import { Directive, Input, TemplateRef, ViewContainerRef } from '@angular/core';\nimport {FeatureFlagService} from \"@brightside-web/desktop/data-access/core-services\";\n\n@Directive({\n selector: '[brightsideWebFeatureFlag]'\n})\nexport class NewFeatureFlagDirective {\n\n private hasView = false;\n private trueCount = 0;\n\n constructor(\n private templateRef: TemplateRef<any>,\n private viewContainer: ViewContainerRef,\n private featureFlagSvc: FeatureFlagService) {\n\n }\n\n @Input() set brightsideWebFeatureFlag(flag: string|string[]|undefined) {\n // if the flag is empty or falsy just display the content as default\n // someone accidentally sent a blank string for example\n if (!flag) {\n this.viewContainer.createEmbeddedView(this.templateRef);\n this.hasView = true;\n } else {\n const flagCheck: string[] = typeof flag === 'string' ? [flag] : flag;\n this.checkFlagsOfArray(flagCheck);\n }\n }\n\n private checkFlagsOfArray(flags: string[]) {\n this.featureFlagSvc.checkMultipleFlags(flags).subscribe(\n resp => {\n this.handleBoolResponse(resp);\n }\n );\n }\n\n private handleBoolResponse(show: boolean) {\n if (show) {\n this.viewContainer.createEmbeddedView(this.templateRef);\n this.hasView = true;\n } else {\n this.viewContainer.clear();\n this.hasView = false;\n }\n }\n}\n","//! moment.js locale configuration\n//! locale : Bengali (Bangladesh) [bn-bd]\n//! author : Asraf Hossain Patoary : https://github.com/ashwoolford\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '১',\n 2: '২',\n 3: '৩',\n 4: '৪',\n 5: '৫',\n 6: '৬',\n 7: '৭',\n 8: '৮',\n 9: '৯',\n 0: '০',\n },\n numberMap = {\n '১': '1',\n '২': '2',\n '৩': '3',\n '৪': '4',\n '৫': '5',\n '৬': '6',\n '৭': '7',\n '৮': '8',\n '৯': '9',\n '০': '0',\n };\n\n var bnBd = moment.defineLocale('bn-bd', {\n months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(\n '_'\n ),\n monthsShort:\n 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(\n '_'\n ),\n weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(\n '_'\n ),\n weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),\n weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),\n longDateFormat: {\n LT: 'A h:mm সময়',\n LTS: 'A h:mm:ss সময়',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm সময়',\n LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',\n },\n calendar: {\n sameDay: '[আজ] LT',\n nextDay: '[আগামীকাল] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[গতকাল] LT',\n lastWeek: '[গত] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s পরে',\n past: '%s আগে',\n s: 'কয়েক সেকেন্ড',\n ss: '%d সেকেন্ড',\n m: 'এক মিনিট',\n mm: '%d মিনিট',\n h: 'এক ঘন্টা',\n hh: '%d ঘন্টা',\n d: 'এক দিন',\n dd: '%d দিন',\n M: 'এক মাস',\n MM: '%d মাস',\n y: 'এক বছর',\n yy: '%d বছর',\n },\n preparse: function (string) {\n return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n\n meridiemParse: /রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'রাত') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'ভোর') {\n return hour;\n } else if (meridiem === 'সকাল') {\n return hour;\n } else if (meridiem === 'দুপুর') {\n return hour >= 3 ? hour : hour + 12;\n } else if (meridiem === 'বিকাল') {\n return hour + 12;\n } else if (meridiem === 'সন্ধ্যা') {\n return hour + 12;\n }\n },\n\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'রাত';\n } else if (hour < 6) {\n return 'ভোর';\n } else if (hour < 12) {\n return 'সকাল';\n } else if (hour < 15) {\n return 'দুপুর';\n } else if (hour < 18) {\n return 'বিকাল';\n } else if (hour < 20) {\n return 'সন্ধ্যা';\n } else {\n return 'রাত';\n }\n },\n week: {\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 });\n\n return bnBd;\n\n})));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stacktrace-gps', ['source-map', 'stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('source-map/lib/source-map-consumer'), require('stackframe'));\n } else {\n root.StackTraceGPS = factory(root.SourceMap || root.sourceMap, root.StackFrame);\n }\n}(this, function(SourceMap, StackFrame) {\n 'use strict';\n\n /**\n * Make a X-Domain request to url and callback.\n *\n * @param {String} url\n * @returns {Promise} with response text if fulfilled\n */\n function _xdr(url) {\n return new Promise(function(resolve, reject) {\n var req = new XMLHttpRequest();\n req.open('get', url);\n req.onerror = reject;\n req.onreadystatechange = function onreadystatechange() {\n if (req.readyState === 4) {\n if ((req.status >= 200 && req.status < 300) ||\n (url.substr(0, 7) === 'file://' && req.responseText)) {\n resolve(req.responseText);\n } else {\n reject(new Error('HTTP status: ' + req.status + ' retrieving ' + url));\n }\n }\n };\n req.send();\n });\n\n }\n\n /**\n * Convert a Base64-encoded string into its original representation.\n * Used for inline sourcemaps.\n *\n * @param {String} b64str Base-64 encoded string\n * @returns {String} original representation of the base64-encoded string.\n */\n function _atob(b64str) {\n if (typeof window !== 'undefined' && window.atob) {\n return window.atob(b64str);\n } else {\n throw new Error('You must supply a polyfill for window.atob in this environment');\n }\n }\n\n function _parseJson(string) {\n if (typeof JSON !== 'undefined' && JSON.parse) {\n return JSON.parse(string);\n } else {\n throw new Error('You must supply a polyfill for JSON.parse in this environment');\n }\n }\n\n function _findFunctionName(source, lineNumber/*, columnNumber*/) {\n var syntaxes = [\n // {name} = function ({args}) TODO args capture\n /['\"]?([$_A-Za-z][$_A-Za-z0-9]*)['\"]?\\s*[:=]\\s*function\\b/,\n // function {name}({args}) m[1]=name m[2]=args\n /function\\s+([^('\"`]*?)\\s*\\(([^)]*)\\)/,\n // {name} = eval()\n /['\"]?([$_A-Za-z][$_A-Za-z0-9]*)['\"]?\\s*[:=]\\s*(?:eval|new Function)\\b/,\n // fn_name() {\n /\\b(?!(?:if|for|switch|while|with|catch)\\b)(?:(?:static)\\s+)?(\\S+)\\s*\\(.*?\\)\\s*\\{/,\n // {name} = () => {\n /['\"]?([$_A-Za-z][$_A-Za-z0-9]*)['\"]?\\s*[:=]\\s*\\(.*?\\)\\s*=>/\n ];\n var lines = source.split('\\n');\n\n // Walk backwards in the source lines until we find the line which matches one of the patterns above\n var code = '';\n var maxLines = Math.min(lineNumber, 20);\n for (var i = 0; i < maxLines; ++i) {\n // lineNo is 1-based, source[] is 0-based\n var line = lines[lineNumber - i - 1];\n var commentPos = line.indexOf('//');\n if (commentPos >= 0) {\n line = line.substr(0, commentPos);\n }\n\n if (line) {\n code = line + code;\n var len = syntaxes.length;\n for (var index = 0; index < len; index++) {\n var m = syntaxes[index].exec(code);\n if (m && m[1]) {\n return m[1];\n }\n }\n }\n }\n return undefined;\n }\n\n function _ensureSupportedEnvironment() {\n if (typeof Object.defineProperty !== 'function' || typeof Object.create !== 'function') {\n throw new Error('Unable to consume source maps in older browsers');\n }\n }\n\n function _ensureStackFrameIsLegit(stackframe) {\n if (typeof stackframe !== 'object') {\n throw new TypeError('Given StackFrame is not an object');\n } else if (typeof stackframe.fileName !== 'string') {\n throw new TypeError('Given file name is not a String');\n } else if (typeof stackframe.lineNumber !== 'number' ||\n stackframe.lineNumber % 1 !== 0 ||\n stackframe.lineNumber < 1) {\n throw new TypeError('Given line number must be a positive integer');\n } else if (typeof stackframe.columnNumber !== 'number' ||\n stackframe.columnNumber % 1 !== 0 ||\n stackframe.columnNumber < 0) {\n throw new TypeError('Given column number must be a non-negative integer');\n }\n return true;\n }\n\n function _findSourceMappingURL(source) {\n var sourceMappingUrlRegExp = /\\/\\/[#@] ?sourceMappingURL=([^\\s'\"]+)\\s*$/mg;\n var lastSourceMappingUrl;\n var matchSourceMappingUrl;\n // eslint-disable-next-line no-cond-assign\n while (matchSourceMappingUrl = sourceMappingUrlRegExp.exec(source)) {\n lastSourceMappingUrl = matchSourceMappingUrl[1];\n }\n if (lastSourceMappingUrl) {\n return lastSourceMappingUrl;\n } else {\n throw new Error('sourceMappingURL not found');\n }\n }\n\n function _extractLocationInfoFromSourceMapSource(stackframe, sourceMapConsumer, sourceCache) {\n return new Promise(function(resolve, reject) {\n var loc = sourceMapConsumer.originalPositionFor({\n line: stackframe.lineNumber,\n column: stackframe.columnNumber\n });\n\n if (loc.source) {\n // cache mapped sources\n var mappedSource = sourceMapConsumer.sourceContentFor(loc.source);\n if (mappedSource) {\n sourceCache[loc.source] = mappedSource;\n }\n\n resolve(\n // given stackframe and source location, update stackframe\n new StackFrame({\n functionName: loc.name || stackframe.functionName,\n args: stackframe.args,\n fileName: loc.source,\n lineNumber: loc.line,\n columnNumber: loc.column\n }));\n } else {\n reject(new Error('Could not get original source for given stackframe and source map'));\n }\n });\n }\n\n /**\n * @constructor\n * @param {Object} opts\n * opts.sourceCache = {url: \"Source String\"} => preload source cache\n * opts.sourceMapConsumerCache = {/path/file.js.map: SourceMapConsumer}\n * opts.offline = True to prevent network requests.\n * Best effort without sources or source maps.\n * opts.ajax = Promise returning function to make X-Domain requests\n */\n return function StackTraceGPS(opts) {\n if (!(this instanceof StackTraceGPS)) {\n return new StackTraceGPS(opts);\n }\n opts = opts || {};\n\n this.sourceCache = opts.sourceCache || {};\n this.sourceMapConsumerCache = opts.sourceMapConsumerCache || {};\n\n this.ajax = opts.ajax || _xdr;\n\n this._atob = opts.atob || _atob;\n\n this._get = function _get(location) {\n return new Promise(function(resolve, reject) {\n var isDataUrl = location.substr(0, 5) === 'data:';\n if (this.sourceCache[location]) {\n resolve(this.sourceCache[location]);\n } else if (opts.offline && !isDataUrl) {\n reject(new Error('Cannot make network requests in offline mode'));\n } else {\n if (isDataUrl) {\n // data URLs can have parameters.\n // see http://tools.ietf.org/html/rfc2397\n var supportedEncodingRegexp =\n /^data:application\\/json;([\\w=:\"-]+;)*base64,/;\n var match = location.match(supportedEncodingRegexp);\n if (match) {\n var sourceMapStart = match[0].length;\n var encodedSource = location.substr(sourceMapStart);\n var source = this._atob(encodedSource);\n this.sourceCache[location] = source;\n resolve(source);\n } else {\n reject(new Error('The encoding of the inline sourcemap is not supported'));\n }\n } else {\n var xhrPromise = this.ajax(location, {method: 'get'});\n // Cache the Promise to prevent duplicate in-flight requests\n this.sourceCache[location] = xhrPromise;\n xhrPromise.then(resolve, reject);\n }\n }\n }.bind(this));\n };\n\n /**\n * Creating SourceMapConsumers is expensive, so this wraps the creation of a\n * SourceMapConsumer in a per-instance cache.\n *\n * @param {String} sourceMappingURL = URL to fetch source map from\n * @param {String} defaultSourceRoot = Default source root for source map if undefined\n * @returns {Promise} that resolves a SourceMapConsumer\n */\n this._getSourceMapConsumer = function _getSourceMapConsumer(sourceMappingURL, defaultSourceRoot) {\n return new Promise(function(resolve) {\n if (this.sourceMapConsumerCache[sourceMappingURL]) {\n resolve(this.sourceMapConsumerCache[sourceMappingURL]);\n } else {\n var sourceMapConsumerPromise = new Promise(function(resolve, reject) {\n return this._get(sourceMappingURL).then(function(sourceMapSource) {\n if (typeof sourceMapSource === 'string') {\n sourceMapSource = _parseJson(sourceMapSource.replace(/^\\)\\]\\}'/, ''));\n }\n if (typeof sourceMapSource.sourceRoot === 'undefined') {\n sourceMapSource.sourceRoot = defaultSourceRoot;\n }\n\n resolve(new SourceMap.SourceMapConsumer(sourceMapSource));\n }).catch(reject);\n }.bind(this));\n this.sourceMapConsumerCache[sourceMappingURL] = sourceMapConsumerPromise;\n resolve(sourceMapConsumerPromise);\n }\n }.bind(this));\n };\n\n /**\n * Given a StackFrame, enhance function name and use source maps for a\n * better StackFrame.\n *\n * @param {StackFrame} stackframe object\n * @returns {Promise} that resolves with with source-mapped StackFrame\n */\n this.pinpoint = function StackTraceGPS$$pinpoint(stackframe) {\n return new Promise(function(resolve, reject) {\n this.getMappedLocation(stackframe).then(function(mappedStackFrame) {\n function resolveMappedStackFrame() {\n resolve(mappedStackFrame);\n }\n\n this.findFunctionName(mappedStackFrame)\n .then(resolve, resolveMappedStackFrame)\n // eslint-disable-next-line no-unexpected-multiline\n ['catch'](resolveMappedStackFrame);\n }.bind(this), reject);\n }.bind(this));\n };\n\n /**\n * Given a StackFrame, guess function name from location information.\n *\n * @param {StackFrame} stackframe\n * @returns {Promise} that resolves with enhanced StackFrame.\n */\n this.findFunctionName = function StackTraceGPS$$findFunctionName(stackframe) {\n return new Promise(function(resolve, reject) {\n _ensureStackFrameIsLegit(stackframe);\n this._get(stackframe.fileName).then(function getSourceCallback(source) {\n var lineNumber = stackframe.lineNumber;\n var columnNumber = stackframe.columnNumber;\n var guessedFunctionName = _findFunctionName(source, lineNumber, columnNumber);\n // Only replace functionName if we found something\n if (guessedFunctionName) {\n resolve(new StackFrame({\n functionName: guessedFunctionName,\n args: stackframe.args,\n fileName: stackframe.fileName,\n lineNumber: lineNumber,\n columnNumber: columnNumber\n }));\n } else {\n resolve(stackframe);\n }\n }, reject)['catch'](reject);\n }.bind(this));\n };\n\n /**\n * Given a StackFrame, seek source-mapped location and return new enhanced StackFrame.\n *\n * @param {StackFrame} stackframe\n * @returns {Promise} that resolves with enhanced StackFrame.\n */\n this.getMappedLocation = function StackTraceGPS$$getMappedLocation(stackframe) {\n return new Promise(function(resolve, reject) {\n _ensureSupportedEnvironment();\n _ensureStackFrameIsLegit(stackframe);\n\n var sourceCache = this.sourceCache;\n var fileName = stackframe.fileName;\n this._get(fileName).then(function(source) {\n var sourceMappingURL = _findSourceMappingURL(source);\n var isDataUrl = sourceMappingURL.substr(0, 5) === 'data:';\n var defaultSourceRoot = fileName.substring(0, fileName.lastIndexOf('/') + 1);\n\n if (sourceMappingURL[0] !== '/' && !isDataUrl && !(/^https?:\\/\\/|^\\/\\//i).test(sourceMappingURL)) {\n sourceMappingURL = defaultSourceRoot + sourceMappingURL;\n }\n\n return this._getSourceMapConsumer(sourceMappingURL, defaultSourceRoot)\n .then(function(sourceMapConsumer) {\n return _extractLocationInfoFromSourceMapSource(stackframe, sourceMapConsumer, sourceCache)\n .then(resolve)['catch'](function() {\n resolve(stackframe);\n });\n });\n }.bind(this), reject)['catch'](reject);\n }.bind(this));\n };\n };\n}));\n","//! moment.js locale configuration\n//! locale : Swedish [sv]\n//! author : Jens Alm : https://github.com/ulmus\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var sv = moment.defineLocale('sv', {\n months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split(\n '_'\n ),\n monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),\n weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'),\n weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [kl.] HH:mm',\n LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',\n lll: 'D MMM YYYY HH:mm',\n llll: 'ddd D MMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Idag] LT',\n nextDay: '[Imorgon] LT',\n lastDay: '[Igår] LT',\n nextWeek: '[På] dddd LT',\n lastWeek: '[I] dddd[s] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'om %s',\n past: 'för %s sedan',\n s: 'några sekunder',\n ss: '%d sekunder',\n m: 'en minut',\n mm: '%d minuter',\n h: 'en timme',\n hh: '%d timmar',\n d: 'en dag',\n dd: '%d dagar',\n M: 'en månad',\n MM: '%d månader',\n y: 'ett år',\n yy: '%d år',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(\\:e|\\:a)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? ':e'\n : b === 1\n ? ':a'\n : b === 2\n ? ':a'\n : b === 3\n ? ':e'\n : ':e';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return sv;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (Canada) [en-ca]\n//! author : Jonathan Abourbih : https://github.com/jonbca\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enCa = moment.defineLocale('en-ca', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'YYYY-MM-DD',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n },\n calendar: {\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 relativeTime: {\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 M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((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 return enCa;\n\n})));\n","//! moment.js locale configuration\n//! locale : Dutch (Belgium) [nl-be]\n//! author : Joris Röling : https://github.com/jorisroling\n//! author : Jacob Middag : https://github.com/middagj\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsShortWithDots =\n 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),\n monthsShortWithoutDots =\n 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n monthsParse = [\n /^jan/i,\n /^feb/i,\n /^(maart|mrt\\.?)$/i,\n /^apr/i,\n /^mei$/i,\n /^jun[i.]?$/i,\n /^jul[i.]?$/i,\n /^aug/i,\n /^sep/i,\n /^okt/i,\n /^nov/i,\n /^dec/i,\n ],\n monthsRegex =\n /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\\.?|feb\\.?|mrt\\.?|apr\\.?|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i;\n\n var nlBe = moment.defineLocale('nl-be', {\n months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(\n '_'\n ),\n monthsShort: function (m, format) {\n if (!m) {\n return monthsShortWithDots;\n } else if (/-MMM-/.test(format)) {\n return monthsShortWithoutDots[m.month()];\n } else {\n return monthsShortWithDots[m.month()];\n }\n },\n\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex:\n /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,\n monthsShortStrictRegex:\n /^(jan\\.?|feb\\.?|mrt\\.?|apr\\.?|mei|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i,\n\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n\n weekdays:\n 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),\n weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),\n weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[vandaag om] LT',\n nextDay: '[morgen om] LT',\n nextWeek: 'dddd [om] LT',\n lastDay: '[gisteren om] LT',\n lastWeek: '[afgelopen] dddd [om] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'over %s',\n past: '%s geleden',\n s: 'een paar seconden',\n ss: '%d seconden',\n m: 'één minuut',\n mm: '%d minuten',\n h: 'één uur',\n hh: '%d uur',\n d: 'één dag',\n dd: '%d dagen',\n M: 'één maand',\n MM: '%d maanden',\n y: 'één jaar',\n yy: '%d jaar',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal: function (number) {\n return (\n number +\n (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n );\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return nlBe;\n\n})));\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n// It turns out that some (most?) JavaScript engines don't self-host\n// `Array.prototype.sort`. This makes sense because C++ will likely remain\n// faster than JS when doing raw CPU-intensive sorting. However, when using a\n// custom comparator function, calling back and forth between the VM's C++ and\n// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n// worse generated code for the comparator function than would be optimal. In\n// fact, when sorting with a comparator, these costs outweigh the benefits of\n// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n// a ~3500ms mean speed-up in `bench/bench.html`.\n\n/**\n * Swap the elements indexed by `x` and `y` in the array `ary`.\n *\n * @param {Array} ary\n * The array.\n * @param {Number} x\n * The index of the first item.\n * @param {Number} y\n * The index of the second item.\n */\nfunction swap(ary, x, y) {\n var temp = ary[x];\n ary[x] = ary[y];\n ary[y] = temp;\n}\n\n/**\n * Returns a random integer within the range `low .. high` inclusive.\n *\n * @param {Number} low\n * The lower bound on the range.\n * @param {Number} high\n * The upper bound on the range.\n */\nfunction randomIntInRange(low, high) {\n return Math.round(low + (Math.random() * (high - low)));\n}\n\n/**\n * The Quick Sort algorithm.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n * @param {Number} p\n * Start index of the array\n * @param {Number} r\n * End index of the array\n */\nfunction doQuickSort(ary, comparator, p, r) {\n // If our lower bound is less than our upper bound, we (1) partition the\n // array into two pieces and (2) recurse on each half. If it is not, this is\n // the empty array and our base case.\n\n if (p < r) {\n // (1) Partitioning.\n //\n // The partitioning chooses a pivot between `p` and `r` and moves all\n // elements that are less than or equal to the pivot to the before it, and\n // all the elements that are greater than it after it. The effect is that\n // once partition is done, the pivot is in the exact place it will be when\n // the array is put in sorted order, and it will not need to be moved\n // again. This runs in O(n) time.\n\n // Always choose a random pivot so that an input array which is reverse\n // sorted does not cause O(n^2) running time.\n var pivotIndex = randomIntInRange(p, r);\n var i = p - 1;\n\n swap(ary, pivotIndex, r);\n var pivot = ary[r];\n\n // Immediately after `j` is incremented in this loop, the following hold\n // true:\n //\n // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n //\n // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n for (var j = p; j < r; j++) {\n if (comparator(ary[j], pivot) <= 0) {\n i += 1;\n swap(ary, i, j);\n }\n }\n\n swap(ary, i + 1, j);\n var q = i + 1;\n\n // (2) Recurse on each half.\n\n doQuickSort(ary, comparator, p, q - 1);\n doQuickSort(ary, comparator, q + 1, r);\n }\n}\n\n/**\n * Sort the given array in-place with the given comparator function.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n */\nexports.quickSort = function (ary, comparator) {\n doQuickSort(ary, comparator, 0, ary.length - 1);\n};\n","//! moment.js locale configuration\n//! locale : Bengali [bn]\n//! author : Kaushik Gandhi : https://github.com/kaushikgandhi\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '১',\n 2: '২',\n 3: '৩',\n 4: '৪',\n 5: '৫',\n 6: '৬',\n 7: '৭',\n 8: '৮',\n 9: '৯',\n 0: '০',\n },\n numberMap = {\n '১': '1',\n '২': '2',\n '৩': '3',\n '৪': '4',\n '৫': '5',\n '৬': '6',\n '৭': '7',\n '৮': '8',\n '৯': '9',\n '০': '0',\n };\n\n var bn = moment.defineLocale('bn', {\n months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(\n '_'\n ),\n monthsShort:\n 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(\n '_'\n ),\n weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(\n '_'\n ),\n weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),\n weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),\n longDateFormat: {\n LT: 'A h:mm সময়',\n LTS: 'A h:mm:ss সময়',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm সময়',\n LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',\n },\n calendar: {\n sameDay: '[আজ] LT',\n nextDay: '[আগামীকাল] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[গতকাল] LT',\n lastWeek: '[গত] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s পরে',\n past: '%s আগে',\n s: 'কয়েক সেকেন্ড',\n ss: '%d সেকেন্ড',\n m: 'এক মিনিট',\n mm: '%d মিনিট',\n h: 'এক ঘন্টা',\n hh: '%d ঘন্টা',\n d: 'এক দিন',\n dd: '%d দিন',\n M: 'এক মাস',\n MM: '%d মাস',\n y: 'এক বছর',\n yy: '%d বছর',\n },\n preparse: function (string) {\n return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (\n (meridiem === 'রাত' && hour >= 4) ||\n (meridiem === 'দুপুর' && hour < 5) ||\n meridiem === 'বিকাল'\n ) {\n return hour + 12;\n } else {\n return hour;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'রাত';\n } else if (hour < 10) {\n return 'সকাল';\n } else if (hour < 17) {\n return 'দুপুর';\n } else if (hour < 20) {\n return 'বিকাল';\n } else {\n return 'রাত';\n }\n },\n week: {\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 });\n\n return bn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Chinese (Macau) [zh-mo]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n//! author : Tan Yuanhong : https://github.com/le0tan\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var zhMo = moment.defineLocale('zh-mo', {\n months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n '_'\n ),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n '_'\n ),\n weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日 HH:mm',\n LLLL: 'YYYY年M月D日dddd HH:mm',\n l: 'D/M/YYYY',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日dddd HH:mm',\n },\n meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n return hour;\n } else if (meridiem === '中午') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === '下午' || meridiem === '晚上') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n var hm = hour * 100 + minute;\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1130) {\n return '上午';\n } else if (hm < 1230) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n } else {\n return '晚上';\n }\n },\n calendar: {\n sameDay: '[今天] LT',\n nextDay: '[明天] LT',\n nextWeek: '[下]dddd LT',\n lastDay: '[昨天] LT',\n lastWeek: '[上]dddd LT',\n sameElse: 'L',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n case 'M':\n return number + '月';\n case 'w':\n case 'W':\n return number + '週';\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s內',\n past: '%s前',\n s: '幾秒',\n ss: '%d 秒',\n m: '1 分鐘',\n mm: '%d 分鐘',\n h: '1 小時',\n hh: '%d 小時',\n d: '1 天',\n dd: '%d 天',\n M: '1 個月',\n MM: '%d 個月',\n y: '1 年',\n yy: '%d 年',\n },\n });\n\n return zhMo;\n\n})));\n","export function noop() { }\n","import { DEFAULT_ENVIRONMENT } from './constants.js';\nimport { getCurrentScope, getIsolationScope, getClient, withIsolationScope } from './currentScopes.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { makeSession, updateSession, closeSession } from './session.js';\nimport { isThenable } from './utils-hoist/is.js';\nimport { logger } from './utils-hoist/logger.js';\nimport { uuid4 } from './utils-hoist/misc.js';\nimport { timestampInSeconds } from './utils-hoist/time.js';\nimport { GLOBAL_OBJ } from './utils-hoist/worldwide.js';\nimport { parseEventHintOrCaptureContext } from './utils/prepareEvent.js';\n\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception The exception to capture.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured Sentry event.\n */\nfunction captureException(exception, hint) {\n return getCurrentScope().captureException(exception, parseEventHintOrCaptureContext(hint));\n}\n\n/**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param captureContext Define the level of the message or pass in additional data to attach to the message.\n * @returns the id of the captured message.\n */\nfunction captureMessage(message, captureContext) {\n // This is necessary to provide explicit scopes upgrade, without changing the original\n // arity of the `captureMessage(message, level)` method.\n const level = typeof captureContext === 'string' ? captureContext : undefined;\n const context = typeof captureContext !== 'string' ? { captureContext } : undefined;\n return getCurrentScope().captureMessage(message, level, context);\n}\n\n/**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured event.\n */\nfunction captureEvent(event, hint) {\n return getCurrentScope().captureEvent(event, hint);\n}\n\n/**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normalized.\n */\nfunction setContext(name, context) {\n getIsolationScope().setContext(name, context);\n}\n\n/**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\nfunction setExtras(extras) {\n getIsolationScope().setExtras(extras);\n}\n\n/**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normalized.\n */\nfunction setExtra(key, extra) {\n getIsolationScope().setExtra(key, extra);\n}\n\n/**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\nfunction setTags(tags) {\n getIsolationScope().setTags(tags);\n}\n\n/**\n * Set key:value that will be sent as tags data with the event.\n *\n * Can also be used to unset a tag, by passing `undefined`.\n *\n * @param key String key of tag\n * @param value Value of tag\n */\nfunction setTag(key, value) {\n getIsolationScope().setTag(key, value);\n}\n\n/**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\nfunction setUser(user) {\n getIsolationScope().setUser(user);\n}\n\n/**\n * The last error event id of the isolation scope.\n *\n * Warning: This function really returns the last recorded error event id on the current\n * isolation scope. If you call this function after handling a certain error and another error\n * is captured in between, the last one is returned instead of the one you might expect.\n * Also, ids of events that were never sent to Sentry (for example because\n * they were dropped in `beforeSend`) could be returned.\n *\n * @returns The last event id of the isolation scope.\n */\nfunction lastEventId() {\n return getIsolationScope().lastEventId();\n}\n\n/**\n * Create a cron monitor check in and send it to Sentry.\n *\n * @param checkIn An object that describes a check in.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\nfunction captureCheckIn(checkIn, upsertMonitorConfig) {\n const scope = getCurrentScope();\n const client = getClient();\n if (!client) {\n DEBUG_BUILD && logger.warn('Cannot capture check-in. No client defined.');\n } else if (!client.captureCheckIn) {\n DEBUG_BUILD && logger.warn('Cannot capture check-in. Client does not support sending check-ins.');\n } else {\n return client.captureCheckIn(checkIn, upsertMonitorConfig, scope);\n }\n\n return uuid4();\n}\n\n/**\n * Wraps a callback with a cron monitor check in. The check in will be sent to Sentry when the callback finishes.\n *\n * @param monitorSlug The distinct slug of the monitor.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\nfunction withMonitor(\n monitorSlug,\n callback,\n upsertMonitorConfig,\n) {\n const checkInId = captureCheckIn({ monitorSlug, status: 'in_progress' }, upsertMonitorConfig);\n const now = timestampInSeconds();\n\n function finishCheckIn(status) {\n captureCheckIn({ monitorSlug, status, checkInId, duration: timestampInSeconds() - now });\n }\n\n return withIsolationScope(() => {\n let maybePromiseResult;\n try {\n maybePromiseResult = callback();\n } catch (e) {\n finishCheckIn('error');\n throw e;\n }\n\n if (isThenable(maybePromiseResult)) {\n Promise.resolve(maybePromiseResult).then(\n () => {\n finishCheckIn('ok');\n },\n e => {\n finishCheckIn('error');\n throw e;\n },\n );\n } else {\n finishCheckIn('ok');\n }\n\n return maybePromiseResult;\n });\n}\n\n/**\n * Call `flush()` on the current client, if there is one. See {@link Client.flush}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause\n * the client to wait until all events are sent before resolving the promise.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nasync function flush(timeout) {\n const client = getClient();\n if (client) {\n return client.flush(timeout);\n }\n DEBUG_BUILD && logger.warn('Cannot flush events. No client defined.');\n return Promise.resolve(false);\n}\n\n/**\n * Call `close()` on the current client, if there is one. See {@link Client.close}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this\n * parameter will cause the client to wait until all events are sent before disabling itself.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nasync function close(timeout) {\n const client = getClient();\n if (client) {\n return client.close(timeout);\n }\n DEBUG_BUILD && logger.warn('Cannot flush events and disable SDK. No client defined.');\n return Promise.resolve(false);\n}\n\n/**\n * Returns true if Sentry has been properly initialized.\n */\nfunction isInitialized() {\n return !!getClient();\n}\n\n/** If the SDK is initialized & enabled. */\nfunction isEnabled() {\n const client = getClient();\n return !!client && client.getOptions().enabled !== false && !!client.getTransport();\n}\n\n/**\n * Add an event processor.\n * This will be added to the current isolation scope, ensuring any event that is processed in the current execution\n * context will have the processor applied.\n */\nfunction addEventProcessor(callback) {\n getIsolationScope().addEventProcessor(callback);\n}\n\n/**\n * Start a session on the current isolation scope.\n *\n * @param context (optional) additional properties to be applied to the returned session object\n *\n * @returns the new active session\n */\nfunction startSession(context) {\n const client = getClient();\n const isolationScope = getIsolationScope();\n const currentScope = getCurrentScope();\n\n const { release, environment = DEFAULT_ENVIRONMENT } = (client && client.getOptions()) || {};\n\n // Will fetch userAgent if called from browser sdk\n const { userAgent } = GLOBAL_OBJ.navigator || {};\n\n const session = makeSession({\n release,\n environment,\n user: currentScope.getUser() || isolationScope.getUser(),\n ...(userAgent && { userAgent }),\n ...context,\n });\n\n // End existing session if there's one\n const currentSession = isolationScope.getSession();\n if (currentSession && currentSession.status === 'ok') {\n updateSession(currentSession, { status: 'exited' });\n }\n\n endSession();\n\n // Afterwards we set the new session on the scope\n isolationScope.setSession(session);\n\n // TODO (v8): Remove this and only use the isolation scope(?).\n // For v7 though, we can't \"soft-break\" people using getCurrentHub().getScope().setSession()\n currentScope.setSession(session);\n\n return session;\n}\n\n/**\n * End the session on the current isolation scope.\n */\nfunction endSession() {\n const isolationScope = getIsolationScope();\n const currentScope = getCurrentScope();\n\n const session = currentScope.getSession() || isolationScope.getSession();\n if (session) {\n closeSession(session);\n }\n _sendSessionUpdate();\n\n // the session is over; take it off of the scope\n isolationScope.setSession();\n\n // TODO (v8): Remove this and only use the isolation scope(?).\n // For v7 though, we can't \"soft-break\" people using getCurrentHub().getScope().setSession()\n currentScope.setSession();\n}\n\n/**\n * Sends the current Session on the scope\n */\nfunction _sendSessionUpdate() {\n const isolationScope = getIsolationScope();\n const currentScope = getCurrentScope();\n const client = getClient();\n // TODO (v8): Remove currentScope and only use the isolation scope(?).\n // For v7 though, we can't \"soft-break\" people using getCurrentHub().getScope().setSession()\n const session = currentScope.getSession() || isolationScope.getSession();\n if (session && client) {\n client.captureSession(session);\n }\n}\n\n/**\n * Sends the current session on the scope to Sentry\n *\n * @param end If set the session will be marked as exited and removed from the scope.\n * Defaults to `false`.\n */\nfunction captureSession(end = false) {\n // both send the update and pull the session from the scope\n if (end) {\n endSession();\n return;\n }\n\n // only send the update\n _sendSessionUpdate();\n}\n\nexport { addEventProcessor, captureCheckIn, captureEvent, captureException, captureMessage, captureSession, close, endSession, flush, isEnabled, isInitialized, lastEventId, setContext, setExtra, setExtras, setTag, setTags, setUser, startSession, withMonitor };\n","'use strict';\n\nif (typeof require === 'function') {\n var moment = require('moment');\n}\n\nmoment.fn.isHoliday = function () {\n var locale = this.localeData();\n\n if (locale._holidays) {\n if (locale._holidays.indexOf(this.format(locale._holidayFormat)) >= 0)\n return true;\n }\n\n if (locale.holiday) {\n if (locale.holiday(this)) {\n return true;\n }\n return false;\n }\n\n return false;\n};\n\nmoment.fn.isBusinessDay = function () {\n var locale = this.localeData();\n var defaultWorkingWeekdays = [1, 2, 3, 4, 5];\n var workingWeekdays = locale._workingWeekdays || defaultWorkingWeekdays;\n\n if (this.isHoliday()) return false;\n if (workingWeekdays.indexOf(this.day()) >= 0) return true;\n\n return false;\n};\n\nmoment.fn.businessDaysIntoMonth = function () {\n if (!this.isValid()) {\n return NaN;\n }\n var businessDay = this.isBusinessDay() ? this : this.prevBusinessDay();\n var monthBusinessDays = businessDay.monthBusinessDays();\n var businessDaysIntoMonth;\n monthBusinessDays.map(function (day, index) {\n if (day.format('M/DD/YY') === businessDay.format('M/DD/YY')) {\n businessDaysIntoMonth = index + 1;\n }\n });\n return businessDaysIntoMonth;\n};\n\nmoment.fn.businessDiff = function (param, relative) {\n var d1 = this.clone();\n var d2 = param.clone();\n var positive = d1 >= d2;\n var start = d1 < d2 ? d1 : d2;\n var end = d2 > d1 ? d2 : d1;\n\n var daysBetween = 0;\n\n if (start.format('DD/MM/YYYY') === end.format('DD/MM/YYYY')) {\n return daysBetween;\n }\n\n while (start < end) {\n if (start.isBusinessDay()) {\n daysBetween++;\n }\n start.add(1, 'd');\n }\n\n if (relative) {\n return positive ? daysBetween : -daysBetween;\n }\n\n return daysBetween;\n};\n\nmoment.fn.businessAdd = function (number, period) {\n var day = this.clone();\n if (!day.isValid()) {\n return day;\n }\n\n if (number < 0) {\n number = Math.round(-1 * number) * -1;\n } else {\n number = Math.round(number);\n }\n\n var signal = number < 0 ? -1 : 1;\n period = typeof period !== 'undefined' ? period : 'days';\n\n var remaining = Math.abs(number);\n while (remaining > 0) {\n day.add(signal, period);\n\n if (day.isBusinessDay()) {\n remaining--;\n }\n }\n\n return day;\n};\n\nmoment.fn.businessSubtract = function (number, period) {\n return this.businessAdd(-number, period);\n};\n\nmoment.fn.nextBusinessDay = function () {\n var locale = this.localeData();\n\n var loop = 1;\n var defaultNextBusinessDayLimit = 7;\n var limit = locale._nextBusinessDayLimit || defaultNextBusinessDayLimit;\n while (loop < limit) {\n if (this.add(1, 'd').isBusinessDay()) {\n break;\n }\n loop++;\n }\n return this;\n};\n\nmoment.fn.prevBusinessDay = function () {\n var locale = this.localeData();\n\n var loop = 1;\n var defaultPrevBusinessDayLimit = 7;\n var limit = locale._prevBusinessDayLimit || defaultPrevBusinessDayLimit;\n while (loop < limit) {\n if (this.subtract(1, 'd').isBusinessDay()) {\n break;\n }\n loop++;\n }\n return this;\n};\n\nmoment.fn.monthBusinessDays = function (partialEndDate) {\n if (!this.isValid()) {\n return [];\n }\n var me = this.clone();\n var day = me.clone().startOf('month');\n var end = partialEndDate ? partialEndDate : me.clone().endOf('month');\n var daysArr = [];\n var done = false;\n while (!done) {\n if (day.isBusinessDay()) {\n daysArr.push(day.clone());\n }\n if (end.diff(day.add(1, 'd')) < 0) {\n done = true;\n }\n }\n return daysArr;\n};\n\nmoment.fn.monthNaturalDays = function (fromToday) {\n if (!this.isValid()) {\n return [];\n }\n var me = this.clone();\n var day = fromToday ? me.clone() : me.clone().startOf('month');\n var end = me.clone().endOf('month');\n var daysArr = [];\n var done = false;\n while (!done) {\n daysArr.push(day.clone());\n if (end.diff(day.add(1, 'd')) < 0) {\n done = true;\n }\n }\n return daysArr;\n};\n\nmoment.fn.monthBusinessWeeks = function (fromToday) {\n fromToday = fromToday || false;\n var me = this.clone();\n var startDate = fromToday ? me.clone() : me.clone().startOf('month');\n return getBusinessWeeks(this, fromToday, null, startDate);\n};\n\nmoment.fn.businessWeeksBetween = function (endDate) {\n var me = this.clone();\n var startDate = me.clone();\n return getBusinessWeeks(this, false, endDate, startDate);\n};\n\nvar getBusinessWeeks = function (self, fromToday, endDate, startDate) {\n if (!self.isValid()) {\n return [];\n }\n var me = self.clone();\n var day = startDate;\n var end = endDate ? moment(endDate).clone() : me.clone().endOf('month');\n var weeksArr = [];\n var daysArr = [];\n var done = false;\n\n while (!done) {\n if (day.day() >= 1 && day.day() < 6) {\n daysArr.push(day.clone());\n }\n if (day.day() === 5) {\n weeksArr.push(daysArr);\n daysArr = [];\n }\n if (end.diff(day.add(1, 'd')) < 0) {\n if (daysArr.length < 5) {\n weeksArr.push(daysArr);\n }\n done = true;\n }\n }\n return weeksArr;\n}\n\nmoment.fn.monthNaturalWeeks = function (fromToday) {\n if (!this.isValid()) {\n return [];\n }\n var me = this.clone();\n var day = fromToday ? me.clone() : me.clone().startOf('month');\n var end = me.clone().endOf('month');\n var weeksArr = [];\n var daysArr = [];\n var done = false;\n\n while (!done) {\n daysArr.push(day.clone());\n if (day.day() === 6) {\n weeksArr.push(daysArr);\n daysArr = [];\n }\n if (end.diff(day.add(1, 'd')) < 0) {\n if (daysArr.length < 7) {\n weeksArr.push(daysArr);\n }\n done = true;\n }\n }\n return weeksArr;\n};\n\nif (typeof module != 'undefined' && module.exports) {\n module.exports = moment;\n}\n","import { concat } from '../observable/concat';\nimport { popScheduler } from '../util/args';\nimport { operate } from '../util/lift';\nexport function startWith(...values) {\n const scheduler = popScheduler(values);\n return operate((source, subscriber) => {\n (scheduler ? concat(values, source, scheduler) : concat(values, source)).subscribe(subscriber);\n });\n}\n","export const ToastDelay = 3000;\n\nexport class Toast {\n id: string;\n fade ?= false;\n type: ToastType;\n message: string;\n transient ?= true;\n link?: boolean;\n closing?: boolean;\n\n constructor(init?: Partial<Toast>) {\n Object.assign(this, init);\n }\n}\n\nexport enum ToastType {\n Success,\n Info,\n Warning,\n Error,\n InfoBlue\n}\n","//! moment.js locale configuration\n//! locale : Kazakh [kk]\n//! authors : Nurlan Rakhimzhanov : https://github.com/nurlan\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var suffixes = {\n 0: '-ші',\n 1: '-ші',\n 2: '-ші',\n 3: '-ші',\n 4: '-ші',\n 5: '-ші',\n 6: '-шы',\n 7: '-ші',\n 8: '-ші',\n 9: '-шы',\n 10: '-шы',\n 20: '-шы',\n 30: '-шы',\n 40: '-шы',\n 50: '-ші',\n 60: '-шы',\n 70: '-ші',\n 80: '-ші',\n 90: '-шы',\n 100: '-ші',\n };\n\n var kk = moment.defineLocale('kk', {\n months: 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split(\n '_'\n ),\n monthsShort: 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'),\n weekdays: 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split(\n '_'\n ),\n weekdaysShort: 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'),\n weekdaysMin: 'жк_дй_сй_ср_бй_жм_сн'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Бүгін сағат] LT',\n nextDay: '[Ертең сағат] LT',\n nextWeek: 'dddd [сағат] LT',\n lastDay: '[Кеше сағат] LT',\n lastWeek: '[Өткен аптаның] dddd [сағат] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s ішінде',\n past: '%s бұрын',\n s: 'бірнеше секунд',\n ss: '%d секунд',\n m: 'бір минут',\n mm: '%d минут',\n h: 'бір сағат',\n hh: '%d сағат',\n d: 'бір күн',\n dd: '%d күн',\n M: 'бір ай',\n MM: '%d ай',\n y: 'бір жыл',\n yy: '%d жыл',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ші|шы)/,\n ordinal: function (number) {\n var a = number % 10,\n b = number >= 100 ? 100 : null;\n return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return kk;\n\n})));\n","/**\n * @license Angular v15.0.4\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\n/**\n * An injectable service that produces an animation sequence programmatically within an\n * Angular component or directive.\n * Provided by the `BrowserAnimationsModule` or `NoopAnimationsModule`.\n *\n * @usageNotes\n *\n * To use this service, add it to your component or directive as a dependency.\n * The service is instantiated along with your component.\n *\n * Apps do not typically need to create their own animation players, but if you\n * do need to, follow these steps:\n *\n * 1. Use the <code>[AnimationBuilder.build](api/animations/AnimationBuilder#build)()</code> method\n * to create a programmatic animation. The method returns an `AnimationFactory` instance.\n *\n * 2. Use the factory object to create an `AnimationPlayer` and attach it to a DOM element.\n *\n * 3. Use the player object to control the animation programmatically.\n *\n * For example:\n *\n * ```ts\n * // import the service from BrowserAnimationsModule\n * import {AnimationBuilder} from '@angular/animations';\n * // require the service as a dependency\n * class MyCmp {\n * constructor(private _builder: AnimationBuilder) {}\n *\n * makeAnimation(element: any) {\n * // first define a reusable animation\n * const myAnimation = this._builder.build([\n * style({ width: 0 }),\n * animate(1000, style({ width: '100px' }))\n * ]);\n *\n * // use the returned factory object to create a player\n * const player = myAnimation.create(element);\n *\n * player.play();\n * }\n * }\n * ```\n *\n * @publicApi\n */\nclass AnimationBuilder {\n}\n/**\n * A factory object returned from the\n * <code>[AnimationBuilder.build](api/animations/AnimationBuilder#build)()</code>\n * method.\n *\n * @publicApi\n */\nclass AnimationFactory {\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Specifies automatic styling.\n *\n * @publicApi\n */\nconst AUTO_STYLE = '*';\n/**\n * Creates a named animation trigger, containing a list of [`state()`](api/animations/state)\n * and `transition()` entries to be evaluated when the expression\n * bound to the trigger changes.\n *\n * @param name An identifying string.\n * @param definitions An animation definition object, containing an array of\n * [`state()`](api/animations/state) and `transition()` declarations.\n *\n * @return An object that encapsulates the trigger data.\n *\n * @usageNotes\n * Define an animation trigger in the `animations` section of `@Component` metadata.\n * In the template, reference the trigger by name and bind it to a trigger expression that\n * evaluates to a defined animation state, using the following format:\n *\n * `[@triggerName]=\"expression\"`\n *\n * Animation trigger bindings convert all values to strings, and then match the\n * previous and current values against any linked transitions.\n * Booleans can be specified as `1` or `true` and `0` or `false`.\n *\n * ### Usage Example\n *\n * The following example creates an animation trigger reference based on the provided\n * name value.\n * The provided animation value is expected to be an array consisting of state and\n * transition declarations.\n *\n * ```typescript\n * @Component({\n * selector: \"my-component\",\n * templateUrl: \"my-component-tpl.html\",\n * animations: [\n * trigger(\"myAnimationTrigger\", [\n * state(...),\n * state(...),\n * transition(...),\n * transition(...)\n * ])\n * ]\n * })\n * class MyComponent {\n * myStatusExp = \"something\";\n * }\n * ```\n *\n * The template associated with this component makes use of the defined trigger\n * by binding to an element within its template code.\n *\n * ```html\n * <!-- somewhere inside of my-component-tpl.html -->\n * <div [@myAnimationTrigger]=\"myStatusExp\">...</div>\n * ```\n *\n * ### Using an inline function\n * The `transition` animation method also supports reading an inline function which can decide\n * if its associated animation should be run.\n *\n * ```typescript\n * // this method is run each time the `myAnimationTrigger` trigger value changes.\n * function myInlineMatcherFn(fromState: string, toState: string, element: any, params: {[key:\n string]: any}): boolean {\n * // notice that `element` and `params` are also available here\n * return toState == 'yes-please-animate';\n * }\n *\n * @Component({\n * selector: 'my-component',\n * templateUrl: 'my-component-tpl.html',\n * animations: [\n * trigger('myAnimationTrigger', [\n * transition(myInlineMatcherFn, [\n * // the animation sequence code\n * ]),\n * ])\n * ]\n * })\n * class MyComponent {\n * myStatusExp = \"yes-please-animate\";\n * }\n * ```\n *\n * ### Disabling Animations\n * When true, the special animation control binding `@.disabled` binding prevents\n * all animations from rendering.\n * Place the `@.disabled` binding on an element to disable\n * animations on the element itself, as well as any inner animation triggers\n * within the element.\n *\n * The following example shows how to use this feature:\n *\n * ```typescript\n * @Component({\n * selector: 'my-component',\n * template: `\n * <div [@.disabled]=\"isDisabled\">\n * <div [@childAnimation]=\"exp\"></div>\n * </div>\n * `,\n * animations: [\n * trigger(\"childAnimation\", [\n * // ...\n * ])\n * ]\n * })\n * class MyComponent {\n * isDisabled = true;\n * exp = '...';\n * }\n * ```\n *\n * When `@.disabled` is true, it prevents the `@childAnimation` trigger from animating,\n * along with any inner animations.\n *\n * ### Disable animations application-wide\n * When an area of the template is set to have animations disabled,\n * **all** inner components have their animations disabled as well.\n * This means that you can disable all animations for an app\n * by placing a host binding set on `@.disabled` on the topmost Angular component.\n *\n * ```typescript\n * import {Component, HostBinding} from '@angular/core';\n *\n * @Component({\n * selector: 'app-component',\n * templateUrl: 'app.component.html',\n * })\n * class AppComponent {\n * @HostBinding('@.disabled')\n * public animationsDisabled = true;\n * }\n * ```\n *\n * ### Overriding disablement of inner animations\n * Despite inner animations being disabled, a parent animation can `query()`\n * for inner elements located in disabled areas of the template and still animate\n * them if needed. This is also the case for when a sub animation is\n * queried by a parent and then later animated using `animateChild()`.\n *\n * ### Detecting when an animation is disabled\n * If a region of the DOM (or the entire application) has its animations disabled, the animation\n * trigger callbacks still fire, but for zero seconds. When the callback fires, it provides\n * an instance of an `AnimationEvent`. If animations are disabled,\n * the `.disabled` flag on the event is true.\n *\n * @publicApi\n */\nfunction trigger(name, definitions) {\n return { type: 7 /* AnimationMetadataType.Trigger */, name, definitions, options: {} };\n}\n/**\n * Defines an animation step that combines styling information with timing information.\n *\n * @param timings Sets `AnimateTimings` for the parent animation.\n * A string in the format \"duration [delay] [easing]\".\n * - Duration and delay are expressed as a number and optional time unit,\n * such as \"1s\" or \"10ms\" for one second and 10 milliseconds, respectively.\n * The default unit is milliseconds.\n * - The easing value controls how the animation accelerates and decelerates\n * during its runtime. Value is one of `ease`, `ease-in`, `ease-out`,\n * `ease-in-out`, or a `cubic-bezier()` function call.\n * If not supplied, no easing is applied.\n *\n * For example, the string \"1s 100ms ease-out\" specifies a duration of\n * 1000 milliseconds, and delay of 100 ms, and the \"ease-out\" easing style,\n * which decelerates near the end of the duration.\n * @param styles Sets AnimationStyles for the parent animation.\n * A function call to either `style()` or `keyframes()`\n * that returns a collection of CSS style entries to be applied to the parent animation.\n * When null, uses the styles from the destination state.\n * This is useful when describing an animation step that will complete an animation;\n * see \"Animating to the final state\" in `transitions()`.\n * @returns An object that encapsulates the animation step.\n *\n * @usageNotes\n * Call within an animation `sequence()`, `{@link animations/group group()}`, or\n * `transition()` call to specify an animation step\n * that applies given style data to the parent animation for a given amount of time.\n *\n * ### Syntax Examples\n * **Timing examples**\n *\n * The following examples show various `timings` specifications.\n * - `animate(500)` : Duration is 500 milliseconds.\n * - `animate(\"1s\")` : Duration is 1000 milliseconds.\n * - `animate(\"100ms 0.5s\")` : Duration is 100 milliseconds, delay is 500 milliseconds.\n * - `animate(\"5s ease-in\")` : Duration is 5000 milliseconds, easing in.\n * - `animate(\"5s 10ms cubic-bezier(.17,.67,.88,.1)\")` : Duration is 5000 milliseconds, delay is 10\n * milliseconds, easing according to a bezier curve.\n *\n * **Style examples**\n *\n * The following example calls `style()` to set a single CSS style.\n * ```typescript\n * animate(500, style({ background: \"red\" }))\n * ```\n * The following example calls `keyframes()` to set a CSS style\n * to different values for successive keyframes.\n * ```typescript\n * animate(500, keyframes(\n * [\n * style({ background: \"blue\" }),\n * style({ background: \"red\" })\n * ])\n * ```\n *\n * @publicApi\n */\nfunction animate(timings, styles = null) {\n return { type: 4 /* AnimationMetadataType.Animate */, styles, timings };\n}\n/**\n * @description Defines a list of animation steps to be run in parallel.\n *\n * @param steps An array of animation step objects.\n * - When steps are defined by `style()` or `animate()`\n * function calls, each call within the group is executed instantly.\n * - To specify offset styles to be applied at a later time, define steps with\n * `keyframes()`, or use `animate()` calls with a delay value.\n * For example:\n *\n * ```typescript\n * group([\n * animate(\"1s\", style({ background: \"black\" })),\n * animate(\"2s\", style({ color: \"white\" }))\n * ])\n * ```\n *\n * @param options An options object containing a delay and\n * developer-defined parameters that provide styling defaults and\n * can be overridden on invocation.\n *\n * @return An object that encapsulates the group data.\n *\n * @usageNotes\n * Grouped animations are useful when a series of styles must be\n * animated at different starting times and closed off at different ending times.\n *\n * When called within a `sequence()` or a\n * `transition()` call, does not continue to the next\n * instruction until all of the inner animation steps have completed.\n *\n * @publicApi\n */\nfunction group(steps, options = null) {\n return { type: 3 /* AnimationMetadataType.Group */, steps, options };\n}\n/**\n * Defines a list of animation steps to be run sequentially, one by one.\n *\n * @param steps An array of animation step objects.\n * - Steps defined by `style()` calls apply the styling data immediately.\n * - Steps defined by `animate()` calls apply the styling data over time\n * as specified by the timing data.\n *\n * ```typescript\n * sequence([\n * style({ opacity: 0 }),\n * animate(\"1s\", style({ opacity: 1 }))\n * ])\n * ```\n *\n * @param options An options object containing a delay and\n * developer-defined parameters that provide styling defaults and\n * can be overridden on invocation.\n *\n * @return An object that encapsulates the sequence data.\n *\n * @usageNotes\n * When you pass an array of steps to a\n * `transition()` call, the steps run sequentially by default.\n * Compare this to the `{@link animations/group group()}` call, which runs animation steps in\n *parallel.\n *\n * When a sequence is used within a `{@link animations/group group()}` or a `transition()` call,\n * execution continues to the next instruction only after each of the inner animation\n * steps have completed.\n *\n * @publicApi\n **/\nfunction sequence(steps, options = null) {\n return { type: 2 /* AnimationMetadataType.Sequence */, steps, options };\n}\n/**\n * Declares a key/value object containing CSS properties/styles that\n * can then be used for an animation [`state`](api/animations/state), within an animation\n *`sequence`, or as styling data for calls to `animate()` and `keyframes()`.\n *\n * @param tokens A set of CSS styles or HTML styles associated with an animation state.\n * The value can be any of the following:\n * - A key-value style pair associating a CSS property with a value.\n * - An array of key-value style pairs.\n * - An asterisk (*), to use auto-styling, where styles are derived from the element\n * being animated and applied to the animation when it starts.\n *\n * Auto-styling can be used to define a state that depends on layout or other\n * environmental factors.\n *\n * @return An object that encapsulates the style data.\n *\n * @usageNotes\n * The following examples create animation styles that collect a set of\n * CSS property values:\n *\n * ```typescript\n * // string values for CSS properties\n * style({ background: \"red\", color: \"blue\" })\n *\n * // numerical pixel values\n * style({ width: 100, height: 0 })\n * ```\n *\n * The following example uses auto-styling to allow an element to animate from\n * a height of 0 up to its full height:\n *\n * ```\n * style({ height: 0 }),\n * animate(\"1s\", style({ height: \"*\" }))\n * ```\n *\n * @publicApi\n **/\nfunction style(tokens) {\n return { type: 6 /* AnimationMetadataType.Style */, styles: tokens, offset: null };\n}\n/**\n * Declares an animation state within a trigger attached to an element.\n *\n * @param name One or more names for the defined state in a comma-separated string.\n * The following reserved state names can be supplied to define a style for specific use\n * cases:\n *\n * - `void` You can associate styles with this name to be used when\n * the element is detached from the application. For example, when an `ngIf` evaluates\n * to false, the state of the associated element is void.\n * - `*` (asterisk) Indicates the default state. You can associate styles with this name\n * to be used as the fallback when the state that is being animated is not declared\n * within the trigger.\n *\n * @param styles A set of CSS styles associated with this state, created using the\n * `style()` function.\n * This set of styles persists on the element once the state has been reached.\n * @param options Parameters that can be passed to the state when it is invoked.\n * 0 or more key-value pairs.\n * @return An object that encapsulates the new state data.\n *\n * @usageNotes\n * Use the `trigger()` function to register states to an animation trigger.\n * Use the `transition()` function to animate between states.\n * When a state is active within a component, its associated styles persist on the element,\n * even when the animation ends.\n *\n * @publicApi\n **/\nfunction state(name, styles, options) {\n return { type: 0 /* AnimationMetadataType.State */, name, styles, options };\n}\n/**\n * Defines a set of animation styles, associating each style with an optional `offset` value.\n *\n * @param steps A set of animation styles with optional offset data.\n * The optional `offset` value for a style specifies a percentage of the total animation\n * time at which that style is applied.\n * @returns An object that encapsulates the keyframes data.\n *\n * @usageNotes\n * Use with the `animate()` call. Instead of applying animations\n * from the current state\n * to the destination state, keyframes describe how each style entry is applied and at what point\n * within the animation arc.\n * Compare [CSS Keyframe Animations](https://www.w3schools.com/css/css3_animations.asp).\n *\n * ### Usage\n *\n * In the following example, the offset values describe\n * when each `backgroundColor` value is applied. The color is red at the start, and changes to\n * blue when 20% of the total time has elapsed.\n *\n * ```typescript\n * // the provided offset values\n * animate(\"5s\", keyframes([\n * style({ backgroundColor: \"red\", offset: 0 }),\n * style({ backgroundColor: \"blue\", offset: 0.2 }),\n * style({ backgroundColor: \"orange\", offset: 0.3 }),\n * style({ backgroundColor: \"black\", offset: 1 })\n * ]))\n * ```\n *\n * If there are no `offset` values specified in the style entries, the offsets\n * are calculated automatically.\n *\n * ```typescript\n * animate(\"5s\", keyframes([\n * style({ backgroundColor: \"red\" }) // offset = 0\n * style({ backgroundColor: \"blue\" }) // offset = 0.33\n * style({ backgroundColor: \"orange\" }) // offset = 0.66\n * style({ backgroundColor: \"black\" }) // offset = 1\n * ]))\n *```\n\n * @publicApi\n */\nfunction keyframes(steps) {\n return { type: 5 /* AnimationMetadataType.Keyframes */, steps };\n}\n/**\n * Declares an animation transition which is played when a certain specified condition is met.\n *\n * @param stateChangeExpr A string with a specific format or a function that specifies when the\n * animation transition should occur (see [State Change Expression](#state-change-expression)).\n *\n * @param steps One or more animation objects that represent the animation's instructions.\n *\n * @param options An options object that can be used to specify a delay for the animation or provide\n * custom parameters for it.\n *\n * @returns An object that encapsulates the transition data.\n *\n * @usageNotes\n *\n * ### State Change Expression\n *\n * The State Change Expression instructs Angular when to run the transition's animations, it can\n *either be\n * - a string with a specific syntax\n * - or a function that compares the previous and current state (value of the expression bound to\n * the element's trigger) and returns `true` if the transition should occur or `false` otherwise\n *\n * The string format can be:\n * - `fromState => toState`, which indicates that the transition's animations should occur then the\n * expression bound to the trigger's element goes from `fromState` to `toState`\n *\n * _Example:_\n * ```typescript\n * transition('open => closed', animate('.5s ease-out', style({ height: 0 }) ))\n * ```\n *\n * - `fromState <=> toState`, which indicates that the transition's animations should occur then\n * the expression bound to the trigger's element goes from `fromState` to `toState` or vice versa\n *\n * _Example:_\n * ```typescript\n * transition('enabled <=> disabled', animate('1s cubic-bezier(0.8,0.3,0,1)'))\n * ```\n *\n * - `:enter`/`:leave`, which indicates that the transition's animations should occur when the\n * element enters or exists the DOM\n *\n * _Example:_\n * ```typescript\n * transition(':enter', [\n * style({ opacity: 0 }),\n * animate('500ms', style({ opacity: 1 }))\n * ])\n * ```\n *\n * - `:increment`/`:decrement`, which indicates that the transition's animations should occur when\n * the numerical expression bound to the trigger's element has increased in value or decreased\n *\n * _Example:_\n * ```typescript\n * transition(':increment', query('@counter', animateChild()))\n * ```\n *\n * - a sequence of any of the above divided by commas, which indicates that transition's animations\n * should occur whenever one of the state change expressions matches\n *\n * _Example:_\n * ```typescript\n * transition(':increment, * => enabled, :enter', animate('1s ease', keyframes([\n * style({ transform: 'scale(1)', offset: 0}),\n * style({ transform: 'scale(1.1)', offset: 0.7}),\n * style({ transform: 'scale(1)', offset: 1})\n * ]))),\n * ```\n *\n * Also note that in such context:\n * - `void` can be used to indicate the absence of the element\n * - asterisks can be used as wildcards that match any state\n * - (as a consequence of the above, `void => *` is equivalent to `:enter` and `* => void` is\n * equivalent to `:leave`)\n * - `true` and `false` also match expression values of `1` and `0` respectively (but do not match\n * _truthy_ and _falsy_ values)\n *\n * <div class=\"alert is-helpful\">\n *\n * Be careful about entering end leaving elements as their transitions present a common\n * pitfall for developers.\n *\n * Note that when an element with a trigger enters the DOM its `:enter` transition always\n * gets executed, but its `:leave` transition will not be executed if the element is removed\n * alongside its parent (as it will be removed \"without warning\" before its transition has\n * a chance to be executed, the only way that such transition can occur is if the element\n * is exiting the DOM on its own).\n *\n *\n * </div>\n *\n * ### Animating to a Final State\n *\n * If the final step in a transition is a call to `animate()` that uses a timing value\n * with no `style` data, that step is automatically considered the final animation arc,\n * for the element to reach the final state, in such case Angular automatically adds or removes\n * CSS styles to ensure that the element is in the correct final state.\n *\n *\n * ### Usage Examples\n *\n * - Transition animations applied based on\n * the trigger's expression value\n *\n * ```HTML\n * <div [@myAnimationTrigger]=\"myStatusExp\">\n * ...\n * </div>\n * ```\n *\n * ```typescript\n * trigger(\"myAnimationTrigger\", [\n * ..., // states\n * transition(\"on => off, open => closed\", animate(500)),\n * transition(\"* <=> error\", query('.indicator', animateChild()))\n * ])\n * ```\n *\n * - Transition animations applied based on custom logic dependent\n * on the trigger's expression value and provided parameters\n *\n * ```HTML\n * <div [@myAnimationTrigger]=\"{\n * value: stepName,\n * params: { target: currentTarget }\n * }\">\n * ...\n * </div>\n * ```\n *\n * ```typescript\n * trigger(\"myAnimationTrigger\", [\n * ..., // states\n * transition(\n * (fromState, toState, _element, params) =>\n * ['firststep', 'laststep'].includes(fromState.toLowerCase())\n * && toState === params?.['target'],\n * animate('1s')\n * )\n * ])\n * ```\n *\n * @publicApi\n **/\nfunction transition(stateChangeExpr, steps, options = null) {\n return { type: 1 /* AnimationMetadataType.Transition */, expr: stateChangeExpr, animation: steps, options };\n}\n/**\n * Produces a reusable animation that can be invoked in another animation or sequence,\n * by calling the `useAnimation()` function.\n *\n * @param steps One or more animation objects, as returned by the `animate()`\n * or `sequence()` function, that form a transformation from one state to another.\n * A sequence is used by default when you pass an array.\n * @param options An options object that can contain a delay value for the start of the\n * animation, and additional developer-defined parameters.\n * Provided values for additional parameters are used as defaults,\n * and override values can be passed to the caller on invocation.\n * @returns An object that encapsulates the animation data.\n *\n * @usageNotes\n * The following example defines a reusable animation, providing some default parameter\n * values.\n *\n * ```typescript\n * var fadeAnimation = animation([\n * style({ opacity: '{{ start }}' }),\n * animate('{{ time }}',\n * style({ opacity: '{{ end }}'}))\n * ],\n * { params: { time: '1000ms', start: 0, end: 1 }});\n * ```\n *\n * The following invokes the defined animation with a call to `useAnimation()`,\n * passing in override parameter values.\n *\n * ```js\n * useAnimation(fadeAnimation, {\n * params: {\n * time: '2s',\n * start: 1,\n * end: 0\n * }\n * })\n * ```\n *\n * If any of the passed-in parameter values are missing from this call,\n * the default values are used. If one or more parameter values are missing before a step is\n * animated, `useAnimation()` throws an error.\n *\n * @publicApi\n */\nfunction animation(steps, options = null) {\n return { type: 8 /* AnimationMetadataType.Reference */, animation: steps, options };\n}\n/**\n * Executes a queried inner animation element within an animation sequence.\n *\n * @param options An options object that can contain a delay value for the start of the\n * animation, and additional override values for developer-defined parameters.\n * @return An object that encapsulates the child animation data.\n *\n * @usageNotes\n * Each time an animation is triggered in Angular, the parent animation\n * has priority and any child animations are blocked. In order\n * for a child animation to run, the parent animation must query each of the elements\n * containing child animations, and run them using this function.\n *\n * Note that this feature is designed to be used with `query()` and it will only work\n * with animations that are assigned using the Angular animation library. CSS keyframes\n * and transitions are not handled by this API.\n *\n * @publicApi\n */\nfunction animateChild(options = null) {\n return { type: 9 /* AnimationMetadataType.AnimateChild */, options };\n}\n/**\n * Starts a reusable animation that is created using the `animation()` function.\n *\n * @param animation The reusable animation to start.\n * @param options An options object that can contain a delay value for the start of\n * the animation, and additional override values for developer-defined parameters.\n * @return An object that contains the animation parameters.\n *\n * @publicApi\n */\nfunction useAnimation(animation, options = null) {\n return { type: 10 /* AnimationMetadataType.AnimateRef */, animation, options };\n}\n/**\n * Finds one or more inner elements within the current element that is\n * being animated within a sequence. Use with `animate()`.\n *\n * @param selector The element to query, or a set of elements that contain Angular-specific\n * characteristics, specified with one or more of the following tokens.\n * - `query(\":enter\")` or `query(\":leave\")` : Query for newly inserted/removed elements (not\n * all elements can be queried via these tokens, see\n * [Entering and Leaving Elements](#entering-and-leaving-elements))\n * - `query(\":animating\")` : Query all currently animating elements.\n * - `query(\"@triggerName\")` : Query elements that contain an animation trigger.\n * - `query(\"@*\")` : Query all elements that contain an animation triggers.\n * - `query(\":self\")` : Include the current element into the animation sequence.\n *\n * @param animation One or more animation steps to apply to the queried element or elements.\n * An array is treated as an animation sequence.\n * @param options An options object. Use the 'limit' field to limit the total number of\n * items to collect.\n * @return An object that encapsulates the query data.\n *\n * @usageNotes\n *\n * ### Multiple Tokens\n *\n * Tokens can be merged into a combined query selector string. For example:\n *\n * ```typescript\n * query(':self, .record:enter, .record:leave, @subTrigger', [...])\n * ```\n *\n * The `query()` function collects multiple elements and works internally by using\n * `element.querySelectorAll`. Use the `limit` field of an options object to limit\n * the total number of items to be collected. For example:\n *\n * ```js\n * query('div', [\n * animate(...),\n * animate(...)\n * ], { limit: 1 })\n * ```\n *\n * By default, throws an error when zero items are found. Set the\n * `optional` flag to ignore this error. For example:\n *\n * ```js\n * query('.some-element-that-may-not-be-there', [\n * animate(...),\n * animate(...)\n * ], { optional: true })\n * ```\n *\n * ### Entering and Leaving Elements\n *\n * Not all elements can be queried via the `:enter` and `:leave` tokens, the only ones\n * that can are those that Angular assumes can enter/leave based on their own logic\n * (if their insertion/removal is simply a consequence of that of their parent they\n * should be queried via a different token in their parent's `:enter`/`:leave` transitions).\n *\n * The only elements Angular assumes can enter/leave based on their own logic (thus the only\n * ones that can be queried via the `:enter` and `:leave` tokens) are:\n * - Those inserted dynamically (via `ViewContainerRef`)\n * - Those that have a structural directive (which, under the hood, are a subset of the above ones)\n *\n * <div class=\"alert is-helpful\">\n *\n * Note that elements will be successfully queried via `:enter`/`:leave` even if their\n * insertion/removal is not done manually via `ViewContainerRef`or caused by their structural\n * directive (e.g. they enter/exit alongside their parent).\n *\n * </div>\n *\n * <div class=\"alert is-important\">\n *\n * There is an exception to what previously mentioned, besides elements entering/leaving based on\n * their own logic, elements with an animation trigger can always be queried via `:leave` when\n * their parent is also leaving.\n *\n * </div>\n *\n * ### Usage Example\n *\n * The following example queries for inner elements and animates them\n * individually using `animate()`.\n *\n * ```typescript\n * @Component({\n * selector: 'inner',\n * template: `\n * <div [@queryAnimation]=\"exp\">\n * <h1>Title</h1>\n * <div class=\"content\">\n * Blah blah blah\n * </div>\n * </div>\n * `,\n * animations: [\n * trigger('queryAnimation', [\n * transition('* => goAnimate', [\n * // hide the inner elements\n * query('h1', style({ opacity: 0 })),\n * query('.content', style({ opacity: 0 })),\n *\n * // animate the inner elements in, one by one\n * query('h1', animate(1000, style({ opacity: 1 }))),\n * query('.content', animate(1000, style({ opacity: 1 }))),\n * ])\n * ])\n * ]\n * })\n * class Cmp {\n * exp = '';\n *\n * goAnimate() {\n * this.exp = 'goAnimate';\n * }\n * }\n * ```\n *\n * @publicApi\n */\nfunction query(selector, animation, options = null) {\n return { type: 11 /* AnimationMetadataType.Query */, selector, animation, options };\n}\n/**\n * Use within an animation `query()` call to issue a timing gap after\n * each queried item is animated.\n *\n * @param timings A delay value.\n * @param animation One ore more animation steps.\n * @returns An object that encapsulates the stagger data.\n *\n * @usageNotes\n * In the following example, a container element wraps a list of items stamped out\n * by an `ngFor`. The container element contains an animation trigger that will later be set\n * to query for each of the inner items.\n *\n * Each time items are added, the opacity fade-in animation runs,\n * and each removed item is faded out.\n * When either of these animations occur, the stagger effect is\n * applied after each item's animation is started.\n *\n * ```html\n * <!-- list.component.html -->\n * <button (click)=\"toggle()\">Show / Hide Items</button>\n * <hr />\n * <div [@listAnimation]=\"items.length\">\n * <div *ngFor=\"let item of items\">\n * {{ item }}\n * </div>\n * </div>\n * ```\n *\n * Here is the component code:\n *\n * ```typescript\n * import {trigger, transition, style, animate, query, stagger} from '@angular/animations';\n * @Component({\n * templateUrl: 'list.component.html',\n * animations: [\n * trigger('listAnimation', [\n * ...\n * ])\n * ]\n * })\n * class ListComponent {\n * items = [];\n *\n * showItems() {\n * this.items = [0,1,2,3,4];\n * }\n *\n * hideItems() {\n * this.items = [];\n * }\n *\n * toggle() {\n * this.items.length ? this.hideItems() : this.showItems();\n * }\n * }\n * ```\n *\n * Here is the animation trigger code:\n *\n * ```typescript\n * trigger('listAnimation', [\n * transition('* => *', [ // each time the binding value changes\n * query(':leave', [\n * stagger(100, [\n * animate('0.5s', style({ opacity: 0 }))\n * ])\n * ]),\n * query(':enter', [\n * style({ opacity: 0 }),\n * stagger(100, [\n * animate('0.5s', style({ opacity: 1 }))\n * ])\n * ])\n * ])\n * ])\n * ```\n *\n * @publicApi\n */\nfunction stagger(timings, animation) {\n return { type: 12 /* AnimationMetadataType.Stagger */, timings, animation };\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction scheduleMicroTask(cb) {\n Promise.resolve().then(cb);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * An empty programmatic controller for reusable animations.\n * Used internally when animations are disabled, to avoid\n * checking for the null case when an animation player is expected.\n *\n * @see `animate()`\n * @see `AnimationPlayer`\n * @see `GroupPlayer`\n *\n * @publicApi\n */\nclass NoopAnimationPlayer {\n constructor(duration = 0, delay = 0) {\n this._onDoneFns = [];\n this._onStartFns = [];\n this._onDestroyFns = [];\n this._originalOnDoneFns = [];\n this._originalOnStartFns = [];\n this._started = false;\n this._destroyed = false;\n this._finished = false;\n this._position = 0;\n this.parentPlayer = null;\n this.totalTime = duration + delay;\n }\n _onFinish() {\n if (!this._finished) {\n this._finished = true;\n this._onDoneFns.forEach(fn => fn());\n this._onDoneFns = [];\n }\n }\n onStart(fn) {\n this._originalOnStartFns.push(fn);\n this._onStartFns.push(fn);\n }\n onDone(fn) {\n this._originalOnDoneFns.push(fn);\n this._onDoneFns.push(fn);\n }\n onDestroy(fn) {\n this._onDestroyFns.push(fn);\n }\n hasStarted() {\n return this._started;\n }\n init() { }\n play() {\n if (!this.hasStarted()) {\n this._onStart();\n this.triggerMicrotask();\n }\n this._started = true;\n }\n /** @internal */\n triggerMicrotask() {\n scheduleMicroTask(() => this._onFinish());\n }\n _onStart() {\n this._onStartFns.forEach(fn => fn());\n this._onStartFns = [];\n }\n pause() { }\n restart() { }\n finish() {\n this._onFinish();\n }\n destroy() {\n if (!this._destroyed) {\n this._destroyed = true;\n if (!this.hasStarted()) {\n this._onStart();\n }\n this.finish();\n this._onDestroyFns.forEach(fn => fn());\n this._onDestroyFns = [];\n }\n }\n reset() {\n this._started = false;\n this._finished = false;\n this._onStartFns = this._originalOnStartFns;\n this._onDoneFns = this._originalOnDoneFns;\n }\n setPosition(position) {\n this._position = this.totalTime ? position * this.totalTime : 1;\n }\n getPosition() {\n return this.totalTime ? this._position / this.totalTime : 1;\n }\n /** @internal */\n triggerCallback(phaseName) {\n const methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;\n methods.forEach(fn => fn());\n methods.length = 0;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A programmatic controller for a group of reusable animations.\n * Used internally to control animations.\n *\n * @see `AnimationPlayer`\n * @see `{@link animations/group group()}`\n *\n */\nclass AnimationGroupPlayer {\n constructor(_players) {\n this._onDoneFns = [];\n this._onStartFns = [];\n this._finished = false;\n this._started = false;\n this._destroyed = false;\n this._onDestroyFns = [];\n this.parentPlayer = null;\n this.totalTime = 0;\n this.players = _players;\n let doneCount = 0;\n let destroyCount = 0;\n let startCount = 0;\n const total = this.players.length;\n if (total == 0) {\n scheduleMicroTask(() => this._onFinish());\n }\n else {\n this.players.forEach(player => {\n player.onDone(() => {\n if (++doneCount == total) {\n this._onFinish();\n }\n });\n player.onDestroy(() => {\n if (++destroyCount == total) {\n this._onDestroy();\n }\n });\n player.onStart(() => {\n if (++startCount == total) {\n this._onStart();\n }\n });\n });\n }\n this.totalTime = this.players.reduce((time, player) => Math.max(time, player.totalTime), 0);\n }\n _onFinish() {\n if (!this._finished) {\n this._finished = true;\n this._onDoneFns.forEach(fn => fn());\n this._onDoneFns = [];\n }\n }\n init() {\n this.players.forEach(player => player.init());\n }\n onStart(fn) {\n this._onStartFns.push(fn);\n }\n _onStart() {\n if (!this.hasStarted()) {\n this._started = true;\n this._onStartFns.forEach(fn => fn());\n this._onStartFns = [];\n }\n }\n onDone(fn) {\n this._onDoneFns.push(fn);\n }\n onDestroy(fn) {\n this._onDestroyFns.push(fn);\n }\n hasStarted() {\n return this._started;\n }\n play() {\n if (!this.parentPlayer) {\n this.init();\n }\n this._onStart();\n this.players.forEach(player => player.play());\n }\n pause() {\n this.players.forEach(player => player.pause());\n }\n restart() {\n this.players.forEach(player => player.restart());\n }\n finish() {\n this._onFinish();\n this.players.forEach(player => player.finish());\n }\n destroy() {\n this._onDestroy();\n }\n _onDestroy() {\n if (!this._destroyed) {\n this._destroyed = true;\n this._onFinish();\n this.players.forEach(player => player.destroy());\n this._onDestroyFns.forEach(fn => fn());\n this._onDestroyFns = [];\n }\n }\n reset() {\n this.players.forEach(player => player.reset());\n this._destroyed = false;\n this._finished = false;\n this._started = false;\n }\n setPosition(p) {\n const timeAtPosition = p * this.totalTime;\n this.players.forEach(player => {\n const position = player.totalTime ? Math.min(1, timeAtPosition / player.totalTime) : 1;\n player.setPosition(position);\n });\n }\n getPosition() {\n const longestPlayer = this.players.reduce((longestSoFar, player) => {\n const newPlayerIsLongest = longestSoFar === null || player.totalTime > longestSoFar.totalTime;\n return newPlayerIsLongest ? player : longestSoFar;\n }, null);\n return longestPlayer != null ? longestPlayer.getPosition() : 0;\n }\n beforeDestroy() {\n this.players.forEach(player => {\n if (player.beforeDestroy) {\n player.beforeDestroy();\n }\n });\n }\n /** @internal */\n triggerCallback(phaseName) {\n const methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;\n methods.forEach(fn => fn());\n methods.length = 0;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst ɵPRE_STYLE = '!';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AUTO_STYLE, AnimationBuilder, AnimationFactory, NoopAnimationPlayer, animate, animateChild, animation, group, keyframes, query, sequence, stagger, state, style, transition, trigger, useAnimation, AnimationGroupPlayer as ɵAnimationGroupPlayer, ɵPRE_STYLE };\n","import * as i0 from '@angular/core';\nimport { InjectionToken, forwardRef, EventEmitter, Component, Inject, Optional, Input, Output, HostListener, NgModule } from '@angular/core';\nimport { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';\nimport * as i1 from '@angular/common';\nimport { CommonModule } from '@angular/common';\n\nconst UI_SWITCH_OPTIONS = new InjectionToken('UI_SWITCH_OPTIONS');\n\nconst UI_SWITCH_CONTROL_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => UiSwitchComponent),\n multi: true,\n};\nclass UiSwitchComponent {\n constructor(config = {}, cdr) {\n this.cdr = cdr;\n /**\n * Emits changed value\n */\n // eslint-disable-next-line @angular-eslint/no-output-native\n this.change = new EventEmitter();\n /**\n * Emits DOM event\n */\n this.changeEvent = new EventEmitter();\n /**\n * Emits changed value\n */\n this.valueChange = new EventEmitter();\n this.onTouchedCallback = (v) => { };\n this.onChangeCallback = (v) => { };\n this.size = (config && config.size) || 'medium';\n this.color = config && config.color;\n this.switchOffColor = config && config.switchOffColor;\n this.switchColor = config && config.switchColor;\n this.defaultBgColor = config && config.defaultBgColor;\n this.defaultBoColor = config && config.defaultBoColor;\n this.checkedLabel = config && config.checkedLabel;\n this.uncheckedLabel = config && config.uncheckedLabel;\n this.checkedTextColor = config && config.checkedTextColor;\n this.uncheckedTextColor = config && config.uncheckedTextColor;\n }\n set checked(v) {\n this._checked = v !== false;\n }\n get checked() {\n return this._checked;\n }\n set disabled(v) {\n this._disabled = v !== false;\n }\n get disabled() {\n return this._disabled;\n }\n set reverse(v) {\n this._reverse = v !== false;\n }\n get reverse() {\n return this._reverse;\n }\n set loading(v) {\n this._loading = v !== false;\n }\n get loading() {\n return this._loading;\n }\n getColor(flag = '') {\n if (flag === 'borderColor') {\n return this.defaultBoColor;\n }\n if (flag === 'switchColor') {\n if (this.reverse) {\n return !this.checked ? this.switchColor : this.switchOffColor || this.switchColor;\n }\n return this.checked ? this.switchColor : this.switchOffColor || this.switchColor;\n }\n if (flag === 'checkedTextColor') {\n return this.reverse ? this.uncheckedTextColor : this.checkedTextColor;\n }\n if (flag === 'uncheckedTextColor') {\n return this.reverse ? this.checkedTextColor : this.uncheckedTextColor;\n }\n if (this.reverse) {\n return !this.checked ? this.color : this.defaultBgColor;\n }\n return this.checked ? this.color : this.defaultBgColor;\n }\n onClick(event) {\n if (this.disabled) {\n return;\n }\n this.checked = !this.checked;\n // Component events\n this.change.emit(this.checked);\n this.valueChange.emit(this.checked);\n this.changeEvent.emit(event);\n // value accessor callbacks\n this.onChangeCallback(this.checked);\n this.onTouchedCallback(this.checked);\n this.cdr.markForCheck();\n }\n onToggle(event) {\n if (this.disabled) {\n return;\n }\n if (this.beforeChange) {\n this._beforeChange = this.beforeChange.subscribe((confirm) => {\n if (confirm) {\n this.onClick(event);\n }\n });\n }\n else {\n this.onClick(event);\n }\n }\n writeValue(obj) {\n if (obj !== this.checked) {\n this.checked = !!obj;\n }\n this.onChangeCallback(this.checked);\n if (this.cdr) {\n this.cdr.markForCheck();\n }\n }\n registerOnChange(fn) {\n this.onChangeCallback = fn;\n }\n registerOnTouched(fn) {\n this.onTouchedCallback = fn;\n }\n setDisabledState(isDisabled) {\n this.disabled = isDisabled;\n }\n ngOnDestroy() {\n if (this._beforeChange) {\n this._beforeChange.unsubscribe();\n }\n }\n}\nUiSwitchComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.3\", ngImport: i0, type: UiSwitchComponent, deps: [{ token: UI_SWITCH_OPTIONS, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });\nUiSwitchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.1.3\", type: UiSwitchComponent, selector: \"ui-switch\", inputs: { size: \"size\", color: \"color\", switchOffColor: \"switchOffColor\", switchColor: \"switchColor\", defaultBgColor: \"defaultBgColor\", defaultBoColor: \"defaultBoColor\", checkedLabel: \"checkedLabel\", uncheckedLabel: \"uncheckedLabel\", checkedTextColor: \"checkedTextColor\", uncheckedTextColor: \"uncheckedTextColor\", beforeChange: \"beforeChange\", ariaLabel: \"ariaLabel\", checked: \"checked\", disabled: \"disabled\", reverse: \"reverse\", loading: \"loading\" }, outputs: { change: \"change\", changeEvent: \"changeEvent\", valueChange: \"valueChange\" }, host: { listeners: { \"click\": \"onToggle($event)\" } }, providers: [UI_SWITCH_CONTROL_VALUE_ACCESSOR], ngImport: i0, template: \"<button\\n type=\\\"button\\\"\\n class=\\\"switch\\\"\\n role=\\\"switch\\\"\\n [attr.aria-checked]=\\\"checked\\\"\\n [attr.aria-label]=\\\"ariaLabel\\\"\\n [class.checked]=\\\"checked\\\"\\n [class.disabled]=\\\"disabled\\\"\\n [class.loading]=\\\"loading\\\"\\n [class.switch-large]=\\\"size === 'large'\\\"\\n [class.switch-medium]=\\\"size === 'medium'\\\"\\n [class.switch-small]=\\\"size === 'small'\\\"\\n [style.background-color]=\\\"getColor()\\\"\\n [style.border-color]=\\\"getColor('borderColor')\\\"\\n>\\n <label class=\\\"switch-pane\\\" *ngIf=\\\"checkedLabel || uncheckedLabel\\\">\\n <span\\n [attr.aria-label]=\\\"this.checkedLabel\\\"\\n class=\\\"switch-label-checked\\\"\\n [style.color]=\\\"getColor('checkedTextColor')\\\"\\n >{{ this.checkedLabel }}</span\\n >\\n <span\\n [attr.aria-label]=\\\"this.uncheckedLabel\\\"\\n class=\\\"switch-label-unchecked\\\"\\n [style.color]=\\\"getColor('uncheckedTextColor')\\\"\\n >{{ this.uncheckedLabel }}</span\\n >\\n </label>\\n <small [style.background]=\\\"getColor('switchColor')\\\">\\n <ng-content></ng-content>\\n </small>\\n</button>\\n\", dependencies: [{ kind: \"directive\", type: i1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.3\", ngImport: i0, type: UiSwitchComponent, decorators: [{\n type: Component,\n args: [{ selector: 'ui-switch', providers: [UI_SWITCH_CONTROL_VALUE_ACCESSOR], template: \"<button\\n type=\\\"button\\\"\\n class=\\\"switch\\\"\\n role=\\\"switch\\\"\\n [attr.aria-checked]=\\\"checked\\\"\\n [attr.aria-label]=\\\"ariaLabel\\\"\\n [class.checked]=\\\"checked\\\"\\n [class.disabled]=\\\"disabled\\\"\\n [class.loading]=\\\"loading\\\"\\n [class.switch-large]=\\\"size === 'large'\\\"\\n [class.switch-medium]=\\\"size === 'medium'\\\"\\n [class.switch-small]=\\\"size === 'small'\\\"\\n [style.background-color]=\\\"getColor()\\\"\\n [style.border-color]=\\\"getColor('borderColor')\\\"\\n>\\n <label class=\\\"switch-pane\\\" *ngIf=\\\"checkedLabel || uncheckedLabel\\\">\\n <span\\n [attr.aria-label]=\\\"this.checkedLabel\\\"\\n class=\\\"switch-label-checked\\\"\\n [style.color]=\\\"getColor('checkedTextColor')\\\"\\n >{{ this.checkedLabel }}</span\\n >\\n <span\\n [attr.aria-label]=\\\"this.uncheckedLabel\\\"\\n class=\\\"switch-label-unchecked\\\"\\n [style.color]=\\\"getColor('uncheckedTextColor')\\\"\\n >{{ this.uncheckedLabel }}</span\\n >\\n </label>\\n <small [style.background]=\\\"getColor('switchColor')\\\">\\n <ng-content></ng-content>\\n </small>\\n</button>\\n\" }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [UI_SWITCH_OPTIONS]\n }, {\n type: Optional\n }] }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { size: [{\n type: Input\n }], color: [{\n type: Input\n }], switchOffColor: [{\n type: Input\n }], switchColor: [{\n type: Input\n }], defaultBgColor: [{\n type: Input\n }], defaultBoColor: [{\n type: Input\n }], checkedLabel: [{\n type: Input\n }], uncheckedLabel: [{\n type: Input\n }], checkedTextColor: [{\n type: Input\n }], uncheckedTextColor: [{\n type: Input\n }], beforeChange: [{\n type: Input\n }], ariaLabel: [{\n type: Input\n }], checked: [{\n type: Input\n }], disabled: [{\n type: Input\n }], reverse: [{\n type: Input\n }], loading: [{\n type: Input\n }], change: [{\n type: Output\n }], changeEvent: [{\n type: Output\n }], valueChange: [{\n type: Output\n }], onToggle: [{\n type: HostListener,\n args: ['click', ['$event']]\n }] } });\n\nclass UiSwitchModule {\n static forRoot(config) {\n return {\n ngModule: UiSwitchModule,\n providers: [{ provide: UI_SWITCH_OPTIONS, useValue: config || {} }],\n };\n }\n}\nUiSwitchModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.3\", ngImport: i0, type: UiSwitchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nUiSwitchModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.1.3\", ngImport: i0, type: UiSwitchModule, declarations: [UiSwitchComponent], imports: [CommonModule, FormsModule], exports: [FormsModule, UiSwitchComponent] });\nUiSwitchModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.1.3\", ngImport: i0, type: UiSwitchModule, imports: [CommonModule, FormsModule, FormsModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.3\", ngImport: i0, type: UiSwitchModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [UiSwitchComponent],\n imports: [CommonModule, FormsModule],\n exports: [FormsModule, UiSwitchComponent],\n }]\n }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { UiSwitchComponent, UiSwitchModule };\n","//! moment.js locale configuration\n//! locale : Hindi [hi]\n//! author : Mayank Singhal : https://github.com/mayanksinghal\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '१',\n 2: '२',\n 3: '३',\n 4: '४',\n 5: '५',\n 6: '६',\n 7: '७',\n 8: '८',\n 9: '९',\n 0: '०',\n },\n numberMap = {\n '१': '1',\n '२': '2',\n '३': '3',\n '४': '4',\n '५': '5',\n '६': '6',\n '७': '7',\n '८': '8',\n '९': '9',\n '०': '0',\n },\n monthsParse = [\n /^जन/i,\n /^फ़र|फर/i,\n /^मार्च/i,\n /^अप्रै/i,\n /^मई/i,\n /^जून/i,\n /^जुल/i,\n /^अग/i,\n /^सितं|सित/i,\n /^अक्टू/i,\n /^नव|नवं/i,\n /^दिसं|दिस/i,\n ],\n shortMonthsParse = [\n /^जन/i,\n /^फ़र/i,\n /^मार्च/i,\n /^अप्रै/i,\n /^मई/i,\n /^जून/i,\n /^जुल/i,\n /^अग/i,\n /^सित/i,\n /^अक्टू/i,\n /^नव/i,\n /^दिस/i,\n ];\n\n var hi = moment.defineLocale('hi', {\n months: {\n format: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split(\n '_'\n ),\n standalone:\n 'जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर'.split(\n '_'\n ),\n },\n monthsShort:\n 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'),\n weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),\n weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),\n weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),\n longDateFormat: {\n LT: 'A h:mm बजे',\n LTS: 'A h:mm:ss बजे',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm बजे',\n LLLL: 'dddd, D MMMM YYYY, A h:mm बजे',\n },\n\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: shortMonthsParse,\n\n monthsRegex:\n /^(जनवरी|जन\\.?|फ़रवरी|फरवरी|फ़र\\.?|मार्च?|अप्रैल|अप्रै\\.?|मई?|जून?|जुलाई|जुल\\.?|अगस्त|अग\\.?|सितम्बर|सितंबर|सित\\.?|अक्टूबर|अक्टू\\.?|नवम्बर|नवंबर|नव\\.?|दिसम्बर|दिसंबर|दिस\\.?)/i,\n\n monthsShortRegex:\n /^(जनवरी|जन\\.?|फ़रवरी|फरवरी|फ़र\\.?|मार्च?|अप्रैल|अप्रै\\.?|मई?|जून?|जुलाई|जुल\\.?|अगस्त|अग\\.?|सितम्बर|सितंबर|सित\\.?|अक्टूबर|अक्टू\\.?|नवम्बर|नवंबर|नव\\.?|दिसम्बर|दिसंबर|दिस\\.?)/i,\n\n monthsStrictRegex:\n /^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\\.?|अक्टूबर|अक्टू\\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,\n\n monthsShortStrictRegex:\n /^(जन\\.?|फ़र\\.?|मार्च?|अप्रै\\.?|मई?|जून?|जुल\\.?|अग\\.?|सित\\.?|अक्टू\\.?|नव\\.?|दिस\\.?)/i,\n\n calendar: {\n sameDay: '[आज] LT',\n nextDay: '[कल] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[कल] LT',\n lastWeek: '[पिछले] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s में',\n past: '%s पहले',\n s: 'कुछ ही क्षण',\n ss: '%d सेकंड',\n m: 'एक मिनट',\n mm: '%d मिनट',\n h: 'एक घंटा',\n hh: '%d घंटे',\n d: 'एक दिन',\n dd: '%d दिन',\n M: 'एक महीने',\n MM: '%d महीने',\n y: 'एक वर्ष',\n yy: '%d वर्ष',\n },\n preparse: function (string) {\n return string.replace(/[१२३४५६७८९०]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n // Hindi notation for meridiems are quite fuzzy in practice. While there exists\n // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.\n meridiemParse: /रात|सुबह|दोपहर|शाम/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'रात') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'सुबह') {\n return hour;\n } else if (meridiem === 'दोपहर') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'शाम') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'रात';\n } else if (hour < 10) {\n return 'सुबह';\n } else if (hour < 17) {\n return 'दोपहर';\n } else if (hour < 20) {\n return 'शाम';\n } else {\n return 'रात';\n }\n },\n week: {\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 });\n\n return hi;\n\n})));\n","import { observable as Symbol_observable } from '../symbol/observable';\nimport { isFunction } from './isFunction';\nexport function isInteropObservable(input) {\n return isFunction(input[Symbol_observable]);\n}\n","import {AfterViewInit, Directive, EventEmitter, OnDestroy, Output} from '@angular/core';\nimport { FirebaseService } from \"@brightside-web/desktop/data-access/shared\";\n\n@Directive({\n selector: '[brightsideWebTimeout]',\n})\nexport class TimeoutDirective implements AfterViewInit, OnDestroy {\n @Output() timedOut: EventEmitter<any> = new EventEmitter<any>();\n\n timeout: number;\n remoteConfigAngularTimeout: string;\n timeoutInMS: number;\n\n constructor(private analytics: FirebaseService) {\n this.remoteConfigAngularTimeout = this.analytics.getValueAsString('apiTimeout');\n this.timeoutInMS = Number(this.remoteConfigAngularTimeout) ? Number(this.remoteConfigAngularTimeout) * 1000 : 0 ;\n }\n\n ngAfterViewInit() {\n if (this.timeout) clearTimeout(this.timeout);\n this.timeout = window.setTimeout(() => {\n this.analytics.logEvent(`loading_timed_out`);\n this.timedOut.emit({timedOut: true});\n }, this.timeoutInMS);\n };\n\n ngOnDestroy() {\n if (this.timeout) clearTimeout(this.timeout);\n }\n\n}\n\n","//! moment.js locale configuration\n//! locale : Klingon [tlh]\n//! author : Dominika Kruk : https://github.com/amaranthrose\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_');\n\n function translateFuture(output) {\n var time = output;\n time =\n output.indexOf('jaj') !== -1\n ? time.slice(0, -3) + 'leS'\n : output.indexOf('jar') !== -1\n ? time.slice(0, -3) + 'waQ'\n : output.indexOf('DIS') !== -1\n ? time.slice(0, -3) + 'nem'\n : time + ' pIq';\n return time;\n }\n\n function translatePast(output) {\n var time = output;\n time =\n output.indexOf('jaj') !== -1\n ? time.slice(0, -3) + 'Hu’'\n : output.indexOf('jar') !== -1\n ? time.slice(0, -3) + 'wen'\n : output.indexOf('DIS') !== -1\n ? time.slice(0, -3) + 'ben'\n : time + ' ret';\n return time;\n }\n\n function translate(number, withoutSuffix, string, isFuture) {\n var numberNoun = numberAsNoun(number);\n switch (string) {\n case 'ss':\n return numberNoun + ' lup';\n case 'mm':\n return numberNoun + ' tup';\n case 'hh':\n return numberNoun + ' rep';\n case 'dd':\n return numberNoun + ' jaj';\n case 'MM':\n return numberNoun + ' jar';\n case 'yy':\n return numberNoun + ' DIS';\n }\n }\n\n function numberAsNoun(number) {\n var hundred = Math.floor((number % 1000) / 100),\n ten = Math.floor((number % 100) / 10),\n one = number % 10,\n word = '';\n if (hundred > 0) {\n word += numbersNouns[hundred] + 'vatlh';\n }\n if (ten > 0) {\n word += (word !== '' ? ' ' : '') + numbersNouns[ten] + 'maH';\n }\n if (one > 0) {\n word += (word !== '' ? ' ' : '') + numbersNouns[one];\n }\n return word === '' ? 'pagh' : word;\n }\n\n var tlh = moment.defineLocale('tlh', {\n months: 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split(\n '_'\n ),\n monthsShort:\n 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(\n '_'\n ),\n weekdaysShort:\n 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),\n weekdaysMin:\n 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[DaHjaj] LT',\n nextDay: '[wa’leS] LT',\n nextWeek: 'LLL',\n lastDay: '[wa’Hu’] LT',\n lastWeek: 'LLL',\n sameElse: 'L',\n },\n relativeTime: {\n future: translateFuture,\n past: translatePast,\n s: 'puS lup',\n ss: translate,\n m: 'wa’ tup',\n mm: translate,\n h: 'wa’ rep',\n hh: translate,\n d: 'wa’ jaj',\n dd: translate,\n M: 'wa’ jar',\n MM: translate,\n y: 'wa’ DIS',\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return tlh;\n\n})));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stack-generator', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.StackGenerator = factory(root.StackFrame);\n }\n}(this, function(StackFrame) {\n return {\n backtrace: function StackGenerator$$backtrace(opts) {\n var stack = [];\n var maxStackSize = 10;\n\n if (typeof opts === 'object' && typeof opts.maxStackSize === 'number') {\n maxStackSize = opts.maxStackSize;\n }\n\n var curr = arguments.callee;\n while (curr && stack.length < maxStackSize && curr['arguments']) {\n // Allow V8 optimizations\n var args = new Array(curr['arguments'].length);\n for (var i = 0; i < args.length; ++i) {\n args[i] = curr['arguments'][i];\n }\n if (/function(?:\\s+([\\w$]+))+\\s*\\(/.test(curr.toString())) {\n stack.push(new StackFrame({functionName: RegExp.$1 || undefined, args: args}));\n } else {\n stack.push(new StackFrame({args: args}));\n }\n\n try {\n curr = curr.caller;\n } catch (e) {\n break;\n }\n }\n return stack;\n }\n };\n}));\n","/////////////////////////////////////////////////////////////////////////////////\n/* UAParser.js v0.7.33\n Copyright © 2012-2021 Faisal Salman <f@faisalman.com>\n MIT License */ /*\n Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data.\n Supports browser & node.js environment.\n Demo : https://faisalman.github.io/ua-parser-js\n Source : https://github.com/faisalman/ua-parser-js */\n/////////////////////////////////////////////////////////////////////////////////\n\n(function (window, undefined) {\n \"use strict\";\n\n //////////////\n // Constants\n /////////////\n\n var LIBVERSION = \"0.7.33\",\n EMPTY = \"\",\n UNKNOWN = \"?\",\n FUNC_TYPE = \"function\",\n UNDEF_TYPE = \"undefined\",\n OBJ_TYPE = \"object\",\n STR_TYPE = \"string\",\n MAJOR = \"major\",\n MODEL = \"model\",\n NAME = \"name\",\n TYPE = \"type\",\n VENDOR = \"vendor\",\n VERSION = \"version\",\n ARCHITECTURE = \"architecture\",\n CONSOLE = \"console\",\n MOBILE = \"mobile\",\n TABLET = \"tablet\",\n SMARTTV = \"smarttv\",\n WEARABLE = \"wearable\",\n EMBEDDED = \"embedded\",\n UA_MAX_LENGTH = 350;\n\n var AMAZON = \"Amazon\",\n APPLE = \"Apple\",\n ASUS = \"ASUS\",\n BLACKBERRY = \"BlackBerry\",\n BROWSER = \"Browser\",\n CHROME = \"Chrome\",\n EDGE = \"Edge\",\n FIREFOX = \"Firefox\",\n GOOGLE = \"Google\",\n HUAWEI = \"Huawei\",\n LG = \"LG\",\n MICROSOFT = \"Microsoft\",\n MOTOROLA = \"Motorola\",\n OPERA = \"Opera\",\n SAMSUNG = \"Samsung\",\n SHARP = \"Sharp\",\n SONY = \"Sony\",\n XIAOMI = \"Xiaomi\",\n ZEBRA = \"Zebra\",\n FACEBOOK = \"Facebook\";\n\n ///////////\n // Helper\n //////////\n\n var extend = function (regexes, extensions) {\n var mergedRegexes = {};\n for (var i in regexes) {\n if (extensions[i] && extensions[i].length % 2 === 0) {\n mergedRegexes[i] = extensions[i].concat(regexes[i]);\n } else {\n mergedRegexes[i] = regexes[i];\n }\n }\n return mergedRegexes;\n },\n enumerize = function (arr) {\n var enums = {};\n for (var i = 0; i < arr.length; i++) {\n enums[arr[i].toUpperCase()] = arr[i];\n }\n return enums;\n },\n has = function (str1, str2) {\n return typeof str1 === STR_TYPE ? lowerize(str2).indexOf(lowerize(str1)) !== -1 : false;\n },\n lowerize = function (str) {\n return str.toLowerCase();\n },\n majorize = function (version) {\n return typeof version === STR_TYPE ? version.replace(/[^\\d\\.]/g, EMPTY).split(\".\")[0] : undefined;\n },\n trim = function (str, len) {\n if (typeof str === STR_TYPE) {\n str = str.replace(/^\\s\\s*/, EMPTY);\n return typeof len === UNDEF_TYPE ? str : str.substring(0, UA_MAX_LENGTH);\n }\n };\n\n ///////////////\n // Map helper\n //////////////\n\n var rgxMapper = function (ua, arrays) {\n var i = 0,\n j,\n k,\n p,\n q,\n matches,\n match;\n\n // loop through all regexes maps\n while (i < arrays.length && !matches) {\n var regex = arrays[i], // even sequence (0,2,4,..)\n props = arrays[i + 1]; // odd sequence (1,3,5,..)\n j = k = 0;\n\n // try matching uastring with regexes\n while (j < regex.length && !matches) {\n matches = regex[j++].exec(ua);\n\n if (!!matches) {\n for (p = 0; p < props.length; p++) {\n match = matches[++k];\n q = props[p];\n // check if given property is actually array\n if (typeof q === OBJ_TYPE && q.length > 0) {\n if (q.length === 2) {\n if (typeof q[1] == FUNC_TYPE) {\n // assign modified match\n this[q[0]] = q[1].call(this, match);\n } else {\n // assign given value, ignore regex match\n this[q[0]] = q[1];\n }\n } else if (q.length === 3) {\n // check whether function or regex\n if (typeof q[1] === FUNC_TYPE && !(q[1].exec && q[1].test)) {\n // call function (usually string mapper)\n this[q[0]] = match ? q[1].call(this, match, q[2]) : undefined;\n } else {\n // sanitize match using given regex\n this[q[0]] = match ? match.replace(q[1], q[2]) : undefined;\n }\n } else if (q.length === 4) {\n this[q[0]] = match ? q[3].call(this, match.replace(q[1], q[2])) : undefined;\n }\n } else {\n this[q] = match ? match : undefined;\n }\n }\n }\n }\n i += 2;\n }\n },\n strMapper = function (str, map) {\n for (var i in map) {\n // check if current value is array\n if (typeof map[i] === OBJ_TYPE && map[i].length > 0) {\n for (var j = 0; j < map[i].length; j++) {\n if (has(map[i][j], str)) {\n return i === UNKNOWN ? undefined : i;\n }\n }\n } else if (has(map[i], str)) {\n return i === UNKNOWN ? undefined : i;\n }\n }\n return str;\n };\n\n ///////////////\n // String map\n //////////////\n\n // Safari < 3.0\n var oldSafariMap = {\n \"1.0\": \"/8\",\n 1.2: \"/1\",\n 1.3: \"/3\",\n \"2.0\": \"/412\",\n \"2.0.2\": \"/416\",\n \"2.0.3\": \"/417\",\n \"2.0.4\": \"/419\",\n \"?\": \"/\"\n },\n windowsVersionMap = {\n ME: \"4.90\",\n \"NT 3.11\": \"NT3.51\",\n \"NT 4.0\": \"NT4.0\",\n 2000: \"NT 5.0\",\n XP: [\"NT 5.1\", \"NT 5.2\"],\n Vista: \"NT 6.0\",\n 7: \"NT 6.1\",\n 8: \"NT 6.2\",\n 8.1: \"NT 6.3\",\n 10: [\"NT 6.4\", \"NT 10.0\"],\n RT: \"ARM\"\n };\n\n //////////////\n // Regex map\n /////////////\n\n var regexes = {\n browser: [\n [\n /\\b(?:crmo|crios)\\/([\\w\\.]+)/i // Chrome for Android/iOS\n ],\n [VERSION, [NAME, \"Chrome\"]],\n [\n /edg(?:e|ios|a)?\\/([\\w\\.]+)/i // Microsoft Edge\n ],\n [VERSION, [NAME, \"Edge\"]],\n [\n // Presto based\n /(opera mini)\\/([-\\w\\.]+)/i, // Opera Mini\n /(opera [mobiletab]{3,6})\\b.+version\\/([-\\w\\.]+)/i, // Opera Mobi/Tablet\n /(opera)(?:.+version\\/|[\\/ ]+)([\\w\\.]+)/i // Opera\n ],\n [NAME, VERSION],\n [\n /opios[\\/ ]+([\\w\\.]+)/i // Opera mini on iphone >= 8.0\n ],\n [VERSION, [NAME, OPERA + \" Mini\"]],\n [\n /\\bopr\\/([\\w\\.]+)/i // Opera Webkit\n ],\n [VERSION, [NAME, OPERA]],\n [\n // Mixed\n /(kindle)\\/([\\w\\.]+)/i, // Kindle\n /(lunascape|maxthon|netfront|jasmine|blazer)[\\/ ]?([\\w\\.]*)/i, // Lunascape/Maxthon/Netfront/Jasmine/Blazer\n // Trident based\n /(avant |iemobile|slim)(?:browser)?[\\/ ]?([\\w\\.]*)/i, // Avant/IEMobile/SlimBrowser\n /(ba?idubrowser)[\\/ ]?([\\w\\.]+)/i, // Baidu Browser\n /(?:ms|\\()(ie) ([\\w\\.]+)/i, // Internet Explorer\n\n // Webkit/KHTML based // Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon\n /(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq|duckduckgo)\\/([-\\w\\.]+)/i,\n // Rekonq/Puffin/Brave/Whale/QQBrowserLite/QQ, aka ShouQ\n /(weibo)__([\\d\\.]+)/i // Weibo\n ],\n [NAME, VERSION],\n [\n /(?:\\buc? ?browser|(?:juc.+)ucweb)[\\/ ]?([\\w\\.]+)/i // UCBrowser\n ],\n [VERSION, [NAME, \"UC\" + BROWSER]],\n [\n /microm.+\\bqbcore\\/([\\w\\.]+)/i, // WeChat Desktop for Windows Built-in Browser\n /\\bqbcore\\/([\\w\\.]+).+microm/i\n ],\n [VERSION, [NAME, \"WeChat(Win) Desktop\"]],\n [\n /micromessenger\\/([\\w\\.]+)/i // WeChat\n ],\n [VERSION, [NAME, \"WeChat\"]],\n [\n /konqueror\\/([\\w\\.]+)/i // Konqueror\n ],\n [VERSION, [NAME, \"Konqueror\"]],\n [\n /trident.+rv[: ]([\\w\\.]{1,9})\\b.+like gecko/i // IE11\n ],\n [VERSION, [NAME, \"IE\"]],\n [\n /yabrowser\\/([\\w\\.]+)/i // Yandex\n ],\n [VERSION, [NAME, \"Yandex\"]],\n [\n /(avast|avg)\\/([\\w\\.]+)/i // Avast/AVG Secure Browser\n ],\n [[NAME, /(.+)/, \"$1 Secure \" + BROWSER], VERSION],\n [\n /\\bfocus\\/([\\w\\.]+)/i // Firefox Focus\n ],\n [VERSION, [NAME, FIREFOX + \" Focus\"]],\n [\n /\\bopt\\/([\\w\\.]+)/i // Opera Touch\n ],\n [VERSION, [NAME, OPERA + \" Touch\"]],\n [\n /coc_coc\\w+\\/([\\w\\.]+)/i // Coc Coc Browser\n ],\n [VERSION, [NAME, \"Coc Coc\"]],\n [\n /dolfin\\/([\\w\\.]+)/i // Dolphin\n ],\n [VERSION, [NAME, \"Dolphin\"]],\n [\n /coast\\/([\\w\\.]+)/i // Opera Coast\n ],\n [VERSION, [NAME, OPERA + \" Coast\"]],\n [\n /miuibrowser\\/([\\w\\.]+)/i // MIUI Browser\n ],\n [VERSION, [NAME, \"MIUI \" + BROWSER]],\n [\n /fxios\\/([-\\w\\.]+)/i // Firefox for iOS\n ],\n [VERSION, [NAME, FIREFOX]],\n [\n /\\bqihu|(qi?ho?o?|360)browser/i // 360\n ],\n [[NAME, \"360 \" + BROWSER]],\n [/(oculus|samsung|sailfish|huawei)browser\\/([\\w\\.]+)/i],\n [[NAME, /(.+)/, \"$1 \" + BROWSER], VERSION],\n [\n // Oculus/Samsung/Sailfish/Huawei Browser\n /(comodo_dragon)\\/([\\w\\.]+)/i // Comodo Dragon\n ],\n [[NAME, /_/g, \" \"], VERSION],\n [\n /(electron)\\/([\\w\\.]+) safari/i, // Electron-based App\n /(tesla)(?: qtcarbrowser|\\/(20\\d\\d\\.[-\\w\\.]+))/i, // Tesla\n /m?(qqbrowser|baiduboxapp|2345Explorer)[\\/ ]?([\\w\\.]+)/i // QQBrowser/Baidu App/2345 Browser\n ],\n [NAME, VERSION],\n [\n /(metasr)[\\/ ]?([\\w\\.]+)/i, // SouGouBrowser\n /(lbbrowser)/i, // LieBao Browser\n /\\[(linkedin)app\\]/i // LinkedIn App for iOS & Android\n ],\n [NAME],\n [\n // WebView\n /((?:fban\\/fbios|fb_iab\\/fb4a)(?!.+fbav)|;fbav\\/([\\w\\.]+);)/i // Facebook App for iOS & Android\n ],\n [[NAME, FACEBOOK], VERSION],\n [\n /safari (line)\\/([\\w\\.]+)/i, // Line App for iOS\n /\\b(line)\\/([\\w\\.]+)\\/iab/i, // Line App for Android\n /(chromium|instagram)[\\/ ]([-\\w\\.]+)/i // Chromium/Instagram\n ],\n [NAME, VERSION],\n [\n /\\bgsa\\/([\\w\\.]+) .*safari\\//i // Google Search Appliance on iOS\n ],\n [VERSION, [NAME, \"GSA\"]],\n [\n /headlesschrome(?:\\/([\\w\\.]+)| )/i // Chrome Headless\n ],\n [VERSION, [NAME, CHROME + \" Headless\"]],\n [\n / wv\\).+(chrome)\\/([\\w\\.]+)/i // Chrome WebView\n ],\n [[NAME, CHROME + \" WebView\"], VERSION],\n [\n /droid.+ version\\/([\\w\\.]+)\\b.+(?:mobile safari|safari)/i // Android Browser\n ],\n [VERSION, [NAME, \"Android \" + BROWSER]],\n [\n /(chrome|omniweb|arora|[tizenoka]{5} ?browser)\\/v?([\\w\\.]+)/i // Chrome/OmniWeb/Arora/Tizen/Nokia\n ],\n [NAME, VERSION],\n [\n /version\\/([\\w\\.\\,]+) .*mobile\\/\\w+ (safari)/i // Mobile Safari\n ],\n [VERSION, [NAME, \"Mobile Safari\"]],\n [\n /version\\/([\\w(\\.|\\,)]+) .*(mobile ?safari|safari)/i // Safari & Safari Mobile\n ],\n [VERSION, NAME],\n [\n /webkit.+?(mobile ?safari|safari)(\\/[\\w\\.]+)/i // Safari < 3.0\n ],\n [NAME, [VERSION, strMapper, oldSafariMap]],\n [/(webkit|khtml)\\/([\\w\\.]+)/i],\n [NAME, VERSION],\n [\n // Gecko based\n /(navigator|netscape\\d?)\\/([-\\w\\.]+)/i // Netscape\n ],\n [[NAME, \"Netscape\"], VERSION],\n [\n /mobile vr; rv:([\\w\\.]+)\\).+firefox/i // Firefox Reality\n ],\n [VERSION, [NAME, FIREFOX + \" Reality\"]],\n [\n /ekiohf.+(flow)\\/([\\w\\.]+)/i, // Flow\n /(swiftfox)/i, // Swiftfox\n /(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\\/ ]?([\\w\\.\\+]+)/i,\n // IceDragon/Iceweasel/Camino/Chimera/Fennec/Maemo/Minimo/Conkeror/Klar\n /(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\\/([-\\w\\.]+)$/i,\n // Firefox/SeaMonkey/K-Meleon/IceCat/IceApe/Firebird/Phoenix\n /(firefox)\\/([\\w\\.]+)/i, // Other Firefox-based\n /(mozilla)\\/([\\w\\.]+) .+rv\\:.+gecko\\/\\d+/i, // Mozilla\n\n // Other\n /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\\. ]?browser)[-\\/ ]?v?([\\w\\.]+)/i,\n // Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Sleipnir/Obigo/Mosaic/Go/ICE/UP.Browser\n /(links) \\(([\\w\\.]+)/i // Links\n ],\n [NAME, VERSION],\n [\n /(cobalt)\\/([\\w\\.]+)/i // Cobalt\n ],\n [NAME, [VERSION, /master.|lts./, \"\"]]\n ],\n\n cpu: [\n [\n /(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\\)]/i // AMD64 (x64)\n ],\n [[ARCHITECTURE, \"amd64\"]],\n [\n /(ia32(?=;))/i // IA32 (quicktime)\n ],\n [[ARCHITECTURE, lowerize]],\n [\n /((?:i[346]|x)86)[;\\)]/i // IA32 (x86)\n ],\n [[ARCHITECTURE, \"ia32\"]],\n [\n /\\b(aarch64|arm(v?8e?l?|_?64))\\b/i // ARM64\n ],\n [[ARCHITECTURE, \"arm64\"]],\n [\n /\\b(arm(?:v[67])?ht?n?[fl]p?)\\b/i // ARMHF\n ],\n [[ARCHITECTURE, \"armhf\"]],\n [\n // PocketPC mistakenly identified as PowerPC\n /windows (ce|mobile); ppc;/i\n ],\n [[ARCHITECTURE, \"arm\"]],\n [\n /((?:ppc|powerpc)(?:64)?)(?: mac|;|\\))/i // PowerPC\n ],\n [[ARCHITECTURE, /ower/, EMPTY, lowerize]],\n [\n /(sun4\\w)[;\\)]/i // SPARC\n ],\n [[ARCHITECTURE, \"sparc\"]],\n [\n /((?:avr32|ia64(?=;))|68k(?=\\))|\\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\\b|pa-risc)/i\n // IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC\n ],\n [[ARCHITECTURE, lowerize]]\n ],\n\n device: [\n [\n //////////////////////////\n // MOBILES & TABLETS\n // Ordered by popularity\n /////////////////////////\n\n // Samsung\n /\\b(sch-i[89]0\\d|shw-m380s|sm-[ptx]\\w{2,4}|gt-[pn]\\d{2,4}|sgh-t8[56]9|nexus 10)/i\n ],\n [MODEL, [VENDOR, SAMSUNG], [TYPE, TABLET]],\n [\n /\\b((?:s[cgp]h|gt|sm)-\\w+|galaxy nexus)/i,\n /samsung[- ]([-\\w]+)/i,\n /sec-(sgh\\w+)/i\n ],\n [MODEL, [VENDOR, SAMSUNG], [TYPE, MOBILE]],\n [\n // Apple\n /((ipod|iphone)\\d+,\\d+)/i // iPod/iPhone model\n ],\n [MODEL, [VENDOR, APPLE], [TYPE, MOBILE]],\n [\n /(ipad\\d+,\\d+)/i // iPad model\n ],\n [MODEL, [VENDOR, APPLE], [TYPE, TABLET]],\n [\n /\\((ip(?:hone|od)[\\w ]*);/i // iPod/iPhone\n ],\n [MODEL, [VENDOR, APPLE], [TYPE, MOBILE]],\n [\n /\\((ipad);[-\\w\\),; ]+apple/i, // iPad\n /applecoremedia\\/[\\w\\.]+ \\((ipad)/i,\n /\\b(ipad)\\d\\d?,\\d\\d?[;\\]].+ios/i\n ],\n [MODEL, [VENDOR, APPLE], [TYPE, TABLET]],\n [/(macintosh);/i],\n [MODEL, [VENDOR, APPLE]],\n [\n // Huawei\n /\\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\\d{2})\\b(?!.+d\\/s)/i\n ],\n [MODEL, [VENDOR, HUAWEI], [TYPE, TABLET]],\n [\n /(?:huawei|honor)([-\\w ]+)[;\\)]/i,\n /\\b(nexus 6p|\\w{2,4}e?-[atu]?[ln][\\dx][012359c][adn]?)\\b(?!.+d\\/s)/i\n ],\n [MODEL, [VENDOR, HUAWEI], [TYPE, MOBILE]],\n [\n // Xiaomi\n /\\b(poco[\\w ]+)(?: bui|\\))/i, // Xiaomi POCO\n /\\b; (\\w+) build\\/hm\\1/i, // Xiaomi Hongmi 'numeric' models\n /\\b(hm[-_ ]?note?[_ ]?(?:\\d\\w)?) bui/i, // Xiaomi Hongmi\n /\\b(redmi[\\-_ ]?(?:note|k)?[\\w_ ]+)(?: bui|\\))/i, // Xiaomi Redmi\n /\\b(mi[-_ ]?(?:a\\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\\d?\\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\\))/i // Xiaomi Mi\n ],\n [\n [MODEL, /_/g, \" \"],\n [VENDOR, XIAOMI],\n [TYPE, MOBILE]\n ],\n [\n /\\b(mi[-_ ]?(?:pad)(?:[\\w_ ]+))(?: bui|\\))/i // Mi Pad tablets\n ],\n [\n [MODEL, /_/g, \" \"],\n [VENDOR, XIAOMI],\n [TYPE, TABLET]\n ],\n [\n // OPPO\n /; (\\w+) bui.+ oppo/i,\n /\\b(cph[12]\\d{3}|p(?:af|c[al]|d\\w|e[ar])[mt]\\d0|x9007|a101op)\\b/i\n ],\n [MODEL, [VENDOR, \"OPPO\"], [TYPE, MOBILE]],\n [\n // Vivo\n /vivo (\\w+)(?: bui|\\))/i,\n /\\b(v[12]\\d{3}\\w?[at])(?: bui|;)/i\n ],\n [MODEL, [VENDOR, \"Vivo\"], [TYPE, MOBILE]],\n [\n // Realme\n /\\b(rmx[12]\\d{3})(?: bui|;|\\))/i\n ],\n [MODEL, [VENDOR, \"Realme\"], [TYPE, MOBILE]],\n [\n // Motorola\n /\\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\\b[\\w ]+build\\//i,\n /\\bmot(?:orola)?[- ](\\w*)/i,\n /((?:moto[\\w\\(\\) ]+|xt\\d{3,4}|nexus 6)(?= bui|\\)))/i\n ],\n [MODEL, [VENDOR, MOTOROLA], [TYPE, MOBILE]],\n [/\\b(mz60\\d|xoom[2 ]{0,2}) build\\//i],\n [MODEL, [VENDOR, MOTOROLA], [TYPE, TABLET]],\n [\n // LG\n /((?=lg)?[vl]k\\-?\\d{3}) bui| 3\\.[-\\w; ]{10}lg?-([06cv9]{3,4})/i\n ],\n [MODEL, [VENDOR, LG], [TYPE, TABLET]],\n [\n /(lm(?:-?f100[nv]?|-[\\w\\.]+)(?= bui|\\))|nexus [45])/i,\n /\\blg[-e;\\/ ]+((?!browser|netcast|android tv)\\w+)/i,\n /\\blg-?([\\d\\w]+) bui/i\n ],\n [MODEL, [VENDOR, LG], [TYPE, MOBILE]],\n [\n // Lenovo\n /(ideatab[-\\w ]+)/i,\n /lenovo ?(s[56]000[-\\w]+|tab(?:[\\w ]+)|yt[-\\d\\w]{6}|tb[-\\d\\w]{6})/i\n ],\n [MODEL, [VENDOR, \"Lenovo\"], [TYPE, TABLET]],\n [\n // Nokia\n /(?:maemo|nokia).*(n900|lumia \\d+)/i,\n /nokia[-_ ]?([-\\w\\.]*)/i\n ],\n [\n [MODEL, /_/g, \" \"],\n [VENDOR, \"Nokia\"],\n [TYPE, MOBILE]\n ],\n [\n // Google\n /(pixel c)\\b/i // Google Pixel C\n ],\n [MODEL, [VENDOR, GOOGLE], [TYPE, TABLET]],\n [\n /droid.+; (pixel[\\daxl ]{0,6})(?: bui|\\))/i // Google Pixel\n ],\n [MODEL, [VENDOR, GOOGLE], [TYPE, MOBILE]],\n [\n // Sony\n /droid.+ (a?\\d[0-2]{2}so|[c-g]\\d{4}|so[-gl]\\w+|xq-a\\w[4-7][12])(?= bui|\\).+chrome\\/(?![1-6]{0,1}\\d\\.))/i\n ],\n [MODEL, [VENDOR, SONY], [TYPE, MOBILE]],\n [/sony tablet [ps]/i, /\\b(?:sony)?sgp\\w+(?: bui|\\))/i],\n [\n [MODEL, \"Xperia Tablet\"],\n [VENDOR, SONY],\n [TYPE, TABLET]\n ],\n [\n // OnePlus\n / (kb2005|in20[12]5|be20[12][59])\\b/i,\n /(?:one)?(?:plus)? (a\\d0\\d\\d)(?: b|\\))/i\n ],\n [MODEL, [VENDOR, \"OnePlus\"], [TYPE, MOBILE]],\n [\n // Amazon\n /(alexa)webm/i,\n /(kf[a-z]{2}wi)( bui|\\))/i, // Kindle Fire without Silk\n /(kf[a-z]+)( bui|\\)).+silk\\//i // Kindle Fire HD\n ],\n [MODEL, [VENDOR, AMAZON], [TYPE, TABLET]],\n [\n /((?:sd|kf)[0349hijorstuw]+)( bui|\\)).+silk\\//i // Fire Phone\n ],\n [\n [MODEL, /(.+)/g, \"Fire Phone $1\"],\n [VENDOR, AMAZON],\n [TYPE, MOBILE]\n ],\n [\n // BlackBerry\n /(playbook);[-\\w\\),; ]+(rim)/i // BlackBerry PlayBook\n ],\n [MODEL, VENDOR, [TYPE, TABLET]],\n [\n /\\b((?:bb[a-f]|st[hv])100-\\d)/i,\n /\\(bb10; (\\w+)/i // BlackBerry 10\n ],\n [MODEL, [VENDOR, BLACKBERRY], [TYPE, MOBILE]],\n [\n // Asus\n /(?:\\b|asus_)(transfo[prime ]{4,10} \\w+|eeepc|slider \\w+|nexus 7|padfone|p00[cj])/i\n ],\n [MODEL, [VENDOR, ASUS], [TYPE, TABLET]],\n [/ (z[bes]6[027][012][km][ls]|zenfone \\d\\w?)\\b/i],\n [MODEL, [VENDOR, ASUS], [TYPE, MOBILE]],\n [\n // HTC\n /(nexus 9)/i // HTC Nexus 9\n ],\n [MODEL, [VENDOR, \"HTC\"], [TYPE, TABLET]],\n [\n /(htc)[-;_ ]{1,2}([\\w ]+(?=\\)| bui)|\\w+)/i, // HTC\n\n // ZTE\n /(zte)[- ]([\\w ]+?)(?: bui|\\/|\\))/i,\n /(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\\w]*)/i // Alcatel/GeeksPhone/Nexian/Panasonic/Sony\n ],\n [VENDOR, [MODEL, /_/g, \" \"], [TYPE, MOBILE]],\n [\n // Acer\n /droid.+; ([ab][1-7]-?[0178a]\\d\\d?)/i\n ],\n [MODEL, [VENDOR, \"Acer\"], [TYPE, TABLET]],\n [\n // Meizu\n /droid.+; (m[1-5] note) bui/i,\n /\\bmz-([-\\w]{2,})/i\n ],\n [MODEL, [VENDOR, \"Meizu\"], [TYPE, MOBILE]],\n [\n // Sharp\n /\\b(sh-?[altvz]?\\d\\d[a-ekm]?)/i\n ],\n [MODEL, [VENDOR, SHARP], [TYPE, MOBILE]],\n [\n // MIXED\n /(blackberry|benq|palm(?=\\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\\w]*)/i,\n // BlackBerry/BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron\n /(hp) ([\\w ]+\\w)/i, // HP iPAQ\n /(asus)-?(\\w+)/i, // Asus\n /(microsoft); (lumia[\\w ]+)/i, // Microsoft Lumia\n /(lenovo)[-_ ]?([-\\w]+)/i, // Lenovo\n /(jolla)/i, // Jolla\n /(oppo) ?([\\w ]+) bui/i // OPPO\n ],\n [VENDOR, MODEL, [TYPE, MOBILE]],\n [\n /(archos) (gamepad2?)/i, // Archos\n /(hp).+(touchpad(?!.+tablet)|tablet)/i, // HP TouchPad\n /(kindle)\\/([\\w\\.]+)/i, // Kindle\n /(nook)[\\w ]+build\\/(\\w+)/i, // Nook\n /(dell) (strea[kpr\\d ]*[\\dko])/i, // Dell Streak\n /(le[- ]+pan)[- ]+(\\w{1,9}) bui/i, // Le Pan Tablets\n /(trinity)[- ]*(t\\d{3}) bui/i, // Trinity Tablets\n /(gigaset)[- ]+(q\\w{1,9}) bui/i, // Gigaset Tablets\n /(vodafone) ([\\w ]+)(?:\\)| bui)/i // Vodafone\n ],\n [VENDOR, MODEL, [TYPE, TABLET]],\n [\n /(surface duo)/i // Surface Duo\n ],\n [MODEL, [VENDOR, MICROSOFT], [TYPE, TABLET]],\n [\n /droid [\\d\\.]+; (fp\\du?)(?: b|\\))/i // Fairphone\n ],\n [MODEL, [VENDOR, \"Fairphone\"], [TYPE, MOBILE]],\n [\n /(u304aa)/i // AT&T\n ],\n [MODEL, [VENDOR, \"AT&T\"], [TYPE, MOBILE]],\n [\n /\\bsie-(\\w*)/i // Siemens\n ],\n [MODEL, [VENDOR, \"Siemens\"], [TYPE, MOBILE]],\n [\n /\\b(rct\\w+) b/i // RCA Tablets\n ],\n [MODEL, [VENDOR, \"RCA\"], [TYPE, TABLET]],\n [\n /\\b(venue[\\d ]{2,7}) b/i // Dell Venue Tablets\n ],\n [MODEL, [VENDOR, \"Dell\"], [TYPE, TABLET]],\n [\n /\\b(q(?:mv|ta)\\w+) b/i // Verizon Tablet\n ],\n [MODEL, [VENDOR, \"Verizon\"], [TYPE, TABLET]],\n [\n /\\b(?:barnes[& ]+noble |bn[rt])([\\w\\+ ]*) b/i // Barnes & Noble Tablet\n ],\n [MODEL, [VENDOR, \"Barnes & Noble\"], [TYPE, TABLET]],\n [/\\b(tm\\d{3}\\w+) b/i],\n [MODEL, [VENDOR, \"NuVision\"], [TYPE, TABLET]],\n [\n /\\b(k88) b/i // ZTE K Series Tablet\n ],\n [MODEL, [VENDOR, \"ZTE\"], [TYPE, TABLET]],\n [\n /\\b(nx\\d{3}j) b/i // ZTE Nubia\n ],\n [MODEL, [VENDOR, \"ZTE\"], [TYPE, MOBILE]],\n [\n /\\b(gen\\d{3}) b.+49h/i // Swiss GEN Mobile\n ],\n [MODEL, [VENDOR, \"Swiss\"], [TYPE, MOBILE]],\n [\n /\\b(zur\\d{3}) b/i // Swiss ZUR Tablet\n ],\n [MODEL, [VENDOR, \"Swiss\"], [TYPE, TABLET]],\n [\n /\\b((zeki)?tb.*\\b) b/i // Zeki Tablets\n ],\n [MODEL, [VENDOR, \"Zeki\"], [TYPE, TABLET]],\n [\n /\\b([yr]\\d{2}) b/i,\n /\\b(dragon[- ]+touch |dt)(\\w{5}) b/i // Dragon Touch Tablet\n ],\n [[VENDOR, \"Dragon Touch\"], MODEL, [TYPE, TABLET]],\n [\n /\\b(ns-?\\w{0,9}) b/i // Insignia Tablets\n ],\n [MODEL, [VENDOR, \"Insignia\"], [TYPE, TABLET]],\n [\n /\\b((nxa|next)-?\\w{0,9}) b/i // NextBook Tablets\n ],\n [MODEL, [VENDOR, \"NextBook\"], [TYPE, TABLET]],\n [\n /\\b(xtreme\\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i // Voice Xtreme Phones\n ],\n [[VENDOR, \"Voice\"], MODEL, [TYPE, MOBILE]],\n [\n /\\b(lvtel\\-)?(v1[12]) b/i // LvTel Phones\n ],\n [[VENDOR, \"LvTel\"], MODEL, [TYPE, MOBILE]],\n [\n /\\b(ph-1) /i // Essential PH-1\n ],\n [MODEL, [VENDOR, \"Essential\"], [TYPE, MOBILE]],\n [\n /\\b(v(100md|700na|7011|917g).*\\b) b/i // Envizen Tablets\n ],\n [MODEL, [VENDOR, \"Envizen\"], [TYPE, TABLET]],\n [\n /\\b(trio[-\\w\\. ]+) b/i // MachSpeed Tablets\n ],\n [MODEL, [VENDOR, \"MachSpeed\"], [TYPE, TABLET]],\n [\n /\\btu_(1491) b/i // Rotor Tablets\n ],\n [MODEL, [VENDOR, \"Rotor\"], [TYPE, TABLET]],\n [\n /(shield[\\w ]+) b/i // Nvidia Shield Tablets\n ],\n [MODEL, [VENDOR, \"Nvidia\"], [TYPE, TABLET]],\n [\n /(sprint) (\\w+)/i // Sprint Phones\n ],\n [VENDOR, MODEL, [TYPE, MOBILE]],\n [\n /(kin\\.[onetw]{3})/i // Microsoft Kin\n ],\n [\n [MODEL, /\\./g, \" \"],\n [VENDOR, MICROSOFT],\n [TYPE, MOBILE]\n ],\n [\n /droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\\)/i // Zebra\n ],\n [MODEL, [VENDOR, ZEBRA], [TYPE, TABLET]],\n [/droid.+; (ec30|ps20|tc[2-8]\\d[kx])\\)/i],\n [MODEL, [VENDOR, ZEBRA], [TYPE, MOBILE]],\n [\n ///////////////////\n // CONSOLES\n ///////////////////\n\n /(ouya)/i, // Ouya\n /(nintendo) ([wids3utch]+)/i // Nintendo\n ],\n [VENDOR, MODEL, [TYPE, CONSOLE]],\n [\n /droid.+; (shield) bui/i // Nvidia\n ],\n [MODEL, [VENDOR, \"Nvidia\"], [TYPE, CONSOLE]],\n [\n /(playstation [345portablevi]+)/i // Playstation\n ],\n [MODEL, [VENDOR, SONY], [TYPE, CONSOLE]],\n [\n /\\b(xbox(?: one)?(?!; xbox))[\\); ]/i // Microsoft Xbox\n ],\n [MODEL, [VENDOR, MICROSOFT], [TYPE, CONSOLE]],\n [\n ///////////////////\n // SMARTTVS\n ///////////////////\n\n /smart-tv.+(samsung)/i // Samsung\n ],\n [VENDOR, [TYPE, SMARTTV]],\n [/hbbtv.+maple;(\\d+)/i],\n [\n [MODEL, /^/, \"SmartTV\"],\n [VENDOR, SAMSUNG],\n [TYPE, SMARTTV]\n ],\n [\n /(nux; netcast.+smarttv|lg (netcast\\.tv-201\\d|android tv))/i // LG SmartTV\n ],\n [\n [VENDOR, LG],\n [TYPE, SMARTTV]\n ],\n [\n /(apple) ?tv/i // Apple TV\n ],\n [VENDOR, [MODEL, APPLE + \" TV\"], [TYPE, SMARTTV]],\n [\n /crkey/i // Google Chromecast\n ],\n [\n [MODEL, CHROME + \"cast\"],\n [VENDOR, GOOGLE],\n [TYPE, SMARTTV]\n ],\n [\n /droid.+aft(\\w)( bui|\\))/i // Fire TV\n ],\n [MODEL, [VENDOR, AMAZON], [TYPE, SMARTTV]],\n [\n /\\(dtv[\\);].+(aquos)/i,\n /(aquos-tv[\\w ]+)\\)/i // Sharp\n ],\n [MODEL, [VENDOR, SHARP], [TYPE, SMARTTV]],\n [\n /(bravia[\\w ]+)( bui|\\))/i // Sony\n ],\n [MODEL, [VENDOR, SONY], [TYPE, SMARTTV]],\n [\n /(mitv-\\w{5}) bui/i // Xiaomi\n ],\n [MODEL, [VENDOR, XIAOMI], [TYPE, SMARTTV]],\n [\n /\\b(roku)[\\dx]*[\\)\\/]((?:dvp-)?[\\d\\.]*)/i, // Roku\n /hbbtv\\/\\d+\\.\\d+\\.\\d+ +\\([\\w ]*; *(\\w[^;]*);([^;]*)/i // HbbTV devices\n ],\n [\n [VENDOR, trim],\n [MODEL, trim],\n [TYPE, SMARTTV]\n ],\n [\n /\\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\\b/i // SmartTV from Unidentified Vendors\n ],\n [[TYPE, SMARTTV]],\n [\n ///////////////////\n // WEARABLES\n ///////////////////\n\n /((pebble))app/i // Pebble\n ],\n [VENDOR, MODEL, [TYPE, WEARABLE]],\n [\n /droid.+; (glass) \\d/i // Google Glass\n ],\n [MODEL, [VENDOR, GOOGLE], [TYPE, WEARABLE]],\n [/droid.+; (wt63?0{2,3})\\)/i],\n [MODEL, [VENDOR, ZEBRA], [TYPE, WEARABLE]],\n [\n /(quest( 2)?)/i // Oculus Quest\n ],\n [MODEL, [VENDOR, FACEBOOK], [TYPE, WEARABLE]],\n [\n ///////////////////\n // EMBEDDED\n ///////////////////\n\n /(tesla)(?: qtcarbrowser|\\/[-\\w\\.]+)/i // Tesla\n ],\n [VENDOR, [TYPE, EMBEDDED]],\n [\n ////////////////////\n // MIXED (GENERIC)\n ///////////////////\n\n /droid .+?; ([^;]+?)(?: bui|\\) applew).+? mobile safari/i // Android Phones from Unidentified Vendors\n ],\n [MODEL, [TYPE, MOBILE]],\n [\n /droid .+?; ([^;]+?)(?: bui|\\) applew).+?(?! mobile) safari/i // Android Tablets from Unidentified Vendors\n ],\n [MODEL, [TYPE, TABLET]],\n [\n /\\b((tablet|tab)[;\\/]|focus\\/\\d(?!.+mobile))/i // Unidentifiable Tablet\n ],\n [[TYPE, TABLET]],\n [\n /(phone|mobile(?:[;\\/]| [ \\w\\/\\.]*safari)|pda(?=.+windows ce))/i // Unidentifiable Mobile\n ],\n [[TYPE, MOBILE]],\n [\n /(android[-\\w\\. ]{0,9});.+buil/i // Generic Android Device\n ],\n [MODEL, [VENDOR, \"Generic\"]]\n ],\n\n engine: [\n [\n /windows.+ edge\\/([\\w\\.]+)/i // EdgeHTML\n ],\n [VERSION, [NAME, EDGE + \"HTML\"]],\n [\n /webkit\\/537\\.36.+chrome\\/(?!27)([\\w\\.]+)/i // Blink\n ],\n [VERSION, [NAME, \"Blink\"]],\n [\n /(presto)\\/([\\w\\.]+)/i, // Presto\n /(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\\/([\\w\\.]+)/i, // WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m/Goanna\n /ekioh(flow)\\/([\\w\\.]+)/i, // Flow\n /(khtml|tasman|links)[\\/ ]\\(?([\\w\\.]+)/i, // KHTML/Tasman/Links\n /(icab)[\\/ ]([23]\\.[\\d\\.]+)/i // iCab\n ],\n [NAME, VERSION],\n [\n /rv\\:([\\w\\.]{1,9})\\b.+(gecko)/i // Gecko\n ],\n [VERSION, NAME]\n ],\n\n os: [\n [\n // Windows\n /microsoft (windows) (vista|xp)/i // Windows (iTunes)\n ],\n [NAME, VERSION],\n [\n /(windows) nt 6\\.2; (arm)/i, // Windows RT\n /(windows (?:phone(?: os)?|mobile))[\\/ ]?([\\d\\.\\w ]*)/i, // Windows Phone\n /(windows)[\\/ ]?([ntce\\d\\. ]+\\w)(?!.+xbox)/i\n ],\n [NAME, [VERSION, strMapper, windowsVersionMap]],\n [/(win(?=3|9|n)|win 9x )([nt\\d\\.]+)/i],\n [\n [NAME, \"Windows\"],\n [VERSION, strMapper, windowsVersionMap]\n ],\n [\n // iOS/macOS\n /ip[honead]{2,4}\\b(?:.*os ([\\w]+) like mac|; opera)/i, // iOS\n /cfnetwork\\/.+darwin/i\n ],\n [\n [VERSION, /_/g, \".\"],\n [NAME, \"iOS\"]\n ],\n [\n /(mac os x) ?([\\w\\. ]*)/i,\n /(macintosh|mac_powerpc\\b)(?!.+haiku)/i // Mac OS\n ],\n [\n [NAME, \"Mac OS\"],\n [VERSION, /_/g, \".\"]\n ],\n [\n // Mobile OSes\n /droid ([\\w\\.]+)\\b.+(android[- ]x86|harmonyos)/i // Android-x86/HarmonyOS\n ],\n [VERSION, NAME],\n [\n // Android/WebOS/QNX/Bada/RIM/Maemo/MeeGo/Sailfish OS\n /(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\\/ ]?([\\w\\.]*)/i,\n /(blackberry)\\w*\\/([\\w\\.]*)/i, // Blackberry\n /(tizen|kaios)[\\/ ]([\\w\\.]+)/i, // Tizen/KaiOS\n /\\((series40);/i // Series 40\n ],\n [NAME, VERSION],\n [\n /\\(bb(10);/i // BlackBerry 10\n ],\n [VERSION, [NAME, BLACKBERRY]],\n [\n /(?:symbian ?os|symbos|s60(?=;)|series60)[-\\/ ]?([\\w\\.]*)/i // Symbian\n ],\n [VERSION, [NAME, \"Symbian\"]],\n [\n /mozilla\\/[\\d\\.]+ \\((?:mobile|tablet|tv|mobile; [\\w ]+); rv:.+ gecko\\/([\\w\\.]+)/i // Firefox OS\n ],\n [VERSION, [NAME, FIREFOX + \" OS\"]],\n [\n /web0s;.+rt(tv)/i,\n /\\b(?:hp)?wos(?:browser)?\\/([\\w\\.]+)/i // WebOS\n ],\n [VERSION, [NAME, \"webOS\"]],\n [\n // Google Chromecast\n /crkey\\/([\\d\\.]+)/i // Google Chromecast\n ],\n [VERSION, [NAME, CHROME + \"cast\"]],\n [\n /(cros) [\\w]+ ([\\w\\.]+\\w)/i // Chromium OS\n ],\n [[NAME, \"Chromium OS\"], VERSION],\n [\n // Console\n /(nintendo|playstation) ([wids345portablevuch]+)/i, // Nintendo/Playstation\n /(xbox); +xbox ([^\\);]+)/i, // Microsoft Xbox (360, One, X, S, Series X, Series S)\n\n // Other\n /\\b(joli|palm)\\b ?(?:os)?\\/?([\\w\\.]*)/i, // Joli/Palm\n /(mint)[\\/\\(\\) ]?(\\w*)/i, // Mint\n /(mageia|vectorlinux)[; ]/i, // Mageia/VectorLinux\n /([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\\/ ]?(?!chrom|package)([-\\w\\.]*)/i,\n // Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware/Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus/Raspbian/Plan9/Minix/RISCOS/Contiki/Deepin/Manjaro/elementary/Sabayon/Linspire\n /(hurd|linux) ?([\\w\\.]*)/i, // Hurd/Linux\n /(gnu) ?([\\w\\.]*)/i, // GNU\n /\\b([-frentopcghs]{0,5}bsd|dragonfly)[\\/ ]?(?!amd|[ix346]{1,2}86)([\\w\\.]*)/i, // FreeBSD/NetBSD/OpenBSD/PC-BSD/GhostBSD/DragonFly\n /(haiku) (\\w+)/i // Haiku\n ],\n [NAME, VERSION],\n [\n /(sunos) ?([\\w\\.\\d]*)/i // Solaris\n ],\n [[NAME, \"Solaris\"], VERSION],\n [\n /((?:open)?solaris)[-\\/ ]?([\\w\\.]*)/i, // Solaris\n /(aix) ((\\d)(?=\\.|\\)| )[\\w\\.])*/i, // AIX\n /\\b(beos|os\\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i, // BeOS/OS2/AmigaOS/MorphOS/OpenVMS/Fuchsia/HP-UX\n /(unix) ?([\\w\\.]*)/i // UNIX\n ],\n [NAME, VERSION]\n ]\n };\n\n /////////////////\n // Constructor\n ////////////////\n\n var UAParser = function (ua, extensions) {\n if (typeof ua === OBJ_TYPE) {\n extensions = ua;\n ua = undefined;\n }\n\n if (!(this instanceof UAParser)) {\n return new UAParser(ua, extensions).getResult();\n }\n\n var _ua =\n ua ||\n (typeof window !== UNDEF_TYPE &&\n window.navigator &&\n window.navigator.userAgent ? window.navigator.userAgent : EMPTY);\n var _rgxmap = extensions ? extend(regexes, extensions) : regexes;\n\n this.getBrowser = function () {\n var _browser = {};\n _browser[NAME] = undefined;\n _browser[VERSION] = undefined;\n rgxMapper.call(_browser, _ua, _rgxmap.browser);\n _browser.major = majorize(_browser.version);\n return _browser;\n };\n this.getCPU = function () {\n var _cpu = {};\n _cpu[ARCHITECTURE] = undefined;\n rgxMapper.call(_cpu, _ua, _rgxmap.cpu);\n return _cpu;\n };\n this.getDevice = function () {\n var _device = {};\n _device[VENDOR] = undefined;\n _device[MODEL] = undefined;\n _device[TYPE] = undefined;\n rgxMapper.call(_device, _ua, _rgxmap.device);\n return _device;\n };\n this.getEngine = function () {\n var _engine = {};\n _engine[NAME] = undefined;\n _engine[VERSION] = undefined;\n rgxMapper.call(_engine, _ua, _rgxmap.engine);\n return _engine;\n };\n this.getOS = function () {\n var _os = {};\n _os[NAME] = undefined;\n _os[VERSION] = undefined;\n rgxMapper.call(_os, _ua, _rgxmap.os);\n return _os;\n };\n this.getResult = function () {\n return {\n ua: this.getUA(),\n browser: this.getBrowser(),\n engine: this.getEngine(),\n os: this.getOS(),\n device: this.getDevice(),\n cpu: this.getCPU()\n };\n };\n this.getUA = function () {\n return _ua;\n };\n this.setUA = function (ua) {\n _ua =\n typeof ua === STR_TYPE && ua.length > UA_MAX_LENGTH ? trim(ua, UA_MAX_LENGTH) : ua;\n return this;\n };\n this.setUA(_ua);\n return this;\n };\n\n UAParser.VERSION = LIBVERSION;\n UAParser.BROWSER = enumerize([NAME, VERSION, MAJOR]);\n UAParser.CPU = enumerize([ARCHITECTURE]);\n UAParser.DEVICE = enumerize([\n MODEL,\n VENDOR,\n TYPE,\n CONSOLE,\n MOBILE,\n SMARTTV,\n TABLET,\n WEARABLE,\n EMBEDDED\n ]);\n UAParser.ENGINE = UAParser.OS = enumerize([NAME, VERSION]);\n\n ///////////\n // Export\n //////////\n\n // check js environment\n if (typeof exports !== UNDEF_TYPE) {\n // nodejs env\n if (typeof module !== UNDEF_TYPE && module.exports) {\n exports = module.exports = UAParser;\n }\n exports.UAParser = UAParser;\n } else {\n // requirejs env (optional)\n if (typeof define === FUNC_TYPE && define.amd) {\n define(function () {\n return UAParser;\n });\n } else if (typeof window !== UNDEF_TYPE) {\n // browser env\n window.UAParser = UAParser;\n }\n }\n\n // jQuery/Zepto specific (optional)\n // Note:\n // In AMD env the global scope should be kept clean, but jQuery is an exception.\n // jQuery always exports to global scope, unless jQuery.noConflict(true) is used,\n // and we should catch that.\n var $ = typeof window !== UNDEF_TYPE && (window.jQuery || window.Zepto);\n if ($ && !$.ua) {\n var parser = new UAParser();\n $.ua = parser.getResult();\n $.ua.get = function () {\n return parser.getUA();\n };\n $.ua.set = function (ua) {\n parser.setUA(ua);\n var result = parser.getResult();\n for (var prop in result) {\n $.ua[prop] = result[prop];\n }\n };\n }\n})(typeof window === \"object\" ? window : this);\n","\nexport enum FinancialAccountTypes {\n SPENDING = 'spending',\n SAVINGS = 'savings',\n LOANS = 'loans',\n}\n\nexport interface FinancialAccountUserInfo {\n canInstantAccountLink?: boolean;\n referenceId?: number;\n baasStatus?: string;\n kycStatus?: string;\n fraudStatus?: string;\n ofacStatus?: string;\n isLocked?: boolean;\n canLinkAccount?: boolean;\n canVerifyAccount?: boolean;\n}\n\nexport interface FinancialAccountFundsSource {\n type: string,\n autoSaveSchedule: AutoSaveSchedule,\n nextAvailableDate: string\n}\n\nexport interface FinancialAccountServiceability {\n status: ServiceabilityStatus,\n accessType: ServiceabilityAccessType,\n isLocked: boolean,\n lastModifiedDate?: Date,\n mustDelete: boolean;\n mustRepair: boolean;\n}\n\nexport interface AutoSaveSchedule {\n status: AutoSaveScheduleStatus,\n nextDepositDate?: string,\n nextDepositAmount?: number,\n scheduleType?: string\n}\n\nexport enum AutoSaveScheduleStatus {\n ACTIVE = 'active',\n NOTSTARTED = 'notStarted',\n PAUSED = 'paused',\n DISABLED = 'disabled'\n}\nexport enum ServiceabilityStatus {\n OPEN = 'Open',\n INACTIVE = 'Inactive',\n DORMANT = 'Dormant',\n PENDINGOPEN = 'PendingOpen',\n PENDINGCLOSED = 'PendingClosed',\n CLOSED = 'Closed',\n UNVERIFIED = 'Unverified',\n VERIFYLOCKED = 'VerifyLocked'\n}\n\nexport enum ServiceabilityAccessType {\n FULL = 'FULL',\n RDONLY = 'RDONLY',\n NONE = 'NONE'\n}\n\nexport interface CoreAccountsInterface {\n availableBalance: number;\n accountId: number,\n accountDisplayName: string,\n accountBalance: number,\n accountNumberMasked: string,\n accountType: 'Savings' | 'Spending' | FinancialAccountTypes.SAVINGS | FinancialAccountTypes.SPENDING,\n fundsSource?: FinancialAccountFundsSource,\n serviceability?: FinancialAccountServiceability,\n isExternal: boolean,\n card?: NewSpendingCard,\n}\n\nexport interface FinancialAccountTransactionsRequestConfig {\n offset: number,\n limit: number,\n lastTransactionId?: number|string\n}\n\nexport interface NewSpendingCard {\n cardId: string,\n cardNumberMasked: string,\n status: CardStatus,\n expireMonth: number,\n expireYear: number,\n vendorTypeCode: string,\n createdDate: string,\n lockReasonTypeCode: string,\n lockTypeCode: string,\n verifiedDate: string\n}\n\nexport interface FinancialAccountPayload<T> {\n payload: {\n user: FinancialAccountUserInfo;\n } & T;\n}\n\nexport interface FinancialAccountTransactionsPayload {\n payload: FinancialAccountTransactionsResponse;\n}\n\nexport interface FinancialAccountTransactionsResponse {\n transactions: FinancialAccountTransaction[];\n resultSet: TransactionsResultSet;\n}\n\nexport interface FinancialAccountTransaction {\n transactionId: number;\n createdDate: string; // ISO 8601 date string\n amount: string;\n description: string;\n statusCopyKey: string;\n type: string;\n merchant: string;\n}\n\nexport interface TransactionsResultSet {\n count: number;\n offset: number;\n limit: number;\n lastTransactionId: number;\n allFetched: boolean;\n}\n\nexport interface TransactionPagination {\n pages: TransactionPaginationItem[]\n}\n\nexport interface TransactionPaginationItem {\n page: number;\n transactions: FinancialAccountTransaction[]\n}\n\nexport interface FinancialAccountDetailsPayload {\n payload: FinancialAccountDetails\n}\n\nexport interface FinancialAccountDetails {\n accountId: string;\n accountNumber: string;\n routingNumber: string;\n bank: string;\n accountBalance: number;\n availableBalance: number;\n accountType: string;\n contactInfo: unknown;\n}\n\n\nexport enum CardStatus {\n Verified = \"VERIFIED\",\n Denied = \"DENIED\",\n Pending = \"PENDING\",\n Expired = \"EXPIRED\",\n Archived = \"ARCHIVED\",\n HotListed = \"HOT_LISTED\",\n Reissued = \"REISSUED\",\n PendingVerification = \"PENDING_VERIFICATION\",\n ReissuedPendingVerification = \"REISSUED_PENDING_VERIFICATION\",\n Initiated = \"INITIATED\"\n}\n\nexport interface AccountServiceLinks {\n labelKey: string;\n clickEvent: () => void;\n featureFlag?: string | string[] | undefined;\n}\n","import { Injectable } from '@angular/core';\nimport {from, Observable, of, Subject} from \"rxjs\";\nimport {\n BsApiService, BsChatService, FeatureFlagService, GenericResponseCode,\n GenericResponseResult,\n SimpleGlobalModalService\n} from '@brightside-web/desktop/data-access/core-services';\nimport {FinancialAccountPayload, FinancialAccountTypes} from \"@brightside-web/desktop/feature/financial-accounts-core\";\nimport {catchError, tap} from \"rxjs/operators\";\nimport { Intercom } from 'ng-intercom';\nimport {Router} from \"@angular/router\";\nimport { KnownFeatureFlags } from '@brightside-web/desktop/data-access/shared';\n\nexport enum AccountCreationSteps {\n INTRO = 'intro',\n VERIFICATION = 'verification',\n CONSENTS = 'consents',\n CREATE = 'create',\n COMPLETED = 'completed',\n KYC = 'kyc',\n AUTOSAVE = 'autosave',\n KYC_VERIFICATION = 'kyc-verification'\n}\n\nexport enum AccountCreationResponses {\n ACCOUNT_ALREADY_EXISTS = 'ACCOUNT_ALREADY_EXISTS',\n USER_CREATION_FAILED = 'USER_CREATION_FAILED',\n ACCOUNT_CREATION_FAILED = 'ACCOUNT_CREATION_FAILED',\n RETRY = 'RETRY',\n USER_NOT_FOUND = 'USER_NOT_FOUND',\n KYC_DENIED = 'KYC_DENIED',\n KYC_MANUAL_REVIEW = 'KYC_MANUAL_REVIEW',\n KYC_AUTOMATED_REVIEW = 'KYC_AUTOMATED_REVIEW',\n KYC_RESUBMIT_ADDRESS = 'KYC_RESUBMIT_ADDRESS',\n KYC_RESUBMIT_IMAGE = 'KYC_RESUBMIT_IMAGE',\n KYC_VERIFIED = 'KYC_VERIFIED',\n PRODUCT_PENDING = 'PRODUCT_PENDING'\n}\n\nexport enum KYCResponseOrigin {\n ACCOUNT_CREATION,\n KYC_VERIFICATION\n}\n\nexport type AccountCreationResponse = AccountCreationResponses | GenericResponseCode;\n\n@Injectable()\nexport class FinancialAccountsCreationService {\n\n // current step is purposely session only\n currentStep : AccountCreationSteps = AccountCreationSteps.INTRO;\n accountType: FinancialAccountTypes;\n\n creationStepsOrder : AccountCreationSteps[] = [\n AccountCreationSteps.INTRO,\n AccountCreationSteps.VERIFICATION,\n AccountCreationSteps.CONSENTS,\n AccountCreationSteps.CREATE,\n AccountCreationSteps.KYC,\n AccountCreationSteps.COMPLETED\n ];\n\n kycResponseOrigin: KYCResponseOrigin;\n accountCreationResponse: AccountCreationResponses;\n\n apiName = 'api-mobile';\n\n private _accountCreatedResp = new Subject<AccountCreationResponse>();\n public readonly accountCreatedResp: Observable<AccountCreationResponse> = this._accountCreatedResp.asObservable();\n\n constructor(\n private bsApi: BsApiService,\n private modalSvc: SimpleGlobalModalService,\n private intercom: Intercom,\n private router: Router,\n private _bsChatService: BsChatService,\n private _featureFlagSvc: FeatureFlagService,\n ) {}\n\n createAccount<T>(accountType: FinancialAccountTypes): Observable<(FinancialAccountPayload<T>) & GenericResponseResult> {\n this.accountType = accountType;\n return this.bsApi.post<(FinancialAccountPayload<T>) & GenericResponseResult>(\n this.apiName,\n `/accounts/${accountType}`,\n ).pipe(\n tap(resp => {\n this.kycResponseOrigin = KYCResponseOrigin.ACCOUNT_CREATION;\n this.checkResultCode(resp.result.code);\n }),\n catchError((err: Error) => {\n const msg = err.message.toLowerCase();\n this.sharedErrors(msg);\n return from([]);\n })\n );\n }\n\n advanceStep(step: AccountCreationSteps) {\n const stepIndex = this.creationStepsOrder.indexOf(step);\n if (stepIndex !== this.creationStepsOrder.length - 1) {\n this.currentStep = this.creationStepsOrder[stepIndex + 1];\n }\n }\n\n retractStep(step: AccountCreationSteps) {\n const stepIndex = this.creationStepsOrder.indexOf(step);\n if (stepIndex !== 0) {\n this.currentStep = this.creationStepsOrder[stepIndex - 1];\n }\n }\n\n isStepBeforeCurrent(step: AccountCreationSteps) {\n return this.creationStepsOrder.indexOf(step) <= this.creationStepsOrder.indexOf(this.currentStep);\n }\n\n kycCheck(documentUuid: string) : Observable<GenericResponseResult>{\n const product = this.accountType;\n const payload = this.accountCreationResponse === AccountCreationResponses.KYC_MANUAL_REVIEW ?\n { documentUuid, product } : { documentUuid }\n return this.bsApi.post(\n this.apiName,\n '/accounts/kyc/verification',\n payload\n ).pipe(\n tap(resp => {\n this.kycResponseOrigin = KYCResponseOrigin.KYC_VERIFICATION;\n this.checkResultCode(resp.result.code);\n }),\n catchError((err: Error) => {\n const msg = err.message.toLowerCase();\n this.sharedErrors(msg);\n return from([]);\n })\n );\n }\n\n sharedErrors(msg: string) {\n switch (msg) {\n case 'helix_creation_failed':\n this.modalSvc.createModal(\n {\n title: 'error_general_title'.toUpperCase(),\n contentKey: 'error_general_desc'.toUpperCase(),\n displayCloseButton: true,\n eventName: \"helix_creation_failed\",\n isError: true,\n size: \"medium\",\n ctaKey: 'RETRY',\n ctaAction: () => {\n this._accountCreatedResp.next(AccountCreationResponses.RETRY);\n },\n closeRoute: ['home']\n }\n );\n break;\n case 'kyc_denied':\n this.modalSvc.createModal(\n {\n title: 'KYC_DENIED_TITLE',\n contentKey: 'KYC_DENIED_DESC',\n headerImagePath: './assets/hourglass.png',\n displayCloseButton: true,\n eventName: \"kyc_denied\",\n isError: false,\n size: \"medium\",\n closeRoute: ['home']\n }\n );\n break;\n case 'kyc_manual_review':\n this._featureFlagSvc.getFlag<boolean>(KnownFeatureFlags.ENABLESOCUREMANUALREVIEW).pipe(\n tap(socureManualReview => {\n if (socureManualReview) {\n this.currentStep = AccountCreationSteps.KYC;\n this.accountCreationResponse = AccountCreationResponses.KYC_MANUAL_REVIEW;\n if (this.kycResponseOrigin === KYCResponseOrigin.ACCOUNT_CREATION) {\n this.router.navigate(['accounts', this.accountType, 'creation', AccountCreationSteps.KYC]);\n } else {\n this.router.navigate(['accounts', this.accountType, 'creation', AccountCreationSteps.KYC_VERIFICATION]);\n }\n } else {\n this.modalSvc.createModal(\n {\n title: 'KYC_MANUAL_REVIEW_TITLE',\n contentKey: 'KYC_MANUAL_REVIEW_DESC',\n headerImagePath: './assets/warning-exclamation.png',\n displayCloseButton: true,\n eventName: \"kyc_manual_review\",\n isError: false,\n size: \"medium\",\n ctaKey: 'KYC_MANUAL_REVIEW_CTA1',\n ctaAction: () => {\n this._bsChatService.showChat();\n this.router.navigate(['home']);\n this.modalSvc.clearModal();\n },\n closeAction: () => {\n this.router.navigate(['home']);\n this.modalSvc.clearModal();\n }\n }\n );\n }\n })\n ).subscribe();\n break;\n case 'kyc_resubmit_address':\n this.modalSvc.createModal(\n {\n title: 'KYC_RESUBMIT_ADDRESS_TITLE',\n contentKey: 'KYC_RESUBMIT_ADDRESS_DESC',\n headerImagePath: './assets/warning-exclamation.png',\n displayCloseButton: true,\n eventName: \"kyc_resubmit_address\",\n isError: false,\n size: \"medium\",\n ctaKey: 'BUTTON_CONTINUE',\n ctaAction: () => {\n this.router.navigate(['accounts', this.accountType, 'creation', AccountCreationSteps.VERIFICATION]);\n },\n closeRoute: ['home']\n }\n );\n break;\n case 'kyc_automated_review':\n this.currentStep = AccountCreationSteps.KYC;\n this.accountCreationResponse = AccountCreationResponses.KYC_AUTOMATED_REVIEW;\n if (this.kycResponseOrigin === KYCResponseOrigin.ACCOUNT_CREATION) {\n this.router.navigate(['accounts', this.accountType, 'creation', AccountCreationSteps.KYC]);\n } else {\n this.router.navigate(['accounts', this.accountType, 'creation', AccountCreationSteps.KYC_VERIFICATION]);\n }\n break;\n default:\n this.modalSvc.createModal(\n {\n title: 'error_general_title'.toUpperCase(),\n contentKey: 'error_general_desc'.toUpperCase(),\n displayCloseButton: true,\n eventName: \"network_error\",\n isError: true,\n size: \"medium\",\n ctaKey: 'TRY_AGAIN',\n ctaAction: () => {\n this._accountCreatedResp.next(AccountCreationResponses.RETRY);\n },\n closeRoute: ['home']\n }\n );\n break;\n }\n }\n\n checkResultCode(code: string) {\n switch (code) {\n case AccountCreationResponses.ACCOUNT_CREATION_FAILED:\n case AccountCreationResponses.USER_CREATION_FAILED:\n throw new Error('helix_creation_failed');\n break;\n case AccountCreationResponses.KYC_DENIED:\n throw new Error(AccountCreationResponses.KYC_DENIED);\n break;\n case AccountCreationResponses.KYC_MANUAL_REVIEW:\n throw new Error(AccountCreationResponses.KYC_MANUAL_REVIEW);\n break;\n case AccountCreationResponses.KYC_VERIFIED:\n this.currentStep = AccountCreationSteps.COMPLETED;\n this.router.navigate(['accounts', this.accountType, 'dashboard']);\n break;\n case AccountCreationResponses.KYC_RESUBMIT_ADDRESS:\n throw new Error(AccountCreationResponses.KYC_RESUBMIT_ADDRESS);\n break;\n case AccountCreationResponses.KYC_AUTOMATED_REVIEW:\n throw new Error(AccountCreationResponses.KYC_AUTOMATED_REVIEW);\n break;\n case AccountCreationResponses.PRODUCT_PENDING:\n this.router.navigate(['accounts', this.accountType, 'creation', AccountCreationSteps.KYC_VERIFICATION]);\n break;\n default:\n break;\n }\n\n }\n\n setAccountType(accountType: FinancialAccountTypes) {\n if (!this.accountType) this.accountType = accountType;\n }\n}\n","import { Component, OnInit } from '@angular/core';\nimport {ActivatedRoute, Router} from \"@angular/router\";\n\nimport {\n AccountCreationResponses,\n FinancialAccountsCreationService\n} from \"../services/financial-accounts-creation.service\";\nimport {Observable} from \"rxjs\";\nimport {take} from \"rxjs/operators\";\nimport {GenericResponseCode} from \"@brightside-web/desktop/data-access/core-services\";\nimport {FinancialAccountTypes} from \"../models/financial-account-models\";\n\n\n@Component({\n selector: 'brightside-web-financial-account-creation-waiting',\n templateUrl: './financial-account-creation-waiting.component.html',\n styleUrls: ['./financial-account-creation-waiting.component.css'],\n})\nexport class FinancialAccountCreationWaitingComponent implements OnInit {\n\n createType:FinancialAccountTypes;\n\n accountCreatedResp: Observable<AccountCreationResponses | GenericResponseCode> = this.faCreateSvc.accountCreatedResp;\n\n constructor(\n private route: ActivatedRoute,\n private router: Router,\n private faCreateSvc: FinancialAccountsCreationService) {\n }\n\n ngOnInit(): void {\n\n this.accountCreatedResp.pipe(\n take(1)\n )\n .subscribe( resp => {\n // if (resp) {\n // this.router.navigate(['../dashboard'],{ relativeTo: this.route });\n // } else {\n // throw new Error('oh no');\n // }\n });\n\n this.createType = this.route.snapshot.data['productType'];\n if (Object.values(FinancialAccountTypes).includes(this.createType)) {\n this.faCreateSvc.createAccount(this.createType);\n } else {\n throw new Error('invalid account type');\n }\n }\n\n}\n","<bw-action-article [brightsideWebFb]=\"{ event_name: 'financial_account_creation' }\">\n <div content-section>\n <div class=\"flex-column space-center\">\n <bw-spinner></bw-spinner>\n <typography text-medium-semibold>\n {{ 'SENDING_INFORMATION' | translate }}\n </typography>\n </div>\n </div>\n</bw-action-article>\n","import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'brightside-web-financial-accounts-core-main',\n templateUrl: './financial-accounts-core-main.component.html',\n styleUrls: ['./financial-accounts-core-main.component.css']\n})\nexport class FinancialAccountsCoreMainComponent implements OnInit {\n\n constructor() { }\n\n ngOnInit(): void {\n }\n\n}\n","<p>financial-accounts-core-main works!</p>\n<router-outlet></router-outlet>\n","import { Injectable } from '@angular/core';\nimport {BsApiService, GenericResponseResult} from \"@brightside-web/desktop/data-access/core-services\";\nimport {Observable} from \"rxjs\";\nimport {\n FinancialAccountDetails, FinancialAccountDetailsPayload,\n FinancialAccountPayload,\n FinancialAccountTypes,\n} from \"../models/financial-account-models\";\n\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class FinancialAccountsCoreService {\n\n apiName = 'api-mobile';\n\n constructor(private bsApi: BsApiService) {}\n\n getAccountsByType<T>(accountType: FinancialAccountTypes): Observable<(FinancialAccountPayload<T>) & GenericResponseResult> {\n return this.bsApi.get<(FinancialAccountPayload<T>)>(this.apiName, `/accounts/${accountType}`);\n }\n\n getAccountById<T>(accountType: FinancialAccountTypes, accountId: number): Observable<(FinancialAccountPayload<T>) & GenericResponseResult> {\n return this.bsApi.get<(FinancialAccountPayload<T>)>(this.apiName, `/accounts/${accountType}/${accountId}`);\n }\n\n getAccountDetails(accountType: FinancialAccountTypes, accountId: number) : Observable<FinancialAccountDetailsPayload & GenericResponseResult> {\n return this.bsApi.get<FinancialAccountDetailsPayload>(this.apiName, `/accounts/${accountType}/${accountId}/details`);\n }\n\n}\n","import { Renderer2, Inject, Injectable, RendererFactory2 } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\n\n\n@Injectable()\nexport class SocureService {\n SCRIPT_PATH = 'https://websdk.socure.com/bundle.js';\n\n socureErrorType = {\n 7011: 'Invalid Key',\n 7014: 'Session Expired',\n 7021: 'Initiate Session Failed',\n 7022: 'Document Upload Failed',\n 7101: 'Socure Key Empty',\n 7102: 'Camera Permission Disabled',\n 7103: 'No Internet Connection',\n 7104: 'Scan Canceled By User',\n 7106: 'Camera Error',\n 7107: 'Unknown Error',\n 7110: 'Consent Declined',\n };\n\n private renderer: Renderer2;\n\n constructor(\n @Inject(DOCUMENT) private document: Document,\n private _rendererFactory: RendererFactory2\n ) { \n this.renderer = _rendererFactory.createRenderer(null, null);\n }\n\n loadSocureScript(): HTMLScriptElement {\n const script = this.renderer.createElement('script');\n script.type = 'text/javascript';\n script.src = this.SCRIPT_PATH;\n this.renderer.appendChild(this.document.body, script);\n return script;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RouterModule, Routes } from '@angular/router';\nimport { FinancialAccountCreationWaitingComponent } from './financial-account-creation-waiting/financial-account-creation-waiting.component';\nimport { FinancialAccountCreationErrorComponent } from './financial-account-creation-error/financial-account-creation-error.component';\nimport { FinancialAccountsCoreMainComponent } from './financial-accounts-core-main/financial-accounts-core-main.component';\nimport { FinancialAccountsTransferFundsComponent } from './financial-accounts-transfer-funds/financial-accounts-transfer-funds.component';\nimport { FinancialAccountsCreationService } from './services/financial-accounts-creation.service';\nimport { FinancialAccountsCoreService } from './services/financial-accounts-core.service';\nimport { FinancialAccountsExternalAccountComponent } from './financial-accounts-external-account/financial-accounts-external-account.component';\nimport { SharedDesktopModule } from '@brightside-web/shared/desktop';\nimport { BrightsideUiModule } from '@brightside/brightside-ui';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { FinancialCoreKYCComponent } from './socure/socure.component';\nimport { MicroUiMoleculeModule } from 'libs/micro-ui/molecule/src/lib/micro-ui-molecule.module';\nimport { SocureService } from './services/socure.service';\nimport { FinancialCoreKYCVerificationInProgressComponent } from './kyc-verification-in-progress/kyc-verification-in-progress.component';\n\nconst ROUTES: Routes = [\n {\n path: '',\n component: FinancialAccountsCoreMainComponent,\n children: [\n {\n path: 'create/:type',\n component: FinancialAccountCreationWaitingComponent,\n },\n ]\n },\n];\n\n@NgModule({\n imports: [\n CommonModule,\n BrightsideUiModule,\n RouterModule.forChild(ROUTES),\n MicroUiMoleculeModule,\n SharedDesktopModule,\n TranslateModule,\n ],\n declarations: [\n FinancialCoreKYCComponent,\n FinancialCoreKYCVerificationInProgressComponent,\n FinancialAccountCreationWaitingComponent,\n FinancialAccountCreationErrorComponent,\n FinancialAccountsCoreMainComponent,\n FinancialAccountsTransferFundsComponent,\n FinancialAccountsExternalAccountComponent,\n ],\n providers: [SocureService, FinancialAccountsCreationService, FinancialAccountsCoreService],\n})\nexport class DesktopFeatureFinancialAccountsCoreModule {}\n","import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'brightside-web-financial-account-creation-error',\n templateUrl: './financial-account-creation-error.component.html',\n styleUrls: ['./financial-account-creation-error.component.css']\n})\nexport class FinancialAccountCreationErrorComponent implements OnInit {\n\n constructor() { }\n\n ngOnInit(): void {\n }\n\n}\n","<p>account-creation-error works!</p>\n","import { Injectable } from '@angular/core';\nimport {\n ActivatedRouteSnapshot,\n CanActivate,\n Router,\n RouterStateSnapshot,\n UrlTree\n} from '@angular/router';\nimport { from, map, Observable, of } from 'rxjs';\nimport {FinancialAccountsCreationService} from \"./services/financial-accounts-creation.service\";\nimport { VerificationStatusEnum, VerificationStatusService } from '@brightside-web/desktop/data-access/shared';\n\n@Injectable()\nexport class FinancialAccountCreationGuard implements CanActivate {\n\n constructor(\n private faCreateSvc: FinancialAccountsCreationService,\n private router: Router,\n private verificationStatusSvc: VerificationStatusService\n ) {\n }\n\n /**\n * Don't allow users to access creation steps ahead of their current step\n * @param route\n * @param state\n */\n canActivate(\n route: ActivatedRouteSnapshot,\n state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {\n\n return this.verificationStatusSvc.getEmploymentVerificationStatus().pipe(\n map(response=>{\n if (response.employment_data_verification_status.status !== VerificationStatusEnum.VERIFIED) {\n this.router.navigate(['/verification/status']);\n return false;\n } else if (route.data['creationStep']) {\n if (this.faCreateSvc.isStepBeforeCurrent(route.data['creationStep'])) {\n return true;\n }\n }\n this.router.navigate(['home']);\n return false;\n })\n )\n }\n\n}\n","<bw-action-article [brightsideWebFb]=\"{ event_name: 'kyc_intro' }\">\n <div header-actions>\n <ui-nav-exit-back\n [trackingDetail]=\"{ event_name: 'kyc_intro' }\"\n (exitActionHandler)=\"goHome()\"\n ></ui-nav-exit-back>\n </div>\n <div content-section>\n <div class=\"mb-sm\">\n <img src=\"../assets/kyc-cameras.png\" />\n </div>\n <div class=\"copy-wrapper\">\n <typography title-medium class=\"mb-sm\" color=\"var(--primary-text)\">\n <div [innerHTML]=\"'KYC_INTRO_TITLE' | translate\"></div>\n </typography>\n <typography text-medium-regular class=\"mb-md\" color=\"var(--secondary-text)\">\n <div [innerHTML]=\"'KYC_INTRO_DESC' | translate\"></div>\n </typography>\n <typography text-xsmall-regular class=\"mb-md\" color=\"var(--secondary-text)\">\n <div [innerHTML]=\"'KYC_INTRO_INFO' | translate\"></div>\n </typography>\n </div>\n </div>\n\n <div footer-actions>\n <div class=\"flex-row row-reverse\">\n <button\n bw-button\n type=\"submit\"\n (click)=\"showSocureModal()\"\n [brightsideWebFb]=\"{ event_name: 'kyc_intro' }\"\n >\n {{ 'BUTTON_CONTINUE' | translate }}\n </button>\n </div>\n </div>\n\n</bw-action-article>\n\n\n\n<bw-modal *ngIf=\"showKycModal\"\n [showCloseButton]=\"true\"\n (closeModal)=\"showKycModal = false\"\n modalWidth=\"large\" [brightsideWebFb]=\"{event_name: 'kyc_intro_modal'}\">\n <div class=\"body\">\n <bw-spinner *ngIf=\"showSpinner\"></bw-spinner>\n <div id=\"socureDiv\"></div>\n </div>\n</bw-modal>\n\n<bw-modal *ngIf=\"showVerifyingModal\"\n modalWidth=\"medium\">\n <div class=\"body center mb-sm\" >\n <bw-spinner></bw-spinner>\n <typography>{{ 'VERIFICATION_VALIDATING' | translate }}</typography>\n </div>\n</bw-modal>\n","import { Component, OnInit } from '@angular/core';\nimport {\n AccountCreationResponses, AccountCreationSteps,\n FinancialAccountsCreationService,\n SocureService\n} from \"@brightside-web/desktop/feature/financial-accounts-core\";\nimport {Environment} from \"@micro-core/environment\";\nimport {SimpleGlobalModalService} from \"@brightside-web/desktop/data-access/core-services\";\nimport {take} from \"rxjs/operators\";\nimport {ActivatedRoute, ActivatedRouteSnapshot, Router} from \"@angular/router\";\nimport {FirebaseService} from \"@brightside-web/desktop/data-access/shared\";\nimport { TranslateModule } from '@ngx-translate/core';\n\ninterface SocureInitInterface {\n init(socure: string, divId: string, config?:any): Promise<unknown>;\n start(number: number): any;\n}\n\ninterface SocureInterface {\n reset(): unknown;\n unmount(): unknown;\n}\n\ninterface SocureVerificationEvent {\n eventId: string;\n status: string;\n verificationLevel: number;\n mobileNumber: string;\n key: string;\n referenceId: string;\n verifyResult: {\n referenceId: string;\n };\n documentUuid: string;\n}\n\n\ninterface SocureInitInterface {\n init(socure: string): Promise<SocureInitInterface>;\n}\n\ndeclare let SocureInitializer: SocureInitInterface;\ndeclare let Socure: SocureInterface;\n\n\n@Component({\n selector: 'brightside-web-financial-core-kyc',\n templateUrl: './socure.component.html',\n styleUrls: ['./socure.component.scss'], \n})\nexport class FinancialCoreKYCComponent {\n\n showSpinner = true;\n showVerifyingModal = false;\n\n socureScript: HTMLScriptElement;\n sdkInitiated: boolean;\n showKycModal: boolean;\n\n config = {\n // onProgress: this.onProgress.bind(this),\n onSuccess: this.onSuccess.bind(this),\n onError: this.onError.bind(this),\n qrCodeNeeded: true\n };\n\n constructor(\n private financialCoreSvc: FinancialAccountsCreationService,\n private socureSvc: SocureService,\n private env: Environment,\n private simpleModalSvc: SimpleGlobalModalService,\n private router: Router,\n private route: ActivatedRoute,\n private analytics: FirebaseService\n ) {\n if (!this.route.snapshot.data['accountType']) {\n console.warn('This component should have an accountType in the ActivatedRouteSnapshot data');\n } else {\n this.financialCoreSvc.setAccountType(this.route.snapshot.data['accountType']);\n }\n }\n\n onProgress(progress: unknown) {}\n\n onSuccess(response: { documentUuid: string }) {\n this.showVerifying();\n this.financialCoreSvc.kycCheck(response.documentUuid).pipe(\n take(1)\n ).subscribe(\n kycResp => {\n this.showVerifyingModal = false;\n if (kycResp.result.code === AccountCreationResponses.KYC_VERIFIED) {\n this.router.navigate(['accounts', this.financialCoreSvc.accountType, 'dashboard'])\n }\n }\n );\n }\n\n onError(error: SocureVerificationEvent|null) {\n this.showKycModal = false;\n const errorString = error ? error.status : 'unknown';\n this.analytics.logEvent('kyc_failed', {code: errorString})\n this.simpleModalSvc.createGenericErrorModal('kyc_automated_review', () => {\n this.showSpinner = true;\n this.showSocureModal();\n });\n }\n\n showSocureModal() {\n this.showKycModal = true;\n setTimeout(()=>{\n this.socureScript = this.socureSvc.loadSocureScript();\n this.socureScript.onload = (test) => {\n this.clearSession();\n SocureInitializer.init(this.env.socure)\n .then((lib:SocureInitInterface) => {\n lib.init(this.env.socure, '#socureDiv', this.config).then(()=>{\n lib.start(1).then((response:any) => {\n this.showSpinner = false;\n this.sdkInitiated = true;\n },\n (error:any) => {\n this.onError(null);\n }\n );\n })\n })\n };\n }, 10);\n }\n\n clearSession() {\n if (Object.keys(window).includes('Socure')) {\n Socure.reset(); // Cleans up the token stored in the browser memory.\n Socure.unmount(); // Calls the cleanup() function internally to unmount the Web SDK application from the browser and invalidate the token.\n sessionStorage.removeItem('documentVerificationToken');\n sessionStorage.removeItem('publicApiKey');\n localStorage.removeItem('devicer_id');\n }\n }\n\n private showVerifying() {\n this.showVerifyingModal = true;\n this.showKycModal = false;\n this.showSpinner = true;\n this.clearSession();\n }\n\n goHome() {\n this.router.navigate(['home']);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n FinancialAccountTransaction,\n FinancialAccountTransactionsPayload,\n FinancialAccountTransactionsRequestConfig,\n FinancialAccountTypes, TransactionPagination\n} from \"@brightside-web/desktop/feature/financial-accounts-core\";\nimport {\n BsApiService,\n GenericResponseCode,\n GenericResponseResult\n} from \"@brightside-web/desktop/data-access/core-services\";\nimport {BehaviorSubject, Observable} from \"rxjs\";\n\n@Injectable({ providedIn: 'root' })\nexport class FinancialAccountsHistoryService {\n apiName = 'api-mobile';\n transactionHistoryPage = 0;\n transactionsPerPage = 25;\n\n private _recentTransactions = new BehaviorSubject<FinancialAccountTransaction[] | undefined>(undefined);\n public readonly recentTransactions: Observable<FinancialAccountTransaction[] | undefined> = this._recentTransactions.asObservable();\n\n private _transactionHistory = new BehaviorSubject<TransactionPagination | undefined>(undefined);\n public readonly transactionHistory: Observable<TransactionPagination|undefined> = this._transactionHistory.asObservable();\n\n private _hasMoreTransactions = new BehaviorSubject<boolean>(true);\n public readonly hasMoreTransactions: Observable<boolean> = this._hasMoreTransactions.asObservable();\n\n constructor(\n private bsApi: BsApiService\n ) { }\n\n getTransactions(\n accountType: FinancialAccountTypes,\n accountId: number,\n callParams?: FinancialAccountTransactionsRequestConfig) {\n this.callGetTransactions(accountType,accountId,callParams);\n }\n\n getNextTransactionsPage(\n accountType: FinancialAccountTypes,\n accountId: number\n ) {\n const callParams: FinancialAccountTransactionsRequestConfig = {\n offset: 0,\n limit: this.transactionsPerPage\n };\n if (this._transactionHistory.value) {\n this.transactionHistoryPage++\n callParams.offset = this.transactionHistoryPage * this.transactionsPerPage;\n }\n this.getTransactions(accountType,accountId,callParams);\n }\n\n\n private callGetTransactions(\n accountType: FinancialAccountTypes,\n accountId: number,\n callParams?:FinancialAccountTransactionsRequestConfig) {\n this.getAccountTransactions(\n accountType,\n accountId,\n callParams)\n .subscribe(\n transactionResp => {\n if (transactionResp.result.code === GenericResponseCode.SERVICE_OK) {\n if (!callParams) {\n this._recentTransactions.next(transactionResp.payload.transactions);\n } else {\n this.handleHistoryResponse(transactionResp);\n }\n }\n }\n )\n }\n\n handleHistoryResponse(transactionResp: FinancialAccountTransactionsPayload & GenericResponseResult) {\n const currentHistory = this._transactionHistory.value;\n if (transactionResp.payload.resultSet.allFetched) {\n this._hasMoreTransactions.next(false);\n }\n if (currentHistory) {\n currentHistory.pages.push({\n page: this.transactionHistoryPage,\n transactions: transactionResp.payload.transactions\n });\n this._transactionHistory.next(currentHistory)\n } else {\n this._transactionHistory.next({pages: [{\n page: 0,\n transactions: transactionResp.payload.transactions\n }]})\n }\n }\n\n getAccountTransactions(\n accountType: FinancialAccountTypes, accountId: number,\n callParams?: FinancialAccountTransactionsRequestConfig\n ): Observable<FinancialAccountTransactionsPayload & GenericResponseResult> {\n callParams = callParams ?? {limit: 3,offset: 0};\n if (callParams.limit <= 0) {\n throw Error('transactions limit must be greater than 0');\n }\n\n const apiParam = callParams.lastTransactionId ?\n `?offset=${callParams.offset}&limit=${callParams.limit}&lastTransactionId=${callParams.lastTransactionId}` :\n `?offset=${callParams.offset}&limit=${callParams.limit}`;\n\n return this.bsApi.get<FinancialAccountTransactionsPayload>(\n this.apiName,\n `/accounts/${accountType}/${accountId}/transactions${apiParam}`);\n }\n}\n\n\n","import { Injectable } from '@angular/core';\n\nimport {\n FinancialAccountStatementsResponse,\n GroomedMonthlyAccountStatements,\n FinancialAccountStatementsPayload,\n FinancialAccountStatementsDataPayload\n} from \"../models/financial-account-statements\";\n\nimport {\n GenericResponseCode,\n GenericResponseResultItems\n} from \"@brightside-web/desktop/data-access/core-services\";\n\nimport {BsApiService} from \"@brightside-web/desktop/data-access/core-services\";\nimport {Observable, Subject} from \"rxjs\";\n\n@Injectable({\n providedIn: 'root'\n})\nexport class FinancialAccountsStatementsService {\n\n apiName = 'api-mobile';\n\n private _statements = new Subject<GroomedMonthlyAccountStatements[]>();\n public readonly statements: Observable<GroomedMonthlyAccountStatements[]> = this._statements.asObservable();\n private _taxStatements= new Subject<FinancialAccountStatementsResponse[]>();\n public readonly taxStatements: Observable<FinancialAccountStatementsResponse[]> = this._taxStatements.asObservable();\n\n constructor(\n private bsApi: BsApiService\n ) { }\n\n groomMonthlyData(statementsResponse: FinancialAccountStatementsResponse[]) : GroomedMonthlyAccountStatements[]{\n const years:GroomedMonthlyAccountStatements[] = [];\n\n statementsResponse.forEach(statement => {\n let yearObject = years.find(y => y.year === statement.year);\n\n if (!yearObject) {\n yearObject = { year: statement.year, statements: [] };\n years.push(yearObject);\n }\n\n yearObject.statements.push(statement);\n });\n\n return years;\n }\n\n getMonthlyStatements() : void {\n this.bsApi.get<FinancialAccountStatementsPayload>(\n this.apiName,\n '/statements?types=MONTHLY'\n ).subscribe(\n resp => {\n if (resp.result.code === GenericResponseCode.SERVICE_OK) {\n const groomedStatements = this.groomMonthlyData(resp.payload.statements);\n this._statements.next(groomedStatements);\n }\n }\n )\n }\n\n getTaxStatements() : void {\n this.bsApi.get<FinancialAccountStatementsPayload>(\n this.apiName,\n '/statements?types=TAX_1099_INT'\n ).subscribe(\n resp => {\n if (resp.result.code === GenericResponseCode.SERVICE_OK) {\n const groomedStatements = this.groomMonthlyData(resp.payload.statements);\n this._taxStatements.next(resp.payload.statements);\n }\n }\n )\n }\n\n getDateForStatement(statementId?:number) {\n this.bsApi.get<FinancialAccountStatementsDataPayload>(\n this.apiName,\n `/statements/${statementId}/download`\n ).subscribe(\n resp => {\n if (resp.result.code === GenericResponseCode.SERVICE_OK) {\n this.openBase64Pdf(resp.payload.content);\n }\n\n }\n )\n }\n openBase64Pdf(base64String: string, filename: string = 'document.pdf') {\n const byteString = atob(base64String);\n const ab = new ArrayBuffer(byteString.length);\n const ia = new Uint8Array(ab);\n for (let i = 0; i < byteString.length; i++) {\n ia[i] = byteString.charCodeAt(i);\n }\n const blob = new Blob([ab], { type: 'application/pdf' });\n\n const blobUrl = URL.createObjectURL(blob);\n\n window.open(blobUrl, '_blank');\n }\n}\n\n// {\n// \"statements\": [\n// {\n// \"statementId\": 250391591,\n// \"type\": \"TAX_1099_INT\",\n// \"month\": 0,\n// \"year\": 2023\n// }\n// ]\n// }\n","import { Component } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\n\n@Component({\n selector: 'brightside-web-financial-core-kyc-verification-in-progress',\n templateUrl: './kyc-verification-in-progress.component.html',\n styleUrls: ['./kyc-verification-in-progress.component.scss']\n})\nexport class FinancialCoreKYCVerificationInProgressComponent {\n\n constructor(private _router: Router) { }\n \n redirectHome(): void {\n this._router.navigate(['home']);\n }\n}","<bw-action-article [brightsideWebFb]=\"{ event_name: 'kyc_review_pending' }\">\n <div content-section>\n <div class=\"mb-sm\">\n <img src=\"../assets/hourglass.png\" />\n </div>\n <div class=\"copy-wrapper\">\n <typography title-medium class=\"mb-sm\" color=\"var(--primary-text)\">\n <div [innerHTML]=\"'KYC_REVIEW_PENDING_TITLE' | translate\"></div>\n </typography>\n <typography text-medium-regular class=\"mb-md\" color=\"var(--secondary-text)\">\n <div [innerHTML]=\"'KYC_REVIEW_PENDING_DESC' | translate\"></div>\n </typography>\n </div>\n </div>\n\n <div footer-actions>\n <div class=\"flex-row row-reverse\">\n <button\n bw-button\n type=\"submit\"\n (click)=\"redirectHome()\"\n [brightsideWebFb]=\"{ event_name: 'kyc_review_pending' }\"\n >\n {{ 'KYC_REVIEW_PENDING_CTA' | translate }}\n </button>\n </div>\n </div>\n\n</bw-action-article>\n","//! moment.js locale configuration\n//! locale : Arabic [ar]\n//! author : Abdel Said: https://github.com/abdelsaid\n//! author : Ahmed Elkhatib\n//! author : forabi https://github.com/forabi\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '١',\n 2: '٢',\n 3: '٣',\n 4: '٤',\n 5: '٥',\n 6: '٦',\n 7: '٧',\n 8: '٨',\n 9: '٩',\n 0: '٠',\n },\n numberMap = {\n '١': '1',\n '٢': '2',\n '٣': '3',\n '٤': '4',\n '٥': '5',\n '٦': '6',\n '٧': '7',\n '٨': '8',\n '٩': '9',\n '٠': '0',\n },\n pluralForm = function (n) {\n return n === 0\n ? 0\n : n === 1\n ? 1\n : n === 2\n ? 2\n : n % 100 >= 3 && n % 100 <= 10\n ? 3\n : n % 100 >= 11\n ? 4\n : 5;\n },\n plurals = {\n s: [\n 'أقل من ثانية',\n 'ثانية واحدة',\n ['ثانيتان', 'ثانيتين'],\n '%d ثوان',\n '%d ثانية',\n '%d ثانية',\n ],\n m: [\n 'أقل من دقيقة',\n 'دقيقة واحدة',\n ['دقيقتان', 'دقيقتين'],\n '%d دقائق',\n '%d دقيقة',\n '%d دقيقة',\n ],\n h: [\n 'أقل من ساعة',\n 'ساعة واحدة',\n ['ساعتان', 'ساعتين'],\n '%d ساعات',\n '%d ساعة',\n '%d ساعة',\n ],\n d: [\n 'أقل من يوم',\n 'يوم واحد',\n ['يومان', 'يومين'],\n '%d أيام',\n '%d يومًا',\n '%d يوم',\n ],\n M: [\n 'أقل من شهر',\n 'شهر واحد',\n ['شهران', 'شهرين'],\n '%d أشهر',\n '%d شهرا',\n '%d شهر',\n ],\n y: [\n 'أقل من عام',\n 'عام واحد',\n ['عامان', 'عامين'],\n '%d أعوام',\n '%d عامًا',\n '%d عام',\n ],\n },\n pluralize = function (u) {\n return function (number, withoutSuffix, string, isFuture) {\n var f = pluralForm(number),\n str = plurals[u][pluralForm(number)];\n if (f === 2) {\n str = str[withoutSuffix ? 0 : 1];\n }\n return str.replace(/%d/i, number);\n };\n },\n months = [\n 'يناير',\n 'فبراير',\n 'مارس',\n 'أبريل',\n 'مايو',\n 'يونيو',\n 'يوليو',\n 'أغسطس',\n 'سبتمبر',\n 'أكتوبر',\n 'نوفمبر',\n 'ديسمبر',\n ];\n\n var ar = moment.defineLocale('ar', {\n months: months,\n monthsShort: months,\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'D/\\u200FM/\\u200FYYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n meridiemParse: /ص|م/,\n isPM: function (input) {\n return 'م' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar: {\n sameDay: '[اليوم عند الساعة] LT',\n nextDay: '[غدًا عند الساعة] LT',\n nextWeek: 'dddd [عند الساعة] LT',\n lastDay: '[أمس عند الساعة] LT',\n lastWeek: 'dddd [عند الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'بعد %s',\n past: 'منذ %s',\n s: pluralize('s'),\n ss: pluralize('s'),\n m: pluralize('m'),\n mm: pluralize('m'),\n h: pluralize('h'),\n hh: pluralize('h'),\n d: pluralize('d'),\n dd: pluralize('d'),\n M: pluralize('M'),\n MM: pluralize('M'),\n y: pluralize('y'),\n yy: pluralize('y'),\n },\n preparse: function (string) {\n return string\n .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n return numberMap[match];\n })\n .replace(/،/g, ',');\n },\n postformat: function (string) {\n return string\n .replace(/\\d/g, function (match) {\n return symbolMap[match];\n })\n .replace(/,/g, '،');\n },\n week: {\n dow: 6, // Saturday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return ar;\n\n})));\n","'use strict';\n\n// do not edit .js files directly - edit src/index.jst\n\n\n\nmodule.exports = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\n};\n","import { ConsoleLogger } from '../Logger/ConsoleLogger.mjs';\nimport { InMemoryStorage } from './InMemoryStorage.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n * @returns Either a reference to window.localStorage or an in-memory storage as fallback\n */\nconst logger = new ConsoleLogger('CoreStorageUtils');\nconst getLocalStorageWithFallback = () => {\n try {\n // Attempt to use localStorage directly\n if (typeof window !== 'undefined' && window.localStorage) {\n return window.localStorage;\n }\n }\n catch (e) {\n // Handle any errors related to localStorage access\n logger.info('localStorage not found. InMemoryStorage is used as a fallback.');\n }\n // Return in-memory storage as a fallback if localStorage is not accessible\n return new InMemoryStorage();\n};\n/**\n * @internal\n * @returns Either a reference to window.sessionStorage or an in-memory storage as fallback\n */\nconst getSessionStorageWithFallback = () => {\n try {\n // Attempt to use sessionStorage directly\n if (typeof window !== 'undefined' && window.sessionStorage) {\n // Verify we can actually use it by testing access\n window.sessionStorage.getItem('test');\n return window.sessionStorage;\n }\n throw new Error('sessionStorage is not defined');\n }\n catch (e) {\n // Handle any errors related to sessionStorage access\n logger.info('sessionStorage not found. InMemoryStorage is used as a fallback.');\n return new InMemoryStorage();\n }\n};\n\nexport { getLocalStorageWithFallback, getSessionStorageWithFallback };\n","//! moment.js locale configuration\n//! locale : Maori [mi]\n//! author : John Corrigan <robbiecloset@gmail.com> : https://github.com/johnideal\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var mi = moment.defineLocale('mi', {\n months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split(\n '_'\n ),\n monthsShort:\n 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split(\n '_'\n ),\n monthsRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n monthsStrictRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n monthsShortRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n monthsShortStrictRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,2}/i,\n weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'),\n weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),\n weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [i] HH:mm',\n LLLL: 'dddd, D MMMM YYYY [i] HH:mm',\n },\n calendar: {\n sameDay: '[i teie mahana, i] LT',\n nextDay: '[apopo i] LT',\n nextWeek: 'dddd [i] LT',\n lastDay: '[inanahi i] LT',\n lastWeek: 'dddd [whakamutunga i] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'i roto i %s',\n past: '%s i mua',\n s: 'te hēkona ruarua',\n ss: '%d hēkona',\n m: 'he meneti',\n mm: '%d meneti',\n h: 'te haora',\n hh: '%d haora',\n d: 'he ra',\n dd: '%d ra',\n M: 'he marama',\n MM: '%d marama',\n y: 'he tau',\n yy: '%d tau',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return mi;\n\n})));\n","//! moment.js locale configuration\n//! locale : Uzbek Latin [uz-latn]\n//! author : Rasulbek Mirzayev : github.com/Rasulbeeek\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var uzLatn = moment.defineLocale('uz-latn', {\n months: 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split(\n '_'\n ),\n monthsShort: 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'),\n weekdays:\n 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split(\n '_'\n ),\n weekdaysShort: 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'),\n weekdaysMin: 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'D MMMM YYYY, dddd HH:mm',\n },\n calendar: {\n sameDay: '[Bugun soat] LT [da]',\n nextDay: '[Ertaga] LT [da]',\n nextWeek: 'dddd [kuni soat] LT [da]',\n lastDay: '[Kecha soat] LT [da]',\n lastWeek: \"[O'tgan] dddd [kuni soat] LT [da]\",\n sameElse: 'L',\n },\n relativeTime: {\n future: 'Yaqin %s ichida',\n past: 'Bir necha %s oldin',\n s: 'soniya',\n ss: '%d soniya',\n m: 'bir daqiqa',\n mm: '%d daqiqa',\n h: 'bir soat',\n hh: '%d soat',\n d: 'bir kun',\n dd: '%d kun',\n M: 'bir oy',\n MM: '%d oy',\n y: 'bir yil',\n yy: '%d yil',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return uzLatn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Telugu [te]\n//! author : Krishna Chaitanya Thota : https://github.com/kcthota\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var te = moment.defineLocale('te', {\n months: 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split(\n '_'\n ),\n monthsShort:\n 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays:\n 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split(\n '_'\n ),\n weekdaysShort: 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'),\n weekdaysMin: 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm',\n LTS: 'A h:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm',\n LLLL: 'dddd, D MMMM YYYY, A h:mm',\n },\n calendar: {\n sameDay: '[నేడు] LT',\n nextDay: '[రేపు] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[నిన్న] LT',\n lastWeek: '[గత] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s లో',\n past: '%s క్రితం',\n s: 'కొన్ని క్షణాలు',\n ss: '%d సెకన్లు',\n m: 'ఒక నిమిషం',\n mm: '%d నిమిషాలు',\n h: 'ఒక గంట',\n hh: '%d గంటలు',\n d: 'ఒక రోజు',\n dd: '%d రోజులు',\n M: 'ఒక నెల',\n MM: '%d నెలలు',\n y: 'ఒక సంవత్సరం',\n yy: '%d సంవత్సరాలు',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}వ/,\n ordinal: '%dవ',\n meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'రాత్రి') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'ఉదయం') {\n return hour;\n } else if (meridiem === 'మధ్యాహ్నం') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'సాయంత్రం') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'రాత్రి';\n } else if (hour < 10) {\n return 'ఉదయం';\n } else if (hour < 17) {\n return 'మధ్యాహ్నం';\n } else if (hour < 20) {\n return 'సాయంత్రం';\n } else {\n return 'రాత్రి';\n }\n },\n week: {\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 });\n\n return te;\n\n})));\n","<div class=\"avatar\" [class.no-background]=\"noBackground\" [ngClass]=\"avatarSize\" [ngStyle]=\"{'backgroundImage': imageSrc, 'backgroundColor': bgColor}\">\n <bw-icon [size]=\"iconSize\" [iconName]=\"iconName\" [color]=\"iconColor\" *ngIf=\"!imageURL\"></bw-icon>\n</div>\n","import { Component, OnInit, ChangeDetectionStrategy, Input, OnChanges } from '@angular/core';\n\n@Component({\n selector: 'bw-avatar',\n templateUrl: './avatar.component.html',\n styleUrls: ['./avatar.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class AvatarComponent implements OnChanges {\n\n imageSrc: string;\n iconSize = 32;\n isSmallAvatar: boolean;\n isMediumAvatar: boolean;\n isLargeAvatar: boolean;\n @Input() noBackground: boolean;\n @Input() bgColor: string;\n @Input() iconName: string;\n @Input() iconColor = \"var(--blue-70)\";\n @Input() imageURL: string;\n\n @Input() avatarStyle: 'primary' | 'secondary' | 'tertiary' | 'image';\n\n /**\n * This is to size the avatar. Only the following strings will affect the size: \"small\", \"medium\", or \"large\" - all other values will be ignored.\n */\n @Input() avatarSize: 'small' | 'medium' | 'large' = 'medium';\n\n constructor() { }\n\n ngOnChanges(): void {\n this.imageSrc = 'url(' + this.imageURL + ')';\n\n if (this.avatarSize === 'small') {\n this.isSmallAvatar = true;\n this.iconSize = 24;\n }\n \n if (this.avatarSize === 'medium') {\n this.isMediumAvatar = true;\n this.iconSize = 32;\n } \n \n if (this.avatarSize === 'large') {\n this.isLargeAvatar = true;\n this.iconSize = 48;\n }\n\n if (this.avatarStyle === 'primary') {\n this.noBackground = false;\n this.bgColor = 'var(--bg-blue)';\n this.iconColor = 'var(--blue-70)';\n }\n\n if (this.avatarStyle === 'secondary') {\n this.noBackground = false;\n this.bgColor = 'var(--blue-70)';\n this.iconColor = 'var(--bg-blue)';\n }\n\n if (this.avatarStyle === 'tertiary') {\n this.noBackground = true;\n this.bgColor = 'transparent';\n this.iconColor = 'var(--blue-70)';\n }\n\n if (this.avatarStyle === 'image') {\n this.noBackground = true;\n this.bgColor = 'transparent';\n this.iconColor = 'transparent';\n }\n }\n\n}\n","<!-- TODO: replace function call w/ string interpolation for fb.directive-->\n<div class=\"content-layout\" [brightsideWebFb]=\"{ event_name: config.fbEventName }\">\n <bw-action-article>\n <ui-nav-exit-back *ngIf=\"!config.pageHideBackButton && !pageIsFullScreen\" back-action-top [trackingDetail]=\"{ event_name: config.fbEventName }\" [skipActionEmit]=\"!config.pageOnBackCtaPath\" (exitActionHandler)=\"handleBackClick()\"></ui-nav-exit-back>\n <ui-nav-exit-back *ngIf=\"!config.pageHideBackButton && pageIsFullScreen\" back-action-bottom [trackingDetail]=\"{ event_name: config.fbEventName }\" [skipActionEmit]=\"!config.pageOnBackCtaPath\" (exitActionHandler)=\"handleBackClick()\"></ui-nav-exit-back>\n\n <div header-title class=\"mb-sm\">\n <typography title-medium>{{ config.pageTitleKey === '' ? config.pageTitle : config.pageTitleKey | translate }}</typography>\n </div>\n\n <div content-section>\n <p text-medium-regular class=\"mb-md\" color=\"var(--secondary-text)\">\n {{ config.pageSubTitleKey === '' ? config.pageSubTitle : config.pageSubTitleKey | translate }}\n </p>\n\n <brightside-web-desktop-cards\n *ngIf=\"config.pageCards.length > 0\"\n [cards]=\"config.pageCards\"\n (clicked)=\"handleCardAction($event)\"\n ></brightside-web-desktop-cards>\n </div>\n\n <div footer-actions class=\"flex-row row-reverse\">\n <button\n *ngIf=\"config.pageCtaLabel\"\n bw-button\n [brightsideWebFb]=\"{ event_name: config.fbEventName }\n \"\n [processing]=\"processing\"\n (click)=\"handleCtaClick()\"\n >\n {{ config.pageCtaLabel | translate }}\n </button>\n\n <typography text-large-semibold>\n <a *ngIf=\"config.pageSecondaryCtaLabel\"\n [brightsideWebFb]=\"{ event_name: config.fbEventName }\"\n [secondaryCta]=\"true\"\n bw-anchor class=\"bs-blue mr-sm\" (click)=\"handleSecondaryCtaClick()\">{{\n config.pageSecondaryCtaLabel | translate\n }}</a>\n </typography>\n </div>\n </bw-action-article>\n</div>\n\n<bw-modal *ngIf=\"showProcessError\" [brightsideWebFb]=\"{ event_name: 'error_shown', custom: {'error id': config.fbEventName }}\">\n <typography title-medium color=\"var(--gray-70)\">{{ processErrorMessageTitle | translate }}</typography>\n <section class=\"body\">\n <bw-paragraph [textStyle]=\"'Body2'\" color=\"var(--gray-50)\">\n {{ processErrorMessage | translate }}\n </bw-paragraph>\n </section>\n <footer class=\"footer\">\n <div class=\"flex-row row-reverse\">\n <button\n bw-button\n (click)=\"handleErrorClose()\" >\n Ok\n </button>\n </div>\n </footer>\n</bw-modal>\n","import { Component, OnInit, Injector } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { RoutingStateService } from '@brightside/brightside-ui-services';\nimport {\n DesktopCard,\n Settings,\n isTemplateFullScreen,\n CompanyService\n} from '@brightside-web/desktop/data-access/shared';\n\n\nimport { Observable } from 'rxjs';\n\nimport {\n FirebaseService,\n AnalyticsAttributesV4\n} from '@brightside-web/desktop/data-access/shared';\nimport { Environment } from '@brightside-web/micro/core/environment';\nimport {TranslateService, TranslatePipe} from \"@ngx-translate/core\";\n\nexport interface DisplayCardsProcessResponse {\n status: string;\n errorMessage?: string;\n errorMessageTitle?: string;\n errorNavigateOnClose?: string[];\n}\n\nexport class DisplayCardsSettings extends Settings {\n\n constructor(config:any={}) {\n super(config);\n this.pageCards = config.pageCards || [];\n this.processUpdater = config.processUpdater || null;\n }\n\n pageCards: DesktopCard[];\n\n processUpdater?: (injector: Injector,\n cardKey: string,\n translatePipe: TranslatePipe,\n companyService: CompanyService\n ) => Observable<DisplayCardsProcessResponse>;\n}\n\n@Component({\n selector: 'brightside-web-display-cards',\n templateUrl: './display-cards.component.html',\n styleUrls: ['./display-cards.scss'],\n})\nexport class DisplayCardsComponent implements OnInit {\n config: DisplayCardsSettings = new DisplayCardsSettings({\n fbPage: 'display',\n fbCategory: 'cards',\n fbEventName: '',\n pageTitle: '',\n pageTitleKey: '',\n pageSubTitle: '',\n pageSubTitleKey: '',\n pageCtaLabel: 'Continue',\n pageCtaLabelKey: '',\n pageSecondaryCtaLabel: '',\n\n pageCards: [],\n\n pageOnForwardCtaPath: [],\n });\n\n fbEvent: AnalyticsAttributesV4;\n processing: boolean;\n pageIsFullScreen: boolean;\n\n processErrorMessage: string;\n processErrorMessageTitle: string;\n processErrorNavigateOnClose: string[];\n\n showProcessError: boolean;\n\n constructor(\n private injector: Injector,\n private routingState: RoutingStateService,\n private activatedRoute: ActivatedRoute,\n private analytics: FirebaseService,\n private env: Environment,\n private translatePipe: TranslatePipe,\n private companyService: CompanyService) {}\n\n ngOnInit(): void {\n this.checkForConfigViaData();\n }\n\n getFbInfo(extendWith?: any) {\n this.fbEvent = { event_name: this.config.fbEventName, ...extendWith };\n }\n\n private checkForConfigViaData() {\n if (isTemplateFullScreen(this.activatedRoute)) {\n this.pageIsFullScreen = true;\n }\n\n if (this.activatedRoute?.snapshot?.data?.pageConfig) {\n this.config = new DisplayCardsSettings(this.activatedRoute.snapshot.data.pageConfig);\n this.getFbInfo();\n }\n }\n\n private handleMoveBackward() {\n this.routingState.popAndNavigateTo(this.config.pageOnBackCtaPath || []);\n }\n\n private handleMoveForward() {\n this.routingState.popAndNavigateTo(this.config.pageOnForwardCtaPath || []);\n }\n\n handleBackClick() {\n this.handleMoveBackward();\n return false;\n }\n\n handleCtaClick() {\n if (this.processing) {\n return;\n }\n\n this.processing = true;\n this.handleMoveForward();\n }\n\n handleSecondaryCtaClick() {}\n\n handleCardAction(cardDetails: DesktopCard) {\n\n if (this.processing) {\n return;\n }\n\n if (cardDetails.analytics && cardDetails.analytics.tapped) {\n this.analytics.logEvent(cardDetails.analytics.tapped);\n if (!this.env.production) {\n console.log(`FIREBASE: v4: click: ${cardDetails.analytics.tapped}`);\n }\n }\n\n\n const navToCardCta = () => {\n if (cardDetails.ctaPath) {\n this.routingState.navigateTo(cardDetails.ctaPath.split('/'));\n }\n };\n\n this.processing = true;\n this.showProcessError = false;\n this.processErrorMessage = '';\n\n if (this.config.processUpdater) {\n const results = this.config.processUpdater(\n this.injector,\n cardDetails.key || '',\n this.translatePipe,\n this.companyService);\n\n results.subscribe(\n (result: DisplayCardsProcessResponse) => {\n if (result.status === 'success') {\n navToCardCta();\n } else {\n this.showProcessError = true;\n this.processErrorMessage = result.errorMessage || '';\n this.processErrorMessageTitle = result.errorMessageTitle || 'Something went wrong';\n this.processErrorNavigateOnClose = result.errorNavigateOnClose || [];\n this.processing = false;\n }\n },\n () => {\n this.showProcessError = true;\n this.processErrorMessage = '';\n this.processErrorMessageTitle = '';\n this.processErrorNavigateOnClose = [];\n this.processing = false;\n }\n );\n } else {\n navToCardCta();\n }\n }\n\n handleErrorClose() {\n this.showProcessError = false;\n\n if (this.processErrorNavigateOnClose && this.processErrorNavigateOnClose.length > 0) {\n this.routingState.navigateTo(this.processErrorNavigateOnClose);\n }\n }\n}\n","//! moment.js locale configuration\n//! locale : Hebrew [he]\n//! author : Tomer Cohen : https://github.com/tomer\n//! author : Moshe Simantov : https://github.com/DevelopmentIL\n//! author : Tal Ater : https://github.com/TalAter\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var he = moment.defineLocale('he', {\n months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split(\n '_'\n ),\n monthsShort:\n 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'),\n weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),\n weekdaysShort: 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),\n weekdaysMin: 'א_ב_ג_ד_ה_ו_ש'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [ב]MMMM YYYY',\n LLL: 'D [ב]MMMM YYYY HH:mm',\n LLLL: 'dddd, D [ב]MMMM YYYY HH:mm',\n l: 'D/M/YYYY',\n ll: 'D MMM YYYY',\n lll: 'D MMM YYYY HH:mm',\n llll: 'ddd, D MMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[היום ב־]LT',\n nextDay: '[מחר ב־]LT',\n nextWeek: 'dddd [בשעה] LT',\n lastDay: '[אתמול ב־]LT',\n lastWeek: '[ביום] dddd [האחרון בשעה] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'בעוד %s',\n past: 'לפני %s',\n s: 'מספר שניות',\n ss: '%d שניות',\n m: 'דקה',\n mm: '%d דקות',\n h: 'שעה',\n hh: function (number) {\n if (number === 2) {\n return 'שעתיים';\n }\n return number + ' שעות';\n },\n d: 'יום',\n dd: function (number) {\n if (number === 2) {\n return 'יומיים';\n }\n return number + ' ימים';\n },\n M: 'חודש',\n MM: function (number) {\n if (number === 2) {\n return 'חודשיים';\n }\n return number + ' חודשים';\n },\n y: 'שנה',\n yy: function (number) {\n if (number === 2) {\n return 'שנתיים';\n } else if (number % 10 === 0 && number !== 10) {\n return number + ' שנה';\n }\n return number + ' שנים';\n },\n },\n meridiemParse:\n /אחה\"צ|לפנה\"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,\n isPM: function (input) {\n return /^(אחה\"צ|אחרי הצהריים|בערב)$/.test(input);\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 5) {\n return 'לפנות בוקר';\n } else if (hour < 10) {\n return 'בבוקר';\n } else if (hour < 12) {\n return isLower ? 'לפנה\"צ' : 'לפני הצהריים';\n } else if (hour < 18) {\n return isLower ? 'אחה\"צ' : 'אחרי הצהריים';\n } else {\n return 'בערב';\n }\n },\n });\n\n return he;\n\n})));\n","//! moment.js locale configuration\n//! locale : Irish or Irish Gaelic [ga]\n//! author : André Silva : https://github.com/askpt\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var months = [\n 'Eanáir',\n 'Feabhra',\n 'Márta',\n 'Aibreán',\n 'Bealtaine',\n 'Meitheamh',\n 'Iúil',\n 'Lúnasa',\n 'Meán Fómhair',\n 'Deireadh Fómhair',\n 'Samhain',\n 'Nollaig',\n ],\n monthsShort = [\n 'Ean',\n 'Feabh',\n 'Márt',\n 'Aib',\n 'Beal',\n 'Meith',\n 'Iúil',\n 'Lún',\n 'M.F.',\n 'D.F.',\n 'Samh',\n 'Noll',\n ],\n weekdays = [\n 'Dé Domhnaigh',\n 'Dé Luain',\n 'Dé Máirt',\n 'Dé Céadaoin',\n 'Déardaoin',\n 'Dé hAoine',\n 'Dé Sathairn',\n ],\n weekdaysShort = ['Domh', 'Luan', 'Máirt', 'Céad', 'Déar', 'Aoine', 'Sath'],\n weekdaysMin = ['Do', 'Lu', 'Má', 'Cé', 'Dé', 'A', 'Sa'];\n\n var ga = moment.defineLocale('ga', {\n months: months,\n monthsShort: monthsShort,\n monthsParseExact: true,\n weekdays: weekdays,\n weekdaysShort: weekdaysShort,\n weekdaysMin: weekdaysMin,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Inniu ag] LT',\n nextDay: '[Amárach ag] LT',\n nextWeek: 'dddd [ag] LT',\n lastDay: '[Inné ag] LT',\n lastWeek: 'dddd [seo caite] [ag] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'i %s',\n past: '%s ó shin',\n s: 'cúpla soicind',\n ss: '%d soicind',\n m: 'nóiméad',\n mm: '%d nóiméad',\n h: 'uair an chloig',\n hh: '%d uair an chloig',\n d: 'lá',\n dd: '%d lá',\n M: 'mí',\n MM: '%d míonna',\n y: 'bliain',\n yy: '%d bliain',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(d|na|mh)/,\n ordinal: function (number) {\n var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return ga;\n\n})));\n","//! moment.js locale configuration\n//! locale : German (Switzerland) [de-ch]\n//! author : sschueller : https://github.com/sschueller\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n m: ['eine Minute', 'einer Minute'],\n h: ['eine Stunde', 'einer Stunde'],\n d: ['ein Tag', 'einem Tag'],\n dd: [number + ' Tage', number + ' Tagen'],\n w: ['eine Woche', 'einer Woche'],\n M: ['ein Monat', 'einem Monat'],\n MM: [number + ' Monate', number + ' Monaten'],\n y: ['ein Jahr', 'einem Jahr'],\n yy: [number + ' Jahre', number + ' Jahren'],\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n }\n\n var deCh = moment.defineLocale('de-ch', {\n months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(\n '_'\n ),\n monthsShort:\n 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),\n monthsParseExact: true,\n weekdays:\n 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(\n '_'\n ),\n weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY HH:mm',\n LLLL: 'dddd, D. MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[heute um] LT [Uhr]',\n sameElse: 'L',\n nextDay: '[morgen um] LT [Uhr]',\n nextWeek: 'dddd [um] LT [Uhr]',\n lastDay: '[gestern um] LT [Uhr]',\n lastWeek: '[letzten] dddd [um] LT [Uhr]',\n },\n relativeTime: {\n future: 'in %s',\n past: 'vor %s',\n s: 'ein paar Sekunden',\n ss: '%d Sekunden',\n m: processRelativeTime,\n mm: '%d Minuten',\n h: processRelativeTime,\n hh: '%d Stunden',\n d: processRelativeTime,\n dd: processRelativeTime,\n w: processRelativeTime,\n ww: '%d Wochen',\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return deCh;\n\n})));\n","//! moment.js locale configuration\n//! locale : Sindhi [sd]\n//! author : Narain Sagar : https://github.com/narainsagar\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var months = [\n 'جنوري',\n 'فيبروري',\n 'مارچ',\n 'اپريل',\n 'مئي',\n 'جون',\n 'جولاءِ',\n 'آگسٽ',\n 'سيپٽمبر',\n 'آڪٽوبر',\n 'نومبر',\n 'ڊسمبر',\n ],\n days = ['آچر', 'سومر', 'اڱارو', 'اربع', 'خميس', 'جمع', 'ڇنڇر'];\n\n var sd = moment.defineLocale('sd', {\n months: months,\n monthsShort: months,\n weekdays: days,\n weekdaysShort: days,\n weekdaysMin: days,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd، D MMMM YYYY HH:mm',\n },\n meridiemParse: /صبح|شام/,\n isPM: function (input) {\n return 'شام' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'صبح';\n }\n return 'شام';\n },\n calendar: {\n sameDay: '[اڄ] LT',\n nextDay: '[سڀاڻي] LT',\n nextWeek: 'dddd [اڳين هفتي تي] LT',\n lastDay: '[ڪالهه] LT',\n lastWeek: '[گزريل هفتي] dddd [تي] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s پوء',\n past: '%s اڳ',\n s: 'چند سيڪنڊ',\n ss: '%d سيڪنڊ',\n m: 'هڪ منٽ',\n mm: '%d منٽ',\n h: 'هڪ ڪلاڪ',\n hh: '%d ڪلاڪ',\n d: 'هڪ ڏينهن',\n dd: '%d ڏينهن',\n M: 'هڪ مهينو',\n MM: '%d مهينا',\n y: 'هڪ سال',\n yy: '%d سال',\n },\n preparse: function (string) {\n return string.replace(/،/g, ',');\n },\n postformat: function (string) {\n return string.replace(/,/g, '،');\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return sd;\n\n})));\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function refCount() {\n return operate((source, subscriber) => {\n let connection = null;\n source._refCount++;\n const refCounter = createOperatorSubscriber(subscriber, undefined, undefined, undefined, () => {\n if (!source || source._refCount <= 0 || 0 < --source._refCount) {\n connection = null;\n return;\n }\n const sharedConnection = source._connection;\n const conn = connection;\n connection = null;\n if (sharedConnection && (!conn || sharedConnection === conn)) {\n sharedConnection.unsubscribe();\n }\n subscriber.unsubscribe();\n });\n source.subscribe(refCounter);\n if (!refCounter.closed) {\n connection = source.connect();\n }\n });\n}\n","import { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nimport { refCount as higherOrderRefCount } from '../operators/refCount';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { hasLift } from '../util/lift';\nexport class ConnectableObservable extends Observable {\n constructor(source, subjectFactory) {\n super();\n this.source = source;\n this.subjectFactory = subjectFactory;\n this._subject = null;\n this._refCount = 0;\n this._connection = null;\n if (hasLift(source)) {\n this.lift = source.lift;\n }\n }\n _subscribe(subscriber) {\n return this.getSubject().subscribe(subscriber);\n }\n getSubject() {\n const subject = this._subject;\n if (!subject || subject.isStopped) {\n this._subject = this.subjectFactory();\n }\n return this._subject;\n }\n _teardown() {\n this._refCount = 0;\n const { _connection } = this;\n this._subject = this._connection = null;\n _connection === null || _connection === void 0 ? void 0 : _connection.unsubscribe();\n }\n connect() {\n let connection = this._connection;\n if (!connection) {\n connection = this._connection = new Subscription();\n const subject = this.getSubject();\n connection.add(this.source.subscribe(createOperatorSubscriber(subject, undefined, () => {\n this._teardown();\n subject.complete();\n }, (err) => {\n this._teardown();\n subject.error(err);\n }, () => this._teardown())));\n if (connection.closed) {\n this._connection = null;\n connection = Subscription.EMPTY;\n }\n }\n return connection;\n }\n refCount() {\n return higherOrderRefCount()(this);\n }\n}\n","import { EMPTY } from '../observable/empty';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function takeLast(count) {\n return count <= 0\n ? () => EMPTY\n : operate((source, subscriber) => {\n let buffer = [];\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n buffer.push(value);\n count < buffer.length && buffer.shift();\n }, () => {\n for (const value of buffer) {\n subscriber.next(value);\n }\n subscriber.complete();\n }, undefined, () => {\n buffer = null;\n }));\n });\n}\n","import { EmptyError } from '../util/EmptyError';\nimport { filter } from './filter';\nimport { takeLast } from './takeLast';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { identity } from '../util/identity';\nexport function last(predicate, defaultValue) {\n const hasDefaultValue = arguments.length >= 2;\n return (source) => source.pipe(predicate ? filter((v, i) => predicate(v, i, source)) : identity, takeLast(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(() => new EmptyError()));\n}\n","import { operate } from '../util/lift';\nexport function finalize(callback) {\n return operate((source, subscriber) => {\n try {\n source.subscribe(subscriber);\n }\n finally {\n subscriber.add(callback);\n }\n });\n}\n","/**\n * @license Angular v15.0.4\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport * as i0 from '@angular/core';\nimport { ɵisObservable, ɵisPromise, ɵRuntimeError, Injectable, EventEmitter, inject, ViewContainerRef, ChangeDetectorRef, EnvironmentInjector, Directive, Input, Output, Component, createEnvironmentInjector, ɵisStandalone, ComponentFactoryResolver, ɵisInjectable, InjectionToken, InjectFlags, NgModuleFactory, ɵConsole, NgZone, ɵcoerceToBoolean, ɵɵsanitizeUrlOrResourceUrl, Attribute, HostBinding, HostListener, Optional, ContentChildren, makeEnvironmentProviders, APP_BOOTSTRAP_LISTENER, ENVIRONMENT_INITIALIZER, Injector, ApplicationRef, APP_INITIALIZER, NgProbeToken, SkipSelf, NgModule, Inject, Version } from '@angular/core';\nimport { from, of, BehaviorSubject, EmptyError, combineLatest, concat, defer, pipe, throwError, Observable, EMPTY, ConnectableObservable, Subject } from 'rxjs';\nimport * as i3 from '@angular/common';\nimport { Location, ViewportScroller, LOCATION_INITIALIZED, LocationStrategy, HashLocationStrategy, PathLocationStrategy } from '@angular/common';\nimport { map, switchMap, take, startWith, filter, mergeMap, first, concatMap, tap, catchError, scan, last as last$1, takeWhile, defaultIfEmpty, takeLast, mapTo, finalize, refCount, mergeAll } from 'rxjs/operators';\nimport * as i1 from '@angular/platform-browser';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The primary routing outlet.\n *\n * @publicApi\n */\nconst PRIMARY_OUTLET = 'primary';\n/**\n * A private symbol used to store the value of `Route.title` inside the `Route.data` if it is a\n * static string or `Route.resolve` if anything else. This allows us to reuse the existing route\n * data/resolvers to support the title feature without new instrumentation in the `Router` pipeline.\n */\nconst RouteTitleKey = Symbol('RouteTitle');\nclass ParamsAsMap {\n constructor(params) {\n this.params = params || {};\n }\n has(name) {\n return Object.prototype.hasOwnProperty.call(this.params, name);\n }\n get(name) {\n if (this.has(name)) {\n const v = this.params[name];\n return Array.isArray(v) ? v[0] : v;\n }\n return null;\n }\n getAll(name) {\n if (this.has(name)) {\n const v = this.params[name];\n return Array.isArray(v) ? v : [v];\n }\n return [];\n }\n get keys() {\n return Object.keys(this.params);\n }\n}\n/**\n * Converts a `Params` instance to a `ParamMap`.\n * @param params The instance to convert.\n * @returns The new map instance.\n *\n * @publicApi\n */\nfunction convertToParamMap(params) {\n return new ParamsAsMap(params);\n}\n/**\n * Matches the route configuration (`route`) against the actual URL (`segments`).\n *\n * When no matcher is defined on a `Route`, this is the matcher used by the Router by default.\n *\n * @param segments The remaining unmatched segments in the current navigation\n * @param segmentGroup The current segment group being matched\n * @param route The `Route` to match against.\n *\n * @see UrlMatchResult\n * @see Route\n *\n * @returns The resulting match information or `null` if the `route` should not match.\n * @publicApi\n */\nfunction defaultUrlMatcher(segments, segmentGroup, route) {\n const parts = route.path.split('/');\n if (parts.length > segments.length) {\n // The actual URL is shorter than the config, no match\n return null;\n }\n if (route.pathMatch === 'full' &&\n (segmentGroup.hasChildren() || parts.length < segments.length)) {\n // The config is longer than the actual URL but we are looking for a full match, return null\n return null;\n }\n const posParams = {};\n // Check each config part against the actual URL\n for (let index = 0; index < parts.length; index++) {\n const part = parts[index];\n const segment = segments[index];\n const isParameter = part.startsWith(':');\n if (isParameter) {\n posParams[part.substring(1)] = segment;\n }\n else if (part !== segment.path) {\n // The actual URL part does not match the config, no match\n return null;\n }\n }\n return { consumed: segments.slice(0, parts.length), posParams };\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction shallowEqualArrays(a, b) {\n if (a.length !== b.length)\n return false;\n for (let i = 0; i < a.length; ++i) {\n if (!shallowEqual(a[i], b[i]))\n return false;\n }\n return true;\n}\nfunction shallowEqual(a, b) {\n // While `undefined` should never be possible, it would sometimes be the case in IE 11\n // and pre-chromium Edge. The check below accounts for this edge case.\n const k1 = a ? Object.keys(a) : undefined;\n const k2 = b ? Object.keys(b) : undefined;\n if (!k1 || !k2 || k1.length != k2.length) {\n return false;\n }\n let key;\n for (let i = 0; i < k1.length; i++) {\n key = k1[i];\n if (!equalArraysOrString(a[key], b[key])) {\n return false;\n }\n }\n return true;\n}\n/**\n * Test equality for arrays of strings or a string.\n */\nfunction equalArraysOrString(a, b) {\n if (Array.isArray(a) && Array.isArray(b)) {\n if (a.length !== b.length)\n return false;\n const aSorted = [...a].sort();\n const bSorted = [...b].sort();\n return aSorted.every((val, index) => bSorted[index] === val);\n }\n else {\n return a === b;\n }\n}\n/**\n * Flattens single-level nested arrays.\n */\nfunction flatten(arr) {\n return Array.prototype.concat.apply([], arr);\n}\n/**\n * Return the last element of an array.\n */\nfunction last(a) {\n return a.length > 0 ? a[a.length - 1] : null;\n}\n/**\n * Verifys all booleans in an array are `true`.\n */\nfunction and(bools) {\n return !bools.some(v => !v);\n}\nfunction forEach(map, callback) {\n for (const prop in map) {\n if (map.hasOwnProperty(prop)) {\n callback(map[prop], prop);\n }\n }\n}\nfunction wrapIntoObservable(value) {\n if (ɵisObservable(value)) {\n return value;\n }\n if (ɵisPromise(value)) {\n // Use `Promise.resolve()` to wrap promise-like instances.\n // Required ie when a Resolver returns a AngularJS `$q` promise to correctly trigger the\n // change detection.\n return from(Promise.resolve(value));\n }\n return of(value);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst NG_DEV_MODE$b = typeof ngDevMode === 'undefined' || ngDevMode;\nconst pathCompareMap = {\n 'exact': equalSegmentGroups,\n 'subset': containsSegmentGroup,\n};\nconst paramCompareMap = {\n 'exact': equalParams,\n 'subset': containsParams,\n 'ignored': () => true,\n};\nfunction containsTree(container, containee, options) {\n return pathCompareMap[options.paths](container.root, containee.root, options.matrixParams) &&\n paramCompareMap[options.queryParams](container.queryParams, containee.queryParams) &&\n !(options.fragment === 'exact' && container.fragment !== containee.fragment);\n}\nfunction equalParams(container, containee) {\n // TODO: This does not handle array params correctly.\n return shallowEqual(container, containee);\n}\nfunction equalSegmentGroups(container, containee, matrixParams) {\n if (!equalPath(container.segments, containee.segments))\n return false;\n if (!matrixParamsMatch(container.segments, containee.segments, matrixParams)) {\n return false;\n }\n if (container.numberOfChildren !== containee.numberOfChildren)\n return false;\n for (const c in containee.children) {\n if (!container.children[c])\n return false;\n if (!equalSegmentGroups(container.children[c], containee.children[c], matrixParams))\n return false;\n }\n return true;\n}\nfunction containsParams(container, containee) {\n return Object.keys(containee).length <= Object.keys(container).length &&\n Object.keys(containee).every(key => equalArraysOrString(container[key], containee[key]));\n}\nfunction containsSegmentGroup(container, containee, matrixParams) {\n return containsSegmentGroupHelper(container, containee, containee.segments, matrixParams);\n}\nfunction containsSegmentGroupHelper(container, containee, containeePaths, matrixParams) {\n if (container.segments.length > containeePaths.length) {\n const current = container.segments.slice(0, containeePaths.length);\n if (!equalPath(current, containeePaths))\n return false;\n if (containee.hasChildren())\n return false;\n if (!matrixParamsMatch(current, containeePaths, matrixParams))\n return false;\n return true;\n }\n else if (container.segments.length === containeePaths.length) {\n if (!equalPath(container.segments, containeePaths))\n return false;\n if (!matrixParamsMatch(container.segments, containeePaths, matrixParams))\n return false;\n for (const c in containee.children) {\n if (!container.children[c])\n return false;\n if (!containsSegmentGroup(container.children[c], containee.children[c], matrixParams)) {\n return false;\n }\n }\n return true;\n }\n else {\n const current = containeePaths.slice(0, container.segments.length);\n const next = containeePaths.slice(container.segments.length);\n if (!equalPath(container.segments, current))\n return false;\n if (!matrixParamsMatch(container.segments, current, matrixParams))\n return false;\n if (!container.children[PRIMARY_OUTLET])\n return false;\n return containsSegmentGroupHelper(container.children[PRIMARY_OUTLET], containee, next, matrixParams);\n }\n}\nfunction matrixParamsMatch(containerPaths, containeePaths, options) {\n return containeePaths.every((containeeSegment, i) => {\n return paramCompareMap[options](containerPaths[i].parameters, containeeSegment.parameters);\n });\n}\n/**\n * @description\n *\n * Represents the parsed URL.\n *\n * Since a router state is a tree, and the URL is nothing but a serialized state, the URL is a\n * serialized tree.\n * UrlTree is a data structure that provides a lot of affordances in dealing with URLs\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const tree: UrlTree =\n * router.parseUrl('/team/33/(user/victor//support:help)?debug=true#fragment');\n * const f = tree.fragment; // return 'fragment'\n * const q = tree.queryParams; // returns {debug: 'true'}\n * const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n * const s: UrlSegment[] = g.segments; // returns 2 segments 'team' and '33'\n * g.children[PRIMARY_OUTLET].segments; // returns 2 segments 'user' and 'victor'\n * g.children['support'].segments; // return 1 segment 'help'\n * }\n * }\n * ```\n *\n * @publicApi\n */\nclass UrlTree {\n constructor(\n /** The root segment group of the URL tree */\n root = new UrlSegmentGroup([], {}), \n /** The query params of the URL */\n queryParams = {}, \n /** The fragment of the URL */\n fragment = null) {\n this.root = root;\n this.queryParams = queryParams;\n this.fragment = fragment;\n if (NG_DEV_MODE$b) {\n if (root.segments.length > 0) {\n throw new ɵRuntimeError(4015 /* RuntimeErrorCode.INVALID_ROOT_URL_SEGMENT */, 'The root `UrlSegmentGroup` should not contain `segments`. ' +\n 'Instead, these segments belong in the `children` so they can be associated with a named outlet.');\n }\n }\n }\n get queryParamMap() {\n if (!this._queryParamMap) {\n this._queryParamMap = convertToParamMap(this.queryParams);\n }\n return this._queryParamMap;\n }\n /** @docsNotRequired */\n toString() {\n return DEFAULT_SERIALIZER.serialize(this);\n }\n}\n/**\n * @description\n *\n * Represents the parsed URL segment group.\n *\n * See `UrlTree` for more information.\n *\n * @publicApi\n */\nclass UrlSegmentGroup {\n constructor(\n /** The URL segments of this group. See `UrlSegment` for more information */\n segments, \n /** The list of children of this group */\n children) {\n this.segments = segments;\n this.children = children;\n /** The parent node in the url tree */\n this.parent = null;\n forEach(children, (v, k) => v.parent = this);\n }\n /** Whether the segment has child segments */\n hasChildren() {\n return this.numberOfChildren > 0;\n }\n /** Number of child segments */\n get numberOfChildren() {\n return Object.keys(this.children).length;\n }\n /** @docsNotRequired */\n toString() {\n return serializePaths(this);\n }\n}\n/**\n * @description\n *\n * Represents a single URL segment.\n *\n * A UrlSegment is a part of a URL between the two slashes. It contains a path and the matrix\n * parameters associated with the segment.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const tree: UrlTree = router.parseUrl('/team;id=33');\n * const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n * const s: UrlSegment[] = g.segments;\n * s[0].path; // returns 'team'\n * s[0].parameters; // returns {id: 33}\n * }\n * }\n * ```\n *\n * @publicApi\n */\nclass UrlSegment {\n constructor(\n /** The path part of a URL segment */\n path, \n /** The matrix parameters associated with a segment */\n parameters) {\n this.path = path;\n this.parameters = parameters;\n }\n get parameterMap() {\n if (!this._parameterMap) {\n this._parameterMap = convertToParamMap(this.parameters);\n }\n return this._parameterMap;\n }\n /** @docsNotRequired */\n toString() {\n return serializePath(this);\n }\n}\nfunction equalSegments(as, bs) {\n return equalPath(as, bs) && as.every((a, i) => shallowEqual(a.parameters, bs[i].parameters));\n}\nfunction equalPath(as, bs) {\n if (as.length !== bs.length)\n return false;\n return as.every((a, i) => a.path === bs[i].path);\n}\nfunction mapChildrenIntoArray(segment, fn) {\n let res = [];\n forEach(segment.children, (child, childOutlet) => {\n if (childOutlet === PRIMARY_OUTLET) {\n res = res.concat(fn(child, childOutlet));\n }\n });\n forEach(segment.children, (child, childOutlet) => {\n if (childOutlet !== PRIMARY_OUTLET) {\n res = res.concat(fn(child, childOutlet));\n }\n });\n return res;\n}\n/**\n * @description\n *\n * Serializes and deserializes a URL string into a URL tree.\n *\n * The url serialization strategy is customizable. You can\n * make all URLs case insensitive by providing a custom UrlSerializer.\n *\n * See `DefaultUrlSerializer` for an example of a URL serializer.\n *\n * @publicApi\n */\nclass UrlSerializer {\n}\nUrlSerializer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: UrlSerializer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nUrlSerializer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: UrlSerializer, providedIn: 'root', useFactory: () => new DefaultUrlSerializer() });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: UrlSerializer, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root', useFactory: () => new DefaultUrlSerializer() }]\n }] });\n/**\n * @description\n *\n * A default implementation of the `UrlSerializer`.\n *\n * Example URLs:\n *\n * ```\n * /inbox/33(popup:compose)\n * /inbox/33;open=true/messages/44\n * ```\n *\n * DefaultUrlSerializer uses parentheses to serialize secondary segments (e.g., popup:compose), the\n * colon syntax to specify the outlet, and the ';parameter=value' syntax (e.g., open=true) to\n * specify route specific parameters.\n *\n * @publicApi\n */\nclass DefaultUrlSerializer {\n /** Parses a url into a `UrlTree` */\n parse(url) {\n const p = new UrlParser(url);\n return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());\n }\n /** Converts a `UrlTree` into a url */\n serialize(tree) {\n const segment = `/${serializeSegment(tree.root, true)}`;\n const query = serializeQueryParams(tree.queryParams);\n const fragment = typeof tree.fragment === `string` ? `#${encodeUriFragment(tree.fragment)}` : '';\n return `${segment}${query}${fragment}`;\n }\n}\nconst DEFAULT_SERIALIZER = new DefaultUrlSerializer();\nfunction serializePaths(segment) {\n return segment.segments.map(p => serializePath(p)).join('/');\n}\nfunction serializeSegment(segment, root) {\n if (!segment.hasChildren()) {\n return serializePaths(segment);\n }\n if (root) {\n const primary = segment.children[PRIMARY_OUTLET] ?\n serializeSegment(segment.children[PRIMARY_OUTLET], false) :\n '';\n const children = [];\n forEach(segment.children, (v, k) => {\n if (k !== PRIMARY_OUTLET) {\n children.push(`${k}:${serializeSegment(v, false)}`);\n }\n });\n return children.length > 0 ? `${primary}(${children.join('//')})` : primary;\n }\n else {\n const children = mapChildrenIntoArray(segment, (v, k) => {\n if (k === PRIMARY_OUTLET) {\n return [serializeSegment(segment.children[PRIMARY_OUTLET], false)];\n }\n return [`${k}:${serializeSegment(v, false)}`];\n });\n // use no parenthesis if the only child is a primary outlet route\n if (Object.keys(segment.children).length === 1 && segment.children[PRIMARY_OUTLET] != null) {\n return `${serializePaths(segment)}/${children[0]}`;\n }\n return `${serializePaths(segment)}/(${children.join('//')})`;\n }\n}\n/**\n * Encodes a URI string with the default encoding. This function will only ever be called from\n * `encodeUriQuery` or `encodeUriSegment` as it's the base set of encodings to be used. We need\n * a custom encoding because encodeURIComponent is too aggressive and encodes stuff that doesn't\n * have to be encoded per https://url.spec.whatwg.org.\n */\nfunction encodeUriString(s) {\n return encodeURIComponent(s)\n .replace(/%40/g, '@')\n .replace(/%3A/gi, ':')\n .replace(/%24/g, '$')\n .replace(/%2C/gi, ',');\n}\n/**\n * This function should be used to encode both keys and values in a query string key/value. In\n * the following URL, you need to call encodeUriQuery on \"k\" and \"v\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nfunction encodeUriQuery(s) {\n return encodeUriString(s).replace(/%3B/gi, ';');\n}\n/**\n * This function should be used to encode a URL fragment. In the following URL, you need to call\n * encodeUriFragment on \"f\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nfunction encodeUriFragment(s) {\n return encodeURI(s);\n}\n/**\n * This function should be run on any URI segment as well as the key and value in a key/value\n * pair for matrix params. In the following URL, you need to call encodeUriSegment on \"html\",\n * \"mk\", and \"mv\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nfunction encodeUriSegment(s) {\n return encodeUriString(s).replace(/\\(/g, '%28').replace(/\\)/g, '%29').replace(/%26/gi, '&');\n}\nfunction decode(s) {\n return decodeURIComponent(s);\n}\n// Query keys/values should have the \"+\" replaced first, as \"+\" in a query string is \" \".\n// decodeURIComponent function will not decode \"+\" as a space.\nfunction decodeQuery(s) {\n return decode(s.replace(/\\+/g, '%20'));\n}\nfunction serializePath(path) {\n return `${encodeUriSegment(path.path)}${serializeMatrixParams(path.parameters)}`;\n}\nfunction serializeMatrixParams(params) {\n return Object.keys(params)\n .map(key => `;${encodeUriSegment(key)}=${encodeUriSegment(params[key])}`)\n .join('');\n}\nfunction serializeQueryParams(params) {\n const strParams = Object.keys(params)\n .map((name) => {\n const value = params[name];\n return Array.isArray(value) ?\n value.map(v => `${encodeUriQuery(name)}=${encodeUriQuery(v)}`).join('&') :\n `${encodeUriQuery(name)}=${encodeUriQuery(value)}`;\n })\n .filter(s => !!s);\n return strParams.length ? `?${strParams.join('&')}` : '';\n}\nconst SEGMENT_RE = /^[^\\/()?;=#]+/;\nfunction matchSegments(str) {\n const match = str.match(SEGMENT_RE);\n return match ? match[0] : '';\n}\nconst QUERY_PARAM_RE = /^[^=?&#]+/;\n// Return the name of the query param at the start of the string or an empty string\nfunction matchQueryParams(str) {\n const match = str.match(QUERY_PARAM_RE);\n return match ? match[0] : '';\n}\nconst QUERY_PARAM_VALUE_RE = /^[^&#]+/;\n// Return the value of the query param at the start of the string or an empty string\nfunction matchUrlQueryParamValue(str) {\n const match = str.match(QUERY_PARAM_VALUE_RE);\n return match ? match[0] : '';\n}\nclass UrlParser {\n constructor(url) {\n this.url = url;\n this.remaining = url;\n }\n parseRootSegment() {\n this.consumeOptional('/');\n if (this.remaining === '' || this.peekStartsWith('?') || this.peekStartsWith('#')) {\n return new UrlSegmentGroup([], {});\n }\n // The root segment group never has segments\n return new UrlSegmentGroup([], this.parseChildren());\n }\n parseQueryParams() {\n const params = {};\n if (this.consumeOptional('?')) {\n do {\n this.parseQueryParam(params);\n } while (this.consumeOptional('&'));\n }\n return params;\n }\n parseFragment() {\n return this.consumeOptional('#') ? decodeURIComponent(this.remaining) : null;\n }\n parseChildren() {\n if (this.remaining === '') {\n return {};\n }\n this.consumeOptional('/');\n const segments = [];\n if (!this.peekStartsWith('(')) {\n segments.push(this.parseSegment());\n }\n while (this.peekStartsWith('/') && !this.peekStartsWith('//') && !this.peekStartsWith('/(')) {\n this.capture('/');\n segments.push(this.parseSegment());\n }\n let children = {};\n if (this.peekStartsWith('/(')) {\n this.capture('/');\n children = this.parseParens(true);\n }\n let res = {};\n if (this.peekStartsWith('(')) {\n res = this.parseParens(false);\n }\n if (segments.length > 0 || Object.keys(children).length > 0) {\n res[PRIMARY_OUTLET] = new UrlSegmentGroup(segments, children);\n }\n return res;\n }\n // parse a segment with its matrix parameters\n // ie `name;k1=v1;k2`\n parseSegment() {\n const path = matchSegments(this.remaining);\n if (path === '' && this.peekStartsWith(';')) {\n throw new ɵRuntimeError(4009 /* RuntimeErrorCode.EMPTY_PATH_WITH_PARAMS */, NG_DEV_MODE$b && `Empty path url segment cannot have parameters: '${this.remaining}'.`);\n }\n this.capture(path);\n return new UrlSegment(decode(path), this.parseMatrixParams());\n }\n parseMatrixParams() {\n const params = {};\n while (this.consumeOptional(';')) {\n this.parseParam(params);\n }\n return params;\n }\n parseParam(params) {\n const key = matchSegments(this.remaining);\n if (!key) {\n return;\n }\n this.capture(key);\n let value = '';\n if (this.consumeOptional('=')) {\n const valueMatch = matchSegments(this.remaining);\n if (valueMatch) {\n value = valueMatch;\n this.capture(value);\n }\n }\n params[decode(key)] = decode(value);\n }\n // Parse a single query parameter `name[=value]`\n parseQueryParam(params) {\n const key = matchQueryParams(this.remaining);\n if (!key) {\n return;\n }\n this.capture(key);\n let value = '';\n if (this.consumeOptional('=')) {\n const valueMatch = matchUrlQueryParamValue(this.remaining);\n if (valueMatch) {\n value = valueMatch;\n this.capture(value);\n }\n }\n const decodedKey = decodeQuery(key);\n const decodedVal = decodeQuery(value);\n if (params.hasOwnProperty(decodedKey)) {\n // Append to existing values\n let currentVal = params[decodedKey];\n if (!Array.isArray(currentVal)) {\n currentVal = [currentVal];\n params[decodedKey] = currentVal;\n }\n currentVal.push(decodedVal);\n }\n else {\n // Create a new value\n params[decodedKey] = decodedVal;\n }\n }\n // parse `(a/b//outlet_name:c/d)`\n parseParens(allowPrimary) {\n const segments = {};\n this.capture('(');\n while (!this.consumeOptional(')') && this.remaining.length > 0) {\n const path = matchSegments(this.remaining);\n const next = this.remaining[path.length];\n // if is is not one of these characters, then the segment was unescaped\n // or the group was not closed\n if (next !== '/' && next !== ')' && next !== ';') {\n throw new ɵRuntimeError(4010 /* RuntimeErrorCode.UNPARSABLE_URL */, NG_DEV_MODE$b && `Cannot parse url '${this.url}'`);\n }\n let outletName = undefined;\n if (path.indexOf(':') > -1) {\n outletName = path.slice(0, path.indexOf(':'));\n this.capture(outletName);\n this.capture(':');\n }\n else if (allowPrimary) {\n outletName = PRIMARY_OUTLET;\n }\n const children = this.parseChildren();\n segments[outletName] = Object.keys(children).length === 1 ? children[PRIMARY_OUTLET] :\n new UrlSegmentGroup([], children);\n this.consumeOptional('//');\n }\n return segments;\n }\n peekStartsWith(str) {\n return this.remaining.startsWith(str);\n }\n // Consumes the prefix when it is present and returns whether it has been consumed\n consumeOptional(str) {\n if (this.peekStartsWith(str)) {\n this.remaining = this.remaining.substring(str.length);\n return true;\n }\n return false;\n }\n capture(str) {\n if (!this.consumeOptional(str)) {\n throw new ɵRuntimeError(4011 /* RuntimeErrorCode.UNEXPECTED_VALUE_IN_URL */, NG_DEV_MODE$b && `Expected \"${str}\".`);\n }\n }\n}\nfunction createRoot(rootCandidate) {\n return rootCandidate.segments.length > 0 ?\n new UrlSegmentGroup([], { [PRIMARY_OUTLET]: rootCandidate }) :\n rootCandidate;\n}\n/**\n * Recursively merges primary segment children into their parents and also drops empty children\n * (those which have no segments and no children themselves). The latter prevents serializing a\n * group into something like `/a(aux:)`, where `aux` is an empty child segment.\n */\nfunction squashSegmentGroup(segmentGroup) {\n const newChildren = {};\n for (const childOutlet of Object.keys(segmentGroup.children)) {\n const child = segmentGroup.children[childOutlet];\n const childCandidate = squashSegmentGroup(child);\n // don't add empty children\n if (childCandidate.segments.length > 0 || childCandidate.hasChildren()) {\n newChildren[childOutlet] = childCandidate;\n }\n }\n const s = new UrlSegmentGroup(segmentGroup.segments, newChildren);\n return mergeTrivialChildren(s);\n}\n/**\n * When possible, merges the primary outlet child into the parent `UrlSegmentGroup`.\n *\n * When a segment group has only one child which is a primary outlet, merges that child into the\n * parent. That is, the child segment group's segments are merged into the `s` and the child's\n * children become the children of `s`. Think of this like a 'squash', merging the child segment\n * group into the parent.\n */\nfunction mergeTrivialChildren(s) {\n if (s.numberOfChildren === 1 && s.children[PRIMARY_OUTLET]) {\n const c = s.children[PRIMARY_OUTLET];\n return new UrlSegmentGroup(s.segments.concat(c.segments), c.children);\n }\n return s;\n}\nfunction isUrlTree(v) {\n return v instanceof UrlTree;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst NG_DEV_MODE$a = typeof ngDevMode === 'undefined' || ngDevMode;\n/**\n * Creates a `UrlTree` relative to an `ActivatedRouteSnapshot`.\n *\n * @publicApi\n *\n *\n * @param relativeTo The `ActivatedRouteSnapshot` to apply the commands to\n * @param commands An array of URL fragments with which to construct the new URL tree.\n * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n * segments, followed by the parameters for each segment.\n * The fragments are applied to the one provided in the `relativeTo` parameter.\n * @param queryParams The query parameters for the `UrlTree`. `null` if the `UrlTree` does not have\n * any query parameters.\n * @param fragment The fragment for the `UrlTree`. `null` if the `UrlTree` does not have a fragment.\n *\n * @usageNotes\n *\n * ```\n * // create /team/33/user/11\n * createUrlTreeFromSnapshot(snapshot, ['/team', 33, 'user', 11]);\n *\n * // create /team/33;expand=true/user/11\n * createUrlTreeFromSnapshot(snapshot, ['/team', 33, {expand: true}, 'user', 11]);\n *\n * // you can collapse static segments like this (this works only with the first passed-in value):\n * createUrlTreeFromSnapshot(snapshot, ['/team/33/user', userId]);\n *\n * // If the first segment can contain slashes, and you do not want the router to split it,\n * // you can do the following:\n * createUrlTreeFromSnapshot(snapshot, [{segmentPath: '/one/two'}]);\n *\n * // create /team/33/(user/11//right:chat)\n * createUrlTreeFromSnapshot(snapshot, ['/team', 33, {outlets: {primary: 'user/11', right:\n * 'chat'}}], null, null);\n *\n * // remove the right secondary node\n * createUrlTreeFromSnapshot(snapshot, ['/team', 33, {outlets: {primary: 'user/11', right: null}}]);\n *\n * // For the examples below, assume the current URL is for the `/team/33/user/11` and the\n * `ActivatedRouteSnapshot` points to `user/11`:\n *\n * // navigate to /team/33/user/11/details\n * createUrlTreeFromSnapshot(snapshot, ['details']);\n *\n * // navigate to /team/33/user/22\n * createUrlTreeFromSnapshot(snapshot, ['../22']);\n *\n * // navigate to /team/44/user/22\n * createUrlTreeFromSnapshot(snapshot, ['../../team/44/user/22']);\n * ```\n */\nfunction createUrlTreeFromSnapshot(relativeTo, commands, queryParams = null, fragment = null) {\n const relativeToUrlSegmentGroup = createSegmentGroupFromRoute(relativeTo);\n return createUrlTreeFromSegmentGroup(relativeToUrlSegmentGroup, commands, queryParams, fragment);\n}\nfunction createSegmentGroupFromRoute(route) {\n let targetGroup;\n function createSegmentGroupFromRouteRecursive(currentRoute) {\n const childOutlets = {};\n for (const childSnapshot of currentRoute.children) {\n const root = createSegmentGroupFromRouteRecursive(childSnapshot);\n childOutlets[childSnapshot.outlet] = root;\n }\n const segmentGroup = new UrlSegmentGroup(currentRoute.url, childOutlets);\n if (currentRoute === route) {\n targetGroup = segmentGroup;\n }\n return segmentGroup;\n }\n const rootCandidate = createSegmentGroupFromRouteRecursive(route.root);\n const rootSegmentGroup = createRoot(rootCandidate);\n return targetGroup ?? rootSegmentGroup;\n}\nfunction createUrlTreeFromSegmentGroup(relativeTo, commands, queryParams, fragment) {\n let root = relativeTo;\n while (root.parent) {\n root = root.parent;\n }\n // There are no commands so the `UrlTree` goes to the same path as the one created from the\n // `UrlSegmentGroup`. All we need to do is update the `queryParams` and `fragment` without\n // applying any other logic.\n if (commands.length === 0) {\n return tree(root, root, root, queryParams, fragment);\n }\n const nav = computeNavigation(commands);\n if (nav.toRoot()) {\n return tree(root, root, new UrlSegmentGroup([], {}), queryParams, fragment);\n }\n const position = findStartingPositionForTargetGroup(nav, root, relativeTo);\n const newSegmentGroup = position.processChildren ?\n updateSegmentGroupChildren(position.segmentGroup, position.index, nav.commands) :\n updateSegmentGroup(position.segmentGroup, position.index, nav.commands);\n return tree(root, position.segmentGroup, newSegmentGroup, queryParams, fragment);\n}\nfunction createUrlTree(route, urlTree, commands, queryParams, fragment) {\n if (commands.length === 0) {\n return tree(urlTree.root, urlTree.root, urlTree.root, queryParams, fragment);\n }\n const nav = computeNavigation(commands);\n if (nav.toRoot()) {\n return tree(urlTree.root, urlTree.root, new UrlSegmentGroup([], {}), queryParams, fragment);\n }\n function createTreeUsingPathIndex(lastPathIndex) {\n const startingPosition = findStartingPosition(nav, urlTree, route.snapshot?._urlSegment, lastPathIndex);\n const segmentGroup = startingPosition.processChildren ?\n updateSegmentGroupChildren(startingPosition.segmentGroup, startingPosition.index, nav.commands) :\n updateSegmentGroup(startingPosition.segmentGroup, startingPosition.index, nav.commands);\n return tree(urlTree.root, startingPosition.segmentGroup, segmentGroup, queryParams, fragment);\n }\n // Note: The types should disallow `snapshot` from being `undefined` but due to test mocks, this\n // may be the case. Since we try to access it at an earlier point before the refactor to add the\n // warning for `relativeLinkResolution: 'legacy'`, this may cause failures in tests where it\n // didn't before.\n const result = createTreeUsingPathIndex(route.snapshot?._lastPathIndex);\n return result;\n}\nfunction isMatrixParams(command) {\n return typeof command === 'object' && command != null && !command.outlets && !command.segmentPath;\n}\n/**\n * Determines if a given command has an `outlets` map. When we encounter a command\n * with an outlets k/v map, we need to apply each outlet individually to the existing segment.\n */\nfunction isCommandWithOutlets(command) {\n return typeof command === 'object' && command != null && command.outlets;\n}\nfunction tree(oldRoot, oldSegmentGroup, newSegmentGroup, queryParams, fragment) {\n let qp = {};\n if (queryParams) {\n forEach(queryParams, (value, name) => {\n qp[name] = Array.isArray(value) ? value.map((v) => `${v}`) : `${value}`;\n });\n }\n let rootCandidate;\n if (oldRoot === oldSegmentGroup) {\n rootCandidate = newSegmentGroup;\n }\n else {\n rootCandidate = replaceSegment(oldRoot, oldSegmentGroup, newSegmentGroup);\n }\n const newRoot = createRoot(squashSegmentGroup(rootCandidate));\n return new UrlTree(newRoot, qp, fragment);\n}\n/**\n * Replaces the `oldSegment` which is located in some child of the `current` with the `newSegment`.\n * This also has the effect of creating new `UrlSegmentGroup` copies to update references. This\n * shouldn't be necessary but the fallback logic for an invalid ActivatedRoute in the creation uses\n * the Router's current url tree. If we don't create new segment groups, we end up modifying that\n * value.\n */\nfunction replaceSegment(current, oldSegment, newSegment) {\n const children = {};\n forEach(current.children, (c, outletName) => {\n if (c === oldSegment) {\n children[outletName] = newSegment;\n }\n else {\n children[outletName] = replaceSegment(c, oldSegment, newSegment);\n }\n });\n return new UrlSegmentGroup(current.segments, children);\n}\nclass Navigation {\n constructor(isAbsolute, numberOfDoubleDots, commands) {\n this.isAbsolute = isAbsolute;\n this.numberOfDoubleDots = numberOfDoubleDots;\n this.commands = commands;\n if (isAbsolute && commands.length > 0 && isMatrixParams(commands[0])) {\n throw new ɵRuntimeError(4003 /* RuntimeErrorCode.ROOT_SEGMENT_MATRIX_PARAMS */, NG_DEV_MODE$a && 'Root segment cannot have matrix parameters');\n }\n const cmdWithOutlet = commands.find(isCommandWithOutlets);\n if (cmdWithOutlet && cmdWithOutlet !== last(commands)) {\n throw new ɵRuntimeError(4004 /* RuntimeErrorCode.MISPLACED_OUTLETS_COMMAND */, NG_DEV_MODE$a && '{outlets:{}} has to be the last command');\n }\n }\n toRoot() {\n return this.isAbsolute && this.commands.length === 1 && this.commands[0] == '/';\n }\n}\n/** Transforms commands to a normalized `Navigation` */\nfunction computeNavigation(commands) {\n if ((typeof commands[0] === 'string') && commands.length === 1 && commands[0] === '/') {\n return new Navigation(true, 0, commands);\n }\n let numberOfDoubleDots = 0;\n let isAbsolute = false;\n const res = commands.reduce((res, cmd, cmdIdx) => {\n if (typeof cmd === 'object' && cmd != null) {\n if (cmd.outlets) {\n const outlets = {};\n forEach(cmd.outlets, (commands, name) => {\n outlets[name] = typeof commands === 'string' ? commands.split('/') : commands;\n });\n return [...res, { outlets }];\n }\n if (cmd.segmentPath) {\n return [...res, cmd.segmentPath];\n }\n }\n if (!(typeof cmd === 'string')) {\n return [...res, cmd];\n }\n if (cmdIdx === 0) {\n cmd.split('/').forEach((urlPart, partIndex) => {\n if (partIndex == 0 && urlPart === '.') {\n // skip './a'\n }\n else if (partIndex == 0 && urlPart === '') { // '/a'\n isAbsolute = true;\n }\n else if (urlPart === '..') { // '../a'\n numberOfDoubleDots++;\n }\n else if (urlPart != '') {\n res.push(urlPart);\n }\n });\n return res;\n }\n return [...res, cmd];\n }, []);\n return new Navigation(isAbsolute, numberOfDoubleDots, res);\n}\nclass Position {\n constructor(segmentGroup, processChildren, index) {\n this.segmentGroup = segmentGroup;\n this.processChildren = processChildren;\n this.index = index;\n }\n}\nfunction findStartingPositionForTargetGroup(nav, root, target) {\n if (nav.isAbsolute) {\n return new Position(root, true, 0);\n }\n if (!target) {\n // `NaN` is used only to maintain backwards compatibility with incorrectly mocked\n // `ActivatedRouteSnapshot` in tests. In prior versions of this code, the position here was\n // determined based on an internal property that was rarely mocked, resulting in `NaN`. In\n // reality, this code path should _never_ be touched since `target` is not allowed to be falsey.\n return new Position(root, false, NaN);\n }\n if (target.parent === null) {\n return new Position(target, true, 0);\n }\n const modifier = isMatrixParams(nav.commands[0]) ? 0 : 1;\n const index = target.segments.length - 1 + modifier;\n return createPositionApplyingDoubleDots(target, index, nav.numberOfDoubleDots);\n}\nfunction findStartingPosition(nav, tree, segmentGroup, lastPathIndex) {\n if (nav.isAbsolute) {\n return new Position(tree.root, true, 0);\n }\n if (lastPathIndex === -1) {\n // Pathless ActivatedRoute has _lastPathIndex === -1 but should not process children\n // see issue #26224, #13011, #35687\n // However, if the ActivatedRoute is the root we should process children like above.\n const processChildren = segmentGroup === tree.root;\n return new Position(segmentGroup, processChildren, 0);\n }\n const modifier = isMatrixParams(nav.commands[0]) ? 0 : 1;\n const index = lastPathIndex + modifier;\n return createPositionApplyingDoubleDots(segmentGroup, index, nav.numberOfDoubleDots);\n}\nfunction createPositionApplyingDoubleDots(group, index, numberOfDoubleDots) {\n let g = group;\n let ci = index;\n let dd = numberOfDoubleDots;\n while (dd > ci) {\n dd -= ci;\n g = g.parent;\n if (!g) {\n throw new ɵRuntimeError(4005 /* RuntimeErrorCode.INVALID_DOUBLE_DOTS */, NG_DEV_MODE$a && 'Invalid number of \\'../\\'');\n }\n ci = g.segments.length;\n }\n return new Position(g, false, ci - dd);\n}\nfunction getOutlets(commands) {\n if (isCommandWithOutlets(commands[0])) {\n return commands[0].outlets;\n }\n return { [PRIMARY_OUTLET]: commands };\n}\nfunction updateSegmentGroup(segmentGroup, startIndex, commands) {\n if (!segmentGroup) {\n segmentGroup = new UrlSegmentGroup([], {});\n }\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return updateSegmentGroupChildren(segmentGroup, startIndex, commands);\n }\n const m = prefixedWith(segmentGroup, startIndex, commands);\n const slicedCommands = commands.slice(m.commandIndex);\n if (m.match && m.pathIndex < segmentGroup.segments.length) {\n const g = new UrlSegmentGroup(segmentGroup.segments.slice(0, m.pathIndex), {});\n g.children[PRIMARY_OUTLET] =\n new UrlSegmentGroup(segmentGroup.segments.slice(m.pathIndex), segmentGroup.children);\n return updateSegmentGroupChildren(g, 0, slicedCommands);\n }\n else if (m.match && slicedCommands.length === 0) {\n return new UrlSegmentGroup(segmentGroup.segments, {});\n }\n else if (m.match && !segmentGroup.hasChildren()) {\n return createNewSegmentGroup(segmentGroup, startIndex, commands);\n }\n else if (m.match) {\n return updateSegmentGroupChildren(segmentGroup, 0, slicedCommands);\n }\n else {\n return createNewSegmentGroup(segmentGroup, startIndex, commands);\n }\n}\nfunction updateSegmentGroupChildren(segmentGroup, startIndex, commands) {\n if (commands.length === 0) {\n return new UrlSegmentGroup(segmentGroup.segments, {});\n }\n else {\n const outlets = getOutlets(commands);\n const children = {};\n forEach(outlets, (commands, outlet) => {\n if (typeof commands === 'string') {\n commands = [commands];\n }\n if (commands !== null) {\n children[outlet] = updateSegmentGroup(segmentGroup.children[outlet], startIndex, commands);\n }\n });\n forEach(segmentGroup.children, (child, childOutlet) => {\n if (outlets[childOutlet] === undefined) {\n children[childOutlet] = child;\n }\n });\n return new UrlSegmentGroup(segmentGroup.segments, children);\n }\n}\nfunction prefixedWith(segmentGroup, startIndex, commands) {\n let currentCommandIndex = 0;\n let currentPathIndex = startIndex;\n const noMatch = { match: false, pathIndex: 0, commandIndex: 0 };\n while (currentPathIndex < segmentGroup.segments.length) {\n if (currentCommandIndex >= commands.length)\n return noMatch;\n const path = segmentGroup.segments[currentPathIndex];\n const command = commands[currentCommandIndex];\n // Do not try to consume command as part of the prefixing if it has outlets because it can\n // contain outlets other than the one being processed. Consuming the outlets command would\n // result in other outlets being ignored.\n if (isCommandWithOutlets(command)) {\n break;\n }\n const curr = `${command}`;\n const next = currentCommandIndex < commands.length - 1 ? commands[currentCommandIndex + 1] : null;\n if (currentPathIndex > 0 && curr === undefined)\n break;\n if (curr && next && (typeof next === 'object') && next.outlets === undefined) {\n if (!compare(curr, next, path))\n return noMatch;\n currentCommandIndex += 2;\n }\n else {\n if (!compare(curr, {}, path))\n return noMatch;\n currentCommandIndex++;\n }\n currentPathIndex++;\n }\n return { match: true, pathIndex: currentPathIndex, commandIndex: currentCommandIndex };\n}\nfunction createNewSegmentGroup(segmentGroup, startIndex, commands) {\n const paths = segmentGroup.segments.slice(0, startIndex);\n let i = 0;\n while (i < commands.length) {\n const command = commands[i];\n if (isCommandWithOutlets(command)) {\n const children = createNewSegmentChildren(command.outlets);\n return new UrlSegmentGroup(paths, children);\n }\n // if we start with an object literal, we need to reuse the path part from the segment\n if (i === 0 && isMatrixParams(commands[0])) {\n const p = segmentGroup.segments[startIndex];\n paths.push(new UrlSegment(p.path, stringify(commands[0])));\n i++;\n continue;\n }\n const curr = isCommandWithOutlets(command) ? command.outlets[PRIMARY_OUTLET] : `${command}`;\n const next = (i < commands.length - 1) ? commands[i + 1] : null;\n if (curr && next && isMatrixParams(next)) {\n paths.push(new UrlSegment(curr, stringify(next)));\n i += 2;\n }\n else {\n paths.push(new UrlSegment(curr, {}));\n i++;\n }\n }\n return new UrlSegmentGroup(paths, {});\n}\nfunction createNewSegmentChildren(outlets) {\n const children = {};\n forEach(outlets, (commands, outlet) => {\n if (typeof commands === 'string') {\n commands = [commands];\n }\n if (commands !== null) {\n children[outlet] = createNewSegmentGroup(new UrlSegmentGroup([], {}), 0, commands);\n }\n });\n return children;\n}\nfunction stringify(params) {\n const res = {};\n forEach(params, (v, k) => res[k] = `${v}`);\n return res;\n}\nfunction compare(path, params, segment) {\n return path == segment.path && shallowEqual(params, segment.parameters);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Base for events the router goes through, as opposed to events tied to a specific\n * route. Fired one time for any given navigation.\n *\n * The following code shows how a class subscribes to router events.\n *\n * ```ts\n * import {Event, RouterEvent, Router} from '@angular/router';\n *\n * class MyService {\n * constructor(public router: Router) {\n * router.events.pipe(\n * filter((e: Event): e is RouterEvent => e instanceof RouterEvent)\n * ).subscribe((e: RouterEvent) => {\n * // Do something\n * });\n * }\n * }\n * ```\n *\n * @see `Event`\n * @see [Router events summary](guide/router-reference#router-events)\n * @publicApi\n */\nclass RouterEvent {\n constructor(\n /** A unique ID that the router assigns to every router navigation. */\n id, \n /** The URL that is the destination for this navigation. */\n url) {\n this.id = id;\n this.url = url;\n }\n}\n/**\n * An event triggered when a navigation starts.\n *\n * @publicApi\n */\nclass NavigationStart extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n navigationTrigger = 'imperative', \n /** @docsNotRequired */\n restoredState = null) {\n super(id, url);\n this.type = 0 /* EventType.NavigationStart */;\n this.navigationTrigger = navigationTrigger;\n this.restoredState = restoredState;\n }\n /** @docsNotRequired */\n toString() {\n return `NavigationStart(id: ${this.id}, url: '${this.url}')`;\n }\n}\n/**\n * An event triggered when a navigation ends successfully.\n *\n * @see `NavigationStart`\n * @see `NavigationCancel`\n * @see `NavigationError`\n *\n * @publicApi\n */\nclass NavigationEnd extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n urlAfterRedirects) {\n super(id, url);\n this.urlAfterRedirects = urlAfterRedirects;\n this.type = 1 /* EventType.NavigationEnd */;\n }\n /** @docsNotRequired */\n toString() {\n return `NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`;\n }\n}\n/**\n * An event triggered when a navigation is canceled, directly or indirectly.\n * This can happen for several reasons including when a route guard\n * returns `false` or initiates a redirect by returning a `UrlTree`.\n *\n * @see `NavigationStart`\n * @see `NavigationEnd`\n * @see `NavigationError`\n *\n * @publicApi\n */\nclass NavigationCancel extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /**\n * A description of why the navigation was cancelled. For debug purposes only. Use `code`\n * instead for a stable cancellation reason that can be used in production.\n */\n reason, \n /**\n * A code to indicate why the navigation was canceled. This cancellation code is stable for\n * the reason and can be relied on whereas the `reason` string could change and should not be\n * used in production.\n */\n code) {\n super(id, url);\n this.reason = reason;\n this.code = code;\n this.type = 2 /* EventType.NavigationCancel */;\n }\n /** @docsNotRequired */\n toString() {\n return `NavigationCancel(id: ${this.id}, url: '${this.url}')`;\n }\n}\n/**\n * An event triggered when a navigation fails due to an unexpected error.\n *\n * @see `NavigationStart`\n * @see `NavigationEnd`\n * @see `NavigationCancel`\n *\n * @publicApi\n */\nclass NavigationError extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n error, \n /**\n * The target of the navigation when the error occurred.\n *\n * Note that this can be `undefined` because an error could have occurred before the\n * `RouterStateSnapshot` was created for the navigation.\n */\n target) {\n super(id, url);\n this.error = error;\n this.target = target;\n this.type = 3 /* EventType.NavigationError */;\n }\n /** @docsNotRequired */\n toString() {\n return `NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`;\n }\n}\n/**\n * An event triggered when routes are recognized.\n *\n * @publicApi\n */\nclass RoutesRecognized extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n urlAfterRedirects, \n /** @docsNotRequired */\n state) {\n super(id, url);\n this.urlAfterRedirects = urlAfterRedirects;\n this.state = state;\n this.type = 4 /* EventType.RoutesRecognized */;\n }\n /** @docsNotRequired */\n toString() {\n return `RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n/**\n * An event triggered at the start of the Guard phase of routing.\n *\n * @see `GuardsCheckEnd`\n *\n * @publicApi\n */\nclass GuardsCheckStart extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n urlAfterRedirects, \n /** @docsNotRequired */\n state) {\n super(id, url);\n this.urlAfterRedirects = urlAfterRedirects;\n this.state = state;\n this.type = 7 /* EventType.GuardsCheckStart */;\n }\n toString() {\n return `GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n/**\n * An event triggered at the end of the Guard phase of routing.\n *\n * @see `GuardsCheckStart`\n *\n * @publicApi\n */\nclass GuardsCheckEnd extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n urlAfterRedirects, \n /** @docsNotRequired */\n state, \n /** @docsNotRequired */\n shouldActivate) {\n super(id, url);\n this.urlAfterRedirects = urlAfterRedirects;\n this.state = state;\n this.shouldActivate = shouldActivate;\n this.type = 8 /* EventType.GuardsCheckEnd */;\n }\n toString() {\n return `GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`;\n }\n}\n/**\n * An event triggered at the start of the Resolve phase of routing.\n *\n * Runs in the \"resolve\" phase whether or not there is anything to resolve.\n * In future, may change to only run when there are things to be resolved.\n *\n * @see `ResolveEnd`\n *\n * @publicApi\n */\nclass ResolveStart extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n urlAfterRedirects, \n /** @docsNotRequired */\n state) {\n super(id, url);\n this.urlAfterRedirects = urlAfterRedirects;\n this.state = state;\n this.type = 5 /* EventType.ResolveStart */;\n }\n toString() {\n return `ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n/**\n * An event triggered at the end of the Resolve phase of routing.\n * @see `ResolveStart`.\n *\n * @publicApi\n */\nclass ResolveEnd extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n urlAfterRedirects, \n /** @docsNotRequired */\n state) {\n super(id, url);\n this.urlAfterRedirects = urlAfterRedirects;\n this.state = state;\n this.type = 6 /* EventType.ResolveEnd */;\n }\n toString() {\n return `ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n/**\n * An event triggered before lazy loading a route configuration.\n *\n * @see `RouteConfigLoadEnd`\n *\n * @publicApi\n */\nclass RouteConfigLoadStart {\n constructor(\n /** @docsNotRequired */\n route) {\n this.route = route;\n this.type = 9 /* EventType.RouteConfigLoadStart */;\n }\n toString() {\n return `RouteConfigLoadStart(path: ${this.route.path})`;\n }\n}\n/**\n * An event triggered when a route has been lazy loaded.\n *\n * @see `RouteConfigLoadStart`\n *\n * @publicApi\n */\nclass RouteConfigLoadEnd {\n constructor(\n /** @docsNotRequired */\n route) {\n this.route = route;\n this.type = 10 /* EventType.RouteConfigLoadEnd */;\n }\n toString() {\n return `RouteConfigLoadEnd(path: ${this.route.path})`;\n }\n}\n/**\n * An event triggered at the start of the child-activation\n * part of the Resolve phase of routing.\n * @see `ChildActivationEnd`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nclass ChildActivationStart {\n constructor(\n /** @docsNotRequired */\n snapshot) {\n this.snapshot = snapshot;\n this.type = 11 /* EventType.ChildActivationStart */;\n }\n toString() {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ChildActivationStart(path: '${path}')`;\n }\n}\n/**\n * An event triggered at the end of the child-activation part\n * of the Resolve phase of routing.\n * @see `ChildActivationStart`\n * @see `ResolveStart`\n * @publicApi\n */\nclass ChildActivationEnd {\n constructor(\n /** @docsNotRequired */\n snapshot) {\n this.snapshot = snapshot;\n this.type = 12 /* EventType.ChildActivationEnd */;\n }\n toString() {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ChildActivationEnd(path: '${path}')`;\n }\n}\n/**\n * An event triggered at the start of the activation part\n * of the Resolve phase of routing.\n * @see `ActivationEnd`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nclass ActivationStart {\n constructor(\n /** @docsNotRequired */\n snapshot) {\n this.snapshot = snapshot;\n this.type = 13 /* EventType.ActivationStart */;\n }\n toString() {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ActivationStart(path: '${path}')`;\n }\n}\n/**\n * An event triggered at the end of the activation part\n * of the Resolve phase of routing.\n * @see `ActivationStart`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nclass ActivationEnd {\n constructor(\n /** @docsNotRequired */\n snapshot) {\n this.snapshot = snapshot;\n this.type = 14 /* EventType.ActivationEnd */;\n }\n toString() {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ActivationEnd(path: '${path}')`;\n }\n}\n/**\n * An event triggered by scrolling.\n *\n * @publicApi\n */\nclass Scroll {\n constructor(\n /** @docsNotRequired */\n routerEvent, \n /** @docsNotRequired */\n position, \n /** @docsNotRequired */\n anchor) {\n this.routerEvent = routerEvent;\n this.position = position;\n this.anchor = anchor;\n this.type = 15 /* EventType.Scroll */;\n }\n toString() {\n const pos = this.position ? `${this.position[0]}, ${this.position[1]}` : null;\n return `Scroll(anchor: '${this.anchor}', position: '${pos}')`;\n }\n}\nfunction stringifyEvent(routerEvent) {\n if (!('type' in routerEvent)) {\n return `Unknown Router Event: ${routerEvent.constructor.name}`;\n }\n switch (routerEvent.type) {\n case 14 /* EventType.ActivationEnd */:\n return `ActivationEnd(path: '${routerEvent.snapshot.routeConfig?.path || ''}')`;\n case 13 /* EventType.ActivationStart */:\n return `ActivationStart(path: '${routerEvent.snapshot.routeConfig?.path || ''}')`;\n case 12 /* EventType.ChildActivationEnd */:\n return `ChildActivationEnd(path: '${routerEvent.snapshot.routeConfig?.path || ''}')`;\n case 11 /* EventType.ChildActivationStart */:\n return `ChildActivationStart(path: '${routerEvent.snapshot.routeConfig?.path || ''}')`;\n case 8 /* EventType.GuardsCheckEnd */:\n return `GuardsCheckEnd(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state}, shouldActivate: ${routerEvent.shouldActivate})`;\n case 7 /* EventType.GuardsCheckStart */:\n return `GuardsCheckStart(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state})`;\n case 2 /* EventType.NavigationCancel */:\n return `NavigationCancel(id: ${routerEvent.id}, url: '${routerEvent.url}')`;\n case 1 /* EventType.NavigationEnd */:\n return `NavigationEnd(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}')`;\n case 3 /* EventType.NavigationError */:\n return `NavigationError(id: ${routerEvent.id}, url: '${routerEvent.url}', error: ${routerEvent.error})`;\n case 0 /* EventType.NavigationStart */:\n return `NavigationStart(id: ${routerEvent.id}, url: '${routerEvent.url}')`;\n case 6 /* EventType.ResolveEnd */:\n return `ResolveEnd(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state})`;\n case 5 /* EventType.ResolveStart */:\n return `ResolveStart(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state})`;\n case 10 /* EventType.RouteConfigLoadEnd */:\n return `RouteConfigLoadEnd(path: ${routerEvent.route.path})`;\n case 9 /* EventType.RouteConfigLoadStart */:\n return `RouteConfigLoadStart(path: ${routerEvent.route.path})`;\n case 4 /* EventType.RoutesRecognized */:\n return `RoutesRecognized(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state})`;\n case 15 /* EventType.Scroll */:\n const pos = routerEvent.position ? `${routerEvent.position[0]}, ${routerEvent.position[1]}` : null;\n return `Scroll(anchor: '${routerEvent.anchor}', position: '${pos}')`;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst NG_DEV_MODE$9 = typeof ngDevMode === 'undefined' || ngDevMode;\nclass LegacyCreateUrlTree {\n createUrlTree(relativeTo, currentState, currentUrlTree, commands, queryParams, fragment) {\n const a = relativeTo || currentState.root;\n return createUrlTree(a, currentUrlTree, commands, queryParams, fragment);\n }\n}\nLegacyCreateUrlTree.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: LegacyCreateUrlTree, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nLegacyCreateUrlTree.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: LegacyCreateUrlTree });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: LegacyCreateUrlTree, decorators: [{\n type: Injectable\n }] });\nclass CreateUrlTreeUsingSnapshot {\n createUrlTree(relativeTo, currentState, currentUrlTree, commands, queryParams, fragment) {\n let relativeToUrlSegmentGroup;\n try {\n const relativeToSnapshot = relativeTo ? relativeTo.snapshot : currentState.snapshot.root;\n relativeToUrlSegmentGroup = createSegmentGroupFromRoute(relativeToSnapshot);\n }\n catch (e) {\n // This is strictly for backwards compatibility with tests that create\n // invalid `ActivatedRoute` mocks.\n // Note: the difference between having this fallback for invalid `ActivatedRoute` setups and\n // just throwing is ~500 test failures. Fixing all of those tests by hand is not feasible at\n // the moment.\n if (NG_DEV_MODE$9) {\n console.warn(`The ActivatedRoute has an invalid structure. This is likely due to an incomplete mock in tests.`);\n }\n if (typeof commands[0] !== 'string' || !commands[0].startsWith('/')) {\n // Navigations that were absolute in the old way of creating UrlTrees\n // would still work because they wouldn't attempt to match the\n // segments in the `ActivatedRoute` to the `currentUrlTree` but\n // instead just replace the root segment with the navigation result.\n // Non-absolute navigations would fail to apply the commands because\n // the logic could not find the segment to replace (so they'd act like there were no\n // commands).\n commands = [];\n }\n relativeToUrlSegmentGroup = currentUrlTree.root;\n }\n return createUrlTreeFromSegmentGroup(relativeToUrlSegmentGroup, commands, queryParams, fragment);\n }\n}\nCreateUrlTreeUsingSnapshot.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: CreateUrlTreeUsingSnapshot, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nCreateUrlTreeUsingSnapshot.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: CreateUrlTreeUsingSnapshot });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: CreateUrlTreeUsingSnapshot, decorators: [{\n type: Injectable\n }] });\nclass CreateUrlTreeStrategy {\n}\nCreateUrlTreeStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: CreateUrlTreeStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nCreateUrlTreeStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: CreateUrlTreeStrategy, providedIn: 'root', useClass: LegacyCreateUrlTree });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: CreateUrlTreeStrategy, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root', useClass: LegacyCreateUrlTree }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass Tree {\n constructor(root) {\n this._root = root;\n }\n get root() {\n return this._root.value;\n }\n /**\n * @internal\n */\n parent(t) {\n const p = this.pathFromRoot(t);\n return p.length > 1 ? p[p.length - 2] : null;\n }\n /**\n * @internal\n */\n children(t) {\n const n = findNode(t, this._root);\n return n ? n.children.map(t => t.value) : [];\n }\n /**\n * @internal\n */\n firstChild(t) {\n const n = findNode(t, this._root);\n return n && n.children.length > 0 ? n.children[0].value : null;\n }\n /**\n * @internal\n */\n siblings(t) {\n const p = findPath(t, this._root);\n if (p.length < 2)\n return [];\n const c = p[p.length - 2].children.map(c => c.value);\n return c.filter(cc => cc !== t);\n }\n /**\n * @internal\n */\n pathFromRoot(t) {\n return findPath(t, this._root).map(s => s.value);\n }\n}\n// DFS for the node matching the value\nfunction findNode(value, node) {\n if (value === node.value)\n return node;\n for (const child of node.children) {\n const node = findNode(value, child);\n if (node)\n return node;\n }\n return null;\n}\n// Return the path to the node with the given value using DFS\nfunction findPath(value, node) {\n if (value === node.value)\n return [node];\n for (const child of node.children) {\n const path = findPath(value, child);\n if (path.length) {\n path.unshift(node);\n return path;\n }\n }\n return [];\n}\nclass TreeNode {\n constructor(value, children) {\n this.value = value;\n this.children = children;\n }\n toString() {\n return `TreeNode(${this.value})`;\n }\n}\n// Return the list of T indexed by outlet name\nfunction nodeChildrenAsMap(node) {\n const map = {};\n if (node) {\n node.children.forEach(child => map[child.value.outlet] = child);\n }\n return map;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Represents the state of the router as a tree of activated routes.\n *\n * @usageNotes\n *\n * Every node in the route tree is an `ActivatedRoute` instance\n * that knows about the \"consumed\" URL segments, the extracted parameters,\n * and the resolved data.\n * Use the `ActivatedRoute` properties to traverse the tree from any node.\n *\n * The following fragment shows how a component gets the root node\n * of the current state to establish its own route tree:\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const state: RouterState = router.routerState;\n * const root: ActivatedRoute = state.root;\n * const child = root.firstChild;\n * const id: Observable<string> = child.params.map(p => p.id);\n * //...\n * }\n * }\n * ```\n *\n * @see `ActivatedRoute`\n * @see [Getting route information](guide/router#getting-route-information)\n *\n * @publicApi\n */\nclass RouterState extends Tree {\n /** @internal */\n constructor(root, \n /** The current snapshot of the router state */\n snapshot) {\n super(root);\n this.snapshot = snapshot;\n setRouterState(this, root);\n }\n toString() {\n return this.snapshot.toString();\n }\n}\nfunction createEmptyState(urlTree, rootComponent) {\n const snapshot = createEmptyStateSnapshot(urlTree, rootComponent);\n const emptyUrl = new BehaviorSubject([new UrlSegment('', {})]);\n const emptyParams = new BehaviorSubject({});\n const emptyData = new BehaviorSubject({});\n const emptyQueryParams = new BehaviorSubject({});\n const fragment = new BehaviorSubject('');\n const activated = new ActivatedRoute(emptyUrl, emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, snapshot.root);\n activated.snapshot = snapshot.root;\n return new RouterState(new TreeNode(activated, []), snapshot);\n}\nfunction createEmptyStateSnapshot(urlTree, rootComponent) {\n const emptyParams = {};\n const emptyData = {};\n const emptyQueryParams = {};\n const fragment = '';\n const activated = new ActivatedRouteSnapshot([], emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, null, urlTree.root, -1, {});\n return new RouterStateSnapshot('', new TreeNode(activated, []));\n}\n/**\n * Provides access to information about a route associated with a component\n * that is loaded in an outlet.\n * Use to traverse the `RouterState` tree and extract information from nodes.\n *\n * The following example shows how to construct a component using information from a\n * currently activated route.\n *\n * Note: the observables in this class only emit when the current and previous values differ based\n * on shallow equality. For example, changing deeply nested properties in resolved `data` will not\n * cause the `ActivatedRoute.data` `Observable` to emit a new value.\n *\n * {@example router/activated-route/module.ts region=\"activated-route\"\n * header=\"activated-route.component.ts\"}\n *\n * @see [Getting route information](guide/router#getting-route-information)\n *\n * @publicApi\n */\nclass ActivatedRoute {\n /** @internal */\n constructor(\n /** An observable of the URL segments matched by this route. */\n url, \n /** An observable of the matrix parameters scoped to this route. */\n params, \n /** An observable of the query parameters shared by all the routes. */\n queryParams, \n /** An observable of the URL fragment shared by all the routes. */\n fragment, \n /** An observable of the static and resolved data of this route. */\n data, \n /** The outlet name of the route, a constant. */\n outlet, \n /** The component of the route, a constant. */\n component, futureSnapshot) {\n this.url = url;\n this.params = params;\n this.queryParams = queryParams;\n this.fragment = fragment;\n this.data = data;\n this.outlet = outlet;\n this.component = component;\n /** An Observable of the resolved route title */\n this.title = this.data?.pipe(map((d) => d[RouteTitleKey])) ?? of(undefined);\n this._futureSnapshot = futureSnapshot;\n }\n /** The configuration used to match this route. */\n get routeConfig() {\n return this._futureSnapshot.routeConfig;\n }\n /** The root of the router state. */\n get root() {\n return this._routerState.root;\n }\n /** The parent of this route in the router state tree. */\n get parent() {\n return this._routerState.parent(this);\n }\n /** The first child of this route in the router state tree. */\n get firstChild() {\n return this._routerState.firstChild(this);\n }\n /** The children of this route in the router state tree. */\n get children() {\n return this._routerState.children(this);\n }\n /** The path from the root of the router state tree to this route. */\n get pathFromRoot() {\n return this._routerState.pathFromRoot(this);\n }\n /**\n * An Observable that contains a map of the required and optional parameters\n * specific to the route.\n * The map supports retrieving single and multiple values from the same parameter.\n */\n get paramMap() {\n if (!this._paramMap) {\n this._paramMap = this.params.pipe(map((p) => convertToParamMap(p)));\n }\n return this._paramMap;\n }\n /**\n * An Observable that contains a map of the query parameters available to all routes.\n * The map supports retrieving single and multiple values from the query parameter.\n */\n get queryParamMap() {\n if (!this._queryParamMap) {\n this._queryParamMap =\n this.queryParams.pipe(map((p) => convertToParamMap(p)));\n }\n return this._queryParamMap;\n }\n toString() {\n return this.snapshot ? this.snapshot.toString() : `Future(${this._futureSnapshot})`;\n }\n}\n/**\n * Returns the inherited params, data, and resolve for a given route.\n * By default, this only inherits values up to the nearest path-less or component-less route.\n * @internal\n */\nfunction inheritedParamsDataResolve(route, paramsInheritanceStrategy = 'emptyOnly') {\n const pathFromRoot = route.pathFromRoot;\n let inheritingStartingFrom = 0;\n if (paramsInheritanceStrategy !== 'always') {\n inheritingStartingFrom = pathFromRoot.length - 1;\n while (inheritingStartingFrom >= 1) {\n const current = pathFromRoot[inheritingStartingFrom];\n const parent = pathFromRoot[inheritingStartingFrom - 1];\n // current route is an empty path => inherits its parent's params and data\n if (current.routeConfig && current.routeConfig.path === '') {\n inheritingStartingFrom--;\n // parent is componentless => current route should inherit its params and data\n }\n else if (!parent.component) {\n inheritingStartingFrom--;\n }\n else {\n break;\n }\n }\n }\n return flattenInherited(pathFromRoot.slice(inheritingStartingFrom));\n}\n/** @internal */\nfunction flattenInherited(pathFromRoot) {\n return pathFromRoot.reduce((res, curr) => {\n const params = { ...res.params, ...curr.params };\n const data = { ...res.data, ...curr.data };\n const resolve = { ...curr.data, ...res.resolve, ...curr.routeConfig?.data, ...curr._resolvedData };\n return { params, data, resolve };\n }, { params: {}, data: {}, resolve: {} });\n}\n/**\n * @description\n *\n * Contains the information about a route associated with a component loaded in an\n * outlet at a particular moment in time. ActivatedRouteSnapshot can also be used to\n * traverse the router state tree.\n *\n * The following example initializes a component with route information extracted\n * from the snapshot of the root node at the time of creation.\n *\n * ```\n * @Component({templateUrl:'./my-component.html'})\n * class MyComponent {\n * constructor(route: ActivatedRoute) {\n * const id: string = route.snapshot.params.id;\n * const url: string = route.snapshot.url.join('');\n * const user = route.snapshot.data.user;\n * }\n * }\n * ```\n *\n * @publicApi\n */\nclass ActivatedRouteSnapshot {\n /** @internal */\n constructor(\n /** The URL segments matched by this route */\n url, \n /**\n * The matrix parameters scoped to this route.\n *\n * You can compute all params (or data) in the router state or to get params outside\n * of an activated component by traversing the `RouterState` tree as in the following\n * example:\n * ```\n * collectRouteParams(router: Router) {\n * let params = {};\n * let stack: ActivatedRouteSnapshot[] = [router.routerState.snapshot.root];\n * while (stack.length > 0) {\n * const route = stack.pop()!;\n * params = {...params, ...route.params};\n * stack.push(...route.children);\n * }\n * return params;\n * }\n * ```\n */\n params, \n /** The query parameters shared by all the routes */\n queryParams, \n /** The URL fragment shared by all the routes */\n fragment, \n /** The static and resolved data of this route */\n data, \n /** The outlet name of the route */\n outlet, \n /** The component of the route */\n component, routeConfig, urlSegment, lastPathIndex, resolve) {\n this.url = url;\n this.params = params;\n this.queryParams = queryParams;\n this.fragment = fragment;\n this.data = data;\n this.outlet = outlet;\n this.component = component;\n this.routeConfig = routeConfig;\n this._urlSegment = urlSegment;\n this._lastPathIndex = lastPathIndex;\n this._resolve = resolve;\n }\n /** The resolved route title */\n get title() {\n // Note: This _must_ be a getter because the data is mutated in the resolvers. Title will not be\n // available at the time of class instantiation.\n return this.data?.[RouteTitleKey];\n }\n /** The root of the router state */\n get root() {\n return this._routerState.root;\n }\n /** The parent of this route in the router state tree */\n get parent() {\n return this._routerState.parent(this);\n }\n /** The first child of this route in the router state tree */\n get firstChild() {\n return this._routerState.firstChild(this);\n }\n /** The children of this route in the router state tree */\n get children() {\n return this._routerState.children(this);\n }\n /** The path from the root of the router state tree to this route */\n get pathFromRoot() {\n return this._routerState.pathFromRoot(this);\n }\n get paramMap() {\n if (!this._paramMap) {\n this._paramMap = convertToParamMap(this.params);\n }\n return this._paramMap;\n }\n get queryParamMap() {\n if (!this._queryParamMap) {\n this._queryParamMap = convertToParamMap(this.queryParams);\n }\n return this._queryParamMap;\n }\n toString() {\n const url = this.url.map(segment => segment.toString()).join('/');\n const matched = this.routeConfig ? this.routeConfig.path : '';\n return `Route(url:'${url}', path:'${matched}')`;\n }\n}\n/**\n * @description\n *\n * Represents the state of the router at a moment in time.\n *\n * This is a tree of activated route snapshots. Every node in this tree knows about\n * the \"consumed\" URL segments, the extracted parameters, and the resolved data.\n *\n * The following example shows how a component is initialized with information\n * from the snapshot of the root node's state at the time of creation.\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const state: RouterState = router.routerState;\n * const snapshot: RouterStateSnapshot = state.snapshot;\n * const root: ActivatedRouteSnapshot = snapshot.root;\n * const child = root.firstChild;\n * const id: Observable<string> = child.params.map(p => p.id);\n * //...\n * }\n * }\n * ```\n *\n * @publicApi\n */\nclass RouterStateSnapshot extends Tree {\n /** @internal */\n constructor(\n /** The url from which this snapshot was created */\n url, root) {\n super(root);\n this.url = url;\n setRouterState(this, root);\n }\n toString() {\n return serializeNode(this._root);\n }\n}\nfunction setRouterState(state, node) {\n node.value._routerState = state;\n node.children.forEach(c => setRouterState(state, c));\n}\nfunction serializeNode(node) {\n const c = node.children.length > 0 ? ` { ${node.children.map(serializeNode).join(', ')} } ` : '';\n return `${node.value}${c}`;\n}\n/**\n * The expectation is that the activate route is created with the right set of parameters.\n * So we push new values into the observables only when they are not the initial values.\n * And we detect that by checking if the snapshot field is set.\n */\nfunction advanceActivatedRoute(route) {\n if (route.snapshot) {\n const currentSnapshot = route.snapshot;\n const nextSnapshot = route._futureSnapshot;\n route.snapshot = nextSnapshot;\n if (!shallowEqual(currentSnapshot.queryParams, nextSnapshot.queryParams)) {\n route.queryParams.next(nextSnapshot.queryParams);\n }\n if (currentSnapshot.fragment !== nextSnapshot.fragment) {\n route.fragment.next(nextSnapshot.fragment);\n }\n if (!shallowEqual(currentSnapshot.params, nextSnapshot.params)) {\n route.params.next(nextSnapshot.params);\n }\n if (!shallowEqualArrays(currentSnapshot.url, nextSnapshot.url)) {\n route.url.next(nextSnapshot.url);\n }\n if (!shallowEqual(currentSnapshot.data, nextSnapshot.data)) {\n route.data.next(nextSnapshot.data);\n }\n }\n else {\n route.snapshot = route._futureSnapshot;\n // this is for resolved data\n route.data.next(route._futureSnapshot.data);\n }\n}\nfunction equalParamsAndUrlSegments(a, b) {\n const equalUrlParams = shallowEqual(a.params, b.params) && equalSegments(a.url, b.url);\n const parentsMismatch = !a.parent !== !b.parent;\n return equalUrlParams && !parentsMismatch &&\n (!a.parent || equalParamsAndUrlSegments(a.parent, b.parent));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction createRouterState(routeReuseStrategy, curr, prevState) {\n const root = createNode(routeReuseStrategy, curr._root, prevState ? prevState._root : undefined);\n return new RouterState(root, curr);\n}\nfunction createNode(routeReuseStrategy, curr, prevState) {\n // reuse an activated route that is currently displayed on the screen\n if (prevState && routeReuseStrategy.shouldReuseRoute(curr.value, prevState.value.snapshot)) {\n const value = prevState.value;\n value._futureSnapshot = curr.value;\n const children = createOrReuseChildren(routeReuseStrategy, curr, prevState);\n return new TreeNode(value, children);\n }\n else {\n if (routeReuseStrategy.shouldAttach(curr.value)) {\n // retrieve an activated route that is used to be displayed, but is not currently displayed\n const detachedRouteHandle = routeReuseStrategy.retrieve(curr.value);\n if (detachedRouteHandle !== null) {\n const tree = detachedRouteHandle.route;\n tree.value._futureSnapshot = curr.value;\n tree.children = curr.children.map(c => createNode(routeReuseStrategy, c));\n return tree;\n }\n }\n const value = createActivatedRoute(curr.value);\n const children = curr.children.map(c => createNode(routeReuseStrategy, c));\n return new TreeNode(value, children);\n }\n}\nfunction createOrReuseChildren(routeReuseStrategy, curr, prevState) {\n return curr.children.map(child => {\n for (const p of prevState.children) {\n if (routeReuseStrategy.shouldReuseRoute(child.value, p.value.snapshot)) {\n return createNode(routeReuseStrategy, child, p);\n }\n }\n return createNode(routeReuseStrategy, child);\n });\n}\nfunction createActivatedRoute(c) {\n return new ActivatedRoute(new BehaviorSubject(c.url), new BehaviorSubject(c.params), new BehaviorSubject(c.queryParams), new BehaviorSubject(c.fragment), new BehaviorSubject(c.data), c.outlet, c.component, c);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError';\nfunction redirectingNavigationError(urlSerializer, redirect) {\n const { redirectTo, navigationBehaviorOptions } = isUrlTree(redirect) ? { redirectTo: redirect, navigationBehaviorOptions: undefined } : redirect;\n const error = navigationCancelingError(ngDevMode && `Redirecting to \"${urlSerializer.serialize(redirectTo)}\"`, 0 /* NavigationCancellationCode.Redirect */, redirect);\n error.url = redirectTo;\n error.navigationBehaviorOptions = navigationBehaviorOptions;\n return error;\n}\nfunction navigationCancelingError(message, code, redirectUrl) {\n const error = new Error('NavigationCancelingError: ' + (message || ''));\n error[NAVIGATION_CANCELING_ERROR] = true;\n error.cancellationCode = code;\n if (redirectUrl) {\n error.url = redirectUrl;\n }\n return error;\n}\nfunction isRedirectingNavigationCancelingError$1(error) {\n return isNavigationCancelingError$1(error) && isUrlTree(error.url);\n}\nfunction isNavigationCancelingError$1(error) {\n return error && error[NAVIGATION_CANCELING_ERROR];\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Store contextual information about a `RouterOutlet`\n *\n * @publicApi\n */\nclass OutletContext {\n constructor() {\n this.outlet = null;\n this.route = null;\n /**\n * @deprecated Passing a resolver to retrieve a component factory is not required and is\n * deprecated since v14.\n */\n this.resolver = null;\n this.injector = null;\n this.children = new ChildrenOutletContexts();\n this.attachRef = null;\n }\n}\n/**\n * Store contextual information about the children (= nested) `RouterOutlet`\n *\n * @publicApi\n */\nclass ChildrenOutletContexts {\n constructor() {\n // contexts for child outlets, by name.\n this.contexts = new Map();\n }\n /** Called when a `RouterOutlet` directive is instantiated */\n onChildOutletCreated(childName, outlet) {\n const context = this.getOrCreateContext(childName);\n context.outlet = outlet;\n this.contexts.set(childName, context);\n }\n /**\n * Called when a `RouterOutlet` directive is destroyed.\n * We need to keep the context as the outlet could be destroyed inside a NgIf and might be\n * re-created later.\n */\n onChildOutletDestroyed(childName) {\n const context = this.getContext(childName);\n if (context) {\n context.outlet = null;\n context.attachRef = null;\n }\n }\n /**\n * Called when the corresponding route is deactivated during navigation.\n * Because the component get destroyed, all children outlet are destroyed.\n */\n onOutletDeactivated() {\n const contexts = this.contexts;\n this.contexts = new Map();\n return contexts;\n }\n onOutletReAttached(contexts) {\n this.contexts = contexts;\n }\n getOrCreateContext(childName) {\n let context = this.getContext(childName);\n if (!context) {\n context = new OutletContext();\n this.contexts.set(childName, context);\n }\n return context;\n }\n getContext(childName) {\n return this.contexts.get(childName) || null;\n }\n}\nChildrenOutletContexts.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: ChildrenOutletContexts, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nChildrenOutletContexts.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: ChildrenOutletContexts, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: ChildrenOutletContexts, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst NG_DEV_MODE$8 = typeof ngDevMode === 'undefined' || ngDevMode;\n/**\n * @description\n *\n * Acts as a placeholder that Angular dynamically fills based on the current router state.\n *\n * Each outlet can have a unique name, determined by the optional `name` attribute.\n * The name cannot be set or changed dynamically. If not set, default value is \"primary\".\n *\n * ```\n * <router-outlet></router-outlet>\n * <router-outlet name='left'></router-outlet>\n * <router-outlet name='right'></router-outlet>\n * ```\n *\n * Named outlets can be the targets of secondary routes.\n * The `Route` object for a secondary route has an `outlet` property to identify the target outlet:\n *\n * `{path: <base-path>, component: <component>, outlet: <target_outlet_name>}`\n *\n * Using named outlets and secondary routes, you can target multiple outlets in\n * the same `RouterLink` directive.\n *\n * The router keeps track of separate branches in a navigation tree for each named outlet and\n * generates a representation of that tree in the URL.\n * The URL for a secondary route uses the following syntax to specify both the primary and secondary\n * routes at the same time:\n *\n * `http://base-path/primary-route-path(outlet-name:route-path)`\n *\n * A router outlet emits an activate event when a new component is instantiated,\n * deactivate event when a component is destroyed.\n * An attached event emits when the `RouteReuseStrategy` instructs the outlet to reattach the\n * subtree, and the detached event emits when the `RouteReuseStrategy` instructs the outlet to\n * detach the subtree.\n *\n * ```\n * <router-outlet\n * (activate)='onActivate($event)'\n * (deactivate)='onDeactivate($event)'\n * (attach)='onAttach($event)'\n * (detach)='onDetach($event)'></router-outlet>\n * ```\n *\n * @see [Routing tutorial](guide/router-tutorial-toh#named-outlets \"Example of a named\n * outlet and secondary route configuration\").\n * @see `RouterLink`\n * @see `Route`\n * @ngModule RouterModule\n *\n * @publicApi\n */\nclass RouterOutlet {\n constructor() {\n this.activated = null;\n this._activatedRoute = null;\n /**\n * The name of the outlet\n *\n * @see [named outlets](guide/router-tutorial-toh#displaying-multiple-routes-in-named-outlets)\n */\n this.name = PRIMARY_OUTLET;\n this.activateEvents = new EventEmitter();\n this.deactivateEvents = new EventEmitter();\n /**\n * Emits an attached component instance when the `RouteReuseStrategy` instructs to re-attach a\n * previously detached subtree.\n **/\n this.attachEvents = new EventEmitter();\n /**\n * Emits a detached component instance when the `RouteReuseStrategy` instructs to detach the\n * subtree.\n */\n this.detachEvents = new EventEmitter();\n this.parentContexts = inject(ChildrenOutletContexts);\n this.location = inject(ViewContainerRef);\n this.changeDetector = inject(ChangeDetectorRef);\n this.environmentInjector = inject(EnvironmentInjector);\n }\n /** @nodoc */\n ngOnChanges(changes) {\n if (changes['name']) {\n const { firstChange, previousValue } = changes['name'];\n if (firstChange) {\n // The first change is handled by ngOnInit. Because ngOnChanges doesn't get called when no\n // input is set at all, we need to centrally handle the first change there.\n return;\n }\n // unregister with the old name\n if (this.isTrackedInParentContexts(previousValue)) {\n this.deactivate();\n this.parentContexts.onChildOutletDestroyed(previousValue);\n }\n // register the new name\n this.initializeOutletWithName();\n }\n }\n /** @nodoc */\n ngOnDestroy() {\n // Ensure that the registered outlet is this one before removing it on the context.\n if (this.isTrackedInParentContexts(this.name)) {\n this.parentContexts.onChildOutletDestroyed(this.name);\n }\n }\n isTrackedInParentContexts(outletName) {\n return this.parentContexts.getContext(outletName)?.outlet === this;\n }\n /** @nodoc */\n ngOnInit() {\n this.initializeOutletWithName();\n }\n initializeOutletWithName() {\n this.parentContexts.onChildOutletCreated(this.name, this);\n if (this.activated) {\n return;\n }\n // If the outlet was not instantiated at the time the route got activated we need to populate\n // the outlet when it is initialized (ie inside a NgIf)\n const context = this.parentContexts.getContext(this.name);\n if (context?.route) {\n if (context.attachRef) {\n // `attachRef` is populated when there is an existing component to mount\n this.attach(context.attachRef, context.route);\n }\n else {\n // otherwise the component defined in the configuration is created\n this.activateWith(context.route, context.injector);\n }\n }\n }\n get isActivated() {\n return !!this.activated;\n }\n /**\n * @returns The currently activated component instance.\n * @throws An error if the outlet is not activated.\n */\n get component() {\n if (!this.activated)\n throw new ɵRuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, NG_DEV_MODE$8 && 'Outlet is not activated');\n return this.activated.instance;\n }\n get activatedRoute() {\n if (!this.activated)\n throw new ɵRuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, NG_DEV_MODE$8 && 'Outlet is not activated');\n return this._activatedRoute;\n }\n get activatedRouteData() {\n if (this._activatedRoute) {\n return this._activatedRoute.snapshot.data;\n }\n return {};\n }\n /**\n * Called when the `RouteReuseStrategy` instructs to detach the subtree\n */\n detach() {\n if (!this.activated)\n throw new ɵRuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, NG_DEV_MODE$8 && 'Outlet is not activated');\n this.location.detach();\n const cmp = this.activated;\n this.activated = null;\n this._activatedRoute = null;\n this.detachEvents.emit(cmp.instance);\n return cmp;\n }\n /**\n * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\n */\n attach(ref, activatedRoute) {\n this.activated = ref;\n this._activatedRoute = activatedRoute;\n this.location.insert(ref.hostView);\n this.attachEvents.emit(ref.instance);\n }\n deactivate() {\n if (this.activated) {\n const c = this.component;\n this.activated.destroy();\n this.activated = null;\n this._activatedRoute = null;\n this.deactivateEvents.emit(c);\n }\n }\n activateWith(activatedRoute, resolverOrInjector) {\n if (this.isActivated) {\n throw new ɵRuntimeError(4013 /* RuntimeErrorCode.OUTLET_ALREADY_ACTIVATED */, NG_DEV_MODE$8 && 'Cannot activate an already activated outlet');\n }\n this._activatedRoute = activatedRoute;\n const location = this.location;\n const snapshot = activatedRoute.snapshot;\n const component = snapshot.component;\n const childContexts = this.parentContexts.getOrCreateContext(this.name).children;\n const injector = new OutletInjector(activatedRoute, childContexts, location.injector);\n if (resolverOrInjector && isComponentFactoryResolver(resolverOrInjector)) {\n const factory = resolverOrInjector.resolveComponentFactory(component);\n this.activated = location.createComponent(factory, location.length, injector);\n }\n else {\n const environmentInjector = resolverOrInjector ?? this.environmentInjector;\n this.activated = location.createComponent(component, { index: location.length, injector, environmentInjector });\n }\n // Calling `markForCheck` to make sure we will run the change detection when the\n // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.\n this.changeDetector.markForCheck();\n this.activateEvents.emit(this.activated.instance);\n }\n}\nRouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: RouterOutlet, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nRouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: RouterOutlet, isStandalone: true, selector: \"router-outlet\", inputs: { name: \"name\" }, outputs: { activateEvents: \"activate\", deactivateEvents: \"deactivate\", attachEvents: \"attach\", detachEvents: \"detach\" }, exportAs: [\"outlet\"], usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: RouterOutlet, decorators: [{\n type: Directive,\n args: [{\n selector: 'router-outlet',\n exportAs: 'outlet',\n standalone: true,\n }]\n }], propDecorators: { name: [{\n type: Input\n }], activateEvents: [{\n type: Output,\n args: ['activate']\n }], deactivateEvents: [{\n type: Output,\n args: ['deactivate']\n }], attachEvents: [{\n type: Output,\n args: ['attach']\n }], detachEvents: [{\n type: Output,\n args: ['detach']\n }] } });\nclass OutletInjector {\n constructor(route, childContexts, parent) {\n this.route = route;\n this.childContexts = childContexts;\n this.parent = parent;\n }\n get(token, notFoundValue) {\n if (token === ActivatedRoute) {\n return this.route;\n }\n if (token === ChildrenOutletContexts) {\n return this.childContexts;\n }\n return this.parent.get(token, notFoundValue);\n }\n}\nfunction isComponentFactoryResolver(item) {\n return !!item.resolveComponentFactory;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * This component is used internally within the router to be a placeholder when an empty\n * router-outlet is needed. For example, with a config such as:\n *\n * `{path: 'parent', outlet: 'nav', children: [...]}`\n *\n * In order to render, there needs to be a component on this config, which will default\n * to this `EmptyOutletComponent`.\n */\nclass ɵEmptyOutletComponent {\n}\nɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nɵEmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.0.4\", type: ɵEmptyOutletComponent, isStandalone: true, selector: \"ng-component\", ngImport: i0, template: `<router-outlet></router-outlet>`, isInline: true, dependencies: [{ kind: \"directive\", type: RouterOutlet, selector: \"router-outlet\", inputs: [\"name\"], outputs: [\"activate\", \"deactivate\", \"attach\", \"detach\"], exportAs: [\"outlet\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{\n type: Component,\n args: [{\n template: `<router-outlet></router-outlet>`,\n imports: [RouterOutlet],\n standalone: true,\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Creates an `EnvironmentInjector` if the `Route` has providers and one does not already exist\n * and returns the injector. Otherwise, if the `Route` does not have `providers`, returns the\n * `currentInjector`.\n *\n * @param route The route that might have providers\n * @param currentInjector The parent injector of the `Route`\n */\nfunction getOrCreateRouteInjectorIfNeeded(route, currentInjector) {\n if (route.providers && !route._injector) {\n route._injector =\n createEnvironmentInjector(route.providers, currentInjector, `Route: ${route.path}`);\n }\n return route._injector ?? currentInjector;\n}\nfunction getLoadedRoutes(route) {\n return route._loadedRoutes;\n}\nfunction getLoadedInjector(route) {\n return route._loadedInjector;\n}\nfunction getLoadedComponent(route) {\n return route._loadedComponent;\n}\nfunction getProvidersInjector(route) {\n return route._injector;\n}\nfunction validateConfig(config, parentPath = '', requireStandaloneComponents = false) {\n // forEach doesn't iterate undefined values\n for (let i = 0; i < config.length; i++) {\n const route = config[i];\n const fullPath = getFullPath(parentPath, route);\n validateNode(route, fullPath, requireStandaloneComponents);\n }\n}\nfunction assertStandalone(fullPath, component) {\n if (component && !ɵisStandalone(component)) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}'. The component must be standalone.`);\n }\n}\nfunction validateNode(route, fullPath, requireStandaloneComponents) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!route) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `\n Invalid configuration of route '${fullPath}': Encountered undefined route.\n The reason might be an extra comma.\n\n Example:\n const routes: Routes = [\n { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n { path: 'dashboard', component: DashboardComponent },, << two commas\n { path: 'detail/:id', component: HeroDetailComponent }\n ];\n `);\n }\n if (Array.isArray(route)) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': Array cannot be specified`);\n }\n if (!route.redirectTo && !route.component && !route.loadComponent && !route.children &&\n !route.loadChildren && (route.outlet && route.outlet !== PRIMARY_OUTLET)) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': a componentless route without children or loadChildren cannot have a named outlet set`);\n }\n if (route.redirectTo && route.children) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': redirectTo and children cannot be used together`);\n }\n if (route.redirectTo && route.loadChildren) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': redirectTo and loadChildren cannot be used together`);\n }\n if (route.children && route.loadChildren) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': children and loadChildren cannot be used together`);\n }\n if (route.redirectTo && (route.component || route.loadComponent)) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': redirectTo and component/loadComponent cannot be used together`);\n }\n if (route.component && route.loadComponent) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': component and loadComponent cannot be used together`);\n }\n if (route.redirectTo && route.canActivate) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': redirectTo and canActivate cannot be used together. Redirects happen before activation ` +\n `so canActivate will never be executed.`);\n }\n if (route.path && route.matcher) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': path and matcher cannot be used together`);\n }\n if (route.redirectTo === void 0 && !route.component && !route.loadComponent &&\n !route.children && !route.loadChildren) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}'. One of the following must be provided: component, loadComponent, redirectTo, children or loadChildren`);\n }\n if (route.path === void 0 && route.matcher === void 0) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': routes must have either a path or a matcher specified`);\n }\n if (typeof route.path === 'string' && route.path.charAt(0) === '/') {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': path cannot start with a slash`);\n }\n if (route.path === '' && route.redirectTo !== void 0 && route.pathMatch === void 0) {\n const exp = `The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.`;\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '{path: \"${fullPath}\", redirectTo: \"${route.redirectTo}\"}': please provide 'pathMatch'. ${exp}`);\n }\n if (requireStandaloneComponents) {\n assertStandalone(fullPath, route.component);\n }\n }\n if (route.children) {\n validateConfig(route.children, fullPath, requireStandaloneComponents);\n }\n}\nfunction getFullPath(parentPath, currentRoute) {\n if (!currentRoute) {\n return parentPath;\n }\n if (!parentPath && !currentRoute.path) {\n return '';\n }\n else if (parentPath && !currentRoute.path) {\n return `${parentPath}/`;\n }\n else if (!parentPath && currentRoute.path) {\n return currentRoute.path;\n }\n else {\n return `${parentPath}/${currentRoute.path}`;\n }\n}\n/**\n * Makes a copy of the config and adds any default required properties.\n */\nfunction standardizeConfig(r) {\n const children = r.children && r.children.map(standardizeConfig);\n const c = children ? { ...r, children } : { ...r };\n if ((!c.component && !c.loadComponent) && (children || c.loadChildren) &&\n (c.outlet && c.outlet !== PRIMARY_OUTLET)) {\n c.component = ɵEmptyOutletComponent;\n }\n return c;\n}\n/** Returns the `route.outlet` or PRIMARY_OUTLET if none exists. */\nfunction getOutlet(route) {\n return route.outlet || PRIMARY_OUTLET;\n}\n/**\n * Sorts the `routes` such that the ones with an outlet matching `outletName` come first.\n * The order of the configs is otherwise preserved.\n */\nfunction sortByMatchingOutlets(routes, outletName) {\n const sortedConfig = routes.filter(r => getOutlet(r) === outletName);\n sortedConfig.push(...routes.filter(r => getOutlet(r) !== outletName));\n return sortedConfig;\n}\n/**\n * Gets the first injector in the snapshot's parent tree.\n *\n * If the `Route` has a static list of providers, the returned injector will be the one created from\n * those. If it does not exist, the returned injector may come from the parents, which may be from a\n * loaded config or their static providers.\n *\n * Returns `null` if there is neither this nor any parents have a stored injector.\n *\n * Generally used for retrieving the injector to use for getting tokens for guards/resolvers and\n * also used for getting the correct injector to use for creating components.\n */\nfunction getClosestRouteInjector(snapshot) {\n if (!snapshot)\n return null;\n // If the current route has its own injector, which is created from the static providers on the\n // route itself, we should use that. Otherwise, we start at the parent since we do not want to\n // include the lazy loaded injector from this route.\n if (snapshot.routeConfig?._injector) {\n return snapshot.routeConfig._injector;\n }\n for (let s = snapshot.parent; s; s = s.parent) {\n const route = s.routeConfig;\n // Note that the order here is important. `_loadedInjector` stored on the route with\n // `loadChildren: () => NgModule` so it applies to child routes with priority. The `_injector`\n // is created from the static providers on that parent route, so it applies to the children as\n // well, but only if there is no lazy loaded NgModuleRef injector.\n if (route?._loadedInjector)\n return route._loadedInjector;\n if (route?._injector)\n return route._injector;\n }\n return null;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst activateRoutes = (rootContexts, routeReuseStrategy, forwardEvent) => map(t => {\n new ActivateRoutes(routeReuseStrategy, t.targetRouterState, t.currentRouterState, forwardEvent)\n .activate(rootContexts);\n return t;\n});\nclass ActivateRoutes {\n constructor(routeReuseStrategy, futureState, currState, forwardEvent) {\n this.routeReuseStrategy = routeReuseStrategy;\n this.futureState = futureState;\n this.currState = currState;\n this.forwardEvent = forwardEvent;\n }\n activate(parentContexts) {\n const futureRoot = this.futureState._root;\n const currRoot = this.currState ? this.currState._root : null;\n this.deactivateChildRoutes(futureRoot, currRoot, parentContexts);\n advanceActivatedRoute(this.futureState.root);\n this.activateChildRoutes(futureRoot, currRoot, parentContexts);\n }\n // De-activate the child route that are not re-used for the future state\n deactivateChildRoutes(futureNode, currNode, contexts) {\n const children = nodeChildrenAsMap(currNode);\n // Recurse on the routes active in the future state to de-activate deeper children\n futureNode.children.forEach(futureChild => {\n const childOutletName = futureChild.value.outlet;\n this.deactivateRoutes(futureChild, children[childOutletName], contexts);\n delete children[childOutletName];\n });\n // De-activate the routes that will not be re-used\n forEach(children, (v, childName) => {\n this.deactivateRouteAndItsChildren(v, contexts);\n });\n }\n deactivateRoutes(futureNode, currNode, parentContext) {\n const future = futureNode.value;\n const curr = currNode ? currNode.value : null;\n if (future === curr) {\n // Reusing the node, check to see if the children need to be de-activated\n if (future.component) {\n // If we have a normal route, we need to go through an outlet.\n const context = parentContext.getContext(future.outlet);\n if (context) {\n this.deactivateChildRoutes(futureNode, currNode, context.children);\n }\n }\n else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.deactivateChildRoutes(futureNode, currNode, parentContext);\n }\n }\n else {\n if (curr) {\n // Deactivate the current route which will not be re-used\n this.deactivateRouteAndItsChildren(currNode, parentContext);\n }\n }\n }\n deactivateRouteAndItsChildren(route, parentContexts) {\n // If there is no component, the Route is never attached to an outlet (because there is no\n // component to attach).\n if (route.value.component && this.routeReuseStrategy.shouldDetach(route.value.snapshot)) {\n this.detachAndStoreRouteSubtree(route, parentContexts);\n }\n else {\n this.deactivateRouteAndOutlet(route, parentContexts);\n }\n }\n detachAndStoreRouteSubtree(route, parentContexts) {\n const context = parentContexts.getContext(route.value.outlet);\n const contexts = context && route.value.component ? context.children : parentContexts;\n const children = nodeChildrenAsMap(route);\n for (const childOutlet of Object.keys(children)) {\n this.deactivateRouteAndItsChildren(children[childOutlet], contexts);\n }\n if (context && context.outlet) {\n const componentRef = context.outlet.detach();\n const contexts = context.children.onOutletDeactivated();\n this.routeReuseStrategy.store(route.value.snapshot, { componentRef, route, contexts });\n }\n }\n deactivateRouteAndOutlet(route, parentContexts) {\n const context = parentContexts.getContext(route.value.outlet);\n // The context could be `null` if we are on a componentless route but there may still be\n // children that need deactivating.\n const contexts = context && route.value.component ? context.children : parentContexts;\n const children = nodeChildrenAsMap(route);\n for (const childOutlet of Object.keys(children)) {\n this.deactivateRouteAndItsChildren(children[childOutlet], contexts);\n }\n if (context && context.outlet) {\n // Destroy the component\n context.outlet.deactivate();\n // Destroy the contexts for all the outlets that were in the component\n context.children.onOutletDeactivated();\n // Clear the information about the attached component on the context but keep the reference to\n // the outlet.\n context.attachRef = null;\n context.resolver = null;\n context.route = null;\n }\n }\n activateChildRoutes(futureNode, currNode, contexts) {\n const children = nodeChildrenAsMap(currNode);\n futureNode.children.forEach(c => {\n this.activateRoutes(c, children[c.value.outlet], contexts);\n this.forwardEvent(new ActivationEnd(c.value.snapshot));\n });\n if (futureNode.children.length) {\n this.forwardEvent(new ChildActivationEnd(futureNode.value.snapshot));\n }\n }\n activateRoutes(futureNode, currNode, parentContexts) {\n const future = futureNode.value;\n const curr = currNode ? currNode.value : null;\n advanceActivatedRoute(future);\n // reusing the node\n if (future === curr) {\n if (future.component) {\n // If we have a normal route, we need to go through an outlet.\n const context = parentContexts.getOrCreateContext(future.outlet);\n this.activateChildRoutes(futureNode, currNode, context.children);\n }\n else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.activateChildRoutes(futureNode, currNode, parentContexts);\n }\n }\n else {\n if (future.component) {\n // if we have a normal route, we need to place the component into the outlet and recurse.\n const context = parentContexts.getOrCreateContext(future.outlet);\n if (this.routeReuseStrategy.shouldAttach(future.snapshot)) {\n const stored = this.routeReuseStrategy.retrieve(future.snapshot);\n this.routeReuseStrategy.store(future.snapshot, null);\n context.children.onOutletReAttached(stored.contexts);\n context.attachRef = stored.componentRef;\n context.route = stored.route.value;\n if (context.outlet) {\n // Attach right away when the outlet has already been instantiated\n // Otherwise attach from `RouterOutlet.ngOnInit` when it is instantiated\n context.outlet.attach(stored.componentRef, stored.route.value);\n }\n advanceActivatedRoute(stored.route.value);\n this.activateChildRoutes(futureNode, null, context.children);\n }\n else {\n const injector = getClosestRouteInjector(future.snapshot);\n const cmpFactoryResolver = injector?.get(ComponentFactoryResolver) ?? null;\n context.attachRef = null;\n context.route = future;\n context.resolver = cmpFactoryResolver;\n context.injector = injector;\n if (context.outlet) {\n // Activate the outlet when it has already been instantiated\n // Otherwise it will get activated from its `ngOnInit` when instantiated\n context.outlet.activateWith(future, context.injector);\n }\n this.activateChildRoutes(futureNode, null, context.children);\n }\n }\n else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.activateChildRoutes(futureNode, null, parentContexts);\n }\n }\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass CanActivate {\n constructor(path) {\n this.path = path;\n this.route = this.path[this.path.length - 1];\n }\n}\nclass CanDeactivate {\n constructor(component, route) {\n this.component = component;\n this.route = route;\n }\n}\nfunction getAllRouteGuards(future, curr, parentContexts) {\n const futureRoot = future._root;\n const currRoot = curr ? curr._root : null;\n return getChildRouteGuards(futureRoot, currRoot, parentContexts, [futureRoot.value]);\n}\nfunction getCanActivateChild(p) {\n const canActivateChild = p.routeConfig ? p.routeConfig.canActivateChild : null;\n if (!canActivateChild || canActivateChild.length === 0)\n return null;\n return { node: p, guards: canActivateChild };\n}\nfunction getTokenOrFunctionIdentity(tokenOrFunction, injector) {\n const NOT_FOUND = Symbol();\n const result = injector.get(tokenOrFunction, NOT_FOUND);\n if (result === NOT_FOUND) {\n if (typeof tokenOrFunction === 'function' && !ɵisInjectable(tokenOrFunction)) {\n // We think the token is just a function so return it as-is\n return tokenOrFunction;\n }\n else {\n // This will throw the not found error\n return injector.get(tokenOrFunction);\n }\n }\n return result;\n}\nfunction getChildRouteGuards(futureNode, currNode, contexts, futurePath, checks = {\n canDeactivateChecks: [],\n canActivateChecks: []\n}) {\n const prevChildren = nodeChildrenAsMap(currNode);\n // Process the children of the future route\n futureNode.children.forEach(c => {\n getRouteGuards(c, prevChildren[c.value.outlet], contexts, futurePath.concat([c.value]), checks);\n delete prevChildren[c.value.outlet];\n });\n // Process any children left from the current route (not active for the future route)\n forEach(prevChildren, (v, k) => deactivateRouteAndItsChildren(v, contexts.getContext(k), checks));\n return checks;\n}\nfunction getRouteGuards(futureNode, currNode, parentContexts, futurePath, checks = {\n canDeactivateChecks: [],\n canActivateChecks: []\n}) {\n const future = futureNode.value;\n const curr = currNode ? currNode.value : null;\n const context = parentContexts ? parentContexts.getContext(futureNode.value.outlet) : null;\n // reusing the node\n if (curr && future.routeConfig === curr.routeConfig) {\n const shouldRun = shouldRunGuardsAndResolvers(curr, future, future.routeConfig.runGuardsAndResolvers);\n if (shouldRun) {\n checks.canActivateChecks.push(new CanActivate(futurePath));\n }\n else {\n // we need to set the data\n future.data = curr.data;\n future._resolvedData = curr._resolvedData;\n }\n // If we have a component, we need to go through an outlet.\n if (future.component) {\n getChildRouteGuards(futureNode, currNode, context ? context.children : null, futurePath, checks);\n // if we have a componentless route, we recurse but keep the same outlet map.\n }\n else {\n getChildRouteGuards(futureNode, currNode, parentContexts, futurePath, checks);\n }\n if (shouldRun && context && context.outlet && context.outlet.isActivated) {\n checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, curr));\n }\n }\n else {\n if (curr) {\n deactivateRouteAndItsChildren(currNode, context, checks);\n }\n checks.canActivateChecks.push(new CanActivate(futurePath));\n // If we have a component, we need to go through an outlet.\n if (future.component) {\n getChildRouteGuards(futureNode, null, context ? context.children : null, futurePath, checks);\n // if we have a componentless route, we recurse but keep the same outlet map.\n }\n else {\n getChildRouteGuards(futureNode, null, parentContexts, futurePath, checks);\n }\n }\n return checks;\n}\nfunction shouldRunGuardsAndResolvers(curr, future, mode) {\n if (typeof mode === 'function') {\n return mode(curr, future);\n }\n switch (mode) {\n case 'pathParamsChange':\n return !equalPath(curr.url, future.url);\n case 'pathParamsOrQueryParamsChange':\n return !equalPath(curr.url, future.url) ||\n !shallowEqual(curr.queryParams, future.queryParams);\n case 'always':\n return true;\n case 'paramsOrQueryParamsChange':\n return !equalParamsAndUrlSegments(curr, future) ||\n !shallowEqual(curr.queryParams, future.queryParams);\n case 'paramsChange':\n default:\n return !equalParamsAndUrlSegments(curr, future);\n }\n}\nfunction deactivateRouteAndItsChildren(route, context, checks) {\n const children = nodeChildrenAsMap(route);\n const r = route.value;\n forEach(children, (node, childName) => {\n if (!r.component) {\n deactivateRouteAndItsChildren(node, context, checks);\n }\n else if (context) {\n deactivateRouteAndItsChildren(node, context.children.getContext(childName), checks);\n }\n else {\n deactivateRouteAndItsChildren(node, null, checks);\n }\n });\n if (!r.component) {\n checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n }\n else if (context && context.outlet && context.outlet.isActivated) {\n checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, r));\n }\n else {\n checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Simple function check, but generic so type inference will flow. Example:\n *\n * function product(a: number, b: number) {\n * return a * b;\n * }\n *\n * if (isFunction<product>(fn)) {\n * return fn(1, 2);\n * } else {\n * throw \"Must provide the `product` function\";\n * }\n */\nfunction isFunction(v) {\n return typeof v === 'function';\n}\nfunction isBoolean(v) {\n return typeof v === 'boolean';\n}\nfunction isCanLoad(guard) {\n return guard && isFunction(guard.canLoad);\n}\nfunction isCanActivate(guard) {\n return guard && isFunction(guard.canActivate);\n}\nfunction isCanActivateChild(guard) {\n return guard && isFunction(guard.canActivateChild);\n}\nfunction isCanDeactivate(guard) {\n return guard && isFunction(guard.canDeactivate);\n}\nfunction isCanMatch(guard) {\n return guard && isFunction(guard.canMatch);\n}\nfunction isRedirectingNavigationCancelingError(error) {\n return isNavigationCancelingError(error) && isUrlTree(error.url);\n}\nfunction isNavigationCancelingError(error) {\n return error && error[NAVIGATION_CANCELING_ERROR];\n}\nfunction isEmptyError(e) {\n return e instanceof EmptyError || e?.name === 'EmptyError';\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst INITIAL_VALUE = Symbol('INITIAL_VALUE');\nfunction prioritizedGuardValue() {\n return switchMap(obs => {\n return combineLatest(obs.map(o => o.pipe(take(1), startWith(INITIAL_VALUE))))\n .pipe(map((results) => {\n for (const result of results) {\n if (result === true) {\n // If result is true, check the next one\n continue;\n }\n else if (result === INITIAL_VALUE) {\n // If guard has not finished, we need to stop processing.\n return INITIAL_VALUE;\n }\n else if (result === false || result instanceof UrlTree) {\n // Result finished and was not true. Return the result.\n // Note that we only allow false/UrlTree. Other values are considered invalid and\n // ignored.\n return result;\n }\n }\n // Everything resolved to true. Return true.\n return true;\n }), filter((item) => item !== INITIAL_VALUE), take(1));\n });\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction checkGuards(injector, forwardEvent) {\n return mergeMap(t => {\n const { targetSnapshot, currentSnapshot, guards: { canActivateChecks, canDeactivateChecks } } = t;\n if (canDeactivateChecks.length === 0 && canActivateChecks.length === 0) {\n return of({ ...t, guardsResult: true });\n }\n return runCanDeactivateChecks(canDeactivateChecks, targetSnapshot, currentSnapshot, injector)\n .pipe(mergeMap(canDeactivate => {\n return canDeactivate && isBoolean(canDeactivate) ?\n runCanActivateChecks(targetSnapshot, canActivateChecks, injector, forwardEvent) :\n of(canDeactivate);\n }), map(guardsResult => ({ ...t, guardsResult })));\n });\n}\nfunction runCanDeactivateChecks(checks, futureRSS, currRSS, injector) {\n return from(checks).pipe(mergeMap(check => runCanDeactivate(check.component, check.route, currRSS, futureRSS, injector)), first(result => {\n return result !== true;\n }, true));\n}\nfunction runCanActivateChecks(futureSnapshot, checks, injector, forwardEvent) {\n return from(checks).pipe(concatMap((check) => {\n return concat(fireChildActivationStart(check.route.parent, forwardEvent), fireActivationStart(check.route, forwardEvent), runCanActivateChild(futureSnapshot, check.path, injector), runCanActivate(futureSnapshot, check.route, injector));\n }), first(result => {\n return result !== true;\n }, true));\n}\n/**\n * This should fire off `ActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireActivationStart(snapshot, forwardEvent) {\n if (snapshot !== null && forwardEvent) {\n forwardEvent(new ActivationStart(snapshot));\n }\n return of(true);\n}\n/**\n * This should fire off `ChildActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ChildActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireChildActivationStart(snapshot, forwardEvent) {\n if (snapshot !== null && forwardEvent) {\n forwardEvent(new ChildActivationStart(snapshot));\n }\n return of(true);\n}\nfunction runCanActivate(futureRSS, futureARS, injector) {\n const canActivate = futureARS.routeConfig ? futureARS.routeConfig.canActivate : null;\n if (!canActivate || canActivate.length === 0)\n return of(true);\n const canActivateObservables = canActivate.map((canActivate) => {\n return defer(() => {\n const closestInjector = getClosestRouteInjector(futureARS) ?? injector;\n const guard = getTokenOrFunctionIdentity(canActivate, closestInjector);\n const guardVal = isCanActivate(guard) ?\n guard.canActivate(futureARS, futureRSS) :\n closestInjector.runInContext(() => guard(futureARS, futureRSS));\n return wrapIntoObservable(guardVal).pipe(first());\n });\n });\n return of(canActivateObservables).pipe(prioritizedGuardValue());\n}\nfunction runCanActivateChild(futureRSS, path, injector) {\n const futureARS = path[path.length - 1];\n const canActivateChildGuards = path.slice(0, path.length - 1)\n .reverse()\n .map(p => getCanActivateChild(p))\n .filter(_ => _ !== null);\n const canActivateChildGuardsMapped = canActivateChildGuards.map((d) => {\n return defer(() => {\n const guardsMapped = d.guards.map((canActivateChild) => {\n const closestInjector = getClosestRouteInjector(d.node) ?? injector;\n const guard = getTokenOrFunctionIdentity(canActivateChild, closestInjector);\n const guardVal = isCanActivateChild(guard) ?\n guard.canActivateChild(futureARS, futureRSS) :\n closestInjector.runInContext(() => guard(futureARS, futureRSS));\n return wrapIntoObservable(guardVal).pipe(first());\n });\n return of(guardsMapped).pipe(prioritizedGuardValue());\n });\n });\n return of(canActivateChildGuardsMapped).pipe(prioritizedGuardValue());\n}\nfunction runCanDeactivate(component, currARS, currRSS, futureRSS, injector) {\n const canDeactivate = currARS && currARS.routeConfig ? currARS.routeConfig.canDeactivate : null;\n if (!canDeactivate || canDeactivate.length === 0)\n return of(true);\n const canDeactivateObservables = canDeactivate.map((c) => {\n const closestInjector = getClosestRouteInjector(currARS) ?? injector;\n const guard = getTokenOrFunctionIdentity(c, closestInjector);\n const guardVal = isCanDeactivate(guard) ?\n guard.canDeactivate(component, currARS, currRSS, futureRSS) :\n closestInjector.runInContext(() => guard(component, currARS, currRSS, futureRSS));\n return wrapIntoObservable(guardVal).pipe(first());\n });\n return of(canDeactivateObservables).pipe(prioritizedGuardValue());\n}\nfunction runCanLoadGuards(injector, route, segments, urlSerializer) {\n const canLoad = route.canLoad;\n if (canLoad === undefined || canLoad.length === 0) {\n return of(true);\n }\n const canLoadObservables = canLoad.map((injectionToken) => {\n const guard = getTokenOrFunctionIdentity(injectionToken, injector);\n const guardVal = isCanLoad(guard) ?\n guard.canLoad(route, segments) :\n injector.runInContext(() => guard(route, segments));\n return wrapIntoObservable(guardVal);\n });\n return of(canLoadObservables)\n .pipe(prioritizedGuardValue(), redirectIfUrlTree(urlSerializer));\n}\nfunction redirectIfUrlTree(urlSerializer) {\n return pipe(tap((result) => {\n if (!isUrlTree(result))\n return;\n throw redirectingNavigationError(urlSerializer, result);\n }), map(result => result === true));\n}\nfunction runCanMatchGuards(injector, route, segments, urlSerializer) {\n const canMatch = route.canMatch;\n if (!canMatch || canMatch.length === 0)\n return of(true);\n const canMatchObservables = canMatch.map(injectionToken => {\n const guard = getTokenOrFunctionIdentity(injectionToken, injector);\n const guardVal = isCanMatch(guard) ?\n guard.canMatch(route, segments) :\n injector.runInContext(() => guard(route, segments));\n return wrapIntoObservable(guardVal);\n });\n return of(canMatchObservables)\n .pipe(prioritizedGuardValue(), redirectIfUrlTree(urlSerializer));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst noMatch$1 = {\n matched: false,\n consumedSegments: [],\n remainingSegments: [],\n parameters: {},\n positionalParamSegments: {}\n};\nfunction matchWithChecks(segmentGroup, route, segments, injector, urlSerializer) {\n const result = match(segmentGroup, route, segments);\n if (!result.matched) {\n return of(result);\n }\n // Only create the Route's `EnvironmentInjector` if it matches the attempted\n // navigation\n injector = getOrCreateRouteInjectorIfNeeded(route, injector);\n return runCanMatchGuards(injector, route, segments, urlSerializer)\n .pipe(map((v) => v === true ? result : { ...noMatch$1 }));\n}\nfunction match(segmentGroup, route, segments) {\n if (route.path === '') {\n if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) {\n return { ...noMatch$1 };\n }\n return {\n matched: true,\n consumedSegments: [],\n remainingSegments: segments,\n parameters: {},\n positionalParamSegments: {}\n };\n }\n const matcher = route.matcher || defaultUrlMatcher;\n const res = matcher(segments, segmentGroup, route);\n if (!res)\n return { ...noMatch$1 };\n const posParams = {};\n forEach(res.posParams, (v, k) => {\n posParams[k] = v.path;\n });\n const parameters = res.consumed.length > 0 ?\n { ...posParams, ...res.consumed[res.consumed.length - 1].parameters } :\n posParams;\n return {\n matched: true,\n consumedSegments: res.consumed,\n remainingSegments: segments.slice(res.consumed.length),\n // TODO(atscott): investigate combining parameters and positionalParamSegments\n parameters,\n positionalParamSegments: res.posParams ?? {}\n };\n}\nfunction split(segmentGroup, consumedSegments, slicedSegments, config) {\n if (slicedSegments.length > 0 &&\n containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n const s = new UrlSegmentGroup(consumedSegments, createChildrenForEmptyPaths(segmentGroup, consumedSegments, config, new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n return { segmentGroup: s, slicedSegments: [] };\n }\n if (slicedSegments.length === 0 &&\n containsEmptyPathMatches(segmentGroup, slicedSegments, config)) {\n const s = new UrlSegmentGroup(segmentGroup.segments, addEmptyPathsToChildrenIfNeeded(segmentGroup, consumedSegments, slicedSegments, config, segmentGroup.children));\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n return { segmentGroup: s, slicedSegments };\n }\n const s = new UrlSegmentGroup(segmentGroup.segments, segmentGroup.children);\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n return { segmentGroup: s, slicedSegments };\n}\nfunction addEmptyPathsToChildrenIfNeeded(segmentGroup, consumedSegments, slicedSegments, routes, children) {\n const res = {};\n for (const r of routes) {\n if (emptyPathMatch(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {\n const s = new UrlSegmentGroup([], {});\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n res[getOutlet(r)] = s;\n }\n }\n return { ...children, ...res };\n}\nfunction createChildrenForEmptyPaths(segmentGroup, consumedSegments, routes, primarySegment) {\n const res = {};\n res[PRIMARY_OUTLET] = primarySegment;\n primarySegment._sourceSegment = segmentGroup;\n primarySegment._segmentIndexShift = consumedSegments.length;\n for (const r of routes) {\n if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {\n const s = new UrlSegmentGroup([], {});\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n res[getOutlet(r)] = s;\n }\n }\n return res;\n}\nfunction containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, routes) {\n return routes.some(r => emptyPathMatch(segmentGroup, slicedSegments, r) && getOutlet(r) !== PRIMARY_OUTLET);\n}\nfunction containsEmptyPathMatches(segmentGroup, slicedSegments, routes) {\n return routes.some(r => emptyPathMatch(segmentGroup, slicedSegments, r));\n}\nfunction emptyPathMatch(segmentGroup, slicedSegments, r) {\n if ((segmentGroup.hasChildren() || slicedSegments.length > 0) && r.pathMatch === 'full') {\n return false;\n }\n return r.path === '';\n}\n/**\n * Determines if `route` is a path match for the `rawSegment`, `segments`, and `outlet` without\n * verifying that its children are a full match for the remainder of the `rawSegment` children as\n * well.\n */\nfunction isImmediateMatch(route, rawSegment, segments, outlet) {\n // We allow matches to empty paths when the outlets differ so we can match a url like `/(b:b)` to\n // a config like\n // * `{path: '', children: [{path: 'b', outlet: 'b'}]}`\n // or even\n // * `{path: '', outlet: 'a', children: [{path: 'b', outlet: 'b'}]`\n //\n // The exception here is when the segment outlet is for the primary outlet. This would\n // result in a match inside the named outlet because all children there are written as primary\n // outlets. So we need to prevent child named outlet matches in a url like `/b` in a config like\n // * `{path: '', outlet: 'x' children: [{path: 'b'}]}`\n // This should only match if the url is `/(x:b)`.\n if (getOutlet(route) !== outlet &&\n (outlet === PRIMARY_OUTLET || !emptyPathMatch(rawSegment, segments, route))) {\n return false;\n }\n if (route.path === '**') {\n return true;\n }\n return match(rawSegment, route, segments).matched;\n}\nfunction noLeftoversInUrl(segmentGroup, segments, outlet) {\n return segments.length === 0 && !segmentGroup.children[outlet];\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst NG_DEV_MODE$7 = typeof ngDevMode === 'undefined' || ngDevMode;\nclass NoMatch$1 {\n constructor(segmentGroup) {\n this.segmentGroup = segmentGroup || null;\n }\n}\nclass AbsoluteRedirect {\n constructor(urlTree) {\n this.urlTree = urlTree;\n }\n}\nfunction noMatch(segmentGroup) {\n return throwError(new NoMatch$1(segmentGroup));\n}\nfunction absoluteRedirect(newTree) {\n return throwError(new AbsoluteRedirect(newTree));\n}\nfunction namedOutletsRedirect(redirectTo) {\n return throwError(new ɵRuntimeError(4000 /* RuntimeErrorCode.NAMED_OUTLET_REDIRECT */, NG_DEV_MODE$7 &&\n `Only absolute redirects can have named outlets. redirectTo: '${redirectTo}'`));\n}\nfunction canLoadFails(route) {\n return throwError(navigationCancelingError(NG_DEV_MODE$7 &&\n `Cannot load children because the guard of the route \"path: '${route.path}'\" returned false`, 3 /* NavigationCancellationCode.GuardRejected */));\n}\n/**\n * Returns the `UrlTree` with the redirection applied.\n *\n * Lazy modules are loaded along the way.\n */\nfunction applyRedirects$1(injector, configLoader, urlSerializer, urlTree, config) {\n return new ApplyRedirects(injector, configLoader, urlSerializer, urlTree, config).apply();\n}\nclass ApplyRedirects {\n constructor(injector, configLoader, urlSerializer, urlTree, config) {\n this.injector = injector;\n this.configLoader = configLoader;\n this.urlSerializer = urlSerializer;\n this.urlTree = urlTree;\n this.config = config;\n this.allowRedirects = true;\n }\n apply() {\n const splitGroup = split(this.urlTree.root, [], [], this.config).segmentGroup;\n // TODO(atscott): creating a new segment removes the _sourceSegment _segmentIndexShift, which is\n // only necessary to prevent failures in tests which assert exact object matches. The `split` is\n // now shared between `applyRedirects` and `recognize` but only the `recognize` step needs these\n // properties. Before the implementations were merged, the `applyRedirects` would not assign\n // them. We should be able to remove this logic as a \"breaking change\" but should do some more\n // investigation into the failures first.\n const rootSegmentGroup = new UrlSegmentGroup(splitGroup.segments, splitGroup.children);\n const expanded$ = this.expandSegmentGroup(this.injector, this.config, rootSegmentGroup, PRIMARY_OUTLET);\n const urlTrees$ = expanded$.pipe(map((rootSegmentGroup) => {\n return this.createUrlTree(squashSegmentGroup(rootSegmentGroup), this.urlTree.queryParams, this.urlTree.fragment);\n }));\n return urlTrees$.pipe(catchError((e) => {\n if (e instanceof AbsoluteRedirect) {\n // After an absolute redirect we do not apply any more redirects!\n // If this implementation changes, update the documentation note in `redirectTo`.\n this.allowRedirects = false;\n // we need to run matching, so we can fetch all lazy-loaded modules\n return this.match(e.urlTree);\n }\n if (e instanceof NoMatch$1) {\n throw this.noMatchError(e);\n }\n throw e;\n }));\n }\n match(tree) {\n const expanded$ = this.expandSegmentGroup(this.injector, this.config, tree.root, PRIMARY_OUTLET);\n const mapped$ = expanded$.pipe(map((rootSegmentGroup) => {\n return this.createUrlTree(squashSegmentGroup(rootSegmentGroup), tree.queryParams, tree.fragment);\n }));\n return mapped$.pipe(catchError((e) => {\n if (e instanceof NoMatch$1) {\n throw this.noMatchError(e);\n }\n throw e;\n }));\n }\n noMatchError(e) {\n return new ɵRuntimeError(4002 /* RuntimeErrorCode.NO_MATCH */, NG_DEV_MODE$7 && `Cannot match any routes. URL Segment: '${e.segmentGroup}'`);\n }\n createUrlTree(rootCandidate, queryParams, fragment) {\n const root = createRoot(rootCandidate);\n return new UrlTree(root, queryParams, fragment);\n }\n expandSegmentGroup(injector, routes, segmentGroup, outlet) {\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return this.expandChildren(injector, routes, segmentGroup)\n .pipe(map((children) => new UrlSegmentGroup([], children)));\n }\n return this.expandSegment(injector, segmentGroup, routes, segmentGroup.segments, outlet, true);\n }\n // Recursively expand segment groups for all the child outlets\n expandChildren(injector, routes, segmentGroup) {\n // Expand outlets one at a time, starting with the primary outlet. We need to do it this way\n // because an absolute redirect from the primary outlet takes precedence.\n const childOutlets = [];\n for (const child of Object.keys(segmentGroup.children)) {\n if (child === 'primary') {\n childOutlets.unshift(child);\n }\n else {\n childOutlets.push(child);\n }\n }\n return from(childOutlets)\n .pipe(concatMap(childOutlet => {\n const child = segmentGroup.children[childOutlet];\n // Sort the routes so routes with outlets that match the segment appear\n // first, followed by routes for other outlets, which might match if they have an\n // empty path.\n const sortedRoutes = sortByMatchingOutlets(routes, childOutlet);\n return this.expandSegmentGroup(injector, sortedRoutes, child, childOutlet)\n .pipe(map(s => ({ segment: s, outlet: childOutlet })));\n }), scan((children, expandedChild) => {\n children[expandedChild.outlet] = expandedChild.segment;\n return children;\n }, {}), last$1());\n }\n expandSegment(injector, segmentGroup, routes, segments, outlet, allowRedirects) {\n return from(routes).pipe(concatMap(r => {\n const expanded$ = this.expandSegmentAgainstRoute(injector, segmentGroup, routes, r, segments, outlet, allowRedirects);\n return expanded$.pipe(catchError((e) => {\n if (e instanceof NoMatch$1) {\n return of(null);\n }\n throw e;\n }));\n }), first((s) => !!s), catchError((e, _) => {\n if (isEmptyError(e)) {\n if (noLeftoversInUrl(segmentGroup, segments, outlet)) {\n return of(new UrlSegmentGroup([], {}));\n }\n return noMatch(segmentGroup);\n }\n throw e;\n }));\n }\n expandSegmentAgainstRoute(injector, segmentGroup, routes, route, paths, outlet, allowRedirects) {\n if (!isImmediateMatch(route, segmentGroup, paths, outlet)) {\n return noMatch(segmentGroup);\n }\n if (route.redirectTo === undefined) {\n return this.matchSegmentAgainstRoute(injector, segmentGroup, route, paths, outlet);\n }\n if (allowRedirects && this.allowRedirects) {\n return this.expandSegmentAgainstRouteUsingRedirect(injector, segmentGroup, routes, route, paths, outlet);\n }\n return noMatch(segmentGroup);\n }\n expandSegmentAgainstRouteUsingRedirect(injector, segmentGroup, routes, route, segments, outlet) {\n if (route.path === '**') {\n return this.expandWildCardWithParamsAgainstRouteUsingRedirect(injector, routes, route, outlet);\n }\n return this.expandRegularSegmentAgainstRouteUsingRedirect(injector, segmentGroup, routes, route, segments, outlet);\n }\n expandWildCardWithParamsAgainstRouteUsingRedirect(injector, routes, route, outlet) {\n const newTree = this.applyRedirectCommands([], route.redirectTo, {});\n if (route.redirectTo.startsWith('/')) {\n return absoluteRedirect(newTree);\n }\n return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments) => {\n const group = new UrlSegmentGroup(newSegments, {});\n return this.expandSegment(injector, group, routes, newSegments, outlet, false);\n }));\n }\n expandRegularSegmentAgainstRouteUsingRedirect(injector, segmentGroup, routes, route, segments, outlet) {\n const { matched, consumedSegments, remainingSegments, positionalParamSegments } = match(segmentGroup, route, segments);\n if (!matched)\n return noMatch(segmentGroup);\n const newTree = this.applyRedirectCommands(consumedSegments, route.redirectTo, positionalParamSegments);\n if (route.redirectTo.startsWith('/')) {\n return absoluteRedirect(newTree);\n }\n return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments) => {\n return this.expandSegment(injector, segmentGroup, routes, newSegments.concat(remainingSegments), outlet, false);\n }));\n }\n matchSegmentAgainstRoute(injector, rawSegmentGroup, route, segments, outlet) {\n if (route.path === '**') {\n // Only create the Route's `EnvironmentInjector` if it matches the attempted navigation\n injector = getOrCreateRouteInjectorIfNeeded(route, injector);\n if (route.loadChildren) {\n const loaded$ = route._loadedRoutes ?\n of({ routes: route._loadedRoutes, injector: route._loadedInjector }) :\n this.configLoader.loadChildren(injector, route);\n return loaded$.pipe(map((cfg) => {\n route._loadedRoutes = cfg.routes;\n route._loadedInjector = cfg.injector;\n return new UrlSegmentGroup(segments, {});\n }));\n }\n return of(new UrlSegmentGroup(segments, {}));\n }\n return matchWithChecks(rawSegmentGroup, route, segments, injector, this.urlSerializer)\n .pipe(switchMap(({ matched, consumedSegments, remainingSegments }) => {\n if (!matched)\n return noMatch(rawSegmentGroup);\n // If the route has an injector created from providers, we should start using that.\n injector = route._injector ?? injector;\n const childConfig$ = this.getChildConfig(injector, route, segments);\n return childConfig$.pipe(mergeMap((routerConfig) => {\n const childInjector = routerConfig.injector ?? injector;\n const childConfig = routerConfig.routes;\n const { segmentGroup: splitSegmentGroup, slicedSegments } = split(rawSegmentGroup, consumedSegments, remainingSegments, childConfig);\n // See comment on the other call to `split` about why this is necessary.\n const segmentGroup = new UrlSegmentGroup(splitSegmentGroup.segments, splitSegmentGroup.children);\n if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n const expanded$ = this.expandChildren(childInjector, childConfig, segmentGroup);\n return expanded$.pipe(map((children) => new UrlSegmentGroup(consumedSegments, children)));\n }\n if (childConfig.length === 0 && slicedSegments.length === 0) {\n return of(new UrlSegmentGroup(consumedSegments, {}));\n }\n const matchedOnOutlet = getOutlet(route) === outlet;\n const expanded$ = this.expandSegment(childInjector, segmentGroup, childConfig, slicedSegments, matchedOnOutlet ? PRIMARY_OUTLET : outlet, true);\n return expanded$.pipe(map((cs) => new UrlSegmentGroup(consumedSegments.concat(cs.segments), cs.children)));\n }));\n }));\n }\n getChildConfig(injector, route, segments) {\n if (route.children) {\n // The children belong to the same module\n return of({ routes: route.children, injector });\n }\n if (route.loadChildren) {\n // lazy children belong to the loaded module\n if (route._loadedRoutes !== undefined) {\n return of({ routes: route._loadedRoutes, injector: route._loadedInjector });\n }\n return runCanLoadGuards(injector, route, segments, this.urlSerializer)\n .pipe(mergeMap((shouldLoadResult) => {\n if (shouldLoadResult) {\n return this.configLoader.loadChildren(injector, route)\n .pipe(tap((cfg) => {\n route._loadedRoutes = cfg.routes;\n route._loadedInjector = cfg.injector;\n }));\n }\n return canLoadFails(route);\n }));\n }\n return of({ routes: [], injector });\n }\n lineralizeSegments(route, urlTree) {\n let res = [];\n let c = urlTree.root;\n while (true) {\n res = res.concat(c.segments);\n if (c.numberOfChildren === 0) {\n return of(res);\n }\n if (c.numberOfChildren > 1 || !c.children[PRIMARY_OUTLET]) {\n return namedOutletsRedirect(route.redirectTo);\n }\n c = c.children[PRIMARY_OUTLET];\n }\n }\n applyRedirectCommands(segments, redirectTo, posParams) {\n return this.applyRedirectCreateUrlTree(redirectTo, this.urlSerializer.parse(redirectTo), segments, posParams);\n }\n applyRedirectCreateUrlTree(redirectTo, urlTree, segments, posParams) {\n const newRoot = this.createSegmentGroup(redirectTo, urlTree.root, segments, posParams);\n return new UrlTree(newRoot, this.createQueryParams(urlTree.queryParams, this.urlTree.queryParams), urlTree.fragment);\n }\n createQueryParams(redirectToParams, actualParams) {\n const res = {};\n forEach(redirectToParams, (v, k) => {\n const copySourceValue = typeof v === 'string' && v.startsWith(':');\n if (copySourceValue) {\n const sourceName = v.substring(1);\n res[k] = actualParams[sourceName];\n }\n else {\n res[k] = v;\n }\n });\n return res;\n }\n createSegmentGroup(redirectTo, group, segments, posParams) {\n const updatedSegments = this.createSegments(redirectTo, group.segments, segments, posParams);\n let children = {};\n forEach(group.children, (child, name) => {\n children[name] = this.createSegmentGroup(redirectTo, child, segments, posParams);\n });\n return new UrlSegmentGroup(updatedSegments, children);\n }\n createSegments(redirectTo, redirectToSegments, actualSegments, posParams) {\n return redirectToSegments.map(s => s.path.startsWith(':') ? this.findPosParam(redirectTo, s, posParams) :\n this.findOrReturn(s, actualSegments));\n }\n findPosParam(redirectTo, redirectToUrlSegment, posParams) {\n const pos = posParams[redirectToUrlSegment.path.substring(1)];\n if (!pos)\n throw new ɵRuntimeError(4001 /* RuntimeErrorCode.MISSING_REDIRECT */, NG_DEV_MODE$7 &&\n `Cannot redirect to '${redirectTo}'. Cannot find '${redirectToUrlSegment.path}'.`);\n return pos;\n }\n findOrReturn(redirectToUrlSegment, actualSegments) {\n let idx = 0;\n for (const s of actualSegments) {\n if (s.path === redirectToUrlSegment.path) {\n actualSegments.splice(idx);\n return s;\n }\n idx++;\n }\n return redirectToUrlSegment;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction applyRedirects(environmentInjector, configLoader, urlSerializer, config) {\n return switchMap(t => applyRedirects$1(environmentInjector, configLoader, urlSerializer, t.extractedUrl, config)\n .pipe(map(urlAfterRedirects => ({ ...t, urlAfterRedirects }))));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst NG_DEV_MODE$6 = typeof ngDevMode === 'undefined' || !!ngDevMode;\nclass NoMatch {\n}\nfunction newObservableError(e) {\n // TODO(atscott): This pattern is used throughout the router code and can be `throwError` instead.\n return new Observable((obs) => obs.error(e));\n}\nfunction recognize$1(injector, rootComponentType, config, urlTree, url, urlSerializer, paramsInheritanceStrategy = 'emptyOnly') {\n return new Recognizer(injector, rootComponentType, config, urlTree, url, paramsInheritanceStrategy, urlSerializer)\n .recognize()\n .pipe(switchMap(result => {\n if (result === null) {\n return newObservableError(new NoMatch());\n }\n else {\n return of(result);\n }\n }));\n}\nclass Recognizer {\n constructor(injector, rootComponentType, config, urlTree, url, paramsInheritanceStrategy, urlSerializer) {\n this.injector = injector;\n this.rootComponentType = rootComponentType;\n this.config = config;\n this.urlTree = urlTree;\n this.url = url;\n this.paramsInheritanceStrategy = paramsInheritanceStrategy;\n this.urlSerializer = urlSerializer;\n }\n recognize() {\n const rootSegmentGroup = split(this.urlTree.root, [], [], this.config.filter(c => c.redirectTo === undefined))\n .segmentGroup;\n return this.processSegmentGroup(this.injector, this.config, rootSegmentGroup, PRIMARY_OUTLET)\n .pipe(map(children => {\n if (children === null) {\n return null;\n }\n // Use Object.freeze to prevent readers of the Router state from modifying it outside of a\n // navigation, resulting in the router being out of sync with the browser.\n const root = new ActivatedRouteSnapshot([], Object.freeze({}), Object.freeze({ ...this.urlTree.queryParams }), this.urlTree.fragment, {}, PRIMARY_OUTLET, this.rootComponentType, null, this.urlTree.root, -1, {});\n const rootNode = new TreeNode(root, children);\n const routeState = new RouterStateSnapshot(this.url, rootNode);\n this.inheritParamsAndData(routeState._root);\n return routeState;\n }));\n }\n inheritParamsAndData(routeNode) {\n const route = routeNode.value;\n const i = inheritedParamsDataResolve(route, this.paramsInheritanceStrategy);\n route.params = Object.freeze(i.params);\n route.data = Object.freeze(i.data);\n routeNode.children.forEach(n => this.inheritParamsAndData(n));\n }\n processSegmentGroup(injector, config, segmentGroup, outlet) {\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return this.processChildren(injector, config, segmentGroup);\n }\n return this.processSegment(injector, config, segmentGroup, segmentGroup.segments, outlet);\n }\n /**\n * Matches every child outlet in the `segmentGroup` to a `Route` in the config. Returns `null` if\n * we cannot find a match for _any_ of the children.\n *\n * @param config - The `Routes` to match against\n * @param segmentGroup - The `UrlSegmentGroup` whose children need to be matched against the\n * config.\n */\n processChildren(injector, config, segmentGroup) {\n return from(Object.keys(segmentGroup.children))\n .pipe(concatMap(childOutlet => {\n const child = segmentGroup.children[childOutlet];\n // Sort the config so that routes with outlets that match the one being activated\n // appear first, followed by routes for other outlets, which might match if they have\n // an empty path.\n const sortedConfig = sortByMatchingOutlets(config, childOutlet);\n return this.processSegmentGroup(injector, sortedConfig, child, childOutlet);\n }), scan((children, outletChildren) => {\n if (!children || !outletChildren)\n return null;\n children.push(...outletChildren);\n return children;\n }), takeWhile(children => children !== null), defaultIfEmpty(null), last$1(), map(children => {\n if (children === null)\n return null;\n // Because we may have matched two outlets to the same empty path segment, we can have\n // multiple activated results for the same outlet. We should merge the children of\n // these results so the final return value is only one `TreeNode` per outlet.\n const mergedChildren = mergeEmptyPathMatches(children);\n if (NG_DEV_MODE$6) {\n // This should really never happen - we are only taking the first match for each\n // outlet and merge the empty path matches.\n checkOutletNameUniqueness(mergedChildren);\n }\n sortActivatedRouteSnapshots(mergedChildren);\n return mergedChildren;\n }));\n }\n processSegment(injector, routes, segmentGroup, segments, outlet) {\n return from(routes).pipe(concatMap(r => {\n return this.processSegmentAgainstRoute(r._injector ?? injector, r, segmentGroup, segments, outlet);\n }), first((x) => !!x), catchError(e => {\n if (isEmptyError(e)) {\n if (noLeftoversInUrl(segmentGroup, segments, outlet)) {\n return of([]);\n }\n return of(null);\n }\n throw e;\n }));\n }\n processSegmentAgainstRoute(injector, route, rawSegment, segments, outlet) {\n if (route.redirectTo || !isImmediateMatch(route, rawSegment, segments, outlet))\n return of(null);\n let matchResult;\n if (route.path === '**') {\n const params = segments.length > 0 ? last(segments).parameters : {};\n const pathIndexShift = getPathIndexShift(rawSegment) + segments.length;\n const snapshot = new ActivatedRouteSnapshot(segments, params, Object.freeze({ ...this.urlTree.queryParams }), this.urlTree.fragment, getData(route), getOutlet(route), route.component ?? route._loadedComponent ?? null, route, getSourceSegmentGroup(rawSegment), pathIndexShift, getResolve(route));\n matchResult = of({\n snapshot,\n consumedSegments: [],\n remainingSegments: [],\n });\n }\n else {\n matchResult =\n matchWithChecks(rawSegment, route, segments, injector, this.urlSerializer)\n .pipe(map(({ matched, consumedSegments, remainingSegments, parameters }) => {\n if (!matched) {\n return null;\n }\n const pathIndexShift = getPathIndexShift(rawSegment) + consumedSegments.length;\n const snapshot = new ActivatedRouteSnapshot(consumedSegments, parameters, Object.freeze({ ...this.urlTree.queryParams }), this.urlTree.fragment, getData(route), getOutlet(route), route.component ?? route._loadedComponent ?? null, route, getSourceSegmentGroup(rawSegment), pathIndexShift, getResolve(route));\n return { snapshot, consumedSegments, remainingSegments };\n }));\n }\n return matchResult.pipe(switchMap((result) => {\n if (result === null) {\n return of(null);\n }\n const { snapshot, consumedSegments, remainingSegments } = result;\n // If the route has an injector created from providers, we should start using that.\n injector = route._injector ?? injector;\n const childInjector = route._loadedInjector ?? injector;\n const childConfig = getChildConfig(route);\n const { segmentGroup, slicedSegments } = split(rawSegment, consumedSegments, remainingSegments, \n // Filter out routes with redirectTo because we are trying to create activated route\n // snapshots and don't handle redirects here. That should have been done in\n // `applyRedirects`.\n childConfig.filter(c => c.redirectTo === undefined));\n if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n return this.processChildren(childInjector, childConfig, segmentGroup).pipe(map(children => {\n if (children === null) {\n return null;\n }\n return [new TreeNode(snapshot, children)];\n }));\n }\n if (childConfig.length === 0 && slicedSegments.length === 0) {\n return of([new TreeNode(snapshot, [])]);\n }\n const matchedOnOutlet = getOutlet(route) === outlet;\n // If we matched a config due to empty path match on a different outlet, we need to\n // continue passing the current outlet for the segment rather than switch to PRIMARY.\n // Note that we switch to primary when we have a match because outlet configs look like\n // this: {path: 'a', outlet: 'a', children: [\n // {path: 'b', component: B},\n // {path: 'c', component: C},\n // ]}\n // Notice that the children of the named outlet are configured with the primary outlet\n return this\n .processSegment(childInjector, childConfig, segmentGroup, slicedSegments, matchedOnOutlet ? PRIMARY_OUTLET : outlet)\n .pipe(map(children => {\n if (children === null) {\n return null;\n }\n return [new TreeNode(snapshot, children)];\n }));\n }));\n }\n}\nfunction sortActivatedRouteSnapshots(nodes) {\n nodes.sort((a, b) => {\n if (a.value.outlet === PRIMARY_OUTLET)\n return -1;\n if (b.value.outlet === PRIMARY_OUTLET)\n return 1;\n return a.value.outlet.localeCompare(b.value.outlet);\n });\n}\nfunction getChildConfig(route) {\n if (route.children) {\n return route.children;\n }\n if (route.loadChildren) {\n return route._loadedRoutes;\n }\n return [];\n}\nfunction hasEmptyPathConfig(node) {\n const config = node.value.routeConfig;\n return config && config.path === '' && config.redirectTo === undefined;\n}\n/**\n * Finds `TreeNode`s with matching empty path route configs and merges them into `TreeNode` with\n * the children from each duplicate. This is necessary because different outlets can match a\n * single empty path route config and the results need to then be merged.\n */\nfunction mergeEmptyPathMatches(nodes) {\n const result = [];\n // The set of nodes which contain children that were merged from two duplicate empty path nodes.\n const mergedNodes = new Set();\n for (const node of nodes) {\n if (!hasEmptyPathConfig(node)) {\n result.push(node);\n continue;\n }\n const duplicateEmptyPathNode = result.find(resultNode => node.value.routeConfig === resultNode.value.routeConfig);\n if (duplicateEmptyPathNode !== undefined) {\n duplicateEmptyPathNode.children.push(...node.children);\n mergedNodes.add(duplicateEmptyPathNode);\n }\n else {\n result.push(node);\n }\n }\n // For each node which has children from multiple sources, we need to recompute a new `TreeNode`\n // by also merging those children. This is necessary when there are multiple empty path configs\n // in a row. Put another way: whenever we combine children of two nodes, we need to also check\n // if any of those children can be combined into a single node as well.\n for (const mergedNode of mergedNodes) {\n const mergedChildren = mergeEmptyPathMatches(mergedNode.children);\n result.push(new TreeNode(mergedNode.value, mergedChildren));\n }\n return result.filter(n => !mergedNodes.has(n));\n}\nfunction checkOutletNameUniqueness(nodes) {\n const names = {};\n nodes.forEach(n => {\n const routeWithSameOutletName = names[n.value.outlet];\n if (routeWithSameOutletName) {\n const p = routeWithSameOutletName.url.map(s => s.toString()).join('/');\n const c = n.value.url.map(s => s.toString()).join('/');\n throw new ɵRuntimeError(4006 /* RuntimeErrorCode.TWO_SEGMENTS_WITH_SAME_OUTLET */, NG_DEV_MODE$6 && `Two segments cannot have the same outlet name: '${p}' and '${c}'.`);\n }\n names[n.value.outlet] = n.value;\n });\n}\nfunction getSourceSegmentGroup(segmentGroup) {\n let s = segmentGroup;\n while (s._sourceSegment) {\n s = s._sourceSegment;\n }\n return s;\n}\nfunction getPathIndexShift(segmentGroup) {\n let s = segmentGroup;\n let res = s._segmentIndexShift ?? 0;\n while (s._sourceSegment) {\n s = s._sourceSegment;\n res += s._segmentIndexShift ?? 0;\n }\n return res - 1;\n}\nfunction getCorrectedPathIndexShift(segmentGroup) {\n let s = segmentGroup;\n let res = s._segmentIndexShiftCorrected ?? s._segmentIndexShift ?? 0;\n while (s._sourceSegment) {\n s = s._sourceSegment;\n res += s._segmentIndexShiftCorrected ?? s._segmentIndexShift ?? 0;\n }\n return res - 1;\n}\nfunction getData(route) {\n return route.data || {};\n}\nfunction getResolve(route) {\n return route.resolve || {};\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction recognize(injector, rootComponentType, config, serializer, paramsInheritanceStrategy) {\n return mergeMap(t => recognize$1(injector, rootComponentType, config, t.urlAfterRedirects, serializer.serialize(t.urlAfterRedirects), serializer, paramsInheritanceStrategy)\n .pipe(map(targetSnapshot => ({ ...t, targetSnapshot }))));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction resolveData(paramsInheritanceStrategy, injector) {\n return mergeMap(t => {\n const { targetSnapshot, guards: { canActivateChecks } } = t;\n if (!canActivateChecks.length) {\n return of(t);\n }\n let canActivateChecksResolved = 0;\n return from(canActivateChecks)\n .pipe(concatMap(check => runResolve(check.route, targetSnapshot, paramsInheritanceStrategy, injector)), tap(() => canActivateChecksResolved++), takeLast(1), mergeMap(_ => canActivateChecksResolved === canActivateChecks.length ? of(t) : EMPTY));\n });\n}\nfunction runResolve(futureARS, futureRSS, paramsInheritanceStrategy, injector) {\n const config = futureARS.routeConfig;\n const resolve = futureARS._resolve;\n if (config?.title !== undefined && !hasStaticTitle(config)) {\n resolve[RouteTitleKey] = config.title;\n }\n return resolveNode(resolve, futureARS, futureRSS, injector).pipe(map((resolvedData) => {\n futureARS._resolvedData = resolvedData;\n futureARS.data = inheritedParamsDataResolve(futureARS, paramsInheritanceStrategy).resolve;\n if (config && hasStaticTitle(config)) {\n futureARS.data[RouteTitleKey] = config.title;\n }\n return null;\n }));\n}\nfunction resolveNode(resolve, futureARS, futureRSS, injector) {\n const keys = getDataKeys(resolve);\n if (keys.length === 0) {\n return of({});\n }\n const data = {};\n return from(keys).pipe(mergeMap(key => getResolver(resolve[key], futureARS, futureRSS, injector)\n .pipe(first(), tap((value) => {\n data[key] = value;\n }))), takeLast(1), mapTo(data), catchError((e) => isEmptyError(e) ? EMPTY : throwError(e)));\n}\nfunction getDataKeys(obj) {\n return [...Object.keys(obj), ...Object.getOwnPropertySymbols(obj)];\n}\nfunction getResolver(injectionToken, futureARS, futureRSS, injector) {\n const closestInjector = getClosestRouteInjector(futureARS) ?? injector;\n const resolver = getTokenOrFunctionIdentity(injectionToken, closestInjector);\n const resolverValue = resolver.resolve ?\n resolver.resolve(futureARS, futureRSS) :\n closestInjector.runInContext(() => resolver(futureARS, futureRSS));\n return wrapIntoObservable(resolverValue);\n}\nfunction hasStaticTitle(config) {\n return typeof config.title === 'string' || config.title === null;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Perform a side effect through a switchMap for every emission on the source Observable,\n * but return an Observable that is identical to the source. It's essentially the same as\n * the `tap` operator, but if the side effectful `next` function returns an ObservableInput,\n * it will wait before continuing with the original value.\n */\nfunction switchTap(next) {\n return switchMap(v => {\n const nextResult = next(v);\n if (nextResult) {\n return from(nextResult).pipe(map(() => v));\n }\n return of(v);\n });\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// This file exists to support the legacy `loadChildren: string` behavior being patched back into\n// Angular.\nfunction deprecatedLoadChildrenString(injector, loadChildren) {\n return null;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst NG_DEV_MODE$5 = typeof ngDevMode === 'undefined' || !!ngDevMode;\n/**\n * The [DI token](guide/glossary/#di-token) for a router configuration.\n *\n * `ROUTES` is a low level API for router configuration via dependency injection.\n *\n * We recommend that in almost all cases to use higher level APIs such as `RouterModule.forRoot()`,\n * `provideRouter`, or `Router.resetConfig()`.\n *\n * @publicApi\n */\nconst ROUTES = new InjectionToken('ROUTES');\nclass RouterConfigLoader {\n constructor(injector, compiler) {\n this.injector = injector;\n this.compiler = compiler;\n this.componentLoaders = new WeakMap();\n this.childrenLoaders = new WeakMap();\n }\n loadComponent(route) {\n if (this.componentLoaders.get(route)) {\n return this.componentLoaders.get(route);\n }\n else if (route._loadedComponent) {\n return of(route._loadedComponent);\n }\n if (this.onLoadStartListener) {\n this.onLoadStartListener(route);\n }\n const loadRunner = wrapIntoObservable(route.loadComponent())\n .pipe(map(maybeUnwrapDefaultExport), tap(component => {\n if (this.onLoadEndListener) {\n this.onLoadEndListener(route);\n }\n NG_DEV_MODE$5 && assertStandalone(route.path ?? '', component);\n route._loadedComponent = component;\n }), finalize(() => {\n this.componentLoaders.delete(route);\n }));\n // Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much\n const loader = new ConnectableObservable(loadRunner, () => new Subject()).pipe(refCount());\n this.componentLoaders.set(route, loader);\n return loader;\n }\n loadChildren(parentInjector, route) {\n if (this.childrenLoaders.get(route)) {\n return this.childrenLoaders.get(route);\n }\n else if (route._loadedRoutes) {\n return of({ routes: route._loadedRoutes, injector: route._loadedInjector });\n }\n if (this.onLoadStartListener) {\n this.onLoadStartListener(route);\n }\n const moduleFactoryOrRoutes$ = this.loadModuleFactoryOrRoutes(route.loadChildren);\n const loadRunner = moduleFactoryOrRoutes$.pipe(map((factoryOrRoutes) => {\n if (this.onLoadEndListener) {\n this.onLoadEndListener(route);\n }\n // This injector comes from the `NgModuleRef` when lazy loading an `NgModule`. There is no\n // injector associated with lazy loading a `Route` array.\n let injector;\n let rawRoutes;\n let requireStandaloneComponents = false;\n if (Array.isArray(factoryOrRoutes)) {\n rawRoutes = factoryOrRoutes;\n requireStandaloneComponents = true;\n }\n else {\n injector = factoryOrRoutes.create(parentInjector).injector;\n // When loading a module that doesn't provide `RouterModule.forChild()` preloader\n // will get stuck in an infinite loop. The child module's Injector will look to\n // its parent `Injector` when it doesn't find any ROUTES so it will return routes\n // for it's parent module instead.\n rawRoutes = flatten(injector.get(ROUTES, [], InjectFlags.Self | InjectFlags.Optional));\n }\n const routes = rawRoutes.map(standardizeConfig);\n NG_DEV_MODE$5 && validateConfig(routes, route.path, requireStandaloneComponents);\n return { routes, injector };\n }), finalize(() => {\n this.childrenLoaders.delete(route);\n }));\n // Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much\n const loader = new ConnectableObservable(loadRunner, () => new Subject())\n .pipe(refCount());\n this.childrenLoaders.set(route, loader);\n return loader;\n }\n loadModuleFactoryOrRoutes(loadChildren) {\n const deprecatedResult = deprecatedLoadChildrenString(this.injector, loadChildren);\n if (deprecatedResult) {\n return deprecatedResult;\n }\n return wrapIntoObservable(loadChildren())\n .pipe(map(maybeUnwrapDefaultExport), mergeMap((t) => {\n if (t instanceof NgModuleFactory || Array.isArray(t)) {\n return of(t);\n }\n else {\n return from(this.compiler.compileModuleAsync(t));\n }\n }));\n }\n}\nRouterConfigLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: RouterConfigLoader, deps: [{ token: i0.Injector }, { token: i0.Compiler }], target: i0.ɵɵFactoryTarget.Injectable });\nRouterConfigLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: RouterConfigLoader, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: RouterConfigLoader, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.Compiler }]; } });\nfunction isWrappedDefaultExport(value) {\n // We use `in` here with a string key `'default'`, because we expect `DefaultExport` objects to be\n // dynamically imported ES modules with a spec-mandated `default` key. Thus we don't expect that\n // `default` will be a renamed property.\n return value && typeof value === 'object' && 'default' in value;\n}\nfunction maybeUnwrapDefaultExport(input) {\n // As per `isWrappedDefaultExport`, the `default` key here is generated by the browser and not\n // subject to property renaming, so we reference it with bracket access.\n return isWrappedDefaultExport(input) ? input['default'] : input;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst NG_DEV_MODE$4 = typeof ngDevMode === 'undefined' || !!ngDevMode;\nclass NavigationTransitions {\n constructor() {\n this.currentNavigation = null;\n this.lastSuccessfulNavigation = null;\n this.events = new Subject();\n this.configLoader = inject(RouterConfigLoader);\n this.environmentInjector = inject(EnvironmentInjector);\n this.urlSerializer = inject(UrlSerializer);\n this.rootContexts = inject(ChildrenOutletContexts);\n this.navigationId = 0;\n const onLoadStart = (r) => this.events.next(new RouteConfigLoadStart(r));\n const onLoadEnd = (r) => this.events.next(new RouteConfigLoadEnd(r));\n this.configLoader.onLoadEndListener = onLoadEnd;\n this.configLoader.onLoadStartListener = onLoadStart;\n }\n get hasRequestedNavigation() {\n return this.navigationId !== 0;\n }\n complete() {\n this.transitions?.complete();\n }\n handleNavigationRequest(request) {\n const id = ++this.navigationId;\n this.transitions?.next({ ...this.transitions.value, ...request, id });\n }\n setupNavigations(router) {\n this.transitions = new BehaviorSubject({\n id: 0,\n targetPageId: 0,\n currentUrlTree: router.currentUrlTree,\n currentRawUrl: router.currentUrlTree,\n extractedUrl: router.urlHandlingStrategy.extract(router.currentUrlTree),\n urlAfterRedirects: router.urlHandlingStrategy.extract(router.currentUrlTree),\n rawUrl: router.currentUrlTree,\n extras: {},\n resolve: null,\n reject: null,\n promise: Promise.resolve(true),\n source: 'imperative',\n restoredState: null,\n currentSnapshot: router.routerState.snapshot,\n targetSnapshot: null,\n currentRouterState: router.routerState,\n targetRouterState: null,\n guards: { canActivateChecks: [], canDeactivateChecks: [] },\n guardsResult: null,\n });\n return this.transitions.pipe(filter(t => t.id !== 0), \n // Extract URL\n map(t => ({ ...t, extractedUrl: router.urlHandlingStrategy.extract(t.rawUrl) })), \n // Using switchMap so we cancel executing navigations when a new one comes in\n switchMap(overallTransitionState => {\n let completed = false;\n let errored = false;\n return of(overallTransitionState)\n .pipe(\n // Store the Navigation object\n tap(t => {\n this.currentNavigation = {\n id: t.id,\n initialUrl: t.rawUrl,\n extractedUrl: t.extractedUrl,\n trigger: t.source,\n extras: t.extras,\n previousNavigation: !this.lastSuccessfulNavigation ? null : {\n ...this.lastSuccessfulNavigation,\n previousNavigation: null,\n },\n };\n }), switchMap(t => {\n const browserUrlTree = router.browserUrlTree.toString();\n const urlTransition = !router.navigated ||\n t.extractedUrl.toString() !== browserUrlTree ||\n // Navigations which succeed or ones which fail and are cleaned up\n // correctly should result in `browserUrlTree` and `currentUrlTree`\n // matching. If this is not the case, assume something went wrong and\n // try processing the URL again.\n browserUrlTree !== router.currentUrlTree.toString();\n const processCurrentUrl = (router.onSameUrlNavigation === 'reload' ? true : urlTransition) &&\n router.urlHandlingStrategy.shouldProcessUrl(t.rawUrl);\n if (processCurrentUrl) {\n // If the source of the navigation is from a browser event, the URL is\n // already updated. We already need to sync the internal state.\n if (isBrowserTriggeredNavigation(t.source)) {\n router.browserUrlTree = t.extractedUrl;\n }\n return of(t).pipe(\n // Fire NavigationStart event\n switchMap(t => {\n const transition = this.transitions?.getValue();\n this.events.next(new NavigationStart(t.id, this.urlSerializer.serialize(t.extractedUrl), t.source, t.restoredState));\n if (transition !== this.transitions?.getValue()) {\n return EMPTY;\n }\n // This delay is required to match old behavior that forced\n // navigation to always be async\n return Promise.resolve(t);\n }), \n // ApplyRedirects\n applyRedirects(this.environmentInjector, this.configLoader, this.urlSerializer, router.config), \n // Update the currentNavigation\n // `urlAfterRedirects` is guaranteed to be set after this point\n tap(t => {\n this.currentNavigation = {\n ...this.currentNavigation,\n finalUrl: t.urlAfterRedirects\n };\n overallTransitionState.urlAfterRedirects = t.urlAfterRedirects;\n }), \n // Recognize\n recognize(this.environmentInjector, router.rootComponentType, router.config, this.urlSerializer, router.paramsInheritanceStrategy), \n // Update URL if in `eager` update mode\n tap(t => {\n overallTransitionState.targetSnapshot = t.targetSnapshot;\n if (router.urlUpdateStrategy === 'eager') {\n if (!t.extras.skipLocationChange) {\n const rawUrl = router.urlHandlingStrategy.merge(t.urlAfterRedirects, t.rawUrl);\n router.setBrowserUrl(rawUrl, t);\n }\n router.browserUrlTree = t.urlAfterRedirects;\n }\n // Fire RoutesRecognized\n const routesRecognized = new RoutesRecognized(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot);\n this.events.next(routesRecognized);\n }));\n }\n else {\n const processPreviousUrl = urlTransition && router.rawUrlTree &&\n router.urlHandlingStrategy.shouldProcessUrl(router.rawUrlTree);\n /* When the current URL shouldn't be processed, but the previous one\n * was, we handle this \"error condition\" by navigating to the\n * previously successful URL, but leaving the URL intact.*/\n if (processPreviousUrl) {\n const { id, extractedUrl, source, restoredState, extras } = t;\n const navStart = new NavigationStart(id, this.urlSerializer.serialize(extractedUrl), source, restoredState);\n this.events.next(navStart);\n const targetSnapshot = createEmptyState(extractedUrl, router.rootComponentType)\n .snapshot;\n overallTransitionState = {\n ...t,\n targetSnapshot,\n urlAfterRedirects: extractedUrl,\n extras: { ...extras, skipLocationChange: false, replaceUrl: false },\n };\n return of(overallTransitionState);\n }\n else {\n /* When neither the current or previous URL can be processed, do\n * nothing other than update router's internal reference to the\n * current \"settled\" URL. This way the next navigation will be coming\n * from the current URL in the browser.\n */\n router.rawUrlTree = t.rawUrl;\n t.resolve(null);\n return EMPTY;\n }\n }\n }), \n // --- GUARDS ---\n tap(t => {\n const guardsStart = new GuardsCheckStart(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot);\n this.events.next(guardsStart);\n }), map(t => {\n overallTransitionState = {\n ...t,\n guards: getAllRouteGuards(t.targetSnapshot, t.currentSnapshot, this.rootContexts)\n };\n return overallTransitionState;\n }), checkGuards(this.environmentInjector, (evt) => this.events.next(evt)), tap(t => {\n overallTransitionState.guardsResult = t.guardsResult;\n if (isUrlTree(t.guardsResult)) {\n throw redirectingNavigationError(this.urlSerializer, t.guardsResult);\n }\n const guardsEnd = new GuardsCheckEnd(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot, !!t.guardsResult);\n this.events.next(guardsEnd);\n }), filter(t => {\n if (!t.guardsResult) {\n router.restoreHistory(t);\n this.cancelNavigationTransition(t, '', 3 /* NavigationCancellationCode.GuardRejected */, router);\n return false;\n }\n return true;\n }), \n // --- RESOLVE ---\n switchTap(t => {\n if (t.guards.canActivateChecks.length) {\n return of(t).pipe(tap(t => {\n const resolveStart = new ResolveStart(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot);\n this.events.next(resolveStart);\n }), switchMap(t => {\n let dataResolved = false;\n return of(t).pipe(resolveData(router.paramsInheritanceStrategy, this.environmentInjector), tap({\n next: () => dataResolved = true,\n complete: () => {\n if (!dataResolved) {\n router.restoreHistory(t);\n this.cancelNavigationTransition(t, NG_DEV_MODE$4 ?\n `At least one route resolver didn't emit any value.` :\n '', 2 /* NavigationCancellationCode.NoDataFromResolver */, router);\n }\n }\n }));\n }), tap(t => {\n const resolveEnd = new ResolveEnd(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot);\n this.events.next(resolveEnd);\n }));\n }\n return undefined;\n }), \n // --- LOAD COMPONENTS ---\n switchTap((t) => {\n const loadComponents = (route) => {\n const loaders = [];\n if (route.routeConfig?.loadComponent &&\n !route.routeConfig._loadedComponent) {\n loaders.push(this.configLoader.loadComponent(route.routeConfig)\n .pipe(tap(loadedComponent => {\n route.component = loadedComponent;\n }), map(() => void 0)));\n }\n for (const child of route.children) {\n loaders.push(...loadComponents(child));\n }\n return loaders;\n };\n return combineLatest(loadComponents(t.targetSnapshot.root))\n .pipe(defaultIfEmpty(), take(1));\n }), switchTap(() => router.afterPreactivation()), map((t) => {\n const targetRouterState = createRouterState(router.routeReuseStrategy, t.targetSnapshot, t.currentRouterState);\n overallTransitionState = { ...t, targetRouterState };\n return (overallTransitionState);\n }), \n /* Once here, we are about to activate synchronously. The assumption is\n this will succeed, and user code may read from the Router service.\n Therefore before activation, we need to update router properties storing\n the current URL and the RouterState, as well as updated the browser URL.\n All this should happen *before* activating. */\n tap((t) => {\n router.currentUrlTree = t.urlAfterRedirects;\n router.rawUrlTree =\n router.urlHandlingStrategy.merge(t.urlAfterRedirects, t.rawUrl);\n router.routerState =\n t.targetRouterState;\n if (router.urlUpdateStrategy === 'deferred') {\n if (!t.extras.skipLocationChange) {\n router.setBrowserUrl(router.rawUrlTree, t);\n }\n router.browserUrlTree = t.urlAfterRedirects;\n }\n }), activateRoutes(this.rootContexts, router.routeReuseStrategy, (evt) => this.events.next(evt)), tap({\n next: (t) => {\n completed = true;\n this.lastSuccessfulNavigation = this.currentNavigation;\n router.navigated = true;\n this.events.next(new NavigationEnd(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(router.currentUrlTree)));\n router.titleStrategy?.updateTitle(t.targetRouterState.snapshot);\n t.resolve(true);\n },\n complete: () => {\n completed = true;\n }\n }), finalize(() => {\n /* When the navigation stream finishes either through error or success,\n * we set the `completed` or `errored` flag. However, there are some\n * situations where we could get here without either of those being set.\n * For instance, a redirect during NavigationStart. Therefore, this is a\n * catch-all to make sure the NavigationCancel event is fired when a\n * navigation gets cancelled but not caught by other means. */\n if (!completed && !errored) {\n const cancelationReason = NG_DEV_MODE$4 ?\n `Navigation ID ${overallTransitionState\n .id} is not equal to the current navigation id ${this.navigationId}` :\n '';\n this.cancelNavigationTransition(overallTransitionState, cancelationReason, 1 /* NavigationCancellationCode.SupersededByNewNavigation */, router);\n }\n // Only clear current navigation if it is still set to the one that\n // finalized.\n if (this.currentNavigation?.id === overallTransitionState.id) {\n this.currentNavigation = null;\n }\n }), catchError((e) => {\n errored = true;\n /* This error type is issued during Redirect, and is handled as a\n * cancellation rather than an error. */\n if (isNavigationCancelingError$1(e)) {\n if (!isRedirectingNavigationCancelingError$1(e)) {\n // Set property only if we're not redirecting. If we landed on a page\n // and redirect to `/` route, the new navigation is going to see the\n // `/` isn't a change from the default currentUrlTree and won't\n // navigate. This is only applicable with initial navigation, so\n // setting `navigated` only when not redirecting resolves this\n // scenario.\n router.navigated = true;\n router.restoreHistory(overallTransitionState, true);\n }\n const navCancel = new NavigationCancel(overallTransitionState.id, this.urlSerializer.serialize(overallTransitionState.extractedUrl), e.message, e.cancellationCode);\n this.events.next(navCancel);\n // When redirecting, we need to delay resolving the navigation\n // promise and push it to the redirect navigation\n if (!isRedirectingNavigationCancelingError$1(e)) {\n overallTransitionState.resolve(false);\n }\n else {\n const mergedTree = router.urlHandlingStrategy.merge(e.url, router.rawUrlTree);\n const extras = {\n skipLocationChange: overallTransitionState.extras.skipLocationChange,\n // The URL is already updated at this point if we have 'eager' URL\n // updates or if the navigation was triggered by the browser (back\n // button, URL bar, etc). We want to replace that item in history\n // if the navigation is rejected.\n replaceUrl: router.urlUpdateStrategy === 'eager' ||\n isBrowserTriggeredNavigation(overallTransitionState.source)\n };\n router.scheduleNavigation(mergedTree, 'imperative', null, extras, {\n resolve: overallTransitionState.resolve,\n reject: overallTransitionState.reject,\n promise: overallTransitionState.promise\n });\n }\n /* All other errors should reset to the router's internal URL reference\n * to the pre-error state. */\n }\n else {\n router.restoreHistory(overallTransitionState, true);\n const navError = new NavigationError(overallTransitionState.id, this.urlSerializer.serialize(overallTransitionState.extractedUrl), e, overallTransitionState.targetSnapshot ?? undefined);\n this.events.next(navError);\n try {\n overallTransitionState.resolve(router.errorHandler(e));\n }\n catch (ee) {\n overallTransitionState.reject(ee);\n }\n }\n return EMPTY;\n }));\n // TODO(jasonaden): remove cast once g3 is on updated TypeScript\n }));\n }\n cancelNavigationTransition(t, reason, code, router) {\n const navCancel = new NavigationCancel(t.id, this.urlSerializer.serialize(t.extractedUrl), reason, code);\n this.events.next(navCancel);\n t.resolve(false);\n }\n}\nNavigationTransitions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NavigationTransitions, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNavigationTransitions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NavigationTransitions, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NavigationTransitions, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return []; } });\nfunction isBrowserTriggeredNavigation(source) {\n return source !== 'imperative';\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Provides a strategy for setting the page title after a router navigation.\n *\n * The built-in implementation traverses the router state snapshot and finds the deepest primary\n * outlet with `title` property. Given the `Routes` below, navigating to\n * `/base/child(popup:aux)` would result in the document title being set to \"child\".\n * ```\n * [\n * {path: 'base', title: 'base', children: [\n * {path: 'child', title: 'child'},\n * ],\n * {path: 'aux', outlet: 'popup', title: 'popupTitle'}\n * ]\n * ```\n *\n * This class can be used as a base class for custom title strategies. That is, you can create your\n * own class that extends the `TitleStrategy`. Note that in the above example, the `title`\n * from the named outlet is never used. However, a custom strategy might be implemented to\n * incorporate titles in named outlets.\n *\n * @publicApi\n * @see [Page title guide](guide/router#setting-the-page-title)\n */\nclass TitleStrategy {\n /**\n * @returns The `title` of the deepest primary route.\n */\n buildTitle(snapshot) {\n let pageTitle;\n let route = snapshot.root;\n while (route !== undefined) {\n pageTitle = this.getResolvedTitleForRoute(route) ?? pageTitle;\n route = route.children.find(child => child.outlet === PRIMARY_OUTLET);\n }\n return pageTitle;\n }\n /**\n * Given an `ActivatedRouteSnapshot`, returns the final value of the\n * `Route.title` property, which can either be a static string or a resolved value.\n */\n getResolvedTitleForRoute(snapshot) {\n return snapshot.data[RouteTitleKey];\n }\n}\nTitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: TitleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: TitleStrategy, providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: TitleStrategy, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) }]\n }] });\n/**\n * The default `TitleStrategy` used by the router that updates the title using the `Title` service.\n */\nclass DefaultTitleStrategy extends TitleStrategy {\n constructor(title) {\n super();\n this.title = title;\n }\n /**\n * Sets the title of the browser to the given value.\n *\n * @param title The `pageTitle` from the deepest primary route.\n */\n updateTitle(snapshot) {\n const title = this.buildTitle(snapshot);\n if (title !== undefined) {\n this.title.setTitle(title);\n }\n }\n}\nDefaultTitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: DefaultTitleStrategy, deps: [{ token: i1.Title }], target: i0.ɵɵFactoryTarget.Injectable });\nDefaultTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: DefaultTitleStrategy, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: DefaultTitleStrategy, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: i1.Title }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description\n *\n * Provides a way to customize when activated routes get reused.\n *\n * @publicApi\n */\nclass RouteReuseStrategy {\n}\nRouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: RouteReuseStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nRouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: RouteReuseStrategy, providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: RouteReuseStrategy, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) }]\n }] });\n/**\n * @description\n *\n * This base route reuse strategy only reuses routes when the matched router configs are\n * identical. This prevents components from being destroyed and recreated\n * when just the route parameters, query parameters or fragment change\n * (that is, the existing component is _reused_).\n *\n * This strategy does not store any routes for later reuse.\n *\n * Angular uses this strategy by default.\n *\n *\n * It can be used as a base class for custom route reuse strategies, i.e. you can create your own\n * class that extends the `BaseRouteReuseStrategy` one.\n * @publicApi\n */\nclass BaseRouteReuseStrategy {\n /**\n * Whether the given route should detach for later reuse.\n * Always returns false for `BaseRouteReuseStrategy`.\n * */\n shouldDetach(route) {\n return false;\n }\n /**\n * A no-op; the route is never stored since this strategy never detaches routes for later re-use.\n */\n store(route, detachedTree) { }\n /** Returns `false`, meaning the route (and its subtree) is never reattached */\n shouldAttach(route) {\n return false;\n }\n /** Returns `null` because this strategy does not store routes for later re-use. */\n retrieve(route) {\n return null;\n }\n /**\n * Determines if a route should be reused.\n * This strategy returns `true` when the future route config and current route config are\n * identical.\n */\n shouldReuseRoute(future, curr) {\n return future.routeConfig === curr.routeConfig;\n }\n}\nclass DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {\n}\nDefaultRouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: DefaultRouteReuseStrategy, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\nDefaultRouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: DefaultRouteReuseStrategy, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: DefaultRouteReuseStrategy, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst NG_DEV_MODE$3 = typeof ngDevMode === 'undefined' || !!ngDevMode;\n/**\n * A [DI token](guide/glossary/#di-token) for the router service.\n *\n * @publicApi\n */\nconst ROUTER_CONFIGURATION = new InjectionToken(NG_DEV_MODE$3 ? 'router config' : '', {\n providedIn: 'root',\n factory: () => ({}),\n});\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description\n *\n * Provides a way to migrate AngularJS applications to Angular.\n *\n * @publicApi\n */\nclass UrlHandlingStrategy {\n}\nUrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: UrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nUrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: UrlHandlingStrategy, providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: UrlHandlingStrategy, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) }]\n }] });\n/**\n * @publicApi\n */\nclass DefaultUrlHandlingStrategy {\n shouldProcessUrl(url) {\n return true;\n }\n extract(url) {\n return url;\n }\n merge(newUrlPart, wholeUrl) {\n return newUrlPart;\n }\n}\nDefaultUrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: DefaultUrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nDefaultUrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: DefaultUrlHandlingStrategy, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: DefaultUrlHandlingStrategy, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst NG_DEV_MODE$2 = typeof ngDevMode === 'undefined' || !!ngDevMode;\nfunction defaultErrorHandler(error) {\n throw error;\n}\nfunction defaultMalformedUriErrorHandler(error, urlSerializer, url) {\n return urlSerializer.parse('/');\n}\n/**\n * The equivalent `IsActiveMatchOptions` options for `Router.isActive` is called with `true`\n * (exact = true).\n */\nconst exactMatchOptions = {\n paths: 'exact',\n fragment: 'ignored',\n matrixParams: 'ignored',\n queryParams: 'exact'\n};\n/**\n * The equivalent `IsActiveMatchOptions` options for `Router.isActive` is called with `false`\n * (exact = false).\n */\nconst subsetMatchOptions = {\n paths: 'subset',\n fragment: 'ignored',\n matrixParams: 'ignored',\n queryParams: 'subset'\n};\n/**\n * @description\n *\n * A service that provides navigation among views and URL manipulation capabilities.\n *\n * @see `Route`.\n * @see [Routing and Navigation Guide](guide/router).\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\nclass Router {\n constructor() {\n this.disposed = false;\n /**\n * The id of the currently active page in the router.\n * Updated to the transition's target id on a successful navigation.\n *\n * This is used to track what page the router last activated. When an attempted navigation fails,\n * the router can then use this to compute how to restore the state back to the previously active\n * page.\n */\n this.currentPageId = 0;\n this.console = inject(ɵConsole);\n this.isNgZoneEnabled = false;\n this.options = inject(ROUTER_CONFIGURATION, { optional: true }) || {};\n /**\n * A handler for navigation errors in this NgModule.\n */\n this.errorHandler = this.options.errorHandler || defaultErrorHandler;\n /**\n * A handler for errors thrown by `Router.parseUrl(url)`\n * when `url` contains an invalid character.\n * The most common case is a `%` sign\n * that's not encoded and is not part of a percent encoded sequence.\n */\n this.malformedUriErrorHandler = this.options.malformedUriErrorHandler || defaultMalformedUriErrorHandler;\n /**\n * True if at least one navigation event has occurred,\n * false otherwise.\n */\n this.navigated = false;\n this.lastSuccessfulId = -1;\n /**\n * Hook that enables you to pause navigation after the preactivation phase.\n * Used by `RouterModule`.\n *\n * @internal\n */\n this.afterPreactivation = () => of(void 0);\n /**\n * A strategy for extracting and merging URLs.\n * Used for AngularJS to Angular migrations.\n */\n this.urlHandlingStrategy = inject(UrlHandlingStrategy);\n /**\n * A strategy for re-using routes.\n */\n this.routeReuseStrategy = inject(RouteReuseStrategy);\n /** Strategy used to create a UrlTree. */\n this.urlCreationStrategy = inject(CreateUrlTreeStrategy);\n /**\n * A strategy for setting the title based on the `routerState`.\n */\n this.titleStrategy = inject(TitleStrategy);\n /**\n * How to handle a navigation request to the current URL. One of:\n *\n * - `'ignore'` : The router ignores the request.\n * - `'reload'` : The router reloads the URL. Use to implement a \"refresh\" feature.\n *\n * Note that this only configures whether the Route reprocesses the URL and triggers related\n * action and events like redirects, guards, and resolvers. By default, the router re-uses a\n * component instance when it re-navigates to the same component type without visiting a different\n * component first. This behavior is configured by the `RouteReuseStrategy`. In order to reload\n * routed components on same url navigation, you need to set `onSameUrlNavigation` to `'reload'`\n * _and_ provide a `RouteReuseStrategy` which returns `false` for `shouldReuseRoute`.\n */\n this.onSameUrlNavigation = this.options.onSameUrlNavigation || 'ignore';\n /**\n * How to merge parameters, data, resolved data, and title from parent to child\n * routes. One of:\n *\n * - `'emptyOnly'` : Inherit parent parameters, data, and resolved data\n * for path-less or component-less routes.\n * - `'always'` : Inherit parent parameters, data, and resolved data\n * for all child routes.\n */\n this.paramsInheritanceStrategy = this.options.paramsInheritanceStrategy || 'emptyOnly';\n /**\n * Determines when the router updates the browser URL.\n * By default (`\"deferred\"`), updates the browser URL after navigation has finished.\n * Set to `'eager'` to update the browser URL at the beginning of navigation.\n * You can choose to update early so that, if navigation fails,\n * you can show an error message with the URL that failed.\n */\n this.urlUpdateStrategy = this.options.urlUpdateStrategy || 'deferred';\n /**\n * Configures how the Router attempts to restore state when a navigation is cancelled.\n *\n * 'replace' - Always uses `location.replaceState` to set the browser state to the state of the\n * router before the navigation started. This means that if the URL of the browser is updated\n * _before_ the navigation is canceled, the Router will simply replace the item in history rather\n * than trying to restore to the previous location in the session history. This happens most\n * frequently with `urlUpdateStrategy: 'eager'` and navigations with the browser back/forward\n * buttons.\n *\n * 'computed' - Will attempt to return to the same index in the session history that corresponds\n * to the Angular route when the navigation gets cancelled. For example, if the browser back\n * button is clicked and the navigation is cancelled, the Router will trigger a forward navigation\n * and vice versa.\n *\n * Note: the 'computed' option is incompatible with any `UrlHandlingStrategy` which only\n * handles a portion of the URL because the history restoration navigates to the previous place in\n * the browser history rather than simply resetting a portion of the URL.\n *\n * The default value is `replace`.\n *\n */\n this.canceledNavigationResolution = this.options.canceledNavigationResolution || 'replace';\n this.config = flatten(inject(ROUTES, { optional: true }) ?? []);\n this.navigationTransitions = inject(NavigationTransitions);\n this.urlSerializer = inject(UrlSerializer);\n this.location = inject(Location);\n /** @internal */\n this.rootComponentType = null;\n this.isNgZoneEnabled = inject(NgZone) instanceof NgZone && NgZone.isInAngularZone();\n this.resetConfig(this.config);\n this.currentUrlTree = new UrlTree();\n this.rawUrlTree = this.currentUrlTree;\n this.browserUrlTree = this.currentUrlTree;\n this.routerState = createEmptyState(this.currentUrlTree, this.rootComponentType);\n this.navigationTransitions.setupNavigations(this).subscribe(t => {\n this.lastSuccessfulId = t.id;\n this.currentPageId = t.targetPageId;\n }, e => {\n this.console.warn(`Unhandled Navigation Error: ${e}`);\n });\n }\n // TODO(b/260747083): This should not exist and navigationId should be private in\n // `NavigationTransitions`\n get navigationId() {\n return this.navigationTransitions.navigationId;\n }\n /**\n * The ɵrouterPageId of whatever page is currently active in the browser history. This is\n * important for computing the target page id for new navigations because we need to ensure each\n * page id in the browser history is 1 more than the previous entry.\n */\n get browserPageId() {\n return this.location.getState()?.ɵrouterPageId;\n }\n /**\n * An event stream for routing events.\n */\n get events() {\n // TODO(atscott): This _should_ be events.asObservable(). However, this change requires internal\n // cleanup: tests are doing `(route.events as Subject<Event>).next(...)`. This isn't\n // allowed/supported but we still have to fix these or file bugs against the teams before making\n // the change.\n return this.navigationTransitions.events;\n }\n /** @internal */\n resetRootComponentType(rootComponentType) {\n this.rootComponentType = rootComponentType;\n // TODO: vsavkin router 4.0 should make the root component set to null\n // this will simplify the lifecycle of the router.\n this.routerState.root.component = this.rootComponentType;\n }\n /**\n * Sets up the location change listener and performs the initial navigation.\n */\n initialNavigation() {\n this.setUpLocationChangeListener();\n if (!this.navigationTransitions.hasRequestedNavigation) {\n this.navigateByUrl(this.location.path(true), { replaceUrl: true });\n }\n }\n /**\n * Sets up the location change listener. This listener detects navigations triggered from outside\n * the Router (the browser back/forward buttons, for example) and schedules a corresponding Router\n * navigation so that the correct events, guards, etc. are triggered.\n */\n setUpLocationChangeListener() {\n // Don't need to use Zone.wrap any more, because zone.js\n // already patch onPopState, so location change callback will\n // run into ngZone\n if (!this.locationSubscription) {\n this.locationSubscription = this.location.subscribe(event => {\n const source = event['type'] === 'popstate' ? 'popstate' : 'hashchange';\n if (source === 'popstate') {\n // The `setTimeout` was added in #12160 and is likely to support Angular/AngularJS\n // hybrid apps.\n setTimeout(() => {\n const extras = { replaceUrl: true };\n // TODO: restoredState should always include the entire state, regardless\n // of navigationId. This requires a breaking change to update the type on\n // NavigationStart’s restoredState, which currently requires navigationId\n // to always be present. The Router used to only restore history state if\n // a navigationId was present.\n // The stored navigationId is used by the RouterScroller to retrieve the scroll\n // position for the page.\n const restoredState = event.state?.navigationId ? event.state : null;\n // Separate to NavigationStart.restoredState, we must also restore the state to\n // history.state and generate a new navigationId, since it will be overwritten\n if (event.state) {\n const stateCopy = { ...event.state };\n delete stateCopy.navigationId;\n delete stateCopy.ɵrouterPageId;\n if (Object.keys(stateCopy).length !== 0) {\n extras.state = stateCopy;\n }\n }\n const urlTree = this.parseUrl(event['url']);\n this.scheduleNavigation(urlTree, source, restoredState, extras);\n }, 0);\n }\n });\n }\n }\n /** The current URL. */\n get url() {\n return this.serializeUrl(this.currentUrlTree);\n }\n /**\n * Returns the current `Navigation` object when the router is navigating,\n * and `null` when idle.\n */\n getCurrentNavigation() {\n return this.navigationTransitions.currentNavigation;\n }\n /**\n * Resets the route configuration used for navigation and generating links.\n *\n * @param config The route array for the new configuration.\n *\n * @usageNotes\n *\n * ```\n * router.resetConfig([\n * { path: 'team/:id', component: TeamCmp, children: [\n * { path: 'simple', component: SimpleCmp },\n * { path: 'user/:name', component: UserCmp }\n * ]}\n * ]);\n * ```\n */\n resetConfig(config) {\n NG_DEV_MODE$2 && validateConfig(config);\n this.config = config.map(standardizeConfig);\n this.navigated = false;\n this.lastSuccessfulId = -1;\n }\n /** @nodoc */\n ngOnDestroy() {\n this.dispose();\n }\n /** Disposes of the router. */\n dispose() {\n this.navigationTransitions.complete();\n if (this.locationSubscription) {\n this.locationSubscription.unsubscribe();\n this.locationSubscription = undefined;\n }\n this.disposed = true;\n }\n /**\n * Appends URL segments to the current URL tree to create a new URL tree.\n *\n * @param commands An array of URL fragments with which to construct the new URL tree.\n * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n * segments, followed by the parameters for each segment.\n * The fragments are applied to the current URL tree or the one provided in the `relativeTo`\n * property of the options object, if supplied.\n * @param navigationExtras Options that control the navigation strategy.\n * @returns The new URL tree.\n *\n * @usageNotes\n *\n * ```\n * // create /team/33/user/11\n * router.createUrlTree(['/team', 33, 'user', 11]);\n *\n * // create /team/33;expand=true/user/11\n * router.createUrlTree(['/team', 33, {expand: true}, 'user', 11]);\n *\n * // you can collapse static segments like this (this works only with the first passed-in value):\n * router.createUrlTree(['/team/33/user', userId]);\n *\n * // If the first segment can contain slashes, and you do not want the router to split it,\n * // you can do the following:\n * router.createUrlTree([{segmentPath: '/one/two'}]);\n *\n * // create /team/33/(user/11//right:chat)\n * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: 'chat'}}]);\n *\n * // remove the right secondary node\n * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: null}}]);\n *\n * // assuming the current url is `/team/33/user/11` and the route points to `user/11`\n *\n * // navigate to /team/33/user/11/details\n * router.createUrlTree(['details'], {relativeTo: route});\n *\n * // navigate to /team/33/user/22\n * router.createUrlTree(['../22'], {relativeTo: route});\n *\n * // navigate to /team/44/user/22\n * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route});\n *\n * Note that a value of `null` or `undefined` for `relativeTo` indicates that the\n * tree should be created relative to the root.\n * ```\n */\n createUrlTree(commands, navigationExtras = {}) {\n const { relativeTo, queryParams, fragment, queryParamsHandling, preserveFragment } = navigationExtras;\n const f = preserveFragment ? this.currentUrlTree.fragment : fragment;\n let q = null;\n switch (queryParamsHandling) {\n case 'merge':\n q = { ...this.currentUrlTree.queryParams, ...queryParams };\n break;\n case 'preserve':\n q = this.currentUrlTree.queryParams;\n break;\n default:\n q = queryParams || null;\n }\n if (q !== null) {\n q = this.removeEmptyProps(q);\n }\n return this.urlCreationStrategy.createUrlTree(relativeTo, this.routerState, this.currentUrlTree, commands, q, f ?? null);\n }\n /**\n * Navigates to a view using an absolute route path.\n *\n * @param url An absolute path for a defined route. The function does not apply any delta to the\n * current URL.\n * @param extras An object containing properties that modify the navigation strategy.\n *\n * @returns A Promise that resolves to 'true' when navigation succeeds,\n * to 'false' when navigation fails, or is rejected on error.\n *\n * @usageNotes\n *\n * The following calls request navigation to an absolute path.\n *\n * ```\n * router.navigateByUrl(\"/team/33/user/11\");\n *\n * // Navigate without updating the URL\n * router.navigateByUrl(\"/team/33/user/11\", { skipLocationChange: true });\n * ```\n *\n * @see [Routing and Navigation guide](guide/router)\n *\n */\n navigateByUrl(url, extras = {\n skipLocationChange: false\n }) {\n if (typeof ngDevMode === 'undefined' ||\n ngDevMode && this.isNgZoneEnabled && !NgZone.isInAngularZone()) {\n this.console.warn(`Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?`);\n }\n const urlTree = isUrlTree(url) ? url : this.parseUrl(url);\n const mergedTree = this.urlHandlingStrategy.merge(urlTree, this.rawUrlTree);\n return this.scheduleNavigation(mergedTree, 'imperative', null, extras);\n }\n /**\n * Navigate based on the provided array of commands and a starting point.\n * If no starting route is provided, the navigation is absolute.\n *\n * @param commands An array of URL fragments with which to construct the target URL.\n * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n * segments, followed by the parameters for each segment.\n * The fragments are applied to the current URL or the one provided in the `relativeTo` property\n * of the options object, if supplied.\n * @param extras An options object that determines how the URL should be constructed or\n * interpreted.\n *\n * @returns A Promise that resolves to `true` when navigation succeeds, to `false` when navigation\n * fails,\n * or is rejected on error.\n *\n * @usageNotes\n *\n * The following calls request navigation to a dynamic route path relative to the current URL.\n *\n * ```\n * router.navigate(['team', 33, 'user', 11], {relativeTo: route});\n *\n * // Navigate without updating the URL, overriding the default behavior\n * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});\n * ```\n *\n * @see [Routing and Navigation guide](guide/router)\n *\n */\n navigate(commands, extras = { skipLocationChange: false }) {\n validateCommands(commands);\n return this.navigateByUrl(this.createUrlTree(commands, extras), extras);\n }\n /** Serializes a `UrlTree` into a string */\n serializeUrl(url) {\n return this.urlSerializer.serialize(url);\n }\n /** Parses a string into a `UrlTree` */\n parseUrl(url) {\n let urlTree;\n try {\n urlTree = this.urlSerializer.parse(url);\n }\n catch (e) {\n urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);\n }\n return urlTree;\n }\n isActive(url, matchOptions) {\n let options;\n if (matchOptions === true) {\n options = { ...exactMatchOptions };\n }\n else if (matchOptions === false) {\n options = { ...subsetMatchOptions };\n }\n else {\n options = matchOptions;\n }\n if (isUrlTree(url)) {\n return containsTree(this.currentUrlTree, url, options);\n }\n const urlTree = this.parseUrl(url);\n return containsTree(this.currentUrlTree, urlTree, options);\n }\n removeEmptyProps(params) {\n return Object.keys(params).reduce((result, key) => {\n const value = params[key];\n if (value !== null && value !== undefined) {\n result[key] = value;\n }\n return result;\n }, {});\n }\n /** @internal */\n scheduleNavigation(rawUrl, source, restoredState, extras, priorPromise) {\n if (this.disposed) {\n return Promise.resolve(false);\n }\n let resolve;\n let reject;\n let promise;\n if (priorPromise) {\n resolve = priorPromise.resolve;\n reject = priorPromise.reject;\n promise = priorPromise.promise;\n }\n else {\n promise = new Promise((res, rej) => {\n resolve = res;\n reject = rej;\n });\n }\n let targetPageId;\n if (this.canceledNavigationResolution === 'computed') {\n const isInitialPage = this.currentPageId === 0;\n if (isInitialPage) {\n restoredState = this.location.getState();\n }\n // If the `ɵrouterPageId` exist in the state then `targetpageId` should have the value of\n // `ɵrouterPageId`. This is the case for something like a page refresh where we assign the\n // target id to the previously set value for that page.\n if (restoredState && restoredState.ɵrouterPageId) {\n targetPageId = restoredState.ɵrouterPageId;\n }\n else {\n // If we're replacing the URL or doing a silent navigation, we do not want to increment the\n // page id because we aren't pushing a new entry to history.\n if (extras.replaceUrl || extras.skipLocationChange) {\n targetPageId = this.browserPageId ?? 0;\n }\n else {\n targetPageId = (this.browserPageId ?? 0) + 1;\n }\n }\n }\n else {\n // This is unused when `canceledNavigationResolution` is not computed.\n targetPageId = 0;\n }\n this.navigationTransitions.handleNavigationRequest({\n targetPageId,\n source,\n restoredState,\n currentUrlTree: this.currentUrlTree,\n currentRawUrl: this.currentUrlTree,\n rawUrl,\n extras,\n resolve,\n reject,\n promise,\n currentSnapshot: this.routerState.snapshot,\n currentRouterState: this.routerState\n });\n // Make sure that the error is propagated even though `processNavigations` catch\n // handler does not rethrow\n return promise.catch((e) => {\n return Promise.reject(e);\n });\n }\n /** @internal */\n setBrowserUrl(url, transition) {\n const path = this.urlSerializer.serialize(url);\n const state = {\n ...transition.extras.state,\n ...this.generateNgRouterState(transition.id, transition.targetPageId)\n };\n if (this.location.isCurrentPathEqualTo(path) || !!transition.extras.replaceUrl) {\n this.location.replaceState(path, '', state);\n }\n else {\n this.location.go(path, '', state);\n }\n }\n /**\n * Performs the necessary rollback action to restore the browser URL to the\n * state before the transition.\n * @internal\n */\n restoreHistory(transition, restoringFromCaughtError = false) {\n if (this.canceledNavigationResolution === 'computed') {\n const targetPagePosition = this.currentPageId - transition.targetPageId;\n // The navigator change the location before triggered the browser event,\n // so we need to go back to the current url if the navigation is canceled.\n // Also, when navigation gets cancelled while using url update strategy eager, then we need to\n // go back. Because, when `urlUpdateStrategy` is `eager`; `setBrowserUrl` method is called\n // before any verification.\n const browserUrlUpdateOccurred = (transition.source === 'popstate' || this.urlUpdateStrategy === 'eager' ||\n this.currentUrlTree === this.getCurrentNavigation()?.finalUrl);\n if (browserUrlUpdateOccurred && targetPagePosition !== 0) {\n this.location.historyGo(targetPagePosition);\n }\n else if (this.currentUrlTree === this.getCurrentNavigation()?.finalUrl &&\n targetPagePosition === 0) {\n // We got to the activation stage (where currentUrlTree is set to the navigation's\n // finalUrl), but we weren't moving anywhere in history (skipLocationChange or replaceUrl).\n // We still need to reset the router state back to what it was when the navigation started.\n this.resetState(transition);\n // TODO(atscott): resetting the `browserUrlTree` should really be done in `resetState`.\n // Investigate if this can be done by running TGP.\n this.browserUrlTree = transition.currentUrlTree;\n this.resetUrlToCurrentUrlTree();\n }\n else {\n // The browser URL and router state was not updated before the navigation cancelled so\n // there's no restoration needed.\n }\n }\n else if (this.canceledNavigationResolution === 'replace') {\n // TODO(atscott): It seems like we should _always_ reset the state here. It would be a no-op\n // for `deferred` navigations that haven't change the internal state yet because guards\n // reject. For 'eager' navigations, it seems like we also really should reset the state\n // because the navigation was cancelled. Investigate if this can be done by running TGP.\n if (restoringFromCaughtError) {\n this.resetState(transition);\n }\n this.resetUrlToCurrentUrlTree();\n }\n }\n resetState(t) {\n this.routerState = t.currentRouterState;\n this.currentUrlTree = t.currentUrlTree;\n // Note here that we use the urlHandlingStrategy to get the reset `rawUrlTree` because it may be\n // configured to handle only part of the navigation URL. This means we would only want to reset\n // the part of the navigation handled by the Angular router rather than the whole URL. In\n // addition, the URLHandlingStrategy may be configured to specifically preserve parts of the URL\n // when merging, such as the query params so they are not lost on a refresh.\n this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, t.rawUrl);\n }\n resetUrlToCurrentUrlTree() {\n this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree), '', this.generateNgRouterState(this.lastSuccessfulId, this.currentPageId));\n }\n generateNgRouterState(navigationId, routerPageId) {\n if (this.canceledNavigationResolution === 'computed') {\n return { navigationId, ɵrouterPageId: routerPageId };\n }\n return { navigationId };\n }\n}\nRouter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: Router, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nRouter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: Router, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: Router, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return []; } });\nfunction validateCommands(commands) {\n for (let i = 0; i < commands.length; i++) {\n const cmd = commands[i];\n if (cmd == null) {\n throw new ɵRuntimeError(4008 /* RuntimeErrorCode.NULLISH_COMMAND */, NG_DEV_MODE$2 && `The requested path contains ${cmd} segment at index ${i}`);\n }\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description\n *\n * When applied to an element in a template, makes that element a link\n * that initiates navigation to a route. Navigation opens one or more routed components\n * in one or more `<router-outlet>` locations on the page.\n *\n * Given a route configuration `[{ path: 'user/:name', component: UserCmp }]`,\n * the following creates a static link to the route:\n * `<a routerLink=\"/user/bob\">link to user component</a>`\n *\n * You can use dynamic values to generate the link.\n * For a dynamic link, pass an array of path segments,\n * followed by the params for each segment.\n * For example, `['/team', teamId, 'user', userName, {details: true}]`\n * generates a link to `/team/11/user/bob;details=true`.\n *\n * Multiple static segments can be merged into one term and combined with dynamic segments.\n * For example, `['/team/11/user', userName, {details: true}]`\n *\n * The input that you provide to the link is treated as a delta to the current URL.\n * For instance, suppose the current URL is `/user/(box//aux:team)`.\n * The link `<a [routerLink]=\"['/user/jim']\">Jim</a>` creates the URL\n * `/user/(jim//aux:team)`.\n * See {@link Router#createUrlTree createUrlTree} for more information.\n *\n * @usageNotes\n *\n * You can use absolute or relative paths in a link, set query parameters,\n * control how parameters are handled, and keep a history of navigation states.\n *\n * ### Relative link paths\n *\n * The first segment name can be prepended with `/`, `./`, or `../`.\n * * If the first segment begins with `/`, the router looks up the route from the root of the\n * app.\n * * If the first segment begins with `./`, or doesn't begin with a slash, the router\n * looks in the children of the current activated route.\n * * If the first segment begins with `../`, the router goes up one level in the route tree.\n *\n * ### Setting and handling query params and fragments\n *\n * The following link adds a query parameter and a fragment to the generated URL:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" fragment=\"education\">\n * link to user component\n * </a>\n * ```\n * By default, the directive constructs the new URL using the given query parameters.\n * The example generates the link: `/user/bob?debug=true#education`.\n *\n * You can instruct the directive to handle query parameters differently\n * by specifying the `queryParamsHandling` option in the link.\n * Allowed values are:\n *\n * - `'merge'`: Merge the given `queryParams` into the current query params.\n * - `'preserve'`: Preserve the current query params.\n *\n * For example:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" queryParamsHandling=\"merge\">\n * link to user component\n * </a>\n * ```\n *\n * See {@link UrlCreationOptions.queryParamsHandling UrlCreationOptions#queryParamsHandling}.\n *\n * ### Preserving navigation history\n *\n * You can provide a `state` value to be persisted to the browser's\n * [`History.state` property](https://developer.mozilla.org/en-US/docs/Web/API/History#Properties).\n * For example:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [state]=\"{tracingId: 123}\">\n * link to user component\n * </a>\n * ```\n *\n * Use {@link Router.getCurrentNavigation() Router#getCurrentNavigation} to retrieve a saved\n * navigation-state value. For example, to capture the `tracingId` during the `NavigationStart`\n * event:\n *\n * ```\n * // Get NavigationStart events\n * router.events.pipe(filter(e => e instanceof NavigationStart)).subscribe(e => {\n * const navigation = router.getCurrentNavigation();\n * tracingService.trace({id: navigation.extras.state.tracingId});\n * });\n * ```\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\nclass RouterLink {\n constructor(router, route, tabIndexAttribute, renderer, el, locationStrategy) {\n this.router = router;\n this.route = route;\n this.tabIndexAttribute = tabIndexAttribute;\n this.renderer = renderer;\n this.el = el;\n this.locationStrategy = locationStrategy;\n this._preserveFragment = false;\n this._skipLocationChange = false;\n this._replaceUrl = false;\n /**\n * Represents an `href` attribute value applied to a host element,\n * when a host element is `<a>`. For other tags, the value is `null`.\n */\n this.href = null;\n this.commands = null;\n /** @internal */\n this.onChanges = new Subject();\n const tagName = el.nativeElement.tagName;\n this.isAnchorElement = tagName === 'A' || tagName === 'AREA';\n if (this.isAnchorElement) {\n this.subscription = router.events.subscribe((s) => {\n if (s instanceof NavigationEnd) {\n this.updateHref();\n }\n });\n }\n else {\n this.setTabIndexIfNotOnNativeEl('0');\n }\n }\n /**\n * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n * `UrlCreationOptions`.\n * @see {@link UrlCreationOptions#preserveFragment UrlCreationOptions#preserveFragment}\n * @see {@link Router#createUrlTree Router#createUrlTree}\n */\n set preserveFragment(preserveFragment) {\n this._preserveFragment = ɵcoerceToBoolean(preserveFragment);\n }\n get preserveFragment() {\n return this._preserveFragment;\n }\n /**\n * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n * `NavigationBehaviorOptions`.\n * @see {@link NavigationBehaviorOptions#skipLocationChange NavigationBehaviorOptions#skipLocationChange}\n * @see {@link Router#navigateByUrl Router#navigateByUrl}\n */\n set skipLocationChange(skipLocationChange) {\n this._skipLocationChange = ɵcoerceToBoolean(skipLocationChange);\n }\n get skipLocationChange() {\n return this._skipLocationChange;\n }\n /**\n * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n * `NavigationBehaviorOptions`.\n * @see {@link NavigationBehaviorOptions#replaceUrl NavigationBehaviorOptions#replaceUrl}\n * @see {@link Router#navigateByUrl Router#navigateByUrl}\n */\n set replaceUrl(replaceUrl) {\n this._replaceUrl = ɵcoerceToBoolean(replaceUrl);\n }\n get replaceUrl() {\n return this._replaceUrl;\n }\n /**\n * Modifies the tab index if there was not a tabindex attribute on the element during\n * instantiation.\n */\n setTabIndexIfNotOnNativeEl(newTabIndex) {\n if (this.tabIndexAttribute != null /* both `null` and `undefined` */ || this.isAnchorElement) {\n return;\n }\n this.applyAttributeValue('tabindex', newTabIndex);\n }\n /** @nodoc */\n ngOnChanges(changes) {\n if (this.isAnchorElement) {\n this.updateHref();\n }\n // This is subscribed to by `RouterLinkActive` so that it knows to update when there are changes\n // to the RouterLinks it's tracking.\n this.onChanges.next(this);\n }\n /**\n * Commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n * - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n * - **string**: shorthand for array of commands with just the string, i.e. `['/route']`\n * - **null|undefined**: effectively disables the `routerLink`\n * @see {@link Router#createUrlTree Router#createUrlTree}\n */\n set routerLink(commands) {\n if (commands != null) {\n this.commands = Array.isArray(commands) ? commands : [commands];\n this.setTabIndexIfNotOnNativeEl('0');\n }\n else {\n this.commands = null;\n this.setTabIndexIfNotOnNativeEl(null);\n }\n }\n /** @nodoc */\n onClick(button, ctrlKey, shiftKey, altKey, metaKey) {\n if (this.urlTree === null) {\n return true;\n }\n if (this.isAnchorElement) {\n if (button !== 0 || ctrlKey || shiftKey || altKey || metaKey) {\n return true;\n }\n if (typeof this.target === 'string' && this.target != '_self') {\n return true;\n }\n }\n const extras = {\n skipLocationChange: this.skipLocationChange,\n replaceUrl: this.replaceUrl,\n state: this.state,\n };\n this.router.navigateByUrl(this.urlTree, extras);\n // Return `false` for `<a>` elements to prevent default action\n // and cancel the native behavior, since the navigation is handled\n // by the Router.\n return !this.isAnchorElement;\n }\n /** @nodoc */\n ngOnDestroy() {\n this.subscription?.unsubscribe();\n }\n updateHref() {\n this.href = this.urlTree !== null && this.locationStrategy ?\n this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(this.urlTree)) :\n null;\n const sanitizedValue = this.href === null ?\n null :\n // This class represents a directive that can be added to both `<a>` elements,\n // as well as other elements. As a result, we can't define security context at\n // compile time. So the security context is deferred to runtime.\n // The `ɵɵsanitizeUrlOrResourceUrl` selects the necessary sanitizer function\n // based on the tag and property names. The logic mimics the one from\n // `packages/compiler/src/schema/dom_security_schema.ts`, which is used at compile time.\n //\n // Note: we should investigate whether we can switch to using `@HostBinding('attr.href')`\n // instead of applying a value via a renderer, after a final merge of the\n // `RouterLinkWithHref` directive.\n ɵɵsanitizeUrlOrResourceUrl(this.href, this.el.nativeElement.tagName.toLowerCase(), 'href');\n this.applyAttributeValue('href', sanitizedValue);\n }\n applyAttributeValue(attrName, attrValue) {\n const renderer = this.renderer;\n const nativeElement = this.el.nativeElement;\n if (attrValue !== null) {\n renderer.setAttribute(nativeElement, attrName, attrValue);\n }\n else {\n renderer.removeAttribute(nativeElement, attrName);\n }\n }\n get urlTree() {\n if (this.commands === null) {\n return null;\n }\n return this.router.createUrlTree(this.commands, {\n // If the `relativeTo` input is not defined, we want to use `this.route` by default.\n // Otherwise, we should use the value provided by the user in the input.\n relativeTo: this.relativeTo !== undefined ? this.relativeTo : this.route,\n queryParams: this.queryParams,\n fragment: this.fragment,\n queryParamsHandling: this.queryParamsHandling,\n preserveFragment: this.preserveFragment,\n });\n }\n}\nRouterLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: RouterLink, deps: [{ token: Router }, { token: ActivatedRoute }, { token: 'tabindex', attribute: true }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i3.LocationStrategy }], target: i0.ɵɵFactoryTarget.Directive });\nRouterLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: RouterLink, isStandalone: true, selector: \"[routerLink]\", inputs: { target: \"target\", queryParams: \"queryParams\", fragment: \"fragment\", queryParamsHandling: \"queryParamsHandling\", state: \"state\", relativeTo: \"relativeTo\", preserveFragment: \"preserveFragment\", skipLocationChange: \"skipLocationChange\", replaceUrl: \"replaceUrl\", routerLink: \"routerLink\" }, host: { listeners: { \"click\": \"onClick($event.button,$event.ctrlKey,$event.shiftKey,$event.altKey,$event.metaKey)\" }, properties: { \"attr.target\": \"this.target\" } }, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: RouterLink, decorators: [{\n type: Directive,\n args: [{\n selector: '[routerLink]',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: Router }, { type: ActivatedRoute }, { type: undefined, decorators: [{\n type: Attribute,\n args: ['tabindex']\n }] }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i3.LocationStrategy }]; }, propDecorators: { target: [{\n type: HostBinding,\n args: ['attr.target']\n }, {\n type: Input\n }], queryParams: [{\n type: Input\n }], fragment: [{\n type: Input\n }], queryParamsHandling: [{\n type: Input\n }], state: [{\n type: Input\n }], relativeTo: [{\n type: Input\n }], preserveFragment: [{\n type: Input\n }], skipLocationChange: [{\n type: Input\n }], replaceUrl: [{\n type: Input\n }], routerLink: [{\n type: Input\n }], onClick: [{\n type: HostListener,\n args: ['click',\n ['$event.button', '$event.ctrlKey', '$event.shiftKey', '$event.altKey', '$event.metaKey']]\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n *\n * @description\n *\n * Tracks whether the linked route of an element is currently active, and allows you\n * to specify one or more CSS classes to add to the element when the linked route\n * is active.\n *\n * Use this directive to create a visual distinction for elements associated with an active route.\n * For example, the following code highlights the word \"Bob\" when the router\n * activates the associated route:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\">Bob</a>\n * ```\n *\n * Whenever the URL is either '/user' or '/user/bob', the \"active-link\" class is\n * added to the anchor tag. If the URL changes, the class is removed.\n *\n * You can set more than one class using a space-separated string or an array.\n * For example:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"class1 class2\">Bob</a>\n * <a routerLink=\"/user/bob\" [routerLinkActive]=\"['class1', 'class2']\">Bob</a>\n * ```\n *\n * To add the classes only when the URL matches the link exactly, add the option `exact: true`:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact:\n * true}\">Bob</a>\n * ```\n *\n * To directly check the `isActive` status of the link, assign the `RouterLinkActive`\n * instance to a template variable.\n * For example, the following checks the status without assigning any CSS classes:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive #rla=\"routerLinkActive\">\n * Bob {{ rla.isActive ? '(already open)' : ''}}\n * </a>\n * ```\n *\n * You can apply the `RouterLinkActive` directive to an ancestor of linked elements.\n * For example, the following sets the active-link class on the `<div>` parent tag\n * when the URL is either '/user/jim' or '/user/bob'.\n *\n * ```\n * <div routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact: true}\">\n * <a routerLink=\"/user/jim\">Jim</a>\n * <a routerLink=\"/user/bob\">Bob</a>\n * </div>\n * ```\n *\n * The `RouterLinkActive` directive can also be used to set the aria-current attribute\n * to provide an alternative distinction for active elements to visually impaired users.\n *\n * For example, the following code adds the 'active' class to the Home Page link when it is\n * indeed active and in such case also sets its aria-current attribute to 'page':\n *\n * ```\n * <a routerLink=\"/\" routerLinkActive=\"active\" ariaCurrentWhenActive=\"page\">Home Page</a>\n * ```\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\nclass RouterLinkActive {\n constructor(router, element, renderer, cdr, link) {\n this.router = router;\n this.element = element;\n this.renderer = renderer;\n this.cdr = cdr;\n this.link = link;\n this.classes = [];\n this.isActive = false;\n /**\n * Options to configure how to determine if the router link is active.\n *\n * These options are passed to the `Router.isActive()` function.\n *\n * @see Router.isActive\n */\n this.routerLinkActiveOptions = { exact: false };\n /**\n *\n * You can use the output `isActiveChange` to get notified each time the link becomes\n * active or inactive.\n *\n * Emits:\n * true -> Route is active\n * false -> Route is inactive\n *\n * ```\n * <a\n * routerLink=\"/user/bob\"\n * routerLinkActive=\"active-link\"\n * (isActiveChange)=\"this.onRouterLinkActive($event)\">Bob</a>\n * ```\n */\n this.isActiveChange = new EventEmitter();\n this.routerEventsSubscription = router.events.subscribe((s) => {\n if (s instanceof NavigationEnd) {\n this.update();\n }\n });\n }\n /** @nodoc */\n ngAfterContentInit() {\n // `of(null)` is used to force subscribe body to execute once immediately (like `startWith`).\n of(this.links.changes, of(null)).pipe(mergeAll()).subscribe(_ => {\n this.update();\n this.subscribeToEachLinkOnChanges();\n });\n }\n subscribeToEachLinkOnChanges() {\n this.linkInputChangesSubscription?.unsubscribe();\n const allLinkChanges = [...this.links.toArray(), this.link]\n .filter((link) => !!link)\n .map(link => link.onChanges);\n this.linkInputChangesSubscription = from(allLinkChanges).pipe(mergeAll()).subscribe(link => {\n if (this.isActive !== this.isLinkActive(this.router)(link)) {\n this.update();\n }\n });\n }\n set routerLinkActive(data) {\n const classes = Array.isArray(data) ? data : data.split(' ');\n this.classes = classes.filter(c => !!c);\n }\n /** @nodoc */\n ngOnChanges(changes) {\n this.update();\n }\n /** @nodoc */\n ngOnDestroy() {\n this.routerEventsSubscription.unsubscribe();\n this.linkInputChangesSubscription?.unsubscribe();\n }\n update() {\n if (!this.links || !this.router.navigated)\n return;\n Promise.resolve().then(() => {\n const hasActiveLinks = this.hasActiveLinks();\n if (this.isActive !== hasActiveLinks) {\n this.isActive = hasActiveLinks;\n this.cdr.markForCheck();\n this.classes.forEach((c) => {\n if (hasActiveLinks) {\n this.renderer.addClass(this.element.nativeElement, c);\n }\n else {\n this.renderer.removeClass(this.element.nativeElement, c);\n }\n });\n if (hasActiveLinks && this.ariaCurrentWhenActive !== undefined) {\n this.renderer.setAttribute(this.element.nativeElement, 'aria-current', this.ariaCurrentWhenActive.toString());\n }\n else {\n this.renderer.removeAttribute(this.element.nativeElement, 'aria-current');\n }\n // Emit on isActiveChange after classes are updated\n this.isActiveChange.emit(hasActiveLinks);\n }\n });\n }\n isLinkActive(router) {\n const options = isActiveMatchOptions(this.routerLinkActiveOptions) ?\n this.routerLinkActiveOptions :\n // While the types should disallow `undefined` here, it's possible without strict inputs\n (this.routerLinkActiveOptions.exact || false);\n return (link) => link.urlTree ? router.isActive(link.urlTree, options) : false;\n }\n hasActiveLinks() {\n const isActiveCheckFn = this.isLinkActive(this.router);\n return this.link && isActiveCheckFn(this.link) || this.links.some(isActiveCheckFn);\n }\n}\nRouterLinkActive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: RouterLinkActive, deps: [{ token: Router }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: RouterLink, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nRouterLinkActive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.4\", type: RouterLinkActive, isStandalone: true, selector: \"[routerLinkActive]\", inputs: { routerLinkActiveOptions: \"routerLinkActiveOptions\", ariaCurrentWhenActive: \"ariaCurrentWhenActive\", routerLinkActive: \"routerLinkActive\" }, outputs: { isActiveChange: \"isActiveChange\" }, queries: [{ propertyName: \"links\", predicate: RouterLink, descendants: true }], exportAs: [\"routerLinkActive\"], usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: RouterLinkActive, decorators: [{\n type: Directive,\n args: [{\n selector: '[routerLinkActive]',\n exportAs: 'routerLinkActive',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: Router }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: RouterLink, decorators: [{\n type: Optional\n }] }]; }, propDecorators: { links: [{\n type: ContentChildren,\n args: [RouterLink, { descendants: true }]\n }], routerLinkActiveOptions: [{\n type: Input\n }], ariaCurrentWhenActive: [{\n type: Input\n }], isActiveChange: [{\n type: Output\n }], routerLinkActive: [{\n type: Input\n }] } });\n/**\n * Use instead of `'paths' in options` to be compatible with property renaming\n */\nfunction isActiveMatchOptions(options) {\n return !!options.paths;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description\n *\n * Provides a preloading strategy.\n *\n * @publicApi\n */\nclass PreloadingStrategy {\n}\n/**\n * @description\n *\n * Provides a preloading strategy that preloads all modules as quickly as possible.\n *\n * ```\n * RouterModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})\n * ```\n *\n * @publicApi\n */\nclass PreloadAllModules {\n preload(route, fn) {\n return fn().pipe(catchError(() => of(null)));\n }\n}\nPreloadAllModules.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: PreloadAllModules, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nPreloadAllModules.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: PreloadAllModules, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: PreloadAllModules, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n/**\n * @description\n *\n * Provides a preloading strategy that does not preload any modules.\n *\n * This strategy is enabled by default.\n *\n * @publicApi\n */\nclass NoPreloading {\n preload(route, fn) {\n return of(null);\n }\n}\nNoPreloading.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NoPreloading, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNoPreloading.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NoPreloading, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: NoPreloading, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n/**\n * The preloader optimistically loads all router configurations to\n * make navigations into lazily-loaded sections of the application faster.\n *\n * The preloader runs in the background. When the router bootstraps, the preloader\n * starts listening to all navigation events. After every such event, the preloader\n * will check if any configurations can be loaded lazily.\n *\n * If a route is protected by `canLoad` guards, the preloaded will not load it.\n *\n * @publicApi\n */\nclass RouterPreloader {\n constructor(router, compiler, injector, preloadingStrategy, loader) {\n this.router = router;\n this.injector = injector;\n this.preloadingStrategy = preloadingStrategy;\n this.loader = loader;\n }\n setUpPreloading() {\n this.subscription =\n this.router.events\n .pipe(filter((e) => e instanceof NavigationEnd), concatMap(() => this.preload()))\n .subscribe(() => { });\n }\n preload() {\n return this.processRoutes(this.injector, this.router.config);\n }\n /** @nodoc */\n ngOnDestroy() {\n if (this.subscription) {\n this.subscription.unsubscribe();\n }\n }\n processRoutes(injector, routes) {\n const res = [];\n for (const route of routes) {\n if (route.providers && !route._injector) {\n route._injector =\n createEnvironmentInjector(route.providers, injector, `Route: ${route.path}`);\n }\n const injectorForCurrentRoute = route._injector ?? injector;\n const injectorForChildren = route._loadedInjector ?? injectorForCurrentRoute;\n // Note that `canLoad` is only checked as a condition that prevents `loadChildren` and not\n // `loadComponent`. `canLoad` guards only block loading of child routes by design. This\n // happens as a consequence of needing to descend into children for route matching immediately\n // while component loading is deferred until route activation. Because `canLoad` guards can\n // have side effects, we cannot execute them here so we instead skip preloading altogether\n // when present. Lastly, it remains to be decided whether `canLoad` should behave this way\n // at all. Code splitting and lazy loading is separate from client-side authorization checks\n // and should not be used as a security measure to prevent loading of code.\n if ((route.loadChildren && !route._loadedRoutes && route.canLoad === undefined) ||\n (route.loadComponent && !route._loadedComponent)) {\n res.push(this.preloadConfig(injectorForCurrentRoute, route));\n }\n else if (route.children || route._loadedRoutes) {\n res.push(this.processRoutes(injectorForChildren, (route.children ?? route._loadedRoutes)));\n }\n }\n return from(res).pipe(mergeAll());\n }\n preloadConfig(injector, route) {\n return this.preloadingStrategy.preload(route, () => {\n let loadedChildren$;\n if (route.loadChildren && route.canLoad === undefined) {\n loadedChildren$ = this.loader.loadChildren(injector, route);\n }\n else {\n loadedChildren$ = of(null);\n }\n const recursiveLoadChildren$ = loadedChildren$.pipe(mergeMap((config) => {\n if (config === null) {\n return of(void 0);\n }\n route._loadedRoutes = config.routes;\n route._loadedInjector = config.injector;\n // If the loaded config was a module, use that as the module/module injector going\n // forward. Otherwise, continue using the current module/module injector.\n return this.processRoutes(config.injector ?? injector, config.routes);\n }));\n if (route.loadComponent && !route._loadedComponent) {\n const loadComponent$ = this.loader.loadComponent(route);\n return from([recursiveLoadChildren$, loadComponent$]).pipe(mergeAll());\n }\n else {\n return recursiveLoadChildren$;\n }\n });\n }\n}\nRouterPreloader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: RouterPreloader, deps: [{ token: Router }, { token: i0.Compiler }, { token: i0.EnvironmentInjector }, { token: PreloadingStrategy }, { token: RouterConfigLoader }], target: i0.ɵɵFactoryTarget.Injectable });\nRouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: RouterPreloader, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: RouterPreloader, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: Router }, { type: i0.Compiler }, { type: i0.EnvironmentInjector }, { type: PreloadingStrategy }, { type: RouterConfigLoader }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst ROUTER_SCROLLER = new InjectionToken('');\nclass RouterScroller {\n /** @nodoc */\n constructor(urlSerializer, transitions, viewportScroller, zone, options = {}) {\n this.urlSerializer = urlSerializer;\n this.transitions = transitions;\n this.viewportScroller = viewportScroller;\n this.zone = zone;\n this.options = options;\n this.lastId = 0;\n this.lastSource = 'imperative';\n this.restoredId = 0;\n this.store = {};\n // Default both options to 'disabled'\n options.scrollPositionRestoration = options.scrollPositionRestoration || 'disabled';\n options.anchorScrolling = options.anchorScrolling || 'disabled';\n }\n init() {\n // we want to disable the automatic scrolling because having two places\n // responsible for scrolling results race conditions, especially given\n // that browser don't implement this behavior consistently\n if (this.options.scrollPositionRestoration !== 'disabled') {\n this.viewportScroller.setHistoryScrollRestoration('manual');\n }\n this.routerEventsSubscription = this.createScrollEvents();\n this.scrollEventsSubscription = this.consumeScrollEvents();\n }\n createScrollEvents() {\n return this.transitions.events.subscribe(e => {\n if (e instanceof NavigationStart) {\n // store the scroll position of the current stable navigations.\n this.store[this.lastId] = this.viewportScroller.getScrollPosition();\n this.lastSource = e.navigationTrigger;\n this.restoredId = e.restoredState ? e.restoredState.navigationId : 0;\n }\n else if (e instanceof NavigationEnd) {\n this.lastId = e.id;\n this.scheduleScrollEvent(e, this.urlSerializer.parse(e.urlAfterRedirects).fragment);\n }\n });\n }\n consumeScrollEvents() {\n return this.transitions.events.subscribe(e => {\n if (!(e instanceof Scroll))\n return;\n // a popstate event. The pop state event will always ignore anchor scrolling.\n if (e.position) {\n if (this.options.scrollPositionRestoration === 'top') {\n this.viewportScroller.scrollToPosition([0, 0]);\n }\n else if (this.options.scrollPositionRestoration === 'enabled') {\n this.viewportScroller.scrollToPosition(e.position);\n }\n // imperative navigation \"forward\"\n }\n else {\n if (e.anchor && this.options.anchorScrolling === 'enabled') {\n this.viewportScroller.scrollToAnchor(e.anchor);\n }\n else if (this.options.scrollPositionRestoration !== 'disabled') {\n this.viewportScroller.scrollToPosition([0, 0]);\n }\n }\n });\n }\n scheduleScrollEvent(routerEvent, anchor) {\n this.zone.runOutsideAngular(() => {\n // The scroll event needs to be delayed until after change detection. Otherwise, we may\n // attempt to restore the scroll position before the router outlet has fully rendered the\n // component by executing its update block of the template function.\n setTimeout(() => {\n this.zone.run(() => {\n this.transitions.events.next(new Scroll(routerEvent, this.lastSource === 'popstate' ? this.store[this.restoredId] : null, anchor));\n });\n }, 0);\n });\n }\n /** @nodoc */\n ngOnDestroy() {\n this.routerEventsSubscription?.unsubscribe();\n this.scrollEventsSubscription?.unsubscribe();\n }\n}\nRouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: RouterScroller, deps: \"invalid\", target: i0.ɵɵFactoryTarget.Injectable });\nRouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: RouterScroller });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: RouterScroller, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: UrlSerializer }, { type: NavigationTransitions }, { type: i3.ViewportScroller }, { type: i0.NgZone }, { type: undefined }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst NG_DEV_MODE$1 = typeof ngDevMode === 'undefined' || ngDevMode;\n/**\n * Sets up providers necessary to enable `Router` functionality for the application.\n * Allows to configure a set of routes as well as extra features that should be enabled.\n *\n * @usageNotes\n *\n * Basic example of how you can add a Router to your application:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent, {\n * providers: [provideRouter(appRoutes)]\n * });\n * ```\n *\n * You can also enable optional features in the Router by adding functions from the `RouterFeatures`\n * type:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes,\n * withDebugTracing(),\n * withRouterConfig({paramsInheritanceStrategy: 'always'}))\n * ]\n * }\n * );\n * ```\n *\n * @see `RouterFeatures`\n *\n * @publicApi\n * @param routes A set of `Route`s to use for the application routing table.\n * @param features Optional features to configure additional router behaviors.\n * @returns A set of providers to setup a Router.\n */\nfunction provideRouter(routes, ...features) {\n return makeEnvironmentProviders([\n { provide: ROUTES, multi: true, useValue: routes },\n NG_DEV_MODE$1 ? { provide: ROUTER_IS_PROVIDED, useValue: true } : [],\n { provide: ActivatedRoute, useFactory: rootRoute, deps: [Router] },\n { provide: APP_BOOTSTRAP_LISTENER, multi: true, useFactory: getBootstrapListener },\n features.map(feature => feature.ɵproviders),\n ]);\n}\nfunction rootRoute(router) {\n return router.routerState.root;\n}\n/**\n * Helper function to create an object that represents a Router feature.\n */\nfunction routerFeature(kind, providers) {\n return { ɵkind: kind, ɵproviders: providers };\n}\n/**\n * An Injection token used to indicate whether `provideRouter` or `RouterModule.forRoot` was ever\n * called.\n */\nconst ROUTER_IS_PROVIDED = new InjectionToken('', { providedIn: 'root', factory: () => false });\nconst routerIsProvidedDevModeCheck = {\n provide: ENVIRONMENT_INITIALIZER,\n multi: true,\n useFactory() {\n return () => {\n if (!inject(ROUTER_IS_PROVIDED)) {\n console.warn('`provideRoutes` was called without `provideRouter` or `RouterModule.forRoot`. ' +\n 'This is likely a mistake.');\n }\n };\n }\n};\n/**\n * Registers a [DI provider](guide/glossary#provider) for a set of routes.\n * @param routes The route configuration to provide.\n *\n * @usageNotes\n *\n * ```\n * @NgModule({\n * providers: [provideRoutes(ROUTES)]\n * })\n * class LazyLoadedChildModule {}\n * ```\n *\n * @deprecated If necessary, provide routes using the `ROUTES` `InjectionToken`.\n * @see `ROUTES`\n * @publicApi\n */\nfunction provideRoutes(routes) {\n return [\n { provide: ROUTES, multi: true, useValue: routes },\n NG_DEV_MODE$1 ? routerIsProvidedDevModeCheck : [],\n ];\n}\n/**\n * Enables customizable scrolling behavior for router navigations.\n *\n * @usageNotes\n *\n * Basic example of how you can enable scrolling feature:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withInMemoryScrolling())\n * ]\n * }\n * );\n * ```\n *\n * @see `provideRouter`\n * @see `ViewportScroller`\n *\n * @publicApi\n * @param options Set of configuration parameters to customize scrolling behavior, see\n * `InMemoryScrollingOptions` for additional information.\n * @returns A set of providers for use with `provideRouter`.\n */\nfunction withInMemoryScrolling(options = {}) {\n const providers = [{\n provide: ROUTER_SCROLLER,\n useFactory: () => {\n const viewportScroller = inject(ViewportScroller);\n const zone = inject(NgZone);\n const transitions = inject(NavigationTransitions);\n const urlSerializer = inject(UrlSerializer);\n return new RouterScroller(urlSerializer, transitions, viewportScroller, zone, options);\n },\n }];\n return routerFeature(4 /* RouterFeatureKind.InMemoryScrollingFeature */, providers);\n}\nfunction getBootstrapListener() {\n const injector = inject(Injector);\n return (bootstrappedComponentRef) => {\n const ref = injector.get(ApplicationRef);\n if (bootstrappedComponentRef !== ref.components[0]) {\n return;\n }\n const router = injector.get(Router);\n const bootstrapDone = injector.get(BOOTSTRAP_DONE);\n if (injector.get(INITIAL_NAVIGATION) === 1 /* InitialNavigation.EnabledNonBlocking */) {\n router.initialNavigation();\n }\n injector.get(ROUTER_PRELOADER, null, InjectFlags.Optional)?.setUpPreloading();\n injector.get(ROUTER_SCROLLER, null, InjectFlags.Optional)?.init();\n router.resetRootComponentType(ref.componentTypes[0]);\n if (!bootstrapDone.closed) {\n bootstrapDone.next();\n bootstrapDone.unsubscribe();\n }\n };\n}\n/**\n * A subject used to indicate that the bootstrapping phase is done. When initial navigation is\n * `enabledBlocking`, the first navigation waits until bootstrapping is finished before continuing\n * to the activation phase.\n */\nconst BOOTSTRAP_DONE = new InjectionToken(NG_DEV_MODE$1 ? 'bootstrap done indicator' : '', {\n factory: () => {\n return new Subject();\n }\n});\nconst INITIAL_NAVIGATION = new InjectionToken(NG_DEV_MODE$1 ? 'initial navigation' : '', { providedIn: 'root', factory: () => 1 /* InitialNavigation.EnabledNonBlocking */ });\n/**\n * Configures initial navigation to start before the root component is created.\n *\n * The bootstrap is blocked until the initial navigation is complete. This value is required for\n * [server-side rendering](guide/universal) to work.\n *\n * @usageNotes\n *\n * Basic example of how you can enable this navigation behavior:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withEnabledBlockingInitialNavigation())\n * ]\n * }\n * );\n * ```\n *\n * @see `provideRouter`\n *\n * @publicApi\n * @returns A set of providers for use with `provideRouter`.\n */\nfunction withEnabledBlockingInitialNavigation() {\n const providers = [\n { provide: INITIAL_NAVIGATION, useValue: 0 /* InitialNavigation.EnabledBlocking */ },\n {\n provide: APP_INITIALIZER,\n multi: true,\n deps: [Injector],\n useFactory: (injector) => {\n const locationInitialized = injector.get(LOCATION_INITIALIZED, Promise.resolve());\n /**\n * Performs the given action once the router finishes its next/current navigation.\n *\n * If the navigation is canceled or errors without a redirect, the navigation is considered\n * complete. If the `NavigationEnd` event emits, the navigation is also considered complete.\n */\n function afterNextNavigation(action) {\n const router = injector.get(Router);\n router.events\n .pipe(filter((e) => e instanceof NavigationEnd || e instanceof NavigationCancel ||\n e instanceof NavigationError), map(e => {\n if (e instanceof NavigationEnd) {\n // Navigation assumed to succeed if we get `ActivationStart`\n return true;\n }\n const redirecting = e instanceof NavigationCancel ?\n (e.code === 0 /* NavigationCancellationCode.Redirect */ ||\n e.code === 1 /* NavigationCancellationCode.SupersededByNewNavigation */) :\n false;\n return redirecting ? null : false;\n }), filter((result) => result !== null), take(1))\n .subscribe(() => {\n action();\n });\n }\n return () => {\n return locationInitialized.then(() => {\n return new Promise(resolve => {\n const router = injector.get(Router);\n const bootstrapDone = injector.get(BOOTSTRAP_DONE);\n afterNextNavigation(() => {\n // Unblock APP_INITIALIZER in case the initial navigation was canceled or errored\n // without a redirect.\n resolve(true);\n });\n router.afterPreactivation = () => {\n // Unblock APP_INITIALIZER once we get to `afterPreactivation`. At this point, we\n // assume activation will complete successfully (even though this is not\n // guaranteed).\n resolve(true);\n return bootstrapDone.closed ? of(void 0) : bootstrapDone;\n };\n router.initialNavigation();\n });\n });\n };\n }\n },\n ];\n return routerFeature(2 /* RouterFeatureKind.EnabledBlockingInitialNavigationFeature */, providers);\n}\n/**\n * Disables initial navigation.\n *\n * Use if there is a reason to have more control over when the router starts its initial navigation\n * due to some complex initialization logic.\n *\n * @usageNotes\n *\n * Basic example of how you can disable initial navigation:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withDisabledInitialNavigation())\n * ]\n * }\n * );\n * ```\n *\n * @see `provideRouter`\n *\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nfunction withDisabledInitialNavigation() {\n const providers = [\n {\n provide: APP_INITIALIZER,\n multi: true,\n useFactory: () => {\n const router = inject(Router);\n return () => {\n router.setUpLocationChangeListener();\n };\n }\n },\n { provide: INITIAL_NAVIGATION, useValue: 2 /* InitialNavigation.Disabled */ }\n ];\n return routerFeature(3 /* RouterFeatureKind.DisabledInitialNavigationFeature */, providers);\n}\n/**\n * Enables logging of all internal navigation events to the console.\n * Extra logging might be useful for debugging purposes to inspect Router event sequence.\n *\n * @usageNotes\n *\n * Basic example of how you can enable debug tracing:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withDebugTracing())\n * ]\n * }\n * );\n * ```\n *\n * @see `provideRouter`\n *\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nfunction withDebugTracing() {\n let providers = [];\n if (NG_DEV_MODE$1) {\n providers = [{\n provide: ENVIRONMENT_INITIALIZER,\n multi: true,\n useFactory: () => {\n const router = inject(Router);\n return () => router.events.subscribe((e) => {\n // tslint:disable:no-console\n console.group?.(`Router Event: ${e.constructor.name}`);\n console.log(stringifyEvent(e));\n console.log(e);\n console.groupEnd?.();\n // tslint:enable:no-console\n });\n }\n }];\n }\n else {\n providers = [];\n }\n return routerFeature(1 /* RouterFeatureKind.DebugTracingFeature */, providers);\n}\nconst ROUTER_PRELOADER = new InjectionToken(NG_DEV_MODE$1 ? 'router preloader' : '');\n/**\n * Allows to configure a preloading strategy to use. The strategy is configured by providing a\n * reference to a class that implements a `PreloadingStrategy`.\n *\n * @usageNotes\n *\n * Basic example of how you can configure preloading:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withPreloading(PreloadAllModules))\n * ]\n * }\n * );\n * ```\n *\n * @see `provideRouter`\n *\n * @param preloadingStrategy A reference to a class that implements a `PreloadingStrategy` that\n * should be used.\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nfunction withPreloading(preloadingStrategy) {\n const providers = [\n { provide: ROUTER_PRELOADER, useExisting: RouterPreloader },\n { provide: PreloadingStrategy, useExisting: preloadingStrategy },\n ];\n return routerFeature(0 /* RouterFeatureKind.PreloadingFeature */, providers);\n}\n/**\n * Allows to provide extra parameters to configure Router.\n *\n * @usageNotes\n *\n * Basic example of how you can provide extra configuration options:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withRouterConfig({\n * onSameUrlNavigation: 'reload'\n * }))\n * ]\n * }\n * );\n * ```\n *\n * @see `provideRouter`\n *\n * @param options A set of parameters to configure Router, see `RouterConfigOptions` for\n * additional information.\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nfunction withRouterConfig(options) {\n const providers = [\n { provide: ROUTER_CONFIGURATION, useValue: options },\n ];\n return routerFeature(5 /* RouterFeatureKind.RouterConfigurationFeature */, providers);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst NG_DEV_MODE = typeof ngDevMode === 'undefined' || ngDevMode;\n/**\n * The directives defined in the `RouterModule`.\n */\nconst ROUTER_DIRECTIVES = [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent];\n/**\n * @docsNotRequired\n */\nconst ROUTER_FORROOT_GUARD = new InjectionToken(NG_DEV_MODE ? 'router duplicate forRoot guard' : 'ROUTER_FORROOT_GUARD');\n// TODO(atscott): All of these except `ActivatedRoute` are `providedIn: 'root'`. They are only kept\n// here to avoid a breaking change whereby the provider order matters based on where the\n// `RouterModule`/`RouterTestingModule` is imported. These can/should be removed as a \"breaking\"\n// change in a major version.\nconst ROUTER_PROVIDERS = [\n Location,\n { provide: UrlSerializer, useClass: DefaultUrlSerializer },\n Router,\n ChildrenOutletContexts,\n { provide: ActivatedRoute, useFactory: rootRoute, deps: [Router] },\n RouterConfigLoader,\n // Only used to warn when `provideRoutes` is used without `RouterModule` or `provideRouter`. Can\n // be removed when `provideRoutes` is removed.\n NG_DEV_MODE ? { provide: ROUTER_IS_PROVIDED, useValue: true } : [],\n];\nfunction routerNgProbeToken() {\n return new NgProbeToken('Router', Router);\n}\n/**\n * @description\n *\n * Adds directives and providers for in-app navigation among views defined in an application.\n * Use the Angular `Router` service to declaratively specify application states and manage state\n * transitions.\n *\n * You can import this NgModule multiple times, once for each lazy-loaded bundle.\n * However, only one `Router` service can be active.\n * To ensure this, there are two ways to register routes when importing this module:\n *\n * * The `forRoot()` method creates an `NgModule` that contains all the directives, the given\n * routes, and the `Router` service itself.\n * * The `forChild()` method creates an `NgModule` that contains all the directives and the given\n * routes, but does not include the `Router` service.\n *\n * @see [Routing and Navigation guide](guide/router) for an\n * overview of how the `Router` service should be used.\n *\n * @publicApi\n */\nclass RouterModule {\n constructor(guard) { }\n /**\n * Creates and configures a module with all the router providers and directives.\n * Optionally sets up an application listener to perform an initial navigation.\n *\n * When registering the NgModule at the root, import as follows:\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forRoot(ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @param routes An array of `Route` objects that define the navigation paths for the application.\n * @param config An `ExtraOptions` configuration object that controls how navigation is performed.\n * @return The new `NgModule`.\n *\n */\n static forRoot(routes, config) {\n return {\n ngModule: RouterModule,\n providers: [\n ROUTER_PROVIDERS,\n NG_DEV_MODE ? (config?.enableTracing ? withDebugTracing().ɵproviders : []) : [],\n { provide: ROUTES, multi: true, useValue: routes },\n {\n provide: ROUTER_FORROOT_GUARD,\n useFactory: provideForRootGuard,\n deps: [[Router, new Optional(), new SkipSelf()]]\n },\n { provide: ROUTER_CONFIGURATION, useValue: config ? config : {} },\n config?.useHash ? provideHashLocationStrategy() : providePathLocationStrategy(),\n provideRouterScroller(),\n config?.preloadingStrategy ? withPreloading(config.preloadingStrategy).ɵproviders : [],\n { provide: NgProbeToken, multi: true, useFactory: routerNgProbeToken },\n config?.initialNavigation ? provideInitialNavigation(config) : [],\n provideRouterInitializer(),\n ],\n };\n }\n /**\n * Creates a module with all the router directives and a provider registering routes,\n * without creating a new Router service.\n * When registering for submodules and lazy-loaded submodules, create the NgModule as follows:\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forChild(ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @param routes An array of `Route` objects that define the navigation paths for the submodule.\n * @return The new NgModule.\n *\n */\n static forChild(routes) {\n return {\n ngModule: RouterModule,\n providers: [{ provide: ROUTES, multi: true, useValue: routes }],\n };\n }\n}\nRouterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: RouterModule, deps: [{ token: ROUTER_FORROOT_GUARD, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });\nRouterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.0.4\", ngImport: i0, type: RouterModule, imports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent] });\nRouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: RouterModule, imports: [ɵEmptyOutletComponent] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: RouterModule, decorators: [{\n type: NgModule,\n args: [{\n imports: ROUTER_DIRECTIVES,\n exports: ROUTER_DIRECTIVES,\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ROUTER_FORROOT_GUARD]\n }] }]; } });\n/**\n * For internal use by `RouterModule` only. Note that this differs from `withInMemoryRouterScroller`\n * because it reads from the `ExtraOptions` which should not be used in the standalone world.\n */\nfunction provideRouterScroller() {\n return {\n provide: ROUTER_SCROLLER,\n useFactory: () => {\n const viewportScroller = inject(ViewportScroller);\n const zone = inject(NgZone);\n const config = inject(ROUTER_CONFIGURATION);\n const transitions = inject(NavigationTransitions);\n const urlSerializer = inject(UrlSerializer);\n if (config.scrollOffset) {\n viewportScroller.setOffset(config.scrollOffset);\n }\n return new RouterScroller(urlSerializer, transitions, viewportScroller, zone, config);\n },\n };\n}\n// Note: For internal use only with `RouterModule`. Standalone setup via `provideRouter` should\n// provide hash location directly via `{provide: LocationStrategy, useClass: HashLocationStrategy}`.\nfunction provideHashLocationStrategy() {\n return { provide: LocationStrategy, useClass: HashLocationStrategy };\n}\n// Note: For internal use only with `RouterModule`. Standalone setup via `provideRouter` does not\n// need this at all because `PathLocationStrategy` is the default factory for `LocationStrategy`.\nfunction providePathLocationStrategy() {\n return { provide: LocationStrategy, useClass: PathLocationStrategy };\n}\nfunction provideForRootGuard(router) {\n if (NG_DEV_MODE && router) {\n throw new ɵRuntimeError(4007 /* RuntimeErrorCode.FOR_ROOT_CALLED_TWICE */, `The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector.` +\n ` Lazy loaded modules should use RouterModule.forChild() instead.`);\n }\n return 'guarded';\n}\n// Note: For internal use only with `RouterModule`. Standalone router setup with `provideRouter`\n// users call `withXInitialNavigation` directly.\nfunction provideInitialNavigation(config) {\n return [\n config.initialNavigation === 'disabled' ? withDisabledInitialNavigation().ɵproviders : [],\n config.initialNavigation === 'enabledBlocking' ?\n withEnabledBlockingInitialNavigation().ɵproviders :\n [],\n ];\n}\n// TODO(atscott): This should not be in the public API\n/**\n * A [DI token](guide/glossary/#di-token) for the router initializer that\n * is called after the app is bootstrapped.\n *\n * @publicApi\n */\nconst ROUTER_INITIALIZER = new InjectionToken(NG_DEV_MODE ? 'Router Initializer' : '');\nfunction provideRouterInitializer() {\n return [\n // ROUTER_INITIALIZER token should be removed. It's public API but shouldn't be. We can just\n // have `getBootstrapListener` directly attached to APP_BOOTSTRAP_LISTENER.\n { provide: ROUTER_INITIALIZER, useFactory: getBootstrapListener },\n { provide: APP_BOOTSTRAP_LISTENER, multi: true, useExisting: ROUTER_INITIALIZER },\n ];\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @publicApi\n */\nconst VERSION = new Version('15.0.4');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { ActivatedRoute, ActivatedRouteSnapshot, ActivationEnd, ActivationStart, BaseRouteReuseStrategy, ChildActivationEnd, ChildActivationStart, ChildrenOutletContexts, DefaultTitleStrategy, DefaultUrlSerializer, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, NoPreloading, OutletContext, PRIMARY_OUTLET, PreloadAllModules, PreloadingStrategy, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, ROUTES, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouteReuseStrategy, Router, RouterEvent, RouterLink, RouterLinkActive, RouterLink as RouterLinkWithHref, RouterModule, RouterOutlet, RouterPreloader, RouterState, RouterStateSnapshot, RoutesRecognized, Scroll, TitleStrategy, UrlHandlingStrategy, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree, VERSION, convertToParamMap, createUrlTreeFromSnapshot, defaultUrlMatcher, provideRouter, provideRoutes, withDebugTracing, withDisabledInitialNavigation, withEnabledBlockingInitialNavigation, withInMemoryScrolling, withPreloading, withRouterConfig, ɵEmptyOutletComponent, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS, flatten as ɵflatten, withPreloading as ɵwithPreloading };\n","//! moment.js locale configuration\n//! locale : Turkmen [tk]\n//! author : Atamyrat Abdyrahmanov : https://github.com/atamyratabdy\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var suffixes = {\n 1: \"'inji\",\n 5: \"'inji\",\n 8: \"'inji\",\n 70: \"'inji\",\n 80: \"'inji\",\n 2: \"'nji\",\n 7: \"'nji\",\n 20: \"'nji\",\n 50: \"'nji\",\n 3: \"'ünji\",\n 4: \"'ünji\",\n 100: \"'ünji\",\n 6: \"'njy\",\n 9: \"'unjy\",\n 10: \"'unjy\",\n 30: \"'unjy\",\n 60: \"'ynjy\",\n 90: \"'ynjy\",\n };\n\n var tk = moment.defineLocale('tk', {\n months: 'Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr'.split(\n '_'\n ),\n monthsShort: 'Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek'.split('_'),\n weekdays: 'Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe'.split(\n '_'\n ),\n weekdaysShort: 'Ýek_Duş_Siş_Çar_Pen_Ann_Şen'.split('_'),\n weekdaysMin: 'Ýk_Dş_Sş_Çr_Pn_An_Şn'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[bugün sagat] LT',\n nextDay: '[ertir sagat] LT',\n nextWeek: '[indiki] dddd [sagat] LT',\n lastDay: '[düýn] LT',\n lastWeek: '[geçen] dddd [sagat] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s soň',\n past: '%s öň',\n s: 'birnäçe sekunt',\n m: 'bir minut',\n mm: '%d minut',\n h: 'bir sagat',\n hh: '%d sagat',\n d: 'bir gün',\n dd: '%d gün',\n M: 'bir aý',\n MM: '%d aý',\n y: 'bir ýyl',\n yy: '%d ýyl',\n },\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'Do':\n case 'DD':\n return number;\n default:\n if (number === 0) {\n // special case for zero\n return number + \"'unjy\";\n }\n var a = number % 10,\n b = (number % 100) - a,\n c = number >= 100 ? 100 : null;\n return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return tk;\n\n})));\n","//! moment.js locale configuration\n//! locale : Latvian [lv]\n//! author : Kristaps Karlsons : https://github.com/skakri\n//! author : Jānis Elmeris : https://github.com/JanisE\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var units = {\n ss: 'sekundes_sekundēm_sekunde_sekundes'.split('_'),\n m: 'minūtes_minūtēm_minūte_minūtes'.split('_'),\n mm: 'minūtes_minūtēm_minūte_minūtes'.split('_'),\n h: 'stundas_stundām_stunda_stundas'.split('_'),\n hh: 'stundas_stundām_stunda_stundas'.split('_'),\n d: 'dienas_dienām_diena_dienas'.split('_'),\n dd: 'dienas_dienām_diena_dienas'.split('_'),\n M: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),\n MM: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),\n y: 'gada_gadiem_gads_gadi'.split('_'),\n yy: 'gada_gadiem_gads_gadi'.split('_'),\n };\n /**\n * @param withoutSuffix boolean true = a length of time; false = before/after a period of time.\n */\n function format(forms, number, withoutSuffix) {\n if (withoutSuffix) {\n // E.g. \"21 minūte\", \"3 minūtes\".\n return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3];\n } else {\n // E.g. \"21 minūtes\" as in \"pēc 21 minūtes\".\n // E.g. \"3 minūtēm\" as in \"pēc 3 minūtēm\".\n return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1];\n }\n }\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n return number + ' ' + format(units[key], number, withoutSuffix);\n }\n function relativeTimeWithSingular(number, withoutSuffix, key) {\n return format(units[key], number, withoutSuffix);\n }\n function relativeSeconds(number, withoutSuffix) {\n return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';\n }\n\n var lv = moment.defineLocale('lv', {\n months: 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split(\n '_'\n ),\n monthsShort: 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),\n weekdays:\n 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split(\n '_'\n ),\n weekdaysShort: 'Sv_P_O_T_C_Pk_S'.split('_'),\n weekdaysMin: 'Sv_P_O_T_C_Pk_S'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY.',\n LL: 'YYYY. [gada] D. MMMM',\n LLL: 'YYYY. [gada] D. MMMM, HH:mm',\n LLLL: 'YYYY. [gada] D. MMMM, dddd, HH:mm',\n },\n calendar: {\n sameDay: '[Šodien pulksten] LT',\n nextDay: '[Rīt pulksten] LT',\n nextWeek: 'dddd [pulksten] LT',\n lastDay: '[Vakar pulksten] LT',\n lastWeek: '[Pagājušā] dddd [pulksten] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'pēc %s',\n past: 'pirms %s',\n s: relativeSeconds,\n ss: relativeTimeWithPlural,\n m: relativeTimeWithSingular,\n mm: relativeTimeWithPlural,\n h: relativeTimeWithSingular,\n hh: relativeTimeWithPlural,\n d: relativeTimeWithSingular,\n dd: relativeTimeWithPlural,\n M: relativeTimeWithSingular,\n MM: relativeTimeWithPlural,\n y: relativeTimeWithSingular,\n yy: relativeTimeWithPlural,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return lv;\n\n})));\n","import { _getProvider, getApp, _registerComponent, registerVersion } from '@firebase/app';\nimport { Component } from '@firebase/component';\nimport { ErrorFactory, FirebaseError } from '@firebase/util';\nimport { openDB } from 'idb';\n\nconst name = \"@firebase/installations\";\nconst version = \"0.6.12\";\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 */\nconst PENDING_TIMEOUT_MS = 10000;\nconst PACKAGE_VERSION = `w:${version}`;\nconst INTERNAL_AUTH_VERSION = 'FIS_v2';\nconst INSTALLATIONS_API_URL = 'https://firebaseinstallations.googleapis.com/v1';\nconst TOKEN_EXPIRATION_BUFFER = 60 * 60 * 1000; // One hour\nconst SERVICE = 'installations';\nconst SERVICE_NAME = 'Installations';\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 */\nconst ERROR_DESCRIPTION_MAP = {\n [\"missing-app-config-values\" /* ErrorCode.MISSING_APP_CONFIG_VALUES */]: 'Missing App configuration value: \"{$valueName}\"',\n [\"not-registered\" /* ErrorCode.NOT_REGISTERED */]: 'Firebase Installation is not registered.',\n [\"installation-not-found\" /* ErrorCode.INSTALLATION_NOT_FOUND */]: 'Firebase Installation not found.',\n [\"request-failed\" /* ErrorCode.REQUEST_FAILED */]: '{$requestName} request failed with error \"{$serverCode} {$serverStatus}: {$serverMessage}\"',\n [\"app-offline\" /* ErrorCode.APP_OFFLINE */]: 'Could not process request. Application offline.',\n [\"delete-pending-registration\" /* ErrorCode.DELETE_PENDING_REGISTRATION */]: \"Can't delete installation while there is a pending registration request.\"\n};\nconst ERROR_FACTORY = new ErrorFactory(SERVICE, SERVICE_NAME, ERROR_DESCRIPTION_MAP);\n/** Returns true if error is a FirebaseError that is based on an error from the server. */\nfunction isServerError(error) {\n return (error instanceof FirebaseError &&\n error.code.includes(\"request-failed\" /* ErrorCode.REQUEST_FAILED */));\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 */\nfunction getInstallationsEndpoint({ projectId }) {\n return `${INSTALLATIONS_API_URL}/projects/${projectId}/installations`;\n}\nfunction extractAuthTokenInfoFromResponse(response) {\n return {\n token: response.token,\n requestStatus: 2 /* RequestStatus.COMPLETED */,\n expiresIn: getExpiresInFromResponseExpiresIn(response.expiresIn),\n creationTime: Date.now()\n };\n}\nasync function getErrorFromResponse(requestName, response) {\n const responseJson = await response.json();\n const errorData = responseJson.error;\n return ERROR_FACTORY.create(\"request-failed\" /* ErrorCode.REQUEST_FAILED */, {\n requestName,\n serverCode: errorData.code,\n serverMessage: errorData.message,\n serverStatus: errorData.status\n });\n}\nfunction getHeaders({ apiKey }) {\n return new Headers({\n 'Content-Type': 'application/json',\n Accept: 'application/json',\n 'x-goog-api-key': apiKey\n });\n}\nfunction getHeadersWithAuth(appConfig, { refreshToken }) {\n const headers = getHeaders(appConfig);\n headers.append('Authorization', getAuthorizationHeader(refreshToken));\n return headers;\n}\n/**\n * Calls the passed in fetch wrapper and returns the response.\n * If the returned response has a status of 5xx, re-runs the function once and\n * returns the response.\n */\nasync function retryIfServerError(fn) {\n const result = await fn();\n if (result.status >= 500 && result.status < 600) {\n // Internal Server Error. Retry request.\n return fn();\n }\n return result;\n}\nfunction getExpiresInFromResponseExpiresIn(responseExpiresIn) {\n // This works because the server will never respond with fractions of a second.\n return Number(responseExpiresIn.replace('s', '000'));\n}\nfunction getAuthorizationHeader(refreshToken) {\n return `${INTERNAL_AUTH_VERSION} ${refreshToken}`;\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 */\nasync function createInstallationRequest({ appConfig, heartbeatServiceProvider }, { fid }) {\n const endpoint = getInstallationsEndpoint(appConfig);\n const headers = getHeaders(appConfig);\n // If heartbeat service exists, add the heartbeat string to the header.\n const heartbeatService = heartbeatServiceProvider.getImmediate({\n optional: true\n });\n if (heartbeatService) {\n const heartbeatsHeader = await heartbeatService.getHeartbeatsHeader();\n if (heartbeatsHeader) {\n headers.append('x-firebase-client', heartbeatsHeader);\n }\n }\n const body = {\n fid,\n authVersion: INTERNAL_AUTH_VERSION,\n appId: appConfig.appId,\n sdkVersion: PACKAGE_VERSION\n };\n const request = {\n method: 'POST',\n headers,\n body: JSON.stringify(body)\n };\n const response = await retryIfServerError(() => fetch(endpoint, request));\n if (response.ok) {\n const responseValue = await response.json();\n const registeredInstallationEntry = {\n fid: responseValue.fid || fid,\n registrationStatus: 2 /* RequestStatus.COMPLETED */,\n refreshToken: responseValue.refreshToken,\n authToken: extractAuthTokenInfoFromResponse(responseValue.authToken)\n };\n return registeredInstallationEntry;\n }\n else {\n throw await getErrorFromResponse('Create Installation', response);\n }\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\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/** Returns a promise that resolves after given time passes. */\nfunction sleep(ms) {\n return new Promise(resolve => {\n setTimeout(resolve, ms);\n });\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 */\nfunction bufferToBase64UrlSafe(array) {\n const b64 = btoa(String.fromCharCode(...array));\n return b64.replace(/\\+/g, '-').replace(/\\//g, '_');\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 */\nconst VALID_FID_PATTERN = /^[cdef][\\w-]{21}$/;\nconst INVALID_FID = '';\n/**\n * Generates a new FID using random values from Web Crypto API.\n * Returns an empty string if FID generation fails for any reason.\n */\nfunction generateFid() {\n try {\n // A valid FID has exactly 22 base64 characters, which is 132 bits, or 16.5\n // bytes. our implementation generates a 17 byte array instead.\n const fidByteArray = new Uint8Array(17);\n const crypto = self.crypto || self.msCrypto;\n crypto.getRandomValues(fidByteArray);\n // Replace the first 4 random bits with the constant FID header of 0b0111.\n fidByteArray[0] = 0b01110000 + (fidByteArray[0] % 0b00010000);\n const fid = encode(fidByteArray);\n return VALID_FID_PATTERN.test(fid) ? fid : INVALID_FID;\n }\n catch (_a) {\n // FID generation errored\n return INVALID_FID;\n }\n}\n/** Converts a FID Uint8Array to a base64 string representation. */\nfunction encode(fidByteArray) {\n const b64String = bufferToBase64UrlSafe(fidByteArray);\n // Remove the 23rd character that was added because of the extra 4 bits at the\n // end of our 17 byte array, and the '=' padding.\n return b64String.substr(0, 22);\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\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/** Returns a string key that can be used to identify the app. */\nfunction getKey(appConfig) {\n return `${appConfig.appName}!${appConfig.appId}`;\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 */\nconst fidChangeCallbacks = new Map();\n/**\n * Calls the onIdChange callbacks with the new FID value, and broadcasts the\n * change to other tabs.\n */\nfunction fidChanged(appConfig, fid) {\n const key = getKey(appConfig);\n callFidChangeCallbacks(key, fid);\n broadcastFidChange(key, fid);\n}\nfunction addCallback(appConfig, callback) {\n // Open the broadcast channel if it's not already open,\n // to be able to listen to change events from other tabs.\n getBroadcastChannel();\n const key = getKey(appConfig);\n let callbackSet = fidChangeCallbacks.get(key);\n if (!callbackSet) {\n callbackSet = new Set();\n fidChangeCallbacks.set(key, callbackSet);\n }\n callbackSet.add(callback);\n}\nfunction removeCallback(appConfig, callback) {\n const key = getKey(appConfig);\n const callbackSet = fidChangeCallbacks.get(key);\n if (!callbackSet) {\n return;\n }\n callbackSet.delete(callback);\n if (callbackSet.size === 0) {\n fidChangeCallbacks.delete(key);\n }\n // Close broadcast channel if there are no more callbacks.\n closeBroadcastChannel();\n}\nfunction callFidChangeCallbacks(key, fid) {\n const callbacks = fidChangeCallbacks.get(key);\n if (!callbacks) {\n return;\n }\n for (const callback of callbacks) {\n callback(fid);\n }\n}\nfunction broadcastFidChange(key, fid) {\n const channel = getBroadcastChannel();\n if (channel) {\n channel.postMessage({ key, fid });\n }\n closeBroadcastChannel();\n}\nlet broadcastChannel = null;\n/** Opens and returns a BroadcastChannel if it is supported by the browser. */\nfunction getBroadcastChannel() {\n if (!broadcastChannel && 'BroadcastChannel' in self) {\n broadcastChannel = new BroadcastChannel('[Firebase] FID Change');\n broadcastChannel.onmessage = e => {\n callFidChangeCallbacks(e.data.key, e.data.fid);\n };\n }\n return broadcastChannel;\n}\nfunction closeBroadcastChannel() {\n if (fidChangeCallbacks.size === 0 && broadcastChannel) {\n broadcastChannel.close();\n broadcastChannel = null;\n }\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 */\nconst DATABASE_NAME = 'firebase-installations-database';\nconst DATABASE_VERSION = 1;\nconst OBJECT_STORE_NAME = 'firebase-installations-store';\nlet dbPromise = null;\nfunction getDbPromise() {\n if (!dbPromise) {\n dbPromise = openDB(DATABASE_NAME, DATABASE_VERSION, {\n upgrade: (db, oldVersion) => {\n // We don't use 'break' in this switch statement, the fall-through\n // behavior is what we want, because if there are multiple versions between\n // the old version and the current version, we want ALL the migrations\n // that correspond to those versions to run, not only the last one.\n // eslint-disable-next-line default-case\n switch (oldVersion) {\n case 0:\n db.createObjectStore(OBJECT_STORE_NAME);\n }\n }\n });\n }\n return dbPromise;\n}\n/** Assigns or overwrites the record for the given key with the given value. */\nasync function set(appConfig, value) {\n const key = getKey(appConfig);\n const db = await getDbPromise();\n const tx = db.transaction(OBJECT_STORE_NAME, 'readwrite');\n const objectStore = tx.objectStore(OBJECT_STORE_NAME);\n const oldValue = (await objectStore.get(key));\n await objectStore.put(value, key);\n await tx.done;\n if (!oldValue || oldValue.fid !== value.fid) {\n fidChanged(appConfig, value.fid);\n }\n return value;\n}\n/** Removes record(s) from the objectStore that match the given key. */\nasync function remove(appConfig) {\n const key = getKey(appConfig);\n const db = await getDbPromise();\n const tx = db.transaction(OBJECT_STORE_NAME, 'readwrite');\n await tx.objectStore(OBJECT_STORE_NAME).delete(key);\n await tx.done;\n}\n/**\n * Atomically updates a record with the result of updateFn, which gets\n * called with the current value. If newValue is undefined, the record is\n * deleted instead.\n * @return Updated value\n */\nasync function update(appConfig, updateFn) {\n const key = getKey(appConfig);\n const db = await getDbPromise();\n const tx = db.transaction(OBJECT_STORE_NAME, 'readwrite');\n const store = tx.objectStore(OBJECT_STORE_NAME);\n const oldValue = (await store.get(key));\n const newValue = updateFn(oldValue);\n if (newValue === undefined) {\n await store.delete(key);\n }\n else {\n await store.put(newValue, key);\n }\n await tx.done;\n if (newValue && (!oldValue || oldValue.fid !== newValue.fid)) {\n fidChanged(appConfig, newValue.fid);\n }\n return newValue;\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 * Updates and returns the InstallationEntry from the database.\n * Also triggers a registration request if it is necessary and possible.\n */\nasync function getInstallationEntry(installations) {\n let registrationPromise;\n const installationEntry = await update(installations.appConfig, oldEntry => {\n const installationEntry = updateOrCreateInstallationEntry(oldEntry);\n const entryWithPromise = triggerRegistrationIfNecessary(installations, installationEntry);\n registrationPromise = entryWithPromise.registrationPromise;\n return entryWithPromise.installationEntry;\n });\n if (installationEntry.fid === INVALID_FID) {\n // FID generation failed. Waiting for the FID from the server.\n return { installationEntry: await registrationPromise };\n }\n return {\n installationEntry,\n registrationPromise\n };\n}\n/**\n * Creates a new Installation Entry if one does not exist.\n * Also clears timed out pending requests.\n */\nfunction updateOrCreateInstallationEntry(oldEntry) {\n const entry = oldEntry || {\n fid: generateFid(),\n registrationStatus: 0 /* RequestStatus.NOT_STARTED */\n };\n return clearTimedOutRequest(entry);\n}\n/**\n * If the Firebase Installation is not registered yet, this will trigger the\n * registration and return an InProgressInstallationEntry.\n *\n * If registrationPromise does not exist, the installationEntry is guaranteed\n * to be registered.\n */\nfunction triggerRegistrationIfNecessary(installations, installationEntry) {\n if (installationEntry.registrationStatus === 0 /* RequestStatus.NOT_STARTED */) {\n if (!navigator.onLine) {\n // Registration required but app is offline.\n const registrationPromiseWithError = Promise.reject(ERROR_FACTORY.create(\"app-offline\" /* ErrorCode.APP_OFFLINE */));\n return {\n installationEntry,\n registrationPromise: registrationPromiseWithError\n };\n }\n // Try registering. Change status to IN_PROGRESS.\n const inProgressEntry = {\n fid: installationEntry.fid,\n registrationStatus: 1 /* RequestStatus.IN_PROGRESS */,\n registrationTime: Date.now()\n };\n const registrationPromise = registerInstallation(installations, inProgressEntry);\n return { installationEntry: inProgressEntry, registrationPromise };\n }\n else if (installationEntry.registrationStatus === 1 /* RequestStatus.IN_PROGRESS */) {\n return {\n installationEntry,\n registrationPromise: waitUntilFidRegistration(installations)\n };\n }\n else {\n return { installationEntry };\n }\n}\n/** This will be executed only once for each new Firebase Installation. */\nasync function registerInstallation(installations, installationEntry) {\n try {\n const registeredInstallationEntry = await createInstallationRequest(installations, installationEntry);\n return set(installations.appConfig, registeredInstallationEntry);\n }\n catch (e) {\n if (isServerError(e) && e.customData.serverCode === 409) {\n // Server returned a \"FID cannot be used\" error.\n // Generate a new ID next time.\n await remove(installations.appConfig);\n }\n else {\n // Registration failed. Set FID as not registered.\n await set(installations.appConfig, {\n fid: installationEntry.fid,\n registrationStatus: 0 /* RequestStatus.NOT_STARTED */\n });\n }\n throw e;\n }\n}\n/** Call if FID registration is pending in another request. */\nasync function waitUntilFidRegistration(installations) {\n // Unfortunately, there is no way of reliably observing when a value in\n // IndexedDB changes (yet, see https://github.com/WICG/indexed-db-observers),\n // so we need to poll.\n let entry = await updateInstallationRequest(installations.appConfig);\n while (entry.registrationStatus === 1 /* RequestStatus.IN_PROGRESS */) {\n // createInstallation request still in progress.\n await sleep(100);\n entry = await updateInstallationRequest(installations.appConfig);\n }\n if (entry.registrationStatus === 0 /* RequestStatus.NOT_STARTED */) {\n // The request timed out or failed in a different call. Try again.\n const { installationEntry, registrationPromise } = await getInstallationEntry(installations);\n if (registrationPromise) {\n return registrationPromise;\n }\n else {\n // if there is no registrationPromise, entry is registered.\n return installationEntry;\n }\n }\n return entry;\n}\n/**\n * Called only if there is a CreateInstallation request in progress.\n *\n * Updates the InstallationEntry in the DB based on the status of the\n * CreateInstallation request.\n *\n * Returns the updated InstallationEntry.\n */\nfunction updateInstallationRequest(appConfig) {\n return update(appConfig, oldEntry => {\n if (!oldEntry) {\n throw ERROR_FACTORY.create(\"installation-not-found\" /* ErrorCode.INSTALLATION_NOT_FOUND */);\n }\n return clearTimedOutRequest(oldEntry);\n });\n}\nfunction clearTimedOutRequest(entry) {\n if (hasInstallationRequestTimedOut(entry)) {\n return {\n fid: entry.fid,\n registrationStatus: 0 /* RequestStatus.NOT_STARTED */\n };\n }\n return entry;\n}\nfunction hasInstallationRequestTimedOut(installationEntry) {\n return (installationEntry.registrationStatus === 1 /* RequestStatus.IN_PROGRESS */ &&\n installationEntry.registrationTime + PENDING_TIMEOUT_MS < Date.now());\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 */\nasync function generateAuthTokenRequest({ appConfig, heartbeatServiceProvider }, installationEntry) {\n const endpoint = getGenerateAuthTokenEndpoint(appConfig, installationEntry);\n const headers = getHeadersWithAuth(appConfig, installationEntry);\n // If heartbeat service exists, add the heartbeat string to the header.\n const heartbeatService = heartbeatServiceProvider.getImmediate({\n optional: true\n });\n if (heartbeatService) {\n const heartbeatsHeader = await heartbeatService.getHeartbeatsHeader();\n if (heartbeatsHeader) {\n headers.append('x-firebase-client', heartbeatsHeader);\n }\n }\n const body = {\n installation: {\n sdkVersion: PACKAGE_VERSION,\n appId: appConfig.appId\n }\n };\n const request = {\n method: 'POST',\n headers,\n body: JSON.stringify(body)\n };\n const response = await retryIfServerError(() => fetch(endpoint, request));\n if (response.ok) {\n const responseValue = await response.json();\n const completedAuthToken = extractAuthTokenInfoFromResponse(responseValue);\n return completedAuthToken;\n }\n else {\n throw await getErrorFromResponse('Generate Auth Token', response);\n }\n}\nfunction getGenerateAuthTokenEndpoint(appConfig, { fid }) {\n return `${getInstallationsEndpoint(appConfig)}/${fid}/authTokens:generate`;\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 * Returns a valid authentication token for the installation. Generates a new\n * token if one doesn't exist, is expired or about to expire.\n *\n * Should only be called if the Firebase Installation is registered.\n */\nasync function refreshAuthToken(installations, forceRefresh = false) {\n let tokenPromise;\n const entry = await update(installations.appConfig, oldEntry => {\n if (!isEntryRegistered(oldEntry)) {\n throw ERROR_FACTORY.create(\"not-registered\" /* ErrorCode.NOT_REGISTERED */);\n }\n const oldAuthToken = oldEntry.authToken;\n if (!forceRefresh && isAuthTokenValid(oldAuthToken)) {\n // There is a valid token in the DB.\n return oldEntry;\n }\n else if (oldAuthToken.requestStatus === 1 /* RequestStatus.IN_PROGRESS */) {\n // There already is a token request in progress.\n tokenPromise = waitUntilAuthTokenRequest(installations, forceRefresh);\n return oldEntry;\n }\n else {\n // No token or token expired.\n if (!navigator.onLine) {\n throw ERROR_FACTORY.create(\"app-offline\" /* ErrorCode.APP_OFFLINE */);\n }\n const inProgressEntry = makeAuthTokenRequestInProgressEntry(oldEntry);\n tokenPromise = fetchAuthTokenFromServer(installations, inProgressEntry);\n return inProgressEntry;\n }\n });\n const authToken = tokenPromise\n ? await tokenPromise\n : entry.authToken;\n return authToken;\n}\n/**\n * Call only if FID is registered and Auth Token request is in progress.\n *\n * Waits until the current pending request finishes. If the request times out,\n * tries once in this thread as well.\n */\nasync function waitUntilAuthTokenRequest(installations, forceRefresh) {\n // Unfortunately, there is no way of reliably observing when a value in\n // IndexedDB changes (yet, see https://github.com/WICG/indexed-db-observers),\n // so we need to poll.\n let entry = await updateAuthTokenRequest(installations.appConfig);\n while (entry.authToken.requestStatus === 1 /* RequestStatus.IN_PROGRESS */) {\n // generateAuthToken still in progress.\n await sleep(100);\n entry = await updateAuthTokenRequest(installations.appConfig);\n }\n const authToken = entry.authToken;\n if (authToken.requestStatus === 0 /* RequestStatus.NOT_STARTED */) {\n // The request timed out or failed in a different call. Try again.\n return refreshAuthToken(installations, forceRefresh);\n }\n else {\n return authToken;\n }\n}\n/**\n * Called only if there is a GenerateAuthToken request in progress.\n *\n * Updates the InstallationEntry in the DB based on the status of the\n * GenerateAuthToken request.\n *\n * Returns the updated InstallationEntry.\n */\nfunction updateAuthTokenRequest(appConfig) {\n return update(appConfig, oldEntry => {\n if (!isEntryRegistered(oldEntry)) {\n throw ERROR_FACTORY.create(\"not-registered\" /* ErrorCode.NOT_REGISTERED */);\n }\n const oldAuthToken = oldEntry.authToken;\n if (hasAuthTokenRequestTimedOut(oldAuthToken)) {\n return Object.assign(Object.assign({}, oldEntry), { authToken: { requestStatus: 0 /* RequestStatus.NOT_STARTED */ } });\n }\n return oldEntry;\n });\n}\nasync function fetchAuthTokenFromServer(installations, installationEntry) {\n try {\n const authToken = await generateAuthTokenRequest(installations, installationEntry);\n const updatedInstallationEntry = Object.assign(Object.assign({}, installationEntry), { authToken });\n await set(installations.appConfig, updatedInstallationEntry);\n return authToken;\n }\n catch (e) {\n if (isServerError(e) &&\n (e.customData.serverCode === 401 || e.customData.serverCode === 404)) {\n // Server returned a \"FID not found\" or a \"Invalid authentication\" error.\n // Generate a new ID next time.\n await remove(installations.appConfig);\n }\n else {\n const updatedInstallationEntry = Object.assign(Object.assign({}, installationEntry), { authToken: { requestStatus: 0 /* RequestStatus.NOT_STARTED */ } });\n await set(installations.appConfig, updatedInstallationEntry);\n }\n throw e;\n }\n}\nfunction isEntryRegistered(installationEntry) {\n return (installationEntry !== undefined &&\n installationEntry.registrationStatus === 2 /* RequestStatus.COMPLETED */);\n}\nfunction isAuthTokenValid(authToken) {\n return (authToken.requestStatus === 2 /* RequestStatus.COMPLETED */ &&\n !isAuthTokenExpired(authToken));\n}\nfunction isAuthTokenExpired(authToken) {\n const now = Date.now();\n return (now < authToken.creationTime ||\n authToken.creationTime + authToken.expiresIn < now + TOKEN_EXPIRATION_BUFFER);\n}\n/** Returns an updated InstallationEntry with an InProgressAuthToken. */\nfunction makeAuthTokenRequestInProgressEntry(oldEntry) {\n const inProgressAuthToken = {\n requestStatus: 1 /* RequestStatus.IN_PROGRESS */,\n requestTime: Date.now()\n };\n return Object.assign(Object.assign({}, oldEntry), { authToken: inProgressAuthToken });\n}\nfunction hasAuthTokenRequestTimedOut(authToken) {\n return (authToken.requestStatus === 1 /* RequestStatus.IN_PROGRESS */ &&\n authToken.requestTime + PENDING_TIMEOUT_MS < Date.now());\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 * Creates a Firebase Installation if there isn't one for the app and\n * returns the Installation ID.\n * @param installations - The `Installations` instance.\n *\n * @public\n */\nasync function getId(installations) {\n const installationsImpl = installations;\n const { installationEntry, registrationPromise } = await getInstallationEntry(installationsImpl);\n if (registrationPromise) {\n registrationPromise.catch(console.error);\n }\n else {\n // If the installation is already registered, update the authentication\n // token if needed.\n refreshAuthToken(installationsImpl).catch(console.error);\n }\n return installationEntry.fid;\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 * Returns a Firebase Installations auth token, identifying the current\n * Firebase Installation.\n * @param installations - The `Installations` instance.\n * @param forceRefresh - Force refresh regardless of token expiration.\n *\n * @public\n */\nasync function getToken(installations, forceRefresh = false) {\n const installationsImpl = installations;\n await completeInstallationRegistration(installationsImpl);\n // At this point we either have a Registered Installation in the DB, or we've\n // already thrown an error.\n const authToken = await refreshAuthToken(installationsImpl, forceRefresh);\n return authToken.token;\n}\nasync function completeInstallationRegistration(installations) {\n const { registrationPromise } = await getInstallationEntry(installations);\n if (registrationPromise) {\n // A createInstallation request is in progress. Wait until it finishes.\n await registrationPromise;\n }\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 */\nasync function deleteInstallationRequest(appConfig, installationEntry) {\n const endpoint = getDeleteEndpoint(appConfig, installationEntry);\n const headers = getHeadersWithAuth(appConfig, installationEntry);\n const request = {\n method: 'DELETE',\n headers\n };\n const response = await retryIfServerError(() => fetch(endpoint, request));\n if (!response.ok) {\n throw await getErrorFromResponse('Delete Installation', response);\n }\n}\nfunction getDeleteEndpoint(appConfig, { fid }) {\n return `${getInstallationsEndpoint(appConfig)}/${fid}`;\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 * Deletes the Firebase Installation and all associated data.\n * @param installations - The `Installations` instance.\n *\n * @public\n */\nasync function deleteInstallations(installations) {\n const { appConfig } = installations;\n const entry = await update(appConfig, oldEntry => {\n if (oldEntry && oldEntry.registrationStatus === 0 /* RequestStatus.NOT_STARTED */) {\n // Delete the unregistered entry without sending a deleteInstallation request.\n return undefined;\n }\n return oldEntry;\n });\n if (entry) {\n if (entry.registrationStatus === 1 /* RequestStatus.IN_PROGRESS */) {\n // Can't delete while trying to register.\n throw ERROR_FACTORY.create(\"delete-pending-registration\" /* ErrorCode.DELETE_PENDING_REGISTRATION */);\n }\n else if (entry.registrationStatus === 2 /* RequestStatus.COMPLETED */) {\n if (!navigator.onLine) {\n throw ERROR_FACTORY.create(\"app-offline\" /* ErrorCode.APP_OFFLINE */);\n }\n else {\n await deleteInstallationRequest(appConfig, entry);\n await remove(appConfig);\n }\n }\n }\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 * Sets a new callback that will get called when Installation ID changes.\n * Returns an unsubscribe function that will remove the callback when called.\n * @param installations - The `Installations` instance.\n * @param callback - The callback function that is invoked when FID changes.\n * @returns A function that can be called to unsubscribe.\n *\n * @public\n */\nfunction onIdChange(installations, callback) {\n const { appConfig } = installations;\n addCallback(appConfig, callback);\n return () => {\n removeCallback(appConfig, callback);\n };\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\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 * Returns an instance of {@link Installations} associated with the given\n * {@link @firebase/app#FirebaseApp} instance.\n * @param app - The {@link @firebase/app#FirebaseApp} instance.\n *\n * @public\n */\nfunction getInstallations(app = getApp()) {\n const installationsImpl = _getProvider(app, 'installations').getImmediate();\n return installationsImpl;\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 */\nfunction extractAppConfig(app) {\n if (!app || !app.options) {\n throw getMissingValueError('App Configuration');\n }\n if (!app.name) {\n throw getMissingValueError('App Name');\n }\n // Required app config keys\n const configKeys = [\n 'projectId',\n 'apiKey',\n 'appId'\n ];\n for (const keyName of configKeys) {\n if (!app.options[keyName]) {\n throw getMissingValueError(keyName);\n }\n }\n return {\n appName: app.name,\n projectId: app.options.projectId,\n apiKey: app.options.apiKey,\n appId: app.options.appId\n };\n}\nfunction getMissingValueError(valueName) {\n return ERROR_FACTORY.create(\"missing-app-config-values\" /* ErrorCode.MISSING_APP_CONFIG_VALUES */, {\n valueName\n });\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\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 */\nconst INSTALLATIONS_NAME = 'installations';\nconst INSTALLATIONS_NAME_INTERNAL = 'installations-internal';\nconst publicFactory = (container) => {\n const app = container.getProvider('app').getImmediate();\n // Throws if app isn't configured properly.\n const appConfig = extractAppConfig(app);\n const heartbeatServiceProvider = _getProvider(app, 'heartbeat');\n const installationsImpl = {\n app,\n appConfig,\n heartbeatServiceProvider,\n _delete: () => Promise.resolve()\n };\n return installationsImpl;\n};\nconst internalFactory = (container) => {\n const app = container.getProvider('app').getImmediate();\n // Internal FIS instance relies on public FIS instance.\n const installations = _getProvider(app, INSTALLATIONS_NAME).getImmediate();\n const installationsInternal = {\n getId: () => getId(installations),\n getToken: (forceRefresh) => getToken(installations, forceRefresh)\n };\n return installationsInternal;\n};\nfunction registerInstallations() {\n _registerComponent(new Component(INSTALLATIONS_NAME, publicFactory, \"PUBLIC\" /* ComponentType.PUBLIC */));\n _registerComponent(new Component(INSTALLATIONS_NAME_INTERNAL, internalFactory, \"PRIVATE\" /* ComponentType.PRIVATE */));\n}\n\n/**\n * The Firebase Installations Web SDK.\n * This SDK does not work in a Node.js environment.\n *\n * @packageDocumentation\n */\nregisterInstallations();\nregisterVersion(name, version);\n// BUILD_TARGET will be replaced by values like esm2017, cjs2017, etc during the compilation\nregisterVersion(name, version, 'esm2017');\n\nexport { deleteInstallations, getId, getInstallations, getToken, onIdChange };\n","//! moment.js locale configuration\n//! locale : Polish [pl]\n//! author : Rafal Hirsz : https://github.com/evoL\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsNominative =\n 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split(\n '_'\n ),\n monthsSubjective =\n 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split(\n '_'\n ),\n monthsParse = [\n /^sty/i,\n /^lut/i,\n /^mar/i,\n /^kwi/i,\n /^maj/i,\n /^cze/i,\n /^lip/i,\n /^sie/i,\n /^wrz/i,\n /^paź/i,\n /^lis/i,\n /^gru/i,\n ];\n function plural(n) {\n return n % 10 < 5 && n % 10 > 1 && ~~(n / 10) % 10 !== 1;\n }\n function translate(number, withoutSuffix, key) {\n var result = number + ' ';\n switch (key) {\n case 'ss':\n return result + (plural(number) ? 'sekundy' : 'sekund');\n case 'm':\n return withoutSuffix ? 'minuta' : 'minutę';\n case 'mm':\n return result + (plural(number) ? 'minuty' : 'minut');\n case 'h':\n return withoutSuffix ? 'godzina' : 'godzinę';\n case 'hh':\n return result + (plural(number) ? 'godziny' : 'godzin');\n case 'ww':\n return result + (plural(number) ? 'tygodnie' : 'tygodni');\n case 'MM':\n return result + (plural(number) ? 'miesiące' : 'miesięcy');\n case 'yy':\n return result + (plural(number) ? 'lata' : 'lat');\n }\n }\n\n var pl = moment.defineLocale('pl', {\n months: function (momentToFormat, format) {\n if (!momentToFormat) {\n return monthsNominative;\n } else if (/D MMMM/.test(format)) {\n return monthsSubjective[momentToFormat.month()];\n } else {\n return monthsNominative[momentToFormat.month()];\n }\n },\n monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays:\n 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),\n weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),\n weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Dziś o] LT',\n nextDay: '[Jutro o] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[W niedzielę o] LT';\n\n case 2:\n return '[We wtorek o] LT';\n\n case 3:\n return '[W środę o] LT';\n\n case 6:\n return '[W sobotę o] LT';\n\n default:\n return '[W] dddd [o] LT';\n }\n },\n lastDay: '[Wczoraj o] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[W zeszłą niedzielę o] LT';\n case 3:\n return '[W zeszłą środę o] LT';\n case 6:\n return '[W zeszłą sobotę o] LT';\n default:\n return '[W zeszły] dddd [o] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'za %s',\n past: '%s temu',\n s: 'kilka sekund',\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: '1 dzień',\n dd: '%d dni',\n w: 'tydzień',\n ww: translate,\n M: 'miesiąc',\n MM: translate,\n y: 'rok',\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return pl;\n\n})));\n","//! moment.js locale configuration\n//! locale : Lithuanian [lt]\n//! author : Mindaugas Mozūras : https://github.com/mmozuras\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var units = {\n ss: 'sekundė_sekundžių_sekundes',\n m: 'minutė_minutės_minutę',\n mm: 'minutės_minučių_minutes',\n h: 'valanda_valandos_valandą',\n hh: 'valandos_valandų_valandas',\n d: 'diena_dienos_dieną',\n dd: 'dienos_dienų_dienas',\n M: 'mėnuo_mėnesio_mėnesį',\n MM: 'mėnesiai_mėnesių_mėnesius',\n y: 'metai_metų_metus',\n yy: 'metai_metų_metus',\n };\n function translateSeconds(number, withoutSuffix, key, isFuture) {\n if (withoutSuffix) {\n return 'kelios sekundės';\n } else {\n return isFuture ? 'kelių sekundžių' : 'kelias sekundes';\n }\n }\n function translateSingular(number, withoutSuffix, key, isFuture) {\n return withoutSuffix\n ? forms(key)[0]\n : isFuture\n ? forms(key)[1]\n : forms(key)[2];\n }\n function special(number) {\n return number % 10 === 0 || (number > 10 && number < 20);\n }\n function forms(key) {\n return units[key].split('_');\n }\n function translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n if (number === 1) {\n return (\n result + translateSingular(number, withoutSuffix, key[0], isFuture)\n );\n } else if (withoutSuffix) {\n return result + (special(number) ? forms(key)[1] : forms(key)[0]);\n } else {\n if (isFuture) {\n return result + forms(key)[1];\n } else {\n return result + (special(number) ? forms(key)[1] : forms(key)[2]);\n }\n }\n }\n var lt = moment.defineLocale('lt', {\n months: {\n format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split(\n '_'\n ),\n standalone:\n 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split(\n '_'\n ),\n isFormat: /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?|MMMM?(\\[[^\\[\\]]*\\]|\\s)+D[oD]?/,\n },\n monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),\n weekdays: {\n format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split(\n '_'\n ),\n standalone:\n 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split(\n '_'\n ),\n isFormat: /dddd HH:mm/,\n },\n weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),\n weekdaysMin: 'S_P_A_T_K_Pn_Š'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'YYYY [m.] MMMM D [d.]',\n LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',\n LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',\n l: 'YYYY-MM-DD',\n ll: 'YYYY [m.] MMMM D [d.]',\n lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',\n llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]',\n },\n calendar: {\n sameDay: '[Šiandien] LT',\n nextDay: '[Rytoj] LT',\n nextWeek: 'dddd LT',\n lastDay: '[Vakar] LT',\n lastWeek: '[Praėjusį] dddd LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'po %s',\n past: 'prieš %s',\n s: translateSeconds,\n ss: translate,\n m: translateSingular,\n mm: translate,\n h: translateSingular,\n hh: translate,\n d: translateSingular,\n dd: translate,\n M: translateSingular,\n MM: translate,\n y: translateSingular,\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-oji/,\n ordinal: function (number) {\n return number + '-oji';\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return lt;\n\n})));\n","import { EmptyError } from './util/EmptyError';\nimport { SafeSubscriber } from './Subscriber';\nexport function firstValueFrom(source, config) {\n const hasConfig = typeof config === 'object';\n return new Promise((resolve, reject) => {\n const subscriber = new SafeSubscriber({\n next: (value) => {\n resolve(value);\n subscriber.unsubscribe();\n },\n error: reject,\n complete: () => {\n if (hasConfig) {\n resolve(config.defaultValue);\n }\n else {\n reject(new EmptyError());\n }\n },\n });\n source.subscribe(subscriber);\n });\n}\n","//! moment.js locale configuration\n//! locale : Portuguese (Brazil) [pt-br]\n//! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ptBr = moment.defineLocale('pt-br', {\n months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(\n '_'\n ),\n monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),\n weekdays:\n 'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split(\n '_'\n ),\n weekdaysShort: 'dom_seg_ter_qua_qui_sex_sáb'.split('_'),\n weekdaysMin: 'do_2ª_3ª_4ª_5ª_6ª_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY [às] HH:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm',\n },\n calendar: {\n sameDay: '[Hoje às] LT',\n nextDay: '[Amanhã às] LT',\n nextWeek: 'dddd [às] LT',\n lastDay: '[Ontem às] LT',\n lastWeek: function () {\n return this.day() === 0 || this.day() === 6\n ? '[Último] dddd [às] LT' // Saturday + Sunday\n : '[Última] dddd [às] LT'; // Monday - Friday\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'em %s',\n past: 'há %s',\n s: 'poucos segundos',\n ss: '%d segundos',\n m: 'um minuto',\n mm: '%d minutos',\n h: 'uma hora',\n hh: '%d horas',\n d: 'um dia',\n dd: '%d dias',\n M: 'um mês',\n MM: '%d meses',\n y: 'um ano',\n yy: '%d anos',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n invalidDate: 'Data inválida',\n });\n\n return ptBr;\n\n})));\n","import {Injectable, TemplateRef} from '@angular/core';\nimport {Observable, Subject} from \"rxjs\";\nimport { BsHubService } from \"../Hub/bs-hub.service\";\n\nexport interface SimpleGlobalModalInterface {\n title?: string;\n subtitle?: string;\n contentKey?: string;\n eventName: string;\n ctaKey?: string;\n ctaAction?: ()=>void;\n ctaType?: 'destructive';\n secondaryCtaKey?: string;\n secondaryCtaAction?: ()=>void;\n size: 'small'|'medium'|'large';\n displayCloseButton: true|false;\n isError: true|false;\n closeRoute?: string[];\n closeAction?: ()=>void;\n headerImagePath?: string;\n templateRef?: TemplateRef<any>;\n loadingAfterCta?: boolean;\n minHeight?: string;\n eyebrow?: boolean;\n showSpinner?: boolean;\n bodyClass?: string;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SimpleGlobalModalService {\n\n private _modalObject = new Subject<SimpleGlobalModalInterface | null>();\n public readonly modalObject : Observable<SimpleGlobalModalInterface | null> = this._modalObject.asObservable();\n\n constructor(private bsHubService: BsHubService) { }\n\n createModal(modal: SimpleGlobalModalInterface) {\n this.clearModal();\n setTimeout(()=>{this._modalObject.next(modal);},0);\n }\n\n clearModal() {\n this._modalObject.next(null);\n }\n\n // todo: convert to single config object\n createGenericErrorModal(\n eventName = \"network_error\",\n ctaAction = () => {this.clearModal();},\n ctaKey: string = 'TRY_AGAIN',\n closeAction = () => {this.clearModal();}\n ) : void{\n this._modalObject.next({\n title: 'error_general_title'.toUpperCase(),\n contentKey: 'error_general_desc'.toUpperCase(),\n displayCloseButton: true,\n eventName: eventName,\n isError: true,\n size: \"medium\",\n ctaKey,\n ctaAction: ctaAction,\n closeAction: closeAction\n });\n }\n\n createGenericHelpModal() {\n this._modalObject.next({\n title: 'NEED_MORE_HELP_TITLE',\n contentKey: 'NEED_MORE_HELP_DESC',\n displayCloseButton: true,\n eventName: 'need_more_help',\n isError: false,\n size: \"medium\",\n ctaKey: 'NEED_MORE_HELP_CTA1',\n ctaAction: () => {\n this.bsHubService.dispatch('IntercomChannel', {event: 'open'});\n }\n });\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n FirebaseService\n} from \"@brightside-web/desktop/data-access/shared\";\n\nimport { HubCapsule } from 'aws-amplify/utils';\n\nimport {\n AwsApiWrapperService,\n BsAuthService,\n BsCacheService,\n BsHubService\n} from \"@brightside-web/desktop/data-access/core-services\";\n\nimport * as moment from \"moment\";\n\nimport {BehaviorSubject, filter, from, Observable, of, Subscription} from \"rxjs\";\nimport {TranslateService} from \"@ngx-translate/core\";\nimport {first, mergeMap, tap, catchError} from \"rxjs/operators\";\nimport {ActivatedRoute} from \"@angular/router\";\n\nexport interface SupportedLangsInterface {\n locale: string;\n displayName: string;\n state?: boolean;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class LanguageSelectorService {\n\n private _ready: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);\n public readonly ready: Observable<boolean> = this._ready.asObservable();\n\n private _languageChanged: BehaviorSubject<string> = new BehaviorSubject<string>('');\n public readonly languageChanged: Observable<string> = this._languageChanged.asObservable();\n\n sub = new Subscription();\n\n supportedLanguages: [SupportedLangsInterface];\n isUserLoggedIn = false;\n disableChangeLang = true;\n maxRetry = 10;\n fbAttempts = 0;\n\n get activeLang(): string {\n return this.translateSvc.currentLang || 'en';\n }\n\n constructor(\n private translateSvc: TranslateService,\n private analytics: FirebaseService,\n private activatedRoute: ActivatedRoute,\n private awsApiWrapperService: AwsApiWrapperService,\n private bsAuthService: BsAuthService,\n private bsCacheService: BsCacheService,\n private bsHubService: BsHubService\n ) {\n this.setUpService();\n // this should always happen after everything has loaded\n // as it is not called if the user has an active session on refresh\n this.bsHubService.listen('bsAuth', this.authListener.bind(this));\n }\n\n public setUpService() {\n if (this.fbAttempts >= this.maxRetry) {\n // firebase may be down or supportedLanguages is not coming through\n return;\n }\n this.fbAttempts++;\n // remoteConfig is not available at construction, keep trying until we have a response\n const langs = this.analytics.getValueAsString('supportedLanguages');\n if (langs) {\n this.supportedLanguages = JSON.parse(langs);\n const supportedLocales = this.supportedLanguages.reduce((a:string[], lang) => [...a, lang.locale], []);\n if (supportedLocales.length > 0) { this.translateSvc.addLangs(supportedLocales); }\n if (supportedLocales.length > 1) { this.disableChangeLang = false; }\n if (!this.disableChangeLang) {\n\n this.bsAuthService.isAuthenticated().pipe(\n tap(isAuth => {\n this.isUserLoggedIn = isAuth;\n }),\n filter(isAuth => !!isAuth),\n mergeMap(() => this.bsAuthService.fetchUserAttributes().pipe(\n tap(attributes => {\n const locale = attributes['locale'];\n if (locale) {\n this.use(locale, true);\n } else {\n this.getSetCachedActiveLang(true);\n }\n }),\n catchError(err => {\n this.getSetCachedActiveLang(true);\n return of(null);\n })\n )),\n catchError(err => {\n this.getSetCachedActiveLang(true);\n return of(null);\n })\n ).subscribe();\n\n this._ready.next(true);\n }\n } else {\n setTimeout(()=>{\n this.setUpService();\n }, 250);\n }\n }\n\n private authListener(data: HubCapsule<any, any>) {\n const dataEvent = data.payload.event;\n if (dataEvent === 'signIn') {\n const locale = data.payload.data.attributes['locale'];\n this.isUserLoggedIn = true;\n if (locale) {\n this.use(locale, true);\n }\n } else if (dataEvent === 'signOut') {\n this.isUserLoggedIn = false;\n }\n }\n\n public isLangSupported(locale: string) {\n return this.supportedLanguages.some(lang => lang.locale === locale);\n }\n\n public use(locale: string, bypassPut = false) {\n if (!this.disableChangeLang && this.isLangSupported(locale)) {\n this.translateSvc.use(locale);\n this.storeActiveLang(locale);\n this._languageChanged.next(this.activeLang);\n if (this.isUserLoggedIn && !bypassPut) this.putChangeLang(locale);\n }\n }\n\n private putChangeLang(locale: string) {\n const myLocale = locale ?? this.activeLang;\n this.awsApiWrapperService.put('api-mobile', '/client', {\n body: {\n preferred_language: myLocale\n }\n }).then(\n _ => {\n setTimeout(() => {\n this.sub.add(\n this.bsAuthService.getToken().pipe(first()).subscribe(\n session => {}\n )\n )\n }, 150);\n }\n );\n }\n\n private storeActiveLang(locale: string) {\n this.bsCacheService.setItem('activeLang', locale, {expires: moment().add(48, 'hours').valueOf()});\n }\n\n public getSetCachedActiveLang(bypassPut = false) {\n if (this.activatedRoute.snapshot?.queryParams['lang']) {\n this.use(this.activatedRoute.snapshot.queryParams['lang']);\n return;\n }\n this.bsCacheService.getItem('activeLang').then(\n activeLang => {\n if (activeLang) {\n this.use(activeLang, bypassPut);\n } else {\n this.use('en', bypassPut);\n }\n }\n )\n }\n\n}\n","/**\n * @license Angular v15.0.4\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport * as i1 from '@angular/common';\nimport { DOCUMENT, ɵparseCookieValue, XhrFactory as XhrFactory$1 } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { Injectable, InjectionToken, inject, Inject, PLATFORM_ID, makeEnvironmentProviders, NgModule } from '@angular/core';\nimport { of, Observable } from 'rxjs';\nimport { concatMap, filter, map } from 'rxjs/operators';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Transforms an `HttpRequest` into a stream of `HttpEvent`s, one of which will likely be a\n * `HttpResponse`.\n *\n * `HttpHandler` is injectable. When injected, the handler instance dispatches requests to the\n * first interceptor in the chain, which dispatches to the second, etc, eventually reaching the\n * `HttpBackend`.\n *\n * In an `HttpInterceptor`, the `HttpHandler` parameter is the next interceptor in the chain.\n *\n * @publicApi\n */\nclass HttpHandler {\n}\n/**\n * A final `HttpHandler` which will dispatch the request via browser HTTP APIs to a backend.\n *\n * Interceptors sit between the `HttpClient` interface and the `HttpBackend`.\n *\n * When injected, `HttpBackend` dispatches requests directly to the backend, without going\n * through the interceptor chain.\n *\n * @publicApi\n */\nclass HttpBackend {\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Represents the header configuration options for an HTTP request.\n * Instances are immutable. Modifying methods return a cloned\n * instance with the change. The original object is never changed.\n *\n * @publicApi\n */\nclass HttpHeaders {\n /** Constructs a new HTTP header object with the given values.*/\n constructor(headers) {\n /**\n * Internal map of lowercased header names to the normalized\n * form of the name (the form seen first).\n */\n this.normalizedNames = new Map();\n /**\n * Queued updates to be materialized the next initialization.\n */\n this.lazyUpdate = null;\n if (!headers) {\n this.headers = new Map();\n }\n else if (typeof headers === 'string') {\n this.lazyInit = () => {\n this.headers = new Map();\n headers.split('\\n').forEach(line => {\n const index = line.indexOf(':');\n if (index > 0) {\n const name = line.slice(0, index);\n const key = name.toLowerCase();\n const value = line.slice(index + 1).trim();\n this.maybeSetNormalizedName(name, key);\n if (this.headers.has(key)) {\n this.headers.get(key).push(value);\n }\n else {\n this.headers.set(key, [value]);\n }\n }\n });\n };\n }\n else {\n this.lazyInit = () => {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n assertValidHeaders(headers);\n }\n this.headers = new Map();\n Object.keys(headers).forEach(name => {\n let values = headers[name];\n const key = name.toLowerCase();\n if (typeof values === 'string') {\n values = [values];\n }\n if (values.length > 0) {\n this.headers.set(key, values);\n this.maybeSetNormalizedName(name, key);\n }\n });\n };\n }\n }\n /**\n * Checks for existence of a given header.\n *\n * @param name The header name to check for existence.\n *\n * @returns True if the header exists, false otherwise.\n */\n has(name) {\n this.init();\n return this.headers.has(name.toLowerCase());\n }\n /**\n * Retrieves the first value of a given header.\n *\n * @param name The header name.\n *\n * @returns The value string if the header exists, null otherwise\n */\n get(name) {\n this.init();\n const values = this.headers.get(name.toLowerCase());\n return values && values.length > 0 ? values[0] : null;\n }\n /**\n * Retrieves the names of the headers.\n *\n * @returns A list of header names.\n */\n keys() {\n this.init();\n return Array.from(this.normalizedNames.values());\n }\n /**\n * Retrieves a list of values for a given header.\n *\n * @param name The header name from which to retrieve values.\n *\n * @returns A string of values if the header exists, null otherwise.\n */\n getAll(name) {\n this.init();\n return this.headers.get(name.toLowerCase()) || null;\n }\n /**\n * Appends a new value to the existing set of values for a header\n * and returns them in a clone of the original instance.\n *\n * @param name The header name for which to append the values.\n * @param value The value to append.\n *\n * @returns A clone of the HTTP headers object with the value appended to the given header.\n */\n append(name, value) {\n return this.clone({ name, value, op: 'a' });\n }\n /**\n * Sets or modifies a value for a given header in a clone of the original instance.\n * If the header already exists, its value is replaced with the given value\n * in the returned object.\n *\n * @param name The header name.\n * @param value The value or values to set or override for the given header.\n *\n * @returns A clone of the HTTP headers object with the newly set header value.\n */\n set(name, value) {\n return this.clone({ name, value, op: 's' });\n }\n /**\n * Deletes values for a given header in a clone of the original instance.\n *\n * @param name The header name.\n * @param value The value or values to delete for the given header.\n *\n * @returns A clone of the HTTP headers object with the given value deleted.\n */\n delete(name, value) {\n return this.clone({ name, value, op: 'd' });\n }\n maybeSetNormalizedName(name, lcName) {\n if (!this.normalizedNames.has(lcName)) {\n this.normalizedNames.set(lcName, name);\n }\n }\n init() {\n if (!!this.lazyInit) {\n if (this.lazyInit instanceof HttpHeaders) {\n this.copyFrom(this.lazyInit);\n }\n else {\n this.lazyInit();\n }\n this.lazyInit = null;\n if (!!this.lazyUpdate) {\n this.lazyUpdate.forEach(update => this.applyUpdate(update));\n this.lazyUpdate = null;\n }\n }\n }\n copyFrom(other) {\n other.init();\n Array.from(other.headers.keys()).forEach(key => {\n this.headers.set(key, other.headers.get(key));\n this.normalizedNames.set(key, other.normalizedNames.get(key));\n });\n }\n clone(update) {\n const clone = new HttpHeaders();\n clone.lazyInit =\n (!!this.lazyInit && this.lazyInit instanceof HttpHeaders) ? this.lazyInit : this;\n clone.lazyUpdate = (this.lazyUpdate || []).concat([update]);\n return clone;\n }\n applyUpdate(update) {\n const key = update.name.toLowerCase();\n switch (update.op) {\n case 'a':\n case 's':\n let value = update.value;\n if (typeof value === 'string') {\n value = [value];\n }\n if (value.length === 0) {\n return;\n }\n this.maybeSetNormalizedName(update.name, key);\n const base = (update.op === 'a' ? this.headers.get(key) : undefined) || [];\n base.push(...value);\n this.headers.set(key, base);\n break;\n case 'd':\n const toDelete = update.value;\n if (!toDelete) {\n this.headers.delete(key);\n this.normalizedNames.delete(key);\n }\n else {\n let existing = this.headers.get(key);\n if (!existing) {\n return;\n }\n existing = existing.filter(value => toDelete.indexOf(value) === -1);\n if (existing.length === 0) {\n this.headers.delete(key);\n this.normalizedNames.delete(key);\n }\n else {\n this.headers.set(key, existing);\n }\n }\n break;\n }\n }\n /**\n * @internal\n */\n forEach(fn) {\n this.init();\n Array.from(this.normalizedNames.keys())\n .forEach(key => fn(this.normalizedNames.get(key), this.headers.get(key)));\n }\n}\n/**\n * Verifies that the headers object has the right shape: the values\n * must be either strings or arrays. Throws an error if an invalid\n * header value is present.\n */\nfunction assertValidHeaders(headers) {\n for (const [key, value] of Object.entries(headers)) {\n if (typeof value !== 'string' && !Array.isArray(value)) {\n throw new Error(`Unexpected value of the \\`${key}\\` header provided. ` +\n `Expecting either a string or an array, but got: \\`${value}\\`.`);\n }\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Provides encoding and decoding of URL parameter and query-string values.\n *\n * Serializes and parses URL parameter keys and values to encode and decode them.\n * If you pass URL query parameters without encoding,\n * the query parameters can be misinterpreted at the receiving end.\n *\n *\n * @publicApi\n */\nclass HttpUrlEncodingCodec {\n /**\n * Encodes a key name for a URL parameter or query-string.\n * @param key The key name.\n * @returns The encoded key name.\n */\n encodeKey(key) {\n return standardEncoding(key);\n }\n /**\n * Encodes the value of a URL parameter or query-string.\n * @param value The value.\n * @returns The encoded value.\n */\n encodeValue(value) {\n return standardEncoding(value);\n }\n /**\n * Decodes an encoded URL parameter or query-string key.\n * @param key The encoded key name.\n * @returns The decoded key name.\n */\n decodeKey(key) {\n return decodeURIComponent(key);\n }\n /**\n * Decodes an encoded URL parameter or query-string value.\n * @param value The encoded value.\n * @returns The decoded value.\n */\n decodeValue(value) {\n return decodeURIComponent(value);\n }\n}\nfunction paramParser(rawParams, codec) {\n const map = new Map();\n if (rawParams.length > 0) {\n // The `window.location.search` can be used while creating an instance of the `HttpParams` class\n // (e.g. `new HttpParams({ fromString: window.location.search })`). The `window.location.search`\n // may start with the `?` char, so we strip it if it's present.\n const params = rawParams.replace(/^\\?/, '').split('&');\n params.forEach((param) => {\n const eqIdx = param.indexOf('=');\n const [key, val] = eqIdx == -1 ?\n [codec.decodeKey(param), ''] :\n [codec.decodeKey(param.slice(0, eqIdx)), codec.decodeValue(param.slice(eqIdx + 1))];\n const list = map.get(key) || [];\n list.push(val);\n map.set(key, list);\n });\n }\n return map;\n}\n/**\n * Encode input string with standard encodeURIComponent and then un-encode specific characters.\n */\nconst STANDARD_ENCODING_REGEX = /%(\\d[a-f0-9])/gi;\nconst STANDARD_ENCODING_REPLACEMENTS = {\n '40': '@',\n '3A': ':',\n '24': '$',\n '2C': ',',\n '3B': ';',\n '3D': '=',\n '3F': '?',\n '2F': '/',\n};\nfunction standardEncoding(v) {\n return encodeURIComponent(v).replace(STANDARD_ENCODING_REGEX, (s, t) => STANDARD_ENCODING_REPLACEMENTS[t] ?? s);\n}\nfunction valueToString(value) {\n return `${value}`;\n}\n/**\n * An HTTP request/response body that represents serialized parameters,\n * per the MIME type `application/x-www-form-urlencoded`.\n *\n * This class is immutable; all mutation operations return a new instance.\n *\n * @publicApi\n */\nclass HttpParams {\n constructor(options = {}) {\n this.updates = null;\n this.cloneFrom = null;\n this.encoder = options.encoder || new HttpUrlEncodingCodec();\n if (!!options.fromString) {\n if (!!options.fromObject) {\n throw new Error(`Cannot specify both fromString and fromObject.`);\n }\n this.map = paramParser(options.fromString, this.encoder);\n }\n else if (!!options.fromObject) {\n this.map = new Map();\n Object.keys(options.fromObject).forEach(key => {\n const value = options.fromObject[key];\n // convert the values to strings\n const values = Array.isArray(value) ? value.map(valueToString) : [valueToString(value)];\n this.map.set(key, values);\n });\n }\n else {\n this.map = null;\n }\n }\n /**\n * Reports whether the body includes one or more values for a given parameter.\n * @param param The parameter name.\n * @returns True if the parameter has one or more values,\n * false if it has no value or is not present.\n */\n has(param) {\n this.init();\n return this.map.has(param);\n }\n /**\n * Retrieves the first value for a parameter.\n * @param param The parameter name.\n * @returns The first value of the given parameter,\n * or `null` if the parameter is not present.\n */\n get(param) {\n this.init();\n const res = this.map.get(param);\n return !!res ? res[0] : null;\n }\n /**\n * Retrieves all values for a parameter.\n * @param param The parameter name.\n * @returns All values in a string array,\n * or `null` if the parameter not present.\n */\n getAll(param) {\n this.init();\n return this.map.get(param) || null;\n }\n /**\n * Retrieves all the parameters for this body.\n * @returns The parameter names in a string array.\n */\n keys() {\n this.init();\n return Array.from(this.map.keys());\n }\n /**\n * Appends a new value to existing values for a parameter.\n * @param param The parameter name.\n * @param value The new value to add.\n * @return A new body with the appended value.\n */\n append(param, value) {\n return this.clone({ param, value, op: 'a' });\n }\n /**\n * Constructs a new body with appended values for the given parameter name.\n * @param params parameters and values\n * @return A new body with the new value.\n */\n appendAll(params) {\n const updates = [];\n Object.keys(params).forEach(param => {\n const value = params[param];\n if (Array.isArray(value)) {\n value.forEach(_value => {\n updates.push({ param, value: _value, op: 'a' });\n });\n }\n else {\n updates.push({ param, value: value, op: 'a' });\n }\n });\n return this.clone(updates);\n }\n /**\n * Replaces the value for a parameter.\n * @param param The parameter name.\n * @param value The new value.\n * @return A new body with the new value.\n */\n set(param, value) {\n return this.clone({ param, value, op: 's' });\n }\n /**\n * Removes a given value or all values from a parameter.\n * @param param The parameter name.\n * @param value The value to remove, if provided.\n * @return A new body with the given value removed, or with all values\n * removed if no value is specified.\n */\n delete(param, value) {\n return this.clone({ param, value, op: 'd' });\n }\n /**\n * Serializes the body to an encoded string, where key-value pairs (separated by `=`) are\n * separated by `&`s.\n */\n toString() {\n this.init();\n return this.keys()\n .map(key => {\n const eKey = this.encoder.encodeKey(key);\n // `a: ['1']` produces `'a=1'`\n // `b: []` produces `''`\n // `c: ['1', '2']` produces `'c=1&c=2'`\n return this.map.get(key).map(value => eKey + '=' + this.encoder.encodeValue(value))\n .join('&');\n })\n // filter out empty values because `b: []` produces `''`\n // which results in `a=1&&c=1&c=2` instead of `a=1&c=1&c=2` if we don't\n .filter(param => param !== '')\n .join('&');\n }\n clone(update) {\n const clone = new HttpParams({ encoder: this.encoder });\n clone.cloneFrom = this.cloneFrom || this;\n clone.updates = (this.updates || []).concat(update);\n return clone;\n }\n init() {\n if (this.map === null) {\n this.map = new Map();\n }\n if (this.cloneFrom !== null) {\n this.cloneFrom.init();\n this.cloneFrom.keys().forEach(key => this.map.set(key, this.cloneFrom.map.get(key)));\n this.updates.forEach(update => {\n switch (update.op) {\n case 'a':\n case 's':\n const base = (update.op === 'a' ? this.map.get(update.param) : undefined) || [];\n base.push(valueToString(update.value));\n this.map.set(update.param, base);\n break;\n case 'd':\n if (update.value !== undefined) {\n let base = this.map.get(update.param) || [];\n const idx = base.indexOf(valueToString(update.value));\n if (idx !== -1) {\n base.splice(idx, 1);\n }\n if (base.length > 0) {\n this.map.set(update.param, base);\n }\n else {\n this.map.delete(update.param);\n }\n }\n else {\n this.map.delete(update.param);\n break;\n }\n }\n });\n this.cloneFrom = this.updates = null;\n }\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A token used to manipulate and access values stored in `HttpContext`.\n *\n * @publicApi\n */\nclass HttpContextToken {\n constructor(defaultValue) {\n this.defaultValue = defaultValue;\n }\n}\n/**\n * Http context stores arbitrary user defined values and ensures type safety without\n * actually knowing the types. It is backed by a `Map` and guarantees that keys do not clash.\n *\n * This context is mutable and is shared between cloned requests unless explicitly specified.\n *\n * @usageNotes\n *\n * ### Usage Example\n *\n * ```typescript\n * // inside cache.interceptors.ts\n * export const IS_CACHE_ENABLED = new HttpContextToken<boolean>(() => false);\n *\n * export class CacheInterceptor implements HttpInterceptor {\n *\n * intercept(req: HttpRequest<any>, delegate: HttpHandler): Observable<HttpEvent<any>> {\n * if (req.context.get(IS_CACHE_ENABLED) === true) {\n * return ...;\n * }\n * return delegate.handle(req);\n * }\n * }\n *\n * // inside a service\n *\n * this.httpClient.get('/api/weather', {\n * context: new HttpContext().set(IS_CACHE_ENABLED, true)\n * }).subscribe(...);\n * ```\n *\n * @publicApi\n */\nclass HttpContext {\n constructor() {\n this.map = new Map();\n }\n /**\n * Store a value in the context. If a value is already present it will be overwritten.\n *\n * @param token The reference to an instance of `HttpContextToken`.\n * @param value The value to store.\n *\n * @returns A reference to itself for easy chaining.\n */\n set(token, value) {\n this.map.set(token, value);\n return this;\n }\n /**\n * Retrieve the value associated with the given token.\n *\n * @param token The reference to an instance of `HttpContextToken`.\n *\n * @returns The stored value or default if one is defined.\n */\n get(token) {\n if (!this.map.has(token)) {\n this.map.set(token, token.defaultValue());\n }\n return this.map.get(token);\n }\n /**\n * Delete the value associated with the given token.\n *\n * @param token The reference to an instance of `HttpContextToken`.\n *\n * @returns A reference to itself for easy chaining.\n */\n delete(token) {\n this.map.delete(token);\n return this;\n }\n /**\n * Checks for existence of a given token.\n *\n * @param token The reference to an instance of `HttpContextToken`.\n *\n * @returns True if the token exists, false otherwise.\n */\n has(token) {\n return this.map.has(token);\n }\n /**\n * @returns a list of tokens currently stored in the context.\n */\n keys() {\n return this.map.keys();\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Determine whether the given HTTP method may include a body.\n */\nfunction mightHaveBody(method) {\n switch (method) {\n case 'DELETE':\n case 'GET':\n case 'HEAD':\n case 'OPTIONS':\n case 'JSONP':\n return false;\n default:\n return true;\n }\n}\n/**\n * Safely assert whether the given value is an ArrayBuffer.\n *\n * In some execution environments ArrayBuffer is not defined.\n */\nfunction isArrayBuffer(value) {\n return typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer;\n}\n/**\n * Safely assert whether the given value is a Blob.\n *\n * In some execution environments Blob is not defined.\n */\nfunction isBlob(value) {\n return typeof Blob !== 'undefined' && value instanceof Blob;\n}\n/**\n * Safely assert whether the given value is a FormData instance.\n *\n * In some execution environments FormData is not defined.\n */\nfunction isFormData(value) {\n return typeof FormData !== 'undefined' && value instanceof FormData;\n}\n/**\n * Safely assert whether the given value is a URLSearchParams instance.\n *\n * In some execution environments URLSearchParams is not defined.\n */\nfunction isUrlSearchParams(value) {\n return typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams;\n}\n/**\n * An outgoing HTTP request with an optional typed body.\n *\n * `HttpRequest` represents an outgoing request, including URL, method,\n * headers, body, and other request configuration options. Instances should be\n * assumed to be immutable. To modify a `HttpRequest`, the `clone`\n * method should be used.\n *\n * @publicApi\n */\nclass HttpRequest {\n constructor(method, url, third, fourth) {\n this.url = url;\n /**\n * The request body, or `null` if one isn't set.\n *\n * Bodies are not enforced to be immutable, as they can include a reference to any\n * user-defined data type. However, interceptors should take care to preserve\n * idempotence by treating them as such.\n */\n this.body = null;\n /**\n * Whether this request should be made in a way that exposes progress events.\n *\n * Progress events are expensive (change detection runs on each event) and so\n * they should only be requested if the consumer intends to monitor them.\n */\n this.reportProgress = false;\n /**\n * Whether this request should be sent with outgoing credentials (cookies).\n */\n this.withCredentials = false;\n /**\n * The expected response type of the server.\n *\n * This is used to parse the response appropriately before returning it to\n * the requestee.\n */\n this.responseType = 'json';\n this.method = method.toUpperCase();\n // Next, need to figure out which argument holds the HttpRequestInit\n // options, if any.\n let options;\n // Check whether a body argument is expected. The only valid way to omit\n // the body argument is to use a known no-body method like GET.\n if (mightHaveBody(this.method) || !!fourth) {\n // Body is the third argument, options are the fourth.\n this.body = (third !== undefined) ? third : null;\n options = fourth;\n }\n else {\n // No body required, options are the third argument. The body stays null.\n options = third;\n }\n // If options have been passed, interpret them.\n if (options) {\n // Normalize reportProgress and withCredentials.\n this.reportProgress = !!options.reportProgress;\n this.withCredentials = !!options.withCredentials;\n // Override default response type of 'json' if one is provided.\n if (!!options.responseType) {\n this.responseType = options.responseType;\n }\n // Override headers if they're provided.\n if (!!options.headers) {\n this.headers = options.headers;\n }\n if (!!options.context) {\n this.context = options.context;\n }\n if (!!options.params) {\n this.params = options.params;\n }\n }\n // If no headers have been passed in, construct a new HttpHeaders instance.\n if (!this.headers) {\n this.headers = new HttpHeaders();\n }\n // If no context have been passed in, construct a new HttpContext instance.\n if (!this.context) {\n this.context = new HttpContext();\n }\n // If no parameters have been passed in, construct a new HttpUrlEncodedParams instance.\n if (!this.params) {\n this.params = new HttpParams();\n this.urlWithParams = url;\n }\n else {\n // Encode the parameters to a string in preparation for inclusion in the URL.\n const params = this.params.toString();\n if (params.length === 0) {\n // No parameters, the visible URL is just the URL given at creation time.\n this.urlWithParams = url;\n }\n else {\n // Does the URL already have query parameters? Look for '?'.\n const qIdx = url.indexOf('?');\n // There are 3 cases to handle:\n // 1) No existing parameters -> append '?' followed by params.\n // 2) '?' exists and is followed by existing query string ->\n // append '&' followed by params.\n // 3) '?' exists at the end of the url -> append params directly.\n // This basically amounts to determining the character, if any, with\n // which to join the URL and parameters.\n const sep = qIdx === -1 ? '?' : (qIdx < url.length - 1 ? '&' : '');\n this.urlWithParams = url + sep + params;\n }\n }\n }\n /**\n * Transform the free-form body into a serialized format suitable for\n * transmission to the server.\n */\n serializeBody() {\n // If no body is present, no need to serialize it.\n if (this.body === null) {\n return null;\n }\n // Check whether the body is already in a serialized form. If so,\n // it can just be returned directly.\n if (isArrayBuffer(this.body) || isBlob(this.body) || isFormData(this.body) ||\n isUrlSearchParams(this.body) || typeof this.body === 'string') {\n return this.body;\n }\n // Check whether the body is an instance of HttpUrlEncodedParams.\n if (this.body instanceof HttpParams) {\n return this.body.toString();\n }\n // Check whether the body is an object or array, and serialize with JSON if so.\n if (typeof this.body === 'object' || typeof this.body === 'boolean' ||\n Array.isArray(this.body)) {\n return JSON.stringify(this.body);\n }\n // Fall back on toString() for everything else.\n return this.body.toString();\n }\n /**\n * Examine the body and attempt to infer an appropriate MIME type\n * for it.\n *\n * If no such type can be inferred, this method will return `null`.\n */\n detectContentTypeHeader() {\n // An empty body has no content type.\n if (this.body === null) {\n return null;\n }\n // FormData bodies rely on the browser's content type assignment.\n if (isFormData(this.body)) {\n return null;\n }\n // Blobs usually have their own content type. If it doesn't, then\n // no type can be inferred.\n if (isBlob(this.body)) {\n return this.body.type || null;\n }\n // Array buffers have unknown contents and thus no type can be inferred.\n if (isArrayBuffer(this.body)) {\n return null;\n }\n // Technically, strings could be a form of JSON data, but it's safe enough\n // to assume they're plain strings.\n if (typeof this.body === 'string') {\n return 'text/plain';\n }\n // `HttpUrlEncodedParams` has its own content-type.\n if (this.body instanceof HttpParams) {\n return 'application/x-www-form-urlencoded;charset=UTF-8';\n }\n // Arrays, objects, boolean and numbers will be encoded as JSON.\n if (typeof this.body === 'object' || typeof this.body === 'number' ||\n typeof this.body === 'boolean') {\n return 'application/json';\n }\n // No type could be inferred.\n return null;\n }\n clone(update = {}) {\n // For method, url, and responseType, take the current value unless\n // it is overridden in the update hash.\n const method = update.method || this.method;\n const url = update.url || this.url;\n const responseType = update.responseType || this.responseType;\n // The body is somewhat special - a `null` value in update.body means\n // whatever current body is present is being overridden with an empty\n // body, whereas an `undefined` value in update.body implies no\n // override.\n const body = (update.body !== undefined) ? update.body : this.body;\n // Carefully handle the boolean options to differentiate between\n // `false` and `undefined` in the update args.\n const withCredentials = (update.withCredentials !== undefined) ? update.withCredentials : this.withCredentials;\n const reportProgress = (update.reportProgress !== undefined) ? update.reportProgress : this.reportProgress;\n // Headers and params may be appended to if `setHeaders` or\n // `setParams` are used.\n let headers = update.headers || this.headers;\n let params = update.params || this.params;\n // Pass on context if needed\n const context = update.context ?? this.context;\n // Check whether the caller has asked to add headers.\n if (update.setHeaders !== undefined) {\n // Set every requested header.\n headers =\n Object.keys(update.setHeaders)\n .reduce((headers, name) => headers.set(name, update.setHeaders[name]), headers);\n }\n // Check whether the caller has asked to set params.\n if (update.setParams) {\n // Set every requested param.\n params = Object.keys(update.setParams)\n .reduce((params, param) => params.set(param, update.setParams[param]), params);\n }\n // Finally, construct the new HttpRequest using the pieces from above.\n return new HttpRequest(method, url, body, {\n params,\n headers,\n context,\n reportProgress,\n responseType,\n withCredentials,\n });\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Type enumeration for the different kinds of `HttpEvent`.\n *\n * @publicApi\n */\nvar HttpEventType;\n(function (HttpEventType) {\n /**\n * The request was sent out over the wire.\n */\n HttpEventType[HttpEventType[\"Sent\"] = 0] = \"Sent\";\n /**\n * An upload progress event was received.\n */\n HttpEventType[HttpEventType[\"UploadProgress\"] = 1] = \"UploadProgress\";\n /**\n * The response status code and headers were received.\n */\n HttpEventType[HttpEventType[\"ResponseHeader\"] = 2] = \"ResponseHeader\";\n /**\n * A download progress event was received.\n */\n HttpEventType[HttpEventType[\"DownloadProgress\"] = 3] = \"DownloadProgress\";\n /**\n * The full response including the body was received.\n */\n HttpEventType[HttpEventType[\"Response\"] = 4] = \"Response\";\n /**\n * A custom event from an interceptor or a backend.\n */\n HttpEventType[HttpEventType[\"User\"] = 5] = \"User\";\n})(HttpEventType || (HttpEventType = {}));\n/**\n * Base class for both `HttpResponse` and `HttpHeaderResponse`.\n *\n * @publicApi\n */\nclass HttpResponseBase {\n /**\n * Super-constructor for all responses.\n *\n * The single parameter accepted is an initialization hash. Any properties\n * of the response passed there will override the default values.\n */\n constructor(init, defaultStatus = 200 /* HttpStatusCode.Ok */, defaultStatusText = 'OK') {\n // If the hash has values passed, use them to initialize the response.\n // Otherwise use the default values.\n this.headers = init.headers || new HttpHeaders();\n this.status = init.status !== undefined ? init.status : defaultStatus;\n this.statusText = init.statusText || defaultStatusText;\n this.url = init.url || null;\n // Cache the ok value to avoid defining a getter.\n this.ok = this.status >= 200 && this.status < 300;\n }\n}\n/**\n * A partial HTTP response which only includes the status and header data,\n * but no response body.\n *\n * `HttpHeaderResponse` is a `HttpEvent` available on the response\n * event stream, only when progress events are requested.\n *\n * @publicApi\n */\nclass HttpHeaderResponse extends HttpResponseBase {\n /**\n * Create a new `HttpHeaderResponse` with the given parameters.\n */\n constructor(init = {}) {\n super(init);\n this.type = HttpEventType.ResponseHeader;\n }\n /**\n * Copy this `HttpHeaderResponse`, overriding its contents with the\n * given parameter hash.\n */\n clone(update = {}) {\n // Perform a straightforward initialization of the new HttpHeaderResponse,\n // overriding the current parameters with new ones if given.\n return new HttpHeaderResponse({\n headers: update.headers || this.headers,\n status: update.status !== undefined ? update.status : this.status,\n statusText: update.statusText || this.statusText,\n url: update.url || this.url || undefined,\n });\n }\n}\n/**\n * A full HTTP response, including a typed response body (which may be `null`\n * if one was not returned).\n *\n * `HttpResponse` is a `HttpEvent` available on the response event\n * stream.\n *\n * @publicApi\n */\nclass HttpResponse extends HttpResponseBase {\n /**\n * Construct a new `HttpResponse`.\n */\n constructor(init = {}) {\n super(init);\n this.type = HttpEventType.Response;\n this.body = init.body !== undefined ? init.body : null;\n }\n clone(update = {}) {\n return new HttpResponse({\n body: (update.body !== undefined) ? update.body : this.body,\n headers: update.headers || this.headers,\n status: (update.status !== undefined) ? update.status : this.status,\n statusText: update.statusText || this.statusText,\n url: update.url || this.url || undefined,\n });\n }\n}\n/**\n * A response that represents an error or failure, either from a\n * non-successful HTTP status, an error while executing the request,\n * or some other failure which occurred during the parsing of the response.\n *\n * Any error returned on the `Observable` response stream will be\n * wrapped in an `HttpErrorResponse` to provide additional context about\n * the state of the HTTP layer when the error occurred. The error property\n * will contain either a wrapped Error object or the error response returned\n * from the server.\n *\n * @publicApi\n */\nclass HttpErrorResponse extends HttpResponseBase {\n constructor(init) {\n // Initialize with a default status of 0 / Unknown Error.\n super(init, 0, 'Unknown Error');\n this.name = 'HttpErrorResponse';\n /**\n * Errors are never okay, even when the status code is in the 2xx success range.\n */\n this.ok = false;\n // If the response was successful, then this was a parse error. Otherwise, it was\n // a protocol-level failure of some sort. Either the request failed in transit\n // or the server returned an unsuccessful status code.\n if (this.status >= 200 && this.status < 300) {\n this.message = `Http failure during parsing for ${init.url || '(unknown url)'}`;\n }\n else {\n this.message = `Http failure response for ${init.url || '(unknown url)'}: ${init.status} ${init.statusText}`;\n }\n this.error = init.error || null;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Constructs an instance of `HttpRequestOptions<T>` from a source `HttpMethodOptions` and\n * the given `body`. This function clones the object and adds the body.\n *\n * Note that the `responseType` *options* value is a String that identifies the\n * single data type of the response.\n * A single overload version of the method handles each response type.\n * The value of `responseType` cannot be a union, as the combined signature could imply.\n *\n */\nfunction addBody(options, body) {\n return {\n body,\n headers: options.headers,\n context: options.context,\n observe: options.observe,\n params: options.params,\n reportProgress: options.reportProgress,\n responseType: options.responseType,\n withCredentials: options.withCredentials,\n };\n}\n/**\n * Performs HTTP requests.\n * This service is available as an injectable class, with methods to perform HTTP requests.\n * Each request method has multiple signatures, and the return type varies based on\n * the signature that is called (mainly the values of `observe` and `responseType`).\n *\n * Note that the `responseType` *options* value is a String that identifies the\n * single data type of the response.\n * A single overload version of the method handles each response type.\n * The value of `responseType` cannot be a union, as the combined signature could imply.\n\n *\n * @usageNotes\n * Sample HTTP requests for the [Tour of Heroes](/tutorial/tour-of-heroes/toh-pt0) application.\n *\n * ### HTTP Request Example\n *\n * ```\n * // GET heroes whose name contains search term\n * searchHeroes(term: string): observable<Hero[]>{\n *\n * const params = new HttpParams({fromString: 'name=term'});\n * return this.httpClient.request('GET', this.heroesUrl, {responseType:'json', params});\n * }\n * ```\n *\n * Alternatively, the parameter string can be used without invoking HttpParams\n * by directly joining to the URL.\n * ```\n * this.httpClient.request('GET', this.heroesUrl + '?' + 'name=term', {responseType:'json'});\n * ```\n *\n *\n * ### JSONP Example\n * ```\n * requestJsonp(url, callback = 'callback') {\n * return this.httpClient.jsonp(this.heroesURL, callback);\n * }\n * ```\n *\n * ### PATCH Example\n * ```\n * // PATCH one of the heroes' name\n * patchHero (id: number, heroName: string): Observable<{}> {\n * const url = `${this.heroesUrl}/${id}`; // PATCH api/heroes/42\n * return this.httpClient.patch(url, {name: heroName}, httpOptions)\n * .pipe(catchError(this.handleError('patchHero')));\n * }\n * ```\n *\n * @see [HTTP Guide](guide/http)\n * @see [HTTP Request](api/common/http/HttpRequest)\n *\n * @publicApi\n */\nclass HttpClient {\n constructor(handler) {\n this.handler = handler;\n }\n /**\n * Constructs an observable for a generic HTTP request that, when subscribed,\n * fires the request through the chain of registered interceptors and on to the\n * server.\n *\n * You can pass an `HttpRequest` directly as the only parameter. In this case,\n * the call returns an observable of the raw `HttpEvent` stream.\n *\n * Alternatively you can pass an HTTP method as the first parameter,\n * a URL string as the second, and an options hash containing the request body as the third.\n * See `addBody()`. In this case, the specified `responseType` and `observe` options determine the\n * type of returned observable.\n * * The `responseType` value determines how a successful response body is parsed.\n * * If `responseType` is the default `json`, you can pass a type interface for the resulting\n * object as a type parameter to the call.\n *\n * The `observe` value determines the return type, according to what you are interested in\n * observing.\n * * An `observe` value of events returns an observable of the raw `HttpEvent` stream, including\n * progress events by default.\n * * An `observe` value of response returns an observable of `HttpResponse<T>`,\n * where the `T` parameter depends on the `responseType` and any optionally provided type\n * parameter.\n * * An `observe` value of body returns an observable of `<T>` with the same `T` body type.\n *\n */\n request(first, url, options = {}) {\n let req;\n // First, check whether the primary argument is an instance of `HttpRequest`.\n if (first instanceof HttpRequest) {\n // It is. The other arguments must be undefined (per the signatures) and can be\n // ignored.\n req = first;\n }\n else {\n // It's a string, so it represents a URL. Construct a request based on it,\n // and incorporate the remaining arguments (assuming `GET` unless a method is\n // provided.\n // Figure out the headers.\n let headers = undefined;\n if (options.headers instanceof HttpHeaders) {\n headers = options.headers;\n }\n else {\n headers = new HttpHeaders(options.headers);\n }\n // Sort out parameters.\n let params = undefined;\n if (!!options.params) {\n if (options.params instanceof HttpParams) {\n params = options.params;\n }\n else {\n params = new HttpParams({ fromObject: options.params });\n }\n }\n // Construct the request.\n req = new HttpRequest(first, url, (options.body !== undefined ? options.body : null), {\n headers,\n context: options.context,\n params,\n reportProgress: options.reportProgress,\n // By default, JSON is assumed to be returned for all calls.\n responseType: options.responseType || 'json',\n withCredentials: options.withCredentials,\n });\n }\n // Start with an Observable.of() the initial request, and run the handler (which\n // includes all interceptors) inside a concatMap(). This way, the handler runs\n // inside an Observable chain, which causes interceptors to be re-run on every\n // subscription (this also makes retries re-run the handler, including interceptors).\n const events$ = of(req).pipe(concatMap((req) => this.handler.handle(req)));\n // If coming via the API signature which accepts a previously constructed HttpRequest,\n // the only option is to get the event stream. Otherwise, return the event stream if\n // that is what was requested.\n if (first instanceof HttpRequest || options.observe === 'events') {\n return events$;\n }\n // The requested stream contains either the full response or the body. In either\n // case, the first step is to filter the event stream to extract a stream of\n // responses(s).\n const res$ = events$.pipe(filter((event) => event instanceof HttpResponse));\n // Decide which stream to return.\n switch (options.observe || 'body') {\n case 'body':\n // The requested stream is the body. Map the response stream to the response\n // body. This could be done more simply, but a misbehaving interceptor might\n // transform the response body into a different format and ignore the requested\n // responseType. Guard against this by validating that the response is of the\n // requested type.\n switch (req.responseType) {\n case 'arraybuffer':\n return res$.pipe(map((res) => {\n // Validate that the body is an ArrayBuffer.\n if (res.body !== null && !(res.body instanceof ArrayBuffer)) {\n throw new Error('Response is not an ArrayBuffer.');\n }\n return res.body;\n }));\n case 'blob':\n return res$.pipe(map((res) => {\n // Validate that the body is a Blob.\n if (res.body !== null && !(res.body instanceof Blob)) {\n throw new Error('Response is not a Blob.');\n }\n return res.body;\n }));\n case 'text':\n return res$.pipe(map((res) => {\n // Validate that the body is a string.\n if (res.body !== null && typeof res.body !== 'string') {\n throw new Error('Response is not a string.');\n }\n return res.body;\n }));\n case 'json':\n default:\n // No validation needed for JSON responses, as they can be of any type.\n return res$.pipe(map((res) => res.body));\n }\n case 'response':\n // The response stream was requested directly, so return it.\n return res$;\n default:\n // Guard against new future observe types being added.\n throw new Error(`Unreachable: unhandled observe type ${options.observe}}`);\n }\n }\n /**\n * Constructs an observable that, when subscribed, causes the configured\n * `DELETE` request to execute on the server. See the individual overloads for\n * details on the return type.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n */\n delete(url, options = {}) {\n return this.request('DELETE', url, options);\n }\n /**\n * Constructs an observable that, when subscribed, causes the configured\n * `GET` request to execute on the server. See the individual overloads for\n * details on the return type.\n */\n get(url, options = {}) {\n return this.request('GET', url, options);\n }\n /**\n * Constructs an observable that, when subscribed, causes the configured\n * `HEAD` request to execute on the server. The `HEAD` method returns\n * meta information about the resource without transferring the\n * resource itself. See the individual overloads for\n * details on the return type.\n */\n head(url, options = {}) {\n return this.request('HEAD', url, options);\n }\n /**\n * Constructs an `Observable` that, when subscribed, causes a request with the special method\n * `JSONP` to be dispatched via the interceptor pipeline.\n * The [JSONP pattern](https://en.wikipedia.org/wiki/JSONP) works around limitations of certain\n * API endpoints that don't support newer,\n * and preferable [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) protocol.\n * JSONP treats the endpoint API as a JavaScript file and tricks the browser to process the\n * requests even if the API endpoint is not located on the same domain (origin) as the client-side\n * application making the request.\n * The endpoint API must support JSONP callback for JSONP requests to work.\n * The resource API returns the JSON response wrapped in a callback function.\n * You can pass the callback function name as one of the query parameters.\n * Note that JSONP requests can only be used with `GET` requests.\n *\n * @param url The resource URL.\n * @param callbackParam The callback function name.\n *\n */\n jsonp(url, callbackParam) {\n return this.request('JSONP', url, {\n params: new HttpParams().append(callbackParam, 'JSONP_CALLBACK'),\n observe: 'body',\n responseType: 'json',\n });\n }\n /**\n * Constructs an `Observable` that, when subscribed, causes the configured\n * `OPTIONS` request to execute on the server. This method allows the client\n * to determine the supported HTTP methods and other capabilities of an endpoint,\n * without implying a resource action. See the individual overloads for\n * details on the return type.\n */\n options(url, options = {}) {\n return this.request('OPTIONS', url, options);\n }\n /**\n * Constructs an observable that, when subscribed, causes the configured\n * `PATCH` request to execute on the server. See the individual overloads for\n * details on the return type.\n */\n patch(url, body, options = {}) {\n return this.request('PATCH', url, addBody(options, body));\n }\n /**\n * Constructs an observable that, when subscribed, causes the configured\n * `POST` request to execute on the server. The server responds with the location of\n * the replaced resource. See the individual overloads for\n * details on the return type.\n */\n post(url, body, options = {}) {\n return this.request('POST', url, addBody(options, body));\n }\n /**\n * Constructs an observable that, when subscribed, causes the configured\n * `PUT` request to execute on the server. The `PUT` method replaces an existing resource\n * with a new set of values.\n * See the individual overloads for details on the return type.\n */\n put(url, body, options = {}) {\n return this.request('PUT', url, addBody(options, body));\n }\n}\nHttpClient.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: HttpClient, deps: [{ token: HttpHandler }], target: i0.ɵɵFactoryTarget.Injectable });\nHttpClient.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: HttpClient });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: HttpClient, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: HttpHandler }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction interceptorChainEndFn(req, finalHandlerFn) {\n return finalHandlerFn(req);\n}\n/**\n * Constructs a `ChainedInterceptorFn` which adapts a legacy `HttpInterceptor` to the\n * `ChainedInterceptorFn` interface.\n */\nfunction adaptLegacyInterceptorToChain(chainTailFn, interceptor) {\n return (initialRequest, finalHandlerFn) => interceptor.intercept(initialRequest, {\n handle: (downstreamRequest) => chainTailFn(downstreamRequest, finalHandlerFn),\n });\n}\n/**\n * Constructs a `ChainedInterceptorFn` which wraps and invokes a functional interceptor in the given\n * injector.\n */\nfunction chainedInterceptorFn(chainTailFn, interceptorFn, injector) {\n // clang-format off\n return (initialRequest, finalHandlerFn) => injector.runInContext(() => interceptorFn(initialRequest, downstreamRequest => chainTailFn(downstreamRequest, finalHandlerFn)));\n // clang-format on\n}\n/**\n * A multi-provider token that represents the array of registered\n * `HttpInterceptor` objects.\n *\n * @publicApi\n */\nconst HTTP_INTERCEPTORS = new InjectionToken('HTTP_INTERCEPTORS');\n/**\n * A multi-provided token of `HttpInterceptorFn`s.\n */\nconst HTTP_INTERCEPTOR_FNS = new InjectionToken('HTTP_INTERCEPTOR_FNS');\n/**\n * Creates an `HttpInterceptorFn` which lazily initializes an interceptor chain from the legacy\n * class-based interceptors and runs the request through it.\n */\nfunction legacyInterceptorFnFactory() {\n let chain = null;\n return (req, handler) => {\n if (chain === null) {\n const interceptors = inject(HTTP_INTERCEPTORS, { optional: true }) ?? [];\n // Note: interceptors are wrapped right-to-left so that final execution order is\n // left-to-right. That is, if `interceptors` is the array `[a, b, c]`, we want to\n // produce a chain that is conceptually `c(b(a(end)))`, which we build from the inside\n // out.\n chain = interceptors.reduceRight(adaptLegacyInterceptorToChain, interceptorChainEndFn);\n }\n return chain(req, handler);\n };\n}\nclass HttpInterceptorHandler extends HttpHandler {\n constructor(backend, injector) {\n super();\n this.backend = backend;\n this.injector = injector;\n this.chain = null;\n }\n handle(initialRequest) {\n if (this.chain === null) {\n const dedupedInterceptorFns = Array.from(new Set(this.injector.get(HTTP_INTERCEPTOR_FNS)));\n // Note: interceptors are wrapped right-to-left so that final execution order is\n // left-to-right. That is, if `dedupedInterceptorFns` is the array `[a, b, c]`, we want to\n // produce a chain that is conceptually `c(b(a(end)))`, which we build from the inside\n // out.\n this.chain = dedupedInterceptorFns.reduceRight((nextSequencedFn, interceptorFn) => chainedInterceptorFn(nextSequencedFn, interceptorFn, this.injector), interceptorChainEndFn);\n }\n return this.chain(initialRequest, downstreamRequest => this.backend.handle(downstreamRequest));\n }\n}\nHttpInterceptorHandler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: HttpInterceptorHandler, deps: [{ token: HttpBackend }, { token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });\nHttpInterceptorHandler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: HttpInterceptorHandler });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: HttpInterceptorHandler, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: HttpBackend }, { type: i0.EnvironmentInjector }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Every request made through JSONP needs a callback name that's unique across the\n// whole page. Each request is assigned an id and the callback name is constructed\n// from that. The next id to be assigned is tracked in a global variable here that\n// is shared among all applications on the page.\nlet nextRequestId = 0;\n/**\n * When a pending <script> is unsubscribed we'll move it to this document, so it won't be\n * executed.\n */\nlet foreignDocument;\n// Error text given when a JSONP script is injected, but doesn't invoke the callback\n// passed in its URL.\nconst JSONP_ERR_NO_CALLBACK = 'JSONP injected script did not invoke callback.';\n// Error text given when a request is passed to the JsonpClientBackend that doesn't\n// have a request method JSONP.\nconst JSONP_ERR_WRONG_METHOD = 'JSONP requests must use JSONP request method.';\nconst JSONP_ERR_WRONG_RESPONSE_TYPE = 'JSONP requests must use Json response type.';\n// Error text given when a request is passed to the JsonpClientBackend that has\n// headers set\nconst JSONP_ERR_HEADERS_NOT_SUPPORTED = 'JSONP requests do not support headers.';\n/**\n * DI token/abstract type representing a map of JSONP callbacks.\n *\n * In the browser, this should always be the `window` object.\n *\n *\n */\nclass JsonpCallbackContext {\n}\n/**\n * Factory function that determines where to store JSONP callbacks.\n *\n * Ordinarily JSONP callbacks are stored on the `window` object, but this may not exist\n * in test environments. In that case, callbacks are stored on an anonymous object instead.\n *\n *\n */\nfunction jsonpCallbackContext() {\n if (typeof window === 'object') {\n return window;\n }\n return {};\n}\n/**\n * Processes an `HttpRequest` with the JSONP method,\n * by performing JSONP style requests.\n * @see `HttpHandler`\n * @see `HttpXhrBackend`\n *\n * @publicApi\n */\nclass JsonpClientBackend {\n constructor(callbackMap, document) {\n this.callbackMap = callbackMap;\n this.document = document;\n /**\n * A resolved promise that can be used to schedule microtasks in the event handlers.\n */\n this.resolvedPromise = Promise.resolve();\n }\n /**\n * Get the name of the next callback method, by incrementing the global `nextRequestId`.\n */\n nextCallback() {\n return `ng_jsonp_callback_${nextRequestId++}`;\n }\n /**\n * Processes a JSONP request and returns an event stream of the results.\n * @param req The request object.\n * @returns An observable of the response events.\n *\n */\n handle(req) {\n // Firstly, check both the method and response type. If either doesn't match\n // then the request was improperly routed here and cannot be handled.\n if (req.method !== 'JSONP') {\n throw new Error(JSONP_ERR_WRONG_METHOD);\n }\n else if (req.responseType !== 'json') {\n throw new Error(JSONP_ERR_WRONG_RESPONSE_TYPE);\n }\n // Check the request headers. JSONP doesn't support headers and\n // cannot set any that were supplied.\n if (req.headers.keys().length > 0) {\n throw new Error(JSONP_ERR_HEADERS_NOT_SUPPORTED);\n }\n // Everything else happens inside the Observable boundary.\n return new Observable((observer) => {\n // The first step to make a request is to generate the callback name, and replace the\n // callback placeholder in the URL with the name. Care has to be taken here to ensure\n // a trailing &, if matched, gets inserted back into the URL in the correct place.\n const callback = this.nextCallback();\n const url = req.urlWithParams.replace(/=JSONP_CALLBACK(&|$)/, `=${callback}$1`);\n // Construct the <script> tag and point it at the URL.\n const node = this.document.createElement('script');\n node.src = url;\n // A JSONP request requires waiting for multiple callbacks. These variables\n // are closed over and track state across those callbacks.\n // The response object, if one has been received, or null otherwise.\n let body = null;\n // Whether the response callback has been called.\n let finished = false;\n // Set the response callback in this.callbackMap (which will be the window\n // object in the browser. The script being loaded via the <script> tag will\n // eventually call this callback.\n this.callbackMap[callback] = (data) => {\n // Data has been received from the JSONP script. Firstly, delete this callback.\n delete this.callbackMap[callback];\n // Set state to indicate data was received.\n body = data;\n finished = true;\n };\n // cleanup() is a utility closure that removes the <script> from the page and\n // the response callback from the window. This logic is used in both the\n // success, error, and cancellation paths, so it's extracted out for convenience.\n const cleanup = () => {\n // Remove the <script> tag if it's still on the page.\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n // Remove the response callback from the callbackMap (window object in the\n // browser).\n delete this.callbackMap[callback];\n };\n // onLoad() is the success callback which runs after the response callback\n // if the JSONP script loads successfully. The event itself is unimportant.\n // If something went wrong, onLoad() may run without the response callback\n // having been invoked.\n const onLoad = (event) => {\n // We wrap it in an extra Promise, to ensure the microtask\n // is scheduled after the loaded endpoint has executed any potential microtask itself,\n // which is not guaranteed in Internet Explorer and EdgeHTML. See issue #39496\n this.resolvedPromise.then(() => {\n // Cleanup the page.\n cleanup();\n // Check whether the response callback has run.\n if (!finished) {\n // It hasn't, something went wrong with the request. Return an error via\n // the Observable error path. All JSONP errors have status 0.\n observer.error(new HttpErrorResponse({\n url,\n status: 0,\n statusText: 'JSONP Error',\n error: new Error(JSONP_ERR_NO_CALLBACK),\n }));\n return;\n }\n // Success. body either contains the response body or null if none was\n // returned.\n observer.next(new HttpResponse({\n body,\n status: 200 /* HttpStatusCode.Ok */,\n statusText: 'OK',\n url,\n }));\n // Complete the stream, the response is over.\n observer.complete();\n });\n };\n // onError() is the error callback, which runs if the script returned generates\n // a Javascript error. It emits the error via the Observable error channel as\n // a HttpErrorResponse.\n const onError = (error) => {\n cleanup();\n // Wrap the error in a HttpErrorResponse.\n observer.error(new HttpErrorResponse({\n error,\n status: 0,\n statusText: 'JSONP Error',\n url,\n }));\n };\n // Subscribe to both the success (load) and error events on the <script> tag,\n // and add it to the page.\n node.addEventListener('load', onLoad);\n node.addEventListener('error', onError);\n this.document.body.appendChild(node);\n // The request has now been successfully sent.\n observer.next({ type: HttpEventType.Sent });\n // Cancellation handler.\n return () => {\n if (!finished) {\n this.removeListeners(node);\n }\n // And finally, clean up the page.\n cleanup();\n };\n });\n }\n removeListeners(script) {\n // Issue #34818\n // Changing <script>'s ownerDocument will prevent it from execution.\n // https://html.spec.whatwg.org/multipage/scripting.html#execute-the-script-block\n if (!foreignDocument) {\n foreignDocument = this.document.implementation.createHTMLDocument();\n }\n foreignDocument.adoptNode(script);\n }\n}\nJsonpClientBackend.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: JsonpClientBackend, deps: [{ token: JsonpCallbackContext }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nJsonpClientBackend.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: JsonpClientBackend });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: JsonpClientBackend, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: JsonpCallbackContext }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; } });\n/**\n * Identifies requests with the method JSONP and shifts them to the `JsonpClientBackend`.\n */\nfunction jsonpInterceptorFn(req, next) {\n if (req.method === 'JSONP') {\n return inject(JsonpClientBackend).handle(req);\n }\n // Fall through for normal HTTP requests.\n return next(req);\n}\n/**\n * Identifies requests with the method JSONP and\n * shifts them to the `JsonpClientBackend`.\n *\n * @see `HttpInterceptor`\n *\n * @publicApi\n */\nclass JsonpInterceptor {\n constructor(injector) {\n this.injector = injector;\n }\n /**\n * Identifies and handles a given JSONP request.\n * @param initialRequest The outgoing request object to handle.\n * @param next The next interceptor in the chain, or the backend\n * if no interceptors remain in the chain.\n * @returns An observable of the event stream.\n */\n intercept(initialRequest, next) {\n return this.injector.runInContext(() => jsonpInterceptorFn(initialRequest, downstreamRequest => next.handle(downstreamRequest)));\n }\n}\nJsonpInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: JsonpInterceptor, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });\nJsonpInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: JsonpInterceptor });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: JsonpInterceptor, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i0.EnvironmentInjector }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst XSSI_PREFIX = /^\\)\\]\\}',?\\n/;\n/**\n * Determine an appropriate URL for the response, by checking either\n * XMLHttpRequest.responseURL or the X-Request-URL header.\n */\nfunction getResponseUrl(xhr) {\n if ('responseURL' in xhr && xhr.responseURL) {\n return xhr.responseURL;\n }\n if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {\n return xhr.getResponseHeader('X-Request-URL');\n }\n return null;\n}\n/**\n * Uses `XMLHttpRequest` to send requests to a backend server.\n * @see `HttpHandler`\n * @see `JsonpClientBackend`\n *\n * @publicApi\n */\nclass HttpXhrBackend {\n constructor(xhrFactory) {\n this.xhrFactory = xhrFactory;\n }\n /**\n * Processes a request and returns a stream of response events.\n * @param req The request object.\n * @returns An observable of the response events.\n */\n handle(req) {\n // Quick check to give a better error message when a user attempts to use\n // HttpClient.jsonp() without installing the HttpClientJsonpModule\n if (req.method === 'JSONP') {\n throw new Error(`Attempted to construct Jsonp request without HttpClientJsonpModule installed.`);\n }\n // Everything happens on Observable subscription.\n return new Observable((observer) => {\n // Start by setting up the XHR object with request method, URL, and withCredentials flag.\n const xhr = this.xhrFactory.build();\n xhr.open(req.method, req.urlWithParams);\n if (!!req.withCredentials) {\n xhr.withCredentials = true;\n }\n // Add all the requested headers.\n req.headers.forEach((name, values) => xhr.setRequestHeader(name, values.join(',')));\n // Add an Accept header if one isn't present already.\n if (!req.headers.has('Accept')) {\n xhr.setRequestHeader('Accept', 'application/json, text/plain, */*');\n }\n // Auto-detect the Content-Type header if one isn't present already.\n if (!req.headers.has('Content-Type')) {\n const detectedType = req.detectContentTypeHeader();\n // Sometimes Content-Type detection fails.\n if (detectedType !== null) {\n xhr.setRequestHeader('Content-Type', detectedType);\n }\n }\n // Set the responseType if one was requested.\n if (req.responseType) {\n const responseType = req.responseType.toLowerCase();\n // JSON responses need to be processed as text. This is because if the server\n // returns an XSSI-prefixed JSON response, the browser will fail to parse it,\n // xhr.response will be null, and xhr.responseText cannot be accessed to\n // retrieve the prefixed JSON data in order to strip the prefix. Thus, all JSON\n // is parsed by first requesting text and then applying JSON.parse.\n xhr.responseType = ((responseType !== 'json') ? responseType : 'text');\n }\n // Serialize the request body if one is present. If not, this will be set to null.\n const reqBody = req.serializeBody();\n // If progress events are enabled, response headers will be delivered\n // in two events - the HttpHeaderResponse event and the full HttpResponse\n // event. However, since response headers don't change in between these\n // two events, it doesn't make sense to parse them twice. So headerResponse\n // caches the data extracted from the response whenever it's first parsed,\n // to ensure parsing isn't duplicated.\n let headerResponse = null;\n // partialFromXhr extracts the HttpHeaderResponse from the current XMLHttpRequest\n // state, and memoizes it into headerResponse.\n const partialFromXhr = () => {\n if (headerResponse !== null) {\n return headerResponse;\n }\n const statusText = xhr.statusText || 'OK';\n // Parse headers from XMLHttpRequest - this step is lazy.\n const headers = new HttpHeaders(xhr.getAllResponseHeaders());\n // Read the response URL from the XMLHttpResponse instance and fall back on the\n // request URL.\n const url = getResponseUrl(xhr) || req.url;\n // Construct the HttpHeaderResponse and memoize it.\n headerResponse = new HttpHeaderResponse({ headers, status: xhr.status, statusText, url });\n return headerResponse;\n };\n // Next, a few closures are defined for the various events which XMLHttpRequest can\n // emit. This allows them to be unregistered as event listeners later.\n // First up is the load event, which represents a response being fully available.\n const onLoad = () => {\n // Read response state from the memoized partial data.\n let { headers, status, statusText, url } = partialFromXhr();\n // The body will be read out if present.\n let body = null;\n if (status !== 204 /* HttpStatusCode.NoContent */) {\n // Use XMLHttpRequest.response if set, responseText otherwise.\n body = (typeof xhr.response === 'undefined') ? xhr.responseText : xhr.response;\n }\n // Normalize another potential bug (this one comes from CORS).\n if (status === 0) {\n status = !!body ? 200 /* HttpStatusCode.Ok */ : 0;\n }\n // ok determines whether the response will be transmitted on the event or\n // error channel. Unsuccessful status codes (not 2xx) will always be errors,\n // but a successful status code can still result in an error if the user\n // asked for JSON data and the body cannot be parsed as such.\n let ok = status >= 200 && status < 300;\n // Check whether the body needs to be parsed as JSON (in many cases the browser\n // will have done that already).\n if (req.responseType === 'json' && typeof body === 'string') {\n // Save the original body, before attempting XSSI prefix stripping.\n const originalBody = body;\n body = body.replace(XSSI_PREFIX, '');\n try {\n // Attempt the parse. If it fails, a parse error should be delivered to the user.\n body = body !== '' ? JSON.parse(body) : null;\n }\n catch (error) {\n // Since the JSON.parse failed, it's reasonable to assume this might not have been a\n // JSON response. Restore the original body (including any XSSI prefix) to deliver\n // a better error response.\n body = originalBody;\n // If this was an error request to begin with, leave it as a string, it probably\n // just isn't JSON. Otherwise, deliver the parsing error to the user.\n if (ok) {\n // Even though the response status was 2xx, this is still an error.\n ok = false;\n // The parse error contains the text of the body that failed to parse.\n body = { error, text: body };\n }\n }\n }\n if (ok) {\n // A successful response is delivered on the event stream.\n observer.next(new HttpResponse({\n body,\n headers,\n status,\n statusText,\n url: url || undefined,\n }));\n // The full body has been received and delivered, no further events\n // are possible. This request is complete.\n observer.complete();\n }\n else {\n // An unsuccessful request is delivered on the error channel.\n observer.error(new HttpErrorResponse({\n // The error in this case is the response body (error from the server).\n error: body,\n headers,\n status,\n statusText,\n url: url || undefined,\n }));\n }\n };\n // The onError callback is called when something goes wrong at the network level.\n // Connection timeout, DNS error, offline, etc. These are actual errors, and are\n // transmitted on the error channel.\n const onError = (error) => {\n const { url } = partialFromXhr();\n const res = new HttpErrorResponse({\n error,\n status: xhr.status || 0,\n statusText: xhr.statusText || 'Unknown Error',\n url: url || undefined,\n });\n observer.error(res);\n };\n // The sentHeaders flag tracks whether the HttpResponseHeaders event\n // has been sent on the stream. This is necessary to track if progress\n // is enabled since the event will be sent on only the first download\n // progress event.\n let sentHeaders = false;\n // The download progress event handler, which is only registered if\n // progress events are enabled.\n const onDownProgress = (event) => {\n // Send the HttpResponseHeaders event if it hasn't been sent already.\n if (!sentHeaders) {\n observer.next(partialFromXhr());\n sentHeaders = true;\n }\n // Start building the download progress event to deliver on the response\n // event stream.\n let progressEvent = {\n type: HttpEventType.DownloadProgress,\n loaded: event.loaded,\n };\n // Set the total number of bytes in the event if it's available.\n if (event.lengthComputable) {\n progressEvent.total = event.total;\n }\n // If the request was for text content and a partial response is\n // available on XMLHttpRequest, include it in the progress event\n // to allow for streaming reads.\n if (req.responseType === 'text' && !!xhr.responseText) {\n progressEvent.partialText = xhr.responseText;\n }\n // Finally, fire the event.\n observer.next(progressEvent);\n };\n // The upload progress event handler, which is only registered if\n // progress events are enabled.\n const onUpProgress = (event) => {\n // Upload progress events are simpler. Begin building the progress\n // event.\n let progress = {\n type: HttpEventType.UploadProgress,\n loaded: event.loaded,\n };\n // If the total number of bytes being uploaded is available, include\n // it.\n if (event.lengthComputable) {\n progress.total = event.total;\n }\n // Send the event.\n observer.next(progress);\n };\n // By default, register for load and error events.\n xhr.addEventListener('load', onLoad);\n xhr.addEventListener('error', onError);\n xhr.addEventListener('timeout', onError);\n xhr.addEventListener('abort', onError);\n // Progress events are only enabled if requested.\n if (req.reportProgress) {\n // Download progress is always enabled if requested.\n xhr.addEventListener('progress', onDownProgress);\n // Upload progress depends on whether there is a body to upload.\n if (reqBody !== null && xhr.upload) {\n xhr.upload.addEventListener('progress', onUpProgress);\n }\n }\n // Fire the request, and notify the event stream that it was fired.\n xhr.send(reqBody);\n observer.next({ type: HttpEventType.Sent });\n // This is the return from the Observable function, which is the\n // request cancellation handler.\n return () => {\n // On a cancellation, remove all registered event listeners.\n xhr.removeEventListener('error', onError);\n xhr.removeEventListener('abort', onError);\n xhr.removeEventListener('load', onLoad);\n xhr.removeEventListener('timeout', onError);\n if (req.reportProgress) {\n xhr.removeEventListener('progress', onDownProgress);\n if (reqBody !== null && xhr.upload) {\n xhr.upload.removeEventListener('progress', onUpProgress);\n }\n }\n // Finally, abort the in-flight request.\n if (xhr.readyState !== xhr.DONE) {\n xhr.abort();\n }\n };\n });\n }\n}\nHttpXhrBackend.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: HttpXhrBackend, deps: [{ token: i1.XhrFactory }], target: i0.ɵɵFactoryTarget.Injectable });\nHttpXhrBackend.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: HttpXhrBackend });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: HttpXhrBackend, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i1.XhrFactory }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst XSRF_ENABLED = new InjectionToken('XSRF_ENABLED');\nconst XSRF_DEFAULT_COOKIE_NAME = 'XSRF-TOKEN';\nconst XSRF_COOKIE_NAME = new InjectionToken('XSRF_COOKIE_NAME', {\n providedIn: 'root',\n factory: () => XSRF_DEFAULT_COOKIE_NAME,\n});\nconst XSRF_DEFAULT_HEADER_NAME = 'X-XSRF-TOKEN';\nconst XSRF_HEADER_NAME = new InjectionToken('XSRF_HEADER_NAME', {\n providedIn: 'root',\n factory: () => XSRF_DEFAULT_HEADER_NAME,\n});\n/**\n * Retrieves the current XSRF token to use with the next outgoing request.\n *\n * @publicApi\n */\nclass HttpXsrfTokenExtractor {\n}\n/**\n * `HttpXsrfTokenExtractor` which retrieves the token from a cookie.\n */\nclass HttpXsrfCookieExtractor {\n constructor(doc, platform, cookieName) {\n this.doc = doc;\n this.platform = platform;\n this.cookieName = cookieName;\n this.lastCookieString = '';\n this.lastToken = null;\n /**\n * @internal for testing\n */\n this.parseCount = 0;\n }\n getToken() {\n if (this.platform === 'server') {\n return null;\n }\n const cookieString = this.doc.cookie || '';\n if (cookieString !== this.lastCookieString) {\n this.parseCount++;\n this.lastToken = ɵparseCookieValue(cookieString, this.cookieName);\n this.lastCookieString = cookieString;\n }\n return this.lastToken;\n }\n}\nHttpXsrfCookieExtractor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: HttpXsrfCookieExtractor, deps: [{ token: DOCUMENT }, { token: PLATFORM_ID }, { token: XSRF_COOKIE_NAME }], target: i0.ɵɵFactoryTarget.Injectable });\nHttpXsrfCookieExtractor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: HttpXsrfCookieExtractor });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: HttpXsrfCookieExtractor, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [PLATFORM_ID]\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [XSRF_COOKIE_NAME]\n }] }]; } });\nfunction xsrfInterceptorFn(req, next) {\n const lcUrl = req.url.toLowerCase();\n // Skip both non-mutating requests and absolute URLs.\n // Non-mutating requests don't require a token, and absolute URLs require special handling\n // anyway as the cookie set\n // on our origin is not the same as the token expected by another origin.\n if (!inject(XSRF_ENABLED) || req.method === 'GET' || req.method === 'HEAD' ||\n lcUrl.startsWith('http://') || lcUrl.startsWith('https://')) {\n return next(req);\n }\n const token = inject(HttpXsrfTokenExtractor).getToken();\n const headerName = inject(XSRF_HEADER_NAME);\n // Be careful not to overwrite an existing header of the same name.\n if (token != null && !req.headers.has(headerName)) {\n req = req.clone({ headers: req.headers.set(headerName, token) });\n }\n return next(req);\n}\n/**\n * `HttpInterceptor` which adds an XSRF token to eligible outgoing requests.\n */\nclass HttpXsrfInterceptor {\n constructor(injector) {\n this.injector = injector;\n }\n intercept(initialRequest, next) {\n return this.injector.runInContext(() => xsrfInterceptorFn(initialRequest, downstreamRequest => next.handle(downstreamRequest)));\n }\n}\nHttpXsrfInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: HttpXsrfInterceptor, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });\nHttpXsrfInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: HttpXsrfInterceptor });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: HttpXsrfInterceptor, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i0.EnvironmentInjector }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Identifies a particular kind of `HttpFeature`.\n *\n * @publicApi\n */\nvar HttpFeatureKind;\n(function (HttpFeatureKind) {\n HttpFeatureKind[HttpFeatureKind[\"Interceptors\"] = 0] = \"Interceptors\";\n HttpFeatureKind[HttpFeatureKind[\"LegacyInterceptors\"] = 1] = \"LegacyInterceptors\";\n HttpFeatureKind[HttpFeatureKind[\"CustomXsrfConfiguration\"] = 2] = \"CustomXsrfConfiguration\";\n HttpFeatureKind[HttpFeatureKind[\"NoXsrfProtection\"] = 3] = \"NoXsrfProtection\";\n HttpFeatureKind[HttpFeatureKind[\"JsonpSupport\"] = 4] = \"JsonpSupport\";\n HttpFeatureKind[HttpFeatureKind[\"RequestsMadeViaParent\"] = 5] = \"RequestsMadeViaParent\";\n})(HttpFeatureKind || (HttpFeatureKind = {}));\nfunction makeHttpFeature(kind, providers) {\n return {\n ɵkind: kind,\n ɵproviders: providers,\n };\n}\n/**\n * Configures Angular's `HttpClient` service to be available for injection.\n *\n * By default, `HttpClient` will be configured for injection with its default options for XSRF\n * protection of outgoing requests. Additional configuration options can be provided by passing\n * feature functions to `provideHttpClient`. For example, HTTP interceptors can be added using the\n * `withInterceptors(...)` feature.\n *\n * @see withInterceptors\n * @see withInterceptorsFromDi\n * @see withXsrfConfiguration\n * @see withNoXsrfProtection\n * @see withJsonpSupport\n * @see withRequestsMadeViaParent\n */\nfunction provideHttpClient(...features) {\n if (ngDevMode) {\n const featureKinds = new Set(features.map(f => f.ɵkind));\n if (featureKinds.has(HttpFeatureKind.NoXsrfProtection) &&\n featureKinds.has(HttpFeatureKind.CustomXsrfConfiguration)) {\n throw new Error(ngDevMode ?\n `Configuration error: found both withXsrfConfiguration() and withNoXsrfProtection() in the same call to provideHttpClient(), which is a contradiction.` :\n '');\n }\n }\n const providers = [\n HttpClient,\n HttpXhrBackend,\n HttpInterceptorHandler,\n { provide: HttpHandler, useExisting: HttpInterceptorHandler },\n { provide: HttpBackend, useExisting: HttpXhrBackend },\n {\n provide: HTTP_INTERCEPTOR_FNS,\n useValue: xsrfInterceptorFn,\n multi: true,\n },\n { provide: XSRF_ENABLED, useValue: true },\n { provide: HttpXsrfTokenExtractor, useClass: HttpXsrfCookieExtractor },\n ];\n for (const feature of features) {\n providers.push(...feature.ɵproviders);\n }\n return makeEnvironmentProviders(providers);\n}\n/**\n * Adds one or more functional-style HTTP interceptors to the configuration of the `HttpClient`\n * instance.\n *\n * @see HttpInterceptorFn\n * @see provideHttpClient\n * @publicApi\n */\nfunction withInterceptors(interceptorFns) {\n return makeHttpFeature(HttpFeatureKind.Interceptors, interceptorFns.map(interceptorFn => {\n return {\n provide: HTTP_INTERCEPTOR_FNS,\n useValue: interceptorFn,\n multi: true,\n };\n }));\n}\nconst LEGACY_INTERCEPTOR_FN = new InjectionToken('LEGACY_INTERCEPTOR_FN');\n/**\n * Includes class-based interceptors configured using a multi-provider in the current injector into\n * the configured `HttpClient` instance.\n *\n * Prefer `withInterceptors` and functional interceptors instead, as support for DI-provided\n * interceptors may be phased out in a later release.\n *\n * @see HttpInterceptor\n * @see HTTP_INTERCEPTORS\n * @see provideHttpClient\n */\nfunction withInterceptorsFromDi() {\n // Note: the legacy interceptor function is provided here via an intermediate token\n // (`LEGACY_INTERCEPTOR_FN`), using a pattern which guarantees that if these providers are\n // included multiple times, all of the multi-provider entries will have the same instance of the\n // interceptor function. That way, the `HttpINterceptorHandler` will dedup them and legacy\n // interceptors will not run multiple times.\n return makeHttpFeature(HttpFeatureKind.LegacyInterceptors, [\n {\n provide: LEGACY_INTERCEPTOR_FN,\n useFactory: legacyInterceptorFnFactory,\n },\n {\n provide: HTTP_INTERCEPTOR_FNS,\n useExisting: LEGACY_INTERCEPTOR_FN,\n multi: true,\n }\n ]);\n}\n/**\n * Customizes the XSRF protection for the configuration of the current `HttpClient` instance.\n *\n * This feature is incompatible with the `withNoXsrfProtection` feature.\n *\n * @see provideHttpClient\n */\nfunction withXsrfConfiguration({ cookieName, headerName }) {\n const providers = [];\n if (cookieName !== undefined) {\n providers.push({ provide: XSRF_COOKIE_NAME, useValue: cookieName });\n }\n if (headerName !== undefined) {\n providers.push({ provide: XSRF_HEADER_NAME, useValue: headerName });\n }\n return makeHttpFeature(HttpFeatureKind.CustomXsrfConfiguration, providers);\n}\n/**\n * Disables XSRF protection in the configuration of the current `HttpClient` instance.\n *\n * This feature is incompatible with the `withXsrfConfiguration` feature.\n *\n * @see provideHttpClient\n */\nfunction withNoXsrfProtection() {\n return makeHttpFeature(HttpFeatureKind.NoXsrfProtection, [\n {\n provide: XSRF_ENABLED,\n useValue: false,\n },\n ]);\n}\n/**\n * Add JSONP support to the configuration of the current `HttpClient` instance.\n *\n * @see provideHttpClient\n */\nfunction withJsonpSupport() {\n return makeHttpFeature(HttpFeatureKind.JsonpSupport, [\n JsonpClientBackend,\n { provide: JsonpCallbackContext, useFactory: jsonpCallbackContext },\n { provide: HTTP_INTERCEPTOR_FNS, useValue: jsonpInterceptorFn, multi: true },\n ]);\n}\n/**\n * Configures the current `HttpClient` instance to make requests via the parent injector's\n * `HttpClient` instead of directly.\n *\n * By default, `provideHttpClient` configures `HttpClient` in its injector to be an independent\n * instance. For example, even if `HttpClient` is configured in the parent injector with\n * one or more interceptors, they will not intercept requests made via this instance.\n *\n * With this option enabled, once the request has passed through the current injector's\n * interceptors, it will be delegated to the parent injector's `HttpClient` chain instead of\n * dispatched directly, and interceptors in the parent configuration will be applied to the request.\n *\n * If there are several `HttpClient` instances in the injector hierarchy, it's possible for\n * `withRequestsMadeViaParent` to be used at multiple levels, which will cause the request to\n * \"bubble up\" until either reaching the root level or an `HttpClient` which was not configured with\n * this option.\n *\n * @see provideHttpClient\n * @developerPreview\n */\nfunction withRequestsMadeViaParent() {\n return makeHttpFeature(HttpFeatureKind.RequestsMadeViaParent, [\n {\n provide: HttpBackend,\n useFactory: () => {\n const handlerFromParent = inject(HttpHandler, { skipSelf: true, optional: true });\n if (ngDevMode && handlerFromParent === null) {\n throw new Error('withRequestsMadeViaParent() can only be used when the parent injector also configures HttpClient');\n }\n return handlerFromParent;\n },\n },\n ]);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Configures XSRF protection support for outgoing requests.\n *\n * For a server that supports a cookie-based XSRF protection system,\n * use directly to configure XSRF protection with the correct\n * cookie and header names.\n *\n * If no names are supplied, the default cookie name is `XSRF-TOKEN`\n * and the default header name is `X-XSRF-TOKEN`.\n *\n * @publicApi\n */\nclass HttpClientXsrfModule {\n /**\n * Disable the default XSRF protection.\n */\n static disable() {\n return {\n ngModule: HttpClientXsrfModule,\n providers: [\n withNoXsrfProtection().ɵproviders,\n ],\n };\n }\n /**\n * Configure XSRF protection.\n * @param options An object that can specify either or both\n * cookie name or header name.\n * - Cookie name default is `XSRF-TOKEN`.\n * - Header name default is `X-XSRF-TOKEN`.\n *\n */\n static withOptions(options = {}) {\n return {\n ngModule: HttpClientXsrfModule,\n providers: withXsrfConfiguration(options).ɵproviders,\n };\n }\n}\nHttpClientXsrfModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: HttpClientXsrfModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nHttpClientXsrfModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.0.4\", ngImport: i0, type: HttpClientXsrfModule });\nHttpClientXsrfModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: HttpClientXsrfModule, providers: [\n HttpXsrfInterceptor,\n { provide: HTTP_INTERCEPTORS, useExisting: HttpXsrfInterceptor, multi: true },\n { provide: HttpXsrfTokenExtractor, useClass: HttpXsrfCookieExtractor },\n withXsrfConfiguration({\n cookieName: XSRF_DEFAULT_COOKIE_NAME,\n headerName: XSRF_DEFAULT_HEADER_NAME,\n }).ɵproviders,\n { provide: XSRF_ENABLED, useValue: true },\n ] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: HttpClientXsrfModule, decorators: [{\n type: NgModule,\n args: [{\n providers: [\n HttpXsrfInterceptor,\n { provide: HTTP_INTERCEPTORS, useExisting: HttpXsrfInterceptor, multi: true },\n { provide: HttpXsrfTokenExtractor, useClass: HttpXsrfCookieExtractor },\n withXsrfConfiguration({\n cookieName: XSRF_DEFAULT_COOKIE_NAME,\n headerName: XSRF_DEFAULT_HEADER_NAME,\n }).ɵproviders,\n { provide: XSRF_ENABLED, useValue: true },\n ],\n }]\n }] });\n/**\n * Configures the [dependency injector](guide/glossary#injector) for `HttpClient`\n * with supporting services for XSRF. Automatically imported by `HttpClientModule`.\n *\n * You can add interceptors to the chain behind `HttpClient` by binding them to the\n * multiprovider for built-in [DI token](guide/glossary#di-token) `HTTP_INTERCEPTORS`.\n *\n * @publicApi\n */\nclass HttpClientModule {\n}\nHttpClientModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: HttpClientModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nHttpClientModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.0.4\", ngImport: i0, type: HttpClientModule });\nHttpClientModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: HttpClientModule, providers: [\n provideHttpClient(withInterceptorsFromDi(), withXsrfConfiguration({\n cookieName: XSRF_DEFAULT_COOKIE_NAME,\n headerName: XSRF_DEFAULT_HEADER_NAME,\n })),\n ] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: HttpClientModule, decorators: [{\n type: NgModule,\n args: [{\n /**\n * Configures the [dependency injector](guide/glossary#injector) where it is imported\n * with supporting services for HTTP communications.\n */\n providers: [\n provideHttpClient(withInterceptorsFromDi(), withXsrfConfiguration({\n cookieName: XSRF_DEFAULT_COOKIE_NAME,\n headerName: XSRF_DEFAULT_HEADER_NAME,\n })),\n ],\n }]\n }] });\n/**\n * Configures the [dependency injector](guide/glossary#injector) for `HttpClient`\n * with supporting services for JSONP.\n * Without this module, Jsonp requests reach the backend\n * with method JSONP, where they are rejected.\n *\n * @publicApi\n */\nclass HttpClientJsonpModule {\n}\nHttpClientJsonpModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: HttpClientJsonpModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nHttpClientJsonpModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.0.4\", ngImport: i0, type: HttpClientJsonpModule });\nHttpClientJsonpModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: HttpClientJsonpModule, providers: [\n withJsonpSupport().ɵproviders,\n ] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.4\", ngImport: i0, type: HttpClientJsonpModule, decorators: [{\n type: NgModule,\n args: [{\n providers: [\n withJsonpSupport().ɵproviders,\n ],\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A wrapper around the `XMLHttpRequest` constructor.\n *\n * @publicApi\n * @see `XhrFactory`\n * @deprecated\n * `XhrFactory` has moved, please import `XhrFactory` from `@angular/common` instead.\n */\nconst XhrFactory = XhrFactory$1;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { HTTP_INTERCEPTORS, HttpBackend, HttpClient, HttpClientJsonpModule, HttpClientModule, HttpClientXsrfModule, HttpContext, HttpContextToken, HttpErrorResponse, HttpEventType, HttpFeatureKind, HttpHandler, HttpHeaderResponse, HttpHeaders, HttpParams, HttpRequest, HttpResponse, HttpResponseBase, HttpUrlEncodingCodec, HttpXhrBackend, HttpXsrfTokenExtractor, JsonpClientBackend, JsonpInterceptor, XhrFactory, provideHttpClient, withInterceptors, withInterceptorsFromDi, withJsonpSupport, withNoXsrfProtection, withRequestsMadeViaParent, withXsrfConfiguration, HttpInterceptorHandler as ɵHttpInterceptingHandler, HttpInterceptorHandler as ɵHttpInterceptorHandler };\n","import { innerFrom } from '../observable/innerFrom';\nimport { Observable } from '../Observable';\nimport { mergeMap } from '../operators/mergeMap';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isFunction } from '../util/isFunction';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nconst nodeEventEmitterMethods = ['addListener', 'removeListener'];\nconst eventTargetMethods = ['addEventListener', 'removeEventListener'];\nconst jqueryMethods = ['on', 'off'];\nexport function fromEvent(target, eventName, options, resultSelector) {\n if (isFunction(options)) {\n resultSelector = options;\n options = undefined;\n }\n if (resultSelector) {\n return fromEvent(target, eventName, options).pipe(mapOneOrManyArgs(resultSelector));\n }\n const [add, remove] = isEventTarget(target)\n ? eventTargetMethods.map((methodName) => (handler) => target[methodName](eventName, handler, options))\n :\n isNodeStyleEventEmitter(target)\n ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName))\n : isJQueryStyleEventEmitter(target)\n ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName))\n : [];\n if (!add) {\n if (isArrayLike(target)) {\n return mergeMap((subTarget) => fromEvent(subTarget, eventName, options))(innerFrom(target));\n }\n }\n if (!add) {\n throw new TypeError('Invalid event target');\n }\n return new Observable((subscriber) => {\n const handler = (...args) => subscriber.next(1 < args.length ? args : args[0]);\n add(handler);\n return () => remove(handler);\n });\n}\nfunction toCommonHandlerRegistry(target, eventName) {\n return (methodName) => (handler) => target[methodName](eventName, handler);\n}\nfunction isNodeStyleEventEmitter(target) {\n return isFunction(target.addListener) && isFunction(target.removeListener);\n}\nfunction isJQueryStyleEventEmitter(target) {\n return isFunction(target.on) && isFunction(target.off);\n}\nfunction isEventTarget(target) {\n return isFunction(target.addEventListener) && isFunction(target.removeEventListener);\n}\n","export const COMPLETE_NOTIFICATION = (() => createNotification('C', undefined, undefined))();\nexport function errorNotification(error) {\n return createNotification('E', undefined, error);\n}\nexport function nextNotification(value) {\n return createNotification('N', value, undefined);\n}\nexport function createNotification(kind, value, error) {\n return {\n kind,\n value,\n error,\n };\n}\n","import { isFunction } from './util/isFunction';\nimport { isSubscription, Subscription } from './Subscription';\nimport { config } from './config';\nimport { reportUnhandledError } from './util/reportUnhandledError';\nimport { noop } from './util/noop';\nimport { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories';\nimport { timeoutProvider } from './scheduler/timeoutProvider';\nimport { captureError } from './util/errorContext';\nexport class Subscriber extends Subscription {\n constructor(destination) {\n super();\n this.isStopped = false;\n if (destination) {\n this.destination = destination;\n if (isSubscription(destination)) {\n destination.add(this);\n }\n }\n else {\n this.destination = EMPTY_OBSERVER;\n }\n }\n static create(next, error, complete) {\n return new SafeSubscriber(next, error, complete);\n }\n next(value) {\n if (this.isStopped) {\n handleStoppedNotification(nextNotification(value), this);\n }\n else {\n this._next(value);\n }\n }\n error(err) {\n if (this.isStopped) {\n handleStoppedNotification(errorNotification(err), this);\n }\n else {\n this.isStopped = true;\n this._error(err);\n }\n }\n complete() {\n if (this.isStopped) {\n handleStoppedNotification(COMPLETE_NOTIFICATION, this);\n }\n else {\n this.isStopped = true;\n this._complete();\n }\n }\n unsubscribe() {\n if (!this.closed) {\n this.isStopped = true;\n super.unsubscribe();\n this.destination = null;\n }\n }\n _next(value) {\n this.destination.next(value);\n }\n _error(err) {\n try {\n this.destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n }\n _complete() {\n try {\n this.destination.complete();\n }\n finally {\n this.unsubscribe();\n }\n }\n}\nconst _bind = Function.prototype.bind;\nfunction bind(fn, thisArg) {\n return _bind.call(fn, thisArg);\n}\nclass ConsumerObserver {\n constructor(partialObserver) {\n this.partialObserver = partialObserver;\n }\n next(value) {\n const { partialObserver } = this;\n if (partialObserver.next) {\n try {\n partialObserver.next(value);\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n }\n error(err) {\n const { partialObserver } = this;\n if (partialObserver.error) {\n try {\n partialObserver.error(err);\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n else {\n handleUnhandledError(err);\n }\n }\n complete() {\n const { partialObserver } = this;\n if (partialObserver.complete) {\n try {\n partialObserver.complete();\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n }\n}\nexport class SafeSubscriber extends Subscriber {\n constructor(observerOrNext, error, complete) {\n super();\n let partialObserver;\n if (isFunction(observerOrNext) || !observerOrNext) {\n partialObserver = {\n next: (observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined),\n error: error !== null && error !== void 0 ? error : undefined,\n complete: complete !== null && complete !== void 0 ? complete : undefined,\n };\n }\n else {\n let context;\n if (this && config.useDeprecatedNextContext) {\n context = Object.create(observerOrNext);\n context.unsubscribe = () => this.unsubscribe();\n partialObserver = {\n next: observerOrNext.next && bind(observerOrNext.next, context),\n error: observerOrNext.error && bind(observerOrNext.error, context),\n complete: observerOrNext.complete && bind(observerOrNext.complete, context),\n };\n }\n else {\n partialObserver = observerOrNext;\n }\n }\n this.destination = new ConsumerObserver(partialObserver);\n }\n}\nfunction handleUnhandledError(error) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n captureError(error);\n }\n else {\n reportUnhandledError(error);\n }\n}\nfunction defaultErrorHandler(err) {\n throw err;\n}\nfunction handleStoppedNotification(notification, subscriber) {\n const { onStoppedNotification } = config;\n onStoppedNotification && timeoutProvider.setTimeout(() => onStoppedNotification(notification, subscriber));\n}\nexport const EMPTY_OBSERVER = {\n closed: true,\n next: noop,\n error: defaultErrorHandler,\n complete: noop,\n};\n","//! moment.js locale configuration\n//! locale : English (India) [en-in]\n//! author : Jatin Agrawal : https://github.com/jatinag22\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enIn = moment.defineLocale('en-in', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A',\n },\n calendar: {\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 relativeTime: {\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 M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((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 week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 1st is the first week of the year.\n },\n });\n\n return enIn;\n\n})));\n","import { Component, OnInit, Input } from '@angular/core';\n\n@Component({\n selector: 'bw-caption',\n templateUrl: './caption.component.html',\n styleUrls: ['./caption.component.scss']\n})\nexport class CaptionComponent {\n\n /** Whether the text is center aligned */\n @Input() centerAlign = false;\n\n /** The color of the text, can take any color class derived from css color variables found in theme.component.scss */\n @Input() color = 'bs-mid-gray';\n\n /** The space between the bottom of this element and the top of its subsequent sibling */\n @Input() verticalSpace = '0';\n\n constructor() {}\n\n}\n","<p text-small-regular [ngClass]=\"[ centerAlign ? 'center' : '' ]\" [ngStyle]=\"{'margin-bottom.px': verticalSpace, 'color': color }\">\n <ng-content></ng-content>\n</p>\n","//! moment.js locale configuration\n//! locale : Yoruba Nigeria [yo]\n//! author : Atolagbe Abisoye : https://github.com/andela-batolagbe\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var yo = moment.defineLocale('yo', {\n months: 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split(\n '_'\n ),\n monthsShort: 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'),\n weekdays: 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'),\n weekdaysShort: 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'),\n weekdaysMin: 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A',\n },\n calendar: {\n sameDay: '[Ònì ni] LT',\n nextDay: '[Ọ̀la ni] LT',\n nextWeek: \"dddd [Ọsẹ̀ tón'bọ] [ni] LT\",\n lastDay: '[Àna ni] LT',\n lastWeek: 'dddd [Ọsẹ̀ tólọ́] [ni] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'ní %s',\n past: '%s kọjá',\n s: 'ìsẹjú aayá die',\n ss: 'aayá %d',\n m: 'ìsẹjú kan',\n mm: 'ìsẹjú %d',\n h: 'wákati kan',\n hh: 'wákati %d',\n d: 'ọjọ́ kan',\n dd: 'ọjọ́ %d',\n M: 'osù kan',\n MM: 'osù %d',\n y: 'ọdún kan',\n yy: 'ọdún %d',\n },\n dayOfMonthOrdinalParse: /ọjọ́\\s\\d{1,2}/,\n ordinal: 'ọjọ́ %d',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return yo;\n\n})));\n","//! moment.js locale configuration\n//! locale : Lao [lo]\n//! author : Ryan Hart : https://github.com/ryanhart2\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var lo = moment.defineLocale('lo', {\n months: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(\n '_'\n ),\n monthsShort:\n 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(\n '_'\n ),\n weekdays: 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),\n weekdaysShort: 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),\n weekdaysMin: 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'ວັນdddd D MMMM YYYY HH:mm',\n },\n meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/,\n isPM: function (input) {\n return input === 'ຕອນແລງ';\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ຕອນເຊົ້າ';\n } else {\n return 'ຕອນແລງ';\n }\n },\n calendar: {\n sameDay: '[ມື້ນີ້ເວລາ] LT',\n nextDay: '[ມື້ອື່ນເວລາ] LT',\n nextWeek: '[ວັນ]dddd[ໜ້າເວລາ] LT',\n lastDay: '[ມື້ວານນີ້ເວລາ] LT',\n lastWeek: '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'ອີກ %s',\n past: '%sຜ່ານມາ',\n s: 'ບໍ່ເທົ່າໃດວິນາທີ',\n ss: '%d ວິນາທີ',\n m: '1 ນາທີ',\n mm: '%d ນາທີ',\n h: '1 ຊົ່ວໂມງ',\n hh: '%d ຊົ່ວໂມງ',\n d: '1 ມື້',\n dd: '%d ມື້',\n M: '1 ເດືອນ',\n MM: '%d ເດືອນ',\n y: '1 ປີ',\n yy: '%d ປີ',\n },\n dayOfMonthOrdinalParse: /(ທີ່)\\d{1,2}/,\n ordinal: function (number) {\n return 'ທີ່' + number;\n },\n });\n\n return lo;\n\n})));\n","//! moment.js locale configuration\n//! locale : Javanese [jv]\n//! author : Rony Lantip : https://github.com/lantip\n//! reference: http://jv.wikipedia.org/wiki/Basa_Jawa\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var jv = moment.defineLocale('jv', {\n months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'),\n weekdays: 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'),\n weekdaysShort: 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'),\n weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [pukul] HH.mm',\n LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',\n },\n meridiemParse: /enjing|siyang|sonten|ndalu/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'enjing') {\n return hour;\n } else if (meridiem === 'siyang') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'sonten' || meridiem === 'ndalu') {\n return hour + 12;\n }\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours < 11) {\n return 'enjing';\n } else if (hours < 15) {\n return 'siyang';\n } else if (hours < 19) {\n return 'sonten';\n } else {\n return 'ndalu';\n }\n },\n calendar: {\n sameDay: '[Dinten puniko pukul] LT',\n nextDay: '[Mbenjang pukul] LT',\n nextWeek: 'dddd [pukul] LT',\n lastDay: '[Kala wingi pukul] LT',\n lastWeek: 'dddd [kepengker pukul] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'wonten ing %s',\n past: '%s ingkang kepengker',\n s: 'sawetawis detik',\n ss: '%d detik',\n m: 'setunggal menit',\n mm: '%d menit',\n h: 'setunggal jam',\n hh: '%d jam',\n d: 'sedinten',\n dd: '%d dinten',\n M: 'sewulan',\n MM: '%d wulan',\n y: 'setaun',\n yy: '%d taun',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return jv;\n\n})));\n","//! moment.js locale configuration\n//! locale : Belarusian [be]\n//! author : Dmitry Demidov : https://github.com/demidov91\n//! author: Praleska: http://praleska.pro/\n//! Author : Menelion Elensúle : https://github.com/Oire\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11\n ? forms[0]\n : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)\n ? forms[1]\n : forms[2];\n }\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',\n mm: withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',\n hh: withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін',\n dd: 'дзень_дні_дзён',\n MM: 'месяц_месяцы_месяцаў',\n yy: 'год_гады_гадоў',\n };\n if (key === 'm') {\n return withoutSuffix ? 'хвіліна' : 'хвіліну';\n } else if (key === 'h') {\n return withoutSuffix ? 'гадзіна' : 'гадзіну';\n } else {\n return number + ' ' + plural(format[key], +number);\n }\n }\n\n var be = moment.defineLocale('be', {\n months: {\n format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split(\n '_'\n ),\n standalone:\n 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split(\n '_'\n ),\n },\n monthsShort:\n 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'),\n weekdays: {\n format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split(\n '_'\n ),\n standalone:\n 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split(\n '_'\n ),\n isFormat: /\\[ ?[Ууў] ?(?:мінулую|наступную)? ?\\] ?dddd/,\n },\n weekdaysShort: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),\n weekdaysMin: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY г.',\n LLL: 'D MMMM YYYY г., HH:mm',\n LLLL: 'dddd, D MMMM YYYY г., HH:mm',\n },\n calendar: {\n sameDay: '[Сёння ў] LT',\n nextDay: '[Заўтра ў] LT',\n lastDay: '[Учора ў] LT',\n nextWeek: function () {\n return '[У] dddd [ў] LT';\n },\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n case 3:\n case 5:\n case 6:\n return '[У мінулую] dddd [ў] LT';\n case 1:\n case 2:\n case 4:\n return '[У мінулы] dddd [ў] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'праз %s',\n past: '%s таму',\n s: 'некалькі секунд',\n m: relativeTimeWithPlural,\n mm: relativeTimeWithPlural,\n h: relativeTimeWithPlural,\n hh: relativeTimeWithPlural,\n d: 'дзень',\n dd: relativeTimeWithPlural,\n M: 'месяц',\n MM: relativeTimeWithPlural,\n y: 'год',\n yy: relativeTimeWithPlural,\n },\n meridiemParse: /ночы|раніцы|дня|вечара/,\n isPM: function (input) {\n return /^(дня|вечара)$/.test(input);\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'ночы';\n } else if (hour < 12) {\n return 'раніцы';\n } else if (hour < 17) {\n return 'дня';\n } else {\n return 'вечара';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(і|ы|га)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'M':\n case 'd':\n case 'DDD':\n case 'w':\n case 'W':\n return (number % 10 === 2 || number % 10 === 3) &&\n number % 100 !== 12 &&\n number % 100 !== 13\n ? number + '-і'\n : number + '-ы';\n case 'D':\n return number + '-га';\n default:\n return number;\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return be;\n\n})));\n","//! moment.js locale configuration\n//! locale : Burmese [my]\n//! author : Squar team, mysquar.com\n//! author : David Rossellat : https://github.com/gholadr\n//! author : Tin Aung Lin : https://github.com/thanyawzinmin\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '၁',\n 2: '၂',\n 3: '၃',\n 4: '၄',\n 5: '၅',\n 6: '၆',\n 7: '၇',\n 8: '၈',\n 9: '၉',\n 0: '၀',\n },\n numberMap = {\n '၁': '1',\n '၂': '2',\n '၃': '3',\n '၄': '4',\n '၅': '5',\n '၆': '6',\n '၇': '7',\n '၈': '8',\n '၉': '9',\n '၀': '0',\n };\n\n var my = moment.defineLocale('my', {\n months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split(\n '_'\n ),\n monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'),\n weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split(\n '_'\n ),\n weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),\n weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),\n\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[ယနေ.] LT [မှာ]',\n nextDay: '[မနက်ဖြန်] LT [မှာ]',\n nextWeek: 'dddd LT [မှာ]',\n lastDay: '[မနေ.က] LT [မှာ]',\n lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'လာမည့် %s မှာ',\n past: 'လွန်ခဲ့သော %s က',\n s: 'စက္ကန်.အနည်းငယ်',\n ss: '%d စက္ကန့်',\n m: 'တစ်မိနစ်',\n mm: '%d မိနစ်',\n h: 'တစ်နာရီ',\n hh: '%d နာရီ',\n d: 'တစ်ရက်',\n dd: '%d ရက်',\n M: 'တစ်လ',\n MM: '%d လ',\n y: 'တစ်နှစ်',\n yy: '%d နှစ်',\n },\n preparse: function (string) {\n return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return my;\n\n})));\n","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { RoutingStateService } from '@brightside/brightside-ui-services';\n\n@Component({\n selector: 'bw-back',\n templateUrl: './back.component.html',\n styleUrls: ['./back.component.scss']\n})\nexport class BackComponent {\n @Output() back = new EventEmitter();\n @Input() emit = false;\n\n constructor(private routingState:RoutingStateService) { }\n\n\n\n goBack() {\n if (this.emit){\n this.back.emit();\n } else {\n // this allows for directive events to fire\n setTimeout(()=>{\n this.routingState.goBack();\n },10);\n }\n }\n}\n","<a bw-anchor [prefixIconName]=\"'arrow_left'\" (click)=\"goBack()\" color=\"var(--secondary-text)\" anchorStyle=\"text-large-regular\"><span class=\"hidden-mobile\">Back</span></a>\n","import { ReplaySubject } from '../ReplaySubject';\nimport { share } from './share';\nexport function shareReplay(configOrBufferSize, windowTime, scheduler) {\n let bufferSize;\n let refCount = false;\n if (configOrBufferSize && typeof configOrBufferSize === 'object') {\n ({ bufferSize = Infinity, windowTime = Infinity, refCount = false, scheduler } = configOrBufferSize);\n }\n else {\n bufferSize = (configOrBufferSize !== null && configOrBufferSize !== void 0 ? configOrBufferSize : Infinity);\n }\n return share({\n connector: () => new ReplaySubject(bufferSize, windowTime, scheduler),\n resetOnError: true,\n resetOnComplete: false,\n resetOnRefCountZero: refCount,\n });\n}\n","import { updateSession } from './session.js';\nimport { isPlainObject } from './utils-hoist/is.js';\nimport { logger } from './utils-hoist/logger.js';\nimport { uuid4 } from './utils-hoist/misc.js';\nimport { generateTraceId, generateSpanId } from './utils-hoist/propagationContext.js';\nimport { dateTimestampInSeconds } from './utils-hoist/time.js';\nimport { merge } from './utils/merge.js';\nimport { _setSpanForScope, _getSpanForScope } from './utils/spanOnScope.js';\n\n/**\n * Default value for maximum number of breadcrumbs added to an event.\n */\nconst DEFAULT_MAX_BREADCRUMBS = 100;\n\n/**\n * Holds additional event information.\n */\nclass ScopeClass {\n /** Flag if notifying is happening. */\n\n /** Callback for client to receive scope changes. */\n\n /** Callback list that will be called during event processing. */\n\n /** Array of breadcrumbs. */\n\n /** User */\n\n /** Tags */\n\n /** Extra */\n\n /** Contexts */\n\n /** Attachments */\n\n /** Propagation Context for distributed tracing */\n\n /**\n * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get\n * sent to Sentry\n */\n\n /** Fingerprint */\n\n /** Severity */\n\n /**\n * Transaction Name\n *\n * IMPORTANT: The transaction name on the scope has nothing to do with root spans/transaction objects.\n * It's purpose is to assign a transaction to the scope that's added to non-transaction events.\n */\n\n /** Session */\n\n /** Request Mode Session Status */\n // eslint-disable-next-line deprecation/deprecation\n\n /** The client on this scope */\n\n /** Contains the last event id of a captured event. */\n\n // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method.\n\n constructor() {\n this._notifyingListeners = false;\n this._scopeListeners = [];\n this._eventProcessors = [];\n this._breadcrumbs = [];\n this._attachments = [];\n this._user = {};\n this._tags = {};\n this._extra = {};\n this._contexts = {};\n this._sdkProcessingMetadata = {};\n this._propagationContext = {\n traceId: generateTraceId(),\n spanId: generateSpanId(),\n };\n }\n\n /**\n * @inheritDoc\n */\n clone() {\n const newScope = new ScopeClass();\n newScope._breadcrumbs = [...this._breadcrumbs];\n newScope._tags = { ...this._tags };\n newScope._extra = { ...this._extra };\n newScope._contexts = { ...this._contexts };\n if (this._contexts.flags) {\n // We need to copy the `values` array so insertions on a cloned scope\n // won't affect the original array.\n newScope._contexts.flags = {\n values: [...this._contexts.flags.values],\n };\n }\n\n newScope._user = this._user;\n newScope._level = this._level;\n newScope._session = this._session;\n newScope._transactionName = this._transactionName;\n newScope._fingerprint = this._fingerprint;\n newScope._eventProcessors = [...this._eventProcessors];\n newScope._requestSession = this._requestSession;\n newScope._attachments = [...this._attachments];\n newScope._sdkProcessingMetadata = { ...this._sdkProcessingMetadata };\n newScope._propagationContext = { ...this._propagationContext };\n newScope._client = this._client;\n newScope._lastEventId = this._lastEventId;\n\n _setSpanForScope(newScope, _getSpanForScope(this));\n\n return newScope;\n }\n\n /**\n * @inheritDoc\n */\n setClient(client) {\n this._client = client;\n }\n\n /**\n * @inheritDoc\n */\n setLastEventId(lastEventId) {\n this._lastEventId = lastEventId;\n }\n\n /**\n * @inheritDoc\n */\n getClient() {\n return this._client ;\n }\n\n /**\n * @inheritDoc\n */\n lastEventId() {\n return this._lastEventId;\n }\n\n /**\n * @inheritDoc\n */\n addScopeListener(callback) {\n this._scopeListeners.push(callback);\n }\n\n /**\n * @inheritDoc\n */\n addEventProcessor(callback) {\n this._eventProcessors.push(callback);\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setUser(user) {\n // If null is passed we want to unset everything, but still define keys,\n // so that later down in the pipeline any existing values are cleared.\n this._user = user || {\n email: undefined,\n id: undefined,\n ip_address: undefined,\n username: undefined,\n };\n\n if (this._session) {\n updateSession(this._session, { user });\n }\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getUser() {\n return this._user;\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line deprecation/deprecation\n getRequestSession() {\n return this._requestSession;\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line deprecation/deprecation\n setRequestSession(requestSession) {\n this._requestSession = requestSession;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setTags(tags) {\n this._tags = {\n ...this._tags,\n ...tags,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setTag(key, value) {\n this._tags = { ...this._tags, [key]: value };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setExtras(extras) {\n this._extra = {\n ...this._extra,\n ...extras,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setExtra(key, extra) {\n this._extra = { ...this._extra, [key]: extra };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setFingerprint(fingerprint) {\n this._fingerprint = fingerprint;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setLevel(level) {\n this._level = level;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Sets the transaction name on the scope so that the name of e.g. taken server route or\n * the page location is attached to future events.\n *\n * IMPORTANT: Calling this function does NOT change the name of the currently active\n * root span. If you want to change the name of the active root span, use\n * `Sentry.updateSpanName(rootSpan, 'new name')` instead.\n *\n * By default, the SDK updates the scope's transaction name automatically on sensible\n * occasions, such as a page navigation or when handling a new request on the server.\n */\n setTransactionName(name) {\n this._transactionName = name;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setContext(key, context) {\n if (context === null) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._contexts[key];\n } else {\n this._contexts[key] = context;\n }\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setSession(session) {\n if (!session) {\n delete this._session;\n } else {\n this._session = session;\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getSession() {\n return this._session;\n }\n\n /**\n * @inheritDoc\n */\n update(captureContext) {\n if (!captureContext) {\n return this;\n }\n\n const scopeToMerge = typeof captureContext === 'function' ? captureContext(this) : captureContext;\n\n const [scopeInstance, requestSession] =\n scopeToMerge instanceof Scope\n ? // eslint-disable-next-line deprecation/deprecation\n [scopeToMerge.getScopeData(), scopeToMerge.getRequestSession()]\n : isPlainObject(scopeToMerge)\n ? [captureContext , (captureContext ).requestSession]\n : [];\n\n const { tags, extra, user, contexts, level, fingerprint = [], propagationContext } = scopeInstance || {};\n\n this._tags = { ...this._tags, ...tags };\n this._extra = { ...this._extra, ...extra };\n this._contexts = { ...this._contexts, ...contexts };\n\n if (user && Object.keys(user).length) {\n this._user = user;\n }\n\n if (level) {\n this._level = level;\n }\n\n if (fingerprint.length) {\n this._fingerprint = fingerprint;\n }\n\n if (propagationContext) {\n this._propagationContext = propagationContext;\n }\n\n if (requestSession) {\n this._requestSession = requestSession;\n }\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n clear() {\n // client is not cleared here on purpose!\n this._breadcrumbs = [];\n this._tags = {};\n this._extra = {};\n this._user = {};\n this._contexts = {};\n this._level = undefined;\n this._transactionName = undefined;\n this._fingerprint = undefined;\n this._requestSession = undefined;\n this._session = undefined;\n _setSpanForScope(this, undefined);\n this._attachments = [];\n this.setPropagationContext({ traceId: generateTraceId() });\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n addBreadcrumb(breadcrumb, maxBreadcrumbs) {\n const maxCrumbs = typeof maxBreadcrumbs === 'number' ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS;\n\n // No data has been changed, so don't notify scope listeners\n if (maxCrumbs <= 0) {\n return this;\n }\n\n const mergedBreadcrumb = {\n timestamp: dateTimestampInSeconds(),\n ...breadcrumb,\n };\n\n this._breadcrumbs.push(mergedBreadcrumb);\n if (this._breadcrumbs.length > maxCrumbs) {\n this._breadcrumbs = this._breadcrumbs.slice(-maxCrumbs);\n if (this._client) {\n this._client.recordDroppedEvent('buffer_overflow', 'log_item');\n }\n }\n\n this._notifyScopeListeners();\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getLastBreadcrumb() {\n return this._breadcrumbs[this._breadcrumbs.length - 1];\n }\n\n /**\n * @inheritDoc\n */\n clearBreadcrumbs() {\n this._breadcrumbs = [];\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n addAttachment(attachment) {\n this._attachments.push(attachment);\n return this;\n }\n\n /**\n * @inheritDoc\n */\n clearAttachments() {\n this._attachments = [];\n return this;\n }\n\n /** @inheritDoc */\n getScopeData() {\n return {\n breadcrumbs: this._breadcrumbs,\n attachments: this._attachments,\n contexts: this._contexts,\n tags: this._tags,\n extra: this._extra,\n user: this._user,\n level: this._level,\n fingerprint: this._fingerprint || [],\n eventProcessors: this._eventProcessors,\n propagationContext: this._propagationContext,\n sdkProcessingMetadata: this._sdkProcessingMetadata,\n transactionName: this._transactionName,\n span: _getSpanForScope(this),\n };\n }\n\n /**\n * @inheritDoc\n */\n setSDKProcessingMetadata(newData) {\n this._sdkProcessingMetadata = merge(this._sdkProcessingMetadata, newData, 2);\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setPropagationContext(\n context,\n ) {\n this._propagationContext = {\n // eslint-disable-next-line deprecation/deprecation\n spanId: generateSpanId(),\n ...context,\n };\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getPropagationContext() {\n return this._propagationContext;\n }\n\n /**\n * @inheritDoc\n */\n captureException(exception, hint) {\n const eventId = hint && hint.event_id ? hint.event_id : uuid4();\n\n if (!this._client) {\n logger.warn('No client configured on scope - will not capture exception!');\n return eventId;\n }\n\n const syntheticException = new Error('Sentry syntheticException');\n\n this._client.captureException(\n exception,\n {\n originalException: exception,\n syntheticException,\n ...hint,\n event_id: eventId,\n },\n this,\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n captureMessage(message, level, hint) {\n const eventId = hint && hint.event_id ? hint.event_id : uuid4();\n\n if (!this._client) {\n logger.warn('No client configured on scope - will not capture message!');\n return eventId;\n }\n\n const syntheticException = new Error(message);\n\n this._client.captureMessage(\n message,\n level,\n {\n originalException: message,\n syntheticException,\n ...hint,\n event_id: eventId,\n },\n this,\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n captureEvent(event, hint) {\n const eventId = hint && hint.event_id ? hint.event_id : uuid4();\n\n if (!this._client) {\n logger.warn('No client configured on scope - will not capture event!');\n return eventId;\n }\n\n this._client.captureEvent(event, { ...hint, event_id: eventId }, this);\n\n return eventId;\n }\n\n /**\n * This will be called on every set call.\n */\n _notifyScopeListeners() {\n // We need this check for this._notifyingListeners to be able to work on scope during updates\n // If this check is not here we'll produce endless recursion when something is done with the scope\n // during the callback.\n if (!this._notifyingListeners) {\n this._notifyingListeners = true;\n this._scopeListeners.forEach(callback => {\n callback(this);\n });\n this._notifyingListeners = false;\n }\n }\n}\n\n/**\n * Holds additional event information.\n */\nconst Scope = ScopeClass;\n\n/**\n * Holds additional event information.\n */\n\nexport { Scope };\n","import { SDK_VERSION } from './version.js';\n\n/** Get's the global object for the current JavaScript runtime */\nconst GLOBAL_OBJ = globalThis ;\n\n/**\n * Returns a global singleton contained in the global `__SENTRY__[]` object.\n *\n * If the singleton doesn't already exist in `__SENTRY__`, it will be created using the given factory\n * function and added to the `__SENTRY__` object.\n *\n * @param name name of the global singleton on __SENTRY__\n * @param creator creator Factory function to create the singleton if it doesn't already exist on `__SENTRY__`\n * @param obj (Optional) The global object on which to look for `__SENTRY__`, if not `GLOBAL_OBJ`'s return value\n * @returns the singleton\n */\nfunction getGlobalSingleton(name, creator, obj) {\n const gbl = (obj || GLOBAL_OBJ) ;\n const __SENTRY__ = (gbl.__SENTRY__ = gbl.__SENTRY__ || {});\n const versionedCarrier = (__SENTRY__[SDK_VERSION] = __SENTRY__[SDK_VERSION] || {});\n return versionedCarrier[name] || (versionedCarrier[name] = creator());\n}\n\nexport { GLOBAL_OBJ, getGlobalSingleton };\n","//! moment.js locale configuration\n//! locale : Italian (Switzerland) [it-ch]\n//! author : xfh : https://github.com/xfh\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var itCh = moment.defineLocale('it-ch', {\n months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(\n '_'\n ),\n monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),\n weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(\n '_'\n ),\n weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),\n weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Oggi alle] LT',\n nextDay: '[Domani alle] LT',\n nextWeek: 'dddd [alle] LT',\n lastDay: '[Ieri alle] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[la scorsa] dddd [alle] LT';\n default:\n return '[lo scorso] dddd [alle] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: function (s) {\n return (/^[0-9].+$/.test(s) ? 'tra' : 'in') + ' ' + s;\n },\n past: '%s fa',\n s: 'alcuni secondi',\n ss: '%d secondi',\n m: 'un minuto',\n mm: '%d minuti',\n h: \"un'ora\",\n hh: '%d ore',\n d: 'un giorno',\n dd: '%d giorni',\n M: 'un mese',\n MM: '%d mesi',\n y: 'un anno',\n yy: '%d anni',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return itCh;\n\n})));\n","const { isArray } = Array;\nconst { getPrototypeOf, prototype: objectProto, keys: getKeys } = Object;\nexport function argsArgArrayOrObject(args) {\n if (args.length === 1) {\n const first = args[0];\n if (isArray(first)) {\n return { args: first, keys: null };\n }\n if (isPOJO(first)) {\n const keys = getKeys(first);\n return {\n args: keys.map((key) => first[key]),\n keys,\n };\n }\n }\n return { args: args, keys: null };\n}\nfunction isPOJO(obj) {\n return obj && typeof obj === 'object' && getPrototypeOf(obj) === objectProto;\n}\n","/**\n * Shallow merge two objects.\n * Does not mutate the passed in objects.\n * Undefined/empty values in the merge object will overwrite existing values.\n *\n * By default, this merges 2 levels deep.\n */\nfunction merge(initialObj, mergeObj, levels = 2) {\n // If the merge value is not an object, or we have no merge levels left,\n // we just set the value to the merge value\n if (!mergeObj || typeof mergeObj !== 'object' || levels <= 0) {\n return mergeObj;\n }\n\n // If the merge object is an empty object, and the initial object is not undefined, we return the initial object\n if (initialObj && mergeObj && Object.keys(mergeObj).length === 0) {\n return initialObj;\n }\n\n // Clone object\n const output = { ...initialObj };\n\n // Merge values into output, resursively\n for (const key in mergeObj) {\n if (Object.prototype.hasOwnProperty.call(mergeObj, key)) {\n output[key] = merge(output[key], mergeObj[key], levels - 1);\n }\n }\n\n return output;\n}\n\nexport { merge };\n","//! moment.js locale configuration\n//! locale : Tajik [tg]\n//! author : Orif N. Jr. : https://github.com/orif-jr\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var suffixes = {\n 0: '-ум',\n 1: '-ум',\n 2: '-юм',\n 3: '-юм',\n 4: '-ум',\n 5: '-ум',\n 6: '-ум',\n 7: '-ум',\n 8: '-ум',\n 9: '-ум',\n 10: '-ум',\n 12: '-ум',\n 13: '-ум',\n 20: '-ум',\n 30: '-юм',\n 40: '-ум',\n 50: '-ум',\n 60: '-ум',\n 70: '-ум',\n 80: '-ум',\n 90: '-ум',\n 100: '-ум',\n };\n\n var tg = moment.defineLocale('tg', {\n months: {\n format: 'январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри'.split(\n '_'\n ),\n standalone:\n 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(\n '_'\n ),\n },\n monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),\n weekdays: 'якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе'.split(\n '_'\n ),\n weekdaysShort: 'яшб_дшб_сшб_чшб_пшб_ҷум_шнб'.split('_'),\n weekdaysMin: 'яш_дш_сш_чш_пш_ҷм_шб'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Имрӯз соати] LT',\n nextDay: '[Фардо соати] LT',\n lastDay: '[Дирӯз соати] LT',\n nextWeek: 'dddd[и] [ҳафтаи оянда соати] LT',\n lastWeek: 'dddd[и] [ҳафтаи гузашта соати] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'баъди %s',\n past: '%s пеш',\n s: 'якчанд сония',\n m: 'як дақиқа',\n mm: '%d дақиқа',\n h: 'як соат',\n hh: '%d соат',\n d: 'як рӯз',\n dd: '%d рӯз',\n M: 'як моҳ',\n MM: '%d моҳ',\n y: 'як сол',\n yy: '%d сол',\n },\n meridiemParse: /шаб|субҳ|рӯз|бегоҳ/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'шаб') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'субҳ') {\n return hour;\n } else if (meridiem === 'рӯз') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'бегоҳ') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'шаб';\n } else if (hour < 11) {\n return 'субҳ';\n } else if (hour < 16) {\n return 'рӯз';\n } else if (hour < 19) {\n return 'бегоҳ';\n } else {\n return 'шаб';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ум|юм)/,\n ordinal: function (number) {\n var a = number % 10,\n b = number >= 100 ? 100 : null;\n return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 1th is the first week of the year.\n },\n });\n\n return tg;\n\n})));\n","//! moment.js locale configuration\n//! locale : French [fr]\n//! author : John Fischer : https://github.com/jfroffice\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsStrictRegex =\n /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,\n monthsShortStrictRegex =\n /(janv\\.?|févr\\.?|mars|avr\\.?|mai|juin|juil\\.?|août|sept\\.?|oct\\.?|nov\\.?|déc\\.?)/i,\n monthsRegex =\n /(janv\\.?|févr\\.?|mars|avr\\.?|mai|juin|juil\\.?|août|sept\\.?|oct\\.?|nov\\.?|déc\\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,\n monthsParse = [\n /^janv/i,\n /^févr/i,\n /^mars/i,\n /^avr/i,\n /^mai/i,\n /^juin/i,\n /^juil/i,\n /^août/i,\n /^sept/i,\n /^oct/i,\n /^nov/i,\n /^déc/i,\n ];\n\n var fr = moment.defineLocale('fr', {\n months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(\n '_'\n ),\n monthsShort:\n 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(\n '_'\n ),\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex: monthsStrictRegex,\n monthsShortStrictRegex: monthsShortStrictRegex,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Aujourd’hui à] LT',\n nextDay: '[Demain à] LT',\n nextWeek: 'dddd [à] LT',\n lastDay: '[Hier à] LT',\n lastWeek: 'dddd [dernier à] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'dans %s',\n past: 'il y a %s',\n s: 'quelques secondes',\n ss: '%d secondes',\n m: 'une minute',\n mm: '%d minutes',\n h: 'une heure',\n hh: '%d heures',\n d: 'un jour',\n dd: '%d jours',\n w: 'une semaine',\n ww: '%d semaines',\n M: 'un mois',\n MM: '%d mois',\n y: 'un an',\n yy: '%d ans',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(er|)/,\n ordinal: function (number, period) {\n switch (period) {\n // TODO: Return 'e' when day of month > 1. Move this case inside\n // block for masculine words below.\n // See https://github.com/moment/moment/issues/3375\n case 'D':\n return number + (number === 1 ? 'er' : '');\n\n // Words with masculine grammatical gender: mois, trimestre, jour\n default:\n case 'M':\n case 'Q':\n case 'DDD':\n case 'd':\n return number + (number === 1 ? 'er' : 'e');\n\n // Words with feminine grammatical gender: semaine\n case 'w':\n case 'W':\n return number + (number === 1 ? 're' : 'e');\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return fr;\n\n})));\n","//! moment.js locale configuration\n//! locale : Ukrainian [uk]\n//! author : zemlanin : https://github.com/zemlanin\n//! Author : Menelion Elensúle : https://github.com/Oire\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11\n ? forms[0]\n : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)\n ? forms[1]\n : forms[2];\n }\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n ss: withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд',\n mm: withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',\n hh: withoutSuffix ? 'година_години_годин' : 'годину_години_годин',\n dd: 'день_дні_днів',\n MM: 'місяць_місяці_місяців',\n yy: 'рік_роки_років',\n };\n if (key === 'm') {\n return withoutSuffix ? 'хвилина' : 'хвилину';\n } else if (key === 'h') {\n return withoutSuffix ? 'година' : 'годину';\n } else {\n return number + ' ' + plural(format[key], +number);\n }\n }\n function weekdaysCaseReplace(m, format) {\n var weekdays = {\n nominative:\n 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split(\n '_'\n ),\n accusative:\n 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split(\n '_'\n ),\n genitive:\n 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split(\n '_'\n ),\n },\n nounCase;\n\n if (m === true) {\n return weekdays['nominative']\n .slice(1, 7)\n .concat(weekdays['nominative'].slice(0, 1));\n }\n if (!m) {\n return weekdays['nominative'];\n }\n\n nounCase = /(\\[[ВвУу]\\]) ?dddd/.test(format)\n ? 'accusative'\n : /\\[?(?:минулої|наступної)? ?\\] ?dddd/.test(format)\n ? 'genitive'\n : 'nominative';\n return weekdays[nounCase][m.day()];\n }\n function processHoursFunction(str) {\n return function () {\n return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';\n };\n }\n\n var uk = moment.defineLocale('uk', {\n months: {\n format: 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split(\n '_'\n ),\n standalone:\n 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split(\n '_'\n ),\n },\n monthsShort: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split(\n '_'\n ),\n weekdays: weekdaysCaseReplace,\n weekdaysShort: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY р.',\n LLL: 'D MMMM YYYY р., HH:mm',\n LLLL: 'dddd, D MMMM YYYY р., HH:mm',\n },\n calendar: {\n sameDay: processHoursFunction('[Сьогодні '),\n nextDay: processHoursFunction('[Завтра '),\n lastDay: processHoursFunction('[Вчора '),\n nextWeek: processHoursFunction('[У] dddd ['),\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n case 3:\n case 5:\n case 6:\n return processHoursFunction('[Минулої] dddd [').call(this);\n case 1:\n case 2:\n case 4:\n return processHoursFunction('[Минулого] dddd [').call(this);\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'за %s',\n past: '%s тому',\n s: 'декілька секунд',\n ss: relativeTimeWithPlural,\n m: relativeTimeWithPlural,\n mm: relativeTimeWithPlural,\n h: 'годину',\n hh: relativeTimeWithPlural,\n d: 'день',\n dd: relativeTimeWithPlural,\n M: 'місяць',\n MM: relativeTimeWithPlural,\n y: 'рік',\n yy: relativeTimeWithPlural,\n },\n // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason\n meridiemParse: /ночі|ранку|дня|вечора/,\n isPM: function (input) {\n return /^(дня|вечора)$/.test(input);\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'ночі';\n } else if (hour < 12) {\n return 'ранку';\n } else if (hour < 17) {\n return 'дня';\n } else {\n return 'вечора';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(й|го)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'M':\n case 'd':\n case 'DDD':\n case 'w':\n case 'W':\n return number + '-й';\n case 'D':\n return number + '-го';\n default:\n return number;\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return uk;\n\n})));\n","<div [ngClass]=\"{'steps':true,'readonly':readonly}\" [ngStyle]=\"style\" [class]=\"styleClass\">\n <ul role=\"tablist\">\n <li *ngFor=\"let item of model; let i = index\" class=\"steps-item\" #menuitem [ngStyle]=\"item.style\" [class]=\"item.styleClass\" role=\"tab\" [attr.aria-selected]=\"i === activeIndex\" [attr.aria-expanded]=\"i === activeIndex\"\n [ngClass]=\"{'highlight steps-current': isActive(item, i), 'steps-item-complete': isComplete(item, i), 'disabled': item.disabled || (readonly && !isActive(item, i))}\">\n <a *ngIf=\"isClickableRouterLink(item); else elseBlock\" [routerLink]=\"item.routerLink\" [queryParams]=\"item.queryParams\" role=\"presentation\" [routerLinkActive]=\"'menuitem-link-active'\" [routerLinkActiveOptions]=\"item.routerLinkActiveOptions||{exact:false}\" class=\"menuitem-link\"\n (click)=\"itemClick($event, item, i)\" (keydown.enter)=\"itemClick($event, item, i)\" [attr.target]=\"item.target\" [attr.id]=\"item.id\" [attr.tabindex]=\"item.disabled || readonly ? null : (item.tabindex ? item.tabindex : '0')\"\n [fragment]=\"item.fragment\" [queryParamsHandling]=\"item.queryParamsHandling\" [preserveFragment]=\"item.preserveFragment\" [skipLocationChange]=\"item.skipLocationChange\" [replaceUrl]=\"item.replaceUrl\" [state]=\"item.state\">\n <span class=\"steps-number\">{{i + 1}}</span>\n <span class=\"steps-title\" *ngIf=\"item.escape !== false; else htmlLabel\">{{item.label}}</span>\n <ng-template #htmlLabel><span class=\"steps-title\" [innerHTML]=\"item.label\"></span></ng-template>\n </a>\n <ng-template #elseBlock>\n <a [attr.href]=\"item.url\" class=\"menuitem-link\" role=\"presentation\" (click)=\"itemClick($event, item, i)\" (keydown.enter)=\"itemClick($event, item, i)\" [attr.target]=\"item.target\" [attr.id]=\"item.id\"\n [attr.tabindex]=\"item.disabled||(i !== activeIndex && readonly) ? null : (item.tabindex ? item.tabindex : '0')\">\n <span class=\"steps-number\">{{i + 1}}</span>\n <span class=\"steps-title\" *ngIf=\"item.escape !== false; else htmlRouteLabel\">{{item.label}}</span>\n <ng-template #htmlRouteLabel><span class=\"steps-title\" [innerHTML]=\"item.label\"></span></ng-template>\n </a>\n </ng-template>\n </li>\n </ul>\n</div>","import {Component,Input,Output,EventEmitter,ChangeDetectionStrategy, ViewEncapsulation, OnInit, OnDestroy, ChangeDetectorRef} from '@angular/core';\nimport {Router, ActivatedRoute} from '@angular/router';\nimport { Subscription } from 'rxjs';\nimport { MenuItem } from '../utils/menuitem';\n\n@Component({\n selector: 'bw-steps',\n templateUrl: './steps.component.html',\n styleUrls: ['./steps.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class StepsComponent implements OnInit, OnDestroy {\n\n @Input() activeIndex = 0;\n\n @Input() model: MenuItem[];\n\n @Input() readonly = true;\n\n @Input() style: any;\n\n @Input() styleClass: string;\n\n @Output() activeIndexChange: EventEmitter<any> = new EventEmitter();\n\n constructor(private router: Router, private route:ActivatedRoute, private cd: ChangeDetectorRef) { }\n\n subscription: Subscription = new Subscription();\n\n ngOnInit() {\n this.subscription.add(this.router.events.subscribe(() => this.cd.markForCheck()));\n }\n\n itemClick(event: Event, item: MenuItem, i: number) {\n if (this.readonly || item.disabled) {\n event.preventDefault();\n return;\n }\n\n this.activeIndexChange.emit(i);\n\n if (!item.url) {\n event.preventDefault();\n }\n\n if (item.command) {\n item.command({\n originalEvent: event,\n item: item,\n index: i\n });\n }\n }\n\n isClickableRouterLink(item: MenuItem) {\n return item.routerLink && !this.readonly && !item.disabled;\n }\n\n isComplete(item: MenuItem, index: number) {\n if (item) {\n return this.activeIndex > index;\n }\n }\n\n isActive(item: MenuItem, index: number) {\n if (item.routerLink)\n return this.router.isActive(item.routerLink, false) || this.router.isActive(this.router.createUrlTree([item.routerLink], {relativeTo: this.route}).toString(), false);\n else\n return index === Number(this.activeIndex);\n }\n\n ngOnDestroy() {\n this.subscription.unsubscribe();\n }\n}\n","<bw-action-article>\n <ui-nav-exit-back header-actions [trackingDetail]=\"{ event_name: 'waiting_dismissed' }\"></ui-nav-exit-back>\n\n <div content-section>\n <ng-container>\n <div class=\"mb-xxl\">\n <bw-steps [model]=\"items\" [readonly]=\"true\" [activeIndex]=\"stepIndex\"></bw-steps>\n </div>\n <div class=\"mb-xxl\"></div>\n <bw-spinner brightsideWebTimeout *ngIf=\"waiting\"></bw-spinner>\n <div class=\"center\">\n <div class=\"mb-sm\"><bw-icon *ngIf=\"failed\" iconName=\"red-alert\" size=\"40\"></bw-icon></div>\n <p text-large-semibold class=\"mb-xs\">{{ actionHeader | translate }}</p>\n <p text-large-regular mwTextColor=\"var(--secondary-text)\">\n {{ actionDescription1 | translate }}<br/>{{ actionDescription2 | translate }}\n </p>\n </div>\n </ng-container>\n </div>\n</bw-action-article>\n\n","import { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'brightside-web-waiting',\n templateUrl: './waiting.component.html',\n styleUrls: ['./waiting.component.scss']\n})\nexport class WaitingComponent {\n @Input() items: any;\n @Input() waiting = true;\n @Input() failed = false;\n @Input() actionHeader: any; // expects a translate key\n @Input() actionDescription1: any; // expects a translate key\n @Input() actionDescription2: any; // expects a translate key\n @Input() fbPage: any;\n @Input() fbCategory: any;\n @Input() stepIndex = 0;\n\n constructor() { }\n\n}\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */\nclass InMemoryStorage {\n constructor() {\n this.storage = new Map();\n }\n get length() {\n return this.storage.size;\n }\n key(index) {\n if (index > this.length - 1) {\n return null;\n }\n return Array.from(this.storage.keys())[index];\n }\n setItem(key, value) {\n this.storage.set(key, value);\n }\n getItem(key) {\n return this.storage.get(key) ?? null;\n }\n removeItem(key) {\n this.storage.delete(key);\n }\n clear() {\n this.storage.clear();\n }\n}\n\nexport { InMemoryStorage };\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function takeWhile(predicate, inclusive = false) {\n return operate((source, subscriber) => {\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n const result = predicate(value, index++);\n (result || inclusive) && subscriber.next(value);\n !result && subscriber.complete();\n }));\n });\n}\n","//! moment.js locale configuration\n//! locale : Georgian [ka]\n//! author : Irakli Janiashvili : https://github.com/IrakliJani\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ka = moment.defineLocale('ka', {\n months: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split(\n '_'\n ),\n monthsShort: 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'),\n weekdays: {\n standalone:\n 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split(\n '_'\n ),\n format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split(\n '_'\n ),\n isFormat: /(წინა|შემდეგ)/,\n },\n weekdaysShort: 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'),\n weekdaysMin: 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[დღეს] LT[-ზე]',\n nextDay: '[ხვალ] LT[-ზე]',\n lastDay: '[გუშინ] LT[-ზე]',\n nextWeek: '[შემდეგ] dddd LT[-ზე]',\n lastWeek: '[წინა] dddd LT-ზე',\n sameElse: 'L',\n },\n relativeTime: {\n future: function (s) {\n return s.replace(\n /(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/,\n function ($0, $1, $2) {\n return $2 === 'ი' ? $1 + 'ში' : $1 + $2 + 'ში';\n }\n );\n },\n past: function (s) {\n if (/(წამი|წუთი|საათი|დღე|თვე)/.test(s)) {\n return s.replace(/(ი|ე)$/, 'ის წინ');\n }\n if (/წელი/.test(s)) {\n return s.replace(/წელი$/, 'წლის წინ');\n }\n return s;\n },\n s: 'რამდენიმე წამი',\n ss: '%d წამი',\n m: 'წუთი',\n mm: '%d წუთი',\n h: 'საათი',\n hh: '%d საათი',\n d: 'დღე',\n dd: '%d დღე',\n M: 'თვე',\n MM: '%d თვე',\n y: 'წელი',\n yy: '%d წელი',\n },\n dayOfMonthOrdinalParse: /0|1-ლი|მე-\\d{1,2}|\\d{1,2}-ე/,\n ordinal: function (number) {\n if (number === 0) {\n return number;\n }\n if (number === 1) {\n return number + '-ლი';\n }\n if (\n number < 20 ||\n (number <= 100 && number % 20 === 0) ||\n number % 100 === 0\n ) {\n return 'მე-' + number;\n }\n return number + '-ე';\n },\n week: {\n dow: 1,\n doy: 7,\n },\n });\n\n return ka;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (New Zealand) [en-nz]\n//! author : Luke McGregor : https://github.com/lukemcgregor\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enNz = moment.defineLocale('en-nz', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A',\n },\n calendar: {\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 relativeTime: {\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 M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((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 week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return enNz;\n\n})));\n","import { isFunction } from '../util/isFunction';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { identity } from '../util/identity';\nexport function tap(observerOrNext, error, complete) {\n const tapObserver = isFunction(observerOrNext) || error || complete\n ?\n { next: observerOrNext, error, complete }\n : observerOrNext;\n return tapObserver\n ? operate((source, subscriber) => {\n var _a;\n (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n let isUnsub = true;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n var _a;\n (_a = tapObserver.next) === null || _a === void 0 ? void 0 : _a.call(tapObserver, value);\n subscriber.next(value);\n }, () => {\n var _a;\n isUnsub = false;\n (_a = tapObserver.complete) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n subscriber.complete();\n }, (err) => {\n var _a;\n isUnsub = false;\n (_a = tapObserver.error) === null || _a === void 0 ? void 0 : _a.call(tapObserver, err);\n subscriber.error(err);\n }, () => {\n var _a, _b;\n if (isUnsub) {\n (_a = tapObserver.unsubscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n }\n (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver);\n }));\n })\n :\n identity;\n}\n","import { operate } from '../util/lift';\nexport function subscribeOn(scheduler, delay = 0) {\n return operate((source, subscriber) => {\n subscriber.add(scheduler.schedule(() => source.subscribe(subscriber), delay));\n });\n}\n","import { Observable } from '../Observable';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function scheduleAsyncIterable(input, scheduler) {\n if (!input) {\n throw new Error('Iterable cannot be null');\n }\n return new Observable((subscriber) => {\n executeSchedule(subscriber, scheduler, () => {\n const iterator = input[Symbol.asyncIterator]();\n executeSchedule(subscriber, scheduler, () => {\n iterator.next().then((result) => {\n if (result.done) {\n subscriber.complete();\n }\n else {\n subscriber.next(result.value);\n }\n });\n }, 0, true);\n });\n });\n}\n","import { scheduled } from '../scheduled/scheduled';\nimport { innerFrom } from './innerFrom';\nexport function from(input, scheduler) {\n return scheduler ? scheduled(input, scheduler) : innerFrom(input);\n}\n","import { scheduleObservable } from './scheduleObservable';\nimport { schedulePromise } from './schedulePromise';\nimport { scheduleArray } from './scheduleArray';\nimport { scheduleIterable } from './scheduleIterable';\nimport { scheduleAsyncIterable } from './scheduleAsyncIterable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isPromise } from '../util/isPromise';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isIterable } from '../util/isIterable';\nimport { isAsyncIterable } from '../util/isAsyncIterable';\nimport { createInvalidObservableTypeError } from '../util/throwUnobservableError';\nimport { isReadableStreamLike } from '../util/isReadableStreamLike';\nimport { scheduleReadableStreamLike } from './scheduleReadableStreamLike';\nexport function scheduled(input, scheduler) {\n if (input != null) {\n if (isInteropObservable(input)) {\n return scheduleObservable(input, scheduler);\n }\n if (isArrayLike(input)) {\n return scheduleArray(input, scheduler);\n }\n if (isPromise(input)) {\n return schedulePromise(input, scheduler);\n }\n if (isAsyncIterable(input)) {\n return scheduleAsyncIterable(input, scheduler);\n }\n if (isIterable(input)) {\n return scheduleIterable(input, scheduler);\n }\n if (isReadableStreamLike(input)) {\n return scheduleReadableStreamLike(input, scheduler);\n }\n }\n throw createInvalidObservableTypeError(input);\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { observeOn } from '../operators/observeOn';\nimport { subscribeOn } from '../operators/subscribeOn';\nexport function scheduleObservable(input, scheduler) {\n return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));\n}\n","import { Observable } from '../Observable';\nexport function scheduleArray(input, scheduler) {\n return new Observable((subscriber) => {\n let i = 0;\n return scheduler.schedule(function () {\n if (i === input.length) {\n subscriber.complete();\n }\n else {\n subscriber.next(input[i++]);\n if (!subscriber.closed) {\n this.schedule();\n }\n }\n });\n });\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { observeOn } from '../operators/observeOn';\nimport { subscribeOn } from '../operators/subscribeOn';\nexport function schedulePromise(input, scheduler) {\n return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));\n}\n","import { Observable } from '../Observable';\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from '../util/isFunction';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function scheduleIterable(input, scheduler) {\n return new Observable((subscriber) => {\n let iterator;\n executeSchedule(subscriber, scheduler, () => {\n iterator = input[Symbol_iterator]();\n executeSchedule(subscriber, scheduler, () => {\n let value;\n let done;\n try {\n ({ value, done } = iterator.next());\n }\n catch (err) {\n subscriber.error(err);\n return;\n }\n if (done) {\n subscriber.complete();\n }\n else {\n subscriber.next(value);\n }\n }, 0, true);\n });\n return () => isFunction(iterator === null || iterator === void 0 ? void 0 : iterator.return) && iterator.return();\n });\n}\n","import { scheduleAsyncIterable } from './scheduleAsyncIterable';\nimport { readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike';\nexport function scheduleReadableStreamLike(input, scheduler) {\n return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input), scheduler);\n}\n","//! moment.js locale configuration\n//! locale : Serbian [sr]\n//! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j\n//! author : Stefan Crnjaković <stefan@hotmail.rs> : https://github.com/crnjakovic\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var translator = {\n words: {\n //Different grammatical cases\n ss: ['sekunda', 'sekunde', 'sekundi'],\n m: ['jedan minut', 'jednog minuta'],\n mm: ['minut', 'minuta', 'minuta'],\n h: ['jedan sat', 'jednog sata'],\n hh: ['sat', 'sata', 'sati'],\n d: ['jedan dan', 'jednog dana'],\n dd: ['dan', 'dana', 'dana'],\n M: ['jedan mesec', 'jednog meseca'],\n MM: ['mesec', 'meseca', 'meseci'],\n y: ['jednu godinu', 'jedne godine'],\n yy: ['godinu', 'godine', 'godina'],\n },\n correctGrammaticalCase: function (number, wordKey) {\n if (\n number % 10 >= 1 &&\n number % 10 <= 4 &&\n (number % 100 < 10 || number % 100 >= 20)\n ) {\n return number % 10 === 1 ? wordKey[0] : wordKey[1];\n }\n return wordKey[2];\n },\n translate: function (number, withoutSuffix, key, isFuture) {\n var wordKey = translator.words[key],\n word;\n\n if (key.length === 1) {\n // Nominativ\n if (key === 'y' && withoutSuffix) return 'jedna godina';\n return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];\n }\n\n word = translator.correctGrammaticalCase(number, wordKey);\n // Nominativ\n if (key === 'yy' && withoutSuffix && word === 'godinu') {\n return number + ' godina';\n }\n\n return number + ' ' + word;\n },\n };\n\n var sr = moment.defineLocale('sr', {\n months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(\n '_'\n ),\n monthsShort:\n 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split(\n '_'\n ),\n weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),\n weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'D. M. YYYY.',\n LL: 'D. MMMM YYYY.',\n LLL: 'D. MMMM YYYY. H:mm',\n LLLL: 'dddd, D. MMMM YYYY. H:mm',\n },\n calendar: {\n sameDay: '[danas u] LT',\n nextDay: '[sutra u] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[u] [nedelju] [u] LT';\n case 3:\n return '[u] [sredu] [u] LT';\n case 6:\n return '[u] [subotu] [u] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[u] dddd [u] LT';\n }\n },\n lastDay: '[juče u] LT',\n lastWeek: function () {\n var lastWeekDays = [\n '[prošle] [nedelje] [u] LT',\n '[prošlog] [ponedeljka] [u] LT',\n '[prošlog] [utorka] [u] LT',\n '[prošle] [srede] [u] LT',\n '[prošlog] [četvrtka] [u] LT',\n '[prošlog] [petka] [u] LT',\n '[prošle] [subote] [u] LT',\n ];\n return lastWeekDays[this.day()];\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'za %s',\n past: 'pre %s',\n s: 'nekoliko sekundi',\n ss: translator.translate,\n m: translator.translate,\n mm: translator.translate,\n h: translator.translate,\n hh: translator.translate,\n d: translator.translate,\n dd: translator.translate,\n M: translator.translate,\n MM: translator.translate,\n y: translator.translate,\n yy: translator.translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return sr;\n\n})));\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'phone'\n})\nexport class PhonePipe implements PipeTransform {\n\n transform(value: string, mask?:boolean, ...args: any[]): any {\n if (value && value.length >= 10) {\n const normalized= value.replace(/[^0-9]/gi, '');\n const pt1 = normalized.slice(0,3);\n const pt2 = normalized.slice(3,6);\n const pt3 = normalized.slice(6,10);\n if (mask){\n const regex = /[0-9]/gi;\n return `${pt1.replace(regex, 'X')}-${pt2.replace(regex, 'X')}-${pt3}`;\n } else {\n return `${pt1}-${pt2}-${pt3}`;\n }\n }\n return '';\n }\n\n}\n","//! moment.js locale configuration\n//! locale : Occitan, lengadocian dialecte [oc-lnc]\n//! author : Quentin PAGÈS : https://github.com/Quenty31\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ocLnc = moment.defineLocale('oc-lnc', {\n months: {\n standalone:\n 'genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre'.split(\n '_'\n ),\n format: \"de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre\".split(\n '_'\n ),\n isFormat: /D[oD]?(\\s)+MMMM/,\n },\n monthsShort:\n 'gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte'.split(\n '_'\n ),\n weekdaysShort: 'dg._dl._dm._dc._dj._dv._ds.'.split('_'),\n weekdaysMin: 'dg_dl_dm_dc_dj_dv_ds'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM [de] YYYY',\n ll: 'D MMM YYYY',\n LLL: 'D MMMM [de] YYYY [a] H:mm',\n lll: 'D MMM YYYY, H:mm',\n LLLL: 'dddd D MMMM [de] YYYY [a] H:mm',\n llll: 'ddd D MMM YYYY, H:mm',\n },\n calendar: {\n sameDay: '[uèi a] LT',\n nextDay: '[deman a] LT',\n nextWeek: 'dddd [a] LT',\n lastDay: '[ièr a] LT',\n lastWeek: 'dddd [passat a] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: \"d'aquí %s\",\n past: 'fa %s',\n s: 'unas segondas',\n ss: '%d segondas',\n m: 'una minuta',\n mm: '%d minutas',\n h: 'una ora',\n hh: '%d oras',\n d: 'un jorn',\n dd: '%d jorns',\n M: 'un mes',\n MM: '%d meses',\n y: 'un an',\n yy: '%d ans',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(r|n|t|è|a)/,\n ordinal: function (number, period) {\n var output =\n number === 1\n ? 'r'\n : number === 2\n ? 'n'\n : number === 3\n ? 'r'\n : number === 4\n ? 't'\n : 'è';\n if (period === 'w' || period === 'W') {\n output = 'a';\n }\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4,\n },\n });\n\n return ocLnc;\n\n})));\n","const DEFAULT_ENVIRONMENT = 'production';\n\nexport { DEFAULT_ENVIRONMENT };\n","<bw-modal>\n <typography title-medium [innerHTML]=\"title | translate\"></typography>\n <div class=\"body\">\n <bw-spinner brightsideWebTimeout *ngIf=\"loading\"></bw-spinner>\n <div *ngIf=\"phoneNumber\">\n {{prompt | translate}}:\n {{ phoneNumber|phone }}\n </div>\n </div>\n <div class=\"footer\">\n <button bw-button (click)=\"emitClick()\">{{ ctaText | translate }}</button>\n </div>\n</bw-modal>\n","import { Component, OnInit, Output, EventEmitter, Input, OnDestroy } from '@angular/core';\nimport { from, of, Subscription } from 'rxjs';\nimport { AnalyticsAttributesV4, SupportService } from '@brightside-web/desktop/data-access/shared';\nimport { BsAuthService } from \"@brightside-web/desktop/data-access/core-services\";\n\n//TODO this has a lot of overlap with the hr-modal component, can we reduce this with subclasses/abstraction?\n@Component({\n selector: 'brightside-web-call-fa',\n templateUrl: './call-fa.component.html',\n styleUrls: ['./call-fa.component.scss']\n})\nexport class CallFaComponent implements OnInit, OnDestroy {\n @Input() title = 'CONTACT_ASSISTANT';\n @Input() ctaText = 'OK';\n @Input() prompt = 'CONTACT_FA_DURING_REG';\n @Input() firebase: AnalyticsAttributesV4;\n // if you pass in a company it will be used, if not, we will attempt to get it from the session\n @Input() company?:string;\n phoneNumber: string;\n sub = new Subscription();\n @Output() dismiss = new EventEmitter();\n loading:boolean;\n constructor(\n private support:SupportService,\n private bsAuthService: BsAuthService\n ) { }\n\n ngOnInit() {\n this.loading = true;\n\n if (this.company) {\n this.sub.add(this.support.support(this.company).subscribe(response => {\n this.phoneNumber = response;\n this.loading = false;\n }));\n } else {\n const obs = from(this.bsAuthService.fetchUserAttributes());\n this.sub.add(obs.subscribe(attributes => {\n if (attributes) {\n this.company = attributes['company'];\n }\n }, _=>{\n this.fallback();\n }, ()=>{\n if (this.company) {\n this.sub.add(this.support.support(this.company).subscribe(response => {\n this.phoneNumber = response;\n this.loading = false;\n }));\n } else {\n this.fallback();\n }\n }));\n }\n }\n\n //TODO if no session, can we load the company from the domain name?\n fallback(){\n this.phoneNumber = '8559401507';\n this.loading = false;\n }\n\n emitClick() {\n this.dismiss.emit();\n }\n\n ngOnDestroy(): void {\n this.sub.unsubscribe();\n }\n}\n","/**\n * @license Angular v15.0.4\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { Subject, Subscription, Observable, merge as merge$1 } from 'rxjs';\nimport { share } from 'rxjs/operators';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction getClosureSafeProperty(objWithPropertyToExtract) {\n for (let key in objWithPropertyToExtract) {\n if (objWithPropertyToExtract[key] === getClosureSafeProperty) {\n return key;\n }\n }\n throw Error('Could not find renamed property on target object.');\n}\n/**\n * Sets properties on a target object from a source object, but only if\n * the property doesn't already exist on the target object.\n * @param target The target to set properties on\n * @param source The source of the property keys and values to set\n */\nfunction fillProperties(target, source) {\n for (const key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction stringify(token) {\n if (typeof token === 'string') {\n return token;\n }\n if (Array.isArray(token)) {\n return '[' + token.map(stringify).join(', ') + ']';\n }\n if (token == null) {\n return '' + token;\n }\n if (token.overriddenName) {\n return `${token.overriddenName}`;\n }\n if (token.name) {\n return `${token.name}`;\n }\n const res = token.toString();\n if (res == null) {\n return '' + res;\n }\n const newLineIndex = res.indexOf('\\n');\n return newLineIndex === -1 ? res : res.substring(0, newLineIndex);\n}\n/**\n * Concatenates two strings with separator, allocating new strings only when necessary.\n *\n * @param before before string.\n * @param separator separator string.\n * @param after after string.\n * @returns concatenated string.\n */\nfunction concatStringsWithSpace(before, after) {\n return (before == null || before === '') ?\n (after === null ? '' : after) :\n ((after == null || after === '') ? before : before + ' ' + after);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst __forward_ref__ = getClosureSafeProperty({ __forward_ref__: getClosureSafeProperty });\n/**\n * Allows to refer to references which are not yet defined.\n *\n * For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of\n * DI is declared, but not yet defined. It is also used when the `token` which we use when creating\n * a query is not yet defined.\n *\n * @usageNotes\n * ### Example\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}\n * @publicApi\n */\nfunction forwardRef(forwardRefFn) {\n forwardRefFn.__forward_ref__ = forwardRef;\n forwardRefFn.toString = function () {\n return stringify(this());\n };\n return forwardRefFn;\n}\n/**\n * Lazily retrieves the reference value from a forwardRef.\n *\n * Acts as the identity function when given a non-forward-ref value.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}\n *\n * @see `forwardRef`\n * @publicApi\n */\nfunction resolveForwardRef(type) {\n return isForwardRef(type) ? type() : type;\n}\n/** Checks whether a function is wrapped by a `forwardRef`. */\nfunction isForwardRef(fn) {\n return typeof fn === 'function' && fn.hasOwnProperty(__forward_ref__) &&\n fn.__forward_ref__ === forwardRef;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction isEnvironmentProviders(value) {\n return value && !!value.ɵproviders;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Base URL for the error details page.\n *\n * Keep this constant in sync across:\n * - packages/compiler-cli/src/ngtsc/diagnostics/src/error_details_base_url.ts\n * - packages/core/src/error_details_base_url.ts\n */\nconst ERROR_DETAILS_PAGE_BASE_URL = 'https://angular.io/errors';\n/**\n * URL for the XSS security documentation.\n */\nconst XSS_SECURITY_URL = 'https://g.co/ng/security#xss';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Class that represents a runtime error.\n * Formats and outputs the error message in a consistent way.\n *\n * Example:\n * ```\n * throw new RuntimeError(\n * RuntimeErrorCode.INJECTOR_ALREADY_DESTROYED,\n * ngDevMode && 'Injector has already been destroyed.');\n * ```\n *\n * Note: the `message` argument contains a descriptive error message as a string in development\n * mode (when the `ngDevMode` is defined). In production mode (after tree-shaking pass), the\n * `message` argument becomes `false`, thus we account for it in the typings and the runtime logic.\n */\nclass RuntimeError extends Error {\n constructor(code, message) {\n super(formatRuntimeError(code, message));\n this.code = code;\n }\n}\n/**\n * Called to format a runtime error.\n * See additional info on the `message` argument type in the `RuntimeError` class description.\n */\nfunction formatRuntimeError(code, message) {\n // Error code might be a negative number, which is a special marker that instructs the logic to\n // generate a link to the error details page on angular.io.\n // We also prepend `0` to non-compile-time errors.\n const fullCode = `NG0${Math.abs(code)}`;\n let errorMessage = `${fullCode}${message ? ': ' + message.trim() : ''}`;\n if (ngDevMode && code < 0) {\n const addPeriodSeparator = !errorMessage.match(/[.,;!?]$/);\n const separator = addPeriodSeparator ? '.' : '';\n errorMessage =\n `${errorMessage}${separator} Find more at ${ERROR_DETAILS_PAGE_BASE_URL}/${fullCode}`;\n }\n return errorMessage;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Used for stringify render output in Ivy.\n * Important! This function is very performance-sensitive and we should\n * be extra careful not to introduce megamorphic reads in it.\n * Check `core/test/render3/perf/render_stringify` for benchmarks and alternate implementations.\n */\nfunction renderStringify(value) {\n if (typeof value === 'string')\n return value;\n if (value == null)\n return '';\n // Use `String` so that it invokes the `toString` method of the value. Note that this\n // appears to be faster than calling `value.toString` (see `render_stringify` benchmark).\n return String(value);\n}\n/**\n * Used to stringify a value so that it can be displayed in an error message.\n * Important! This function contains a megamorphic read and should only be\n * used for error messages.\n */\nfunction stringifyForError(value) {\n if (typeof value === 'function')\n return value.name || value.toString();\n if (typeof value === 'object' && value != null && typeof value.type === 'function') {\n return value.type.name || value.type.toString();\n }\n return renderStringify(value);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Called when directives inject each other (creating a circular dependency) */\nfunction throwCyclicDependencyError(token, path) {\n const depPath = path ? `. Dependency path: ${path.join(' > ')} > ${token}` : '';\n throw new RuntimeError(-200 /* RuntimeErrorCode.CYCLIC_DI_DEPENDENCY */, `Circular dependency in DI detected for ${token}${depPath}`);\n}\nfunction throwMixedMultiProviderError() {\n throw new Error(`Cannot mix multi providers and regular providers`);\n}\nfunction throwInvalidProviderError(ngModuleType, providers, provider) {\n if (ngModuleType && providers) {\n const providerDetail = providers.map(v => v == provider ? '?' + provider + '?' : '...');\n throw new Error(`Invalid provider for the NgModule '${stringify(ngModuleType)}' - only instances of Provider and Type are allowed, got: [${providerDetail.join(', ')}]`);\n }\n else if (isEnvironmentProviders(provider)) {\n if (provider.ɵfromNgModule) {\n throw new RuntimeError(207 /* RuntimeErrorCode.PROVIDER_IN_WRONG_CONTEXT */, `Invalid providers from 'importProvidersFrom' present in a non-environment injector. 'importProvidersFrom' can't be used for component providers.`);\n }\n else {\n throw new RuntimeError(207 /* RuntimeErrorCode.PROVIDER_IN_WRONG_CONTEXT */, `Invalid providers present in a non-environment injector. 'EnvironmentProviders' can't be used for component providers.`);\n }\n }\n else {\n throw new Error('Invalid provider');\n }\n}\n/** Throws an error when a token is not found in DI. */\nfunction throwProviderNotFoundError(token, injectorName) {\n const injectorDetails = injectorName ? ` in ${injectorName}` : '';\n throw new RuntimeError(-201 /* RuntimeErrorCode.PROVIDER_NOT_FOUND */, ngDevMode && `No provider for ${stringifyForError(token)} found${injectorDetails}`);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction assertNumber(actual, msg) {\n if (!(typeof actual === 'number')) {\n throwError(msg, typeof actual, 'number', '===');\n }\n}\nfunction assertNumberInRange(actual, minInclusive, maxInclusive) {\n assertNumber(actual, 'Expected a number');\n assertLessThanOrEqual(actual, maxInclusive, 'Expected number to be less than or equal to');\n assertGreaterThanOrEqual(actual, minInclusive, 'Expected number to be greater than or equal to');\n}\nfunction assertString(actual, msg) {\n if (!(typeof actual === 'string')) {\n throwError(msg, actual === null ? 'null' : typeof actual, 'string', '===');\n }\n}\nfunction assertFunction(actual, msg) {\n if (!(typeof actual === 'function')) {\n throwError(msg, actual === null ? 'null' : typeof actual, 'function', '===');\n }\n}\nfunction assertEqual(actual, expected, msg) {\n if (!(actual == expected)) {\n throwError(msg, actual, expected, '==');\n }\n}\nfunction assertNotEqual(actual, expected, msg) {\n if (!(actual != expected)) {\n throwError(msg, actual, expected, '!=');\n }\n}\nfunction assertSame(actual, expected, msg) {\n if (!(actual === expected)) {\n throwError(msg, actual, expected, '===');\n }\n}\nfunction assertNotSame(actual, expected, msg) {\n if (!(actual !== expected)) {\n throwError(msg, actual, expected, '!==');\n }\n}\nfunction assertLessThan(actual, expected, msg) {\n if (!(actual < expected)) {\n throwError(msg, actual, expected, '<');\n }\n}\nfunction assertLessThanOrEqual(actual, expected, msg) {\n if (!(actual <= expected)) {\n throwError(msg, actual, expected, '<=');\n }\n}\nfunction assertGreaterThan(actual, expected, msg) {\n if (!(actual > expected)) {\n throwError(msg, actual, expected, '>');\n }\n}\nfunction assertGreaterThanOrEqual(actual, expected, msg) {\n if (!(actual >= expected)) {\n throwError(msg, actual, expected, '>=');\n }\n}\nfunction assertNotDefined(actual, msg) {\n if (actual != null) {\n throwError(msg, actual, null, '==');\n }\n}\nfunction assertDefined(actual, msg) {\n if (actual == null) {\n throwError(msg, actual, null, '!=');\n }\n}\nfunction throwError(msg, actual, expected, comparison) {\n throw new Error(`ASSERTION ERROR: ${msg}` +\n (comparison == null ? '' : ` [Expected=> ${expected} ${comparison} ${actual} <=Actual]`));\n}\nfunction assertDomNode(node) {\n // If we're in a worker, `Node` will not be defined.\n if (!(typeof Node !== 'undefined' && node instanceof Node) &&\n !(typeof node === 'object' && node != null &&\n node.constructor.name === 'WebWorkerRenderNode')) {\n throwError(`The provided value must be an instance of a DOM Node but got ${stringify(node)}`);\n }\n}\nfunction assertIndexInRange(arr, index) {\n assertDefined(arr, 'Array must be defined.');\n const maxLen = arr.length;\n if (index < 0 || index >= maxLen) {\n throwError(`Index expected to be less than ${maxLen} but got ${index}`);\n }\n}\nfunction assertOneOf(value, ...validValues) {\n if (validValues.indexOf(value) !== -1)\n return true;\n throwError(`Expected value to be one of ${JSON.stringify(validValues)} but was ${JSON.stringify(value)}.`);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Construct an injectable definition which defines how a token will be constructed by the DI\n * system, and in which injectors (if any) it will be available.\n *\n * This should be assigned to a static `ɵprov` field on a type, which will then be an\n * `InjectableType`.\n *\n * Options:\n * * `providedIn` determines which injectors will include the injectable, by either associating it\n * with an `@NgModule` or other `InjectorType`, or by specifying that this injectable should be\n * provided in the `'root'` injector, which will be the application-level injector in most apps.\n * * `factory` gives the zero argument function which will create an instance of the injectable.\n * The factory can call `inject` to access the `Injector` and request injection of dependencies.\n *\n * @codeGenApi\n * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.\n */\nfunction ɵɵdefineInjectable(opts) {\n return {\n token: opts.token,\n providedIn: opts.providedIn || null,\n factory: opts.factory,\n value: undefined,\n };\n}\n/**\n * @deprecated in v8, delete after v10. This API should be used only by generated code, and that\n * code should now use ɵɵdefineInjectable instead.\n * @publicApi\n */\nconst defineInjectable = ɵɵdefineInjectable;\n/**\n * Construct an `InjectorDef` which configures an injector.\n *\n * This should be assigned to a static injector def (`ɵinj`) field on a type, which will then be an\n * `InjectorType`.\n *\n * Options:\n *\n * * `providers`: an optional array of providers to add to the injector. Each provider must\n * either have a factory or point to a type which has a `ɵprov` static property (the\n * type must be an `InjectableType`).\n * * `imports`: an optional array of imports of other `InjectorType`s or `InjectorTypeWithModule`s\n * whose providers will also be added to the injector. Locally provided types will override\n * providers from imports.\n *\n * @codeGenApi\n */\nfunction ɵɵdefineInjector(options) {\n return { providers: options.providers || [], imports: options.imports || [] };\n}\n/**\n * Read the injectable def (`ɵprov`) for `type` in a way which is immune to accidentally reading\n * inherited value.\n *\n * @param type A type which may have its own (non-inherited) `ɵprov`.\n */\nfunction getInjectableDef(type) {\n return getOwnDefinition(type, NG_PROV_DEF) || getOwnDefinition(type, NG_INJECTABLE_DEF);\n}\nfunction isInjectable(type) {\n return getInjectableDef(type) !== null;\n}\n/**\n * Return definition only if it is defined directly on `type` and is not inherited from a base\n * class of `type`.\n */\nfunction getOwnDefinition(type, field) {\n return type.hasOwnProperty(field) ? type[field] : null;\n}\n/**\n * Read the injectable def (`ɵprov`) for `type` or read the `ɵprov` from one of its ancestors.\n *\n * @param type A type which may have `ɵprov`, via inheritance.\n *\n * @deprecated Will be removed in a future version of Angular, where an error will occur in the\n * scenario if we find the `ɵprov` on an ancestor only.\n */\nfunction getInheritedInjectableDef(type) {\n const def = type && (type[NG_PROV_DEF] || type[NG_INJECTABLE_DEF]);\n if (def) {\n const typeName = getTypeName(type);\n // TODO(FW-1307): Re-add ngDevMode when closure can handle it\n // ngDevMode &&\n console.warn(`DEPRECATED: DI is instantiating a token \"${typeName}\" that inherits its @Injectable decorator but does not provide one itself.\\n` +\n `This will become an error in a future version of Angular. Please add @Injectable() to the \"${typeName}\" class.`);\n return def;\n }\n else {\n return null;\n }\n}\n/** Gets the name of a type, accounting for some cross-browser differences. */\nfunction getTypeName(type) {\n // `Function.prototype.name` behaves differently between IE and other browsers. In most browsers\n // it'll always return the name of the function itself, no matter how many other functions it\n // inherits from. On IE the function doesn't have its own `name` property, but it takes it from\n // the lowest level in the prototype chain. E.g. if we have `class Foo extends Parent` most\n // browsers will evaluate `Foo.name` to `Foo` while IE will return `Parent`. We work around\n // the issue by converting the function to a string and parsing its name out that way via a regex.\n if (type.hasOwnProperty('name')) {\n return type.name;\n }\n const match = ('' + type).match(/^function\\s*([^\\s(]+)/);\n return match === null ? '' : match[1];\n}\n/**\n * Read the injector def type in a way which is immune to accidentally reading inherited value.\n *\n * @param type type which may have an injector def (`ɵinj`)\n */\nfunction getInjectorDef(type) {\n return type && (type.hasOwnProperty(NG_INJ_DEF) || type.hasOwnProperty(NG_INJECTOR_DEF)) ?\n type[NG_INJ_DEF] :\n null;\n}\nconst NG_PROV_DEF = getClosureSafeProperty({ ɵprov: getClosureSafeProperty });\nconst NG_INJ_DEF = getClosureSafeProperty({ ɵinj: getClosureSafeProperty });\n// We need to keep these around so we can read off old defs if new defs are unavailable\nconst NG_INJECTABLE_DEF = getClosureSafeProperty({ ngInjectableDef: getClosureSafeProperty });\nconst NG_INJECTOR_DEF = getClosureSafeProperty({ ngInjectorDef: getClosureSafeProperty });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Injection flags for DI.\n *\n * @publicApi\n * @deprecated use an options object for `inject` instead.\n */\nvar InjectFlags;\n(function (InjectFlags) {\n // TODO(alxhub): make this 'const' (and remove `InternalInjectFlags` enum) when ngc no longer\n // writes exports of it into ngfactory files.\n /** Check self and check parent injector if needed */\n InjectFlags[InjectFlags[\"Default\"] = 0] = \"Default\";\n /**\n * Specifies that an injector should retrieve a dependency from any injector until reaching the\n * host element of the current component. (Only used with Element Injector)\n */\n InjectFlags[InjectFlags[\"Host\"] = 1] = \"Host\";\n /** Don't ascend to ancestors of the node requesting injection. */\n InjectFlags[InjectFlags[\"Self\"] = 2] = \"Self\";\n /** Skip the node that is requesting injection. */\n InjectFlags[InjectFlags[\"SkipSelf\"] = 4] = \"SkipSelf\";\n /** Inject `defaultValue` instead if token not found. */\n InjectFlags[InjectFlags[\"Optional\"] = 8] = \"Optional\";\n})(InjectFlags || (InjectFlags = {}));\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Current implementation of inject.\n *\n * By default, it is `injectInjectorOnly`, which makes it `Injector`-only aware. It can be changed\n * to `directiveInject`, which brings in the `NodeInjector` system of ivy. It is designed this\n * way for two reasons:\n * 1. `Injector` should not depend on ivy logic.\n * 2. To maintain tree shake-ability we don't want to bring in unnecessary code.\n */\nlet _injectImplementation;\nfunction getInjectImplementation() {\n return _injectImplementation;\n}\n/**\n * Sets the current inject implementation.\n */\nfunction setInjectImplementation(impl) {\n const previous = _injectImplementation;\n _injectImplementation = impl;\n return previous;\n}\n/**\n * Injects `root` tokens in limp mode.\n *\n * If no injector exists, we can still inject tree-shakable providers which have `providedIn` set to\n * `\"root\"`. This is known as the limp mode injection. In such case the value is stored in the\n * injectable definition.\n */\nfunction injectRootLimpMode(token, notFoundValue, flags) {\n const injectableDef = getInjectableDef(token);\n if (injectableDef && injectableDef.providedIn == 'root') {\n return injectableDef.value === undefined ? injectableDef.value = injectableDef.factory() :\n injectableDef.value;\n }\n if (flags & InjectFlags.Optional)\n return null;\n if (notFoundValue !== undefined)\n return notFoundValue;\n throwProviderNotFoundError(stringify(token), 'Injector');\n}\n/**\n * Assert that `_injectImplementation` is not `fn`.\n *\n * This is useful, to prevent infinite recursion.\n *\n * @param fn Function which it should not equal to\n */\nfunction assertInjectImplementationNotEqual(fn) {\n ngDevMode &&\n assertNotEqual(_injectImplementation, fn, 'Calling ɵɵinject would cause infinite recursion');\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Always use __globalThis if available, which is the spec-defined global variable across all\n// environments, then fallback to __global first, because in Node tests both __global and\n// __window may be defined and _global should be __global in that case. Note: Typeof/Instanceof\n// checks are considered side-effects in Terser. We explicitly mark this as side-effect free:\n// https://github.com/terser/terser/issues/250.\nconst _global = ( /* @__PURE__ */(() => (typeof globalThis !== 'undefined' && globalThis) ||\n (typeof global !== 'undefined' && global) || (typeof window !== 'undefined' && window) ||\n (typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&\n self instanceof WorkerGlobalScope && self))());\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction ngDevModeResetPerfCounters() {\n const locationString = typeof location !== 'undefined' ? location.toString() : '';\n const newCounters = {\n namedConstructors: locationString.indexOf('ngDevMode=namedConstructors') != -1,\n firstCreatePass: 0,\n tNode: 0,\n tView: 0,\n rendererCreateTextNode: 0,\n rendererSetText: 0,\n rendererCreateElement: 0,\n rendererAddEventListener: 0,\n rendererSetAttribute: 0,\n rendererRemoveAttribute: 0,\n rendererSetProperty: 0,\n rendererSetClassName: 0,\n rendererAddClass: 0,\n rendererRemoveClass: 0,\n rendererSetStyle: 0,\n rendererRemoveStyle: 0,\n rendererDestroy: 0,\n rendererDestroyNode: 0,\n rendererMoveNode: 0,\n rendererRemoveNode: 0,\n rendererAppendChild: 0,\n rendererInsertBefore: 0,\n rendererCreateComment: 0,\n };\n // Make sure to refer to ngDevMode as ['ngDevMode'] for closure.\n const allowNgDevModeTrue = locationString.indexOf('ngDevMode=false') === -1;\n _global['ngDevMode'] = allowNgDevModeTrue && newCounters;\n return newCounters;\n}\n/**\n * This function checks to see if the `ngDevMode` has been set. If yes,\n * then we honor it, otherwise we default to dev mode with additional checks.\n *\n * The idea is that unless we are doing production build where we explicitly\n * set `ngDevMode == false` we should be helping the developer by providing\n * as much early warning and errors as possible.\n *\n * `ɵɵdefineComponent` is guaranteed to have been called before any component template functions\n * (and thus Ivy instructions), so a single initialization there is sufficient to ensure ngDevMode\n * is defined for the entire instruction set.\n *\n * When checking `ngDevMode` on toplevel, always init it before referencing it\n * (e.g. `((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode())`), otherwise you can\n * get a `ReferenceError` like in https://github.com/angular/angular/issues/31595.\n *\n * Details on possible values for `ngDevMode` can be found on its docstring.\n *\n * NOTE:\n * - changes to the `ngDevMode` name must be synced with `compiler-cli/src/tooling.ts`.\n */\nfunction initNgDevMode() {\n // The below checks are to ensure that calling `initNgDevMode` multiple times does not\n // reset the counters.\n // If the `ngDevMode` is not an object, then it means we have not created the perf counters\n // yet.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (typeof ngDevMode !== 'object') {\n ngDevModeResetPerfCounters();\n }\n return typeof ngDevMode !== 'undefined' && !!ngDevMode;\n }\n return false;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst _THROW_IF_NOT_FOUND = {};\nconst THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;\n/*\n * Name of a property (that we patch onto DI decorator), which is used as an annotation of which\n * InjectFlag this decorator represents. This allows to avoid direct references to the DI decorators\n * in the code, thus making them tree-shakable.\n */\nconst DI_DECORATOR_FLAG = '__NG_DI_FLAG__';\nconst NG_TEMP_TOKEN_PATH = 'ngTempTokenPath';\nconst NG_TOKEN_PATH = 'ngTokenPath';\nconst NEW_LINE = /\\n/gm;\nconst NO_NEW_LINE = 'ɵ';\nconst SOURCE = '__source';\n/**\n * Current injector value used by `inject`.\n * - `undefined`: it is an error to call `inject`\n * - `null`: `inject` can be called but there is no injector (limp-mode).\n * - Injector instance: Use the injector for resolution.\n */\nlet _currentInjector = undefined;\nfunction setCurrentInjector(injector) {\n const former = _currentInjector;\n _currentInjector = injector;\n return former;\n}\nfunction injectInjectorOnly(token, flags = InjectFlags.Default) {\n if (_currentInjector === undefined) {\n throw new RuntimeError(-203 /* RuntimeErrorCode.MISSING_INJECTION_CONTEXT */, ngDevMode &&\n `inject() must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with \\`EnvironmentInjector#runInContext\\`.`);\n }\n else if (_currentInjector === null) {\n return injectRootLimpMode(token, undefined, flags);\n }\n else {\n return _currentInjector.get(token, flags & InjectFlags.Optional ? null : undefined, flags);\n }\n}\nfunction ɵɵinject(token, flags = InjectFlags.Default) {\n return (getInjectImplementation() || injectInjectorOnly)(resolveForwardRef(token), flags);\n}\n/**\n * Throws an error indicating that a factory function could not be generated by the compiler for a\n * particular class.\n *\n * The name of the class is not mentioned here, but will be in the generated factory function name\n * and thus in the stack trace.\n *\n * @codeGenApi\n */\nfunction ɵɵinvalidFactoryDep(index) {\n throw new RuntimeError(202 /* RuntimeErrorCode.INVALID_FACTORY_DEPENDENCY */, ngDevMode &&\n `This constructor is not compatible with Angular Dependency Injection because its dependency at index ${index} of the parameter list is invalid.\nThis can happen if the dependency type is a primitive like a string or if an ancestor of this class is missing an Angular decorator.\n\nPlease check that 1) the type for the parameter at index ${index} is correct and 2) the correct Angular decorators are defined for this class and its ancestors.`);\n}\n/**\n * Injects a token from the currently active injector.\n * `inject` is only supported during instantiation of a dependency by the DI system. It can be used\n * during:\n * - Construction (via the `constructor`) of a class being instantiated by the DI system, such\n * as an `@Injectable` or `@Component`.\n * - In the initializer for fields of such classes.\n * - In the factory function specified for `useFactory` of a `Provider` or an `@Injectable`.\n * - In the `factory` function specified for an `InjectionToken`.\n *\n * @param token A token that represents a dependency that should be injected.\n * @param flags Optional flags that control how injection is executed.\n * The flags correspond to injection strategies that can be specified with\n * parameter decorators `@Host`, `@Self`, `@SkipSef`, and `@Optional`.\n * @returns the injected value if operation is successful, `null` otherwise.\n * @throws if called outside of a supported context.\n *\n * @usageNotes\n * In practice the `inject()` calls are allowed in a constructor, a constructor parameter and a\n * field initializer:\n *\n * ```typescript\n * @Injectable({providedIn: 'root'})\n * export class Car {\n * radio: Radio|undefined;\n * // OK: field initializer\n * spareTyre = inject(Tyre);\n *\n * constructor() {\n * // OK: constructor body\n * this.radio = inject(Radio);\n * }\n * }\n * ```\n *\n * It is also legal to call `inject` from a provider's factory:\n *\n * ```typescript\n * providers: [\n * {provide: Car, useFactory: () => {\n * // OK: a class factory\n * const engine = inject(Engine);\n * return new Car(engine);\n * }}\n * ]\n * ```\n *\n * Calls to the `inject()` function outside of the class creation context will result in error. Most\n * notably, calls to `inject()` are disallowed after a class instance was created, in methods\n * (including lifecycle hooks):\n *\n * ```typescript\n * @Component({ ... })\n * export class CarComponent {\n * ngOnInit() {\n * // ERROR: too late, the component instance was already created\n * const engine = inject(Engine);\n * engine.start();\n * }\n * }\n * ```\n *\n * @publicApi\n */\nfunction inject(token, flags = InjectFlags.Default) {\n return ɵɵinject(token, convertToBitFlags(flags));\n}\n// Converts object-based DI flags (`InjectOptions`) to bit flags (`InjectFlags`).\nfunction convertToBitFlags(flags) {\n if (typeof flags === 'undefined' || typeof flags === 'number') {\n return flags;\n }\n // While TypeScript doesn't accept it without a cast, bitwise OR with false-y values in\n // JavaScript is a no-op. We can use that for a very codesize-efficient conversion from\n // `InjectOptions` to `InjectFlags`.\n return (0 /* InternalInjectFlags.Default */ | // comment to force a line break in the formatter\n (flags.optional && 8 /* InternalInjectFlags.Optional */) |\n (flags.host && 1 /* InternalInjectFlags.Host */) |\n (flags.self && 2 /* InternalInjectFlags.Self */) |\n (flags.skipSelf && 4 /* InternalInjectFlags.SkipSelf */));\n}\nfunction injectArgs(types) {\n const args = [];\n for (let i = 0; i < types.length; i++) {\n const arg = resolveForwardRef(types[i]);\n if (Array.isArray(arg)) {\n if (arg.length === 0) {\n throw new RuntimeError(900 /* RuntimeErrorCode.INVALID_DIFFER_INPUT */, ngDevMode && 'Arguments array must have arguments.');\n }\n let type = undefined;\n let flags = InjectFlags.Default;\n for (let j = 0; j < arg.length; j++) {\n const meta = arg[j];\n const flag = getInjectFlag(meta);\n if (typeof flag === 'number') {\n // Special case when we handle @Inject decorator.\n if (flag === -1 /* DecoratorFlags.Inject */) {\n type = meta.token;\n }\n else {\n flags |= flag;\n }\n }\n else {\n type = meta;\n }\n }\n args.push(ɵɵinject(type, flags));\n }\n else {\n args.push(ɵɵinject(arg));\n }\n }\n return args;\n}\n/**\n * Attaches a given InjectFlag to a given decorator using monkey-patching.\n * Since DI decorators can be used in providers `deps` array (when provider is configured using\n * `useFactory`) without initialization (e.g. `Host`) and as an instance (e.g. `new Host()`), we\n * attach the flag to make it available both as a static property and as a field on decorator\n * instance.\n *\n * @param decorator Provided DI decorator.\n * @param flag InjectFlag that should be applied.\n */\nfunction attachInjectFlag(decorator, flag) {\n decorator[DI_DECORATOR_FLAG] = flag;\n decorator.prototype[DI_DECORATOR_FLAG] = flag;\n return decorator;\n}\n/**\n * Reads monkey-patched property that contains InjectFlag attached to a decorator.\n *\n * @param token Token that may contain monkey-patched DI flags property.\n */\nfunction getInjectFlag(token) {\n return token[DI_DECORATOR_FLAG];\n}\nfunction catchInjectorError(e, token, injectorErrorName, source) {\n const tokenPath = e[NG_TEMP_TOKEN_PATH];\n if (token[SOURCE]) {\n tokenPath.unshift(token[SOURCE]);\n }\n e.message = formatError('\\n' + e.message, tokenPath, injectorErrorName, source);\n e[NG_TOKEN_PATH] = tokenPath;\n e[NG_TEMP_TOKEN_PATH] = null;\n throw e;\n}\nfunction formatError(text, obj, injectorErrorName, source = null) {\n text = text && text.charAt(0) === '\\n' && text.charAt(1) == NO_NEW_LINE ? text.slice(2) : text;\n let context = stringify(obj);\n if (Array.isArray(obj)) {\n context = obj.map(stringify).join(' -> ');\n }\n else if (typeof obj === 'object') {\n let parts = [];\n for (let key in obj) {\n if (obj.hasOwnProperty(key)) {\n let value = obj[key];\n parts.push(key + ':' + (typeof value === 'string' ? JSON.stringify(value) : stringify(value)));\n }\n }\n context = `{${parts.join(', ')}}`;\n }\n return `${injectorErrorName}${source ? '(' + source + ')' : ''}[${context}]: ${text.replace(NEW_LINE, '\\n ')}`;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Convince closure compiler that the wrapped function has no side-effects.\n *\n * Closure compiler always assumes that `toString` has no side-effects. We use this quirk to\n * allow us to execute a function but have closure compiler mark the call as no-side-effects.\n * It is important that the return value for the `noSideEffects` function be assigned\n * to something which is retained otherwise the call to `noSideEffects` will be removed by closure\n * compiler.\n */\nfunction noSideEffects(fn) {\n return { toString: fn }.toString();\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The strategy that the default change detector uses to detect changes.\n * When set, takes effect the next time change detection is triggered.\n *\n * @see {@link ChangeDetectorRef#usage-notes Change detection usage}\n *\n * @publicApi\n */\nvar ChangeDetectionStrategy;\n(function (ChangeDetectionStrategy) {\n /**\n * Use the `CheckOnce` strategy, meaning that automatic change detection is deactivated\n * until reactivated by setting the strategy to `Default` (`CheckAlways`).\n * Change detection can still be explicitly invoked.\n * This strategy applies to all child directives and cannot be overridden.\n */\n ChangeDetectionStrategy[ChangeDetectionStrategy[\"OnPush\"] = 0] = \"OnPush\";\n /**\n * Use the default `CheckAlways` strategy, in which change detection is automatic until\n * explicitly deactivated.\n */\n ChangeDetectionStrategy[ChangeDetectionStrategy[\"Default\"] = 1] = \"Default\";\n})(ChangeDetectionStrategy || (ChangeDetectionStrategy = {}));\n/**\n * Defines the possible states of the default change detector.\n * @see `ChangeDetectorRef`\n */\nvar ChangeDetectorStatus;\n(function (ChangeDetectorStatus) {\n /**\n * A state in which, after calling `detectChanges()`, the change detector\n * state becomes `Checked`, and must be explicitly invoked or reactivated.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"CheckOnce\"] = 0] = \"CheckOnce\";\n /**\n * A state in which change detection is skipped until the change detector mode\n * becomes `CheckOnce`.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"Checked\"] = 1] = \"Checked\";\n /**\n * A state in which change detection continues automatically until explicitly\n * deactivated.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"CheckAlways\"] = 2] = \"CheckAlways\";\n /**\n * A state in which a change detector sub tree is not a part of the main tree and\n * should be skipped.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"Detached\"] = 3] = \"Detached\";\n /**\n * Indicates that the change detector encountered an error checking a binding\n * or calling a directive lifecycle method and is now in an inconsistent state. Change\n * detectors in this state do not detect changes.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"Errored\"] = 4] = \"Errored\";\n /**\n * Indicates that the change detector has been destroyed.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"Destroyed\"] = 5] = \"Destroyed\";\n})(ChangeDetectorStatus || (ChangeDetectorStatus = {}));\n/**\n * Reports whether a given strategy is currently the default for change detection.\n * @param changeDetectionStrategy The strategy to check.\n * @returns True if the given strategy is the current default, false otherwise.\n * @see `ChangeDetectorStatus`\n * @see `ChangeDetectorRef`\n */\nfunction isDefaultChangeDetectionStrategy(changeDetectionStrategy) {\n return changeDetectionStrategy == null ||\n changeDetectionStrategy === ChangeDetectionStrategy.Default;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Defines the CSS styles encapsulation policies for the {@link Component} decorator's\n * `encapsulation` option.\n *\n * See {@link Component#encapsulation encapsulation}.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/ts/metadata/encapsulation.ts region='longform'}\n *\n * @publicApi\n */\nvar ViewEncapsulation$1;\n(function (ViewEncapsulation) {\n // TODO: consider making `ViewEncapsulation` a `const enum` instead. See\n // https://github.com/angular/angular/issues/44119 for additional information.\n /**\n * Emulates a native Shadow DOM encapsulation behavior by adding a specific attribute to the\n * component's host element and applying the same attribute to all the CSS selectors provided\n * via {@link Component#styles styles} or {@link Component#styleUrls styleUrls}.\n *\n * This is the default option.\n */\n ViewEncapsulation[ViewEncapsulation[\"Emulated\"] = 0] = \"Emulated\";\n // Historically the 1 value was for `Native` encapsulation which has been removed as of v11.\n /**\n * Doesn't provide any sort of CSS style encapsulation, meaning that all the styles provided\n * via {@link Component#styles styles} or {@link Component#styleUrls styleUrls} are applicable\n * to any HTML element of the application regardless of their host Component.\n */\n ViewEncapsulation[ViewEncapsulation[\"None\"] = 2] = \"None\";\n /**\n * Uses the browser's native Shadow DOM API to encapsulate CSS styles, meaning that it creates\n * a ShadowRoot for the component's host element which is then used to encapsulate\n * all the Component's styling.\n */\n ViewEncapsulation[ViewEncapsulation[\"ShadowDom\"] = 3] = \"ShadowDom\";\n})(ViewEncapsulation$1 || (ViewEncapsulation$1 = {}));\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * This file contains reuseable \"empty\" symbols that can be used as default return values\n * in different parts of the rendering code. Because the same symbols are returned, this\n * allows for identity checks against these values to be consistently used by the framework\n * code.\n */\nconst EMPTY_OBJ = {};\nconst EMPTY_ARRAY = [];\n// freezing the values prevents any code from accidentally inserting new values in\nif ((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode()) {\n // These property accesses can be ignored because ngDevMode will be set to false\n // when optimizing code and the whole if statement will be dropped.\n // tslint:disable-next-line:no-toplevel-property-access\n Object.freeze(EMPTY_OBJ);\n // tslint:disable-next-line:no-toplevel-property-access\n Object.freeze(EMPTY_ARRAY);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst NG_COMP_DEF = getClosureSafeProperty({ ɵcmp: getClosureSafeProperty });\nconst NG_DIR_DEF = getClosureSafeProperty({ ɵdir: getClosureSafeProperty });\nconst NG_PIPE_DEF = getClosureSafeProperty({ ɵpipe: getClosureSafeProperty });\nconst NG_MOD_DEF = getClosureSafeProperty({ ɵmod: getClosureSafeProperty });\nconst NG_FACTORY_DEF = getClosureSafeProperty({ ɵfac: getClosureSafeProperty });\n/**\n * If a directive is diPublic, bloomAdd sets a property on the type with this constant as\n * the key and the directive's unique ID as the value. This allows us to map directives to their\n * bloom filter bit for DI.\n */\n// TODO(misko): This is wrong. The NG_ELEMENT_ID should never be minified.\nconst NG_ELEMENT_ID = getClosureSafeProperty({ __NG_ELEMENT_ID__: getClosureSafeProperty });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Counter used to generate unique IDs for component definitions. */\nlet componentDefCount = 0;\n/**\n * Create a component definition object.\n *\n *\n * # Example\n * ```\n * class MyDirective {\n * // Generated by Angular Template Compiler\n * // [Symbol] syntax will not be supported by TypeScript until v2.7\n * static ɵcmp = defineComponent({\n * ...\n * });\n * }\n * ```\n * @codeGenApi\n */\nfunction ɵɵdefineComponent(componentDefinition) {\n return noSideEffects(() => {\n // Initialize ngDevMode. This must be the first statement in ɵɵdefineComponent.\n // See the `initNgDevMode` docstring for more information.\n (typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode();\n const type = componentDefinition.type;\n const standalone = componentDefinition.standalone === true;\n const declaredInputs = {};\n const def = {\n type: type,\n providersResolver: null,\n decls: componentDefinition.decls,\n vars: componentDefinition.vars,\n factory: null,\n template: componentDefinition.template || null,\n consts: componentDefinition.consts || null,\n ngContentSelectors: componentDefinition.ngContentSelectors,\n hostBindings: componentDefinition.hostBindings || null,\n hostVars: componentDefinition.hostVars || 0,\n hostAttrs: componentDefinition.hostAttrs || null,\n contentQueries: componentDefinition.contentQueries || null,\n declaredInputs: declaredInputs,\n inputs: null,\n outputs: null,\n exportAs: componentDefinition.exportAs || null,\n onPush: componentDefinition.changeDetection === ChangeDetectionStrategy.OnPush,\n directiveDefs: null,\n pipeDefs: null,\n standalone,\n dependencies: standalone && componentDefinition.dependencies || null,\n getStandaloneInjector: null,\n selectors: componentDefinition.selectors || EMPTY_ARRAY,\n viewQuery: componentDefinition.viewQuery || null,\n features: componentDefinition.features || null,\n data: componentDefinition.data || {},\n encapsulation: componentDefinition.encapsulation || ViewEncapsulation$1.Emulated,\n id: `c${componentDefCount++}`,\n styles: componentDefinition.styles || EMPTY_ARRAY,\n _: null,\n setInput: null,\n schemas: componentDefinition.schemas || null,\n tView: null,\n findHostDirectiveDefs: null,\n hostDirectives: null,\n };\n const dependencies = componentDefinition.dependencies;\n const feature = componentDefinition.features;\n def.inputs = invertObject(componentDefinition.inputs, declaredInputs),\n def.outputs = invertObject(componentDefinition.outputs),\n feature && feature.forEach((fn) => fn(def));\n def.directiveDefs = dependencies ?\n (() => (typeof dependencies === 'function' ? dependencies() : dependencies)\n .map(extractDirectiveDef)\n .filter(nonNull)) :\n null;\n def.pipeDefs = dependencies ?\n (() => (typeof dependencies === 'function' ? dependencies() : dependencies)\n .map(getPipeDef$1)\n .filter(nonNull)) :\n null;\n return def;\n });\n}\n/**\n * Generated next to NgModules to monkey-patch directive and pipe references onto a component's\n * definition, when generating a direct reference in the component file would otherwise create an\n * import cycle.\n *\n * See [this explanation](https://hackmd.io/Odw80D0pR6yfsOjg_7XCJg?view) for more details.\n *\n * @codeGenApi\n */\nfunction ɵɵsetComponentScope(type, directives, pipes) {\n const def = type.ɵcmp;\n def.directiveDefs = () => (typeof directives === 'function' ? directives() : directives).map(extractDirectiveDef);\n def.pipeDefs = () => (typeof pipes === 'function' ? pipes() : pipes).map(getPipeDef$1);\n}\nfunction extractDirectiveDef(type) {\n return getComponentDef(type) || getDirectiveDef(type);\n}\nfunction nonNull(value) {\n return value !== null;\n}\n/**\n * @codeGenApi\n */\nfunction ɵɵdefineNgModule(def) {\n return noSideEffects(() => {\n const res = {\n type: def.type,\n bootstrap: def.bootstrap || EMPTY_ARRAY,\n declarations: def.declarations || EMPTY_ARRAY,\n imports: def.imports || EMPTY_ARRAY,\n exports: def.exports || EMPTY_ARRAY,\n transitiveCompileScopes: null,\n schemas: def.schemas || null,\n id: def.id || null,\n };\n return res;\n });\n}\n/**\n * Adds the module metadata that is necessary to compute the module's transitive scope to an\n * existing module definition.\n *\n * Scope metadata of modules is not used in production builds, so calls to this function can be\n * marked pure to tree-shake it from the bundle, allowing for all referenced declarations\n * to become eligible for tree-shaking as well.\n *\n * @codeGenApi\n */\nfunction ɵɵsetNgModuleScope(type, scope) {\n return noSideEffects(() => {\n const ngModuleDef = getNgModuleDef(type, true);\n ngModuleDef.declarations = scope.declarations || EMPTY_ARRAY;\n ngModuleDef.imports = scope.imports || EMPTY_ARRAY;\n ngModuleDef.exports = scope.exports || EMPTY_ARRAY;\n });\n}\n/**\n * Inverts an inputs or outputs lookup such that the keys, which were the\n * minified keys, are part of the values, and the values are parsed so that\n * the publicName of the property is the new key\n *\n * e.g. for\n *\n * ```\n * class Comp {\n * @Input()\n * propName1: string;\n *\n * @Input('publicName2')\n * declaredPropName2: number;\n * }\n * ```\n *\n * will be serialized as\n *\n * ```\n * {\n * propName1: 'propName1',\n * declaredPropName2: ['publicName2', 'declaredPropName2'],\n * }\n * ```\n *\n * which is than translated by the minifier as:\n *\n * ```\n * {\n * minifiedPropName1: 'propName1',\n * minifiedPropName2: ['publicName2', 'declaredPropName2'],\n * }\n * ```\n *\n * becomes: (public name => minifiedName)\n *\n * ```\n * {\n * 'propName1': 'minifiedPropName1',\n * 'publicName2': 'minifiedPropName2',\n * }\n * ```\n *\n * Optionally the function can take `secondary` which will result in: (public name => declared name)\n *\n * ```\n * {\n * 'propName1': 'propName1',\n * 'publicName2': 'declaredPropName2',\n * }\n * ```\n *\n\n */\nfunction invertObject(obj, secondary) {\n if (obj == null)\n return EMPTY_OBJ;\n const newLookup = {};\n for (const minifiedKey in obj) {\n if (obj.hasOwnProperty(minifiedKey)) {\n let publicName = obj[minifiedKey];\n let declaredName = publicName;\n if (Array.isArray(publicName)) {\n declaredName = publicName[1];\n publicName = publicName[0];\n }\n newLookup[publicName] = minifiedKey;\n if (secondary) {\n (secondary[publicName] = declaredName);\n }\n }\n }\n return newLookup;\n}\n/**\n * Create a directive definition object.\n *\n * # Example\n * ```ts\n * class MyDirective {\n * // Generated by Angular Template Compiler\n * // [Symbol] syntax will not be supported by TypeScript until v2.7\n * static ɵdir = ɵɵdefineDirective({\n * ...\n * });\n * }\n * ```\n *\n * @codeGenApi\n */\nconst ɵɵdefineDirective = ɵɵdefineComponent;\n/**\n * Create a pipe definition object.\n *\n * # Example\n * ```\n * class MyPipe implements PipeTransform {\n * // Generated by Angular Template Compiler\n * static ɵpipe = definePipe({\n * ...\n * });\n * }\n * ```\n * @param pipeDef Pipe definition generated by the compiler\n *\n * @codeGenApi\n */\nfunction ɵɵdefinePipe(pipeDef) {\n return {\n type: pipeDef.type,\n name: pipeDef.name,\n factory: null,\n pure: pipeDef.pure !== false,\n standalone: pipeDef.standalone === true,\n onDestroy: pipeDef.type.prototype.ngOnDestroy || null\n };\n}\n/**\n * The following getter methods retrieve the definition from the type. Currently the retrieval\n * honors inheritance, but in the future we may change the rule to require that definitions are\n * explicit. This would require some sort of migration strategy.\n */\nfunction getComponentDef(type) {\n return type[NG_COMP_DEF] || null;\n}\nfunction getDirectiveDef(type) {\n return type[NG_DIR_DEF] || null;\n}\nfunction getPipeDef$1(type) {\n return type[NG_PIPE_DEF] || null;\n}\nfunction isStandalone(type) {\n const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef$1(type);\n return def !== null ? def.standalone : false;\n}\nfunction getNgModuleDef(type, throwNotFound) {\n const ngModuleDef = type[NG_MOD_DEF] || null;\n if (!ngModuleDef && throwNotFound === true) {\n throw new Error(`Type ${stringify(type)} does not have 'ɵmod' property.`);\n }\n return ngModuleDef;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Below are constants for LView indices to help us look up LView members\n// without having to remember the specific indices.\n// Uglify will inline these when minifying so there shouldn't be a cost.\nconst HOST = 0;\nconst TVIEW = 1;\nconst FLAGS = 2;\nconst PARENT = 3;\nconst NEXT = 4;\nconst TRANSPLANTED_VIEWS_TO_REFRESH = 5;\nconst T_HOST = 6;\nconst CLEANUP = 7;\nconst CONTEXT = 8;\nconst INJECTOR$1 = 9;\nconst RENDERER_FACTORY = 10;\nconst RENDERER = 11;\nconst SANITIZER = 12;\nconst CHILD_HEAD = 13;\nconst CHILD_TAIL = 14;\n// FIXME(misko): Investigate if the three declarations aren't all same thing.\nconst DECLARATION_VIEW = 15;\nconst DECLARATION_COMPONENT_VIEW = 16;\nconst DECLARATION_LCONTAINER = 17;\nconst PREORDER_HOOK_FLAGS = 18;\nconst QUERIES = 19;\nconst ID = 20;\nconst EMBEDDED_VIEW_INJECTOR = 21;\n/**\n * Size of LView's header. Necessary to adjust for it when setting slots.\n *\n * IMPORTANT: `HEADER_OFFSET` should only be referred to the in the `ɵɵ*` instructions to translate\n * instruction index into `LView` index. All other indexes should be in the `LView` index space and\n * there should be no need to refer to `HEADER_OFFSET` anywhere else.\n */\nconst HEADER_OFFSET = 22;\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nconst unusedValueExportToPlacateAjd$4 = 1;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Special location which allows easy identification of type. If we have an array which was\n * retrieved from the `LView` and that array has `true` at `TYPE` location, we know it is\n * `LContainer`.\n */\nconst TYPE = 1;\n/**\n * Below are constants for LContainer indices to help us look up LContainer members\n * without having to remember the specific indices.\n * Uglify will inline these when minifying so there shouldn't be a cost.\n */\n/**\n * Flag to signify that this `LContainer` may have transplanted views which need to be change\n * detected. (see: `LView[DECLARATION_COMPONENT_VIEW])`.\n *\n * This flag, once set, is never unset for the `LContainer`. This means that when unset we can skip\n * a lot of work in `refreshEmbeddedViews`. But when set we still need to verify\n * that the `MOVED_VIEWS` are transplanted and on-push.\n */\nconst HAS_TRANSPLANTED_VIEWS = 2;\n// PARENT, NEXT, TRANSPLANTED_VIEWS_TO_REFRESH are indices 3, 4, and 5\n// As we already have these constants in LView, we don't need to re-create them.\n// T_HOST is index 6\n// We already have this constants in LView, we don't need to re-create it.\nconst NATIVE = 7;\nconst VIEW_REFS = 8;\nconst MOVED_VIEWS = 9;\n/**\n * Size of LContainer's header. Represents the index after which all views in the\n * container will be inserted. We need to keep a record of current views so we know\n * which views are already in the DOM (and don't need to be re-added) and so we can\n * remove views from the DOM when they are no longer required.\n */\nconst CONTAINER_HEADER_OFFSET = 10;\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nconst unusedValueExportToPlacateAjd$3 = 1;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * True if `value` is `LView`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nfunction isLView(value) {\n return Array.isArray(value) && typeof value[TYPE] === 'object';\n}\n/**\n * True if `value` is `LContainer`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nfunction isLContainer(value) {\n return Array.isArray(value) && value[TYPE] === true;\n}\nfunction isContentQueryHost(tNode) {\n return (tNode.flags & 4 /* TNodeFlags.hasContentQuery */) !== 0;\n}\nfunction isComponentHost(tNode) {\n return tNode.componentOffset > -1;\n}\nfunction isDirectiveHost(tNode) {\n return (tNode.flags & 1 /* TNodeFlags.isDirectiveHost */) === 1 /* TNodeFlags.isDirectiveHost */;\n}\nfunction isComponentDef(def) {\n return def.template !== null;\n}\nfunction isRootView(target) {\n return (target[FLAGS] & 256 /* LViewFlags.IsRoot */) !== 0;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// [Assert functions do not constraint type when they are guarded by a truthy\n// expression.](https://github.com/microsoft/TypeScript/issues/37295)\nfunction assertTNodeForLView(tNode, lView) {\n assertTNodeForTView(tNode, lView[TVIEW]);\n}\nfunction assertTNodeForTView(tNode, tView) {\n assertTNode(tNode);\n tNode.hasOwnProperty('tView_') &&\n assertEqual(tNode.tView_, tView, 'This TNode does not belong to this TView.');\n}\nfunction assertTNode(tNode) {\n assertDefined(tNode, 'TNode must be defined');\n if (!(tNode && typeof tNode === 'object' && tNode.hasOwnProperty('directiveStylingLast'))) {\n throwError('Not of type TNode, got: ' + tNode);\n }\n}\nfunction assertTIcu(tIcu) {\n assertDefined(tIcu, 'Expected TIcu to be defined');\n if (!(typeof tIcu.currentCaseLViewIndex === 'number')) {\n throwError('Object is not of TIcu type.');\n }\n}\nfunction assertComponentType(actual, msg = 'Type passed in is not ComponentType, it does not have \\'ɵcmp\\' property.') {\n if (!getComponentDef(actual)) {\n throwError(msg);\n }\n}\nfunction assertNgModuleType(actual, msg = 'Type passed in is not NgModuleType, it does not have \\'ɵmod\\' property.') {\n if (!getNgModuleDef(actual)) {\n throwError(msg);\n }\n}\nfunction assertCurrentTNodeIsParent(isParent) {\n assertEqual(isParent, true, 'currentTNode should be a parent');\n}\nfunction assertHasParent(tNode) {\n assertDefined(tNode, 'currentTNode should exist!');\n assertDefined(tNode.parent, 'currentTNode should have a parent');\n}\nfunction assertLContainer(value) {\n assertDefined(value, 'LContainer must be defined');\n assertEqual(isLContainer(value), true, 'Expecting LContainer');\n}\nfunction assertLViewOrUndefined(value) {\n value && assertEqual(isLView(value), true, 'Expecting LView or undefined or null');\n}\nfunction assertLView(value) {\n assertDefined(value, 'LView must be defined');\n assertEqual(isLView(value), true, 'Expecting LView');\n}\nfunction assertFirstCreatePass(tView, errMessage) {\n assertEqual(tView.firstCreatePass, true, errMessage || 'Should only be called in first create pass.');\n}\nfunction assertFirstUpdatePass(tView, errMessage) {\n assertEqual(tView.firstUpdatePass, true, errMessage || 'Should only be called in first update pass.');\n}\n/**\n * This is a basic sanity check that an object is probably a directive def. DirectiveDef is\n * an interface, so we can't do a direct instanceof check.\n */\nfunction assertDirectiveDef(obj) {\n if (obj.type === undefined || obj.selectors == undefined || obj.inputs === undefined) {\n throwError(`Expected a DirectiveDef/ComponentDef and this object does not seem to have the expected shape.`);\n }\n}\nfunction assertIndexInDeclRange(lView, index) {\n const tView = lView[1];\n assertBetween(HEADER_OFFSET, tView.bindingStartIndex, index);\n}\nfunction assertIndexInExpandoRange(lView, index) {\n const tView = lView[1];\n assertBetween(tView.expandoStartIndex, lView.length, index);\n}\nfunction assertBetween(lower, upper, index) {\n if (!(lower <= index && index < upper)) {\n throwError(`Index out of range (expecting ${lower} <= ${index} < ${upper})`);\n }\n}\nfunction assertProjectionSlots(lView, errMessage) {\n assertDefined(lView[DECLARATION_COMPONENT_VIEW], 'Component views should exist.');\n assertDefined(lView[DECLARATION_COMPONENT_VIEW][T_HOST].projection, errMessage ||\n 'Components with projection nodes (<ng-content>) must have projection slots defined.');\n}\nfunction assertParentView(lView, errMessage) {\n assertDefined(lView, errMessage || 'Component views should always have a parent view (component\\'s host view)');\n}\n/**\n * This is a basic sanity check that the `injectorIndex` seems to point to what looks like a\n * NodeInjector data structure.\n *\n * @param lView `LView` which should be checked.\n * @param injectorIndex index into the `LView` where the `NodeInjector` is expected.\n */\nfunction assertNodeInjector(lView, injectorIndex) {\n assertIndexInExpandoRange(lView, injectorIndex);\n assertIndexInExpandoRange(lView, injectorIndex + 8 /* NodeInjectorOffset.PARENT */);\n assertNumber(lView[injectorIndex + 0], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 1], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 2], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 3], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 4], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 5], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 6], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 7], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 8 /* NodeInjectorOffset.PARENT */], 'injectorIndex should point to parent injector');\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction getFactoryDef(type, throwNotFound) {\n const hasFactoryDef = type.hasOwnProperty(NG_FACTORY_DEF);\n if (!hasFactoryDef && throwNotFound === true && ngDevMode) {\n throw new Error(`Type ${stringify(type)} does not have 'ɵfac' property.`);\n }\n return hasFactoryDef ? type[NG_FACTORY_DEF] : null;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Represents a basic change from a previous to a new value for a single\n * property on a directive instance. Passed as a value in a\n * {@link SimpleChanges} object to the `ngOnChanges` hook.\n *\n * @see `OnChanges`\n *\n * @publicApi\n */\nclass SimpleChange {\n constructor(previousValue, currentValue, firstChange) {\n this.previousValue = previousValue;\n this.currentValue = currentValue;\n this.firstChange = firstChange;\n }\n /**\n * Check whether the new value is the first value assigned.\n */\n isFirstChange() {\n return this.firstChange;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The NgOnChangesFeature decorates a component with support for the ngOnChanges\n * lifecycle hook, so it should be included in any component that implements\n * that hook.\n *\n * If the component or directive uses inheritance, the NgOnChangesFeature MUST\n * be included as a feature AFTER {@link InheritDefinitionFeature}, otherwise\n * inherited properties will not be propagated to the ngOnChanges lifecycle\n * hook.\n *\n * Example usage:\n *\n * ```\n * static ɵcmp = defineComponent({\n * ...\n * inputs: {name: 'publicName'},\n * features: [NgOnChangesFeature]\n * });\n * ```\n *\n * @codeGenApi\n */\nfunction ɵɵNgOnChangesFeature() {\n return NgOnChangesFeatureImpl;\n}\nfunction NgOnChangesFeatureImpl(definition) {\n if (definition.type.prototype.ngOnChanges) {\n definition.setInput = ngOnChangesSetInput;\n }\n return rememberChangeHistoryAndInvokeOnChangesHook;\n}\n// This option ensures that the ngOnChanges lifecycle hook will be inherited\n// from superclasses (in InheritDefinitionFeature).\n/** @nocollapse */\n// tslint:disable-next-line:no-toplevel-property-access\nɵɵNgOnChangesFeature.ngInherit = true;\n/**\n * This is a synthetic lifecycle hook which gets inserted into `TView.preOrderHooks` to simulate\n * `ngOnChanges`.\n *\n * The hook reads the `NgSimpleChangesStore` data from the component instance and if changes are\n * found it invokes `ngOnChanges` on the component instance.\n *\n * @param this Component instance. Because this function gets inserted into `TView.preOrderHooks`,\n * it is guaranteed to be called with component instance.\n */\nfunction rememberChangeHistoryAndInvokeOnChangesHook() {\n const simpleChangesStore = getSimpleChangesStore(this);\n const current = simpleChangesStore?.current;\n if (current) {\n const previous = simpleChangesStore.previous;\n if (previous === EMPTY_OBJ) {\n simpleChangesStore.previous = current;\n }\n else {\n // New changes are copied to the previous store, so that we don't lose history for inputs\n // which were not changed this time\n for (let key in current) {\n previous[key] = current[key];\n }\n }\n simpleChangesStore.current = null;\n this.ngOnChanges(current);\n }\n}\nfunction ngOnChangesSetInput(instance, value, publicName, privateName) {\n const declaredName = this.declaredInputs[publicName];\n ngDevMode && assertString(declaredName, 'Name of input in ngOnChanges has to be a string');\n const simpleChangesStore = getSimpleChangesStore(instance) ||\n setSimpleChangesStore(instance, { previous: EMPTY_OBJ, current: null });\n const current = simpleChangesStore.current || (simpleChangesStore.current = {});\n const previous = simpleChangesStore.previous;\n const previousChange = previous[declaredName];\n current[declaredName] = new SimpleChange(previousChange && previousChange.currentValue, value, previous === EMPTY_OBJ);\n instance[privateName] = value;\n}\nconst SIMPLE_CHANGES_STORE = '__ngSimpleChanges__';\nfunction getSimpleChangesStore(instance) {\n return instance[SIMPLE_CHANGES_STORE] || null;\n}\nfunction setSimpleChangesStore(instance, store) {\n return instance[SIMPLE_CHANGES_STORE] = store;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nlet profilerCallback = null;\n/**\n * Sets the callback function which will be invoked before and after performing certain actions at\n * runtime (for example, before and after running change detection).\n *\n * Warning: this function is *INTERNAL* and should not be relied upon in application's code.\n * The contract of the function might be changed in any release and/or the function can be removed\n * completely.\n *\n * @param profiler function provided by the caller or null value to disable profiling.\n */\nconst setProfiler = (profiler) => {\n profilerCallback = profiler;\n};\n/**\n * Profiler function which wraps user code executed by the runtime.\n *\n * @param event ProfilerEvent corresponding to the execution context\n * @param instance component instance\n * @param hookOrListener lifecycle hook function or output listener. The value depends on the\n * execution context\n * @returns\n */\nconst profiler = function (event, instance, hookOrListener) {\n if (profilerCallback != null /* both `null` and `undefined` */) {\n profilerCallback(event, instance, hookOrListener);\n }\n};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst SVG_NAMESPACE = 'svg';\nconst MATH_ML_NAMESPACE = 'math';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * For efficiency reasons we often put several different data types (`RNode`, `LView`, `LContainer`)\n * in same location in `LView`. This is because we don't want to pre-allocate space for it\n * because the storage is sparse. This file contains utilities for dealing with such data types.\n *\n * How do we know what is stored at a given location in `LView`.\n * - `Array.isArray(value) === false` => `RNode` (The normal storage value)\n * - `Array.isArray(value) === true` => then the `value[0]` represents the wrapped value.\n * - `typeof value[TYPE] === 'object'` => `LView`\n * - This happens when we have a component at a given location\n * - `typeof value[TYPE] === true` => `LContainer`\n * - This happens when we have `LContainer` binding at a given location.\n *\n *\n * NOTE: it is assumed that `Array.isArray` and `typeof` operations are very efficient.\n */\n/**\n * Returns `RNode`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nfunction unwrapRNode(value) {\n while (Array.isArray(value)) {\n value = value[HOST];\n }\n return value;\n}\n/**\n * Returns `LView` or `null` if not found.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nfunction unwrapLView(value) {\n while (Array.isArray(value)) {\n // This check is same as `isLView()` but we don't call at as we don't want to call\n // `Array.isArray()` twice and give JITer more work for inlining.\n if (typeof value[TYPE] === 'object')\n return value;\n value = value[HOST];\n }\n return null;\n}\n/**\n * Retrieves an element value from the provided `viewData`, by unwrapping\n * from any containers, component views, or style contexts.\n */\nfunction getNativeByIndex(index, lView) {\n ngDevMode && assertIndexInRange(lView, index);\n ngDevMode && assertGreaterThanOrEqual(index, HEADER_OFFSET, 'Expected to be past HEADER_OFFSET');\n return unwrapRNode(lView[index]);\n}\n/**\n * Retrieve an `RNode` for a given `TNode` and `LView`.\n *\n * This function guarantees in dev mode to retrieve a non-null `RNode`.\n *\n * @param tNode\n * @param lView\n */\nfunction getNativeByTNode(tNode, lView) {\n ngDevMode && assertTNodeForLView(tNode, lView);\n ngDevMode && assertIndexInRange(lView, tNode.index);\n const node = unwrapRNode(lView[tNode.index]);\n return node;\n}\n/**\n * Retrieve an `RNode` or `null` for a given `TNode` and `LView`.\n *\n * Some `TNode`s don't have associated `RNode`s. For example `Projection`\n *\n * @param tNode\n * @param lView\n */\nfunction getNativeByTNodeOrNull(tNode, lView) {\n const index = tNode === null ? -1 : tNode.index;\n if (index !== -1) {\n ngDevMode && assertTNodeForLView(tNode, lView);\n const node = unwrapRNode(lView[index]);\n return node;\n }\n return null;\n}\n// fixme(misko): The return Type should be `TNode|null`\nfunction getTNode(tView, index) {\n ngDevMode && assertGreaterThan(index, -1, 'wrong index for TNode');\n ngDevMode && assertLessThan(index, tView.data.length, 'wrong index for TNode');\n const tNode = tView.data[index];\n ngDevMode && tNode !== null && assertTNode(tNode);\n return tNode;\n}\n/** Retrieves a value from any `LView` or `TData`. */\nfunction load(view, index) {\n ngDevMode && assertIndexInRange(view, index);\n return view[index];\n}\nfunction getComponentLViewByIndex(nodeIndex, hostView) {\n // Could be an LView or an LContainer. If LContainer, unwrap to find LView.\n ngDevMode && assertIndexInRange(hostView, nodeIndex);\n const slotValue = hostView[nodeIndex];\n const lView = isLView(slotValue) ? slotValue : slotValue[HOST];\n return lView;\n}\n/** Checks whether a given view is in creation mode */\nfunction isCreationMode(view) {\n return (view[FLAGS] & 4 /* LViewFlags.CreationMode */) === 4 /* LViewFlags.CreationMode */;\n}\n/**\n * Returns a boolean for whether the view is attached to the change detection tree.\n *\n * Note: This determines whether a view should be checked, not whether it's inserted\n * into a container. For that, you'll want `viewAttachedToContainer` below.\n */\nfunction viewAttachedToChangeDetector(view) {\n return (view[FLAGS] & 64 /* LViewFlags.Attached */) === 64 /* LViewFlags.Attached */;\n}\n/** Returns a boolean for whether the view is attached to a container. */\nfunction viewAttachedToContainer(view) {\n return isLContainer(view[PARENT]);\n}\nfunction getConstant(consts, index) {\n if (index === null || index === undefined)\n return null;\n ngDevMode && assertIndexInRange(consts, index);\n return consts[index];\n}\n/**\n * Resets the pre-order hook flags of the view.\n * @param lView the LView on which the flags are reset\n */\nfunction resetPreOrderHookFlags(lView) {\n lView[PREORDER_HOOK_FLAGS] = 0;\n}\n/**\n * Updates the `TRANSPLANTED_VIEWS_TO_REFRESH` counter on the `LContainer` as well as the parents\n * whose\n * 1. counter goes from 0 to 1, indicating that there is a new child that has a view to refresh\n * or\n * 2. counter goes from 1 to 0, indicating there are no more descendant views to refresh\n */\nfunction updateTransplantedViewCount(lContainer, amount) {\n lContainer[TRANSPLANTED_VIEWS_TO_REFRESH] += amount;\n let viewOrContainer = lContainer;\n let parent = lContainer[PARENT];\n while (parent !== null &&\n ((amount === 1 && viewOrContainer[TRANSPLANTED_VIEWS_TO_REFRESH] === 1) ||\n (amount === -1 && viewOrContainer[TRANSPLANTED_VIEWS_TO_REFRESH] === 0))) {\n parent[TRANSPLANTED_VIEWS_TO_REFRESH] += amount;\n viewOrContainer = parent;\n parent = parent[PARENT];\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst instructionState = {\n lFrame: createLFrame(null),\n bindingsEnabled: true,\n};\n/**\n * In this mode, any changes in bindings will throw an ExpressionChangedAfterChecked error.\n *\n * Necessary to support ChangeDetectorRef.checkNoChanges().\n *\n * The `checkNoChanges` function is invoked only in ngDevMode=true and verifies that no unintended\n * changes exist in the change detector or its children.\n */\nlet _isInCheckNoChangesMode = false;\n/**\n * Returns true if the instruction state stack is empty.\n *\n * Intended to be called from tests only (tree shaken otherwise).\n */\nfunction specOnlyIsInstructionStateEmpty() {\n return instructionState.lFrame.parent === null;\n}\nfunction getElementDepthCount() {\n return instructionState.lFrame.elementDepthCount;\n}\nfunction increaseElementDepthCount() {\n instructionState.lFrame.elementDepthCount++;\n}\nfunction decreaseElementDepthCount() {\n instructionState.lFrame.elementDepthCount--;\n}\nfunction getBindingsEnabled() {\n return instructionState.bindingsEnabled;\n}\n/**\n * Enables directive matching on elements.\n *\n * * Example:\n * ```\n * <my-comp my-directive>\n * Should match component / directive.\n * </my-comp>\n * <div ngNonBindable>\n * <!-- ɵɵdisableBindings() -->\n * <my-comp my-directive>\n * Should not match component / directive because we are in ngNonBindable.\n * </my-comp>\n * <!-- ɵɵenableBindings() -->\n * </div>\n * ```\n *\n * @codeGenApi\n */\nfunction ɵɵenableBindings() {\n instructionState.bindingsEnabled = true;\n}\n/**\n * Disables directive matching on element.\n *\n * * Example:\n * ```\n * <my-comp my-directive>\n * Should match component / directive.\n * </my-comp>\n * <div ngNonBindable>\n * <!-- ɵɵdisableBindings() -->\n * <my-comp my-directive>\n * Should not match component / directive because we are in ngNonBindable.\n * </my-comp>\n * <!-- ɵɵenableBindings() -->\n * </div>\n * ```\n *\n * @codeGenApi\n */\nfunction ɵɵdisableBindings() {\n instructionState.bindingsEnabled = false;\n}\n/**\n * Return the current `LView`.\n */\nfunction getLView() {\n return instructionState.lFrame.lView;\n}\n/**\n * Return the current `TView`.\n */\nfunction getTView() {\n return instructionState.lFrame.tView;\n}\n/**\n * Restores `contextViewData` to the given OpaqueViewState instance.\n *\n * Used in conjunction with the getCurrentView() instruction to save a snapshot\n * of the current view and restore it when listeners are invoked. This allows\n * walking the declaration view tree in listeners to get vars from parent views.\n *\n * @param viewToRestore The OpaqueViewState instance to restore.\n * @returns Context of the restored OpaqueViewState instance.\n *\n * @codeGenApi\n */\nfunction ɵɵrestoreView(viewToRestore) {\n instructionState.lFrame.contextLView = viewToRestore;\n return viewToRestore[CONTEXT];\n}\n/**\n * Clears the view set in `ɵɵrestoreView` from memory. Returns the passed in\n * value so that it can be used as a return value of an instruction.\n *\n * @codeGenApi\n */\nfunction ɵɵresetView(value) {\n instructionState.lFrame.contextLView = null;\n return value;\n}\nfunction getCurrentTNode() {\n let currentTNode = getCurrentTNodePlaceholderOk();\n while (currentTNode !== null && currentTNode.type === 64 /* TNodeType.Placeholder */) {\n currentTNode = currentTNode.parent;\n }\n return currentTNode;\n}\nfunction getCurrentTNodePlaceholderOk() {\n return instructionState.lFrame.currentTNode;\n}\nfunction getCurrentParentTNode() {\n const lFrame = instructionState.lFrame;\n const currentTNode = lFrame.currentTNode;\n return lFrame.isParent ? currentTNode : currentTNode.parent;\n}\nfunction setCurrentTNode(tNode, isParent) {\n ngDevMode && tNode && assertTNodeForTView(tNode, instructionState.lFrame.tView);\n const lFrame = instructionState.lFrame;\n lFrame.currentTNode = tNode;\n lFrame.isParent = isParent;\n}\nfunction isCurrentTNodeParent() {\n return instructionState.lFrame.isParent;\n}\nfunction setCurrentTNodeAsNotParent() {\n instructionState.lFrame.isParent = false;\n}\nfunction getContextLView() {\n const contextLView = instructionState.lFrame.contextLView;\n ngDevMode && assertDefined(contextLView, 'contextLView must be defined.');\n return contextLView;\n}\nfunction isInCheckNoChangesMode() {\n !ngDevMode && throwError('Must never be called in production mode');\n return _isInCheckNoChangesMode;\n}\nfunction setIsInCheckNoChangesMode(mode) {\n !ngDevMode && throwError('Must never be called in production mode');\n _isInCheckNoChangesMode = mode;\n}\n// top level variables should not be exported for performance reasons (PERF_NOTES.md)\nfunction getBindingRoot() {\n const lFrame = instructionState.lFrame;\n let index = lFrame.bindingRootIndex;\n if (index === -1) {\n index = lFrame.bindingRootIndex = lFrame.tView.bindingStartIndex;\n }\n return index;\n}\nfunction getBindingIndex() {\n return instructionState.lFrame.bindingIndex;\n}\nfunction setBindingIndex(value) {\n return instructionState.lFrame.bindingIndex = value;\n}\nfunction nextBindingIndex() {\n return instructionState.lFrame.bindingIndex++;\n}\nfunction incrementBindingIndex(count) {\n const lFrame = instructionState.lFrame;\n const index = lFrame.bindingIndex;\n lFrame.bindingIndex = lFrame.bindingIndex + count;\n return index;\n}\nfunction isInI18nBlock() {\n return instructionState.lFrame.inI18n;\n}\nfunction setInI18nBlock(isInI18nBlock) {\n instructionState.lFrame.inI18n = isInI18nBlock;\n}\n/**\n * Set a new binding root index so that host template functions can execute.\n *\n * Bindings inside the host template are 0 index. But because we don't know ahead of time\n * how many host bindings we have we can't pre-compute them. For this reason they are all\n * 0 index and we just shift the root so that they match next available location in the LView.\n *\n * @param bindingRootIndex Root index for `hostBindings`\n * @param currentDirectiveIndex `TData[currentDirectiveIndex]` will point to the current directive\n * whose `hostBindings` are being processed.\n */\nfunction setBindingRootForHostBindings(bindingRootIndex, currentDirectiveIndex) {\n const lFrame = instructionState.lFrame;\n lFrame.bindingIndex = lFrame.bindingRootIndex = bindingRootIndex;\n setCurrentDirectiveIndex(currentDirectiveIndex);\n}\n/**\n * When host binding is executing this points to the directive index.\n * `TView.data[getCurrentDirectiveIndex()]` is `DirectiveDef`\n * `LView[getCurrentDirectiveIndex()]` is directive instance.\n */\nfunction getCurrentDirectiveIndex() {\n return instructionState.lFrame.currentDirectiveIndex;\n}\n/**\n * Sets an index of a directive whose `hostBindings` are being processed.\n *\n * @param currentDirectiveIndex `TData` index where current directive instance can be found.\n */\nfunction setCurrentDirectiveIndex(currentDirectiveIndex) {\n instructionState.lFrame.currentDirectiveIndex = currentDirectiveIndex;\n}\n/**\n * Retrieve the current `DirectiveDef` which is active when `hostBindings` instruction is being\n * executed.\n *\n * @param tData Current `TData` where the `DirectiveDef` will be looked up at.\n */\nfunction getCurrentDirectiveDef(tData) {\n const currentDirectiveIndex = instructionState.lFrame.currentDirectiveIndex;\n return currentDirectiveIndex === -1 ? null : tData[currentDirectiveIndex];\n}\nfunction getCurrentQueryIndex() {\n return instructionState.lFrame.currentQueryIndex;\n}\nfunction setCurrentQueryIndex(value) {\n instructionState.lFrame.currentQueryIndex = value;\n}\n/**\n * Returns a `TNode` of the location where the current `LView` is declared at.\n *\n * @param lView an `LView` that we want to find parent `TNode` for.\n */\nfunction getDeclarationTNode(lView) {\n const tView = lView[TVIEW];\n // Return the declaration parent for embedded views\n if (tView.type === 2 /* TViewType.Embedded */) {\n ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');\n return tView.declTNode;\n }\n // Components don't have `TView.declTNode` because each instance of component could be\n // inserted in different location, hence `TView.declTNode` is meaningless.\n // Falling back to `T_HOST` in case we cross component boundary.\n if (tView.type === 1 /* TViewType.Component */) {\n return lView[T_HOST];\n }\n // Remaining TNode type is `TViewType.Root` which doesn't have a parent TNode.\n return null;\n}\n/**\n * This is a light weight version of the `enterView` which is needed by the DI system.\n *\n * @param lView `LView` location of the DI context.\n * @param tNode `TNode` for DI context\n * @param flags DI context flags. if `SkipSelf` flag is set than we walk up the declaration\n * tree from `tNode` until we find parent declared `TElementNode`.\n * @returns `true` if we have successfully entered DI associated with `tNode` (or with declared\n * `TNode` if `flags` has `SkipSelf`). Failing to enter DI implies that no associated\n * `NodeInjector` can be found and we should instead use `ModuleInjector`.\n * - If `true` than this call must be fallowed by `leaveDI`\n * - If `false` than this call failed and we should NOT call `leaveDI`\n */\nfunction enterDI(lView, tNode, flags) {\n ngDevMode && assertLViewOrUndefined(lView);\n if (flags & InjectFlags.SkipSelf) {\n ngDevMode && assertTNodeForTView(tNode, lView[TVIEW]);\n let parentTNode = tNode;\n let parentLView = lView;\n while (true) {\n ngDevMode && assertDefined(parentTNode, 'Parent TNode should be defined');\n parentTNode = parentTNode.parent;\n if (parentTNode === null && !(flags & InjectFlags.Host)) {\n parentTNode = getDeclarationTNode(parentLView);\n if (parentTNode === null)\n break;\n // In this case, a parent exists and is definitely an element. So it will definitely\n // have an existing lView as the declaration view, which is why we can assume it's defined.\n ngDevMode && assertDefined(parentLView, 'Parent LView should be defined');\n parentLView = parentLView[DECLARATION_VIEW];\n // In Ivy there are Comment nodes that correspond to ngIf and NgFor embedded directives\n // We want to skip those and look only at Elements and ElementContainers to ensure\n // we're looking at true parent nodes, and not content or other types.\n if (parentTNode.type & (2 /* TNodeType.Element */ | 8 /* TNodeType.ElementContainer */)) {\n break;\n }\n }\n else {\n break;\n }\n }\n if (parentTNode === null) {\n // If we failed to find a parent TNode this means that we should use module injector.\n return false;\n }\n else {\n tNode = parentTNode;\n lView = parentLView;\n }\n }\n ngDevMode && assertTNodeForLView(tNode, lView);\n const lFrame = instructionState.lFrame = allocLFrame();\n lFrame.currentTNode = tNode;\n lFrame.lView = lView;\n return true;\n}\n/**\n * Swap the current lView with a new lView.\n *\n * For performance reasons we store the lView in the top level of the module.\n * This way we minimize the number of properties to read. Whenever a new view\n * is entered we have to store the lView for later, and when the view is\n * exited the state has to be restored\n *\n * @param newView New lView to become active\n * @returns the previously active lView;\n */\nfunction enterView(newView) {\n ngDevMode && assertNotEqual(newView[0], newView[1], '????');\n ngDevMode && assertLViewOrUndefined(newView);\n const newLFrame = allocLFrame();\n if (ngDevMode) {\n assertEqual(newLFrame.isParent, true, 'Expected clean LFrame');\n assertEqual(newLFrame.lView, null, 'Expected clean LFrame');\n assertEqual(newLFrame.tView, null, 'Expected clean LFrame');\n assertEqual(newLFrame.selectedIndex, -1, 'Expected clean LFrame');\n assertEqual(newLFrame.elementDepthCount, 0, 'Expected clean LFrame');\n assertEqual(newLFrame.currentDirectiveIndex, -1, 'Expected clean LFrame');\n assertEqual(newLFrame.currentNamespace, null, 'Expected clean LFrame');\n assertEqual(newLFrame.bindingRootIndex, -1, 'Expected clean LFrame');\n assertEqual(newLFrame.currentQueryIndex, 0, 'Expected clean LFrame');\n }\n const tView = newView[TVIEW];\n instructionState.lFrame = newLFrame;\n ngDevMode && tView.firstChild && assertTNodeForTView(tView.firstChild, tView);\n newLFrame.currentTNode = tView.firstChild;\n newLFrame.lView = newView;\n newLFrame.tView = tView;\n newLFrame.contextLView = newView;\n newLFrame.bindingIndex = tView.bindingStartIndex;\n newLFrame.inI18n = false;\n}\n/**\n * Allocates next free LFrame. This function tries to reuse the `LFrame`s to lower memory pressure.\n */\nfunction allocLFrame() {\n const currentLFrame = instructionState.lFrame;\n const childLFrame = currentLFrame === null ? null : currentLFrame.child;\n const newLFrame = childLFrame === null ? createLFrame(currentLFrame) : childLFrame;\n return newLFrame;\n}\nfunction createLFrame(parent) {\n const lFrame = {\n currentTNode: null,\n isParent: true,\n lView: null,\n tView: null,\n selectedIndex: -1,\n contextLView: null,\n elementDepthCount: 0,\n currentNamespace: null,\n currentDirectiveIndex: -1,\n bindingRootIndex: -1,\n bindingIndex: -1,\n currentQueryIndex: 0,\n parent: parent,\n child: null,\n inI18n: false,\n };\n parent !== null && (parent.child = lFrame); // link the new LFrame for reuse.\n return lFrame;\n}\n/**\n * A lightweight version of leave which is used with DI.\n *\n * This function only resets `currentTNode` and `LView` as those are the only properties\n * used with DI (`enterDI()`).\n *\n * NOTE: This function is reexported as `leaveDI`. However `leaveDI` has return type of `void` where\n * as `leaveViewLight` has `LFrame`. This is so that `leaveViewLight` can be used in `leaveView`.\n */\nfunction leaveViewLight() {\n const oldLFrame = instructionState.lFrame;\n instructionState.lFrame = oldLFrame.parent;\n oldLFrame.currentTNode = null;\n oldLFrame.lView = null;\n return oldLFrame;\n}\n/**\n * This is a lightweight version of the `leaveView` which is needed by the DI system.\n *\n * NOTE: this function is an alias so that we can change the type of the function to have `void`\n * return type.\n */\nconst leaveDI = leaveViewLight;\n/**\n * Leave the current `LView`\n *\n * This pops the `LFrame` with the associated `LView` from the stack.\n *\n * IMPORTANT: We must zero out the `LFrame` values here otherwise they will be retained. This is\n * because for performance reasons we don't release `LFrame` but rather keep it for next use.\n */\nfunction leaveView() {\n const oldLFrame = leaveViewLight();\n oldLFrame.isParent = true;\n oldLFrame.tView = null;\n oldLFrame.selectedIndex = -1;\n oldLFrame.contextLView = null;\n oldLFrame.elementDepthCount = 0;\n oldLFrame.currentDirectiveIndex = -1;\n oldLFrame.currentNamespace = null;\n oldLFrame.bindingRootIndex = -1;\n oldLFrame.bindingIndex = -1;\n oldLFrame.currentQueryIndex = 0;\n}\nfunction nextContextImpl(level) {\n const contextLView = instructionState.lFrame.contextLView =\n walkUpViews(level, instructionState.lFrame.contextLView);\n return contextLView[CONTEXT];\n}\nfunction walkUpViews(nestingLevel, currentView) {\n while (nestingLevel > 0) {\n ngDevMode &&\n assertDefined(currentView[DECLARATION_VIEW], 'Declaration view should be defined if nesting level is greater than 0.');\n currentView = currentView[DECLARATION_VIEW];\n nestingLevel--;\n }\n return currentView;\n}\n/**\n * Gets the currently selected element index.\n *\n * Used with {@link property} instruction (and more in the future) to identify the index in the\n * current `LView` to act on.\n */\nfunction getSelectedIndex() {\n return instructionState.lFrame.selectedIndex;\n}\n/**\n * Sets the most recent index passed to {@link select}\n *\n * Used with {@link property} instruction (and more in the future) to identify the index in the\n * current `LView` to act on.\n *\n * (Note that if an \"exit function\" was set earlier (via `setElementExitFn()`) then that will be\n * run if and when the provided `index` value is different from the current selected index value.)\n */\nfunction setSelectedIndex(index) {\n ngDevMode && index !== -1 &&\n assertGreaterThanOrEqual(index, HEADER_OFFSET, 'Index must be past HEADER_OFFSET (or -1).');\n ngDevMode &&\n assertLessThan(index, instructionState.lFrame.lView.length, 'Can\\'t set index passed end of LView');\n instructionState.lFrame.selectedIndex = index;\n}\n/**\n * Gets the `tNode` that represents currently selected element.\n */\nfunction getSelectedTNode() {\n const lFrame = instructionState.lFrame;\n return getTNode(lFrame.tView, lFrame.selectedIndex);\n}\n/**\n * Sets the namespace used to create elements to `'http://www.w3.org/2000/svg'` in global state.\n *\n * @codeGenApi\n */\nfunction ɵɵnamespaceSVG() {\n instructionState.lFrame.currentNamespace = SVG_NAMESPACE;\n}\n/**\n * Sets the namespace used to create elements to `'http://www.w3.org/1998/MathML/'` in global state.\n *\n * @codeGenApi\n */\nfunction ɵɵnamespaceMathML() {\n instructionState.lFrame.currentNamespace = MATH_ML_NAMESPACE;\n}\n/**\n * Sets the namespace used to create elements to `null`, which forces element creation to use\n * `createElement` rather than `createElementNS`.\n *\n * @codeGenApi\n */\nfunction ɵɵnamespaceHTML() {\n namespaceHTMLInternal();\n}\n/**\n * Sets the namespace used to create elements to `null`, which forces element creation to use\n * `createElement` rather than `createElementNS`.\n */\nfunction namespaceHTMLInternal() {\n instructionState.lFrame.currentNamespace = null;\n}\nfunction getNamespace$1() {\n return instructionState.lFrame.currentNamespace;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Adds all directive lifecycle hooks from the given `DirectiveDef` to the given `TView`.\n *\n * Must be run *only* on the first template pass.\n *\n * Sets up the pre-order hooks on the provided `tView`,\n * see {@link HookData} for details about the data structure.\n *\n * @param directiveIndex The index of the directive in LView\n * @param directiveDef The definition containing the hooks to setup in tView\n * @param tView The current TView\n */\nfunction registerPreOrderHooks(directiveIndex, directiveDef, tView) {\n ngDevMode && assertFirstCreatePass(tView);\n const { ngOnChanges, ngOnInit, ngDoCheck } = directiveDef.type.prototype;\n if (ngOnChanges) {\n const wrappedOnChanges = NgOnChangesFeatureImpl(directiveDef);\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, wrappedOnChanges);\n (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = []))\n .push(directiveIndex, wrappedOnChanges);\n }\n if (ngOnInit) {\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(0 - directiveIndex, ngOnInit);\n }\n if (ngDoCheck) {\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, ngDoCheck);\n (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(directiveIndex, ngDoCheck);\n }\n}\n/**\n *\n * Loops through the directives on the provided `tNode` and queues hooks to be\n * run that are not initialization hooks.\n *\n * Should be executed during `elementEnd()` and similar to\n * preserve hook execution order. Content, view, and destroy hooks for projected\n * components and directives must be called *before* their hosts.\n *\n * Sets up the content, view, and destroy hooks on the provided `tView`,\n * see {@link HookData} for details about the data structure.\n *\n * NOTE: This does not set up `onChanges`, `onInit` or `doCheck`, those are set up\n * separately at `elementStart`.\n *\n * @param tView The current TView\n * @param tNode The TNode whose directives are to be searched for hooks to queue\n */\nfunction registerPostOrderHooks(tView, tNode) {\n ngDevMode && assertFirstCreatePass(tView);\n // It's necessary to loop through the directives at elementEnd() (rather than processing in\n // directiveCreate) so we can preserve the current hook order. Content, view, and destroy\n // hooks for projected components and directives must be called *before* their hosts.\n for (let i = tNode.directiveStart, end = tNode.directiveEnd; i < end; i++) {\n const directiveDef = tView.data[i];\n ngDevMode && assertDefined(directiveDef, 'Expecting DirectiveDef');\n const lifecycleHooks = directiveDef.type.prototype;\n const { ngAfterContentInit, ngAfterContentChecked, ngAfterViewInit, ngAfterViewChecked, ngOnDestroy } = lifecycleHooks;\n if (ngAfterContentInit) {\n (tView.contentHooks || (tView.contentHooks = [])).push(-i, ngAfterContentInit);\n }\n if (ngAfterContentChecked) {\n (tView.contentHooks || (tView.contentHooks = [])).push(i, ngAfterContentChecked);\n (tView.contentCheckHooks || (tView.contentCheckHooks = [])).push(i, ngAfterContentChecked);\n }\n if (ngAfterViewInit) {\n (tView.viewHooks || (tView.viewHooks = [])).push(-i, ngAfterViewInit);\n }\n if (ngAfterViewChecked) {\n (tView.viewHooks || (tView.viewHooks = [])).push(i, ngAfterViewChecked);\n (tView.viewCheckHooks || (tView.viewCheckHooks = [])).push(i, ngAfterViewChecked);\n }\n if (ngOnDestroy != null) {\n (tView.destroyHooks || (tView.destroyHooks = [])).push(i, ngOnDestroy);\n }\n }\n}\n/**\n * Executing hooks requires complex logic as we need to deal with 2 constraints.\n *\n * 1. Init hooks (ngOnInit, ngAfterContentInit, ngAfterViewInit) must all be executed once and only\n * once, across many change detection cycles. This must be true even if some hooks throw, or if\n * some recursively trigger a change detection cycle.\n * To solve that, it is required to track the state of the execution of these init hooks.\n * This is done by storing and maintaining flags in the view: the {@link InitPhaseState},\n * and the index within that phase. They can be seen as a cursor in the following structure:\n * [[onInit1, onInit2], [afterContentInit1], [afterViewInit1, afterViewInit2, afterViewInit3]]\n * They are are stored as flags in LView[FLAGS].\n *\n * 2. Pre-order hooks can be executed in batches, because of the select instruction.\n * To be able to pause and resume their execution, we also need some state about the hook's array\n * that is being processed:\n * - the index of the next hook to be executed\n * - the number of init hooks already found in the processed part of the array\n * They are are stored as flags in LView[PREORDER_HOOK_FLAGS].\n */\n/**\n * Executes pre-order check hooks ( OnChanges, DoChanges) given a view where all the init hooks were\n * executed once. This is a light version of executeInitAndCheckPreOrderHooks where we can skip read\n * / write of the init-hooks related flags.\n * @param lView The LView where hooks are defined\n * @param hooks Hooks to be run\n * @param nodeIndex 3 cases depending on the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nfunction executeCheckHooks(lView, hooks, nodeIndex) {\n callHooks(lView, hooks, 3 /* InitPhaseState.InitPhaseCompleted */, nodeIndex);\n}\n/**\n * Executes post-order init and check hooks (one of AfterContentInit, AfterContentChecked,\n * AfterViewInit, AfterViewChecked) given a view where there are pending init hooks to be executed.\n * @param lView The LView where hooks are defined\n * @param hooks Hooks to be run\n * @param initPhase A phase for which hooks should be run\n * @param nodeIndex 3 cases depending on the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nfunction executeInitAndCheckHooks(lView, hooks, initPhase, nodeIndex) {\n ngDevMode &&\n assertNotEqual(initPhase, 3 /* InitPhaseState.InitPhaseCompleted */, 'Init pre-order hooks should not be called more than once');\n if ((lView[FLAGS] & 3 /* LViewFlags.InitPhaseStateMask */) === initPhase) {\n callHooks(lView, hooks, initPhase, nodeIndex);\n }\n}\nfunction incrementInitPhaseFlags(lView, initPhase) {\n ngDevMode &&\n assertNotEqual(initPhase, 3 /* InitPhaseState.InitPhaseCompleted */, 'Init hooks phase should not be incremented after all init hooks have been run.');\n let flags = lView[FLAGS];\n if ((flags & 3 /* LViewFlags.InitPhaseStateMask */) === initPhase) {\n flags &= 2047 /* LViewFlags.IndexWithinInitPhaseReset */;\n flags += 1 /* LViewFlags.InitPhaseStateIncrementer */;\n lView[FLAGS] = flags;\n }\n}\n/**\n * Calls lifecycle hooks with their contexts, skipping init hooks if it's not\n * the first LView pass\n *\n * @param currentView The current view\n * @param arr The array in which the hooks are found\n * @param initPhaseState the current state of the init phase\n * @param currentNodeIndex 3 cases depending on the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nfunction callHooks(currentView, arr, initPhase, currentNodeIndex) {\n ngDevMode &&\n assertEqual(isInCheckNoChangesMode(), false, 'Hooks should never be run when in check no changes mode.');\n const startIndex = currentNodeIndex !== undefined ?\n (currentView[PREORDER_HOOK_FLAGS] & 65535 /* PreOrderHookFlags.IndexOfTheNextPreOrderHookMaskMask */) :\n 0;\n const nodeIndexLimit = currentNodeIndex != null ? currentNodeIndex : -1;\n const max = arr.length - 1; // Stop the loop at length - 1, because we look for the hook at i + 1\n let lastNodeIndexFound = 0;\n for (let i = startIndex; i < max; i++) {\n const hook = arr[i + 1];\n if (typeof hook === 'number') {\n lastNodeIndexFound = arr[i];\n if (currentNodeIndex != null && lastNodeIndexFound >= currentNodeIndex) {\n break;\n }\n }\n else {\n const isInitHook = arr[i] < 0;\n if (isInitHook)\n currentView[PREORDER_HOOK_FLAGS] += 65536 /* PreOrderHookFlags.NumberOfInitHooksCalledIncrementer */;\n if (lastNodeIndexFound < nodeIndexLimit || nodeIndexLimit == -1) {\n callHook(currentView, initPhase, arr, i);\n currentView[PREORDER_HOOK_FLAGS] =\n (currentView[PREORDER_HOOK_FLAGS] & 4294901760 /* PreOrderHookFlags.NumberOfInitHooksCalledMask */) + i +\n 2;\n }\n i++;\n }\n }\n}\n/**\n * Execute one hook against the current `LView`.\n *\n * @param currentView The current view\n * @param initPhaseState the current state of the init phase\n * @param arr The array in which the hooks are found\n * @param i The current index within the hook data array\n */\nfunction callHook(currentView, initPhase, arr, i) {\n const isInitHook = arr[i] < 0;\n const hook = arr[i + 1];\n const directiveIndex = isInitHook ? -arr[i] : arr[i];\n const directive = currentView[directiveIndex];\n if (isInitHook) {\n const indexWithintInitPhase = currentView[FLAGS] >> 11 /* LViewFlags.IndexWithinInitPhaseShift */;\n // The init phase state must be always checked here as it may have been recursively updated.\n if (indexWithintInitPhase <\n (currentView[PREORDER_HOOK_FLAGS] >> 16 /* PreOrderHookFlags.NumberOfInitHooksCalledShift */) &&\n (currentView[FLAGS] & 3 /* LViewFlags.InitPhaseStateMask */) === initPhase) {\n currentView[FLAGS] += 2048 /* LViewFlags.IndexWithinInitPhaseIncrementer */;\n profiler(4 /* ProfilerEvent.LifecycleHookStart */, directive, hook);\n try {\n hook.call(directive);\n }\n finally {\n profiler(5 /* ProfilerEvent.LifecycleHookEnd */, directive, hook);\n }\n }\n }\n else {\n profiler(4 /* ProfilerEvent.LifecycleHookStart */, directive, hook);\n try {\n hook.call(directive);\n }\n finally {\n profiler(5 /* ProfilerEvent.LifecycleHookEnd */, directive, hook);\n }\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst NO_PARENT_INJECTOR = -1;\n/**\n * Each injector is saved in 9 contiguous slots in `LView` and 9 contiguous slots in\n * `TView.data`. This allows us to store information about the current node's tokens (which\n * can be shared in `TView`) as well as the tokens of its ancestor nodes (which cannot be\n * shared, so they live in `LView`).\n *\n * Each of these slots (aside from the last slot) contains a bloom filter. This bloom filter\n * determines whether a directive is available on the associated node or not. This prevents us\n * from searching the directives array at this level unless it's probable the directive is in it.\n *\n * See: https://en.wikipedia.org/wiki/Bloom_filter for more about bloom filters.\n *\n * Because all injectors have been flattened into `LView` and `TViewData`, they cannot typed\n * using interfaces as they were previously. The start index of each `LInjector` and `TInjector`\n * will differ based on where it is flattened into the main array, so it's not possible to know\n * the indices ahead of time and save their types here. The interfaces are still included here\n * for documentation purposes.\n *\n * export interface LInjector extends Array<any> {\n *\n * // Cumulative bloom for directive IDs 0-31 (IDs are % BLOOM_SIZE)\n * [0]: number;\n *\n * // Cumulative bloom for directive IDs 32-63\n * [1]: number;\n *\n * // Cumulative bloom for directive IDs 64-95\n * [2]: number;\n *\n * // Cumulative bloom for directive IDs 96-127\n * [3]: number;\n *\n * // Cumulative bloom for directive IDs 128-159\n * [4]: number;\n *\n * // Cumulative bloom for directive IDs 160 - 191\n * [5]: number;\n *\n * // Cumulative bloom for directive IDs 192 - 223\n * [6]: number;\n *\n * // Cumulative bloom for directive IDs 224 - 255\n * [7]: number;\n *\n * // We need to store a reference to the injector's parent so DI can keep looking up\n * // the injector tree until it finds the dependency it's looking for.\n * [PARENT_INJECTOR]: number;\n * }\n *\n * export interface TInjector extends Array<any> {\n *\n * // Shared node bloom for directive IDs 0-31 (IDs are % BLOOM_SIZE)\n * [0]: number;\n *\n * // Shared node bloom for directive IDs 32-63\n * [1]: number;\n *\n * // Shared node bloom for directive IDs 64-95\n * [2]: number;\n *\n * // Shared node bloom for directive IDs 96-127\n * [3]: number;\n *\n * // Shared node bloom for directive IDs 128-159\n * [4]: number;\n *\n * // Shared node bloom for directive IDs 160 - 191\n * [5]: number;\n *\n * // Shared node bloom for directive IDs 192 - 223\n * [6]: number;\n *\n * // Shared node bloom for directive IDs 224 - 255\n * [7]: number;\n *\n * // Necessary to find directive indices for a particular node.\n * [TNODE]: TElementNode|TElementContainerNode|TContainerNode;\n * }\n */\n/**\n * Factory for creating instances of injectors in the NodeInjector.\n *\n * This factory is complicated by the fact that it can resolve `multi` factories as well.\n *\n * NOTE: Some of the fields are optional which means that this class has two hidden classes.\n * - One without `multi` support (most common)\n * - One with `multi` values, (rare).\n *\n * Since VMs can cache up to 4 inline hidden classes this is OK.\n *\n * - Single factory: Only `resolving` and `factory` is defined.\n * - `providers` factory: `componentProviders` is a number and `index = -1`.\n * - `viewProviders` factory: `componentProviders` is a number and `index` points to `providers`.\n */\nclass NodeInjectorFactory {\n constructor(\n /**\n * Factory to invoke in order to create a new instance.\n */\n factory, \n /**\n * Set to `true` if the token is declared in `viewProviders` (or if it is component).\n */\n isViewProvider, injectImplementation) {\n this.factory = factory;\n /**\n * Marker set to true during factory invocation to see if we get into recursive loop.\n * Recursive loop causes an error to be displayed.\n */\n this.resolving = false;\n ngDevMode && assertDefined(factory, 'Factory not specified');\n ngDevMode && assertEqual(typeof factory, 'function', 'Expected factory function.');\n this.canSeeViewProviders = isViewProvider;\n this.injectImpl = injectImplementation;\n }\n}\nfunction isFactory(obj) {\n return obj instanceof NodeInjectorFactory;\n}\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nconst unusedValueExportToPlacateAjd$2 = 1;\n\n/**\n * Converts `TNodeType` into human readable text.\n * Make sure this matches with `TNodeType`\n */\nfunction toTNodeTypeAsString(tNodeType) {\n let text = '';\n (tNodeType & 1 /* TNodeType.Text */) && (text += '|Text');\n (tNodeType & 2 /* TNodeType.Element */) && (text += '|Element');\n (tNodeType & 4 /* TNodeType.Container */) && (text += '|Container');\n (tNodeType & 8 /* TNodeType.ElementContainer */) && (text += '|ElementContainer');\n (tNodeType & 16 /* TNodeType.Projection */) && (text += '|Projection');\n (tNodeType & 32 /* TNodeType.Icu */) && (text += '|IcuContainer');\n (tNodeType & 64 /* TNodeType.Placeholder */) && (text += '|Placeholder');\n return text.length > 0 ? text.substring(1) : text;\n}\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nconst unusedValueExportToPlacateAjd$1 = 1;\n/**\n * Returns `true` if the `TNode` has a directive which has `@Input()` for `class` binding.\n *\n * ```\n * <div my-dir [class]=\"exp\"></div>\n * ```\n * and\n * ```\n * @Directive({\n * })\n * class MyDirective {\n * @Input()\n * class: string;\n * }\n * ```\n *\n * In the above case it is necessary to write the reconciled styling information into the\n * directive's input.\n *\n * @param tNode\n */\nfunction hasClassInput(tNode) {\n return (tNode.flags & 8 /* TNodeFlags.hasClassInput */) !== 0;\n}\n/**\n * Returns `true` if the `TNode` has a directive which has `@Input()` for `style` binding.\n *\n * ```\n * <div my-dir [style]=\"exp\"></div>\n * ```\n * and\n * ```\n * @Directive({\n * })\n * class MyDirective {\n * @Input()\n * class: string;\n * }\n * ```\n *\n * In the above case it is necessary to write the reconciled styling information into the\n * directive's input.\n *\n * @param tNode\n */\nfunction hasStyleInput(tNode) {\n return (tNode.flags & 16 /* TNodeFlags.hasStyleInput */) !== 0;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction assertTNodeType(tNode, expectedTypes, message) {\n assertDefined(tNode, 'should be called with a TNode');\n if ((tNode.type & expectedTypes) === 0) {\n throwError(message ||\n `Expected [${toTNodeTypeAsString(expectedTypes)}] but got ${toTNodeTypeAsString(tNode.type)}.`);\n }\n}\nfunction assertPureTNodeType(type) {\n if (!(type === 2 /* TNodeType.Element */ || //\n type === 1 /* TNodeType.Text */ || //\n type === 4 /* TNodeType.Container */ || //\n type === 8 /* TNodeType.ElementContainer */ || //\n type === 32 /* TNodeType.Icu */ || //\n type === 16 /* TNodeType.Projection */ || //\n type === 64 /* TNodeType.Placeholder */)) {\n throwError(`Expected TNodeType to have only a single type selected, but got ${toTNodeTypeAsString(type)}.`);\n }\n}\n\n/**\n * Assigns all attribute values to the provided element via the inferred renderer.\n *\n * This function accepts two forms of attribute entries:\n *\n * default: (key, value):\n * attrs = [key1, value1, key2, value2]\n *\n * namespaced: (NAMESPACE_MARKER, uri, name, value)\n * attrs = [NAMESPACE_MARKER, uri, name, value, NAMESPACE_MARKER, uri, name, value]\n *\n * The `attrs` array can contain a mix of both the default and namespaced entries.\n * The \"default\" values are set without a marker, but if the function comes across\n * a marker value then it will attempt to set a namespaced value. If the marker is\n * not of a namespaced value then the function will quit and return the index value\n * where it stopped during the iteration of the attrs array.\n *\n * See [AttributeMarker] to understand what the namespace marker value is.\n *\n * Note that this instruction does not support assigning style and class values to\n * an element. See `elementStart` and `elementHostAttrs` to learn how styling values\n * are applied to an element.\n * @param renderer The renderer to be used\n * @param native The element that the attributes will be assigned to\n * @param attrs The attribute array of values that will be assigned to the element\n * @returns the index value that was last accessed in the attributes array\n */\nfunction setUpAttributes(renderer, native, attrs) {\n let i = 0;\n while (i < attrs.length) {\n const value = attrs[i];\n if (typeof value === 'number') {\n // only namespaces are supported. Other value types (such as style/class\n // entries) are not supported in this function.\n if (value !== 0 /* AttributeMarker.NamespaceURI */) {\n break;\n }\n // we just landed on the marker value ... therefore\n // we should skip to the next entry\n i++;\n const namespaceURI = attrs[i++];\n const attrName = attrs[i++];\n const attrVal = attrs[i++];\n ngDevMode && ngDevMode.rendererSetAttribute++;\n renderer.setAttribute(native, attrName, attrVal, namespaceURI);\n }\n else {\n // attrName is string;\n const attrName = value;\n const attrVal = attrs[++i];\n // Standard attributes\n ngDevMode && ngDevMode.rendererSetAttribute++;\n if (isAnimationProp(attrName)) {\n renderer.setProperty(native, attrName, attrVal);\n }\n else {\n renderer.setAttribute(native, attrName, attrVal);\n }\n i++;\n }\n }\n // another piece of code may iterate over the same attributes array. Therefore\n // it may be helpful to return the exact spot where the attributes array exited\n // whether by running into an unsupported marker or if all the static values were\n // iterated over.\n return i;\n}\n/**\n * Test whether the given value is a marker that indicates that the following\n * attribute values in a `TAttributes` array are only the names of attributes,\n * and not name-value pairs.\n * @param marker The attribute marker to test.\n * @returns true if the marker is a \"name-only\" marker (e.g. `Bindings`, `Template` or `I18n`).\n */\nfunction isNameOnlyAttributeMarker(marker) {\n return marker === 3 /* AttributeMarker.Bindings */ || marker === 4 /* AttributeMarker.Template */ ||\n marker === 6 /* AttributeMarker.I18n */;\n}\nfunction isAnimationProp(name) {\n // Perf note: accessing charCodeAt to check for the first character of a string is faster as\n // compared to accessing a character at index 0 (ex. name[0]). The main reason for this is that\n // charCodeAt doesn't allocate memory to return a substring.\n return name.charCodeAt(0) === 64 /* CharCode.AT_SIGN */;\n}\n/**\n * Merges `src` `TAttributes` into `dst` `TAttributes` removing any duplicates in the process.\n *\n * This merge function keeps the order of attrs same.\n *\n * @param dst Location of where the merged `TAttributes` should end up.\n * @param src `TAttributes` which should be appended to `dst`\n */\nfunction mergeHostAttrs(dst, src) {\n if (src === null || src.length === 0) {\n // do nothing\n }\n else if (dst === null || dst.length === 0) {\n // We have source, but dst is empty, just make a copy.\n dst = src.slice();\n }\n else {\n let srcMarker = -1 /* AttributeMarker.ImplicitAttributes */;\n for (let i = 0; i < src.length; i++) {\n const item = src[i];\n if (typeof item === 'number') {\n srcMarker = item;\n }\n else {\n if (srcMarker === 0 /* AttributeMarker.NamespaceURI */) {\n // Case where we need to consume `key1`, `key2`, `value` items.\n }\n else if (srcMarker === -1 /* AttributeMarker.ImplicitAttributes */ ||\n srcMarker === 2 /* AttributeMarker.Styles */) {\n // Case where we have to consume `key1` and `value` only.\n mergeHostAttribute(dst, srcMarker, item, null, src[++i]);\n }\n else {\n // Case where we have to consume `key1` only.\n mergeHostAttribute(dst, srcMarker, item, null, null);\n }\n }\n }\n }\n return dst;\n}\n/**\n * Append `key`/`value` to existing `TAttributes` taking region marker and duplicates into account.\n *\n * @param dst `TAttributes` to append to.\n * @param marker Region where the `key`/`value` should be added.\n * @param key1 Key to add to `TAttributes`\n * @param key2 Key to add to `TAttributes` (in case of `AttributeMarker.NamespaceURI`)\n * @param value Value to add or to overwrite to `TAttributes` Only used if `marker` is not Class.\n */\nfunction mergeHostAttribute(dst, marker, key1, key2, value) {\n let i = 0;\n // Assume that new markers will be inserted at the end.\n let markerInsertPosition = dst.length;\n // scan until correct type.\n if (marker === -1 /* AttributeMarker.ImplicitAttributes */) {\n markerInsertPosition = -1;\n }\n else {\n while (i < dst.length) {\n const dstValue = dst[i++];\n if (typeof dstValue === 'number') {\n if (dstValue === marker) {\n markerInsertPosition = -1;\n break;\n }\n else if (dstValue > marker) {\n // We need to save this as we want the markers to be inserted in specific order.\n markerInsertPosition = i - 1;\n break;\n }\n }\n }\n }\n // search until you find place of insertion\n while (i < dst.length) {\n const item = dst[i];\n if (typeof item === 'number') {\n // since `i` started as the index after the marker, we did not find it if we are at the next\n // marker\n break;\n }\n else if (item === key1) {\n // We already have same token\n if (key2 === null) {\n if (value !== null) {\n dst[i + 1] = value;\n }\n return;\n }\n else if (key2 === dst[i + 1]) {\n dst[i + 2] = value;\n return;\n }\n }\n // Increment counter.\n i++;\n if (key2 !== null)\n i++;\n if (value !== null)\n i++;\n }\n // insert at location.\n if (markerInsertPosition !== -1) {\n dst.splice(markerInsertPosition, 0, marker);\n i = markerInsertPosition + 1;\n }\n dst.splice(i++, 0, key1);\n if (key2 !== null) {\n dst.splice(i++, 0, key2);\n }\n if (value !== null) {\n dst.splice(i++, 0, value);\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/// Parent Injector Utils ///////////////////////////////////////////////////////////////\nfunction hasParentInjector(parentLocation) {\n return parentLocation !== NO_PARENT_INJECTOR;\n}\nfunction getParentInjectorIndex(parentLocation) {\n ngDevMode && assertNumber(parentLocation, 'Number expected');\n ngDevMode && assertNotEqual(parentLocation, -1, 'Not a valid state.');\n const parentInjectorIndex = parentLocation & 32767 /* RelativeInjectorLocationFlags.InjectorIndexMask */;\n ngDevMode &&\n assertGreaterThan(parentInjectorIndex, HEADER_OFFSET, 'Parent injector must be pointing past HEADER_OFFSET.');\n return parentLocation & 32767 /* RelativeInjectorLocationFlags.InjectorIndexMask */;\n}\nfunction getParentInjectorViewOffset(parentLocation) {\n return parentLocation >> 16 /* RelativeInjectorLocationFlags.ViewOffsetShift */;\n}\n/**\n * Unwraps a parent injector location number to find the view offset from the current injector,\n * then walks up the declaration view tree until the view is found that contains the parent\n * injector.\n *\n * @param location The location of the parent injector, which contains the view offset\n * @param startView The LView instance from which to start walking up the view tree\n * @returns The LView instance that contains the parent injector\n */\nfunction getParentInjectorView(location, startView) {\n let viewOffset = getParentInjectorViewOffset(location);\n let parentView = startView;\n // For most cases, the parent injector can be found on the host node (e.g. for component\n // or container), but we must keep the loop here to support the rarer case of deeply nested\n // <ng-template> tags or inline views, where the parent injector might live many views\n // above the child injector.\n while (viewOffset > 0) {\n parentView = parentView[DECLARATION_VIEW];\n viewOffset--;\n }\n return parentView;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Defines if the call to `inject` should include `viewProviders` in its resolution.\n *\n * This is set to true when we try to instantiate a component. This value is reset in\n * `getNodeInjectable` to a value which matches the declaration location of the token about to be\n * instantiated. This is done so that if we are injecting a token which was declared outside of\n * `viewProviders` we don't accidentally pull `viewProviders` in.\n *\n * Example:\n *\n * ```\n * @Injectable()\n * class MyService {\n * constructor(public value: String) {}\n * }\n *\n * @Component({\n * providers: [\n * MyService,\n * {provide: String, value: 'providers' }\n * ]\n * viewProviders: [\n * {provide: String, value: 'viewProviders'}\n * ]\n * })\n * class MyComponent {\n * constructor(myService: MyService, value: String) {\n * // We expect that Component can see into `viewProviders`.\n * expect(value).toEqual('viewProviders');\n * // `MyService` was not declared in `viewProviders` hence it can't see it.\n * expect(myService.value).toEqual('providers');\n * }\n * }\n *\n * ```\n */\nlet includeViewProviders = true;\nfunction setIncludeViewProviders(v) {\n const oldValue = includeViewProviders;\n includeViewProviders = v;\n return oldValue;\n}\n/**\n * The number of slots in each bloom filter (used by DI). The larger this number, the fewer\n * directives that will share slots, and thus, the fewer false positives when checking for\n * the existence of a directive.\n */\nconst BLOOM_SIZE = 256;\nconst BLOOM_MASK = BLOOM_SIZE - 1;\n/**\n * The number of bits that is represented by a single bloom bucket. JS bit operations are 32 bits,\n * so each bucket represents 32 distinct tokens which accounts for log2(32) = 5 bits of a bloom hash\n * number.\n */\nconst BLOOM_BUCKET_BITS = 5;\n/** Counter used to generate unique IDs for directives. */\nlet nextNgElementId = 0;\n/** Value used when something wasn't found by an injector. */\nconst NOT_FOUND = {};\n/**\n * Registers this directive as present in its node's injector by flipping the directive's\n * corresponding bit in the injector's bloom filter.\n *\n * @param injectorIndex The index of the node injector where this token should be registered\n * @param tView The TView for the injector's bloom filters\n * @param type The directive token to register\n */\nfunction bloomAdd(injectorIndex, tView, type) {\n ngDevMode && assertEqual(tView.firstCreatePass, true, 'expected firstCreatePass to be true');\n let id;\n if (typeof type === 'string') {\n id = type.charCodeAt(0) || 0;\n }\n else if (type.hasOwnProperty(NG_ELEMENT_ID)) {\n id = type[NG_ELEMENT_ID];\n }\n // Set a unique ID on the directive type, so if something tries to inject the directive,\n // we can easily retrieve the ID and hash it into the bloom bit that should be checked.\n if (id == null) {\n id = type[NG_ELEMENT_ID] = nextNgElementId++;\n }\n // We only have BLOOM_SIZE (256) slots in our bloom filter (8 buckets * 32 bits each),\n // so all unique IDs must be modulo-ed into a number from 0 - 255 to fit into the filter.\n const bloomHash = id & BLOOM_MASK;\n // Create a mask that targets the specific bit associated with the directive.\n // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding\n // to bit positions 0 - 31 in a 32 bit integer.\n const mask = 1 << bloomHash;\n // Each bloom bucket in `tData` represents `BLOOM_BUCKET_BITS` number of bits of `bloomHash`.\n // Any bits in `bloomHash` beyond `BLOOM_BUCKET_BITS` indicate the bucket offset that the mask\n // should be written to.\n tView.data[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)] |= mask;\n}\n/**\n * Creates (or gets an existing) injector for a given element or container.\n *\n * @param tNode for which an injector should be retrieved / created.\n * @param lView View where the node is stored\n * @returns Node injector\n */\nfunction getOrCreateNodeInjectorForNode(tNode, lView) {\n const existingInjectorIndex = getInjectorIndex(tNode, lView);\n if (existingInjectorIndex !== -1) {\n return existingInjectorIndex;\n }\n const tView = lView[TVIEW];\n if (tView.firstCreatePass) {\n tNode.injectorIndex = lView.length;\n insertBloom(tView.data, tNode); // foundation for node bloom\n insertBloom(lView, null); // foundation for cumulative bloom\n insertBloom(tView.blueprint, null);\n }\n const parentLoc = getParentInjectorLocation(tNode, lView);\n const injectorIndex = tNode.injectorIndex;\n // If a parent injector can't be found, its location is set to -1.\n // In that case, we don't need to set up a cumulative bloom\n if (hasParentInjector(parentLoc)) {\n const parentIndex = getParentInjectorIndex(parentLoc);\n const parentLView = getParentInjectorView(parentLoc, lView);\n const parentData = parentLView[TVIEW].data;\n // Creates a cumulative bloom filter that merges the parent's bloom filter\n // and its own cumulative bloom (which contains tokens for all ancestors)\n for (let i = 0; i < 8 /* NodeInjectorOffset.BLOOM_SIZE */; i++) {\n lView[injectorIndex + i] = parentLView[parentIndex + i] | parentData[parentIndex + i];\n }\n }\n lView[injectorIndex + 8 /* NodeInjectorOffset.PARENT */] = parentLoc;\n return injectorIndex;\n}\nfunction insertBloom(arr, footer) {\n arr.push(0, 0, 0, 0, 0, 0, 0, 0, footer);\n}\nfunction getInjectorIndex(tNode, lView) {\n if (tNode.injectorIndex === -1 ||\n // If the injector index is the same as its parent's injector index, then the index has been\n // copied down from the parent node. No injector has been created yet on this node.\n (tNode.parent && tNode.parent.injectorIndex === tNode.injectorIndex) ||\n // After the first template pass, the injector index might exist but the parent values\n // might not have been calculated yet for this instance\n lView[tNode.injectorIndex + 8 /* NodeInjectorOffset.PARENT */] === null) {\n return -1;\n }\n else {\n ngDevMode && assertIndexInRange(lView, tNode.injectorIndex);\n return tNode.injectorIndex;\n }\n}\n/**\n * Finds the index of the parent injector, with a view offset if applicable. Used to set the\n * parent injector initially.\n *\n * @returns Returns a number that is the combination of the number of LViews that we have to go up\n * to find the LView containing the parent inject AND the index of the injector within that LView.\n */\nfunction getParentInjectorLocation(tNode, lView) {\n if (tNode.parent && tNode.parent.injectorIndex !== -1) {\n // If we have a parent `TNode` and there is an injector associated with it we are done, because\n // the parent injector is within the current `LView`.\n return tNode.parent.injectorIndex; // ViewOffset is 0\n }\n // When parent injector location is computed it may be outside of the current view. (ie it could\n // be pointing to a declared parent location). This variable stores number of declaration parents\n // we need to walk up in order to find the parent injector location.\n let declarationViewOffset = 0;\n let parentTNode = null;\n let lViewCursor = lView;\n // The parent injector is not in the current `LView`. We will have to walk the declared parent\n // `LView` hierarchy and look for it. If we walk of the top, that means that there is no parent\n // `NodeInjector`.\n while (lViewCursor !== null) {\n parentTNode = getTNodeFromLView(lViewCursor);\n if (parentTNode === null) {\n // If we have no parent, than we are done.\n return NO_PARENT_INJECTOR;\n }\n ngDevMode && parentTNode && assertTNodeForLView(parentTNode, lViewCursor[DECLARATION_VIEW]);\n // Every iteration of the loop requires that we go to the declared parent.\n declarationViewOffset++;\n lViewCursor = lViewCursor[DECLARATION_VIEW];\n if (parentTNode.injectorIndex !== -1) {\n // We found a NodeInjector which points to something.\n return (parentTNode.injectorIndex |\n (declarationViewOffset << 16 /* RelativeInjectorLocationFlags.ViewOffsetShift */));\n }\n }\n return NO_PARENT_INJECTOR;\n}\n/**\n * Makes a type or an injection token public to the DI system by adding it to an\n * injector's bloom filter.\n *\n * @param di The node injector in which a directive will be added\n * @param token The type or the injection token to be made public\n */\nfunction diPublicInInjector(injectorIndex, tView, token) {\n bloomAdd(injectorIndex, tView, token);\n}\n/**\n * Inject static attribute value into directive constructor.\n *\n * This method is used with `factory` functions which are generated as part of\n * `defineDirective` or `defineComponent`. The method retrieves the static value\n * of an attribute. (Dynamic attributes are not supported since they are not resolved\n * at the time of injection and can change over time.)\n *\n * # Example\n * Given:\n * ```\n * @Component(...)\n * class MyComponent {\n * constructor(@Attribute('title') title: string) { ... }\n * }\n * ```\n * When instantiated with\n * ```\n * <my-component title=\"Hello\"></my-component>\n * ```\n *\n * Then factory method generated is:\n * ```\n * MyComponent.ɵcmp = defineComponent({\n * factory: () => new MyComponent(injectAttribute('title'))\n * ...\n * })\n * ```\n *\n * @publicApi\n */\nfunction injectAttributeImpl(tNode, attrNameToInject) {\n ngDevMode && assertTNodeType(tNode, 12 /* TNodeType.AnyContainer */ | 3 /* TNodeType.AnyRNode */);\n ngDevMode && assertDefined(tNode, 'expecting tNode');\n if (attrNameToInject === 'class') {\n return tNode.classes;\n }\n if (attrNameToInject === 'style') {\n return tNode.styles;\n }\n const attrs = tNode.attrs;\n if (attrs) {\n const attrsLength = attrs.length;\n let i = 0;\n while (i < attrsLength) {\n const value = attrs[i];\n // If we hit a `Bindings` or `Template` marker then we are done.\n if (isNameOnlyAttributeMarker(value))\n break;\n // Skip namespaced attributes\n if (value === 0 /* AttributeMarker.NamespaceURI */) {\n // we skip the next two values\n // as namespaced attributes looks like\n // [..., AttributeMarker.NamespaceURI, 'http://someuri.com/test', 'test:exist',\n // 'existValue', ...]\n i = i + 2;\n }\n else if (typeof value === 'number') {\n // Skip to the first value of the marked attribute.\n i++;\n while (i < attrsLength && typeof attrs[i] === 'string') {\n i++;\n }\n }\n else if (value === attrNameToInject) {\n return attrs[i + 1];\n }\n else {\n i = i + 2;\n }\n }\n }\n return null;\n}\nfunction notFoundValueOrThrow(notFoundValue, token, flags) {\n if ((flags & InjectFlags.Optional) || notFoundValue !== undefined) {\n return notFoundValue;\n }\n else {\n throwProviderNotFoundError(token, 'NodeInjector');\n }\n}\n/**\n * Returns the value associated to the given token from the ModuleInjector or throws exception\n *\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector or throws an exception\n */\nfunction lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue) {\n if ((flags & InjectFlags.Optional) && notFoundValue === undefined) {\n // This must be set or the NullInjector will throw for optional deps\n notFoundValue = null;\n }\n if ((flags & (InjectFlags.Self | InjectFlags.Host)) === 0) {\n const moduleInjector = lView[INJECTOR$1];\n // switch to `injectInjectorOnly` implementation for module injector, since module injector\n // should not have access to Component/Directive DI scope (that may happen through\n // `directiveInject` implementation)\n const previousInjectImplementation = setInjectImplementation(undefined);\n try {\n if (moduleInjector) {\n return moduleInjector.get(token, notFoundValue, flags & InjectFlags.Optional);\n }\n else {\n return injectRootLimpMode(token, notFoundValue, flags & InjectFlags.Optional);\n }\n }\n finally {\n setInjectImplementation(previousInjectImplementation);\n }\n }\n return notFoundValueOrThrow(notFoundValue, token, flags);\n}\n/**\n * Returns the value associated to the given token from the NodeInjectors => ModuleInjector.\n *\n * Look for the injector providing the token by walking up the node injector tree and then\n * the module injector tree.\n *\n * This function patches `token` with `__NG_ELEMENT_ID__` which contains the id for the bloom\n * filter. `-1` is reserved for injecting `Injector` (implemented by `NodeInjector`)\n *\n * @param tNode The Node where the search for the injector should start\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided\n */\nfunction getOrCreateInjectable(tNode, lView, token, flags = InjectFlags.Default, notFoundValue) {\n if (tNode !== null) {\n // If the view or any of its ancestors have an embedded\n // view injector, we have to look it up there first.\n if (lView[FLAGS] & 1024 /* LViewFlags.HasEmbeddedViewInjector */) {\n const embeddedInjectorValue = lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, NOT_FOUND);\n if (embeddedInjectorValue !== NOT_FOUND) {\n return embeddedInjectorValue;\n }\n }\n // Otherwise try the node injector.\n const value = lookupTokenUsingNodeInjector(tNode, lView, token, flags, NOT_FOUND);\n if (value !== NOT_FOUND) {\n return value;\n }\n }\n // Finally, fall back to the module injector.\n return lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);\n}\n/**\n * Returns the value associated to the given token from the node injector.\n *\n * @param tNode The Node where the search for the injector should start\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided\n */\nfunction lookupTokenUsingNodeInjector(tNode, lView, token, flags, notFoundValue) {\n const bloomHash = bloomHashBitOrFactory(token);\n // If the ID stored here is a function, this is a special object like ElementRef or TemplateRef\n // so just call the factory function to create it.\n if (typeof bloomHash === 'function') {\n if (!enterDI(lView, tNode, flags)) {\n // Failed to enter DI, try module injector instead. If a token is injected with the @Host\n // flag, the module injector is not searched for that token in Ivy.\n return (flags & InjectFlags.Host) ?\n notFoundValueOrThrow(notFoundValue, token, flags) :\n lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);\n }\n try {\n const value = bloomHash(flags);\n if (value == null && !(flags & InjectFlags.Optional)) {\n throwProviderNotFoundError(token);\n }\n else {\n return value;\n }\n }\n finally {\n leaveDI();\n }\n }\n else if (typeof bloomHash === 'number') {\n // A reference to the previous injector TView that was found while climbing the element\n // injector tree. This is used to know if viewProviders can be accessed on the current\n // injector.\n let previousTView = null;\n let injectorIndex = getInjectorIndex(tNode, lView);\n let parentLocation = NO_PARENT_INJECTOR;\n let hostTElementNode = flags & InjectFlags.Host ? lView[DECLARATION_COMPONENT_VIEW][T_HOST] : null;\n // If we should skip this injector, or if there is no injector on this node, start by\n // searching the parent injector.\n if (injectorIndex === -1 || flags & InjectFlags.SkipSelf) {\n parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) :\n lView[injectorIndex + 8 /* NodeInjectorOffset.PARENT */];\n if (parentLocation === NO_PARENT_INJECTOR || !shouldSearchParent(flags, false)) {\n injectorIndex = -1;\n }\n else {\n previousTView = lView[TVIEW];\n injectorIndex = getParentInjectorIndex(parentLocation);\n lView = getParentInjectorView(parentLocation, lView);\n }\n }\n // Traverse up the injector tree until we find a potential match or until we know there\n // *isn't* a match.\n while (injectorIndex !== -1) {\n ngDevMode && assertNodeInjector(lView, injectorIndex);\n // Check the current injector. If it matches, see if it contains token.\n const tView = lView[TVIEW];\n ngDevMode &&\n assertTNodeForLView(tView.data[injectorIndex + 8 /* NodeInjectorOffset.TNODE */], lView);\n if (bloomHasToken(bloomHash, injectorIndex, tView.data)) {\n // At this point, we have an injector which *may* contain the token, so we step through\n // the providers and directives associated with the injector's corresponding node to get\n // the instance.\n const instance = searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode);\n if (instance !== NOT_FOUND) {\n return instance;\n }\n }\n parentLocation = lView[injectorIndex + 8 /* NodeInjectorOffset.PARENT */];\n if (parentLocation !== NO_PARENT_INJECTOR &&\n shouldSearchParent(flags, lView[TVIEW].data[injectorIndex + 8 /* NodeInjectorOffset.TNODE */] === hostTElementNode) &&\n bloomHasToken(bloomHash, injectorIndex, lView)) {\n // The def wasn't found anywhere on this node, so it was a false positive.\n // Traverse up the tree and continue searching.\n previousTView = tView;\n injectorIndex = getParentInjectorIndex(parentLocation);\n lView = getParentInjectorView(parentLocation, lView);\n }\n else {\n // If we should not search parent OR If the ancestor bloom filter value does not have the\n // bit corresponding to the directive we can give up on traversing up to find the specific\n // injector.\n injectorIndex = -1;\n }\n }\n }\n return notFoundValue;\n}\nfunction searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode) {\n const currentTView = lView[TVIEW];\n const tNode = currentTView.data[injectorIndex + 8 /* NodeInjectorOffset.TNODE */];\n // First, we need to determine if view providers can be accessed by the starting element.\n // There are two possibilities\n const canAccessViewProviders = previousTView == null ?\n // 1) This is the first invocation `previousTView == null` which means that we are at the\n // `TNode` of where injector is starting to look. In such a case the only time we are allowed\n // to look into the ViewProviders is if:\n // - we are on a component\n // - AND the injector set `includeViewProviders` to true (implying that the token can see\n // ViewProviders because it is the Component or a Service which itself was declared in\n // ViewProviders)\n (isComponentHost(tNode) && includeViewProviders) :\n // 2) `previousTView != null` which means that we are now walking across the parent nodes.\n // In such a case we are only allowed to look into the ViewProviders if:\n // - We just crossed from child View to Parent View `previousTView != currentTView`\n // - AND the parent TNode is an Element.\n // This means that we just came from the Component's View and therefore are allowed to see\n // into the ViewProviders.\n (previousTView != currentTView && ((tNode.type & 3 /* TNodeType.AnyRNode */) !== 0));\n // This special case happens when there is a @host on the inject and when we are searching\n // on the host element node.\n const isHostSpecialCase = (flags & InjectFlags.Host) && hostTElementNode === tNode;\n const injectableIdx = locateDirectiveOrProvider(tNode, currentTView, token, canAccessViewProviders, isHostSpecialCase);\n if (injectableIdx !== null) {\n return getNodeInjectable(lView, currentTView, injectableIdx, tNode);\n }\n else {\n return NOT_FOUND;\n }\n}\n/**\n * Searches for the given token among the node's directives and providers.\n *\n * @param tNode TNode on which directives are present.\n * @param tView The tView we are currently processing\n * @param token Provider token or type of a directive to look for.\n * @param canAccessViewProviders Whether view providers should be considered.\n * @param isHostSpecialCase Whether the host special case applies.\n * @returns Index of a found directive or provider, or null when none found.\n */\nfunction locateDirectiveOrProvider(tNode, tView, token, canAccessViewProviders, isHostSpecialCase) {\n const nodeProviderIndexes = tNode.providerIndexes;\n const tInjectables = tView.data;\n const injectablesStart = nodeProviderIndexes & 1048575 /* TNodeProviderIndexes.ProvidersStartIndexMask */;\n const directivesStart = tNode.directiveStart;\n const directiveEnd = tNode.directiveEnd;\n const cptViewProvidersCount = nodeProviderIndexes >> 20 /* TNodeProviderIndexes.CptViewProvidersCountShift */;\n const startingIndex = canAccessViewProviders ? injectablesStart : injectablesStart + cptViewProvidersCount;\n // When the host special case applies, only the viewProviders and the component are visible\n const endIndex = isHostSpecialCase ? injectablesStart + cptViewProvidersCount : directiveEnd;\n for (let i = startingIndex; i < endIndex; i++) {\n const providerTokenOrDef = tInjectables[i];\n if (i < directivesStart && token === providerTokenOrDef ||\n i >= directivesStart && providerTokenOrDef.type === token) {\n return i;\n }\n }\n if (isHostSpecialCase) {\n const dirDef = tInjectables[directivesStart];\n if (dirDef && isComponentDef(dirDef) && dirDef.type === token) {\n return directivesStart;\n }\n }\n return null;\n}\n/**\n * Retrieve or instantiate the injectable from the `LView` at particular `index`.\n *\n * This function checks to see if the value has already been instantiated and if so returns the\n * cached `injectable`. Otherwise if it detects that the value is still a factory it\n * instantiates the `injectable` and caches the value.\n */\nfunction getNodeInjectable(lView, tView, index, tNode) {\n let value = lView[index];\n const tData = tView.data;\n if (isFactory(value)) {\n const factory = value;\n if (factory.resolving) {\n throwCyclicDependencyError(stringifyForError(tData[index]));\n }\n const previousIncludeViewProviders = setIncludeViewProviders(factory.canSeeViewProviders);\n factory.resolving = true;\n const previousInjectImplementation = factory.injectImpl ? setInjectImplementation(factory.injectImpl) : null;\n const success = enterDI(lView, tNode, InjectFlags.Default);\n ngDevMode &&\n assertEqual(success, true, 'Because flags do not contain \\`SkipSelf\\' we expect this to always succeed.');\n try {\n value = lView[index] = factory.factory(undefined, tData, lView, tNode);\n // This code path is hit for both directives and providers.\n // For perf reasons, we want to avoid searching for hooks on providers.\n // It does no harm to try (the hooks just won't exist), but the extra\n // checks are unnecessary and this is a hot path. So we check to see\n // if the index of the dependency is in the directive range for this\n // tNode. If it's not, we know it's a provider and skip hook registration.\n if (tView.firstCreatePass && index >= tNode.directiveStart) {\n ngDevMode && assertDirectiveDef(tData[index]);\n registerPreOrderHooks(index, tData[index], tView);\n }\n }\n finally {\n previousInjectImplementation !== null &&\n setInjectImplementation(previousInjectImplementation);\n setIncludeViewProviders(previousIncludeViewProviders);\n factory.resolving = false;\n leaveDI();\n }\n }\n return value;\n}\n/**\n * Returns the bit in an injector's bloom filter that should be used to determine whether or not\n * the directive might be provided by the injector.\n *\n * When a directive is public, it is added to the bloom filter and given a unique ID that can be\n * retrieved on the Type. When the directive isn't public or the token is not a directive `null`\n * is returned as the node injector can not possibly provide that token.\n *\n * @param token the injection token\n * @returns the matching bit to check in the bloom filter or `null` if the token is not known.\n * When the returned value is negative then it represents special values such as `Injector`.\n */\nfunction bloomHashBitOrFactory(token) {\n ngDevMode && assertDefined(token, 'token must be defined');\n if (typeof token === 'string') {\n return token.charCodeAt(0) || 0;\n }\n const tokenId = \n // First check with `hasOwnProperty` so we don't get an inherited ID.\n token.hasOwnProperty(NG_ELEMENT_ID) ? token[NG_ELEMENT_ID] : undefined;\n // Negative token IDs are used for special objects such as `Injector`\n if (typeof tokenId === 'number') {\n if (tokenId >= 0) {\n return tokenId & BLOOM_MASK;\n }\n else {\n ngDevMode &&\n assertEqual(tokenId, -1 /* InjectorMarkers.Injector */, 'Expecting to get Special Injector Id');\n return createNodeInjector;\n }\n }\n else {\n return tokenId;\n }\n}\nfunction bloomHasToken(bloomHash, injectorIndex, injectorView) {\n // Create a mask that targets the specific bit associated with the directive we're looking for.\n // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding\n // to bit positions 0 - 31 in a 32 bit integer.\n const mask = 1 << bloomHash;\n // Each bloom bucket in `injectorView` represents `BLOOM_BUCKET_BITS` number of bits of\n // `bloomHash`. Any bits in `bloomHash` beyond `BLOOM_BUCKET_BITS` indicate the bucket offset\n // that should be used.\n const value = injectorView[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)];\n // If the bloom filter value has the bit corresponding to the directive's bloomBit flipped on,\n // this injector is a potential match.\n return !!(value & mask);\n}\n/** Returns true if flags prevent parent injector from being searched for tokens */\nfunction shouldSearchParent(flags, isFirstHostTNode) {\n return !(flags & InjectFlags.Self) && !(flags & InjectFlags.Host && isFirstHostTNode);\n}\nclass NodeInjector {\n constructor(_tNode, _lView) {\n this._tNode = _tNode;\n this._lView = _lView;\n }\n get(token, notFoundValue, flags) {\n return getOrCreateInjectable(this._tNode, this._lView, token, convertToBitFlags(flags), notFoundValue);\n }\n}\n/** Creates a `NodeInjector` for the current node. */\nfunction createNodeInjector() {\n return new NodeInjector(getCurrentTNode(), getLView());\n}\n/**\n * @codeGenApi\n */\nfunction ɵɵgetInheritedFactory(type) {\n return noSideEffects(() => {\n const ownConstructor = type.prototype.constructor;\n const ownFactory = ownConstructor[NG_FACTORY_DEF] || getFactoryOf(ownConstructor);\n const objectPrototype = Object.prototype;\n let parent = Object.getPrototypeOf(type.prototype).constructor;\n // Go up the prototype until we hit `Object`.\n while (parent && parent !== objectPrototype) {\n const factory = parent[NG_FACTORY_DEF] || getFactoryOf(parent);\n // If we hit something that has a factory and the factory isn't the same as the type,\n // we've found the inherited factory. Note the check that the factory isn't the type's\n // own factory is redundant in most cases, but if the user has custom decorators on the\n // class, this lookup will start one level down in the prototype chain, causing us to\n // find the own factory first and potentially triggering an infinite loop downstream.\n if (factory && factory !== ownFactory) {\n return factory;\n }\n parent = Object.getPrototypeOf(parent);\n }\n // There is no factory defined. Either this was improper usage of inheritance\n // (no Angular decorator on the superclass) or there is no constructor at all\n // in the inheritance chain. Since the two cases cannot be distinguished, the\n // latter has to be assumed.\n return t => new t();\n });\n}\nfunction getFactoryOf(type) {\n if (isForwardRef(type)) {\n return () => {\n const factory = getFactoryOf(resolveForwardRef(type));\n return factory && factory();\n };\n }\n return getFactoryDef(type);\n}\n/**\n * Returns a value from the closest embedded or node injector.\n *\n * @param tNode The Node where the search for the injector should start\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided\n */\nfunction lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, notFoundValue) {\n let currentTNode = tNode;\n let currentLView = lView;\n // When an LView with an embedded view injector is inserted, it'll likely be interlaced with\n // nodes who may have injectors (e.g. node injector -> embedded view injector -> node injector).\n // Since the bloom filters for the node injectors have already been constructed and we don't\n // have a way of extracting the records from an injector, the only way to maintain the correct\n // hierarchy when resolving the value is to walk it node-by-node while attempting to resolve\n // the token at each level.\n while (currentTNode !== null && currentLView !== null &&\n (currentLView[FLAGS] & 1024 /* LViewFlags.HasEmbeddedViewInjector */) &&\n !(currentLView[FLAGS] & 256 /* LViewFlags.IsRoot */)) {\n ngDevMode && assertTNodeForLView(currentTNode, currentLView);\n // Note that this lookup on the node injector is using the `Self` flag, because\n // we don't want the node injector to look at any parent injectors since we\n // may hit the embedded view injector first.\n const nodeInjectorValue = lookupTokenUsingNodeInjector(currentTNode, currentLView, token, flags | InjectFlags.Self, NOT_FOUND);\n if (nodeInjectorValue !== NOT_FOUND) {\n return nodeInjectorValue;\n }\n // Has an explicit type due to a TS bug: https://github.com/microsoft/TypeScript/issues/33191\n let parentTNode = currentTNode.parent;\n // `TNode.parent` includes the parent within the current view only. If it doesn't exist,\n // it means that we've hit the view boundary and we need to go up to the next view.\n if (!parentTNode) {\n // Before we go to the next LView, check if the token exists on the current embedded injector.\n const embeddedViewInjector = currentLView[EMBEDDED_VIEW_INJECTOR];\n if (embeddedViewInjector) {\n const embeddedViewInjectorValue = embeddedViewInjector.get(token, NOT_FOUND, flags);\n if (embeddedViewInjectorValue !== NOT_FOUND) {\n return embeddedViewInjectorValue;\n }\n }\n // Otherwise keep going up the tree.\n parentTNode = getTNodeFromLView(currentLView);\n currentLView = currentLView[DECLARATION_VIEW];\n }\n currentTNode = parentTNode;\n }\n return notFoundValue;\n}\n/** Gets the TNode associated with an LView inside of the declaration view. */\nfunction getTNodeFromLView(lView) {\n const tView = lView[TVIEW];\n const tViewType = tView.type;\n // The parent pointer differs based on `TView.type`.\n if (tViewType === 2 /* TViewType.Embedded */) {\n ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');\n return tView.declTNode;\n }\n else if (tViewType === 1 /* TViewType.Component */) {\n // Components don't have `TView.declTNode` because each instance of component could be\n // inserted in different location, hence `TView.declTNode` is meaningless.\n return lView[T_HOST];\n }\n return null;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Facade for the attribute injection from DI.\n *\n * @codeGenApi\n */\nfunction ɵɵinjectAttribute(attrNameToInject) {\n return injectAttributeImpl(getCurrentTNode(), attrNameToInject);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst ANNOTATIONS = '__annotations__';\nconst PARAMETERS = '__parameters__';\nconst PROP_METADATA = '__prop__metadata__';\n/**\n * @suppress {globalThis}\n */\nfunction makeDecorator(name, props, parentClass, additionalProcessing, typeFn) {\n return noSideEffects(() => {\n const metaCtor = makeMetadataCtor(props);\n function DecoratorFactory(...args) {\n if (this instanceof DecoratorFactory) {\n metaCtor.call(this, ...args);\n return this;\n }\n const annotationInstance = new DecoratorFactory(...args);\n return function TypeDecorator(cls) {\n if (typeFn)\n typeFn(cls, ...args);\n // Use of Object.defineProperty is important since it creates non-enumerable property which\n // prevents the property is copied during subclassing.\n const annotations = cls.hasOwnProperty(ANNOTATIONS) ?\n cls[ANNOTATIONS] :\n Object.defineProperty(cls, ANNOTATIONS, { value: [] })[ANNOTATIONS];\n annotations.push(annotationInstance);\n if (additionalProcessing)\n additionalProcessing(cls);\n return cls;\n };\n }\n if (parentClass) {\n DecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n DecoratorFactory.prototype.ngMetadataName = name;\n DecoratorFactory.annotationCls = DecoratorFactory;\n return DecoratorFactory;\n });\n}\nfunction makeMetadataCtor(props) {\n return function ctor(...args) {\n if (props) {\n const values = props(...args);\n for (const propName in values) {\n this[propName] = values[propName];\n }\n }\n };\n}\nfunction makeParamDecorator(name, props, parentClass) {\n return noSideEffects(() => {\n const metaCtor = makeMetadataCtor(props);\n function ParamDecoratorFactory(...args) {\n if (this instanceof ParamDecoratorFactory) {\n metaCtor.apply(this, args);\n return this;\n }\n const annotationInstance = new ParamDecoratorFactory(...args);\n ParamDecorator.annotation = annotationInstance;\n return ParamDecorator;\n function ParamDecorator(cls, unusedKey, index) {\n // Use of Object.defineProperty is important since it creates non-enumerable property which\n // prevents the property is copied during subclassing.\n const parameters = cls.hasOwnProperty(PARAMETERS) ?\n cls[PARAMETERS] :\n Object.defineProperty(cls, PARAMETERS, { value: [] })[PARAMETERS];\n // there might be gaps if some in between parameters do not have annotations.\n // we pad with nulls.\n while (parameters.length <= index) {\n parameters.push(null);\n }\n (parameters[index] = parameters[index] || []).push(annotationInstance);\n return cls;\n }\n }\n if (parentClass) {\n ParamDecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n ParamDecoratorFactory.prototype.ngMetadataName = name;\n ParamDecoratorFactory.annotationCls = ParamDecoratorFactory;\n return ParamDecoratorFactory;\n });\n}\nfunction makePropDecorator(name, props, parentClass, additionalProcessing) {\n return noSideEffects(() => {\n const metaCtor = makeMetadataCtor(props);\n function PropDecoratorFactory(...args) {\n if (this instanceof PropDecoratorFactory) {\n metaCtor.apply(this, args);\n return this;\n }\n const decoratorInstance = new PropDecoratorFactory(...args);\n function PropDecorator(target, name) {\n const constructor = target.constructor;\n // Use of Object.defineProperty is important because it creates a non-enumerable property\n // which prevents the property from being copied during subclassing.\n const meta = constructor.hasOwnProperty(PROP_METADATA) ?\n constructor[PROP_METADATA] :\n Object.defineProperty(constructor, PROP_METADATA, { value: {} })[PROP_METADATA];\n meta[name] = meta.hasOwnProperty(name) && meta[name] || [];\n meta[name].unshift(decoratorInstance);\n if (additionalProcessing)\n additionalProcessing(target, name, ...args);\n }\n return PropDecorator;\n }\n if (parentClass) {\n PropDecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n PropDecoratorFactory.prototype.ngMetadataName = name;\n PropDecoratorFactory.annotationCls = PropDecoratorFactory;\n return PropDecoratorFactory;\n });\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Attribute decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Attribute = makeParamDecorator('Attribute', (attributeName) => ({ attributeName, __NG_ELEMENT_ID__: () => ɵɵinjectAttribute(attributeName) }));\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Creates a token that can be used in a DI Provider.\n *\n * Use an `InjectionToken` whenever the type you are injecting is not reified (does not have a\n * runtime representation) such as when injecting an interface, callable type, array or\n * parameterized type.\n *\n * `InjectionToken` is parameterized on `T` which is the type of object which will be returned by\n * the `Injector`. This provides an additional level of type safety.\n *\n * ```\n * interface MyInterface {...}\n * const myInterface = injector.get(new InjectionToken<MyInterface>('SomeToken'));\n * // myInterface is inferred to be MyInterface.\n * ```\n *\n * When creating an `InjectionToken`, you can optionally specify a factory function which returns\n * (possibly by creating) a default value of the parameterized type `T`. This sets up the\n * `InjectionToken` using this factory as a provider as if it was defined explicitly in the\n * application's root injector. If the factory function, which takes zero arguments, needs to inject\n * dependencies, it can do so using the `inject` function.\n * As you can see in the Tree-shakable InjectionToken example below.\n *\n * Additionally, if a `factory` is specified you can also specify the `providedIn` option, which\n * overrides the above behavior and marks the token as belonging to a particular `@NgModule` (note:\n * this option is now deprecated). As mentioned above, `'root'` is the default value for\n * `providedIn`.\n *\n * The `providedIn: NgModule` and `providedIn: 'any'` options are deprecated.\n *\n * @usageNotes\n * ### Basic Examples\n *\n * ### Plain InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='InjectionToken'}\n *\n * ### Tree-shakable InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}\n *\n *\n * @publicApi\n */\nclass InjectionToken {\n /**\n * @param _desc Description for the token,\n * used only for debugging purposes,\n * it should but does not need to be unique\n * @param options Options for the token's usage, as described above\n */\n constructor(_desc, options) {\n this._desc = _desc;\n /** @internal */\n this.ngMetadataName = 'InjectionToken';\n this.ɵprov = undefined;\n if (typeof options == 'number') {\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n assertLessThan(options, 0, 'Only negative numbers are supported here');\n // This is a special hack to assign __NG_ELEMENT_ID__ to this instance.\n // See `InjectorMarkers`\n this.__NG_ELEMENT_ID__ = options;\n }\n else if (options !== undefined) {\n this.ɵprov = ɵɵdefineInjectable({\n token: this,\n providedIn: options.providedIn || 'root',\n factory: options.factory,\n });\n }\n }\n /**\n * @internal\n */\n get multi() {\n return this;\n }\n toString() {\n return `InjectionToken ${this._desc}`;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A DI token that you can use to create a virtual [provider](guide/glossary#provider)\n * that will populate the `entryComponents` field of components and NgModules\n * based on its `useValue` property value.\n * All components that are referenced in the `useValue` value (either directly\n * or in a nested array or map) are added to the `entryComponents` property.\n *\n * @usageNotes\n *\n * The following example shows how the router can populate the `entryComponents`\n * field of an NgModule based on a router configuration that refers\n * to components.\n *\n * ```typescript\n * // helper function inside the router\n * function provideRoutes(routes) {\n * return [\n * {provide: ROUTES, useValue: routes},\n * {provide: ANALYZE_FOR_ENTRY_COMPONENTS, useValue: routes, multi: true}\n * ];\n * }\n *\n * // user code\n * let routes = [\n * {path: '/root', component: RootComp},\n * {path: '/teams', component: TeamsComp}\n * ];\n *\n * @NgModule({\n * providers: [provideRoutes(routes)]\n * })\n * class ModuleWithRoutes {}\n * ```\n *\n * @publicApi\n * @deprecated Since 9.0.0. With Ivy, this property is no longer necessary.\n */\nconst ANALYZE_FOR_ENTRY_COMPONENTS = new InjectionToken('AnalyzeForEntryComponents');\n// Stores the default value of `emitDistinctChangesOnly` when the `emitDistinctChangesOnly` is not\n// explicitly set.\nconst emitDistinctChangesOnlyDefaultValue = true;\n/**\n * Base class for query metadata.\n *\n * @see `ContentChildren`.\n * @see `ContentChild`.\n * @see `ViewChildren`.\n * @see `ViewChild`.\n *\n * @publicApi\n */\nclass Query {\n}\n/**\n * ContentChildren decorator and metadata.\n *\n *\n * @Annotation\n * @publicApi\n */\nconst ContentChildren = makePropDecorator('ContentChildren', (selector, data = {}) => ({\n selector,\n first: false,\n isViewQuery: false,\n descendants: false,\n emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue,\n ...data\n}), Query);\n/**\n * ContentChild decorator and metadata.\n *\n *\n * @Annotation\n *\n * @publicApi\n */\nconst ContentChild = makePropDecorator('ContentChild', (selector, data = {}) => ({ selector, first: true, isViewQuery: false, descendants: true, ...data }), Query);\n/**\n * ViewChildren decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst ViewChildren = makePropDecorator('ViewChildren', (selector, data = {}) => ({\n selector,\n first: false,\n isViewQuery: true,\n descendants: true,\n emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue,\n ...data\n}), Query);\n/**\n * ViewChild decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst ViewChild = makePropDecorator('ViewChild', (selector, data) => ({ selector, first: true, isViewQuery: true, descendants: true, ...data }), Query);\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar FactoryTarget;\n(function (FactoryTarget) {\n FactoryTarget[FactoryTarget[\"Directive\"] = 0] = \"Directive\";\n FactoryTarget[FactoryTarget[\"Component\"] = 1] = \"Component\";\n FactoryTarget[FactoryTarget[\"Injectable\"] = 2] = \"Injectable\";\n FactoryTarget[FactoryTarget[\"Pipe\"] = 3] = \"Pipe\";\n FactoryTarget[FactoryTarget[\"NgModule\"] = 4] = \"NgModule\";\n})(FactoryTarget || (FactoryTarget = {}));\nvar R3TemplateDependencyKind;\n(function (R3TemplateDependencyKind) {\n R3TemplateDependencyKind[R3TemplateDependencyKind[\"Directive\"] = 0] = \"Directive\";\n R3TemplateDependencyKind[R3TemplateDependencyKind[\"Pipe\"] = 1] = \"Pipe\";\n R3TemplateDependencyKind[R3TemplateDependencyKind[\"NgModule\"] = 2] = \"NgModule\";\n})(R3TemplateDependencyKind || (R3TemplateDependencyKind = {}));\nvar ViewEncapsulation;\n(function (ViewEncapsulation) {\n ViewEncapsulation[ViewEncapsulation[\"Emulated\"] = 0] = \"Emulated\";\n // Historically the 1 value was for `Native` encapsulation which has been removed as of v11.\n ViewEncapsulation[ViewEncapsulation[\"None\"] = 2] = \"None\";\n ViewEncapsulation[ViewEncapsulation[\"ShadowDom\"] = 3] = \"ShadowDom\";\n})(ViewEncapsulation || (ViewEncapsulation = {}));\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction getCompilerFacade(request) {\n const globalNg = _global['ng'];\n if (globalNg && globalNg.ɵcompilerFacade) {\n return globalNg.ɵcompilerFacade;\n }\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // Log the type as an error so that a developer can easily navigate to the type from the\n // console.\n console.error(`JIT compilation failed for ${request.kind}`, request.type);\n let message = `The ${request.kind} '${request\n .type.name}' needs to be compiled using the JIT compiler, but '@angular/compiler' is not available.\\n\\n`;\n if (request.usage === 1 /* JitCompilerUsage.PartialDeclaration */) {\n message += `The ${request.kind} is part of a library that has been partially compiled.\\n`;\n message +=\n `However, the Angular Linker has not processed the library such that JIT compilation is used as fallback.\\n`;\n message += '\\n';\n message +=\n `Ideally, the library is processed using the Angular Linker to become fully AOT compiled.\\n`;\n }\n else {\n message +=\n `JIT compilation is discouraged for production use-cases! Consider using AOT mode instead.\\n`;\n }\n message +=\n `Alternatively, the JIT compiler should be loaded by bootstrapping using '@angular/platform-browser-dynamic' or '@angular/platform-server',\\n`;\n message +=\n `or manually provide the compiler with 'import \"@angular/compiler\";' before bootstrapping.`;\n throw new Error(message);\n }\n else {\n throw new Error('JIT compiler unavailable');\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description\n *\n * Represents a type that a Component or other object is instances of.\n *\n * An example of a `Type` is `MyCustomComponent` class, which in JavaScript is represented by\n * the `MyCustomComponent` constructor function.\n *\n * @publicApi\n */\nconst Type = Function;\nfunction isType(v) {\n return typeof v === 'function';\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Determines if the contents of two arrays is identical\n *\n * @param a first array\n * @param b second array\n * @param identityAccessor Optional function for extracting stable object identity from a value in\n * the array.\n */\nfunction arrayEquals(a, b, identityAccessor) {\n if (a.length !== b.length)\n return false;\n for (let i = 0; i < a.length; i++) {\n let valueA = a[i];\n let valueB = b[i];\n if (identityAccessor) {\n valueA = identityAccessor(valueA);\n valueB = identityAccessor(valueB);\n }\n if (valueB !== valueA) {\n return false;\n }\n }\n return true;\n}\n/**\n * Flattens an array.\n */\nfunction flatten(list) {\n return list.flat(Number.POSITIVE_INFINITY);\n}\nfunction deepForEach(input, fn) {\n input.forEach(value => Array.isArray(value) ? deepForEach(value, fn) : fn(value));\n}\nfunction addToArray(arr, index, value) {\n // perf: array.push is faster than array.splice!\n if (index >= arr.length) {\n arr.push(value);\n }\n else {\n arr.splice(index, 0, value);\n }\n}\nfunction removeFromArray(arr, index) {\n // perf: array.pop is faster than array.splice!\n if (index >= arr.length - 1) {\n return arr.pop();\n }\n else {\n return arr.splice(index, 1)[0];\n }\n}\nfunction newArray(size, value) {\n const list = [];\n for (let i = 0; i < size; i++) {\n list.push(value);\n }\n return list;\n}\n/**\n * Remove item from array (Same as `Array.splice()` but faster.)\n *\n * `Array.splice()` is not as fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * https://jsperf.com/fast-array-splice (About 20x faster)\n *\n * @param array Array to splice\n * @param index Index of element in array to remove.\n * @param count Number of items to remove.\n */\nfunction arraySplice(array, index, count) {\n const length = array.length - count;\n while (index < length) {\n array[index] = array[index + count];\n index++;\n }\n while (count--) {\n array.pop(); // shrink the array\n }\n}\n/**\n * Same as `Array.splice(index, 0, value)` but faster.\n *\n * `Array.splice()` is not fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * @param array Array to splice.\n * @param index Index in array where the `value` should be added.\n * @param value Value to add to array.\n */\nfunction arrayInsert(array, index, value) {\n ngDevMode && assertLessThanOrEqual(index, array.length, 'Can\\'t insert past array end.');\n let end = array.length;\n while (end > index) {\n const previousEnd = end - 1;\n array[end] = array[previousEnd];\n end = previousEnd;\n }\n array[index] = value;\n}\n/**\n * Same as `Array.splice2(index, 0, value1, value2)` but faster.\n *\n * `Array.splice()` is not fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * @param array Array to splice.\n * @param index Index in array where the `value` should be added.\n * @param value1 Value to add to array.\n * @param value2 Value to add to array.\n */\nfunction arrayInsert2(array, index, value1, value2) {\n ngDevMode && assertLessThanOrEqual(index, array.length, 'Can\\'t insert past array end.');\n let end = array.length;\n if (end == index) {\n // inserting at the end.\n array.push(value1, value2);\n }\n else if (end === 1) {\n // corner case when we have less items in array than we have items to insert.\n array.push(value2, array[0]);\n array[0] = value1;\n }\n else {\n end--;\n array.push(array[end - 1], array[end]);\n while (end > index) {\n const previousEnd = end - 2;\n array[end] = array[previousEnd];\n end--;\n }\n array[index] = value1;\n array[index + 1] = value2;\n }\n}\n/**\n * Get an index of an `value` in a sorted `array`.\n *\n * NOTE:\n * - This uses binary search algorithm for fast removals.\n *\n * @param array A sorted array to binary search.\n * @param value The value to look for.\n * @returns index of the value.\n * - positive index if value found.\n * - negative index if value not found. (`~index` to get the value where it should have been\n * located)\n */\nfunction arrayIndexOfSorted(array, value) {\n return _arrayIndexOfSorted(array, value, 0);\n}\n/**\n * Set a `value` for a `key`.\n *\n * @param keyValueArray to modify.\n * @param key The key to locate or create.\n * @param value The value to set for a `key`.\n * @returns index (always even) of where the value vas set.\n */\nfunction keyValueArraySet(keyValueArray, key, value) {\n let index = keyValueArrayIndexOf(keyValueArray, key);\n if (index >= 0) {\n // if we found it set it.\n keyValueArray[index | 1] = value;\n }\n else {\n index = ~index;\n arrayInsert2(keyValueArray, index, key, value);\n }\n return index;\n}\n/**\n * Retrieve a `value` for a `key` (on `undefined` if not found.)\n *\n * @param keyValueArray to search.\n * @param key The key to locate.\n * @return The `value` stored at the `key` location or `undefined if not found.\n */\nfunction keyValueArrayGet(keyValueArray, key) {\n const index = keyValueArrayIndexOf(keyValueArray, key);\n if (index >= 0) {\n // if we found it retrieve it.\n return keyValueArray[index | 1];\n }\n return undefined;\n}\n/**\n * Retrieve a `key` index value in the array or `-1` if not found.\n *\n * @param keyValueArray to search.\n * @param key The key to locate.\n * @returns index of where the key is (or should have been.)\n * - positive (even) index if key found.\n * - negative index if key not found. (`~index` (even) to get the index where it should have\n * been inserted.)\n */\nfunction keyValueArrayIndexOf(keyValueArray, key) {\n return _arrayIndexOfSorted(keyValueArray, key, 1);\n}\n/**\n * Delete a `key` (and `value`) from the `KeyValueArray`.\n *\n * @param keyValueArray to modify.\n * @param key The key to locate or delete (if exist).\n * @returns index of where the key was (or should have been.)\n * - positive (even) index if key found and deleted.\n * - negative index if key not found. (`~index` (even) to get the index where it should have\n * been.)\n */\nfunction keyValueArrayDelete(keyValueArray, key) {\n const index = keyValueArrayIndexOf(keyValueArray, key);\n if (index >= 0) {\n // if we found it remove it.\n arraySplice(keyValueArray, index, 2);\n }\n return index;\n}\n/**\n * INTERNAL: Get an index of an `value` in a sorted `array` by grouping search by `shift`.\n *\n * NOTE:\n * - This uses binary search algorithm for fast removals.\n *\n * @param array A sorted array to binary search.\n * @param value The value to look for.\n * @param shift grouping shift.\n * - `0` means look at every location\n * - `1` means only look at every other (even) location (the odd locations are to be ignored as\n * they are values.)\n * @returns index of the value.\n * - positive index if value found.\n * - negative index if value not found. (`~index` to get the value where it should have been\n * inserted)\n */\nfunction _arrayIndexOfSorted(array, value, shift) {\n ngDevMode && assertEqual(Array.isArray(array), true, 'Expecting an array');\n let start = 0;\n let end = array.length >> shift;\n while (end !== start) {\n const middle = start + ((end - start) >> 1); // find the middle.\n const current = array[middle << shift];\n if (value === current) {\n return (middle << shift);\n }\n else if (current > value) {\n end = middle;\n }\n else {\n start = middle + 1; // We already searched middle so make it non-inclusive by adding 1\n }\n }\n return ~(end << shift);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/*\n * #########################\n * Attention: These Regular expressions have to hold even if the code is minified!\n * ##########################\n */\n/**\n * Regular expression that detects pass-through constructors for ES5 output. This Regex\n * intends to capture the common delegation pattern emitted by TypeScript and Babel. Also\n * it intends to capture the pattern where existing constructors have been downleveled from\n * ES2015 to ES5 using TypeScript w/ downlevel iteration. e.g.\n *\n * ```\n * function MyClass() {\n * var _this = _super.apply(this, arguments) || this;\n * ```\n *\n * downleveled to ES5 with `downlevelIteration` for TypeScript < 4.2:\n * ```\n * function MyClass() {\n * var _this = _super.apply(this, __spread(arguments)) || this;\n * ```\n *\n * or downleveled to ES5 with `downlevelIteration` for TypeScript >= 4.2:\n * ```\n * function MyClass() {\n * var _this = _super.apply(this, __spreadArray([], __read(arguments), false)) || this;\n * ```\n *\n * More details can be found in: https://github.com/angular/angular/issues/38453.\n */\nconst ES5_DELEGATE_CTOR = /^function\\s+\\S+\\(\\)\\s*{[\\s\\S]+\\.apply\\(this,\\s*(arguments|(?:[^()]+\\(\\[\\],)?[^()]+\\(arguments\\).*)\\)/;\n/** Regular expression that detects ES2015 classes which extend from other classes. */\nconst ES2015_INHERITED_CLASS = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{/;\n/**\n * Regular expression that detects ES2015 classes which extend from other classes and\n * have an explicit constructor defined.\n */\nconst ES2015_INHERITED_CLASS_WITH_CTOR = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\s*\\(/;\n/**\n * Regular expression that detects ES2015 classes which extend from other classes\n * and inherit a constructor.\n */\nconst ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\s*\\(\\)\\s*{[^}]*super\\(\\.\\.\\.arguments\\)/;\n/**\n * Determine whether a stringified type is a class which delegates its constructor\n * to its parent.\n *\n * This is not trivial since compiled code can actually contain a constructor function\n * even if the original source code did not. For instance, when the child class contains\n * an initialized instance property.\n */\nfunction isDelegateCtor(typeStr) {\n return ES5_DELEGATE_CTOR.test(typeStr) ||\n ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR.test(typeStr) ||\n (ES2015_INHERITED_CLASS.test(typeStr) && !ES2015_INHERITED_CLASS_WITH_CTOR.test(typeStr));\n}\nclass ReflectionCapabilities {\n constructor(reflect) {\n this._reflect = reflect || _global['Reflect'];\n }\n factory(t) {\n return (...args) => new t(...args);\n }\n /** @internal */\n _zipTypesAndAnnotations(paramTypes, paramAnnotations) {\n let result;\n if (typeof paramTypes === 'undefined') {\n result = newArray(paramAnnotations.length);\n }\n else {\n result = newArray(paramTypes.length);\n }\n for (let i = 0; i < result.length; i++) {\n // TS outputs Object for parameters without types, while Traceur omits\n // the annotations. For now we preserve the Traceur behavior to aid\n // migration, but this can be revisited.\n if (typeof paramTypes === 'undefined') {\n result[i] = [];\n }\n else if (paramTypes[i] && paramTypes[i] != Object) {\n result[i] = [paramTypes[i]];\n }\n else {\n result[i] = [];\n }\n if (paramAnnotations && paramAnnotations[i] != null) {\n result[i] = result[i].concat(paramAnnotations[i]);\n }\n }\n return result;\n }\n _ownParameters(type, parentCtor) {\n const typeStr = type.toString();\n // If we have no decorators, we only have function.length as metadata.\n // In that case, to detect whether a child class declared an own constructor or not,\n // we need to look inside of that constructor to check whether it is\n // just calling the parent.\n // This also helps to work around for https://github.com/Microsoft/TypeScript/issues/12439\n // that sets 'design:paramtypes' to []\n // if a class inherits from another class but has no ctor declared itself.\n if (isDelegateCtor(typeStr)) {\n return null;\n }\n // Prefer the direct API.\n if (type.parameters && type.parameters !== parentCtor.parameters) {\n return type.parameters;\n }\n // API of tsickle for lowering decorators to properties on the class.\n const tsickleCtorParams = type.ctorParameters;\n if (tsickleCtorParams && tsickleCtorParams !== parentCtor.ctorParameters) {\n // Newer tsickle uses a function closure\n // Retain the non-function case for compatibility with older tsickle\n const ctorParameters = typeof tsickleCtorParams === 'function' ? tsickleCtorParams() : tsickleCtorParams;\n const paramTypes = ctorParameters.map((ctorParam) => ctorParam && ctorParam.type);\n const paramAnnotations = ctorParameters.map((ctorParam) => ctorParam && convertTsickleDecoratorIntoMetadata(ctorParam.decorators));\n return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);\n }\n // API for metadata created by invoking the decorators.\n const paramAnnotations = type.hasOwnProperty(PARAMETERS) && type[PARAMETERS];\n const paramTypes = this._reflect && this._reflect.getOwnMetadata &&\n this._reflect.getOwnMetadata('design:paramtypes', type);\n if (paramTypes || paramAnnotations) {\n return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);\n }\n // If a class has no decorators, at least create metadata\n // based on function.length.\n // Note: We know that this is a real constructor as we checked\n // the content of the constructor above.\n return newArray(type.length);\n }\n parameters(type) {\n // Note: only report metadata if we have at least one class decorator\n // to stay in sync with the static reflector.\n if (!isType(type)) {\n return [];\n }\n const parentCtor = getParentCtor(type);\n let parameters = this._ownParameters(type, parentCtor);\n if (!parameters && parentCtor !== Object) {\n parameters = this.parameters(parentCtor);\n }\n return parameters || [];\n }\n _ownAnnotations(typeOrFunc, parentCtor) {\n // Prefer the direct API.\n if (typeOrFunc.annotations && typeOrFunc.annotations !== parentCtor.annotations) {\n let annotations = typeOrFunc.annotations;\n if (typeof annotations === 'function' && annotations.annotations) {\n annotations = annotations.annotations;\n }\n return annotations;\n }\n // API of tsickle for lowering decorators to properties on the class.\n if (typeOrFunc.decorators && typeOrFunc.decorators !== parentCtor.decorators) {\n return convertTsickleDecoratorIntoMetadata(typeOrFunc.decorators);\n }\n // API for metadata created by invoking the decorators.\n if (typeOrFunc.hasOwnProperty(ANNOTATIONS)) {\n return typeOrFunc[ANNOTATIONS];\n }\n return null;\n }\n annotations(typeOrFunc) {\n if (!isType(typeOrFunc)) {\n return [];\n }\n const parentCtor = getParentCtor(typeOrFunc);\n const ownAnnotations = this._ownAnnotations(typeOrFunc, parentCtor) || [];\n const parentAnnotations = parentCtor !== Object ? this.annotations(parentCtor) : [];\n return parentAnnotations.concat(ownAnnotations);\n }\n _ownPropMetadata(typeOrFunc, parentCtor) {\n // Prefer the direct API.\n if (typeOrFunc.propMetadata &&\n typeOrFunc.propMetadata !== parentCtor.propMetadata) {\n let propMetadata = typeOrFunc.propMetadata;\n if (typeof propMetadata === 'function' && propMetadata.propMetadata) {\n propMetadata = propMetadata.propMetadata;\n }\n return propMetadata;\n }\n // API of tsickle for lowering decorators to properties on the class.\n if (typeOrFunc.propDecorators &&\n typeOrFunc.propDecorators !== parentCtor.propDecorators) {\n const propDecorators = typeOrFunc.propDecorators;\n const propMetadata = {};\n Object.keys(propDecorators).forEach(prop => {\n propMetadata[prop] = convertTsickleDecoratorIntoMetadata(propDecorators[prop]);\n });\n return propMetadata;\n }\n // API for metadata created by invoking the decorators.\n if (typeOrFunc.hasOwnProperty(PROP_METADATA)) {\n return typeOrFunc[PROP_METADATA];\n }\n return null;\n }\n propMetadata(typeOrFunc) {\n if (!isType(typeOrFunc)) {\n return {};\n }\n const parentCtor = getParentCtor(typeOrFunc);\n const propMetadata = {};\n if (parentCtor !== Object) {\n const parentPropMetadata = this.propMetadata(parentCtor);\n Object.keys(parentPropMetadata).forEach((propName) => {\n propMetadata[propName] = parentPropMetadata[propName];\n });\n }\n const ownPropMetadata = this._ownPropMetadata(typeOrFunc, parentCtor);\n if (ownPropMetadata) {\n Object.keys(ownPropMetadata).forEach((propName) => {\n const decorators = [];\n if (propMetadata.hasOwnProperty(propName)) {\n decorators.push(...propMetadata[propName]);\n }\n decorators.push(...ownPropMetadata[propName]);\n propMetadata[propName] = decorators;\n });\n }\n return propMetadata;\n }\n ownPropMetadata(typeOrFunc) {\n if (!isType(typeOrFunc)) {\n return {};\n }\n return this._ownPropMetadata(typeOrFunc, getParentCtor(typeOrFunc)) || {};\n }\n hasLifecycleHook(type, lcProperty) {\n return type instanceof Type && lcProperty in type.prototype;\n }\n}\nfunction convertTsickleDecoratorIntoMetadata(decoratorInvocations) {\n if (!decoratorInvocations) {\n return [];\n }\n return decoratorInvocations.map(decoratorInvocation => {\n const decoratorType = decoratorInvocation.type;\n const annotationCls = decoratorType.annotationCls;\n const annotationArgs = decoratorInvocation.args ? decoratorInvocation.args : [];\n return new annotationCls(...annotationArgs);\n });\n}\nfunction getParentCtor(ctor) {\n const parentProto = ctor.prototype ? Object.getPrototypeOf(ctor.prototype) : null;\n const parentCtor = parentProto ? parentProto.constructor : null;\n // Note: We always use `Object` as the null value\n // to simplify checking later on.\n return parentCtor || Object;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Inject decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Inject = attachInjectFlag(\n// Disable tslint because `DecoratorFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\nmakeParamDecorator('Inject', (token) => ({ token })), -1 /* DecoratorFlags.Inject */);\n/**\n * Optional decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Optional = \n// Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\nattachInjectFlag(makeParamDecorator('Optional'), 8 /* InternalInjectFlags.Optional */);\n/**\n * Self decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Self = \n// Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\nattachInjectFlag(makeParamDecorator('Self'), 2 /* InternalInjectFlags.Self */);\n/**\n * `SkipSelf` decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst SkipSelf = \n// Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\nattachInjectFlag(makeParamDecorator('SkipSelf'), 4 /* InternalInjectFlags.SkipSelf */);\n/**\n * Host decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Host = \n// Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\nattachInjectFlag(makeParamDecorator('Host'), 1 /* InternalInjectFlags.Host */);\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nlet _reflect = null;\nfunction getReflect() {\n return (_reflect = _reflect || new ReflectionCapabilities());\n}\nfunction reflectDependencies(type) {\n return convertDependencies(getReflect().parameters(type));\n}\nfunction convertDependencies(deps) {\n return deps.map(dep => reflectDependency(dep));\n}\nfunction reflectDependency(dep) {\n const meta = {\n token: null,\n attribute: null,\n host: false,\n optional: false,\n self: false,\n skipSelf: false,\n };\n if (Array.isArray(dep) && dep.length > 0) {\n for (let j = 0; j < dep.length; j++) {\n const param = dep[j];\n if (param === undefined) {\n // param may be undefined if type of dep is not set by ngtsc\n continue;\n }\n const proto = Object.getPrototypeOf(param);\n if (param instanceof Optional || proto.ngMetadataName === 'Optional') {\n meta.optional = true;\n }\n else if (param instanceof SkipSelf || proto.ngMetadataName === 'SkipSelf') {\n meta.skipSelf = true;\n }\n else if (param instanceof Self || proto.ngMetadataName === 'Self') {\n meta.self = true;\n }\n else if (param instanceof Host || proto.ngMetadataName === 'Host') {\n meta.host = true;\n }\n else if (param instanceof Inject) {\n meta.token = param.token;\n }\n else if (param instanceof Attribute) {\n if (param.attributeName === undefined) {\n throw new RuntimeError(204 /* RuntimeErrorCode.INVALID_INJECTION_TOKEN */, ngDevMode && `Attribute name must be defined.`);\n }\n meta.attribute = param.attributeName;\n }\n else {\n meta.token = param;\n }\n }\n }\n else if (dep === undefined || (Array.isArray(dep) && dep.length === 0)) {\n meta.token = null;\n }\n else {\n meta.token = dep;\n }\n return meta;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Used to resolve resource URLs on `@Component` when used with JIT compilation.\n *\n * Example:\n * ```\n * @Component({\n * selector: 'my-comp',\n * templateUrl: 'my-comp.html', // This requires asynchronous resolution\n * })\n * class MyComponent{\n * }\n *\n * // Calling `renderComponent` will fail because `renderComponent` is a synchronous process\n * // and `MyComponent`'s `@Component.templateUrl` needs to be resolved asynchronously.\n *\n * // Calling `resolveComponentResources()` will resolve `@Component.templateUrl` into\n * // `@Component.template`, which allows `renderComponent` to proceed in a synchronous manner.\n *\n * // Use browser's `fetch()` function as the default resource resolution strategy.\n * resolveComponentResources(fetch).then(() => {\n * // After resolution all URLs have been converted into `template` strings.\n * renderComponent(MyComponent);\n * });\n *\n * ```\n *\n * NOTE: In AOT the resolution happens during compilation, and so there should be no need\n * to call this method outside JIT mode.\n *\n * @param resourceResolver a function which is responsible for returning a `Promise` to the\n * contents of the resolved URL. Browser's `fetch()` method is a good default implementation.\n */\nfunction resolveComponentResources(resourceResolver) {\n // Store all promises which are fetching the resources.\n const componentResolved = [];\n // Cache so that we don't fetch the same resource more than once.\n const urlMap = new Map();\n function cachedResourceResolve(url) {\n let promise = urlMap.get(url);\n if (!promise) {\n const resp = resourceResolver(url);\n urlMap.set(url, promise = resp.then(unwrapResponse));\n }\n return promise;\n }\n componentResourceResolutionQueue.forEach((component, type) => {\n const promises = [];\n if (component.templateUrl) {\n promises.push(cachedResourceResolve(component.templateUrl).then((template) => {\n component.template = template;\n }));\n }\n const styleUrls = component.styleUrls;\n const styles = component.styles || (component.styles = []);\n const styleOffset = component.styles.length;\n styleUrls && styleUrls.forEach((styleUrl, index) => {\n styles.push(''); // pre-allocate array.\n promises.push(cachedResourceResolve(styleUrl).then((style) => {\n styles[styleOffset + index] = style;\n styleUrls.splice(styleUrls.indexOf(styleUrl), 1);\n if (styleUrls.length == 0) {\n component.styleUrls = undefined;\n }\n }));\n });\n const fullyResolved = Promise.all(promises).then(() => componentDefResolved(type));\n componentResolved.push(fullyResolved);\n });\n clearResolutionOfComponentResourcesQueue();\n return Promise.all(componentResolved).then(() => undefined);\n}\nlet componentResourceResolutionQueue = new Map();\n// Track when existing ɵcmp for a Type is waiting on resources.\nconst componentDefPendingResolution = new Set();\nfunction maybeQueueResolutionOfComponentResources(type, metadata) {\n if (componentNeedsResolution(metadata)) {\n componentResourceResolutionQueue.set(type, metadata);\n componentDefPendingResolution.add(type);\n }\n}\nfunction isComponentDefPendingResolution(type) {\n return componentDefPendingResolution.has(type);\n}\nfunction componentNeedsResolution(component) {\n return !!((component.templateUrl && !component.hasOwnProperty('template')) ||\n component.styleUrls && component.styleUrls.length);\n}\nfunction clearResolutionOfComponentResourcesQueue() {\n const old = componentResourceResolutionQueue;\n componentResourceResolutionQueue = new Map();\n return old;\n}\nfunction restoreComponentResolutionQueue(queue) {\n componentDefPendingResolution.clear();\n queue.forEach((_, type) => componentDefPendingResolution.add(type));\n componentResourceResolutionQueue = queue;\n}\nfunction isComponentResourceResolutionQueueEmpty() {\n return componentResourceResolutionQueue.size === 0;\n}\nfunction unwrapResponse(response) {\n return typeof response == 'string' ? response : response.text();\n}\nfunction componentDefResolved(type) {\n componentDefPendingResolution.delete(type);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Map of module-id to the corresponding NgModule.\n */\nconst modules = new Map();\n/**\n * Whether to check for duplicate NgModule registrations.\n *\n * This can be disabled for testing.\n */\nlet checkForDuplicateNgModules = true;\nfunction assertSameOrNotExisting(id, type, incoming) {\n if (type && type !== incoming && checkForDuplicateNgModules) {\n throw new Error(`Duplicate module registered for ${id} - ${stringify(type)} vs ${stringify(type.name)}`);\n }\n}\n/**\n * Adds the given NgModule type to Angular's NgModule registry.\n *\n * This is generated as a side-effect of NgModule compilation. Note that the `id` is passed in\n * explicitly and not read from the NgModule definition. This is for two reasons: it avoids a\n * megamorphic read, and in JIT there's a chicken-and-egg problem where the NgModule may not be\n * fully resolved when it's registered.\n *\n * @codeGenApi\n */\nfunction registerNgModuleType(ngModuleType, id) {\n const existing = modules.get(id) || null;\n assertSameOrNotExisting(id, existing, ngModuleType);\n modules.set(id, ngModuleType);\n}\nfunction clearModulesForTest() {\n modules.clear();\n}\nfunction getRegisteredNgModuleType(id) {\n return modules.get(id);\n}\n/**\n * Control whether the NgModule registration system enforces that each NgModule type registered has\n * a unique id.\n *\n * This is useful for testing as the NgModule registry cannot be properly reset between tests with\n * Angular's current API.\n */\nfunction setAllowDuplicateNgModuleIdsForTest(allowDuplicates) {\n checkForDuplicateNgModules = !allowDuplicates;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Defines a schema that allows an NgModule to contain the following:\n * - Non-Angular elements named with dash case (`-`).\n * - Element properties named with dash case (`-`).\n * Dash case is the naming convention for custom elements.\n *\n * @publicApi\n */\nconst CUSTOM_ELEMENTS_SCHEMA = {\n name: 'custom-elements'\n};\n/**\n * Defines a schema that allows any property on any element.\n *\n * This schema allows you to ignore the errors related to any unknown elements or properties in a\n * template. The usage of this schema is generally discouraged because it prevents useful validation\n * and may hide real errors in your template. Consider using the `CUSTOM_ELEMENTS_SCHEMA` instead.\n *\n * @publicApi\n */\nconst NO_ERRORS_SCHEMA = {\n name: 'no-errors-schema'\n};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nlet shouldThrowErrorOnUnknownElement = false;\n/**\n * Sets a strict mode for JIT-compiled components to throw an error on unknown elements,\n * instead of just logging the error.\n * (for AOT-compiled ones this check happens at build time).\n */\nfunction ɵsetUnknownElementStrictMode(shouldThrow) {\n shouldThrowErrorOnUnknownElement = shouldThrow;\n}\n/**\n * Gets the current value of the strict mode.\n */\nfunction ɵgetUnknownElementStrictMode() {\n return shouldThrowErrorOnUnknownElement;\n}\nlet shouldThrowErrorOnUnknownProperty = false;\n/**\n * Sets a strict mode for JIT-compiled components to throw an error on unknown properties,\n * instead of just logging the error.\n * (for AOT-compiled ones this check happens at build time).\n */\nfunction ɵsetUnknownPropertyStrictMode(shouldThrow) {\n shouldThrowErrorOnUnknownProperty = shouldThrow;\n}\n/**\n * Gets the current value of the strict mode.\n */\nfunction ɵgetUnknownPropertyStrictMode() {\n return shouldThrowErrorOnUnknownProperty;\n}\n/**\n * Validates that the element is known at runtime and produces\n * an error if it's not the case.\n * This check is relevant for JIT-compiled components (for AOT-compiled\n * ones this check happens at build time).\n *\n * The element is considered known if either:\n * - it's a known HTML element\n * - it's a known custom element\n * - the element matches any directive\n * - the element is allowed by one of the schemas\n *\n * @param element Element to validate\n * @param lView An `LView` that represents a current component that is being rendered\n * @param tagName Name of the tag to check\n * @param schemas Array of schemas\n * @param hasDirectives Boolean indicating that the element matches any directive\n */\nfunction validateElementIsKnown(element, lView, tagName, schemas, hasDirectives) {\n // If `schemas` is set to `null`, that's an indication that this Component was compiled in AOT\n // mode where this check happens at compile time. In JIT mode, `schemas` is always present and\n // defined as an array (as an empty array in case `schemas` field is not defined) and we should\n // execute the check below.\n if (schemas === null)\n return;\n // If the element matches any directive, it's considered as valid.\n if (!hasDirectives && tagName !== null) {\n // The element is unknown if it's an instance of HTMLUnknownElement, or it isn't registered\n // as a custom element. Note that unknown elements with a dash in their name won't be instances\n // of HTMLUnknownElement in browsers that support web components.\n const isUnknown = \n // Note that we can't check for `typeof HTMLUnknownElement === 'function'`,\n // because while most browsers return 'function', IE returns 'object'.\n (typeof HTMLUnknownElement !== 'undefined' && HTMLUnknownElement &&\n element instanceof HTMLUnknownElement) ||\n (typeof customElements !== 'undefined' && tagName.indexOf('-') > -1 &&\n !customElements.get(tagName));\n if (isUnknown && !matchingSchemas(schemas, tagName)) {\n const isHostStandalone = isHostComponentStandalone(lView);\n const templateLocation = getTemplateLocationDetails(lView);\n const schemas = `'${isHostStandalone ? '@Component' : '@NgModule'}.schemas'`;\n let message = `'${tagName}' is not a known element${templateLocation}:\\n`;\n message += `1. If '${tagName}' is an Angular component, then verify that it is ${isHostStandalone ? 'included in the \\'@Component.imports\\' of this component' :\n 'a part of an @NgModule where this component is declared'}.\\n`;\n if (tagName && tagName.indexOf('-') > -1) {\n message +=\n `2. If '${tagName}' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the ${schemas} of this component to suppress this message.`;\n }\n else {\n message +=\n `2. To allow any element add 'NO_ERRORS_SCHEMA' to the ${schemas} of this component.`;\n }\n if (shouldThrowErrorOnUnknownElement) {\n throw new RuntimeError(304 /* RuntimeErrorCode.UNKNOWN_ELEMENT */, message);\n }\n else {\n console.error(formatRuntimeError(304 /* RuntimeErrorCode.UNKNOWN_ELEMENT */, message));\n }\n }\n }\n}\n/**\n * Validates that the property of the element is known at runtime and returns\n * false if it's not the case.\n * This check is relevant for JIT-compiled components (for AOT-compiled\n * ones this check happens at build time).\n *\n * The property is considered known if either:\n * - it's a known property of the element\n * - the element is allowed by one of the schemas\n * - the property is used for animations\n *\n * @param element Element to validate\n * @param propName Name of the property to check\n * @param tagName Name of the tag hosting the property\n * @param schemas Array of schemas\n */\nfunction isPropertyValid(element, propName, tagName, schemas) {\n // If `schemas` is set to `null`, that's an indication that this Component was compiled in AOT\n // mode where this check happens at compile time. In JIT mode, `schemas` is always present and\n // defined as an array (as an empty array in case `schemas` field is not defined) and we should\n // execute the check below.\n if (schemas === null)\n return true;\n // The property is considered valid if the element matches the schema, it exists on the element,\n // or it is synthetic, and we are in a browser context (web worker nodes should be skipped).\n if (matchingSchemas(schemas, tagName) || propName in element || isAnimationProp(propName)) {\n return true;\n }\n // Note: `typeof Node` returns 'function' in most browsers, but on IE it is 'object' so we\n // need to account for both here, while being careful with `typeof null` also returning 'object'.\n return typeof Node === 'undefined' || Node === null || !(element instanceof Node);\n}\n/**\n * Logs or throws an error that a property is not supported on an element.\n *\n * @param propName Name of the invalid property\n * @param tagName Name of the tag hosting the property\n * @param nodeType Type of the node hosting the property\n * @param lView An `LView` that represents a current component\n */\nfunction handleUnknownPropertyError(propName, tagName, nodeType, lView) {\n // Special-case a situation when a structural directive is applied to\n // an `<ng-template>` element, for example: `<ng-template *ngIf=\"true\">`.\n // In this case the compiler generates the `ɵɵtemplate` instruction with\n // the `null` as the tagName. The directive matching logic at runtime relies\n // on this effect (see `isInlineTemplate`), thus using the 'ng-template' as\n // a default value of the `tNode.value` is not feasible at this moment.\n if (!tagName && nodeType === 4 /* TNodeType.Container */) {\n tagName = 'ng-template';\n }\n const isHostStandalone = isHostComponentStandalone(lView);\n const templateLocation = getTemplateLocationDetails(lView);\n let message = `Can't bind to '${propName}' since it isn't a known property of '${tagName}'${templateLocation}.`;\n const schemas = `'${isHostStandalone ? '@Component' : '@NgModule'}.schemas'`;\n const importLocation = isHostStandalone ?\n 'included in the \\'@Component.imports\\' of this component' :\n 'a part of an @NgModule where this component is declared';\n if (KNOWN_CONTROL_FLOW_DIRECTIVES.has(propName)) {\n // Most likely this is a control flow directive (such as `*ngIf`) used in\n // a template, but the directive or the `CommonModule` is not imported.\n const correspondingImport = KNOWN_CONTROL_FLOW_DIRECTIVES.get(propName);\n message += `\\nIf the '${propName}' is an Angular control flow directive, ` +\n `please make sure that either the '${correspondingImport}' directive or the 'CommonModule' is ${importLocation}.`;\n }\n else {\n // May be an Angular component, which is not imported/declared?\n message += `\\n1. If '${tagName}' is an Angular component and it has the ` +\n `'${propName}' input, then verify that it is ${importLocation}.`;\n // May be a Web Component?\n if (tagName && tagName.indexOf('-') > -1) {\n message += `\\n2. If '${tagName}' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' ` +\n `to the ${schemas} of this component to suppress this message.`;\n message += `\\n3. To allow any property add 'NO_ERRORS_SCHEMA' to ` +\n `the ${schemas} of this component.`;\n }\n else {\n // If it's expected, the error can be suppressed by the `NO_ERRORS_SCHEMA` schema.\n message += `\\n2. To allow any property add 'NO_ERRORS_SCHEMA' to ` +\n `the ${schemas} of this component.`;\n }\n }\n reportUnknownPropertyError(message);\n}\nfunction reportUnknownPropertyError(message) {\n if (shouldThrowErrorOnUnknownProperty) {\n throw new RuntimeError(303 /* RuntimeErrorCode.UNKNOWN_BINDING */, message);\n }\n else {\n console.error(formatRuntimeError(303 /* RuntimeErrorCode.UNKNOWN_BINDING */, message));\n }\n}\n/**\n * WARNING: this is a **dev-mode only** function (thus should always be guarded by the `ngDevMode`)\n * and must **not** be used in production bundles. The function makes megamorphic reads, which might\n * be too slow for production mode and also it relies on the constructor function being available.\n *\n * Gets a reference to the host component def (where a current component is declared).\n *\n * @param lView An `LView` that represents a current component that is being rendered.\n */\nfunction getDeclarationComponentDef(lView) {\n !ngDevMode && throwError('Must never be called in production mode');\n const declarationLView = lView[DECLARATION_COMPONENT_VIEW];\n const context = declarationLView[CONTEXT];\n // Unable to obtain a context.\n if (!context)\n return null;\n return context.constructor ? getComponentDef(context.constructor) : null;\n}\n/**\n * WARNING: this is a **dev-mode only** function (thus should always be guarded by the `ngDevMode`)\n * and must **not** be used in production bundles. The function makes megamorphic reads, which might\n * be too slow for production mode.\n *\n * Checks if the current component is declared inside of a standalone component template.\n *\n * @param lView An `LView` that represents a current component that is being rendered.\n */\nfunction isHostComponentStandalone(lView) {\n !ngDevMode && throwError('Must never be called in production mode');\n const componentDef = getDeclarationComponentDef(lView);\n // Treat host component as non-standalone if we can't obtain the def.\n return !!componentDef?.standalone;\n}\n/**\n * WARNING: this is a **dev-mode only** function (thus should always be guarded by the `ngDevMode`)\n * and must **not** be used in production bundles. The function makes megamorphic reads, which might\n * be too slow for production mode.\n *\n * Constructs a string describing the location of the host component template. The function is used\n * in dev mode to produce error messages.\n *\n * @param lView An `LView` that represents a current component that is being rendered.\n */\nfunction getTemplateLocationDetails(lView) {\n !ngDevMode && throwError('Must never be called in production mode');\n const hostComponentDef = getDeclarationComponentDef(lView);\n const componentClassName = hostComponentDef?.type?.name;\n return componentClassName ? ` (used in the '${componentClassName}' component template)` : '';\n}\n/**\n * The set of known control flow directives and their corresponding imports.\n * We use this set to produce a more precises error message with a note\n * that the `CommonModule` should also be included.\n */\nconst KNOWN_CONTROL_FLOW_DIRECTIVES = new Map([\n ['ngIf', 'NgIf'], ['ngFor', 'NgFor'], ['ngSwitchCase', 'NgSwitchCase'],\n ['ngSwitchDefault', 'NgSwitchDefault']\n]);\n/**\n * Returns true if the tag name is allowed by specified schemas.\n * @param schemas Array of schemas\n * @param tagName Name of the tag\n */\nfunction matchingSchemas(schemas, tagName) {\n if (schemas !== null) {\n for (let i = 0; i < schemas.length; i++) {\n const schema = schemas[i];\n if (schema === NO_ERRORS_SCHEMA ||\n schema === CUSTOM_ELEMENTS_SCHEMA && tagName && tagName.indexOf('-') > -1) {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Flags for renderer-specific style modifiers.\n * @publicApi\n */\nvar RendererStyleFlags2;\n(function (RendererStyleFlags2) {\n // TODO(misko): This needs to be refactored into a separate file so that it can be imported from\n // `node_manipulation.ts` Currently doing the import cause resolution order to change and fails\n // the tests. The work around is to have hard coded value in `node_manipulation.ts` for now.\n /**\n * Marks a style as important.\n */\n RendererStyleFlags2[RendererStyleFlags2[\"Important\"] = 1] = \"Important\";\n /**\n * Marks a style as using dash case naming (this-is-dash-case).\n */\n RendererStyleFlags2[RendererStyleFlags2[\"DashCase\"] = 2] = \"DashCase\";\n})(RendererStyleFlags2 || (RendererStyleFlags2 = {}));\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Disallowed strings in the comment.\n *\n * see: https://html.spec.whatwg.org/multipage/syntax.html#comments\n */\nconst COMMENT_DISALLOWED = /^>|^->|<!--|-->|--!>|<!-$/g;\n/**\n * Delimiter in the disallowed strings which needs to be wrapped with zero with character.\n */\nconst COMMENT_DELIMITER = /(<|>)/;\nconst COMMENT_DELIMITER_ESCAPED = '\\u200B$1\\u200B';\n/**\n * Escape the content of comment strings so that it can be safely inserted into a comment node.\n *\n * The issue is that HTML does not specify any way to escape comment end text inside the comment.\n * Consider: `<!-- The way you close a comment is with \">\", and \"->\" at the beginning or by \"-->\" or\n * \"--!>\" at the end. -->`. Above the `\"-->\"` is meant to be text not an end to the comment. This\n * can be created programmatically through DOM APIs. (`<!--` are also disallowed.)\n *\n * see: https://html.spec.whatwg.org/multipage/syntax.html#comments\n *\n * ```\n * div.innerHTML = div.innerHTML\n * ```\n *\n * One would expect that the above code would be safe to do, but it turns out that because comment\n * text is not escaped, the comment may contain text which will prematurely close the comment\n * opening up the application for XSS attack. (In SSR we programmatically create comment nodes which\n * may contain such text and expect them to be safe.)\n *\n * This function escapes the comment text by looking for comment delimiters (`<` and `>`) and\n * surrounding them with `_>_` where the `_` is a zero width space `\\u200B`. The result is that if a\n * comment contains any of the comment start/end delimiters (such as `<!--`, `-->` or `--!>`) the\n * text it will render normally but it will not cause the HTML parser to close/open the comment.\n *\n * @param value text to make safe for comment node by escaping the comment open/close character\n * sequence.\n */\nfunction escapeCommentText(value) {\n return value.replace(COMMENT_DISALLOWED, (text) => text.replace(COMMENT_DELIMITER, COMMENT_DELIMITER_ESCAPED));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Keeps track of the currently-active LViews.\nconst TRACKED_LVIEWS = new Map();\n// Used for generating unique IDs for LViews.\nlet uniqueIdCounter = 0;\n/** Gets a unique ID that can be assigned to an LView. */\nfunction getUniqueLViewId() {\n return uniqueIdCounter++;\n}\n/** Starts tracking an LView. */\nfunction registerLView(lView) {\n ngDevMode && assertNumber(lView[ID], 'LView must have an ID in order to be registered');\n TRACKED_LVIEWS.set(lView[ID], lView);\n}\n/** Gets an LView by its unique ID. */\nfunction getLViewById(id) {\n ngDevMode && assertNumber(id, 'ID used for LView lookup must be a number');\n return TRACKED_LVIEWS.get(id) || null;\n}\n/** Stops tracking an LView. */\nfunction unregisterLView(lView) {\n ngDevMode && assertNumber(lView[ID], 'Cannot stop tracking an LView that does not have an ID');\n TRACKED_LVIEWS.delete(lView[ID]);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The internal view context which is specific to a given DOM element, directive or\n * component instance. Each value in here (besides the LView and element node details)\n * can be present, null or undefined. If undefined then it implies the value has not been\n * looked up yet, otherwise, if null, then a lookup was executed and nothing was found.\n *\n * Each value will get filled when the respective value is examined within the getContext\n * function. The component, element and each directive instance will share the same instance\n * of the context.\n */\nclass LContext {\n constructor(\n /**\n * ID of the component's parent view data.\n */\n lViewId, \n /**\n * The index instance of the node.\n */\n nodeIndex, \n /**\n * The instance of the DOM node that is attached to the lNode.\n */\n native) {\n this.lViewId = lViewId;\n this.nodeIndex = nodeIndex;\n this.native = native;\n }\n /** Component's parent view data. */\n get lView() {\n return getLViewById(this.lViewId);\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Returns the matching `LContext` data for a given DOM node, directive or component instance.\n *\n * This function will examine the provided DOM element, component, or directive instance\\'s\n * monkey-patched property to derive the `LContext` data. Once called then the monkey-patched\n * value will be that of the newly created `LContext`.\n *\n * If the monkey-patched value is the `LView` instance then the context value for that\n * target will be created and the monkey-patch reference will be updated. Therefore when this\n * function is called it may mutate the provided element\\'s, component\\'s or any of the associated\n * directive\\'s monkey-patch values.\n *\n * If the monkey-patch value is not detected then the code will walk up the DOM until an element\n * is found which contains a monkey-patch reference. When that occurs then the provided element\n * will be updated with a new context (which is then returned). If the monkey-patch value is not\n * detected for a component/directive instance then it will throw an error (all components and\n * directives should be automatically monkey-patched by ivy).\n *\n * @param target Component, Directive or DOM Node.\n */\nfunction getLContext(target) {\n let mpValue = readPatchedData(target);\n if (mpValue) {\n // only when it's an array is it considered an LView instance\n // ... otherwise it's an already constructed LContext instance\n if (isLView(mpValue)) {\n const lView = mpValue;\n let nodeIndex;\n let component = undefined;\n let directives = undefined;\n if (isComponentInstance(target)) {\n nodeIndex = findViaComponent(lView, target);\n if (nodeIndex == -1) {\n throw new Error('The provided component was not found in the application');\n }\n component = target;\n }\n else if (isDirectiveInstance(target)) {\n nodeIndex = findViaDirective(lView, target);\n if (nodeIndex == -1) {\n throw new Error('The provided directive was not found in the application');\n }\n directives = getDirectivesAtNodeIndex(nodeIndex, lView);\n }\n else {\n nodeIndex = findViaNativeElement(lView, target);\n if (nodeIndex == -1) {\n return null;\n }\n }\n // the goal is not to fill the entire context full of data because the lookups\n // are expensive. Instead, only the target data (the element, component, container, ICU\n // expression or directive details) are filled into the context. If called multiple times\n // with different target values then the missing target data will be filled in.\n const native = unwrapRNode(lView[nodeIndex]);\n const existingCtx = readPatchedData(native);\n const context = (existingCtx && !Array.isArray(existingCtx)) ?\n existingCtx :\n createLContext(lView, nodeIndex, native);\n // only when the component has been discovered then update the monkey-patch\n if (component && context.component === undefined) {\n context.component = component;\n attachPatchData(context.component, context);\n }\n // only when the directives have been discovered then update the monkey-patch\n if (directives && context.directives === undefined) {\n context.directives = directives;\n for (let i = 0; i < directives.length; i++) {\n attachPatchData(directives[i], context);\n }\n }\n attachPatchData(context.native, context);\n mpValue = context;\n }\n }\n else {\n const rElement = target;\n ngDevMode && assertDomNode(rElement);\n // if the context is not found then we need to traverse upwards up the DOM\n // to find the nearest element that has already been monkey patched with data\n let parent = rElement;\n while (parent = parent.parentNode) {\n const parentContext = readPatchedData(parent);\n if (parentContext) {\n const lView = Array.isArray(parentContext) ? parentContext : parentContext.lView;\n // the edge of the app was also reached here through another means\n // (maybe because the DOM was changed manually).\n if (!lView) {\n return null;\n }\n const index = findViaNativeElement(lView, rElement);\n if (index >= 0) {\n const native = unwrapRNode(lView[index]);\n const context = createLContext(lView, index, native);\n attachPatchData(native, context);\n mpValue = context;\n break;\n }\n }\n }\n }\n return mpValue || null;\n}\n/**\n * Creates an empty instance of a `LContext` context\n */\nfunction createLContext(lView, nodeIndex, native) {\n return new LContext(lView[ID], nodeIndex, native);\n}\n/**\n * Takes a component instance and returns the view for that component.\n *\n * @param componentInstance\n * @returns The component's view\n */\nfunction getComponentViewByInstance(componentInstance) {\n let patchedData = readPatchedData(componentInstance);\n let lView;\n if (isLView(patchedData)) {\n const contextLView = patchedData;\n const nodeIndex = findViaComponent(contextLView, componentInstance);\n lView = getComponentLViewByIndex(nodeIndex, contextLView);\n const context = createLContext(contextLView, nodeIndex, lView[HOST]);\n context.component = componentInstance;\n attachPatchData(componentInstance, context);\n attachPatchData(context.native, context);\n }\n else {\n const context = patchedData;\n const contextLView = context.lView;\n ngDevMode && assertLView(contextLView);\n lView = getComponentLViewByIndex(context.nodeIndex, contextLView);\n }\n return lView;\n}\n/**\n * This property will be monkey-patched on elements, components and directives.\n */\nconst MONKEY_PATCH_KEY_NAME = '__ngContext__';\n/**\n * Assigns the given data to the given target (which could be a component,\n * directive or DOM node instance) using monkey-patching.\n */\nfunction attachPatchData(target, data) {\n ngDevMode && assertDefined(target, 'Target expected');\n // Only attach the ID of the view in order to avoid memory leaks (see #41047). We only do this\n // for `LView`, because we have control over when an `LView` is created and destroyed, whereas\n // we can't know when to remove an `LContext`.\n if (isLView(data)) {\n target[MONKEY_PATCH_KEY_NAME] = data[ID];\n registerLView(data);\n }\n else {\n target[MONKEY_PATCH_KEY_NAME] = data;\n }\n}\n/**\n * Returns the monkey-patch value data present on the target (which could be\n * a component, directive or a DOM node).\n */\nfunction readPatchedData(target) {\n ngDevMode && assertDefined(target, 'Target expected');\n const data = target[MONKEY_PATCH_KEY_NAME];\n return (typeof data === 'number') ? getLViewById(data) : data || null;\n}\nfunction readPatchedLView(target) {\n const value = readPatchedData(target);\n if (value) {\n return (isLView(value) ? value : value.lView);\n }\n return null;\n}\nfunction isComponentInstance(instance) {\n return instance && instance.constructor && instance.constructor.ɵcmp;\n}\nfunction isDirectiveInstance(instance) {\n return instance && instance.constructor && instance.constructor.ɵdir;\n}\n/**\n * Locates the element within the given LView and returns the matching index\n */\nfunction findViaNativeElement(lView, target) {\n const tView = lView[TVIEW];\n for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {\n if (unwrapRNode(lView[i]) === target) {\n return i;\n }\n }\n return -1;\n}\n/**\n * Locates the next tNode (child, sibling or parent).\n */\nfunction traverseNextElement(tNode) {\n if (tNode.child) {\n return tNode.child;\n }\n else if (tNode.next) {\n return tNode.next;\n }\n else {\n // Let's take the following template: <div><span>text</span></div><component/>\n // After checking the text node, we need to find the next parent that has a \"next\" TNode,\n // in this case the parent `div`, so that we can find the component.\n while (tNode.parent && !tNode.parent.next) {\n tNode = tNode.parent;\n }\n return tNode.parent && tNode.parent.next;\n }\n}\n/**\n * Locates the component within the given LView and returns the matching index\n */\nfunction findViaComponent(lView, componentInstance) {\n const componentIndices = lView[TVIEW].components;\n if (componentIndices) {\n for (let i = 0; i < componentIndices.length; i++) {\n const elementComponentIndex = componentIndices[i];\n const componentView = getComponentLViewByIndex(elementComponentIndex, lView);\n if (componentView[CONTEXT] === componentInstance) {\n return elementComponentIndex;\n }\n }\n }\n else {\n const rootComponentView = getComponentLViewByIndex(HEADER_OFFSET, lView);\n const rootComponent = rootComponentView[CONTEXT];\n if (rootComponent === componentInstance) {\n // we are dealing with the root element here therefore we know that the\n // element is the very first element after the HEADER data in the lView\n return HEADER_OFFSET;\n }\n }\n return -1;\n}\n/**\n * Locates the directive within the given LView and returns the matching index\n */\nfunction findViaDirective(lView, directiveInstance) {\n // if a directive is monkey patched then it will (by default)\n // have a reference to the LView of the current view. The\n // element bound to the directive being search lives somewhere\n // in the view data. We loop through the nodes and check their\n // list of directives for the instance.\n let tNode = lView[TVIEW].firstChild;\n while (tNode) {\n const directiveIndexStart = tNode.directiveStart;\n const directiveIndexEnd = tNode.directiveEnd;\n for (let i = directiveIndexStart; i < directiveIndexEnd; i++) {\n if (lView[i] === directiveInstance) {\n return tNode.index;\n }\n }\n tNode = traverseNextElement(tNode);\n }\n return -1;\n}\n/**\n * Returns a list of directives applied to a node at a specific index. The list includes\n * directives matched by selector and any host directives, but it excludes components.\n * Use `getComponentAtNodeIndex` to find the component applied to a node.\n *\n * @param nodeIndex The node index\n * @param lView The target view data\n */\nfunction getDirectivesAtNodeIndex(nodeIndex, lView) {\n const tNode = lView[TVIEW].data[nodeIndex];\n if (tNode.directiveStart === 0)\n return EMPTY_ARRAY;\n const results = [];\n for (let i = tNode.directiveStart; i < tNode.directiveEnd; i++) {\n const directiveInstance = lView[i];\n if (!isComponentInstance(directiveInstance)) {\n results.push(directiveInstance);\n }\n }\n return results;\n}\nfunction getComponentAtNodeIndex(nodeIndex, lView) {\n const tNode = lView[TVIEW].data[nodeIndex];\n const { directiveStart, componentOffset } = tNode;\n return componentOffset > -1 ? lView[directiveStart + componentOffset] : null;\n}\n/**\n * Returns a map of local references (local reference name => element or directive instance) that\n * exist on a given element.\n */\nfunction discoverLocalRefs(lView, nodeIndex) {\n const tNode = lView[TVIEW].data[nodeIndex];\n if (tNode && tNode.localNames) {\n const result = {};\n let localIndex = tNode.index + 1;\n for (let i = 0; i < tNode.localNames.length; i += 2) {\n result[tNode.localNames[i]] = lView[localIndex];\n localIndex++;\n }\n return result;\n }\n return null;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nlet _icuContainerIterate;\n/**\n * Iterator which provides ability to visit all of the `TIcuContainerNode` root `RNode`s.\n */\nfunction icuContainerIterate(tIcuContainerNode, lView) {\n return _icuContainerIterate(tIcuContainerNode, lView);\n}\n/**\n * Ensures that `IcuContainerVisitor`'s implementation is present.\n *\n * This function is invoked when i18n instruction comes across an ICU. The purpose is to allow the\n * bundler to tree shake ICU logic and only load it if ICU instruction is executed.\n */\nfunction ensureIcuContainerVisitorLoaded(loader) {\n if (_icuContainerIterate === undefined) {\n // Do not inline this function. We want to keep `ensureIcuContainerVisitorLoaded` light, so it\n // can be inlined into call-site.\n _icuContainerIterate = loader();\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Gets the parent LView of the passed LView, if the PARENT is an LContainer, will get the parent of\n * that LContainer, which is an LView\n * @param lView the lView whose parent to get\n */\nfunction getLViewParent(lView) {\n ngDevMode && assertLView(lView);\n const parent = lView[PARENT];\n return isLContainer(parent) ? parent[PARENT] : parent;\n}\n/**\n * Retrieve the root view from any component or `LView` by walking the parent `LView` until\n * reaching the root `LView`.\n *\n * @param componentOrLView any component or `LView`\n */\nfunction getRootView(componentOrLView) {\n ngDevMode && assertDefined(componentOrLView, 'component');\n let lView = isLView(componentOrLView) ? componentOrLView : readPatchedLView(componentOrLView);\n while (lView && !(lView[FLAGS] & 256 /* LViewFlags.IsRoot */)) {\n lView = getLViewParent(lView);\n }\n ngDevMode && assertLView(lView);\n return lView;\n}\n/**\n * Returns the context information associated with the application where the target is situated. It\n * does this by walking the parent views until it gets to the root view, then getting the context\n * off of that.\n *\n * @param viewOrComponent the `LView` or component to get the root context for.\n */\nfunction getRootContext(viewOrComponent) {\n const rootView = getRootView(viewOrComponent);\n ngDevMode &&\n assertDefined(rootView[CONTEXT], 'Root view has no context. Perhaps it is disconnected?');\n return rootView[CONTEXT];\n}\n/**\n * Gets the first `LContainer` in the LView or `null` if none exists.\n */\nfunction getFirstLContainer(lView) {\n return getNearestLContainer(lView[CHILD_HEAD]);\n}\n/**\n * Gets the next `LContainer` that is a sibling of the given container.\n */\nfunction getNextLContainer(container) {\n return getNearestLContainer(container[NEXT]);\n}\nfunction getNearestLContainer(viewOrContainer) {\n while (viewOrContainer !== null && !isLContainer(viewOrContainer)) {\n viewOrContainer = viewOrContainer[NEXT];\n }\n return viewOrContainer;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * NOTE: for performance reasons, the possible actions are inlined within the function instead of\n * being passed as an argument.\n */\nfunction applyToElementOrContainer(action, renderer, parent, lNodeToHandle, beforeNode) {\n // If this slot was allocated for a text node dynamically created by i18n, the text node itself\n // won't be created until i18nApply() in the update block, so this node should be skipped.\n // For more info, see \"ICU expressions should work inside an ngTemplateOutlet inside an ngFor\"\n // in `i18n_spec.ts`.\n if (lNodeToHandle != null) {\n let lContainer;\n let isComponent = false;\n // We are expecting an RNode, but in the case of a component or LContainer the `RNode` is\n // wrapped in an array which needs to be unwrapped. We need to know if it is a component and if\n // it has LContainer so that we can process all of those cases appropriately.\n if (isLContainer(lNodeToHandle)) {\n lContainer = lNodeToHandle;\n }\n else if (isLView(lNodeToHandle)) {\n isComponent = true;\n ngDevMode && assertDefined(lNodeToHandle[HOST], 'HOST must be defined for a component LView');\n lNodeToHandle = lNodeToHandle[HOST];\n }\n const rNode = unwrapRNode(lNodeToHandle);\n if (action === 0 /* WalkTNodeTreeAction.Create */ && parent !== null) {\n if (beforeNode == null) {\n nativeAppendChild(renderer, parent, rNode);\n }\n else {\n nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true);\n }\n }\n else if (action === 1 /* WalkTNodeTreeAction.Insert */ && parent !== null) {\n nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true);\n }\n else if (action === 2 /* WalkTNodeTreeAction.Detach */) {\n nativeRemoveNode(renderer, rNode, isComponent);\n }\n else if (action === 3 /* WalkTNodeTreeAction.Destroy */) {\n ngDevMode && ngDevMode.rendererDestroyNode++;\n renderer.destroyNode(rNode);\n }\n if (lContainer != null) {\n applyContainer(renderer, action, lContainer, parent, beforeNode);\n }\n }\n}\nfunction createTextNode(renderer, value) {\n ngDevMode && ngDevMode.rendererCreateTextNode++;\n ngDevMode && ngDevMode.rendererSetText++;\n return renderer.createText(value);\n}\nfunction updateTextNode(renderer, rNode, value) {\n ngDevMode && ngDevMode.rendererSetText++;\n renderer.setValue(rNode, value);\n}\nfunction createCommentNode(renderer, value) {\n ngDevMode && ngDevMode.rendererCreateComment++;\n return renderer.createComment(escapeCommentText(value));\n}\n/**\n * Creates a native element from a tag name, using a renderer.\n * @param renderer A renderer to use\n * @param name the tag name\n * @param namespace Optional namespace for element.\n * @returns the element created\n */\nfunction createElementNode(renderer, name, namespace) {\n ngDevMode && ngDevMode.rendererCreateElement++;\n return renderer.createElement(name, namespace);\n}\n/**\n * Removes all DOM elements associated with a view.\n *\n * Because some root nodes of the view may be containers, we sometimes need\n * to propagate deeply into the nested containers to remove all elements in the\n * views beneath it.\n *\n * @param tView The `TView' of the `LView` from which elements should be added or removed\n * @param lView The view from which elements should be added or removed\n */\nfunction removeViewFromContainer(tView, lView) {\n const renderer = lView[RENDERER];\n applyView(tView, lView, renderer, 2 /* WalkTNodeTreeAction.Detach */, null, null);\n lView[HOST] = null;\n lView[T_HOST] = null;\n}\n/**\n * Adds all DOM elements associated with a view.\n *\n * Because some root nodes of the view may be containers, we sometimes need\n * to propagate deeply into the nested containers to add all elements in the\n * views beneath it.\n *\n * @param tView The `TView' of the `LView` from which elements should be added or removed\n * @param parentTNode The `TNode` where the `LView` should be attached to.\n * @param renderer Current renderer to use for DOM manipulations.\n * @param lView The view from which elements should be added or removed\n * @param parentNativeNode The parent `RElement` where it should be inserted into.\n * @param beforeNode The node before which elements should be added, if insert mode\n */\nfunction addViewToContainer(tView, parentTNode, renderer, lView, parentNativeNode, beforeNode) {\n lView[HOST] = parentNativeNode;\n lView[T_HOST] = parentTNode;\n applyView(tView, lView, renderer, 1 /* WalkTNodeTreeAction.Insert */, parentNativeNode, beforeNode);\n}\n/**\n * Detach a `LView` from the DOM by detaching its nodes.\n *\n * @param tView The `TView' of the `LView` to be detached\n * @param lView the `LView` to be detached.\n */\nfunction renderDetachView(tView, lView) {\n applyView(tView, lView, lView[RENDERER], 2 /* WalkTNodeTreeAction.Detach */, null, null);\n}\n/**\n * Traverses down and up the tree of views and containers to remove listeners and\n * call onDestroy callbacks.\n *\n * Notes:\n * - Because it's used for onDestroy calls, it needs to be bottom-up.\n * - Must process containers instead of their views to avoid splicing\n * when views are destroyed and re-added.\n * - Using a while loop because it's faster than recursion\n * - Destroy only called on movement to sibling or movement to parent (laterally or up)\n *\n * @param rootView The view to destroy\n */\nfunction destroyViewTree(rootView) {\n // If the view has no children, we can clean it up and return early.\n let lViewOrLContainer = rootView[CHILD_HEAD];\n if (!lViewOrLContainer) {\n return cleanUpView(rootView[TVIEW], rootView);\n }\n while (lViewOrLContainer) {\n let next = null;\n if (isLView(lViewOrLContainer)) {\n // If LView, traverse down to child.\n next = lViewOrLContainer[CHILD_HEAD];\n }\n else {\n ngDevMode && assertLContainer(lViewOrLContainer);\n // If container, traverse down to its first LView.\n const firstView = lViewOrLContainer[CONTAINER_HEADER_OFFSET];\n if (firstView)\n next = firstView;\n }\n if (!next) {\n // Only clean up view when moving to the side or up, as destroy hooks\n // should be called in order from the bottom up.\n while (lViewOrLContainer && !lViewOrLContainer[NEXT] && lViewOrLContainer !== rootView) {\n if (isLView(lViewOrLContainer)) {\n cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer);\n }\n lViewOrLContainer = lViewOrLContainer[PARENT];\n }\n if (lViewOrLContainer === null)\n lViewOrLContainer = rootView;\n if (isLView(lViewOrLContainer)) {\n cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer);\n }\n next = lViewOrLContainer && lViewOrLContainer[NEXT];\n }\n lViewOrLContainer = next;\n }\n}\n/**\n * Inserts a view into a container.\n *\n * This adds the view to the container's array of active views in the correct\n * position. It also adds the view's elements to the DOM if the container isn't a\n * root node of another view (in that case, the view's elements will be added when\n * the container's parent view is added later).\n *\n * @param tView The `TView' of the `LView` to insert\n * @param lView The view to insert\n * @param lContainer The container into which the view should be inserted\n * @param index Which index in the container to insert the child view into\n */\nfunction insertView(tView, lView, lContainer, index) {\n ngDevMode && assertLView(lView);\n ngDevMode && assertLContainer(lContainer);\n const indexInContainer = CONTAINER_HEADER_OFFSET + index;\n const containerLength = lContainer.length;\n if (index > 0) {\n // This is a new view, we need to add it to the children.\n lContainer[indexInContainer - 1][NEXT] = lView;\n }\n if (index < containerLength - CONTAINER_HEADER_OFFSET) {\n lView[NEXT] = lContainer[indexInContainer];\n addToArray(lContainer, CONTAINER_HEADER_OFFSET + index, lView);\n }\n else {\n lContainer.push(lView);\n lView[NEXT] = null;\n }\n lView[PARENT] = lContainer;\n // track views where declaration and insertion points are different\n const declarationLContainer = lView[DECLARATION_LCONTAINER];\n if (declarationLContainer !== null && lContainer !== declarationLContainer) {\n trackMovedView(declarationLContainer, lView);\n }\n // notify query that a new view has been added\n const lQueries = lView[QUERIES];\n if (lQueries !== null) {\n lQueries.insertView(tView);\n }\n // Sets the attached flag\n lView[FLAGS] |= 64 /* LViewFlags.Attached */;\n}\n/**\n * Track views created from the declaration container (TemplateRef) and inserted into a\n * different LContainer.\n */\nfunction trackMovedView(declarationContainer, lView) {\n ngDevMode && assertDefined(lView, 'LView required');\n ngDevMode && assertLContainer(declarationContainer);\n const movedViews = declarationContainer[MOVED_VIEWS];\n const insertedLContainer = lView[PARENT];\n ngDevMode && assertLContainer(insertedLContainer);\n const insertedComponentLView = insertedLContainer[PARENT][DECLARATION_COMPONENT_VIEW];\n ngDevMode && assertDefined(insertedComponentLView, 'Missing insertedComponentLView');\n const declaredComponentLView = lView[DECLARATION_COMPONENT_VIEW];\n ngDevMode && assertDefined(declaredComponentLView, 'Missing declaredComponentLView');\n if (declaredComponentLView !== insertedComponentLView) {\n // At this point the declaration-component is not same as insertion-component; this means that\n // this is a transplanted view. Mark the declared lView as having transplanted views so that\n // those views can participate in CD.\n declarationContainer[HAS_TRANSPLANTED_VIEWS] = true;\n }\n if (movedViews === null) {\n declarationContainer[MOVED_VIEWS] = [lView];\n }\n else {\n movedViews.push(lView);\n }\n}\nfunction detachMovedView(declarationContainer, lView) {\n ngDevMode && assertLContainer(declarationContainer);\n ngDevMode &&\n assertDefined(declarationContainer[MOVED_VIEWS], 'A projected view should belong to a non-empty projected views collection');\n const movedViews = declarationContainer[MOVED_VIEWS];\n const declarationViewIndex = movedViews.indexOf(lView);\n const insertionLContainer = lView[PARENT];\n ngDevMode && assertLContainer(insertionLContainer);\n // If the view was marked for refresh but then detached before it was checked (where the flag\n // would be cleared and the counter decremented), we need to decrement the view counter here\n // instead.\n if (lView[FLAGS] & 512 /* LViewFlags.RefreshTransplantedView */) {\n lView[FLAGS] &= ~512 /* LViewFlags.RefreshTransplantedView */;\n updateTransplantedViewCount(insertionLContainer, -1);\n }\n movedViews.splice(declarationViewIndex, 1);\n}\n/**\n * Detaches a view from a container.\n *\n * This method removes the view from the container's array of active views. It also\n * removes the view's elements from the DOM.\n *\n * @param lContainer The container from which to detach a view\n * @param removeIndex The index of the view to detach\n * @returns Detached LView instance.\n */\nfunction detachView(lContainer, removeIndex) {\n if (lContainer.length <= CONTAINER_HEADER_OFFSET)\n return;\n const indexInContainer = CONTAINER_HEADER_OFFSET + removeIndex;\n const viewToDetach = lContainer[indexInContainer];\n if (viewToDetach) {\n const declarationLContainer = viewToDetach[DECLARATION_LCONTAINER];\n if (declarationLContainer !== null && declarationLContainer !== lContainer) {\n detachMovedView(declarationLContainer, viewToDetach);\n }\n if (removeIndex > 0) {\n lContainer[indexInContainer - 1][NEXT] = viewToDetach[NEXT];\n }\n const removedLView = removeFromArray(lContainer, CONTAINER_HEADER_OFFSET + removeIndex);\n removeViewFromContainer(viewToDetach[TVIEW], viewToDetach);\n // notify query that a view has been removed\n const lQueries = removedLView[QUERIES];\n if (lQueries !== null) {\n lQueries.detachView(removedLView[TVIEW]);\n }\n viewToDetach[PARENT] = null;\n viewToDetach[NEXT] = null;\n // Unsets the attached flag\n viewToDetach[FLAGS] &= ~64 /* LViewFlags.Attached */;\n }\n return viewToDetach;\n}\n/**\n * A standalone function which destroys an LView,\n * conducting clean up (e.g. removing listeners, calling onDestroys).\n *\n * @param tView The `TView' of the `LView` to be destroyed\n * @param lView The view to be destroyed.\n */\nfunction destroyLView(tView, lView) {\n if (!(lView[FLAGS] & 128 /* LViewFlags.Destroyed */)) {\n const renderer = lView[RENDERER];\n if (renderer.destroyNode) {\n applyView(tView, lView, renderer, 3 /* WalkTNodeTreeAction.Destroy */, null, null);\n }\n destroyViewTree(lView);\n }\n}\n/**\n * Calls onDestroys hooks for all directives and pipes in a given view and then removes all\n * listeners. Listeners are removed as the last step so events delivered in the onDestroys hooks\n * can be propagated to @Output listeners.\n *\n * @param tView `TView` for the `LView` to clean up.\n * @param lView The LView to clean up\n */\nfunction cleanUpView(tView, lView) {\n if (!(lView[FLAGS] & 128 /* LViewFlags.Destroyed */)) {\n // Usually the Attached flag is removed when the view is detached from its parent, however\n // if it's a root view, the flag won't be unset hence why we're also removing on destroy.\n lView[FLAGS] &= ~64 /* LViewFlags.Attached */;\n // Mark the LView as destroyed *before* executing the onDestroy hooks. An onDestroy hook\n // runs arbitrary user code, which could include its own `viewRef.destroy()` (or similar). If\n // We don't flag the view as destroyed before the hooks, this could lead to an infinite loop.\n // This also aligns with the ViewEngine behavior. It also means that the onDestroy hook is\n // really more of an \"afterDestroy\" hook if you think about it.\n lView[FLAGS] |= 128 /* LViewFlags.Destroyed */;\n executeOnDestroys(tView, lView);\n processCleanups(tView, lView);\n // For component views only, the local renderer is destroyed at clean up time.\n if (lView[TVIEW].type === 1 /* TViewType.Component */) {\n ngDevMode && ngDevMode.rendererDestroy++;\n lView[RENDERER].destroy();\n }\n const declarationContainer = lView[DECLARATION_LCONTAINER];\n // we are dealing with an embedded view that is still inserted into a container\n if (declarationContainer !== null && isLContainer(lView[PARENT])) {\n // and this is a projected view\n if (declarationContainer !== lView[PARENT]) {\n detachMovedView(declarationContainer, lView);\n }\n // For embedded views still attached to a container: remove query result from this view.\n const lQueries = lView[QUERIES];\n if (lQueries !== null) {\n lQueries.detachView(tView);\n }\n }\n // Unregister the view once everything else has been cleaned up.\n unregisterLView(lView);\n }\n}\n/** Removes listeners and unsubscribes from output subscriptions */\nfunction processCleanups(tView, lView) {\n const tCleanup = tView.cleanup;\n const lCleanup = lView[CLEANUP];\n // `LCleanup` contains both share information with `TCleanup` as well as instance specific\n // information appended at the end. We need to know where the end of the `TCleanup` information\n // is, and we track this with `lastLCleanupIndex`.\n let lastLCleanupIndex = -1;\n if (tCleanup !== null) {\n for (let i = 0; i < tCleanup.length - 1; i += 2) {\n if (typeof tCleanup[i] === 'string') {\n // This is a native DOM listener. It will occupy 4 entries in the TCleanup array (hence i +=\n // 2 at the end of this block).\n const targetIdx = tCleanup[i + 3];\n ngDevMode && assertNumber(targetIdx, 'cleanup target must be a number');\n if (targetIdx >= 0) {\n // unregister\n lCleanup[lastLCleanupIndex = targetIdx]();\n }\n else {\n // Subscription\n lCleanup[lastLCleanupIndex = -targetIdx].unsubscribe();\n }\n i += 2;\n }\n else {\n // This is a cleanup function that is grouped with the index of its context\n const context = lCleanup[lastLCleanupIndex = tCleanup[i + 1]];\n tCleanup[i].call(context);\n }\n }\n }\n if (lCleanup !== null) {\n for (let i = lastLCleanupIndex + 1; i < lCleanup.length; i++) {\n const instanceCleanupFn = lCleanup[i];\n ngDevMode && assertFunction(instanceCleanupFn, 'Expecting instance cleanup function.');\n instanceCleanupFn();\n }\n lView[CLEANUP] = null;\n }\n}\n/** Calls onDestroy hooks for this view */\nfunction executeOnDestroys(tView, lView) {\n let destroyHooks;\n if (tView != null && (destroyHooks = tView.destroyHooks) != null) {\n for (let i = 0; i < destroyHooks.length; i += 2) {\n const context = lView[destroyHooks[i]];\n // Only call the destroy hook if the context has been requested.\n if (!(context instanceof NodeInjectorFactory)) {\n const toCall = destroyHooks[i + 1];\n if (Array.isArray(toCall)) {\n for (let j = 0; j < toCall.length; j += 2) {\n const callContext = context[toCall[j]];\n const hook = toCall[j + 1];\n profiler(4 /* ProfilerEvent.LifecycleHookStart */, callContext, hook);\n try {\n hook.call(callContext);\n }\n finally {\n profiler(5 /* ProfilerEvent.LifecycleHookEnd */, callContext, hook);\n }\n }\n }\n else {\n profiler(4 /* ProfilerEvent.LifecycleHookStart */, context, toCall);\n try {\n toCall.call(context);\n }\n finally {\n profiler(5 /* ProfilerEvent.LifecycleHookEnd */, context, toCall);\n }\n }\n }\n }\n }\n}\n/**\n * Returns a native element if a node can be inserted into the given parent.\n *\n * There are two reasons why we may not be able to insert a element immediately.\n * - Projection: When creating a child content element of a component, we have to skip the\n * insertion because the content of a component will be projected.\n * `<component><content>delayed due to projection</content></component>`\n * - Parent container is disconnected: This can happen when we are inserting a view into\n * parent container, which itself is disconnected. For example the parent container is part\n * of a View which has not be inserted or is made for projection but has not been inserted\n * into destination.\n *\n * @param tView: Current `TView`.\n * @param tNode: `TNode` for which we wish to retrieve render parent.\n * @param lView: Current `LView`.\n */\nfunction getParentRElement(tView, tNode, lView) {\n return getClosestRElement(tView, tNode.parent, lView);\n}\n/**\n * Get closest `RElement` or `null` if it can't be found.\n *\n * If `TNode` is `TNodeType.Element` => return `RElement` at `LView[tNode.index]` location.\n * If `TNode` is `TNodeType.ElementContainer|IcuContain` => return the parent (recursively).\n * If `TNode` is `null` then return host `RElement`:\n * - return `null` if projection\n * - return `null` if parent container is disconnected (we have no parent.)\n *\n * @param tView: Current `TView`.\n * @param tNode: `TNode` for which we wish to retrieve `RElement` (or `null` if host element is\n * needed).\n * @param lView: Current `LView`.\n * @returns `null` if the `RElement` can't be determined at this time (no parent / projection)\n */\nfunction getClosestRElement(tView, tNode, lView) {\n let parentTNode = tNode;\n // Skip over element and ICU containers as those are represented by a comment node and\n // can't be used as a render parent.\n while (parentTNode !== null &&\n (parentTNode.type & (8 /* TNodeType.ElementContainer */ | 32 /* TNodeType.Icu */))) {\n tNode = parentTNode;\n parentTNode = tNode.parent;\n }\n // If the parent tNode is null, then we are inserting across views: either into an embedded view\n // or a component view.\n if (parentTNode === null) {\n // We are inserting a root element of the component view into the component host element and\n // it should always be eager.\n return lView[HOST];\n }\n else {\n ngDevMode && assertTNodeType(parentTNode, 3 /* TNodeType.AnyRNode */ | 4 /* TNodeType.Container */);\n const { componentOffset } = parentTNode;\n if (componentOffset > -1) {\n ngDevMode && assertTNodeForLView(parentTNode, lView);\n const { encapsulation } = tView.data[parentTNode.directiveStart + componentOffset];\n // We've got a parent which is an element in the current view. We just need to verify if the\n // parent element is not a component. Component's content nodes are not inserted immediately\n // because they will be projected, and so doing insert at this point would be wasteful.\n // Since the projection would then move it to its final destination. Note that we can't\n // make this assumption when using the Shadow DOM, because the native projection placeholders\n // (<content> or <slot>) have to be in place as elements are being inserted.\n if (encapsulation === ViewEncapsulation$1.None ||\n encapsulation === ViewEncapsulation$1.Emulated) {\n return null;\n }\n }\n return getNativeByTNode(parentTNode, lView);\n }\n}\n/**\n * Inserts a native node before another native node for a given parent.\n * This is a utility function that can be used when native nodes were determined.\n */\nfunction nativeInsertBefore(renderer, parent, child, beforeNode, isMove) {\n ngDevMode && ngDevMode.rendererInsertBefore++;\n renderer.insertBefore(parent, child, beforeNode, isMove);\n}\nfunction nativeAppendChild(renderer, parent, child) {\n ngDevMode && ngDevMode.rendererAppendChild++;\n ngDevMode && assertDefined(parent, 'parent node must be defined');\n renderer.appendChild(parent, child);\n}\nfunction nativeAppendOrInsertBefore(renderer, parent, child, beforeNode, isMove) {\n if (beforeNode !== null) {\n nativeInsertBefore(renderer, parent, child, beforeNode, isMove);\n }\n else {\n nativeAppendChild(renderer, parent, child);\n }\n}\n/** Removes a node from the DOM given its native parent. */\nfunction nativeRemoveChild(renderer, parent, child, isHostElement) {\n renderer.removeChild(parent, child, isHostElement);\n}\n/** Checks if an element is a `<template>` node. */\nfunction isTemplateNode(node) {\n return node.tagName === 'TEMPLATE' && node.content !== undefined;\n}\n/**\n * Returns a native parent of a given native node.\n */\nfunction nativeParentNode(renderer, node) {\n return renderer.parentNode(node);\n}\n/**\n * Returns a native sibling of a given native node.\n */\nfunction nativeNextSibling(renderer, node) {\n return renderer.nextSibling(node);\n}\n/**\n * Find a node in front of which `currentTNode` should be inserted.\n *\n * This method determines the `RNode` in front of which we should insert the `currentRNode`. This\n * takes `TNode.insertBeforeIndex` into account if i18n code has been invoked.\n *\n * @param parentTNode parent `TNode`\n * @param currentTNode current `TNode` (The node which we would like to insert into the DOM)\n * @param lView current `LView`\n */\nfunction getInsertInFrontOfRNode(parentTNode, currentTNode, lView) {\n return _getInsertInFrontOfRNodeWithI18n(parentTNode, currentTNode, lView);\n}\n/**\n * Find a node in front of which `currentTNode` should be inserted. (Does not take i18n into\n * account)\n *\n * This method determines the `RNode` in front of which we should insert the `currentRNode`. This\n * does not take `TNode.insertBeforeIndex` into account.\n *\n * @param parentTNode parent `TNode`\n * @param currentTNode current `TNode` (The node which we would like to insert into the DOM)\n * @param lView current `LView`\n */\nfunction getInsertInFrontOfRNodeWithNoI18n(parentTNode, currentTNode, lView) {\n if (parentTNode.type & (8 /* TNodeType.ElementContainer */ | 32 /* TNodeType.Icu */)) {\n return getNativeByTNode(parentTNode, lView);\n }\n return null;\n}\n/**\n * Tree shakable boundary for `getInsertInFrontOfRNodeWithI18n` function.\n *\n * This function will only be set if i18n code runs.\n */\nlet _getInsertInFrontOfRNodeWithI18n = getInsertInFrontOfRNodeWithNoI18n;\n/**\n * Tree shakable boundary for `processI18nInsertBefore` function.\n *\n * This function will only be set if i18n code runs.\n */\nlet _processI18nInsertBefore;\nfunction setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore) {\n _getInsertInFrontOfRNodeWithI18n = getInsertInFrontOfRNodeWithI18n;\n _processI18nInsertBefore = processI18nInsertBefore;\n}\n/**\n * Appends the `child` native node (or a collection of nodes) to the `parent`.\n *\n * @param tView The `TView' to be appended\n * @param lView The current LView\n * @param childRNode The native child (or children) that should be appended\n * @param childTNode The TNode of the child element\n */\nfunction appendChild(tView, lView, childRNode, childTNode) {\n const parentRNode = getParentRElement(tView, childTNode, lView);\n const renderer = lView[RENDERER];\n const parentTNode = childTNode.parent || lView[T_HOST];\n const anchorNode = getInsertInFrontOfRNode(parentTNode, childTNode, lView);\n if (parentRNode != null) {\n if (Array.isArray(childRNode)) {\n for (let i = 0; i < childRNode.length; i++) {\n nativeAppendOrInsertBefore(renderer, parentRNode, childRNode[i], anchorNode, false);\n }\n }\n else {\n nativeAppendOrInsertBefore(renderer, parentRNode, childRNode, anchorNode, false);\n }\n }\n _processI18nInsertBefore !== undefined &&\n _processI18nInsertBefore(renderer, childTNode, lView, childRNode, parentRNode);\n}\n/**\n * Returns the first native node for a given LView, starting from the provided TNode.\n *\n * Native nodes are returned in the order in which those appear in the native tree (DOM).\n */\nfunction getFirstNativeNode(lView, tNode) {\n if (tNode !== null) {\n ngDevMode &&\n assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */ | 12 /* TNodeType.AnyContainer */ | 32 /* TNodeType.Icu */ | 16 /* TNodeType.Projection */);\n const tNodeType = tNode.type;\n if (tNodeType & 3 /* TNodeType.AnyRNode */) {\n return getNativeByTNode(tNode, lView);\n }\n else if (tNodeType & 4 /* TNodeType.Container */) {\n return getBeforeNodeForView(-1, lView[tNode.index]);\n }\n else if (tNodeType & 8 /* TNodeType.ElementContainer */) {\n const elIcuContainerChild = tNode.child;\n if (elIcuContainerChild !== null) {\n return getFirstNativeNode(lView, elIcuContainerChild);\n }\n else {\n const rNodeOrLContainer = lView[tNode.index];\n if (isLContainer(rNodeOrLContainer)) {\n return getBeforeNodeForView(-1, rNodeOrLContainer);\n }\n else {\n return unwrapRNode(rNodeOrLContainer);\n }\n }\n }\n else if (tNodeType & 32 /* TNodeType.Icu */) {\n let nextRNode = icuContainerIterate(tNode, lView);\n let rNode = nextRNode();\n // If the ICU container has no nodes, than we use the ICU anchor as the node.\n return rNode || unwrapRNode(lView[tNode.index]);\n }\n else {\n const projectionNodes = getProjectionNodes(lView, tNode);\n if (projectionNodes !== null) {\n if (Array.isArray(projectionNodes)) {\n return projectionNodes[0];\n }\n const parentView = getLViewParent(lView[DECLARATION_COMPONENT_VIEW]);\n ngDevMode && assertParentView(parentView);\n return getFirstNativeNode(parentView, projectionNodes);\n }\n else {\n return getFirstNativeNode(lView, tNode.next);\n }\n }\n }\n return null;\n}\nfunction getProjectionNodes(lView, tNode) {\n if (tNode !== null) {\n const componentView = lView[DECLARATION_COMPONENT_VIEW];\n const componentHost = componentView[T_HOST];\n const slotIdx = tNode.projection;\n ngDevMode && assertProjectionSlots(lView);\n return componentHost.projection[slotIdx];\n }\n return null;\n}\nfunction getBeforeNodeForView(viewIndexInContainer, lContainer) {\n const nextViewIndex = CONTAINER_HEADER_OFFSET + viewIndexInContainer + 1;\n if (nextViewIndex < lContainer.length) {\n const lView = lContainer[nextViewIndex];\n const firstTNodeOfView = lView[TVIEW].firstChild;\n if (firstTNodeOfView !== null) {\n return getFirstNativeNode(lView, firstTNodeOfView);\n }\n }\n return lContainer[NATIVE];\n}\n/**\n * Removes a native node itself using a given renderer. To remove the node we are looking up its\n * parent from the native tree as not all platforms / browsers support the equivalent of\n * node.remove().\n *\n * @param renderer A renderer to be used\n * @param rNode The native node that should be removed\n * @param isHostElement A flag indicating if a node to be removed is a host of a component.\n */\nfunction nativeRemoveNode(renderer, rNode, isHostElement) {\n ngDevMode && ngDevMode.rendererRemoveNode++;\n const nativeParent = nativeParentNode(renderer, rNode);\n if (nativeParent) {\n nativeRemoveChild(renderer, nativeParent, rNode, isHostElement);\n }\n}\n/**\n * Performs the operation of `action` on the node. Typically this involves inserting or removing\n * nodes on the LView or projection boundary.\n */\nfunction applyNodes(renderer, action, tNode, lView, parentRElement, beforeNode, isProjection) {\n while (tNode != null) {\n ngDevMode && assertTNodeForLView(tNode, lView);\n ngDevMode &&\n assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */ | 12 /* TNodeType.AnyContainer */ | 16 /* TNodeType.Projection */ | 32 /* TNodeType.Icu */);\n const rawSlotValue = lView[tNode.index];\n const tNodeType = tNode.type;\n if (isProjection) {\n if (action === 0 /* WalkTNodeTreeAction.Create */) {\n rawSlotValue && attachPatchData(unwrapRNode(rawSlotValue), lView);\n tNode.flags |= 2 /* TNodeFlags.isProjected */;\n }\n }\n if ((tNode.flags & 32 /* TNodeFlags.isDetached */) !== 32 /* TNodeFlags.isDetached */) {\n if (tNodeType & 8 /* TNodeType.ElementContainer */) {\n applyNodes(renderer, action, tNode.child, lView, parentRElement, beforeNode, false);\n applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n }\n else if (tNodeType & 32 /* TNodeType.Icu */) {\n const nextRNode = icuContainerIterate(tNode, lView);\n let rNode;\n while (rNode = nextRNode()) {\n applyToElementOrContainer(action, renderer, parentRElement, rNode, beforeNode);\n }\n applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n }\n else if (tNodeType & 16 /* TNodeType.Projection */) {\n applyProjectionRecursive(renderer, action, lView, tNode, parentRElement, beforeNode);\n }\n else {\n ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */ | 4 /* TNodeType.Container */);\n applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n }\n }\n tNode = isProjection ? tNode.projectionNext : tNode.next;\n }\n}\nfunction applyView(tView, lView, renderer, action, parentRElement, beforeNode) {\n applyNodes(renderer, action, tView.firstChild, lView, parentRElement, beforeNode, false);\n}\n/**\n * `applyProjection` performs operation on the projection.\n *\n * Inserting a projection requires us to locate the projected nodes from the parent component. The\n * complication is that those nodes themselves could be re-projected from their parent component.\n *\n * @param tView The `TView` of `LView` which needs to be inserted, detached, destroyed\n * @param lView The `LView` which needs to be inserted, detached, destroyed.\n * @param tProjectionNode node to project\n */\nfunction applyProjection(tView, lView, tProjectionNode) {\n const renderer = lView[RENDERER];\n const parentRNode = getParentRElement(tView, tProjectionNode, lView);\n const parentTNode = tProjectionNode.parent || lView[T_HOST];\n let beforeNode = getInsertInFrontOfRNode(parentTNode, tProjectionNode, lView);\n applyProjectionRecursive(renderer, 0 /* WalkTNodeTreeAction.Create */, lView, tProjectionNode, parentRNode, beforeNode);\n}\n/**\n * `applyProjectionRecursive` performs operation on the projection specified by `action` (insert,\n * detach, destroy)\n *\n * Inserting a projection requires us to locate the projected nodes from the parent component. The\n * complication is that those nodes themselves could be re-projected from their parent component.\n *\n * @param renderer Render to use\n * @param action action to perform (insert, detach, destroy)\n * @param lView The LView which needs to be inserted, detached, destroyed.\n * @param tProjectionNode node to project\n * @param parentRElement parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction applyProjectionRecursive(renderer, action, lView, tProjectionNode, parentRElement, beforeNode) {\n const componentLView = lView[DECLARATION_COMPONENT_VIEW];\n const componentNode = componentLView[T_HOST];\n ngDevMode &&\n assertEqual(typeof tProjectionNode.projection, 'number', 'expecting projection index');\n const nodeToProjectOrRNodes = componentNode.projection[tProjectionNode.projection];\n if (Array.isArray(nodeToProjectOrRNodes)) {\n // This should not exist, it is a bit of a hack. When we bootstrap a top level node and we\n // need to support passing projectable nodes, so we cheat and put them in the TNode\n // of the Host TView. (Yes we put instance info at the T Level). We can get away with it\n // because we know that that TView is not shared and therefore it will not be a problem.\n // This should be refactored and cleaned up.\n for (let i = 0; i < nodeToProjectOrRNodes.length; i++) {\n const rNode = nodeToProjectOrRNodes[i];\n applyToElementOrContainer(action, renderer, parentRElement, rNode, beforeNode);\n }\n }\n else {\n let nodeToProject = nodeToProjectOrRNodes;\n const projectedComponentLView = componentLView[PARENT];\n applyNodes(renderer, action, nodeToProject, projectedComponentLView, parentRElement, beforeNode, true);\n }\n}\n/**\n * `applyContainer` performs an operation on the container and its views as specified by\n * `action` (insert, detach, destroy)\n *\n * Inserting a Container is complicated by the fact that the container may have Views which\n * themselves have containers or projections.\n *\n * @param renderer Renderer to use\n * @param action action to perform (insert, detach, destroy)\n * @param lContainer The LContainer which needs to be inserted, detached, destroyed.\n * @param parentRElement parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction applyContainer(renderer, action, lContainer, parentRElement, beforeNode) {\n ngDevMode && assertLContainer(lContainer);\n const anchor = lContainer[NATIVE]; // LContainer has its own before node.\n const native = unwrapRNode(lContainer);\n // An LContainer can be created dynamically on any node by injecting ViewContainerRef.\n // Asking for a ViewContainerRef on an element will result in a creation of a separate anchor\n // node (comment in the DOM) that will be different from the LContainer's host node. In this\n // particular case we need to execute action on 2 nodes:\n // - container's host node (this is done in the executeActionOnElementOrContainer)\n // - container's host node (this is done here)\n if (anchor !== native) {\n // This is very strange to me (Misko). I would expect that the native is same as anchor. I\n // don't see a reason why they should be different, but they are.\n //\n // If they are we need to process the second anchor as well.\n applyToElementOrContainer(action, renderer, parentRElement, anchor, beforeNode);\n }\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const lView = lContainer[i];\n applyView(lView[TVIEW], lView, renderer, action, parentRElement, anchor);\n }\n}\n/**\n * Writes class/style to element.\n *\n * @param renderer Renderer to use.\n * @param isClassBased `true` if it should be written to `class` (`false` to write to `style`)\n * @param rNode The Node to write to.\n * @param prop Property to write to. This would be the class/style name.\n * @param value Value to write. If `null`/`undefined`/`false` this is considered a remove (set/add\n * otherwise).\n */\nfunction applyStyling(renderer, isClassBased, rNode, prop, value) {\n if (isClassBased) {\n // We actually want JS true/false here because any truthy value should add the class\n if (!value) {\n ngDevMode && ngDevMode.rendererRemoveClass++;\n renderer.removeClass(rNode, prop);\n }\n else {\n ngDevMode && ngDevMode.rendererAddClass++;\n renderer.addClass(rNode, prop);\n }\n }\n else {\n let flags = prop.indexOf('-') === -1 ? undefined : RendererStyleFlags2.DashCase;\n if (value == null /** || value === undefined */) {\n ngDevMode && ngDevMode.rendererRemoveStyle++;\n renderer.removeStyle(rNode, prop, flags);\n }\n else {\n // A value is important if it ends with `!important`. The style\n // parser strips any semicolons at the end of the value.\n const isImportant = typeof value === 'string' ? value.endsWith('!important') : false;\n if (isImportant) {\n // !important has to be stripped from the value for it to be valid.\n value = value.slice(0, -10);\n flags |= RendererStyleFlags2.Important;\n }\n ngDevMode && ngDevMode.rendererSetStyle++;\n renderer.setStyle(rNode, prop, value, flags);\n }\n }\n}\n/**\n * Write `cssText` to `RElement`.\n *\n * This function does direct write without any reconciliation. Used for writing initial values, so\n * that static styling values do not pull in the style parser.\n *\n * @param renderer Renderer to use\n * @param element The element which needs to be updated.\n * @param newValue The new class list to write.\n */\nfunction writeDirectStyle(renderer, element, newValue) {\n ngDevMode && assertString(newValue, '\\'newValue\\' should be a string');\n renderer.setAttribute(element, 'style', newValue);\n ngDevMode && ngDevMode.rendererSetStyle++;\n}\n/**\n * Write `className` to `RElement`.\n *\n * This function does direct write without any reconciliation. Used for writing initial values, so\n * that static styling values do not pull in the style parser.\n *\n * @param renderer Renderer to use\n * @param element The element which needs to be updated.\n * @param newValue The new class list to write.\n */\nfunction writeDirectClass(renderer, element, newValue) {\n ngDevMode && assertString(newValue, '\\'newValue\\' should be a string');\n if (newValue === '') {\n // There are tests in `google3` which expect `element.getAttribute('class')` to be `null`.\n renderer.removeAttribute(element, 'class');\n }\n else {\n renderer.setAttribute(element, 'class', newValue);\n }\n ngDevMode && ngDevMode.rendererSetClassName++;\n}\n/** Sets up the static DOM attributes on an `RNode`. */\nfunction setupStaticAttributes(renderer, element, tNode) {\n const { mergedAttrs, classes, styles } = tNode;\n if (mergedAttrs !== null) {\n setUpAttributes(renderer, element, mergedAttrs);\n }\n if (classes !== null) {\n writeDirectClass(renderer, element, classes);\n }\n if (styles !== null) {\n writeDirectStyle(renderer, element, styles);\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The Trusted Types policy, or null if Trusted Types are not\n * enabled/supported, or undefined if the policy has not been created yet.\n */\nlet policy$1;\n/**\n * Returns the Trusted Types policy, or null if Trusted Types are not\n * enabled/supported. The first call to this function will create the policy.\n */\nfunction getPolicy$1() {\n if (policy$1 === undefined) {\n policy$1 = null;\n if (_global.trustedTypes) {\n try {\n policy$1 = _global.trustedTypes.createPolicy('angular', {\n createHTML: (s) => s,\n createScript: (s) => s,\n createScriptURL: (s) => s,\n });\n }\n catch {\n // trustedTypes.createPolicy throws if called with a name that is\n // already registered, even in report-only mode. Until the API changes,\n // catch the error not to break the applications functionally. In such\n // cases, the code will fall back to using strings.\n }\n }\n }\n return policy$1;\n}\n/**\n * Unsafely promote a string to a TrustedHTML, falling back to strings when\n * Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that the\n * provided string will never cause an XSS vulnerability if used in a context\n * that will be interpreted as HTML by a browser, e.g. when assigning to\n * element.innerHTML.\n */\nfunction trustedHTMLFromString(html) {\n return getPolicy$1()?.createHTML(html) || html;\n}\n/**\n * Unsafely promote a string to a TrustedScript, falling back to strings when\n * Trusted Types are not available.\n * @security In particular, it must be assured that the provided string will\n * never cause an XSS vulnerability if used in a context that will be\n * interpreted and executed as a script by a browser, e.g. when calling eval.\n */\nfunction trustedScriptFromString(script) {\n return getPolicy$1()?.createScript(script) || script;\n}\n/**\n * Unsafely promote a string to a TrustedScriptURL, falling back to strings\n * when Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that the\n * provided string will never cause an XSS vulnerability if used in a context\n * that will cause a browser to load and execute a resource, e.g. when\n * assigning to script.src.\n */\nfunction trustedScriptURLFromString(url) {\n return getPolicy$1()?.createScriptURL(url) || url;\n}\n/**\n * Unsafely call the Function constructor with the given string arguments. It\n * is only available in development mode, and should be stripped out of\n * production code.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that it\n * is only called from development code, as use in production code can lead to\n * XSS vulnerabilities.\n */\nfunction newTrustedFunctionForDev(...args) {\n if (typeof ngDevMode === 'undefined') {\n throw new Error('newTrustedFunctionForDev should never be called in production');\n }\n if (!_global.trustedTypes) {\n // In environments that don't support Trusted Types, fall back to the most\n // straightforward implementation:\n return new Function(...args);\n }\n // Chrome currently does not support passing TrustedScript to the Function\n // constructor. The following implements the workaround proposed on the page\n // below, where the Chromium bug is also referenced:\n // https://github.com/w3c/webappsec-trusted-types/wiki/Trusted-Types-for-function-constructor\n const fnArgs = args.slice(0, -1).join(',');\n const fnBody = args[args.length - 1];\n const body = `(function anonymous(${fnArgs}\n) { ${fnBody}\n})`;\n // Using eval directly confuses the compiler and prevents this module from\n // being stripped out of JS binaries even if not used. The global['eval']\n // indirection fixes that.\n const fn = _global['eval'](trustedScriptFromString(body));\n if (fn.bind === undefined) {\n // Workaround for a browser bug that only exists in Chrome 83, where passing\n // a TrustedScript to eval just returns the TrustedScript back without\n // evaluating it. In that case, fall back to the most straightforward\n // implementation:\n return new Function(...args);\n }\n // To completely mimic the behavior of calling \"new Function\", two more\n // things need to happen:\n // 1. Stringifying the resulting function should return its source code\n fn.toString = () => body;\n // 2. When calling the resulting function, `this` should refer to `global`\n return fn.bind(_global);\n // When Trusted Types support in Function constructors is widely available,\n // the implementation of this function can be simplified to:\n // return new Function(...args.map(a => trustedScriptFromString(a)));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Validation function invoked at runtime for each binding that might potentially\n * represent a security-sensitive attribute of an <iframe>.\n * See `IFRAME_SECURITY_SENSITIVE_ATTRS` in the\n * `packages/compiler/src/schema/dom_security_schema.ts` script for the full list\n * of such attributes.\n *\n * @codeGenApi\n */\nfunction ɵɵvalidateIframeAttribute(attrValue, tagName, attrName) {\n const lView = getLView();\n const tNode = getSelectedTNode();\n const element = getNativeByTNode(tNode, lView);\n // Restrict any dynamic bindings of security-sensitive attributes/properties\n // on an <iframe> for security reasons.\n if (tNode.type === 2 /* TNodeType.Element */ && tagName.toLowerCase() === 'iframe') {\n const iframe = element;\n // Unset previously applied `src` and `srcdoc` if we come across a situation when\n // a security-sensitive attribute is set later via an attribute/property binding.\n iframe.src = '';\n iframe.srcdoc = trustedHTMLFromString('');\n // Also remove the <iframe> from the document.\n nativeRemoveNode(lView[RENDERER], iframe);\n const errorMessage = ngDevMode &&\n `Angular has detected that the \\`${attrName}\\` was applied ` +\n `as a binding to an <iframe>${getTemplateLocationDetails(lView)}. ` +\n `For security reasons, the \\`${attrName}\\` can be set on an <iframe> ` +\n `as a static attribute only. \\n` +\n `To fix this, switch the \\`${attrName}\\` binding to a static attribute ` +\n `in a template or in host bindings section.`;\n throw new RuntimeError(-910 /* RuntimeErrorCode.UNSAFE_IFRAME_ATTRS */, errorMessage);\n }\n return attrValue;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Most of the use of `document` in Angular is from within the DI system so it is possible to simply\n * inject the `DOCUMENT` token and are done.\n *\n * Ivy is special because it does not rely upon the DI and must get hold of the document some other\n * way.\n *\n * The solution is to define `getDocument()` and `setDocument()` top-level functions for ivy.\n * Wherever ivy needs the global document, it calls `getDocument()` instead.\n *\n * When running ivy outside of a browser environment, it is necessary to call `setDocument()` to\n * tell ivy what the global `document` is.\n *\n * Angular does this for us in each of the standard platforms (`Browser`, `Server`, and `WebWorker`)\n * by calling `setDocument()` when providing the `DOCUMENT` token.\n */\nlet DOCUMENT = undefined;\n/**\n * Tell ivy what the `document` is for this platform.\n *\n * It is only necessary to call this if the current platform is not a browser.\n *\n * @param document The object representing the global `document` in this environment.\n */\nfunction setDocument(document) {\n DOCUMENT = document;\n}\n/**\n * Access the object that represents the `document` for this platform.\n *\n * Ivy calls this whenever it needs to access the `document` object.\n * For example to create the renderer or to do sanitization.\n */\nfunction getDocument() {\n if (DOCUMENT !== undefined) {\n return DOCUMENT;\n }\n else if (typeof document !== 'undefined') {\n return document;\n }\n // No \"document\" can be found. This should only happen if we are running ivy outside Angular and\n // the current platform is not a browser. Since this is not a supported scenario at the moment\n // this should not happen in Angular apps.\n // Once we support running ivy outside of Angular we will need to publish `setDocument()` as a\n // public API. Meanwhile we just return `undefined` and let the application fail.\n return undefined;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The Trusted Types policy, or null if Trusted Types are not\n * enabled/supported, or undefined if the policy has not been created yet.\n */\nlet policy;\n/**\n * Returns the Trusted Types policy, or null if Trusted Types are not\n * enabled/supported. The first call to this function will create the policy.\n */\nfunction getPolicy() {\n if (policy === undefined) {\n policy = null;\n if (_global.trustedTypes) {\n try {\n policy = _global.trustedTypes\n .createPolicy('angular#unsafe-bypass', {\n createHTML: (s) => s,\n createScript: (s) => s,\n createScriptURL: (s) => s,\n });\n }\n catch {\n // trustedTypes.createPolicy throws if called with a name that is\n // already registered, even in report-only mode. Until the API changes,\n // catch the error not to break the applications functionally. In such\n // cases, the code will fall back to using strings.\n }\n }\n }\n return policy;\n}\n/**\n * Unsafely promote a string to a TrustedHTML, falling back to strings when\n * Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that it\n * is only passed strings that come directly from custom sanitizers or the\n * bypassSecurityTrust* functions.\n */\nfunction trustedHTMLFromStringBypass(html) {\n return getPolicy()?.createHTML(html) || html;\n}\n/**\n * Unsafely promote a string to a TrustedScript, falling back to strings when\n * Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that it\n * is only passed strings that come directly from custom sanitizers or the\n * bypassSecurityTrust* functions.\n */\nfunction trustedScriptFromStringBypass(script) {\n return getPolicy()?.createScript(script) || script;\n}\n/**\n * Unsafely promote a string to a TrustedScriptURL, falling back to strings\n * when Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that it\n * is only passed strings that come directly from custom sanitizers or the\n * bypassSecurityTrust* functions.\n */\nfunction trustedScriptURLFromStringBypass(url) {\n return getPolicy()?.createScriptURL(url) || url;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass SafeValueImpl {\n constructor(changingThisBreaksApplicationSecurity) {\n this.changingThisBreaksApplicationSecurity = changingThisBreaksApplicationSecurity;\n }\n toString() {\n return `SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity}` +\n ` (see ${XSS_SECURITY_URL})`;\n }\n}\nclass SafeHtmlImpl extends SafeValueImpl {\n getTypeName() {\n return \"HTML\" /* BypassType.Html */;\n }\n}\nclass SafeStyleImpl extends SafeValueImpl {\n getTypeName() {\n return \"Style\" /* BypassType.Style */;\n }\n}\nclass SafeScriptImpl extends SafeValueImpl {\n getTypeName() {\n return \"Script\" /* BypassType.Script */;\n }\n}\nclass SafeUrlImpl extends SafeValueImpl {\n getTypeName() {\n return \"URL\" /* BypassType.Url */;\n }\n}\nclass SafeResourceUrlImpl extends SafeValueImpl {\n getTypeName() {\n return \"ResourceURL\" /* BypassType.ResourceUrl */;\n }\n}\nfunction unwrapSafeValue(value) {\n return value instanceof SafeValueImpl ? value.changingThisBreaksApplicationSecurity :\n value;\n}\nfunction allowSanitizationBypassAndThrow(value, type) {\n const actualType = getSanitizationBypassType(value);\n if (actualType != null && actualType !== type) {\n // Allow ResourceURLs in URL contexts, they are strictly more trusted.\n if (actualType === \"ResourceURL\" /* BypassType.ResourceUrl */ && type === \"URL\" /* BypassType.Url */)\n return true;\n throw new Error(`Required a safe ${type}, got a ${actualType} (see ${XSS_SECURITY_URL})`);\n }\n return actualType === type;\n}\nfunction getSanitizationBypassType(value) {\n return value instanceof SafeValueImpl && value.getTypeName() || null;\n}\n/**\n * Mark `html` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link htmlSanitizer} to be trusted implicitly.\n *\n * @param trustedHtml `html` string which needs to be implicitly trusted.\n * @returns a `html` which has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustHtml(trustedHtml) {\n return new SafeHtmlImpl(trustedHtml);\n}\n/**\n * Mark `style` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link styleSanitizer} to be trusted implicitly.\n *\n * @param trustedStyle `style` string which needs to be implicitly trusted.\n * @returns a `style` hich has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustStyle(trustedStyle) {\n return new SafeStyleImpl(trustedStyle);\n}\n/**\n * Mark `script` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link scriptSanitizer} to be trusted implicitly.\n *\n * @param trustedScript `script` string which needs to be implicitly trusted.\n * @returns a `script` which has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustScript(trustedScript) {\n return new SafeScriptImpl(trustedScript);\n}\n/**\n * Mark `url` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link urlSanitizer} to be trusted implicitly.\n *\n * @param trustedUrl `url` string which needs to be implicitly trusted.\n * @returns a `url` which has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustUrl(trustedUrl) {\n return new SafeUrlImpl(trustedUrl);\n}\n/**\n * Mark `url` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link resourceUrlSanitizer} to be trusted implicitly.\n *\n * @param trustedResourceUrl `url` string which needs to be implicitly trusted.\n * @returns a `url` which has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustResourceUrl(trustedResourceUrl) {\n return new SafeResourceUrlImpl(trustedResourceUrl);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * This helper is used to get hold of an inert tree of DOM elements containing dirty HTML\n * that needs sanitizing.\n * Depending upon browser support we use one of two strategies for doing this.\n * Default: DOMParser strategy\n * Fallback: InertDocument strategy\n */\nfunction getInertBodyHelper(defaultDoc) {\n const inertDocumentHelper = new InertDocumentHelper(defaultDoc);\n return isDOMParserAvailable() ? new DOMParserHelper(inertDocumentHelper) : inertDocumentHelper;\n}\n/**\n * Uses DOMParser to create and fill an inert body element.\n * This is the default strategy used in browsers that support it.\n */\nclass DOMParserHelper {\n constructor(inertDocumentHelper) {\n this.inertDocumentHelper = inertDocumentHelper;\n }\n getInertBodyElement(html) {\n // We add these extra elements to ensure that the rest of the content is parsed as expected\n // e.g. leading whitespace is maintained and tags like `<meta>` do not get hoisted to the\n // `<head>` tag. Note that the `<body>` tag is closed implicitly to prevent unclosed tags\n // in `html` from consuming the otherwise explicit `</body>` tag.\n html = '<body><remove></remove>' + html;\n try {\n const body = new window.DOMParser()\n .parseFromString(trustedHTMLFromString(html), 'text/html')\n .body;\n if (body === null) {\n // In some browsers (e.g. Mozilla/5.0 iPad AppleWebKit Mobile) the `body` property only\n // becomes available in the following tick of the JS engine. In that case we fall back to\n // the `inertDocumentHelper` instead.\n return this.inertDocumentHelper.getInertBodyElement(html);\n }\n body.removeChild(body.firstChild);\n return body;\n }\n catch {\n return null;\n }\n }\n}\n/**\n * Use an HTML5 `template` element, if supported, or an inert body element created via\n * `createHtmlDocument` to create and fill an inert DOM element.\n * This is the fallback strategy if the browser does not support DOMParser.\n */\nclass InertDocumentHelper {\n constructor(defaultDoc) {\n this.defaultDoc = defaultDoc;\n this.inertDocument = this.defaultDoc.implementation.createHTMLDocument('sanitization-inert');\n if (this.inertDocument.body == null) {\n // usually there should be only one body element in the document, but IE doesn't have any, so\n // we need to create one.\n const inertHtml = this.inertDocument.createElement('html');\n this.inertDocument.appendChild(inertHtml);\n const inertBodyElement = this.inertDocument.createElement('body');\n inertHtml.appendChild(inertBodyElement);\n }\n }\n getInertBodyElement(html) {\n // Prefer using <template> element if supported.\n const templateEl = this.inertDocument.createElement('template');\n if ('content' in templateEl) {\n templateEl.innerHTML = trustedHTMLFromString(html);\n return templateEl;\n }\n // Note that previously we used to do something like `this.inertDocument.body.innerHTML = html`\n // and we returned the inert `body` node. This was changed, because IE seems to treat setting\n // `innerHTML` on an inserted element differently, compared to one that hasn't been inserted\n // yet. In particular, IE appears to split some of the text into multiple text nodes rather\n // than keeping them in a single one which ends up messing with Ivy's i18n parsing further\n // down the line. This has been worked around by creating a new inert `body` and using it as\n // the root node in which we insert the HTML.\n const inertBody = this.inertDocument.createElement('body');\n inertBody.innerHTML = trustedHTMLFromString(html);\n // Support: IE 11 only\n // strip custom-namespaced attributes on IE<=11\n if (this.defaultDoc.documentMode) {\n this.stripCustomNsAttrs(inertBody);\n }\n return inertBody;\n }\n /**\n * When IE11 comes across an unknown namespaced attribute e.g. 'xlink:foo' it adds 'xmlns:ns1'\n * attribute to declare ns1 namespace and prefixes the attribute with 'ns1' (e.g.\n * 'ns1:xlink:foo').\n *\n * This is undesirable since we don't want to allow any of these custom attributes. This method\n * strips them all.\n */\n stripCustomNsAttrs(el) {\n const elAttrs = el.attributes;\n // loop backwards so that we can support removals.\n for (let i = elAttrs.length - 1; 0 < i; i--) {\n const attrib = elAttrs.item(i);\n const attrName = attrib.name;\n if (attrName === 'xmlns:ns1' || attrName.indexOf('ns1:') === 0) {\n el.removeAttribute(attrName);\n }\n }\n let childNode = el.firstChild;\n while (childNode) {\n if (childNode.nodeType === Node.ELEMENT_NODE)\n this.stripCustomNsAttrs(childNode);\n childNode = childNode.nextSibling;\n }\n }\n}\n/**\n * We need to determine whether the DOMParser exists in the global context and\n * supports parsing HTML; HTML parsing support is not as wide as other formats, see\n * https://developer.mozilla.org/en-US/docs/Web/API/DOMParser#Browser_compatibility.\n *\n * @suppress {uselessCode}\n */\nfunction isDOMParserAvailable() {\n try {\n return !!new window.DOMParser().parseFromString(trustedHTMLFromString(''), 'text/html');\n }\n catch {\n return false;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A pattern that recognizes a commonly useful subset of URLs that are safe.\n *\n * This regular expression matches a subset of URLs that will not cause script\n * execution if used in URL context within a HTML document. Specifically, this\n * regular expression matches if (comment from here on and regex copied from\n * Soy's EscapingConventions):\n * (1) Either an allowed protocol (http, https, mailto or ftp).\n * (2) or no protocol. A protocol must be followed by a colon. The below\n * allows that by allowing colons only after one of the characters [/?#].\n * A colon after a hash (#) must be in the fragment.\n * Otherwise, a colon after a (?) must be in a query.\n * Otherwise, a colon after a single solidus (/) must be in a path.\n * Otherwise, a colon after a double solidus (//) must be in the authority\n * (before port).\n *\n * The pattern disallows &, used in HTML entity declarations before\n * one of the characters in [/?#]. This disallows HTML entities used in the\n * protocol name, which should never happen, e.g. \"http\" for \"http\".\n * It also disallows HTML entities in the first path part of a relative path,\n * e.g. \"foo<bar/baz\". Our existing escaping functions should not produce\n * that. More importantly, it disallows masking of a colon,\n * e.g. \"javascript:...\".\n *\n * This regular expression was taken from the Closure sanitization library.\n */\nconst SAFE_URL_PATTERN = /^(?:(?:https?|mailto|data|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi;\nfunction _sanitizeUrl(url) {\n url = String(url);\n if (url.match(SAFE_URL_PATTERN))\n return url;\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n console.warn(`WARNING: sanitizing unsafe URL value ${url} (see ${XSS_SECURITY_URL})`);\n }\n return 'unsafe:' + url;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction tagSet(tags) {\n const res = {};\n for (const t of tags.split(','))\n res[t] = true;\n return res;\n}\nfunction merge(...sets) {\n const res = {};\n for (const s of sets) {\n for (const v in s) {\n if (s.hasOwnProperty(v))\n res[v] = true;\n }\n }\n return res;\n}\n// Good source of info about elements and attributes\n// https://html.spec.whatwg.org/#semantics\n// https://simon.html5.org/html-elements\n// Safe Void Elements - HTML5\n// https://html.spec.whatwg.org/#void-elements\nconst VOID_ELEMENTS = tagSet('area,br,col,hr,img,wbr');\n// Elements that you can, intentionally, leave open (and which close themselves)\n// https://html.spec.whatwg.org/#optional-tags\nconst OPTIONAL_END_TAG_BLOCK_ELEMENTS = tagSet('colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr');\nconst OPTIONAL_END_TAG_INLINE_ELEMENTS = tagSet('rp,rt');\nconst OPTIONAL_END_TAG_ELEMENTS = merge(OPTIONAL_END_TAG_INLINE_ELEMENTS, OPTIONAL_END_TAG_BLOCK_ELEMENTS);\n// Safe Block Elements - HTML5\nconst BLOCK_ELEMENTS = merge(OPTIONAL_END_TAG_BLOCK_ELEMENTS, tagSet('address,article,' +\n 'aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,' +\n 'h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul'));\n// Inline Elements - HTML5\nconst INLINE_ELEMENTS = merge(OPTIONAL_END_TAG_INLINE_ELEMENTS, tagSet('a,abbr,acronym,audio,b,' +\n 'bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,' +\n 'samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video'));\nconst VALID_ELEMENTS = merge(VOID_ELEMENTS, BLOCK_ELEMENTS, INLINE_ELEMENTS, OPTIONAL_END_TAG_ELEMENTS);\n// Attributes that have href and hence need to be sanitized\nconst URI_ATTRS = tagSet('background,cite,href,itemtype,longdesc,poster,src,xlink:href');\nconst HTML_ATTRS = tagSet('abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,' +\n 'compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,' +\n 'ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,' +\n 'scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,' +\n 'valign,value,vspace,width');\n// Accessibility attributes as per WAI-ARIA 1.1 (W3C Working Draft 14 December 2018)\nconst ARIA_ATTRS = tagSet('aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,' +\n 'aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,' +\n 'aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,' +\n 'aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,' +\n 'aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,' +\n 'aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,' +\n 'aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext');\n// NB: This currently consciously doesn't support SVG. SVG sanitization has had several security\n// issues in the past, so it seems safer to leave it out if possible. If support for binding SVG via\n// innerHTML is required, SVG attributes should be added here.\n// NB: Sanitization does not allow <form> elements or other active elements (<button> etc). Those\n// can be sanitized, but they increase security surface area without a legitimate use case, so they\n// are left out here.\nconst VALID_ATTRS = merge(URI_ATTRS, HTML_ATTRS, ARIA_ATTRS);\n// Elements whose content should not be traversed/preserved, if the elements themselves are invalid.\n//\n// Typically, `<invalid>Some content</invalid>` would traverse (and in this case preserve)\n// `Some content`, but strip `invalid-element` opening/closing tags. For some elements, though, we\n// don't want to preserve the content, if the elements themselves are going to be removed.\nconst SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS = tagSet('script,style,template');\n/**\n * SanitizingHtmlSerializer serializes a DOM fragment, stripping out any unsafe elements and unsafe\n * attributes.\n */\nclass SanitizingHtmlSerializer {\n constructor() {\n // Explicitly track if something was stripped, to avoid accidentally warning of sanitization just\n // because characters were re-encoded.\n this.sanitizedSomething = false;\n this.buf = [];\n }\n sanitizeChildren(el) {\n // This cannot use a TreeWalker, as it has to run on Angular's various DOM adapters.\n // However this code never accesses properties off of `document` before deleting its contents\n // again, so it shouldn't be vulnerable to DOM clobbering.\n let current = el.firstChild;\n let traverseContent = true;\n while (current) {\n if (current.nodeType === Node.ELEMENT_NODE) {\n traverseContent = this.startElement(current);\n }\n else if (current.nodeType === Node.TEXT_NODE) {\n this.chars(current.nodeValue);\n }\n else {\n // Strip non-element, non-text nodes.\n this.sanitizedSomething = true;\n }\n if (traverseContent && current.firstChild) {\n current = current.firstChild;\n continue;\n }\n while (current) {\n // Leaving the element. Walk up and to the right, closing tags as we go.\n if (current.nodeType === Node.ELEMENT_NODE) {\n this.endElement(current);\n }\n let next = this.checkClobberedElement(current, current.nextSibling);\n if (next) {\n current = next;\n break;\n }\n current = this.checkClobberedElement(current, current.parentNode);\n }\n }\n return this.buf.join('');\n }\n /**\n * Sanitizes an opening element tag (if valid) and returns whether the element's contents should\n * be traversed. Element content must always be traversed (even if the element itself is not\n * valid/safe), unless the element is one of `SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS`.\n *\n * @param element The element to sanitize.\n * @return True if the element's contents should be traversed.\n */\n startElement(element) {\n const tagName = element.nodeName.toLowerCase();\n if (!VALID_ELEMENTS.hasOwnProperty(tagName)) {\n this.sanitizedSomething = true;\n return !SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS.hasOwnProperty(tagName);\n }\n this.buf.push('<');\n this.buf.push(tagName);\n const elAttrs = element.attributes;\n for (let i = 0; i < elAttrs.length; i++) {\n const elAttr = elAttrs.item(i);\n const attrName = elAttr.name;\n const lower = attrName.toLowerCase();\n if (!VALID_ATTRS.hasOwnProperty(lower)) {\n this.sanitizedSomething = true;\n continue;\n }\n let value = elAttr.value;\n // TODO(martinprobst): Special case image URIs for data:image/...\n if (URI_ATTRS[lower])\n value = _sanitizeUrl(value);\n this.buf.push(' ', attrName, '=\"', encodeEntities(value), '\"');\n }\n this.buf.push('>');\n return true;\n }\n endElement(current) {\n const tagName = current.nodeName.toLowerCase();\n if (VALID_ELEMENTS.hasOwnProperty(tagName) && !VOID_ELEMENTS.hasOwnProperty(tagName)) {\n this.buf.push('</');\n this.buf.push(tagName);\n this.buf.push('>');\n }\n }\n chars(chars) {\n this.buf.push(encodeEntities(chars));\n }\n checkClobberedElement(node, nextNode) {\n if (nextNode &&\n (node.compareDocumentPosition(nextNode) &\n Node.DOCUMENT_POSITION_CONTAINED_BY) === Node.DOCUMENT_POSITION_CONTAINED_BY) {\n throw new Error(`Failed to sanitize html because the element is clobbered: ${node.outerHTML}`);\n }\n return nextNode;\n }\n}\n// Regular Expressions for parsing tags and attributes\nconst SURROGATE_PAIR_REGEXP = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n// ! to ~ is the ASCII range.\nconst NON_ALPHANUMERIC_REGEXP = /([^\\#-~ |!])/g;\n/**\n * Escapes all potentially dangerous characters, so that the\n * resulting string can be safely inserted into attribute or\n * element text.\n * @param value\n */\nfunction encodeEntities(value) {\n return value.replace(/&/g, '&')\n .replace(SURROGATE_PAIR_REGEXP, function (match) {\n const hi = match.charCodeAt(0);\n const low = match.charCodeAt(1);\n return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';';\n })\n .replace(NON_ALPHANUMERIC_REGEXP, function (match) {\n return '&#' + match.charCodeAt(0) + ';';\n })\n .replace(/</g, '<')\n .replace(/>/g, '>');\n}\nlet inertBodyHelper;\n/**\n * Sanitizes the given unsafe, untrusted HTML fragment, and returns HTML text that is safe to add to\n * the DOM in a browser environment.\n */\nfunction _sanitizeHtml(defaultDoc, unsafeHtmlInput) {\n let inertBodyElement = null;\n try {\n inertBodyHelper = inertBodyHelper || getInertBodyHelper(defaultDoc);\n // Make sure unsafeHtml is actually a string (TypeScript types are not enforced at runtime).\n let unsafeHtml = unsafeHtmlInput ? String(unsafeHtmlInput) : '';\n inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n // mXSS protection. Repeatedly parse the document to make sure it stabilizes, so that a browser\n // trying to auto-correct incorrect HTML cannot cause formerly inert HTML to become dangerous.\n let mXSSAttempts = 5;\n let parsedHtml = unsafeHtml;\n do {\n if (mXSSAttempts === 0) {\n throw new Error('Failed to sanitize html because the input is unstable');\n }\n mXSSAttempts--;\n unsafeHtml = parsedHtml;\n parsedHtml = inertBodyElement.innerHTML;\n inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n } while (unsafeHtml !== parsedHtml);\n const sanitizer = new SanitizingHtmlSerializer();\n const safeHtml = sanitizer.sanitizeChildren(getTemplateContent(inertBodyElement) || inertBodyElement);\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && sanitizer.sanitizedSomething) {\n console.warn(`WARNING: sanitizing HTML stripped some content, see ${XSS_SECURITY_URL}`);\n }\n return trustedHTMLFromString(safeHtml);\n }\n finally {\n // In case anything goes wrong, clear out inertElement to reset the entire DOM structure.\n if (inertBodyElement) {\n const parent = getTemplateContent(inertBodyElement) || inertBodyElement;\n while (parent.firstChild) {\n parent.removeChild(parent.firstChild);\n }\n }\n }\n}\nfunction getTemplateContent(el) {\n return 'content' in el /** Microsoft/TypeScript#21517 */ && isTemplateElement(el) ?\n el.content :\n null;\n}\nfunction isTemplateElement(el) {\n return el.nodeType === Node.ELEMENT_NODE && el.nodeName === 'TEMPLATE';\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property\n * like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly\n * handled.\n *\n * See DomSanitizer for more details on security in Angular applications.\n *\n * @publicApi\n */\nvar SecurityContext;\n(function (SecurityContext) {\n SecurityContext[SecurityContext[\"NONE\"] = 0] = \"NONE\";\n SecurityContext[SecurityContext[\"HTML\"] = 1] = \"HTML\";\n SecurityContext[SecurityContext[\"STYLE\"] = 2] = \"STYLE\";\n SecurityContext[SecurityContext[\"SCRIPT\"] = 3] = \"SCRIPT\";\n SecurityContext[SecurityContext[\"URL\"] = 4] = \"URL\";\n SecurityContext[SecurityContext[\"RESOURCE_URL\"] = 5] = \"RESOURCE_URL\";\n})(SecurityContext || (SecurityContext = {}));\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * An `html` sanitizer which converts untrusted `html` **string** into trusted string by removing\n * dangerous content.\n *\n * This method parses the `html` and locates potentially dangerous content (such as urls and\n * javascript) and removes it.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustHtml}.\n *\n * @param unsafeHtml untrusted `html`, typically from the user.\n * @returns `html` string which is safe to display to user, because all of the dangerous javascript\n * and urls have been removed.\n *\n * @codeGenApi\n */\nfunction ɵɵsanitizeHtml(unsafeHtml) {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return trustedHTMLFromStringBypass(sanitizer.sanitize(SecurityContext.HTML, unsafeHtml) || '');\n }\n if (allowSanitizationBypassAndThrow(unsafeHtml, \"HTML\" /* BypassType.Html */)) {\n return trustedHTMLFromStringBypass(unwrapSafeValue(unsafeHtml));\n }\n return _sanitizeHtml(getDocument(), renderStringify(unsafeHtml));\n}\n/**\n * A `style` sanitizer which converts untrusted `style` **string** into trusted string by removing\n * dangerous content.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustStyle}.\n *\n * @param unsafeStyle untrusted `style`, typically from the user.\n * @returns `style` string which is safe to bind to the `style` properties.\n *\n * @codeGenApi\n */\nfunction ɵɵsanitizeStyle(unsafeStyle) {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return sanitizer.sanitize(SecurityContext.STYLE, unsafeStyle) || '';\n }\n if (allowSanitizationBypassAndThrow(unsafeStyle, \"Style\" /* BypassType.Style */)) {\n return unwrapSafeValue(unsafeStyle);\n }\n return renderStringify(unsafeStyle);\n}\n/**\n * A `url` sanitizer which converts untrusted `url` **string** into trusted string by removing\n * dangerous\n * content.\n *\n * This method parses the `url` and locates potentially dangerous content (such as javascript) and\n * removes it.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustUrl}.\n *\n * @param unsafeUrl untrusted `url`, typically from the user.\n * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because\n * all of the dangerous javascript has been removed.\n *\n * @codeGenApi\n */\nfunction ɵɵsanitizeUrl(unsafeUrl) {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return sanitizer.sanitize(SecurityContext.URL, unsafeUrl) || '';\n }\n if (allowSanitizationBypassAndThrow(unsafeUrl, \"URL\" /* BypassType.Url */)) {\n return unwrapSafeValue(unsafeUrl);\n }\n return _sanitizeUrl(renderStringify(unsafeUrl));\n}\n/**\n * A `url` sanitizer which only lets trusted `url`s through.\n *\n * This passes only `url`s marked trusted by calling {@link bypassSanitizationTrustResourceUrl}.\n *\n * @param unsafeResourceUrl untrusted `url`, typically from the user.\n * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because\n * only trusted `url`s have been allowed to pass.\n *\n * @codeGenApi\n */\nfunction ɵɵsanitizeResourceUrl(unsafeResourceUrl) {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return trustedScriptURLFromStringBypass(sanitizer.sanitize(SecurityContext.RESOURCE_URL, unsafeResourceUrl) || '');\n }\n if (allowSanitizationBypassAndThrow(unsafeResourceUrl, \"ResourceURL\" /* BypassType.ResourceUrl */)) {\n return trustedScriptURLFromStringBypass(unwrapSafeValue(unsafeResourceUrl));\n }\n throw new RuntimeError(904 /* RuntimeErrorCode.UNSAFE_VALUE_IN_RESOURCE_URL */, ngDevMode && `unsafe value used in a resource URL context (see ${XSS_SECURITY_URL})`);\n}\n/**\n * A `script` sanitizer which only lets trusted javascript through.\n *\n * This passes only `script`s marked trusted by calling {@link\n * bypassSanitizationTrustScript}.\n *\n * @param unsafeScript untrusted `script`, typically from the user.\n * @returns `url` string which is safe to bind to the `<script>` element such as `<img src>`,\n * because only trusted `scripts` have been allowed to pass.\n *\n * @codeGenApi\n */\nfunction ɵɵsanitizeScript(unsafeScript) {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return trustedScriptFromStringBypass(sanitizer.sanitize(SecurityContext.SCRIPT, unsafeScript) || '');\n }\n if (allowSanitizationBypassAndThrow(unsafeScript, \"Script\" /* BypassType.Script */)) {\n return trustedScriptFromStringBypass(unwrapSafeValue(unsafeScript));\n }\n throw new RuntimeError(905 /* RuntimeErrorCode.UNSAFE_VALUE_IN_SCRIPT */, ngDevMode && 'unsafe value used in a script context');\n}\n/**\n * A template tag function for promoting the associated constant literal to a\n * TrustedHTML. Interpolation is explicitly not allowed.\n *\n * @param html constant template literal containing trusted HTML.\n * @returns TrustedHTML wrapping `html`.\n *\n * @security This is a security-sensitive function and should only be used to\n * convert constant values of attributes and properties found in\n * application-provided Angular templates to TrustedHTML.\n *\n * @codeGenApi\n */\nfunction ɵɵtrustConstantHtml(html) {\n // The following runtime check ensures that the function was called as a\n // template tag (e.g. ɵɵtrustConstantHtml`content`), without any interpolation\n // (e.g. not ɵɵtrustConstantHtml`content ${variable}`). A TemplateStringsArray\n // is an array with a `raw` property that is also an array. The associated\n // template literal has no interpolation if and only if the length of the\n // TemplateStringsArray is 1.\n if (ngDevMode && (!Array.isArray(html) || !Array.isArray(html.raw) || html.length !== 1)) {\n throw new Error(`Unexpected interpolation in trusted HTML constant: ${html.join('?')}`);\n }\n return trustedHTMLFromString(html[0]);\n}\n/**\n * A template tag function for promoting the associated constant literal to a\n * TrustedScriptURL. Interpolation is explicitly not allowed.\n *\n * @param url constant template literal containing a trusted script URL.\n * @returns TrustedScriptURL wrapping `url`.\n *\n * @security This is a security-sensitive function and should only be used to\n * convert constant values of attributes and properties found in\n * application-provided Angular templates to TrustedScriptURL.\n *\n * @codeGenApi\n */\nfunction ɵɵtrustConstantResourceUrl(url) {\n // The following runtime check ensures that the function was called as a\n // template tag (e.g. ɵɵtrustConstantResourceUrl`content`), without any\n // interpolation (e.g. not ɵɵtrustConstantResourceUrl`content ${variable}`). A\n // TemplateStringsArray is an array with a `raw` property that is also an\n // array. The associated template literal has no interpolation if and only if\n // the length of the TemplateStringsArray is 1.\n if (ngDevMode && (!Array.isArray(url) || !Array.isArray(url.raw) || url.length !== 1)) {\n throw new Error(`Unexpected interpolation in trusted URL constant: ${url.join('?')}`);\n }\n return trustedScriptURLFromString(url[0]);\n}\n/**\n * Detects which sanitizer to use for URL property, based on tag name and prop name.\n *\n * The rules are based on the RESOURCE_URL context config from\n * `packages/compiler/src/schema/dom_security_schema.ts`.\n * If tag and prop names don't match Resource URL schema, use URL sanitizer.\n */\nfunction getUrlSanitizer(tag, prop) {\n if ((prop === 'src' &&\n (tag === 'embed' || tag === 'frame' || tag === 'iframe' || tag === 'media' ||\n tag === 'script')) ||\n (prop === 'href' && (tag === 'base' || tag === 'link'))) {\n return ɵɵsanitizeResourceUrl;\n }\n return ɵɵsanitizeUrl;\n}\n/**\n * Sanitizes URL, selecting sanitizer function based on tag and property names.\n *\n * This function is used in case we can't define security context at compile time, when only prop\n * name is available. This happens when we generate host bindings for Directives/Components. The\n * host element is unknown at compile time, so we defer calculation of specific sanitizer to\n * runtime.\n *\n * @param unsafeUrl untrusted `url`, typically from the user.\n * @param tag target element tag name.\n * @param prop name of the property that contains the value.\n * @returns `url` string which is safe to bind.\n *\n * @codeGenApi\n */\nfunction ɵɵsanitizeUrlOrResourceUrl(unsafeUrl, tag, prop) {\n return getUrlSanitizer(tag, prop)(unsafeUrl);\n}\nfunction validateAgainstEventProperties(name) {\n if (name.toLowerCase().startsWith('on')) {\n const errorMessage = `Binding to event property '${name}' is disallowed for security reasons, ` +\n `please use (${name.slice(2)})=...` +\n `\\nIf '${name}' is a directive input, make sure the directive is imported by the` +\n ` current module.`;\n throw new RuntimeError(306 /* RuntimeErrorCode.INVALID_EVENT_BINDING */, errorMessage);\n }\n}\nfunction validateAgainstEventAttributes(name) {\n if (name.toLowerCase().startsWith('on')) {\n const errorMessage = `Binding to event attribute '${name}' is disallowed for security reasons, ` +\n `please use (${name.slice(2)})=...`;\n throw new RuntimeError(306 /* RuntimeErrorCode.INVALID_EVENT_BINDING */, errorMessage);\n }\n}\nfunction getSanitizer() {\n const lView = getLView();\n return lView && lView[SANITIZER];\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A multi-provider token for initialization functions that will run upon construction of an\n * environment injector.\n *\n * @publicApi\n */\nconst ENVIRONMENT_INITIALIZER = new InjectionToken('ENVIRONMENT_INITIALIZER');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * An InjectionToken that gets the current `Injector` for `createInjector()`-style injectors.\n *\n * Requesting this token instead of `Injector` allows `StaticInjector` to be tree-shaken from a\n * project.\n *\n * @publicApi\n */\nconst INJECTOR = new InjectionToken('INJECTOR', \n// Disable tslint because this is const enum which gets inlined not top level prop access.\n// tslint:disable-next-line: no-toplevel-property-access\n-1 /* InjectorMarkers.Injector */);\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst INJECTOR_DEF_TYPES = new InjectionToken('INJECTOR_DEF_TYPES');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass NullInjector {\n get(token, notFoundValue = THROW_IF_NOT_FOUND) {\n if (notFoundValue === THROW_IF_NOT_FOUND) {\n const error = new Error(`NullInjectorError: No provider for ${stringify(token)}!`);\n error.name = 'NullInjectorError';\n throw error;\n }\n return notFoundValue;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Wrap an array of `Provider`s into `EnvironmentProviders`, preventing them from being accidentally\n * referenced in `@Component in a component injector.\n */\nfunction makeEnvironmentProviders(providers) {\n return {\n ɵproviders: providers,\n };\n}\n/**\n * Collects providers from all NgModules and standalone components, including transitively imported\n * ones.\n *\n * Providers extracted via `importProvidersFrom` are only usable in an application injector or\n * another environment injector (such as a route injector). They should not be used in component\n * providers.\n *\n * More information about standalone components can be found in [this\n * guide](guide/standalone-components).\n *\n * @usageNotes\n * The results of the `importProvidersFrom` call can be used in the `bootstrapApplication` call:\n *\n * ```typescript\n * await bootstrapApplication(RootComponent, {\n * providers: [\n * importProvidersFrom(NgModuleOne, NgModuleTwo)\n * ]\n * });\n * ```\n *\n * You can also use the `importProvidersFrom` results in the `providers` field of a route, when a\n * standalone component is used:\n *\n * ```typescript\n * export const ROUTES: Route[] = [\n * {\n * path: 'foo',\n * providers: [\n * importProvidersFrom(NgModuleOne, NgModuleTwo)\n * ],\n * component: YourStandaloneComponent\n * }\n * ];\n * ```\n *\n * @returns Collected providers from the specified list of types.\n * @publicApi\n */\nfunction importProvidersFrom(...sources) {\n return {\n ɵproviders: internalImportProvidersFrom(true, sources),\n ɵfromNgModule: true,\n };\n}\nfunction internalImportProvidersFrom(checkForStandaloneCmp, ...sources) {\n const providersOut = [];\n const dedup = new Set(); // already seen types\n let injectorTypesWithProviders;\n deepForEach(sources, source => {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && checkForStandaloneCmp) {\n const cmpDef = getComponentDef(source);\n if (cmpDef?.standalone) {\n throw new RuntimeError(800 /* RuntimeErrorCode.IMPORT_PROVIDERS_FROM_STANDALONE */, `Importing providers supports NgModule or ModuleWithProviders but got a standalone component \"${stringifyForError(source)}\"`);\n }\n }\n // Narrow `source` to access the internal type analogue for `ModuleWithProviders`.\n const internalSource = source;\n if (walkProviderTree(internalSource, providersOut, [], dedup)) {\n injectorTypesWithProviders || (injectorTypesWithProviders = []);\n injectorTypesWithProviders.push(internalSource);\n }\n });\n // Collect all providers from `ModuleWithProviders` types.\n if (injectorTypesWithProviders !== undefined) {\n processInjectorTypesWithProviders(injectorTypesWithProviders, providersOut);\n }\n return providersOut;\n}\n/**\n * Collects all providers from the list of `ModuleWithProviders` and appends them to the provided\n * array.\n */\nfunction processInjectorTypesWithProviders(typesWithProviders, providersOut) {\n for (let i = 0; i < typesWithProviders.length; i++) {\n const { ngModule, providers } = typesWithProviders[i];\n deepForEachProvider(providers, provider => {\n ngDevMode && validateProvider(provider, providers || EMPTY_ARRAY, ngModule);\n providersOut.push(provider);\n });\n }\n}\n/**\n * The logic visits an `InjectorType`, an `InjectorTypeWithProviders`, or a standalone\n * `ComponentType`, and all of its transitive providers and collects providers.\n *\n * If an `InjectorTypeWithProviders` that declares providers besides the type is specified,\n * the function will return \"true\" to indicate that the providers of the type definition need\n * to be processed. This allows us to process providers of injector types after all imports of\n * an injector definition are processed. (following View Engine semantics: see FW-1349)\n */\nfunction walkProviderTree(container, providersOut, parents, dedup) {\n container = resolveForwardRef(container);\n if (!container)\n return false;\n // The actual type which had the definition. Usually `container`, but may be an unwrapped type\n // from `InjectorTypeWithProviders`.\n let defType = null;\n let injDef = getInjectorDef(container);\n const cmpDef = !injDef && getComponentDef(container);\n if (!injDef && !cmpDef) {\n // `container` is not an injector type or a component type. It might be:\n // * An `InjectorTypeWithProviders` that wraps an injector type.\n // * A standalone directive or pipe that got pulled in from a standalone component's\n // dependencies.\n // Try to unwrap it as an `InjectorTypeWithProviders` first.\n const ngModule = container.ngModule;\n injDef = getInjectorDef(ngModule);\n if (injDef) {\n defType = ngModule;\n }\n else {\n // Not a component or injector type, so ignore it.\n return false;\n }\n }\n else if (cmpDef && !cmpDef.standalone) {\n return false;\n }\n else {\n defType = container;\n }\n // Check for circular dependencies.\n if (ngDevMode && parents.indexOf(defType) !== -1) {\n const defName = stringify(defType);\n const path = parents.map(stringify);\n throwCyclicDependencyError(defName, path);\n }\n // Check for multiple imports of the same module\n const isDuplicate = dedup.has(defType);\n if (cmpDef) {\n if (isDuplicate) {\n // This component definition has already been processed.\n return false;\n }\n dedup.add(defType);\n if (cmpDef.dependencies) {\n const deps = typeof cmpDef.dependencies === 'function' ? cmpDef.dependencies() : cmpDef.dependencies;\n for (const dep of deps) {\n walkProviderTree(dep, providersOut, parents, dedup);\n }\n }\n }\n else if (injDef) {\n // First, include providers from any imports.\n if (injDef.imports != null && !isDuplicate) {\n // Before processing defType's imports, add it to the set of parents. This way, if it ends\n // up deeply importing itself, this can be detected.\n ngDevMode && parents.push(defType);\n // Add it to the set of dedups. This way we can detect multiple imports of the same module\n dedup.add(defType);\n let importTypesWithProviders;\n try {\n deepForEach(injDef.imports, imported => {\n if (walkProviderTree(imported, providersOut, parents, dedup)) {\n importTypesWithProviders || (importTypesWithProviders = []);\n // If the processed import is an injector type with providers, we store it in the\n // list of import types with providers, so that we can process those afterwards.\n importTypesWithProviders.push(imported);\n }\n });\n }\n finally {\n // Remove it from the parents set when finished.\n ngDevMode && parents.pop();\n }\n // Imports which are declared with providers (TypeWithProviders) need to be processed\n // after all imported modules are processed. This is similar to how View Engine\n // processes/merges module imports in the metadata resolver. See: FW-1349.\n if (importTypesWithProviders !== undefined) {\n processInjectorTypesWithProviders(importTypesWithProviders, providersOut);\n }\n }\n if (!isDuplicate) {\n // Track the InjectorType and add a provider for it.\n // It's important that this is done after the def's imports.\n const factory = getFactoryDef(defType) || (() => new defType());\n // Append extra providers to make more info available for consumers (to retrieve an injector\n // type), as well as internally (to calculate an injection scope correctly and eagerly\n // instantiate a `defType` when an injector is created).\n providersOut.push(\n // Provider to create `defType` using its factory.\n { provide: defType, useFactory: factory, deps: EMPTY_ARRAY }, \n // Make this `defType` available to an internal logic that calculates injector scope.\n { provide: INJECTOR_DEF_TYPES, useValue: defType, multi: true }, \n // Provider to eagerly instantiate `defType` via `ENVIRONMENT_INITIALIZER`.\n { provide: ENVIRONMENT_INITIALIZER, useValue: () => ɵɵinject(defType), multi: true } //\n );\n }\n // Next, include providers listed on the definition itself.\n const defProviders = injDef.providers;\n if (defProviders != null && !isDuplicate) {\n const injectorType = container;\n deepForEachProvider(defProviders, provider => {\n ngDevMode && validateProvider(provider, defProviders, injectorType);\n providersOut.push(provider);\n });\n }\n }\n else {\n // Should not happen, but just in case.\n return false;\n }\n return (defType !== container &&\n container.providers !== undefined);\n}\nfunction validateProvider(provider, providers, containerType) {\n if (isTypeProvider(provider) || isValueProvider(provider) || isFactoryProvider(provider) ||\n isExistingProvider(provider)) {\n return;\n }\n // Here we expect the provider to be a `useClass` provider (by elimination).\n const classRef = resolveForwardRef(provider && (provider.useClass || provider.provide));\n if (!classRef) {\n throwInvalidProviderError(containerType, providers, provider);\n }\n}\nfunction deepForEachProvider(providers, fn) {\n for (let provider of providers) {\n if (isEnvironmentProviders(provider)) {\n provider = provider.ɵproviders;\n }\n if (Array.isArray(provider)) {\n deepForEachProvider(provider, fn);\n }\n else {\n fn(provider);\n }\n }\n}\nconst USE_VALUE$1 = getClosureSafeProperty({ provide: String, useValue: getClosureSafeProperty });\nfunction isValueProvider(value) {\n return value !== null && typeof value == 'object' && USE_VALUE$1 in value;\n}\nfunction isExistingProvider(value) {\n return !!(value && value.useExisting);\n}\nfunction isFactoryProvider(value) {\n return !!(value && value.useFactory);\n}\nfunction isTypeProvider(value) {\n return typeof value === 'function';\n}\nfunction isClassProvider(value) {\n return !!value.useClass;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * An internal token whose presence in an injector indicates that the injector should treat itself\n * as a root scoped injector when processing requests for unknown tokens which may indicate\n * they are provided in the root scope.\n */\nconst INJECTOR_SCOPE = new InjectionToken('Set Injector scope.');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Marker which indicates that a value has not yet been created from the factory function.\n */\nconst NOT_YET = {};\n/**\n * Marker which indicates that the factory function for a token is in the process of being called.\n *\n * If the injector is asked to inject a token with its value set to CIRCULAR, that indicates\n * injection of a dependency has recursively attempted to inject the original token, and there is\n * a circular dependency among the providers.\n */\nconst CIRCULAR = {};\n/**\n * A lazily initialized NullInjector.\n */\nlet NULL_INJECTOR$1 = undefined;\nfunction getNullInjector() {\n if (NULL_INJECTOR$1 === undefined) {\n NULL_INJECTOR$1 = new NullInjector();\n }\n return NULL_INJECTOR$1;\n}\n/**\n * An `Injector` that's part of the environment injector hierarchy, which exists outside of the\n * component tree.\n */\nclass EnvironmentInjector {\n}\nclass R3Injector extends EnvironmentInjector {\n constructor(providers, parent, source, scopes) {\n super();\n this.parent = parent;\n this.source = source;\n this.scopes = scopes;\n /**\n * Map of tokens to records which contain the instances of those tokens.\n * - `null` value implies that we don't have the record. Used by tree-shakable injectors\n * to prevent further searches.\n */\n this.records = new Map();\n /**\n * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.\n */\n this._ngOnDestroyHooks = new Set();\n this._onDestroyHooks = [];\n this._destroyed = false;\n // Start off by creating Records for every provider.\n forEachSingleProvider(providers, provider => this.processProvider(provider));\n // Make sure the INJECTOR token provides this injector.\n this.records.set(INJECTOR, makeRecord(undefined, this));\n // And `EnvironmentInjector` if the current injector is supposed to be env-scoped.\n if (scopes.has('environment')) {\n this.records.set(EnvironmentInjector, makeRecord(undefined, this));\n }\n // Detect whether this injector has the APP_ROOT_SCOPE token and thus should provide\n // any injectable scoped to APP_ROOT_SCOPE.\n const record = this.records.get(INJECTOR_SCOPE);\n if (record != null && typeof record.value === 'string') {\n this.scopes.add(record.value);\n }\n this.injectorDefTypes =\n new Set(this.get(INJECTOR_DEF_TYPES.multi, EMPTY_ARRAY, InjectFlags.Self));\n }\n /**\n * Flag indicating that this injector was previously destroyed.\n */\n get destroyed() {\n return this._destroyed;\n }\n /**\n * Destroy the injector and release references to every instance or provider associated with it.\n *\n * Also calls the `OnDestroy` lifecycle hooks of every instance that was created for which a\n * hook was found.\n */\n destroy() {\n this.assertNotDestroyed();\n // Set destroyed = true first, in case lifecycle hooks re-enter destroy().\n this._destroyed = true;\n try {\n // Call all the lifecycle hooks.\n for (const service of this._ngOnDestroyHooks) {\n service.ngOnDestroy();\n }\n for (const hook of this._onDestroyHooks) {\n hook();\n }\n }\n finally {\n // Release all references.\n this.records.clear();\n this._ngOnDestroyHooks.clear();\n this.injectorDefTypes.clear();\n this._onDestroyHooks.length = 0;\n }\n }\n onDestroy(callback) {\n this._onDestroyHooks.push(callback);\n }\n runInContext(fn) {\n this.assertNotDestroyed();\n const previousInjector = setCurrentInjector(this);\n const previousInjectImplementation = setInjectImplementation(undefined);\n try {\n return fn();\n }\n finally {\n setCurrentInjector(previousInjector);\n setInjectImplementation(previousInjectImplementation);\n }\n }\n get(token, notFoundValue = THROW_IF_NOT_FOUND, flags = InjectFlags.Default) {\n this.assertNotDestroyed();\n flags = convertToBitFlags(flags);\n // Set the injection context.\n const previousInjector = setCurrentInjector(this);\n const previousInjectImplementation = setInjectImplementation(undefined);\n try {\n // Check for the SkipSelf flag.\n if (!(flags & InjectFlags.SkipSelf)) {\n // SkipSelf isn't set, check if the record belongs to this injector.\n let record = this.records.get(token);\n if (record === undefined) {\n // No record, but maybe the token is scoped to this injector. Look for an injectable\n // def with a scope matching this injector.\n const def = couldBeInjectableType(token) && getInjectableDef(token);\n if (def && this.injectableDefInScope(def)) {\n // Found an injectable def and it's scoped to this injector. Pretend as if it was here\n // all along.\n record = makeRecord(injectableDefOrInjectorDefFactory(token), NOT_YET);\n }\n else {\n record = null;\n }\n this.records.set(token, record);\n }\n // If a record was found, get the instance for it and return it.\n if (record != null /* NOT null || undefined */) {\n return this.hydrate(token, record);\n }\n }\n // Select the next injector based on the Self flag - if self is set, the next injector is\n // the NullInjector, otherwise it's the parent.\n const nextInjector = !(flags & InjectFlags.Self) ? this.parent : getNullInjector();\n // Set the notFoundValue based on the Optional flag - if optional is set and notFoundValue\n // is undefined, the value is null, otherwise it's the notFoundValue.\n notFoundValue = (flags & InjectFlags.Optional) && notFoundValue === THROW_IF_NOT_FOUND ?\n null :\n notFoundValue;\n return nextInjector.get(token, notFoundValue);\n }\n catch (e) {\n if (e.name === 'NullInjectorError') {\n const path = e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || [];\n path.unshift(stringify(token));\n if (previousInjector) {\n // We still have a parent injector, keep throwing\n throw e;\n }\n else {\n // Format & throw the final error message when we don't have any previous injector\n return catchInjectorError(e, token, 'R3InjectorError', this.source);\n }\n }\n else {\n throw e;\n }\n }\n finally {\n // Lastly, restore the previous injection context.\n setInjectImplementation(previousInjectImplementation);\n setCurrentInjector(previousInjector);\n }\n }\n /** @internal */\n resolveInjectorInitializers() {\n const previousInjector = setCurrentInjector(this);\n const previousInjectImplementation = setInjectImplementation(undefined);\n try {\n const initializers = this.get(ENVIRONMENT_INITIALIZER.multi, EMPTY_ARRAY, InjectFlags.Self);\n if (ngDevMode && !Array.isArray(initializers)) {\n throw new RuntimeError(-209 /* RuntimeErrorCode.INVALID_MULTI_PROVIDER */, 'Unexpected type of the `ENVIRONMENT_INITIALIZER` token value ' +\n `(expected an array, but got ${typeof initializers}). ` +\n 'Please check that the `ENVIRONMENT_INITIALIZER` token is configured as a ' +\n '`multi: true` provider.');\n }\n for (const initializer of initializers) {\n initializer();\n }\n }\n finally {\n setCurrentInjector(previousInjector);\n setInjectImplementation(previousInjectImplementation);\n }\n }\n toString() {\n const tokens = [];\n const records = this.records;\n for (const token of records.keys()) {\n tokens.push(stringify(token));\n }\n return `R3Injector[${tokens.join(', ')}]`;\n }\n assertNotDestroyed() {\n if (this._destroyed) {\n throw new RuntimeError(205 /* RuntimeErrorCode.INJECTOR_ALREADY_DESTROYED */, ngDevMode && 'Injector has already been destroyed.');\n }\n }\n /**\n * Process a `SingleProvider` and add it.\n */\n processProvider(provider) {\n // Determine the token from the provider. Either it's its own token, or has a {provide: ...}\n // property.\n provider = resolveForwardRef(provider);\n let token = isTypeProvider(provider) ? provider : resolveForwardRef(provider && provider.provide);\n // Construct a `Record` for the provider.\n const record = providerToRecord(provider);\n if (!isTypeProvider(provider) && provider.multi === true) {\n // If the provider indicates that it's a multi-provider, process it specially.\n // First check whether it's been defined already.\n let multiRecord = this.records.get(token);\n if (multiRecord) {\n // It has. Throw a nice error if\n if (ngDevMode && multiRecord.multi === undefined) {\n throwMixedMultiProviderError();\n }\n }\n else {\n multiRecord = makeRecord(undefined, NOT_YET, true);\n multiRecord.factory = () => injectArgs(multiRecord.multi);\n this.records.set(token, multiRecord);\n }\n token = provider;\n multiRecord.multi.push(provider);\n }\n else {\n const existing = this.records.get(token);\n if (ngDevMode && existing && existing.multi !== undefined) {\n throwMixedMultiProviderError();\n }\n }\n this.records.set(token, record);\n }\n hydrate(token, record) {\n if (ngDevMode && record.value === CIRCULAR) {\n throwCyclicDependencyError(stringify(token));\n }\n else if (record.value === NOT_YET) {\n record.value = CIRCULAR;\n record.value = record.factory();\n }\n if (typeof record.value === 'object' && record.value && hasOnDestroy(record.value)) {\n this._ngOnDestroyHooks.add(record.value);\n }\n return record.value;\n }\n injectableDefInScope(def) {\n if (!def.providedIn) {\n return false;\n }\n const providedIn = resolveForwardRef(def.providedIn);\n if (typeof providedIn === 'string') {\n return providedIn === 'any' || (this.scopes.has(providedIn));\n }\n else {\n return this.injectorDefTypes.has(providedIn);\n }\n }\n}\nfunction injectableDefOrInjectorDefFactory(token) {\n // Most tokens will have an injectable def directly on them, which specifies a factory directly.\n const injectableDef = getInjectableDef(token);\n const factory = injectableDef !== null ? injectableDef.factory : getFactoryDef(token);\n if (factory !== null) {\n return factory;\n }\n // InjectionTokens should have an injectable def (ɵprov) and thus should be handled above.\n // If it's missing that, it's an error.\n if (token instanceof InjectionToken) {\n throw new RuntimeError(204 /* RuntimeErrorCode.INVALID_INJECTION_TOKEN */, ngDevMode && `Token ${stringify(token)} is missing a ɵprov definition.`);\n }\n // Undecorated types can sometimes be created if they have no constructor arguments.\n if (token instanceof Function) {\n return getUndecoratedInjectableFactory(token);\n }\n // There was no way to resolve a factory for this token.\n throw new RuntimeError(204 /* RuntimeErrorCode.INVALID_INJECTION_TOKEN */, ngDevMode && 'unreachable');\n}\nfunction getUndecoratedInjectableFactory(token) {\n // If the token has parameters then it has dependencies that we cannot resolve implicitly.\n const paramLength = token.length;\n if (paramLength > 0) {\n const args = newArray(paramLength, '?');\n throw new RuntimeError(204 /* RuntimeErrorCode.INVALID_INJECTION_TOKEN */, ngDevMode && `Can't resolve all parameters for ${stringify(token)}: (${args.join(', ')}).`);\n }\n // The constructor function appears to have no parameters.\n // This might be because it inherits from a super-class. In which case, use an injectable\n // def from an ancestor if there is one.\n // Otherwise this really is a simple class with no dependencies, so return a factory that\n // just instantiates the zero-arg constructor.\n const inheritedInjectableDef = getInheritedInjectableDef(token);\n if (inheritedInjectableDef !== null) {\n return () => inheritedInjectableDef.factory(token);\n }\n else {\n return () => new token();\n }\n}\nfunction providerToRecord(provider) {\n if (isValueProvider(provider)) {\n return makeRecord(undefined, provider.useValue);\n }\n else {\n const factory = providerToFactory(provider);\n return makeRecord(factory, NOT_YET);\n }\n}\n/**\n * Converts a `SingleProvider` into a factory function.\n *\n * @param provider provider to convert to factory\n */\nfunction providerToFactory(provider, ngModuleType, providers) {\n let factory = undefined;\n if (ngDevMode && isEnvironmentProviders(provider)) {\n throwInvalidProviderError(undefined, providers, provider);\n }\n if (isTypeProvider(provider)) {\n const unwrappedProvider = resolveForwardRef(provider);\n return getFactoryDef(unwrappedProvider) || injectableDefOrInjectorDefFactory(unwrappedProvider);\n }\n else {\n if (isValueProvider(provider)) {\n factory = () => resolveForwardRef(provider.useValue);\n }\n else if (isFactoryProvider(provider)) {\n factory = () => provider.useFactory(...injectArgs(provider.deps || []));\n }\n else if (isExistingProvider(provider)) {\n factory = () => ɵɵinject(resolveForwardRef(provider.useExisting));\n }\n else {\n const classRef = resolveForwardRef(provider &&\n (provider.useClass || provider.provide));\n if (ngDevMode && !classRef) {\n throwInvalidProviderError(ngModuleType, providers, provider);\n }\n if (hasDeps(provider)) {\n factory = () => new (classRef)(...injectArgs(provider.deps));\n }\n else {\n return getFactoryDef(classRef) || injectableDefOrInjectorDefFactory(classRef);\n }\n }\n }\n return factory;\n}\nfunction makeRecord(factory, value, multi = false) {\n return {\n factory: factory,\n value: value,\n multi: multi ? [] : undefined,\n };\n}\nfunction hasDeps(value) {\n return !!value.deps;\n}\nfunction hasOnDestroy(value) {\n return value !== null && typeof value === 'object' &&\n typeof value.ngOnDestroy === 'function';\n}\nfunction couldBeInjectableType(value) {\n return (typeof value === 'function') ||\n (typeof value === 'object' && value instanceof InjectionToken);\n}\nfunction forEachSingleProvider(providers, fn) {\n for (const provider of providers) {\n if (Array.isArray(provider)) {\n forEachSingleProvider(provider, fn);\n }\n else if (provider && isEnvironmentProviders(provider)) {\n forEachSingleProvider(provider.ɵproviders, fn);\n }\n else {\n fn(provider);\n }\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Represents a component created by a `ComponentFactory`.\n * Provides access to the component instance and related objects,\n * and provides the means of destroying the instance.\n *\n * @publicApi\n */\nclass ComponentRef$1 {\n}\n/**\n * Base class for a factory that can create a component dynamically.\n * Instantiate a factory for a given type of component with `resolveComponentFactory()`.\n * Use the resulting `ComponentFactory.create()` method to create a component of that type.\n *\n * @see [Dynamic Components](guide/dynamic-component-loader)\n *\n * @publicApi\n *\n * @deprecated Angular no longer requires Component factories. Please use other APIs where\n * Component class can be used directly.\n */\nclass ComponentFactory$1 {\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction noComponentFactoryError(component) {\n const error = Error(`No component factory found for ${stringify(component)}. Did you add it to @NgModule.entryComponents?`);\n error[ERROR_COMPONENT] = component;\n return error;\n}\nconst ERROR_COMPONENT = 'ngComponent';\nfunction getComponent$1(error) {\n return error[ERROR_COMPONENT];\n}\nclass _NullComponentFactoryResolver {\n resolveComponentFactory(component) {\n throw noComponentFactoryError(component);\n }\n}\n/**\n * A simple registry that maps `Components` to generated `ComponentFactory` classes\n * that can be used to create instances of components.\n * Use to obtain the factory for a given component type,\n * then use the factory's `create()` method to create a component of that type.\n *\n * Note: since v13, dynamic component creation via\n * [`ViewContainerRef.createComponent`](api/core/ViewContainerRef#createComponent)\n * does **not** require resolving component factory: component class can be used directly.\n *\n * @publicApi\n *\n * @deprecated Angular no longer requires Component factories. Please use other APIs where\n * Component class can be used directly.\n */\nclass ComponentFactoryResolver$1 {\n}\nComponentFactoryResolver$1.NULL = ( /* @__PURE__ */new _NullComponentFactoryResolver());\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Creates an ElementRef from the most recent node.\n *\n * @returns The ElementRef instance to use\n */\nfunction injectElementRef() {\n return createElementRef(getCurrentTNode(), getLView());\n}\n/**\n * Creates an ElementRef given a node.\n *\n * @param tNode The node for which you'd like an ElementRef\n * @param lView The view to which the node belongs\n * @returns The ElementRef instance to use\n */\nfunction createElementRef(tNode, lView) {\n return new ElementRef(getNativeByTNode(tNode, lView));\n}\n/**\n * A wrapper around a native element inside of a View.\n *\n * An `ElementRef` is backed by a render-specific element. In the browser, this is usually a DOM\n * element.\n *\n * @security Permitting direct access to the DOM can make your application more vulnerable to\n * XSS attacks. Carefully review any use of `ElementRef` in your code. For more detail, see the\n * [Security Guide](https://g.co/ng/security).\n *\n * @publicApi\n */\n// Note: We don't expose things like `Injector`, `ViewContainer`, ... here,\n// i.e. users have to ask for what they need. With that, we can build better analysis tools\n// and could do better codegen in the future.\nclass ElementRef {\n constructor(nativeElement) {\n this.nativeElement = nativeElement;\n }\n}\n/**\n * @internal\n * @nocollapse\n */\nElementRef.__NG_ELEMENT_ID__ = injectElementRef;\n/**\n * Unwraps `ElementRef` and return the `nativeElement`.\n *\n * @param value value to unwrap\n * @returns `nativeElement` if `ElementRef` otherwise returns value as is.\n */\nfunction unwrapElementRef(value) {\n return value instanceof ElementRef ? value.nativeElement : value;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Creates and initializes a custom renderer that implements the `Renderer2` base class.\n *\n * @publicApi\n */\nclass RendererFactory2 {\n}\n/**\n * Extend this base class to implement custom rendering. By default, Angular\n * renders a template into DOM. You can use custom rendering to intercept\n * rendering calls, or to render to something other than DOM.\n *\n * Create your custom renderer using `RendererFactory2`.\n *\n * Use a custom renderer to bypass Angular's templating and\n * make custom UI changes that can't be expressed declaratively.\n * For example if you need to set a property or an attribute whose name is\n * not statically known, use the `setProperty()` or\n * `setAttribute()` method.\n *\n * @publicApi\n */\nclass Renderer2 {\n}\n/**\n * @internal\n * @nocollapse\n */\nRenderer2.__NG_ELEMENT_ID__ = () => injectRenderer2();\n/** Injects a Renderer2 for the current component. */\nfunction injectRenderer2() {\n // We need the Renderer to be based on the component that it's being injected into, however since\n // DI happens before we've entered its view, `getLView` will return the parent view instead.\n const lView = getLView();\n const tNode = getCurrentTNode();\n const nodeAtIndex = getComponentLViewByIndex(tNode.index, lView);\n return (isLView(nodeAtIndex) ? nodeAtIndex : lView)[RENDERER];\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Sanitizer is used by the views to sanitize potentially dangerous values.\n *\n * @publicApi\n */\nclass Sanitizer {\n}\n/** @nocollapse */\nSanitizer.ɵprov = ɵɵdefineInjectable({\n token: Sanitizer,\n providedIn: 'root',\n factory: () => null,\n});\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description Represents the version of Angular\n *\n * @publicApi\n */\nclass Version {\n constructor(full) {\n this.full = full;\n this.major = full.split('.')[0];\n this.minor = full.split('.')[1];\n this.patch = full.split('.').slice(2).join('.');\n }\n}\n/**\n * @publicApi\n */\nconst VERSION = new Version('15.0.4');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// This default value is when checking the hierarchy for a token.\n//\n// It means both:\n// - the token is not provided by the current injector,\n// - only the element injectors should be checked (ie do not check module injectors\n//\n// mod1\n// /\n// el1 mod2\n// \\ /\n// el2\n//\n// When requesting el2.injector.get(token), we should check in the following order and return the\n// first found value:\n// - el2.injector.get(token, default)\n// - el1.injector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) -> do not check the module\n// - mod2.injector.get(token, default)\nconst NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR = {};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst ERROR_ORIGINAL_ERROR = 'ngOriginalError';\nfunction wrappedError(message, originalError) {\n const msg = `${message} caused by: ${originalError instanceof Error ? originalError.message : originalError}`;\n const error = Error(msg);\n error[ERROR_ORIGINAL_ERROR] = originalError;\n return error;\n}\nfunction getOriginalError(error) {\n return error[ERROR_ORIGINAL_ERROR];\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Provides a hook for centralized exception handling.\n *\n * The default implementation of `ErrorHandler` prints error messages to the `console`. To\n * intercept error handling, write a custom exception handler that replaces this default as\n * appropriate for your app.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * class MyErrorHandler implements ErrorHandler {\n * handleError(error) {\n * // do something with the exception\n * }\n * }\n *\n * @NgModule({\n * providers: [{provide: ErrorHandler, useClass: MyErrorHandler}]\n * })\n * class MyModule {}\n * ```\n *\n * @publicApi\n */\nclass ErrorHandler {\n constructor() {\n /**\n * @internal\n */\n this._console = console;\n }\n handleError(error) {\n const originalError = this._findOriginalError(error);\n this._console.error('ERROR', error);\n if (originalError) {\n this._console.error('ORIGINAL ERROR', originalError);\n }\n }\n /** @internal */\n _findOriginalError(error) {\n let e = error && getOriginalError(error);\n while (e && getOriginalError(e)) {\n e = getOriginalError(e);\n }\n return e || null;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction normalizeDebugBindingName(name) {\n // Attribute names with `$` (eg `x-y$`) are valid per spec, but unsupported by some browsers\n name = camelCaseToDashCase(name.replace(/[$@]/g, '_'));\n return `ng-reflect-${name}`;\n}\nconst CAMEL_CASE_REGEXP = /([A-Z])/g;\nfunction camelCaseToDashCase(input) {\n return input.replace(CAMEL_CASE_REGEXP, (...m) => '-' + m[1].toLowerCase());\n}\nfunction normalizeDebugBindingValue(value) {\n try {\n // Limit the size of the value as otherwise the DOM just gets polluted.\n return value != null ? value.toString().slice(0, 30) : value;\n }\n catch (e) {\n return '[ERROR] Exception while trying to serialize the value';\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n *\n * @codeGenApi\n */\nfunction ɵɵresolveWindow(element) {\n return element.ownerDocument.defaultView;\n}\n/**\n *\n * @codeGenApi\n */\nfunction ɵɵresolveDocument(element) {\n return element.ownerDocument;\n}\n/**\n *\n * @codeGenApi\n */\nfunction ɵɵresolveBody(element) {\n return element.ownerDocument.body;\n}\n/**\n * The special delimiter we use to separate property names, prefixes, and suffixes\n * in property binding metadata. See storeBindingMetadata().\n *\n * We intentionally use the Unicode \"REPLACEMENT CHARACTER\" (U+FFFD) as a delimiter\n * because it is a very uncommon character that is unlikely to be part of a user's\n * property names or interpolation strings. If it is in fact used in a property\n * binding, DebugElement.properties will not return the correct value for that\n * binding. However, there should be no runtime effect for real applications.\n *\n * This character is typically rendered as a question mark inside of a diamond.\n * See https://en.wikipedia.org/wiki/Specials_(Unicode_block)\n *\n */\nconst INTERPOLATION_DELIMITER = `�`;\n/**\n * Unwrap a value which might be behind a closure (for forward declaration reasons).\n */\nfunction maybeUnwrapFn(value) {\n if (value instanceof Function) {\n return value();\n }\n else {\n return value;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Verifies that a given type is a Standalone Component. */\nfunction assertStandaloneComponentType(type) {\n assertComponentDef(type);\n const componentDef = getComponentDef(type);\n if (!componentDef.standalone) {\n throw new RuntimeError(907 /* RuntimeErrorCode.TYPE_IS_NOT_STANDALONE */, `The ${stringifyForError(type)} component is not marked as standalone, ` +\n `but Angular expects to have a standalone component here. ` +\n `Please make sure the ${stringifyForError(type)} component has ` +\n `the \\`standalone: true\\` flag in the decorator.`);\n }\n}\n/** Verifies whether a given type is a component */\nfunction assertComponentDef(type) {\n if (!getComponentDef(type)) {\n throw new RuntimeError(906 /* RuntimeErrorCode.MISSING_GENERATED_DEF */, `The ${stringifyForError(type)} is not an Angular component, ` +\n `make sure it has the \\`@Component\\` decorator.`);\n }\n}\n/** Called when there are multiple component selectors that match a given node */\nfunction throwMultipleComponentError(tNode, first, second) {\n throw new RuntimeError(-300 /* RuntimeErrorCode.MULTIPLE_COMPONENTS_MATCH */, `Multiple components match node with tagname ${tNode.value}: ` +\n `${stringifyForError(first)} and ` +\n `${stringifyForError(second)}`);\n}\n/** Throws an ExpressionChangedAfterChecked error if checkNoChanges mode is on. */\nfunction throwErrorIfNoChangesMode(creationMode, oldValue, currValue, propName) {\n const field = propName ? ` for '${propName}'` : '';\n let msg = `ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value${field}: '${oldValue}'. Current value: '${currValue}'.`;\n if (creationMode) {\n msg +=\n ` It seems like the view has been created after its parent and its children have been dirty checked.` +\n ` Has it been created in a change detection hook?`;\n }\n throw new RuntimeError(-100 /* RuntimeErrorCode.EXPRESSION_CHANGED_AFTER_CHECKED */, msg);\n}\nfunction constructDetailsForInterpolation(lView, rootIndex, expressionIndex, meta, changedValue) {\n const [propName, prefix, ...chunks] = meta.split(INTERPOLATION_DELIMITER);\n let oldValue = prefix, newValue = prefix;\n for (let i = 0; i < chunks.length; i++) {\n const slotIdx = rootIndex + i;\n oldValue += `${lView[slotIdx]}${chunks[i]}`;\n newValue += `${slotIdx === expressionIndex ? changedValue : lView[slotIdx]}${chunks[i]}`;\n }\n return { propName, oldValue, newValue };\n}\n/**\n * Constructs an object that contains details for the ExpressionChangedAfterItHasBeenCheckedError:\n * - property name (for property bindings or interpolations)\n * - old and new values, enriched using information from metadata\n *\n * More information on the metadata storage format can be found in `storePropertyBindingMetadata`\n * function description.\n */\nfunction getExpressionChangedErrorDetails(lView, bindingIndex, oldValue, newValue) {\n const tData = lView[TVIEW].data;\n const metadata = tData[bindingIndex];\n if (typeof metadata === 'string') {\n // metadata for property interpolation\n if (metadata.indexOf(INTERPOLATION_DELIMITER) > -1) {\n return constructDetailsForInterpolation(lView, bindingIndex, bindingIndex, metadata, newValue);\n }\n // metadata for property binding\n return { propName: metadata, oldValue, newValue };\n }\n // metadata is not available for this expression, check if this expression is a part of the\n // property interpolation by going from the current binding index left and look for a string that\n // contains INTERPOLATION_DELIMITER, the layout in tView.data for this case will look like this:\n // [..., 'id�Prefix � and � suffix', null, null, null, ...]\n if (metadata === null) {\n let idx = bindingIndex - 1;\n while (typeof tData[idx] !== 'string' && tData[idx + 1] === null) {\n idx--;\n }\n const meta = tData[idx];\n if (typeof meta === 'string') {\n const matches = meta.match(new RegExp(INTERPOLATION_DELIMITER, 'g'));\n // first interpolation delimiter separates property name from interpolation parts (in case of\n // property interpolations), so we subtract one from total number of found delimiters\n if (matches && (matches.length - 1) > bindingIndex - idx) {\n return constructDetailsForInterpolation(lView, idx, bindingIndex, meta, newValue);\n }\n }\n }\n return { propName: undefined, oldValue, newValue };\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Returns an index of `classToSearch` in `className` taking token boundaries into account.\n *\n * `classIndexOf('AB A', 'A', 0)` will be 3 (not 0 since `AB!==A`)\n *\n * @param className A string containing classes (whitespace separated)\n * @param classToSearch A class name to locate\n * @param startingIndex Starting location of search\n * @returns an index of the located class (or -1 if not found)\n */\nfunction classIndexOf(className, classToSearch, startingIndex) {\n ngDevMode && assertNotEqual(classToSearch, '', 'can not look for \"\" string.');\n let end = className.length;\n while (true) {\n const foundIndex = className.indexOf(classToSearch, startingIndex);\n if (foundIndex === -1)\n return foundIndex;\n if (foundIndex === 0 || className.charCodeAt(foundIndex - 1) <= 32 /* CharCode.SPACE */) {\n // Ensure that it has leading whitespace\n const length = classToSearch.length;\n if (foundIndex + length === end ||\n className.charCodeAt(foundIndex + length) <= 32 /* CharCode.SPACE */) {\n // Ensure that it has trailing whitespace\n return foundIndex;\n }\n }\n // False positive, keep searching from where we left off.\n startingIndex = foundIndex + 1;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst NG_TEMPLATE_SELECTOR = 'ng-template';\n/**\n * Search the `TAttributes` to see if it contains `cssClassToMatch` (case insensitive)\n *\n * @param attrs `TAttributes` to search through.\n * @param cssClassToMatch class to match (lowercase)\n * @param isProjectionMode Whether or not class matching should look into the attribute `class` in\n * addition to the `AttributeMarker.Classes`.\n */\nfunction isCssClassMatching(attrs, cssClassToMatch, isProjectionMode) {\n // TODO(misko): The fact that this function needs to know about `isProjectionMode` seems suspect.\n // It is strange to me that sometimes the class information comes in form of `class` attribute\n // and sometimes in form of `AttributeMarker.Classes`. Some investigation is needed to determine\n // if that is the right behavior.\n ngDevMode &&\n assertEqual(cssClassToMatch, cssClassToMatch.toLowerCase(), 'Class name expected to be lowercase.');\n let i = 0;\n while (i < attrs.length) {\n let item = attrs[i++];\n if (isProjectionMode && item === 'class') {\n item = attrs[i];\n if (classIndexOf(item.toLowerCase(), cssClassToMatch, 0) !== -1) {\n return true;\n }\n }\n else if (item === 1 /* AttributeMarker.Classes */) {\n // We found the classes section. Start searching for the class.\n while (i < attrs.length && typeof (item = attrs[i++]) == 'string') {\n // while we have strings\n if (item.toLowerCase() === cssClassToMatch)\n return true;\n }\n return false;\n }\n }\n return false;\n}\n/**\n * Checks whether the `tNode` represents an inline template (e.g. `*ngFor`).\n *\n * @param tNode current TNode\n */\nfunction isInlineTemplate(tNode) {\n return tNode.type === 4 /* TNodeType.Container */ && tNode.value !== NG_TEMPLATE_SELECTOR;\n}\n/**\n * Function that checks whether a given tNode matches tag-based selector and has a valid type.\n *\n * Matching can be performed in 2 modes: projection mode (when we project nodes) and regular\n * directive matching mode:\n * - in the \"directive matching\" mode we do _not_ take TContainer's tagName into account if it is\n * different from NG_TEMPLATE_SELECTOR (value different from NG_TEMPLATE_SELECTOR indicates that a\n * tag name was extracted from * syntax so we would match the same directive twice);\n * - in the \"projection\" mode, we use a tag name potentially extracted from the * syntax processing\n * (applicable to TNodeType.Container only).\n */\nfunction hasTagAndTypeMatch(tNode, currentSelector, isProjectionMode) {\n const tagNameToCompare = tNode.type === 4 /* TNodeType.Container */ && !isProjectionMode ? NG_TEMPLATE_SELECTOR : tNode.value;\n return currentSelector === tagNameToCompare;\n}\n/**\n * A utility function to match an Ivy node static data against a simple CSS selector\n *\n * @param node static data of the node to match\n * @param selector The selector to try matching against the node.\n * @param isProjectionMode if `true` we are matching for content projection, otherwise we are doing\n * directive matching.\n * @returns true if node matches the selector.\n */\nfunction isNodeMatchingSelector(tNode, selector, isProjectionMode) {\n ngDevMode && assertDefined(selector[0], 'Selector should have a tag name');\n let mode = 4 /* SelectorFlags.ELEMENT */;\n const nodeAttrs = tNode.attrs || [];\n // Find the index of first attribute that has no value, only a name.\n const nameOnlyMarkerIdx = getNameOnlyMarkerIndex(nodeAttrs);\n // When processing \":not\" selectors, we skip to the next \":not\" if the\n // current one doesn't match\n let skipToNextSelector = false;\n for (let i = 0; i < selector.length; i++) {\n const current = selector[i];\n if (typeof current === 'number') {\n // If we finish processing a :not selector and it hasn't failed, return false\n if (!skipToNextSelector && !isPositive(mode) && !isPositive(current)) {\n return false;\n }\n // If we are skipping to the next :not() and this mode flag is positive,\n // it's a part of the current :not() selector, and we should keep skipping\n if (skipToNextSelector && isPositive(current))\n continue;\n skipToNextSelector = false;\n mode = current | (mode & 1 /* SelectorFlags.NOT */);\n continue;\n }\n if (skipToNextSelector)\n continue;\n if (mode & 4 /* SelectorFlags.ELEMENT */) {\n mode = 2 /* SelectorFlags.ATTRIBUTE */ | mode & 1 /* SelectorFlags.NOT */;\n if (current !== '' && !hasTagAndTypeMatch(tNode, current, isProjectionMode) ||\n current === '' && selector.length === 1) {\n if (isPositive(mode))\n return false;\n skipToNextSelector = true;\n }\n }\n else {\n const selectorAttrValue = mode & 8 /* SelectorFlags.CLASS */ ? current : selector[++i];\n // special case for matching against classes when a tNode has been instantiated with\n // class and style values as separate attribute values (e.g. ['title', CLASS, 'foo'])\n if ((mode & 8 /* SelectorFlags.CLASS */) && tNode.attrs !== null) {\n if (!isCssClassMatching(tNode.attrs, selectorAttrValue, isProjectionMode)) {\n if (isPositive(mode))\n return false;\n skipToNextSelector = true;\n }\n continue;\n }\n const attrName = (mode & 8 /* SelectorFlags.CLASS */) ? 'class' : current;\n const attrIndexInNode = findAttrIndexInNode(attrName, nodeAttrs, isInlineTemplate(tNode), isProjectionMode);\n if (attrIndexInNode === -1) {\n if (isPositive(mode))\n return false;\n skipToNextSelector = true;\n continue;\n }\n if (selectorAttrValue !== '') {\n let nodeAttrValue;\n if (attrIndexInNode > nameOnlyMarkerIdx) {\n nodeAttrValue = '';\n }\n else {\n ngDevMode &&\n assertNotEqual(nodeAttrs[attrIndexInNode], 0 /* AttributeMarker.NamespaceURI */, 'We do not match directives on namespaced attributes');\n // we lowercase the attribute value to be able to match\n // selectors without case-sensitivity\n // (selectors are already in lowercase when generated)\n nodeAttrValue = nodeAttrs[attrIndexInNode + 1].toLowerCase();\n }\n const compareAgainstClassName = mode & 8 /* SelectorFlags.CLASS */ ? nodeAttrValue : null;\n if (compareAgainstClassName &&\n classIndexOf(compareAgainstClassName, selectorAttrValue, 0) !== -1 ||\n mode & 2 /* SelectorFlags.ATTRIBUTE */ && selectorAttrValue !== nodeAttrValue) {\n if (isPositive(mode))\n return false;\n skipToNextSelector = true;\n }\n }\n }\n }\n return isPositive(mode) || skipToNextSelector;\n}\nfunction isPositive(mode) {\n return (mode & 1 /* SelectorFlags.NOT */) === 0;\n}\n/**\n * Examines the attribute's definition array for a node to find the index of the\n * attribute that matches the given `name`.\n *\n * NOTE: This will not match namespaced attributes.\n *\n * Attribute matching depends upon `isInlineTemplate` and `isProjectionMode`.\n * The following table summarizes which types of attributes we attempt to match:\n *\n * ===========================================================================================================\n * Modes | Normal Attributes | Bindings Attributes | Template Attributes | I18n\n * Attributes\n * ===========================================================================================================\n * Inline + Projection | YES | YES | NO | YES\n * -----------------------------------------------------------------------------------------------------------\n * Inline + Directive | NO | NO | YES | NO\n * -----------------------------------------------------------------------------------------------------------\n * Non-inline + Projection | YES | YES | NO | YES\n * -----------------------------------------------------------------------------------------------------------\n * Non-inline + Directive | YES | YES | NO | YES\n * ===========================================================================================================\n *\n * @param name the name of the attribute to find\n * @param attrs the attribute array to examine\n * @param isInlineTemplate true if the node being matched is an inline template (e.g. `*ngFor`)\n * rather than a manually expanded template node (e.g `<ng-template>`).\n * @param isProjectionMode true if we are matching against content projection otherwise we are\n * matching against directives.\n */\nfunction findAttrIndexInNode(name, attrs, isInlineTemplate, isProjectionMode) {\n if (attrs === null)\n return -1;\n let i = 0;\n if (isProjectionMode || !isInlineTemplate) {\n let bindingsMode = false;\n while (i < attrs.length) {\n const maybeAttrName = attrs[i];\n if (maybeAttrName === name) {\n return i;\n }\n else if (maybeAttrName === 3 /* AttributeMarker.Bindings */ || maybeAttrName === 6 /* AttributeMarker.I18n */) {\n bindingsMode = true;\n }\n else if (maybeAttrName === 1 /* AttributeMarker.Classes */ || maybeAttrName === 2 /* AttributeMarker.Styles */) {\n let value = attrs[++i];\n // We should skip classes here because we have a separate mechanism for\n // matching classes in projection mode.\n while (typeof value === 'string') {\n value = attrs[++i];\n }\n continue;\n }\n else if (maybeAttrName === 4 /* AttributeMarker.Template */) {\n // We do not care about Template attributes in this scenario.\n break;\n }\n else if (maybeAttrName === 0 /* AttributeMarker.NamespaceURI */) {\n // Skip the whole namespaced attribute and value. This is by design.\n i += 4;\n continue;\n }\n // In binding mode there are only names, rather than name-value pairs.\n i += bindingsMode ? 1 : 2;\n }\n // We did not match the attribute\n return -1;\n }\n else {\n return matchTemplateAttribute(attrs, name);\n }\n}\nfunction isNodeMatchingSelectorList(tNode, selector, isProjectionMode = false) {\n for (let i = 0; i < selector.length; i++) {\n if (isNodeMatchingSelector(tNode, selector[i], isProjectionMode)) {\n return true;\n }\n }\n return false;\n}\nfunction getProjectAsAttrValue(tNode) {\n const nodeAttrs = tNode.attrs;\n if (nodeAttrs != null) {\n const ngProjectAsAttrIdx = nodeAttrs.indexOf(5 /* AttributeMarker.ProjectAs */);\n // only check for ngProjectAs in attribute names, don't accidentally match attribute's value\n // (attribute names are stored at even indexes)\n if ((ngProjectAsAttrIdx & 1) === 0) {\n return nodeAttrs[ngProjectAsAttrIdx + 1];\n }\n }\n return null;\n}\nfunction getNameOnlyMarkerIndex(nodeAttrs) {\n for (let i = 0; i < nodeAttrs.length; i++) {\n const nodeAttr = nodeAttrs[i];\n if (isNameOnlyAttributeMarker(nodeAttr)) {\n return i;\n }\n }\n return nodeAttrs.length;\n}\nfunction matchTemplateAttribute(attrs, name) {\n let i = attrs.indexOf(4 /* AttributeMarker.Template */);\n if (i > -1) {\n i++;\n while (i < attrs.length) {\n const attr = attrs[i];\n // Return in case we checked all template attrs and are switching to the next section in the\n // attrs array (that starts with a number that represents an attribute marker).\n if (typeof attr === 'number')\n return -1;\n if (attr === name)\n return i;\n i++;\n }\n }\n return -1;\n}\n/**\n * Checks whether a selector is inside a CssSelectorList\n * @param selector Selector to be checked.\n * @param list List in which to look for the selector.\n */\nfunction isSelectorInSelectorList(selector, list) {\n selectorListLoop: for (let i = 0; i < list.length; i++) {\n const currentSelectorInList = list[i];\n if (selector.length !== currentSelectorInList.length) {\n continue;\n }\n for (let j = 0; j < selector.length; j++) {\n if (selector[j] !== currentSelectorInList[j]) {\n continue selectorListLoop;\n }\n }\n return true;\n }\n return false;\n}\nfunction maybeWrapInNotSelector(isNegativeMode, chunk) {\n return isNegativeMode ? ':not(' + chunk.trim() + ')' : chunk;\n}\nfunction stringifyCSSSelector(selector) {\n let result = selector[0];\n let i = 1;\n let mode = 2 /* SelectorFlags.ATTRIBUTE */;\n let currentChunk = '';\n let isNegativeMode = false;\n while (i < selector.length) {\n let valueOrMarker = selector[i];\n if (typeof valueOrMarker === 'string') {\n if (mode & 2 /* SelectorFlags.ATTRIBUTE */) {\n const attrValue = selector[++i];\n currentChunk +=\n '[' + valueOrMarker + (attrValue.length > 0 ? '=\"' + attrValue + '\"' : '') + ']';\n }\n else if (mode & 8 /* SelectorFlags.CLASS */) {\n currentChunk += '.' + valueOrMarker;\n }\n else if (mode & 4 /* SelectorFlags.ELEMENT */) {\n currentChunk += ' ' + valueOrMarker;\n }\n }\n else {\n //\n // Append current chunk to the final result in case we come across SelectorFlag, which\n // indicates that the previous section of a selector is over. We need to accumulate content\n // between flags to make sure we wrap the chunk later in :not() selector if needed, e.g.\n // ```\n // ['', Flags.CLASS, '.classA', Flags.CLASS | Flags.NOT, '.classB', '.classC']\n // ```\n // should be transformed to `.classA :not(.classB .classC)`.\n //\n // Note: for negative selector part, we accumulate content between flags until we find the\n // next negative flag. This is needed to support a case where `:not()` rule contains more than\n // one chunk, e.g. the following selector:\n // ```\n // ['', Flags.ELEMENT | Flags.NOT, 'p', Flags.CLASS, 'foo', Flags.CLASS | Flags.NOT, 'bar']\n // ```\n // should be stringified to `:not(p.foo) :not(.bar)`\n //\n if (currentChunk !== '' && !isPositive(valueOrMarker)) {\n result += maybeWrapInNotSelector(isNegativeMode, currentChunk);\n currentChunk = '';\n }\n mode = valueOrMarker;\n // According to CssSelector spec, once we come across `SelectorFlags.NOT` flag, the negative\n // mode is maintained for remaining chunks of a selector.\n isNegativeMode = isNegativeMode || !isPositive(mode);\n }\n i++;\n }\n if (currentChunk !== '') {\n result += maybeWrapInNotSelector(isNegativeMode, currentChunk);\n }\n return result;\n}\n/**\n * Generates string representation of CSS selector in parsed form.\n *\n * ComponentDef and DirectiveDef are generated with the selector in parsed form to avoid doing\n * additional parsing at runtime (for example, for directive matching). However in some cases (for\n * example, while bootstrapping a component), a string version of the selector is required to query\n * for the host element on the page. This function takes the parsed form of a selector and returns\n * its string representation.\n *\n * @param selectorList selector in parsed form\n * @returns string representation of a given selector\n */\nfunction stringifyCSSSelectorList(selectorList) {\n return selectorList.map(stringifyCSSSelector).join(',');\n}\n/**\n * Extracts attributes and classes information from a given CSS selector.\n *\n * This function is used while creating a component dynamically. In this case, the host element\n * (that is created dynamically) should contain attributes and classes specified in component's CSS\n * selector.\n *\n * @param selector CSS selector in parsed form (in a form of array)\n * @returns object with `attrs` and `classes` fields that contain extracted information\n */\nfunction extractAttrsAndClassesFromSelector(selector) {\n const attrs = [];\n const classes = [];\n let i = 1;\n let mode = 2 /* SelectorFlags.ATTRIBUTE */;\n while (i < selector.length) {\n let valueOrMarker = selector[i];\n if (typeof valueOrMarker === 'string') {\n if (mode === 2 /* SelectorFlags.ATTRIBUTE */) {\n if (valueOrMarker !== '') {\n attrs.push(valueOrMarker, selector[++i]);\n }\n }\n else if (mode === 8 /* SelectorFlags.CLASS */) {\n classes.push(valueOrMarker);\n }\n }\n else {\n // According to CssSelector spec, once we come across `SelectorFlags.NOT` flag, the negative\n // mode is maintained for remaining chunks of a selector. Since attributes and classes are\n // extracted only for \"positive\" part of the selector, we can stop here.\n if (!isPositive(mode))\n break;\n mode = valueOrMarker;\n }\n i++;\n }\n return { attrs, classes };\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** A special value which designates that a value has not changed. */\nconst NO_CHANGE = (typeof ngDevMode === 'undefined' || ngDevMode) ? { __brand__: 'NO_CHANGE' } : {};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Advances to an element for later binding instructions.\n *\n * Used in conjunction with instructions like {@link property} to act on elements with specified\n * indices, for example those created with {@link element} or {@link elementStart}.\n *\n * ```ts\n * (rf: RenderFlags, ctx: any) => {\n * if (rf & 1) {\n * text(0, 'Hello');\n * text(1, 'Goodbye')\n * element(2, 'div');\n * }\n * if (rf & 2) {\n * advance(2); // Advance twice to the <div>.\n * property('title', 'test');\n * }\n * }\n * ```\n * @param delta Number of elements to advance forwards by.\n *\n * @codeGenApi\n */\nfunction ɵɵadvance(delta) {\n ngDevMode && assertGreaterThan(delta, 0, 'Can only advance forward');\n selectIndexInternal(getTView(), getLView(), getSelectedIndex() + delta, !!ngDevMode && isInCheckNoChangesMode());\n}\nfunction selectIndexInternal(tView, lView, index, checkNoChangesMode) {\n ngDevMode && assertIndexInDeclRange(lView, index);\n // Flush the initial hooks for elements in the view that have been added up to this point.\n // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n if (!checkNoChangesMode) {\n const hooksInitPhaseCompleted = (lView[FLAGS] & 3 /* LViewFlags.InitPhaseStateMask */) === 3 /* InitPhaseState.InitPhaseCompleted */;\n if (hooksInitPhaseCompleted) {\n const preOrderCheckHooks = tView.preOrderCheckHooks;\n if (preOrderCheckHooks !== null) {\n executeCheckHooks(lView, preOrderCheckHooks, index);\n }\n }\n else {\n const preOrderHooks = tView.preOrderHooks;\n if (preOrderHooks !== null) {\n executeInitAndCheckHooks(lView, preOrderHooks, 0 /* InitPhaseState.OnInitHooksToBeRun */, index);\n }\n }\n }\n // We must set the selected index *after* running the hooks, because hooks may have side-effects\n // that cause other template functions to run, thus updating the selected index, which is global\n // state. If we run `setSelectedIndex` *before* we run the hooks, in some cases the selected index\n // will be altered by the time we leave the `ɵɵadvance` instruction.\n setSelectedIndex(index);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A mapping of the @angular/core API surface used in generated expressions to the actual symbols.\n *\n * This should be kept up to date with the public exports of @angular/core.\n */\nconst angularCoreDiEnv = {\n 'ɵɵdefineInjectable': ɵɵdefineInjectable,\n 'ɵɵdefineInjector': ɵɵdefineInjector,\n 'ɵɵinject': ɵɵinject,\n 'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep,\n 'resolveForwardRef': resolveForwardRef,\n};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Compile an Angular injectable according to its `Injectable` metadata, and patch the resulting\n * injectable def (`ɵprov`) onto the injectable type.\n */\nfunction compileInjectable(type, meta) {\n let ngInjectableDef = null;\n let ngFactoryDef = null;\n // if NG_PROV_DEF is already defined on this class then don't overwrite it\n if (!type.hasOwnProperty(NG_PROV_DEF)) {\n Object.defineProperty(type, NG_PROV_DEF, {\n get: () => {\n if (ngInjectableDef === null) {\n const compiler = getCompilerFacade({ usage: 0 /* JitCompilerUsage.Decorator */, kind: 'injectable', type });\n ngInjectableDef = compiler.compileInjectable(angularCoreDiEnv, `ng:///${type.name}/ɵprov.js`, getInjectableMetadata(type, meta));\n }\n return ngInjectableDef;\n },\n });\n }\n // if NG_FACTORY_DEF is already defined on this class then don't overwrite it\n if (!type.hasOwnProperty(NG_FACTORY_DEF)) {\n Object.defineProperty(type, NG_FACTORY_DEF, {\n get: () => {\n if (ngFactoryDef === null) {\n const compiler = getCompilerFacade({ usage: 0 /* JitCompilerUsage.Decorator */, kind: 'injectable', type });\n ngFactoryDef = compiler.compileFactory(angularCoreDiEnv, `ng:///${type.name}/ɵfac.js`, {\n name: type.name,\n type,\n typeArgumentCount: 0,\n deps: reflectDependencies(type),\n target: compiler.FactoryTarget.Injectable\n });\n }\n return ngFactoryDef;\n },\n // Leave this configurable so that the factories from directives or pipes can take precedence.\n configurable: true\n });\n }\n}\nconst USE_VALUE = getClosureSafeProperty({ provide: String, useValue: getClosureSafeProperty });\nfunction isUseClassProvider(meta) {\n return meta.useClass !== undefined;\n}\nfunction isUseValueProvider(meta) {\n return USE_VALUE in meta;\n}\nfunction isUseFactoryProvider(meta) {\n return meta.useFactory !== undefined;\n}\nfunction isUseExistingProvider(meta) {\n return meta.useExisting !== undefined;\n}\nfunction getInjectableMetadata(type, srcMeta) {\n // Allow the compilation of a class with a `@Injectable()` decorator without parameters\n const meta = srcMeta || { providedIn: null };\n const compilerMeta = {\n name: type.name,\n type: type,\n typeArgumentCount: 0,\n providedIn: meta.providedIn,\n };\n if ((isUseClassProvider(meta) || isUseFactoryProvider(meta)) && meta.deps !== undefined) {\n compilerMeta.deps = convertDependencies(meta.deps);\n }\n // Check to see if the user explicitly provided a `useXxxx` property.\n if (isUseClassProvider(meta)) {\n compilerMeta.useClass = meta.useClass;\n }\n else if (isUseValueProvider(meta)) {\n compilerMeta.useValue = meta.useValue;\n }\n else if (isUseFactoryProvider(meta)) {\n compilerMeta.useFactory = meta.useFactory;\n }\n else if (isUseExistingProvider(meta)) {\n compilerMeta.useExisting = meta.useExisting;\n }\n return compilerMeta;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Injectable decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Injectable = makeDecorator('Injectable', undefined, undefined, undefined, (type, meta) => compileInjectable(type, meta));\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Create a new `Injector` which is configured using a `defType` of `InjectorType<any>`s.\n *\n * @publicApi\n */\nfunction createInjector(defType, parent = null, additionalProviders = null, name) {\n const injector = createInjectorWithoutInjectorInstances(defType, parent, additionalProviders, name);\n injector.resolveInjectorInitializers();\n return injector;\n}\n/**\n * Creates a new injector without eagerly resolving its injector types. Can be used in places\n * where resolving the injector types immediately can lead to an infinite loop. The injector types\n * should be resolved at a later point by calling `_resolveInjectorDefTypes`.\n */\nfunction createInjectorWithoutInjectorInstances(defType, parent = null, additionalProviders = null, name, scopes = new Set()) {\n const providers = [\n additionalProviders || EMPTY_ARRAY,\n importProvidersFrom(defType),\n ];\n name = name || (typeof defType === 'object' ? undefined : stringify(defType));\n return new R3Injector(providers, parent || getNullInjector(), name || null, scopes);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Concrete injectors implement this interface. Injectors are configured\n * with [providers](guide/glossary#provider) that associate\n * dependencies of various types with [injection tokens](guide/glossary#di-token).\n *\n * @see [\"DI Providers\"](guide/dependency-injection-providers).\n * @see `StaticProvider`\n *\n * @usageNotes\n *\n * The following example creates a service injector instance.\n *\n * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}\n *\n * ### Usage example\n *\n * {@example core/di/ts/injector_spec.ts region='Injector'}\n *\n * `Injector` returns itself when given `Injector` as a token:\n *\n * {@example core/di/ts/injector_spec.ts region='injectInjector'}\n *\n * @publicApi\n */\nclass Injector {\n static create(options, parent) {\n if (Array.isArray(options)) {\n return createInjector({ name: '' }, parent, options, '');\n }\n else {\n const name = options.name ?? '';\n return createInjector({ name }, options.parent, options.providers, name);\n }\n }\n}\nInjector.THROW_IF_NOT_FOUND = THROW_IF_NOT_FOUND;\nInjector.NULL = ( /* @__PURE__ */new NullInjector());\n/** @nocollapse */\nInjector.ɵprov = ɵɵdefineInjectable({\n token: Injector,\n providedIn: 'any',\n factory: () => ɵɵinject(INJECTOR),\n});\n/**\n * @internal\n * @nocollapse\n */\nInjector.__NG_ELEMENT_ID__ = -1 /* InjectorMarkers.Injector */;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction findFirstClosedCycle(keys) {\n const res = [];\n for (let i = 0; i < keys.length; ++i) {\n if (res.indexOf(keys[i]) > -1) {\n res.push(keys[i]);\n return res;\n }\n res.push(keys[i]);\n }\n return res;\n}\nfunction constructResolvingPath(keys) {\n if (keys.length > 1) {\n const reversed = findFirstClosedCycle(keys.slice().reverse());\n const tokenStrs = reversed.map(k => stringify(k.token));\n return ' (' + tokenStrs.join(' -> ') + ')';\n }\n return '';\n}\nfunction injectionError(injector, key, constructResolvingMessage, originalError) {\n const keys = [key];\n const errMsg = constructResolvingMessage(keys);\n const error = (originalError ? wrappedError(errMsg, originalError) : Error(errMsg));\n error.addKey = addKey;\n error.keys = keys;\n error.injectors = [injector];\n error.constructResolvingMessage = constructResolvingMessage;\n error[ERROR_ORIGINAL_ERROR] = originalError;\n return error;\n}\nfunction addKey(injector, key) {\n this.injectors.push(injector);\n this.keys.push(key);\n // Note: This updated message won't be reflected in the `.stack` property\n this.message = this.constructResolvingMessage(this.keys);\n}\n/**\n * Thrown when trying to retrieve a dependency by key from {@link Injector}, but the\n * {@link Injector} does not have a {@link Provider} for the given key.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n * constructor(b:B) {}\n * }\n *\n * expect(() => Injector.resolveAndCreate([A])).toThrowError();\n * ```\n */\nfunction noProviderError(injector, key) {\n return injectionError(injector, key, function (keys) {\n const first = stringify(keys[0].token);\n return `No provider for ${first}!${constructResolvingPath(keys)}`;\n });\n}\n/**\n * Thrown when dependencies form a cycle.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * var injector = Injector.resolveAndCreate([\n * {provide: \"one\", useFactory: (two) => \"two\", deps: [[new Inject(\"two\")]]},\n * {provide: \"two\", useFactory: (one) => \"one\", deps: [[new Inject(\"one\")]]}\n * ]);\n *\n * expect(() => injector.get(\"one\")).toThrowError();\n * ```\n *\n * Retrieving `A` or `B` throws a `CyclicDependencyError` as the graph above cannot be constructed.\n */\nfunction cyclicDependencyError(injector, key) {\n return injectionError(injector, key, function (keys) {\n return `Cannot instantiate cyclic dependency!${constructResolvingPath(keys)}`;\n });\n}\n/**\n * Thrown when a constructing type returns with an Error.\n *\n * The `InstantiationError` class contains the original error plus the dependency graph which caused\n * this object to be instantiated.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n * constructor() {\n * throw new Error('message');\n * }\n * }\n *\n * var injector = Injector.resolveAndCreate([A]);\n\n * try {\n * injector.get(A);\n * } catch (e) {\n * expect(e instanceof InstantiationError).toBe(true);\n * expect(e.originalException.message).toEqual(\"message\");\n * expect(e.originalStack).toBeDefined();\n * }\n * ```\n */\nfunction instantiationError(injector, originalException, originalStack, key) {\n return injectionError(injector, key, function (keys) {\n const first = stringify(keys[0].token);\n return `${originalException.message}: Error during instantiation of ${first}!${constructResolvingPath(keys)}.`;\n }, originalException);\n}\n/**\n * Thrown when an object other then {@link Provider} (or `Type`) is passed to {@link Injector}\n * creation.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * expect(() => Injector.resolveAndCreate([\"not a type\"])).toThrowError();\n * ```\n */\nfunction invalidProviderError(provider) {\n return Error(`Invalid provider - only instances of Provider and Type are allowed, got: ${provider}`);\n}\n/**\n * Thrown when the class has no annotation information.\n *\n * Lack of annotation information prevents the {@link Injector} from determining which dependencies\n * need to be injected into the constructor.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n * constructor(b) {}\n * }\n *\n * expect(() => Injector.resolveAndCreate([A])).toThrowError();\n * ```\n *\n * This error is also thrown when the class not marked with {@link Injectable} has parameter types.\n *\n * ```typescript\n * class B {}\n *\n * class A {\n * constructor(b:B) {} // no information about the parameter types of A is available at runtime.\n * }\n *\n * expect(() => Injector.resolveAndCreate([A,B])).toThrowError();\n * ```\n *\n */\nfunction noAnnotationError(typeOrFunc, params) {\n const signature = [];\n for (let i = 0, ii = params.length; i < ii; i++) {\n const parameter = params[i];\n if (!parameter || parameter.length == 0) {\n signature.push('?');\n }\n else {\n signature.push(parameter.map(stringify).join(' '));\n }\n }\n return Error('Cannot resolve all parameters for \\'' + stringify(typeOrFunc) + '\\'(' +\n signature.join(', ') + '). ' +\n 'Make sure that all the parameters are decorated with Inject or have valid type annotations and that \\'' +\n stringify(typeOrFunc) + '\\' is decorated with Injectable.');\n}\n/**\n * Thrown when getting an object by index.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {}\n *\n * var injector = Injector.resolveAndCreate([A]);\n *\n * expect(() => injector.getAt(100)).toThrowError();\n * ```\n *\n */\nfunction outOfBoundsError(index) {\n return Error(`Index ${index} is out-of-bounds.`);\n}\n// TODO: add a working example after alpha38 is released\n/**\n * Thrown when a multi provider and a regular provider are bound to the same token.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * expect(() => Injector.resolveAndCreate([\n * { provide: \"Strings\", useValue: \"string1\", multi: true},\n * { provide: \"Strings\", useValue: \"string2\", multi: false}\n * ])).toThrowError();\n * ```\n */\nfunction mixingMultiProvidersWithRegularProvidersError(provider1, provider2) {\n return Error(`Cannot mix multi providers and regular providers, got: ${provider1} ${provider2}`);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A unique object used for retrieving items from the {@link ReflectiveInjector}.\n *\n * Keys have:\n * - a system-wide unique `id`.\n * - a `token`.\n *\n * `Key` is used internally by {@link ReflectiveInjector} because its system-wide unique `id` allows\n * the\n * injector to store created objects in a more efficient way.\n *\n * `Key` should not be created directly. {@link ReflectiveInjector} creates keys automatically when\n * resolving\n * providers.\n *\n * @deprecated No replacement\n * @publicApi\n */\nclass ReflectiveKey {\n /**\n * Private\n */\n constructor(token, id) {\n this.token = token;\n this.id = id;\n if (!token) {\n throw new RuntimeError(208 /* RuntimeErrorCode.MISSING_INJECTION_TOKEN */, ngDevMode && 'Token must be defined!');\n }\n this.displayName = stringify(this.token);\n }\n /**\n * Retrieves a `Key` for a token.\n */\n static get(token) {\n return _globalKeyRegistry.get(resolveForwardRef(token));\n }\n /**\n * @returns the number of keys registered in the system.\n */\n static get numberOfKeys() {\n return _globalKeyRegistry.numberOfKeys;\n }\n}\nclass KeyRegistry {\n constructor() {\n this._allKeys = new Map();\n }\n get(token) {\n if (token instanceof ReflectiveKey)\n return token;\n if (this._allKeys.has(token)) {\n return this._allKeys.get(token);\n }\n const newKey = new ReflectiveKey(token, ReflectiveKey.numberOfKeys);\n this._allKeys.set(token, newKey);\n return newKey;\n }\n get numberOfKeys() {\n return this._allKeys.size;\n }\n}\nconst _globalKeyRegistry = new KeyRegistry();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * `Dependency` is used by the framework to extend DI.\n * This is internal to Angular and should not be used directly.\n */\nclass ReflectiveDependency {\n constructor(key, optional, visibility) {\n this.key = key;\n this.optional = optional;\n this.visibility = visibility;\n }\n static fromKey(key) {\n return new ReflectiveDependency(key, false, null);\n }\n}\nconst _EMPTY_LIST = [];\nclass ResolvedReflectiveProvider_ {\n constructor(key, resolvedFactories, multiProvider) {\n this.key = key;\n this.resolvedFactories = resolvedFactories;\n this.multiProvider = multiProvider;\n this.resolvedFactory = this.resolvedFactories[0];\n }\n}\n/**\n * An internal resolved representation of a factory function created by resolving `Provider`.\n * @publicApi\n */\nclass ResolvedReflectiveFactory {\n constructor(\n /**\n * Factory function which can return an instance of an object represented by a key.\n */\n factory, \n /**\n * Arguments (dependencies) to the `factory` function.\n */\n dependencies) {\n this.factory = factory;\n this.dependencies = dependencies;\n }\n}\n/**\n * Resolve a single provider.\n */\nfunction resolveReflectiveFactory(provider) {\n let factoryFn;\n let resolvedDeps;\n if (provider.useClass) {\n const useClass = resolveForwardRef(provider.useClass);\n factoryFn = getReflect().factory(useClass);\n resolvedDeps = _dependenciesFor(useClass);\n }\n else if (provider.useExisting) {\n factoryFn = (aliasInstance) => aliasInstance;\n resolvedDeps = [ReflectiveDependency.fromKey(ReflectiveKey.get(provider.useExisting))];\n }\n else if (provider.useFactory) {\n factoryFn = provider.useFactory;\n resolvedDeps = constructDependencies(provider.useFactory, provider.deps);\n }\n else {\n factoryFn = () => provider.useValue;\n resolvedDeps = _EMPTY_LIST;\n }\n return new ResolvedReflectiveFactory(factoryFn, resolvedDeps);\n}\n/**\n * Converts the `Provider` into `ResolvedProvider`.\n *\n * `Injector` internally only uses `ResolvedProvider`, `Provider` contains convenience provider\n * syntax.\n */\nfunction resolveReflectiveProvider(provider) {\n return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)], provider.multi || false);\n}\n/**\n * Resolve a list of Providers.\n */\nfunction resolveReflectiveProviders(providers) {\n const normalized = _normalizeProviders(providers, []);\n const resolved = normalized.map(resolveReflectiveProvider);\n const resolvedProviderMap = mergeResolvedReflectiveProviders(resolved, new Map());\n return Array.from(resolvedProviderMap.values());\n}\n/**\n * Merges a list of ResolvedProviders into a list where each key is contained exactly once and\n * multi providers have been merged.\n */\nfunction mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {\n for (let i = 0; i < providers.length; i++) {\n const provider = providers[i];\n const existing = normalizedProvidersMap.get(provider.key.id);\n if (existing) {\n if (provider.multiProvider !== existing.multiProvider) {\n throw mixingMultiProvidersWithRegularProvidersError(existing, provider);\n }\n if (provider.multiProvider) {\n for (let j = 0; j < provider.resolvedFactories.length; j++) {\n existing.resolvedFactories.push(provider.resolvedFactories[j]);\n }\n }\n else {\n normalizedProvidersMap.set(provider.key.id, provider);\n }\n }\n else {\n let resolvedProvider;\n if (provider.multiProvider) {\n resolvedProvider = new ResolvedReflectiveProvider_(provider.key, provider.resolvedFactories.slice(), provider.multiProvider);\n }\n else {\n resolvedProvider = provider;\n }\n normalizedProvidersMap.set(provider.key.id, resolvedProvider);\n }\n }\n return normalizedProvidersMap;\n}\nfunction _normalizeProviders(providers, res) {\n providers.forEach(b => {\n if (b instanceof Type) {\n res.push({ provide: b, useClass: b });\n }\n else if (b && typeof b == 'object' && b.provide !== undefined) {\n res.push(b);\n }\n else if (Array.isArray(b)) {\n _normalizeProviders(b, res);\n }\n else {\n throw invalidProviderError(b);\n }\n });\n return res;\n}\nfunction constructDependencies(typeOrFunc, dependencies) {\n if (!dependencies) {\n return _dependenciesFor(typeOrFunc);\n }\n else {\n const params = dependencies.map(t => [t]);\n return dependencies.map(t => _extractToken(typeOrFunc, t, params));\n }\n}\nfunction _dependenciesFor(typeOrFunc) {\n const params = getReflect().parameters(typeOrFunc);\n if (!params)\n return [];\n if (params.some(p => p == null)) {\n throw noAnnotationError(typeOrFunc, params);\n }\n return params.map(p => _extractToken(typeOrFunc, p, params));\n}\nfunction _extractToken(typeOrFunc, metadata, params) {\n let token = null;\n let optional = false;\n if (!Array.isArray(metadata)) {\n if (metadata instanceof Inject) {\n return _createDependency(metadata.token, optional, null);\n }\n else {\n return _createDependency(metadata, optional, null);\n }\n }\n let visibility = null;\n for (let i = 0; i < metadata.length; ++i) {\n const paramMetadata = metadata[i];\n if (paramMetadata instanceof Type) {\n token = paramMetadata;\n }\n else if (paramMetadata instanceof Inject) {\n token = paramMetadata.token;\n }\n else if (paramMetadata instanceof Optional) {\n optional = true;\n }\n else if (paramMetadata instanceof Self || paramMetadata instanceof SkipSelf) {\n visibility = paramMetadata;\n }\n else if (paramMetadata instanceof InjectionToken) {\n token = paramMetadata;\n }\n }\n token = resolveForwardRef(token);\n if (token != null) {\n return _createDependency(token, optional, visibility);\n }\n else {\n throw noAnnotationError(typeOrFunc, params);\n }\n}\nfunction _createDependency(token, optional, visibility) {\n return new ReflectiveDependency(ReflectiveKey.get(token), optional, visibility);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Threshold for the dynamic version\nconst UNDEFINED = {};\n/**\n * A ReflectiveDependency injection container used for instantiating objects and resolving\n * dependencies.\n *\n * An `Injector` is a replacement for a `new` operator, which can automatically resolve the\n * constructor dependencies.\n *\n * In typical use, application code asks for the dependencies in the constructor and they are\n * resolved by the `Injector`.\n *\n * @usageNotes\n * ### Example\n *\n * The following example creates an `Injector` configured to create `Engine` and `Car`.\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);\n * var car = injector.get(Car);\n * expect(car instanceof Car).toBe(true);\n * expect(car.engine instanceof Engine).toBe(true);\n * ```\n *\n * Notice, we don't use the `new` operator because we explicitly want to have the `Injector`\n * resolve all of the object's dependencies automatically.\n *\n * TODO: delete in v14.\n *\n * @deprecated from v5 - slow and brings in a lot of code, Use `Injector.create` instead.\n * @publicApi\n */\nclass ReflectiveInjector {\n /**\n * Turns an array of provider definitions into an array of resolved providers.\n *\n * A resolution is a process of flattening multiple nested arrays and converting individual\n * providers into an array of `ResolvedReflectiveProvider`s.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var providers = ReflectiveInjector.resolve([Car, [[Engine]]]);\n *\n * expect(providers.length).toEqual(2);\n *\n * expect(providers[0] instanceof ResolvedReflectiveProvider).toBe(true);\n * expect(providers[0].key.displayName).toBe(\"Car\");\n * expect(providers[0].dependencies.length).toEqual(1);\n * expect(providers[0].factory).toBeDefined();\n *\n * expect(providers[1].key.displayName).toBe(\"Engine\");\n * });\n * ```\n *\n */\n static resolve(providers) {\n return resolveReflectiveProviders(providers);\n }\n /**\n * Resolves an array of providers and creates an injector from those providers.\n *\n * The passed-in providers can be an array of `Type`, `Provider`,\n * or a recursive array of more providers.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);\n * expect(injector.get(Car) instanceof Car).toBe(true);\n * ```\n */\n static resolveAndCreate(providers, parent) {\n const ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);\n return ReflectiveInjector.fromResolvedProviders(ResolvedReflectiveProviders, parent);\n }\n /**\n * Creates an injector from previously resolved providers.\n *\n * This API is the recommended way to construct injectors in performance-sensitive parts.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var providers = ReflectiveInjector.resolve([Car, Engine]);\n * var injector = ReflectiveInjector.fromResolvedProviders(providers);\n * expect(injector.get(Car) instanceof Car).toBe(true);\n * ```\n */\n static fromResolvedProviders(providers, parent) {\n return new ReflectiveInjector_(providers, parent);\n }\n}\nclass ReflectiveInjector_ {\n /**\n * Private\n */\n constructor(_providers, _parent) {\n /** @internal */\n this._constructionCounter = 0;\n this._providers = _providers;\n this.parent = _parent || null;\n const len = _providers.length;\n this.keyIds = [];\n this.objs = [];\n for (let i = 0; i < len; i++) {\n this.keyIds[i] = _providers[i].key.id;\n this.objs[i] = UNDEFINED;\n }\n }\n get(token, notFoundValue = THROW_IF_NOT_FOUND) {\n return this._getByKey(ReflectiveKey.get(token), null, notFoundValue);\n }\n resolveAndCreateChild(providers) {\n const ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);\n return this.createChildFromResolved(ResolvedReflectiveProviders);\n }\n createChildFromResolved(providers) {\n const inj = new ReflectiveInjector_(providers);\n inj.parent = this;\n return inj;\n }\n resolveAndInstantiate(provider) {\n return this.instantiateResolved(ReflectiveInjector.resolve([provider])[0]);\n }\n instantiateResolved(provider) {\n return this._instantiateProvider(provider);\n }\n getProviderAtIndex(index) {\n if (index < 0 || index >= this._providers.length) {\n throw outOfBoundsError(index);\n }\n return this._providers[index];\n }\n /** @internal */\n _new(provider) {\n if (this._constructionCounter++ > this._getMaxNumberOfObjects()) {\n throw cyclicDependencyError(this, provider.key);\n }\n return this._instantiateProvider(provider);\n }\n _getMaxNumberOfObjects() {\n return this.objs.length;\n }\n _instantiateProvider(provider) {\n if (provider.multiProvider) {\n const res = [];\n for (let i = 0; i < provider.resolvedFactories.length; ++i) {\n res[i] = this._instantiate(provider, provider.resolvedFactories[i]);\n }\n return res;\n }\n else {\n return this._instantiate(provider, provider.resolvedFactories[0]);\n }\n }\n _instantiate(provider, ResolvedReflectiveFactory) {\n const factory = ResolvedReflectiveFactory.factory;\n let deps;\n try {\n deps =\n ResolvedReflectiveFactory.dependencies.map(dep => this._getByReflectiveDependency(dep));\n }\n catch (e) {\n if (e.addKey) {\n e.addKey(this, provider.key);\n }\n throw e;\n }\n let obj;\n try {\n obj = factory(...deps);\n }\n catch (e) {\n throw instantiationError(this, e, e.stack, provider.key);\n }\n return obj;\n }\n _getByReflectiveDependency(dep) {\n return this._getByKey(dep.key, dep.visibility, dep.optional ? null : THROW_IF_NOT_FOUND);\n }\n _getByKey(key, visibility, notFoundValue) {\n if (key === ReflectiveInjector_.INJECTOR_KEY) {\n return this;\n }\n if (visibility instanceof Self) {\n return this._getByKeySelf(key, notFoundValue);\n }\n else {\n return this._getByKeyDefault(key, notFoundValue, visibility);\n }\n }\n _getObjByKeyId(keyId) {\n for (let i = 0; i < this.keyIds.length; i++) {\n if (this.keyIds[i] === keyId) {\n if (this.objs[i] === UNDEFINED) {\n this.objs[i] = this._new(this._providers[i]);\n }\n return this.objs[i];\n }\n }\n return UNDEFINED;\n }\n /** @internal */\n _throwOrNull(key, notFoundValue) {\n if (notFoundValue !== THROW_IF_NOT_FOUND) {\n return notFoundValue;\n }\n else {\n throw noProviderError(this, key);\n }\n }\n /** @internal */\n _getByKeySelf(key, notFoundValue) {\n const obj = this._getObjByKeyId(key.id);\n return (obj !== UNDEFINED) ? obj : this._throwOrNull(key, notFoundValue);\n }\n /** @internal */\n _getByKeyDefault(key, notFoundValue, visibility) {\n let inj;\n if (visibility instanceof SkipSelf) {\n inj = this.parent;\n }\n else {\n inj = this;\n }\n while (inj instanceof ReflectiveInjector_) {\n const inj_ = inj;\n const obj = inj_._getObjByKeyId(key.id);\n if (obj !== UNDEFINED)\n return obj;\n inj = inj_.parent;\n }\n if (inj !== null) {\n return inj.get(key.token, notFoundValue);\n }\n else {\n return this._throwOrNull(key, notFoundValue);\n }\n }\n get displayName() {\n const providers = _mapProviders(this, (b) => ' \"' + b.key.displayName + '\" ')\n .join(', ');\n return `ReflectiveInjector(providers: [${providers}])`;\n }\n toString() {\n return this.displayName;\n }\n}\nReflectiveInjector_.INJECTOR_KEY = ( /* @__PURE__ */ReflectiveKey.get(Injector));\nfunction _mapProviders(injector, fn) {\n const res = [];\n for (let i = 0; i < injector._providers.length; ++i) {\n res[i] = fn(injector.getProviderAtIndex(i));\n }\n return res;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction ɵɵdirectiveInject(token, flags = InjectFlags.Default) {\n const lView = getLView();\n // Fall back to inject() if view hasn't been created. This situation can happen in tests\n // if inject utilities are used before bootstrapping.\n if (lView === null) {\n // Verify that we will not get into infinite loop.\n ngDevMode && assertInjectImplementationNotEqual(ɵɵdirectiveInject);\n return ɵɵinject(token, flags);\n }\n const tNode = getCurrentTNode();\n return getOrCreateInjectable(tNode, lView, resolveForwardRef(token), flags);\n}\n/**\n * Throws an error indicating that a factory function could not be generated by the compiler for a\n * particular class.\n *\n * This instruction allows the actual error message to be optimized away when ngDevMode is turned\n * off, saving bytes of generated code while still providing a good experience in dev mode.\n *\n * The name of the class is not mentioned here, but will be in the generated factory function name\n * and thus in the stack trace.\n *\n * @codeGenApi\n */\nfunction ɵɵinvalidFactory() {\n const msg = ngDevMode ? `This constructor was not compatible with Dependency Injection.` : 'invalid';\n throw new Error(msg);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Invoke `HostBindingsFunction`s for view.\n *\n * This methods executes `TView.hostBindingOpCodes`. It is used to execute the\n * `HostBindingsFunction`s associated with the current `LView`.\n *\n * @param tView Current `TView`.\n * @param lView Current `LView`.\n */\nfunction processHostBindingOpCodes(tView, lView) {\n const hostBindingOpCodes = tView.hostBindingOpCodes;\n if (hostBindingOpCodes === null)\n return;\n try {\n for (let i = 0; i < hostBindingOpCodes.length; i++) {\n const opCode = hostBindingOpCodes[i];\n if (opCode < 0) {\n // Negative numbers are element indexes.\n setSelectedIndex(~opCode);\n }\n else {\n // Positive numbers are NumberTuple which store bindingRootIndex and directiveIndex.\n const directiveIdx = opCode;\n const bindingRootIndx = hostBindingOpCodes[++i];\n const hostBindingFn = hostBindingOpCodes[++i];\n setBindingRootForHostBindings(bindingRootIndx, directiveIdx);\n const context = lView[directiveIdx];\n hostBindingFn(2 /* RenderFlags.Update */, context);\n }\n }\n }\n finally {\n setSelectedIndex(-1);\n }\n}\n/** Refreshes all content queries declared by directives in a given view */\nfunction refreshContentQueries(tView, lView) {\n const contentQueries = tView.contentQueries;\n if (contentQueries !== null) {\n for (let i = 0; i < contentQueries.length; i += 2) {\n const queryStartIdx = contentQueries[i];\n const directiveDefIdx = contentQueries[i + 1];\n if (directiveDefIdx !== -1) {\n const directiveDef = tView.data[directiveDefIdx];\n ngDevMode && assertDefined(directiveDef, 'DirectiveDef not found.');\n ngDevMode &&\n assertDefined(directiveDef.contentQueries, 'contentQueries function should be defined');\n setCurrentQueryIndex(queryStartIdx);\n directiveDef.contentQueries(2 /* RenderFlags.Update */, lView[directiveDefIdx], directiveDefIdx);\n }\n }\n }\n}\n/** Refreshes child components in the current view (update mode). */\nfunction refreshChildComponents(hostLView, components) {\n for (let i = 0; i < components.length; i++) {\n refreshComponent(hostLView, components[i]);\n }\n}\n/** Renders child components in the current view (creation mode). */\nfunction renderChildComponents(hostLView, components) {\n for (let i = 0; i < components.length; i++) {\n renderComponent(hostLView, components[i]);\n }\n}\nfunction createLView(parentLView, tView, context, flags, host, tHostNode, rendererFactory, renderer, sanitizer, injector, embeddedViewInjector) {\n const lView = tView.blueprint.slice();\n lView[HOST] = host;\n lView[FLAGS] = flags | 4 /* LViewFlags.CreationMode */ | 64 /* LViewFlags.Attached */ | 8 /* LViewFlags.FirstLViewPass */;\n if (embeddedViewInjector !== null ||\n (parentLView && (parentLView[FLAGS] & 1024 /* LViewFlags.HasEmbeddedViewInjector */))) {\n lView[FLAGS] |= 1024 /* LViewFlags.HasEmbeddedViewInjector */;\n }\n resetPreOrderHookFlags(lView);\n ngDevMode && tView.declTNode && parentLView && assertTNodeForLView(tView.declTNode, parentLView);\n lView[PARENT] = lView[DECLARATION_VIEW] = parentLView;\n lView[CONTEXT] = context;\n lView[RENDERER_FACTORY] = (rendererFactory || parentLView && parentLView[RENDERER_FACTORY]);\n ngDevMode && assertDefined(lView[RENDERER_FACTORY], 'RendererFactory is required');\n lView[RENDERER] = (renderer || parentLView && parentLView[RENDERER]);\n ngDevMode && assertDefined(lView[RENDERER], 'Renderer is required');\n lView[SANITIZER] = sanitizer || parentLView && parentLView[SANITIZER] || null;\n lView[INJECTOR$1] = injector || parentLView && parentLView[INJECTOR$1] || null;\n lView[T_HOST] = tHostNode;\n lView[ID] = getUniqueLViewId();\n lView[EMBEDDED_VIEW_INJECTOR] = embeddedViewInjector;\n ngDevMode &&\n assertEqual(tView.type == 2 /* TViewType.Embedded */ ? parentLView !== null : true, true, 'Embedded views must have parentLView');\n lView[DECLARATION_COMPONENT_VIEW] =\n tView.type == 2 /* TViewType.Embedded */ ? parentLView[DECLARATION_COMPONENT_VIEW] : lView;\n return lView;\n}\nfunction getOrCreateTNode(tView, index, type, name, attrs) {\n ngDevMode && index !== 0 && // 0 are bogus nodes and they are OK. See `createContainerRef` in\n // `view_engine_compatibility` for additional context.\n assertGreaterThanOrEqual(index, HEADER_OFFSET, 'TNodes can\\'t be in the LView header.');\n // Keep this function short, so that the VM will inline it.\n ngDevMode && assertPureTNodeType(type);\n let tNode = tView.data[index];\n if (tNode === null) {\n tNode = createTNodeAtIndex(tView, index, type, name, attrs);\n if (isInI18nBlock()) {\n // If we are in i18n block then all elements should be pre declared through `Placeholder`\n // See `TNodeType.Placeholder` and `LFrame.inI18n` for more context.\n // If the `TNode` was not pre-declared than it means it was not mentioned which means it was\n // removed, so we mark it as detached.\n tNode.flags |= 32 /* TNodeFlags.isDetached */;\n }\n }\n else if (tNode.type & 64 /* TNodeType.Placeholder */) {\n tNode.type = type;\n tNode.value = name;\n tNode.attrs = attrs;\n const parent = getCurrentParentTNode();\n tNode.injectorIndex = parent === null ? -1 : parent.injectorIndex;\n ngDevMode && assertTNodeForTView(tNode, tView);\n ngDevMode && assertEqual(index, tNode.index, 'Expecting same index');\n }\n setCurrentTNode(tNode, true);\n return tNode;\n}\nfunction createTNodeAtIndex(tView, index, type, name, attrs) {\n const currentTNode = getCurrentTNodePlaceholderOk();\n const isParent = isCurrentTNodeParent();\n const parent = isParent ? currentTNode : currentTNode && currentTNode.parent;\n // Parents cannot cross component boundaries because components will be used in multiple places.\n const tNode = tView.data[index] =\n createTNode(tView, parent, type, index, name, attrs);\n // Assign a pointer to the first child node of a given view. The first node is not always the one\n // at index 0, in case of i18n, index 0 can be the instruction `i18nStart` and the first node has\n // the index 1 or more, so we can't just check node index.\n if (tView.firstChild === null) {\n tView.firstChild = tNode;\n }\n if (currentTNode !== null) {\n if (isParent) {\n // FIXME(misko): This logic looks unnecessarily complicated. Could we simplify?\n if (currentTNode.child == null && tNode.parent !== null) {\n // We are in the same view, which means we are adding content node to the parent view.\n currentTNode.child = tNode;\n }\n }\n else {\n if (currentTNode.next === null) {\n // In the case of i18n the `currentTNode` may already be linked, in which case we don't want\n // to break the links which i18n created.\n currentTNode.next = tNode;\n }\n }\n }\n return tNode;\n}\n/**\n * When elements are created dynamically after a view blueprint is created (e.g. through\n * i18nApply()), we need to adjust the blueprint for future\n * template passes.\n *\n * @param tView `TView` associated with `LView`\n * @param lView The `LView` containing the blueprint to adjust\n * @param numSlotsToAlloc The number of slots to alloc in the LView, should be >0\n * @param initialValue Initial value to store in blueprint\n */\nfunction allocExpando(tView, lView, numSlotsToAlloc, initialValue) {\n if (numSlotsToAlloc === 0)\n return -1;\n if (ngDevMode) {\n assertFirstCreatePass(tView);\n assertSame(tView, lView[TVIEW], '`LView` must be associated with `TView`!');\n assertEqual(tView.data.length, lView.length, 'Expecting LView to be same size as TView');\n assertEqual(tView.data.length, tView.blueprint.length, 'Expecting Blueprint to be same size as TView');\n assertFirstUpdatePass(tView);\n }\n const allocIdx = lView.length;\n for (let i = 0; i < numSlotsToAlloc; i++) {\n lView.push(initialValue);\n tView.blueprint.push(initialValue);\n tView.data.push(null);\n }\n return allocIdx;\n}\n//////////////////////////\n//// Render\n//////////////////////////\n/**\n * Processes a view in the creation mode. This includes a number of steps in a specific order:\n * - creating view query functions (if any);\n * - executing a template function in the creation mode;\n * - updating static queries (if any);\n * - creating child components defined in a given view.\n */\nfunction renderView(tView, lView, context) {\n ngDevMode && assertEqual(isCreationMode(lView), true, 'Should be run in creation mode');\n enterView(lView);\n try {\n const viewQuery = tView.viewQuery;\n if (viewQuery !== null) {\n executeViewQueryFn(1 /* RenderFlags.Create */, viewQuery, context);\n }\n // Execute a template associated with this view, if it exists. A template function might not be\n // defined for the root component views.\n const templateFn = tView.template;\n if (templateFn !== null) {\n executeTemplate(tView, lView, templateFn, 1 /* RenderFlags.Create */, context);\n }\n // This needs to be set before children are processed to support recursive components.\n // This must be set to false immediately after the first creation run because in an\n // ngFor loop, all the views will be created together before update mode runs and turns\n // off firstCreatePass. If we don't set it here, instances will perform directive\n // matching, etc again and again.\n if (tView.firstCreatePass) {\n tView.firstCreatePass = false;\n }\n // We resolve content queries specifically marked as `static` in creation mode. Dynamic\n // content queries are resolved during change detection (i.e. update mode), after embedded\n // views are refreshed (see block above).\n if (tView.staticContentQueries) {\n refreshContentQueries(tView, lView);\n }\n // We must materialize query results before child components are processed\n // in case a child component has projected a container. The LContainer needs\n // to exist so the embedded views are properly attached by the container.\n if (tView.staticViewQueries) {\n executeViewQueryFn(2 /* RenderFlags.Update */, tView.viewQuery, context);\n }\n // Render child component views.\n const components = tView.components;\n if (components !== null) {\n renderChildComponents(lView, components);\n }\n }\n catch (error) {\n // If we didn't manage to get past the first template pass due to\n // an error, mark the view as corrupted so we can try to recover.\n if (tView.firstCreatePass) {\n tView.incompleteFirstPass = true;\n tView.firstCreatePass = false;\n }\n throw error;\n }\n finally {\n lView[FLAGS] &= ~4 /* LViewFlags.CreationMode */;\n leaveView();\n }\n}\n/**\n * Processes a view in update mode. This includes a number of steps in a specific order:\n * - executing a template function in update mode;\n * - executing hooks;\n * - refreshing queries;\n * - setting host bindings;\n * - refreshing child (embedded and component) views.\n */\nfunction refreshView(tView, lView, templateFn, context) {\n ngDevMode && assertEqual(isCreationMode(lView), false, 'Should be run in update mode');\n const flags = lView[FLAGS];\n if ((flags & 128 /* LViewFlags.Destroyed */) === 128 /* LViewFlags.Destroyed */)\n return;\n enterView(lView);\n // Check no changes mode is a dev only mode used to verify that bindings have not changed\n // since they were assigned. We do not want to execute lifecycle hooks in that mode.\n const isInCheckNoChangesPass = ngDevMode && isInCheckNoChangesMode();\n try {\n resetPreOrderHookFlags(lView);\n setBindingIndex(tView.bindingStartIndex);\n if (templateFn !== null) {\n executeTemplate(tView, lView, templateFn, 2 /* RenderFlags.Update */, context);\n }\n const hooksInitPhaseCompleted = (flags & 3 /* LViewFlags.InitPhaseStateMask */) === 3 /* InitPhaseState.InitPhaseCompleted */;\n // execute pre-order hooks (OnInit, OnChanges, DoCheck)\n // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n if (!isInCheckNoChangesPass) {\n if (hooksInitPhaseCompleted) {\n const preOrderCheckHooks = tView.preOrderCheckHooks;\n if (preOrderCheckHooks !== null) {\n executeCheckHooks(lView, preOrderCheckHooks, null);\n }\n }\n else {\n const preOrderHooks = tView.preOrderHooks;\n if (preOrderHooks !== null) {\n executeInitAndCheckHooks(lView, preOrderHooks, 0 /* InitPhaseState.OnInitHooksToBeRun */, null);\n }\n incrementInitPhaseFlags(lView, 0 /* InitPhaseState.OnInitHooksToBeRun */);\n }\n }\n // First mark transplanted views that are declared in this lView as needing a refresh at their\n // insertion points. This is needed to avoid the situation where the template is defined in this\n // `LView` but its declaration appears after the insertion component.\n markTransplantedViewsForRefresh(lView);\n refreshEmbeddedViews(lView);\n // Content query results must be refreshed before content hooks are called.\n if (tView.contentQueries !== null) {\n refreshContentQueries(tView, lView);\n }\n // execute content hooks (AfterContentInit, AfterContentChecked)\n // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n if (!isInCheckNoChangesPass) {\n if (hooksInitPhaseCompleted) {\n const contentCheckHooks = tView.contentCheckHooks;\n if (contentCheckHooks !== null) {\n executeCheckHooks(lView, contentCheckHooks);\n }\n }\n else {\n const contentHooks = tView.contentHooks;\n if (contentHooks !== null) {\n executeInitAndCheckHooks(lView, contentHooks, 1 /* InitPhaseState.AfterContentInitHooksToBeRun */);\n }\n incrementInitPhaseFlags(lView, 1 /* InitPhaseState.AfterContentInitHooksToBeRun */);\n }\n }\n processHostBindingOpCodes(tView, lView);\n // Refresh child component views.\n const components = tView.components;\n if (components !== null) {\n refreshChildComponents(lView, components);\n }\n // View queries must execute after refreshing child components because a template in this view\n // could be inserted in a child component. If the view query executes before child component\n // refresh, the template might not yet be inserted.\n const viewQuery = tView.viewQuery;\n if (viewQuery !== null) {\n executeViewQueryFn(2 /* RenderFlags.Update */, viewQuery, context);\n }\n // execute view hooks (AfterViewInit, AfterViewChecked)\n // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n if (!isInCheckNoChangesPass) {\n if (hooksInitPhaseCompleted) {\n const viewCheckHooks = tView.viewCheckHooks;\n if (viewCheckHooks !== null) {\n executeCheckHooks(lView, viewCheckHooks);\n }\n }\n else {\n const viewHooks = tView.viewHooks;\n if (viewHooks !== null) {\n executeInitAndCheckHooks(lView, viewHooks, 2 /* InitPhaseState.AfterViewInitHooksToBeRun */);\n }\n incrementInitPhaseFlags(lView, 2 /* InitPhaseState.AfterViewInitHooksToBeRun */);\n }\n }\n if (tView.firstUpdatePass === true) {\n // We need to make sure that we only flip the flag on successful `refreshView` only\n // Don't do this in `finally` block.\n // If we did this in `finally` block then an exception could block the execution of styling\n // instructions which in turn would be unable to insert themselves into the styling linked\n // list. The result of this would be that if the exception would not be throw on subsequent CD\n // the styling would be unable to process it data and reflect to the DOM.\n tView.firstUpdatePass = false;\n }\n // Do not reset the dirty state when running in check no changes mode. We don't want components\n // to behave differently depending on whether check no changes is enabled or not. For example:\n // Marking an OnPush component as dirty from within the `ngAfterViewInit` hook in order to\n // refresh a `NgClass` binding should work. If we would reset the dirty state in the check\n // no changes cycle, the component would be not be dirty for the next update pass. This would\n // be different in production mode where the component dirty state is not reset.\n if (!isInCheckNoChangesPass) {\n lView[FLAGS] &= ~(32 /* LViewFlags.Dirty */ | 8 /* LViewFlags.FirstLViewPass */);\n }\n if (lView[FLAGS] & 512 /* LViewFlags.RefreshTransplantedView */) {\n lView[FLAGS] &= ~512 /* LViewFlags.RefreshTransplantedView */;\n updateTransplantedViewCount(lView[PARENT], -1);\n }\n }\n finally {\n leaveView();\n }\n}\nfunction executeTemplate(tView, lView, templateFn, rf, context) {\n const prevSelectedIndex = getSelectedIndex();\n const isUpdatePhase = rf & 2 /* RenderFlags.Update */;\n try {\n setSelectedIndex(-1);\n if (isUpdatePhase && lView.length > HEADER_OFFSET) {\n // When we're updating, inherently select 0 so we don't\n // have to generate that instruction for most update blocks.\n selectIndexInternal(tView, lView, HEADER_OFFSET, !!ngDevMode && isInCheckNoChangesMode());\n }\n const preHookType = isUpdatePhase ? 2 /* ProfilerEvent.TemplateUpdateStart */ : 0 /* ProfilerEvent.TemplateCreateStart */;\n profiler(preHookType, context);\n templateFn(rf, context);\n }\n finally {\n setSelectedIndex(prevSelectedIndex);\n const postHookType = isUpdatePhase ? 3 /* ProfilerEvent.TemplateUpdateEnd */ : 1 /* ProfilerEvent.TemplateCreateEnd */;\n profiler(postHookType, context);\n }\n}\n//////////////////////////\n//// Element\n//////////////////////////\nfunction executeContentQueries(tView, tNode, lView) {\n if (isContentQueryHost(tNode)) {\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n for (let directiveIndex = start; directiveIndex < end; directiveIndex++) {\n const def = tView.data[directiveIndex];\n if (def.contentQueries) {\n def.contentQueries(1 /* RenderFlags.Create */, lView[directiveIndex], directiveIndex);\n }\n }\n }\n}\n/**\n * Creates directive instances.\n */\nfunction createDirectivesInstances(tView, lView, tNode) {\n if (!getBindingsEnabled())\n return;\n instantiateAllDirectives(tView, lView, tNode, getNativeByTNode(tNode, lView));\n if ((tNode.flags & 64 /* TNodeFlags.hasHostBindings */) === 64 /* TNodeFlags.hasHostBindings */) {\n invokeDirectivesHostBindings(tView, lView, tNode);\n }\n}\n/**\n * Takes a list of local names and indices and pushes the resolved local variable values\n * to LView in the same order as they are loaded in the template with load().\n */\nfunction saveResolvedLocalsInData(viewData, tNode, localRefExtractor = getNativeByTNode) {\n const localNames = tNode.localNames;\n if (localNames !== null) {\n let localIndex = tNode.index + 1;\n for (let i = 0; i < localNames.length; i += 2) {\n const index = localNames[i + 1];\n const value = index === -1 ?\n localRefExtractor(tNode, viewData) :\n viewData[index];\n viewData[localIndex++] = value;\n }\n }\n}\n/**\n * Gets TView from a template function or creates a new TView\n * if it doesn't already exist.\n *\n * @param def ComponentDef\n * @returns TView\n */\nfunction getOrCreateComponentTView(def) {\n const tView = def.tView;\n // Create a TView if there isn't one, or recreate it if the first create pass didn't\n // complete successfully since we can't know for sure whether it's in a usable shape.\n if (tView === null || tView.incompleteFirstPass) {\n // Declaration node here is null since this function is called when we dynamically create a\n // component and hence there is no declaration.\n const declTNode = null;\n return def.tView = createTView(1 /* TViewType.Component */, declTNode, def.template, def.decls, def.vars, def.directiveDefs, def.pipeDefs, def.viewQuery, def.schemas, def.consts);\n }\n return tView;\n}\n/**\n * Creates a TView instance\n *\n * @param type Type of `TView`.\n * @param declTNode Declaration location of this `TView`.\n * @param templateFn Template function\n * @param decls The number of nodes, local refs, and pipes in this template\n * @param directives Registry of directives for this view\n * @param pipes Registry of pipes for this view\n * @param viewQuery View queries for this view\n * @param schemas Schemas for this view\n * @param consts Constants for this view\n */\nfunction createTView(type, declTNode, templateFn, decls, vars, directives, pipes, viewQuery, schemas, constsOrFactory) {\n ngDevMode && ngDevMode.tView++;\n const bindingStartIndex = HEADER_OFFSET + decls;\n // This length does not yet contain host bindings from child directives because at this point,\n // we don't know which directives are active on this template. As soon as a directive is matched\n // that has a host binding, we will update the blueprint with that def's hostVars count.\n const initialViewLength = bindingStartIndex + vars;\n const blueprint = createViewBlueprint(bindingStartIndex, initialViewLength);\n const consts = typeof constsOrFactory === 'function' ? constsOrFactory() : constsOrFactory;\n const tView = blueprint[TVIEW] = {\n type: type,\n blueprint: blueprint,\n template: templateFn,\n queries: null,\n viewQuery: viewQuery,\n declTNode: declTNode,\n data: blueprint.slice().fill(null, bindingStartIndex),\n bindingStartIndex: bindingStartIndex,\n expandoStartIndex: initialViewLength,\n hostBindingOpCodes: null,\n firstCreatePass: true,\n firstUpdatePass: true,\n staticViewQueries: false,\n staticContentQueries: false,\n preOrderHooks: null,\n preOrderCheckHooks: null,\n contentHooks: null,\n contentCheckHooks: null,\n viewHooks: null,\n viewCheckHooks: null,\n destroyHooks: null,\n cleanup: null,\n contentQueries: null,\n components: null,\n directiveRegistry: typeof directives === 'function' ? directives() : directives,\n pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,\n firstChild: null,\n schemas: schemas,\n consts: consts,\n incompleteFirstPass: false\n };\n if (ngDevMode) {\n // For performance reasons it is important that the tView retains the same shape during runtime.\n // (To make sure that all of the code is monomorphic.) For this reason we seal the object to\n // prevent class transitions.\n Object.seal(tView);\n }\n return tView;\n}\nfunction createViewBlueprint(bindingStartIndex, initialViewLength) {\n const blueprint = [];\n for (let i = 0; i < initialViewLength; i++) {\n blueprint.push(i < bindingStartIndex ? null : NO_CHANGE);\n }\n return blueprint;\n}\n/**\n * Locates the host native element, used for bootstrapping existing nodes into rendering pipeline.\n *\n * @param rendererFactory Factory function to create renderer instance.\n * @param elementOrSelector Render element or CSS selector to locate the element.\n * @param encapsulation View Encapsulation defined for component that requests host element.\n */\nfunction locateHostElement(renderer, elementOrSelector, encapsulation) {\n // When using native Shadow DOM, do not clear host element to allow native slot projection\n const preserveContent = encapsulation === ViewEncapsulation$1.ShadowDom;\n return renderer.selectRootElement(elementOrSelector, preserveContent);\n}\n/**\n * Saves context for this cleanup function in LView.cleanupInstances.\n *\n * On the first template pass, saves in TView:\n * - Cleanup function\n * - Index of context we just saved in LView.cleanupInstances\n *\n * This function can also be used to store instance specific cleanup fns. In that case the `context`\n * is `null` and the function is store in `LView` (rather than it `TView`).\n */\nfunction storeCleanupWithContext(tView, lView, context, cleanupFn) {\n const lCleanup = getOrCreateLViewCleanup(lView);\n if (context === null) {\n // If context is null that this is instance specific callback. These callbacks can only be\n // inserted after template shared instances. For this reason in ngDevMode we freeze the TView.\n if (ngDevMode) {\n Object.freeze(getOrCreateTViewCleanup(tView));\n }\n lCleanup.push(cleanupFn);\n }\n else {\n lCleanup.push(context);\n if (tView.firstCreatePass) {\n getOrCreateTViewCleanup(tView).push(cleanupFn, lCleanup.length - 1);\n }\n }\n}\nfunction createTNode(tView, tParent, type, index, value, attrs) {\n ngDevMode && index !== 0 && // 0 are bogus nodes and they are OK. See `createContainerRef` in\n // `view_engine_compatibility` for additional context.\n assertGreaterThanOrEqual(index, HEADER_OFFSET, 'TNodes can\\'t be in the LView header.');\n ngDevMode && assertNotSame(attrs, undefined, '\\'undefined\\' is not valid value for \\'attrs\\'');\n ngDevMode && ngDevMode.tNode++;\n ngDevMode && tParent && assertTNodeForTView(tParent, tView);\n let injectorIndex = tParent ? tParent.injectorIndex : -1;\n const tNode = {\n type,\n index,\n insertBeforeIndex: null,\n injectorIndex,\n directiveStart: -1,\n directiveEnd: -1,\n directiveStylingLast: -1,\n componentOffset: -1,\n propertyBindings: null,\n flags: 0,\n providerIndexes: 0,\n value: value,\n attrs: attrs,\n mergedAttrs: null,\n localNames: null,\n initialInputs: undefined,\n inputs: null,\n outputs: null,\n tViews: null,\n next: null,\n projectionNext: null,\n child: null,\n parent: tParent,\n projection: null,\n styles: null,\n stylesWithoutHost: null,\n residualStyles: undefined,\n classes: null,\n classesWithoutHost: null,\n residualClasses: undefined,\n classBindings: 0,\n styleBindings: 0,\n };\n if (ngDevMode) {\n // For performance reasons it is important that the tNode retains the same shape during runtime.\n // (To make sure that all of the code is monomorphic.) For this reason we seal the object to\n // prevent class transitions.\n Object.seal(tNode);\n }\n return tNode;\n}\n/**\n * Generates the `PropertyAliases` data structure from the provided input/output mapping.\n * @param aliasMap Input/output mapping from the directive definition.\n * @param directiveIndex Index of the directive.\n * @param propertyAliases Object in which to store the results.\n * @param hostDirectiveAliasMap Object used to alias or filter out properties for host directives.\n * If the mapping is provided, it'll act as an allowlist, as well as a mapping of what public\n * name inputs/outputs should be exposed under.\n */\nfunction generatePropertyAliases(aliasMap, directiveIndex, propertyAliases, hostDirectiveAliasMap) {\n for (let publicName in aliasMap) {\n if (aliasMap.hasOwnProperty(publicName)) {\n propertyAliases = propertyAliases === null ? {} : propertyAliases;\n const internalName = aliasMap[publicName];\n // If there are no host directive mappings, we want to remap using the alias map from the\n // definition itself. If there is an alias map, it has two functions:\n // 1. It serves as an allowlist of bindings that are exposed by the host directives. Only the\n // ones inside the host directive map will be exposed on the host.\n // 2. The public name of the property is aliased using the host directive alias map, rather\n // than the alias map from the definition.\n if (hostDirectiveAliasMap === null) {\n addPropertyAlias(propertyAliases, directiveIndex, publicName, internalName);\n }\n else if (hostDirectiveAliasMap.hasOwnProperty(publicName)) {\n addPropertyAlias(propertyAliases, directiveIndex, hostDirectiveAliasMap[publicName], internalName);\n }\n }\n }\n return propertyAliases;\n}\nfunction addPropertyAlias(propertyAliases, directiveIndex, publicName, internalName) {\n if (propertyAliases.hasOwnProperty(publicName)) {\n propertyAliases[publicName].push(directiveIndex, internalName);\n }\n else {\n propertyAliases[publicName] = [directiveIndex, internalName];\n }\n}\n/**\n * Initializes data structures required to work with directive inputs and outputs.\n * Initialization is done for all directives matched on a given TNode.\n */\nfunction initializeInputAndOutputAliases(tView, tNode, hostDirectiveDefinitionMap) {\n ngDevMode && assertFirstCreatePass(tView);\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n const tViewData = tView.data;\n const tNodeAttrs = tNode.attrs;\n const inputsFromAttrs = [];\n let inputsStore = null;\n let outputsStore = null;\n for (let directiveIndex = start; directiveIndex < end; directiveIndex++) {\n const directiveDef = tViewData[directiveIndex];\n const aliasData = hostDirectiveDefinitionMap ? hostDirectiveDefinitionMap.get(directiveDef) : null;\n const aliasedInputs = aliasData ? aliasData.inputs : null;\n const aliasedOutputs = aliasData ? aliasData.outputs : null;\n inputsStore =\n generatePropertyAliases(directiveDef.inputs, directiveIndex, inputsStore, aliasedInputs);\n outputsStore =\n generatePropertyAliases(directiveDef.outputs, directiveIndex, outputsStore, aliasedOutputs);\n // Do not use unbound attributes as inputs to structural directives, since structural\n // directive inputs can only be set using microsyntax (e.g. `<div *dir=\"exp\">`).\n // TODO(FW-1930): microsyntax expressions may also contain unbound/static attributes, which\n // should be set for inline templates.\n const initialInputs = (inputsStore !== null && tNodeAttrs !== null && !isInlineTemplate(tNode)) ?\n generateInitialInputs(inputsStore, directiveIndex, tNodeAttrs) :\n null;\n inputsFromAttrs.push(initialInputs);\n }\n if (inputsStore !== null) {\n if (inputsStore.hasOwnProperty('class')) {\n tNode.flags |= 8 /* TNodeFlags.hasClassInput */;\n }\n if (inputsStore.hasOwnProperty('style')) {\n tNode.flags |= 16 /* TNodeFlags.hasStyleInput */;\n }\n }\n tNode.initialInputs = inputsFromAttrs;\n tNode.inputs = inputsStore;\n tNode.outputs = outputsStore;\n}\n/**\n * Mapping between attributes names that don't correspond to their element property names.\n *\n * Performance note: this function is written as a series of if checks (instead of, say, a property\n * object lookup) for performance reasons - the series of `if` checks seems to be the fastest way of\n * mapping property names. Do NOT change without benchmarking.\n *\n * Note: this mapping has to be kept in sync with the equally named mapping in the template\n * type-checking machinery of ngtsc.\n */\nfunction mapPropName(name) {\n if (name === 'class')\n return 'className';\n if (name === 'for')\n return 'htmlFor';\n if (name === 'formaction')\n return 'formAction';\n if (name === 'innerHtml')\n return 'innerHTML';\n if (name === 'readonly')\n return 'readOnly';\n if (name === 'tabindex')\n return 'tabIndex';\n return name;\n}\nfunction elementPropertyInternal(tView, tNode, lView, propName, value, renderer, sanitizer, nativeOnly) {\n ngDevMode && assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n const element = getNativeByTNode(tNode, lView);\n let inputData = tNode.inputs;\n let dataValue;\n if (!nativeOnly && inputData != null && (dataValue = inputData[propName])) {\n setInputsForProperty(tView, lView, dataValue, propName, value);\n if (isComponentHost(tNode))\n markDirtyIfOnPush(lView, tNode.index);\n if (ngDevMode) {\n setNgReflectProperties(lView, element, tNode.type, dataValue, value);\n }\n }\n else if (tNode.type & 3 /* TNodeType.AnyRNode */) {\n propName = mapPropName(propName);\n if (ngDevMode) {\n validateAgainstEventProperties(propName);\n if (!isPropertyValid(element, propName, tNode.value, tView.schemas)) {\n handleUnknownPropertyError(propName, tNode.value, tNode.type, lView);\n }\n ngDevMode.rendererSetProperty++;\n }\n // It is assumed that the sanitizer is only added when the compiler determines that the\n // property is risky, so sanitization can be done without further checks.\n value = sanitizer != null ? sanitizer(value, tNode.value || '', propName) : value;\n renderer.setProperty(element, propName, value);\n }\n else if (tNode.type & 12 /* TNodeType.AnyContainer */) {\n // If the node is a container and the property didn't\n // match any of the inputs or schemas we should throw.\n if (ngDevMode && !matchingSchemas(tView.schemas, tNode.value)) {\n handleUnknownPropertyError(propName, tNode.value, tNode.type, lView);\n }\n }\n}\n/** If node is an OnPush component, marks its LView dirty. */\nfunction markDirtyIfOnPush(lView, viewIndex) {\n ngDevMode && assertLView(lView);\n const childComponentLView = getComponentLViewByIndex(viewIndex, lView);\n if (!(childComponentLView[FLAGS] & 16 /* LViewFlags.CheckAlways */)) {\n childComponentLView[FLAGS] |= 32 /* LViewFlags.Dirty */;\n }\n}\nfunction setNgReflectProperty(lView, element, type, attrName, value) {\n const renderer = lView[RENDERER];\n attrName = normalizeDebugBindingName(attrName);\n const debugValue = normalizeDebugBindingValue(value);\n if (type & 3 /* TNodeType.AnyRNode */) {\n if (value == null) {\n renderer.removeAttribute(element, attrName);\n }\n else {\n renderer.setAttribute(element, attrName, debugValue);\n }\n }\n else {\n const textContent = escapeCommentText(`bindings=${JSON.stringify({ [attrName]: debugValue }, null, 2)}`);\n renderer.setValue(element, textContent);\n }\n}\nfunction setNgReflectProperties(lView, element, type, dataValue, value) {\n if (type & (3 /* TNodeType.AnyRNode */ | 4 /* TNodeType.Container */)) {\n /**\n * dataValue is an array containing runtime input or output names for the directives:\n * i+0: directive instance index\n * i+1: privateName\n *\n * e.g. [0, 'change', 'change-minified']\n * we want to set the reflected property with the privateName: dataValue[i+1]\n */\n for (let i = 0; i < dataValue.length; i += 2) {\n setNgReflectProperty(lView, element, type, dataValue[i + 1], value);\n }\n }\n}\n/**\n * Resolve the matched directives on a node.\n */\nfunction resolveDirectives(tView, lView, tNode, localRefs) {\n // Please make sure to have explicit type for `exportsMap`. Inferred type triggers bug in\n // tsickle.\n ngDevMode && assertFirstCreatePass(tView);\n let hasDirectives = false;\n if (getBindingsEnabled()) {\n const exportsMap = localRefs === null ? null : { '': -1 };\n const matchResult = findDirectiveDefMatches(tView, tNode);\n let directiveDefs;\n let hostDirectiveDefs;\n if (matchResult === null) {\n directiveDefs = hostDirectiveDefs = null;\n }\n else {\n [directiveDefs, hostDirectiveDefs] = matchResult;\n }\n if (directiveDefs !== null) {\n hasDirectives = true;\n initializeDirectives(tView, lView, tNode, directiveDefs, exportsMap, hostDirectiveDefs);\n }\n if (exportsMap)\n cacheMatchingLocalNames(tNode, localRefs, exportsMap);\n }\n // Merge the template attrs last so that they have the highest priority.\n tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, tNode.attrs);\n return hasDirectives;\n}\n/** Initializes the data structures necessary for a list of directives to be instantiated. */\nfunction initializeDirectives(tView, lView, tNode, directives, exportsMap, hostDirectiveDefs) {\n ngDevMode && assertFirstCreatePass(tView);\n // Publishes the directive types to DI so they can be injected. Needs to\n // happen in a separate pass before the TNode flags have been initialized.\n for (let i = 0; i < directives.length; i++) {\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, directives[i].type);\n }\n initTNodeFlags(tNode, tView.data.length, directives.length);\n // When the same token is provided by several directives on the same node, some rules apply in\n // the viewEngine:\n // - viewProviders have priority over providers\n // - the last directive in NgModule.declarations has priority over the previous one\n // So to match these rules, the order in which providers are added in the arrays is very\n // important.\n for (let i = 0; i < directives.length; i++) {\n const def = directives[i];\n if (def.providersResolver)\n def.providersResolver(def);\n }\n let preOrderHooksFound = false;\n let preOrderCheckHooksFound = false;\n let directiveIdx = allocExpando(tView, lView, directives.length, null);\n ngDevMode &&\n assertSame(directiveIdx, tNode.directiveStart, 'TNode.directiveStart should point to just allocated space');\n for (let i = 0; i < directives.length; i++) {\n const def = directives[i];\n // Merge the attrs in the order of matches. This assumes that the first directive is the\n // component itself, so that the component has the least priority.\n tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, def.hostAttrs);\n configureViewWithDirective(tView, tNode, lView, directiveIdx, def);\n saveNameToExportMap(directiveIdx, def, exportsMap);\n if (def.contentQueries !== null)\n tNode.flags |= 4 /* TNodeFlags.hasContentQuery */;\n if (def.hostBindings !== null || def.hostAttrs !== null || def.hostVars !== 0)\n tNode.flags |= 64 /* TNodeFlags.hasHostBindings */;\n const lifeCycleHooks = def.type.prototype;\n // Only push a node index into the preOrderHooks array if this is the first\n // pre-order hook found on this node.\n if (!preOrderHooksFound &&\n (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngOnInit || lifeCycleHooks.ngDoCheck)) {\n // We will push the actual hook function into this array later during dir instantiation.\n // We cannot do it now because we must ensure hooks are registered in the same\n // order that directives are created (i.e. injection order).\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(tNode.index);\n preOrderHooksFound = true;\n }\n if (!preOrderCheckHooksFound && (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngDoCheck)) {\n (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(tNode.index);\n preOrderCheckHooksFound = true;\n }\n directiveIdx++;\n }\n initializeInputAndOutputAliases(tView, tNode, hostDirectiveDefs);\n}\n/**\n * Add `hostBindings` to the `TView.hostBindingOpCodes`.\n *\n * @param tView `TView` to which the `hostBindings` should be added.\n * @param tNode `TNode` the element which contains the directive\n * @param directiveIdx Directive index in view.\n * @param directiveVarsIdx Where will the directive's vars be stored\n * @param def `ComponentDef`/`DirectiveDef`, which contains the `hostVars`/`hostBindings` to add.\n */\nfunction registerHostBindingOpCodes(tView, tNode, directiveIdx, directiveVarsIdx, def) {\n ngDevMode && assertFirstCreatePass(tView);\n const hostBindings = def.hostBindings;\n if (hostBindings) {\n let hostBindingOpCodes = tView.hostBindingOpCodes;\n if (hostBindingOpCodes === null) {\n hostBindingOpCodes = tView.hostBindingOpCodes = [];\n }\n const elementIndx = ~tNode.index;\n if (lastSelectedElementIdx(hostBindingOpCodes) != elementIndx) {\n // Conditionally add select element so that we are more efficient in execution.\n // NOTE: this is strictly not necessary and it trades code size for runtime perf.\n // (We could just always add it.)\n hostBindingOpCodes.push(elementIndx);\n }\n hostBindingOpCodes.push(directiveIdx, directiveVarsIdx, hostBindings);\n }\n}\n/**\n * Returns the last selected element index in the `HostBindingOpCodes`\n *\n * For perf reasons we don't need to update the selected element index in `HostBindingOpCodes` only\n * if it changes. This method returns the last index (or '0' if not found.)\n *\n * Selected element index are only the ones which are negative.\n */\nfunction lastSelectedElementIdx(hostBindingOpCodes) {\n let i = hostBindingOpCodes.length;\n while (i > 0) {\n const value = hostBindingOpCodes[--i];\n if (typeof value === 'number' && value < 0) {\n return value;\n }\n }\n return 0;\n}\n/**\n * Instantiate all the directives that were previously resolved on the current node.\n */\nfunction instantiateAllDirectives(tView, lView, tNode, native) {\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n // The component view needs to be created before creating the node injector\n // since it is used to inject some special symbols like `ChangeDetectorRef`.\n if (isComponentHost(tNode)) {\n ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */);\n addComponentLogic(lView, tNode, tView.data[start + tNode.componentOffset]);\n }\n if (!tView.firstCreatePass) {\n getOrCreateNodeInjectorForNode(tNode, lView);\n }\n attachPatchData(native, lView);\n const initialInputs = tNode.initialInputs;\n for (let i = start; i < end; i++) {\n const def = tView.data[i];\n const directive = getNodeInjectable(lView, tView, i, tNode);\n attachPatchData(directive, lView);\n if (initialInputs !== null) {\n setInputsFromAttrs(lView, i - start, directive, def, tNode, initialInputs);\n }\n if (isComponentDef(def)) {\n const componentView = getComponentLViewByIndex(tNode.index, lView);\n componentView[CONTEXT] = getNodeInjectable(lView, tView, i, tNode);\n }\n }\n}\nfunction invokeDirectivesHostBindings(tView, lView, tNode) {\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n const elementIndex = tNode.index;\n const currentDirectiveIndex = getCurrentDirectiveIndex();\n try {\n setSelectedIndex(elementIndex);\n for (let dirIndex = start; dirIndex < end; dirIndex++) {\n const def = tView.data[dirIndex];\n const directive = lView[dirIndex];\n setCurrentDirectiveIndex(dirIndex);\n if (def.hostBindings !== null || def.hostVars !== 0 || def.hostAttrs !== null) {\n invokeHostBindingsInCreationMode(def, directive);\n }\n }\n }\n finally {\n setSelectedIndex(-1);\n setCurrentDirectiveIndex(currentDirectiveIndex);\n }\n}\n/**\n * Invoke the host bindings in creation mode.\n *\n * @param def `DirectiveDef` which may contain the `hostBindings` function.\n * @param directive Instance of directive.\n */\nfunction invokeHostBindingsInCreationMode(def, directive) {\n if (def.hostBindings !== null) {\n def.hostBindings(1 /* RenderFlags.Create */, directive);\n }\n}\n/**\n * Matches the current node against all available selectors.\n * If a component is matched (at most one), it is returned in first position in the array.\n */\nfunction findDirectiveDefMatches(tView, tNode) {\n ngDevMode && assertFirstCreatePass(tView);\n ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */ | 12 /* TNodeType.AnyContainer */);\n const registry = tView.directiveRegistry;\n let matches = null;\n let hostDirectiveDefs = null;\n if (registry) {\n for (let i = 0; i < registry.length; i++) {\n const def = registry[i];\n if (isNodeMatchingSelectorList(tNode, def.selectors, /* isProjectionMode */ false)) {\n matches || (matches = []);\n if (isComponentDef(def)) {\n if (ngDevMode) {\n assertTNodeType(tNode, 2 /* TNodeType.Element */, `\"${tNode.value}\" tags cannot be used as component hosts. ` +\n `Please use a different tag to activate the ${stringify(def.type)} component.`);\n if (isComponentHost(tNode)) {\n throwMultipleComponentError(tNode, matches.find(isComponentDef).type, def.type);\n }\n }\n // Components are inserted at the front of the matches array so that their lifecycle\n // hooks run before any directive lifecycle hooks. This appears to be for ViewEngine\n // compatibility. This logic doesn't make sense with host directives, because it\n // would allow the host directives to undo any overrides the host may have made.\n // To handle this case, the host directives of components are inserted at the beginning\n // of the array, followed by the component. As such, the insertion order is as follows:\n // 1. Host directives belonging to the selector-matched component.\n // 2. Selector-matched component.\n // 3. Host directives belonging to selector-matched directives.\n // 4. Selector-matched directives.\n if (def.findHostDirectiveDefs !== null) {\n const hostDirectiveMatches = [];\n hostDirectiveDefs = hostDirectiveDefs || new Map();\n def.findHostDirectiveDefs(def, hostDirectiveMatches, hostDirectiveDefs);\n // Add all host directives declared on this component, followed by the component itself.\n // Host directives should execute first so the host has a chance to override changes\n // to the DOM made by them.\n matches.unshift(...hostDirectiveMatches, def);\n // Component is offset starting from the beginning of the host directives array.\n const componentOffset = hostDirectiveMatches.length;\n markAsComponentHost(tView, tNode, componentOffset);\n }\n else {\n // No host directives on this component, just add the\n // component def to the beginning of the matches.\n matches.unshift(def);\n markAsComponentHost(tView, tNode, 0);\n }\n }\n else {\n // Append any host directives to the matches first.\n hostDirectiveDefs = hostDirectiveDefs || new Map();\n def.findHostDirectiveDefs?.(def, matches, hostDirectiveDefs);\n matches.push(def);\n }\n }\n }\n }\n return matches === null ? null : [matches, hostDirectiveDefs];\n}\n/**\n * Marks a given TNode as a component's host. This consists of:\n * - setting the component offset on the TNode.\n * - storing index of component's host element so it will be queued for view refresh during CD.\n */\nfunction markAsComponentHost(tView, hostTNode, componentOffset) {\n ngDevMode && assertFirstCreatePass(tView);\n ngDevMode && assertGreaterThan(componentOffset, -1, 'componentOffset must be great than -1');\n hostTNode.componentOffset = componentOffset;\n (tView.components || (tView.components = [])).push(hostTNode.index);\n}\n/** Caches local names and their matching directive indices for query and template lookups. */\nfunction cacheMatchingLocalNames(tNode, localRefs, exportsMap) {\n if (localRefs) {\n const localNames = tNode.localNames = [];\n // Local names must be stored in tNode in the same order that localRefs are defined\n // in the template to ensure the data is loaded in the same slots as their refs\n // in the template (for template queries).\n for (let i = 0; i < localRefs.length; i += 2) {\n const index = exportsMap[localRefs[i + 1]];\n if (index == null)\n throw new RuntimeError(-301 /* RuntimeErrorCode.EXPORT_NOT_FOUND */, ngDevMode && `Export of name '${localRefs[i + 1]}' not found!`);\n localNames.push(localRefs[i], index);\n }\n }\n}\n/**\n * Builds up an export map as directives are created, so local refs can be quickly mapped\n * to their directive instances.\n */\nfunction saveNameToExportMap(directiveIdx, def, exportsMap) {\n if (exportsMap) {\n if (def.exportAs) {\n for (let i = 0; i < def.exportAs.length; i++) {\n exportsMap[def.exportAs[i]] = directiveIdx;\n }\n }\n if (isComponentDef(def))\n exportsMap[''] = directiveIdx;\n }\n}\n/**\n * Initializes the flags on the current node, setting all indices to the initial index,\n * the directive count to 0, and adding the isComponent flag.\n * @param index the initial index\n */\nfunction initTNodeFlags(tNode, index, numberOfDirectives) {\n ngDevMode &&\n assertNotEqual(numberOfDirectives, tNode.directiveEnd - tNode.directiveStart, 'Reached the max number of directives');\n tNode.flags |= 1 /* TNodeFlags.isDirectiveHost */;\n // When the first directive is created on a node, save the index\n tNode.directiveStart = index;\n tNode.directiveEnd = index + numberOfDirectives;\n tNode.providerIndexes = index;\n}\n/**\n * Setup directive for instantiation.\n *\n * We need to create a `NodeInjectorFactory` which is then inserted in both the `Blueprint` as well\n * as `LView`. `TView` gets the `DirectiveDef`.\n *\n * @param tView `TView`\n * @param tNode `TNode`\n * @param lView `LView`\n * @param directiveIndex Index where the directive will be stored in the Expando.\n * @param def `DirectiveDef`\n */\nfunction configureViewWithDirective(tView, tNode, lView, directiveIndex, def) {\n ngDevMode &&\n assertGreaterThanOrEqual(directiveIndex, HEADER_OFFSET, 'Must be in Expando section');\n tView.data[directiveIndex] = def;\n const directiveFactory = def.factory || (def.factory = getFactoryDef(def.type, true));\n // Even though `directiveFactory` will already be using `ɵɵdirectiveInject` in its generated code,\n // we also want to support `inject()` directly from the directive constructor context so we set\n // `ɵɵdirectiveInject` as the inject implementation here too.\n const nodeInjectorFactory = new NodeInjectorFactory(directiveFactory, isComponentDef(def), ɵɵdirectiveInject);\n tView.blueprint[directiveIndex] = nodeInjectorFactory;\n lView[directiveIndex] = nodeInjectorFactory;\n registerHostBindingOpCodes(tView, tNode, directiveIndex, allocExpando(tView, lView, def.hostVars, NO_CHANGE), def);\n}\nfunction addComponentLogic(lView, hostTNode, def) {\n const native = getNativeByTNode(hostTNode, lView);\n const tView = getOrCreateComponentTView(def);\n // Only component views should be added to the view tree directly. Embedded views are\n // accessed through their containers because they may be removed / re-added later.\n const rendererFactory = lView[RENDERER_FACTORY];\n const componentView = addToViewTree(lView, createLView(lView, tView, null, def.onPush ? 32 /* LViewFlags.Dirty */ : 16 /* LViewFlags.CheckAlways */, native, hostTNode, rendererFactory, rendererFactory.createRenderer(native, def), null, null, null));\n // Component view will always be created before any injected LContainers,\n // so this is a regular element, wrap it with the component view\n lView[hostTNode.index] = componentView;\n}\nfunction elementAttributeInternal(tNode, lView, name, value, sanitizer, namespace) {\n if (ngDevMode) {\n assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n validateAgainstEventAttributes(name);\n assertTNodeType(tNode, 2 /* TNodeType.Element */, `Attempted to set attribute \\`${name}\\` on a container node. ` +\n `Host bindings are not valid on ng-container or ng-template.`);\n }\n const element = getNativeByTNode(tNode, lView);\n setElementAttribute(lView[RENDERER], element, namespace, tNode.value, name, value, sanitizer);\n}\nfunction setElementAttribute(renderer, element, namespace, tagName, name, value, sanitizer) {\n if (value == null) {\n ngDevMode && ngDevMode.rendererRemoveAttribute++;\n renderer.removeAttribute(element, name, namespace);\n }\n else {\n ngDevMode && ngDevMode.rendererSetAttribute++;\n const strValue = sanitizer == null ? renderStringify(value) : sanitizer(value, tagName || '', name);\n renderer.setAttribute(element, name, strValue, namespace);\n }\n}\n/**\n * Sets initial input properties on directive instances from attribute data\n *\n * @param lView Current LView that is being processed.\n * @param directiveIndex Index of the directive in directives array\n * @param instance Instance of the directive on which to set the initial inputs\n * @param def The directive def that contains the list of inputs\n * @param tNode The static data for this node\n */\nfunction setInputsFromAttrs(lView, directiveIndex, instance, def, tNode, initialInputData) {\n const initialInputs = initialInputData[directiveIndex];\n if (initialInputs !== null) {\n const setInput = def.setInput;\n for (let i = 0; i < initialInputs.length;) {\n const publicName = initialInputs[i++];\n const privateName = initialInputs[i++];\n const value = initialInputs[i++];\n if (setInput !== null) {\n def.setInput(instance, value, publicName, privateName);\n }\n else {\n instance[privateName] = value;\n }\n if (ngDevMode) {\n const nativeElement = getNativeByTNode(tNode, lView);\n setNgReflectProperty(lView, nativeElement, tNode.type, privateName, value);\n }\n }\n }\n}\n/**\n * Generates initialInputData for a node and stores it in the template's static storage\n * so subsequent template invocations don't have to recalculate it.\n *\n * initialInputData is an array containing values that need to be set as input properties\n * for directives on this node, but only once on creation. We need this array to support\n * the case where you set an @Input property of a directive using attribute-like syntax.\n * e.g. if you have a `name` @Input, you can set it once like this:\n *\n * <my-component name=\"Bess\"></my-component>\n *\n * @param inputs Input alias map that was generated from the directive def inputs.\n * @param directiveIndex Index of the directive that is currently being processed.\n * @param attrs Static attrs on this node.\n */\nfunction generateInitialInputs(inputs, directiveIndex, attrs) {\n let inputsToStore = null;\n let i = 0;\n while (i < attrs.length) {\n const attrName = attrs[i];\n if (attrName === 0 /* AttributeMarker.NamespaceURI */) {\n // We do not allow inputs on namespaced attributes.\n i += 4;\n continue;\n }\n else if (attrName === 5 /* AttributeMarker.ProjectAs */) {\n // Skip over the `ngProjectAs` value.\n i += 2;\n continue;\n }\n // If we hit any other attribute markers, we're done anyway. None of those are valid inputs.\n if (typeof attrName === 'number')\n break;\n if (inputs.hasOwnProperty(attrName)) {\n if (inputsToStore === null)\n inputsToStore = [];\n // Find the input's public name from the input store. Note that we can be found easier\n // through the directive def, but we want to do it using the inputs store so that it can\n // account for host directive aliases.\n const inputConfig = inputs[attrName];\n for (let j = 0; j < inputConfig.length; j += 2) {\n if (inputConfig[j] === directiveIndex) {\n inputsToStore.push(attrName, inputConfig[j + 1], attrs[i + 1]);\n // A directive can't have multiple inputs with the same name so we can break here.\n break;\n }\n }\n }\n i += 2;\n }\n return inputsToStore;\n}\n//////////////////////////\n//// ViewContainer & View\n//////////////////////////\n/**\n * Creates a LContainer, either from a container instruction, or for a ViewContainerRef.\n *\n * @param hostNative The host element for the LContainer\n * @param hostTNode The host TNode for the LContainer\n * @param currentView The parent view of the LContainer\n * @param native The native comment element\n * @param isForViewContainerRef Optional a flag indicating the ViewContainerRef case\n * @returns LContainer\n */\nfunction createLContainer(hostNative, currentView, native, tNode) {\n ngDevMode && assertLView(currentView);\n const lContainer = [\n hostNative,\n true,\n false,\n currentView,\n null,\n 0,\n tNode,\n native,\n null,\n null, // moved views\n ];\n ngDevMode &&\n assertEqual(lContainer.length, CONTAINER_HEADER_OFFSET, 'Should allocate correct number of slots for LContainer header.');\n return lContainer;\n}\n/**\n * Goes over embedded views (ones created through ViewContainerRef APIs) and refreshes\n * them by executing an associated template function.\n */\nfunction refreshEmbeddedViews(lView) {\n for (let lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) {\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const embeddedLView = lContainer[i];\n const embeddedTView = embeddedLView[TVIEW];\n ngDevMode && assertDefined(embeddedTView, 'TView must be allocated');\n if (viewAttachedToChangeDetector(embeddedLView)) {\n refreshView(embeddedTView, embeddedLView, embeddedTView.template, embeddedLView[CONTEXT]);\n }\n }\n }\n}\n/**\n * Mark transplanted views as needing to be refreshed at their insertion points.\n *\n * @param lView The `LView` that may have transplanted views.\n */\nfunction markTransplantedViewsForRefresh(lView) {\n for (let lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) {\n if (!lContainer[HAS_TRANSPLANTED_VIEWS])\n continue;\n const movedViews = lContainer[MOVED_VIEWS];\n ngDevMode && assertDefined(movedViews, 'Transplanted View flags set but missing MOVED_VIEWS');\n for (let i = 0; i < movedViews.length; i++) {\n const movedLView = movedViews[i];\n const insertionLContainer = movedLView[PARENT];\n ngDevMode && assertLContainer(insertionLContainer);\n // We don't want to increment the counter if the moved LView was already marked for\n // refresh.\n if ((movedLView[FLAGS] & 512 /* LViewFlags.RefreshTransplantedView */) === 0) {\n updateTransplantedViewCount(insertionLContainer, 1);\n }\n // Note, it is possible that the `movedViews` is tracking views that are transplanted *and*\n // those that aren't (declaration component === insertion component). In the latter case,\n // it's fine to add the flag, as we will clear it immediately in\n // `refreshEmbeddedViews` for the view currently being refreshed.\n movedLView[FLAGS] |= 512 /* LViewFlags.RefreshTransplantedView */;\n }\n }\n}\n/////////////\n/**\n * Refreshes components by entering the component view and processing its bindings, queries, etc.\n *\n * @param componentHostIdx Element index in LView[] (adjusted for HEADER_OFFSET)\n */\nfunction refreshComponent(hostLView, componentHostIdx) {\n ngDevMode && assertEqual(isCreationMode(hostLView), false, 'Should be run in update mode');\n const componentView = getComponentLViewByIndex(componentHostIdx, hostLView);\n // Only attached components that are CheckAlways or OnPush and dirty should be refreshed\n if (viewAttachedToChangeDetector(componentView)) {\n const tView = componentView[TVIEW];\n if (componentView[FLAGS] & (16 /* LViewFlags.CheckAlways */ | 32 /* LViewFlags.Dirty */)) {\n refreshView(tView, componentView, tView.template, componentView[CONTEXT]);\n }\n else if (componentView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {\n // Only attached components that are CheckAlways or OnPush and dirty should be refreshed\n refreshContainsDirtyView(componentView);\n }\n }\n}\n/**\n * Refreshes all transplanted views marked with `LViewFlags.RefreshTransplantedView` that are\n * children or descendants of the given lView.\n *\n * @param lView The lView which contains descendant transplanted views that need to be refreshed.\n */\nfunction refreshContainsDirtyView(lView) {\n for (let lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) {\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const embeddedLView = lContainer[i];\n if (viewAttachedToChangeDetector(embeddedLView)) {\n if (embeddedLView[FLAGS] & 512 /* LViewFlags.RefreshTransplantedView */) {\n const embeddedTView = embeddedLView[TVIEW];\n ngDevMode && assertDefined(embeddedTView, 'TView must be allocated');\n refreshView(embeddedTView, embeddedLView, embeddedTView.template, embeddedLView[CONTEXT]);\n }\n else if (embeddedLView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {\n refreshContainsDirtyView(embeddedLView);\n }\n }\n }\n }\n const tView = lView[TVIEW];\n // Refresh child component views.\n const components = tView.components;\n if (components !== null) {\n for (let i = 0; i < components.length; i++) {\n const componentView = getComponentLViewByIndex(components[i], lView);\n // Only attached components that are CheckAlways or OnPush and dirty should be refreshed\n if (viewAttachedToChangeDetector(componentView) &&\n componentView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {\n refreshContainsDirtyView(componentView);\n }\n }\n }\n}\nfunction renderComponent(hostLView, componentHostIdx) {\n ngDevMode && assertEqual(isCreationMode(hostLView), true, 'Should be run in creation mode');\n const componentView = getComponentLViewByIndex(componentHostIdx, hostLView);\n const componentTView = componentView[TVIEW];\n syncViewWithBlueprint(componentTView, componentView);\n renderView(componentTView, componentView, componentView[CONTEXT]);\n}\n/**\n * Syncs an LView instance with its blueprint if they have gotten out of sync.\n *\n * Typically, blueprints and their view instances should always be in sync, so the loop here\n * will be skipped. However, consider this case of two components side-by-side:\n *\n * App template:\n * ```\n * <comp></comp>\n * <comp></comp>\n * ```\n *\n * The following will happen:\n * 1. App template begins processing.\n * 2. First <comp> is matched as a component and its LView is created.\n * 3. Second <comp> is matched as a component and its LView is created.\n * 4. App template completes processing, so it's time to check child templates.\n * 5. First <comp> template is checked. It has a directive, so its def is pushed to blueprint.\n * 6. Second <comp> template is checked. Its blueprint has been updated by the first\n * <comp> template, but its LView was created before this update, so it is out of sync.\n *\n * Note that embedded views inside ngFor loops will never be out of sync because these views\n * are processed as soon as they are created.\n *\n * @param tView The `TView` that contains the blueprint for syncing\n * @param lView The view to sync\n */\nfunction syncViewWithBlueprint(tView, lView) {\n for (let i = lView.length; i < tView.blueprint.length; i++) {\n lView.push(tView.blueprint[i]);\n }\n}\n/**\n * Adds LView or LContainer to the end of the current view tree.\n *\n * This structure will be used to traverse through nested views to remove listeners\n * and call onDestroy callbacks.\n *\n * @param lView The view where LView or LContainer should be added\n * @param adjustedHostIndex Index of the view's host node in LView[], adjusted for header\n * @param lViewOrLContainer The LView or LContainer to add to the view tree\n * @returns The state passed in\n */\nfunction addToViewTree(lView, lViewOrLContainer) {\n // TODO(benlesh/misko): This implementation is incorrect, because it always adds the LContainer\n // to the end of the queue, which means if the developer retrieves the LContainers from RNodes out\n // of order, the change detection will run out of order, as the act of retrieving the the\n // LContainer from the RNode is what adds it to the queue.\n if (lView[CHILD_HEAD]) {\n lView[CHILD_TAIL][NEXT] = lViewOrLContainer;\n }\n else {\n lView[CHILD_HEAD] = lViewOrLContainer;\n }\n lView[CHILD_TAIL] = lViewOrLContainer;\n return lViewOrLContainer;\n}\n///////////////////////////////\n//// Change detection\n///////////////////////////////\n/**\n * Marks current view and all ancestors dirty.\n *\n * Returns the root view because it is found as a byproduct of marking the view tree\n * dirty, and can be used by methods that consume markViewDirty() to easily schedule\n * change detection. Otherwise, such methods would need to traverse up the view tree\n * an additional time to get the root view and schedule a tick on it.\n *\n * @param lView The starting LView to mark dirty\n * @returns the root LView\n */\nfunction markViewDirty(lView) {\n while (lView) {\n lView[FLAGS] |= 32 /* LViewFlags.Dirty */;\n const parent = getLViewParent(lView);\n // Stop traversing up as soon as you find a root view that wasn't attached to any container\n if (isRootView(lView) && !parent) {\n return lView;\n }\n // continue otherwise\n lView = parent;\n }\n return null;\n}\nfunction detectChangesInternal(tView, lView, context, notifyErrorHandler = true) {\n const rendererFactory = lView[RENDERER_FACTORY];\n // Check no changes mode is a dev only mode used to verify that bindings have not changed\n // since they were assigned. We do not want to invoke renderer factory functions in that mode\n // to avoid any possible side-effects.\n const checkNoChangesMode = !!ngDevMode && isInCheckNoChangesMode();\n if (!checkNoChangesMode && rendererFactory.begin)\n rendererFactory.begin();\n try {\n refreshView(tView, lView, tView.template, context);\n }\n catch (error) {\n if (notifyErrorHandler) {\n handleError(lView, error);\n }\n throw error;\n }\n finally {\n if (!checkNoChangesMode && rendererFactory.end)\n rendererFactory.end();\n }\n}\nfunction checkNoChangesInternal(tView, lView, context, notifyErrorHandler = true) {\n setIsInCheckNoChangesMode(true);\n try {\n detectChangesInternal(tView, lView, context, notifyErrorHandler);\n }\n finally {\n setIsInCheckNoChangesMode(false);\n }\n}\nfunction executeViewQueryFn(flags, viewQueryFn, component) {\n ngDevMode && assertDefined(viewQueryFn, 'View queries function to execute must be defined.');\n setCurrentQueryIndex(0);\n viewQueryFn(flags, component);\n}\n///////////////////////////////\n//// Bindings & interpolations\n///////////////////////////////\n/**\n * Stores meta-data for a property binding to be used by TestBed's `DebugElement.properties`.\n *\n * In order to support TestBed's `DebugElement.properties` we need to save, for each binding:\n * - a bound property name;\n * - a static parts of interpolated strings;\n *\n * A given property metadata is saved at the binding's index in the `TView.data` (in other words, a\n * property binding metadata will be stored in `TView.data` at the same index as a bound value in\n * `LView`). Metadata are represented as `INTERPOLATION_DELIMITER`-delimited string with the\n * following format:\n * - `propertyName` for bound properties;\n * - `propertyName�prefix�interpolation_static_part1�..interpolation_static_partN�suffix` for\n * interpolated properties.\n *\n * @param tData `TData` where meta-data will be saved;\n * @param tNode `TNode` that is a target of the binding;\n * @param propertyName bound property name;\n * @param bindingIndex binding index in `LView`\n * @param interpolationParts static interpolation parts (for property interpolations)\n */\nfunction storePropertyBindingMetadata(tData, tNode, propertyName, bindingIndex, ...interpolationParts) {\n // Binding meta-data are stored only the first time a given property instruction is processed.\n // Since we don't have a concept of the \"first update pass\" we need to check for presence of the\n // binding meta-data to decide if one should be stored (or if was stored already).\n if (tData[bindingIndex] === null) {\n if (tNode.inputs == null || !tNode.inputs[propertyName]) {\n const propBindingIdxs = tNode.propertyBindings || (tNode.propertyBindings = []);\n propBindingIdxs.push(bindingIndex);\n let bindingMetadata = propertyName;\n if (interpolationParts.length > 0) {\n bindingMetadata +=\n INTERPOLATION_DELIMITER + interpolationParts.join(INTERPOLATION_DELIMITER);\n }\n tData[bindingIndex] = bindingMetadata;\n }\n }\n}\nfunction getOrCreateLViewCleanup(view) {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return view[CLEANUP] || (view[CLEANUP] = []);\n}\nfunction getOrCreateTViewCleanup(tView) {\n return tView.cleanup || (tView.cleanup = []);\n}\n/**\n * There are cases where the sub component's renderer needs to be included\n * instead of the current renderer (see the componentSyntheticHost* instructions).\n */\nfunction loadComponentRenderer(currentDef, tNode, lView) {\n // TODO(FW-2043): the `currentDef` is null when host bindings are invoked while creating root\n // component (see packages/core/src/render3/component.ts). This is not consistent with the process\n // of creating inner components, when current directive index is available in the state. In order\n // to avoid relying on current def being `null` (thus special-casing root component creation), the\n // process of creating root component should be unified with the process of creating inner\n // components.\n if (currentDef === null || isComponentDef(currentDef)) {\n lView = unwrapLView(lView[tNode.index]);\n }\n return lView[RENDERER];\n}\n/** Handles an error thrown in an LView. */\nfunction handleError(lView, error) {\n const injector = lView[INJECTOR$1];\n const errorHandler = injector ? injector.get(ErrorHandler, null) : null;\n errorHandler && errorHandler.handleError(error);\n}\n/**\n * Set the inputs of directives at the current node to corresponding value.\n *\n * @param tView The current TView\n * @param lView the `LView` which contains the directives.\n * @param inputs mapping between the public \"input\" name and privately-known,\n * possibly minified, property names to write to.\n * @param value Value to set.\n */\nfunction setInputsForProperty(tView, lView, inputs, publicName, value) {\n for (let i = 0; i < inputs.length;) {\n const index = inputs[i++];\n const privateName = inputs[i++];\n const instance = lView[index];\n ngDevMode && assertIndexInRange(lView, index);\n const def = tView.data[index];\n if (def.setInput !== null) {\n def.setInput(instance, value, publicName, privateName);\n }\n else {\n instance[privateName] = value;\n }\n }\n}\n/**\n * Updates a text binding at a given index in a given LView.\n */\nfunction textBindingInternal(lView, index, value) {\n ngDevMode && assertString(value, 'Value should be a string');\n ngDevMode && assertNotSame(value, NO_CHANGE, 'value should not be NO_CHANGE');\n ngDevMode && assertIndexInRange(lView, index);\n const element = getNativeByIndex(index, lView);\n ngDevMode && assertDefined(element, 'native element should exist');\n updateTextNode(lView[RENDERER], element, value);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Compute the static styling (class/style) from `TAttributes`.\n *\n * This function should be called during `firstCreatePass` only.\n *\n * @param tNode The `TNode` into which the styling information should be loaded.\n * @param attrs `TAttributes` containing the styling information.\n * @param writeToHost Where should the resulting static styles be written?\n * - `false` Write to `TNode.stylesWithoutHost` / `TNode.classesWithoutHost`\n * - `true` Write to `TNode.styles` / `TNode.classes`\n */\nfunction computeStaticStyling(tNode, attrs, writeToHost) {\n ngDevMode &&\n assertFirstCreatePass(getTView(), 'Expecting to be called in first template pass only');\n let styles = writeToHost ? tNode.styles : null;\n let classes = writeToHost ? tNode.classes : null;\n let mode = 0;\n if (attrs !== null) {\n for (let i = 0; i < attrs.length; i++) {\n const value = attrs[i];\n if (typeof value === 'number') {\n mode = value;\n }\n else if (mode == 1 /* AttributeMarker.Classes */) {\n classes = concatStringsWithSpace(classes, value);\n }\n else if (mode == 2 /* AttributeMarker.Styles */) {\n const style = value;\n const styleValue = attrs[++i];\n styles = concatStringsWithSpace(styles, style + ': ' + styleValue + ';');\n }\n }\n }\n writeToHost ? tNode.styles = styles : tNode.stylesWithoutHost = styles;\n writeToHost ? tNode.classes = classes : tNode.classesWithoutHost = classes;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction collectNativeNodes(tView, lView, tNode, result, isProjection = false) {\n while (tNode !== null) {\n ngDevMode &&\n assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */ | 12 /* TNodeType.AnyContainer */ | 16 /* TNodeType.Projection */ | 32 /* TNodeType.Icu */);\n const lNode = lView[tNode.index];\n if (lNode !== null) {\n result.push(unwrapRNode(lNode));\n }\n // A given lNode can represent either a native node or a LContainer (when it is a host of a\n // ViewContainerRef). When we find a LContainer we need to descend into it to collect root nodes\n // from the views in this container.\n if (isLContainer(lNode)) {\n for (let i = CONTAINER_HEADER_OFFSET; i < lNode.length; i++) {\n const lViewInAContainer = lNode[i];\n const lViewFirstChildTNode = lViewInAContainer[TVIEW].firstChild;\n if (lViewFirstChildTNode !== null) {\n collectNativeNodes(lViewInAContainer[TVIEW], lViewInAContainer, lViewFirstChildTNode, result);\n }\n }\n }\n const tNodeType = tNode.type;\n if (tNodeType & 8 /* TNodeType.ElementContainer */) {\n collectNativeNodes(tView, lView, tNode.child, result);\n }\n else if (tNodeType & 32 /* TNodeType.Icu */) {\n const nextRNode = icuContainerIterate(tNode, lView);\n let rNode;\n while (rNode = nextRNode()) {\n result.push(rNode);\n }\n }\n else if (tNodeType & 16 /* TNodeType.Projection */) {\n const nodesInSlot = getProjectionNodes(lView, tNode);\n if (Array.isArray(nodesInSlot)) {\n result.push(...nodesInSlot);\n }\n else {\n const parentView = getLViewParent(lView[DECLARATION_COMPONENT_VIEW]);\n ngDevMode && assertParentView(parentView);\n collectNativeNodes(parentView[TVIEW], parentView, nodesInSlot, result, true);\n }\n }\n tNode = isProjection ? tNode.projectionNext : tNode.next;\n }\n return result;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass ViewRef$1 {\n constructor(\n /**\n * This represents `LView` associated with the component when ViewRef is a ChangeDetectorRef.\n *\n * When ViewRef is created for a dynamic component, this also represents the `LView` for the\n * component.\n *\n * For a \"regular\" ViewRef created for an embedded view, this is the `LView` for the embedded\n * view.\n *\n * @internal\n */\n _lView, \n /**\n * This represents the `LView` associated with the point where `ChangeDetectorRef` was\n * requested.\n *\n * This may be different from `_lView` if the `_cdRefInjectingView` is an embedded view.\n */\n _cdRefInjectingView) {\n this._lView = _lView;\n this._cdRefInjectingView = _cdRefInjectingView;\n this._appRef = null;\n this._attachedToViewContainer = false;\n }\n get rootNodes() {\n const lView = this._lView;\n const tView = lView[TVIEW];\n return collectNativeNodes(tView, lView, tView.firstChild, []);\n }\n get context() {\n return this._lView[CONTEXT];\n }\n set context(value) {\n this._lView[CONTEXT] = value;\n }\n get destroyed() {\n return (this._lView[FLAGS] & 128 /* LViewFlags.Destroyed */) === 128 /* LViewFlags.Destroyed */;\n }\n destroy() {\n if (this._appRef) {\n this._appRef.detachView(this);\n }\n else if (this._attachedToViewContainer) {\n const parent = this._lView[PARENT];\n if (isLContainer(parent)) {\n const viewRefs = parent[VIEW_REFS];\n const index = viewRefs ? viewRefs.indexOf(this) : -1;\n if (index > -1) {\n ngDevMode &&\n assertEqual(index, parent.indexOf(this._lView) - CONTAINER_HEADER_OFFSET, 'An attached view should be in the same position within its container as its ViewRef in the VIEW_REFS array.');\n detachView(parent, index);\n removeFromArray(viewRefs, index);\n }\n }\n this._attachedToViewContainer = false;\n }\n destroyLView(this._lView[TVIEW], this._lView);\n }\n onDestroy(callback) {\n storeCleanupWithContext(this._lView[TVIEW], this._lView, null, callback);\n }\n /**\n * Marks a view and all of its ancestors dirty.\n *\n * This can be used to ensure an {@link ChangeDetectionStrategy#OnPush OnPush} component is\n * checked when it needs to be re-rendered but the two normal triggers haven't marked it\n * dirty (i.e. inputs haven't changed and events haven't fired in the view).\n *\n * <!-- TODO: Add a link to a chapter on OnPush components -->\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Component({\n * selector: 'app-root',\n * template: `Number of ticks: {{numberOfTicks}}`\n * changeDetection: ChangeDetectionStrategy.OnPush,\n * })\n * class AppComponent {\n * numberOfTicks = 0;\n *\n * constructor(private ref: ChangeDetectorRef) {\n * setInterval(() => {\n * this.numberOfTicks++;\n * // the following is required, otherwise the view will not be updated\n * this.ref.markForCheck();\n * }, 1000);\n * }\n * }\n * ```\n */\n markForCheck() {\n markViewDirty(this._cdRefInjectingView || this._lView);\n }\n /**\n * Detaches the view from the change detection tree.\n *\n * Detached views will not be checked during change detection runs until they are\n * re-attached, even if they are dirty. `detach` can be used in combination with\n * {@link ChangeDetectorRef#detectChanges detectChanges} to implement local change\n * detection checks.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n *\n * @usageNotes\n * ### Example\n *\n * The following example defines a component with a large list of readonly data.\n * Imagine the data changes constantly, many times per second. For performance reasons,\n * we want to check and update the list every five seconds. We can do that by detaching\n * the component's change detector and doing a local check every five seconds.\n *\n * ```typescript\n * class DataProvider {\n * // in a real application the returned data will be different every time\n * get data() {\n * return [1,2,3,4,5];\n * }\n * }\n *\n * @Component({\n * selector: 'giant-list',\n * template: `\n * <li *ngFor=\"let d of dataProvider.data\">Data {{d}}</li>\n * `,\n * })\n * class GiantList {\n * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {\n * ref.detach();\n * setInterval(() => {\n * this.ref.detectChanges();\n * }, 5000);\n * }\n * }\n *\n * @Component({\n * selector: 'app',\n * providers: [DataProvider],\n * template: `\n * <giant-list><giant-list>\n * `,\n * })\n * class App {\n * }\n * ```\n */\n detach() {\n this._lView[FLAGS] &= ~64 /* LViewFlags.Attached */;\n }\n /**\n * Re-attaches a view to the change detection tree.\n *\n * This can be used to re-attach views that were previously detached from the tree\n * using {@link ChangeDetectorRef#detach detach}. Views are attached to the tree by default.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n *\n * @usageNotes\n * ### Example\n *\n * The following example creates a component displaying `live` data. The component will detach\n * its change detector from the main change detector tree when the component's live property\n * is set to false.\n *\n * ```typescript\n * class DataProvider {\n * data = 1;\n *\n * constructor() {\n * setInterval(() => {\n * this.data = this.data * 2;\n * }, 500);\n * }\n * }\n *\n * @Component({\n * selector: 'live-data',\n * inputs: ['live'],\n * template: 'Data: {{dataProvider.data}}'\n * })\n * class LiveData {\n * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {}\n *\n * set live(value) {\n * if (value) {\n * this.ref.reattach();\n * } else {\n * this.ref.detach();\n * }\n * }\n * }\n *\n * @Component({\n * selector: 'app-root',\n * providers: [DataProvider],\n * template: `\n * Live Update: <input type=\"checkbox\" [(ngModel)]=\"live\">\n * <live-data [live]=\"live\"><live-data>\n * `,\n * })\n * class AppComponent {\n * live = true;\n * }\n * ```\n */\n reattach() {\n this._lView[FLAGS] |= 64 /* LViewFlags.Attached */;\n }\n /**\n * Checks the view and its children.\n *\n * This can also be used in combination with {@link ChangeDetectorRef#detach detach} to implement\n * local change detection checks.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n *\n * @usageNotes\n * ### Example\n *\n * The following example defines a component with a large list of readonly data.\n * Imagine, the data changes constantly, many times per second. For performance reasons,\n * we want to check and update the list every five seconds.\n *\n * We can do that by detaching the component's change detector and doing a local change detection\n * check every five seconds.\n *\n * See {@link ChangeDetectorRef#detach detach} for more information.\n */\n detectChanges() {\n detectChangesInternal(this._lView[TVIEW], this._lView, this.context);\n }\n /**\n * Checks the change detector and its children, and throws if any changes are detected.\n *\n * This is used in development mode to verify that running change detection doesn't\n * introduce other changes.\n */\n checkNoChanges() {\n if (ngDevMode) {\n checkNoChangesInternal(this._lView[TVIEW], this._lView, this.context);\n }\n }\n attachToViewContainerRef() {\n if (this._appRef) {\n throw new RuntimeError(902 /* RuntimeErrorCode.VIEW_ALREADY_ATTACHED */, ngDevMode && 'This view is already attached directly to the ApplicationRef!');\n }\n this._attachedToViewContainer = true;\n }\n detachFromAppRef() {\n this._appRef = null;\n renderDetachView(this._lView[TVIEW], this._lView);\n }\n attachToAppRef(appRef) {\n if (this._attachedToViewContainer) {\n throw new RuntimeError(902 /* RuntimeErrorCode.VIEW_ALREADY_ATTACHED */, ngDevMode && 'This view is already attached to a ViewContainer!');\n }\n this._appRef = appRef;\n }\n}\n/** @internal */\nclass RootViewRef extends ViewRef$1 {\n constructor(_view) {\n super(_view);\n this._view = _view;\n }\n detectChanges() {\n const lView = this._view;\n const tView = lView[TVIEW];\n const context = lView[CONTEXT];\n detectChangesInternal(tView, lView, context, false);\n }\n checkNoChanges() {\n if (ngDevMode) {\n const lView = this._view;\n const tView = lView[TVIEW];\n const context = lView[CONTEXT];\n checkNoChangesInternal(tView, lView, context, false);\n }\n }\n get context() {\n return null;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass ComponentFactoryResolver extends ComponentFactoryResolver$1 {\n /**\n * @param ngModule The NgModuleRef to which all resolved factories are bound.\n */\n constructor(ngModule) {\n super();\n this.ngModule = ngModule;\n }\n resolveComponentFactory(component) {\n ngDevMode && assertComponentType(component);\n const componentDef = getComponentDef(component);\n return new ComponentFactory(componentDef, this.ngModule);\n }\n}\nfunction toRefArray(map) {\n const array = [];\n for (let nonMinified in map) {\n if (map.hasOwnProperty(nonMinified)) {\n const minified = map[nonMinified];\n array.push({ propName: minified, templateName: nonMinified });\n }\n }\n return array;\n}\nfunction getNamespace(elementName) {\n const name = elementName.toLowerCase();\n return name === 'svg' ? SVG_NAMESPACE : (name === 'math' ? MATH_ML_NAMESPACE : null);\n}\n/**\n * Injector that looks up a value using a specific injector, before falling back to the module\n * injector. Used primarily when creating components or embedded views dynamically.\n */\nclass ChainedInjector {\n constructor(injector, parentInjector) {\n this.injector = injector;\n this.parentInjector = parentInjector;\n }\n get(token, notFoundValue, flags) {\n flags = convertToBitFlags(flags);\n const value = this.injector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, flags);\n if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR ||\n notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {\n // Return the value from the root element injector when\n // - it provides it\n // (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n // - the module injector should not be checked\n // (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n return value;\n }\n return this.parentInjector.get(token, notFoundValue, flags);\n }\n}\n/**\n * ComponentFactory interface implementation.\n */\nclass ComponentFactory extends ComponentFactory$1 {\n /**\n * @param componentDef The component definition.\n * @param ngModule The NgModuleRef to which the factory is bound.\n */\n constructor(componentDef, ngModule) {\n super();\n this.componentDef = componentDef;\n this.ngModule = ngModule;\n this.componentType = componentDef.type;\n this.selector = stringifyCSSSelectorList(componentDef.selectors);\n this.ngContentSelectors =\n componentDef.ngContentSelectors ? componentDef.ngContentSelectors : [];\n this.isBoundToModule = !!ngModule;\n }\n get inputs() {\n return toRefArray(this.componentDef.inputs);\n }\n get outputs() {\n return toRefArray(this.componentDef.outputs);\n }\n create(injector, projectableNodes, rootSelectorOrNode, environmentInjector) {\n environmentInjector = environmentInjector || this.ngModule;\n let realEnvironmentInjector = environmentInjector instanceof EnvironmentInjector ?\n environmentInjector :\n environmentInjector?.injector;\n if (realEnvironmentInjector && this.componentDef.getStandaloneInjector !== null) {\n realEnvironmentInjector = this.componentDef.getStandaloneInjector(realEnvironmentInjector) ||\n realEnvironmentInjector;\n }\n const rootViewInjector = realEnvironmentInjector ? new ChainedInjector(injector, realEnvironmentInjector) : injector;\n const rendererFactory = rootViewInjector.get(RendererFactory2, null);\n if (rendererFactory === null) {\n throw new RuntimeError(407 /* RuntimeErrorCode.RENDERER_NOT_FOUND */, ngDevMode &&\n 'Angular was not able to inject a renderer (RendererFactory2). ' +\n 'Likely this is due to a broken DI hierarchy. ' +\n 'Make sure that any injector used to create this component has a correct parent.');\n }\n const sanitizer = rootViewInjector.get(Sanitizer, null);\n const hostRenderer = rendererFactory.createRenderer(null, this.componentDef);\n // Determine a tag name used for creating host elements when this component is created\n // dynamically. Default to 'div' if this component did not specify any tag name in its selector.\n const elementName = this.componentDef.selectors[0][0] || 'div';\n const hostRNode = rootSelectorOrNode ?\n locateHostElement(hostRenderer, rootSelectorOrNode, this.componentDef.encapsulation) :\n createElementNode(hostRenderer, elementName, getNamespace(elementName));\n const rootFlags = this.componentDef.onPush ? 32 /* LViewFlags.Dirty */ | 256 /* LViewFlags.IsRoot */ :\n 16 /* LViewFlags.CheckAlways */ | 256 /* LViewFlags.IsRoot */;\n // Create the root view. Uses empty TView and ContentTemplate.\n const rootTView = createTView(0 /* TViewType.Root */, null, null, 1, 0, null, null, null, null, null);\n const rootLView = createLView(null, rootTView, null, rootFlags, null, null, rendererFactory, hostRenderer, sanitizer, rootViewInjector, null);\n // rootView is the parent when bootstrapping\n // TODO(misko): it looks like we are entering view here but we don't really need to as\n // `renderView` does that. However as the code is written it is needed because\n // `createRootComponentView` and `createRootComponent` both read global state. Fixing those\n // issues would allow us to drop this.\n enterView(rootLView);\n let component;\n let tElementNode;\n try {\n const rootComponentDef = this.componentDef;\n let rootDirectives;\n let hostDirectiveDefs = null;\n if (rootComponentDef.findHostDirectiveDefs) {\n rootDirectives = [];\n hostDirectiveDefs = new Map();\n rootComponentDef.findHostDirectiveDefs(rootComponentDef, rootDirectives, hostDirectiveDefs);\n rootDirectives.push(rootComponentDef);\n }\n else {\n rootDirectives = [rootComponentDef];\n }\n const hostTNode = createRootComponentTNode(rootLView, hostRNode);\n const componentView = createRootComponentView(hostTNode, hostRNode, rootComponentDef, rootDirectives, rootLView, rendererFactory, hostRenderer);\n tElementNode = getTNode(rootTView, HEADER_OFFSET);\n // TODO(crisbeto): in practice `hostRNode` should always be defined, but there are some tests\n // where the renderer is mocked out and `undefined` is returned. We should update the tests so\n // that this check can be removed.\n if (hostRNode) {\n setRootNodeAttributes(hostRenderer, rootComponentDef, hostRNode, rootSelectorOrNode);\n }\n if (projectableNodes !== undefined) {\n projectNodes(tElementNode, this.ngContentSelectors, projectableNodes);\n }\n // TODO: should LifecycleHooksFeature and other host features be generated by the compiler and\n // executed here?\n // Angular 5 reference: https://stackblitz.com/edit/lifecycle-hooks-vcref\n component = createRootComponent(componentView, rootComponentDef, rootDirectives, hostDirectiveDefs, rootLView, [LifecycleHooksFeature]);\n renderView(rootTView, rootLView, null);\n }\n finally {\n leaveView();\n }\n return new ComponentRef(this.componentType, component, createElementRef(tElementNode, rootLView), rootLView, tElementNode);\n }\n}\n/**\n * Represents an instance of a Component created via a {@link ComponentFactory}.\n *\n * `ComponentRef` provides access to the Component Instance as well other objects related to this\n * Component Instance and allows you to destroy the Component Instance via the {@link #destroy}\n * method.\n *\n */\nclass ComponentRef extends ComponentRef$1 {\n constructor(componentType, instance, location, _rootLView, _tNode) {\n super();\n this.location = location;\n this._rootLView = _rootLView;\n this._tNode = _tNode;\n this.instance = instance;\n this.hostView = this.changeDetectorRef = new RootViewRef(_rootLView);\n this.componentType = componentType;\n }\n setInput(name, value) {\n const inputData = this._tNode.inputs;\n let dataValue;\n if (inputData !== null && (dataValue = inputData[name])) {\n const lView = this._rootLView;\n setInputsForProperty(lView[TVIEW], lView, dataValue, name, value);\n markDirtyIfOnPush(lView, this._tNode.index);\n }\n else {\n if (ngDevMode) {\n const cmpNameForError = stringifyForError(this.componentType);\n let message = `Can't set value of the '${name}' input on the '${cmpNameForError}' component. `;\n message += `Make sure that the '${name}' property is annotated with @Input() or a mapped @Input('${name}') exists.`;\n reportUnknownPropertyError(message);\n }\n }\n }\n get injector() {\n return new NodeInjector(this._tNode, this._rootLView);\n }\n destroy() {\n this.hostView.destroy();\n }\n onDestroy(callback) {\n this.hostView.onDestroy(callback);\n }\n}\n// TODO: A hack to not pull in the NullInjector from @angular/core.\nconst NULL_INJECTOR = {\n get: (token, notFoundValue) => {\n throwProviderNotFoundError(token, 'NullInjector');\n }\n};\n/** Creates a TNode that can be used to instantiate a root component. */\nfunction createRootComponentTNode(lView, rNode) {\n const tView = lView[TVIEW];\n const index = HEADER_OFFSET;\n ngDevMode && assertIndexInRange(lView, index);\n lView[index] = rNode;\n // '#host' is added here as we don't know the real host DOM name (we don't want to read it) and at\n // the same time we want to communicate the debug `TNode` that this is a special `TNode`\n // representing a host element.\n return getOrCreateTNode(tView, index, 2 /* TNodeType.Element */, '#host', null);\n}\n/**\n * Creates the root component view and the root component node.\n *\n * @param rNode Render host element.\n * @param rootComponentDef ComponentDef\n * @param rootView The parent view where the host node is stored\n * @param rendererFactory Factory to be used for creating child renderers.\n * @param hostRenderer The current renderer\n * @param sanitizer The sanitizer, if provided\n *\n * @returns Component view created\n */\nfunction createRootComponentView(tNode, rNode, rootComponentDef, rootDirectives, rootView, rendererFactory, hostRenderer, sanitizer) {\n const tView = rootView[TVIEW];\n applyRootComponentStyling(rootDirectives, tNode, rNode, hostRenderer);\n const viewRenderer = rendererFactory.createRenderer(rNode, rootComponentDef);\n const componentView = createLView(rootView, getOrCreateComponentTView(rootComponentDef), null, rootComponentDef.onPush ? 32 /* LViewFlags.Dirty */ : 16 /* LViewFlags.CheckAlways */, rootView[tNode.index], tNode, rendererFactory, viewRenderer, sanitizer || null, null, null);\n if (tView.firstCreatePass) {\n markAsComponentHost(tView, tNode, rootDirectives.length - 1);\n }\n addToViewTree(rootView, componentView);\n // Store component view at node index, with node as the HOST\n return rootView[tNode.index] = componentView;\n}\n/** Sets up the styling information on a root component. */\nfunction applyRootComponentStyling(rootDirectives, tNode, rNode, hostRenderer) {\n for (const def of rootDirectives) {\n tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, def.hostAttrs);\n }\n if (tNode.mergedAttrs !== null) {\n computeStaticStyling(tNode, tNode.mergedAttrs, true);\n if (rNode !== null) {\n setupStaticAttributes(hostRenderer, rNode, tNode);\n }\n }\n}\n/**\n * Creates a root component and sets it up with features and host bindings.Shared by\n * renderComponent() and ViewContainerRef.createComponent().\n */\nfunction createRootComponent(componentView, rootComponentDef, rootDirectives, hostDirectiveDefs, rootLView, hostFeatures) {\n const rootTNode = getCurrentTNode();\n ngDevMode && assertDefined(rootTNode, 'tNode should have been already created');\n const tView = rootLView[TVIEW];\n const native = getNativeByTNode(rootTNode, rootLView);\n initializeDirectives(tView, rootLView, rootTNode, rootDirectives, null, hostDirectiveDefs);\n for (let i = 0; i < rootDirectives.length; i++) {\n const directiveIndex = rootTNode.directiveStart + i;\n const directiveInstance = getNodeInjectable(rootLView, tView, directiveIndex, rootTNode);\n attachPatchData(directiveInstance, rootLView);\n }\n invokeDirectivesHostBindings(tView, rootLView, rootTNode);\n if (native) {\n attachPatchData(native, rootLView);\n }\n // We're guaranteed for the `componentOffset` to be positive here\n // since a root component always matches a component def.\n ngDevMode &&\n assertGreaterThan(rootTNode.componentOffset, -1, 'componentOffset must be great than -1');\n const component = getNodeInjectable(rootLView, tView, rootTNode.directiveStart + rootTNode.componentOffset, rootTNode);\n componentView[CONTEXT] = rootLView[CONTEXT] = component;\n if (hostFeatures !== null) {\n for (const feature of hostFeatures) {\n feature(component, rootComponentDef);\n }\n }\n // We want to generate an empty QueryList for root content queries for backwards\n // compatibility with ViewEngine.\n executeContentQueries(tView, rootTNode, componentView);\n return component;\n}\n/** Sets the static attributes on a root component. */\nfunction setRootNodeAttributes(hostRenderer, componentDef, hostRNode, rootSelectorOrNode) {\n if (rootSelectorOrNode) {\n setUpAttributes(hostRenderer, hostRNode, ['ng-version', VERSION.full]);\n }\n else {\n // If host element is created as a part of this function call (i.e. `rootSelectorOrNode`\n // is not defined), also apply attributes and classes extracted from component selector.\n // Extract attributes and classes from the first selector only to match VE behavior.\n const { attrs, classes } = extractAttrsAndClassesFromSelector(componentDef.selectors[0]);\n if (attrs) {\n setUpAttributes(hostRenderer, hostRNode, attrs);\n }\n if (classes && classes.length > 0) {\n writeDirectClass(hostRenderer, hostRNode, classes.join(' '));\n }\n }\n}\n/** Projects the `projectableNodes` that were specified when creating a root component. */\nfunction projectNodes(tNode, ngContentSelectors, projectableNodes) {\n const projection = tNode.projection = [];\n for (let i = 0; i < ngContentSelectors.length; i++) {\n const nodesforSlot = projectableNodes[i];\n // Projectable nodes can be passed as array of arrays or an array of iterables (ngUpgrade\n // case). Here we do normalize passed data structure to be an array of arrays to avoid\n // complex checks down the line.\n // We also normalize the length of the passed in projectable nodes (to match the number of\n // <ng-container> slots defined by a component).\n projection.push(nodesforSlot != null ? Array.from(nodesforSlot) : null);\n }\n}\n/**\n * Used to enable lifecycle hooks on the root component.\n *\n * Include this feature when calling `renderComponent` if the root component\n * you are rendering has lifecycle hooks defined. Otherwise, the hooks won't\n * be called properly.\n *\n * Example:\n *\n * ```\n * renderComponent(AppComponent, {hostFeatures: [LifecycleHooksFeature]});\n * ```\n */\nfunction LifecycleHooksFeature() {\n const tNode = getCurrentTNode();\n ngDevMode && assertDefined(tNode, 'TNode is required');\n registerPostOrderHooks(getLView()[TVIEW], tNode);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction getSuperType(type) {\n return Object.getPrototypeOf(type.prototype).constructor;\n}\n/**\n * Merges the definition from a super class to a sub class.\n * @param definition The definition that is a SubClass of another directive of component\n *\n * @codeGenApi\n */\nfunction ɵɵInheritDefinitionFeature(definition) {\n let superType = getSuperType(definition.type);\n let shouldInheritFields = true;\n const inheritanceChain = [definition];\n while (superType) {\n let superDef = undefined;\n if (isComponentDef(definition)) {\n // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n superDef = superType.ɵcmp || superType.ɵdir;\n }\n else {\n if (superType.ɵcmp) {\n throw new RuntimeError(903 /* RuntimeErrorCode.INVALID_INHERITANCE */, ngDevMode &&\n `Directives cannot inherit Components. Directive ${stringifyForError(definition.type)} is attempting to extend component ${stringifyForError(superType)}`);\n }\n // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n superDef = superType.ɵdir;\n }\n if (superDef) {\n if (shouldInheritFields) {\n inheritanceChain.push(superDef);\n // Some fields in the definition may be empty, if there were no values to put in them that\n // would've justified object creation. Unwrap them if necessary.\n const writeableDef = definition;\n writeableDef.inputs = maybeUnwrapEmpty(definition.inputs);\n writeableDef.declaredInputs = maybeUnwrapEmpty(definition.declaredInputs);\n writeableDef.outputs = maybeUnwrapEmpty(definition.outputs);\n // Merge hostBindings\n const superHostBindings = superDef.hostBindings;\n superHostBindings && inheritHostBindings(definition, superHostBindings);\n // Merge queries\n const superViewQuery = superDef.viewQuery;\n const superContentQueries = superDef.contentQueries;\n superViewQuery && inheritViewQuery(definition, superViewQuery);\n superContentQueries && inheritContentQueries(definition, superContentQueries);\n // Merge inputs and outputs\n fillProperties(definition.inputs, superDef.inputs);\n fillProperties(definition.declaredInputs, superDef.declaredInputs);\n fillProperties(definition.outputs, superDef.outputs);\n // Merge animations metadata.\n // If `superDef` is a Component, the `data` field is present (defaults to an empty object).\n if (isComponentDef(superDef) && superDef.data.animation) {\n // If super def is a Component, the `definition` is also a Component, since Directives can\n // not inherit Components (we throw an error above and cannot reach this code).\n const defData = definition.data;\n defData.animation = (defData.animation || []).concat(superDef.data.animation);\n }\n }\n // Run parent features\n const features = superDef.features;\n if (features) {\n for (let i = 0; i < features.length; i++) {\n const feature = features[i];\n if (feature && feature.ngInherit) {\n feature(definition);\n }\n // If `InheritDefinitionFeature` is a part of the current `superDef`, it means that this\n // def already has all the necessary information inherited from its super class(es), so we\n // can stop merging fields from super classes. However we need to iterate through the\n // prototype chain to look for classes that might contain other \"features\" (like\n // NgOnChanges), which we should invoke for the original `definition`. We set the\n // `shouldInheritFields` flag to indicate that, essentially skipping fields inheritance\n // logic and only invoking functions from the \"features\" list.\n if (feature === ɵɵInheritDefinitionFeature) {\n shouldInheritFields = false;\n }\n }\n }\n }\n superType = Object.getPrototypeOf(superType);\n }\n mergeHostAttrsAcrossInheritance(inheritanceChain);\n}\n/**\n * Merge the `hostAttrs` and `hostVars` from the inherited parent to the base class.\n *\n * @param inheritanceChain A list of `WritableDefs` starting at the top most type and listing\n * sub-types in order. For each type take the `hostAttrs` and `hostVars` and merge it with the child\n * type.\n */\nfunction mergeHostAttrsAcrossInheritance(inheritanceChain) {\n let hostVars = 0;\n let hostAttrs = null;\n // We process the inheritance order from the base to the leaves here.\n for (let i = inheritanceChain.length - 1; i >= 0; i--) {\n const def = inheritanceChain[i];\n // For each `hostVars`, we need to add the superclass amount.\n def.hostVars = (hostVars += def.hostVars);\n // for each `hostAttrs` we need to merge it with superclass.\n def.hostAttrs =\n mergeHostAttrs(def.hostAttrs, hostAttrs = mergeHostAttrs(hostAttrs, def.hostAttrs));\n }\n}\nfunction maybeUnwrapEmpty(value) {\n if (value === EMPTY_OBJ) {\n return {};\n }\n else if (value === EMPTY_ARRAY) {\n return [];\n }\n else {\n return value;\n }\n}\nfunction inheritViewQuery(definition, superViewQuery) {\n const prevViewQuery = definition.viewQuery;\n if (prevViewQuery) {\n definition.viewQuery = (rf, ctx) => {\n superViewQuery(rf, ctx);\n prevViewQuery(rf, ctx);\n };\n }\n else {\n definition.viewQuery = superViewQuery;\n }\n}\nfunction inheritContentQueries(definition, superContentQueries) {\n const prevContentQueries = definition.contentQueries;\n if (prevContentQueries) {\n definition.contentQueries = (rf, ctx, directiveIndex) => {\n superContentQueries(rf, ctx, directiveIndex);\n prevContentQueries(rf, ctx, directiveIndex);\n };\n }\n else {\n definition.contentQueries = superContentQueries;\n }\n}\nfunction inheritHostBindings(definition, superHostBindings) {\n const prevHostBindings = definition.hostBindings;\n if (prevHostBindings) {\n definition.hostBindings = (rf, ctx) => {\n superHostBindings(rf, ctx);\n prevHostBindings(rf, ctx);\n };\n }\n else {\n definition.hostBindings = superHostBindings;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Fields which exist on either directive or component definitions, and need to be copied from\n * parent to child classes by the `ɵɵCopyDefinitionFeature`.\n */\nconst COPY_DIRECTIVE_FIELDS = [\n // The child class should use the providers of its parent.\n 'providersResolver',\n // Not listed here are any fields which are handled by the `ɵɵInheritDefinitionFeature`, such\n // as inputs, outputs, and host binding functions.\n];\n/**\n * Fields which exist only on component definitions, and need to be copied from parent to child\n * classes by the `ɵɵCopyDefinitionFeature`.\n *\n * The type here allows any field of `ComponentDef` which is not also a property of `DirectiveDef`,\n * since those should go in `COPY_DIRECTIVE_FIELDS` above.\n */\nconst COPY_COMPONENT_FIELDS = [\n // The child class should use the template function of its parent, including all template\n // semantics.\n 'template',\n 'decls',\n 'consts',\n 'vars',\n 'onPush',\n 'ngContentSelectors',\n // The child class should use the CSS styles of its parent, including all styling semantics.\n 'styles',\n 'encapsulation',\n // The child class should be checked by the runtime in the same way as its parent.\n 'schemas',\n];\n/**\n * Copies the fields not handled by the `ɵɵInheritDefinitionFeature` from the supertype of a\n * definition.\n *\n * This exists primarily to support ngcc migration of an existing View Engine pattern, where an\n * entire decorator is inherited from a parent to a child class. When ngcc detects this case, it\n * generates a skeleton definition on the child class, and applies this feature.\n *\n * The `ɵɵCopyDefinitionFeature` then copies any needed fields from the parent class' definition,\n * including things like the component template function.\n *\n * @param definition The definition of a child class which inherits from a parent class with its\n * own definition.\n *\n * @codeGenApi\n */\nfunction ɵɵCopyDefinitionFeature(definition) {\n let superType = getSuperType(definition.type);\n let superDef = undefined;\n if (isComponentDef(definition)) {\n // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n superDef = superType.ɵcmp;\n }\n else {\n // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n superDef = superType.ɵdir;\n }\n // Needed because `definition` fields are readonly.\n const defAny = definition;\n // Copy over any fields that apply to either directives or components.\n for (const field of COPY_DIRECTIVE_FIELDS) {\n defAny[field] = superDef[field];\n }\n if (isComponentDef(superDef)) {\n // Copy over any component-specific fields.\n for (const field of COPY_COMPONENT_FIELDS) {\n defAny[field] = superDef[field];\n }\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * This feature adds the host directives behavior to a directive definition by patching a\n * function onto it. The expectation is that the runtime will invoke the function during\n * directive matching.\n *\n * For example:\n * ```ts\n * class ComponentWithHostDirective {\n * static ɵcmp = defineComponent({\n * type: ComponentWithHostDirective,\n * features: [ɵɵHostDirectivesFeature([\n * SimpleHostDirective,\n * {directive: AdvancedHostDirective, inputs: ['foo: alias'], outputs: ['bar']},\n * ])]\n * });\n * }\n * ```\n *\n * @codeGenApi\n */\nfunction ɵɵHostDirectivesFeature(rawHostDirectives) {\n return (definition) => {\n definition.findHostDirectiveDefs = findHostDirectiveDefs;\n definition.hostDirectives =\n (Array.isArray(rawHostDirectives) ? rawHostDirectives : rawHostDirectives()).map(dir => {\n return typeof dir === 'function' ?\n { directive: resolveForwardRef(dir), inputs: EMPTY_OBJ, outputs: EMPTY_OBJ } :\n {\n directive: resolveForwardRef(dir.directive),\n inputs: bindingArrayToMap(dir.inputs),\n outputs: bindingArrayToMap(dir.outputs)\n };\n });\n };\n}\nfunction findHostDirectiveDefs(currentDef, matchedDefs, hostDirectiveDefs) {\n if (currentDef.hostDirectives !== null) {\n for (const hostDirectiveConfig of currentDef.hostDirectives) {\n const hostDirectiveDef = getDirectiveDef(hostDirectiveConfig.directive);\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n validateHostDirective(hostDirectiveConfig, hostDirectiveDef, matchedDefs);\n }\n // We need to patch the `declaredInputs` so that\n // `ngOnChanges` can map the properties correctly.\n patchDeclaredInputs(hostDirectiveDef.declaredInputs, hostDirectiveConfig.inputs);\n // Host directives execute before the host so that its host bindings can be overwritten.\n findHostDirectiveDefs(hostDirectiveDef, matchedDefs, hostDirectiveDefs);\n hostDirectiveDefs.set(hostDirectiveDef, hostDirectiveConfig);\n matchedDefs.push(hostDirectiveDef);\n }\n }\n}\n/**\n * Converts an array in the form of `['publicName', 'alias', 'otherPublicName', 'otherAlias']` into\n * a map in the form of `{publicName: 'alias', otherPublicName: 'otherAlias'}`.\n */\nfunction bindingArrayToMap(bindings) {\n if (bindings === undefined || bindings.length === 0) {\n return EMPTY_OBJ;\n }\n const result = {};\n for (let i = 0; i < bindings.length; i += 2) {\n result[bindings[i]] = bindings[i + 1];\n }\n return result;\n}\n/**\n * `ngOnChanges` has some leftover legacy ViewEngine behavior where the keys inside the\n * `SimpleChanges` event refer to the *declared* name of the input, not its public name or its\n * minified name. E.g. in `@Input('alias') foo: string`, the name in the `SimpleChanges` object\n * will always be `foo`, and not `alias` or the minified name of `foo` in apps using property\n * minification.\n *\n * This is achieved through the `DirectiveDef.declaredInputs` map that is constructed when the\n * definition is declared. When a property is written to the directive instance, the\n * `NgOnChangesFeature` will try to remap the property name being written to using the\n * `declaredInputs`.\n *\n * Since the host directive input remapping happens during directive matching, `declaredInputs`\n * won't contain the new alias that the input is available under. This function addresses the\n * issue by patching the host directive aliases to the `declaredInputs`. There is *not* a risk of\n * this patching accidentally introducing new inputs to the host directive, because `declaredInputs`\n * is used *only* by the `NgOnChangesFeature` when determining what name is used in the\n * `SimpleChanges` object which won't be reached if an input doesn't exist.\n */\nfunction patchDeclaredInputs(declaredInputs, exposedInputs) {\n for (const publicName in exposedInputs) {\n if (exposedInputs.hasOwnProperty(publicName)) {\n const remappedPublicName = exposedInputs[publicName];\n const privateName = declaredInputs[publicName];\n // We *technically* shouldn't be able to hit this case because we can't have multiple\n // inputs on the same property and we have validations against conflicting aliases in\n // `validateMappings`. If we somehow did, it would lead to `ngOnChanges` being invoked\n // with the wrong name so we have a non-user-friendly assertion here just in case.\n if ((typeof ngDevMode === 'undefined' || ngDevMode) &&\n declaredInputs.hasOwnProperty(remappedPublicName)) {\n assertEqual(declaredInputs[remappedPublicName], declaredInputs[publicName], `Conflicting host directive input alias ${publicName}.`);\n }\n declaredInputs[remappedPublicName] = privateName;\n }\n }\n}\n/**\n * Verifies that the host directive has been configured correctly.\n * @param hostDirectiveConfig Host directive configuration object.\n * @param directiveDef Directive definition of the host directive.\n * @param matchedDefs Directives that have been matched so far.\n */\nfunction validateHostDirective(hostDirectiveConfig, directiveDef, matchedDefs) {\n const type = hostDirectiveConfig.directive;\n if (directiveDef === null) {\n if (getComponentDef(type) !== null) {\n throw new RuntimeError(310 /* RuntimeErrorCode.HOST_DIRECTIVE_COMPONENT */, `Host directive ${type.name} cannot be a component.`);\n }\n throw new RuntimeError(307 /* RuntimeErrorCode.HOST_DIRECTIVE_UNRESOLVABLE */, `Could not resolve metadata for host directive ${type.name}. ` +\n `Make sure that the ${type.name} class is annotated with an @Directive decorator.`);\n }\n if (!directiveDef.standalone) {\n throw new RuntimeError(308 /* RuntimeErrorCode.HOST_DIRECTIVE_NOT_STANDALONE */, `Host directive ${directiveDef.type.name} must be standalone.`);\n }\n if (matchedDefs.indexOf(directiveDef) > -1) {\n throw new RuntimeError(309 /* RuntimeErrorCode.DUPLICATE_DIRECTITVE */, `Directive ${directiveDef.type.name} matches multiple times on the same element. ` +\n `Directives can only match an element once.`);\n }\n validateMappings('input', directiveDef, hostDirectiveConfig.inputs);\n validateMappings('output', directiveDef, hostDirectiveConfig.outputs);\n}\n/**\n * Checks that the host directive inputs/outputs configuration is valid.\n * @param bindingType Kind of binding that is being validated. Used in the error message.\n * @param def Definition of the host directive that is being validated against.\n * @param hostDirectiveBindings Host directive mapping object that shold be validated.\n */\nfunction validateMappings(bindingType, def, hostDirectiveBindings) {\n const className = def.type.name;\n const bindings = bindingType === 'input' ? def.inputs : def.outputs;\n for (const publicName in hostDirectiveBindings) {\n if (hostDirectiveBindings.hasOwnProperty(publicName)) {\n if (!bindings.hasOwnProperty(publicName)) {\n throw new RuntimeError(311 /* RuntimeErrorCode.HOST_DIRECTIVE_UNDEFINED_BINDING */, `Directive ${className} does not have an ${bindingType} with a public name of ${publicName}.`);\n }\n const remappedPublicName = hostDirectiveBindings[publicName];\n if (bindings.hasOwnProperty(remappedPublicName) &&\n bindings[remappedPublicName] !== publicName) {\n throw new RuntimeError(312 /* RuntimeErrorCode.HOST_DIRECTIVE_CONFLICTING_ALIAS */, `Cannot alias ${bindingType} ${publicName} of host directive ${className} to ${remappedPublicName}, because it already has a different ${bindingType} with the same public name.`);\n }\n }\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nlet _symbolIterator = null;\nfunction getSymbolIterator() {\n if (!_symbolIterator) {\n const Symbol = _global['Symbol'];\n if (Symbol && Symbol.iterator) {\n _symbolIterator = Symbol.iterator;\n }\n else {\n // es6-shim specific logic\n const keys = Object.getOwnPropertyNames(Map.prototype);\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i];\n if (key !== 'entries' && key !== 'size' &&\n Map.prototype[key] === Map.prototype['entries']) {\n _symbolIterator = key;\n }\n }\n }\n }\n return _symbolIterator;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction isIterable(obj) {\n return obj !== null && typeof obj === 'object' && obj[getSymbolIterator()] !== undefined;\n}\nfunction isListLikeIterable(obj) {\n if (!isJsObject(obj))\n return false;\n return Array.isArray(obj) ||\n (!(obj instanceof Map) && // JS Map are iterables but return entries as [k, v]\n getSymbolIterator() in obj); // JS Iterable have a Symbol.iterator prop\n}\nfunction areIterablesEqual(a, b, comparator) {\n const iterator1 = a[getSymbolIterator()]();\n const iterator2 = b[getSymbolIterator()]();\n while (true) {\n const item1 = iterator1.next();\n const item2 = iterator2.next();\n if (item1.done && item2.done)\n return true;\n if (item1.done || item2.done)\n return false;\n if (!comparator(item1.value, item2.value))\n return false;\n }\n}\nfunction iterateListLike(obj, fn) {\n if (Array.isArray(obj)) {\n for (let i = 0; i < obj.length; i++) {\n fn(obj[i]);\n }\n }\n else {\n const iterator = obj[getSymbolIterator()]();\n let item;\n while (!((item = iterator.next()).done)) {\n fn(item.value);\n }\n }\n}\nfunction isJsObject(o) {\n return o !== null && (typeof o === 'function' || typeof o === 'object');\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction devModeEqual(a, b) {\n const isListLikeIterableA = isListLikeIterable(a);\n const isListLikeIterableB = isListLikeIterable(b);\n if (isListLikeIterableA && isListLikeIterableB) {\n return areIterablesEqual(a, b, devModeEqual);\n }\n else {\n const isAObject = a && (typeof a === 'object' || typeof a === 'function');\n const isBObject = b && (typeof b === 'object' || typeof b === 'function');\n if (!isListLikeIterableA && isAObject && !isListLikeIterableB && isBObject) {\n return true;\n }\n else {\n return Object.is(a, b);\n }\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// TODO(misko): consider inlining\n/** Updates binding and returns the value. */\nfunction updateBinding(lView, bindingIndex, value) {\n return lView[bindingIndex] = value;\n}\n/** Gets the current binding value. */\nfunction getBinding(lView, bindingIndex) {\n ngDevMode && assertIndexInRange(lView, bindingIndex);\n ngDevMode &&\n assertNotSame(lView[bindingIndex], NO_CHANGE, 'Stored value should never be NO_CHANGE.');\n return lView[bindingIndex];\n}\n/**\n * Updates binding if changed, then returns whether it was updated.\n *\n * This function also checks the `CheckNoChangesMode` and throws if changes are made.\n * Some changes (Objects/iterables) during `CheckNoChangesMode` are exempt to comply with VE\n * behavior.\n *\n * @param lView current `LView`\n * @param bindingIndex The binding in the `LView` to check\n * @param value New value to check against `lView[bindingIndex]`\n * @returns `true` if the bindings has changed. (Throws if binding has changed during\n * `CheckNoChangesMode`)\n */\nfunction bindingUpdated(lView, bindingIndex, value) {\n ngDevMode && assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n ngDevMode &&\n assertLessThan(bindingIndex, lView.length, `Slot should have been initialized to NO_CHANGE`);\n const oldValue = lView[bindingIndex];\n if (Object.is(oldValue, value)) {\n return false;\n }\n else {\n if (ngDevMode && isInCheckNoChangesMode()) {\n // View engine didn't report undefined values as changed on the first checkNoChanges pass\n // (before the change detection was run).\n const oldValueToCompare = oldValue !== NO_CHANGE ? oldValue : undefined;\n if (!devModeEqual(oldValueToCompare, value)) {\n const details = getExpressionChangedErrorDetails(lView, bindingIndex, oldValueToCompare, value);\n throwErrorIfNoChangesMode(oldValue === NO_CHANGE, details.oldValue, details.newValue, details.propName);\n }\n // There was a change, but the `devModeEqual` decided that the change is exempt from an error.\n // For this reason we exit as if no change. The early exit is needed to prevent the changed\n // value to be written into `LView` (If we would write the new value that we would not see it\n // as change on next CD.)\n return false;\n }\n lView[bindingIndex] = value;\n return true;\n }\n}\n/** Updates 2 bindings if changed, then returns whether either was updated. */\nfunction bindingUpdated2(lView, bindingIndex, exp1, exp2) {\n const different = bindingUpdated(lView, bindingIndex, exp1);\n return bindingUpdated(lView, bindingIndex + 1, exp2) || different;\n}\n/** Updates 3 bindings if changed, then returns whether any was updated. */\nfunction bindingUpdated3(lView, bindingIndex, exp1, exp2, exp3) {\n const different = bindingUpdated2(lView, bindingIndex, exp1, exp2);\n return bindingUpdated(lView, bindingIndex + 2, exp3) || different;\n}\n/** Updates 4 bindings if changed, then returns whether any was updated. */\nfunction bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4) {\n const different = bindingUpdated2(lView, bindingIndex, exp1, exp2);\n return bindingUpdated2(lView, bindingIndex + 2, exp3, exp4) || different;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Updates the value of or removes a bound attribute on an Element.\n *\n * Used in the case of `[attr.title]=\"value\"`\n *\n * @param name name The name of the attribute.\n * @param value value The attribute is removed when value is `null` or `undefined`.\n * Otherwise the attribute value is set to the stringified value.\n * @param sanitizer An optional function used to sanitize the value.\n * @param namespace Optional namespace to use when setting the attribute.\n *\n * @codeGenApi\n */\nfunction ɵɵattribute(name, value, sanitizer, namespace) {\n const lView = getLView();\n const bindingIndex = nextBindingIndex();\n if (bindingUpdated(lView, bindingIndex, value)) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, name, value, sanitizer, namespace);\n ngDevMode && storePropertyBindingMetadata(tView.data, tNode, 'attr.' + name, bindingIndex);\n }\n return ɵɵattribute;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Create interpolation bindings with a variable number of expressions.\n *\n * If there are 1 to 8 expressions `interpolation1()` to `interpolation8()` should be used instead.\n * Those are faster because there is no need to create an array of expressions and iterate over it.\n *\n * `values`:\n * - has static text at even indexes,\n * - has evaluated expressions at odd indexes.\n *\n * Returns the concatenated string when any of the arguments changes, `NO_CHANGE` otherwise.\n */\nfunction interpolationV(lView, values) {\n ngDevMode && assertLessThan(2, values.length, 'should have at least 3 values');\n ngDevMode && assertEqual(values.length % 2, 1, 'should have an odd number of values');\n let isBindingUpdated = false;\n let bindingIndex = getBindingIndex();\n for (let i = 1; i < values.length; i += 2) {\n // Check if bindings (odd indexes) have changed\n isBindingUpdated = bindingUpdated(lView, bindingIndex++, values[i]) || isBindingUpdated;\n }\n setBindingIndex(bindingIndex);\n if (!isBindingUpdated) {\n return NO_CHANGE;\n }\n // Build the updated content\n let content = values[0];\n for (let i = 1; i < values.length; i += 2) {\n content += renderStringify(values[i]) + values[i + 1];\n }\n return content;\n}\n/**\n * Creates an interpolation binding with 1 expression.\n *\n * @param prefix static value used for concatenation only.\n * @param v0 value checked for change.\n * @param suffix static value used for concatenation only.\n */\nfunction interpolation1(lView, prefix, v0, suffix) {\n const different = bindingUpdated(lView, nextBindingIndex(), v0);\n return different ? prefix + renderStringify(v0) + suffix : NO_CHANGE;\n}\n/**\n * Creates an interpolation binding with 2 expressions.\n */\nfunction interpolation2(lView, prefix, v0, i0, v1, suffix) {\n const bindingIndex = getBindingIndex();\n const different = bindingUpdated2(lView, bindingIndex, v0, v1);\n incrementBindingIndex(2);\n return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + suffix : NO_CHANGE;\n}\n/**\n * Creates an interpolation binding with 3 expressions.\n */\nfunction interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix) {\n const bindingIndex = getBindingIndex();\n const different = bindingUpdated3(lView, bindingIndex, v0, v1, v2);\n incrementBindingIndex(3);\n return different ?\n prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + suffix :\n NO_CHANGE;\n}\n/**\n * Create an interpolation binding with 4 expressions.\n */\nfunction interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {\n const bindingIndex = getBindingIndex();\n const different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n incrementBindingIndex(4);\n return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 +\n renderStringify(v2) + i2 + renderStringify(v3) + suffix :\n NO_CHANGE;\n}\n/**\n * Creates an interpolation binding with 5 expressions.\n */\nfunction interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {\n const bindingIndex = getBindingIndex();\n let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated(lView, bindingIndex + 4, v4) || different;\n incrementBindingIndex(5);\n return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 +\n renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + suffix :\n NO_CHANGE;\n}\n/**\n * Creates an interpolation binding with 6 expressions.\n */\nfunction interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {\n const bindingIndex = getBindingIndex();\n let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated2(lView, bindingIndex + 4, v4, v5) || different;\n incrementBindingIndex(6);\n return different ?\n prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 +\n renderStringify(v3) + i3 + renderStringify(v4) + i4 + renderStringify(v5) + suffix :\n NO_CHANGE;\n}\n/**\n * Creates an interpolation binding with 7 expressions.\n */\nfunction interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {\n const bindingIndex = getBindingIndex();\n let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated3(lView, bindingIndex + 4, v4, v5, v6) || different;\n incrementBindingIndex(7);\n return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 +\n renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + i4 +\n renderStringify(v5) + i5 + renderStringify(v6) + suffix :\n NO_CHANGE;\n}\n/**\n * Creates an interpolation binding with 8 expressions.\n */\nfunction interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {\n const bindingIndex = getBindingIndex();\n let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated4(lView, bindingIndex + 4, v4, v5, v6, v7) || different;\n incrementBindingIndex(8);\n return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 +\n renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + i4 +\n renderStringify(v5) + i5 + renderStringify(v6) + i6 + renderStringify(v7) + suffix :\n NO_CHANGE;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate1('title', 'prefix', v0, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵattributeInterpolate1(attrName, prefix, v0, suffix, sanitizer, namespace) {\n const lView = getLView();\n const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 1, prefix, suffix);\n }\n return ɵɵattributeInterpolate1;\n}\n/**\n *\n * Update an interpolated attribute on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵattributeInterpolate2(attrName, prefix, v0, i0, v1, suffix, sanitizer, namespace) {\n const lView = getLView();\n const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 2, prefix, i0, suffix);\n }\n return ɵɵattributeInterpolate2;\n}\n/**\n *\n * Update an interpolated attribute on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate3(\n * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵattributeInterpolate3(attrName, prefix, v0, i0, v1, i1, v2, suffix, sanitizer, namespace) {\n const lView = getLView();\n const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 3, prefix, i0, i1, suffix);\n }\n return ɵɵattributeInterpolate3;\n}\n/**\n *\n * Update an interpolated attribute on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate4(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵattributeInterpolate4(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, suffix, sanitizer, namespace) {\n const lView = getLView();\n const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 4, prefix, i0, i1, i2, suffix);\n }\n return ɵɵattributeInterpolate4;\n}\n/**\n *\n * Update an interpolated attribute on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate5(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵattributeInterpolate5(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix, sanitizer, namespace) {\n const lView = getLView();\n const interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 5, prefix, i0, i1, i2, i3, suffix);\n }\n return ɵɵattributeInterpolate5;\n}\n/**\n *\n * Update an interpolated attribute on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate6(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵattributeInterpolate6(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix, sanitizer, namespace) {\n const lView = getLView();\n const interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 6, prefix, i0, i1, i2, i3, i4, suffix);\n }\n return ɵɵattributeInterpolate6;\n}\n/**\n *\n * Update an interpolated attribute on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate7(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵattributeInterpolate7(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix, sanitizer, namespace) {\n const lView = getLView();\n const interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 7, prefix, i0, i1, i2, i3, i4, i5, suffix);\n }\n return ɵɵattributeInterpolate7;\n}\n/**\n *\n * Update an interpolated attribute on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate8(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵattributeInterpolate8(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix, sanitizer, namespace) {\n const lView = getLView();\n const interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 8, prefix, i0, i1, i2, i3, i4, i5, i6, suffix);\n }\n return ɵɵattributeInterpolate8;\n}\n/**\n * Update an interpolated attribute on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n * title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolateV(\n * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *\n * @param attrName The name of the attribute to update.\n * @param values The collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵattributeInterpolateV(attrName, values, sanitizer, namespace) {\n const lView = getLView();\n const interpolated = interpolationV(lView, values);\n if (interpolated !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolated, sanitizer, namespace);\n if (ngDevMode) {\n const interpolationInBetween = [values[0]]; // prefix\n for (let i = 2; i < values.length; i += 2) {\n interpolationInBetween.push(values[i]);\n }\n storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - interpolationInBetween.length + 1, ...interpolationInBetween);\n }\n }\n return ɵɵattributeInterpolateV;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Synchronously perform change detection on a component (and possibly its sub-components).\n *\n * This function triggers change detection in a synchronous way on a component.\n *\n * @param component The component which the change detection should be performed on.\n */\nfunction detectChanges(component) {\n const view = getComponentViewByInstance(component);\n detectChangesInternal(view[TVIEW], view, component);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction templateFirstCreatePass(index, tView, lView, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex) {\n ngDevMode && assertFirstCreatePass(tView);\n ngDevMode && ngDevMode.firstCreatePass++;\n const tViewConsts = tView.consts;\n // TODO(pk): refactor getOrCreateTNode to have the \"create\" only version\n const tNode = getOrCreateTNode(tView, index, 4 /* TNodeType.Container */, tagName || null, getConstant(tViewConsts, attrsIndex));\n resolveDirectives(tView, lView, tNode, getConstant(tViewConsts, localRefsIndex));\n registerPostOrderHooks(tView, tNode);\n const embeddedTView = tNode.tViews = createTView(2 /* TViewType.Embedded */, tNode, templateFn, decls, vars, tView.directiveRegistry, tView.pipeRegistry, null, tView.schemas, tViewConsts);\n if (tView.queries !== null) {\n tView.queries.template(tView, tNode);\n embeddedTView.queries = tView.queries.embeddedTView(tNode);\n }\n return tNode;\n}\n/**\n * Creates an LContainer for an ng-template (dynamically-inserted view), e.g.\n *\n * <ng-template #foo>\n * <div></div>\n * </ng-template>\n *\n * @param index The index of the container in the data array\n * @param templateFn Inline template\n * @param decls The number of nodes, local refs, and pipes for this template\n * @param vars The number of bindings for this template\n * @param tagName The name of the container element, if applicable\n * @param attrsIndex Index of template attributes in the `consts` array.\n * @param localRefs Index of the local references in the `consts` array.\n * @param localRefExtractor A function which extracts local-refs values from the template.\n * Defaults to the current element associated with the local-ref.\n *\n * @codeGenApi\n */\nfunction ɵɵtemplate(index, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex, localRefExtractor) {\n const lView = getLView();\n const tView = getTView();\n const adjustedIndex = index + HEADER_OFFSET;\n const tNode = tView.firstCreatePass ? templateFirstCreatePass(adjustedIndex, tView, lView, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex) :\n tView.data[adjustedIndex];\n setCurrentTNode(tNode, false);\n const comment = lView[RENDERER].createComment(ngDevMode ? 'container' : '');\n appendChild(tView, lView, comment, tNode);\n attachPatchData(comment, lView);\n addToViewTree(lView, lView[adjustedIndex] = createLContainer(comment, lView, comment, tNode));\n if (isDirectiveHost(tNode)) {\n createDirectivesInstances(tView, lView, tNode);\n }\n if (localRefsIndex != null) {\n saveResolvedLocalsInData(lView, tNode, localRefExtractor);\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Store a value in the `data` at a given `index`. */\nfunction store(tView, lView, index, value) {\n // We don't store any static data for local variables, so the first time\n // we see the template, we should store as null to avoid a sparse array\n if (index >= tView.data.length) {\n tView.data[index] = null;\n tView.blueprint[index] = null;\n }\n lView[index] = value;\n}\n/**\n * Retrieves a local reference from the current contextViewData.\n *\n * If the reference to retrieve is in a parent view, this instruction is used in conjunction\n * with a nextContext() call, which walks up the tree and updates the contextViewData instance.\n *\n * @param index The index of the local ref in contextViewData.\n *\n * @codeGenApi\n */\nfunction ɵɵreference(index) {\n const contextLView = getContextLView();\n return load(contextLView, HEADER_OFFSET + index);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Update a property on a selected element.\n *\n * Operates on the element selected by index via the {@link select} instruction.\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled\n *\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n * renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n * @returns This function returns itself so that it may be chained\n * (e.g. `property('name', ctx.name)('title', ctx.title)`)\n *\n * @codeGenApi\n */\nfunction ɵɵproperty(propName, value, sanitizer) {\n const lView = getLView();\n const bindingIndex = nextBindingIndex();\n if (bindingUpdated(lView, bindingIndex, value)) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, value, lView[RENDERER], sanitizer, false);\n ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n }\n return ɵɵproperty;\n}\n/**\n * Given `<div style=\"...\" my-dir>` and `MyDir` with `@Input('style')` we need to write to\n * directive input.\n */\nfunction setDirectiveInputsWhichShadowsStyling(tView, tNode, lView, value, isClassBased) {\n const inputs = tNode.inputs;\n const property = isClassBased ? 'class' : 'style';\n // We support both 'class' and `className` hence the fallback.\n setInputsForProperty(tView, lView, inputs[property], property, value);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction elementStartFirstCreatePass(index, tView, lView, native, name, attrsIndex, localRefsIndex) {\n ngDevMode && assertFirstCreatePass(tView);\n ngDevMode && ngDevMode.firstCreatePass++;\n const tViewConsts = tView.consts;\n const attrs = getConstant(tViewConsts, attrsIndex);\n const tNode = getOrCreateTNode(tView, index, 2 /* TNodeType.Element */, name, attrs);\n const hasDirectives = resolveDirectives(tView, lView, tNode, getConstant(tViewConsts, localRefsIndex));\n if (ngDevMode) {\n validateElementIsKnown(native, lView, tNode.value, tView.schemas, hasDirectives);\n }\n if (tNode.attrs !== null) {\n computeStaticStyling(tNode, tNode.attrs, false);\n }\n if (tNode.mergedAttrs !== null) {\n computeStaticStyling(tNode, tNode.mergedAttrs, true);\n }\n if (tView.queries !== null) {\n tView.queries.elementStart(tView, tNode);\n }\n return tNode;\n}\n/**\n * Create DOM element. The instruction must later be followed by `elementEnd()` call.\n *\n * @param index Index of the element in the LView array\n * @param name Name of the DOM Node\n * @param attrsIndex Index of the element's attributes in the `consts` array.\n * @param localRefsIndex Index of the element's local references in the `consts` array.\n * @returns This function returns itself so that it may be chained.\n *\n * Attributes and localRefs are passed as an array of strings where elements with an even index\n * hold an attribute name and elements with an odd index hold an attribute value, ex.:\n * ['id', 'warning5', 'class', 'alert']\n *\n * @codeGenApi\n */\nfunction ɵɵelementStart(index, name, attrsIndex, localRefsIndex) {\n const lView = getLView();\n const tView = getTView();\n const adjustedIndex = HEADER_OFFSET + index;\n ngDevMode &&\n assertEqual(getBindingIndex(), tView.bindingStartIndex, 'elements should be created before any bindings');\n ngDevMode && assertIndexInRange(lView, adjustedIndex);\n const renderer = lView[RENDERER];\n const native = lView[adjustedIndex] = createElementNode(renderer, name, getNamespace$1());\n const tNode = tView.firstCreatePass ?\n elementStartFirstCreatePass(adjustedIndex, tView, lView, native, name, attrsIndex, localRefsIndex) :\n tView.data[adjustedIndex];\n setCurrentTNode(tNode, true);\n setupStaticAttributes(renderer, native, tNode);\n if ((tNode.flags & 32 /* TNodeFlags.isDetached */) !== 32 /* TNodeFlags.isDetached */) {\n // In the i18n case, the translation may have removed this element, so only add it if it is not\n // detached. See `TNodeType.Placeholder` and `LFrame.inI18n` for more context.\n appendChild(tView, lView, native, tNode);\n }\n // any immediate children of a component or template container must be pre-emptively\n // monkey-patched with the component view data so that the element can be inspected\n // later on using any element discovery utility methods (see `element_discovery.ts`)\n if (getElementDepthCount() === 0) {\n attachPatchData(native, lView);\n }\n increaseElementDepthCount();\n if (isDirectiveHost(tNode)) {\n createDirectivesInstances(tView, lView, tNode);\n executeContentQueries(tView, tNode, lView);\n }\n if (localRefsIndex !== null) {\n saveResolvedLocalsInData(lView, tNode);\n }\n return ɵɵelementStart;\n}\n/**\n * Mark the end of the element.\n * @returns This function returns itself so that it may be chained.\n *\n * @codeGenApi\n */\nfunction ɵɵelementEnd() {\n let currentTNode = getCurrentTNode();\n ngDevMode && assertDefined(currentTNode, 'No parent node to close.');\n if (isCurrentTNodeParent()) {\n setCurrentTNodeAsNotParent();\n }\n else {\n ngDevMode && assertHasParent(getCurrentTNode());\n currentTNode = currentTNode.parent;\n setCurrentTNode(currentTNode, false);\n }\n const tNode = currentTNode;\n ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */);\n decreaseElementDepthCount();\n const tView = getTView();\n if (tView.firstCreatePass) {\n registerPostOrderHooks(tView, currentTNode);\n if (isContentQueryHost(currentTNode)) {\n tView.queries.elementEnd(currentTNode);\n }\n }\n if (tNode.classesWithoutHost != null && hasClassInput(tNode)) {\n setDirectiveInputsWhichShadowsStyling(tView, tNode, getLView(), tNode.classesWithoutHost, true);\n }\n if (tNode.stylesWithoutHost != null && hasStyleInput(tNode)) {\n setDirectiveInputsWhichShadowsStyling(tView, tNode, getLView(), tNode.stylesWithoutHost, false);\n }\n return ɵɵelementEnd;\n}\n/**\n * Creates an empty element using {@link elementStart} and {@link elementEnd}\n *\n * @param index Index of the element in the data array\n * @param name Name of the DOM Node\n * @param attrsIndex Index of the element's attributes in the `consts` array.\n * @param localRefsIndex Index of the element's local references in the `consts` array.\n * @returns This function returns itself so that it may be chained.\n *\n * @codeGenApi\n */\nfunction ɵɵelement(index, name, attrsIndex, localRefsIndex) {\n ɵɵelementStart(index, name, attrsIndex, localRefsIndex);\n ɵɵelementEnd();\n return ɵɵelement;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction elementContainerStartFirstCreatePass(index, tView, lView, attrsIndex, localRefsIndex) {\n ngDevMode && ngDevMode.firstCreatePass++;\n const tViewConsts = tView.consts;\n const attrs = getConstant(tViewConsts, attrsIndex);\n const tNode = getOrCreateTNode(tView, index, 8 /* TNodeType.ElementContainer */, 'ng-container', attrs);\n // While ng-container doesn't necessarily support styling, we use the style context to identify\n // and execute directives on the ng-container.\n if (attrs !== null) {\n computeStaticStyling(tNode, attrs, true);\n }\n const localRefs = getConstant(tViewConsts, localRefsIndex);\n resolveDirectives(tView, lView, tNode, localRefs);\n if (tView.queries !== null) {\n tView.queries.elementStart(tView, tNode);\n }\n return tNode;\n}\n/**\n * Creates a logical container for other nodes (<ng-container>) backed by a comment node in the DOM.\n * The instruction must later be followed by `elementContainerEnd()` call.\n *\n * @param index Index of the element in the LView array\n * @param attrsIndex Index of the container attributes in the `consts` array.\n * @param localRefsIndex Index of the container's local references in the `consts` array.\n * @returns This function returns itself so that it may be chained.\n *\n * Even if this instruction accepts a set of attributes no actual attribute values are propagated to\n * the DOM (as a comment node can't have attributes). Attributes are here only for directive\n * matching purposes and setting initial inputs of directives.\n *\n * @codeGenApi\n */\nfunction ɵɵelementContainerStart(index, attrsIndex, localRefsIndex) {\n const lView = getLView();\n const tView = getTView();\n const adjustedIndex = index + HEADER_OFFSET;\n ngDevMode && assertIndexInRange(lView, adjustedIndex);\n ngDevMode &&\n assertEqual(getBindingIndex(), tView.bindingStartIndex, 'element containers should be created before any bindings');\n const tNode = tView.firstCreatePass ?\n elementContainerStartFirstCreatePass(adjustedIndex, tView, lView, attrsIndex, localRefsIndex) :\n tView.data[adjustedIndex];\n setCurrentTNode(tNode, true);\n ngDevMode && ngDevMode.rendererCreateComment++;\n const native = lView[adjustedIndex] =\n lView[RENDERER].createComment(ngDevMode ? 'ng-container' : '');\n appendChild(tView, lView, native, tNode);\n attachPatchData(native, lView);\n if (isDirectiveHost(tNode)) {\n createDirectivesInstances(tView, lView, tNode);\n executeContentQueries(tView, tNode, lView);\n }\n if (localRefsIndex != null) {\n saveResolvedLocalsInData(lView, tNode);\n }\n return ɵɵelementContainerStart;\n}\n/**\n * Mark the end of the <ng-container>.\n * @returns This function returns itself so that it may be chained.\n *\n * @codeGenApi\n */\nfunction ɵɵelementContainerEnd() {\n let currentTNode = getCurrentTNode();\n const tView = getTView();\n if (isCurrentTNodeParent()) {\n setCurrentTNodeAsNotParent();\n }\n else {\n ngDevMode && assertHasParent(currentTNode);\n currentTNode = currentTNode.parent;\n setCurrentTNode(currentTNode, false);\n }\n ngDevMode && assertTNodeType(currentTNode, 8 /* TNodeType.ElementContainer */);\n if (tView.firstCreatePass) {\n registerPostOrderHooks(tView, currentTNode);\n if (isContentQueryHost(currentTNode)) {\n tView.queries.elementEnd(currentTNode);\n }\n }\n return ɵɵelementContainerEnd;\n}\n/**\n * Creates an empty logical container using {@link elementContainerStart}\n * and {@link elementContainerEnd}\n *\n * @param index Index of the element in the LView array\n * @param attrsIndex Index of the container attributes in the `consts` array.\n * @param localRefsIndex Index of the container's local references in the `consts` array.\n * @returns This function returns itself so that it may be chained.\n *\n * @codeGenApi\n */\nfunction ɵɵelementContainer(index, attrsIndex, localRefsIndex) {\n ɵɵelementContainerStart(index, attrsIndex, localRefsIndex);\n ɵɵelementContainerEnd();\n return ɵɵelementContainer;\n}\n\n/**\n * Returns the current OpaqueViewState instance.\n *\n * Used in conjunction with the restoreView() instruction to save a snapshot\n * of the current view and restore it when listeners are invoked. This allows\n * walking the declaration view tree in listeners to get vars from parent views.\n *\n * @codeGenApi\n */\nfunction ɵɵgetCurrentView() {\n return getLView();\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Determine if the argument is shaped like a Promise\n */\nfunction isPromise(obj) {\n // allow any Promise/A+ compliant thenable.\n // It's up to the caller to ensure that obj.then conforms to the spec\n return !!obj && typeof obj.then === 'function';\n}\n/**\n * Determine if the argument is a Subscribable\n */\nfunction isSubscribable(obj) {\n return !!obj && typeof obj.subscribe === 'function';\n}\n/**\n * Determine if the argument is an Observable\n *\n * Strictly this tests that the `obj` is `Subscribable`, since `Observable`\n * types need additional methods, such as `lift()`. But it is adequate for our\n * needs since within the Angular framework code we only ever need to use the\n * `subscribe()` method, and RxJS has mechanisms to wrap `Subscribable` objects\n * into `Observable` as needed.\n */\nconst isObservable = isSubscribable;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Adds an event listener to the current node.\n *\n * If an output exists on one of the node's directives, it also subscribes to the output\n * and saves the subscription for later cleanup.\n *\n * @param eventName Name of the event\n * @param listenerFn The function to be called when event emits\n * @param useCapture Whether or not to use capture in event listener - this argument is a reminder\n * from the Renderer3 infrastructure and should be removed from the instruction arguments\n * @param eventTargetResolver Function that returns global target information in case this listener\n * should be attached to a global object like window, document or body\n *\n * @codeGenApi\n */\nfunction ɵɵlistener(eventName, listenerFn, useCapture, eventTargetResolver) {\n const lView = getLView();\n const tView = getTView();\n const tNode = getCurrentTNode();\n listenerInternal(tView, lView, lView[RENDERER], tNode, eventName, listenerFn, eventTargetResolver);\n return ɵɵlistener;\n}\n/**\n * Registers a synthetic host listener (e.g. `(@foo.start)`) on a component or directive.\n *\n * This instruction is for compatibility purposes and is designed to ensure that a\n * synthetic host listener (e.g. `@HostListener('@foo.start')`) properly gets rendered\n * in the component's renderer. Normally all host listeners are evaluated with the\n * parent component's renderer, but, in the case of animation @triggers, they need\n * to be evaluated with the sub component's renderer (because that's where the\n * animation triggers are defined).\n *\n * Do not use this instruction as a replacement for `listener`. This instruction\n * only exists to ensure compatibility with the ViewEngine's host binding behavior.\n *\n * @param eventName Name of the event\n * @param listenerFn The function to be called when event emits\n * @param useCapture Whether or not to use capture in event listener\n * @param eventTargetResolver Function that returns global target information in case this listener\n * should be attached to a global object like window, document or body\n *\n * @codeGenApi\n */\nfunction ɵɵsyntheticHostListener(eventName, listenerFn) {\n const tNode = getCurrentTNode();\n const lView = getLView();\n const tView = getTView();\n const currentDef = getCurrentDirectiveDef(tView.data);\n const renderer = loadComponentRenderer(currentDef, tNode, lView);\n listenerInternal(tView, lView, renderer, tNode, eventName, listenerFn);\n return ɵɵsyntheticHostListener;\n}\n/**\n * A utility function that checks if a given element has already an event handler registered for an\n * event with a specified name. The TView.cleanup data structure is used to find out which events\n * are registered for a given element.\n */\nfunction findExistingListener(tView, lView, eventName, tNodeIdx) {\n const tCleanup = tView.cleanup;\n if (tCleanup != null) {\n for (let i = 0; i < tCleanup.length - 1; i += 2) {\n const cleanupEventName = tCleanup[i];\n if (cleanupEventName === eventName && tCleanup[i + 1] === tNodeIdx) {\n // We have found a matching event name on the same node but it might not have been\n // registered yet, so we must explicitly verify entries in the LView cleanup data\n // structures.\n const lCleanup = lView[CLEANUP];\n const listenerIdxInLCleanup = tCleanup[i + 2];\n return lCleanup.length > listenerIdxInLCleanup ? lCleanup[listenerIdxInLCleanup] : null;\n }\n // TView.cleanup can have a mix of 4-elements entries (for event handler cleanups) or\n // 2-element entries (for directive and queries destroy hooks). As such we can encounter\n // blocks of 4 or 2 items in the tView.cleanup and this is why we iterate over 2 elements\n // first and jump another 2 elements if we detect listeners cleanup (4 elements). Also check\n // documentation of TView.cleanup for more details of this data structure layout.\n if (typeof cleanupEventName === 'string') {\n i += 2;\n }\n }\n }\n return null;\n}\nfunction listenerInternal(tView, lView, renderer, tNode, eventName, listenerFn, eventTargetResolver) {\n const isTNodeDirectiveHost = isDirectiveHost(tNode);\n const firstCreatePass = tView.firstCreatePass;\n const tCleanup = firstCreatePass && getOrCreateTViewCleanup(tView);\n const context = lView[CONTEXT];\n // When the ɵɵlistener instruction was generated and is executed we know that there is either a\n // native listener or a directive output on this element. As such we we know that we will have to\n // register a listener and store its cleanup function on LView.\n const lCleanup = getOrCreateLViewCleanup(lView);\n ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */ | 12 /* TNodeType.AnyContainer */);\n let processOutputs = true;\n // Adding a native event listener is applicable when:\n // - The corresponding TNode represents a DOM element.\n // - The event target has a resolver (usually resulting in a global object,\n // such as `window` or `document`).\n if ((tNode.type & 3 /* TNodeType.AnyRNode */) || eventTargetResolver) {\n const native = getNativeByTNode(tNode, lView);\n const target = eventTargetResolver ? eventTargetResolver(native) : native;\n const lCleanupIndex = lCleanup.length;\n const idxOrTargetGetter = eventTargetResolver ?\n (_lView) => eventTargetResolver(unwrapRNode(_lView[tNode.index])) :\n tNode.index;\n // In order to match current behavior, native DOM event listeners must be added for all\n // events (including outputs).\n // There might be cases where multiple directives on the same element try to register an event\n // handler function for the same event. In this situation we want to avoid registration of\n // several native listeners as each registration would be intercepted by NgZone and\n // trigger change detection. This would mean that a single user action would result in several\n // change detections being invoked. To avoid this situation we want to have only one call to\n // native handler registration (for the same element and same type of event).\n //\n // In order to have just one native event handler in presence of multiple handler functions,\n // we just register a first handler function as a native event listener and then chain\n // (coalesce) other handler functions on top of the first native handler function.\n let existingListener = null;\n // Please note that the coalescing described here doesn't happen for events specifying an\n // alternative target (ex. (document:click)) - this is to keep backward compatibility with the\n // view engine.\n // Also, we don't have to search for existing listeners is there are no directives\n // matching on a given node as we can't register multiple event handlers for the same event in\n // a template (this would mean having duplicate attributes).\n if (!eventTargetResolver && isTNodeDirectiveHost) {\n existingListener = findExistingListener(tView, lView, eventName, tNode.index);\n }\n if (existingListener !== null) {\n // Attach a new listener to coalesced listeners list, maintaining the order in which\n // listeners are registered. For performance reasons, we keep a reference to the last\n // listener in that list (in `__ngLastListenerFn__` field), so we can avoid going through\n // the entire set each time we need to add a new listener.\n const lastListenerFn = existingListener.__ngLastListenerFn__ || existingListener;\n lastListenerFn.__ngNextListenerFn__ = listenerFn;\n existingListener.__ngLastListenerFn__ = listenerFn;\n processOutputs = false;\n }\n else {\n listenerFn = wrapListener(tNode, lView, context, listenerFn, false /** preventDefault */);\n const cleanupFn = renderer.listen(target, eventName, listenerFn);\n ngDevMode && ngDevMode.rendererAddEventListener++;\n lCleanup.push(listenerFn, cleanupFn);\n tCleanup && tCleanup.push(eventName, idxOrTargetGetter, lCleanupIndex, lCleanupIndex + 1);\n }\n }\n else {\n // Even if there is no native listener to add, we still need to wrap the listener so that OnPush\n // ancestors are marked dirty when an event occurs.\n listenerFn = wrapListener(tNode, lView, context, listenerFn, false /** preventDefault */);\n }\n // subscribe to directive outputs\n const outputs = tNode.outputs;\n let props;\n if (processOutputs && outputs !== null && (props = outputs[eventName])) {\n const propsLength = props.length;\n if (propsLength) {\n for (let i = 0; i < propsLength; i += 2) {\n const index = props[i];\n ngDevMode && assertIndexInRange(lView, index);\n const minifiedName = props[i + 1];\n const directiveInstance = lView[index];\n const output = directiveInstance[minifiedName];\n if (ngDevMode && !isObservable(output)) {\n throw new Error(`@Output ${minifiedName} not initialized in '${directiveInstance.constructor.name}'.`);\n }\n const subscription = output.subscribe(listenerFn);\n const idx = lCleanup.length;\n lCleanup.push(listenerFn, subscription);\n tCleanup && tCleanup.push(eventName, tNode.index, idx, -(idx + 1));\n }\n }\n }\n}\nfunction executeListenerWithErrorHandling(lView, context, listenerFn, e) {\n try {\n profiler(6 /* ProfilerEvent.OutputStart */, context, listenerFn);\n // Only explicitly returning false from a listener should preventDefault\n return listenerFn(e) !== false;\n }\n catch (error) {\n handleError(lView, error);\n return false;\n }\n finally {\n profiler(7 /* ProfilerEvent.OutputEnd */, context, listenerFn);\n }\n}\n/**\n * Wraps an event listener with a function that marks ancestors dirty and prevents default behavior,\n * if applicable.\n *\n * @param tNode The TNode associated with this listener\n * @param lView The LView that contains this listener\n * @param listenerFn The listener function to call\n * @param wrapWithPreventDefault Whether or not to prevent default behavior\n * (the procedural renderer does this already, so in those cases, we should skip)\n */\nfunction wrapListener(tNode, lView, context, listenerFn, wrapWithPreventDefault) {\n // Note: we are performing most of the work in the listener function itself\n // to optimize listener registration.\n return function wrapListenerIn_markDirtyAndPreventDefault(e) {\n // Ivy uses `Function` as a special token that allows us to unwrap the function\n // so that it can be invoked programmatically by `DebugNode.triggerEventHandler`.\n if (e === Function) {\n return listenerFn;\n }\n // In order to be backwards compatible with View Engine, events on component host nodes\n // must also mark the component view itself dirty (i.e. the view that it owns).\n const startView = tNode.componentOffset > -1 ? getComponentLViewByIndex(tNode.index, lView) : lView;\n markViewDirty(startView);\n let result = executeListenerWithErrorHandling(lView, context, listenerFn, e);\n // A just-invoked listener function might have coalesced listeners so we need to check for\n // their presence and invoke as needed.\n let nextListenerFn = wrapListenerIn_markDirtyAndPreventDefault.__ngNextListenerFn__;\n while (nextListenerFn) {\n // We should prevent default if any of the listeners explicitly return false\n result = executeListenerWithErrorHandling(lView, context, nextListenerFn, e) && result;\n nextListenerFn = nextListenerFn.__ngNextListenerFn__;\n }\n if (wrapWithPreventDefault && result === false) {\n e.preventDefault();\n // Necessary for legacy browsers that don't support preventDefault (e.g. IE)\n e.returnValue = false;\n }\n return result;\n };\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Retrieves a context at the level specified and saves it as the global, contextViewData.\n * Will get the next level up if level is not specified.\n *\n * This is used to save contexts of parent views so they can be bound in embedded views, or\n * in conjunction with reference() to bind a ref from a parent view.\n *\n * @param level The relative level of the view from which to grab context compared to contextVewData\n * @returns context\n *\n * @codeGenApi\n */\nfunction ɵɵnextContext(level = 1) {\n return nextContextImpl(level);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Checks a given node against matching projection slots and returns the\n * determined slot index. Returns \"null\" if no slot matched the given node.\n *\n * This function takes into account the parsed ngProjectAs selector from the\n * node's attributes. If present, it will check whether the ngProjectAs selector\n * matches any of the projection slot selectors.\n */\nfunction matchingProjectionSlotIndex(tNode, projectionSlots) {\n let wildcardNgContentIndex = null;\n const ngProjectAsAttrVal = getProjectAsAttrValue(tNode);\n for (let i = 0; i < projectionSlots.length; i++) {\n const slotValue = projectionSlots[i];\n // The last wildcard projection slot should match all nodes which aren't matching\n // any selector. This is necessary to be backwards compatible with view engine.\n if (slotValue === '*') {\n wildcardNgContentIndex = i;\n continue;\n }\n // If we ran into an `ngProjectAs` attribute, we should match its parsed selector\n // to the list of selectors, otherwise we fall back to matching against the node.\n if (ngProjectAsAttrVal === null ?\n isNodeMatchingSelectorList(tNode, slotValue, /* isProjectionMode */ true) :\n isSelectorInSelectorList(ngProjectAsAttrVal, slotValue)) {\n return i; // first matching selector \"captures\" a given node\n }\n }\n return wildcardNgContentIndex;\n}\n/**\n * Instruction to distribute projectable nodes among <ng-content> occurrences in a given template.\n * It takes all the selectors from the entire component's template and decides where\n * each projected node belongs (it re-distributes nodes among \"buckets\" where each \"bucket\" is\n * backed by a selector).\n *\n * This function requires CSS selectors to be provided in 2 forms: parsed (by a compiler) and text,\n * un-parsed form.\n *\n * The parsed form is needed for efficient matching of a node against a given CSS selector.\n * The un-parsed, textual form is needed for support of the ngProjectAs attribute.\n *\n * Having a CSS selector in 2 different formats is not ideal, but alternatives have even more\n * drawbacks:\n * - having only a textual form would require runtime parsing of CSS selectors;\n * - we can't have only a parsed as we can't re-construct textual form from it (as entered by a\n * template author).\n *\n * @param projectionSlots? A collection of projection slots. A projection slot can be based\n * on a parsed CSS selectors or set to the wildcard selector (\"*\") in order to match\n * all nodes which do not match any selector. If not specified, a single wildcard\n * selector projection slot will be defined.\n *\n * @codeGenApi\n */\nfunction ɵɵprojectionDef(projectionSlots) {\n const componentNode = getLView()[DECLARATION_COMPONENT_VIEW][T_HOST];\n if (!componentNode.projection) {\n // If no explicit projection slots are defined, fall back to a single\n // projection slot with the wildcard selector.\n const numProjectionSlots = projectionSlots ? projectionSlots.length : 1;\n const projectionHeads = componentNode.projection =\n newArray(numProjectionSlots, null);\n const tails = projectionHeads.slice();\n let componentChild = componentNode.child;\n while (componentChild !== null) {\n const slotIndex = projectionSlots ? matchingProjectionSlotIndex(componentChild, projectionSlots) : 0;\n if (slotIndex !== null) {\n if (tails[slotIndex]) {\n tails[slotIndex].projectionNext = componentChild;\n }\n else {\n projectionHeads[slotIndex] = componentChild;\n }\n tails[slotIndex] = componentChild;\n }\n componentChild = componentChild.next;\n }\n }\n}\n/**\n * Inserts previously re-distributed projected nodes. This instruction must be preceded by a call\n * to the projectionDef instruction.\n *\n * @param nodeIndex\n * @param selectorIndex:\n * - 0 when the selector is `*` (or unspecified as this is the default value),\n * - 1 based index of the selector from the {@link projectionDef}\n *\n * @codeGenApi\n */\nfunction ɵɵprojection(nodeIndex, selectorIndex = 0, attrs) {\n const lView = getLView();\n const tView = getTView();\n const tProjectionNode = getOrCreateTNode(tView, HEADER_OFFSET + nodeIndex, 16 /* TNodeType.Projection */, null, attrs || null);\n // We can't use viewData[HOST_NODE] because projection nodes can be nested in embedded views.\n if (tProjectionNode.projection === null)\n tProjectionNode.projection = selectorIndex;\n // `<ng-content>` has no content\n setCurrentTNodeAsNotParent();\n if ((tProjectionNode.flags & 32 /* TNodeFlags.isDetached */) !== 32 /* TNodeFlags.isDetached */) {\n // re-distribution of projectable nodes is stored on a component's view level\n applyProjection(tView, lView, tProjectionNode);\n }\n}\n\n/**\n *\n * Update an interpolated property on an element with a lone bound value\n *\n * Used when the value passed to a property has 1 interpolated value in it, an no additional text\n * surrounds that interpolated value:\n *\n * ```html\n * <div title=\"{{v0}}\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate('title', v0);\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolate(propName, v0, sanitizer) {\n ɵɵpropertyInterpolate1(propName, '', v0, '', sanitizer);\n return ɵɵpropertyInterpolate;\n}\n/**\n *\n * Update an interpolated property on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate1('title', 'prefix', v0, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolate1(propName, prefix, v0, suffix, sanitizer) {\n const lView = getLView();\n const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 1, prefix, suffix);\n }\n return ɵɵpropertyInterpolate1;\n}\n/**\n *\n * Update an interpolated property on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolate2(propName, prefix, v0, i0, v1, suffix, sanitizer) {\n const lView = getLView();\n const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 2, prefix, i0, suffix);\n }\n return ɵɵpropertyInterpolate2;\n}\n/**\n *\n * Update an interpolated property on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate3(\n * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolate3(propName, prefix, v0, i0, v1, i1, v2, suffix, sanitizer) {\n const lView = getLView();\n const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 3, prefix, i0, i1, suffix);\n }\n return ɵɵpropertyInterpolate3;\n}\n/**\n *\n * Update an interpolated property on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate4(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolate4(propName, prefix, v0, i0, v1, i1, v2, i2, v3, suffix, sanitizer) {\n const lView = getLView();\n const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 4, prefix, i0, i1, i2, suffix);\n }\n return ɵɵpropertyInterpolate4;\n}\n/**\n *\n * Update an interpolated property on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate5(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolate5(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix, sanitizer) {\n const lView = getLView();\n const interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 5, prefix, i0, i1, i2, i3, suffix);\n }\n return ɵɵpropertyInterpolate5;\n}\n/**\n *\n * Update an interpolated property on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate6(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolate6(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix, sanitizer) {\n const lView = getLView();\n const interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 6, prefix, i0, i1, i2, i3, i4, suffix);\n }\n return ɵɵpropertyInterpolate6;\n}\n/**\n *\n * Update an interpolated property on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate7(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolate7(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix, sanitizer) {\n const lView = getLView();\n const interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 7, prefix, i0, i1, i2, i3, i4, i5, suffix);\n }\n return ɵɵpropertyInterpolate7;\n}\n/**\n *\n * Update an interpolated property on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate8(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolate8(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix, sanitizer) {\n const lView = getLView();\n const interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 8, prefix, i0, i1, i2, i3, i4, i5, i6, suffix);\n }\n return ɵɵpropertyInterpolate8;\n}\n/**\n * Update an interpolated property on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n * title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolateV(\n * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update.\n * @param values The collection of values and the strings in between those values, beginning with a\n * string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolateV(propName, values, sanitizer) {\n const lView = getLView();\n const interpolatedValue = interpolationV(lView, values);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n if (ngDevMode) {\n const interpolationInBetween = [values[0]]; // prefix\n for (let i = 2; i < values.length; i += 2) {\n interpolationInBetween.push(values[i]);\n }\n storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - interpolationInBetween.length + 1, ...interpolationInBetween);\n }\n }\n return ɵɵpropertyInterpolateV;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction toTStylingRange(prev, next) {\n ngDevMode && assertNumberInRange(prev, 0, 32767 /* StylingRange.UNSIGNED_MASK */);\n ngDevMode && assertNumberInRange(next, 0, 32767 /* StylingRange.UNSIGNED_MASK */);\n return (prev << 17 /* StylingRange.PREV_SHIFT */ | next << 2 /* StylingRange.NEXT_SHIFT */);\n}\nfunction getTStylingRangePrev(tStylingRange) {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return (tStylingRange >> 17 /* StylingRange.PREV_SHIFT */) & 32767 /* StylingRange.UNSIGNED_MASK */;\n}\nfunction getTStylingRangePrevDuplicate(tStylingRange) {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return (tStylingRange & 2 /* StylingRange.PREV_DUPLICATE */) ==\n 2 /* StylingRange.PREV_DUPLICATE */;\n}\nfunction setTStylingRangePrev(tStylingRange, previous) {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n ngDevMode && assertNumberInRange(previous, 0, 32767 /* StylingRange.UNSIGNED_MASK */);\n return ((tStylingRange & ~4294836224 /* StylingRange.PREV_MASK */) |\n (previous << 17 /* StylingRange.PREV_SHIFT */));\n}\nfunction setTStylingRangePrevDuplicate(tStylingRange) {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return (tStylingRange | 2 /* StylingRange.PREV_DUPLICATE */);\n}\nfunction getTStylingRangeNext(tStylingRange) {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return (tStylingRange & 131068 /* StylingRange.NEXT_MASK */) >> 2 /* StylingRange.NEXT_SHIFT */;\n}\nfunction setTStylingRangeNext(tStylingRange, next) {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n ngDevMode && assertNumberInRange(next, 0, 32767 /* StylingRange.UNSIGNED_MASK */);\n return ((tStylingRange & ~131068 /* StylingRange.NEXT_MASK */) | //\n next << 2 /* StylingRange.NEXT_SHIFT */);\n}\nfunction getTStylingRangeNextDuplicate(tStylingRange) {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return (tStylingRange & 1 /* StylingRange.NEXT_DUPLICATE */) ===\n 1 /* StylingRange.NEXT_DUPLICATE */;\n}\nfunction setTStylingRangeNextDuplicate(tStylingRange) {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return (tStylingRange | 1 /* StylingRange.NEXT_DUPLICATE */);\n}\nfunction getTStylingRangeTail(tStylingRange) {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n const next = getTStylingRangeNext(tStylingRange);\n return next === 0 ? getTStylingRangePrev(tStylingRange) : next;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * NOTE: The word `styling` is used interchangeably as style or class styling.\n *\n * This file contains code to link styling instructions together so that they can be replayed in\n * priority order. The file exists because Ivy styling instruction execution order does not match\n * that of the priority order. The purpose of this code is to create a linked list so that the\n * instructions can be traversed in priority order when computing the styles.\n *\n * Assume we are dealing with the following code:\n * ```\n * @Component({\n * template: `\n * <my-cmp [style]=\" {color: '#001'} \"\n * [style.color]=\" #002 \"\n * dir-style-color-1\n * dir-style-color-2> `\n * })\n * class ExampleComponent {\n * static ngComp = ... {\n * ...\n * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n * ɵɵstyleMap({color: '#001'});\n * ɵɵstyleProp('color', '#002');\n * ...\n * }\n * }\n *\n * @Directive({\n * selector: `[dir-style-color-1]',\n * })\n * class Style1Directive {\n * @HostBinding('style') style = {color: '#005'};\n * @HostBinding('style.color') color = '#006';\n *\n * static ngDir = ... {\n * ...\n * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n * ɵɵstyleMap({color: '#005'});\n * ɵɵstyleProp('color', '#006');\n * ...\n * }\n * }\n *\n * @Directive({\n * selector: `[dir-style-color-2]',\n * })\n * class Style2Directive {\n * @HostBinding('style') style = {color: '#007'};\n * @HostBinding('style.color') color = '#008';\n *\n * static ngDir = ... {\n * ...\n * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n * ɵɵstyleMap({color: '#007'});\n * ɵɵstyleProp('color', '#008');\n * ...\n * }\n * }\n *\n * @Directive({\n * selector: `my-cmp',\n * })\n * class MyComponent {\n * @HostBinding('style') style = {color: '#003'};\n * @HostBinding('style.color') color = '#004';\n *\n * static ngComp = ... {\n * ...\n * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n * ɵɵstyleMap({color: '#003'});\n * ɵɵstyleProp('color', '#004');\n * ...\n * }\n * }\n * ```\n *\n * The Order of instruction execution is:\n *\n * NOTE: the comment binding location is for illustrative purposes only.\n *\n * ```\n * // Template: (ExampleComponent)\n * ɵɵstyleMap({color: '#001'}); // Binding index: 10\n * ɵɵstyleProp('color', '#002'); // Binding index: 12\n * // MyComponent\n * ɵɵstyleMap({color: '#003'}); // Binding index: 20\n * ɵɵstyleProp('color', '#004'); // Binding index: 22\n * // Style1Directive\n * ɵɵstyleMap({color: '#005'}); // Binding index: 24\n * ɵɵstyleProp('color', '#006'); // Binding index: 26\n * // Style2Directive\n * ɵɵstyleMap({color: '#007'}); // Binding index: 28\n * ɵɵstyleProp('color', '#008'); // Binding index: 30\n * ```\n *\n * The correct priority order of concatenation is:\n *\n * ```\n * // MyComponent\n * ɵɵstyleMap({color: '#003'}); // Binding index: 20\n * ɵɵstyleProp('color', '#004'); // Binding index: 22\n * // Style1Directive\n * ɵɵstyleMap({color: '#005'}); // Binding index: 24\n * ɵɵstyleProp('color', '#006'); // Binding index: 26\n * // Style2Directive\n * ɵɵstyleMap({color: '#007'}); // Binding index: 28\n * ɵɵstyleProp('color', '#008'); // Binding index: 30\n * // Template: (ExampleComponent)\n * ɵɵstyleMap({color: '#001'}); // Binding index: 10\n * ɵɵstyleProp('color', '#002'); // Binding index: 12\n * ```\n *\n * What color should be rendered?\n *\n * Once the items are correctly sorted in the list, the answer is simply the last item in the\n * concatenation list which is `#002`.\n *\n * To do so we keep a linked list of all of the bindings which pertain to this element.\n * Notice that the bindings are inserted in the order of execution, but the `TView.data` allows\n * us to traverse them in the order of priority.\n *\n * |Idx|`TView.data`|`LView` | Notes\n * |---|------------|-----------------|--------------\n * |...| | |\n * |10 |`null` |`{color: '#001'}`| `ɵɵstyleMap('color', {color: '#001'})`\n * |11 |`30 | 12` | ... |\n * |12 |`color` |`'#002'` | `ɵɵstyleProp('color', '#002')`\n * |13 |`10 | 0` | ... |\n * |...| | |\n * |20 |`null` |`{color: '#003'}`| `ɵɵstyleMap('color', {color: '#003'})`\n * |21 |`0 | 22` | ... |\n * |22 |`color` |`'#004'` | `ɵɵstyleProp('color', '#004')`\n * |23 |`20 | 24` | ... |\n * |24 |`null` |`{color: '#005'}`| `ɵɵstyleMap('color', {color: '#005'})`\n * |25 |`22 | 26` | ... |\n * |26 |`color` |`'#006'` | `ɵɵstyleProp('color', '#006')`\n * |27 |`24 | 28` | ... |\n * |28 |`null` |`{color: '#007'}`| `ɵɵstyleMap('color', {color: '#007'})`\n * |29 |`26 | 30` | ... |\n * |30 |`color` |`'#008'` | `ɵɵstyleProp('color', '#008')`\n * |31 |`28 | 10` | ... |\n *\n * The above data structure allows us to re-concatenate the styling no matter which data binding\n * changes.\n *\n * NOTE: in addition to keeping track of next/previous index the `TView.data` also stores prev/next\n * duplicate bit. The duplicate bit if true says there either is a binding with the same name or\n * there is a map (which may contain the name). This information is useful in knowing if other\n * styles with higher priority need to be searched for overwrites.\n *\n * NOTE: See `should support example in 'tnode_linked_list.ts' documentation` in\n * `tnode_linked_list_spec.ts` for working example.\n */\nlet __unused_const_as_closure_does_not_like_standalone_comment_blocks__;\n/**\n * Insert new `tStyleValue` at `TData` and link existing style bindings such that we maintain linked\n * list of styles and compute the duplicate flag.\n *\n * Note: this function is executed during `firstUpdatePass` only to populate the `TView.data`.\n *\n * The function works by keeping track of `tStylingRange` which contains two pointers pointing to\n * the head/tail of the template portion of the styles.\n * - if `isHost === false` (we are template) then insertion is at tail of `TStylingRange`\n * - if `isHost === true` (we are host binding) then insertion is at head of `TStylingRange`\n *\n * @param tData The `TData` to insert into.\n * @param tNode `TNode` associated with the styling element.\n * @param tStylingKey See `TStylingKey`.\n * @param index location of where `tStyleValue` should be stored (and linked into list.)\n * @param isHostBinding `true` if the insertion is for a `hostBinding`. (insertion is in front of\n * template.)\n * @param isClassBinding True if the associated `tStylingKey` as a `class` styling.\n * `tNode.classBindings` should be used (or `tNode.styleBindings` otherwise.)\n */\nfunction insertTStylingBinding(tData, tNode, tStylingKeyWithStatic, index, isHostBinding, isClassBinding) {\n ngDevMode && assertFirstUpdatePass(getTView());\n let tBindings = isClassBinding ? tNode.classBindings : tNode.styleBindings;\n let tmplHead = getTStylingRangePrev(tBindings);\n let tmplTail = getTStylingRangeNext(tBindings);\n tData[index] = tStylingKeyWithStatic;\n let isKeyDuplicateOfStatic = false;\n let tStylingKey;\n if (Array.isArray(tStylingKeyWithStatic)) {\n // We are case when the `TStylingKey` contains static fields as well.\n const staticKeyValueArray = tStylingKeyWithStatic;\n tStylingKey = staticKeyValueArray[1]; // unwrap.\n // We need to check if our key is present in the static so that we can mark it as duplicate.\n if (tStylingKey === null ||\n keyValueArrayIndexOf(staticKeyValueArray, tStylingKey) > 0) {\n // tStylingKey is present in the statics, need to mark it as duplicate.\n isKeyDuplicateOfStatic = true;\n }\n }\n else {\n tStylingKey = tStylingKeyWithStatic;\n }\n if (isHostBinding) {\n // We are inserting host bindings\n // If we don't have template bindings then `tail` is 0.\n const hasTemplateBindings = tmplTail !== 0;\n // This is important to know because that means that the `head` can't point to the first\n // template bindings (there are none.) Instead the head points to the tail of the template.\n if (hasTemplateBindings) {\n // template head's \"prev\" will point to last host binding or to 0 if no host bindings yet\n const previousNode = getTStylingRangePrev(tData[tmplHead + 1]);\n tData[index + 1] = toTStylingRange(previousNode, tmplHead);\n // if a host binding has already been registered, we need to update the next of that host\n // binding to point to this one\n if (previousNode !== 0) {\n // We need to update the template-tail value to point to us.\n tData[previousNode + 1] =\n setTStylingRangeNext(tData[previousNode + 1], index);\n }\n // The \"previous\" of the template binding head should point to this host binding\n tData[tmplHead + 1] = setTStylingRangePrev(tData[tmplHead + 1], index);\n }\n else {\n tData[index + 1] = toTStylingRange(tmplHead, 0);\n // if a host binding has already been registered, we need to update the next of that host\n // binding to point to this one\n if (tmplHead !== 0) {\n // We need to update the template-tail value to point to us.\n tData[tmplHead + 1] = setTStylingRangeNext(tData[tmplHead + 1], index);\n }\n // if we don't have template, the head points to template-tail, and needs to be advanced.\n tmplHead = index;\n }\n }\n else {\n // We are inserting in template section.\n // We need to set this binding's \"previous\" to the current template tail\n tData[index + 1] = toTStylingRange(tmplTail, 0);\n ngDevMode &&\n assertEqual(tmplHead !== 0 && tmplTail === 0, false, 'Adding template bindings after hostBindings is not allowed.');\n if (tmplHead === 0) {\n tmplHead = index;\n }\n else {\n // We need to update the previous value \"next\" to point to this binding\n tData[tmplTail + 1] = setTStylingRangeNext(tData[tmplTail + 1], index);\n }\n tmplTail = index;\n }\n // Now we need to update / compute the duplicates.\n // Starting with our location search towards head (least priority)\n if (isKeyDuplicateOfStatic) {\n tData[index + 1] = setTStylingRangePrevDuplicate(tData[index + 1]);\n }\n markDuplicates(tData, tStylingKey, index, true, isClassBinding);\n markDuplicates(tData, tStylingKey, index, false, isClassBinding);\n markDuplicateOfResidualStyling(tNode, tStylingKey, tData, index, isClassBinding);\n tBindings = toTStylingRange(tmplHead, tmplTail);\n if (isClassBinding) {\n tNode.classBindings = tBindings;\n }\n else {\n tNode.styleBindings = tBindings;\n }\n}\n/**\n * Look into the residual styling to see if the current `tStylingKey` is duplicate of residual.\n *\n * @param tNode `TNode` where the residual is stored.\n * @param tStylingKey `TStylingKey` to store.\n * @param tData `TData` associated with the current `LView`.\n * @param index location of where `tStyleValue` should be stored (and linked into list.)\n * @param isClassBinding True if the associated `tStylingKey` as a `class` styling.\n * `tNode.classBindings` should be used (or `tNode.styleBindings` otherwise.)\n */\nfunction markDuplicateOfResidualStyling(tNode, tStylingKey, tData, index, isClassBinding) {\n const residual = isClassBinding ? tNode.residualClasses : tNode.residualStyles;\n if (residual != null /* or undefined */ && typeof tStylingKey == 'string' &&\n keyValueArrayIndexOf(residual, tStylingKey) >= 0) {\n // We have duplicate in the residual so mark ourselves as duplicate.\n tData[index + 1] = setTStylingRangeNextDuplicate(tData[index + 1]);\n }\n}\n/**\n * Marks `TStyleValue`s as duplicates if another style binding in the list has the same\n * `TStyleValue`.\n *\n * NOTE: this function is intended to be called twice once with `isPrevDir` set to `true` and once\n * with it set to `false` to search both the previous as well as next items in the list.\n *\n * No duplicate case\n * ```\n * [style.color]\n * [style.width.px] <<- index\n * [style.height.px]\n * ```\n *\n * In the above case adding `[style.width.px]` to the existing `[style.color]` produces no\n * duplicates because `width` is not found in any other part of the linked list.\n *\n * Duplicate case\n * ```\n * [style.color]\n * [style.width.em]\n * [style.width.px] <<- index\n * ```\n * In the above case adding `[style.width.px]` will produce a duplicate with `[style.width.em]`\n * because `width` is found in the chain.\n *\n * Map case 1\n * ```\n * [style.width.px]\n * [style.color]\n * [style] <<- index\n * ```\n * In the above case adding `[style]` will produce a duplicate with any other bindings because\n * `[style]` is a Map and as such is fully dynamic and could produce `color` or `width`.\n *\n * Map case 2\n * ```\n * [style]\n * [style.width.px]\n * [style.color] <<- index\n * ```\n * In the above case adding `[style.color]` will produce a duplicate because there is already a\n * `[style]` binding which is a Map and as such is fully dynamic and could produce `color` or\n * `width`.\n *\n * NOTE: Once `[style]` (Map) is added into the system all things are mapped as duplicates.\n * NOTE: We use `style` as example, but same logic is applied to `class`es as well.\n *\n * @param tData `TData` where the linked list is stored.\n * @param tStylingKey `TStylingKeyPrimitive` which contains the value to compare to other keys in\n * the linked list.\n * @param index Starting location in the linked list to search from\n * @param isPrevDir Direction.\n * - `true` for previous (lower priority);\n * - `false` for next (higher priority).\n */\nfunction markDuplicates(tData, tStylingKey, index, isPrevDir, isClassBinding) {\n const tStylingAtIndex = tData[index + 1];\n const isMap = tStylingKey === null;\n let cursor = isPrevDir ? getTStylingRangePrev(tStylingAtIndex) : getTStylingRangeNext(tStylingAtIndex);\n let foundDuplicate = false;\n // We keep iterating as long as we have a cursor\n // AND either:\n // - we found what we are looking for, OR\n // - we are a map in which case we have to continue searching even after we find what we were\n // looking for since we are a wild card and everything needs to be flipped to duplicate.\n while (cursor !== 0 && (foundDuplicate === false || isMap)) {\n ngDevMode && assertIndexInRange(tData, cursor);\n const tStylingValueAtCursor = tData[cursor];\n const tStyleRangeAtCursor = tData[cursor + 1];\n if (isStylingMatch(tStylingValueAtCursor, tStylingKey)) {\n foundDuplicate = true;\n tData[cursor + 1] = isPrevDir ? setTStylingRangeNextDuplicate(tStyleRangeAtCursor) :\n setTStylingRangePrevDuplicate(tStyleRangeAtCursor);\n }\n cursor = isPrevDir ? getTStylingRangePrev(tStyleRangeAtCursor) :\n getTStylingRangeNext(tStyleRangeAtCursor);\n }\n if (foundDuplicate) {\n // if we found a duplicate, than mark ourselves.\n tData[index + 1] = isPrevDir ? setTStylingRangePrevDuplicate(tStylingAtIndex) :\n setTStylingRangeNextDuplicate(tStylingAtIndex);\n }\n}\n/**\n * Determines if two `TStylingKey`s are a match.\n *\n * When computing whether a binding contains a duplicate, we need to compare if the instruction\n * `TStylingKey` has a match.\n *\n * Here are examples of `TStylingKey`s which match given `tStylingKeyCursor` is:\n * - `color`\n * - `color` // Match another color\n * - `null` // That means that `tStylingKey` is a `classMap`/`styleMap` instruction\n * - `['', 'color', 'other', true]` // wrapped `color` so match\n * - `['', null, 'other', true]` // wrapped `null` so match\n * - `['', 'width', 'color', 'value']` // wrapped static value contains a match on `'color'`\n * - `null` // `tStylingKeyCursor` always match as it is `classMap`/`styleMap` instruction\n *\n * @param tStylingKeyCursor\n * @param tStylingKey\n */\nfunction isStylingMatch(tStylingKeyCursor, tStylingKey) {\n ngDevMode &&\n assertNotEqual(Array.isArray(tStylingKey), true, 'Expected that \\'tStylingKey\\' has been unwrapped');\n if (tStylingKeyCursor === null || // If the cursor is `null` it means that we have map at that\n // location so we must assume that we have a match.\n tStylingKey == null || // If `tStylingKey` is `null` then it is a map therefor assume that it\n // contains a match.\n (Array.isArray(tStylingKeyCursor) ? tStylingKeyCursor[1] : tStylingKeyCursor) ===\n tStylingKey // If the keys match explicitly than we are a match.\n ) {\n return true;\n }\n else if (Array.isArray(tStylingKeyCursor) && typeof tStylingKey === 'string') {\n // if we did not find a match, but `tStylingKeyCursor` is `KeyValueArray` that means cursor has\n // statics and we need to check those as well.\n return keyValueArrayIndexOf(tStylingKeyCursor, tStylingKey) >=\n 0; // see if we are matching the key\n }\n return false;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Global state of the parser. (This makes parser non-reentrant, but that is not an issue)\nconst parserState = {\n textEnd: 0,\n key: 0,\n keyEnd: 0,\n value: 0,\n valueEnd: 0,\n};\n/**\n * Retrieves the last parsed `key` of style.\n * @param text the text to substring the key from.\n */\nfunction getLastParsedKey(text) {\n return text.substring(parserState.key, parserState.keyEnd);\n}\n/**\n * Retrieves the last parsed `value` of style.\n * @param text the text to substring the key from.\n */\nfunction getLastParsedValue(text) {\n return text.substring(parserState.value, parserState.valueEnd);\n}\n/**\n * Initializes `className` string for parsing and parses the first token.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {\n * const key = getLastParsedKey();\n * ...\n * }\n * ```\n * @param text `className` to parse\n * @returns index where the next invocation of `parseClassNameNext` should resume.\n */\nfunction parseClassName(text) {\n resetParserState(text);\n return parseClassNameNext(text, consumeWhitespace(text, 0, parserState.textEnd));\n}\n/**\n * Parses next `className` token.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {\n * const key = getLastParsedKey();\n * ...\n * }\n * ```\n *\n * @param text `className` to parse\n * @param index where the parsing should resume.\n * @returns index where the next invocation of `parseClassNameNext` should resume.\n */\nfunction parseClassNameNext(text, index) {\n const end = parserState.textEnd;\n if (end === index) {\n return -1;\n }\n index = parserState.keyEnd = consumeClassToken(text, parserState.key = index, end);\n return consumeWhitespace(text, index, end);\n}\n/**\n * Initializes `cssText` string for parsing and parses the first key/values.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i))) {\n * const key = getLastParsedKey();\n * const value = getLastParsedValue();\n * ...\n * }\n * ```\n * @param text `cssText` to parse\n * @returns index where the next invocation of `parseStyleNext` should resume.\n */\nfunction parseStyle(text) {\n resetParserState(text);\n return parseStyleNext(text, consumeWhitespace(text, 0, parserState.textEnd));\n}\n/**\n * Parses the next `cssText` key/values.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i))) {\n * const key = getLastParsedKey();\n * const value = getLastParsedValue();\n * ...\n * }\n *\n * @param text `cssText` to parse\n * @param index where the parsing should resume.\n * @returns index where the next invocation of `parseStyleNext` should resume.\n */\nfunction parseStyleNext(text, startIndex) {\n const end = parserState.textEnd;\n let index = parserState.key = consumeWhitespace(text, startIndex, end);\n if (end === index) {\n // we reached an end so just quit\n return -1;\n }\n index = parserState.keyEnd = consumeStyleKey(text, index, end);\n index = consumeSeparator(text, index, end, 58 /* CharCode.COLON */);\n index = parserState.value = consumeWhitespace(text, index, end);\n index = parserState.valueEnd = consumeStyleValue(text, index, end);\n return consumeSeparator(text, index, end, 59 /* CharCode.SEMI_COLON */);\n}\n/**\n * Reset the global state of the styling parser.\n * @param text The styling text to parse.\n */\nfunction resetParserState(text) {\n parserState.key = 0;\n parserState.keyEnd = 0;\n parserState.value = 0;\n parserState.valueEnd = 0;\n parserState.textEnd = text.length;\n}\n/**\n * Returns index of next non-whitespace character.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index of next non-whitespace character (May be the same as `start` if no whitespace at\n * that location.)\n */\nfunction consumeWhitespace(text, startIndex, endIndex) {\n while (startIndex < endIndex && text.charCodeAt(startIndex) <= 32 /* CharCode.SPACE */) {\n startIndex++;\n }\n return startIndex;\n}\n/**\n * Returns index of last char in class token.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after last char in class token.\n */\nfunction consumeClassToken(text, startIndex, endIndex) {\n while (startIndex < endIndex && text.charCodeAt(startIndex) > 32 /* CharCode.SPACE */) {\n startIndex++;\n }\n return startIndex;\n}\n/**\n * Consumes all of the characters belonging to style key and token.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after last style key character.\n */\nfunction consumeStyleKey(text, startIndex, endIndex) {\n let ch;\n while (startIndex < endIndex &&\n ((ch = text.charCodeAt(startIndex)) === 45 /* CharCode.DASH */ || ch === 95 /* CharCode.UNDERSCORE */ ||\n ((ch & -33 /* CharCode.UPPER_CASE */) >= 65 /* CharCode.A */ && (ch & -33 /* CharCode.UPPER_CASE */) <= 90 /* CharCode.Z */) ||\n (ch >= 48 /* CharCode.ZERO */ && ch <= 57 /* CharCode.NINE */))) {\n startIndex++;\n }\n return startIndex;\n}\n/**\n * Consumes all whitespace and the separator `:` after the style key.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after separator and surrounding whitespace.\n */\nfunction consumeSeparator(text, startIndex, endIndex, separator) {\n startIndex = consumeWhitespace(text, startIndex, endIndex);\n if (startIndex < endIndex) {\n if (ngDevMode && text.charCodeAt(startIndex) !== separator) {\n malformedStyleError(text, String.fromCharCode(separator), startIndex);\n }\n startIndex++;\n }\n return startIndex;\n}\n/**\n * Consumes style value honoring `url()` and `\"\"` text.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after last style value character.\n */\nfunction consumeStyleValue(text, startIndex, endIndex) {\n let ch1 = -1; // 1st previous character\n let ch2 = -1; // 2nd previous character\n let ch3 = -1; // 3rd previous character\n let i = startIndex;\n let lastChIndex = i;\n while (i < endIndex) {\n const ch = text.charCodeAt(i++);\n if (ch === 59 /* CharCode.SEMI_COLON */) {\n return lastChIndex;\n }\n else if (ch === 34 /* CharCode.DOUBLE_QUOTE */ || ch === 39 /* CharCode.SINGLE_QUOTE */) {\n lastChIndex = i = consumeQuotedText(text, ch, i, endIndex);\n }\n else if (startIndex ===\n i - 4 && // We have seen only 4 characters so far \"URL(\" (Ignore \"foo_URL()\")\n ch3 === 85 /* CharCode.U */ &&\n ch2 === 82 /* CharCode.R */ && ch1 === 76 /* CharCode.L */ && ch === 40 /* CharCode.OPEN_PAREN */) {\n lastChIndex = i = consumeQuotedText(text, 41 /* CharCode.CLOSE_PAREN */, i, endIndex);\n }\n else if (ch > 32 /* CharCode.SPACE */) {\n // if we have a non-whitespace character then capture its location\n lastChIndex = i;\n }\n ch3 = ch2;\n ch2 = ch1;\n ch1 = ch & -33 /* CharCode.UPPER_CASE */;\n }\n return lastChIndex;\n}\n/**\n * Consumes all of the quoted characters.\n *\n * @param text Text to scan\n * @param quoteCharCode CharCode of either `\"` or `'` quote or `)` for `url(...)`.\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after quoted characters.\n */\nfunction consumeQuotedText(text, quoteCharCode, startIndex, endIndex) {\n let ch1 = -1; // 1st previous character\n let index = startIndex;\n while (index < endIndex) {\n const ch = text.charCodeAt(index++);\n if (ch == quoteCharCode && ch1 !== 92 /* CharCode.BACK_SLASH */) {\n return index;\n }\n if (ch == 92 /* CharCode.BACK_SLASH */ && ch1 === 92 /* CharCode.BACK_SLASH */) {\n // two back slashes cancel each other out. For example `\"\\\\\"` should properly end the\n // quotation. (It should not assume that the last `\"` is escaped.)\n ch1 = 0;\n }\n else {\n ch1 = ch;\n }\n }\n throw ngDevMode ? malformedStyleError(text, String.fromCharCode(quoteCharCode), endIndex) :\n new Error();\n}\nfunction malformedStyleError(text, expecting, index) {\n ngDevMode && assertEqual(typeof text === 'string', true, 'String expected here');\n throw throwError(`Malformed style at location ${index} in string '` + text.substring(0, index) + '[>>' +\n text.substring(index, index + 1) + '<<]' + text.slice(index + 1) +\n `'. Expecting '${expecting}'.`);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Update a style binding on an element with the provided value.\n *\n * If the style value is falsy then it will be removed from the element\n * (or assigned a different value depending if there are any styles placed\n * on the element with `styleMap` or any static styles that are\n * present from when the element was created with `styling`).\n *\n * Note that the styling element is updated as part of `stylingApply`.\n *\n * @param prop A valid CSS property.\n * @param value New value to write (`null` or an empty string to remove).\n * @param suffix Optional suffix. Used with scalar values to add unit such as `px`.\n *\n * Note that this will apply the provided style value to the host element if this function is called\n * within a host binding function.\n *\n * @codeGenApi\n */\nfunction ɵɵstyleProp(prop, value, suffix) {\n checkStylingProperty(prop, value, suffix, false);\n return ɵɵstyleProp;\n}\n/**\n * Update a class binding on an element with the provided value.\n *\n * This instruction is meant to handle the `[class.foo]=\"exp\"` case and,\n * therefore, the class binding itself must already be allocated using\n * `styling` within the creation block.\n *\n * @param prop A valid CSS class (only one).\n * @param value A true/false value which will turn the class on or off.\n *\n * Note that this will apply the provided class value to the host element if this function\n * is called within a host binding function.\n *\n * @codeGenApi\n */\nfunction ɵɵclassProp(className, value) {\n checkStylingProperty(className, value, null, true);\n return ɵɵclassProp;\n}\n/**\n * Update style bindings using an object literal on an element.\n *\n * This instruction is meant to apply styling via the `[style]=\"exp\"` template bindings.\n * When styles are applied to the element they will then be updated with respect to\n * any styles/classes set via `styleProp`. If any styles are set to falsy\n * then they will be removed from the element.\n *\n * Note that the styling instruction will not be applied until `stylingApply` is called.\n *\n * @param styles A key/value style map of the styles that will be applied to the given element.\n * Any missing styles (that have already been applied to the element beforehand) will be\n * removed (unset) from the element's styling.\n *\n * Note that this will apply the provided styleMap value to the host element if this function\n * is called within a host binding.\n *\n * @codeGenApi\n */\nfunction ɵɵstyleMap(styles) {\n checkStylingMap(styleKeyValueArraySet, styleStringParser, styles, false);\n}\n/**\n * Parse text as style and add values to KeyValueArray.\n *\n * This code is pulled out to a separate function so that it can be tree shaken away if it is not\n * needed. It is only referenced from `ɵɵstyleMap`.\n *\n * @param keyValueArray KeyValueArray to add parsed values to.\n * @param text text to parse.\n */\nfunction styleStringParser(keyValueArray, text) {\n for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i)) {\n styleKeyValueArraySet(keyValueArray, getLastParsedKey(text), getLastParsedValue(text));\n }\n}\n/**\n * Update class bindings using an object literal or class-string on an element.\n *\n * This instruction is meant to apply styling via the `[class]=\"exp\"` template bindings.\n * When classes are applied to the element they will then be updated with\n * respect to any styles/classes set via `classProp`. If any\n * classes are set to falsy then they will be removed from the element.\n *\n * Note that the styling instruction will not be applied until `stylingApply` is called.\n * Note that this will the provided classMap value to the host element if this function is called\n * within a host binding.\n *\n * @param classes A key/value map or string of CSS classes that will be added to the\n * given element. Any missing classes (that have already been applied to the element\n * beforehand) will be removed (unset) from the element's list of CSS classes.\n *\n * @codeGenApi\n */\nfunction ɵɵclassMap(classes) {\n checkStylingMap(keyValueArraySet, classStringParser, classes, true);\n}\n/**\n * Parse text as class and add values to KeyValueArray.\n *\n * This code is pulled out to a separate function so that it can be tree shaken away if it is not\n * needed. It is only referenced from `ɵɵclassMap`.\n *\n * @param keyValueArray KeyValueArray to add parsed values to.\n * @param text text to parse.\n */\nfunction classStringParser(keyValueArray, text) {\n for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {\n keyValueArraySet(keyValueArray, getLastParsedKey(text), true);\n }\n}\n/**\n * Common code between `ɵɵclassProp` and `ɵɵstyleProp`.\n *\n * @param prop property name.\n * @param value binding value.\n * @param suffix suffix for the property (e.g. `em` or `px`)\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\nfunction checkStylingProperty(prop, value, suffix, isClassBased) {\n const lView = getLView();\n const tView = getTView();\n // Styling instructions use 2 slots per binding.\n // 1. one for the value / TStylingKey\n // 2. one for the intermittent-value / TStylingRange\n const bindingIndex = incrementBindingIndex(2);\n if (tView.firstUpdatePass) {\n stylingFirstUpdatePass(tView, prop, bindingIndex, isClassBased);\n }\n if (value !== NO_CHANGE && bindingUpdated(lView, bindingIndex, value)) {\n const tNode = tView.data[getSelectedIndex()];\n updateStyling(tView, tNode, lView, lView[RENDERER], prop, lView[bindingIndex + 1] = normalizeSuffix(value, suffix), isClassBased, bindingIndex);\n }\n}\n/**\n * Common code between `ɵɵclassMap` and `ɵɵstyleMap`.\n *\n * @param keyValueArraySet (See `keyValueArraySet` in \"util/array_utils\") Gets passed in as a\n * function so that `style` can be processed. This is done for tree shaking purposes.\n * @param stringParser Parser used to parse `value` if `string`. (Passed in as `style` and `class`\n * have different parsers.)\n * @param value bound value from application\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\nfunction checkStylingMap(keyValueArraySet, stringParser, value, isClassBased) {\n const tView = getTView();\n const bindingIndex = incrementBindingIndex(2);\n if (tView.firstUpdatePass) {\n stylingFirstUpdatePass(tView, null, bindingIndex, isClassBased);\n }\n const lView = getLView();\n if (value !== NO_CHANGE && bindingUpdated(lView, bindingIndex, value)) {\n // `getSelectedIndex()` should be here (rather than in instruction) so that it is guarded by the\n // if so as not to read unnecessarily.\n const tNode = tView.data[getSelectedIndex()];\n if (hasStylingInputShadow(tNode, isClassBased) && !isInHostBindings(tView, bindingIndex)) {\n if (ngDevMode) {\n // verify that if we are shadowing then `TData` is appropriately marked so that we skip\n // processing this binding in styling resolution.\n const tStylingKey = tView.data[bindingIndex];\n assertEqual(Array.isArray(tStylingKey) ? tStylingKey[1] : tStylingKey, false, 'Styling linked list shadow input should be marked as \\'false\\'');\n }\n // VE does not concatenate the static portion like we are doing here.\n // Instead VE just ignores the static completely if dynamic binding is present.\n // Because of locality we have already set the static portion because we don't know if there\n // is a dynamic portion until later. If we would ignore the static portion it would look like\n // the binding has removed it. This would confuse `[ngStyle]`/`[ngClass]` to do the wrong\n // thing as it would think that the static portion was removed. For this reason we\n // concatenate it so that `[ngStyle]`/`[ngClass]` can continue to work on changed.\n let staticPrefix = isClassBased ? tNode.classesWithoutHost : tNode.stylesWithoutHost;\n ngDevMode && isClassBased === false && staticPrefix !== null &&\n assertEqual(staticPrefix.endsWith(';'), true, 'Expecting static portion to end with \\';\\'');\n if (staticPrefix !== null) {\n // We want to make sure that falsy values of `value` become empty strings.\n value = concatStringsWithSpace(staticPrefix, value ? value : '');\n }\n // Given `<div [style] my-dir>` such that `my-dir` has `@Input('style')`.\n // This takes over the `[style]` binding. (Same for `[class]`)\n setDirectiveInputsWhichShadowsStyling(tView, tNode, lView, value, isClassBased);\n }\n else {\n updateStylingMap(tView, tNode, lView, lView[RENDERER], lView[bindingIndex + 1], lView[bindingIndex + 1] = toStylingKeyValueArray(keyValueArraySet, stringParser, value), isClassBased, bindingIndex);\n }\n }\n}\n/**\n * Determines when the binding is in `hostBindings` section\n *\n * @param tView Current `TView`\n * @param bindingIndex index of binding which we would like if it is in `hostBindings`\n */\nfunction isInHostBindings(tView, bindingIndex) {\n // All host bindings are placed after the expando section.\n return bindingIndex >= tView.expandoStartIndex;\n}\n/**\n * Collects the necessary information to insert the binding into a linked list of style bindings\n * using `insertTStylingBinding`.\n *\n * @param tView `TView` where the binding linked list will be stored.\n * @param tStylingKey Property/key of the binding.\n * @param bindingIndex Index of binding associated with the `prop`\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\nfunction stylingFirstUpdatePass(tView, tStylingKey, bindingIndex, isClassBased) {\n ngDevMode && assertFirstUpdatePass(tView);\n const tData = tView.data;\n if (tData[bindingIndex + 1] === null) {\n // The above check is necessary because we don't clear first update pass until first successful\n // (no exception) template execution. This prevents the styling instruction from double adding\n // itself to the list.\n // `getSelectedIndex()` should be here (rather than in instruction) so that it is guarded by the\n // if so as not to read unnecessarily.\n const tNode = tData[getSelectedIndex()];\n ngDevMode && assertDefined(tNode, 'TNode expected');\n const isHostBindings = isInHostBindings(tView, bindingIndex);\n if (hasStylingInputShadow(tNode, isClassBased) && tStylingKey === null && !isHostBindings) {\n // `tStylingKey === null` implies that we are either `[style]` or `[class]` binding.\n // If there is a directive which uses `@Input('style')` or `@Input('class')` than\n // we need to neutralize this binding since that directive is shadowing it.\n // We turn this into a noop by setting the key to `false`\n tStylingKey = false;\n }\n tStylingKey = wrapInStaticStylingKey(tData, tNode, tStylingKey, isClassBased);\n insertTStylingBinding(tData, tNode, tStylingKey, bindingIndex, isHostBindings, isClassBased);\n }\n}\n/**\n * Adds static styling information to the binding if applicable.\n *\n * The linked list of styles not only stores the list and keys, but also stores static styling\n * information on some of the keys. This function determines if the key should contain the styling\n * information and computes it.\n *\n * See `TStylingStatic` for more details.\n *\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param stylingKey `TStylingKeyPrimitive` which may need to be wrapped into `TStylingKey`\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction wrapInStaticStylingKey(tData, tNode, stylingKey, isClassBased) {\n const hostDirectiveDef = getCurrentDirectiveDef(tData);\n let residual = isClassBased ? tNode.residualClasses : tNode.residualStyles;\n if (hostDirectiveDef === null) {\n // We are in template node.\n // If template node already had styling instruction then it has already collected the static\n // styling and there is no need to collect them again. We know that we are the first styling\n // instruction because the `TNode.*Bindings` points to 0 (nothing has been inserted yet).\n const isFirstStylingInstructionInTemplate = (isClassBased ? tNode.classBindings : tNode.styleBindings) === 0;\n if (isFirstStylingInstructionInTemplate) {\n // It would be nice to be able to get the statics from `mergeAttrs`, however, at this point\n // they are already merged and it would not be possible to figure which property belongs where\n // in the priority.\n stylingKey = collectStylingFromDirectives(null, tData, tNode, stylingKey, isClassBased);\n stylingKey = collectStylingFromTAttrs(stylingKey, tNode.attrs, isClassBased);\n // We know that if we have styling binding in template we can't have residual.\n residual = null;\n }\n }\n else {\n // We are in host binding node and there was no binding instruction in template node.\n // This means that we need to compute the residual.\n const directiveStylingLast = tNode.directiveStylingLast;\n const isFirstStylingInstructionInHostBinding = directiveStylingLast === -1 || tData[directiveStylingLast] !== hostDirectiveDef;\n if (isFirstStylingInstructionInHostBinding) {\n stylingKey =\n collectStylingFromDirectives(hostDirectiveDef, tData, tNode, stylingKey, isClassBased);\n if (residual === null) {\n // - If `null` than either:\n // - Template styling instruction already ran and it has consumed the static\n // styling into its `TStylingKey` and so there is no need to update residual. Instead\n // we need to update the `TStylingKey` associated with the first template node\n // instruction. OR\n // - Some other styling instruction ran and determined that there are no residuals\n let templateStylingKey = getTemplateHeadTStylingKey(tData, tNode, isClassBased);\n if (templateStylingKey !== undefined && Array.isArray(templateStylingKey)) {\n // Only recompute if `templateStylingKey` had static values. (If no static value found\n // then there is nothing to do since this operation can only produce less static keys, not\n // more.)\n templateStylingKey = collectStylingFromDirectives(null, tData, tNode, templateStylingKey[1] /* unwrap previous statics */, isClassBased);\n templateStylingKey =\n collectStylingFromTAttrs(templateStylingKey, tNode.attrs, isClassBased);\n setTemplateHeadTStylingKey(tData, tNode, isClassBased, templateStylingKey);\n }\n }\n else {\n // We only need to recompute residual if it is not `null`.\n // - If existing residual (implies there was no template styling). This means that some of\n // the statics may have moved from the residual to the `stylingKey` and so we have to\n // recompute.\n // - If `undefined` this is the first time we are running.\n residual = collectResidual(tData, tNode, isClassBased);\n }\n }\n }\n if (residual !== undefined) {\n isClassBased ? (tNode.residualClasses = residual) : (tNode.residualStyles = residual);\n }\n return stylingKey;\n}\n/**\n * Retrieve the `TStylingKey` for the template styling instruction.\n *\n * This is needed since `hostBinding` styling instructions are inserted after the template\n * instruction. While the template instruction needs to update the residual in `TNode` the\n * `hostBinding` instructions need to update the `TStylingKey` of the template instruction because\n * the template instruction is downstream from the `hostBindings` instructions.\n *\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @return `TStylingKey` if found or `undefined` if not found.\n */\nfunction getTemplateHeadTStylingKey(tData, tNode, isClassBased) {\n const bindings = isClassBased ? tNode.classBindings : tNode.styleBindings;\n if (getTStylingRangeNext(bindings) === 0) {\n // There does not seem to be a styling instruction in the `template`.\n return undefined;\n }\n return tData[getTStylingRangePrev(bindings)];\n}\n/**\n * Update the `TStylingKey` of the first template instruction in `TNode`.\n *\n * Logically `hostBindings` styling instructions are of lower priority than that of the template.\n * However, they execute after the template styling instructions. This means that they get inserted\n * in front of the template styling instructions.\n *\n * If we have a template styling instruction and a new `hostBindings` styling instruction is\n * executed it means that it may need to steal static fields from the template instruction. This\n * method allows us to update the first template instruction `TStylingKey` with a new value.\n *\n * Assume:\n * ```\n * <div my-dir style=\"color: red\" [style.color]=\"tmplExp\"></div>\n *\n * @Directive({\n * host: {\n * 'style': 'width: 100px',\n * '[style.color]': 'dirExp',\n * }\n * })\n * class MyDir {}\n * ```\n *\n * when `[style.color]=\"tmplExp\"` executes it creates this data structure.\n * ```\n * ['', 'color', 'color', 'red', 'width', '100px'],\n * ```\n *\n * The reason for this is that the template instruction does not know if there are styling\n * instructions and must assume that there are none and must collect all of the static styling.\n * (both\n * `color' and 'width`)\n *\n * When `'[style.color]': 'dirExp',` executes we need to insert a new data into the linked list.\n * ```\n * ['', 'color', 'width', '100px'], // newly inserted\n * ['', 'color', 'color', 'red', 'width', '100px'], // this is wrong\n * ```\n *\n * Notice that the template statics is now wrong as it incorrectly contains `width` so we need to\n * update it like so:\n * ```\n * ['', 'color', 'width', '100px'],\n * ['', 'color', 'color', 'red'], // UPDATE\n * ```\n *\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @param tStylingKey New `TStylingKey` which is replacing the old one.\n */\nfunction setTemplateHeadTStylingKey(tData, tNode, isClassBased, tStylingKey) {\n const bindings = isClassBased ? tNode.classBindings : tNode.styleBindings;\n ngDevMode &&\n assertNotEqual(getTStylingRangeNext(bindings), 0, 'Expecting to have at least one template styling binding.');\n tData[getTStylingRangePrev(bindings)] = tStylingKey;\n}\n/**\n * Collect all static values after the current `TNode.directiveStylingLast` index.\n *\n * Collect the remaining styling information which has not yet been collected by an existing\n * styling instruction.\n *\n * @param tData `TData` where the `DirectiveDefs` are stored.\n * @param tNode `TNode` which contains the directive range.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction collectResidual(tData, tNode, isClassBased) {\n let residual = undefined;\n const directiveEnd = tNode.directiveEnd;\n ngDevMode &&\n assertNotEqual(tNode.directiveStylingLast, -1, 'By the time this function gets called at least one hostBindings-node styling instruction must have executed.');\n // We add `1 + tNode.directiveStart` because we need to skip the current directive (as we are\n // collecting things after the last `hostBindings` directive which had a styling instruction.)\n for (let i = 1 + tNode.directiveStylingLast; i < directiveEnd; i++) {\n const attrs = tData[i].hostAttrs;\n residual = collectStylingFromTAttrs(residual, attrs, isClassBased);\n }\n return collectStylingFromTAttrs(residual, tNode.attrs, isClassBased);\n}\n/**\n * Collect the static styling information with lower priority than `hostDirectiveDef`.\n *\n * (This is opposite of residual styling.)\n *\n * @param hostDirectiveDef `DirectiveDef` for which we want to collect lower priority static\n * styling. (Or `null` if template styling)\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param stylingKey Existing `TStylingKey` to update or wrap.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction collectStylingFromDirectives(hostDirectiveDef, tData, tNode, stylingKey, isClassBased) {\n // We need to loop because there can be directives which have `hostAttrs` but don't have\n // `hostBindings` so this loop catches up to the current directive..\n let currentDirective = null;\n const directiveEnd = tNode.directiveEnd;\n let directiveStylingLast = tNode.directiveStylingLast;\n if (directiveStylingLast === -1) {\n directiveStylingLast = tNode.directiveStart;\n }\n else {\n directiveStylingLast++;\n }\n while (directiveStylingLast < directiveEnd) {\n currentDirective = tData[directiveStylingLast];\n ngDevMode && assertDefined(currentDirective, 'expected to be defined');\n stylingKey = collectStylingFromTAttrs(stylingKey, currentDirective.hostAttrs, isClassBased);\n if (currentDirective === hostDirectiveDef)\n break;\n directiveStylingLast++;\n }\n if (hostDirectiveDef !== null) {\n // we only advance the styling cursor if we are collecting data from host bindings.\n // Template executes before host bindings and so if we would update the index,\n // host bindings would not get their statics.\n tNode.directiveStylingLast = directiveStylingLast;\n }\n return stylingKey;\n}\n/**\n * Convert `TAttrs` into `TStylingStatic`.\n *\n * @param stylingKey existing `TStylingKey` to update or wrap.\n * @param attrs `TAttributes` to process.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction collectStylingFromTAttrs(stylingKey, attrs, isClassBased) {\n const desiredMarker = isClassBased ? 1 /* AttributeMarker.Classes */ : 2 /* AttributeMarker.Styles */;\n let currentMarker = -1 /* AttributeMarker.ImplicitAttributes */;\n if (attrs !== null) {\n for (let i = 0; i < attrs.length; i++) {\n const item = attrs[i];\n if (typeof item === 'number') {\n currentMarker = item;\n }\n else {\n if (currentMarker === desiredMarker) {\n if (!Array.isArray(stylingKey)) {\n stylingKey = stylingKey === undefined ? [] : ['', stylingKey];\n }\n keyValueArraySet(stylingKey, item, isClassBased ? true : attrs[++i]);\n }\n }\n }\n }\n return stylingKey === undefined ? null : stylingKey;\n}\n/**\n * Convert user input to `KeyValueArray`.\n *\n * This function takes user input which could be `string`, Object literal, or iterable and converts\n * it into a consistent representation. The output of this is `KeyValueArray` (which is an array\n * where\n * even indexes contain keys and odd indexes contain values for those keys).\n *\n * The advantage of converting to `KeyValueArray` is that we can perform diff in an input\n * independent\n * way.\n * (ie we can compare `foo bar` to `['bar', 'baz'] and determine a set of changes which need to be\n * applied)\n *\n * The fact that `KeyValueArray` is sorted is very important because it allows us to compute the\n * difference in linear fashion without the need to allocate any additional data.\n *\n * For example if we kept this as a `Map` we would have to iterate over previous `Map` to determine\n * which values need to be deleted, over the new `Map` to determine additions, and we would have to\n * keep additional `Map` to keep track of duplicates or items which have not yet been visited.\n *\n * @param keyValueArraySet (See `keyValueArraySet` in \"util/array_utils\") Gets passed in as a\n * function so that `style` can be processed. This is done\n * for tree shaking purposes.\n * @param stringParser The parser is passed in so that it will be tree shakable. See\n * `styleStringParser` and `classStringParser`\n * @param value The value to parse/convert to `KeyValueArray`\n */\nfunction toStylingKeyValueArray(keyValueArraySet, stringParser, value) {\n if (value == null /*|| value === undefined */ || value === '')\n return EMPTY_ARRAY;\n const styleKeyValueArray = [];\n const unwrappedValue = unwrapSafeValue(value);\n if (Array.isArray(unwrappedValue)) {\n for (let i = 0; i < unwrappedValue.length; i++) {\n keyValueArraySet(styleKeyValueArray, unwrappedValue[i], true);\n }\n }\n else if (typeof unwrappedValue === 'object') {\n for (const key in unwrappedValue) {\n if (unwrappedValue.hasOwnProperty(key)) {\n keyValueArraySet(styleKeyValueArray, key, unwrappedValue[key]);\n }\n }\n }\n else if (typeof unwrappedValue === 'string') {\n stringParser(styleKeyValueArray, unwrappedValue);\n }\n else {\n ngDevMode &&\n throwError('Unsupported styling type ' + typeof unwrappedValue + ': ' + unwrappedValue);\n }\n return styleKeyValueArray;\n}\n/**\n * Set a `value` for a `key`.\n *\n * See: `keyValueArraySet` for details\n *\n * @param keyValueArray KeyValueArray to add to.\n * @param key Style key to add.\n * @param value The value to set.\n */\nfunction styleKeyValueArraySet(keyValueArray, key, value) {\n keyValueArraySet(keyValueArray, key, unwrapSafeValue(value));\n}\n/**\n * Update map based styling.\n *\n * Map based styling could be anything which contains more than one binding. For example `string`,\n * or object literal. Dealing with all of these types would complicate the logic so\n * instead this function expects that the complex input is first converted into normalized\n * `KeyValueArray`. The advantage of normalization is that we get the values sorted, which makes it\n * very cheap to compute deltas between the previous and current value.\n *\n * @param tView Associated `TView.data` contains the linked list of binding priorities.\n * @param tNode `TNode` where the binding is located.\n * @param lView `LView` contains the values associated with other styling binding at this `TNode`.\n * @param renderer Renderer to use if any updates.\n * @param oldKeyValueArray Previous value represented as `KeyValueArray`\n * @param newKeyValueArray Current value represented as `KeyValueArray`\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @param bindingIndex Binding index of the binding.\n */\nfunction updateStylingMap(tView, tNode, lView, renderer, oldKeyValueArray, newKeyValueArray, isClassBased, bindingIndex) {\n if (oldKeyValueArray === NO_CHANGE) {\n // On first execution the oldKeyValueArray is NO_CHANGE => treat it as empty KeyValueArray.\n oldKeyValueArray = EMPTY_ARRAY;\n }\n let oldIndex = 0;\n let newIndex = 0;\n let oldKey = 0 < oldKeyValueArray.length ? oldKeyValueArray[0] : null;\n let newKey = 0 < newKeyValueArray.length ? newKeyValueArray[0] : null;\n while (oldKey !== null || newKey !== null) {\n ngDevMode && assertLessThan(oldIndex, 999, 'Are we stuck in infinite loop?');\n ngDevMode && assertLessThan(newIndex, 999, 'Are we stuck in infinite loop?');\n const oldValue = oldIndex < oldKeyValueArray.length ? oldKeyValueArray[oldIndex + 1] : undefined;\n const newValue = newIndex < newKeyValueArray.length ? newKeyValueArray[newIndex + 1] : undefined;\n let setKey = null;\n let setValue = undefined;\n if (oldKey === newKey) {\n // UPDATE: Keys are equal => new value is overwriting old value.\n oldIndex += 2;\n newIndex += 2;\n if (oldValue !== newValue) {\n setKey = newKey;\n setValue = newValue;\n }\n }\n else if (newKey === null || oldKey !== null && oldKey < newKey) {\n // DELETE: oldKey key is missing or we did not find the oldKey in the newValue\n // (because the keyValueArray is sorted and `newKey` is found later alphabetically).\n // `\"background\" < \"color\"` so we need to delete `\"background\"` because it is not found in the\n // new array.\n oldIndex += 2;\n setKey = oldKey;\n }\n else {\n // CREATE: newKey's is earlier alphabetically than oldKey's (or no oldKey) => we have new key.\n // `\"color\" > \"background\"` so we need to add `color` because it is in new array but not in\n // old array.\n ngDevMode && assertDefined(newKey, 'Expecting to have a valid key');\n newIndex += 2;\n setKey = newKey;\n setValue = newValue;\n }\n if (setKey !== null) {\n updateStyling(tView, tNode, lView, renderer, setKey, setValue, isClassBased, bindingIndex);\n }\n oldKey = oldIndex < oldKeyValueArray.length ? oldKeyValueArray[oldIndex] : null;\n newKey = newIndex < newKeyValueArray.length ? newKeyValueArray[newIndex] : null;\n }\n}\n/**\n * Update a simple (property name) styling.\n *\n * This function takes `prop` and updates the DOM to that value. The function takes the binding\n * value as well as binding priority into consideration to determine which value should be written\n * to DOM. (For example it may be determined that there is a higher priority overwrite which blocks\n * the DOM write, or if the value goes to `undefined` a lower priority overwrite may be consulted.)\n *\n * @param tView Associated `TView.data` contains the linked list of binding priorities.\n * @param tNode `TNode` where the binding is located.\n * @param lView `LView` contains the values associated with other styling binding at this `TNode`.\n * @param renderer Renderer to use if any updates.\n * @param prop Either style property name or a class name.\n * @param value Either style value for `prop` or `true`/`false` if `prop` is class.\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @param bindingIndex Binding index of the binding.\n */\nfunction updateStyling(tView, tNode, lView, renderer, prop, value, isClassBased, bindingIndex) {\n if (!(tNode.type & 3 /* TNodeType.AnyRNode */)) {\n // It is possible to have styling on non-elements (such as ng-container).\n // This is rare, but it does happen. In such a case, just ignore the binding.\n return;\n }\n const tData = tView.data;\n const tRange = tData[bindingIndex + 1];\n const higherPriorityValue = getTStylingRangeNextDuplicate(tRange) ?\n findStylingValue(tData, tNode, lView, prop, getTStylingRangeNext(tRange), isClassBased) :\n undefined;\n if (!isStylingValuePresent(higherPriorityValue)) {\n // We don't have a next duplicate, or we did not find a duplicate value.\n if (!isStylingValuePresent(value)) {\n // We should delete current value or restore to lower priority value.\n if (getTStylingRangePrevDuplicate(tRange)) {\n // We have a possible prev duplicate, let's retrieve it.\n value = findStylingValue(tData, null, lView, prop, bindingIndex, isClassBased);\n }\n }\n const rNode = getNativeByIndex(getSelectedIndex(), lView);\n applyStyling(renderer, isClassBased, rNode, prop, value);\n }\n}\n/**\n * Search for styling value with higher priority which is overwriting current value, or a\n * value of lower priority to which we should fall back if the value is `undefined`.\n *\n * When value is being applied at a location, related values need to be consulted.\n * - If there is a higher priority binding, we should be using that one instead.\n * For example `<div [style]=\"{color:exp1}\" [style.color]=\"exp2\">` change to `exp1`\n * requires that we check `exp2` to see if it is set to value other than `undefined`.\n * - If there is a lower priority binding and we are changing to `undefined`\n * For example `<div [style]=\"{color:exp1}\" [style.color]=\"exp2\">` change to `exp2` to\n * `undefined` requires that we check `exp1` (and static values) and use that as new value.\n *\n * NOTE: The styling stores two values.\n * 1. The raw value which came from the application is stored at `index + 0` location. (This value\n * is used for dirty checking).\n * 2. The normalized value is stored at `index + 1`.\n *\n * @param tData `TData` used for traversing the priority.\n * @param tNode `TNode` to use for resolving static styling. Also controls search direction.\n * - `TNode` search next and quit as soon as `isStylingValuePresent(value)` is true.\n * If no value found consult `tNode.residualStyle`/`tNode.residualClass` for default value.\n * - `null` search prev and go all the way to end. Return last value where\n * `isStylingValuePresent(value)` is true.\n * @param lView `LView` used for retrieving the actual values.\n * @param prop Property which we are interested in.\n * @param index Starting index in the linked list of styling bindings where the search should start.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction findStylingValue(tData, tNode, lView, prop, index, isClassBased) {\n // `TNode` to use for resolving static styling. Also controls search direction.\n // - `TNode` search next and quit as soon as `isStylingValuePresent(value)` is true.\n // If no value found consult `tNode.residualStyle`/`tNode.residualClass` for default value.\n // - `null` search prev and go all the way to end. Return last value where\n // `isStylingValuePresent(value)` is true.\n const isPrevDirection = tNode === null;\n let value = undefined;\n while (index > 0) {\n const rawKey = tData[index];\n const containsStatics = Array.isArray(rawKey);\n // Unwrap the key if we contain static values.\n const key = containsStatics ? rawKey[1] : rawKey;\n const isStylingMap = key === null;\n let valueAtLViewIndex = lView[index + 1];\n if (valueAtLViewIndex === NO_CHANGE) {\n // In firstUpdatePass the styling instructions create a linked list of styling.\n // On subsequent passes it is possible for a styling instruction to try to read a binding\n // which\n // has not yet executed. In that case we will find `NO_CHANGE` and we should assume that\n // we have `undefined` (or empty array in case of styling-map instruction) instead. This\n // allows the resolution to apply the value (which may later be overwritten when the\n // binding actually executes.)\n valueAtLViewIndex = isStylingMap ? EMPTY_ARRAY : undefined;\n }\n let currentValue = isStylingMap ? keyValueArrayGet(valueAtLViewIndex, prop) :\n (key === prop ? valueAtLViewIndex : undefined);\n if (containsStatics && !isStylingValuePresent(currentValue)) {\n currentValue = keyValueArrayGet(rawKey, prop);\n }\n if (isStylingValuePresent(currentValue)) {\n value = currentValue;\n if (isPrevDirection) {\n return value;\n }\n }\n const tRange = tData[index + 1];\n index = isPrevDirection ? getTStylingRangePrev(tRange) : getTStylingRangeNext(tRange);\n }\n if (tNode !== null) {\n // in case where we are going in next direction AND we did not find anything, we need to\n // consult residual styling\n let residual = isClassBased ? tNode.residualClasses : tNode.residualStyles;\n if (residual != null /** OR residual !=== undefined */) {\n value = keyValueArrayGet(residual, prop);\n }\n }\n return value;\n}\n/**\n * Determines if the binding value should be used (or if the value is 'undefined' and hence priority\n * resolution should be used.)\n *\n * @param value Binding style value.\n */\nfunction isStylingValuePresent(value) {\n // Currently only `undefined` value is considered non-binding. That is `undefined` says I don't\n // have an opinion as to what this binding should be and you should consult other bindings by\n // priority to determine the valid value.\n // This is extracted into a single function so that we have a single place to control this.\n return value !== undefined;\n}\n/**\n * Normalizes and/or adds a suffix to the value.\n *\n * If value is `null`/`undefined` no suffix is added\n * @param value\n * @param suffix\n */\nfunction normalizeSuffix(value, suffix) {\n if (value == null /** || value === undefined */) {\n // do nothing\n }\n else if (typeof suffix === 'string') {\n value = value + suffix;\n }\n else if (typeof value === 'object') {\n value = stringify(unwrapSafeValue(value));\n }\n return value;\n}\n/**\n * Tests if the `TNode` has input shadow.\n *\n * An input shadow is when a directive steals (shadows) the input by using `@Input('style')` or\n * `@Input('class')` as input.\n *\n * @param tNode `TNode` which we would like to see if it has shadow.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction hasStylingInputShadow(tNode, isClassBased) {\n return (tNode.flags & (isClassBased ? 8 /* TNodeFlags.hasClassInput */ : 16 /* TNodeFlags.hasStyleInput */)) !== 0;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Create static text node\n *\n * @param index Index of the node in the data array\n * @param value Static string value to write.\n *\n * @codeGenApi\n */\nfunction ɵɵtext(index, value = '') {\n const lView = getLView();\n const tView = getTView();\n const adjustedIndex = index + HEADER_OFFSET;\n ngDevMode &&\n assertEqual(getBindingIndex(), tView.bindingStartIndex, 'text nodes should be created before any bindings');\n ngDevMode && assertIndexInRange(lView, adjustedIndex);\n const tNode = tView.firstCreatePass ?\n getOrCreateTNode(tView, adjustedIndex, 1 /* TNodeType.Text */, value, null) :\n tView.data[adjustedIndex];\n const textNative = lView[adjustedIndex] = createTextNode(lView[RENDERER], value);\n appendChild(tView, lView, textNative, tNode);\n // Text nodes are self closing.\n setCurrentTNode(tNode, false);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n *\n * Update text content with a lone bound value\n *\n * Used when a text node has 1 interpolated value in it, an no additional text\n * surrounds that interpolated value:\n *\n * ```html\n * <div>{{v0}}</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate(v0);\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nfunction ɵɵtextInterpolate(v0) {\n ɵɵtextInterpolate1('', v0, '');\n return ɵɵtextInterpolate;\n}\n/**\n *\n * Update text content with single bound value surrounded by other text.\n *\n * Used when a text node has 1 interpolated value in it:\n *\n * ```html\n * <div>prefix{{v0}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate1('prefix', v0, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nfunction ɵɵtextInterpolate1(prefix, v0, suffix) {\n const lView = getLView();\n const interpolated = interpolation1(lView, prefix, v0, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated);\n }\n return ɵɵtextInterpolate1;\n}\n/**\n *\n * Update text content with 2 bound values surrounded by other text.\n *\n * Used when a text node has 2 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate2('prefix', v0, '-', v1, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nfunction ɵɵtextInterpolate2(prefix, v0, i0, v1, suffix) {\n const lView = getLView();\n const interpolated = interpolation2(lView, prefix, v0, i0, v1, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated);\n }\n return ɵɵtextInterpolate2;\n}\n/**\n *\n * Update text content with 3 bound values surrounded by other text.\n *\n * Used when a text node has 3 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate3(\n * 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nfunction ɵɵtextInterpolate3(prefix, v0, i0, v1, i1, v2, suffix) {\n const lView = getLView();\n const interpolated = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated);\n }\n return ɵɵtextInterpolate3;\n}\n/**\n *\n * Update text content with 4 bound values surrounded by other text.\n *\n * Used when a text node has 4 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate4(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see ɵɵtextInterpolateV\n * @codeGenApi\n */\nfunction ɵɵtextInterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {\n const lView = getLView();\n const interpolated = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated);\n }\n return ɵɵtextInterpolate4;\n}\n/**\n *\n * Update text content with 5 bound values surrounded by other text.\n *\n * Used when a text node has 5 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate5(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nfunction ɵɵtextInterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {\n const lView = getLView();\n const interpolated = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated);\n }\n return ɵɵtextInterpolate5;\n}\n/**\n *\n * Update text content with 6 bound values surrounded by other text.\n *\n * Used when a text node has 6 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate6(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change. @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nfunction ɵɵtextInterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {\n const lView = getLView();\n const interpolated = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated);\n }\n return ɵɵtextInterpolate6;\n}\n/**\n *\n * Update text content with 7 bound values surrounded by other text.\n *\n * Used when a text node has 7 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate7(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nfunction ɵɵtextInterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {\n const lView = getLView();\n const interpolated = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated);\n }\n return ɵɵtextInterpolate7;\n}\n/**\n *\n * Update text content with 8 bound values surrounded by other text.\n *\n * Used when a text node has 8 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate8(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nfunction ɵɵtextInterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {\n const lView = getLView();\n const interpolated = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated);\n }\n return ɵɵtextInterpolate8;\n}\n/**\n * Update text content with 9 or more bound values other surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolateV(\n * ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *.\n * @param values The collection of values and the strings in between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n *\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵtextInterpolateV(values) {\n const lView = getLView();\n const interpolated = interpolationV(lView, values);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated);\n }\n return ɵɵtextInterpolateV;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n *\n * Update an interpolated class on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate1('prefix', v0, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate1(prefix, v0, suffix) {\n const lView = getLView();\n const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n *\n * Update an interpolated class on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate2('prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate2(prefix, v0, i0, v1, suffix) {\n const lView = getLView();\n const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n *\n * Update an interpolated class on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate3(\n * 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate3(prefix, v0, i0, v1, i1, v2, suffix) {\n const lView = getLView();\n const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n *\n * Update an interpolated class on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate4(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {\n const lView = getLView();\n const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n *\n * Update an interpolated class on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate5(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {\n const lView = getLView();\n const interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n *\n * Update an interpolated class on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate6(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {\n const lView = getLView();\n const interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n *\n * Update an interpolated class on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate7(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {\n const lView = getLView();\n const interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n *\n * Update an interpolated class on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate8(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {\n const lView = getLView();\n const interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n * Update an interpolated class on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n * class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolateV(\n * ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *.\n * @param values The collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @codeGenApi\n */\nfunction ɵɵclassMapInterpolateV(values) {\n const lView = getLView();\n const interpolatedValue = interpolationV(lView, values);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n *\n * Update an interpolated style on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div style=\"key: {{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate1('key: ', v0, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate1(prefix, v0, suffix) {\n const lView = getLView();\n const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n/**\n *\n * Update an interpolated style on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate2('key: ', v0, '; key1: ', v1, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate2(prefix, v0, i0, v1, suffix) {\n const lView = getLView();\n const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n/**\n *\n * Update an interpolated style on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key2: {{v1}}; key2: {{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate3(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate3(prefix, v0, i0, v1, i1, v2, suffix) {\n const lView = getLView();\n const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n/**\n *\n * Update an interpolated style on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate4(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {\n const lView = getLView();\n const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n/**\n *\n * Update an interpolated style on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate5(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {\n const lView = getLView();\n const interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n/**\n *\n * Update an interpolated style on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}};\n * key5: {{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate6(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n * 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {\n const lView = getLView();\n const interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n/**\n *\n * Update an interpolated style on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};\n * key6: {{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate7(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n * '; key6: ', v6, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {\n const lView = getLView();\n const interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n/**\n *\n * Update an interpolated style on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};\n * key6: {{v6}}; key7: {{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate8(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n * '; key6: ', v6, '; key7: ', v7, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {\n const lView = getLView();\n const interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n/**\n * Update an interpolated style on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n * class=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};\n * key6: {{v6}}; key7: {{v7}}; key8: {{v8}}; key9: {{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolateV(\n * ['key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n * '; key6: ', v6, '; key7: ', v7, '; key8: ', v8, '; key9: ', v9, 'suffix']);\n * ```\n *.\n * @param values The collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '; key2: ', value1, '; key2: ', value2, ..., value99, 'suffix']`)\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolateV(values) {\n const lView = getLView();\n const interpolatedValue = interpolationV(lView, values);\n ɵɵstyleMap(interpolatedValue);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n *\n * Update an interpolated style property on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate1(0, 'prefix', v0, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate1(prop, prefix, v0, suffix, valueSuffix) {\n const lView = getLView();\n const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate1;\n}\n/**\n *\n * Update an interpolated style property on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate2(0, 'prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate2(prop, prefix, v0, i0, v1, suffix, valueSuffix) {\n const lView = getLView();\n const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate2;\n}\n/**\n *\n * Update an interpolated style property on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate3(0, 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate3(prop, prefix, v0, i0, v1, i1, v2, suffix, valueSuffix) {\n const lView = getLView();\n const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate3;\n}\n/**\n *\n * Update an interpolated style property on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate4(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate4(prop, prefix, v0, i0, v1, i1, v2, i2, v3, suffix, valueSuffix) {\n const lView = getLView();\n const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate4;\n}\n/**\n *\n * Update an interpolated style property on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate5(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate5(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix, valueSuffix) {\n const lView = getLView();\n const interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate5;\n}\n/**\n *\n * Update an interpolated style property on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate6(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate6(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix, valueSuffix) {\n const lView = getLView();\n const interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate6;\n}\n/**\n *\n * Update an interpolated style property on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate7(\n * 0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate7(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix, valueSuffix) {\n const lView = getLView();\n const interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate7;\n}\n/**\n *\n * Update an interpolated style property on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate8(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6,\n * '-', v7, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate8(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix, valueSuffix) {\n const lView = getLView();\n const interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate8;\n}\n/**\n * Update an interpolated style property on an element with 9 or more bound values surrounded by\n * text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n * style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\">\n * </div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolateV(\n * 0, ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`..\n * @param values The collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolateV(prop, values, valueSuffix) {\n const lView = getLView();\n const interpolatedValue = interpolationV(lView, values);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolateV;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Update a property on a host element. Only applies to native node properties, not inputs.\n *\n * Operates on the element selected by index via the {@link select} instruction.\n *\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n * renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n * @returns This function returns itself so that it may be chained\n * (e.g. `property('name', ctx.name)('title', ctx.title)`)\n *\n * @codeGenApi\n */\nfunction ɵɵhostProperty(propName, value, sanitizer) {\n const lView = getLView();\n const bindingIndex = nextBindingIndex();\n if (bindingUpdated(lView, bindingIndex, value)) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, value, lView[RENDERER], sanitizer, true);\n ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n }\n return ɵɵhostProperty;\n}\n/**\n * Updates a synthetic host binding (e.g. `[@foo]`) on a component or directive.\n *\n * This instruction is for compatibility purposes and is designed to ensure that a\n * synthetic host binding (e.g. `@HostBinding('@foo')`) properly gets rendered in\n * the component's renderer. Normally all host bindings are evaluated with the parent\n * component's renderer, but, in the case of animation @triggers, they need to be\n * evaluated with the sub component's renderer (because that's where the animation\n * triggers are defined).\n *\n * Do not use this instruction as a replacement for `elementProperty`. This instruction\n * only exists to ensure compatibility with the ViewEngine's host binding behavior.\n *\n * @param index The index of the element to update in the data array\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n * renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n *\n * @codeGenApi\n */\nfunction ɵɵsyntheticHostProperty(propName, value, sanitizer) {\n const lView = getLView();\n const bindingIndex = nextBindingIndex();\n if (bindingUpdated(lView, bindingIndex, value)) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n const currentDef = getCurrentDirectiveDef(tView.data);\n const renderer = loadComponentRenderer(currentDef, tNode, lView);\n elementPropertyInternal(tView, tNode, lView, propName, value, renderer, sanitizer, true);\n ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n }\n return ɵɵsyntheticHostProperty;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * NOTE: changes to the `ngI18nClosureMode` name must be synced with `compiler-cli/src/tooling.ts`.\n */\nif (typeof ngI18nClosureMode === 'undefined') {\n // These property accesses can be ignored because ngI18nClosureMode will be set to false\n // when optimizing code and the whole if statement will be dropped.\n // Make sure to refer to ngI18nClosureMode as ['ngI18nClosureMode'] for closure.\n // NOTE: we need to have it in IIFE so that the tree-shaker is happy.\n (function () {\n // tslint:disable-next-line:no-toplevel-property-access\n _global['ngI18nClosureMode'] =\n // TODO(FW-1250): validate that this actually, you know, works.\n // tslint:disable-next-line:no-toplevel-property-access\n typeof goog !== 'undefined' && typeof goog.getMsg === 'function';\n })();\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// THIS CODE IS GENERATED - DO NOT MODIFY.\nconst u = undefined;\nfunction plural(val) {\n const n = val, i = Math.floor(Math.abs(val)), v = val.toString().replace(/^[^.]*\\.?/, '').length;\n if (i === 1 && v === 0)\n return 1;\n return 5;\n}\nvar localeEn = [\"en\", [[\"a\", \"p\"], [\"AM\", \"PM\"], u], [[\"AM\", \"PM\"], u, u], [[\"S\", \"M\", \"T\", \"W\", \"T\", \"F\", \"S\"], [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"], [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"], [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"]], u, [[\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"], [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"], [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"]], u, [[\"B\", \"A\"], [\"BC\", \"AD\"], [\"Before Christ\", \"Anno Domini\"]], 0, [6, 0], [\"M/d/yy\", \"MMM d, y\", \"MMMM d, y\", \"EEEE, MMMM d, y\"], [\"h:mm a\", \"h:mm:ss a\", \"h:mm:ss a z\", \"h:mm:ss a zzzz\"], [\"{1}, {0}\", u, \"{1} 'at' {0}\", u], [\".\", \",\", \";\", \"%\", \"+\", \"-\", \"E\", \"×\", \"‰\", \"∞\", \"NaN\", \":\"], [\"#,##0.###\", \"#,##0%\", \"¤#,##0.00\", \"#E0\"], \"USD\", \"$\", \"US Dollar\", {}, \"ltr\", plural];\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * This const is used to store the locale data registered with `registerLocaleData`\n */\nlet LOCALE_DATA = {};\n/**\n * Register locale data to be used internally by Angular. See the\n * [\"I18n guide\"](guide/i18n-common-format-data-locale) to know how to import additional locale\n * data.\n *\n * The signature `registerLocaleData(data: any, extraData?: any)` is deprecated since v5.1\n */\nfunction registerLocaleData(data, localeId, extraData) {\n if (typeof localeId !== 'string') {\n extraData = localeId;\n localeId = data[LocaleDataIndex.LocaleId];\n }\n localeId = localeId.toLowerCase().replace(/_/g, '-');\n LOCALE_DATA[localeId] = data;\n if (extraData) {\n LOCALE_DATA[localeId][LocaleDataIndex.ExtraData] = extraData;\n }\n}\n/**\n * Finds the locale data for a given locale.\n *\n * @param locale The locale code.\n * @returns The locale data.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n */\nfunction findLocaleData(locale) {\n const normalizedLocale = normalizeLocale(locale);\n let match = getLocaleData(normalizedLocale);\n if (match) {\n return match;\n }\n // let's try to find a parent locale\n const parentLocale = normalizedLocale.split('-')[0];\n match = getLocaleData(parentLocale);\n if (match) {\n return match;\n }\n if (parentLocale === 'en') {\n return localeEn;\n }\n throw new RuntimeError(701 /* RuntimeErrorCode.MISSING_LOCALE_DATA */, ngDevMode && `Missing locale data for the locale \"${locale}\".`);\n}\n/**\n * Retrieves the default currency code for the given locale.\n *\n * The default is defined as the first currency which is still in use.\n *\n * @param locale The code of the locale whose currency code we want.\n * @returns The code of the default currency for the given locale.\n *\n */\nfunction getLocaleCurrencyCode(locale) {\n const data = findLocaleData(locale);\n return data[LocaleDataIndex.CurrencyCode] || null;\n}\n/**\n * Retrieves the plural function used by ICU expressions to determine the plural case to use\n * for a given locale.\n * @param locale A locale code for the locale format rules to use.\n * @returns The plural function for the locale.\n * @see `NgPlural`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n */\nfunction getLocalePluralCase(locale) {\n const data = findLocaleData(locale);\n return data[LocaleDataIndex.PluralCase];\n}\n/**\n * Helper function to get the given `normalizedLocale` from `LOCALE_DATA`\n * or from the global `ng.common.locale`.\n */\nfunction getLocaleData(normalizedLocale) {\n if (!(normalizedLocale in LOCALE_DATA)) {\n LOCALE_DATA[normalizedLocale] = _global.ng && _global.ng.common && _global.ng.common.locales &&\n _global.ng.common.locales[normalizedLocale];\n }\n return LOCALE_DATA[normalizedLocale];\n}\n/**\n * Helper function to remove all the locale data from `LOCALE_DATA`.\n */\nfunction unregisterAllLocaleData() {\n LOCALE_DATA = {};\n}\n/**\n * Index of each type of locale data from the locale data array\n */\nvar LocaleDataIndex;\n(function (LocaleDataIndex) {\n LocaleDataIndex[LocaleDataIndex[\"LocaleId\"] = 0] = \"LocaleId\";\n LocaleDataIndex[LocaleDataIndex[\"DayPeriodsFormat\"] = 1] = \"DayPeriodsFormat\";\n LocaleDataIndex[LocaleDataIndex[\"DayPeriodsStandalone\"] = 2] = \"DayPeriodsStandalone\";\n LocaleDataIndex[LocaleDataIndex[\"DaysFormat\"] = 3] = \"DaysFormat\";\n LocaleDataIndex[LocaleDataIndex[\"DaysStandalone\"] = 4] = \"DaysStandalone\";\n LocaleDataIndex[LocaleDataIndex[\"MonthsFormat\"] = 5] = \"MonthsFormat\";\n LocaleDataIndex[LocaleDataIndex[\"MonthsStandalone\"] = 6] = \"MonthsStandalone\";\n LocaleDataIndex[LocaleDataIndex[\"Eras\"] = 7] = \"Eras\";\n LocaleDataIndex[LocaleDataIndex[\"FirstDayOfWeek\"] = 8] = \"FirstDayOfWeek\";\n LocaleDataIndex[LocaleDataIndex[\"WeekendRange\"] = 9] = \"WeekendRange\";\n LocaleDataIndex[LocaleDataIndex[\"DateFormat\"] = 10] = \"DateFormat\";\n LocaleDataIndex[LocaleDataIndex[\"TimeFormat\"] = 11] = \"TimeFormat\";\n LocaleDataIndex[LocaleDataIndex[\"DateTimeFormat\"] = 12] = \"DateTimeFormat\";\n LocaleDataIndex[LocaleDataIndex[\"NumberSymbols\"] = 13] = \"NumberSymbols\";\n LocaleDataIndex[LocaleDataIndex[\"NumberFormats\"] = 14] = \"NumberFormats\";\n LocaleDataIndex[LocaleDataIndex[\"CurrencyCode\"] = 15] = \"CurrencyCode\";\n LocaleDataIndex[LocaleDataIndex[\"CurrencySymbol\"] = 16] = \"CurrencySymbol\";\n LocaleDataIndex[LocaleDataIndex[\"CurrencyName\"] = 17] = \"CurrencyName\";\n LocaleDataIndex[LocaleDataIndex[\"Currencies\"] = 18] = \"Currencies\";\n LocaleDataIndex[LocaleDataIndex[\"Directionality\"] = 19] = \"Directionality\";\n LocaleDataIndex[LocaleDataIndex[\"PluralCase\"] = 20] = \"PluralCase\";\n LocaleDataIndex[LocaleDataIndex[\"ExtraData\"] = 21] = \"ExtraData\";\n})(LocaleDataIndex || (LocaleDataIndex = {}));\n/**\n * Returns the canonical form of a locale name - lowercase with `_` replaced with `-`.\n */\nfunction normalizeLocale(locale) {\n return locale.toLowerCase().replace(/_/g, '-');\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst pluralMapping = ['zero', 'one', 'two', 'few', 'many'];\n/**\n * Returns the plural case based on the locale\n */\nfunction getPluralCase(value, locale) {\n const plural = getLocalePluralCase(locale)(parseInt(value, 10));\n const result = pluralMapping[plural];\n return (result !== undefined) ? result : 'other';\n}\n/**\n * The locale id that the application is using by default (for translations and ICU expressions).\n */\nconst DEFAULT_LOCALE_ID = 'en-US';\n/**\n * USD currency code that the application uses by default for CurrencyPipe when no\n * DEFAULT_CURRENCY_CODE is provided.\n */\nconst USD_CURRENCY_CODE = 'USD';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Marks that the next string is an element name.\n *\n * See `I18nMutateOpCodes` documentation.\n */\nconst ELEMENT_MARKER = {\n marker: 'element'\n};\n/**\n * Marks that the next string is comment text need for ICU.\n *\n * See `I18nMutateOpCodes` documentation.\n */\nconst ICU_MARKER = {\n marker: 'ICU'\n};\n/**\n * See `I18nCreateOpCodes`\n */\nvar I18nCreateOpCode;\n(function (I18nCreateOpCode) {\n /**\n * Number of bits to shift index so that it can be combined with the `APPEND_EAGERLY` and\n * `COMMENT`.\n */\n I18nCreateOpCode[I18nCreateOpCode[\"SHIFT\"] = 2] = \"SHIFT\";\n /**\n * Should the node be appended to parent immediately after creation.\n */\n I18nCreateOpCode[I18nCreateOpCode[\"APPEND_EAGERLY\"] = 1] = \"APPEND_EAGERLY\";\n /**\n * If set the node should be comment (rather than a text) node.\n */\n I18nCreateOpCode[I18nCreateOpCode[\"COMMENT\"] = 2] = \"COMMENT\";\n})(I18nCreateOpCode || (I18nCreateOpCode = {}));\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nconst unusedValueExportToPlacateAjd = 1;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The locale id that the application is currently using (for translations and ICU expressions).\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n */\nlet LOCALE_ID$1 = DEFAULT_LOCALE_ID;\n/**\n * Sets the locale id that will be used for translations and ICU expressions.\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n *\n * @param localeId\n */\nfunction setLocaleId(localeId) {\n assertDefined(localeId, `Expected localeId to be defined`);\n if (typeof localeId === 'string') {\n LOCALE_ID$1 = localeId.toLowerCase().replace(/_/g, '-');\n }\n}\n/**\n * Gets the locale id that will be used for translations and ICU expressions.\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n */\nfunction getLocaleId() {\n return LOCALE_ID$1;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Find a node in front of which `currentTNode` should be inserted (takes i18n into account).\n *\n * This method determines the `RNode` in front of which we should insert the `currentRNode`. This\n * takes `TNode.insertBeforeIndex` into account.\n *\n * @param parentTNode parent `TNode`\n * @param currentTNode current `TNode` (The node which we would like to insert into the DOM)\n * @param lView current `LView`\n */\nfunction getInsertInFrontOfRNodeWithI18n(parentTNode, currentTNode, lView) {\n const tNodeInsertBeforeIndex = currentTNode.insertBeforeIndex;\n const insertBeforeIndex = Array.isArray(tNodeInsertBeforeIndex) ? tNodeInsertBeforeIndex[0] : tNodeInsertBeforeIndex;\n if (insertBeforeIndex === null) {\n return getInsertInFrontOfRNodeWithNoI18n(parentTNode, currentTNode, lView);\n }\n else {\n ngDevMode && assertIndexInRange(lView, insertBeforeIndex);\n return unwrapRNode(lView[insertBeforeIndex]);\n }\n}\n/**\n * Process `TNode.insertBeforeIndex` by adding i18n text nodes.\n *\n * See `TNode.insertBeforeIndex`\n */\nfunction processI18nInsertBefore(renderer, childTNode, lView, childRNode, parentRElement) {\n const tNodeInsertBeforeIndex = childTNode.insertBeforeIndex;\n if (Array.isArray(tNodeInsertBeforeIndex)) {\n // An array indicates that there are i18n nodes that need to be added as children of this\n // `childRNode`. These i18n nodes were created before this `childRNode` was available and so\n // only now can be added. The first element of the array is the normal index where we should\n // insert the `childRNode`. Additional elements are the extra nodes to be added as children of\n // `childRNode`.\n ngDevMode && assertDomNode(childRNode);\n let i18nParent = childRNode;\n let anchorRNode = null;\n if (!(childTNode.type & 3 /* TNodeType.AnyRNode */)) {\n anchorRNode = i18nParent;\n i18nParent = parentRElement;\n }\n if (i18nParent !== null && childTNode.componentOffset === -1) {\n for (let i = 1; i < tNodeInsertBeforeIndex.length; i++) {\n // No need to `unwrapRNode` because all of the indexes point to i18n text nodes.\n // see `assertDomNode` below.\n const i18nChild = lView[tNodeInsertBeforeIndex[i]];\n nativeInsertBefore(renderer, i18nParent, i18nChild, anchorRNode, false);\n }\n }\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Add `tNode` to `previousTNodes` list and update relevant `TNode`s in `previousTNodes` list\n * `tNode.insertBeforeIndex`.\n *\n * Things to keep in mind:\n * 1. All i18n text nodes are encoded as `TNodeType.Element` and are created eagerly by the\n * `ɵɵi18nStart` instruction.\n * 2. All `TNodeType.Placeholder` `TNodes` are elements which will be created later by\n * `ɵɵelementStart` instruction.\n * 3. `ɵɵelementStart` instruction will create `TNode`s in the ascending `TNode.index` order. (So a\n * smaller index `TNode` is guaranteed to be created before a larger one)\n *\n * We use the above three invariants to determine `TNode.insertBeforeIndex`.\n *\n * In an ideal world `TNode.insertBeforeIndex` would always be `TNode.next.index`. However,\n * this will not work because `TNode.next.index` may be larger than `TNode.index` which means that\n * the next node is not yet created and therefore we can't insert in front of it.\n *\n * Rule1: `TNode.insertBeforeIndex = null` if `TNode.next === null` (Initial condition, as we don't\n * know if there will be further `TNode`s inserted after.)\n * Rule2: If `previousTNode` is created after the `tNode` being inserted, then\n * `previousTNode.insertBeforeNode = tNode.index` (So when a new `tNode` is added we check\n * previous to see if we can update its `insertBeforeTNode`)\n *\n * See `TNode.insertBeforeIndex` for more context.\n *\n * @param previousTNodes A list of previous TNodes so that we can easily traverse `TNode`s in\n * reverse order. (If `TNode` would have `previous` this would not be necessary.)\n * @param newTNode A TNode to add to the `previousTNodes` list.\n */\nfunction addTNodeAndUpdateInsertBeforeIndex(previousTNodes, newTNode) {\n // Start with Rule1\n ngDevMode &&\n assertEqual(newTNode.insertBeforeIndex, null, 'We expect that insertBeforeIndex is not set');\n previousTNodes.push(newTNode);\n if (previousTNodes.length > 1) {\n for (let i = previousTNodes.length - 2; i >= 0; i--) {\n const existingTNode = previousTNodes[i];\n // Text nodes are created eagerly and so they don't need their `indexBeforeIndex` updated.\n // It is safe to ignore them.\n if (!isI18nText(existingTNode)) {\n if (isNewTNodeCreatedBefore(existingTNode, newTNode) &&\n getInsertBeforeIndex(existingTNode) === null) {\n // If it was created before us in time, (and it does not yet have `insertBeforeIndex`)\n // then add the `insertBeforeIndex`.\n setInsertBeforeIndex(existingTNode, newTNode.index);\n }\n }\n }\n }\n}\nfunction isI18nText(tNode) {\n return !(tNode.type & 64 /* TNodeType.Placeholder */);\n}\nfunction isNewTNodeCreatedBefore(existingTNode, newTNode) {\n return isI18nText(newTNode) || existingTNode.index > newTNode.index;\n}\nfunction getInsertBeforeIndex(tNode) {\n const index = tNode.insertBeforeIndex;\n return Array.isArray(index) ? index[0] : index;\n}\nfunction setInsertBeforeIndex(tNode, value) {\n const index = tNode.insertBeforeIndex;\n if (Array.isArray(index)) {\n // Array is stored if we have to insert child nodes. See `TNode.insertBeforeIndex`\n index[0] = value;\n }\n else {\n setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore);\n tNode.insertBeforeIndex = value;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Retrieve `TIcu` at a given `index`.\n *\n * The `TIcu` can be stored either directly (if it is nested ICU) OR\n * it is stored inside tho `TIcuContainer` if it is top level ICU.\n *\n * The reason for this is that the top level ICU need a `TNode` so that they are part of the render\n * tree, but nested ICU's have no TNode, because we don't know ahead of time if the nested ICU is\n * expressed (parent ICU may have selected a case which does not contain it.)\n *\n * @param tView Current `TView`.\n * @param index Index where the value should be read from.\n */\nfunction getTIcu(tView, index) {\n const value = tView.data[index];\n if (value === null || typeof value === 'string')\n return null;\n if (ngDevMode &&\n !(value.hasOwnProperty('tViews') || value.hasOwnProperty('currentCaseLViewIndex'))) {\n throwError('We expect to get \\'null\\'|\\'TIcu\\'|\\'TIcuContainer\\', but got: ' + value);\n }\n // Here the `value.hasOwnProperty('currentCaseLViewIndex')` is a polymorphic read as it can be\n // either TIcu or TIcuContainerNode. This is not ideal, but we still think it is OK because it\n // will be just two cases which fits into the browser inline cache (inline cache can take up to\n // 4)\n const tIcu = value.hasOwnProperty('currentCaseLViewIndex') ? value :\n value.value;\n ngDevMode && assertTIcu(tIcu);\n return tIcu;\n}\n/**\n * Store `TIcu` at a give `index`.\n *\n * The `TIcu` can be stored either directly (if it is nested ICU) OR\n * it is stored inside tho `TIcuContainer` if it is top level ICU.\n *\n * The reason for this is that the top level ICU need a `TNode` so that they are part of the render\n * tree, but nested ICU's have no TNode, because we don't know ahead of time if the nested ICU is\n * expressed (parent ICU may have selected a case which does not contain it.)\n *\n * @param tView Current `TView`.\n * @param index Index where the value should be stored at in `Tview.data`\n * @param tIcu The TIcu to store.\n */\nfunction setTIcu(tView, index, tIcu) {\n const tNode = tView.data[index];\n ngDevMode &&\n assertEqual(tNode === null || tNode.hasOwnProperty('tViews'), true, 'We expect to get \\'null\\'|\\'TIcuContainer\\'');\n if (tNode === null) {\n tView.data[index] = tIcu;\n }\n else {\n ngDevMode && assertTNodeType(tNode, 32 /* TNodeType.Icu */);\n tNode.value = tIcu;\n }\n}\n/**\n * Set `TNode.insertBeforeIndex` taking the `Array` into account.\n *\n * See `TNode.insertBeforeIndex`\n */\nfunction setTNodeInsertBeforeIndex(tNode, index) {\n ngDevMode && assertTNode(tNode);\n let insertBeforeIndex = tNode.insertBeforeIndex;\n if (insertBeforeIndex === null) {\n setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore);\n insertBeforeIndex = tNode.insertBeforeIndex =\n [null /* may be updated to number later */, index];\n }\n else {\n assertEqual(Array.isArray(insertBeforeIndex), true, 'Expecting array here');\n insertBeforeIndex.push(index);\n }\n}\n/**\n * Create `TNode.type=TNodeType.Placeholder` node.\n *\n * See `TNodeType.Placeholder` for more information.\n */\nfunction createTNodePlaceholder(tView, previousTNodes, index) {\n const tNode = createTNodeAtIndex(tView, index, 64 /* TNodeType.Placeholder */, null, null);\n addTNodeAndUpdateInsertBeforeIndex(previousTNodes, tNode);\n return tNode;\n}\n/**\n * Returns current ICU case.\n *\n * ICU cases are stored as index into the `TIcu.cases`.\n * At times it is necessary to communicate that the ICU case just switched and that next ICU update\n * should update all bindings regardless of the mask. In such a case the we store negative numbers\n * for cases which have just been switched. This function removes the negative flag.\n */\nfunction getCurrentICUCaseIndex(tIcu, lView) {\n const currentCase = lView[tIcu.currentCaseLViewIndex];\n return currentCase === null ? currentCase : (currentCase < 0 ? ~currentCase : currentCase);\n}\nfunction getParentFromIcuCreateOpCode(mergedCode) {\n return mergedCode >>> 17 /* IcuCreateOpCode.SHIFT_PARENT */;\n}\nfunction getRefFromIcuCreateOpCode(mergedCode) {\n return (mergedCode & 131070 /* IcuCreateOpCode.MASK_REF */) >>> 1 /* IcuCreateOpCode.SHIFT_REF */;\n}\nfunction getInstructionFromIcuCreateOpCode(mergedCode) {\n return mergedCode & 1 /* IcuCreateOpCode.MASK_INSTRUCTION */;\n}\nfunction icuCreateOpCode(opCode, parentIdx, refIdx) {\n ngDevMode && assertGreaterThanOrEqual(parentIdx, 0, 'Missing parent index');\n ngDevMode && assertGreaterThan(refIdx, 0, 'Missing ref index');\n return opCode | parentIdx << 17 /* IcuCreateOpCode.SHIFT_PARENT */ | refIdx << 1 /* IcuCreateOpCode.SHIFT_REF */;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Keep track of which input bindings in `ɵɵi18nExp` have changed.\n *\n * This is used to efficiently update expressions in i18n only when the corresponding input has\n * changed.\n *\n * 1) Each bit represents which of the `ɵɵi18nExp` has changed.\n * 2) There are 32 bits allowed in JS.\n * 3) Bit 32 is special as it is shared for all changes past 32. (In other words if you have more\n * than 32 `ɵɵi18nExp` then all changes past 32nd `ɵɵi18nExp` will be mapped to same bit. This means\n * that we may end up changing more than we need to. But i18n expressions with 32 bindings is rare\n * so in practice it should not be an issue.)\n */\nlet changeMask = 0b0;\n/**\n * Keeps track of which bit needs to be updated in `changeMask`\n *\n * This value gets incremented on every call to `ɵɵi18nExp`\n */\nlet changeMaskCounter = 0;\n/**\n * Keep track of which input bindings in `ɵɵi18nExp` have changed.\n *\n * `setMaskBit` gets invoked by each call to `ɵɵi18nExp`.\n *\n * @param hasChange did `ɵɵi18nExp` detect a change.\n */\nfunction setMaskBit(hasChange) {\n if (hasChange) {\n changeMask = changeMask | (1 << Math.min(changeMaskCounter, 31));\n }\n changeMaskCounter++;\n}\nfunction applyI18n(tView, lView, index) {\n if (changeMaskCounter > 0) {\n ngDevMode && assertDefined(tView, `tView should be defined`);\n const tI18n = tView.data[index];\n // When `index` points to an `ɵɵi18nAttributes` then we have an array otherwise `TI18n`\n const updateOpCodes = Array.isArray(tI18n) ? tI18n : tI18n.update;\n const bindingsStartIndex = getBindingIndex() - changeMaskCounter - 1;\n applyUpdateOpCodes(tView, lView, updateOpCodes, bindingsStartIndex, changeMask);\n }\n // Reset changeMask & maskBit to default for the next update cycle\n changeMask = 0b0;\n changeMaskCounter = 0;\n}\n/**\n * Apply `I18nCreateOpCodes` op-codes as stored in `TI18n.create`.\n *\n * Creates text (and comment) nodes which are internationalized.\n *\n * @param lView Current lView\n * @param createOpCodes Set of op-codes to apply\n * @param parentRNode Parent node (so that direct children can be added eagerly) or `null` if it is\n * a root node.\n * @param insertInFrontOf DOM node that should be used as an anchor.\n */\nfunction applyCreateOpCodes(lView, createOpCodes, parentRNode, insertInFrontOf) {\n const renderer = lView[RENDERER];\n for (let i = 0; i < createOpCodes.length; i++) {\n const opCode = createOpCodes[i++];\n const text = createOpCodes[i];\n const isComment = (opCode & I18nCreateOpCode.COMMENT) === I18nCreateOpCode.COMMENT;\n const appendNow = (opCode & I18nCreateOpCode.APPEND_EAGERLY) === I18nCreateOpCode.APPEND_EAGERLY;\n const index = opCode >>> I18nCreateOpCode.SHIFT;\n let rNode = lView[index];\n if (rNode === null) {\n // We only create new DOM nodes if they don't already exist: If ICU switches case back to a\n // case which was already instantiated, no need to create new DOM nodes.\n rNode = lView[index] =\n isComment ? renderer.createComment(text) : createTextNode(renderer, text);\n }\n if (appendNow && parentRNode !== null) {\n nativeInsertBefore(renderer, parentRNode, rNode, insertInFrontOf, false);\n }\n }\n}\n/**\n * Apply `I18nMutateOpCodes` OpCodes.\n *\n * @param tView Current `TView`\n * @param mutableOpCodes Mutable OpCodes to process\n * @param lView Current `LView`\n * @param anchorRNode place where the i18n node should be inserted.\n */\nfunction applyMutableOpCodes(tView, mutableOpCodes, lView, anchorRNode) {\n ngDevMode && assertDomNode(anchorRNode);\n const renderer = lView[RENDERER];\n // `rootIdx` represents the node into which all inserts happen.\n let rootIdx = null;\n // `rootRNode` represents the real node into which we insert. This can be different from\n // `lView[rootIdx]` if we have projection.\n // - null we don't have a parent (as can be the case in when we are inserting into a root of\n // LView which has no parent.)\n // - `RElement` The element representing the root after taking projection into account.\n let rootRNode;\n for (let i = 0; i < mutableOpCodes.length; i++) {\n const opCode = mutableOpCodes[i];\n if (typeof opCode == 'string') {\n const textNodeIndex = mutableOpCodes[++i];\n if (lView[textNodeIndex] === null) {\n ngDevMode && ngDevMode.rendererCreateTextNode++;\n ngDevMode && assertIndexInRange(lView, textNodeIndex);\n lView[textNodeIndex] = createTextNode(renderer, opCode);\n }\n }\n else if (typeof opCode == 'number') {\n switch (opCode & 1 /* IcuCreateOpCode.MASK_INSTRUCTION */) {\n case 0 /* IcuCreateOpCode.AppendChild */:\n const parentIdx = getParentFromIcuCreateOpCode(opCode);\n if (rootIdx === null) {\n // The first operation should save the `rootIdx` because the first operation\n // must insert into the root. (Only subsequent operations can insert into a dynamic\n // parent)\n rootIdx = parentIdx;\n rootRNode = nativeParentNode(renderer, anchorRNode);\n }\n let insertInFrontOf;\n let parentRNode;\n if (parentIdx === rootIdx) {\n insertInFrontOf = anchorRNode;\n parentRNode = rootRNode;\n }\n else {\n insertInFrontOf = null;\n parentRNode = unwrapRNode(lView[parentIdx]);\n }\n // FIXME(misko): Refactor with `processI18nText`\n if (parentRNode !== null) {\n // This can happen if the `LView` we are adding to is not attached to a parent `LView`.\n // In such a case there is no \"root\" we can attach to. This is fine, as we still need to\n // create the elements. When the `LView` gets later added to a parent these \"root\" nodes\n // get picked up and added.\n ngDevMode && assertDomNode(parentRNode);\n const refIdx = getRefFromIcuCreateOpCode(opCode);\n ngDevMode && assertGreaterThan(refIdx, HEADER_OFFSET, 'Missing ref');\n // `unwrapRNode` is not needed here as all of these point to RNodes as part of the i18n\n // which can't have components.\n const child = lView[refIdx];\n ngDevMode && assertDomNode(child);\n nativeInsertBefore(renderer, parentRNode, child, insertInFrontOf, false);\n const tIcu = getTIcu(tView, refIdx);\n if (tIcu !== null && typeof tIcu === 'object') {\n // If we just added a comment node which has ICU then that ICU may have already been\n // rendered and therefore we need to re-add it here.\n ngDevMode && assertTIcu(tIcu);\n const caseIndex = getCurrentICUCaseIndex(tIcu, lView);\n if (caseIndex !== null) {\n applyMutableOpCodes(tView, tIcu.create[caseIndex], lView, lView[tIcu.anchorIdx]);\n }\n }\n }\n break;\n case 1 /* IcuCreateOpCode.Attr */:\n const elementNodeIndex = opCode >>> 1 /* IcuCreateOpCode.SHIFT_REF */;\n const attrName = mutableOpCodes[++i];\n const attrValue = mutableOpCodes[++i];\n // This code is used for ICU expressions only, since we don't support\n // directives/components in ICUs, we don't need to worry about inputs here\n setElementAttribute(renderer, getNativeByIndex(elementNodeIndex, lView), null, null, attrName, attrValue, null);\n break;\n default:\n if (ngDevMode) {\n throw new RuntimeError(700 /* RuntimeErrorCode.INVALID_I18N_STRUCTURE */, `Unable to determine the type of mutate operation for \"${opCode}\"`);\n }\n }\n }\n else {\n switch (opCode) {\n case ICU_MARKER:\n const commentValue = mutableOpCodes[++i];\n const commentNodeIndex = mutableOpCodes[++i];\n if (lView[commentNodeIndex] === null) {\n ngDevMode &&\n assertEqual(typeof commentValue, 'string', `Expected \"${commentValue}\" to be a comment node value`);\n ngDevMode && ngDevMode.rendererCreateComment++;\n ngDevMode && assertIndexInExpandoRange(lView, commentNodeIndex);\n const commentRNode = lView[commentNodeIndex] =\n createCommentNode(renderer, commentValue);\n // FIXME(misko): Attaching patch data is only needed for the root (Also add tests)\n attachPatchData(commentRNode, lView);\n }\n break;\n case ELEMENT_MARKER:\n const tagName = mutableOpCodes[++i];\n const elementNodeIndex = mutableOpCodes[++i];\n if (lView[elementNodeIndex] === null) {\n ngDevMode &&\n assertEqual(typeof tagName, 'string', `Expected \"${tagName}\" to be an element node tag name`);\n ngDevMode && ngDevMode.rendererCreateElement++;\n ngDevMode && assertIndexInExpandoRange(lView, elementNodeIndex);\n const elementRNode = lView[elementNodeIndex] =\n createElementNode(renderer, tagName, null);\n // FIXME(misko): Attaching patch data is only needed for the root (Also add tests)\n attachPatchData(elementRNode, lView);\n }\n break;\n default:\n ngDevMode &&\n throwError(`Unable to determine the type of mutate operation for \"${opCode}\"`);\n }\n }\n }\n}\n/**\n * Apply `I18nUpdateOpCodes` OpCodes\n *\n * @param tView Current `TView`\n * @param lView Current `LView`\n * @param updateOpCodes OpCodes to process\n * @param bindingsStartIndex Location of the first `ɵɵi18nApply`\n * @param changeMask Each bit corresponds to a `ɵɵi18nExp` (Counting backwards from\n * `bindingsStartIndex`)\n */\nfunction applyUpdateOpCodes(tView, lView, updateOpCodes, bindingsStartIndex, changeMask) {\n for (let i = 0; i < updateOpCodes.length; i++) {\n // bit code to check if we should apply the next update\n const checkBit = updateOpCodes[i];\n // Number of opCodes to skip until next set of update codes\n const skipCodes = updateOpCodes[++i];\n if (checkBit & changeMask) {\n // The value has been updated since last checked\n let value = '';\n for (let j = i + 1; j <= (i + skipCodes); j++) {\n const opCode = updateOpCodes[j];\n if (typeof opCode == 'string') {\n value += opCode;\n }\n else if (typeof opCode == 'number') {\n if (opCode < 0) {\n // Negative opCode represent `i18nExp` values offset.\n value += renderStringify(lView[bindingsStartIndex - opCode]);\n }\n else {\n const nodeIndex = (opCode >>> 2 /* I18nUpdateOpCode.SHIFT_REF */);\n switch (opCode & 3 /* I18nUpdateOpCode.MASK_OPCODE */) {\n case 1 /* I18nUpdateOpCode.Attr */:\n const propName = updateOpCodes[++j];\n const sanitizeFn = updateOpCodes[++j];\n const tNodeOrTagName = tView.data[nodeIndex];\n ngDevMode && assertDefined(tNodeOrTagName, 'Experting TNode or string');\n if (typeof tNodeOrTagName === 'string') {\n // IF we don't have a `TNode`, then we are an element in ICU (as ICU content does\n // not have TNode), in which case we know that there are no directives, and hence\n // we use attribute setting.\n setElementAttribute(lView[RENDERER], lView[nodeIndex], null, tNodeOrTagName, propName, value, sanitizeFn);\n }\n else {\n elementPropertyInternal(tView, tNodeOrTagName, lView, propName, value, lView[RENDERER], sanitizeFn, false);\n }\n break;\n case 0 /* I18nUpdateOpCode.Text */:\n const rText = lView[nodeIndex];\n rText !== null && updateTextNode(lView[RENDERER], rText, value);\n break;\n case 2 /* I18nUpdateOpCode.IcuSwitch */:\n applyIcuSwitchCase(tView, getTIcu(tView, nodeIndex), lView, value);\n break;\n case 3 /* I18nUpdateOpCode.IcuUpdate */:\n applyIcuUpdateCase(tView, getTIcu(tView, nodeIndex), bindingsStartIndex, lView);\n break;\n }\n }\n }\n }\n }\n else {\n const opCode = updateOpCodes[i + 1];\n if (opCode > 0 && (opCode & 3 /* I18nUpdateOpCode.MASK_OPCODE */) === 3 /* I18nUpdateOpCode.IcuUpdate */) {\n // Special case for the `icuUpdateCase`. It could be that the mask did not match, but\n // we still need to execute `icuUpdateCase` because the case has changed recently due to\n // previous `icuSwitchCase` instruction. (`icuSwitchCase` and `icuUpdateCase` always come in\n // pairs.)\n const nodeIndex = (opCode >>> 2 /* I18nUpdateOpCode.SHIFT_REF */);\n const tIcu = getTIcu(tView, nodeIndex);\n const currentIndex = lView[tIcu.currentCaseLViewIndex];\n if (currentIndex < 0) {\n applyIcuUpdateCase(tView, tIcu, bindingsStartIndex, lView);\n }\n }\n }\n i += skipCodes;\n }\n}\n/**\n * Apply OpCodes associated with updating an existing ICU.\n *\n * @param tView Current `TView`\n * @param tIcu Current `TIcu`\n * @param bindingsStartIndex Location of the first `ɵɵi18nApply`\n * @param lView Current `LView`\n */\nfunction applyIcuUpdateCase(tView, tIcu, bindingsStartIndex, lView) {\n ngDevMode && assertIndexInRange(lView, tIcu.currentCaseLViewIndex);\n let activeCaseIndex = lView[tIcu.currentCaseLViewIndex];\n if (activeCaseIndex !== null) {\n let mask = changeMask;\n if (activeCaseIndex < 0) {\n // Clear the flag.\n // Negative number means that the ICU was freshly created and we need to force the update.\n activeCaseIndex = lView[tIcu.currentCaseLViewIndex] = ~activeCaseIndex;\n // -1 is same as all bits on, which simulates creation since it marks all bits dirty\n mask = -1;\n }\n applyUpdateOpCodes(tView, lView, tIcu.update[activeCaseIndex], bindingsStartIndex, mask);\n }\n}\n/**\n * Apply OpCodes associated with switching a case on ICU.\n *\n * This involves tearing down existing case and than building up a new case.\n *\n * @param tView Current `TView`\n * @param tIcu Current `TIcu`\n * @param lView Current `LView`\n * @param value Value of the case to update to.\n */\nfunction applyIcuSwitchCase(tView, tIcu, lView, value) {\n // Rebuild a new case for this ICU\n const caseIndex = getCaseIndex(tIcu, value);\n let activeCaseIndex = getCurrentICUCaseIndex(tIcu, lView);\n if (activeCaseIndex !== caseIndex) {\n applyIcuSwitchCaseRemove(tView, tIcu, lView);\n lView[tIcu.currentCaseLViewIndex] = caseIndex === null ? null : ~caseIndex;\n if (caseIndex !== null) {\n // Add the nodes for the new case\n const anchorRNode = lView[tIcu.anchorIdx];\n if (anchorRNode) {\n ngDevMode && assertDomNode(anchorRNode);\n applyMutableOpCodes(tView, tIcu.create[caseIndex], lView, anchorRNode);\n }\n }\n }\n}\n/**\n * Apply OpCodes associated with tearing ICU case.\n *\n * This involves tearing down existing case and than building up a new case.\n *\n * @param tView Current `TView`\n * @param tIcu Current `TIcu`\n * @param lView Current `LView`\n */\nfunction applyIcuSwitchCaseRemove(tView, tIcu, lView) {\n let activeCaseIndex = getCurrentICUCaseIndex(tIcu, lView);\n if (activeCaseIndex !== null) {\n const removeCodes = tIcu.remove[activeCaseIndex];\n for (let i = 0; i < removeCodes.length; i++) {\n const nodeOrIcuIndex = removeCodes[i];\n if (nodeOrIcuIndex > 0) {\n // Positive numbers are `RNode`s.\n const rNode = getNativeByIndex(nodeOrIcuIndex, lView);\n rNode !== null && nativeRemoveNode(lView[RENDERER], rNode);\n }\n else {\n // Negative numbers are ICUs\n applyIcuSwitchCaseRemove(tView, getTIcu(tView, ~nodeOrIcuIndex), lView);\n }\n }\n }\n}\n/**\n * Returns the index of the current case of an ICU expression depending on the main binding value\n *\n * @param icuExpression\n * @param bindingValue The value of the main binding used by this ICU expression\n */\nfunction getCaseIndex(icuExpression, bindingValue) {\n let index = icuExpression.cases.indexOf(bindingValue);\n if (index === -1) {\n switch (icuExpression.type) {\n case 1 /* IcuType.plural */: {\n const resolvedCase = getPluralCase(bindingValue, getLocaleId());\n index = icuExpression.cases.indexOf(resolvedCase);\n if (index === -1 && resolvedCase !== 'other') {\n index = icuExpression.cases.indexOf('other');\n }\n break;\n }\n case 0 /* IcuType.select */: {\n index = icuExpression.cases.indexOf('other');\n break;\n }\n }\n }\n return index === -1 ? null : index;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction loadIcuContainerVisitor() {\n const _stack = [];\n let _index = -1;\n let _lView;\n let _removes;\n /**\n * Retrieves a set of root nodes from `TIcu.remove`. Used by `TNodeType.ICUContainer`\n * to determine which root belong to the ICU.\n *\n * Example of usage.\n * ```\n * const nextRNode = icuContainerIteratorStart(tIcuContainerNode, lView);\n * let rNode: RNode|null;\n * while(rNode = nextRNode()) {\n * console.log(rNode);\n * }\n * ```\n *\n * @param tIcuContainerNode Current `TIcuContainerNode`\n * @param lView `LView` where the `RNode`s should be looked up.\n */\n function icuContainerIteratorStart(tIcuContainerNode, lView) {\n _lView = lView;\n while (_stack.length)\n _stack.pop();\n ngDevMode && assertTNodeForLView(tIcuContainerNode, lView);\n enterIcu(tIcuContainerNode.value, lView);\n return icuContainerIteratorNext;\n }\n function enterIcu(tIcu, lView) {\n _index = 0;\n const currentCase = getCurrentICUCaseIndex(tIcu, lView);\n if (currentCase !== null) {\n ngDevMode && assertNumberInRange(currentCase, 0, tIcu.cases.length - 1);\n _removes = tIcu.remove[currentCase];\n }\n else {\n _removes = EMPTY_ARRAY;\n }\n }\n function icuContainerIteratorNext() {\n if (_index < _removes.length) {\n const removeOpCode = _removes[_index++];\n ngDevMode && assertNumber(removeOpCode, 'Expecting OpCode number');\n if (removeOpCode > 0) {\n const rNode = _lView[removeOpCode];\n ngDevMode && assertDomNode(rNode);\n return rNode;\n }\n else {\n _stack.push(_index, _removes);\n // ICUs are represented by negative indices\n const tIcuIndex = ~removeOpCode;\n const tIcu = _lView[TVIEW].data[tIcuIndex];\n ngDevMode && assertTIcu(tIcu);\n enterIcu(tIcu, _lView);\n return icuContainerIteratorNext();\n }\n }\n else {\n if (_stack.length === 0) {\n return null;\n }\n else {\n _removes = _stack.pop();\n _index = _stack.pop();\n return icuContainerIteratorNext();\n }\n }\n }\n return icuContainerIteratorStart;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Patch a `debug` property on top of the existing object.\n *\n * NOTE: always call this method with `ngDevMode && attachDebugObject(...)`\n *\n * @param obj Object to patch\n * @param debug Value to patch\n */\nfunction attachDebugObject(obj, debug) {\n if (ngDevMode) {\n Object.defineProperty(obj, 'debug', { value: debug, enumerable: false });\n }\n else {\n throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');\n }\n}\n/**\n * Patch a `debug` property getter on top of the existing object.\n *\n * NOTE: always call this method with `ngDevMode && attachDebugObject(...)`\n *\n * @param obj Object to patch\n * @param debugGetter Getter returning a value to patch\n */\nfunction attachDebugGetter(obj, debugGetter) {\n if (ngDevMode) {\n Object.defineProperty(obj, 'debug', { get: debugGetter, enumerable: false });\n }\n else {\n throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Converts `I18nCreateOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nCreateOpCodes.debug` property if `ngDevMode` is enabled.\n * This function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nCreateOpCodes` if attached as a method.\n * @param opcodes `I18nCreateOpCodes` if invoked as a function.\n */\nfunction i18nCreateOpCodesToString(opcodes) {\n const createOpCodes = opcodes || (Array.isArray(this) ? this : []);\n let lines = [];\n for (let i = 0; i < createOpCodes.length; i++) {\n const opCode = createOpCodes[i++];\n const text = createOpCodes[i];\n const isComment = (opCode & I18nCreateOpCode.COMMENT) === I18nCreateOpCode.COMMENT;\n const appendNow = (opCode & I18nCreateOpCode.APPEND_EAGERLY) === I18nCreateOpCode.APPEND_EAGERLY;\n const index = opCode >>> I18nCreateOpCode.SHIFT;\n lines.push(`lView[${index}] = document.${isComment ? 'createComment' : 'createText'}(${JSON.stringify(text)});`);\n if (appendNow) {\n lines.push(`parent.appendChild(lView[${index}]);`);\n }\n }\n return lines;\n}\n/**\n * Converts `I18nUpdateOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nUpdateOpCodes.debug` property if `ngDevMode` is enabled.\n * This function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nUpdateOpCodes` if attached as a method.\n * @param opcodes `I18nUpdateOpCodes` if invoked as a function.\n */\nfunction i18nUpdateOpCodesToString(opcodes) {\n const parser = new OpCodeParser(opcodes || (Array.isArray(this) ? this : []));\n let lines = [];\n function consumeOpCode(value) {\n const ref = value >>> 2 /* I18nUpdateOpCode.SHIFT_REF */;\n const opCode = value & 3 /* I18nUpdateOpCode.MASK_OPCODE */;\n switch (opCode) {\n case 0 /* I18nUpdateOpCode.Text */:\n return `(lView[${ref}] as Text).textContent = $$$`;\n case 1 /* I18nUpdateOpCode.Attr */:\n const attrName = parser.consumeString();\n const sanitizationFn = parser.consumeFunction();\n const value = sanitizationFn ? `(${sanitizationFn})($$$)` : '$$$';\n return `(lView[${ref}] as Element).setAttribute('${attrName}', ${value})`;\n case 2 /* I18nUpdateOpCode.IcuSwitch */:\n return `icuSwitchCase(${ref}, $$$)`;\n case 3 /* I18nUpdateOpCode.IcuUpdate */:\n return `icuUpdateCase(${ref})`;\n }\n throw new Error('unexpected OpCode');\n }\n while (parser.hasMore()) {\n let mask = parser.consumeNumber();\n let size = parser.consumeNumber();\n const end = parser.i + size;\n const statements = [];\n let statement = '';\n while (parser.i < end) {\n let value = parser.consumeNumberOrString();\n if (typeof value === 'string') {\n statement += value;\n }\n else if (value < 0) {\n // Negative numbers are ref indexes\n // Here `i` refers to current binding index. It is to signify that the value is relative,\n // rather than absolute.\n statement += '${lView[i' + value + ']}';\n }\n else {\n // Positive numbers are operations.\n const opCodeText = consumeOpCode(value);\n statements.push(opCodeText.replace('$$$', '`' + statement + '`') + ';');\n statement = '';\n }\n }\n lines.push(`if (mask & 0b${mask.toString(2)}) { ${statements.join(' ')} }`);\n }\n return lines;\n}\n/**\n * Converts `I18nCreateOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nCreateOpCodes.debug` if `ngDevMode` is enabled. This\n * function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nCreateOpCodes` if attached as a method.\n * @param opcodes `I18nCreateOpCodes` if invoked as a function.\n */\nfunction icuCreateOpCodesToString(opcodes) {\n const parser = new OpCodeParser(opcodes || (Array.isArray(this) ? this : []));\n let lines = [];\n function consumeOpCode(opCode) {\n const parent = getParentFromIcuCreateOpCode(opCode);\n const ref = getRefFromIcuCreateOpCode(opCode);\n switch (getInstructionFromIcuCreateOpCode(opCode)) {\n case 0 /* IcuCreateOpCode.AppendChild */:\n return `(lView[${parent}] as Element).appendChild(lView[${lastRef}])`;\n case 1 /* IcuCreateOpCode.Attr */:\n return `(lView[${ref}] as Element).setAttribute(\"${parser.consumeString()}\", \"${parser.consumeString()}\")`;\n }\n throw new Error('Unexpected OpCode: ' + getInstructionFromIcuCreateOpCode(opCode));\n }\n let lastRef = -1;\n while (parser.hasMore()) {\n let value = parser.consumeNumberStringOrMarker();\n if (value === ICU_MARKER) {\n const text = parser.consumeString();\n lastRef = parser.consumeNumber();\n lines.push(`lView[${lastRef}] = document.createComment(\"${text}\")`);\n }\n else if (value === ELEMENT_MARKER) {\n const text = parser.consumeString();\n lastRef = parser.consumeNumber();\n lines.push(`lView[${lastRef}] = document.createElement(\"${text}\")`);\n }\n else if (typeof value === 'string') {\n lastRef = parser.consumeNumber();\n lines.push(`lView[${lastRef}] = document.createTextNode(\"${value}\")`);\n }\n else if (typeof value === 'number') {\n const line = consumeOpCode(value);\n line && lines.push(line);\n }\n else {\n throw new Error('Unexpected value');\n }\n }\n return lines;\n}\n/**\n * Converts `I18nRemoveOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nRemoveOpCodes.debug` if `ngDevMode` is enabled. This\n * function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nRemoveOpCodes` if attached as a method.\n * @param opcodes `I18nRemoveOpCodes` if invoked as a function.\n */\nfunction i18nRemoveOpCodesToString(opcodes) {\n const removeCodes = opcodes || (Array.isArray(this) ? this : []);\n let lines = [];\n for (let i = 0; i < removeCodes.length; i++) {\n const nodeOrIcuIndex = removeCodes[i];\n if (nodeOrIcuIndex > 0) {\n // Positive numbers are `RNode`s.\n lines.push(`remove(lView[${nodeOrIcuIndex}])`);\n }\n else {\n // Negative numbers are ICUs\n lines.push(`removeNestedICU(${~nodeOrIcuIndex})`);\n }\n }\n return lines;\n}\nclass OpCodeParser {\n constructor(codes) {\n this.i = 0;\n this.codes = codes;\n }\n hasMore() {\n return this.i < this.codes.length;\n }\n consumeNumber() {\n let value = this.codes[this.i++];\n assertNumber(value, 'expecting number in OpCode');\n return value;\n }\n consumeString() {\n let value = this.codes[this.i++];\n assertString(value, 'expecting string in OpCode');\n return value;\n }\n consumeFunction() {\n let value = this.codes[this.i++];\n if (value === null || typeof value === 'function') {\n return value;\n }\n throw new Error('expecting function in OpCode');\n }\n consumeNumberOrString() {\n let value = this.codes[this.i++];\n if (typeof value === 'string') {\n return value;\n }\n assertNumber(value, 'expecting number or string in OpCode');\n return value;\n }\n consumeNumberStringOrMarker() {\n let value = this.codes[this.i++];\n if (typeof value === 'string' || typeof value === 'number' || value == ICU_MARKER ||\n value == ELEMENT_MARKER) {\n return value;\n }\n assertNumber(value, 'expecting number, string, ICU_MARKER or ELEMENT_MARKER in OpCode');\n return value;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst BINDING_REGEXP = /�(\\d+):?\\d*�/gi;\nconst ICU_REGEXP = /({\\s*�\\d+:?\\d*�\\s*,\\s*\\S{6}\\s*,[\\s\\S]*})/gi;\nconst NESTED_ICU = /�(\\d+)�/;\nconst ICU_BLOCK_REGEXP = /^\\s*(�\\d+:?\\d*�)\\s*,\\s*(select|plural)\\s*,/;\nconst MARKER = `�`;\nconst SUBTEMPLATE_REGEXP = /�\\/?\\*(\\d+:\\d+)�/gi;\nconst PH_REGEXP = /�(\\/?[#*]\\d+):?\\d*�/gi;\n/**\n * Angular Dart introduced &ngsp; as a placeholder for non-removable space, see:\n * https://github.com/dart-lang/angular/blob/0bb611387d29d65b5af7f9d2515ab571fd3fbee4/_tests/test/compiler/preserve_whitespace_test.dart#L25-L32\n * In Angular Dart &ngsp; is converted to the 0xE500 PUA (Private Use Areas) unicode character\n * and later on replaced by a space. We are re-implementing the same idea here, since translations\n * might contain this special character.\n */\nconst NGSP_UNICODE_REGEXP = /\\uE500/g;\nfunction replaceNgsp(value) {\n return value.replace(NGSP_UNICODE_REGEXP, ' ');\n}\n/**\n * Create dynamic nodes from i18n translation block.\n *\n * - Text nodes are created synchronously\n * - TNodes are linked into tree lazily\n *\n * @param tView Current `TView`\n * @parentTNodeIndex index to the parent TNode of this i18n block\n * @param lView Current `LView`\n * @param index Index of `ɵɵi18nStart` instruction.\n * @param message Message to translate.\n * @param subTemplateIndex Index into the sub template of message translation. (ie in case of\n * `ngIf`) (-1 otherwise)\n */\nfunction i18nStartFirstCreatePass(tView, parentTNodeIndex, lView, index, message, subTemplateIndex) {\n const rootTNode = getCurrentParentTNode();\n const createOpCodes = [];\n const updateOpCodes = [];\n const existingTNodeStack = [[]];\n if (ngDevMode) {\n attachDebugGetter(createOpCodes, i18nCreateOpCodesToString);\n attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);\n }\n message = getTranslationForTemplate(message, subTemplateIndex);\n const msgParts = replaceNgsp(message).split(PH_REGEXP);\n for (let i = 0; i < msgParts.length; i++) {\n let value = msgParts[i];\n if ((i & 1) === 0) {\n // Even indexes are text (including bindings & ICU expressions)\n const parts = i18nParseTextIntoPartsAndICU(value);\n for (let j = 0; j < parts.length; j++) {\n let part = parts[j];\n if ((j & 1) === 0) {\n // `j` is odd therefore `part` is string\n const text = part;\n ngDevMode && assertString(text, 'Parsed ICU part should be string');\n if (text !== '') {\n i18nStartFirstCreatePassProcessTextNode(tView, rootTNode, existingTNodeStack[0], createOpCodes, updateOpCodes, lView, text);\n }\n }\n else {\n // `j` is Even therefor `part` is an `ICUExpression`\n const icuExpression = part;\n // Verify that ICU expression has the right shape. Translations might contain invalid\n // constructions (while original messages were correct), so ICU parsing at runtime may\n // not succeed (thus `icuExpression` remains a string).\n // Note: we intentionally retain the error here by not using `ngDevMode`, because\n // the value can change based on the locale and users aren't guaranteed to hit\n // an invalid string while they're developing.\n if (typeof icuExpression !== 'object') {\n throw new Error(`Unable to parse ICU expression in \"${message}\" message.`);\n }\n const icuContainerTNode = createTNodeAndAddOpCode(tView, rootTNode, existingTNodeStack[0], lView, createOpCodes, ngDevMode ? `ICU ${index}:${icuExpression.mainBinding}` : '', true);\n const icuNodeIndex = icuContainerTNode.index;\n ngDevMode &&\n assertGreaterThanOrEqual(icuNodeIndex, HEADER_OFFSET, 'Index must be in absolute LView offset');\n icuStart(tView, lView, updateOpCodes, parentTNodeIndex, icuExpression, icuNodeIndex);\n }\n }\n }\n else {\n // Odd indexes are placeholders (elements and sub-templates)\n // At this point value is something like: '/#1:2' (originally coming from '�/#1:2�')\n const isClosing = value.charCodeAt(0) === 47 /* CharCode.SLASH */;\n const type = value.charCodeAt(isClosing ? 1 : 0);\n ngDevMode && assertOneOf(type, 42 /* CharCode.STAR */, 35 /* CharCode.HASH */);\n const index = HEADER_OFFSET + Number.parseInt(value.substring((isClosing ? 2 : 1)));\n if (isClosing) {\n existingTNodeStack.shift();\n setCurrentTNode(getCurrentParentTNode(), false);\n }\n else {\n const tNode = createTNodePlaceholder(tView, existingTNodeStack[0], index);\n existingTNodeStack.unshift([]);\n setCurrentTNode(tNode, true);\n }\n }\n }\n tView.data[index] = {\n create: createOpCodes,\n update: updateOpCodes,\n };\n}\n/**\n * Allocate space in i18n Range add create OpCode instruction to create a text or comment node.\n *\n * @param tView Current `TView` needed to allocate space in i18n range.\n * @param rootTNode Root `TNode` of the i18n block. This node determines if the new TNode will be\n * added as part of the `i18nStart` instruction or as part of the `TNode.insertBeforeIndex`.\n * @param existingTNodes internal state for `addTNodeAndUpdateInsertBeforeIndex`.\n * @param lView Current `LView` needed to allocate space in i18n range.\n * @param createOpCodes Array storing `I18nCreateOpCodes` where new opCodes will be added.\n * @param text Text to be added when the `Text` or `Comment` node will be created.\n * @param isICU true if a `Comment` node for ICU (instead of `Text`) node should be created.\n */\nfunction createTNodeAndAddOpCode(tView, rootTNode, existingTNodes, lView, createOpCodes, text, isICU) {\n const i18nNodeIdx = allocExpando(tView, lView, 1, null);\n let opCode = i18nNodeIdx << I18nCreateOpCode.SHIFT;\n let parentTNode = getCurrentParentTNode();\n if (rootTNode === parentTNode) {\n // FIXME(misko): A null `parentTNode` should represent when we fall of the `LView` boundary.\n // (there is no parent), but in some circumstances (because we are inconsistent about how we set\n // `previousOrParentTNode`) it could point to `rootTNode` So this is a work around.\n parentTNode = null;\n }\n if (parentTNode === null) {\n // If we don't have a parent that means that we can eagerly add nodes.\n // If we have a parent than these nodes can't be added now (as the parent has not been created\n // yet) and instead the `parentTNode` is responsible for adding it. See\n // `TNode.insertBeforeIndex`\n opCode |= I18nCreateOpCode.APPEND_EAGERLY;\n }\n if (isICU) {\n opCode |= I18nCreateOpCode.COMMENT;\n ensureIcuContainerVisitorLoaded(loadIcuContainerVisitor);\n }\n createOpCodes.push(opCode, text === null ? '' : text);\n // We store `{{?}}` so that when looking at debug `TNodeType.template` we can see where the\n // bindings are.\n const tNode = createTNodeAtIndex(tView, i18nNodeIdx, isICU ? 32 /* TNodeType.Icu */ : 1 /* TNodeType.Text */, text === null ? (ngDevMode ? '{{?}}' : '') : text, null);\n addTNodeAndUpdateInsertBeforeIndex(existingTNodes, tNode);\n const tNodeIdx = tNode.index;\n setCurrentTNode(tNode, false /* Text nodes are self closing */);\n if (parentTNode !== null && rootTNode !== parentTNode) {\n // We are a child of deeper node (rather than a direct child of `i18nStart` instruction.)\n // We have to make sure to add ourselves to the parent.\n setTNodeInsertBeforeIndex(parentTNode, tNodeIdx);\n }\n return tNode;\n}\n/**\n * Processes text node in i18n block.\n *\n * Text nodes can have:\n * - Create instruction in `createOpCodes` for creating the text node.\n * - Allocate spec for text node in i18n range of `LView`\n * - If contains binding:\n * - bindings => allocate space in i18n range of `LView` to store the binding value.\n * - populate `updateOpCodes` with update instructions.\n *\n * @param tView Current `TView`\n * @param rootTNode Root `TNode` of the i18n block. This node determines if the new TNode will\n * be added as part of the `i18nStart` instruction or as part of the\n * `TNode.insertBeforeIndex`.\n * @param existingTNodes internal state for `addTNodeAndUpdateInsertBeforeIndex`.\n * @param createOpCodes Location where the creation OpCodes will be stored.\n * @param lView Current `LView`\n * @param text The translated text (which may contain binding)\n */\nfunction i18nStartFirstCreatePassProcessTextNode(tView, rootTNode, existingTNodes, createOpCodes, updateOpCodes, lView, text) {\n const hasBinding = text.match(BINDING_REGEXP);\n const tNode = createTNodeAndAddOpCode(tView, rootTNode, existingTNodes, lView, createOpCodes, hasBinding ? null : text, false);\n if (hasBinding) {\n generateBindingUpdateOpCodes(updateOpCodes, text, tNode.index, null, 0, null);\n }\n}\n/**\n * See `i18nAttributes` above.\n */\nfunction i18nAttributesFirstPass(tView, index, values) {\n const previousElement = getCurrentTNode();\n const previousElementIndex = previousElement.index;\n const updateOpCodes = [];\n if (ngDevMode) {\n attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);\n }\n if (tView.firstCreatePass && tView.data[index] === null) {\n for (let i = 0; i < values.length; i += 2) {\n const attrName = values[i];\n const message = values[i + 1];\n if (message !== '') {\n // Check if attribute value contains an ICU and throw an error if that's the case.\n // ICUs in element attributes are not supported.\n // Note: we intentionally retain the error here by not using `ngDevMode`, because\n // the `value` can change based on the locale and users aren't guaranteed to hit\n // an invalid string while they're developing.\n if (ICU_REGEXP.test(message)) {\n throw new Error(`ICU expressions are not supported in attributes. Message: \"${message}\".`);\n }\n // i18n attributes that hit this code path are guaranteed to have bindings, because\n // the compiler treats static i18n attributes as regular attribute bindings.\n // Since this may not be the first i18n attribute on this element we need to pass in how\n // many previous bindings there have already been.\n generateBindingUpdateOpCodes(updateOpCodes, message, previousElementIndex, attrName, countBindings(updateOpCodes), null);\n }\n }\n tView.data[index] = updateOpCodes;\n }\n}\n/**\n * Generate the OpCodes to update the bindings of a string.\n *\n * @param updateOpCodes Place where the update opcodes will be stored.\n * @param str The string containing the bindings.\n * @param destinationNode Index of the destination node which will receive the binding.\n * @param attrName Name of the attribute, if the string belongs to an attribute.\n * @param sanitizeFn Sanitization function used to sanitize the string after update, if necessary.\n * @param bindingStart The lView index of the next expression that can be bound via an opCode.\n * @returns The mask value for these bindings\n */\nfunction generateBindingUpdateOpCodes(updateOpCodes, str, destinationNode, attrName, bindingStart, sanitizeFn) {\n ngDevMode &&\n assertGreaterThanOrEqual(destinationNode, HEADER_OFFSET, 'Index must be in absolute LView offset');\n const maskIndex = updateOpCodes.length; // Location of mask\n const sizeIndex = maskIndex + 1; // location of size for skipping\n updateOpCodes.push(null, null); // Alloc space for mask and size\n const startIndex = maskIndex + 2; // location of first allocation.\n if (ngDevMode) {\n attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);\n }\n const textParts = str.split(BINDING_REGEXP);\n let mask = 0;\n for (let j = 0; j < textParts.length; j++) {\n const textValue = textParts[j];\n if (j & 1) {\n // Odd indexes are bindings\n const bindingIndex = bindingStart + parseInt(textValue, 10);\n updateOpCodes.push(-1 - bindingIndex);\n mask = mask | toMaskBit(bindingIndex);\n }\n else if (textValue !== '') {\n // Even indexes are text\n updateOpCodes.push(textValue);\n }\n }\n updateOpCodes.push(destinationNode << 2 /* I18nUpdateOpCode.SHIFT_REF */ |\n (attrName ? 1 /* I18nUpdateOpCode.Attr */ : 0 /* I18nUpdateOpCode.Text */));\n if (attrName) {\n updateOpCodes.push(attrName, sanitizeFn);\n }\n updateOpCodes[maskIndex] = mask;\n updateOpCodes[sizeIndex] = updateOpCodes.length - startIndex;\n return mask;\n}\n/**\n * Count the number of bindings in the given `opCodes`.\n *\n * It could be possible to speed this up, by passing the number of bindings found back from\n * `generateBindingUpdateOpCodes()` to `i18nAttributesFirstPass()` but this would then require more\n * complexity in the code and/or transient objects to be created.\n *\n * Since this function is only called once when the template is instantiated, is trivial in the\n * first instance (since `opCodes` will be an empty array), and it is not common for elements to\n * contain multiple i18n bound attributes, it seems like this is a reasonable compromise.\n */\nfunction countBindings(opCodes) {\n let count = 0;\n for (let i = 0; i < opCodes.length; i++) {\n const opCode = opCodes[i];\n // Bindings are negative numbers.\n if (typeof opCode === 'number' && opCode < 0) {\n count++;\n }\n }\n return count;\n}\n/**\n * Convert binding index to mask bit.\n *\n * Each index represents a single bit on the bit-mask. Because bit-mask only has 32 bits, we make\n * the 32nd bit share all masks for all bindings higher than 32. Since it is extremely rare to\n * have more than 32 bindings this will be hit very rarely. The downside of hitting this corner\n * case is that we will execute binding code more often than necessary. (penalty of performance)\n */\nfunction toMaskBit(bindingIndex) {\n return 1 << Math.min(bindingIndex, 31);\n}\nfunction isRootTemplateMessage(subTemplateIndex) {\n return subTemplateIndex === -1;\n}\n/**\n * Removes everything inside the sub-templates of a message.\n */\nfunction removeInnerTemplateTranslation(message) {\n let match;\n let res = '';\n let index = 0;\n let inTemplate = false;\n let tagMatched;\n while ((match = SUBTEMPLATE_REGEXP.exec(message)) !== null) {\n if (!inTemplate) {\n res += message.substring(index, match.index + match[0].length);\n tagMatched = match[1];\n inTemplate = true;\n }\n else {\n if (match[0] === `${MARKER}/*${tagMatched}${MARKER}`) {\n index = match.index;\n inTemplate = false;\n }\n }\n }\n ngDevMode &&\n assertEqual(inTemplate, false, `Tag mismatch: unable to find the end of the sub-template in the translation \"${message}\"`);\n res += message.slice(index);\n return res;\n}\n/**\n * Extracts a part of a message and removes the rest.\n *\n * This method is used for extracting a part of the message associated with a template. A\n * translated message can span multiple templates.\n *\n * Example:\n * ```\n * <div i18n>Translate <span *ngIf>me</span>!</div>\n * ```\n *\n * @param message The message to crop\n * @param subTemplateIndex Index of the sub-template to extract. If undefined it returns the\n * external template and removes all sub-templates.\n */\nfunction getTranslationForTemplate(message, subTemplateIndex) {\n if (isRootTemplateMessage(subTemplateIndex)) {\n // We want the root template message, ignore all sub-templates\n return removeInnerTemplateTranslation(message);\n }\n else {\n // We want a specific sub-template\n const start = message.indexOf(`:${subTemplateIndex}${MARKER}`) + 2 + subTemplateIndex.toString().length;\n const end = message.search(new RegExp(`${MARKER}\\\\/\\\\*\\\\d+:${subTemplateIndex}${MARKER}`));\n return removeInnerTemplateTranslation(message.substring(start, end));\n }\n}\n/**\n * Generate the OpCodes for ICU expressions.\n *\n * @param icuExpression\n * @param index Index where the anchor is stored and an optional `TIcuContainerNode`\n * - `lView[anchorIdx]` points to a `Comment` node representing the anchor for the ICU.\n * - `tView.data[anchorIdx]` points to the `TIcuContainerNode` if ICU is root (`null` otherwise)\n */\nfunction icuStart(tView, lView, updateOpCodes, parentIdx, icuExpression, anchorIdx) {\n ngDevMode && assertDefined(icuExpression, 'ICU expression must be defined');\n let bindingMask = 0;\n const tIcu = {\n type: icuExpression.type,\n currentCaseLViewIndex: allocExpando(tView, lView, 1, null),\n anchorIdx,\n cases: [],\n create: [],\n remove: [],\n update: []\n };\n addUpdateIcuSwitch(updateOpCodes, icuExpression, anchorIdx);\n setTIcu(tView, anchorIdx, tIcu);\n const values = icuExpression.values;\n for (let i = 0; i < values.length; i++) {\n // Each value is an array of strings & other ICU expressions\n const valueArr = values[i];\n const nestedIcus = [];\n for (let j = 0; j < valueArr.length; j++) {\n const value = valueArr[j];\n if (typeof value !== 'string') {\n // It is an nested ICU expression\n const icuIndex = nestedIcus.push(value) - 1;\n // Replace nested ICU expression by a comment node\n valueArr[j] = `<!--�${icuIndex}�-->`;\n }\n }\n bindingMask = parseIcuCase(tView, tIcu, lView, updateOpCodes, parentIdx, icuExpression.cases[i], valueArr.join(''), nestedIcus) |\n bindingMask;\n }\n if (bindingMask) {\n addUpdateIcuUpdate(updateOpCodes, bindingMask, anchorIdx);\n }\n}\n/**\n * Parses text containing an ICU expression and produces a JSON object for it.\n * Original code from closure library, modified for Angular.\n *\n * @param pattern Text containing an ICU expression that needs to be parsed.\n *\n */\nfunction parseICUBlock(pattern) {\n const cases = [];\n const values = [];\n let icuType = 1 /* IcuType.plural */;\n let mainBinding = 0;\n pattern = pattern.replace(ICU_BLOCK_REGEXP, function (str, binding, type) {\n if (type === 'select') {\n icuType = 0 /* IcuType.select */;\n }\n else {\n icuType = 1 /* IcuType.plural */;\n }\n mainBinding = parseInt(binding.slice(1), 10);\n return '';\n });\n const parts = i18nParseTextIntoPartsAndICU(pattern);\n // Looking for (key block)+ sequence. One of the keys has to be \"other\".\n for (let pos = 0; pos < parts.length;) {\n let key = parts[pos++].trim();\n if (icuType === 1 /* IcuType.plural */) {\n // Key can be \"=x\", we just want \"x\"\n key = key.replace(/\\s*(?:=)?(\\w+)\\s*/, '$1');\n }\n if (key.length) {\n cases.push(key);\n }\n const blocks = i18nParseTextIntoPartsAndICU(parts[pos++]);\n if (cases.length > values.length) {\n values.push(blocks);\n }\n }\n // TODO(ocombe): support ICU expressions in attributes, see #21615\n return { type: icuType, mainBinding: mainBinding, cases, values };\n}\n/**\n * Breaks pattern into strings and top level {...} blocks.\n * Can be used to break a message into text and ICU expressions, or to break an ICU expression\n * into keys and cases. Original code from closure library, modified for Angular.\n *\n * @param pattern (sub)Pattern to be broken.\n * @returns An `Array<string|IcuExpression>` where:\n * - odd positions: `string` => text between ICU expressions\n * - even positions: `ICUExpression` => ICU expression parsed into `ICUExpression` record.\n */\nfunction i18nParseTextIntoPartsAndICU(pattern) {\n if (!pattern) {\n return [];\n }\n let prevPos = 0;\n const braceStack = [];\n const results = [];\n const braces = /[{}]/g;\n // lastIndex doesn't get set to 0 so we have to.\n braces.lastIndex = 0;\n let match;\n while (match = braces.exec(pattern)) {\n const pos = match.index;\n if (match[0] == '}') {\n braceStack.pop();\n if (braceStack.length == 0) {\n // End of the block.\n const block = pattern.substring(prevPos, pos);\n if (ICU_BLOCK_REGEXP.test(block)) {\n results.push(parseICUBlock(block));\n }\n else {\n results.push(block);\n }\n prevPos = pos + 1;\n }\n }\n else {\n if (braceStack.length == 0) {\n const substring = pattern.substring(prevPos, pos);\n results.push(substring);\n prevPos = pos + 1;\n }\n braceStack.push('{');\n }\n }\n const substring = pattern.substring(prevPos);\n results.push(substring);\n return results;\n}\n/**\n * Parses a node, its children and its siblings, and generates the mutate & update OpCodes.\n *\n */\nfunction parseIcuCase(tView, tIcu, lView, updateOpCodes, parentIdx, caseName, unsafeCaseHtml, nestedIcus) {\n const create = [];\n const remove = [];\n const update = [];\n if (ngDevMode) {\n attachDebugGetter(create, icuCreateOpCodesToString);\n attachDebugGetter(remove, i18nRemoveOpCodesToString);\n attachDebugGetter(update, i18nUpdateOpCodesToString);\n }\n tIcu.cases.push(caseName);\n tIcu.create.push(create);\n tIcu.remove.push(remove);\n tIcu.update.push(update);\n const inertBodyHelper = getInertBodyHelper(getDocument());\n const inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeCaseHtml);\n ngDevMode && assertDefined(inertBodyElement, 'Unable to generate inert body element');\n const inertRootNode = getTemplateContent(inertBodyElement) || inertBodyElement;\n if (inertRootNode) {\n return walkIcuTree(tView, tIcu, lView, updateOpCodes, create, remove, update, inertRootNode, parentIdx, nestedIcus, 0);\n }\n else {\n return 0;\n }\n}\nfunction walkIcuTree(tView, tIcu, lView, sharedUpdateOpCodes, create, remove, update, parentNode, parentIdx, nestedIcus, depth) {\n let bindingMask = 0;\n let currentNode = parentNode.firstChild;\n while (currentNode) {\n const newIndex = allocExpando(tView, lView, 1, null);\n switch (currentNode.nodeType) {\n case Node.ELEMENT_NODE:\n const element = currentNode;\n const tagName = element.tagName.toLowerCase();\n if (VALID_ELEMENTS.hasOwnProperty(tagName)) {\n addCreateNodeAndAppend(create, ELEMENT_MARKER, tagName, parentIdx, newIndex);\n tView.data[newIndex] = tagName;\n const elAttrs = element.attributes;\n for (let i = 0; i < elAttrs.length; i++) {\n const attr = elAttrs.item(i);\n const lowerAttrName = attr.name.toLowerCase();\n const hasBinding = !!attr.value.match(BINDING_REGEXP);\n // we assume the input string is safe, unless it's using a binding\n if (hasBinding) {\n if (VALID_ATTRS.hasOwnProperty(lowerAttrName)) {\n if (URI_ATTRS[lowerAttrName]) {\n generateBindingUpdateOpCodes(update, attr.value, newIndex, attr.name, 0, _sanitizeUrl);\n }\n else {\n generateBindingUpdateOpCodes(update, attr.value, newIndex, attr.name, 0, null);\n }\n }\n else {\n ngDevMode &&\n console.warn(`WARNING: ignoring unsafe attribute value ` +\n `${lowerAttrName} on element ${tagName} ` +\n `(see ${XSS_SECURITY_URL})`);\n }\n }\n else {\n addCreateAttribute(create, newIndex, attr);\n }\n }\n // Parse the children of this node (if any)\n bindingMask = walkIcuTree(tView, tIcu, lView, sharedUpdateOpCodes, create, remove, update, currentNode, newIndex, nestedIcus, depth + 1) |\n bindingMask;\n addRemoveNode(remove, newIndex, depth);\n }\n break;\n case Node.TEXT_NODE:\n const value = currentNode.textContent || '';\n const hasBinding = value.match(BINDING_REGEXP);\n addCreateNodeAndAppend(create, null, hasBinding ? '' : value, parentIdx, newIndex);\n addRemoveNode(remove, newIndex, depth);\n if (hasBinding) {\n bindingMask =\n generateBindingUpdateOpCodes(update, value, newIndex, null, 0, null) | bindingMask;\n }\n break;\n case Node.COMMENT_NODE:\n // Check if the comment node is a placeholder for a nested ICU\n const isNestedIcu = NESTED_ICU.exec(currentNode.textContent || '');\n if (isNestedIcu) {\n const nestedIcuIndex = parseInt(isNestedIcu[1], 10);\n const icuExpression = nestedIcus[nestedIcuIndex];\n // Create the comment node that will anchor the ICU expression\n addCreateNodeAndAppend(create, ICU_MARKER, ngDevMode ? `nested ICU ${nestedIcuIndex}` : '', parentIdx, newIndex);\n icuStart(tView, lView, sharedUpdateOpCodes, parentIdx, icuExpression, newIndex);\n addRemoveNestedIcu(remove, newIndex, depth);\n }\n break;\n }\n currentNode = currentNode.nextSibling;\n }\n return bindingMask;\n}\nfunction addRemoveNode(remove, index, depth) {\n if (depth === 0) {\n remove.push(index);\n }\n}\nfunction addRemoveNestedIcu(remove, index, depth) {\n if (depth === 0) {\n remove.push(~index); // remove ICU at `index`\n remove.push(index); // remove ICU comment at `index`\n }\n}\nfunction addUpdateIcuSwitch(update, icuExpression, index) {\n update.push(toMaskBit(icuExpression.mainBinding), 2, -1 - icuExpression.mainBinding, index << 2 /* I18nUpdateOpCode.SHIFT_REF */ | 2 /* I18nUpdateOpCode.IcuSwitch */);\n}\nfunction addUpdateIcuUpdate(update, bindingMask, index) {\n update.push(bindingMask, 1, index << 2 /* I18nUpdateOpCode.SHIFT_REF */ | 3 /* I18nUpdateOpCode.IcuUpdate */);\n}\nfunction addCreateNodeAndAppend(create, marker, text, appendToParentIdx, createAtIdx) {\n if (marker !== null) {\n create.push(marker);\n }\n create.push(text, createAtIdx, icuCreateOpCode(0 /* IcuCreateOpCode.AppendChild */, appendToParentIdx, createAtIdx));\n}\nfunction addCreateAttribute(create, newIndex, attr) {\n create.push(newIndex << 1 /* IcuCreateOpCode.SHIFT_REF */ | 1 /* IcuCreateOpCode.Attr */, attr.name, attr.value);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// i18nPostprocess consts\nconst ROOT_TEMPLATE_ID = 0;\nconst PP_MULTI_VALUE_PLACEHOLDERS_REGEXP = /\\[(�.+?�?)\\]/;\nconst PP_PLACEHOLDERS_REGEXP = /\\[(�.+?�?)\\]|(�\\/?\\*\\d+:\\d+�)/g;\nconst PP_ICU_VARS_REGEXP = /({\\s*)(VAR_(PLURAL|SELECT)(_\\d+)?)(\\s*,)/g;\nconst PP_ICU_PLACEHOLDERS_REGEXP = /{([A-Z0-9_]+)}/g;\nconst PP_ICUS_REGEXP = /�I18N_EXP_(ICU(_\\d+)?)�/g;\nconst PP_CLOSE_TEMPLATE_REGEXP = /\\/\\*/;\nconst PP_TEMPLATE_ID_REGEXP = /\\d+\\:(\\d+)/;\n/**\n * Handles message string post-processing for internationalization.\n *\n * Handles message string post-processing by transforming it from intermediate\n * format (that might contain some markers that we need to replace) to the final\n * form, consumable by i18nStart instruction. Post processing steps include:\n *\n * 1. Resolve all multi-value cases (like [�*1:1��#2:1�|�#4:1�|�5�])\n * 2. Replace all ICU vars (like \"VAR_PLURAL\")\n * 3. Replace all placeholders used inside ICUs in a form of {PLACEHOLDER}\n * 4. Replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�)\n * in case multiple ICUs have the same placeholder name\n *\n * @param message Raw translation string for post processing\n * @param replacements Set of replacements that should be applied\n *\n * @returns Transformed string that can be consumed by i18nStart instruction\n *\n * @codeGenApi\n */\nfunction i18nPostprocess(message, replacements = {}) {\n /**\n * Step 1: resolve all multi-value placeholders like [�#5�|�*1:1��#2:1�|�#4:1�]\n *\n * Note: due to the way we process nested templates (BFS), multi-value placeholders are typically\n * grouped by templates, for example: [�#5�|�#6�|�#1:1�|�#3:2�] where �#5� and �#6� belong to root\n * template, �#1:1� belong to nested template with index 1 and �#1:2� - nested template with index\n * 3. However in real templates the order might be different: i.e. �#1:1� and/or �#3:2� may go in\n * front of �#6�. The post processing step restores the right order by keeping track of the\n * template id stack and looks for placeholders that belong to the currently active template.\n */\n let result = message;\n if (PP_MULTI_VALUE_PLACEHOLDERS_REGEXP.test(message)) {\n const matches = {};\n const templateIdsStack = [ROOT_TEMPLATE_ID];\n result = result.replace(PP_PLACEHOLDERS_REGEXP, (m, phs, tmpl) => {\n const content = phs || tmpl;\n const placeholders = matches[content] || [];\n if (!placeholders.length) {\n content.split('|').forEach((placeholder) => {\n const match = placeholder.match(PP_TEMPLATE_ID_REGEXP);\n const templateId = match ? parseInt(match[1], 10) : ROOT_TEMPLATE_ID;\n const isCloseTemplateTag = PP_CLOSE_TEMPLATE_REGEXP.test(placeholder);\n placeholders.push([templateId, isCloseTemplateTag, placeholder]);\n });\n matches[content] = placeholders;\n }\n if (!placeholders.length) {\n throw new Error(`i18n postprocess: unmatched placeholder - ${content}`);\n }\n const currentTemplateId = templateIdsStack[templateIdsStack.length - 1];\n let idx = 0;\n // find placeholder index that matches current template id\n for (let i = 0; i < placeholders.length; i++) {\n if (placeholders[i][0] === currentTemplateId) {\n idx = i;\n break;\n }\n }\n // update template id stack based on the current tag extracted\n const [templateId, isCloseTemplateTag, placeholder] = placeholders[idx];\n if (isCloseTemplateTag) {\n templateIdsStack.pop();\n }\n else if (currentTemplateId !== templateId) {\n templateIdsStack.push(templateId);\n }\n // remove processed tag from the list\n placeholders.splice(idx, 1);\n return placeholder;\n });\n }\n // return current result if no replacements specified\n if (!Object.keys(replacements).length) {\n return result;\n }\n /**\n * Step 2: replace all ICU vars (like \"VAR_PLURAL\")\n */\n result = result.replace(PP_ICU_VARS_REGEXP, (match, start, key, _type, _idx, end) => {\n return replacements.hasOwnProperty(key) ? `${start}${replacements[key]}${end}` : match;\n });\n /**\n * Step 3: replace all placeholders used inside ICUs in a form of {PLACEHOLDER}\n */\n result = result.replace(PP_ICU_PLACEHOLDERS_REGEXP, (match, key) => {\n return replacements.hasOwnProperty(key) ? replacements[key] : match;\n });\n /**\n * Step 4: replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�) in case\n * multiple ICUs have the same placeholder name\n */\n result = result.replace(PP_ICUS_REGEXP, (match, key) => {\n if (replacements.hasOwnProperty(key)) {\n const list = replacements[key];\n if (!list.length) {\n throw new Error(`i18n postprocess: unmatched ICU - ${match} with key: ${key}`);\n }\n return list.shift();\n }\n return match;\n });\n return result;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Marks a block of text as translatable.\n *\n * The instructions `i18nStart` and `i18nEnd` mark the translation block in the template.\n * The translation `message` is the value which is locale specific. The translation string may\n * contain placeholders which associate inner elements and sub-templates within the translation.\n *\n * The translation `message` placeholders are:\n * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be\n * interpolated into. The placeholder `index` points to the expression binding index. An optional\n * `block` that matches the sub-template in which it was declared.\n * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*: Marks the beginning\n * and end of DOM element that were embedded in the original translation block. The placeholder\n * `index` points to the element index in the template instructions set. An optional `block` that\n * matches the sub-template in which it was declared.\n * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be\n * split up and translated separately in each angular template function. The `index` points to the\n * `template` instruction index. A `block` that matches the sub-template in which it was declared.\n *\n * @param index A unique index of the translation in the static block.\n * @param messageIndex An index of the translation message from the `def.consts` array.\n * @param subTemplateIndex Optional sub-template index in the `message`.\n *\n * @codeGenApi\n */\nfunction ɵɵi18nStart(index, messageIndex, subTemplateIndex = -1) {\n const tView = getTView();\n const lView = getLView();\n const adjustedIndex = HEADER_OFFSET + index;\n ngDevMode && assertDefined(tView, `tView should be defined`);\n const message = getConstant(tView.consts, messageIndex);\n const parentTNode = getCurrentParentTNode();\n if (tView.firstCreatePass) {\n i18nStartFirstCreatePass(tView, parentTNode === null ? 0 : parentTNode.index, lView, adjustedIndex, message, subTemplateIndex);\n }\n const tI18n = tView.data[adjustedIndex];\n const sameViewParentTNode = parentTNode === lView[T_HOST] ? null : parentTNode;\n const parentRNode = getClosestRElement(tView, sameViewParentTNode, lView);\n // If `parentTNode` is an `ElementContainer` than it has `<!--ng-container--->`.\n // When we do inserts we have to make sure to insert in front of `<!--ng-container--->`.\n const insertInFrontOf = parentTNode && (parentTNode.type & 8 /* TNodeType.ElementContainer */) ?\n lView[parentTNode.index] :\n null;\n applyCreateOpCodes(lView, tI18n.create, parentRNode, insertInFrontOf);\n setInI18nBlock(true);\n}\n/**\n * Translates a translation block marked by `i18nStart` and `i18nEnd`. It inserts the text/ICU nodes\n * into the render tree, moves the placeholder nodes and removes the deleted nodes.\n *\n * @codeGenApi\n */\nfunction ɵɵi18nEnd() {\n setInI18nBlock(false);\n}\n/**\n *\n * Use this instruction to create a translation block that doesn't contain any placeholder.\n * It calls both {@link i18nStart} and {@link i18nEnd} in one instruction.\n *\n * The translation `message` is the value which is locale specific. The translation string may\n * contain placeholders which associate inner elements and sub-templates within the translation.\n *\n * The translation `message` placeholders are:\n * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be\n * interpolated into. The placeholder `index` points to the expression binding index. An optional\n * `block` that matches the sub-template in which it was declared.\n * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*: Marks the beginning\n * and end of DOM element that were embedded in the original translation block. The placeholder\n * `index` points to the element index in the template instructions set. An optional `block` that\n * matches the sub-template in which it was declared.\n * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be\n * split up and translated separately in each angular template function. The `index` points to the\n * `template` instruction index. A `block` that matches the sub-template in which it was declared.\n *\n * @param index A unique index of the translation in the static block.\n * @param messageIndex An index of the translation message from the `def.consts` array.\n * @param subTemplateIndex Optional sub-template index in the `message`.\n *\n * @codeGenApi\n */\nfunction ɵɵi18n(index, messageIndex, subTemplateIndex) {\n ɵɵi18nStart(index, messageIndex, subTemplateIndex);\n ɵɵi18nEnd();\n}\n/**\n * Marks a list of attributes as translatable.\n *\n * @param index A unique index in the static block\n * @param values\n *\n * @codeGenApi\n */\nfunction ɵɵi18nAttributes(index, attrsIndex) {\n const tView = getTView();\n ngDevMode && assertDefined(tView, `tView should be defined`);\n const attrs = getConstant(tView.consts, attrsIndex);\n i18nAttributesFirstPass(tView, index + HEADER_OFFSET, attrs);\n}\n/**\n * Stores the values of the bindings during each update cycle in order to determine if we need to\n * update the translated nodes.\n *\n * @param value The binding's value\n * @returns This function returns itself so that it may be chained\n * (e.g. `i18nExp(ctx.name)(ctx.title)`)\n *\n * @codeGenApi\n */\nfunction ɵɵi18nExp(value) {\n const lView = getLView();\n setMaskBit(bindingUpdated(lView, nextBindingIndex(), value));\n return ɵɵi18nExp;\n}\n/**\n * Updates a translation block or an i18n attribute when the bindings have changed.\n *\n * @param index Index of either {@link i18nStart} (translation block) or {@link i18nAttributes}\n * (i18n attribute) on which it should update the content.\n *\n * @codeGenApi\n */\nfunction ɵɵi18nApply(index) {\n applyI18n(getTView(), getLView(), index + HEADER_OFFSET);\n}\n/**\n * Handles message string post-processing for internationalization.\n *\n * Handles message string post-processing by transforming it from intermediate\n * format (that might contain some markers that we need to replace) to the final\n * form, consumable by i18nStart instruction. Post processing steps include:\n *\n * 1. Resolve all multi-value cases (like [�*1:1��#2:1�|�#4:1�|�5�])\n * 2. Replace all ICU vars (like \"VAR_PLURAL\")\n * 3. Replace all placeholders used inside ICUs in a form of {PLACEHOLDER}\n * 4. Replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�)\n * in case multiple ICUs have the same placeholder name\n *\n * @param message Raw translation string for post processing\n * @param replacements Set of replacements that should be applied\n *\n * @returns Transformed string that can be consumed by i18nStart instruction\n *\n * @codeGenApi\n */\nfunction ɵɵi18nPostprocess(message, replacements = {}) {\n return i18nPostprocess(message, replacements);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Resolves the providers which are defined in the DirectiveDef.\n *\n * When inserting the tokens and the factories in their respective arrays, we can assume that\n * this method is called first for the component (if any), and then for other directives on the same\n * node.\n * As a consequence,the providers are always processed in that order:\n * 1) The view providers of the component\n * 2) The providers of the component\n * 3) The providers of the other directives\n * This matches the structure of the injectables arrays of a view (for each node).\n * So the tokens and the factories can be pushed at the end of the arrays, except\n * in one case for multi providers.\n *\n * @param def the directive definition\n * @param providers: Array of `providers`.\n * @param viewProviders: Array of `viewProviders`.\n */\nfunction providersResolver(def, providers, viewProviders) {\n const tView = getTView();\n if (tView.firstCreatePass) {\n const isComponent = isComponentDef(def);\n // The list of view providers is processed first, and the flags are updated\n resolveProvider(viewProviders, tView.data, tView.blueprint, isComponent, true);\n // Then, the list of providers is processed, and the flags are updated\n resolveProvider(providers, tView.data, tView.blueprint, isComponent, false);\n }\n}\n/**\n * Resolves a provider and publishes it to the DI system.\n */\nfunction resolveProvider(provider, tInjectables, lInjectablesBlueprint, isComponent, isViewProvider) {\n provider = resolveForwardRef(provider);\n if (Array.isArray(provider)) {\n // Recursively call `resolveProvider`\n // Recursion is OK in this case because this code will not be in hot-path once we implement\n // cloning of the initial state.\n for (let i = 0; i < provider.length; i++) {\n resolveProvider(provider[i], tInjectables, lInjectablesBlueprint, isComponent, isViewProvider);\n }\n }\n else {\n const tView = getTView();\n const lView = getLView();\n let token = isTypeProvider(provider) ? provider : resolveForwardRef(provider.provide);\n let providerFactory = providerToFactory(provider);\n const tNode = getCurrentTNode();\n const beginIndex = tNode.providerIndexes & 1048575 /* TNodeProviderIndexes.ProvidersStartIndexMask */;\n const endIndex = tNode.directiveStart;\n const cptViewProvidersCount = tNode.providerIndexes >> 20 /* TNodeProviderIndexes.CptViewProvidersCountShift */;\n if (isTypeProvider(provider) || !provider.multi) {\n // Single provider case: the factory is created and pushed immediately\n const factory = new NodeInjectorFactory(providerFactory, isViewProvider, ɵɵdirectiveInject);\n const existingFactoryIndex = indexOf(token, tInjectables, isViewProvider ? beginIndex : beginIndex + cptViewProvidersCount, endIndex);\n if (existingFactoryIndex === -1) {\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, token);\n registerDestroyHooksIfSupported(tView, provider, tInjectables.length);\n tInjectables.push(token);\n tNode.directiveStart++;\n tNode.directiveEnd++;\n if (isViewProvider) {\n tNode.providerIndexes += 1048576 /* TNodeProviderIndexes.CptViewProvidersCountShifter */;\n }\n lInjectablesBlueprint.push(factory);\n lView.push(factory);\n }\n else {\n lInjectablesBlueprint[existingFactoryIndex] = factory;\n lView[existingFactoryIndex] = factory;\n }\n }\n else {\n // Multi provider case:\n // We create a multi factory which is going to aggregate all the values.\n // Since the output of such a factory depends on content or view injection,\n // we create two of them, which are linked together.\n //\n // The first one (for view providers) is always in the first block of the injectables array,\n // and the second one (for providers) is always in the second block.\n // This is important because view providers have higher priority. When a multi token\n // is being looked up, the view providers should be found first.\n // Note that it is not possible to have a multi factory in the third block (directive block).\n //\n // The algorithm to process multi providers is as follows:\n // 1) If the multi provider comes from the `viewProviders` of the component:\n // a) If the special view providers factory doesn't exist, it is created and pushed.\n // b) Else, the multi provider is added to the existing multi factory.\n // 2) If the multi provider comes from the `providers` of the component or of another\n // directive:\n // a) If the multi factory doesn't exist, it is created and provider pushed into it.\n // It is also linked to the multi factory for view providers, if it exists.\n // b) Else, the multi provider is added to the existing multi factory.\n const existingProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex + cptViewProvidersCount, endIndex);\n const existingViewProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex, beginIndex + cptViewProvidersCount);\n const doesProvidersFactoryExist = existingProvidersFactoryIndex >= 0 &&\n lInjectablesBlueprint[existingProvidersFactoryIndex];\n const doesViewProvidersFactoryExist = existingViewProvidersFactoryIndex >= 0 &&\n lInjectablesBlueprint[existingViewProvidersFactoryIndex];\n if (isViewProvider && !doesViewProvidersFactoryExist ||\n !isViewProvider && !doesProvidersFactoryExist) {\n // Cases 1.a and 2.a\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, token);\n const factory = multiFactory(isViewProvider ? multiViewProvidersFactoryResolver : multiProvidersFactoryResolver, lInjectablesBlueprint.length, isViewProvider, isComponent, providerFactory);\n if (!isViewProvider && doesViewProvidersFactoryExist) {\n lInjectablesBlueprint[existingViewProvidersFactoryIndex].providerFactory = factory;\n }\n registerDestroyHooksIfSupported(tView, provider, tInjectables.length, 0);\n tInjectables.push(token);\n tNode.directiveStart++;\n tNode.directiveEnd++;\n if (isViewProvider) {\n tNode.providerIndexes += 1048576 /* TNodeProviderIndexes.CptViewProvidersCountShifter */;\n }\n lInjectablesBlueprint.push(factory);\n lView.push(factory);\n }\n else {\n // Cases 1.b and 2.b\n const indexInFactory = multiFactoryAdd(lInjectablesBlueprint[isViewProvider ? existingViewProvidersFactoryIndex :\n existingProvidersFactoryIndex], providerFactory, !isViewProvider && isComponent);\n registerDestroyHooksIfSupported(tView, provider, existingProvidersFactoryIndex > -1 ? existingProvidersFactoryIndex :\n existingViewProvidersFactoryIndex, indexInFactory);\n }\n if (!isViewProvider && isComponent && doesViewProvidersFactoryExist) {\n lInjectablesBlueprint[existingViewProvidersFactoryIndex].componentProviders++;\n }\n }\n }\n}\n/**\n * Registers the `ngOnDestroy` hook of a provider, if the provider supports destroy hooks.\n * @param tView `TView` in which to register the hook.\n * @param provider Provider whose hook should be registered.\n * @param contextIndex Index under which to find the context for the hook when it's being invoked.\n * @param indexInFactory Only required for `multi` providers. Index of the provider in the multi\n * provider factory.\n */\nfunction registerDestroyHooksIfSupported(tView, provider, contextIndex, indexInFactory) {\n const providerIsTypeProvider = isTypeProvider(provider);\n const providerIsClassProvider = isClassProvider(provider);\n if (providerIsTypeProvider || providerIsClassProvider) {\n // Resolve forward references as `useClass` can hold a forward reference.\n const classToken = providerIsClassProvider ? resolveForwardRef(provider.useClass) : provider;\n const prototype = classToken.prototype;\n const ngOnDestroy = prototype.ngOnDestroy;\n if (ngOnDestroy) {\n const hooks = tView.destroyHooks || (tView.destroyHooks = []);\n if (!providerIsTypeProvider && provider.multi) {\n ngDevMode &&\n assertDefined(indexInFactory, 'indexInFactory when registering multi factory destroy hook');\n const existingCallbacksIndex = hooks.indexOf(contextIndex);\n if (existingCallbacksIndex === -1) {\n hooks.push(contextIndex, [indexInFactory, ngOnDestroy]);\n }\n else {\n hooks[existingCallbacksIndex + 1].push(indexInFactory, ngOnDestroy);\n }\n }\n else {\n hooks.push(contextIndex, ngOnDestroy);\n }\n }\n }\n}\n/**\n * Add a factory in a multi factory.\n * @returns Index at which the factory was inserted.\n */\nfunction multiFactoryAdd(multiFactory, factory, isComponentProvider) {\n if (isComponentProvider) {\n multiFactory.componentProviders++;\n }\n return multiFactory.multi.push(factory) - 1;\n}\n/**\n * Returns the index of item in the array, but only in the begin to end range.\n */\nfunction indexOf(item, arr, begin, end) {\n for (let i = begin; i < end; i++) {\n if (arr[i] === item)\n return i;\n }\n return -1;\n}\n/**\n * Use this with `multi` `providers`.\n */\nfunction multiProvidersFactoryResolver(_, tData, lData, tNode) {\n return multiResolve(this.multi, []);\n}\n/**\n * Use this with `multi` `viewProviders`.\n *\n * This factory knows how to concatenate itself with the existing `multi` `providers`.\n */\nfunction multiViewProvidersFactoryResolver(_, tData, lView, tNode) {\n const factories = this.multi;\n let result;\n if (this.providerFactory) {\n const componentCount = this.providerFactory.componentProviders;\n const multiProviders = getNodeInjectable(lView, lView[TVIEW], this.providerFactory.index, tNode);\n // Copy the section of the array which contains `multi` `providers` from the component\n result = multiProviders.slice(0, componentCount);\n // Insert the `viewProvider` instances.\n multiResolve(factories, result);\n // Copy the section of the array which contains `multi` `providers` from other directives\n for (let i = componentCount; i < multiProviders.length; i++) {\n result.push(multiProviders[i]);\n }\n }\n else {\n result = [];\n // Insert the `viewProvider` instances.\n multiResolve(factories, result);\n }\n return result;\n}\n/**\n * Maps an array of factories into an array of values.\n */\nfunction multiResolve(factories, result) {\n for (let i = 0; i < factories.length; i++) {\n const factory = factories[i];\n result.push(factory());\n }\n return result;\n}\n/**\n * Creates a multi factory.\n */\nfunction multiFactory(factoryFn, index, isViewProvider, isComponent, f) {\n const factory = new NodeInjectorFactory(factoryFn, isViewProvider, ɵɵdirectiveInject);\n factory.multi = [];\n factory.index = index;\n factory.componentProviders = 0;\n multiFactoryAdd(factory, f, isComponent && !isViewProvider);\n return factory;\n}\n\n/**\n * This feature resolves the providers of a directive (or component),\n * and publish them into the DI system, making it visible to others for injection.\n *\n * For example:\n * ```ts\n * class ComponentWithProviders {\n * constructor(private greeter: GreeterDE) {}\n *\n * static ɵcmp = defineComponent({\n * type: ComponentWithProviders,\n * selectors: [['component-with-providers']],\n * factory: () => new ComponentWithProviders(directiveInject(GreeterDE as any)),\n * decls: 1,\n * vars: 1,\n * template: function(fs: RenderFlags, ctx: ComponentWithProviders) {\n * if (fs & RenderFlags.Create) {\n * ɵɵtext(0);\n * }\n * if (fs & RenderFlags.Update) {\n * ɵɵtextInterpolate(ctx.greeter.greet());\n * }\n * },\n * features: [ɵɵProvidersFeature([GreeterDE])]\n * });\n * }\n * ```\n *\n * @param definition\n *\n * @codeGenApi\n */\nfunction ɵɵProvidersFeature(providers, viewProviders = []) {\n return (definition) => {\n definition.providersResolver =\n (def, processProvidersFn) => {\n return providersResolver(def, //\n processProvidersFn ? processProvidersFn(providers) : providers, //\n viewProviders);\n };\n };\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Represents an instance of an `NgModule` created by an `NgModuleFactory`.\n * Provides access to the `NgModule` instance and related objects.\n *\n * @publicApi\n */\nclass NgModuleRef$1 {\n}\n/**\n * @publicApi\n *\n * @deprecated\n * This class was mostly used as a part of ViewEngine-based JIT API and is no longer needed in Ivy\n * JIT mode. See [JIT API changes due to ViewEngine deprecation](guide/deprecations#jit-api-changes)\n * for additional context. Angular provides APIs that accept NgModule classes directly (such as\n * [PlatformRef.bootstrapModule](api/core/PlatformRef#bootstrapModule) and\n * [createNgModule](api/core/createNgModule)), consider switching to those APIs instead of\n * using factory-based ones.\n */\nclass NgModuleFactory$1 {\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Returns a new NgModuleRef instance based on the NgModule class and parent injector provided.\n *\n * @param ngModule NgModule class.\n * @param parentInjector Optional injector instance to use as a parent for the module injector. If\n * not provided, `NullInjector` will be used instead.\n * @returns NgModuleRef that represents an NgModule instance.\n *\n * @publicApi\n */\nfunction createNgModule(ngModule, parentInjector) {\n return new NgModuleRef(ngModule, parentInjector ?? null);\n}\n/**\n * The `createNgModule` function alias for backwards-compatibility.\n * Please avoid using it directly and use `createNgModule` instead.\n *\n * @deprecated Use `createNgModule` instead.\n */\nconst createNgModuleRef = createNgModule;\nclass NgModuleRef extends NgModuleRef$1 {\n constructor(ngModuleType, _parent) {\n super();\n this._parent = _parent;\n // tslint:disable-next-line:require-internal-with-underscore\n this._bootstrapComponents = [];\n this.destroyCbs = [];\n // When bootstrapping a module we have a dependency graph that looks like this:\n // ApplicationRef -> ComponentFactoryResolver -> NgModuleRef. The problem is that if the\n // module being resolved tries to inject the ComponentFactoryResolver, it'll create a\n // circular dependency which will result in a runtime error, because the injector doesn't\n // exist yet. We work around the issue by creating the ComponentFactoryResolver ourselves\n // and providing it, rather than letting the injector resolve it.\n this.componentFactoryResolver = new ComponentFactoryResolver(this);\n const ngModuleDef = getNgModuleDef(ngModuleType);\n ngDevMode &&\n assertDefined(ngModuleDef, `NgModule '${stringify(ngModuleType)}' is not a subtype of 'NgModuleType'.`);\n this._bootstrapComponents = maybeUnwrapFn(ngModuleDef.bootstrap);\n this._r3Injector = createInjectorWithoutInjectorInstances(ngModuleType, _parent, [\n { provide: NgModuleRef$1, useValue: this }, {\n provide: ComponentFactoryResolver$1,\n useValue: this.componentFactoryResolver\n }\n ], stringify(ngModuleType), new Set(['environment']));\n // We need to resolve the injector types separately from the injector creation, because\n // the module might be trying to use this ref in its constructor for DI which will cause a\n // circular error that will eventually error out, because the injector isn't created yet.\n this._r3Injector.resolveInjectorInitializers();\n this.instance = this._r3Injector.get(ngModuleType);\n }\n get injector() {\n return this._r3Injector;\n }\n destroy() {\n ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');\n const injector = this._r3Injector;\n !injector.destroyed && injector.destroy();\n this.destroyCbs.forEach(fn => fn());\n this.destroyCbs = null;\n }\n onDestroy(callback) {\n ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');\n this.destroyCbs.push(callback);\n }\n}\nclass NgModuleFactory extends NgModuleFactory$1 {\n constructor(moduleType) {\n super();\n this.moduleType = moduleType;\n }\n create(parentInjector) {\n return new NgModuleRef(this.moduleType, parentInjector);\n }\n}\nclass EnvironmentNgModuleRefAdapter extends NgModuleRef$1 {\n constructor(providers, parent, source) {\n super();\n this.componentFactoryResolver = new ComponentFactoryResolver(this);\n this.instance = null;\n const injector = new R3Injector([\n ...providers,\n { provide: NgModuleRef$1, useValue: this },\n { provide: ComponentFactoryResolver$1, useValue: this.componentFactoryResolver },\n ], parent || getNullInjector(), source, new Set(['environment']));\n this.injector = injector;\n injector.resolveInjectorInitializers();\n }\n destroy() {\n this.injector.destroy();\n }\n onDestroy(callback) {\n this.injector.onDestroy(callback);\n }\n}\n/**\n * Create a new environment injector.\n *\n * Learn more about environment injectors in\n * [this guide](guide/standalone-components#environment-injectors).\n *\n * @param providers An array of providers.\n * @param parent A parent environment injector.\n * @param debugName An optional name for this injector instance, which will be used in error\n * messages.\n *\n * @publicApi\n */\nfunction createEnvironmentInjector(providers, parent, debugName = null) {\n const adapter = new EnvironmentNgModuleRefAdapter(providers, parent, debugName);\n return adapter.injector;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A service used by the framework to create instances of standalone injectors. Those injectors are\n * created on demand in case of dynamic component instantiation and contain ambient providers\n * collected from the imports graph rooted at a given standalone component.\n */\nclass StandaloneService {\n constructor(_injector) {\n this._injector = _injector;\n this.cachedInjectors = new Map();\n }\n getOrCreateStandaloneInjector(componentDef) {\n if (!componentDef.standalone) {\n return null;\n }\n if (!this.cachedInjectors.has(componentDef.id)) {\n const providers = internalImportProvidersFrom(false, componentDef.type);\n const standaloneInjector = providers.length > 0 ?\n createEnvironmentInjector([providers], this._injector, `Standalone[${componentDef.type.name}]`) :\n null;\n this.cachedInjectors.set(componentDef.id, standaloneInjector);\n }\n return this.cachedInjectors.get(componentDef.id);\n }\n ngOnDestroy() {\n try {\n for (const injector of this.cachedInjectors.values()) {\n if (injector !== null) {\n injector.destroy();\n }\n }\n }\n finally {\n this.cachedInjectors.clear();\n }\n }\n}\n/** @nocollapse */\nStandaloneService.ɵprov = ɵɵdefineInjectable({\n token: StandaloneService,\n providedIn: 'environment',\n factory: () => new StandaloneService(ɵɵinject(EnvironmentInjector)),\n});\n/**\n * A feature that acts as a setup code for the {@link StandaloneService}.\n *\n * The most important responsibility of this feature is to expose the \"getStandaloneInjector\"\n * function (an entry points to a standalone injector creation) on a component definition object. We\n * go through the features infrastructure to make sure that the standalone injector creation logic\n * is tree-shakable and not included in applications that don't use standalone components.\n *\n * @codeGenApi\n */\nfunction ɵɵStandaloneFeature(definition) {\n definition.getStandaloneInjector = (parentInjector) => {\n return parentInjector.get(StandaloneService).getOrCreateStandaloneInjector(definition);\n };\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Retrieves the component instance associated with a given DOM element.\n *\n * @usageNotes\n * Given the following DOM structure:\n *\n * ```html\n * <app-root>\n * <div>\n * <child-comp></child-comp>\n * </div>\n * </app-root>\n * ```\n *\n * Calling `getComponent` on `<child-comp>` will return the instance of `ChildComponent`\n * associated with this DOM element.\n *\n * Calling the function on `<app-root>` will return the `MyApp` instance.\n *\n *\n * @param element DOM element from which the component should be retrieved.\n * @returns Component instance associated with the element or `null` if there\n * is no component associated with it.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getComponent(element) {\n ngDevMode && assertDomElement(element);\n const context = getLContext(element);\n if (context === null)\n return null;\n if (context.component === undefined) {\n const lView = context.lView;\n if (lView === null) {\n return null;\n }\n context.component = getComponentAtNodeIndex(context.nodeIndex, lView);\n }\n return context.component;\n}\n/**\n * If inside an embedded view (e.g. `*ngIf` or `*ngFor`), retrieves the context of the embedded\n * view that the element is part of. Otherwise retrieves the instance of the component whose view\n * owns the element (in this case, the result is the same as calling `getOwningComponent`).\n *\n * @param element Element for which to get the surrounding component instance.\n * @returns Instance of the component that is around the element or null if the element isn't\n * inside any component.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getContext(element) {\n assertDomElement(element);\n const context = getLContext(element);\n const lView = context ? context.lView : null;\n return lView === null ? null : lView[CONTEXT];\n}\n/**\n * Retrieves the component instance whose view contains the DOM element.\n *\n * For example, if `<child-comp>` is used in the template of `<app-comp>`\n * (i.e. a `ViewChild` of `<app-comp>`), calling `getOwningComponent` on `<child-comp>`\n * would return `<app-comp>`.\n *\n * @param elementOrDir DOM element, component or directive instance\n * for which to retrieve the root components.\n * @returns Component instance whose view owns the DOM element or null if the element is not\n * part of a component view.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getOwningComponent(elementOrDir) {\n const context = getLContext(elementOrDir);\n let lView = context ? context.lView : null;\n if (lView === null)\n return null;\n let parent;\n while (lView[TVIEW].type === 2 /* TViewType.Embedded */ && (parent = getLViewParent(lView))) {\n lView = parent;\n }\n return lView[FLAGS] & 256 /* LViewFlags.IsRoot */ ? null : lView[CONTEXT];\n}\n/**\n * Retrieves all root components associated with a DOM element, directive or component instance.\n * Root components are those which have been bootstrapped by Angular.\n *\n * @param elementOrDir DOM element, component or directive instance\n * for which to retrieve the root components.\n * @returns Root components associated with the target object.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getRootComponents(elementOrDir) {\n const lView = readPatchedLView(elementOrDir);\n return lView !== null ? [getRootContext(lView)] : [];\n}\n/**\n * Retrieves an `Injector` associated with an element, component or directive instance.\n *\n * @param elementOrDir DOM element, component or directive instance for which to\n * retrieve the injector.\n * @returns Injector associated with the element, component or directive instance.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getInjector(elementOrDir) {\n const context = getLContext(elementOrDir);\n const lView = context ? context.lView : null;\n if (lView === null)\n return Injector.NULL;\n const tNode = lView[TVIEW].data[context.nodeIndex];\n return new NodeInjector(tNode, lView);\n}\n/**\n * Retrieve a set of injection tokens at a given DOM node.\n *\n * @param element Element for which the injection tokens should be retrieved.\n */\nfunction getInjectionTokens(element) {\n const context = getLContext(element);\n const lView = context ? context.lView : null;\n if (lView === null)\n return [];\n const tView = lView[TVIEW];\n const tNode = tView.data[context.nodeIndex];\n const providerTokens = [];\n const startIndex = tNode.providerIndexes & 1048575 /* TNodeProviderIndexes.ProvidersStartIndexMask */;\n const endIndex = tNode.directiveEnd;\n for (let i = startIndex; i < endIndex; i++) {\n let value = tView.data[i];\n if (isDirectiveDefHack(value)) {\n // The fact that we sometimes store Type and sometimes DirectiveDef in this location is a\n // design flaw. We should always store same type so that we can be monomorphic. The issue\n // is that for Components/Directives we store the def instead the type. The correct behavior\n // is that we should always be storing injectable type in this location.\n value = value.type;\n }\n providerTokens.push(value);\n }\n return providerTokens;\n}\n/**\n * Retrieves directive instances associated with a given DOM node. Does not include\n * component instances.\n *\n * @usageNotes\n * Given the following DOM structure:\n *\n * ```html\n * <app-root>\n * <button my-button></button>\n * <my-comp></my-comp>\n * </app-root>\n * ```\n *\n * Calling `getDirectives` on `<button>` will return an array with an instance of the `MyButton`\n * directive that is associated with the DOM node.\n *\n * Calling `getDirectives` on `<my-comp>` will return an empty array.\n *\n * @param node DOM node for which to get the directives.\n * @returns Array of directives associated with the node.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getDirectives(node) {\n // Skip text nodes because we can't have directives associated with them.\n if (node instanceof Text) {\n return [];\n }\n const context = getLContext(node);\n const lView = context ? context.lView : null;\n if (lView === null) {\n return [];\n }\n const tView = lView[TVIEW];\n const nodeIndex = context.nodeIndex;\n if (!tView?.data[nodeIndex]) {\n return [];\n }\n if (context.directives === undefined) {\n context.directives = getDirectivesAtNodeIndex(nodeIndex, lView);\n }\n // The `directives` in this case are a named array called `LComponentView`. Clone the\n // result so we don't expose an internal data structure in the user's console.\n return context.directives === null ? [] : [...context.directives];\n}\n/**\n * Returns the debug (partial) metadata for a particular directive or component instance.\n * The function accepts an instance of a directive or component and returns the corresponding\n * metadata.\n *\n * @param directiveOrComponentInstance Instance of a directive or component\n * @returns metadata of the passed directive or component\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getDirectiveMetadata$1(directiveOrComponentInstance) {\n const { constructor } = directiveOrComponentInstance;\n if (!constructor) {\n throw new Error('Unable to find the instance constructor');\n }\n // In case a component inherits from a directive, we may have component and directive metadata\n // To ensure we don't get the metadata of the directive, we want to call `getComponentDef` first.\n const componentDef = getComponentDef(constructor);\n if (componentDef) {\n return {\n inputs: componentDef.inputs,\n outputs: componentDef.outputs,\n encapsulation: componentDef.encapsulation,\n changeDetection: componentDef.onPush ? ChangeDetectionStrategy.OnPush :\n ChangeDetectionStrategy.Default\n };\n }\n const directiveDef = getDirectiveDef(constructor);\n if (directiveDef) {\n return { inputs: directiveDef.inputs, outputs: directiveDef.outputs };\n }\n return null;\n}\n/**\n * Retrieve map of local references.\n *\n * The references are retrieved as a map of local reference name to element or directive instance.\n *\n * @param target DOM element, component or directive instance for which to retrieve\n * the local references.\n */\nfunction getLocalRefs(target) {\n const context = getLContext(target);\n if (context === null)\n return {};\n if (context.localRefs === undefined) {\n const lView = context.lView;\n if (lView === null) {\n return {};\n }\n context.localRefs = discoverLocalRefs(lView, context.nodeIndex);\n }\n return context.localRefs || {};\n}\n/**\n * Retrieves the host element of a component or directive instance.\n * The host element is the DOM element that matched the selector of the directive.\n *\n * @param componentOrDirective Component or directive instance for which the host\n * element should be retrieved.\n * @returns Host element of the target.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getHostElement(componentOrDirective) {\n return getLContext(componentOrDirective).native;\n}\n/**\n * Retrieves the rendered text for a given component.\n *\n * This function retrieves the host element of a component and\n * and then returns the `textContent` for that element. This implies\n * that the text returned will include re-projected content of\n * the component as well.\n *\n * @param component The component to return the content text for.\n */\nfunction getRenderedText(component) {\n const hostElement = getHostElement(component);\n return hostElement.textContent || '';\n}\n/**\n * Retrieves a list of event listeners associated with a DOM element. The list does include host\n * listeners, but it does not include event listeners defined outside of the Angular context\n * (e.g. through `addEventListener`).\n *\n * @usageNotes\n * Given the following DOM structure:\n *\n * ```html\n * <app-root>\n * <div (click)=\"doSomething()\"></div>\n * </app-root>\n * ```\n *\n * Calling `getListeners` on `<div>` will return an object that looks as follows:\n *\n * ```ts\n * {\n * name: 'click',\n * element: <div>,\n * callback: () => doSomething(),\n * useCapture: false\n * }\n * ```\n *\n * @param element Element for which the DOM listeners should be retrieved.\n * @returns Array of event listeners on the DOM element.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getListeners(element) {\n ngDevMode && assertDomElement(element);\n const lContext = getLContext(element);\n const lView = lContext === null ? null : lContext.lView;\n if (lView === null)\n return [];\n const tView = lView[TVIEW];\n const lCleanup = lView[CLEANUP];\n const tCleanup = tView.cleanup;\n const listeners = [];\n if (tCleanup && lCleanup) {\n for (let i = 0; i < tCleanup.length;) {\n const firstParam = tCleanup[i++];\n const secondParam = tCleanup[i++];\n if (typeof firstParam === 'string') {\n const name = firstParam;\n const listenerElement = unwrapRNode(lView[secondParam]);\n const callback = lCleanup[tCleanup[i++]];\n const useCaptureOrIndx = tCleanup[i++];\n // if useCaptureOrIndx is boolean then report it as is.\n // if useCaptureOrIndx is positive number then it in unsubscribe method\n // if useCaptureOrIndx is negative number then it is a Subscription\n const type = (typeof useCaptureOrIndx === 'boolean' || useCaptureOrIndx >= 0) ? 'dom' : 'output';\n const useCapture = typeof useCaptureOrIndx === 'boolean' ? useCaptureOrIndx : false;\n if (element == listenerElement) {\n listeners.push({ element, name, callback, useCapture, type });\n }\n }\n }\n }\n listeners.sort(sortListeners);\n return listeners;\n}\nfunction sortListeners(a, b) {\n if (a.name == b.name)\n return 0;\n return a.name < b.name ? -1 : 1;\n}\n/**\n * This function should not exist because it is megamorphic and only mostly correct.\n *\n * See call site for more info.\n */\nfunction isDirectiveDefHack(obj) {\n return obj.type !== undefined && obj.template !== undefined && obj.declaredInputs !== undefined;\n}\n/**\n * Retrieve the component `LView` from component/element.\n *\n * NOTE: `LView` is a private and should not be leaked outside.\n * Don't export this method to `ng.*` on window.\n *\n * @param target DOM element or component instance for which to retrieve the LView.\n */\nfunction getComponentLView(target) {\n const lContext = getLContext(target);\n const nodeIndx = lContext.nodeIndex;\n const lView = lContext.lView;\n ngDevMode && assertLView(lView);\n const componentLView = lView[nodeIndx];\n ngDevMode && assertLView(componentLView);\n return componentLView;\n}\n/** Asserts that a value is a DOM Element. */\nfunction assertDomElement(value) {\n if (typeof Element !== 'undefined' && !(value instanceof Element)) {\n throw new Error('Expecting instance of DOM Element');\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Adds decorator, constructor, and property metadata to a given type via static metadata fields\n * on the type.\n *\n * These metadata fields can later be read with Angular's `ReflectionCapabilities` API.\n *\n * Calls to `setClassMetadata` can be guarded by ngDevMode, resulting in the metadata assignments\n * being tree-shaken away during production builds.\n */\nfunction setClassMetadata(type, decorators, ctorParameters, propDecorators) {\n return noSideEffects(() => {\n const clazz = type;\n if (decorators !== null) {\n if (clazz.hasOwnProperty('decorators') && clazz.decorators !== undefined) {\n clazz.decorators.push(...decorators);\n }\n else {\n clazz.decorators = decorators;\n }\n }\n if (ctorParameters !== null) {\n // Rather than merging, clobber the existing parameters. If other projects exist which\n // use tsickle-style annotations and reflect over them in the same way, this could\n // cause issues, but that is vanishingly unlikely.\n clazz.ctorParameters = ctorParameters;\n }\n if (propDecorators !== null) {\n // The property decorator objects are merged as it is possible different fields have\n // different decorator types. Decorators on individual fields are not merged, as it's\n // also incredibly unlikely that a field will be decorated both with an Angular\n // decorator and a non-Angular decorator that's also been downleveled.\n if (clazz.hasOwnProperty('propDecorators') && clazz.propDecorators !== undefined) {\n clazz.propDecorators = { ...clazz.propDecorators, ...propDecorators };\n }\n else {\n clazz.propDecorators = propDecorators;\n }\n }\n });\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Bindings for pure functions are stored after regular bindings.\n *\n * |-------decls------|---------vars---------| |----- hostVars (dir1) ------|\n * ------------------------------------------------------------------------------------------\n * | nodes/refs/pipes | bindings | fn slots | injector | dir1 | host bindings | host slots |\n * ------------------------------------------------------------------------------------------\n * ^ ^\n * TView.bindingStartIndex TView.expandoStartIndex\n *\n * Pure function instructions are given an offset from the binding root. Adding the offset to the\n * binding root gives the first index where the bindings are stored. In component views, the binding\n * root is the bindingStartIndex. In host bindings, the binding root is the expandoStartIndex +\n * any directive instances + any hostVars in directives evaluated before it.\n *\n * See VIEW_DATA.md for more information about host binding resolution.\n */\n/**\n * If the value hasn't been saved, calls the pure function to store and return the\n * value. If it has been saved, returns the saved value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn Function that returns a value\n * @param thisArg Optional calling context of pureFn\n * @returns value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction0(slotOffset, pureFn, thisArg) {\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n return lView[bindingIndex] === NO_CHANGE ?\n updateBinding(lView, bindingIndex, thisArg ? pureFn.call(thisArg) : pureFn()) :\n getBinding(lView, bindingIndex);\n}\n/**\n * If the value of the provided exp has changed, calls the pure function to return\n * an updated value. Or if the value has not changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn Function that returns an updated value\n * @param exp Updated expression value\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction1(slotOffset, pureFn, exp, thisArg) {\n return pureFunction1Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp, thisArg);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction2(slotOffset, pureFn, exp1, exp2, thisArg) {\n return pureFunction2Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, thisArg);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction3(slotOffset, pureFn, exp1, exp2, exp3, thisArg) {\n return pureFunction3Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, exp3, thisArg);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction4(slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg) {\n return pureFunction4Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction5(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, thisArg) {\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n return bindingUpdated(lView, bindingIndex + 4, exp5) || different ?\n updateBinding(lView, bindingIndex + 5, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5) :\n pureFn(exp1, exp2, exp3, exp4, exp5)) :\n getBinding(lView, bindingIndex + 5);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction6(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, thisArg) {\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n return bindingUpdated2(lView, bindingIndex + 4, exp5, exp6) || different ?\n updateBinding(lView, bindingIndex + 6, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6) :\n pureFn(exp1, exp2, exp3, exp4, exp5, exp6)) :\n getBinding(lView, bindingIndex + 6);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param exp7\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction7(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, thisArg) {\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n let different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n return bindingUpdated3(lView, bindingIndex + 4, exp5, exp6, exp7) || different ?\n updateBinding(lView, bindingIndex + 7, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7) :\n pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7)) :\n getBinding(lView, bindingIndex + 7);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param exp7\n * @param exp8\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction8(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8, thisArg) {\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n return bindingUpdated4(lView, bindingIndex + 4, exp5, exp6, exp7, exp8) || different ?\n updateBinding(lView, bindingIndex + 8, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8) :\n pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8)) :\n getBinding(lView, bindingIndex + 8);\n}\n/**\n * pureFunction instruction that can support any number of bindings.\n *\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn A pure function that takes binding values and builds an object or array\n * containing those values.\n * @param exps An array of binding values\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunctionV(slotOffset, pureFn, exps, thisArg) {\n return pureFunctionVInternal(getLView(), getBindingRoot(), slotOffset, pureFn, exps, thisArg);\n}\n/**\n * Results of a pure function invocation are stored in LView in a dedicated slot that is initialized\n * to NO_CHANGE. In rare situations a pure pipe might throw an exception on the very first\n * invocation and not produce any valid results. In this case LView would keep holding the NO_CHANGE\n * value. The NO_CHANGE is not something that we can use in expressions / bindings thus we convert\n * it to `undefined`.\n */\nfunction getPureFunctionReturnValue(lView, returnValueIndex) {\n ngDevMode && assertIndexInRange(lView, returnValueIndex);\n const lastReturnValue = lView[returnValueIndex];\n return lastReturnValue === NO_CHANGE ? undefined : lastReturnValue;\n}\n/**\n * If the value of the provided exp has changed, calls the pure function to return\n * an updated value. Or if the value has not changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn Function that returns an updated value\n * @param exp Updated expression value\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nfunction pureFunction1Internal(lView, bindingRoot, slotOffset, pureFn, exp, thisArg) {\n const bindingIndex = bindingRoot + slotOffset;\n return bindingUpdated(lView, bindingIndex, exp) ?\n updateBinding(lView, bindingIndex + 1, thisArg ? pureFn.call(thisArg, exp) : pureFn(exp)) :\n getPureFunctionReturnValue(lView, bindingIndex + 1);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nfunction pureFunction2Internal(lView, bindingRoot, slotOffset, pureFn, exp1, exp2, thisArg) {\n const bindingIndex = bindingRoot + slotOffset;\n return bindingUpdated2(lView, bindingIndex, exp1, exp2) ?\n updateBinding(lView, bindingIndex + 2, thisArg ? pureFn.call(thisArg, exp1, exp2) : pureFn(exp1, exp2)) :\n getPureFunctionReturnValue(lView, bindingIndex + 2);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nfunction pureFunction3Internal(lView, bindingRoot, slotOffset, pureFn, exp1, exp2, exp3, thisArg) {\n const bindingIndex = bindingRoot + slotOffset;\n return bindingUpdated3(lView, bindingIndex, exp1, exp2, exp3) ?\n updateBinding(lView, bindingIndex + 3, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3) : pureFn(exp1, exp2, exp3)) :\n getPureFunctionReturnValue(lView, bindingIndex + 3);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n */\nfunction pureFunction4Internal(lView, bindingRoot, slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg) {\n const bindingIndex = bindingRoot + slotOffset;\n return bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4) ?\n updateBinding(lView, bindingIndex + 4, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4) : pureFn(exp1, exp2, exp3, exp4)) :\n getPureFunctionReturnValue(lView, bindingIndex + 4);\n}\n/**\n * pureFunction instruction that can support any number of bindings.\n *\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn A pure function that takes binding values and builds an object or array\n * containing those values.\n * @param exps An array of binding values\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nfunction pureFunctionVInternal(lView, bindingRoot, slotOffset, pureFn, exps, thisArg) {\n let bindingIndex = bindingRoot + slotOffset;\n let different = false;\n for (let i = 0; i < exps.length; i++) {\n bindingUpdated(lView, bindingIndex++, exps[i]) && (different = true);\n }\n return different ? updateBinding(lView, bindingIndex, pureFn.apply(thisArg, exps)) :\n getPureFunctionReturnValue(lView, bindingIndex);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Create a pipe.\n *\n * @param index Pipe index where the pipe will be stored.\n * @param pipeName The name of the pipe\n * @returns T the instance of the pipe.\n *\n * @codeGenApi\n */\nfunction ɵɵpipe(index, pipeName) {\n const tView = getTView();\n let pipeDef;\n const adjustedIndex = index + HEADER_OFFSET;\n if (tView.firstCreatePass) {\n // The `getPipeDef` throws if a pipe with a given name is not found\n // (so we use non-null assertion below).\n pipeDef = getPipeDef(pipeName, tView.pipeRegistry);\n tView.data[adjustedIndex] = pipeDef;\n if (pipeDef.onDestroy) {\n (tView.destroyHooks || (tView.destroyHooks = [])).push(adjustedIndex, pipeDef.onDestroy);\n }\n }\n else {\n pipeDef = tView.data[adjustedIndex];\n }\n const pipeFactory = pipeDef.factory || (pipeDef.factory = getFactoryDef(pipeDef.type, true));\n const previousInjectImplementation = setInjectImplementation(ɵɵdirectiveInject);\n try {\n // DI for pipes is supposed to behave like directives when placed on a component\n // host node, which means that we have to disable access to `viewProviders`.\n const previousIncludeViewProviders = setIncludeViewProviders(false);\n const pipeInstance = pipeFactory();\n setIncludeViewProviders(previousIncludeViewProviders);\n store(tView, getLView(), adjustedIndex, pipeInstance);\n return pipeInstance;\n }\n finally {\n // we have to restore the injector implementation in finally, just in case the creation of the\n // pipe throws an error.\n setInjectImplementation(previousInjectImplementation);\n }\n}\n/**\n * Searches the pipe registry for a pipe with the given name. If one is found,\n * returns the pipe. Otherwise, an error is thrown because the pipe cannot be resolved.\n *\n * @param name Name of pipe to resolve\n * @param registry Full list of available pipes\n * @returns Matching PipeDef\n */\nfunction getPipeDef(name, registry) {\n if (registry) {\n for (let i = registry.length - 1; i >= 0; i--) {\n const pipeDef = registry[i];\n if (name === pipeDef.name) {\n return pipeDef;\n }\n }\n }\n if (ngDevMode) {\n throw new RuntimeError(-302 /* RuntimeErrorCode.PIPE_NOT_FOUND */, getPipeNotFoundErrorMessage(name));\n }\n}\n/**\n * Generates a helpful error message for the user when a pipe is not found.\n *\n * @param name Name of the missing pipe\n * @returns The error message\n */\nfunction getPipeNotFoundErrorMessage(name) {\n const lView = getLView();\n const declarationLView = lView[DECLARATION_COMPONENT_VIEW];\n const context = declarationLView[CONTEXT];\n const hostIsStandalone = isHostComponentStandalone(lView);\n const componentInfoMessage = context ? ` in the '${context.constructor.name}' component` : '';\n const verifyMessage = `Verify that it is ${hostIsStandalone ? 'included in the \\'@Component.imports\\' of this component' :\n 'declared or imported in this module'}`;\n const errorMessage = `The pipe '${name}' could not be found${componentInfoMessage}. ${verifyMessage}`;\n return errorMessage;\n}\n/**\n * Invokes a pipe with 1 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nfunction ɵɵpipeBind1(index, slotOffset, v1) {\n const adjustedIndex = index + HEADER_OFFSET;\n const lView = getLView();\n const pipeInstance = load(lView, adjustedIndex);\n return isPure(lView, adjustedIndex) ?\n pureFunction1Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, pipeInstance) :\n pipeInstance.transform(v1);\n}\n/**\n * Invokes a pipe with 2 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nfunction ɵɵpipeBind2(index, slotOffset, v1, v2) {\n const adjustedIndex = index + HEADER_OFFSET;\n const lView = getLView();\n const pipeInstance = load(lView, adjustedIndex);\n return isPure(lView, adjustedIndex) ?\n pureFunction2Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, v2, pipeInstance) :\n pipeInstance.transform(v1, v2);\n}\n/**\n * Invokes a pipe with 3 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n * @param v3 4rd argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nfunction ɵɵpipeBind3(index, slotOffset, v1, v2, v3) {\n const adjustedIndex = index + HEADER_OFFSET;\n const lView = getLView();\n const pipeInstance = load(lView, adjustedIndex);\n return isPure(lView, adjustedIndex) ?\n pureFunction3Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, v2, v3, pipeInstance) :\n pipeInstance.transform(v1, v2, v3);\n}\n/**\n * Invokes a pipe with 4 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n * @param v3 3rd argument to {@link PipeTransform#transform}.\n * @param v4 4th argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nfunction ɵɵpipeBind4(index, slotOffset, v1, v2, v3, v4) {\n const adjustedIndex = index + HEADER_OFFSET;\n const lView = getLView();\n const pipeInstance = load(lView, adjustedIndex);\n return isPure(lView, adjustedIndex) ? pureFunction4Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, v2, v3, v4, pipeInstance) :\n pipeInstance.transform(v1, v2, v3, v4);\n}\n/**\n * Invokes a pipe with variable number of arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param values Array of arguments to pass to {@link PipeTransform#transform} method.\n *\n * @codeGenApi\n */\nfunction ɵɵpipeBindV(index, slotOffset, values) {\n const adjustedIndex = index + HEADER_OFFSET;\n const lView = getLView();\n const pipeInstance = load(lView, adjustedIndex);\n return isPure(lView, adjustedIndex) ?\n pureFunctionVInternal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, values, pipeInstance) :\n pipeInstance.transform.apply(pipeInstance, values);\n}\nfunction isPure(lView, index) {\n return lView[TVIEW].data[index].pure;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass EventEmitter_ extends Subject {\n constructor(isAsync = false) {\n super();\n this.__isAsync = isAsync;\n }\n emit(value) {\n super.next(value);\n }\n subscribe(observerOrNext, error, complete) {\n let nextFn = observerOrNext;\n let errorFn = error || (() => null);\n let completeFn = complete;\n if (observerOrNext && typeof observerOrNext === 'object') {\n const observer = observerOrNext;\n nextFn = observer.next?.bind(observer);\n errorFn = observer.error?.bind(observer);\n completeFn = observer.complete?.bind(observer);\n }\n if (this.__isAsync) {\n errorFn = _wrapInTimeout(errorFn);\n if (nextFn) {\n nextFn = _wrapInTimeout(nextFn);\n }\n if (completeFn) {\n completeFn = _wrapInTimeout(completeFn);\n }\n }\n const sink = super.subscribe({ next: nextFn, error: errorFn, complete: completeFn });\n if (observerOrNext instanceof Subscription) {\n observerOrNext.add(sink);\n }\n return sink;\n }\n}\nfunction _wrapInTimeout(fn) {\n return (value) => {\n setTimeout(fn, undefined, value);\n };\n}\n/**\n * @publicApi\n */\nconst EventEmitter = EventEmitter_;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction symbolIterator() {\n return this._results[getSymbolIterator()]();\n}\n/**\n * An unmodifiable list of items that Angular keeps up to date when the state\n * of the application changes.\n *\n * The type of object that {@link ViewChildren}, {@link ContentChildren}, and {@link QueryList}\n * provide.\n *\n * Implements an iterable interface, therefore it can be used in both ES6\n * javascript `for (var i of items)` loops as well as in Angular templates with\n * `*ngFor=\"let i of myList\"`.\n *\n * Changes can be observed by subscribing to the changes `Observable`.\n *\n * NOTE: In the future this class will implement an `Observable` interface.\n *\n * @usageNotes\n * ### Example\n * ```typescript\n * @Component({...})\n * class Container {\n * @ViewChildren(Item) items:QueryList<Item>;\n * }\n * ```\n *\n * @publicApi\n */\nclass QueryList {\n /**\n * @param emitDistinctChangesOnly Whether `QueryList.changes` should fire only when actual change\n * has occurred. Or if it should fire when query is recomputed. (recomputing could resolve in\n * the same result)\n */\n constructor(_emitDistinctChangesOnly = false) {\n this._emitDistinctChangesOnly = _emitDistinctChangesOnly;\n this.dirty = true;\n this._results = [];\n this._changesDetected = false;\n this._changes = null;\n this.length = 0;\n this.first = undefined;\n this.last = undefined;\n // This function should be declared on the prototype, but doing so there will cause the class\n // declaration to have side-effects and become not tree-shakable. For this reason we do it in\n // the constructor.\n // [getSymbolIterator()](): Iterator<T> { ... }\n const symbol = getSymbolIterator();\n const proto = QueryList.prototype;\n if (!proto[symbol])\n proto[symbol] = symbolIterator;\n }\n /**\n * Returns `Observable` of `QueryList` notifying the subscriber of changes.\n */\n get changes() {\n return this._changes || (this._changes = new EventEmitter());\n }\n /**\n * Returns the QueryList entry at `index`.\n */\n get(index) {\n return this._results[index];\n }\n /**\n * See\n * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\n */\n map(fn) {\n return this._results.map(fn);\n }\n /**\n * See\n * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)\n */\n filter(fn) {\n return this._results.filter(fn);\n }\n /**\n * See\n * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)\n */\n find(fn) {\n return this._results.find(fn);\n }\n /**\n * See\n * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)\n */\n reduce(fn, init) {\n return this._results.reduce(fn, init);\n }\n /**\n * See\n * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)\n */\n forEach(fn) {\n this._results.forEach(fn);\n }\n /**\n * See\n * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)\n */\n some(fn) {\n return this._results.some(fn);\n }\n /**\n * Returns a copy of the internal results list as an Array.\n */\n toArray() {\n return this._results.slice();\n }\n toString() {\n return this._results.toString();\n }\n /**\n * Updates the stored data of the query list, and resets the `dirty` flag to `false`, so that\n * on change detection, it will not notify of changes to the queries, unless a new change\n * occurs.\n *\n * @param resultsTree The query results to store\n * @param identityAccessor Optional function for extracting stable object identity from a value\n * in the array. This function is executed for each element of the query result list while\n * comparing current query list with the new one (provided as a first argument of the `reset`\n * function) to detect if the lists are different. If the function is not provided, elements\n * are compared as is (without any pre-processing).\n */\n reset(resultsTree, identityAccessor) {\n // Cast to `QueryListInternal` so that we can mutate fields which are readonly for the usage of\n // QueryList (but not for QueryList itself.)\n const self = this;\n self.dirty = false;\n const newResultFlat = flatten(resultsTree);\n if (this._changesDetected = !arrayEquals(self._results, newResultFlat, identityAccessor)) {\n self._results = newResultFlat;\n self.length = newResultFlat.length;\n self.last = newResultFlat[this.length - 1];\n self.first = newResultFlat[0];\n }\n }\n /**\n * Triggers a change event by emitting on the `changes` {@link EventEmitter}.\n */\n notifyOnChanges() {\n if (this._changes && (this._changesDetected || !this._emitDistinctChangesOnly))\n this._changes.emit(this);\n }\n /** internal */\n setDirty() {\n this.dirty = true;\n }\n /** internal */\n destroy() {\n this.changes.complete();\n this.changes.unsubscribe();\n }\n}\nSymbol.iterator;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Represents an embedded template that can be used to instantiate embedded views.\n * To instantiate embedded views based on a template, use the `ViewContainerRef`\n * method `createEmbeddedView()`.\n *\n * Access a `TemplateRef` instance by placing a directive on an `<ng-template>`\n * element (or directive prefixed with `*`). The `TemplateRef` for the embedded view\n * is injected into the constructor of the directive,\n * using the `TemplateRef` token.\n *\n * You can also use a `Query` to find a `TemplateRef` associated with\n * a component or a directive.\n *\n * @see `ViewContainerRef`\n * @see [Navigate the Component Tree with DI](guide/dependency-injection-navtree)\n *\n * @publicApi\n */\nclass TemplateRef {\n}\n/**\n * @internal\n * @nocollapse\n */\nTemplateRef.__NG_ELEMENT_ID__ = injectTemplateRef;\nconst ViewEngineTemplateRef = TemplateRef;\n// TODO(alxhub): combine interface and implementation. Currently this is challenging since something\n// in g3 depends on them being separate.\nconst R3TemplateRef = class TemplateRef extends ViewEngineTemplateRef {\n constructor(_declarationLView, _declarationTContainer, elementRef) {\n super();\n this._declarationLView = _declarationLView;\n this._declarationTContainer = _declarationTContainer;\n this.elementRef = elementRef;\n }\n createEmbeddedView(context, injector) {\n const embeddedTView = this._declarationTContainer.tViews;\n const embeddedLView = createLView(this._declarationLView, embeddedTView, context, 16 /* LViewFlags.CheckAlways */, null, embeddedTView.declTNode, null, null, null, null, injector || null);\n const declarationLContainer = this._declarationLView[this._declarationTContainer.index];\n ngDevMode && assertLContainer(declarationLContainer);\n embeddedLView[DECLARATION_LCONTAINER] = declarationLContainer;\n const declarationViewLQueries = this._declarationLView[QUERIES];\n if (declarationViewLQueries !== null) {\n embeddedLView[QUERIES] = declarationViewLQueries.createEmbeddedView(embeddedTView);\n }\n renderView(embeddedTView, embeddedLView, context);\n return new ViewRef$1(embeddedLView);\n }\n};\n/**\n * Creates a TemplateRef given a node.\n *\n * @returns The TemplateRef instance to use\n */\nfunction injectTemplateRef() {\n return createTemplateRef(getCurrentTNode(), getLView());\n}\n/**\n * Creates a TemplateRef and stores it on the injector.\n *\n * @param hostTNode The node on which a TemplateRef is requested\n * @param hostLView The `LView` to which the node belongs\n * @returns The TemplateRef instance or null if we can't create a TemplateRef on a given node type\n */\nfunction createTemplateRef(hostTNode, hostLView) {\n if (hostTNode.type & 4 /* TNodeType.Container */) {\n ngDevMode && assertDefined(hostTNode.tViews, 'TView must be allocated');\n return new R3TemplateRef(hostLView, hostTNode, createElementRef(hostTNode, hostLView));\n }\n return null;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Represents a container where one or more views can be attached to a component.\n *\n * Can contain *host views* (created by instantiating a\n * component with the `createComponent()` method), and *embedded views*\n * (created by instantiating a `TemplateRef` with the `createEmbeddedView()` method).\n *\n * A view container instance can contain other view containers,\n * creating a [view hierarchy](guide/glossary#view-tree).\n *\n * @see `ComponentRef`\n * @see `EmbeddedViewRef`\n *\n * @publicApi\n */\nclass ViewContainerRef {\n}\n/**\n * @internal\n * @nocollapse\n */\nViewContainerRef.__NG_ELEMENT_ID__ = injectViewContainerRef;\n/**\n * Creates a ViewContainerRef and stores it on the injector. Or, if the ViewContainerRef\n * already exists, retrieves the existing ViewContainerRef.\n *\n * @returns The ViewContainerRef instance to use\n */\nfunction injectViewContainerRef() {\n const previousTNode = getCurrentTNode();\n return createContainerRef(previousTNode, getLView());\n}\nconst VE_ViewContainerRef = ViewContainerRef;\n// TODO(alxhub): cleaning up this indirection triggers a subtle bug in Closure in g3. Once the fix\n// for that lands, this can be cleaned up.\nconst R3ViewContainerRef = class ViewContainerRef extends VE_ViewContainerRef {\n constructor(_lContainer, _hostTNode, _hostLView) {\n super();\n this._lContainer = _lContainer;\n this._hostTNode = _hostTNode;\n this._hostLView = _hostLView;\n }\n get element() {\n return createElementRef(this._hostTNode, this._hostLView);\n }\n get injector() {\n return new NodeInjector(this._hostTNode, this._hostLView);\n }\n /** @deprecated No replacement */\n get parentInjector() {\n const parentLocation = getParentInjectorLocation(this._hostTNode, this._hostLView);\n if (hasParentInjector(parentLocation)) {\n const parentView = getParentInjectorView(parentLocation, this._hostLView);\n const injectorIndex = getParentInjectorIndex(parentLocation);\n ngDevMode && assertNodeInjector(parentView, injectorIndex);\n const parentTNode = parentView[TVIEW].data[injectorIndex + 8 /* NodeInjectorOffset.TNODE */];\n return new NodeInjector(parentTNode, parentView);\n }\n else {\n return new NodeInjector(null, this._hostLView);\n }\n }\n clear() {\n while (this.length > 0) {\n this.remove(this.length - 1);\n }\n }\n get(index) {\n const viewRefs = getViewRefs(this._lContainer);\n return viewRefs !== null && viewRefs[index] || null;\n }\n get length() {\n return this._lContainer.length - CONTAINER_HEADER_OFFSET;\n }\n createEmbeddedView(templateRef, context, indexOrOptions) {\n let index;\n let injector;\n if (typeof indexOrOptions === 'number') {\n index = indexOrOptions;\n }\n else if (indexOrOptions != null) {\n index = indexOrOptions.index;\n injector = indexOrOptions.injector;\n }\n const viewRef = templateRef.createEmbeddedView(context || {}, injector);\n this.insert(viewRef, index);\n return viewRef;\n }\n createComponent(componentFactoryOrType, indexOrOptions, injector, projectableNodes, environmentInjector) {\n const isComponentFactory = componentFactoryOrType && !isType(componentFactoryOrType);\n let index;\n // This function supports 2 signatures and we need to handle options correctly for both:\n // 1. When first argument is a Component type. This signature also requires extra\n // options to be provided as as object (more ergonomic option).\n // 2. First argument is a Component factory. In this case extra options are represented as\n // positional arguments. This signature is less ergonomic and will be deprecated.\n if (isComponentFactory) {\n if (ngDevMode) {\n assertEqual(typeof indexOrOptions !== 'object', true, 'It looks like Component factory was provided as the first argument ' +\n 'and an options object as the second argument. This combination of arguments ' +\n 'is incompatible. You can either change the first argument to provide Component ' +\n 'type or change the second argument to be a number (representing an index at ' +\n 'which to insert the new component\\'s host view into this container)');\n }\n index = indexOrOptions;\n }\n else {\n if (ngDevMode) {\n assertDefined(getComponentDef(componentFactoryOrType), `Provided Component class doesn't contain Component definition. ` +\n `Please check whether provided class has @Component decorator.`);\n assertEqual(typeof indexOrOptions !== 'number', true, 'It looks like Component type was provided as the first argument ' +\n 'and a number (representing an index at which to insert the new component\\'s ' +\n 'host view into this container as the second argument. This combination of arguments ' +\n 'is incompatible. Please use an object as the second argument instead.');\n }\n const options = (indexOrOptions || {});\n if (ngDevMode && options.environmentInjector && options.ngModuleRef) {\n throwError(`Cannot pass both environmentInjector and ngModuleRef options to createComponent().`);\n }\n index = options.index;\n injector = options.injector;\n projectableNodes = options.projectableNodes;\n environmentInjector = options.environmentInjector || options.ngModuleRef;\n }\n const componentFactory = isComponentFactory ?\n componentFactoryOrType :\n new ComponentFactory(getComponentDef(componentFactoryOrType));\n const contextInjector = injector || this.parentInjector;\n // If an `NgModuleRef` is not provided explicitly, try retrieving it from the DI tree.\n if (!environmentInjector && componentFactory.ngModule == null) {\n // For the `ComponentFactory` case, entering this logic is very unlikely, since we expect that\n // an instance of a `ComponentFactory`, resolved via `ComponentFactoryResolver` would have an\n // `ngModule` field. This is possible in some test scenarios and potentially in some JIT-based\n // use-cases. For the `ComponentFactory` case we preserve backwards-compatibility and try\n // using a provided injector first, then fall back to the parent injector of this\n // `ViewContainerRef` instance.\n //\n // For the factory-less case, it's critical to establish a connection with the module\n // injector tree (by retrieving an instance of an `NgModuleRef` and accessing its injector),\n // so that a component can use DI tokens provided in MgModules. For this reason, we can not\n // rely on the provided injector, since it might be detached from the DI tree (for example, if\n // it was created via `Injector.create` without specifying a parent injector, or if an\n // injector is retrieved from an `NgModuleRef` created via `createNgModule` using an\n // NgModule outside of a module tree). Instead, we always use `ViewContainerRef`'s parent\n // injector, which is normally connected to the DI tree, which includes module injector\n // subtree.\n const _injector = isComponentFactory ? contextInjector : this.parentInjector;\n // DO NOT REFACTOR. The code here used to have a `injector.get(NgModuleRef, null) ||\n // undefined` expression which seems to cause internal google apps to fail. This is documented\n // in the following internal bug issue: go/b/142967802\n const result = _injector.get(EnvironmentInjector, null);\n if (result) {\n environmentInjector = result;\n }\n }\n const componentRef = componentFactory.create(contextInjector, projectableNodes, undefined, environmentInjector);\n this.insert(componentRef.hostView, index);\n return componentRef;\n }\n insert(viewRef, index) {\n const lView = viewRef._lView;\n const tView = lView[TVIEW];\n if (ngDevMode && viewRef.destroyed) {\n throw new Error('Cannot insert a destroyed View in a ViewContainer!');\n }\n if (viewAttachedToContainer(lView)) {\n // If view is already attached, detach it first so we clean up references appropriately.\n const prevIdx = this.indexOf(viewRef);\n // A view might be attached either to this or a different container. The `prevIdx` for\n // those cases will be:\n // equal to -1 for views attached to this ViewContainerRef\n // >= 0 for views attached to a different ViewContainerRef\n if (prevIdx !== -1) {\n this.detach(prevIdx);\n }\n else {\n const prevLContainer = lView[PARENT];\n ngDevMode &&\n assertEqual(isLContainer(prevLContainer), true, 'An attached view should have its PARENT point to a container.');\n // We need to re-create a R3ViewContainerRef instance since those are not stored on\n // LView (nor anywhere else).\n const prevVCRef = new R3ViewContainerRef(prevLContainer, prevLContainer[T_HOST], prevLContainer[PARENT]);\n prevVCRef.detach(prevVCRef.indexOf(viewRef));\n }\n }\n // Logical operation of adding `LView` to `LContainer`\n const adjustedIdx = this._adjustIndex(index);\n const lContainer = this._lContainer;\n insertView(tView, lView, lContainer, adjustedIdx);\n // Physical operation of adding the DOM nodes.\n const beforeNode = getBeforeNodeForView(adjustedIdx, lContainer);\n const renderer = lView[RENDERER];\n const parentRNode = nativeParentNode(renderer, lContainer[NATIVE]);\n if (parentRNode !== null) {\n addViewToContainer(tView, lContainer[T_HOST], renderer, lView, parentRNode, beforeNode);\n }\n viewRef.attachToViewContainerRef();\n addToArray(getOrCreateViewRefs(lContainer), adjustedIdx, viewRef);\n return viewRef;\n }\n move(viewRef, newIndex) {\n if (ngDevMode && viewRef.destroyed) {\n throw new Error('Cannot move a destroyed View in a ViewContainer!');\n }\n return this.insert(viewRef, newIndex);\n }\n indexOf(viewRef) {\n const viewRefsArr = getViewRefs(this._lContainer);\n return viewRefsArr !== null ? viewRefsArr.indexOf(viewRef) : -1;\n }\n remove(index) {\n const adjustedIdx = this._adjustIndex(index, -1);\n const detachedView = detachView(this._lContainer, adjustedIdx);\n if (detachedView) {\n // Before destroying the view, remove it from the container's array of `ViewRef`s.\n // This ensures the view container length is updated before calling\n // `destroyLView`, which could recursively call view container methods that\n // rely on an accurate container length.\n // (e.g. a method on this view container being called by a child directive's OnDestroy\n // lifecycle hook)\n removeFromArray(getOrCreateViewRefs(this._lContainer), adjustedIdx);\n destroyLView(detachedView[TVIEW], detachedView);\n }\n }\n detach(index) {\n const adjustedIdx = this._adjustIndex(index, -1);\n const view = detachView(this._lContainer, adjustedIdx);\n const wasDetached = view && removeFromArray(getOrCreateViewRefs(this._lContainer), adjustedIdx) != null;\n return wasDetached ? new ViewRef$1(view) : null;\n }\n _adjustIndex(index, shift = 0) {\n if (index == null) {\n return this.length + shift;\n }\n if (ngDevMode) {\n assertGreaterThan(index, -1, `ViewRef index must be positive, got ${index}`);\n // +1 because it's legal to insert at the end.\n assertLessThan(index, this.length + 1 + shift, 'index');\n }\n return index;\n }\n};\nfunction getViewRefs(lContainer) {\n return lContainer[VIEW_REFS];\n}\nfunction getOrCreateViewRefs(lContainer) {\n return (lContainer[VIEW_REFS] || (lContainer[VIEW_REFS] = []));\n}\n/**\n * Creates a ViewContainerRef and stores it on the injector.\n *\n * @param ViewContainerRefToken The ViewContainerRef type\n * @param ElementRefToken The ElementRef type\n * @param hostTNode The node that is requesting a ViewContainerRef\n * @param hostLView The view to which the node belongs\n * @returns The ViewContainerRef instance to use\n */\nfunction createContainerRef(hostTNode, hostLView) {\n ngDevMode && assertTNodeType(hostTNode, 12 /* TNodeType.AnyContainer */ | 3 /* TNodeType.AnyRNode */);\n let lContainer;\n const slotValue = hostLView[hostTNode.index];\n if (isLContainer(slotValue)) {\n // If the host is a container, we don't need to create a new LContainer\n lContainer = slotValue;\n }\n else {\n let commentNode;\n // If the host is an element container, the native host element is guaranteed to be a\n // comment and we can reuse that comment as anchor element for the new LContainer.\n // The comment node in question is already part of the DOM structure so we don't need to append\n // it again.\n if (hostTNode.type & 8 /* TNodeType.ElementContainer */) {\n commentNode = unwrapRNode(slotValue);\n }\n else {\n // If the host is a regular element, we have to insert a comment node manually which will\n // be used as an anchor when inserting elements. In this specific case we use low-level DOM\n // manipulation to insert it.\n const renderer = hostLView[RENDERER];\n ngDevMode && ngDevMode.rendererCreateComment++;\n commentNode = renderer.createComment(ngDevMode ? 'container' : '');\n const hostNative = getNativeByTNode(hostTNode, hostLView);\n const parentOfHostNative = nativeParentNode(renderer, hostNative);\n nativeInsertBefore(renderer, parentOfHostNative, commentNode, nativeNextSibling(renderer, hostNative), false);\n }\n hostLView[hostTNode.index] = lContainer =\n createLContainer(slotValue, hostLView, commentNode, hostTNode);\n addToViewTree(hostLView, lContainer);\n }\n return new R3ViewContainerRef(lContainer, hostTNode, hostLView);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass LQuery_ {\n constructor(queryList) {\n this.queryList = queryList;\n this.matches = null;\n }\n clone() {\n return new LQuery_(this.queryList);\n }\n setDirty() {\n this.queryList.setDirty();\n }\n}\nclass LQueries_ {\n constructor(queries = []) {\n this.queries = queries;\n }\n createEmbeddedView(tView) {\n const tQueries = tView.queries;\n if (tQueries !== null) {\n const noOfInheritedQueries = tView.contentQueries !== null ? tView.contentQueries[0] : tQueries.length;\n const viewLQueries = [];\n // An embedded view has queries propagated from a declaration view at the beginning of the\n // TQueries collection and up until a first content query declared in the embedded view. Only\n // propagated LQueries are created at this point (LQuery corresponding to declared content\n // queries will be instantiated from the content query instructions for each directive).\n for (let i = 0; i < noOfInheritedQueries; i++) {\n const tQuery = tQueries.getByIndex(i);\n const parentLQuery = this.queries[tQuery.indexInDeclarationView];\n viewLQueries.push(parentLQuery.clone());\n }\n return new LQueries_(viewLQueries);\n }\n return null;\n }\n insertView(tView) {\n this.dirtyQueriesWithMatches(tView);\n }\n detachView(tView) {\n this.dirtyQueriesWithMatches(tView);\n }\n dirtyQueriesWithMatches(tView) {\n for (let i = 0; i < this.queries.length; i++) {\n if (getTQuery(tView, i).matches !== null) {\n this.queries[i].setDirty();\n }\n }\n }\n}\nclass TQueryMetadata_ {\n constructor(predicate, flags, read = null) {\n this.predicate = predicate;\n this.flags = flags;\n this.read = read;\n }\n}\nclass TQueries_ {\n constructor(queries = []) {\n this.queries = queries;\n }\n elementStart(tView, tNode) {\n ngDevMode &&\n assertFirstCreatePass(tView, 'Queries should collect results on the first template pass only');\n for (let i = 0; i < this.queries.length; i++) {\n this.queries[i].elementStart(tView, tNode);\n }\n }\n elementEnd(tNode) {\n for (let i = 0; i < this.queries.length; i++) {\n this.queries[i].elementEnd(tNode);\n }\n }\n embeddedTView(tNode) {\n let queriesForTemplateRef = null;\n for (let i = 0; i < this.length; i++) {\n const childQueryIndex = queriesForTemplateRef !== null ? queriesForTemplateRef.length : 0;\n const tqueryClone = this.getByIndex(i).embeddedTView(tNode, childQueryIndex);\n if (tqueryClone) {\n tqueryClone.indexInDeclarationView = i;\n if (queriesForTemplateRef !== null) {\n queriesForTemplateRef.push(tqueryClone);\n }\n else {\n queriesForTemplateRef = [tqueryClone];\n }\n }\n }\n return queriesForTemplateRef !== null ? new TQueries_(queriesForTemplateRef) : null;\n }\n template(tView, tNode) {\n ngDevMode &&\n assertFirstCreatePass(tView, 'Queries should collect results on the first template pass only');\n for (let i = 0; i < this.queries.length; i++) {\n this.queries[i].template(tView, tNode);\n }\n }\n getByIndex(index) {\n ngDevMode && assertIndexInRange(this.queries, index);\n return this.queries[index];\n }\n get length() {\n return this.queries.length;\n }\n track(tquery) {\n this.queries.push(tquery);\n }\n}\nclass TQuery_ {\n constructor(metadata, nodeIndex = -1) {\n this.metadata = metadata;\n this.matches = null;\n this.indexInDeclarationView = -1;\n this.crossesNgTemplate = false;\n /**\n * A flag indicating if a given query still applies to nodes it is crossing. We use this flag\n * (alongside with _declarationNodeIndex) to know when to stop applying content queries to\n * elements in a template.\n */\n this._appliesToNextNode = true;\n this._declarationNodeIndex = nodeIndex;\n }\n elementStart(tView, tNode) {\n if (this.isApplyingToNode(tNode)) {\n this.matchTNode(tView, tNode);\n }\n }\n elementEnd(tNode) {\n if (this._declarationNodeIndex === tNode.index) {\n this._appliesToNextNode = false;\n }\n }\n template(tView, tNode) {\n this.elementStart(tView, tNode);\n }\n embeddedTView(tNode, childQueryIndex) {\n if (this.isApplyingToNode(tNode)) {\n this.crossesNgTemplate = true;\n // A marker indicating a `<ng-template>` element (a placeholder for query results from\n // embedded views created based on this `<ng-template>`).\n this.addMatch(-tNode.index, childQueryIndex);\n return new TQuery_(this.metadata);\n }\n return null;\n }\n isApplyingToNode(tNode) {\n if (this._appliesToNextNode &&\n (this.metadata.flags & 1 /* QueryFlags.descendants */) !== 1 /* QueryFlags.descendants */) {\n const declarationNodeIdx = this._declarationNodeIndex;\n let parent = tNode.parent;\n // Determine if a given TNode is a \"direct\" child of a node on which a content query was\n // declared (only direct children of query's host node can match with the descendants: false\n // option). There are 3 main use-case / conditions to consider here:\n // - <needs-target><i #target></i></needs-target>: here <i #target> parent node is a query\n // host node;\n // - <needs-target><ng-template [ngIf]=\"true\"><i #target></i></ng-template></needs-target>:\n // here <i #target> parent node is null;\n // - <needs-target><ng-container><i #target></i></ng-container></needs-target>: here we need\n // to go past `<ng-container>` to determine <i #target> parent node (but we shouldn't traverse\n // up past the query's host node!).\n while (parent !== null && (parent.type & 8 /* TNodeType.ElementContainer */) &&\n parent.index !== declarationNodeIdx) {\n parent = parent.parent;\n }\n return declarationNodeIdx === (parent !== null ? parent.index : -1);\n }\n return this._appliesToNextNode;\n }\n matchTNode(tView, tNode) {\n const predicate = this.metadata.predicate;\n if (Array.isArray(predicate)) {\n for (let i = 0; i < predicate.length; i++) {\n const name = predicate[i];\n this.matchTNodeWithReadOption(tView, tNode, getIdxOfMatchingSelector(tNode, name));\n // Also try matching the name to a provider since strings can be used as DI tokens too.\n this.matchTNodeWithReadOption(tView, tNode, locateDirectiveOrProvider(tNode, tView, name, false, false));\n }\n }\n else {\n if (predicate === TemplateRef) {\n if (tNode.type & 4 /* TNodeType.Container */) {\n this.matchTNodeWithReadOption(tView, tNode, -1);\n }\n }\n else {\n this.matchTNodeWithReadOption(tView, tNode, locateDirectiveOrProvider(tNode, tView, predicate, false, false));\n }\n }\n }\n matchTNodeWithReadOption(tView, tNode, nodeMatchIdx) {\n if (nodeMatchIdx !== null) {\n const read = this.metadata.read;\n if (read !== null) {\n if (read === ElementRef || read === ViewContainerRef ||\n read === TemplateRef && (tNode.type & 4 /* TNodeType.Container */)) {\n this.addMatch(tNode.index, -2);\n }\n else {\n const directiveOrProviderIdx = locateDirectiveOrProvider(tNode, tView, read, false, false);\n if (directiveOrProviderIdx !== null) {\n this.addMatch(tNode.index, directiveOrProviderIdx);\n }\n }\n }\n else {\n this.addMatch(tNode.index, nodeMatchIdx);\n }\n }\n }\n addMatch(tNodeIdx, matchIdx) {\n if (this.matches === null) {\n this.matches = [tNodeIdx, matchIdx];\n }\n else {\n this.matches.push(tNodeIdx, matchIdx);\n }\n }\n}\n/**\n * Iterates over local names for a given node and returns directive index\n * (or -1 if a local name points to an element).\n *\n * @param tNode static data of a node to check\n * @param selector selector to match\n * @returns directive index, -1 or null if a selector didn't match any of the local names\n */\nfunction getIdxOfMatchingSelector(tNode, selector) {\n const localNames = tNode.localNames;\n if (localNames !== null) {\n for (let i = 0; i < localNames.length; i += 2) {\n if (localNames[i] === selector) {\n return localNames[i + 1];\n }\n }\n }\n return null;\n}\nfunction createResultByTNodeType(tNode, currentView) {\n if (tNode.type & (3 /* TNodeType.AnyRNode */ | 8 /* TNodeType.ElementContainer */)) {\n return createElementRef(tNode, currentView);\n }\n else if (tNode.type & 4 /* TNodeType.Container */) {\n return createTemplateRef(tNode, currentView);\n }\n return null;\n}\nfunction createResultForNode(lView, tNode, matchingIdx, read) {\n if (matchingIdx === -1) {\n // if read token and / or strategy is not specified, detect it using appropriate tNode type\n return createResultByTNodeType(tNode, lView);\n }\n else if (matchingIdx === -2) {\n // read a special token from a node injector\n return createSpecialToken(lView, tNode, read);\n }\n else {\n // read a token\n return getNodeInjectable(lView, lView[TVIEW], matchingIdx, tNode);\n }\n}\nfunction createSpecialToken(lView, tNode, read) {\n if (read === ElementRef) {\n return createElementRef(tNode, lView);\n }\n else if (read === TemplateRef) {\n return createTemplateRef(tNode, lView);\n }\n else if (read === ViewContainerRef) {\n ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */ | 12 /* TNodeType.AnyContainer */);\n return createContainerRef(tNode, lView);\n }\n else {\n ngDevMode &&\n throwError(`Special token to read should be one of ElementRef, TemplateRef or ViewContainerRef but got ${stringify(read)}.`);\n }\n}\n/**\n * A helper function that creates query results for a given view. This function is meant to do the\n * processing once and only once for a given view instance (a set of results for a given view\n * doesn't change).\n */\nfunction materializeViewResults(tView, lView, tQuery, queryIndex) {\n const lQuery = lView[QUERIES].queries[queryIndex];\n if (lQuery.matches === null) {\n const tViewData = tView.data;\n const tQueryMatches = tQuery.matches;\n const result = [];\n for (let i = 0; i < tQueryMatches.length; i += 2) {\n const matchedNodeIdx = tQueryMatches[i];\n if (matchedNodeIdx < 0) {\n // we at the <ng-template> marker which might have results in views created based on this\n // <ng-template> - those results will be in separate views though, so here we just leave\n // null as a placeholder\n result.push(null);\n }\n else {\n ngDevMode && assertIndexInRange(tViewData, matchedNodeIdx);\n const tNode = tViewData[matchedNodeIdx];\n result.push(createResultForNode(lView, tNode, tQueryMatches[i + 1], tQuery.metadata.read));\n }\n }\n lQuery.matches = result;\n }\n return lQuery.matches;\n}\n/**\n * A helper function that collects (already materialized) query results from a tree of views,\n * starting with a provided LView.\n */\nfunction collectQueryResults(tView, lView, queryIndex, result) {\n const tQuery = tView.queries.getByIndex(queryIndex);\n const tQueryMatches = tQuery.matches;\n if (tQueryMatches !== null) {\n const lViewResults = materializeViewResults(tView, lView, tQuery, queryIndex);\n for (let i = 0; i < tQueryMatches.length; i += 2) {\n const tNodeIdx = tQueryMatches[i];\n if (tNodeIdx > 0) {\n result.push(lViewResults[i / 2]);\n }\n else {\n const childQueryIndex = tQueryMatches[i + 1];\n const declarationLContainer = lView[-tNodeIdx];\n ngDevMode && assertLContainer(declarationLContainer);\n // collect matches for views inserted in this container\n for (let i = CONTAINER_HEADER_OFFSET; i < declarationLContainer.length; i++) {\n const embeddedLView = declarationLContainer[i];\n if (embeddedLView[DECLARATION_LCONTAINER] === embeddedLView[PARENT]) {\n collectQueryResults(embeddedLView[TVIEW], embeddedLView, childQueryIndex, result);\n }\n }\n // collect matches for views created from this declaration container and inserted into\n // different containers\n if (declarationLContainer[MOVED_VIEWS] !== null) {\n const embeddedLViews = declarationLContainer[MOVED_VIEWS];\n for (let i = 0; i < embeddedLViews.length; i++) {\n const embeddedLView = embeddedLViews[i];\n collectQueryResults(embeddedLView[TVIEW], embeddedLView, childQueryIndex, result);\n }\n }\n }\n }\n }\n return result;\n}\n/**\n * Refreshes a query by combining matches from all active views and removing matches from deleted\n * views.\n *\n * @returns `true` if a query got dirty during change detection or if this is a static query\n * resolving in creation mode, `false` otherwise.\n *\n * @codeGenApi\n */\nfunction ɵɵqueryRefresh(queryList) {\n const lView = getLView();\n const tView = getTView();\n const queryIndex = getCurrentQueryIndex();\n setCurrentQueryIndex(queryIndex + 1);\n const tQuery = getTQuery(tView, queryIndex);\n if (queryList.dirty &&\n (isCreationMode(lView) ===\n ((tQuery.metadata.flags & 2 /* QueryFlags.isStatic */) === 2 /* QueryFlags.isStatic */))) {\n if (tQuery.matches === null) {\n queryList.reset([]);\n }\n else {\n const result = tQuery.crossesNgTemplate ?\n collectQueryResults(tView, lView, queryIndex, []) :\n materializeViewResults(tView, lView, tQuery, queryIndex);\n queryList.reset(result, unwrapElementRef);\n queryList.notifyOnChanges();\n }\n return true;\n }\n return false;\n}\n/**\n * Creates new QueryList, stores the reference in LView and returns QueryList.\n *\n * @param predicate The type for which the query will search\n * @param flags Flags associated with the query\n * @param read What to save in the query\n *\n * @codeGenApi\n */\nfunction ɵɵviewQuery(predicate, flags, read) {\n ngDevMode && assertNumber(flags, 'Expecting flags');\n const tView = getTView();\n if (tView.firstCreatePass) {\n createTQuery(tView, new TQueryMetadata_(predicate, flags, read), -1);\n if ((flags & 2 /* QueryFlags.isStatic */) === 2 /* QueryFlags.isStatic */) {\n tView.staticViewQueries = true;\n }\n }\n createLQuery(tView, getLView(), flags);\n}\n/**\n * Registers a QueryList, associated with a content query, for later refresh (part of a view\n * refresh).\n *\n * @param directiveIndex Current directive index\n * @param predicate The type for which the query will search\n * @param flags Flags associated with the query\n * @param read What to save in the query\n * @returns QueryList<T>\n *\n * @codeGenApi\n */\nfunction ɵɵcontentQuery(directiveIndex, predicate, flags, read) {\n ngDevMode && assertNumber(flags, 'Expecting flags');\n const tView = getTView();\n if (tView.firstCreatePass) {\n const tNode = getCurrentTNode();\n createTQuery(tView, new TQueryMetadata_(predicate, flags, read), tNode.index);\n saveContentQueryAndDirectiveIndex(tView, directiveIndex);\n if ((flags & 2 /* QueryFlags.isStatic */) === 2 /* QueryFlags.isStatic */) {\n tView.staticContentQueries = true;\n }\n }\n createLQuery(tView, getLView(), flags);\n}\n/**\n * Loads a QueryList corresponding to the current view or content query.\n *\n * @codeGenApi\n */\nfunction ɵɵloadQuery() {\n return loadQueryInternal(getLView(), getCurrentQueryIndex());\n}\nfunction loadQueryInternal(lView, queryIndex) {\n ngDevMode &&\n assertDefined(lView[QUERIES], 'LQueries should be defined when trying to load a query');\n ngDevMode && assertIndexInRange(lView[QUERIES].queries, queryIndex);\n return lView[QUERIES].queries[queryIndex].queryList;\n}\nfunction createLQuery(tView, lView, flags) {\n const queryList = new QueryList((flags & 4 /* QueryFlags.emitDistinctChangesOnly */) === 4 /* QueryFlags.emitDistinctChangesOnly */);\n storeCleanupWithContext(tView, lView, queryList, queryList.destroy);\n if (lView[QUERIES] === null)\n lView[QUERIES] = new LQueries_();\n lView[QUERIES].queries.push(new LQuery_(queryList));\n}\nfunction createTQuery(tView, metadata, nodeIndex) {\n if (tView.queries === null)\n tView.queries = new TQueries_();\n tView.queries.track(new TQuery_(metadata, nodeIndex));\n}\nfunction saveContentQueryAndDirectiveIndex(tView, directiveIndex) {\n const tViewContentQueries = tView.contentQueries || (tView.contentQueries = []);\n const lastSavedDirectiveIndex = tViewContentQueries.length ? tViewContentQueries[tViewContentQueries.length - 1] : -1;\n if (directiveIndex !== lastSavedDirectiveIndex) {\n tViewContentQueries.push(tView.queries.length - 1, directiveIndex);\n }\n}\nfunction getTQuery(tView, index) {\n ngDevMode && assertDefined(tView.queries, 'TQueries must be defined to retrieve a TQuery');\n return tView.queries.getByIndex(index);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Retrieves `TemplateRef` instance from `Injector` when a local reference is placed on the\n * `<ng-template>` element.\n *\n * @codeGenApi\n */\nfunction ɵɵtemplateRefExtractor(tNode, lView) {\n return createTemplateRef(tNode, lView);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A mapping of the @angular/core API surface used in generated expressions to the actual symbols.\n *\n * This should be kept up to date with the public exports of @angular/core.\n */\nconst angularCoreEnv = (() => ({\n 'ɵɵattribute': ɵɵattribute,\n 'ɵɵattributeInterpolate1': ɵɵattributeInterpolate1,\n 'ɵɵattributeInterpolate2': ɵɵattributeInterpolate2,\n 'ɵɵattributeInterpolate3': ɵɵattributeInterpolate3,\n 'ɵɵattributeInterpolate4': ɵɵattributeInterpolate4,\n 'ɵɵattributeInterpolate5': ɵɵattributeInterpolate5,\n 'ɵɵattributeInterpolate6': ɵɵattributeInterpolate6,\n 'ɵɵattributeInterpolate7': ɵɵattributeInterpolate7,\n 'ɵɵattributeInterpolate8': ɵɵattributeInterpolate8,\n 'ɵɵattributeInterpolateV': ɵɵattributeInterpolateV,\n 'ɵɵdefineComponent': ɵɵdefineComponent,\n 'ɵɵdefineDirective': ɵɵdefineDirective,\n 'ɵɵdefineInjectable': ɵɵdefineInjectable,\n 'ɵɵdefineInjector': ɵɵdefineInjector,\n 'ɵɵdefineNgModule': ɵɵdefineNgModule,\n 'ɵɵdefinePipe': ɵɵdefinePipe,\n 'ɵɵdirectiveInject': ɵɵdirectiveInject,\n 'ɵɵgetInheritedFactory': ɵɵgetInheritedFactory,\n 'ɵɵinject': ɵɵinject,\n 'ɵɵinjectAttribute': ɵɵinjectAttribute,\n 'ɵɵinvalidFactory': ɵɵinvalidFactory,\n 'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep,\n 'ɵɵtemplateRefExtractor': ɵɵtemplateRefExtractor,\n 'ɵɵresetView': ɵɵresetView,\n 'ɵɵHostDirectivesFeature': ɵɵHostDirectivesFeature,\n 'ɵɵNgOnChangesFeature': ɵɵNgOnChangesFeature,\n 'ɵɵProvidersFeature': ɵɵProvidersFeature,\n 'ɵɵCopyDefinitionFeature': ɵɵCopyDefinitionFeature,\n 'ɵɵInheritDefinitionFeature': ɵɵInheritDefinitionFeature,\n 'ɵɵStandaloneFeature': ɵɵStandaloneFeature,\n 'ɵɵnextContext': ɵɵnextContext,\n 'ɵɵnamespaceHTML': ɵɵnamespaceHTML,\n 'ɵɵnamespaceMathML': ɵɵnamespaceMathML,\n 'ɵɵnamespaceSVG': ɵɵnamespaceSVG,\n 'ɵɵenableBindings': ɵɵenableBindings,\n 'ɵɵdisableBindings': ɵɵdisableBindings,\n 'ɵɵelementStart': ɵɵelementStart,\n 'ɵɵelementEnd': ɵɵelementEnd,\n 'ɵɵelement': ɵɵelement,\n 'ɵɵelementContainerStart': ɵɵelementContainerStart,\n 'ɵɵelementContainerEnd': ɵɵelementContainerEnd,\n 'ɵɵelementContainer': ɵɵelementContainer,\n 'ɵɵpureFunction0': ɵɵpureFunction0,\n 'ɵɵpureFunction1': ɵɵpureFunction1,\n 'ɵɵpureFunction2': ɵɵpureFunction2,\n 'ɵɵpureFunction3': ɵɵpureFunction3,\n 'ɵɵpureFunction4': ɵɵpureFunction4,\n 'ɵɵpureFunction5': ɵɵpureFunction5,\n 'ɵɵpureFunction6': ɵɵpureFunction6,\n 'ɵɵpureFunction7': ɵɵpureFunction7,\n 'ɵɵpureFunction8': ɵɵpureFunction8,\n 'ɵɵpureFunctionV': ɵɵpureFunctionV,\n 'ɵɵgetCurrentView': ɵɵgetCurrentView,\n 'ɵɵrestoreView': ɵɵrestoreView,\n 'ɵɵlistener': ɵɵlistener,\n 'ɵɵprojection': ɵɵprojection,\n 'ɵɵsyntheticHostProperty': ɵɵsyntheticHostProperty,\n 'ɵɵsyntheticHostListener': ɵɵsyntheticHostListener,\n 'ɵɵpipeBind1': ɵɵpipeBind1,\n 'ɵɵpipeBind2': ɵɵpipeBind2,\n 'ɵɵpipeBind3': ɵɵpipeBind3,\n 'ɵɵpipeBind4': ɵɵpipeBind4,\n 'ɵɵpipeBindV': ɵɵpipeBindV,\n 'ɵɵprojectionDef': ɵɵprojectionDef,\n 'ɵɵhostProperty': ɵɵhostProperty,\n 'ɵɵproperty': ɵɵproperty,\n 'ɵɵpropertyInterpolate': ɵɵpropertyInterpolate,\n 'ɵɵpropertyInterpolate1': ɵɵpropertyInterpolate1,\n 'ɵɵpropertyInterpolate2': ɵɵpropertyInterpolate2,\n 'ɵɵpropertyInterpolate3': ɵɵpropertyInterpolate3,\n 'ɵɵpropertyInterpolate4': ɵɵpropertyInterpolate4,\n 'ɵɵpropertyInterpolate5': ɵɵpropertyInterpolate5,\n 'ɵɵpropertyInterpolate6': ɵɵpropertyInterpolate6,\n 'ɵɵpropertyInterpolate7': ɵɵpropertyInterpolate7,\n 'ɵɵpropertyInterpolate8': ɵɵpropertyInterpolate8,\n 'ɵɵpropertyInterpolateV': ɵɵpropertyInterpolateV,\n 'ɵɵpipe': ɵɵpipe,\n 'ɵɵqueryRefresh': ɵɵqueryRefresh,\n 'ɵɵviewQuery': ɵɵviewQuery,\n 'ɵɵloadQuery': ɵɵloadQuery,\n 'ɵɵcontentQuery': ɵɵcontentQuery,\n 'ɵɵreference': ɵɵreference,\n 'ɵɵclassMap': ɵɵclassMap,\n 'ɵɵclassMapInterpolate1': ɵɵclassMapInterpolate1,\n 'ɵɵclassMapInterpolate2': ɵɵclassMapInterpolate2,\n 'ɵɵclassMapInterpolate3': ɵɵclassMapInterpolate3,\n 'ɵɵclassMapInterpolate4': ɵɵclassMapInterpolate4,\n 'ɵɵclassMapInterpolate5': ɵɵclassMapInterpolate5,\n 'ɵɵclassMapInterpolate6': ɵɵclassMapInterpolate6,\n 'ɵɵclassMapInterpolate7': ɵɵclassMapInterpolate7,\n 'ɵɵclassMapInterpolate8': ɵɵclassMapInterpolate8,\n 'ɵɵclassMapInterpolateV': ɵɵclassMapInterpolateV,\n 'ɵɵstyleMap': ɵɵstyleMap,\n 'ɵɵstyleMapInterpolate1': ɵɵstyleMapInterpolate1,\n 'ɵɵstyleMapInterpolate2': ɵɵstyleMapInterpolate2,\n 'ɵɵstyleMapInterpolate3': ɵɵstyleMapInterpolate3,\n 'ɵɵstyleMapInterpolate4': ɵɵstyleMapInterpolate4,\n 'ɵɵstyleMapInterpolate5': ɵɵstyleMapInterpolate5,\n 'ɵɵstyleMapInterpolate6': ɵɵstyleMapInterpolate6,\n 'ɵɵstyleMapInterpolate7': ɵɵstyleMapInterpolate7,\n 'ɵɵstyleMapInterpolate8': ɵɵstyleMapInterpolate8,\n 'ɵɵstyleMapInterpolateV': ɵɵstyleMapInterpolateV,\n 'ɵɵstyleProp': ɵɵstyleProp,\n 'ɵɵstylePropInterpolate1': ɵɵstylePropInterpolate1,\n 'ɵɵstylePropInterpolate2': ɵɵstylePropInterpolate2,\n 'ɵɵstylePropInterpolate3': ɵɵstylePropInterpolate3,\n 'ɵɵstylePropInterpolate4': ɵɵstylePropInterpolate4,\n 'ɵɵstylePropInterpolate5': ɵɵstylePropInterpolate5,\n 'ɵɵstylePropInterpolate6': ɵɵstylePropInterpolate6,\n 'ɵɵstylePropInterpolate7': ɵɵstylePropInterpolate7,\n 'ɵɵstylePropInterpolate8': ɵɵstylePropInterpolate8,\n 'ɵɵstylePropInterpolateV': ɵɵstylePropInterpolateV,\n 'ɵɵclassProp': ɵɵclassProp,\n 'ɵɵadvance': ɵɵadvance,\n 'ɵɵtemplate': ɵɵtemplate,\n 'ɵɵtext': ɵɵtext,\n 'ɵɵtextInterpolate': ɵɵtextInterpolate,\n 'ɵɵtextInterpolate1': ɵɵtextInterpolate1,\n 'ɵɵtextInterpolate2': ɵɵtextInterpolate2,\n 'ɵɵtextInterpolate3': ɵɵtextInterpolate3,\n 'ɵɵtextInterpolate4': ɵɵtextInterpolate4,\n 'ɵɵtextInterpolate5': ɵɵtextInterpolate5,\n 'ɵɵtextInterpolate6': ɵɵtextInterpolate6,\n 'ɵɵtextInterpolate7': ɵɵtextInterpolate7,\n 'ɵɵtextInterpolate8': ɵɵtextInterpolate8,\n 'ɵɵtextInterpolateV': ɵɵtextInterpolateV,\n 'ɵɵi18n': ɵɵi18n,\n 'ɵɵi18nAttributes': ɵɵi18nAttributes,\n 'ɵɵi18nExp': ɵɵi18nExp,\n 'ɵɵi18nStart': ɵɵi18nStart,\n 'ɵɵi18nEnd': ɵɵi18nEnd,\n 'ɵɵi18nApply': ɵɵi18nApply,\n 'ɵɵi18nPostprocess': ɵɵi18nPostprocess,\n 'ɵɵresolveWindow': ɵɵresolveWindow,\n 'ɵɵresolveDocument': ɵɵresolveDocument,\n 'ɵɵresolveBody': ɵɵresolveBody,\n 'ɵɵsetComponentScope': ɵɵsetComponentScope,\n 'ɵɵsetNgModuleScope': ɵɵsetNgModuleScope,\n 'ɵɵregisterNgModuleType': registerNgModuleType,\n 'ɵɵsanitizeHtml': ɵɵsanitizeHtml,\n 'ɵɵsanitizeStyle': ɵɵsanitizeStyle,\n 'ɵɵsanitizeResourceUrl': ɵɵsanitizeResourceUrl,\n 'ɵɵsanitizeScript': ɵɵsanitizeScript,\n 'ɵɵsanitizeUrl': ɵɵsanitizeUrl,\n 'ɵɵsanitizeUrlOrResourceUrl': ɵɵsanitizeUrlOrResourceUrl,\n 'ɵɵtrustConstantHtml': ɵɵtrustConstantHtml,\n 'ɵɵtrustConstantResourceUrl': ɵɵtrustConstantResourceUrl,\n 'ɵɵvalidateIframeAttribute': ɵɵvalidateIframeAttribute,\n 'forwardRef': forwardRef,\n 'resolveForwardRef': resolveForwardRef,\n}))();\n\nlet jitOptions = null;\nfunction setJitOptions(options) {\n if (jitOptions !== null) {\n if (options.defaultEncapsulation !== jitOptions.defaultEncapsulation) {\n ngDevMode &&\n console.error('Provided value for `defaultEncapsulation` can not be changed once it has been set.');\n return;\n }\n if (options.preserveWhitespaces !== jitOptions.preserveWhitespaces) {\n ngDevMode &&\n console.error('Provided value for `preserveWhitespaces` can not be changed once it has been set.');\n return;\n }\n }\n jitOptions = options;\n}\nfunction getJitOptions() {\n return jitOptions;\n}\nfunction resetJitOptions() {\n jitOptions = null;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction patchModuleCompilation() {\n // Does nothing, but exists as a target for patching.\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction isModuleWithProviders(value) {\n return value.ngModule !== undefined;\n}\nfunction isNgModule(value) {\n return !!getNgModuleDef(value);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst moduleQueue = [];\n/**\n * Enqueues moduleDef to be checked later to see if scope can be set on its\n * component declarations.\n */\nfunction enqueueModuleForDelayedScoping(moduleType, ngModule) {\n moduleQueue.push({ moduleType, ngModule });\n}\nlet flushingModuleQueue = false;\n/**\n * Loops over queued module definitions, if a given module definition has all of its\n * declarations resolved, it dequeues that module definition and sets the scope on\n * its declarations.\n */\nfunction flushModuleScopingQueueAsMuchAsPossible() {\n if (!flushingModuleQueue) {\n flushingModuleQueue = true;\n try {\n for (let i = moduleQueue.length - 1; i >= 0; i--) {\n const { moduleType, ngModule } = moduleQueue[i];\n if (ngModule.declarations && ngModule.declarations.every(isResolvedDeclaration)) {\n // dequeue\n moduleQueue.splice(i, 1);\n setScopeOnDeclaredComponents(moduleType, ngModule);\n }\n }\n }\n finally {\n flushingModuleQueue = false;\n }\n }\n}\n/**\n * Returns truthy if a declaration has resolved. If the declaration happens to be\n * an array of declarations, it will recurse to check each declaration in that array\n * (which may also be arrays).\n */\nfunction isResolvedDeclaration(declaration) {\n if (Array.isArray(declaration)) {\n return declaration.every(isResolvedDeclaration);\n }\n return !!resolveForwardRef(declaration);\n}\n/**\n * Compiles a module in JIT mode.\n *\n * This function automatically gets called when a class has a `@NgModule` decorator.\n */\nfunction compileNgModule(moduleType, ngModule = {}) {\n patchModuleCompilation();\n compileNgModuleDefs(moduleType, ngModule);\n if (ngModule.id !== undefined) {\n registerNgModuleType(moduleType, ngModule.id);\n }\n // Because we don't know if all declarations have resolved yet at the moment the\n // NgModule decorator is executing, we're enqueueing the setting of module scope\n // on its declarations to be run at a later time when all declarations for the module,\n // including forward refs, have resolved.\n enqueueModuleForDelayedScoping(moduleType, ngModule);\n}\n/**\n * Compiles and adds the `ɵmod`, `ɵfac` and `ɵinj` properties to the module class.\n *\n * It's possible to compile a module via this API which will allow duplicate declarations in its\n * root.\n */\nfunction compileNgModuleDefs(moduleType, ngModule, allowDuplicateDeclarationsInRoot = false) {\n ngDevMode && assertDefined(moduleType, 'Required value moduleType');\n ngDevMode && assertDefined(ngModule, 'Required value ngModule');\n const declarations = flatten(ngModule.declarations || EMPTY_ARRAY);\n let ngModuleDef = null;\n Object.defineProperty(moduleType, NG_MOD_DEF, {\n configurable: true,\n get: () => {\n if (ngModuleDef === null) {\n if (ngDevMode && ngModule.imports && ngModule.imports.indexOf(moduleType) > -1) {\n // We need to assert this immediately, because allowing it to continue will cause it to\n // go into an infinite loop before we've reached the point where we throw all the errors.\n throw new Error(`'${stringifyForError(moduleType)}' module can't import itself`);\n }\n const compiler = getCompilerFacade({ usage: 0 /* JitCompilerUsage.Decorator */, kind: 'NgModule', type: moduleType });\n ngModuleDef = compiler.compileNgModule(angularCoreEnv, `ng:///${moduleType.name}/ɵmod.js`, {\n type: moduleType,\n bootstrap: flatten(ngModule.bootstrap || EMPTY_ARRAY).map(resolveForwardRef),\n declarations: declarations.map(resolveForwardRef),\n imports: flatten(ngModule.imports || EMPTY_ARRAY)\n .map(resolveForwardRef)\n .map(expandModuleWithProviders),\n exports: flatten(ngModule.exports || EMPTY_ARRAY)\n .map(resolveForwardRef)\n .map(expandModuleWithProviders),\n schemas: ngModule.schemas ? flatten(ngModule.schemas) : null,\n id: ngModule.id || null,\n });\n // Set `schemas` on ngModuleDef to an empty array in JIT mode to indicate that runtime\n // should verify that there are no unknown elements in a template. In AOT mode, that check\n // happens at compile time and `schemas` information is not present on Component and Module\n // defs after compilation (so the check doesn't happen the second time at runtime).\n if (!ngModuleDef.schemas) {\n ngModuleDef.schemas = [];\n }\n }\n return ngModuleDef;\n }\n });\n let ngFactoryDef = null;\n Object.defineProperty(moduleType, NG_FACTORY_DEF, {\n get: () => {\n if (ngFactoryDef === null) {\n const compiler = getCompilerFacade({ usage: 0 /* JitCompilerUsage.Decorator */, kind: 'NgModule', type: moduleType });\n ngFactoryDef = compiler.compileFactory(angularCoreEnv, `ng:///${moduleType.name}/ɵfac.js`, {\n name: moduleType.name,\n type: moduleType,\n deps: reflectDependencies(moduleType),\n target: compiler.FactoryTarget.NgModule,\n typeArgumentCount: 0,\n });\n }\n return ngFactoryDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n let ngInjectorDef = null;\n Object.defineProperty(moduleType, NG_INJ_DEF, {\n get: () => {\n if (ngInjectorDef === null) {\n ngDevMode &&\n verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRoot);\n const meta = {\n name: moduleType.name,\n type: moduleType,\n providers: ngModule.providers || EMPTY_ARRAY,\n imports: [\n (ngModule.imports || EMPTY_ARRAY).map(resolveForwardRef),\n (ngModule.exports || EMPTY_ARRAY).map(resolveForwardRef),\n ],\n };\n const compiler = getCompilerFacade({ usage: 0 /* JitCompilerUsage.Decorator */, kind: 'NgModule', type: moduleType });\n ngInjectorDef =\n compiler.compileInjector(angularCoreEnv, `ng:///${moduleType.name}/ɵinj.js`, meta);\n }\n return ngInjectorDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n}\nfunction generateStandaloneInDeclarationsError(type, location) {\n const prefix = `Unexpected \"${stringifyForError(type)}\" found in the \"declarations\" array of the`;\n const suffix = `\"${stringifyForError(type)}\" is marked as standalone and can't be declared ` +\n 'in any NgModule - did you intend to import it instead (by adding it to the \"imports\" array)?';\n return `${prefix} ${location}, ${suffix}`;\n}\nfunction verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRoot, importingModule) {\n if (verifiedNgModule.get(moduleType))\n return;\n // skip verifications of standalone components, directives, and pipes\n if (isStandalone(moduleType))\n return;\n verifiedNgModule.set(moduleType, true);\n moduleType = resolveForwardRef(moduleType);\n let ngModuleDef;\n if (importingModule) {\n ngModuleDef = getNgModuleDef(moduleType);\n if (!ngModuleDef) {\n throw new Error(`Unexpected value '${moduleType.name}' imported by the module '${importingModule.name}'. Please add an @NgModule annotation.`);\n }\n }\n else {\n ngModuleDef = getNgModuleDef(moduleType, true);\n }\n const errors = [];\n const declarations = maybeUnwrapFn(ngModuleDef.declarations);\n const imports = maybeUnwrapFn(ngModuleDef.imports);\n flatten(imports).map(unwrapModuleWithProvidersImports).forEach(modOrStandaloneCmpt => {\n verifySemanticsOfNgModuleImport(modOrStandaloneCmpt, moduleType);\n verifySemanticsOfNgModuleDef(modOrStandaloneCmpt, false, moduleType);\n });\n const exports = maybeUnwrapFn(ngModuleDef.exports);\n declarations.forEach(verifyDeclarationsHaveDefinitions);\n declarations.forEach(verifyDirectivesHaveSelector);\n declarations.forEach((declarationType) => verifyNotStandalone(declarationType, moduleType));\n const combinedDeclarations = [\n ...declarations.map(resolveForwardRef),\n ...flatten(imports.map(computeCombinedExports)).map(resolveForwardRef),\n ];\n exports.forEach(verifyExportsAreDeclaredOrReExported);\n declarations.forEach(decl => verifyDeclarationIsUnique(decl, allowDuplicateDeclarationsInRoot));\n declarations.forEach(verifyComponentEntryComponentsIsPartOfNgModule);\n const ngModule = getAnnotation(moduleType, 'NgModule');\n if (ngModule) {\n ngModule.imports &&\n flatten(ngModule.imports).map(unwrapModuleWithProvidersImports).forEach(mod => {\n verifySemanticsOfNgModuleImport(mod, moduleType);\n verifySemanticsOfNgModuleDef(mod, false, moduleType);\n });\n ngModule.bootstrap && deepForEach(ngModule.bootstrap, verifyCorrectBootstrapType);\n ngModule.bootstrap && deepForEach(ngModule.bootstrap, verifyComponentIsPartOfNgModule);\n ngModule.entryComponents &&\n deepForEach(ngModule.entryComponents, verifyComponentIsPartOfNgModule);\n }\n // Throw Error if any errors were detected.\n if (errors.length) {\n throw new Error(errors.join('\\n'));\n }\n ////////////////////////////////////////////////////////////////////////////////////////////////\n function verifyDeclarationsHaveDefinitions(type) {\n type = resolveForwardRef(type);\n const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef$1(type);\n if (!def) {\n errors.push(`Unexpected value '${stringifyForError(type)}' declared by the module '${stringifyForError(moduleType)}'. Please add a @Pipe/@Directive/@Component annotation.`);\n }\n }\n function verifyDirectivesHaveSelector(type) {\n type = resolveForwardRef(type);\n const def = getDirectiveDef(type);\n if (!getComponentDef(type) && def && def.selectors.length == 0) {\n errors.push(`Directive ${stringifyForError(type)} has no selector, please add it!`);\n }\n }\n function verifyNotStandalone(type, moduleType) {\n type = resolveForwardRef(type);\n const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef$1(type);\n if (def?.standalone) {\n const location = `\"${stringifyForError(moduleType)}\" NgModule`;\n errors.push(generateStandaloneInDeclarationsError(type, location));\n }\n }\n function verifyExportsAreDeclaredOrReExported(type) {\n type = resolveForwardRef(type);\n const kind = getComponentDef(type) && 'component' || getDirectiveDef(type) && 'directive' ||\n getPipeDef$1(type) && 'pipe';\n if (kind) {\n // only checked if we are declared as Component, Directive, or Pipe\n // Modules don't need to be declared or imported.\n if (combinedDeclarations.lastIndexOf(type) === -1) {\n // We are exporting something which we don't explicitly declare or import.\n errors.push(`Can't export ${kind} ${stringifyForError(type)} from ${stringifyForError(moduleType)} as it was neither declared nor imported!`);\n }\n }\n }\n function verifyDeclarationIsUnique(type, suppressErrors) {\n type = resolveForwardRef(type);\n const existingModule = ownerNgModule.get(type);\n if (existingModule && existingModule !== moduleType) {\n if (!suppressErrors) {\n const modules = [existingModule, moduleType].map(stringifyForError).sort();\n errors.push(`Type ${stringifyForError(type)} is part of the declarations of 2 modules: ${modules[0]} and ${modules[1]}! ` +\n `Please consider moving ${stringifyForError(type)} to a higher module that imports ${modules[0]} and ${modules[1]}. ` +\n `You can also create a new NgModule that exports and includes ${stringifyForError(type)} then import that NgModule in ${modules[0]} and ${modules[1]}.`);\n }\n }\n else {\n // Mark type as having owner.\n ownerNgModule.set(type, moduleType);\n }\n }\n function verifyComponentIsPartOfNgModule(type) {\n type = resolveForwardRef(type);\n const existingModule = ownerNgModule.get(type);\n if (!existingModule && !isStandalone(type)) {\n errors.push(`Component ${stringifyForError(type)} is not part of any NgModule or the module has not been imported into your module.`);\n }\n }\n function verifyCorrectBootstrapType(type) {\n type = resolveForwardRef(type);\n if (!getComponentDef(type)) {\n errors.push(`${stringifyForError(type)} cannot be used as an entry component.`);\n }\n if (isStandalone(type)) {\n // Note: this error should be the same as the\n // `NGMODULE_BOOTSTRAP_IS_STANDALONE` one in AOT compiler.\n errors.push(`The \\`${stringifyForError(type)}\\` class is a standalone component, which can ` +\n `not be used in the \\`@NgModule.bootstrap\\` array. Use the \\`bootstrapApplication\\` ` +\n `function for bootstrap instead.`);\n }\n }\n function verifyComponentEntryComponentsIsPartOfNgModule(type) {\n type = resolveForwardRef(type);\n if (getComponentDef(type)) {\n // We know we are component\n const component = getAnnotation(type, 'Component');\n if (component && component.entryComponents) {\n deepForEach(component.entryComponents, verifyComponentIsPartOfNgModule);\n }\n }\n }\n function verifySemanticsOfNgModuleImport(type, importingModule) {\n type = resolveForwardRef(type);\n const directiveDef = getComponentDef(type) || getDirectiveDef(type);\n if (directiveDef !== null && !directiveDef.standalone) {\n throw new Error(`Unexpected directive '${type.name}' imported by the module '${importingModule.name}'. Please add an @NgModule annotation.`);\n }\n const pipeDef = getPipeDef$1(type);\n if (pipeDef !== null && !pipeDef.standalone) {\n throw new Error(`Unexpected pipe '${type.name}' imported by the module '${importingModule.name}'. Please add an @NgModule annotation.`);\n }\n }\n}\nfunction unwrapModuleWithProvidersImports(typeOrWithProviders) {\n typeOrWithProviders = resolveForwardRef(typeOrWithProviders);\n return typeOrWithProviders.ngModule || typeOrWithProviders;\n}\nfunction getAnnotation(type, name) {\n let annotation = null;\n collect(type.__annotations__);\n collect(type.decorators);\n return annotation;\n function collect(annotations) {\n if (annotations) {\n annotations.forEach(readAnnotation);\n }\n }\n function readAnnotation(decorator) {\n if (!annotation) {\n const proto = Object.getPrototypeOf(decorator);\n if (proto.ngMetadataName == name) {\n annotation = decorator;\n }\n else if (decorator.type) {\n const proto = Object.getPrototypeOf(decorator.type);\n if (proto.ngMetadataName == name) {\n annotation = decorator.args[0];\n }\n }\n }\n }\n}\n/**\n * Keep track of compiled components. This is needed because in tests we often want to compile the\n * same component with more than one NgModule. This would cause an error unless we reset which\n * NgModule the component belongs to. We keep the list of compiled components here so that the\n * TestBed can reset it later.\n */\nlet ownerNgModule = new WeakMap();\nlet verifiedNgModule = new WeakMap();\nfunction resetCompiledComponents() {\n ownerNgModule = new WeakMap();\n verifiedNgModule = new WeakMap();\n moduleQueue.length = 0;\n}\n/**\n * Computes the combined declarations of explicit declarations, as well as declarations inherited by\n * traversing the exports of imported modules.\n * @param type\n */\nfunction computeCombinedExports(type) {\n type = resolveForwardRef(type);\n const ngModuleDef = getNgModuleDef(type);\n // a standalone component, directive or pipe\n if (ngModuleDef === null) {\n return [type];\n }\n return [...flatten(maybeUnwrapFn(ngModuleDef.exports).map((type) => {\n const ngModuleDef = getNgModuleDef(type);\n if (ngModuleDef) {\n verifySemanticsOfNgModuleDef(type, false);\n return computeCombinedExports(type);\n }\n else {\n return type;\n }\n }))];\n}\n/**\n * Some declared components may be compiled asynchronously, and thus may not have their\n * ɵcmp set yet. If this is the case, then a reference to the module is written into\n * the `ngSelectorScope` property of the declared type.\n */\nfunction setScopeOnDeclaredComponents(moduleType, ngModule) {\n const declarations = flatten(ngModule.declarations || EMPTY_ARRAY);\n const transitiveScopes = transitiveScopesFor(moduleType);\n declarations.forEach(declaration => {\n declaration = resolveForwardRef(declaration);\n if (declaration.hasOwnProperty(NG_COMP_DEF)) {\n // A `ɵcmp` field exists - go ahead and patch the component directly.\n const component = declaration;\n const componentDef = getComponentDef(component);\n patchComponentDefWithScope(componentDef, transitiveScopes);\n }\n else if (!declaration.hasOwnProperty(NG_DIR_DEF) && !declaration.hasOwnProperty(NG_PIPE_DEF)) {\n // Set `ngSelectorScope` for future reference when the component compilation finishes.\n declaration.ngSelectorScope = moduleType;\n }\n });\n}\n/**\n * Patch the definition of a component with directives and pipes from the compilation scope of\n * a given module.\n */\nfunction patchComponentDefWithScope(componentDef, transitiveScopes) {\n componentDef.directiveDefs = () => Array.from(transitiveScopes.compilation.directives)\n .map(dir => dir.hasOwnProperty(NG_COMP_DEF) ? getComponentDef(dir) : getDirectiveDef(dir))\n .filter(def => !!def);\n componentDef.pipeDefs = () => Array.from(transitiveScopes.compilation.pipes).map(pipe => getPipeDef$1(pipe));\n componentDef.schemas = transitiveScopes.schemas;\n // Since we avoid Components/Directives/Pipes recompiling in case there are no overrides, we\n // may face a problem where previously compiled defs available to a given Component/Directive\n // are cached in TView and may become stale (in case any of these defs gets recompiled). In\n // order to avoid this problem, we force fresh TView to be created.\n componentDef.tView = null;\n}\n/**\n * Compute the pair of transitive scopes (compilation scope and exported scope) for a given type\n * (either a NgModule or a standalone component / directive / pipe).\n */\nfunction transitiveScopesFor(type) {\n if (isNgModule(type)) {\n return transitiveScopesForNgModule(type);\n }\n else if (isStandalone(type)) {\n const directiveDef = getComponentDef(type) || getDirectiveDef(type);\n if (directiveDef !== null) {\n return {\n schemas: null,\n compilation: {\n directives: new Set(),\n pipes: new Set(),\n },\n exported: {\n directives: new Set([type]),\n pipes: new Set(),\n },\n };\n }\n const pipeDef = getPipeDef$1(type);\n if (pipeDef !== null) {\n return {\n schemas: null,\n compilation: {\n directives: new Set(),\n pipes: new Set(),\n },\n exported: {\n directives: new Set(),\n pipes: new Set([type]),\n },\n };\n }\n }\n // TODO: change the error message to be more user-facing and take standalone into account\n throw new Error(`${type.name} does not have a module def (ɵmod property)`);\n}\n/**\n * Compute the pair of transitive scopes (compilation scope and exported scope) for a given module.\n *\n * This operation is memoized and the result is cached on the module's definition. This function can\n * be called on modules with components that have not fully compiled yet, but the result should not\n * be used until they have.\n *\n * @param moduleType module that transitive scope should be calculated for.\n */\nfunction transitiveScopesForNgModule(moduleType) {\n const def = getNgModuleDef(moduleType, true);\n if (def.transitiveCompileScopes !== null) {\n return def.transitiveCompileScopes;\n }\n const scopes = {\n schemas: def.schemas || null,\n compilation: {\n directives: new Set(),\n pipes: new Set(),\n },\n exported: {\n directives: new Set(),\n pipes: new Set(),\n },\n };\n maybeUnwrapFn(def.imports).forEach((imported) => {\n // When this module imports another, the imported module's exported directives and pipes are\n // added to the compilation scope of this module.\n const importedScope = transitiveScopesFor(imported);\n importedScope.exported.directives.forEach(entry => scopes.compilation.directives.add(entry));\n importedScope.exported.pipes.forEach(entry => scopes.compilation.pipes.add(entry));\n });\n maybeUnwrapFn(def.declarations).forEach(declared => {\n const declaredWithDefs = declared;\n if (getPipeDef$1(declaredWithDefs)) {\n scopes.compilation.pipes.add(declared);\n }\n else {\n // Either declared has a ɵcmp or ɵdir, or it's a component which hasn't\n // had its template compiled yet. In either case, it gets added to the compilation's\n // directives.\n scopes.compilation.directives.add(declared);\n }\n });\n maybeUnwrapFn(def.exports).forEach((exported) => {\n const exportedType = exported;\n // Either the type is a module, a pipe, or a component/directive (which may not have a\n // ɵcmp as it might be compiled asynchronously).\n if (isNgModule(exportedType)) {\n // When this module exports another, the exported module's exported directives and pipes are\n // added to both the compilation and exported scopes of this module.\n const exportedScope = transitiveScopesFor(exportedType);\n exportedScope.exported.directives.forEach(entry => {\n scopes.compilation.directives.add(entry);\n scopes.exported.directives.add(entry);\n });\n exportedScope.exported.pipes.forEach(entry => {\n scopes.compilation.pipes.add(entry);\n scopes.exported.pipes.add(entry);\n });\n }\n else if (getPipeDef$1(exportedType)) {\n scopes.exported.pipes.add(exportedType);\n }\n else {\n scopes.exported.directives.add(exportedType);\n }\n });\n def.transitiveCompileScopes = scopes;\n return scopes;\n}\nfunction expandModuleWithProviders(value) {\n if (isModuleWithProviders(value)) {\n return value.ngModule;\n }\n return value;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Keep track of the compilation depth to avoid reentrancy issues during JIT compilation. This\n * matters in the following scenario:\n *\n * Consider a component 'A' that extends component 'B', both declared in module 'M'. During\n * the compilation of 'A' the definition of 'B' is requested to capture the inheritance chain,\n * potentially triggering compilation of 'B'. If this nested compilation were to trigger\n * `flushModuleScopingQueueAsMuchAsPossible` it may happen that module 'M' is still pending in the\n * queue, resulting in 'A' and 'B' to be patched with the NgModule scope. As the compilation of\n * 'A' is still in progress, this would introduce a circular dependency on its compilation. To avoid\n * this issue, the module scope queue is only flushed for compilations at the depth 0, to ensure\n * all compilations have finished.\n */\nlet compilationDepth = 0;\n/**\n * Compile an Angular component according to its decorator metadata, and patch the resulting\n * component def (ɵcmp) onto the component type.\n *\n * Compilation may be asynchronous (due to the need to resolve URLs for the component template or\n * other resources, for example). In the event that compilation is not immediate, `compileComponent`\n * will enqueue resource resolution into a global queue and will fail to return the `ɵcmp`\n * until the global queue has been resolved with a call to `resolveComponentResources`.\n */\nfunction compileComponent(type, metadata) {\n // Initialize ngDevMode. This must be the first statement in compileComponent.\n // See the `initNgDevMode` docstring for more information.\n (typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode();\n let ngComponentDef = null;\n // Metadata may have resources which need to be resolved.\n maybeQueueResolutionOfComponentResources(type, metadata);\n // Note that we're using the same function as `Directive`, because that's only subset of metadata\n // that we need to create the ngFactoryDef. We're avoiding using the component metadata\n // because we'd have to resolve the asynchronous templates.\n addDirectiveFactoryDef(type, metadata);\n Object.defineProperty(type, NG_COMP_DEF, {\n get: () => {\n if (ngComponentDef === null) {\n const compiler = getCompilerFacade({ usage: 0 /* JitCompilerUsage.Decorator */, kind: 'component', type: type });\n if (componentNeedsResolution(metadata)) {\n const error = [`Component '${type.name}' is not resolved:`];\n if (metadata.templateUrl) {\n error.push(` - templateUrl: ${metadata.templateUrl}`);\n }\n if (metadata.styleUrls && metadata.styleUrls.length) {\n error.push(` - styleUrls: ${JSON.stringify(metadata.styleUrls)}`);\n }\n error.push(`Did you run and wait for 'resolveComponentResources()'?`);\n throw new Error(error.join('\\n'));\n }\n // This const was called `jitOptions` previously but had to be renamed to `options` because\n // of a bug with Terser that caused optimized JIT builds to throw a `ReferenceError`.\n // This bug was investigated in https://github.com/angular/angular-cli/issues/17264.\n // We should not rename it back until https://github.com/terser/terser/issues/615 is fixed.\n const options = getJitOptions();\n let preserveWhitespaces = metadata.preserveWhitespaces;\n if (preserveWhitespaces === undefined) {\n if (options !== null && options.preserveWhitespaces !== undefined) {\n preserveWhitespaces = options.preserveWhitespaces;\n }\n else {\n preserveWhitespaces = false;\n }\n }\n let encapsulation = metadata.encapsulation;\n if (encapsulation === undefined) {\n if (options !== null && options.defaultEncapsulation !== undefined) {\n encapsulation = options.defaultEncapsulation;\n }\n else {\n encapsulation = ViewEncapsulation$1.Emulated;\n }\n }\n const templateUrl = metadata.templateUrl || `ng:///${type.name}/template.html`;\n const meta = {\n ...directiveMetadata(type, metadata),\n typeSourceSpan: compiler.createParseSourceSpan('Component', type.name, templateUrl),\n template: metadata.template || '',\n preserveWhitespaces,\n styles: metadata.styles || EMPTY_ARRAY,\n animations: metadata.animations,\n // JIT components are always compiled against an empty set of `declarations`. Instead, the\n // `directiveDefs` and `pipeDefs` are updated at a later point:\n // * for NgModule-based components, they're set when the NgModule which declares the\n // component resolves in the module scoping queue\n // * for standalone components, they're set just below, after `compileComponent`.\n declarations: [],\n changeDetection: metadata.changeDetection,\n encapsulation,\n interpolation: metadata.interpolation,\n viewProviders: metadata.viewProviders || null,\n isStandalone: !!metadata.standalone,\n };\n compilationDepth++;\n try {\n if (meta.usesInheritance) {\n addDirectiveDefToUndecoratedParents(type);\n }\n ngComponentDef =\n compiler.compileComponent(angularCoreEnv, templateUrl, meta);\n if (metadata.standalone) {\n // Patch the component definition for standalone components with `directiveDefs` and\n // `pipeDefs` functions which lazily compute the directives/pipes available in the\n // standalone component. Also set `dependencies` to the lazily resolved list of imports.\n const imports = flatten(metadata.imports || EMPTY_ARRAY);\n const { directiveDefs, pipeDefs } = getStandaloneDefFunctions(type, imports);\n ngComponentDef.directiveDefs = directiveDefs;\n ngComponentDef.pipeDefs = pipeDefs;\n ngComponentDef.dependencies = () => imports.map(resolveForwardRef);\n }\n }\n finally {\n // Ensure that the compilation depth is decremented even when the compilation failed.\n compilationDepth--;\n }\n if (compilationDepth === 0) {\n // When NgModule decorator executed, we enqueued the module definition such that\n // it would only dequeue and add itself as module scope to all of its declarations,\n // but only if if all of its declarations had resolved. This call runs the check\n // to see if any modules that are in the queue can be dequeued and add scope to\n // their declarations.\n flushModuleScopingQueueAsMuchAsPossible();\n }\n // If component compilation is async, then the @NgModule annotation which declares the\n // component may execute and set an ngSelectorScope property on the component type. This\n // allows the component to patch itself with directiveDefs from the module after it\n // finishes compiling.\n if (hasSelectorScope(type)) {\n const scopes = transitiveScopesFor(type.ngSelectorScope);\n patchComponentDefWithScope(ngComponentDef, scopes);\n }\n if (metadata.schemas) {\n if (metadata.standalone) {\n ngComponentDef.schemas = metadata.schemas;\n }\n else {\n throw new Error(`The 'schemas' was specified for the ${stringifyForError(type)} but is only valid on a component that is standalone.`);\n }\n }\n else if (metadata.standalone) {\n ngComponentDef.schemas = [];\n }\n }\n return ngComponentDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n}\nfunction getDependencyTypeForError(type) {\n if (getComponentDef(type))\n return 'component';\n if (getDirectiveDef(type))\n return 'directive';\n if (getPipeDef$1(type))\n return 'pipe';\n return 'type';\n}\nfunction verifyStandaloneImport(depType, importingType) {\n if (isForwardRef(depType)) {\n depType = resolveForwardRef(depType);\n if (!depType) {\n throw new Error(`Expected forwardRef function, imported from \"${stringifyForError(importingType)}\", to return a standalone entity or NgModule but got \"${stringifyForError(depType) || depType}\".`);\n }\n }\n if (getNgModuleDef(depType) == null) {\n const def = getComponentDef(depType) || getDirectiveDef(depType) || getPipeDef$1(depType);\n if (def != null) {\n // if a component, directive or pipe is imported make sure that it is standalone\n if (!def.standalone) {\n throw new Error(`The \"${stringifyForError(depType)}\" ${getDependencyTypeForError(depType)}, imported from \"${stringifyForError(importingType)}\", is not standalone. Did you forget to add the standalone: true flag?`);\n }\n }\n else {\n // it can be either a module with provider or an unknown (not annotated) type\n if (isModuleWithProviders(depType)) {\n throw new Error(`A module with providers was imported from \"${stringifyForError(importingType)}\". Modules with providers are not supported in standalone components imports.`);\n }\n else {\n throw new Error(`The \"${stringifyForError(depType)}\" type, imported from \"${stringifyForError(importingType)}\", must be a standalone component / directive / pipe or an NgModule. Did you forget to add the required @Component / @Directive / @Pipe or @NgModule annotation?`);\n }\n }\n }\n}\n/**\n * Build memoized `directiveDefs` and `pipeDefs` functions for the component definition of a\n * standalone component, which process `imports` and filter out directives and pipes. The use of\n * memoized functions here allows for the delayed resolution of any `forwardRef`s present in the\n * component's `imports`.\n */\nfunction getStandaloneDefFunctions(type, imports) {\n let cachedDirectiveDefs = null;\n let cachedPipeDefs = null;\n const directiveDefs = () => {\n if (cachedDirectiveDefs === null) {\n // Standalone components are always able to self-reference, so include the component's own\n // definition in its `directiveDefs`.\n cachedDirectiveDefs = [getComponentDef(type)];\n const seen = new Set();\n for (const rawDep of imports) {\n ngDevMode && verifyStandaloneImport(rawDep, type);\n const dep = resolveForwardRef(rawDep);\n if (seen.has(dep)) {\n continue;\n }\n seen.add(dep);\n if (!!getNgModuleDef(dep)) {\n const scope = transitiveScopesFor(dep);\n for (const dir of scope.exported.directives) {\n const def = getComponentDef(dir) || getDirectiveDef(dir);\n if (def && !seen.has(dir)) {\n seen.add(dir);\n cachedDirectiveDefs.push(def);\n }\n }\n }\n else {\n const def = getComponentDef(dep) || getDirectiveDef(dep);\n if (def) {\n cachedDirectiveDefs.push(def);\n }\n }\n }\n }\n return cachedDirectiveDefs;\n };\n const pipeDefs = () => {\n if (cachedPipeDefs === null) {\n cachedPipeDefs = [];\n const seen = new Set();\n for (const rawDep of imports) {\n const dep = resolveForwardRef(rawDep);\n if (seen.has(dep)) {\n continue;\n }\n seen.add(dep);\n if (!!getNgModuleDef(dep)) {\n const scope = transitiveScopesFor(dep);\n for (const pipe of scope.exported.pipes) {\n const def = getPipeDef$1(pipe);\n if (def && !seen.has(pipe)) {\n seen.add(pipe);\n cachedPipeDefs.push(def);\n }\n }\n }\n else {\n const def = getPipeDef$1(dep);\n if (def) {\n cachedPipeDefs.push(def);\n }\n }\n }\n }\n return cachedPipeDefs;\n };\n return {\n directiveDefs,\n pipeDefs,\n };\n}\nfunction hasSelectorScope(component) {\n return component.ngSelectorScope !== undefined;\n}\n/**\n * Compile an Angular directive according to its decorator metadata, and patch the resulting\n * directive def onto the component type.\n *\n * In the event that compilation is not immediate, `compileDirective` will return a `Promise` which\n * will resolve when compilation completes and the directive becomes usable.\n */\nfunction compileDirective(type, directive) {\n let ngDirectiveDef = null;\n addDirectiveFactoryDef(type, directive || {});\n Object.defineProperty(type, NG_DIR_DEF, {\n get: () => {\n if (ngDirectiveDef === null) {\n // `directive` can be null in the case of abstract directives as a base class\n // that use `@Directive()` with no selector. In that case, pass empty object to the\n // `directiveMetadata` function instead of null.\n const meta = getDirectiveMetadata(type, directive || {});\n const compiler = getCompilerFacade({ usage: 0 /* JitCompilerUsage.Decorator */, kind: 'directive', type });\n ngDirectiveDef =\n compiler.compileDirective(angularCoreEnv, meta.sourceMapUrl, meta.metadata);\n }\n return ngDirectiveDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n}\nfunction getDirectiveMetadata(type, metadata) {\n const name = type && type.name;\n const sourceMapUrl = `ng:///${name}/ɵdir.js`;\n const compiler = getCompilerFacade({ usage: 0 /* JitCompilerUsage.Decorator */, kind: 'directive', type });\n const facade = directiveMetadata(type, metadata);\n facade.typeSourceSpan = compiler.createParseSourceSpan('Directive', name, sourceMapUrl);\n if (facade.usesInheritance) {\n addDirectiveDefToUndecoratedParents(type);\n }\n return { metadata: facade, sourceMapUrl };\n}\nfunction addDirectiveFactoryDef(type, metadata) {\n let ngFactoryDef = null;\n Object.defineProperty(type, NG_FACTORY_DEF, {\n get: () => {\n if (ngFactoryDef === null) {\n const meta = getDirectiveMetadata(type, metadata);\n const compiler = getCompilerFacade({ usage: 0 /* JitCompilerUsage.Decorator */, kind: 'directive', type });\n ngFactoryDef = compiler.compileFactory(angularCoreEnv, `ng:///${type.name}/ɵfac.js`, {\n name: meta.metadata.name,\n type: meta.metadata.type,\n typeArgumentCount: 0,\n deps: reflectDependencies(type),\n target: compiler.FactoryTarget.Directive\n });\n }\n return ngFactoryDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n}\nfunction extendsDirectlyFromObject(type) {\n return Object.getPrototypeOf(type.prototype) === Object.prototype;\n}\n/**\n * Extract the `R3DirectiveMetadata` for a particular directive (either a `Directive` or a\n * `Component`).\n */\nfunction directiveMetadata(type, metadata) {\n // Reflect inputs and outputs.\n const reflect = getReflect();\n const propMetadata = reflect.ownPropMetadata(type);\n return {\n name: type.name,\n type: type,\n selector: metadata.selector !== undefined ? metadata.selector : null,\n host: metadata.host || EMPTY_OBJ,\n propMetadata: propMetadata,\n inputs: metadata.inputs || EMPTY_ARRAY,\n outputs: metadata.outputs || EMPTY_ARRAY,\n queries: extractQueriesMetadata(type, propMetadata, isContentQuery),\n lifecycle: { usesOnChanges: reflect.hasLifecycleHook(type, 'ngOnChanges') },\n typeSourceSpan: null,\n usesInheritance: !extendsDirectlyFromObject(type),\n exportAs: extractExportAs(metadata.exportAs),\n providers: metadata.providers || null,\n viewQueries: extractQueriesMetadata(type, propMetadata, isViewQuery),\n isStandalone: !!metadata.standalone,\n hostDirectives: metadata.hostDirectives?.map(directive => typeof directive === 'function' ? { directive } : directive) ||\n null\n };\n}\n/**\n * Adds a directive definition to all parent classes of a type that don't have an Angular decorator.\n */\nfunction addDirectiveDefToUndecoratedParents(type) {\n const objPrototype = Object.prototype;\n let parent = Object.getPrototypeOf(type.prototype).constructor;\n // Go up the prototype until we hit `Object`.\n while (parent && parent !== objPrototype) {\n // Since inheritance works if the class was annotated already, we only need to add\n // the def if there are no annotations and the def hasn't been created already.\n if (!getDirectiveDef(parent) && !getComponentDef(parent) &&\n shouldAddAbstractDirective(parent)) {\n compileDirective(parent, null);\n }\n parent = Object.getPrototypeOf(parent);\n }\n}\nfunction convertToR3QueryPredicate(selector) {\n return typeof selector === 'string' ? splitByComma(selector) : resolveForwardRef(selector);\n}\nfunction convertToR3QueryMetadata(propertyName, ann) {\n return {\n propertyName: propertyName,\n predicate: convertToR3QueryPredicate(ann.selector),\n descendants: ann.descendants,\n first: ann.first,\n read: ann.read ? ann.read : null,\n static: !!ann.static,\n emitDistinctChangesOnly: !!ann.emitDistinctChangesOnly,\n };\n}\nfunction extractQueriesMetadata(type, propMetadata, isQueryAnn) {\n const queriesMeta = [];\n for (const field in propMetadata) {\n if (propMetadata.hasOwnProperty(field)) {\n const annotations = propMetadata[field];\n annotations.forEach(ann => {\n if (isQueryAnn(ann)) {\n if (!ann.selector) {\n throw new Error(`Can't construct a query for the property \"${field}\" of ` +\n `\"${stringifyForError(type)}\" since the query selector wasn't defined.`);\n }\n if (annotations.some(isInputAnnotation)) {\n throw new Error(`Cannot combine @Input decorators with query decorators`);\n }\n queriesMeta.push(convertToR3QueryMetadata(field, ann));\n }\n });\n }\n }\n return queriesMeta;\n}\nfunction extractExportAs(exportAs) {\n return exportAs === undefined ? null : splitByComma(exportAs);\n}\nfunction isContentQuery(value) {\n const name = value.ngMetadataName;\n return name === 'ContentChild' || name === 'ContentChildren';\n}\nfunction isViewQuery(value) {\n const name = value.ngMetadataName;\n return name === 'ViewChild' || name === 'ViewChildren';\n}\nfunction isInputAnnotation(value) {\n return value.ngMetadataName === 'Input';\n}\nfunction splitByComma(value) {\n return value.split(',').map(piece => piece.trim());\n}\nconst LIFECYCLE_HOOKS = [\n 'ngOnChanges', 'ngOnInit', 'ngOnDestroy', 'ngDoCheck', 'ngAfterViewInit', 'ngAfterViewChecked',\n 'ngAfterContentInit', 'ngAfterContentChecked'\n];\nfunction shouldAddAbstractDirective(type) {\n const reflect = getReflect();\n if (LIFECYCLE_HOOKS.some(hookName => reflect.hasLifecycleHook(type, hookName))) {\n return true;\n }\n const propMetadata = reflect.propMetadata(type);\n for (const field in propMetadata) {\n const annotations = propMetadata[field];\n for (let i = 0; i < annotations.length; i++) {\n const current = annotations[i];\n const metadataName = current.ngMetadataName;\n if (isInputAnnotation(current) || isContentQuery(current) || isViewQuery(current) ||\n metadataName === 'Output' || metadataName === 'HostBinding' ||\n metadataName === 'HostListener') {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction compilePipe(type, meta) {\n let ngPipeDef = null;\n let ngFactoryDef = null;\n Object.defineProperty(type, NG_FACTORY_DEF, {\n get: () => {\n if (ngFactoryDef === null) {\n const metadata = getPipeMetadata(type, meta);\n const compiler = getCompilerFacade({ usage: 0 /* JitCompilerUsage.Decorator */, kind: 'pipe', type: metadata.type });\n ngFactoryDef = compiler.compileFactory(angularCoreEnv, `ng:///${metadata.name}/ɵfac.js`, {\n name: metadata.name,\n type: metadata.type,\n typeArgumentCount: 0,\n deps: reflectDependencies(type),\n target: compiler.FactoryTarget.Pipe\n });\n }\n return ngFactoryDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n Object.defineProperty(type, NG_PIPE_DEF, {\n get: () => {\n if (ngPipeDef === null) {\n const metadata = getPipeMetadata(type, meta);\n const compiler = getCompilerFacade({ usage: 0 /* JitCompilerUsage.Decorator */, kind: 'pipe', type: metadata.type });\n ngPipeDef =\n compiler.compilePipe(angularCoreEnv, `ng:///${metadata.name}/ɵpipe.js`, metadata);\n }\n return ngPipeDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n}\nfunction getPipeMetadata(type, meta) {\n return {\n type: type,\n name: type.name,\n pipeName: meta.name,\n pure: meta.pure !== undefined ? meta.pure : true,\n isStandalone: !!meta.standalone,\n };\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Type of the Directive metadata.\n *\n * @publicApi\n */\nconst Directive = makeDecorator('Directive', (dir = {}) => dir, undefined, undefined, (type, meta) => compileDirective(type, meta));\n/**\n * Component decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Component = makeDecorator('Component', (c = {}) => ({ changeDetection: ChangeDetectionStrategy.Default, ...c }), Directive, undefined, (type, meta) => compileComponent(type, meta));\n/**\n * @Annotation\n * @publicApi\n */\nconst Pipe = makeDecorator('Pipe', (p) => ({ pure: true, ...p }), undefined, undefined, (type, meta) => compilePipe(type, meta));\n/**\n * @Annotation\n * @publicApi\n */\nconst Input = makePropDecorator('Input', (bindingPropertyName) => ({ bindingPropertyName }));\n/**\n * @Annotation\n * @publicApi\n */\nconst Output = makePropDecorator('Output', (bindingPropertyName) => ({ bindingPropertyName }));\n/**\n * @Annotation\n * @publicApi\n */\nconst HostBinding = makePropDecorator('HostBinding', (hostPropertyName) => ({ hostPropertyName }));\n/**\n * Decorator that binds a DOM event to a host listener and supplies configuration metadata.\n * Angular invokes the supplied handler method when the host element emits the specified event,\n * and updates the bound element with the result.\n *\n * If the handler method returns false, applies `preventDefault` on the bound element.\n *\n * @usageNotes\n *\n * The following example declares a directive\n * that attaches a click listener to a button and counts clicks.\n *\n * ```ts\n * @Directive({selector: 'button[counting]'})\n * class CountClicks {\n * numberOfClicks = 0;\n *\n * @HostListener('click', ['$event.target'])\n * onClick(btn) {\n * console.log('button', btn, 'number of clicks:', this.numberOfClicks++);\n * }\n * }\n *\n * @Component({\n * selector: 'app',\n * template: '<button counting>Increment</button>',\n * })\n * class App {}\n *\n * ```\n *\n * The following example registers another DOM event handler that listens for `Enter` key-press\n * events on the global `window`.\n * ``` ts\n * import { HostListener, Component } from \"@angular/core\";\n *\n * @Component({\n * selector: 'app',\n * template: `<h1>Hello, you have pressed enter {{counter}} number of times!</h1> Press enter key\n * to increment the counter.\n * <button (click)=\"resetCounter()\">Reset Counter</button>`\n * })\n * class AppComponent {\n * counter = 0;\n * @HostListener('window:keydown.enter', ['$event'])\n * handleKeyDown(event: KeyboardEvent) {\n * this.counter++;\n * }\n * resetCounter() {\n * this.counter = 0;\n * }\n * }\n * ```\n * The list of valid key names for `keydown` and `keyup` events\n * can be found here:\n * https://www.w3.org/TR/DOM-Level-3-Events-key/#named-key-attribute-values\n *\n * Note that keys can also be combined, e.g. `@HostListener('keydown.shift.a')`.\n *\n * The global target names that can be used to prefix an event name are\n * `document:`, `window:` and `body:`.\n *\n * @Annotation\n * @publicApi\n */\nconst HostListener = makePropDecorator('HostListener', (eventName, args) => ({ eventName, args }));\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @Annotation\n * @publicApi\n */\nconst NgModule = makeDecorator('NgModule', (ngModule) => ngModule, undefined, undefined, \n/**\n * Decorator that marks the following class as an NgModule, and supplies\n * configuration metadata for it.\n *\n * * The `declarations` and `entryComponents` options configure the compiler\n * with information about what belongs to the NgModule.\n * * The `providers` options configures the NgModule's injector to provide\n * dependencies the NgModule members.\n * * The `imports` and `exports` options bring in members from other modules, and make\n * this module's members available to others.\n */\n(type, meta) => compileNgModule(type, meta));\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction noop(...args) {\n // Do nothing.\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The existence of this constant (in this particular file) informs the Angular compiler that the\n * current program is actually @angular/core, which needs to be compiled specially.\n */\nconst ITS_JUST_ANGULAR = true;\n\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") that you can use to provide\n * one or more initialization functions.\n *\n * The provided functions are injected at application startup and executed during\n * app initialization. If any of these functions returns a Promise or an Observable, initialization\n * does not complete until the Promise is resolved or the Observable is completed.\n *\n * You can, for example, create a factory function that loads language data\n * or an external configuration, and provide that function to the `APP_INITIALIZER` token.\n * The function is executed during the application bootstrap process,\n * and the needed data is available on startup.\n *\n * @see `ApplicationInitStatus`\n *\n * @usageNotes\n *\n * The following example illustrates how to configure a multi-provider using `APP_INITIALIZER` token\n * and a function returning a promise.\n *\n * ```\n * function initializeApp(): Promise<any> {\n * return new Promise((resolve, reject) => {\n * // Do some asynchronous stuff\n * resolve();\n * });\n * }\n *\n * @NgModule({\n * imports: [BrowserModule],\n * declarations: [AppComponent],\n * bootstrap: [AppComponent],\n * providers: [{\n * provide: APP_INITIALIZER,\n * useFactory: () => initializeApp,\n * multi: true\n * }]\n * })\n * export class AppModule {}\n * ```\n *\n * It's also possible to configure a multi-provider using `APP_INITIALIZER` token and a function\n * returning an observable, see an example below. Note: the `HttpClient` in this example is used for\n * demo purposes to illustrate how the factory function can work with other providers available\n * through DI.\n *\n * ```\n * function initializeAppFactory(httpClient: HttpClient): () => Observable<any> {\n * return () => httpClient.get(\"https://someUrl.com/api/user\")\n * .pipe(\n * tap(user => { ... })\n * );\n * }\n *\n * @NgModule({\n * imports: [BrowserModule, HttpClientModule],\n * declarations: [AppComponent],\n * bootstrap: [AppComponent],\n * providers: [{\n * provide: APP_INITIALIZER,\n * useFactory: initializeAppFactory,\n * deps: [HttpClient],\n * multi: true\n * }]\n * })\n * export class AppModule {}\n * ```\n *\n * @publicApi\n */\nconst APP_INITIALIZER = new InjectionToken('Application Initializer');\n/**\n * A class that reflects the state of running {@link APP_INITIALIZER} functions.\n *\n * @publicApi\n */\nclass ApplicationInitStatus {\n constructor(appInits) {\n this.appInits = appInits;\n this.resolve = noop;\n this.reject = noop;\n this.initialized = false;\n this.done = false;\n // TODO: Throw RuntimeErrorCode.INVALID_MULTI_PROVIDER if appInits is not an array\n this.donePromise = new Promise((res, rej) => {\n this.resolve = res;\n this.reject = rej;\n });\n }\n /** @internal */\n runInitializers() {\n if (this.initialized) {\n return;\n }\n const asyncInitPromises = [];\n const complete = () => {\n this.done = true;\n this.resolve();\n };\n if (this.appInits) {\n for (let i = 0; i < this.appInits.length; i++) {\n const initResult = this.appInits[i]();\n if (isPromise(initResult)) {\n asyncInitPromises.push(initResult);\n }\n else if (isObservable(initResult)) {\n const observableAsPromise = new Promise((resolve, reject) => {\n initResult.subscribe({ complete: resolve, error: reject });\n });\n asyncInitPromises.push(observableAsPromise);\n }\n }\n }\n Promise.all(asyncInitPromises)\n .then(() => {\n complete();\n })\n .catch(e => {\n this.reject(e);\n });\n if (asyncInitPromises.length === 0) {\n complete();\n }\n this.initialized = true;\n }\n}\nApplicationInitStatus.ɵfac = function ApplicationInitStatus_Factory(t) { return new (t || ApplicationInitStatus)(ɵɵinject(APP_INITIALIZER, 8)); };\nApplicationInitStatus.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationInitStatus, factory: ApplicationInitStatus.ɵfac, providedIn: 'root' });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(ApplicationInitStatus, [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [APP_INITIALIZER]\n }, {\n type: Optional\n }] }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") representing a unique string ID, used\n * primarily for prefixing application attributes and CSS styles when\n * {@link ViewEncapsulation#Emulated ViewEncapsulation.Emulated} is being used.\n *\n * BY default, the value is randomly generated and assigned to the application by Angular.\n * To provide a custom ID value, use a DI provider <!-- TODO: provider --> to configure\n * the root {@link Injector} that uses this token.\n *\n * @publicApi\n */\nconst APP_ID = new InjectionToken('AppId', {\n providedIn: 'root',\n factory: _appIdRandomProviderFactory,\n});\nfunction _appIdRandomProviderFactory() {\n return `${_randomChar()}${_randomChar()}${_randomChar()}`;\n}\n/**\n * Providers that generate a random `APP_ID_TOKEN`.\n * @publicApi\n */\nconst APP_ID_RANDOM_PROVIDER = {\n provide: APP_ID,\n useFactory: _appIdRandomProviderFactory,\n deps: [],\n};\nfunction _randomChar() {\n return String.fromCharCode(97 + Math.floor(Math.random() * 25));\n}\n/**\n * A function that is executed when a platform is initialized.\n * @publicApi\n */\nconst PLATFORM_INITIALIZER = new InjectionToken('Platform Initializer');\n/**\n * A token that indicates an opaque platform ID.\n * @publicApi\n */\nconst PLATFORM_ID = new InjectionToken('Platform ID', {\n providedIn: 'platform',\n factory: () => 'unknown', // set a default platform name, when none set explicitly\n});\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") that provides a set of callbacks to\n * be called for every component that is bootstrapped.\n *\n * Each callback must take a `ComponentRef` instance and return nothing.\n *\n * `(componentRef: ComponentRef) => void`\n *\n * @publicApi\n */\nconst APP_BOOTSTRAP_LISTENER = new InjectionToken('appBootstrapListener');\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") that indicates the root directory of\n * the application\n * @publicApi\n */\nconst PACKAGE_ROOT_URL = new InjectionToken('Application Packages Root URL');\n// We keep this token here, rather than the animations package, so that modules that only care\n// about which animations module is loaded (e.g. the CDK) can retrieve it without having to\n// include extra dependencies. See #44970 for more context.\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") that indicates which animations\n * module has been loaded.\n * @publicApi\n */\nconst ANIMATION_MODULE_TYPE = new InjectionToken('AnimationModuleType');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass Console {\n log(message) {\n // tslint:disable-next-line:no-console\n console.log(message);\n }\n // Note: for reporting errors use `DOM.logError()` as it is platform specific\n warn(message) {\n // tslint:disable-next-line:no-console\n console.warn(message);\n }\n}\nConsole.ɵfac = function Console_Factory(t) { return new (t || Console)(); };\nConsole.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Console, factory: Console.ɵfac, providedIn: 'platform' });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(Console, [{\n type: Injectable,\n args: [{ providedIn: 'platform' }]\n }], null, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Work out the locale from the potential global properties.\n *\n * * Closure Compiler: use `goog.LOCALE`.\n * * Ivy enabled: use `$localize.locale`\n */\nfunction getGlobalLocale() {\n if (typeof ngI18nClosureMode !== 'undefined' && ngI18nClosureMode &&\n typeof goog !== 'undefined' && goog.LOCALE !== 'en') {\n // * The default `goog.LOCALE` value is `en`, while Angular used `en-US`.\n // * In order to preserve backwards compatibility, we use Angular default value over\n // Closure Compiler's one.\n return goog.LOCALE;\n }\n else {\n // KEEP `typeof $localize !== 'undefined' && $localize.locale` IN SYNC WITH THE LOCALIZE\n // COMPILE-TIME INLINER.\n //\n // * During compile time inlining of translations the expression will be replaced\n // with a string literal that is the current locale. Other forms of this expression are not\n // guaranteed to be replaced.\n //\n // * During runtime translation evaluation, the developer is required to set `$localize.locale`\n // if required, or just to provide their own `LOCALE_ID` provider.\n return (typeof $localize !== 'undefined' && $localize.locale) || DEFAULT_LOCALE_ID;\n }\n}\n/**\n * Provide this token to set the locale of your application.\n * It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe,\n * DecimalPipe and PercentPipe) and by ICU expressions.\n *\n * See the [i18n guide](guide/i18n-common-locale-id) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { LOCALE_ID } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: LOCALE_ID, useValue: 'en-US' }]\n * });\n * ```\n *\n * @publicApi\n */\nconst LOCALE_ID = new InjectionToken('LocaleId', {\n providedIn: 'root',\n factory: () => inject(LOCALE_ID, InjectFlags.Optional | InjectFlags.SkipSelf) || getGlobalLocale(),\n});\n/**\n * Provide this token to set the default currency code your application uses for\n * CurrencyPipe when there is no currency code passed into it. This is only used by\n * CurrencyPipe and has no relation to locale currency. Defaults to USD if not configured.\n *\n * See the [i18n guide](guide/i18n-common-locale-id) for more information.\n *\n * <div class=\"alert is-helpful\">\n *\n * **Deprecation notice:**\n *\n * The default currency code is currently always `USD` but this is deprecated from v9.\n *\n * **In v10 the default currency code will be taken from the current locale.**\n *\n * If you need the previous behavior then set it by creating a `DEFAULT_CURRENCY_CODE` provider in\n * your application `NgModule`:\n *\n * ```ts\n * {provide: DEFAULT_CURRENCY_CODE, useValue: 'USD'}\n * ```\n *\n * </div>\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: DEFAULT_CURRENCY_CODE, useValue: 'EUR' }]\n * });\n * ```\n *\n * @publicApi\n */\nconst DEFAULT_CURRENCY_CODE = new InjectionToken('DefaultCurrencyCode', {\n providedIn: 'root',\n factory: () => USD_CURRENCY_CODE,\n});\n/**\n * Use this token at bootstrap to provide the content of your translation file (`xtb`,\n * `xlf` or `xlf2`) when you want to translate your application in another language.\n *\n * See the [i18n guide](guide/i18n-common-merge) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { TRANSLATIONS } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * // content of your translation file\n * const translations = '....';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: TRANSLATIONS, useValue: translations }]\n * });\n * ```\n *\n * @publicApi\n */\nconst TRANSLATIONS = new InjectionToken('Translations');\n/**\n * Provide this token at bootstrap to set the format of your {@link TRANSLATIONS}: `xtb`,\n * `xlf` or `xlf2`.\n *\n * See the [i18n guide](guide/i18n-common-merge) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { TRANSLATIONS_FORMAT } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: TRANSLATIONS_FORMAT, useValue: 'xlf' }]\n * });\n * ```\n *\n * @publicApi\n */\nconst TRANSLATIONS_FORMAT = new InjectionToken('TranslationsFormat');\n/**\n * Use this enum at bootstrap as an option of `bootstrapModule` to define the strategy\n * that the compiler should use in case of missing translations:\n * - Error: throw if you have missing translations.\n * - Warning (default): show a warning in the console and/or shell.\n * - Ignore: do nothing.\n *\n * See the [i18n guide](guide/i18n-common-merge#report-missing-translations) for more information.\n *\n * @usageNotes\n * ### Example\n * ```typescript\n * import { MissingTranslationStrategy } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * missingTranslation: MissingTranslationStrategy.Error\n * });\n * ```\n *\n * @publicApi\n */\nvar MissingTranslationStrategy;\n(function (MissingTranslationStrategy) {\n MissingTranslationStrategy[MissingTranslationStrategy[\"Error\"] = 0] = \"Error\";\n MissingTranslationStrategy[MissingTranslationStrategy[\"Warning\"] = 1] = \"Warning\";\n MissingTranslationStrategy[MissingTranslationStrategy[\"Ignore\"] = 2] = \"Ignore\";\n})(MissingTranslationStrategy || (MissingTranslationStrategy = {}));\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Combination of NgModuleFactory and ComponentFactories.\n *\n * @publicApi\n *\n * @deprecated\n * Ivy JIT mode doesn't require accessing this symbol.\n * See [JIT API changes due to ViewEngine deprecation](guide/deprecations#jit-api-changes) for\n * additional context.\n */\nclass ModuleWithComponentFactories {\n constructor(ngModuleFactory, componentFactories) {\n this.ngModuleFactory = ngModuleFactory;\n this.componentFactories = componentFactories;\n }\n}\n/**\n * Low-level service for running the angular compiler during runtime\n * to create {@link ComponentFactory}s, which\n * can later be used to create and render a Component instance.\n *\n * Each `@NgModule` provides an own `Compiler` to its injector,\n * that will use the directives/pipes of the ng module for compilation\n * of components.\n *\n * @publicApi\n *\n * @deprecated\n * Ivy JIT mode doesn't require accessing this symbol.\n * See [JIT API changes due to ViewEngine deprecation](guide/deprecations#jit-api-changes) for\n * additional context.\n */\nclass Compiler {\n /**\n * Compiles the given NgModule and all of its components. All templates of the components listed\n * in `entryComponents` have to be inlined.\n */\n compileModuleSync(moduleType) {\n return new NgModuleFactory(moduleType);\n }\n /**\n * Compiles the given NgModule and all of its components\n */\n compileModuleAsync(moduleType) {\n return Promise.resolve(this.compileModuleSync(moduleType));\n }\n /**\n * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.\n */\n compileModuleAndAllComponentsSync(moduleType) {\n const ngModuleFactory = this.compileModuleSync(moduleType);\n const moduleDef = getNgModuleDef(moduleType);\n const componentFactories = maybeUnwrapFn(moduleDef.declarations)\n .reduce((factories, declaration) => {\n const componentDef = getComponentDef(declaration);\n componentDef && factories.push(new ComponentFactory(componentDef));\n return factories;\n }, []);\n return new ModuleWithComponentFactories(ngModuleFactory, componentFactories);\n }\n /**\n * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.\n */\n compileModuleAndAllComponentsAsync(moduleType) {\n return Promise.resolve(this.compileModuleAndAllComponentsSync(moduleType));\n }\n /**\n * Clears all caches.\n */\n clearCache() { }\n /**\n * Clears the cache for the given component/ngModule.\n */\n clearCacheFor(type) { }\n /**\n * Returns the id for a given NgModule, if one is defined and known to the compiler.\n */\n getModuleId(moduleType) {\n return undefined;\n }\n}\nCompiler.ɵfac = function Compiler_Factory(t) { return new (t || Compiler)(); };\nCompiler.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Compiler, factory: Compiler.ɵfac, providedIn: 'root' });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(Compiler, [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], null, null); })();\n/**\n * Token to provide CompilerOptions in the platform injector.\n *\n * @publicApi\n */\nconst COMPILER_OPTIONS = new InjectionToken('compilerOptions');\n/**\n * A factory for creating a Compiler\n *\n * @publicApi\n *\n * @deprecated\n * Ivy JIT mode doesn't require accessing this symbol.\n * See [JIT API changes due to ViewEngine deprecation](guide/deprecations#jit-api-changes) for\n * additional context.\n */\nclass CompilerFactory {\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Marks a component for check (in case of OnPush components) and synchronously\n * performs change detection on the application this component belongs to.\n *\n * @param component Component to {@link ChangeDetectorRef#markForCheck mark for check}.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction applyChanges(component) {\n ngDevMode && assertDefined(component, 'component');\n markViewDirty(getComponentViewByInstance(component));\n getRootComponents(component).forEach(rootComponent => detectChanges(rootComponent));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * This file introduces series of globally accessible debug tools\n * to allow for the Angular debugging story to function.\n *\n * To see this in action run the following command:\n *\n * bazel run //packages/core/test/bundling/todo:devserver\n *\n * Then load `localhost:5432` and start using the console tools.\n */\n/**\n * This value reflects the property on the window where the dev\n * tools are patched (window.ng).\n * */\nconst GLOBAL_PUBLISH_EXPANDO_KEY = 'ng';\nlet _published = false;\n/**\n * Publishes a collection of default debug tools onto`window.ng`.\n *\n * These functions are available globally when Angular is in development\n * mode and are automatically stripped away from prod mode is on.\n */\nfunction publishDefaultGlobalUtils$1() {\n if (!_published) {\n _published = true;\n /**\n * Warning: this function is *INTERNAL* and should not be relied upon in application's code.\n * The contract of the function might be changed in any release and/or the function can be\n * removed completely.\n */\n publishGlobalUtil('ɵsetProfiler', setProfiler);\n publishGlobalUtil('getDirectiveMetadata', getDirectiveMetadata$1);\n publishGlobalUtil('getComponent', getComponent);\n publishGlobalUtil('getContext', getContext);\n publishGlobalUtil('getListeners', getListeners);\n publishGlobalUtil('getOwningComponent', getOwningComponent);\n publishGlobalUtil('getHostElement', getHostElement);\n publishGlobalUtil('getInjector', getInjector);\n publishGlobalUtil('getRootComponents', getRootComponents);\n publishGlobalUtil('getDirectives', getDirectives);\n publishGlobalUtil('applyChanges', applyChanges);\n }\n}\n/**\n * Publishes the given function to `window.ng` so that it can be\n * used from the browser console when an application is not in production.\n */\nfunction publishGlobalUtil(name, fn) {\n if (typeof COMPILED === 'undefined' || !COMPILED) {\n // Note: we can't export `ng` when using closure enhanced optimization as:\n // - closure declares globals itself for minified names, which sometimes clobber our `ng` global\n // - we can't declare a closure extern as the namespace `ng` is already used within Google\n // for typings for AngularJS (via `goog.provide('ng....')`).\n const w = _global;\n ngDevMode && assertDefined(fn, 'function not defined');\n if (w) {\n let container = w[GLOBAL_PUBLISH_EXPANDO_KEY];\n if (!container) {\n container = w[GLOBAL_PUBLISH_EXPANDO_KEY] = {};\n }\n container[name] = fn;\n }\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst promise = (() => Promise.resolve(0))();\nfunction scheduleMicroTask(fn) {\n if (typeof Zone === 'undefined') {\n // use promise to schedule microTask instead of use Zone\n promise.then(() => {\n fn && fn.apply(null, null);\n });\n }\n else {\n Zone.current.scheduleMicroTask('scheduleMicrotask', fn);\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction getNativeRequestAnimationFrame() {\n let nativeRequestAnimationFrame = _global['requestAnimationFrame'];\n let nativeCancelAnimationFrame = _global['cancelAnimationFrame'];\n if (typeof Zone !== 'undefined' && nativeRequestAnimationFrame && nativeCancelAnimationFrame) {\n // use unpatched version of requestAnimationFrame(native delegate) if possible\n // to avoid another Change detection\n const unpatchedRequestAnimationFrame = nativeRequestAnimationFrame[Zone.__symbol__('OriginalDelegate')];\n if (unpatchedRequestAnimationFrame) {\n nativeRequestAnimationFrame = unpatchedRequestAnimationFrame;\n }\n const unpatchedCancelAnimationFrame = nativeCancelAnimationFrame[Zone.__symbol__('OriginalDelegate')];\n if (unpatchedCancelAnimationFrame) {\n nativeCancelAnimationFrame = unpatchedCancelAnimationFrame;\n }\n }\n return { nativeRequestAnimationFrame, nativeCancelAnimationFrame };\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass AsyncStackTaggingZoneSpec {\n constructor(namePrefix, consoleAsyncStackTaggingImpl = console) {\n this.name = 'asyncStackTagging for ' + namePrefix;\n this.createTask = consoleAsyncStackTaggingImpl?.createTask ?? (() => null);\n }\n onScheduleTask(delegate, _current, target, task) {\n task.consoleTask = this.createTask(`Zone - ${task.source || task.type}`);\n return delegate.scheduleTask(target, task);\n }\n onInvokeTask(delegate, _currentZone, targetZone, task, applyThis, applyArgs) {\n let ret;\n if (task.consoleTask) {\n ret = task.consoleTask.run(() => delegate.invokeTask(targetZone, task, applyThis, applyArgs));\n }\n else {\n ret = delegate.invokeTask(targetZone, task, applyThis, applyArgs);\n }\n return ret;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * An injectable service for executing work inside or outside of the Angular zone.\n *\n * The most common use of this service is to optimize performance when starting a work consisting of\n * one or more asynchronous tasks that don't require UI updates or error handling to be handled by\n * Angular. Such tasks can be kicked off via {@link #runOutsideAngular} and if needed, these tasks\n * can reenter the Angular zone via {@link #run}.\n *\n * <!-- TODO: add/fix links to:\n * - docs explaining zones and the use of zones in Angular and change-detection\n * - link to runOutsideAngular/run (throughout this file!)\n * -->\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * import {Component, NgZone} from '@angular/core';\n * import {NgIf} from '@angular/common';\n *\n * @Component({\n * selector: 'ng-zone-demo',\n * template: `\n * <h2>Demo: NgZone</h2>\n *\n * <p>Progress: {{progress}}%</p>\n * <p *ngIf=\"progress >= 100\">Done processing {{label}} of Angular zone!</p>\n *\n * <button (click)=\"processWithinAngularZone()\">Process within Angular zone</button>\n * <button (click)=\"processOutsideOfAngularZone()\">Process outside of Angular zone</button>\n * `,\n * })\n * export class NgZoneDemo {\n * progress: number = 0;\n * label: string;\n *\n * constructor(private _ngZone: NgZone) {}\n *\n * // Loop inside the Angular zone\n * // so the UI DOES refresh after each setTimeout cycle\n * processWithinAngularZone() {\n * this.label = 'inside';\n * this.progress = 0;\n * this._increaseProgress(() => console.log('Inside Done!'));\n * }\n *\n * // Loop outside of the Angular zone\n * // so the UI DOES NOT refresh after each setTimeout cycle\n * processOutsideOfAngularZone() {\n * this.label = 'outside';\n * this.progress = 0;\n * this._ngZone.runOutsideAngular(() => {\n * this._increaseProgress(() => {\n * // reenter the Angular zone and display done\n * this._ngZone.run(() => { console.log('Outside Done!'); });\n * });\n * });\n * }\n *\n * _increaseProgress(doneCallback: () => void) {\n * this.progress += 1;\n * console.log(`Current progress: ${this.progress}%`);\n *\n * if (this.progress < 100) {\n * window.setTimeout(() => this._increaseProgress(doneCallback), 10);\n * } else {\n * doneCallback();\n * }\n * }\n * }\n * ```\n *\n * @publicApi\n */\nclass NgZone {\n constructor({ enableLongStackTrace = false, shouldCoalesceEventChangeDetection = false, shouldCoalesceRunChangeDetection = false }) {\n this.hasPendingMacrotasks = false;\n this.hasPendingMicrotasks = false;\n /**\n * Whether there are no outstanding microtasks or macrotasks.\n */\n this.isStable = true;\n /**\n * Notifies when code enters Angular Zone. This gets fired first on VM Turn.\n */\n this.onUnstable = new EventEmitter(false);\n /**\n * Notifies when there is no more microtasks enqueued in the current VM Turn.\n * This is a hint for Angular to do change detection, which may enqueue more microtasks.\n * For this reason this event can fire multiple times per VM Turn.\n */\n this.onMicrotaskEmpty = new EventEmitter(false);\n /**\n * Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which\n * implies we are about to relinquish VM turn.\n * This event gets called just once.\n */\n this.onStable = new EventEmitter(false);\n /**\n * Notifies that an error has been delivered.\n */\n this.onError = new EventEmitter(false);\n if (typeof Zone == 'undefined') {\n throw new RuntimeError(908 /* RuntimeErrorCode.MISSING_ZONEJS */, ngDevMode && `In this configuration Angular requires Zone.js`);\n }\n Zone.assertZonePatched();\n const self = this;\n self._nesting = 0;\n self._outer = self._inner = Zone.current;\n // AsyncStackTaggingZoneSpec provides `linked stack traces` to show\n // where the async operation is scheduled. For more details, refer\n // to this article, https://developer.chrome.com/blog/devtools-better-angular-debugging/\n // And we only import this AsyncStackTaggingZoneSpec in development mode,\n // in the production mode, the AsyncStackTaggingZoneSpec will be tree shaken away.\n if (ngDevMode) {\n self._inner = self._inner.fork(new AsyncStackTaggingZoneSpec('Angular'));\n }\n if (Zone['TaskTrackingZoneSpec']) {\n self._inner = self._inner.fork(new Zone['TaskTrackingZoneSpec']);\n }\n if (enableLongStackTrace && Zone['longStackTraceZoneSpec']) {\n self._inner = self._inner.fork(Zone['longStackTraceZoneSpec']);\n }\n // if shouldCoalesceRunChangeDetection is true, all tasks including event tasks will be\n // coalesced, so shouldCoalesceEventChangeDetection option is not necessary and can be skipped.\n self.shouldCoalesceEventChangeDetection =\n !shouldCoalesceRunChangeDetection && shouldCoalesceEventChangeDetection;\n self.shouldCoalesceRunChangeDetection = shouldCoalesceRunChangeDetection;\n self.lastRequestAnimationFrameId = -1;\n self.nativeRequestAnimationFrame = getNativeRequestAnimationFrame().nativeRequestAnimationFrame;\n forkInnerZoneWithAngularBehavior(self);\n }\n static isInAngularZone() {\n // Zone needs to be checked, because this method might be called even when NoopNgZone is used.\n return typeof Zone !== 'undefined' && Zone.current.get('isAngularZone') === true;\n }\n static assertInAngularZone() {\n if (!NgZone.isInAngularZone()) {\n throw new RuntimeError(909 /* RuntimeErrorCode.UNEXPECTED_ZONE_STATE */, ngDevMode && 'Expected to be in Angular Zone, but it is not!');\n }\n }\n static assertNotInAngularZone() {\n if (NgZone.isInAngularZone()) {\n throw new RuntimeError(909 /* RuntimeErrorCode.UNEXPECTED_ZONE_STATE */, ngDevMode && 'Expected to not be in Angular Zone, but it is!');\n }\n }\n /**\n * Executes the `fn` function synchronously within the Angular zone and returns value returned by\n * the function.\n *\n * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * within the Angular zone.\n *\n * If a synchronous error happens it will be rethrown and not reported via `onError`.\n */\n run(fn, applyThis, applyArgs) {\n return this._inner.run(fn, applyThis, applyArgs);\n }\n /**\n * Executes the `fn` function synchronously within the Angular zone as a task and returns value\n * returned by the function.\n *\n * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * within the Angular zone.\n *\n * If a synchronous error happens it will be rethrown and not reported via `onError`.\n */\n runTask(fn, applyThis, applyArgs, name) {\n const zone = this._inner;\n const task = zone.scheduleEventTask('NgZoneEvent: ' + name, fn, EMPTY_PAYLOAD, noop, noop);\n try {\n return zone.runTask(task, applyThis, applyArgs);\n }\n finally {\n zone.cancelTask(task);\n }\n }\n /**\n * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not\n * rethrown.\n */\n runGuarded(fn, applyThis, applyArgs) {\n return this._inner.runGuarded(fn, applyThis, applyArgs);\n }\n /**\n * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by\n * the function.\n *\n * Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do\n * work that\n * doesn't trigger Angular change-detection or is subject to Angular's error handling.\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * outside of the Angular zone.\n *\n * Use {@link #run} to reenter the Angular zone and do work that updates the application model.\n */\n runOutsideAngular(fn) {\n return this._outer.run(fn);\n }\n}\nconst EMPTY_PAYLOAD = {};\nfunction checkStable(zone) {\n // TODO: @JiaLiPassion, should check zone.isCheckStableRunning to prevent\n // re-entry. The case is:\n //\n // @Component({...})\n // export class AppComponent {\n // constructor(private ngZone: NgZone) {\n // this.ngZone.onStable.subscribe(() => {\n // this.ngZone.run(() => console.log('stable'););\n // });\n // }\n //\n // The onStable subscriber run another function inside ngZone\n // which causes `checkStable()` re-entry.\n // But this fix causes some issues in g3, so this fix will be\n // launched in another PR.\n if (zone._nesting == 0 && !zone.hasPendingMicrotasks && !zone.isStable) {\n try {\n zone._nesting++;\n zone.onMicrotaskEmpty.emit(null);\n }\n finally {\n zone._nesting--;\n if (!zone.hasPendingMicrotasks) {\n try {\n zone.runOutsideAngular(() => zone.onStable.emit(null));\n }\n finally {\n zone.isStable = true;\n }\n }\n }\n }\n}\nfunction delayChangeDetectionForEvents(zone) {\n /**\n * We also need to check _nesting here\n * Consider the following case with shouldCoalesceRunChangeDetection = true\n *\n * ngZone.run(() => {});\n * ngZone.run(() => {});\n *\n * We want the two `ngZone.run()` only trigger one change detection\n * when shouldCoalesceRunChangeDetection is true.\n * And because in this case, change detection run in async way(requestAnimationFrame),\n * so we also need to check the _nesting here to prevent multiple\n * change detections.\n */\n if (zone.isCheckStableRunning || zone.lastRequestAnimationFrameId !== -1) {\n return;\n }\n zone.lastRequestAnimationFrameId = zone.nativeRequestAnimationFrame.call(_global, () => {\n // This is a work around for https://github.com/angular/angular/issues/36839.\n // The core issue is that when event coalescing is enabled it is possible for microtasks\n // to get flushed too early (As is the case with `Promise.then`) between the\n // coalescing eventTasks.\n //\n // To workaround this we schedule a \"fake\" eventTask before we process the\n // coalescing eventTasks. The benefit of this is that the \"fake\" container eventTask\n // will prevent the microtasks queue from getting drained in between the coalescing\n // eventTask execution.\n if (!zone.fakeTopEventTask) {\n zone.fakeTopEventTask = Zone.root.scheduleEventTask('fakeTopEventTask', () => {\n zone.lastRequestAnimationFrameId = -1;\n updateMicroTaskStatus(zone);\n zone.isCheckStableRunning = true;\n checkStable(zone);\n zone.isCheckStableRunning = false;\n }, undefined, () => { }, () => { });\n }\n zone.fakeTopEventTask.invoke();\n });\n updateMicroTaskStatus(zone);\n}\nfunction forkInnerZoneWithAngularBehavior(zone) {\n const delayChangeDetectionForEventsDelegate = () => {\n delayChangeDetectionForEvents(zone);\n };\n zone._inner = zone._inner.fork({\n name: 'angular',\n properties: { 'isAngularZone': true },\n onInvokeTask: (delegate, current, target, task, applyThis, applyArgs) => {\n try {\n onEnter(zone);\n return delegate.invokeTask(target, task, applyThis, applyArgs);\n }\n finally {\n if ((zone.shouldCoalesceEventChangeDetection && task.type === 'eventTask') ||\n zone.shouldCoalesceRunChangeDetection) {\n delayChangeDetectionForEventsDelegate();\n }\n onLeave(zone);\n }\n },\n onInvoke: (delegate, current, target, callback, applyThis, applyArgs, source) => {\n try {\n onEnter(zone);\n return delegate.invoke(target, callback, applyThis, applyArgs, source);\n }\n finally {\n if (zone.shouldCoalesceRunChangeDetection) {\n delayChangeDetectionForEventsDelegate();\n }\n onLeave(zone);\n }\n },\n onHasTask: (delegate, current, target, hasTaskState) => {\n delegate.hasTask(target, hasTaskState);\n if (current === target) {\n // We are only interested in hasTask events which originate from our zone\n // (A child hasTask event is not interesting to us)\n if (hasTaskState.change == 'microTask') {\n zone._hasPendingMicrotasks = hasTaskState.microTask;\n updateMicroTaskStatus(zone);\n checkStable(zone);\n }\n else if (hasTaskState.change == 'macroTask') {\n zone.hasPendingMacrotasks = hasTaskState.macroTask;\n }\n }\n },\n onHandleError: (delegate, current, target, error) => {\n delegate.handleError(target, error);\n zone.runOutsideAngular(() => zone.onError.emit(error));\n return false;\n }\n });\n}\nfunction updateMicroTaskStatus(zone) {\n if (zone._hasPendingMicrotasks ||\n ((zone.shouldCoalesceEventChangeDetection || zone.shouldCoalesceRunChangeDetection) &&\n zone.lastRequestAnimationFrameId !== -1)) {\n zone.hasPendingMicrotasks = true;\n }\n else {\n zone.hasPendingMicrotasks = false;\n }\n}\nfunction onEnter(zone) {\n zone._nesting++;\n if (zone.isStable) {\n zone.isStable = false;\n zone.onUnstable.emit(null);\n }\n}\nfunction onLeave(zone) {\n zone._nesting--;\n checkStable(zone);\n}\n/**\n * Provides a noop implementation of `NgZone` which does nothing. This zone requires explicit calls\n * to framework to perform rendering.\n */\nclass NoopNgZone {\n constructor() {\n this.hasPendingMicrotasks = false;\n this.hasPendingMacrotasks = false;\n this.isStable = true;\n this.onUnstable = new EventEmitter();\n this.onMicrotaskEmpty = new EventEmitter();\n this.onStable = new EventEmitter();\n this.onError = new EventEmitter();\n }\n run(fn, applyThis, applyArgs) {\n return fn.apply(applyThis, applyArgs);\n }\n runGuarded(fn, applyThis, applyArgs) {\n return fn.apply(applyThis, applyArgs);\n }\n runOutsideAngular(fn) {\n return fn();\n }\n runTask(fn, applyThis, applyArgs, name) {\n return fn.apply(applyThis, applyArgs);\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Internal injection token that can used to access an instance of a Testability class.\n *\n * This token acts as a bridge between the core bootstrap code and the `Testability` class. This is\n * needed to ensure that there are no direct references to the `Testability` class, so it can be\n * tree-shaken away (if not referenced). For the environments/setups when the `Testability` class\n * should be available, this token is used to add a provider that references the `Testability`\n * class. Otherwise, only this token is retained in a bundle, but the `Testability` class is not.\n */\nconst TESTABILITY = new InjectionToken('');\n/**\n * Internal injection token to retrieve Testability getter class instance.\n */\nconst TESTABILITY_GETTER = new InjectionToken('');\n/**\n * The Testability service provides testing hooks that can be accessed from\n * the browser.\n *\n * Angular applications bootstrapped using an NgModule (via `@NgModule.bootstrap` field) will also\n * instantiate Testability by default (in both development and production modes).\n *\n * For applications bootstrapped using the `bootstrapApplication` function, Testability is not\n * included by default. You can include it into your applications by getting the list of necessary\n * providers using the `provideProtractorTestingSupport()` function and adding them into the\n * `options.providers` array. Example:\n *\n * ```typescript\n * import {provideProtractorTestingSupport} from '@angular/platform-browser';\n *\n * await bootstrapApplication(RootComponent, providers: [provideProtractorTestingSupport()]);\n * ```\n *\n * @publicApi\n */\nclass Testability {\n constructor(_ngZone, registry, testabilityGetter) {\n this._ngZone = _ngZone;\n this.registry = registry;\n this._pendingCount = 0;\n this._isZoneStable = true;\n /**\n * Whether any work was done since the last 'whenStable' callback. This is\n * useful to detect if this could have potentially destabilized another\n * component while it is stabilizing.\n * @internal\n */\n this._didWork = false;\n this._callbacks = [];\n this.taskTrackingZone = null;\n // If there was no Testability logic registered in the global scope\n // before, register the current testability getter as a global one.\n if (!_testabilityGetter) {\n setTestabilityGetter(testabilityGetter);\n testabilityGetter.addToWindow(registry);\n }\n this._watchAngularEvents();\n _ngZone.run(() => {\n this.taskTrackingZone =\n typeof Zone == 'undefined' ? null : Zone.current.get('TaskTrackingZone');\n });\n }\n _watchAngularEvents() {\n this._ngZone.onUnstable.subscribe({\n next: () => {\n this._didWork = true;\n this._isZoneStable = false;\n }\n });\n this._ngZone.runOutsideAngular(() => {\n this._ngZone.onStable.subscribe({\n next: () => {\n NgZone.assertNotInAngularZone();\n scheduleMicroTask(() => {\n this._isZoneStable = true;\n this._runCallbacksIfReady();\n });\n }\n });\n });\n }\n /**\n * Increases the number of pending request\n * @deprecated pending requests are now tracked with zones.\n */\n increasePendingRequestCount() {\n this._pendingCount += 1;\n this._didWork = true;\n return this._pendingCount;\n }\n /**\n * Decreases the number of pending request\n * @deprecated pending requests are now tracked with zones\n */\n decreasePendingRequestCount() {\n this._pendingCount -= 1;\n if (this._pendingCount < 0) {\n throw new Error('pending async requests below zero');\n }\n this._runCallbacksIfReady();\n return this._pendingCount;\n }\n /**\n * Whether an associated application is stable\n */\n isStable() {\n return this._isZoneStable && this._pendingCount === 0 && !this._ngZone.hasPendingMacrotasks;\n }\n _runCallbacksIfReady() {\n if (this.isStable()) {\n // Schedules the call backs in a new frame so that it is always async.\n scheduleMicroTask(() => {\n while (this._callbacks.length !== 0) {\n let cb = this._callbacks.pop();\n clearTimeout(cb.timeoutId);\n cb.doneCb(this._didWork);\n }\n this._didWork = false;\n });\n }\n else {\n // Still not stable, send updates.\n let pending = this.getPendingTasks();\n this._callbacks = this._callbacks.filter((cb) => {\n if (cb.updateCb && cb.updateCb(pending)) {\n clearTimeout(cb.timeoutId);\n return false;\n }\n return true;\n });\n this._didWork = true;\n }\n }\n getPendingTasks() {\n if (!this.taskTrackingZone) {\n return [];\n }\n // Copy the tasks data so that we don't leak tasks.\n return this.taskTrackingZone.macroTasks.map((t) => {\n return {\n source: t.source,\n // From TaskTrackingZone:\n // https://github.com/angular/zone.js/blob/master/lib/zone-spec/task-tracking.ts#L40\n creationLocation: t.creationLocation,\n data: t.data\n };\n });\n }\n addCallback(cb, timeout, updateCb) {\n let timeoutId = -1;\n if (timeout && timeout > 0) {\n timeoutId = setTimeout(() => {\n this._callbacks = this._callbacks.filter((cb) => cb.timeoutId !== timeoutId);\n cb(this._didWork, this.getPendingTasks());\n }, timeout);\n }\n this._callbacks.push({ doneCb: cb, timeoutId: timeoutId, updateCb: updateCb });\n }\n /**\n * Wait for the application to be stable with a timeout. If the timeout is reached before that\n * happens, the callback receives a list of the macro tasks that were pending, otherwise null.\n *\n * @param doneCb The callback to invoke when Angular is stable or the timeout expires\n * whichever comes first.\n * @param timeout Optional. The maximum time to wait for Angular to become stable. If not\n * specified, whenStable() will wait forever.\n * @param updateCb Optional. If specified, this callback will be invoked whenever the set of\n * pending macrotasks changes. If this callback returns true doneCb will not be invoked\n * and no further updates will be issued.\n */\n whenStable(doneCb, timeout, updateCb) {\n if (updateCb && !this.taskTrackingZone) {\n throw new Error('Task tracking zone is required when passing an update callback to ' +\n 'whenStable(). Is \"zone.js/plugins/task-tracking\" loaded?');\n }\n // These arguments are 'Function' above to keep the public API simple.\n this.addCallback(doneCb, timeout, updateCb);\n this._runCallbacksIfReady();\n }\n /**\n * Get the number of pending requests\n * @deprecated pending requests are now tracked with zones\n */\n getPendingRequestCount() {\n return this._pendingCount;\n }\n /**\n * Registers an application with a testability hook so that it can be tracked.\n * @param token token of application, root element\n *\n * @internal\n */\n registerApplication(token) {\n this.registry.registerApplication(token, this);\n }\n /**\n * Unregisters an application.\n * @param token token of application, root element\n *\n * @internal\n */\n unregisterApplication(token) {\n this.registry.unregisterApplication(token);\n }\n /**\n * Find providers by name\n * @param using The root element to search from\n * @param provider The name of binding variable\n * @param exactMatch Whether using exactMatch\n */\n findProviders(using, provider, exactMatch) {\n // TODO(juliemr): implement.\n return [];\n }\n}\nTestability.ɵfac = function Testability_Factory(t) { return new (t || Testability)(ɵɵinject(NgZone), ɵɵinject(TestabilityRegistry), ɵɵinject(TESTABILITY_GETTER)); };\nTestability.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Testability, factory: Testability.ɵfac });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(Testability, [{\n type: Injectable\n }], function () { return [{ type: NgZone }, { type: TestabilityRegistry }, { type: undefined, decorators: [{\n type: Inject,\n args: [TESTABILITY_GETTER]\n }] }]; }, null); })();\n/**\n * A global registry of {@link Testability} instances for specific elements.\n * @publicApi\n */\nclass TestabilityRegistry {\n constructor() {\n /** @internal */\n this._applications = new Map();\n }\n /**\n * Registers an application with a testability hook so that it can be tracked\n * @param token token of application, root element\n * @param testability Testability hook\n */\n registerApplication(token, testability) {\n this._applications.set(token, testability);\n }\n /**\n * Unregisters an application.\n * @param token token of application, root element\n */\n unregisterApplication(token) {\n this._applications.delete(token);\n }\n /**\n * Unregisters all applications\n */\n unregisterAllApplications() {\n this._applications.clear();\n }\n /**\n * Get a testability hook associated with the application\n * @param elem root element\n */\n getTestability(elem) {\n return this._applications.get(elem) || null;\n }\n /**\n * Get all registered testabilities\n */\n getAllTestabilities() {\n return Array.from(this._applications.values());\n }\n /**\n * Get all registered applications(root elements)\n */\n getAllRootElements() {\n return Array.from(this._applications.keys());\n }\n /**\n * Find testability of a node in the Tree\n * @param elem node\n * @param findInAncestors whether finding testability in ancestors if testability was not found in\n * current node\n */\n findTestabilityInTree(elem, findInAncestors = true) {\n return _testabilityGetter?.findTestabilityInTree(this, elem, findInAncestors) ?? null;\n }\n}\nTestabilityRegistry.ɵfac = function TestabilityRegistry_Factory(t) { return new (t || TestabilityRegistry)(); };\nTestabilityRegistry.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: TestabilityRegistry, factory: TestabilityRegistry.ɵfac, providedIn: 'platform' });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(TestabilityRegistry, [{\n type: Injectable,\n args: [{ providedIn: 'platform' }]\n }], null, null); })();\n/**\n * Set the {@link GetTestability} implementation used by the Angular testing framework.\n * @publicApi\n */\nfunction setTestabilityGetter(getter) {\n _testabilityGetter = getter;\n}\nlet _testabilityGetter;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nlet _platformInjector = null;\n/**\n * Internal token to indicate whether having multiple bootstrapped platform should be allowed (only\n * one bootstrapped platform is allowed by default). This token helps to support SSR scenarios.\n */\nconst ALLOW_MULTIPLE_PLATFORMS = new InjectionToken('AllowMultipleToken');\n/**\n * Internal token that allows to register extra callbacks that should be invoked during the\n * `PlatformRef.destroy` operation. This token is needed to avoid a direct reference to the\n * `PlatformRef` class (i.e. register the callback via `PlatformRef.onDestroy`), thus making the\n * entire class tree-shakeable.\n */\nconst PLATFORM_DESTROY_LISTENERS = new InjectionToken('PlatformDestroyListeners');\nconst NG_DEV_MODE = typeof ngDevMode === 'undefined' || ngDevMode;\nfunction compileNgModuleFactory(injector, options, moduleType) {\n ngDevMode && assertNgModuleType(moduleType);\n const moduleFactory = new NgModuleFactory(moduleType);\n // All of the logic below is irrelevant for AOT-compiled code.\n if (typeof ngJitMode !== 'undefined' && !ngJitMode) {\n return Promise.resolve(moduleFactory);\n }\n const compilerOptions = injector.get(COMPILER_OPTIONS, []).concat(options);\n // Configure the compiler to use the provided options. This call may fail when multiple modules\n // are bootstrapped with incompatible options, as a component can only be compiled according to\n // a single set of options.\n setJitOptions({\n defaultEncapsulation: _lastDefined(compilerOptions.map(opts => opts.defaultEncapsulation)),\n preserveWhitespaces: _lastDefined(compilerOptions.map(opts => opts.preserveWhitespaces)),\n });\n if (isComponentResourceResolutionQueueEmpty()) {\n return Promise.resolve(moduleFactory);\n }\n const compilerProviders = _mergeArrays(compilerOptions.map(o => o.providers));\n // In case there are no compiler providers, we just return the module factory as\n // there won't be any resource loader. This can happen with Ivy, because AOT compiled\n // modules can be still passed through \"bootstrapModule\". In that case we shouldn't\n // unnecessarily require the JIT compiler.\n if (compilerProviders.length === 0) {\n return Promise.resolve(moduleFactory);\n }\n const compiler = getCompilerFacade({\n usage: 0 /* JitCompilerUsage.Decorator */,\n kind: 'NgModule',\n type: moduleType,\n });\n const compilerInjector = Injector.create({ providers: compilerProviders });\n const resourceLoader = compilerInjector.get(compiler.ResourceLoader);\n // The resource loader can also return a string while the \"resolveComponentResources\"\n // always expects a promise. Therefore we need to wrap the returned value in a promise.\n return resolveComponentResources(url => Promise.resolve(resourceLoader.get(url)))\n .then(() => moduleFactory);\n}\nfunction publishDefaultGlobalUtils() {\n ngDevMode && publishDefaultGlobalUtils$1();\n}\nfunction isBoundToModule(cf) {\n return cf.isBoundToModule;\n}\n/**\n * A token for third-party components that can register themselves with NgProbe.\n *\n * @publicApi\n */\nclass NgProbeToken {\n constructor(name, token) {\n this.name = name;\n this.token = token;\n }\n}\n/**\n * Creates a platform.\n * Platforms must be created on launch using this function.\n *\n * @publicApi\n */\nfunction createPlatform(injector) {\n if (_platformInjector && !_platformInjector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n throw new RuntimeError(400 /* RuntimeErrorCode.MULTIPLE_PLATFORMS */, ngDevMode &&\n 'There can be only one platform. Destroy the previous one to create a new one.');\n }\n publishDefaultGlobalUtils();\n _platformInjector = injector;\n const platform = injector.get(PlatformRef);\n runPlatformInitializers(injector);\n return platform;\n}\n/**\n * The goal of this function is to bootstrap a platform injector,\n * but avoid referencing `PlatformRef` class.\n * This function is needed for bootstrapping a Standalone Component.\n */\nfunction createOrReusePlatformInjector(providers = []) {\n // If a platform injector already exists, it means that the platform\n // is already bootstrapped and no additional actions are required.\n if (_platformInjector)\n return _platformInjector;\n // Otherwise, setup a new platform injector and run platform initializers.\n const injector = createPlatformInjector(providers);\n _platformInjector = injector;\n publishDefaultGlobalUtils();\n runPlatformInitializers(injector);\n return injector;\n}\nfunction runPlatformInitializers(injector) {\n const inits = injector.get(PLATFORM_INITIALIZER, null);\n if (inits) {\n inits.forEach((init) => init());\n }\n}\n/**\n * Internal create application API that implements the core application creation logic and optional\n * bootstrap logic.\n *\n * Platforms (such as `platform-browser`) may require different set of application and platform\n * providers for an application to function correctly. As a result, platforms may use this function\n * internally and supply the necessary providers during the bootstrap, while exposing\n * platform-specific APIs as a part of their public API.\n *\n * @returns A promise that returns an `ApplicationRef` instance once resolved.\n */\nfunction internalCreateApplication(config) {\n const { rootComponent, appProviders, platformProviders } = config;\n if (NG_DEV_MODE && rootComponent !== undefined) {\n assertStandaloneComponentType(rootComponent);\n }\n const platformInjector = createOrReusePlatformInjector(platformProviders);\n const ngZone = getNgZone('zone.js', getNgZoneOptions());\n return ngZone.run(() => {\n // Create root application injector based on a set of providers configured at the platform\n // bootstrap level as well as providers passed to the bootstrap call by a user.\n const allAppProviders = [\n { provide: NgZone, useValue: ngZone },\n ...(appProviders || []), //\n ];\n const envInjector = createEnvironmentInjector(allAppProviders, platformInjector, 'Environment Injector');\n const exceptionHandler = envInjector.get(ErrorHandler, null);\n if (NG_DEV_MODE && !exceptionHandler) {\n throw new RuntimeError(402 /* RuntimeErrorCode.ERROR_HANDLER_NOT_FOUND */, 'No `ErrorHandler` found in the Dependency Injection tree.');\n }\n let onErrorSubscription;\n ngZone.runOutsideAngular(() => {\n onErrorSubscription = ngZone.onError.subscribe({\n next: (error) => {\n exceptionHandler.handleError(error);\n }\n });\n });\n // If the whole platform is destroyed, invoke the `destroy` method\n // for all bootstrapped applications as well.\n const destroyListener = () => envInjector.destroy();\n const onPlatformDestroyListeners = platformInjector.get(PLATFORM_DESTROY_LISTENERS);\n onPlatformDestroyListeners.add(destroyListener);\n envInjector.onDestroy(() => {\n onErrorSubscription.unsubscribe();\n onPlatformDestroyListeners.delete(destroyListener);\n });\n return _callAndReportToErrorHandler(exceptionHandler, ngZone, () => {\n const initStatus = envInjector.get(ApplicationInitStatus);\n initStatus.runInitializers();\n return initStatus.donePromise.then(() => {\n const localeId = envInjector.get(LOCALE_ID, DEFAULT_LOCALE_ID);\n setLocaleId(localeId || DEFAULT_LOCALE_ID);\n const appRef = envInjector.get(ApplicationRef);\n if (rootComponent !== undefined) {\n appRef.bootstrap(rootComponent);\n }\n return appRef;\n });\n });\n });\n}\n/**\n * Creates a factory for a platform. Can be used to provide or override `Providers` specific to\n * your application's runtime needs, such as `PLATFORM_INITIALIZER` and `PLATFORM_ID`.\n * @param parentPlatformFactory Another platform factory to modify. Allows you to compose factories\n * to build up configurations that might be required by different libraries or parts of the\n * application.\n * @param name Identifies the new platform factory.\n * @param providers A set of dependency providers for platforms created with the new factory.\n *\n * @publicApi\n */\nfunction createPlatformFactory(parentPlatformFactory, name, providers = []) {\n const desc = `Platform: ${name}`;\n const marker = new InjectionToken(desc);\n return (extraProviders = []) => {\n let platform = getPlatform();\n if (!platform || platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n const platformProviders = [\n ...providers,\n ...extraProviders,\n { provide: marker, useValue: true }\n ];\n if (parentPlatformFactory) {\n parentPlatformFactory(platformProviders);\n }\n else {\n createPlatform(createPlatformInjector(platformProviders, desc));\n }\n }\n return assertPlatform(marker);\n };\n}\n/**\n * Checks that there is currently a platform that contains the given token as a provider.\n *\n * @publicApi\n */\nfunction assertPlatform(requiredToken) {\n const platform = getPlatform();\n if (!platform) {\n throw new RuntimeError(401 /* RuntimeErrorCode.PLATFORM_NOT_FOUND */, ngDevMode && 'No platform exists!');\n }\n if ((typeof ngDevMode === 'undefined' || ngDevMode) &&\n !platform.injector.get(requiredToken, null)) {\n throw new RuntimeError(400 /* RuntimeErrorCode.MULTIPLE_PLATFORMS */, 'A platform with a different configuration has been created. Please destroy it first.');\n }\n return platform;\n}\n/**\n * Helper function to create an instance of a platform injector (that maintains the 'platform'\n * scope).\n */\nfunction createPlatformInjector(providers = [], name) {\n return Injector.create({\n name,\n providers: [\n { provide: INJECTOR_SCOPE, useValue: 'platform' },\n { provide: PLATFORM_DESTROY_LISTENERS, useValue: new Set([() => _platformInjector = null]) },\n ...providers\n ],\n });\n}\n/**\n * Destroys the current Angular platform and all Angular applications on the page.\n * Destroys all modules and listeners registered with the platform.\n *\n * @publicApi\n */\nfunction destroyPlatform() {\n getPlatform()?.destroy();\n}\n/**\n * Returns the current platform.\n *\n * @publicApi\n */\nfunction getPlatform() {\n return _platformInjector?.get(PlatformRef) ?? null;\n}\n/**\n * The Angular platform is the entry point for Angular on a web page.\n * Each page has exactly one platform. Services (such as reflection) which are common\n * to every Angular application running on the page are bound in its scope.\n * A page's platform is initialized implicitly when a platform is created using a platform\n * factory such as `PlatformBrowser`, or explicitly by calling the `createPlatform()` function.\n *\n * @publicApi\n */\nclass PlatformRef {\n /** @internal */\n constructor(_injector) {\n this._injector = _injector;\n this._modules = [];\n this._destroyListeners = [];\n this._destroyed = false;\n }\n /**\n * Creates an instance of an `@NgModule` for the given platform.\n *\n * @deprecated Passing NgModule factories as the `PlatformRef.bootstrapModuleFactory` function\n * argument is deprecated. Use the `PlatformRef.bootstrapModule` API instead.\n */\n bootstrapModuleFactory(moduleFactory, options) {\n // Note: We need to create the NgZone _before_ we instantiate the module,\n // as instantiating the module creates some providers eagerly.\n // So we create a mini parent injector that just contains the new NgZone and\n // pass that as parent to the NgModuleFactory.\n const ngZone = getNgZone(options?.ngZone, getNgZoneOptions(options));\n const providers = [{ provide: NgZone, useValue: ngZone }];\n // Note: Create ngZoneInjector within ngZone.run so that all of the instantiated services are\n // created within the Angular zone\n // Do not try to replace ngZone.run with ApplicationRef#run because ApplicationRef would then be\n // created outside of the Angular zone.\n return ngZone.run(() => {\n const ngZoneInjector = Injector.create({ providers: providers, parent: this.injector, name: moduleFactory.moduleType.name });\n const moduleRef = moduleFactory.create(ngZoneInjector);\n const exceptionHandler = moduleRef.injector.get(ErrorHandler, null);\n if (!exceptionHandler) {\n throw new RuntimeError(402 /* RuntimeErrorCode.ERROR_HANDLER_NOT_FOUND */, ngDevMode && 'No ErrorHandler. Is platform module (BrowserModule) included?');\n }\n ngZone.runOutsideAngular(() => {\n const subscription = ngZone.onError.subscribe({\n next: (error) => {\n exceptionHandler.handleError(error);\n }\n });\n moduleRef.onDestroy(() => {\n remove(this._modules, moduleRef);\n subscription.unsubscribe();\n });\n });\n return _callAndReportToErrorHandler(exceptionHandler, ngZone, () => {\n const initStatus = moduleRef.injector.get(ApplicationInitStatus);\n initStatus.runInitializers();\n return initStatus.donePromise.then(() => {\n // If the `LOCALE_ID` provider is defined at bootstrap then we set the value for ivy\n const localeId = moduleRef.injector.get(LOCALE_ID, DEFAULT_LOCALE_ID);\n setLocaleId(localeId || DEFAULT_LOCALE_ID);\n this._moduleDoBootstrap(moduleRef);\n return moduleRef;\n });\n });\n });\n }\n /**\n * Creates an instance of an `@NgModule` for a given platform.\n *\n * @usageNotes\n * ### Simple Example\n *\n * ```typescript\n * @NgModule({\n * imports: [BrowserModule]\n * })\n * class MyModule {}\n *\n * let moduleRef = platformBrowser().bootstrapModule(MyModule);\n * ```\n *\n */\n bootstrapModule(moduleType, compilerOptions = []) {\n const options = optionsReducer({}, compilerOptions);\n return compileNgModuleFactory(this.injector, options, moduleType)\n .then(moduleFactory => this.bootstrapModuleFactory(moduleFactory, options));\n }\n _moduleDoBootstrap(moduleRef) {\n const appRef = moduleRef.injector.get(ApplicationRef);\n if (moduleRef._bootstrapComponents.length > 0) {\n moduleRef._bootstrapComponents.forEach(f => appRef.bootstrap(f));\n }\n else if (moduleRef.instance.ngDoBootstrap) {\n moduleRef.instance.ngDoBootstrap(appRef);\n }\n else {\n throw new RuntimeError(403 /* RuntimeErrorCode.BOOTSTRAP_COMPONENTS_NOT_FOUND */, ngDevMode &&\n `The module ${stringify(moduleRef.instance.constructor)} was bootstrapped, ` +\n `but it does not declare \"@NgModule.bootstrap\" components nor a \"ngDoBootstrap\" method. ` +\n `Please define one of these.`);\n }\n this._modules.push(moduleRef);\n }\n /**\n * Registers a listener to be called when the platform is destroyed.\n */\n onDestroy(callback) {\n this._destroyListeners.push(callback);\n }\n /**\n * Retrieves the platform {@link Injector}, which is the parent injector for\n * every Angular application on the page and provides singleton providers.\n */\n get injector() {\n return this._injector;\n }\n /**\n * Destroys the current Angular platform and all Angular applications on the page.\n * Destroys all modules and listeners registered with the platform.\n */\n destroy() {\n if (this._destroyed) {\n throw new RuntimeError(404 /* RuntimeErrorCode.PLATFORM_ALREADY_DESTROYED */, ngDevMode && 'The platform has already been destroyed!');\n }\n this._modules.slice().forEach(module => module.destroy());\n this._destroyListeners.forEach(listener => listener());\n const destroyListeners = this._injector.get(PLATFORM_DESTROY_LISTENERS, null);\n if (destroyListeners) {\n destroyListeners.forEach(listener => listener());\n destroyListeners.clear();\n }\n this._destroyed = true;\n }\n /**\n * Indicates whether this instance was destroyed.\n */\n get destroyed() {\n return this._destroyed;\n }\n}\nPlatformRef.ɵfac = function PlatformRef_Factory(t) { return new (t || PlatformRef)(ɵɵinject(Injector)); };\nPlatformRef.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: PlatformRef, factory: PlatformRef.ɵfac, providedIn: 'platform' });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(PlatformRef, [{\n type: Injectable,\n args: [{ providedIn: 'platform' }]\n }], function () { return [{ type: Injector }]; }, null); })();\n// Transforms a set of `BootstrapOptions` (supported by the NgModule-based bootstrap APIs) ->\n// `NgZoneOptions` that are recognized by the NgZone constructor. Passing no options will result in\n// a set of default options returned.\nfunction getNgZoneOptions(options) {\n return {\n enableLongStackTrace: typeof ngDevMode === 'undefined' ? false : !!ngDevMode,\n shouldCoalesceEventChangeDetection: !!(options && options.ngZoneEventCoalescing) || false,\n shouldCoalesceRunChangeDetection: !!(options && options.ngZoneRunCoalescing) || false,\n };\n}\nfunction getNgZone(ngZoneToUse, options) {\n let ngZone;\n if (ngZoneToUse === 'noop') {\n ngZone = new NoopNgZone();\n }\n else {\n ngZone = (ngZoneToUse === 'zone.js' ? undefined : ngZoneToUse) || new NgZone(options);\n }\n return ngZone;\n}\nfunction _callAndReportToErrorHandler(errorHandler, ngZone, callback) {\n try {\n const result = callback();\n if (isPromise(result)) {\n return result.catch((e) => {\n ngZone.runOutsideAngular(() => errorHandler.handleError(e));\n // rethrow as the exception handler might not do it\n throw e;\n });\n }\n return result;\n }\n catch (e) {\n ngZone.runOutsideAngular(() => errorHandler.handleError(e));\n // rethrow as the exception handler might not do it\n throw e;\n }\n}\nfunction optionsReducer(dst, objs) {\n if (Array.isArray(objs)) {\n dst = objs.reduce(optionsReducer, dst);\n }\n else {\n dst = { ...dst, ...objs };\n }\n return dst;\n}\n/**\n * A reference to an Angular application running on a page.\n *\n * @usageNotes\n *\n * {@a is-stable-examples}\n * ### isStable examples and caveats\n *\n * Note two important points about `isStable`, demonstrated in the examples below:\n * - the application will never be stable if you start any kind\n * of recurrent asynchronous task when the application starts\n * (for example for a polling process, started with a `setInterval`, a `setTimeout`\n * or using RxJS operators like `interval`);\n * - the `isStable` Observable runs outside of the Angular zone.\n *\n * Let's imagine that you start a recurrent task\n * (here incrementing a counter, using RxJS `interval`),\n * and at the same time subscribe to `isStable`.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n * appRef.isStable.pipe(\n * filter(stable => stable)\n * ).subscribe(() => console.log('App is stable now');\n * interval(1000).subscribe(counter => console.log(counter));\n * }\n * ```\n * In this example, `isStable` will never emit `true`,\n * and the trace \"App is stable now\" will never get logged.\n *\n * If you want to execute something when the app is stable,\n * you have to wait for the application to be stable\n * before starting your polling process.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * tap(stable => console.log('App is stable now')),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => console.log(counter));\n * }\n * ```\n * In this example, the trace \"App is stable now\" will be logged\n * and then the counter starts incrementing every second.\n *\n * Note also that this Observable runs outside of the Angular zone,\n * which means that the code in the subscription\n * to this Observable will not trigger the change detection.\n *\n * Let's imagine that instead of logging the counter value,\n * you update a field of your component\n * and display it in its template.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => this.value = counter);\n * }\n * ```\n * As the `isStable` Observable runs outside the zone,\n * the `value` field will be updated properly,\n * but the template will not be refreshed!\n *\n * You'll have to manually trigger the change detection to update the template.\n *\n * ```\n * constructor(appRef: ApplicationRef, cd: ChangeDetectorRef) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => {\n * this.value = counter;\n * cd.detectChanges();\n * });\n * }\n * ```\n *\n * Or make the subscription callback run inside the zone.\n *\n * ```\n * constructor(appRef: ApplicationRef, zone: NgZone) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => zone.run(() => this.value = counter));\n * }\n * ```\n *\n * @publicApi\n */\nclass ApplicationRef {\n /** @internal */\n constructor(_zone, _injector, _exceptionHandler) {\n this._zone = _zone;\n this._injector = _injector;\n this._exceptionHandler = _exceptionHandler;\n /** @internal */\n this._bootstrapListeners = [];\n this._views = [];\n this._runningTick = false;\n this._stable = true;\n this._destroyed = false;\n this._destroyListeners = [];\n /**\n * Get a list of component types registered to this application.\n * This list is populated even before the component is created.\n */\n this.componentTypes = [];\n /**\n * Get a list of components registered to this application.\n */\n this.components = [];\n this._onMicrotaskEmptySubscription = this._zone.onMicrotaskEmpty.subscribe({\n next: () => {\n this._zone.run(() => {\n this.tick();\n });\n }\n });\n const isCurrentlyStable = new Observable((observer) => {\n this._stable = this._zone.isStable && !this._zone.hasPendingMacrotasks &&\n !this._zone.hasPendingMicrotasks;\n this._zone.runOutsideAngular(() => {\n observer.next(this._stable);\n observer.complete();\n });\n });\n const isStable = new Observable((observer) => {\n // Create the subscription to onStable outside the Angular Zone so that\n // the callback is run outside the Angular Zone.\n let stableSub;\n this._zone.runOutsideAngular(() => {\n stableSub = this._zone.onStable.subscribe(() => {\n NgZone.assertNotInAngularZone();\n // Check whether there are no pending macro/micro tasks in the next tick\n // to allow for NgZone to update the state.\n scheduleMicroTask(() => {\n if (!this._stable && !this._zone.hasPendingMacrotasks &&\n !this._zone.hasPendingMicrotasks) {\n this._stable = true;\n observer.next(true);\n }\n });\n });\n });\n const unstableSub = this._zone.onUnstable.subscribe(() => {\n NgZone.assertInAngularZone();\n if (this._stable) {\n this._stable = false;\n this._zone.runOutsideAngular(() => {\n observer.next(false);\n });\n }\n });\n return () => {\n stableSub.unsubscribe();\n unstableSub.unsubscribe();\n };\n });\n this.isStable =\n merge$1(isCurrentlyStable, isStable.pipe(share()));\n }\n /**\n * Indicates whether this instance was destroyed.\n */\n get destroyed() {\n return this._destroyed;\n }\n /**\n * The `EnvironmentInjector` used to create this application.\n */\n get injector() {\n return this._injector;\n }\n /**\n * Bootstrap a component onto the element identified by its selector or, optionally, to a\n * specified element.\n *\n * @usageNotes\n * ### Bootstrap process\n *\n * When bootstrapping a component, Angular mounts it onto a target DOM element\n * and kicks off automatic change detection. The target DOM element can be\n * provided using the `rootSelectorOrNode` argument.\n *\n * If the target DOM element is not provided, Angular tries to find one on a page\n * using the `selector` of the component that is being bootstrapped\n * (first matched element is used).\n *\n * ### Example\n *\n * Generally, we define the component to bootstrap in the `bootstrap` array of `NgModule`,\n * but it requires us to know the component while writing the application code.\n *\n * Imagine a situation where we have to wait for an API call to decide about the component to\n * bootstrap. We can use the `ngDoBootstrap` hook of the `NgModule` and call this method to\n * dynamically bootstrap a component.\n *\n * {@example core/ts/platform/platform.ts region='componentSelector'}\n *\n * Optionally, a component can be mounted onto a DOM element that does not match the\n * selector of the bootstrapped component.\n *\n * In the following example, we are providing a CSS selector to match the target element.\n *\n * {@example core/ts/platform/platform.ts region='cssSelector'}\n *\n * While in this example, we are providing reference to a DOM node.\n *\n * {@example core/ts/platform/platform.ts region='domNode'}\n */\n bootstrap(componentOrFactory, rootSelectorOrNode) {\n NG_DEV_MODE && this.warnIfDestroyed();\n const isComponentFactory = componentOrFactory instanceof ComponentFactory$1;\n const initStatus = this._injector.get(ApplicationInitStatus);\n if (!initStatus.done) {\n const standalone = !isComponentFactory && isStandalone(componentOrFactory);\n const errorMessage = 'Cannot bootstrap as there are still asynchronous initializers running.' +\n (standalone ? '' :\n ' Bootstrap components in the `ngDoBootstrap` method of the root module.');\n throw new RuntimeError(405 /* RuntimeErrorCode.ASYNC_INITIALIZERS_STILL_RUNNING */, NG_DEV_MODE && errorMessage);\n }\n let componentFactory;\n if (isComponentFactory) {\n componentFactory = componentOrFactory;\n }\n else {\n const resolver = this._injector.get(ComponentFactoryResolver$1);\n componentFactory = resolver.resolveComponentFactory(componentOrFactory);\n }\n this.componentTypes.push(componentFactory.componentType);\n // Create a factory associated with the current module if it's not bound to some other\n const ngModule = isBoundToModule(componentFactory) ? undefined : this._injector.get(NgModuleRef$1);\n const selectorOrNode = rootSelectorOrNode || componentFactory.selector;\n const compRef = componentFactory.create(Injector.NULL, [], selectorOrNode, ngModule);\n const nativeElement = compRef.location.nativeElement;\n const testability = compRef.injector.get(TESTABILITY, null);\n testability?.registerApplication(nativeElement);\n compRef.onDestroy(() => {\n this.detachView(compRef.hostView);\n remove(this.components, compRef);\n testability?.unregisterApplication(nativeElement);\n });\n this._loadComponent(compRef);\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const _console = this._injector.get(Console);\n _console.log(`Angular is running in development mode. Call enableProdMode() to enable production mode.`);\n }\n return compRef;\n }\n /**\n * Invoke this method to explicitly process change detection and its side-effects.\n *\n * In development mode, `tick()` also performs a second change detection cycle to ensure that no\n * further changes are detected. If additional changes are picked up during this second cycle,\n * bindings in the app have side-effects that cannot be resolved in a single change detection\n * pass.\n * In this case, Angular throws an error, since an Angular application can only have one change\n * detection pass during which all change detection must complete.\n */\n tick() {\n NG_DEV_MODE && this.warnIfDestroyed();\n if (this._runningTick) {\n throw new RuntimeError(101 /* RuntimeErrorCode.RECURSIVE_APPLICATION_REF_TICK */, ngDevMode && 'ApplicationRef.tick is called recursively');\n }\n try {\n this._runningTick = true;\n for (let view of this._views) {\n view.detectChanges();\n }\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n for (let view of this._views) {\n view.checkNoChanges();\n }\n }\n }\n catch (e) {\n // Attention: Don't rethrow as it could cancel subscriptions to Observables!\n this._zone.runOutsideAngular(() => this._exceptionHandler.handleError(e));\n }\n finally {\n this._runningTick = false;\n }\n }\n /**\n * Attaches a view so that it will be dirty checked.\n * The view will be automatically detached when it is destroyed.\n * This will throw if the view is already attached to a ViewContainer.\n */\n attachView(viewRef) {\n NG_DEV_MODE && this.warnIfDestroyed();\n const view = viewRef;\n this._views.push(view);\n view.attachToAppRef(this);\n }\n /**\n * Detaches a view from dirty checking again.\n */\n detachView(viewRef) {\n NG_DEV_MODE && this.warnIfDestroyed();\n const view = viewRef;\n remove(this._views, view);\n view.detachFromAppRef();\n }\n _loadComponent(componentRef) {\n this.attachView(componentRef.hostView);\n this.tick();\n this.components.push(componentRef);\n // Get the listeners lazily to prevent DI cycles.\n const listeners = this._injector.get(APP_BOOTSTRAP_LISTENER, []);\n if (ngDevMode && !Array.isArray(listeners)) {\n throw new RuntimeError(-209 /* RuntimeErrorCode.INVALID_MULTI_PROVIDER */, 'Unexpected type of the `APP_BOOTSTRAP_LISTENER` token value ' +\n `(expected an array, but got ${typeof listeners}). ` +\n 'Please check that the `APP_BOOTSTRAP_LISTENER` token is configured as a ' +\n '`multi: true` provider.');\n }\n listeners.push(...this._bootstrapListeners);\n listeners.forEach((listener) => listener(componentRef));\n }\n /** @internal */\n ngOnDestroy() {\n if (this._destroyed)\n return;\n try {\n // Call all the lifecycle hooks.\n this._destroyListeners.forEach(listener => listener());\n // Destroy all registered views.\n this._views.slice().forEach((view) => view.destroy());\n this._onMicrotaskEmptySubscription.unsubscribe();\n }\n finally {\n // Indicate that this instance is destroyed.\n this._destroyed = true;\n // Release all references.\n this._views = [];\n this._bootstrapListeners = [];\n this._destroyListeners = [];\n }\n }\n /**\n * Registers a listener to be called when an instance is destroyed.\n *\n * @param callback A callback function to add as a listener.\n * @returns A function which unregisters a listener.\n *\n * @internal\n */\n onDestroy(callback) {\n NG_DEV_MODE && this.warnIfDestroyed();\n this._destroyListeners.push(callback);\n return () => remove(this._destroyListeners, callback);\n }\n /**\n * Destroys an Angular application represented by this `ApplicationRef`. Calling this function\n * will destroy the associated environment injectors as well as all the bootstrapped components\n * with their views.\n */\n destroy() {\n if (this._destroyed) {\n throw new RuntimeError(406 /* RuntimeErrorCode.APPLICATION_REF_ALREADY_DESTROYED */, ngDevMode && 'This instance of the `ApplicationRef` has already been destroyed.');\n }\n const injector = this._injector;\n // Check that this injector instance supports destroy operation.\n if (injector.destroy && !injector.destroyed) {\n // Destroying an underlying injector will trigger the `ngOnDestroy` lifecycle\n // hook, which invokes the remaining cleanup actions.\n injector.destroy();\n }\n }\n /**\n * Returns the number of attached views.\n */\n get viewCount() {\n return this._views.length;\n }\n warnIfDestroyed() {\n if (NG_DEV_MODE && this._destroyed) {\n console.warn(formatRuntimeError(406 /* RuntimeErrorCode.APPLICATION_REF_ALREADY_DESTROYED */, 'This instance of the `ApplicationRef` has already been destroyed.'));\n }\n }\n}\nApplicationRef.ɵfac = function ApplicationRef_Factory(t) { return new (t || ApplicationRef)(ɵɵinject(NgZone), ɵɵinject(EnvironmentInjector), ɵɵinject(ErrorHandler)); };\nApplicationRef.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationRef, factory: ApplicationRef.ɵfac, providedIn: 'root' });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(ApplicationRef, [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], function () { return [{ type: NgZone }, { type: EnvironmentInjector }, { type: ErrorHandler }]; }, null); })();\nfunction remove(list, el) {\n const index = list.indexOf(el);\n if (index > -1) {\n list.splice(index, 1);\n }\n}\nfunction _lastDefined(args) {\n for (let i = args.length - 1; i >= 0; i--) {\n if (args[i] !== undefined) {\n return args[i];\n }\n }\n return undefined;\n}\nfunction _mergeArrays(parts) {\n const result = [];\n parts.forEach((part) => part && result.push(...part));\n return result;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Returns whether Angular is in development mode.\n *\n * By default, this is true, unless `enableProdMode` is invoked prior to calling this method or the\n * application is built using the Angular CLI with the `optimization` option.\n * @see {@link cli/build ng build}\n *\n * @publicApi\n */\nfunction isDevMode() {\n return typeof ngDevMode === 'undefined' || !!ngDevMode;\n}\n/**\n * Disable Angular's development mode, which turns off assertions and other\n * checks within the framework.\n *\n * One important assertion this disables verifies that a change detection pass\n * does not result in additional changes to any bindings (also known as\n * unidirectional data flow).\n *\n * Using this method is discouraged as the Angular CLI will set production mode when using the\n * `optimization` option.\n * @see {@link cli/build ng build}\n *\n * @publicApi\n */\nfunction enableProdMode() {\n // The below check is there so when ngDevMode is set via terser\n // `global['ngDevMode'] = false;` is also dropped.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n _global['ngDevMode'] = false;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Returns the NgModuleFactory with the given id (specified using [@NgModule.id\n * field](api/core/NgModule#id)), if it exists and has been loaded. Factories for NgModules that do\n * not specify an `id` cannot be retrieved. Throws if an NgModule cannot be found.\n * @publicApi\n * @deprecated Use `getNgModuleById` instead.\n */\nfunction getModuleFactory(id) {\n const type = getRegisteredNgModuleType(id);\n if (!type)\n throw noModuleError(id);\n return new NgModuleFactory(type);\n}\n/**\n * Returns the NgModule class with the given id (specified using [@NgModule.id\n * field](api/core/NgModule#id)), if it exists and has been loaded. Classes for NgModules that do\n * not specify an `id` cannot be retrieved. Throws if an NgModule cannot be found.\n * @publicApi\n */\nfunction getNgModuleById(id) {\n const type = getRegisteredNgModuleType(id);\n if (!type)\n throw noModuleError(id);\n return type;\n}\nfunction noModuleError(id) {\n return new Error(`No module with ID ${id} loaded`);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Base class that provides change detection functionality.\n * A change-detection tree collects all views that are to be checked for changes.\n * Use the methods to add and remove views from the tree, initiate change-detection,\n * and explicitly mark views as _dirty_, meaning that they have changed and need to be re-rendered.\n *\n * @see [Using change detection hooks](guide/lifecycle-hooks#using-change-detection-hooks)\n * @see [Defining custom change detection](guide/lifecycle-hooks#defining-custom-change-detection)\n *\n * @usageNotes\n *\n * The following examples demonstrate how to modify default change-detection behavior\n * to perform explicit detection when needed.\n *\n * ### Use `markForCheck()` with `CheckOnce` strategy\n *\n * The following example sets the `OnPush` change-detection strategy for a component\n * (`CheckOnce`, rather than the default `CheckAlways`), then forces a second check\n * after an interval. See [live demo](https://plnkr.co/edit/GC512b?p=preview).\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\"\n * region=\"mark-for-check\"></code-example>\n *\n * ### Detach change detector to limit how often check occurs\n *\n * The following example defines a component with a large list of read-only data\n * that is expected to change constantly, many times per second.\n * To improve performance, we want to check and update the list\n * less often than the changes actually occur. To do that, we detach\n * the component's change detector and perform an explicit local check every five seconds.\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\" region=\"detach\"></code-example>\n *\n *\n * ### Reattaching a detached component\n *\n * The following example creates a component displaying live data.\n * The component detaches its change detector from the main change detector tree\n * when the `live` property is set to false, and reattaches it when the property\n * becomes true.\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\" region=\"reattach\"></code-example>\n *\n * @publicApi\n */\nclass ChangeDetectorRef {\n}\n/**\n * @internal\n * @nocollapse\n */\nChangeDetectorRef.__NG_ELEMENT_ID__ = injectChangeDetectorRef;\n/** Returns a ChangeDetectorRef (a.k.a. a ViewRef) */\nfunction injectChangeDetectorRef(flags) {\n return createViewRef(getCurrentTNode(), getLView(), (flags & 16 /* InternalInjectFlags.ForPipe */) === 16 /* InternalInjectFlags.ForPipe */);\n}\n/**\n * Creates a ViewRef and stores it on the injector as ChangeDetectorRef (public alias).\n *\n * @param tNode The node that is requesting a ChangeDetectorRef\n * @param lView The view to which the node belongs\n * @param isPipe Whether the view is being injected into a pipe.\n * @returns The ChangeDetectorRef to use\n */\nfunction createViewRef(tNode, lView, isPipe) {\n if (isComponentHost(tNode) && !isPipe) {\n // The LView represents the location where the component is declared.\n // Instead we want the LView for the component View and so we need to look it up.\n const componentView = getComponentLViewByIndex(tNode.index, lView); // look down\n return new ViewRef$1(componentView, componentView);\n }\n else if (tNode.type & (3 /* TNodeType.AnyRNode */ | 12 /* TNodeType.AnyContainer */ | 32 /* TNodeType.Icu */)) {\n // The LView represents the location where the injection is requested from.\n // We need to locate the containing LView (in case where the `lView` is an embedded view)\n const hostComponentView = lView[DECLARATION_COMPONENT_VIEW]; // look up\n return new ViewRef$1(hostComponentView, lView);\n }\n return null;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Represents an Angular [view](guide/glossary#view \"Definition\").\n *\n * @see {@link ChangeDetectorRef#usage-notes Change detection usage}\n *\n * @publicApi\n */\nclass ViewRef extends ChangeDetectorRef {\n}\n/**\n * Represents an Angular [view](guide/glossary#view) in a view container.\n * An [embedded view](guide/glossary#view-tree) can be referenced from a component\n * other than the hosting component whose template defines it, or it can be defined\n * independently by a `TemplateRef`.\n *\n * Properties of elements in a view can change, but the structure (number and order) of elements in\n * a view cannot. Change the structure of elements by inserting, moving, or\n * removing nested views in a view container.\n *\n * @see `ViewContainerRef`\n *\n * @usageNotes\n *\n * The following template breaks down into two separate `TemplateRef` instances,\n * an outer one and an inner one.\n *\n * ```\n * Count: {{items.length}}\n * <ul>\n * <li *ngFor=\"let item of items\">{{item}}</li>\n * </ul>\n * ```\n *\n * This is the outer `TemplateRef`:\n *\n * ```\n * Count: {{items.length}}\n * <ul>\n * <ng-template ngFor let-item [ngForOf]=\"items\"></ng-template>\n * </ul>\n * ```\n *\n * This is the inner `TemplateRef`:\n *\n * ```\n * <li>{{item}}</li>\n * ```\n *\n * The outer and inner `TemplateRef` instances are assembled into views as follows:\n *\n * ```\n * <!-- ViewRef: outer-0 -->\n * Count: 2\n * <ul>\n * <ng-template view-container-ref></ng-template>\n * <!-- ViewRef: inner-1 --><li>first</li><!-- /ViewRef: inner-1 -->\n * <!-- ViewRef: inner-2 --><li>second</li><!-- /ViewRef: inner-2 -->\n * </ul>\n * <!-- /ViewRef: outer-0 -->\n * ```\n * @publicApi\n */\nclass EmbeddedViewRef extends ViewRef {\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// This file exists for easily patching NgModuleFactoryLoader in g3\nvar ng_module_factory_loader_impl = {};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @publicApi\n */\nclass DebugEventListener {\n constructor(name, callback) {\n this.name = name;\n this.callback = callback;\n }\n}\n/**\n * @publicApi\n */\nfunction asNativeElements(debugEls) {\n return debugEls.map((el) => el.nativeElement);\n}\n/**\n * @publicApi\n */\nclass DebugNode {\n constructor(nativeNode) {\n this.nativeNode = nativeNode;\n }\n /**\n * The `DebugElement` parent. Will be `null` if this is the root element.\n */\n get parent() {\n const parent = this.nativeNode.parentNode;\n return parent ? new DebugElement(parent) : null;\n }\n /**\n * The host dependency injector. For example, the root element's component instance injector.\n */\n get injector() {\n return getInjector(this.nativeNode);\n }\n /**\n * The element's own component instance, if it has one.\n */\n get componentInstance() {\n const nativeElement = this.nativeNode;\n return nativeElement &&\n (getComponent(nativeElement) || getOwningComponent(nativeElement));\n }\n /**\n * An object that provides parent context for this element. Often an ancestor component instance\n * that governs this element.\n *\n * When an element is repeated within *ngFor, the context is an `NgForOf` whose `$implicit`\n * property is the value of the row instance value. For example, the `hero` in `*ngFor=\"let hero\n * of heroes\"`.\n */\n get context() {\n return getComponent(this.nativeNode) || getContext(this.nativeNode);\n }\n /**\n * The callbacks attached to the component's @Output properties and/or the element's event\n * properties.\n */\n get listeners() {\n return getListeners(this.nativeNode).filter(listener => listener.type === 'dom');\n }\n /**\n * Dictionary of objects associated with template local variables (e.g. #foo), keyed by the local\n * variable name.\n */\n get references() {\n return getLocalRefs(this.nativeNode);\n }\n /**\n * This component's injector lookup tokens. Includes the component itself plus the tokens that the\n * component lists in its providers metadata.\n */\n get providerTokens() {\n return getInjectionTokens(this.nativeNode);\n }\n}\n/**\n * @publicApi\n *\n * @see [Component testing scenarios](guide/testing-components-scenarios)\n * @see [Basics of testing components](guide/testing-components-basics)\n * @see [Testing utility APIs](guide/testing-utility-apis)\n */\nclass DebugElement extends DebugNode {\n constructor(nativeNode) {\n ngDevMode && assertDomNode(nativeNode);\n super(nativeNode);\n }\n /**\n * The underlying DOM element at the root of the component.\n */\n get nativeElement() {\n return this.nativeNode.nodeType == Node.ELEMENT_NODE ? this.nativeNode : null;\n }\n /**\n * The element tag name, if it is an element.\n */\n get name() {\n const context = getLContext(this.nativeNode);\n const lView = context ? context.lView : null;\n if (lView !== null) {\n const tData = lView[TVIEW].data;\n const tNode = tData[context.nodeIndex];\n return tNode.value;\n }\n else {\n return this.nativeNode.nodeName;\n }\n }\n /**\n * Gets a map of property names to property values for an element.\n *\n * This map includes:\n * - Regular property bindings (e.g. `[id]=\"id\"`)\n * - Host property bindings (e.g. `host: { '[id]': \"id\" }`)\n * - Interpolated property bindings (e.g. `id=\"{{ value }}\")\n *\n * It does not include:\n * - input property bindings (e.g. `[myCustomInput]=\"value\"`)\n * - attribute bindings (e.g. `[attr.role]=\"menu\"`)\n */\n get properties() {\n const context = getLContext(this.nativeNode);\n const lView = context ? context.lView : null;\n if (lView === null) {\n return {};\n }\n const tData = lView[TVIEW].data;\n const tNode = tData[context.nodeIndex];\n const properties = {};\n // Collect properties from the DOM.\n copyDomProperties(this.nativeElement, properties);\n // Collect properties from the bindings. This is needed for animation renderer which has\n // synthetic properties which don't get reflected into the DOM.\n collectPropertyBindings(properties, tNode, lView, tData);\n return properties;\n }\n /**\n * A map of attribute names to attribute values for an element.\n */\n get attributes() {\n const attributes = {};\n const element = this.nativeElement;\n if (!element) {\n return attributes;\n }\n const context = getLContext(element);\n const lView = context ? context.lView : null;\n if (lView === null) {\n return {};\n }\n const tNodeAttrs = lView[TVIEW].data[context.nodeIndex].attrs;\n const lowercaseTNodeAttrs = [];\n // For debug nodes we take the element's attribute directly from the DOM since it allows us\n // to account for ones that weren't set via bindings (e.g. ViewEngine keeps track of the ones\n // that are set through `Renderer2`). The problem is that the browser will lowercase all names,\n // however since we have the attributes already on the TNode, we can preserve the case by going\n // through them once, adding them to the `attributes` map and putting their lower-cased name\n // into an array. Afterwards when we're going through the native DOM attributes, we can check\n // whether we haven't run into an attribute already through the TNode.\n if (tNodeAttrs) {\n let i = 0;\n while (i < tNodeAttrs.length) {\n const attrName = tNodeAttrs[i];\n // Stop as soon as we hit a marker. We only care about the regular attributes. Everything\n // else will be handled below when we read the final attributes off the DOM.\n if (typeof attrName !== 'string')\n break;\n const attrValue = tNodeAttrs[i + 1];\n attributes[attrName] = attrValue;\n lowercaseTNodeAttrs.push(attrName.toLowerCase());\n i += 2;\n }\n }\n const eAttrs = element.attributes;\n for (let i = 0; i < eAttrs.length; i++) {\n const attr = eAttrs[i];\n const lowercaseName = attr.name.toLowerCase();\n // Make sure that we don't assign the same attribute both in its\n // case-sensitive form and the lower-cased one from the browser.\n if (lowercaseTNodeAttrs.indexOf(lowercaseName) === -1) {\n // Save the lowercase name to align the behavior between browsers.\n // IE preserves the case, while all other browser convert it to lower case.\n attributes[lowercaseName] = attr.value;\n }\n }\n return attributes;\n }\n /**\n * The inline styles of the DOM element.\n *\n * Will be `null` if there is no `style` property on the underlying DOM element.\n *\n * @see [ElementCSSInlineStyle](https://developer.mozilla.org/en-US/docs/Web/API/ElementCSSInlineStyle/style)\n */\n get styles() {\n if (this.nativeElement && this.nativeElement.style) {\n return this.nativeElement.style;\n }\n return {};\n }\n /**\n * A map containing the class names on the element as keys.\n *\n * This map is derived from the `className` property of the DOM element.\n *\n * Note: The values of this object will always be `true`. The class key will not appear in the KV\n * object if it does not exist on the element.\n *\n * @see [Element.className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className)\n */\n get classes() {\n const result = {};\n const element = this.nativeElement;\n // SVG elements return an `SVGAnimatedString` instead of a plain string for the `className`.\n const className = element.className;\n const classes = typeof className !== 'string' ? className.baseVal.split(' ') : className.split(' ');\n classes.forEach((value) => result[value] = true);\n return result;\n }\n /**\n * The `childNodes` of the DOM element as a `DebugNode` array.\n *\n * @see [Node.childNodes](https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes)\n */\n get childNodes() {\n const childNodes = this.nativeNode.childNodes;\n const children = [];\n for (let i = 0; i < childNodes.length; i++) {\n const element = childNodes[i];\n children.push(getDebugNode(element));\n }\n return children;\n }\n /**\n * The immediate `DebugElement` children. Walk the tree by descending through `children`.\n */\n get children() {\n const nativeElement = this.nativeElement;\n if (!nativeElement)\n return [];\n const childNodes = nativeElement.children;\n const children = [];\n for (let i = 0; i < childNodes.length; i++) {\n const element = childNodes[i];\n children.push(getDebugNode(element));\n }\n return children;\n }\n /**\n * @returns the first `DebugElement` that matches the predicate at any depth in the subtree.\n */\n query(predicate) {\n const results = this.queryAll(predicate);\n return results[0] || null;\n }\n /**\n * @returns All `DebugElement` matches for the predicate at any depth in the subtree.\n */\n queryAll(predicate) {\n const matches = [];\n _queryAll(this, predicate, matches, true);\n return matches;\n }\n /**\n * @returns All `DebugNode` matches for the predicate at any depth in the subtree.\n */\n queryAllNodes(predicate) {\n const matches = [];\n _queryAll(this, predicate, matches, false);\n return matches;\n }\n /**\n * Triggers the event by its name if there is a corresponding listener in the element's\n * `listeners` collection.\n *\n * If the event lacks a listener or there's some other problem, consider\n * calling `nativeElement.dispatchEvent(eventObject)`.\n *\n * @param eventName The name of the event to trigger\n * @param eventObj The _event object_ expected by the handler\n *\n * @see [Testing components scenarios](guide/testing-components-scenarios#trigger-event-handler)\n */\n triggerEventHandler(eventName, eventObj) {\n const node = this.nativeNode;\n const invokedListeners = [];\n this.listeners.forEach(listener => {\n if (listener.name === eventName) {\n const callback = listener.callback;\n callback.call(node, eventObj);\n invokedListeners.push(callback);\n }\n });\n // We need to check whether `eventListeners` exists, because it's something\n // that Zone.js only adds to `EventTarget` in browser environments.\n if (typeof node.eventListeners === 'function') {\n // Note that in Ivy we wrap event listeners with a call to `event.preventDefault` in some\n // cases. We use '__ngUnwrap__' as a special token that gives us access to the actual event\n // listener.\n node.eventListeners(eventName).forEach((listener) => {\n // In order to ensure that we can detect the special __ngUnwrap__ token described above, we\n // use `toString` on the listener and see if it contains the token. We use this approach to\n // ensure that it still worked with compiled code since it cannot remove or rename string\n // literals. We also considered using a special function name (i.e. if(listener.name ===\n // special)) but that was more cumbersome and we were also concerned the compiled code could\n // strip the name, turning the condition in to (\"\" === \"\") and always returning true.\n if (listener.toString().indexOf('__ngUnwrap__') !== -1) {\n const unwrappedListener = listener('__ngUnwrap__');\n return invokedListeners.indexOf(unwrappedListener) === -1 &&\n unwrappedListener.call(node, eventObj);\n }\n });\n }\n }\n}\nfunction copyDomProperties(element, properties) {\n if (element) {\n // Skip own properties (as those are patched)\n let obj = Object.getPrototypeOf(element);\n const NodePrototype = Node.prototype;\n while (obj !== null && obj !== NodePrototype) {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n for (let key in descriptors) {\n if (!key.startsWith('__') && !key.startsWith('on')) {\n // don't include properties starting with `__` and `on`.\n // `__` are patched values which should not be included.\n // `on` are listeners which also should not be included.\n const value = element[key];\n if (isPrimitiveValue(value)) {\n properties[key] = value;\n }\n }\n }\n obj = Object.getPrototypeOf(obj);\n }\n }\n}\nfunction isPrimitiveValue(value) {\n return typeof value === 'string' || typeof value === 'boolean' || typeof value === 'number' ||\n value === null;\n}\nfunction _queryAll(parentElement, predicate, matches, elementsOnly) {\n const context = getLContext(parentElement.nativeNode);\n const lView = context ? context.lView : null;\n if (lView !== null) {\n const parentTNode = lView[TVIEW].data[context.nodeIndex];\n _queryNodeChildren(parentTNode, lView, predicate, matches, elementsOnly, parentElement.nativeNode);\n }\n else {\n // If the context is null, then `parentElement` was either created with Renderer2 or native DOM\n // APIs.\n _queryNativeNodeDescendants(parentElement.nativeNode, predicate, matches, elementsOnly);\n }\n}\n/**\n * Recursively match the current TNode against the predicate, and goes on with the next ones.\n *\n * @param tNode the current TNode\n * @param lView the LView of this TNode\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which predicate should not be matched\n */\nfunction _queryNodeChildren(tNode, lView, predicate, matches, elementsOnly, rootNativeNode) {\n ngDevMode && assertTNodeForLView(tNode, lView);\n const nativeNode = getNativeByTNodeOrNull(tNode, lView);\n // For each type of TNode, specific logic is executed.\n if (tNode.type & (3 /* TNodeType.AnyRNode */ | 8 /* TNodeType.ElementContainer */)) {\n // Case 1: the TNode is an element\n // The native node has to be checked.\n _addQueryMatch(nativeNode, predicate, matches, elementsOnly, rootNativeNode);\n if (isComponentHost(tNode)) {\n // If the element is the host of a component, then all nodes in its view have to be processed.\n // Note: the component's content (tNode.child) will be processed from the insertion points.\n const componentView = getComponentLViewByIndex(tNode.index, lView);\n if (componentView && componentView[TVIEW].firstChild) {\n _queryNodeChildren(componentView[TVIEW].firstChild, componentView, predicate, matches, elementsOnly, rootNativeNode);\n }\n }\n else {\n if (tNode.child) {\n // Otherwise, its children have to be processed.\n _queryNodeChildren(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);\n }\n // We also have to query the DOM directly in order to catch elements inserted through\n // Renderer2. Note that this is __not__ optimal, because we're walking similar trees multiple\n // times. ViewEngine could do it more efficiently, because all the insertions go through\n // Renderer2, however that's not the case in Ivy. This approach is being used because:\n // 1. Matching the ViewEngine behavior would mean potentially introducing a dependency\n // from `Renderer2` to Ivy which could bring Ivy code into ViewEngine.\n // 2. It allows us to capture nodes that were inserted directly via the DOM.\n nativeNode && _queryNativeNodeDescendants(nativeNode, predicate, matches, elementsOnly);\n }\n // In all cases, if a dynamic container exists for this node, each view inside it has to be\n // processed.\n const nodeOrContainer = lView[tNode.index];\n if (isLContainer(nodeOrContainer)) {\n _queryNodeChildrenInContainer(nodeOrContainer, predicate, matches, elementsOnly, rootNativeNode);\n }\n }\n else if (tNode.type & 4 /* TNodeType.Container */) {\n // Case 2: the TNode is a container\n // The native node has to be checked.\n const lContainer = lView[tNode.index];\n _addQueryMatch(lContainer[NATIVE], predicate, matches, elementsOnly, rootNativeNode);\n // Each view inside the container has to be processed.\n _queryNodeChildrenInContainer(lContainer, predicate, matches, elementsOnly, rootNativeNode);\n }\n else if (tNode.type & 16 /* TNodeType.Projection */) {\n // Case 3: the TNode is a projection insertion point (i.e. a <ng-content>).\n // The nodes projected at this location all need to be processed.\n const componentView = lView[DECLARATION_COMPONENT_VIEW];\n const componentHost = componentView[T_HOST];\n const head = componentHost.projection[tNode.projection];\n if (Array.isArray(head)) {\n for (let nativeNode of head) {\n _addQueryMatch(nativeNode, predicate, matches, elementsOnly, rootNativeNode);\n }\n }\n else if (head) {\n const nextLView = componentView[PARENT];\n const nextTNode = nextLView[TVIEW].data[head.index];\n _queryNodeChildren(nextTNode, nextLView, predicate, matches, elementsOnly, rootNativeNode);\n }\n }\n else if (tNode.child) {\n // Case 4: the TNode is a view.\n _queryNodeChildren(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);\n }\n // We don't want to go to the next sibling of the root node.\n if (rootNativeNode !== nativeNode) {\n // To determine the next node to be processed, we need to use the next or the projectionNext\n // link, depending on whether the current node has been projected.\n const nextTNode = (tNode.flags & 2 /* TNodeFlags.isProjected */) ? tNode.projectionNext : tNode.next;\n if (nextTNode) {\n _queryNodeChildren(nextTNode, lView, predicate, matches, elementsOnly, rootNativeNode);\n }\n }\n}\n/**\n * Process all TNodes in a given container.\n *\n * @param lContainer the container to be processed\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which predicate should not be matched\n */\nfunction _queryNodeChildrenInContainer(lContainer, predicate, matches, elementsOnly, rootNativeNode) {\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const childView = lContainer[i];\n const firstChild = childView[TVIEW].firstChild;\n if (firstChild) {\n _queryNodeChildren(firstChild, childView, predicate, matches, elementsOnly, rootNativeNode);\n }\n }\n}\n/**\n * Match the current native node against the predicate.\n *\n * @param nativeNode the current native node\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which predicate should not be matched\n */\nfunction _addQueryMatch(nativeNode, predicate, matches, elementsOnly, rootNativeNode) {\n if (rootNativeNode !== nativeNode) {\n const debugNode = getDebugNode(nativeNode);\n if (!debugNode) {\n return;\n }\n // Type of the \"predicate and \"matches\" array are set based on the value of\n // the \"elementsOnly\" parameter. TypeScript is not able to properly infer these\n // types with generics, so we manually cast the parameters accordingly.\n if (elementsOnly && (debugNode instanceof DebugElement) && predicate(debugNode) &&\n matches.indexOf(debugNode) === -1) {\n matches.push(debugNode);\n }\n else if (!elementsOnly && predicate(debugNode) &&\n matches.indexOf(debugNode) === -1) {\n matches.push(debugNode);\n }\n }\n}\n/**\n * Match all the descendants of a DOM node against a predicate.\n *\n * @param nativeNode the current native node\n * @param predicate the predicate to match\n * @param matches the list where matches are stored\n * @param elementsOnly whether only elements should be searched\n */\nfunction _queryNativeNodeDescendants(parentNode, predicate, matches, elementsOnly) {\n const nodes = parentNode.childNodes;\n const length = nodes.length;\n for (let i = 0; i < length; i++) {\n const node = nodes[i];\n const debugNode = getDebugNode(node);\n if (debugNode) {\n if (elementsOnly && (debugNode instanceof DebugElement) && predicate(debugNode) &&\n matches.indexOf(debugNode) === -1) {\n matches.push(debugNode);\n }\n else if (!elementsOnly && predicate(debugNode) &&\n matches.indexOf(debugNode) === -1) {\n matches.push(debugNode);\n }\n _queryNativeNodeDescendants(node, predicate, matches, elementsOnly);\n }\n }\n}\n/**\n * Iterates through the property bindings for a given node and generates\n * a map of property names to values. This map only contains property bindings\n * defined in templates, not in host bindings.\n */\nfunction collectPropertyBindings(properties, tNode, lView, tData) {\n let bindingIndexes = tNode.propertyBindings;\n if (bindingIndexes !== null) {\n for (let i = 0; i < bindingIndexes.length; i++) {\n const bindingIndex = bindingIndexes[i];\n const propMetadata = tData[bindingIndex];\n const metadataParts = propMetadata.split(INTERPOLATION_DELIMITER);\n const propertyName = metadataParts[0];\n if (metadataParts.length > 1) {\n let value = metadataParts[1];\n for (let j = 1; j < metadataParts.length - 1; j++) {\n value += renderStringify(lView[bindingIndex + j - 1]) + metadataParts[j + 1];\n }\n properties[propertyName] = value;\n }\n else {\n properties[propertyName] = lView[bindingIndex];\n }\n }\n }\n}\n// Need to keep the nodes in a global Map so that multiple angular apps are supported.\nconst _nativeNodeToDebugNode = new Map();\nconst NG_DEBUG_PROPERTY = '__ng_debug__';\n/**\n * @publicApi\n */\nfunction getDebugNode(nativeNode) {\n if (nativeNode instanceof Node) {\n if (!(nativeNode.hasOwnProperty(NG_DEBUG_PROPERTY))) {\n nativeNode[NG_DEBUG_PROPERTY] = nativeNode.nodeType == Node.ELEMENT_NODE ?\n new DebugElement(nativeNode) :\n new DebugNode(nativeNode);\n }\n return nativeNode[NG_DEBUG_PROPERTY];\n }\n return null;\n}\n// TODO: cleanup all references to this function and remove it.\nfunction getDebugNodeR2(_nativeNode) {\n return null;\n}\nfunction getAllDebugNodes() {\n return Array.from(_nativeNodeToDebugNode.values());\n}\nfunction indexDebugNode(node) {\n _nativeNodeToDebugNode.set(node.nativeNode, node);\n}\nfunction removeDebugNodeFromIndex(node) {\n _nativeNodeToDebugNode.delete(node.nativeNode);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass DefaultIterableDifferFactory {\n constructor() { }\n supports(obj) {\n return isListLikeIterable(obj);\n }\n create(trackByFn) {\n return new DefaultIterableDiffer(trackByFn);\n }\n}\nconst trackByIdentity = (index, item) => item;\n/**\n * @deprecated v4.0.0 - Should not be part of public API.\n * @publicApi\n */\nclass DefaultIterableDiffer {\n constructor(trackByFn) {\n this.length = 0;\n // Keeps track of the used records at any point in time (during & across `_check()` calls)\n this._linkedRecords = null;\n // Keeps track of the removed records at any point in time during `_check()` calls.\n this._unlinkedRecords = null;\n this._previousItHead = null;\n this._itHead = null;\n this._itTail = null;\n this._additionsHead = null;\n this._additionsTail = null;\n this._movesHead = null;\n this._movesTail = null;\n this._removalsHead = null;\n this._removalsTail = null;\n // Keeps track of records where custom track by is the same, but item identity has changed\n this._identityChangesHead = null;\n this._identityChangesTail = null;\n this._trackByFn = trackByFn || trackByIdentity;\n }\n forEachItem(fn) {\n let record;\n for (record = this._itHead; record !== null; record = record._next) {\n fn(record);\n }\n }\n forEachOperation(fn) {\n let nextIt = this._itHead;\n let nextRemove = this._removalsHead;\n let addRemoveOffset = 0;\n let moveOffsets = null;\n while (nextIt || nextRemove) {\n // Figure out which is the next record to process\n // Order: remove, add, move\n const record = !nextRemove ||\n nextIt &&\n nextIt.currentIndex <\n getPreviousIndex(nextRemove, addRemoveOffset, moveOffsets) ?\n nextIt :\n nextRemove;\n const adjPreviousIndex = getPreviousIndex(record, addRemoveOffset, moveOffsets);\n const currentIndex = record.currentIndex;\n // consume the item, and adjust the addRemoveOffset and update moveDistance if necessary\n if (record === nextRemove) {\n addRemoveOffset--;\n nextRemove = nextRemove._nextRemoved;\n }\n else {\n nextIt = nextIt._next;\n if (record.previousIndex == null) {\n addRemoveOffset++;\n }\n else {\n // INVARIANT: currentIndex < previousIndex\n if (!moveOffsets)\n moveOffsets = [];\n const localMovePreviousIndex = adjPreviousIndex - addRemoveOffset;\n const localCurrentIndex = currentIndex - addRemoveOffset;\n if (localMovePreviousIndex != localCurrentIndex) {\n for (let i = 0; i < localMovePreviousIndex; i++) {\n const offset = i < moveOffsets.length ? moveOffsets[i] : (moveOffsets[i] = 0);\n const index = offset + i;\n if (localCurrentIndex <= index && index < localMovePreviousIndex) {\n moveOffsets[i] = offset + 1;\n }\n }\n const previousIndex = record.previousIndex;\n moveOffsets[previousIndex] = localCurrentIndex - localMovePreviousIndex;\n }\n }\n }\n if (adjPreviousIndex !== currentIndex) {\n fn(record, adjPreviousIndex, currentIndex);\n }\n }\n }\n forEachPreviousItem(fn) {\n let record;\n for (record = this._previousItHead; record !== null; record = record._nextPrevious) {\n fn(record);\n }\n }\n forEachAddedItem(fn) {\n let record;\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n fn(record);\n }\n }\n forEachMovedItem(fn) {\n let record;\n for (record = this._movesHead; record !== null; record = record._nextMoved) {\n fn(record);\n }\n }\n forEachRemovedItem(fn) {\n let record;\n for (record = this._removalsHead; record !== null; record = record._nextRemoved) {\n fn(record);\n }\n }\n forEachIdentityChange(fn) {\n let record;\n for (record = this._identityChangesHead; record !== null; record = record._nextIdentityChange) {\n fn(record);\n }\n }\n diff(collection) {\n if (collection == null)\n collection = [];\n if (!isListLikeIterable(collection)) {\n throw new RuntimeError(900 /* RuntimeErrorCode.INVALID_DIFFER_INPUT */, ngDevMode &&\n `Error trying to diff '${stringify(collection)}'. Only arrays and iterables are allowed`);\n }\n if (this.check(collection)) {\n return this;\n }\n else {\n return null;\n }\n }\n onDestroy() { }\n check(collection) {\n this._reset();\n let record = this._itHead;\n let mayBeDirty = false;\n let index;\n let item;\n let itemTrackBy;\n if (Array.isArray(collection)) {\n this.length = collection.length;\n for (let index = 0; index < this.length; index++) {\n item = collection[index];\n itemTrackBy = this._trackByFn(index, item);\n if (record === null || !Object.is(record.trackById, itemTrackBy)) {\n record = this._mismatch(record, item, itemTrackBy, index);\n mayBeDirty = true;\n }\n else {\n if (mayBeDirty) {\n // TODO(misko): can we limit this to duplicates only?\n record = this._verifyReinsertion(record, item, itemTrackBy, index);\n }\n if (!Object.is(record.item, item))\n this._addIdentityChange(record, item);\n }\n record = record._next;\n }\n }\n else {\n index = 0;\n iterateListLike(collection, (item) => {\n itemTrackBy = this._trackByFn(index, item);\n if (record === null || !Object.is(record.trackById, itemTrackBy)) {\n record = this._mismatch(record, item, itemTrackBy, index);\n mayBeDirty = true;\n }\n else {\n if (mayBeDirty) {\n // TODO(misko): can we limit this to duplicates only?\n record = this._verifyReinsertion(record, item, itemTrackBy, index);\n }\n if (!Object.is(record.item, item))\n this._addIdentityChange(record, item);\n }\n record = record._next;\n index++;\n });\n this.length = index;\n }\n this._truncate(record);\n this.collection = collection;\n return this.isDirty;\n }\n /* CollectionChanges is considered dirty if it has any additions, moves, removals, or identity\n * changes.\n */\n get isDirty() {\n return this._additionsHead !== null || this._movesHead !== null ||\n this._removalsHead !== null || this._identityChangesHead !== null;\n }\n /**\n * Reset the state of the change objects to show no changes. This means set previousKey to\n * currentKey, and clear all of the queues (additions, moves, removals).\n * Set the previousIndexes of moved and added items to their currentIndexes\n * Reset the list of additions, moves and removals\n *\n * @internal\n */\n _reset() {\n if (this.isDirty) {\n let record;\n for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {\n record._nextPrevious = record._next;\n }\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n record.previousIndex = record.currentIndex;\n }\n this._additionsHead = this._additionsTail = null;\n for (record = this._movesHead; record !== null; record = record._nextMoved) {\n record.previousIndex = record.currentIndex;\n }\n this._movesHead = this._movesTail = null;\n this._removalsHead = this._removalsTail = null;\n this._identityChangesHead = this._identityChangesTail = null;\n // TODO(vicb): when assert gets supported\n // assert(!this.isDirty);\n }\n }\n /**\n * This is the core function which handles differences between collections.\n *\n * - `record` is the record which we saw at this position last time. If null then it is a new\n * item.\n * - `item` is the current item in the collection\n * - `index` is the position of the item in the collection\n *\n * @internal\n */\n _mismatch(record, item, itemTrackBy, index) {\n // The previous record after which we will append the current one.\n let previousRecord;\n if (record === null) {\n previousRecord = this._itTail;\n }\n else {\n previousRecord = record._prev;\n // Remove the record from the collection since we know it does not match the item.\n this._remove(record);\n }\n // See if we have evicted the item, which used to be at some anterior position of _itHead list.\n record = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);\n if (record !== null) {\n // It is an item which we have evicted earlier: reinsert it back into the list.\n // But first we need to check if identity changed, so we can update in view if necessary.\n if (!Object.is(record.item, item))\n this._addIdentityChange(record, item);\n this._reinsertAfter(record, previousRecord, index);\n }\n else {\n // Attempt to see if the item is at some posterior position of _itHead list.\n record = this._linkedRecords === null ? null : this._linkedRecords.get(itemTrackBy, index);\n if (record !== null) {\n // We have the item in _itHead at/after `index` position. We need to move it forward in the\n // collection.\n // But first we need to check if identity changed, so we can update in view if necessary.\n if (!Object.is(record.item, item))\n this._addIdentityChange(record, item);\n this._moveAfter(record, previousRecord, index);\n }\n else {\n // It is a new item: add it.\n record =\n this._addAfter(new IterableChangeRecord_(item, itemTrackBy), previousRecord, index);\n }\n }\n return record;\n }\n /**\n * This check is only needed if an array contains duplicates. (Short circuit of nothing dirty)\n *\n * Use case: `[a, a]` => `[b, a, a]`\n *\n * If we did not have this check then the insertion of `b` would:\n * 1) evict first `a`\n * 2) insert `b` at `0` index.\n * 3) leave `a` at index `1` as is. <-- this is wrong!\n * 3) reinsert `a` at index 2. <-- this is wrong!\n *\n * The correct behavior is:\n * 1) evict first `a`\n * 2) insert `b` at `0` index.\n * 3) reinsert `a` at index 1.\n * 3) move `a` at from `1` to `2`.\n *\n *\n * Double check that we have not evicted a duplicate item. We need to check if the item type may\n * have already been removed:\n * The insertion of b will evict the first 'a'. If we don't reinsert it now it will be reinserted\n * at the end. Which will show up as the two 'a's switching position. This is incorrect, since a\n * better way to think of it is as insert of 'b' rather then switch 'a' with 'b' and then add 'a'\n * at the end.\n *\n * @internal\n */\n _verifyReinsertion(record, item, itemTrackBy, index) {\n let reinsertRecord = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);\n if (reinsertRecord !== null) {\n record = this._reinsertAfter(reinsertRecord, record._prev, index);\n }\n else if (record.currentIndex != index) {\n record.currentIndex = index;\n this._addToMoves(record, index);\n }\n return record;\n }\n /**\n * Get rid of any excess {@link IterableChangeRecord_}s from the previous collection\n *\n * - `record` The first excess {@link IterableChangeRecord_}.\n *\n * @internal\n */\n _truncate(record) {\n // Anything after that needs to be removed;\n while (record !== null) {\n const nextRecord = record._next;\n this._addToRemovals(this._unlink(record));\n record = nextRecord;\n }\n if (this._unlinkedRecords !== null) {\n this._unlinkedRecords.clear();\n }\n if (this._additionsTail !== null) {\n this._additionsTail._nextAdded = null;\n }\n if (this._movesTail !== null) {\n this._movesTail._nextMoved = null;\n }\n if (this._itTail !== null) {\n this._itTail._next = null;\n }\n if (this._removalsTail !== null) {\n this._removalsTail._nextRemoved = null;\n }\n if (this._identityChangesTail !== null) {\n this._identityChangesTail._nextIdentityChange = null;\n }\n }\n /** @internal */\n _reinsertAfter(record, prevRecord, index) {\n if (this._unlinkedRecords !== null) {\n this._unlinkedRecords.remove(record);\n }\n const prev = record._prevRemoved;\n const next = record._nextRemoved;\n if (prev === null) {\n this._removalsHead = next;\n }\n else {\n prev._nextRemoved = next;\n }\n if (next === null) {\n this._removalsTail = prev;\n }\n else {\n next._prevRemoved = prev;\n }\n this._insertAfter(record, prevRecord, index);\n this._addToMoves(record, index);\n return record;\n }\n /** @internal */\n _moveAfter(record, prevRecord, index) {\n this._unlink(record);\n this._insertAfter(record, prevRecord, index);\n this._addToMoves(record, index);\n return record;\n }\n /** @internal */\n _addAfter(record, prevRecord, index) {\n this._insertAfter(record, prevRecord, index);\n if (this._additionsTail === null) {\n // TODO(vicb):\n // assert(this._additionsHead === null);\n this._additionsTail = this._additionsHead = record;\n }\n else {\n // TODO(vicb):\n // assert(_additionsTail._nextAdded === null);\n // assert(record._nextAdded === null);\n this._additionsTail = this._additionsTail._nextAdded = record;\n }\n return record;\n }\n /** @internal */\n _insertAfter(record, prevRecord, index) {\n // TODO(vicb):\n // assert(record != prevRecord);\n // assert(record._next === null);\n // assert(record._prev === null);\n const next = prevRecord === null ? this._itHead : prevRecord._next;\n // TODO(vicb):\n // assert(next != record);\n // assert(prevRecord != record);\n record._next = next;\n record._prev = prevRecord;\n if (next === null) {\n this._itTail = record;\n }\n else {\n next._prev = record;\n }\n if (prevRecord === null) {\n this._itHead = record;\n }\n else {\n prevRecord._next = record;\n }\n if (this._linkedRecords === null) {\n this._linkedRecords = new _DuplicateMap();\n }\n this._linkedRecords.put(record);\n record.currentIndex = index;\n return record;\n }\n /** @internal */\n _remove(record) {\n return this._addToRemovals(this._unlink(record));\n }\n /** @internal */\n _unlink(record) {\n if (this._linkedRecords !== null) {\n this._linkedRecords.remove(record);\n }\n const prev = record._prev;\n const next = record._next;\n // TODO(vicb):\n // assert((record._prev = null) === null);\n // assert((record._next = null) === null);\n if (prev === null) {\n this._itHead = next;\n }\n else {\n prev._next = next;\n }\n if (next === null) {\n this._itTail = prev;\n }\n else {\n next._prev = prev;\n }\n return record;\n }\n /** @internal */\n _addToMoves(record, toIndex) {\n // TODO(vicb):\n // assert(record._nextMoved === null);\n if (record.previousIndex === toIndex) {\n return record;\n }\n if (this._movesTail === null) {\n // TODO(vicb):\n // assert(_movesHead === null);\n this._movesTail = this._movesHead = record;\n }\n else {\n // TODO(vicb):\n // assert(_movesTail._nextMoved === null);\n this._movesTail = this._movesTail._nextMoved = record;\n }\n return record;\n }\n _addToRemovals(record) {\n if (this._unlinkedRecords === null) {\n this._unlinkedRecords = new _DuplicateMap();\n }\n this._unlinkedRecords.put(record);\n record.currentIndex = null;\n record._nextRemoved = null;\n if (this._removalsTail === null) {\n // TODO(vicb):\n // assert(_removalsHead === null);\n this._removalsTail = this._removalsHead = record;\n record._prevRemoved = null;\n }\n else {\n // TODO(vicb):\n // assert(_removalsTail._nextRemoved === null);\n // assert(record._nextRemoved === null);\n record._prevRemoved = this._removalsTail;\n this._removalsTail = this._removalsTail._nextRemoved = record;\n }\n return record;\n }\n /** @internal */\n _addIdentityChange(record, item) {\n record.item = item;\n if (this._identityChangesTail === null) {\n this._identityChangesTail = this._identityChangesHead = record;\n }\n else {\n this._identityChangesTail = this._identityChangesTail._nextIdentityChange = record;\n }\n return record;\n }\n}\nclass IterableChangeRecord_ {\n constructor(item, trackById) {\n this.item = item;\n this.trackById = trackById;\n this.currentIndex = null;\n this.previousIndex = null;\n /** @internal */\n this._nextPrevious = null;\n /** @internal */\n this._prev = null;\n /** @internal */\n this._next = null;\n /** @internal */\n this._prevDup = null;\n /** @internal */\n this._nextDup = null;\n /** @internal */\n this._prevRemoved = null;\n /** @internal */\n this._nextRemoved = null;\n /** @internal */\n this._nextAdded = null;\n /** @internal */\n this._nextMoved = null;\n /** @internal */\n this._nextIdentityChange = null;\n }\n}\n// A linked list of IterableChangeRecords with the same IterableChangeRecord_.item\nclass _DuplicateItemRecordList {\n constructor() {\n /** @internal */\n this._head = null;\n /** @internal */\n this._tail = null;\n }\n /**\n * Append the record to the list of duplicates.\n *\n * Note: by design all records in the list of duplicates hold the same value in record.item.\n */\n add(record) {\n if (this._head === null) {\n this._head = this._tail = record;\n record._nextDup = null;\n record._prevDup = null;\n }\n else {\n // TODO(vicb):\n // assert(record.item == _head.item ||\n // record.item is num && record.item.isNaN && _head.item is num && _head.item.isNaN);\n this._tail._nextDup = record;\n record._prevDup = this._tail;\n record._nextDup = null;\n this._tail = record;\n }\n }\n // Returns a IterableChangeRecord_ having IterableChangeRecord_.trackById == trackById and\n // IterableChangeRecord_.currentIndex >= atOrAfterIndex\n get(trackById, atOrAfterIndex) {\n let record;\n for (record = this._head; record !== null; record = record._nextDup) {\n if ((atOrAfterIndex === null || atOrAfterIndex <= record.currentIndex) &&\n Object.is(record.trackById, trackById)) {\n return record;\n }\n }\n return null;\n }\n /**\n * Remove one {@link IterableChangeRecord_} from the list of duplicates.\n *\n * Returns whether the list of duplicates is empty.\n */\n remove(record) {\n // TODO(vicb):\n // assert(() {\n // // verify that the record being removed is in the list.\n // for (IterableChangeRecord_ cursor = _head; cursor != null; cursor = cursor._nextDup) {\n // if (identical(cursor, record)) return true;\n // }\n // return false;\n //});\n const prev = record._prevDup;\n const next = record._nextDup;\n if (prev === null) {\n this._head = next;\n }\n else {\n prev._nextDup = next;\n }\n if (next === null) {\n this._tail = prev;\n }\n else {\n next._prevDup = prev;\n }\n return this._head === null;\n }\n}\nclass _DuplicateMap {\n constructor() {\n this.map = new Map();\n }\n put(record) {\n const key = record.trackById;\n let duplicates = this.map.get(key);\n if (!duplicates) {\n duplicates = new _DuplicateItemRecordList();\n this.map.set(key, duplicates);\n }\n duplicates.add(record);\n }\n /**\n * Retrieve the `value` using key. Because the IterableChangeRecord_ value may be one which we\n * have already iterated over, we use the `atOrAfterIndex` to pretend it is not there.\n *\n * Use case: `[a, b, c, a, a]` if we are at index `3` which is the second `a` then asking if we\n * have any more `a`s needs to return the second `a`.\n */\n get(trackById, atOrAfterIndex) {\n const key = trackById;\n const recordList = this.map.get(key);\n return recordList ? recordList.get(trackById, atOrAfterIndex) : null;\n }\n /**\n * Removes a {@link IterableChangeRecord_} from the list of duplicates.\n *\n * The list of duplicates also is removed from the map if it gets empty.\n */\n remove(record) {\n const key = record.trackById;\n const recordList = this.map.get(key);\n // Remove the list of duplicates when it gets empty\n if (recordList.remove(record)) {\n this.map.delete(key);\n }\n return record;\n }\n get isEmpty() {\n return this.map.size === 0;\n }\n clear() {\n this.map.clear();\n }\n}\nfunction getPreviousIndex(item, addRemoveOffset, moveOffsets) {\n const previousIndex = item.previousIndex;\n if (previousIndex === null)\n return previousIndex;\n let moveOffset = 0;\n if (moveOffsets && previousIndex < moveOffsets.length) {\n moveOffset = moveOffsets[previousIndex];\n }\n return previousIndex + addRemoveOffset + moveOffset;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass DefaultKeyValueDifferFactory {\n constructor() { }\n supports(obj) {\n return obj instanceof Map || isJsObject(obj);\n }\n create() {\n return new DefaultKeyValueDiffer();\n }\n}\nclass DefaultKeyValueDiffer {\n constructor() {\n this._records = new Map();\n this._mapHead = null;\n // _appendAfter is used in the check loop\n this._appendAfter = null;\n this._previousMapHead = null;\n this._changesHead = null;\n this._changesTail = null;\n this._additionsHead = null;\n this._additionsTail = null;\n this._removalsHead = null;\n this._removalsTail = null;\n }\n get isDirty() {\n return this._additionsHead !== null || this._changesHead !== null ||\n this._removalsHead !== null;\n }\n forEachItem(fn) {\n let record;\n for (record = this._mapHead; record !== null; record = record._next) {\n fn(record);\n }\n }\n forEachPreviousItem(fn) {\n let record;\n for (record = this._previousMapHead; record !== null; record = record._nextPrevious) {\n fn(record);\n }\n }\n forEachChangedItem(fn) {\n let record;\n for (record = this._changesHead; record !== null; record = record._nextChanged) {\n fn(record);\n }\n }\n forEachAddedItem(fn) {\n let record;\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n fn(record);\n }\n }\n forEachRemovedItem(fn) {\n let record;\n for (record = this._removalsHead; record !== null; record = record._nextRemoved) {\n fn(record);\n }\n }\n diff(map) {\n if (!map) {\n map = new Map();\n }\n else if (!(map instanceof Map || isJsObject(map))) {\n throw new RuntimeError(900 /* RuntimeErrorCode.INVALID_DIFFER_INPUT */, ngDevMode &&\n `Error trying to diff '${stringify(map)}'. Only maps and objects are allowed`);\n }\n return this.check(map) ? this : null;\n }\n onDestroy() { }\n /**\n * Check the current state of the map vs the previous.\n * The algorithm is optimised for when the keys do no change.\n */\n check(map) {\n this._reset();\n let insertBefore = this._mapHead;\n this._appendAfter = null;\n this._forEach(map, (value, key) => {\n if (insertBefore && insertBefore.key === key) {\n this._maybeAddToChanges(insertBefore, value);\n this._appendAfter = insertBefore;\n insertBefore = insertBefore._next;\n }\n else {\n const record = this._getOrCreateRecordForKey(key, value);\n insertBefore = this._insertBeforeOrAppend(insertBefore, record);\n }\n });\n // Items remaining at the end of the list have been deleted\n if (insertBefore) {\n if (insertBefore._prev) {\n insertBefore._prev._next = null;\n }\n this._removalsHead = insertBefore;\n for (let record = insertBefore; record !== null; record = record._nextRemoved) {\n if (record === this._mapHead) {\n this._mapHead = null;\n }\n this._records.delete(record.key);\n record._nextRemoved = record._next;\n record.previousValue = record.currentValue;\n record.currentValue = null;\n record._prev = null;\n record._next = null;\n }\n }\n // Make sure tails have no next records from previous runs\n if (this._changesTail)\n this._changesTail._nextChanged = null;\n if (this._additionsTail)\n this._additionsTail._nextAdded = null;\n return this.isDirty;\n }\n /**\n * Inserts a record before `before` or append at the end of the list when `before` is null.\n *\n * Notes:\n * - This method appends at `this._appendAfter`,\n * - This method updates `this._appendAfter`,\n * - The return value is the new value for the insertion pointer.\n */\n _insertBeforeOrAppend(before, record) {\n if (before) {\n const prev = before._prev;\n record._next = before;\n record._prev = prev;\n before._prev = record;\n if (prev) {\n prev._next = record;\n }\n if (before === this._mapHead) {\n this._mapHead = record;\n }\n this._appendAfter = before;\n return before;\n }\n if (this._appendAfter) {\n this._appendAfter._next = record;\n record._prev = this._appendAfter;\n }\n else {\n this._mapHead = record;\n }\n this._appendAfter = record;\n return null;\n }\n _getOrCreateRecordForKey(key, value) {\n if (this._records.has(key)) {\n const record = this._records.get(key);\n this._maybeAddToChanges(record, value);\n const prev = record._prev;\n const next = record._next;\n if (prev) {\n prev._next = next;\n }\n if (next) {\n next._prev = prev;\n }\n record._next = null;\n record._prev = null;\n return record;\n }\n const record = new KeyValueChangeRecord_(key);\n this._records.set(key, record);\n record.currentValue = value;\n this._addToAdditions(record);\n return record;\n }\n /** @internal */\n _reset() {\n if (this.isDirty) {\n let record;\n // let `_previousMapHead` contain the state of the map before the changes\n this._previousMapHead = this._mapHead;\n for (record = this._previousMapHead; record !== null; record = record._next) {\n record._nextPrevious = record._next;\n }\n // Update `record.previousValue` with the value of the item before the changes\n // We need to update all changed items (that's those which have been added and changed)\n for (record = this._changesHead; record !== null; record = record._nextChanged) {\n record.previousValue = record.currentValue;\n }\n for (record = this._additionsHead; record != null; record = record._nextAdded) {\n record.previousValue = record.currentValue;\n }\n this._changesHead = this._changesTail = null;\n this._additionsHead = this._additionsTail = null;\n this._removalsHead = null;\n }\n }\n // Add the record or a given key to the list of changes only when the value has actually changed\n _maybeAddToChanges(record, newValue) {\n if (!Object.is(newValue, record.currentValue)) {\n record.previousValue = record.currentValue;\n record.currentValue = newValue;\n this._addToChanges(record);\n }\n }\n _addToAdditions(record) {\n if (this._additionsHead === null) {\n this._additionsHead = this._additionsTail = record;\n }\n else {\n this._additionsTail._nextAdded = record;\n this._additionsTail = record;\n }\n }\n _addToChanges(record) {\n if (this._changesHead === null) {\n this._changesHead = this._changesTail = record;\n }\n else {\n this._changesTail._nextChanged = record;\n this._changesTail = record;\n }\n }\n /** @internal */\n _forEach(obj, fn) {\n if (obj instanceof Map) {\n obj.forEach(fn);\n }\n else {\n Object.keys(obj).forEach(k => fn(obj[k], k));\n }\n }\n}\nclass KeyValueChangeRecord_ {\n constructor(key) {\n this.key = key;\n this.previousValue = null;\n this.currentValue = null;\n /** @internal */\n this._nextPrevious = null;\n /** @internal */\n this._next = null;\n /** @internal */\n this._prev = null;\n /** @internal */\n this._nextAdded = null;\n /** @internal */\n this._nextRemoved = null;\n /** @internal */\n this._nextChanged = null;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction defaultIterableDiffersFactory() {\n return new IterableDiffers([new DefaultIterableDifferFactory()]);\n}\n/**\n * A repository of different iterable diffing strategies used by NgFor, NgClass, and others.\n *\n * @publicApi\n */\nclass IterableDiffers {\n constructor(factories) {\n this.factories = factories;\n }\n static create(factories, parent) {\n if (parent != null) {\n const copied = parent.factories.slice();\n factories = factories.concat(copied);\n }\n return new IterableDiffers(factories);\n }\n /**\n * Takes an array of {@link IterableDifferFactory} and returns a provider used to extend the\n * inherited {@link IterableDiffers} instance with the provided factories and return a new\n * {@link IterableDiffers} instance.\n *\n * @usageNotes\n * ### Example\n *\n * The following example shows how to extend an existing list of factories,\n * which will only be applied to the injector for this component and its children.\n * This step is all that's required to make a new {@link IterableDiffer} available.\n *\n * ```\n * @Component({\n * viewProviders: [\n * IterableDiffers.extend([new ImmutableListDiffer()])\n * ]\n * })\n * ```\n */\n static extend(factories) {\n return {\n provide: IterableDiffers,\n useFactory: (parent) => {\n // if parent is null, it means that we are in the root injector and we have just overridden\n // the default injection mechanism for IterableDiffers, in such a case just assume\n // `defaultIterableDiffersFactory`.\n return IterableDiffers.create(factories, parent || defaultIterableDiffersFactory());\n },\n // Dependency technically isn't optional, but we can provide a better error message this way.\n deps: [[IterableDiffers, new SkipSelf(), new Optional()]]\n };\n }\n find(iterable) {\n const factory = this.factories.find(f => f.supports(iterable));\n if (factory != null) {\n return factory;\n }\n else {\n throw new RuntimeError(901 /* RuntimeErrorCode.NO_SUPPORTING_DIFFER_FACTORY */, ngDevMode &&\n `Cannot find a differ supporting object '${iterable}' of type '${getTypeNameForDebugging(iterable)}'`);\n }\n }\n}\n/** @nocollapse */\nIterableDiffers.ɵprov = ɵɵdefineInjectable({ token: IterableDiffers, providedIn: 'root', factory: defaultIterableDiffersFactory });\nfunction getTypeNameForDebugging(type) {\n return type['name'] || typeof type;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction defaultKeyValueDiffersFactory() {\n return new KeyValueDiffers([new DefaultKeyValueDifferFactory()]);\n}\n/**\n * A repository of different Map diffing strategies used by NgClass, NgStyle, and others.\n *\n * @publicApi\n */\nclass KeyValueDiffers {\n constructor(factories) {\n this.factories = factories;\n }\n static create(factories, parent) {\n if (parent) {\n const copied = parent.factories.slice();\n factories = factories.concat(copied);\n }\n return new KeyValueDiffers(factories);\n }\n /**\n * Takes an array of {@link KeyValueDifferFactory} and returns a provider used to extend the\n * inherited {@link KeyValueDiffers} instance with the provided factories and return a new\n * {@link KeyValueDiffers} instance.\n *\n * @usageNotes\n * ### Example\n *\n * The following example shows how to extend an existing list of factories,\n * which will only be applied to the injector for this component and its children.\n * This step is all that's required to make a new {@link KeyValueDiffer} available.\n *\n * ```\n * @Component({\n * viewProviders: [\n * KeyValueDiffers.extend([new ImmutableMapDiffer()])\n * ]\n * })\n * ```\n */\n static extend(factories) {\n return {\n provide: KeyValueDiffers,\n useFactory: (parent) => {\n // if parent is null, it means that we are in the root injector and we have just overridden\n // the default injection mechanism for KeyValueDiffers, in such a case just assume\n // `defaultKeyValueDiffersFactory`.\n return KeyValueDiffers.create(factories, parent || defaultKeyValueDiffersFactory());\n },\n // Dependency technically isn't optional, but we can provide a better error message this way.\n deps: [[KeyValueDiffers, new SkipSelf(), new Optional()]]\n };\n }\n find(kv) {\n const factory = this.factories.find(f => f.supports(kv));\n if (factory) {\n return factory;\n }\n throw new RuntimeError(901 /* RuntimeErrorCode.NO_SUPPORTING_DIFFER_FACTORY */, ngDevMode && `Cannot find a differ supporting object '${kv}'`);\n }\n}\n/** @nocollapse */\nKeyValueDiffers.ɵprov = ɵɵdefineInjectable({ token: KeyValueDiffers, providedIn: 'root', factory: defaultKeyValueDiffersFactory });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Structural diffing for `Object`s and `Map`s.\n */\nconst keyValDiff = [new DefaultKeyValueDifferFactory()];\n/**\n * Structural diffing for `Iterable` types such as `Array`s.\n */\nconst iterableDiff = [new DefaultIterableDifferFactory()];\nconst defaultIterableDiffers = new IterableDiffers(iterableDiff);\nconst defaultKeyValueDiffers = new KeyValueDiffers(keyValDiff);\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * This platform has to be included in any other platform\n *\n * @publicApi\n */\nconst platformCore = createPlatformFactory(null, 'core', []);\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Re-exported by `BrowserModule`, which is included automatically in the root\n * `AppModule` when you create a new app with the CLI `new` command. Eagerly injects\n * `ApplicationRef` to instantiate it.\n *\n * @publicApi\n */\nclass ApplicationModule {\n // Inject ApplicationRef to make it eager...\n constructor(appRef) { }\n}\nApplicationModule.ɵfac = function ApplicationModule_Factory(t) { return new (t || ApplicationModule)(ɵɵinject(ApplicationRef)); };\nApplicationModule.ɵmod = /*@__PURE__*/ ɵɵdefineNgModule({ type: ApplicationModule });\nApplicationModule.ɵinj = /*@__PURE__*/ ɵɵdefineInjector({});\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(ApplicationModule, [{\n type: NgModule\n }], function () { return [{ type: ApplicationRef }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Coerces a value (typically a string) to a boolean. */\nfunction coerceToBoolean(value) {\n return typeof value === 'boolean' ? value : (value != null && value !== 'false');\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// TODO(alxhub): allows tests to compile, can be removed when tests have been updated.\nconst ɵivyEnabled = true;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Compiles a partial directive declaration object into a full directive definition object.\n *\n * @codeGenApi\n */\nfunction ɵɵngDeclareDirective(decl) {\n const compiler = getCompilerFacade({ usage: 1 /* JitCompilerUsage.PartialDeclaration */, kind: 'directive', type: decl.type });\n return compiler.compileDirectiveDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵfac.js`, decl);\n}\n/**\n * Evaluates the class metadata declaration.\n *\n * @codeGenApi\n */\nfunction ɵɵngDeclareClassMetadata(decl) {\n setClassMetadata(decl.type, decl.decorators, decl.ctorParameters ?? null, decl.propDecorators ?? null);\n}\n/**\n * Compiles a partial component declaration object into a full component definition object.\n *\n * @codeGenApi\n */\nfunction ɵɵngDeclareComponent(decl) {\n const compiler = getCompilerFacade({ usage: 1 /* JitCompilerUsage.PartialDeclaration */, kind: 'component', type: decl.type });\n return compiler.compileComponentDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵcmp.js`, decl);\n}\n/**\n * Compiles a partial pipe declaration object into a full pipe definition object.\n *\n * @codeGenApi\n */\nfunction ɵɵngDeclareFactory(decl) {\n const compiler = getCompilerFacade({\n usage: 1 /* JitCompilerUsage.PartialDeclaration */,\n kind: getFactoryKind(decl.target),\n type: decl.type\n });\n return compiler.compileFactoryDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵfac.js`, decl);\n}\nfunction getFactoryKind(target) {\n switch (target) {\n case FactoryTarget.Directive:\n return 'directive';\n case FactoryTarget.Component:\n return 'component';\n case FactoryTarget.Injectable:\n return 'injectable';\n case FactoryTarget.Pipe:\n return 'pipe';\n case FactoryTarget.NgModule:\n return 'NgModule';\n }\n}\n/**\n * Compiles a partial injectable declaration object into a full injectable definition object.\n *\n * @codeGenApi\n */\nfunction ɵɵngDeclareInjectable(decl) {\n const compiler = getCompilerFacade({ usage: 1 /* JitCompilerUsage.PartialDeclaration */, kind: 'injectable', type: decl.type });\n return compiler.compileInjectableDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵprov.js`, decl);\n}\n/**\n * Compiles a partial injector declaration object into a full injector definition object.\n *\n * @codeGenApi\n */\nfunction ɵɵngDeclareInjector(decl) {\n const compiler = getCompilerFacade({ usage: 1 /* JitCompilerUsage.PartialDeclaration */, kind: 'NgModule', type: decl.type });\n return compiler.compileInjectorDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵinj.js`, decl);\n}\n/**\n * Compiles a partial NgModule declaration object into a full NgModule definition object.\n *\n * @codeGenApi\n */\nfunction ɵɵngDeclareNgModule(decl) {\n const compiler = getCompilerFacade({ usage: 1 /* JitCompilerUsage.PartialDeclaration */, kind: 'NgModule', type: decl.type });\n return compiler.compileNgModuleDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵmod.js`, decl);\n}\n/**\n * Compiles a partial pipe declaration object into a full pipe definition object.\n *\n * @codeGenApi\n */\nfunction ɵɵngDeclarePipe(decl) {\n const compiler = getCompilerFacade({ usage: 1 /* JitCompilerUsage.PartialDeclaration */, kind: 'pipe', type: decl.type });\n return compiler.compilePipeDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵpipe.js`, decl);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// clang-format on\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Creates a `ComponentRef` instance based on provided component type and a set of options.\n *\n * @usageNotes\n *\n * The example below demonstrates how the `createComponent` function can be used\n * to create an instance of a ComponentRef dynamically and attach it to an ApplicationRef,\n * so that it gets included into change detection cycles.\n *\n * Note: the example uses standalone components, but the function can also be used for\n * non-standalone components (declared in an NgModule) as well.\n *\n * ```typescript\n * @Component({\n * standalone: true,\n * template: `Hello {{ name }}!`\n * })\n * class HelloComponent {\n * name = 'Angular';\n * }\n *\n * @Component({\n * standalone: true,\n * template: `<div id=\"hello-component-host\"></div>`\n * })\n * class RootComponent {}\n *\n * // Bootstrap an application.\n * const applicationRef = await bootstrapApplication(RootComponent);\n *\n * // Locate a DOM node that would be used as a host.\n * const host = document.getElementById('hello-component-host');\n *\n * // Get an `EnvironmentInjector` instance from the `ApplicationRef`.\n * const environmentInjector = applicationRef.injector;\n *\n * // We can now create a `ComponentRef` instance.\n * const componentRef = createComponent(HelloComponent, {host, environmentInjector});\n *\n * // Last step is to register the newly created ref using the `ApplicationRef` instance\n * // to include the component view into change detection cycles.\n * applicationRef.attachView(componentRef.hostView);\n * ```\n *\n * @param component Component class reference.\n * @param options Set of options to use:\n * * `environmentInjector`: An `EnvironmentInjector` instance to be used for the component, see\n * additional info about it at https://angular.io/guide/standalone-components#environment-injectors.\n * * `hostElement` (optional): A DOM node that should act as a host node for the component. If not\n * provided, Angular creates one based on the tag name used in the component selector (and falls\n * back to using `div` if selector doesn't have tag name info).\n * * `elementInjector` (optional): An `ElementInjector` instance, see additional info about it at\n * https://angular.io/guide/hierarchical-dependency-injection#elementinjector.\n * * `projectableNodes` (optional): A list of DOM nodes that should be projected through\n * [`<ng-content>`](api/core/ng-content) of the new component instance.\n * @returns ComponentRef instance that represents a given Component.\n *\n * @publicApi\n */\nfunction createComponent(component, options) {\n ngDevMode && assertComponentDef(component);\n const componentDef = getComponentDef(component);\n const elementInjector = options.elementInjector || getNullInjector();\n const factory = new ComponentFactory(componentDef);\n return factory.create(elementInjector, options.projectableNodes, options.hostElement, options.environmentInjector);\n}\n/**\n * Creates an object that allows to retrieve component metadata.\n *\n * @usageNotes\n *\n * The example below demonstrates how to use the function and how the fields\n * of the returned object map to the component metadata.\n *\n * ```typescript\n * @Component({\n * standalone: true,\n * selector: 'foo-component',\n * template: `\n * <ng-content></ng-content>\n * <ng-content select=\"content-selector-a\"></ng-content>\n * `,\n * })\n * class FooComponent {\n * @Input('inputName') inputPropName: string;\n * @Output('outputName') outputPropName = new EventEmitter<void>();\n * }\n *\n * const mirror = reflectComponentType(FooComponent);\n * expect(mirror.type).toBe(FooComponent);\n * expect(mirror.selector).toBe('foo-component');\n * expect(mirror.isStandalone).toBe(true);\n * expect(mirror.inputs).toEqual([{propName: 'inputName', templateName: 'inputPropName'}]);\n * expect(mirror.outputs).toEqual([{propName: 'outputName', templateName: 'outputPropName'}]);\n * expect(mirror.ngContentSelectors).toEqual([\n * '*', // first `<ng-content>` in a template, the selector defaults to `*`\n * 'content-selector-a' // second `<ng-content>` in a template\n * ]);\n * ```\n *\n * @param component Component class reference.\n * @returns An object that allows to retrieve component metadata.\n *\n * @publicApi\n */\nfunction reflectComponentType(component) {\n const componentDef = getComponentDef(component);\n if (!componentDef)\n return null;\n const factory = new ComponentFactory(componentDef);\n return {\n get selector() {\n return factory.selector;\n },\n get type() {\n return factory.componentType;\n },\n get inputs() {\n return factory.inputs;\n },\n get outputs() {\n return factory.outputs;\n },\n get ngContentSelectors() {\n return factory.ngContentSelectors;\n },\n get isStandalone() {\n return componentDef.standalone;\n },\n };\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nif (typeof ngDevMode !== 'undefined' && ngDevMode) {\n // This helper is to give a reasonable error message to people upgrading to v9 that have not yet\n // installed `@angular/localize` in their app.\n // tslint:disable-next-line: no-toplevel-property-access\n _global.$localize = _global.$localize || function () {\n throw new Error('It looks like your application or one of its dependencies is using i18n.\\n' +\n 'Angular 9 introduced a global `$localize()` function that needs to be loaded.\\n' +\n 'Please run `ng add @angular/localize` from the Angular CLI.\\n' +\n '(For non-CLI projects, add `import \\'@angular/localize/init\\';` to your `polyfills.ts` file.\\n' +\n 'For server-side rendering applications add the import to your `main.server.ts` file.)');\n };\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { ANALYZE_FOR_ENTRY_COMPONENTS, ANIMATION_MODULE_TYPE, APP_BOOTSTRAP_LISTENER, APP_ID, APP_INITIALIZER, ApplicationInitStatus, ApplicationModule, ApplicationRef, Attribute, COMPILER_OPTIONS, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, ChangeDetectorRef, Compiler, CompilerFactory, Component, ComponentFactory$1 as ComponentFactory, ComponentFactoryResolver$1 as ComponentFactoryResolver, ComponentRef$1 as ComponentRef, ContentChild, ContentChildren, DEFAULT_CURRENCY_CODE, DebugElement, DebugEventListener, DebugNode, DefaultIterableDiffer, Directive, ENVIRONMENT_INITIALIZER, ElementRef, EmbeddedViewRef, EnvironmentInjector, ErrorHandler, EventEmitter, Host, HostBinding, HostListener, INJECTOR, Inject, InjectFlags, Injectable, InjectionToken, Injector, Input, IterableDiffers, KeyValueDiffers, LOCALE_ID, MissingTranslationStrategy, ModuleWithComponentFactories, NO_ERRORS_SCHEMA, NgModule, NgModuleFactory$1 as NgModuleFactory, NgModuleRef$1 as NgModuleRef, NgProbeToken, NgZone, Optional, Output, PACKAGE_ROOT_URL, PLATFORM_ID, PLATFORM_INITIALIZER, Pipe, PlatformRef, Query, QueryList, ReflectiveInjector, ReflectiveKey, Renderer2, RendererFactory2, RendererStyleFlags2, ResolvedReflectiveFactory, Sanitizer, SecurityContext, Self, SimpleChange, SkipSelf, TRANSLATIONS, TRANSLATIONS_FORMAT, TemplateRef, Testability, TestabilityRegistry, Type, VERSION, Version, ViewChild, ViewChildren, ViewContainerRef, ViewEncapsulation$1 as ViewEncapsulation, ViewRef, asNativeElements, assertPlatform, createComponent, createEnvironmentInjector, createNgModule, createNgModuleRef, createPlatform, createPlatformFactory, defineInjectable, destroyPlatform, enableProdMode, forwardRef, getDebugNode, getModuleFactory, getNgModuleById, getPlatform, importProvidersFrom, inject, isDevMode, makeEnvironmentProviders, platformCore, reflectComponentType, resolveForwardRef, setTestabilityGetter, ALLOW_MULTIPLE_PLATFORMS as ɵALLOW_MULTIPLE_PLATFORMS, APP_ID_RANDOM_PROVIDER as ɵAPP_ID_RANDOM_PROVIDER, ChangeDetectorStatus as ɵChangeDetectorStatus, ComponentFactory$1 as ɵComponentFactory, Console as ɵConsole, DEFAULT_LOCALE_ID as ɵDEFAULT_LOCALE_ID, INJECTOR_SCOPE as ɵINJECTOR_SCOPE, LContext as ɵLContext, LifecycleHooksFeature as ɵLifecycleHooksFeature, LocaleDataIndex as ɵLocaleDataIndex, NG_COMP_DEF as ɵNG_COMP_DEF, NG_DIR_DEF as ɵNG_DIR_DEF, NG_ELEMENT_ID as ɵNG_ELEMENT_ID, NG_INJ_DEF as ɵNG_INJ_DEF, NG_MOD_DEF as ɵNG_MOD_DEF, NG_PIPE_DEF as ɵNG_PIPE_DEF, NG_PROV_DEF as ɵNG_PROV_DEF, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, NO_CHANGE as ɵNO_CHANGE, NgModuleFactory as ɵNgModuleFactory, NoopNgZone as ɵNoopNgZone, ReflectionCapabilities as ɵReflectionCapabilities, ComponentFactory as ɵRender3ComponentFactory, ComponentRef as ɵRender3ComponentRef, NgModuleRef as ɵRender3NgModuleRef, RuntimeError as ɵRuntimeError, TESTABILITY as ɵTESTABILITY, TESTABILITY_GETTER as ɵTESTABILITY_GETTER, ViewRef$1 as ɵViewRef, XSS_SECURITY_URL as ɵXSS_SECURITY_URL, _sanitizeHtml as ɵ_sanitizeHtml, _sanitizeUrl as ɵ_sanitizeUrl, allowSanitizationBypassAndThrow as ɵallowSanitizationBypassAndThrow, bypassSanitizationTrustHtml as ɵbypassSanitizationTrustHtml, bypassSanitizationTrustResourceUrl as ɵbypassSanitizationTrustResourceUrl, bypassSanitizationTrustScript as ɵbypassSanitizationTrustScript, bypassSanitizationTrustStyle as ɵbypassSanitizationTrustStyle, bypassSanitizationTrustUrl as ɵbypassSanitizationTrustUrl, clearResolutionOfComponentResourcesQueue as ɵclearResolutionOfComponentResourcesQueue, coerceToBoolean as ɵcoerceToBoolean, compileComponent as ɵcompileComponent, compileDirective as ɵcompileDirective, compileNgModule as ɵcompileNgModule, compileNgModuleDefs as ɵcompileNgModuleDefs, compileNgModuleFactory as ɵcompileNgModuleFactory, compilePipe as ɵcompilePipe, convertToBitFlags as ɵconvertToBitFlags, createInjector as ɵcreateInjector, defaultIterableDiffers as ɵdefaultIterableDiffers, defaultKeyValueDiffers as ɵdefaultKeyValueDiffers, detectChanges as ɵdetectChanges, devModeEqual as ɵdevModeEqual, findLocaleData as ɵfindLocaleData, flushModuleScopingQueueAsMuchAsPossible as ɵflushModuleScopingQueueAsMuchAsPossible, formatRuntimeError as ɵformatRuntimeError, getDebugNode as ɵgetDebugNode, getDebugNodeR2 as ɵgetDebugNodeR2, getDirectives as ɵgetDirectives, getHostElement as ɵgetHostElement, getInjectableDef as ɵgetInjectableDef, getLContext as ɵgetLContext, getLocaleCurrencyCode as ɵgetLocaleCurrencyCode, getLocalePluralCase as ɵgetLocalePluralCase, getSanitizationBypassType as ɵgetSanitizationBypassType, ɵgetUnknownElementStrictMode, ɵgetUnknownPropertyStrictMode, _global as ɵglobal, injectChangeDetectorRef as ɵinjectChangeDetectorRef, internalCreateApplication as ɵinternalCreateApplication, isBoundToModule as ɵisBoundToModule, isDefaultChangeDetectionStrategy as ɵisDefaultChangeDetectionStrategy, isEnvironmentProviders as ɵisEnvironmentProviders, isInjectable as ɵisInjectable, isListLikeIterable as ɵisListLikeIterable, isObservable as ɵisObservable, isPromise as ɵisPromise, isStandalone as ɵisStandalone, isSubscribable as ɵisSubscribable, ɵivyEnabled, makeDecorator as ɵmakeDecorator, noSideEffects as ɵnoSideEffects, patchComponentDefWithScope as ɵpatchComponentDefWithScope, publishDefaultGlobalUtils$1 as ɵpublishDefaultGlobalUtils, publishGlobalUtil as ɵpublishGlobalUtil, registerLocaleData as ɵregisterLocaleData, resetCompiledComponents as ɵresetCompiledComponents, resetJitOptions as ɵresetJitOptions, resolveComponentResources as ɵresolveComponentResources, setAllowDuplicateNgModuleIdsForTest as ɵsetAllowDuplicateNgModuleIdsForTest, setClassMetadata as ɵsetClassMetadata, setCurrentInjector as ɵsetCurrentInjector, setDocument as ɵsetDocument, setLocaleId as ɵsetLocaleId, ɵsetUnknownElementStrictMode, ɵsetUnknownPropertyStrictMode, store as ɵstore, stringify as ɵstringify, transitiveScopesFor as ɵtransitiveScopesFor, unregisterAllLocaleData as ɵunregisterLocaleData, unwrapSafeValue as ɵunwrapSafeValue, ɵɵCopyDefinitionFeature, FactoryTarget as ɵɵFactoryTarget, ɵɵHostDirectivesFeature, ɵɵInheritDefinitionFeature, ɵɵNgOnChangesFeature, ɵɵProvidersFeature, ɵɵStandaloneFeature, ɵɵadvance, ɵɵattribute, ɵɵattributeInterpolate1, ɵɵattributeInterpolate2, ɵɵattributeInterpolate3, ɵɵattributeInterpolate4, ɵɵattributeInterpolate5, ɵɵattributeInterpolate6, ɵɵattributeInterpolate7, ɵɵattributeInterpolate8, ɵɵattributeInterpolateV, ɵɵclassMap, ɵɵclassMapInterpolate1, ɵɵclassMapInterpolate2, ɵɵclassMapInterpolate3, ɵɵclassMapInterpolate4, ɵɵclassMapInterpolate5, ɵɵclassMapInterpolate6, ɵɵclassMapInterpolate7, ɵɵclassMapInterpolate8, ɵɵclassMapInterpolateV, ɵɵclassProp, ɵɵcontentQuery, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefineInjectable, ɵɵdefineInjector, ɵɵdefineNgModule, ɵɵdefinePipe, ɵɵdirectiveInject, ɵɵdisableBindings, ɵɵelement, ɵɵelementContainer, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementStart, ɵɵenableBindings, ɵɵgetCurrentView, ɵɵgetInheritedFactory, ɵɵhostProperty, ɵɵi18n, ɵɵi18nApply, ɵɵi18nAttributes, ɵɵi18nEnd, ɵɵi18nExp, ɵɵi18nPostprocess, ɵɵi18nStart, ɵɵinject, ɵɵinjectAttribute, ɵɵinvalidFactory, ɵɵinvalidFactoryDep, ɵɵlistener, ɵɵloadQuery, ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG, ɵɵnextContext, ɵɵngDeclareClassMetadata, ɵɵngDeclareComponent, ɵɵngDeclareDirective, ɵɵngDeclareFactory, ɵɵngDeclareInjectable, ɵɵngDeclareInjector, ɵɵngDeclareNgModule, ɵɵngDeclarePipe, ɵɵpipe, ɵɵpipeBind1, ɵɵpipeBind2, ɵɵpipeBind3, ɵɵpipeBind4, ɵɵpipeBindV, ɵɵprojection, ɵɵprojectionDef, ɵɵproperty, ɵɵpropertyInterpolate, ɵɵpropertyInterpolate1, ɵɵpropertyInterpolate2, ɵɵpropertyInterpolate3, ɵɵpropertyInterpolate4, ɵɵpropertyInterpolate5, ɵɵpropertyInterpolate6, ɵɵpropertyInterpolate7, ɵɵpropertyInterpolate8, ɵɵpropertyInterpolateV, ɵɵpureFunction0, ɵɵpureFunction1, ɵɵpureFunction2, ɵɵpureFunction3, ɵɵpureFunction4, ɵɵpureFunction5, ɵɵpureFunction6, ɵɵpureFunction7, ɵɵpureFunction8, ɵɵpureFunctionV, ɵɵqueryRefresh, ɵɵreference, registerNgModuleType as ɵɵregisterNgModuleType, ɵɵresetView, ɵɵresolveBody, ɵɵresolveDocument, ɵɵresolveWindow, ɵɵrestoreView, ɵɵsanitizeHtml, ɵɵsanitizeResourceUrl, ɵɵsanitizeScript, ɵɵsanitizeStyle, ɵɵsanitizeUrl, ɵɵsanitizeUrlOrResourceUrl, ɵɵsetComponentScope, ɵɵsetNgModuleScope, ɵɵstyleMap, ɵɵstyleMapInterpolate1, ɵɵstyleMapInterpolate2, ɵɵstyleMapInterpolate3, ɵɵstyleMapInterpolate4, ɵɵstyleMapInterpolate5, ɵɵstyleMapInterpolate6, ɵɵstyleMapInterpolate7, ɵɵstyleMapInterpolate8, ɵɵstyleMapInterpolateV, ɵɵstyleProp, ɵɵstylePropInterpolate1, ɵɵstylePropInterpolate2, ɵɵstylePropInterpolate3, ɵɵstylePropInterpolate4, ɵɵstylePropInterpolate5, ɵɵstylePropInterpolate6, ɵɵstylePropInterpolate7, ɵɵstylePropInterpolate8, ɵɵstylePropInterpolateV, ɵɵsyntheticHostListener, ɵɵsyntheticHostProperty, ɵɵtemplate, ɵɵtemplateRefExtractor, ɵɵtext, ɵɵtextInterpolate, ɵɵtextInterpolate1, ɵɵtextInterpolate2, ɵɵtextInterpolate3, ɵɵtextInterpolate4, ɵɵtextInterpolate5, ɵɵtextInterpolate6, ɵɵtextInterpolate7, ɵɵtextInterpolate8, ɵɵtextInterpolateV, ɵɵtrustConstantHtml, ɵɵtrustConstantResourceUrl, ɵɵvalidateIframeAttribute, ɵɵviewQuery };\n","<div class=\"content-layout\" [brightsideWebFb]=\"config.analyticsAttributes()\">\n <bw-action-article>\n <ui-nav-exit-back\n *ngIf=\"questionIndex !== 0 || canBackOut\"\n back-action-bottom\n [trackingDetail]=\"{ event_name: config.fbEventName }\"\n (exitActionHandler)=\"handleBackClick()\"\n ></ui-nav-exit-back>\n\n <div header-title style=\"flex-direction: column\">\n <typography text-medium-regular *ngIf=\"questions.length > 1\">\n <p class=\"secondary-text mb-sm\">{{ 'SURVEY_QUESTION_NUMBER_WEB' | translate:{numberOne:questionIndex + 1,numberTwo:questions.length} }}</p>\n </typography>\n <typography title-medium [ngClass]=\"{ 'mb-md': !isChoiceMulti, 'mb-xs': isChoiceMulti }\">{{\n currentQuestion.field_label | translate\n }}</typography>\n </div>\n\n <div content-section>\n <form [formGroup]=\"questionForm\">\n <typography text-medium-regular *ngIf=\"isChoiceMulti\">\n <p *ngIf=\"currentQuestion.instructions_copy\" class=\"secondary-text mb-md\">\n {{ currentQuestion.instructions_copy | translate }}\n </p>\n <p *ngIf=\"!currentQuestion\" class=\"secondary-text mb-md\">\n >\n {{ 'SURVEY_INSTRUCTIONS_TOPICS' | translate }}\n </p>\n </typography>\n\n <ng-container *ngIf=\"currentQuestion.id\">\n <div *ngFor=\"let _ of currentQuestion.choices; let i = index\" class=\"mb-sm\">\n <bw-radio\n *ngIf=\"!isChoiceMulti; else checkboxTemplate\"\n name=\"questionAnswer\"\n formControlName=\"questionAnswer\"\n [value]=\"currentQuestion.choices[i]\"\n [label]=\"currentQuestion.choices[i] | translate\"\n (radioClick)=\"checkAndToggleOtherRadio(i, currentQuestion.choices[i])\"\n ></bw-radio>\n\n <ng-template #checkboxTemplate>\n <bw-checkbox\n [id]=\"currentQuestion.choices[i].replace('&', '').split(' ').join('-').toLowerCase()\"\n formControlName=\"questionAnswer\"\n (checkboxChanged)=\"\n checkAndToggleOtherBox(i, currentQuestion.choices[i]); handleCheckboxChanged($event, currentQuestion.choices[i])\n \"\n >\n <typography text-large-regular color=\"var(--primary-text)\">\n {{ currentQuestion.choices[i] | translate }}</typography\n >\n </bw-checkbox>\n </ng-template>\n\n <div style=\"margin-top: 8px; margin-left: 42px\" *ngIf=\"otherAnswerShowIndexes.includes(i)\">\n <typography text-small-semibold>\n <p class=\"secondary-text\">{{ 'PLEASE_SPECIFY' | translate }}</p>\n </typography>\n\n <bw-input formControlName=\"questionAnswerOther\" placeholder=\"-\"></bw-input>\n </div>\n </div>\n </ng-container>\n </form>\n </div>\n\n <div footer-actions class=\"flex-row flex-item-flexible space-between\">\n <div></div>\n <div class=\"flex-row row-reverse\">\n <button\n *ngIf=\"config.pageCtaLabel\"\n bw-button\n [brightsideWebFb]=\"{ event_name: config.fbEventName }\"\n [disabled]=\"isChoiceMulti ? multiAnswerPlaceholder.length === 0 : questionForm.invalid\"\n [processing]=\"processing\"\n (click)=\"handleCtaClick()\"\n >\n {{ config.pageCtaLabel | translate }}\n </button>\n\n <typography text-large-semibold>\n <a\n *ngIf=\"questionIsSkippable\"\n bw-anchor\n class=\"bs-blue mr-sm\"\n (click)=\"handleSecondaryCtaClick()\"\n [brightsideWebFb]=\"{ event_name: config.fbEventName }\"\n [secondaryCta]=\"true\"\n >{{ config.pageSecondaryCtaLabel | translate }}</a\n >\n </typography>\n </div>\n </div>\n </bw-action-article>\n</div>\n","import {Component, Input, Output, OnInit, EventEmitter, ElementRef} from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\nimport { RoutingStateService } from '@brightside/brightside-ui-services';\nimport {\n FlowManagerService,\n OnboardingSurveyStep,\n} from '@brightside-web/desktop/data-access/onboarding';\n\nimport {Question, QuestionsSettings, QuestionType} from '@brightside-web/desktop/data-access/shared';\n\n\n@Component({\n selector: 'brightside-web-display-questions',\n templateUrl: './display-questions.component.html',\n})\nexport class DisplayQuestionsComponent implements OnInit {\n /**\n * this isn't super reusable right now. a new object would have to be setup to support reusing this somewhere else.\n */\n @Input() overrideData: OnboardingSurveyStep;\n\n @Output() answersSubmitted = new EventEmitter();\n\n @Input() canBackOut = false;\n\n config: QuestionsSettings = new QuestionsSettings({\n fbPage: 'page',\n fbCategory: 'consents',\n\n pageTitle: '',\n pageSubTitle: '',\n pageCtaLabel: 'BUTTON_CONTINUE',\n pageSecondaryCtaLabel: '',\n\n pageOnForwardCtaPath: [],\n\n questions: [],\n surveyType: '',\n fbEventName: ''\n });\n\n questionForm: FormGroup = this.formBuilder.group({});\n questionIndex = 0;\n questionAnswers: { id: string; entered_value: string }[] = [];\n\n multiAnswerPlaceholder: string[] = [];\n otherAnswerShowIndexes: number[] = [];\n\n processing: boolean;\n\n constructor(\n private routingState: RoutingStateService,\n private activatedRoute: ActivatedRoute,\n private formBuilder: FormBuilder,\n private flowManageService: FlowManagerService,\n private elem: ElementRef\n ) {}\n\n ngOnInit(): void {\n this.checkForConfigViaData();\n\n this.questionForm = this.formBuilder.group({\n questionAnswer: ['', [Validators.required]],\n questionAnswerOther: ['', []],\n });\n\n }\n\n get isChoiceMulti() {\n return this.currentQuestion.field_type === QuestionType.CHOICE_MULTI;\n }\n\n get blankQuestion(): Question {\n return {\n id: '',\n choices: [],\n field_label: '',\n field_type: QuestionType.CHOICE,\n questionOrder: 0,\n style: {},\n };\n }\n\n get questions() {\n return this.config.questions;\n }\n\n get currentQuestion(): Question {\n if (!this.questions) {\n return this.blankQuestion;\n }\n\n return this.questions[this.questionIndex];\n }\n\n get questionIsSkippable() {\n if (this.currentQuestion.style.isSkippable === false) {\n this.config.pageSecondaryCtaLabel = '';\n return false;\n } else if (\n Object.keys(this.currentQuestion.style).length === 0 ||\n this.currentQuestion.style.isSkippable ||\n this.config.pageSecondaryCtaLabel !== ''\n ) {\n this.config.pageSecondaryCtaLabel = 'BUTTON_SKIP';\n return true;\n }\n\n return false;\n }\n\n private checkForConfigViaData() {\n //First check for override data\n if (this.overrideData && this.overrideData.questionSettings) {\n this.config = new QuestionsSettings(this.overrideData.questionSettings);\n\n this.config.fbEventName = `${this.config.fbPage} ${this.config.fbCategory}`;\n return;\n }\n\n if (this.activatedRoute?.snapshot?.data?.pageConfig) {\n\n this.config = new QuestionsSettings(this.activatedRoute.snapshot.data.pageConfig);\n }\n }\n\n private buildAnswer(value: string) {\n return {\n id: this.currentQuestion.id,\n entered_value: value,\n };\n }\n\n private buildSkippedAnswer() {\n this.questionAnswers.push(this.buildAnswer('SKIPPED'));\n }\n\n private buildChoiceAnswer() {\n const questionAnswerFormItem = this.questionForm.get('questionAnswer');\n const questionAnswerOther = this.questionForm.get('questionAnswerOther');\n\n if (questionAnswerFormItem) {\n //Push the selected answer up\n if (questionAnswerFormItem?.value === 'Other') {\n this.questionAnswers.push(this.buildAnswer(`${questionAnswerFormItem.value}: ${questionAnswerOther?.value}`));\n } else {\n this.questionAnswers.push(this.buildAnswer(questionAnswerFormItem.value));\n }\n\n questionAnswerFormItem.setValue('');\n questionAnswerOther?.setValue('');\n }\n }\n\n private buildChoiceMultiAnswer() {\n\n const questionAnswerOther = this.questionForm.get('questionAnswerOther');\n const answerString = this.multiAnswerPlaceholder\n .map((answer) => (answer === 'Other' ? `Other: ${questionAnswerOther?.value}` : answer))\n .join(';');\n if (!answerString) {\n //ToDo: Question - Should we show error?\n return;\n }\n\n //Push the selected answer up\n this.questionAnswers.push(this.buildAnswer(answerString));\n this.multiAnswerPlaceholder = [];\n\n }\n\n private handlePrevQuestion() {\n const questionAnswers = {...this.questionAnswers}[0].entered_value.split(';');\n this.questionAnswers.pop();\n this.questionIndex -= 1;\n\n if (this.isChoiceMulti) {\n // this is not too pretty, maybe bw-checkbox should accept new input for \"selected\" so we can just test against title in array\n if (questionAnswers[0].toLowerCase() !== \"skipped\") {\n questionAnswers.forEach(choice => {\n const choiceId = '#' + choice.replace('&', '').split(' ').join('-').toLowerCase();\n setTimeout(() => {\n const element = this.elem.nativeElement.querySelector(choiceId);\n if (element) {\n element.querySelector('input').click();\n }\n }, 0);\n });\n } else {\n this.multiAnswerPlaceholder = [];\n }\n }\n }\n\n private handleNextQuestion() {\n // Check if we got to last question\n if (!this.questions[this.questionIndex + 1]) {\n this.handleSubmitQuestions();\n return;\n }\n\n // Log answer response and move to next question\n this.questionIndex += 1;\n this.questionForm.reset();\n }\n\n private handleSubmitQuestions() {\n const onSuccess = () => {\n this.answersSubmitted.emit();\n };\n const onFailure = () => {};\n\n this.flowManageService\n .updateWithPost({ type: this.config.surveyType, answers: this.questionAnswers })\n .subscribe(onSuccess, onFailure);\n }\n\n handleMoveForward() {\n this.routingState.popAndNavigateTo(this.config.pageOnForwardCtaPath);\n }\n\n checkAndToggleOtherRadio(index: number, value: string) {\n const isOther = value.toLowerCase().startsWith('other');\n const isAlreadyShowing = this.otherAnswerShowIndexes.includes(index);\n\n //If it's not other or is other and already showing we clear it\n if (!isOther || (isOther && isAlreadyShowing)) {\n this.otherAnswerShowIndexes = [];\n return;\n }\n\n this.otherAnswerShowIndexes.push(index);\n }\n\n checkAndToggleOtherBox(index: number, value: string) {\n const isOther = value.toLowerCase().startsWith('other');\n const isAlreadyShowing = this.otherAnswerShowIndexes.includes(index);\n\n if (!isOther) {\n return;\n }\n\n if (!isAlreadyShowing) {\n this.otherAnswerShowIndexes.push(index);\n return;\n }\n\n delete this.otherAnswerShowIndexes[this.otherAnswerShowIndexes.indexOf(index)];\n }\n\n handleCheckboxChanged(evt: any, value: string) {\n if (evt) {\n this.multiAnswerPlaceholder.push(value);\n } else {\n delete this.multiAnswerPlaceholder[this.multiAnswerPlaceholder.indexOf(value)];\n }\n\n // Filter out bad values\n this.multiAnswerPlaceholder = this.multiAnswerPlaceholder.filter((filterThisValue) => filterThisValue);\n }\n\n handleBackClick() {\n if (!this.questionIndex) {\n return true;\n }\n\n this.handlePrevQuestion();\n return false;\n }\n\n handleCtaClick() {\n\n\n\n switch (this.currentQuestion.field_type) {\n case QuestionType.CHOICE_MULTI:\n this.buildChoiceMultiAnswer();\n break;\n\n default:\n this.buildChoiceAnswer();\n break;\n }\n\n this.handleNextQuestion();\n }\n\n handleSecondaryCtaClick() {\n this.buildSkippedAnswer();\n this.handleNextQuestion();\n }\n}\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","//! moment.js locale configuration\n//! locale : Spanish (United States) [es-us]\n//! author : bustta : https://github.com/bustta\n//! author : chrisrodz : https://github.com/chrisrodz\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsShortDot =\n 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(\n '_'\n ),\n monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n monthsParse = [\n /^ene/i,\n /^feb/i,\n /^mar/i,\n /^abr/i,\n /^may/i,\n /^jun/i,\n /^jul/i,\n /^ago/i,\n /^sep/i,\n /^oct/i,\n /^nov/i,\n /^dic/i,\n ],\n monthsRegex =\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n var esUs = moment.defineLocale('es-us', {\n months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(\n '_'\n ),\n monthsShort: function (m, format) {\n if (!m) {\n return monthsShortDot;\n } else if (/-MMM-/.test(format)) {\n return monthsShort[m.month()];\n } else {\n return monthsShortDot[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex:\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n monthsShortStrictRegex:\n /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'MM/DD/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY h:mm A',\n LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',\n },\n calendar: {\n sameDay: function () {\n return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextDay: function () {\n return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextWeek: function () {\n return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastDay: function () {\n return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastWeek: function () {\n return (\n '[el] dddd [pasado a la' +\n (this.hours() !== 1 ? 's' : '') +\n '] LT'\n );\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'en %s',\n past: 'hace %s',\n s: 'unos segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'una hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n w: 'una semana',\n ww: '%d semanas',\n M: 'un mes',\n MM: '%d meses',\n y: 'un año',\n yy: '%d años',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\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 });\n\n return esUs;\n\n})));\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n OnInit,\n OnDestroy,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { BsHubService } from '@brightside-web/desktop/data-access/core-services';\n\nimport { UiBaseDataMoleculeComponent, UiBaseDataMoleculeSchema } from '../../../shared/base-data/base-data-molecule.component';\n\nimport { UiNavigationExitType } from '../../navigation.enum';\nimport { UiNavigationExitData } from '../../navigation.interface';\n\n@Component({\n selector: 'ui-nav-exit-close',\n templateUrl: './exit-close.component.html',\n styleUrls: ['./exit-close.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class UiNavigationExitCloseComponent\n extends UiBaseDataMoleculeComponent\n implements UiBaseDataMoleculeSchema, OnInit, OnDestroy\n{\n /**\n * Allow developer to pass in data with an object\n *\n * Interface UiFooterDefaultData\n */\n @Input() override data: UiNavigationExitData;\n\n /**\n * Allow developer to pass in data single fields at a time\n */\n @Input() infoLabel = 'BACK_WEB';\n @Input() trackingDetail: { event_name: string } = { event_name: 'missing_event_name_nav_exit' };\n @Input() type: UiNavigationExitType;\n\n /**\n * Please set this to true to skip emitting on exit action\n */\n @Input() skipActionEmit = false;\n\n @Output() exitActionHandler = new EventEmitter();\n\n exitTypeEnum = UiNavigationExitType;\n\n constructor(\n private bsHubService: BsHubService\n ) {\n super();\n }\n\n ngOnInit(): void {\n this.schemaValidationConfig = {\n directInputValues: [this.infoLabel],\n };\n\n super.ngOnInit();\n }\n\n ngOnDestroy(): void {\n this.exitActionHandler.unsubscribe();\n }\n\n public override uiOnDirectInputsFromDataObject(): void {\n this.infoLabel = this.data?.inputs?.infoLabel || this.infoLabel || 'BACK_WEB';\n\n this.trackingDetail = this.data?.inputs?.trackingDetail ||\n this.trackingDetail || { event_name: 'missing_event_name_nav_exit' };\n this.type = this.data?.inputs?.type || this.type || UiNavigationExitType.NONE;\n }\n\n public exitActionTrigger() {\n console.log('this.skipActionEmit', this.skipActionEmit);\n\n /**\n * If we are NOT skipping emitting and we have observer, trigger .emit\n */\n if (!this.skipActionEmit && this.exitActionHandler.observers.length > 0) {\n this.exitActionHandler.emit();\n this.logForDebugging('Emit done on exit action instead of default');\n return;\n }\n\n this.bsHubService.dispatch('RoutingServiceChannel', { event: 'EXIT_PAGE', data: { fromClose: true } });\n }\n}\n","<bw-icon color=\"var(--secondary-text)\" iconName=\"close\" [dismissedCta]=\"true\" [coreTracking]=\"trackingDetail\" (click)=\"exitActionTrigger()\"></bw-icon>\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nexport const defaultThrottleConfig = {\n leading: true,\n trailing: false,\n};\nexport function throttle(durationSelector, config = defaultThrottleConfig) {\n return operate((source, subscriber) => {\n const { leading, trailing } = config;\n let hasValue = false;\n let sendValue = null;\n let throttled = null;\n let isComplete = false;\n const endThrottling = () => {\n throttled === null || throttled === void 0 ? void 0 : throttled.unsubscribe();\n throttled = null;\n if (trailing) {\n send();\n isComplete && subscriber.complete();\n }\n };\n const cleanupThrottling = () => {\n throttled = null;\n isComplete && subscriber.complete();\n };\n const startThrottle = (value) => (throttled = innerFrom(durationSelector(value)).subscribe(createOperatorSubscriber(subscriber, endThrottling, cleanupThrottling)));\n const send = () => {\n if (hasValue) {\n hasValue = false;\n const value = sendValue;\n sendValue = null;\n subscriber.next(value);\n !isComplete && startThrottle(value);\n }\n };\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n hasValue = true;\n sendValue = value;\n !(throttled && !throttled.closed) && (leading ? send() : startThrottle(value));\n }, () => {\n isComplete = true;\n !(trailing && hasValue && throttled && !throttled.closed) && subscriber.complete();\n }));\n });\n}\n","import { asyncScheduler } from '../scheduler/async';\nimport { defaultThrottleConfig, throttle } from './throttle';\nimport { timer } from '../observable/timer';\nexport function throttleTime(duration, scheduler = asyncScheduler, config = defaultThrottleConfig) {\n const duration$ = timer(duration, scheduler);\n return throttle(() => duration$, config);\n}\n","//! moment.js locale configuration\n//! locale : siSwati [ss]\n//! author : Nicolai Davies<mail@nicolai.io> : https://github.com/nicolaidavies\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ss = moment.defineLocale('ss', {\n months: \"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni\".split(\n '_'\n ),\n monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'),\n weekdays:\n 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split(\n '_'\n ),\n weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'),\n weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A',\n },\n calendar: {\n sameDay: '[Namuhla nga] LT',\n nextDay: '[Kusasa nga] LT',\n nextWeek: 'dddd [nga] LT',\n lastDay: '[Itolo nga] LT',\n lastWeek: 'dddd [leliphelile] [nga] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'nga %s',\n past: 'wenteka nga %s',\n s: 'emizuzwana lomcane',\n ss: '%d mzuzwana',\n m: 'umzuzu',\n mm: '%d emizuzu',\n h: 'lihora',\n hh: '%d emahora',\n d: 'lilanga',\n dd: '%d emalanga',\n M: 'inyanga',\n MM: '%d tinyanga',\n y: 'umnyaka',\n yy: '%d iminyaka',\n },\n meridiemParse: /ekuseni|emini|entsambama|ebusuku/,\n meridiem: function (hours, minutes, isLower) {\n if (hours < 11) {\n return 'ekuseni';\n } else if (hours < 15) {\n return 'emini';\n } else if (hours < 19) {\n return 'entsambama';\n } else {\n return 'ebusuku';\n }\n },\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'ekuseni') {\n return hour;\n } else if (meridiem === 'emini') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') {\n if (hour === 0) {\n return 0;\n }\n return hour + 12;\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}/,\n ordinal: '%d',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return ss;\n\n})));\n","// eslint-disable-next-line @typescript-eslint/unbound-method\nconst objectToString = Object.prototype.toString;\n\n/**\n * Checks whether given value's type is one of a few Error or Error-like\n * {@link isError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isError(wat) {\n switch (objectToString.call(wat)) {\n case '[object Error]':\n case '[object Exception]':\n case '[object DOMException]':\n case '[object WebAssembly.Exception]':\n return true;\n default:\n return isInstanceOf(wat, Error);\n }\n}\n/**\n * Checks whether given value is an instance of the given built-in class.\n *\n * @param wat The value to be checked\n * @param className\n * @returns A boolean representing the result.\n */\nfunction isBuiltin(wat, className) {\n return objectToString.call(wat) === `[object ${className}]`;\n}\n\n/**\n * Checks whether given value's type is ErrorEvent\n * {@link isErrorEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isErrorEvent(wat) {\n return isBuiltin(wat, 'ErrorEvent');\n}\n\n/**\n * Checks whether given value's type is DOMError\n * {@link isDOMError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isDOMError(wat) {\n return isBuiltin(wat, 'DOMError');\n}\n\n/**\n * Checks whether given value's type is DOMException\n * {@link isDOMException}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isDOMException(wat) {\n return isBuiltin(wat, 'DOMException');\n}\n\n/**\n * Checks whether given value's type is a string\n * {@link isString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isString(wat) {\n return isBuiltin(wat, 'String');\n}\n\n/**\n * Checks whether given string is parameterized\n * {@link isParameterizedString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isParameterizedString(wat) {\n return (\n typeof wat === 'object' &&\n wat !== null &&\n '__sentry_template_string__' in wat &&\n '__sentry_template_values__' in wat\n );\n}\n\n/**\n * Checks whether given value is a primitive (undefined, null, number, boolean, string, bigint, symbol)\n * {@link isPrimitive}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isPrimitive(wat) {\n return wat === null || isParameterizedString(wat) || (typeof wat !== 'object' && typeof wat !== 'function');\n}\n\n/**\n * Checks whether given value's type is an object literal, or a class instance.\n * {@link isPlainObject}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isPlainObject(wat) {\n return isBuiltin(wat, 'Object');\n}\n\n/**\n * Checks whether given value's type is an Event instance\n * {@link isEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isEvent(wat) {\n return typeof Event !== 'undefined' && isInstanceOf(wat, Event);\n}\n\n/**\n * Checks whether given value's type is an Element instance\n * {@link isElement}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isElement(wat) {\n return typeof Element !== 'undefined' && isInstanceOf(wat, Element);\n}\n\n/**\n * Checks whether given value's type is an regexp\n * {@link isRegExp}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isRegExp(wat) {\n return isBuiltin(wat, 'RegExp');\n}\n\n/**\n * Checks whether given value has a then function.\n * @param wat A value to be checked.\n */\nfunction isThenable(wat) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return Boolean(wat && wat.then && typeof wat.then === 'function');\n}\n\n/**\n * Checks whether given value's type is a SyntheticEvent\n * {@link isSyntheticEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isSyntheticEvent(wat) {\n return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;\n}\n\n/**\n * Checks whether given value's type is an instance of provided constructor.\n * {@link isInstanceOf}.\n *\n * @param wat A value to be checked.\n * @param base A constructor to be used in a check.\n * @returns A boolean representing the result.\n */\nfunction isInstanceOf(wat, base) {\n try {\n return wat instanceof base;\n } catch (_e) {\n return false;\n }\n}\n\n/**\n * Checks whether given value's type is a Vue ViewModel.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isVueViewModel(wat) {\n // Not using Object.prototype.toString because in Vue 3 it would read the instance's Symbol(Symbol.toStringTag) property.\n return !!(typeof wat === 'object' && wat !== null && ((wat ).__isVue || (wat )._isVue));\n}\n\nexport { isDOMError, isDOMException, isElement, isError, isErrorEvent, isEvent, isInstanceOf, isParameterizedString, isPlainObject, isPrimitive, isRegExp, isString, isSyntheticEvent, isThenable, isVueViewModel };\n","import { operate } from '../util/lift';\nimport { scanInternals } from './scanInternals';\nexport function scan(accumulator, seed) {\n return operate(scanInternals(accumulator, seed, arguments.length >= 2, true));\n}\n","import { createOperatorSubscriber } from './OperatorSubscriber';\nexport function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) {\n return (source, subscriber) => {\n let hasState = hasSeed;\n let state = seed;\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n const i = index++;\n state = hasState\n ?\n accumulator(state, value, i)\n :\n ((hasState = true), value);\n emitOnNext && subscriber.next(state);\n }, emitBeforeComplete &&\n (() => {\n hasState && subscriber.next(state);\n subscriber.complete();\n })));\n };\n}\n","<span class=\"text-large-semibold no-wrap\" *ngIf=\"!processing\"><ng-content></ng-content></span>\n<img src=\"../../assets/button_spinner.png\" class=\"button-spinner\" *ngIf=\"processing\" width=\"24\" height=\"24px\"/>","import { Component, OnInit, ElementRef, Input, OnChanges } from '@angular/core';\n@Component({\n selector: 'button[bw-button], button[bw-outlined-button], button[bw-link-button], button[bw-small-button], button[bw-small-outlined-button], button[bw-icon-button]',\n templateUrl: './button.component.html',\n styleUrls: ['./button.component.scss'],\n})\nexport class ButtonComponent implements OnInit, OnChanges {\n @Input() disabled: boolean;\n @Input() processing: boolean;\n @Input() fluidWidth: boolean;\n\n /** Whether the button is fluid and can stretch to it's container. */\n readonly isFluidButton: boolean = this._getHostElement().hasAttribute('fluidWidth');\n\n /** Whether the button is a small button. */\n readonly isSmallButton: boolean =\n this._hasHostAttributes('bw-small-outlined-button') || this._hasHostAttributes('bw-small-button');\n\n /** Whether the button is an outlined button. */\n readonly isOutlined: boolean = this._hasHostAttributes('bw-small-outlined-button') || this._hasHostAttributes('bw-outlined-button');\n\n /** Whether the button is an outlined button. */\n readonly isLink: boolean = this._hasHostAttributes('bw-link-button');\n\n /** Whether the button is an icon button. */\n readonly isIconButton: boolean = this._hasHostAttributes('bw-icon-button');\n\n constructor(public _elementRef: ElementRef) {\n if (this.isSmallButton) {\n (this._getHostElement() as HTMLElement).classList.add('small');\n }\n\n if (this.isOutlined) {\n (this._getHostElement() as HTMLElement).classList.add('outlined');\n }\n\n if (this.isLink) {\n (this._getHostElement() as HTMLElement).classList.add('link-button');\n }\n\n if (this.isFluidButton) {\n (this._getHostElement() as HTMLElement).classList.add('fluid-width');\n }\n\n if (this.isIconButton) {\n (this._getHostElement() as HTMLElement).classList.add('icon-button');\n }\n }\n\n ngOnInit() {\n this.setDisabled(this.processing || this.disabled);\n }\n\n private setDisabled(isDisabled: boolean = false) {\n if (isDisabled) {\n (this._getHostElement() as HTMLElement).setAttribute('disabled', '');\n } else {\n (this._getHostElement() as HTMLElement).removeAttribute('disabled');\n }\n }\n\n _getHostElement() {\n return this._elementRef.nativeElement;\n }\n\n _hasHostAttributes(...attributes: string[]) {\n return attributes.some((attribute) => this._getHostElement().hasAttribute(attribute));\n }\n\n ngOnChanges(changes: import('@angular/core').SimpleChanges): void {\n this.setDisabled(changes['processing']?.currentValue === true || changes['disabled']?.currentValue === true || this.disabled === true);\n }\n}\n","import { identity } from './identity';\nexport function pipe(...fns) {\n return pipeFromArray(fns);\n}\nexport function pipeFromArray(fns) {\n if (fns.length === 0) {\n return identity;\n }\n if (fns.length === 1) {\n return fns[0];\n }\n return function piped(input) {\n return fns.reduce((prev, fn) => fn(prev), input);\n };\n}\n","import { Injectable } from '@angular/core';\nimport {\n AwsApiWrapperService\n} from '@brightside-web/desktop/data-access/core-services';\nimport { from, Observable } from 'rxjs';\nimport {\n ApiCacheService,\n ApiResponse,\n CreditScore,\n CreditSetupStatus,\n CreditSubscription,\n CreditSummary,\n DesktopCard, DesktopCardFooter, DesktopCardSegment,\n DesktopSegmentType,\n} from '@brightside-web/desktop/data-access/shared';\nimport { map } from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class CreditService {\n async groomCardData(card: DesktopCard, isCreditScoreEnabled?: boolean): Promise<DesktopCard> {\n const defaultSegment = card.segments ? card.segments.find((seg: DesktopCardSegment) => seg.type === DesktopSegmentType.DEFAULT) : undefined;\n if (defaultSegment) {\n try {\n if (isCreditScoreEnabled) {\n const resp = await this.getCreditScore().toPromise();\n defaultSegment.dynamicValue = resp ? resp.score : '--';\n card.ctaPath = '/credit/dashboard';\n } else {\n card.ctaPath = await this.getToastNotificationByCreditStatus();\n }\n } catch (e) {\n defaultSegment.dynamicValue = '--';\n card.ctaPath = await this.getToastNotificationByCreditStatus();\n card.footer = <DesktopCardFooter>{\n leftImage: \"alert\",\n style: \"Error\",\n title: \"An error has occurred\"\n };\n }\n }\n\n return card;\n }\n\n constructor(\n private apiSvc: ApiCacheService,\n private awsApiWrapperService: AwsApiWrapperService,\n ) {}\n\n disconnectCreditReport(): Observable<ApiResponse> {\n this.apiSvc.refreshItem('/credit/subscription');\n this.apiSvc.refreshItem('/credit/?filter=summary');\n this.apiSvc.refreshItem('/client/mobilestate');\n return from(this.awsApiWrapperService.del('api-mobile', '/credit/subscription', { headers: { 'Content-Type': 'application/json' } }));\n }\n\n getCreditScore(): Observable<CreditScore> {\n return this.getCreditSummary().pipe(map((resp) => resp.creditScore));\n }\n\n getCreditSummary(): Observable<CreditSummary> {\n return this.apiSvc.get<CreditSummary>('api-mobile', '/credit/?filter=summary');\n }\n\n getCreditReport(): Observable<Blob> {\n\n return from(\n this.awsApiWrapperService.get('api-mobile', '/credit/report/v2', {}, 'pdf')\n ).pipe(\n map((data) => {\n const byteString = atob(data);\n const ab = new ArrayBuffer(byteString.length);\n const ia = new Uint8Array(ab);\n for (let i = 0; i < byteString.length; i++) {\n ia[i] = byteString.charCodeAt(i);\n }\n return new Blob([ab], { type: 'application/pdf' });\n })\n );\n }\n\n openBase64Pdf(base64String: string, filename: string = 'document.pdf') {\n const byteString = atob(base64String);\n const ab = new ArrayBuffer(byteString.length);\n const ia = new Uint8Array(ab);\n for (let i = 0; i < byteString.length; i++) {\n ia[i] = byteString.charCodeAt(i);\n }\n const blob = new Blob([ab], { type: 'application/pdf' });\n\n const blobUrl = URL.createObjectURL(blob);\n\n window.open(blobUrl, '_blank');\n }\n\n getCreditSubscription(): Observable<CreditSubscription> {\n return this.apiSvc.get('api-mobile', '/credit/subscription');\n }\n\n private async getToastNotificationByCreditStatus(): Promise<string> {\n const sub = await this.getCreditSubscription().toPromise();\n if (sub?.status === CreditSetupStatus.FULFILLED) {\n return 'toast:noCreditData';\n } else {\n return 'toast:creditSyncing';\n }\n }\n\n\n}\n","/**\n * @license\n * Copyright 2017 Google LLC\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 * A container for all of the Logger instances\n */\nconst instances = [];\n/**\n * The JS SDK supports 5 log levels and also allows a user the ability to\n * silence the logs altogether.\n *\n * The order is a follows:\n * DEBUG < VERBOSE < INFO < WARN < ERROR\n *\n * All of the log types above the current log level will be captured (i.e. if\n * you set the log level to `INFO`, errors will still be logged, but `DEBUG` and\n * `VERBOSE` logs will not)\n */\nvar LogLevel;\n(function (LogLevel) {\n LogLevel[LogLevel[\"DEBUG\"] = 0] = \"DEBUG\";\n LogLevel[LogLevel[\"VERBOSE\"] = 1] = \"VERBOSE\";\n LogLevel[LogLevel[\"INFO\"] = 2] = \"INFO\";\n LogLevel[LogLevel[\"WARN\"] = 3] = \"WARN\";\n LogLevel[LogLevel[\"ERROR\"] = 4] = \"ERROR\";\n LogLevel[LogLevel[\"SILENT\"] = 5] = \"SILENT\";\n})(LogLevel || (LogLevel = {}));\nconst levelStringToEnum = {\n 'debug': LogLevel.DEBUG,\n 'verbose': LogLevel.VERBOSE,\n 'info': LogLevel.INFO,\n 'warn': LogLevel.WARN,\n 'error': LogLevel.ERROR,\n 'silent': LogLevel.SILENT\n};\n/**\n * The default log level\n */\nconst defaultLogLevel = LogLevel.INFO;\n/**\n * By default, `console.debug` is not displayed in the developer console (in\n * chrome). To avoid forcing users to have to opt-in to these logs twice\n * (i.e. once for firebase, and once in the console), we are sending `DEBUG`\n * logs to the `console.log` function.\n */\nconst ConsoleMethod = {\n [LogLevel.DEBUG]: 'log',\n [LogLevel.VERBOSE]: 'log',\n [LogLevel.INFO]: 'info',\n [LogLevel.WARN]: 'warn',\n [LogLevel.ERROR]: 'error'\n};\n/**\n * The default log handler will forward DEBUG, VERBOSE, INFO, WARN, and ERROR\n * messages on to their corresponding console counterparts (if the log method\n * is supported by the current log level)\n */\nconst defaultLogHandler = (instance, logType, ...args) => {\n if (logType < instance.logLevel) {\n return;\n }\n const now = new Date().toISOString();\n const method = ConsoleMethod[logType];\n if (method) {\n console[method](`[${now}] ${instance.name}:`, ...args);\n }\n else {\n throw new Error(`Attempted to log a message with an invalid logType (value: ${logType})`);\n }\n};\nclass Logger {\n /**\n * Gives you an instance of a Logger to capture messages according to\n * Firebase's logging scheme.\n *\n * @param name The name that the logs will be associated with\n */\n constructor(name) {\n this.name = name;\n /**\n * The log level of the given Logger instance.\n */\n this._logLevel = defaultLogLevel;\n /**\n * The main (internal) log handler for the Logger instance.\n * Can be set to a new function in internal package code but not by user.\n */\n this._logHandler = defaultLogHandler;\n /**\n * The optional, additional, user-defined log handler for the Logger instance.\n */\n this._userLogHandler = null;\n /**\n * Capture the current instance for later use\n */\n instances.push(this);\n }\n get logLevel() {\n return this._logLevel;\n }\n set logLevel(val) {\n if (!(val in LogLevel)) {\n throw new TypeError(`Invalid value \"${val}\" assigned to \\`logLevel\\``);\n }\n this._logLevel = val;\n }\n // Workaround for setter/getter having to be the same type.\n setLogLevel(val) {\n this._logLevel = typeof val === 'string' ? levelStringToEnum[val] : val;\n }\n get logHandler() {\n return this._logHandler;\n }\n set logHandler(val) {\n if (typeof val !== 'function') {\n throw new TypeError('Value assigned to `logHandler` must be a function');\n }\n this._logHandler = val;\n }\n get userLogHandler() {\n return this._userLogHandler;\n }\n set userLogHandler(val) {\n this._userLogHandler = val;\n }\n /**\n * The functions below are all based on the `console` interface\n */\n debug(...args) {\n this._userLogHandler && this._userLogHandler(this, LogLevel.DEBUG, ...args);\n this._logHandler(this, LogLevel.DEBUG, ...args);\n }\n log(...args) {\n this._userLogHandler &&\n this._userLogHandler(this, LogLevel.VERBOSE, ...args);\n this._logHandler(this, LogLevel.VERBOSE, ...args);\n }\n info(...args) {\n this._userLogHandler && this._userLogHandler(this, LogLevel.INFO, ...args);\n this._logHandler(this, LogLevel.INFO, ...args);\n }\n warn(...args) {\n this._userLogHandler && this._userLogHandler(this, LogLevel.WARN, ...args);\n this._logHandler(this, LogLevel.WARN, ...args);\n }\n error(...args) {\n this._userLogHandler && this._userLogHandler(this, LogLevel.ERROR, ...args);\n this._logHandler(this, LogLevel.ERROR, ...args);\n }\n}\nfunction setLogLevel(level) {\n instances.forEach(inst => {\n inst.setLogLevel(level);\n });\n}\nfunction setUserLogHandler(logCallback, options) {\n for (const instance of instances) {\n let customLogLevel = null;\n if (options && options.level) {\n customLogLevel = levelStringToEnum[options.level];\n }\n if (logCallback === null) {\n instance.userLogHandler = null;\n }\n else {\n instance.userLogHandler = (instance, level, ...args) => {\n const message = args\n .map(arg => {\n if (arg == null) {\n return null;\n }\n else if (typeof arg === 'string') {\n return arg;\n }\n else if (typeof arg === 'number' || typeof arg === 'boolean') {\n return arg.toString();\n }\n else if (arg instanceof Error) {\n return arg.message;\n }\n else {\n try {\n return JSON.stringify(arg);\n }\n catch (ignored) {\n return null;\n }\n }\n })\n .filter(arg => arg)\n .join(' ');\n if (level >= (customLogLevel !== null && customLogLevel !== void 0 ? customLogLevel : instance.logLevel)) {\n logCallback({\n level: LogLevel[level].toLowerCase(),\n message,\n args,\n type: instance.name\n });\n }\n };\n }\n }\n}\n\nexport { LogLevel, Logger, setLogLevel, setUserLogHandler };\n","//! moment.js locale configuration\n//! locale : Slovenian [sl]\n//! author : Robert Sedovšek : https://github.com/sedovsek\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }\n\n var sl = moment.defineLocale('sl', {\n months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split(\n '_'\n ),\n monthsShort:\n 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),\n weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),\n weekdaysMin: 'ne_po_to_sr_če_pe_so'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD. MM. YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[danes ob] LT',\n nextDay: '[jutri ob] LT',\n\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[v] [nedeljo] [ob] LT';\n case 3:\n return '[v] [sredo] [ob] LT';\n case 6:\n return '[v] [soboto] [ob] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[v] dddd [ob] LT';\n }\n },\n lastDay: '[včeraj ob] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[prejšnjo] [nedeljo] [ob] LT';\n case 3:\n return '[prejšnjo] [sredo] [ob] LT';\n case 6:\n return '[prejšnjo] [soboto] [ob] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[prejšnji] dddd [ob] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'čez %s',\n past: 'pred %s',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return sl;\n\n})));\n","import {Directive, Input, TemplateRef, ViewContainerRef} from '@angular/core';\nimport {FeatureFlagService} from \"@brightside-web/desktop/data-access/core-services\";\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[ifFeatureFlag]',\n})\nexport class FeatureFlagDirective {\n\n @Input() ifFeatureFlag!: string;\n @Input() ifFeatureFlagElse?: TemplateRef<unknown>;\n\n constructor(\n private templateRef: TemplateRef<unknown>,\n private viewContainerRef: ViewContainerRef,\n private featureFlagSvc: FeatureFlagService\n ) {\n }\n\n ngOnInit() {\n this.featureFlagSvc.getFlag<boolean>(this.ifFeatureFlag).subscribe(\n resp => {\n if (resp) {\n this.onIf();\n } else {\n this.onElse();\n }\n }\n )\n }\n\n onIf() {\n this.createView(this.templateRef);\n }\n\n onElse() {\n if (!this.ifFeatureFlagElse) return;\n this.createView(this.ifFeatureFlagElse);\n }\n\n private createView(templateRef: TemplateRef<unknown>): void {\n this.viewContainerRef.createEmbeddedView(templateRef);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RequiredLegalDocumentsComponent } from './required-legal-documents/required-legal-documents.component';\nimport {BrightsideUiModule} from \"@brightside/brightside-ui\";\nimport {SharedDesktopModule} from \"@brightside-web/shared/desktop\";\nimport { MicroUiMoleculeModule } from \"@micro-ui/molecule\";\nimport {TranslateModule} from \"@ngx-translate/core\";\nimport {ReactiveFormsModule} from \"@angular/forms\";\nimport {BrightsideUiServicesModule} from \"@brightside/brightside-ui-services\";\n\n@NgModule({\n imports: [\n CommonModule,\n BrightsideUiModule,\n BrightsideUiServicesModule,\n TranslateModule,\n ReactiveFormsModule,\n SharedDesktopModule,\n MicroUiMoleculeModule\n ],\n declarations: [\n RequiredLegalDocumentsComponent\n ],\n exports: [\n RequiredLegalDocumentsComponent\n ]\n})\nexport class SharedLegalDocumentsModule {}\n","/**\n * example usage in route\n * canActivate: [HasLegalDocsGuard],\n * data: {\n * pageConfig: {\n * documentsKey: DocumentsKeyEnum.SAVINGS_ACCOUNT,\n * legalRoute: ['accounts','savings','legal']\n * }\n * }\n */\n\nimport { Injectable } from '@angular/core';\nimport {\n ActivatedRouteSnapshot,\n CanActivate,\n Router,\n RouterStateSnapshot,\n UrlTree\n} from '@angular/router';\nimport {from, Observable} from 'rxjs';\nimport {DocumentsKeyEnum, LegalDocumentsService} from \"@brightside-web/shared/legal-documents\";\nimport {map} from \"rxjs/operators\";\n\n@Injectable()\nexport class HasLegalDocsGuard implements CanActivate {\n constructor(\n protected legalDocumentsService: LegalDocumentsService,\n private router: Router\n ) { }\n\n canActivate(\n route: ActivatedRouteSnapshot,\n state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {\n const documentsKey = route.data?.pageConfig.documentsKey;\n const legalRoute = route.data?.pageConfig.legalRoute;\n if (!documentsKey || !legalRoute) {\n console.warn('this guard requires a documentsKey and legalRoute in the data snapshot');\n this.router.navigate(['home']);\n return false;\n } else {\n return this.getDocsForDocKey(documentsKey, legalRoute);\n }\n }\n\n getDocsForDocKey(docKey: DocumentsKeyEnum, legalRoute: string[]): Observable<boolean> {\n return this.legalDocumentsService.getDocsByKey(docKey).pipe(\n map(\n docs => {\n if (docs.payload?.legalDocuments && docs.payload.legalDocuments.length > 0) {\n from(this.router.navigate( [{outlets: {modal: null}}]))\n .subscribe(()=>{\n this.router.navigate(legalRoute);\n });\n return false;\n } else {\n return true;\n }\n }\n )\n );\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { ButtonComponent } from './button/button.component';\nimport { SpinnerComponent } from './spinner/spinner.component';\nimport { ThemeComponent } from './theme/theme.component';\nimport { InputComponent } from './input/input.component';\nimport { TopbarComponent } from './topbar/topbar.component';\nimport { ListComponent } from './list/list.component';\nimport { ModalComponent } from './modal/modal.component';\nimport { PanelComponent } from './panel/panel.component';\nimport { ParagraphComponent } from './typography/paragraph/paragraph.component';\nimport { CaptionComponent } from './typography/caption/caption.component';\n\nimport { AnchorComponent } from './anchor/anchor.component';\nimport { IconComponent } from './icon/icon.component';\nimport { PhoneFormComponent } from './input/phone-form/phone-form.component';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { CreatePasswordComponent } from './input/create-password/create-password.component';\nimport { CheckboxComponent } from './checkbox/checkbox.component';\nimport { RadioComponent } from './radio/radio.component';\nimport { ReactiveCheckboxComponent } from './checkbox/reactive-checkbox/reactive-checkbox.component';\nimport { ToastComponent } from './toast/toast.component';\nimport { BackComponent } from './back/back.component';\nimport { CellComponent } from './cell/cell.component';\nimport { MenuComponent } from './menu/menu.component';\nimport { TabsComponent } from './tabs/tabs.component';\nimport { RouterModule } from '@angular/router';\nimport { ActionArticleComponent } from './layout/templates/action-article/action-article.component';\nimport { PageComponent } from './layout/templates/page/page.component';\nimport { BillboardArticleComponent } from './layout/templates/billboard-article/billboard-article.component';\nimport { InputGroupComponent } from './input/input-group/input-group.component';\nimport { VideoComponent } from './video/video.component';\nimport { NgxMaskModule } from './utils/ngx-mask/ngx-mask.module';\nimport { IConfig } from './utils/ngx-mask/config';\nimport { TypographyComponent } from './typography/typography/typography.component';\nimport { ScrollIntoViewDirective } from './utils/scroll-into-view.directive';\nimport { TextColorDirective } from './utils/text-color.directive';\nimport { ToggleComponent } from './toggle/toggle.component';\nimport { ProgressBarComponent } from './progress-bar/progress-bar.component';\n\nimport { VgCoreModule } from '@videogular/ngx-videogular/core';\nimport { VgControlsModule } from '@videogular/ngx-videogular/controls';\nimport { VgOverlayPlayModule } from '@videogular/ngx-videogular/overlay-play';\nimport { VgBufferingModule } from '@videogular/ngx-videogular/buffering';\nimport { VgStreamingModule } from '@videogular/ngx-videogular/streaming';\nimport { LoadingBarModule } from '@ngx-loading-bar/core';\n\nimport { StepsComponent } from './steps/steps.component';\nimport { SafeStylePipe } from './utils/safe-style.pipe';\nimport {\n CardBannerComponent,\n CardBodyComponent,\n CardComponent,\n CardFooterComponent,\n CardHeaderComponent,\n} from './card/card.component';\nimport { BlockComponent } from './block/block.component';\n\nimport { NgxCurrencyModule } from 'ngx-currency';\nimport { CurrencyInputComponent } from './input/currency-input/currency-input.component';\nimport { CurrencySelectComponent } from './input/currency-select/currency-select.component';\nimport { EmptyStateComponent } from './layout/templates/empty-state/empty-state.component';\nimport { CellListComponent } from './cell-list/cell-list.component';\nimport { AccordionComponent } from './accordion/accordion.component';\nimport { AccordionContentDirective, AccordionItemDirective } from './accordion/accordion-item/accordion-item.directive';\nimport { TogglePipe } from './accordion/toggle.pipe';\nimport { IconBoundsComponent } from './icon/icon-bounds/icon-bounds.component';\nimport { NavComponent } from './nav/nav.component';\nimport { AutocompleteComponent } from './autocomplete/autocomplete.component';\nimport { HighlightPipe } from './autocomplete/highlight.pipe';\nimport { TrackerComponent } from './tracker/tracker.component';\nimport { ActionCellComponent } from './cell/action-cell/action-cell.component';\nimport { AvatarComponent } from './avatar/avatar.component';\nimport { ReelsComponent } from './layout/templates/reels/reels.component';\nimport { CardLtComponent } from './card/card-lt/card-lt.component';\nimport { TxCellComponent } from './cell/tx-cell/tx-cell.component';\nimport { ListItemDetailsComponent } from './list/list-item-details/list-item-details.component';\nimport { HeaderComponent } from './header/header.component';\nimport { BuiRowComponent } from './grid/row/bui-row/bui-row.component';\nimport { BuiColumnComponent } from './grid/column/bui-column/bui-column.component';\nimport { BuiTileComponent, TileCardComponent, TileListItemComponent } from './containers/bui-tile/bui-tile.component';\nimport { ClickStyleDirective } from './utils/clickable.directive';\nimport { ActionCardComponent } from './action-card/action-card.component';\nimport { CopyCellComponent } from './copy-cell/copy-cell.component';\nimport { SectionCardComponent } from './section-card/section-card.component';\nimport { NewCurrencySelectComponent } from './currency-select/new-currency-select.component';\n\nimport { UiSwitchModule } from 'ngx-ui-switch';\nimport { NumbersOnlyDirective } from './utils/numbers-only.directive';\nimport { SurveySelectorComponent } from './survey-selector/survey-selector.component';\nimport { TextareaComponent } from './textarea/textarea.component';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { PillComponent } from './pill/pill.component';\nimport { EnhancedClickDirective } from './directives/enhanced-click.directive';\nimport { LabelCellComponent } from './label-cell/label-cell.component';\nimport { ActionDetailsCardComponent } from './action-details-card/action-details-card.component';\nimport { HeaderLabelCellComponent } from './cell/header-label-cell/header-label-cell.component';\nimport { LottieComponent } from 'ngx-lottie';\n\nexport type InputMaskOptions = Partial<IConfig> | (() => Partial<IConfig>);\nexport const ngxMaskOptions: InputMaskOptions = {};\n\n@NgModule({\n imports: [\n CommonModule,\n NgxMaskModule.forRoot(ngxMaskOptions),\n ReactiveFormsModule,\n RouterModule,\n VgCoreModule,\n VgControlsModule,\n VgOverlayPlayModule,\n VgBufferingModule,\n VgStreamingModule,\n NgxCurrencyModule,\n LoadingBarModule,\n FormsModule,\n UiSwitchModule,\n TranslateModule,\n LottieComponent,\n ],\n declarations: [\n ButtonComponent,\n CardComponent,\n CardHeaderComponent,\n CardBodyComponent,\n CardFooterComponent,\n CardBannerComponent,\n SpinnerComponent,\n ThemeComponent,\n InputComponent,\n TopbarComponent,\n ListComponent,\n ModalComponent,\n PanelComponent,\n ParagraphComponent,\n CaptionComponent,\n AnchorComponent,\n IconComponent,\n PhoneFormComponent,\n CreatePasswordComponent,\n CheckboxComponent,\n RadioComponent,\n ReactiveCheckboxComponent,\n ToastComponent,\n BackComponent,\n CellComponent,\n CellListComponent,\n MenuComponent,\n TabsComponent,\n ActionArticleComponent,\n PageComponent,\n BillboardArticleComponent,\n InputGroupComponent,\n TypographyComponent,\n ScrollIntoViewDirective,\n TextColorDirective,\n ToggleComponent,\n VideoComponent,\n StepsComponent,\n SafeStylePipe,\n BlockComponent,\n CurrencyInputComponent,\n CurrencySelectComponent,\n EmptyStateComponent,\n AccordionComponent,\n AccordionItemDirective,\n AccordionContentDirective,\n TogglePipe,\n IconBoundsComponent,\n ProgressBarComponent,\n NavComponent,\n AutocompleteComponent,\n HighlightPipe,\n TrackerComponent,\n ActionCellComponent,\n AvatarComponent,\n ReelsComponent,\n CardLtComponent,\n TxCellComponent,\n ListItemDetailsComponent,\n HeaderComponent,\n BuiRowComponent,\n BuiColumnComponent,\n BuiTileComponent,\n TileCardComponent,\n TileListItemComponent,\n ClickStyleDirective,\n ActionCardComponent,\n CopyCellComponent,\n SectionCardComponent,\n NewCurrencySelectComponent,\n NumbersOnlyDirective,\n SurveySelectorComponent,\n TextareaComponent,\n PillComponent,\n EnhancedClickDirective,\n LabelCellComponent,\n ActionDetailsCardComponent,\n HeaderLabelCellComponent,\n ],\n exports: [\n ButtonComponent,\n CardComponent,\n CardHeaderComponent,\n CardBodyComponent,\n CardFooterComponent,\n CardBannerComponent,\n SpinnerComponent,\n ThemeComponent,\n InputComponent,\n TopbarComponent,\n ListComponent,\n ModalComponent,\n PanelComponent,\n ParagraphComponent,\n CaptionComponent,\n AnchorComponent,\n IconComponent,\n PhoneFormComponent,\n CreatePasswordComponent,\n CheckboxComponent,\n RadioComponent,\n ReactiveCheckboxComponent,\n ToastComponent,\n BackComponent,\n CellComponent,\n CellListComponent,\n MenuComponent,\n TabsComponent,\n ActionArticleComponent,\n PageComponent,\n BillboardArticleComponent,\n InputGroupComponent,\n TypographyComponent,\n ScrollIntoViewDirective,\n TextColorDirective,\n ToggleComponent,\n VideoComponent,\n StepsComponent,\n SafeStylePipe,\n BlockComponent,\n CurrencyInputComponent,\n CurrencySelectComponent,\n EmptyStateComponent,\n AccordionComponent,\n AccordionItemDirective,\n AccordionContentDirective,\n IconBoundsComponent,\n ProgressBarComponent,\n NavComponent,\n AutocompleteComponent,\n HighlightPipe,\n TrackerComponent,\n ActionCellComponent,\n AvatarComponent,\n ReelsComponent,\n CardLtComponent,\n TxCellComponent,\n ListItemDetailsComponent,\n HeaderComponent,\n BuiRowComponent,\n BuiColumnComponent,\n BuiTileComponent,\n TileCardComponent,\n TileListItemComponent,\n ClickStyleDirective,\n ActionCardComponent,\n CopyCellComponent,\n SectionCardComponent,\n NewCurrencySelectComponent,\n SurveySelectorComponent,\n NumbersOnlyDirective,\n TextareaComponent,\n PillComponent,\n EnhancedClickDirective,\n LabelCellComponent,\n ActionDetailsCardComponent,\n HeaderLabelCellComponent,\n ],\n providers: [],\n})\nexport class BrightsideUiModule {}\n","import { identity } from '../util/identity';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function distinctUntilChanged(comparator, keySelector = identity) {\n comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare;\n return operate((source, subscriber) => {\n let previousKey;\n let first = true;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n const currentKey = keySelector(value);\n if (first || !comparator(previousKey, currentKey)) {\n first = false;\n previousKey = currentKey;\n subscriber.next(value);\n }\n }));\n });\n}\nfunction defaultCompare(a, b) {\n return a === b;\n}\n","//! moment.js locale configuration\n//! locale : Konkani Latin script [gom-latn]\n//! author : The Discoverer : https://github.com/WikiDiscoverer\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n s: ['thoddea sekondamni', 'thodde sekond'],\n ss: [number + ' sekondamni', number + ' sekond'],\n m: ['eka mintan', 'ek minut'],\n mm: [number + ' mintamni', number + ' mintam'],\n h: ['eka voran', 'ek vor'],\n hh: [number + ' voramni', number + ' voram'],\n d: ['eka disan', 'ek dis'],\n dd: [number + ' disamni', number + ' dis'],\n M: ['eka mhoinean', 'ek mhoino'],\n MM: [number + ' mhoineamni', number + ' mhoine'],\n y: ['eka vorsan', 'ek voros'],\n yy: [number + ' vorsamni', number + ' vorsam'],\n };\n return isFuture ? format[key][0] : format[key][1];\n }\n\n var gomLatn = moment.defineLocale('gom-latn', {\n months: {\n standalone:\n 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split(\n '_'\n ),\n format: 'Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea'.split(\n '_'\n ),\n isFormat: /MMMM(\\s)+D[oD]?/,\n },\n monthsShort:\n 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'),\n monthsParseExact: true,\n weekdays: \"Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var\".split('_'),\n weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),\n weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'A h:mm [vazta]',\n LTS: 'A h:mm:ss [vazta]',\n L: 'DD-MM-YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY A h:mm [vazta]',\n LLLL: 'dddd, MMMM Do, YYYY, A h:mm [vazta]',\n llll: 'ddd, D MMM YYYY, A h:mm [vazta]',\n },\n calendar: {\n sameDay: '[Aiz] LT',\n nextDay: '[Faleam] LT',\n nextWeek: '[Fuddlo] dddd[,] LT',\n lastDay: '[Kal] LT',\n lastWeek: '[Fattlo] dddd[,] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s',\n past: '%s adim',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(er)/,\n ordinal: function (number, period) {\n switch (period) {\n // the ordinal 'er' only applies to day of the month\n case 'D':\n return number + 'er';\n default:\n case 'M':\n case 'Q':\n case 'DDD':\n case 'd':\n case 'w':\n case 'W':\n return number;\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week\n doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)\n },\n meridiemParse: /rati|sokallim|donparam|sanje/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'rati') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'sokallim') {\n return hour;\n } else if (meridiem === 'donparam') {\n return hour > 12 ? hour : hour + 12;\n } else if (meridiem === 'sanje') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'rati';\n } else if (hour < 12) {\n return 'sokallim';\n } else if (hour < 16) {\n return 'donparam';\n } else if (hour < 20) {\n return 'sanje';\n } else {\n return 'rati';\n }\n },\n });\n\n return gomLatn;\n\n})));\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nexports.GREATEST_LOWER_BOUND = 1;\nexports.LEAST_UPPER_BOUND = 2;\n\n/**\n * Recursive implementation of binary search.\n *\n * @param aLow Indices here and lower do not contain the needle.\n * @param aHigh Indices here and higher do not contain the needle.\n * @param aNeedle The element being searched for.\n * @param aHaystack The non-empty array being searched.\n * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n */\nfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}\n\n/**\n * This is an implementation of binary search which will always try and return\n * the index of the closest element if there is no exact hit. This is because\n * mappings between original and generated line/col pairs are single points,\n * and there is an implicit region between each of them, so a miss just means\n * that you aren't on the very start of a region.\n *\n * @param aNeedle The element you are looking for.\n * @param aHaystack The array that is being searched.\n * @param aCompare A function which takes the needle and an element in the\n * array and returns -1, 0, or 1 depending on whether the needle is less\n * than, equal to, or greater than the element, respectively.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n */\nexports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n if (aHaystack.length === 0) {\n return -1;\n }\n\n var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n if (index < 0) {\n return -1;\n }\n\n // We have found either the exact element, or the next-closest element than\n // the one we are searching for. However, there may be more than one such\n // element. Make sure we always return the smallest of these.\n while (index - 1 >= 0) {\n if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n break;\n }\n --index;\n }\n\n return index;\n};\n","//! moment.js locale configuration\n//! locale : Arabic (Morocco) [ar-ma]\n//! author : ElFadili Yassine : https://github.com/ElFadiliY\n//! author : Abdel Said : https://github.com/abdelsaid\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var arMa = moment.defineLocale('ar-ma', {\n months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(\n '_'\n ),\n monthsShort:\n 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(\n '_'\n ),\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return arMa;\n\n})));\n","import { isFunction } from './isFunction';\nexport function hasLift(source) {\n return isFunction(source === null || source === void 0 ? void 0 : source.lift);\n}\nexport function operate(init) {\n return (source) => {\n if (hasLift(source)) {\n return source.lift(function (liftedSource) {\n try {\n return init(liftedSource, this);\n }\n catch (err) {\n this.error(err);\n }\n });\n }\n throw new TypeError('Unable to lift unknown Observable type');\n };\n}\n","//! moment.js locale configuration\n//! locale : Persian [fa]\n//! author : Ebrahim Byagowi : https://github.com/ebraminio\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '۱',\n 2: '۲',\n 3: '۳',\n 4: '۴',\n 5: '۵',\n 6: '۶',\n 7: '۷',\n 8: '۸',\n 9: '۹',\n 0: '۰',\n },\n numberMap = {\n '۱': '1',\n '۲': '2',\n '۳': '3',\n '۴': '4',\n '۵': '5',\n '۶': '6',\n '۷': '7',\n '۸': '8',\n '۹': '9',\n '۰': '0',\n };\n\n var fa = moment.defineLocale('fa', {\n months: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(\n '_'\n ),\n monthsShort:\n 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(\n '_'\n ),\n weekdays:\n 'یک\\u200cشنبه_دوشنبه_سه\\u200cشنبه_چهارشنبه_پنج\\u200cشنبه_جمعه_شنبه'.split(\n '_'\n ),\n weekdaysShort:\n 'یک\\u200cشنبه_دوشنبه_سه\\u200cشنبه_چهارشنبه_پنج\\u200cشنبه_جمعه_شنبه'.split(\n '_'\n ),\n weekdaysMin: 'ی_د_س_چ_پ_ج_ش'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n meridiemParse: /قبل از ظهر|بعد از ظهر/,\n isPM: function (input) {\n return /بعد از ظهر/.test(input);\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'قبل از ظهر';\n } else {\n return 'بعد از ظهر';\n }\n },\n calendar: {\n sameDay: '[امروز ساعت] LT',\n nextDay: '[فردا ساعت] LT',\n nextWeek: 'dddd [ساعت] LT',\n lastDay: '[دیروز ساعت] LT',\n lastWeek: 'dddd [پیش] [ساعت] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'در %s',\n past: '%s پیش',\n s: 'چند ثانیه',\n ss: '%d ثانیه',\n m: 'یک دقیقه',\n mm: '%d دقیقه',\n h: 'یک ساعت',\n hh: '%d ساعت',\n d: 'یک روز',\n dd: '%d روز',\n M: 'یک ماه',\n MM: '%d ماه',\n y: 'یک سال',\n yy: '%d سال',\n },\n preparse: function (string) {\n return string\n .replace(/[۰-۹]/g, function (match) {\n return numberMap[match];\n })\n .replace(/،/g, ',');\n },\n postformat: function (string) {\n return string\n .replace(/\\d/g, function (match) {\n return symbolMap[match];\n })\n .replace(/,/g, '،');\n },\n dayOfMonthOrdinalParse: /\\d{1,2}م/,\n ordinal: '%dم',\n week: {\n dow: 6, // Saturday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return fa;\n\n})));\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MobileAppModalComponent } from './mobile-app-modal/mobile-app-modal.component';\nimport { BrightsideUiModule } from '@brightside/brightside-ui';\nimport { SharedDesktopModule } from '@brightside-web/shared/desktop';\nimport {TranslateModule} from \"@ngx-translate/core\";\n\n@NgModule({\n imports: [CommonModule, BrightsideUiModule, SharedDesktopModule, TranslateModule],\n declarations: [MobileAppModalComponent],\n exports: [MobileAppModalComponent],\n})\nexport class SharedMobileModule {}\n","//! moment.js locale configuration\n//! locale : Maltese (Malta) [mt]\n//! author : Alessandro Maruccia : https://github.com/alesma\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var mt = moment.defineLocale('mt', {\n months: 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split(\n '_'\n ),\n monthsShort: 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'),\n weekdays:\n 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split(\n '_'\n ),\n weekdaysShort: 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'),\n weekdaysMin: 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Illum fil-]LT',\n nextDay: '[Għada fil-]LT',\n nextWeek: 'dddd [fil-]LT',\n lastDay: '[Il-bieraħ fil-]LT',\n lastWeek: 'dddd [li għadda] [fil-]LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'f’ %s',\n past: '%s ilu',\n s: 'ftit sekondi',\n ss: '%d sekondi',\n m: 'minuta',\n mm: '%d minuti',\n h: 'siegħa',\n hh: '%d siegħat',\n d: 'ġurnata',\n dd: '%d ġranet',\n M: 'xahar',\n MM: '%d xhur',\n y: 'sena',\n yy: '%d sni',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return mt;\n\n})));\n","// This file is a workaround for a bug in web browsers' \"native\"\n// ES6 importing system which is uncapable of importing \"*.json\" files.\n// https://github.com/catamphetamine/libphonenumber-js/issues/239\nexport default {\"version\":4,\"country_calling_codes\":{\"1\":[\"US\",\"AG\",\"AI\",\"AS\",\"BB\",\"BM\",\"BS\",\"CA\",\"DM\",\"DO\",\"GD\",\"GU\",\"JM\",\"KN\",\"KY\",\"LC\",\"MP\",\"MS\",\"PR\",\"SX\",\"TC\",\"TT\",\"VC\",\"VG\",\"VI\"],\"7\":[\"RU\",\"KZ\"],\"20\":[\"EG\"],\"27\":[\"ZA\"],\"30\":[\"GR\"],\"31\":[\"NL\"],\"32\":[\"BE\"],\"33\":[\"FR\"],\"34\":[\"ES\"],\"36\":[\"HU\"],\"39\":[\"IT\",\"VA\"],\"40\":[\"RO\"],\"41\":[\"CH\"],\"43\":[\"AT\"],\"44\":[\"GB\",\"GG\",\"IM\",\"JE\"],\"45\":[\"DK\"],\"46\":[\"SE\"],\"47\":[\"NO\",\"SJ\"],\"48\":[\"PL\"],\"49\":[\"DE\"],\"51\":[\"PE\"],\"52\":[\"MX\"],\"53\":[\"CU\"],\"54\":[\"AR\"],\"55\":[\"BR\"],\"56\":[\"CL\"],\"57\":[\"CO\"],\"58\":[\"VE\"],\"60\":[\"MY\"],\"61\":[\"AU\",\"CC\",\"CX\"],\"62\":[\"ID\"],\"63\":[\"PH\"],\"64\":[\"NZ\"],\"65\":[\"SG\"],\"66\":[\"TH\"],\"81\":[\"JP\"],\"82\":[\"KR\"],\"84\":[\"VN\"],\"86\":[\"CN\"],\"90\":[\"TR\"],\"91\":[\"IN\"],\"92\":[\"PK\"],\"93\":[\"AF\"],\"94\":[\"LK\"],\"95\":[\"MM\"],\"98\":[\"IR\"],\"211\":[\"SS\"],\"212\":[\"MA\",\"EH\"],\"213\":[\"DZ\"],\"216\":[\"TN\"],\"218\":[\"LY\"],\"220\":[\"GM\"],\"221\":[\"SN\"],\"222\":[\"MR\"],\"223\":[\"ML\"],\"224\":[\"GN\"],\"225\":[\"CI\"],\"226\":[\"BF\"],\"227\":[\"NE\"],\"228\":[\"TG\"],\"229\":[\"BJ\"],\"230\":[\"MU\"],\"231\":[\"LR\"],\"232\":[\"SL\"],\"233\":[\"GH\"],\"234\":[\"NG\"],\"235\":[\"TD\"],\"236\":[\"CF\"],\"237\":[\"CM\"],\"238\":[\"CV\"],\"239\":[\"ST\"],\"240\":[\"GQ\"],\"241\":[\"GA\"],\"242\":[\"CG\"],\"243\":[\"CD\"],\"244\":[\"AO\"],\"245\":[\"GW\"],\"246\":[\"IO\"],\"247\":[\"AC\"],\"248\":[\"SC\"],\"249\":[\"SD\"],\"250\":[\"RW\"],\"251\":[\"ET\"],\"252\":[\"SO\"],\"253\":[\"DJ\"],\"254\":[\"KE\"],\"255\":[\"TZ\"],\"256\":[\"UG\"],\"257\":[\"BI\"],\"258\":[\"MZ\"],\"260\":[\"ZM\"],\"261\":[\"MG\"],\"262\":[\"RE\",\"YT\"],\"263\":[\"ZW\"],\"264\":[\"NA\"],\"265\":[\"MW\"],\"266\":[\"LS\"],\"267\":[\"BW\"],\"268\":[\"SZ\"],\"269\":[\"KM\"],\"290\":[\"SH\",\"TA\"],\"291\":[\"ER\"],\"297\":[\"AW\"],\"298\":[\"FO\"],\"299\":[\"GL\"],\"350\":[\"GI\"],\"351\":[\"PT\"],\"352\":[\"LU\"],\"353\":[\"IE\"],\"354\":[\"IS\"],\"355\":[\"AL\"],\"356\":[\"MT\"],\"357\":[\"CY\"],\"358\":[\"FI\",\"AX\"],\"359\":[\"BG\"],\"370\":[\"LT\"],\"371\":[\"LV\"],\"372\":[\"EE\"],\"373\":[\"MD\"],\"374\":[\"AM\"],\"375\":[\"BY\"],\"376\":[\"AD\"],\"377\":[\"MC\"],\"378\":[\"SM\"],\"380\":[\"UA\"],\"381\":[\"RS\"],\"382\":[\"ME\"],\"383\":[\"XK\"],\"385\":[\"HR\"],\"386\":[\"SI\"],\"387\":[\"BA\"],\"389\":[\"MK\"],\"420\":[\"CZ\"],\"421\":[\"SK\"],\"423\":[\"LI\"],\"500\":[\"FK\"],\"501\":[\"BZ\"],\"502\":[\"GT\"],\"503\":[\"SV\"],\"504\":[\"HN\"],\"505\":[\"NI\"],\"506\":[\"CR\"],\"507\":[\"PA\"],\"508\":[\"PM\"],\"509\":[\"HT\"],\"590\":[\"GP\",\"BL\",\"MF\"],\"591\":[\"BO\"],\"592\":[\"GY\"],\"593\":[\"EC\"],\"594\":[\"GF\"],\"595\":[\"PY\"],\"596\":[\"MQ\"],\"597\":[\"SR\"],\"598\":[\"UY\"],\"599\":[\"CW\",\"BQ\"],\"670\":[\"TL\"],\"672\":[\"NF\"],\"673\":[\"BN\"],\"674\":[\"NR\"],\"675\":[\"PG\"],\"676\":[\"TO\"],\"677\":[\"SB\"],\"678\":[\"VU\"],\"679\":[\"FJ\"],\"680\":[\"PW\"],\"681\":[\"WF\"],\"682\":[\"CK\"],\"683\":[\"NU\"],\"685\":[\"WS\"],\"686\":[\"KI\"],\"687\":[\"NC\"],\"688\":[\"TV\"],\"689\":[\"PF\"],\"690\":[\"TK\"],\"691\":[\"FM\"],\"692\":[\"MH\"],\"850\":[\"KP\"],\"852\":[\"HK\"],\"853\":[\"MO\"],\"855\":[\"KH\"],\"856\":[\"LA\"],\"880\":[\"BD\"],\"886\":[\"TW\"],\"960\":[\"MV\"],\"961\":[\"LB\"],\"962\":[\"JO\"],\"963\":[\"SY\"],\"964\":[\"IQ\"],\"965\":[\"KW\"],\"966\":[\"SA\"],\"967\":[\"YE\"],\"968\":[\"OM\"],\"970\":[\"PS\"],\"971\":[\"AE\"],\"972\":[\"IL\"],\"973\":[\"BH\"],\"974\":[\"QA\"],\"975\":[\"BT\"],\"976\":[\"MN\"],\"977\":[\"NP\"],\"992\":[\"TJ\"],\"993\":[\"TM\"],\"994\":[\"AZ\"],\"995\":[\"GE\"],\"996\":[\"KG\"],\"998\":[\"UZ\"]},\"countries\":{\"AC\":[\"247\",\"00\",\"(?:[01589]\\\\d|[46])\\\\d{4}\",[5,6],0,0,0,0,0,0,0,[0,[\"4\\\\d{4}\",[5]]]],\"AD\":[\"376\",\"00\",\"(?:1|6\\\\d)\\\\d{7}|[135-9]\\\\d{5}\",[6,8,9],[[\"(\\\\d{3})(\\\\d{3})\",\"$1 $2\",[\"[135-9]\"]],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"1\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"6\"]]],0,0,0,0,0,0,[0,[\"690\\\\d{6}|[356]\\\\d{5}\",[6,9]]]],\"AE\":[\"971\",\"00\",\"(?:[4-7]\\\\d|9[0-689])\\\\d{7}|800\\\\d{2,9}|[2-4679]\\\\d{7}\",[5,6,7,8,9,10,11,12],[[\"(\\\\d{3})(\\\\d{2,9})\",\"$1 $2\",[\"60|8\"]],[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[236]|[479][2-8]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d)(\\\\d{5})\",\"$1 $2 $3\",[\"[479]\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"5\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"5[024-68]\\\\d{7}\",[9]]]],\"AF\":[\"93\",\"00\",\"[2-7]\\\\d{8}\",[9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[2-7]\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"7\\\\d{8}\"]]],\"AG\":[\"1\",\"011\",\"(?:268|[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"([457]\\\\d{6})$|1\",\"268$1\",0,\"268\",[0,[\"268(?:464|7(?:1[3-9]|[28]\\\\d|3[0246]|64|7[0-689]))\\\\d{4}\"]]],\"AI\":[\"1\",\"011\",\"(?:264|[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"([2457]\\\\d{6})$|1\",\"264$1\",0,\"264\",[0,[\"264(?:235|4(?:69|76)|5(?:3[6-9]|8[1-4])|7(?:29|72))\\\\d{4}\"]]],\"AL\":[\"355\",\"00\",\"(?:700\\\\d\\\\d|900)\\\\d{3}|8\\\\d{5,7}|(?:[2-5]|6\\\\d)\\\\d{7}\",[6,7,8,9],[[\"(\\\\d{3})(\\\\d{3,4})\",\"$1 $2\",[\"80|9\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"4[2-6]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[2358][2-5]|4\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{5})\",\"$1 $2\",[\"[23578]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"6\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"6(?:[78][2-9]|9\\\\d)\\\\d{6}\",[9]]]],\"AM\":[\"374\",\"00\",\"(?:[1-489]\\\\d|55|60|77)\\\\d{6}\",[8],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"[89]0\"],\"0 $1\"],[\"(\\\\d{3})(\\\\d{5})\",\"$1 $2\",[\"2|3[12]\"],\"(0$1)\"],[\"(\\\\d{2})(\\\\d{6})\",\"$1 $2\",[\"1|47\"],\"(0$1)\"],[\"(\\\\d{2})(\\\\d{6})\",\"$1 $2\",[\"[3-9]\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"(?:33|4[1349]|55|77|88|9[13-9])\\\\d{6}\"]]],\"AO\":[\"244\",\"00\",\"[29]\\\\d{8}\",[9],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[29]\"]]],0,0,0,0,0,0,[0,[\"9[1-79]\\\\d{7}\"]]],\"AR\":[\"54\",\"00\",\"(?:11|[89]\\\\d\\\\d)\\\\d{8}|[2368]\\\\d{9}\",[10,11],[[\"(\\\\d{4})(\\\\d{2})(\\\\d{4})\",\"$1 $2-$3\",[\"2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])\",\"2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)\",\"2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]\",\"2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]\"],\"0$1\",1],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1 $2-$3\",[\"1\"],\"0$1\",1],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1-$2-$3\",[\"[68]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2-$3\",[\"[23]\"],\"0$1\",1],[\"(\\\\d)(\\\\d{4})(\\\\d{2})(\\\\d{4})\",\"$2 15-$3-$4\",[\"9(?:2[2-469]|3[3-578])\",\"9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))\",\"9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)\",\"9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]\",\"9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]\"],\"0$1\",0,\"$1 $2 $3-$4\"],[\"(\\\\d)(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$2 15-$3-$4\",[\"91\"],\"0$1\",0,\"$1 $2 $3-$4\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{5})\",\"$1-$2-$3\",[\"8\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$2 15-$3-$4\",[\"9\"],\"0$1\",0,\"$1 $2 $3-$4\"]],\"0\",0,\"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?\",\"9$1\",0,0,[0,[\"93(?:7(?:1[15]|81)|8(?:21|4[16]|69|9[12]))[46]\\\\d{5}|(?:675\\\\d|9(?:11[1-8]\\\\d|2(?:21[2-6]|(?:3[06]|49)4|6(?:04|1[2-8])|9[17][4-6])|3(?:(?:36|64)4|4(?:1[2-8]|[25][4-6]|84)|5(?:1[2-9]|[38][4-6])|8(?:[17][2-6]|3[4-6]|8[3-68]))))\\\\d{6}|9(?:2(?:23|64|99)|3(?:43|85))[3-6]\\\\d{6}|9(?:2(?:657|9(?:54|66))|3(?:487|7(?:55|77)|865))[2-8]\\\\d{5}|9(?:2(?:[28]0|37|6[36]|9[48])|3(?:62|7[069]|80))[45]\\\\d{6}|9(?:2(?:2(?:2[59]|44|52)|3(?:26|44)|47[35]|9(?:[07]2|2[26]|34|46))|3327)[45]\\\\d{5}|9(?:2(?:2(?:62|81)|320|622|9(?:42|83))|3(?:329|4(?:62|76|89)|564))[2-6]\\\\d{5}|9(?:2(?:284|3(?:02|23)|477|920)|3(?:4(?:46|[89]2)|541|878))[2-7]\\\\d{5}|92(?:2(?:21|4[23]|6[145]|7[1-4]|8[356]|9[267])|3(?:16|3[13-8]|43|5[346-8]|9[3-5])|6(?:2[46]|4[78]|5[1568])|9(?:03|2[1457-9]|3[1356]|4[08]|[56][23]|82))4\\\\d{5}|9(?:2(?:257|3(?:24|46|92)|9(?:01|23|64))|3(?:4(?:42|71)|5(?:25|37|4[347]|71)|7(?:18|35|5[17])))[3-6]\\\\d{5}|9(?:2(?:2(?:02|2[3467]|4[156]|5[45]|6[6-8]|91)|3(?:1[47]|25|[45][25]|96)|47[48]|625|932)|3(?:38[2578]|4(?:0[0-24-9]|3[78]|4[457]|58|6[03-9]|72|83|9[136-8])|5(?:2[124]|[368][23]|4[2689]|7[2-6])|7(?:16|2[15]|3[14]|4[13]|5[468]|7[2-5]|8[26])|8(?:2[5-7]|3[278]|4[3-5]|5[78]|6[1-378]|[78]7|94)))[4-6]\\\\d{5}\"]]],\"AS\":[\"1\",\"011\",\"(?:[58]\\\\d\\\\d|684|900)\\\\d{7}\",[10],0,\"1\",0,\"([267]\\\\d{6})$|1\",\"684$1\",0,\"684\",[0,[\"684(?:2(?:48|5[2468]|7[26])|7(?:3[13]|70|82))\\\\d{4}\"]]],\"AT\":[\"43\",\"00\",\"1\\\\d{3,12}|2\\\\d{6,12}|43(?:(?:0\\\\d|5[02-9])\\\\d{3,9}|2\\\\d{4,5}|[3467]\\\\d{4}|8\\\\d{4,6}|9\\\\d{4,7})|5\\\\d{4,12}|8\\\\d{7,12}|9\\\\d{8,12}|(?:[367]\\\\d|4[0-24-9])\\\\d{4,11}\",[4,5,6,7,8,9,10,11,12,13],[[\"(\\\\d)(\\\\d{3,12})\",\"$1 $2\",[\"1(?:11|[2-9])\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})\",\"$1 $2\",[\"517\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3,5})\",\"$1 $2\",[\"5[079]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3,10})\",\"$1 $2\",[\"(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{3,9})\",\"$1 $2\",[\"[2-467]|5[2-6]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"5\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4,7})\",\"$1 $2 $3\",[\"5\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"6(?:5[0-3579]|6[013-9]|[7-9]\\\\d)\\\\d{4,10}\",[7,8,9,10,11,12,13]]]],\"AU\":[\"61\",\"001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011\",\"1(?:[0-79]\\\\d{7}(?:\\\\d(?:\\\\d{2})?)?|8[0-24-9]\\\\d{7})|[2-478]\\\\d{8}|1\\\\d{4,7}\",[5,6,7,8,9,10,12],[[\"(\\\\d{2})(\\\\d{3,4})\",\"$1 $2\",[\"16\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2,4})\",\"$1 $2 $3\",[\"16\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"14|4\"],\"0$1\"],[\"(\\\\d)(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"[2378]\"],\"(0$1)\"],[\"(\\\\d{4})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"1(?:30|[89])\"]]],\"0\",0,\"(183[12])|0\",0,0,0,[0,[\"4(?:79[01]|83[0-389]|94[0-4])\\\\d{5}|4(?:[0-36]\\\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\\\d{6}\",[9]]],\"0011\"],\"AW\":[\"297\",\"00\",\"(?:[25-79]\\\\d\\\\d|800)\\\\d{4}\",[7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[25-9]\"]]],0,0,0,0,0,0,[0,[\"(?:290|5[69]\\\\d|6(?:[03]0|22|4[0-2]|[69]\\\\d)|7(?:[34]\\\\d|7[07])|9(?:6[45]|9[4-8]))\\\\d{4}\"]]],\"AX\":[\"358\",\"00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))\",\"2\\\\d{4,9}|35\\\\d{4,5}|(?:60\\\\d\\\\d|800)\\\\d{4,6}|7\\\\d{5,11}|(?:[14]\\\\d|3[0-46-9]|50)\\\\d{4,8}\",[5,6,7,8,9,10,11,12],0,\"0\",0,0,0,0,\"18\",[0,[\"4946\\\\d{2,6}|(?:4[0-8]|50)\\\\d{4,8}\",[6,7,8,9,10]]],\"00\"],\"AZ\":[\"994\",\"00\",\"365\\\\d{6}|(?:[124579]\\\\d|60|88)\\\\d{7}\",[9],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"90\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"1[28]|2|365|46\",\"1[28]|2|365[45]|46\",\"1[28]|2|365(?:4|5[02])|46\"],\"(0$1)\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[13-9]\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"36554\\\\d{4}|(?:[16]0|4[04]|5[015]|7[07]|99)\\\\d{7}\"]]],\"BA\":[\"387\",\"00\",\"6\\\\d{8}|(?:[35689]\\\\d|49|70)\\\\d{6}\",[8,9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"6[1-3]|[7-9]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2-$3\",[\"[3-5]|6[56]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"6\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"6040\\\\d{5}|6(?:03|[1-356]|44|7\\\\d)\\\\d{6}\"]]],\"BB\":[\"1\",\"011\",\"(?:246|[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-9]\\\\d{6})$|1\",\"246$1\",0,\"246\",[0,[\"246(?:(?:2(?:[3568]\\\\d|4[0-57-9])|3(?:5[2-9]|6[0-6])|4(?:46|5\\\\d)|69[5-7]|8(?:[2-5]\\\\d|83))\\\\d|52(?:1[147]|20))\\\\d{3}\"]]],\"BD\":[\"880\",\"00\",\"[1-469]\\\\d{9}|8[0-79]\\\\d{7,8}|[2-79]\\\\d{8}|[2-9]\\\\d{7}|[3-9]\\\\d{6}|[57-9]\\\\d{5}\",[6,7,8,9,10],[[\"(\\\\d{2})(\\\\d{4,6})\",\"$1-$2\",[\"31[5-8]|[459]1\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3,7})\",\"$1-$2\",[\"3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{3,6})\",\"$1-$2\",[\"[13-9]|2[23]\"],\"0$1\"],[\"(\\\\d)(\\\\d{7,8})\",\"$1-$2\",[\"2\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"(?:1[13-9]\\\\d|644)\\\\d{7}|(?:3[78]|44|66)[02-9]\\\\d{7}\",[10]]]],\"BE\":[\"32\",\"00\",\"4\\\\d{8}|[1-9]\\\\d{7}\",[8,9],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"(?:80|9)0\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[239]|4[23]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[15-8]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"4\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"4[5-9]\\\\d{7}\",[9]]]],\"BF\":[\"226\",\"00\",\"[025-7]\\\\d{7}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[025-7]\"]]],0,0,0,0,0,0,[0,[\"(?:0[1-7]|5[0-8]|[67]\\\\d)\\\\d{6}\"]]],\"BG\":[\"359\",\"00\",\"00800\\\\d{7}|[2-7]\\\\d{6,7}|[89]\\\\d{6,8}|2\\\\d{5}\",[6,7,8,9,12],[[\"(\\\\d)(\\\\d)(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"2\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"43[1-6]|70[1-9]\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"2\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2,3})\",\"$1 $2 $3\",[\"[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"(?:70|8)0\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{2})\",\"$1 $2 $3\",[\"43[1-7]|7\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[48]|9[08]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"9\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"(?:43[07-9]|99[69]\\\\d)\\\\d{5}|(?:8[7-9]|98)\\\\d{7}\",[8,9]]]],\"BH\":[\"973\",\"00\",\"[136-9]\\\\d{7}\",[8],[[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[13679]|8[02-4679]\"]]],0,0,0,0,0,0,[0,[\"(?:3(?:[0-79]\\\\d|8[0-57-9])\\\\d|6(?:3(?:00|33|6[16])|441|6(?:3[03-9]|[69]\\\\d|7[0-689])))\\\\d{4}\"]]],\"BI\":[\"257\",\"00\",\"(?:[267]\\\\d|31)\\\\d{6}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[2367]\"]]],0,0,0,0,0,0,[0,[\"(?:29|[67][125-9])\\\\d{6}\"]]],\"BJ\":[\"229\",\"00\",\"(?:01\\\\d|[24-689])\\\\d{7}\",[8,10],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[24-689]\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4 $5\",[\"0\"]]],0,0,0,0,0,0,[0,[\"(?:01(?:2[5-9]|[4-69]\\\\d)|4[0-8]|[56]\\\\d|9[013-9])\\\\d{6}\"]]],\"BL\":[\"590\",\"00\",\"(?:590\\\\d|7090)\\\\d{5}|(?:69|80|9\\\\d)\\\\d{7}\",[9],0,\"0\",0,0,0,0,0,[0,[\"(?:69(?:0\\\\d\\\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\\\d)|6(?:1[016-9]|5[0-4]|[67]\\\\d))|7090[0-4])\\\\d{4}\"]]],\"BM\":[\"1\",\"011\",\"(?:441|[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-9]\\\\d{6})$|1\",\"441$1\",0,\"441\",[0,[\"441(?:[2378]\\\\d|5[0-39]|9[02])\\\\d{5}\"]]],\"BN\":[\"673\",\"00\",\"[2-578]\\\\d{6}\",[7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[2-578]\"]]],0,0,0,0,0,0,[0,[\"(?:22[89]|[78]\\\\d\\\\d)\\\\d{4}\"]]],\"BO\":[\"591\",\"00(?:1\\\\d)?\",\"8001\\\\d{5}|(?:[2-467]\\\\d|50)\\\\d{6}\",[8,9],[[\"(\\\\d)(\\\\d{7})\",\"$1 $2\",[\"[235]|4[46]\"]],[\"(\\\\d{8})\",\"$1\",[\"[67]\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3\",[\"8\"]]],\"0\",0,\"0(1\\\\d)?\",0,0,0,[0,[\"[67]\\\\d{7}\",[8]]]],\"BQ\":[\"599\",\"00\",\"(?:[34]1|7\\\\d)\\\\d{5}\",[7],0,0,0,0,0,0,\"[347]\",[0,[\"(?:31(?:8[14-8]|9[14578])|416[14-9]|7(?:0[01]|7[07]|8\\\\d|9[056])\\\\d)\\\\d{3}\"]]],\"BR\":[\"55\",\"00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)\",\"(?:[1-46-9]\\\\d\\\\d|5(?:[0-46-9]\\\\d|5[0-46-9]))\\\\d{8}|[1-9]\\\\d{9}|[3589]\\\\d{8}|[34]\\\\d{7}\",[8,9,10,11],[[\"(\\\\d{4})(\\\\d{4})\",\"$1-$2\",[\"300|4(?:0[02]|37)\",\"4(?:02|37)0|[34]00\"]],[\"(\\\\d{3})(\\\\d{2,3})(\\\\d{4})\",\"$1 $2 $3\",[\"(?:[358]|90)0\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1 $2-$3\",[\"(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]\"],\"($1)\"],[\"(\\\\d{2})(\\\\d{5})(\\\\d{4})\",\"$1 $2-$3\",[\"[16][1-9]|[2-57-9]\"],\"($1)\"]],\"0\",0,\"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\\\d{10,11}))?\",\"$2\",0,0,[0,[\"(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])(?:7|9\\\\d)\\\\d{7}\",[10,11]]]],\"BS\":[\"1\",\"011\",\"(?:242|[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"([3-8]\\\\d{6})$|1\",\"242$1\",0,\"242\",[0,[\"242(?:3(?:5[79]|7[56]|95)|4(?:[23][1-9]|4[1-35-9]|5[1-8]|6[2-8]|7\\\\d|81)|5(?:2[45]|3[35]|44|5[1-46-9]|65|77)|6[34]6|7(?:27|38)|8(?:0[1-9]|1[02-9]|2\\\\d|3[0-4]|[89]9))\\\\d{4}\"]]],\"BT\":[\"975\",\"00\",\"[17]\\\\d{7}|[2-8]\\\\d{6}\",[7,8],[[\"(\\\\d)(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[2-68]|7[246]\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"1[67]|7\"]]],0,0,0,0,0,0,[0,[\"(?:1[67]|77)\\\\d{6}\",[8]]]],\"BW\":[\"267\",\"00\",\"(?:0800|(?:[37]|800)\\\\d)\\\\d{6}|(?:[2-6]\\\\d|90)\\\\d{5}\",[7,8,10],[[\"(\\\\d{2})(\\\\d{5})\",\"$1 $2\",[\"90\"]],[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[24-6]|3[15-9]\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[37]\"]],[\"(\\\\d{4})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"0\"]],[\"(\\\\d{3})(\\\\d{4})(\\\\d{3})\",\"$1 $2 $3\",[\"8\"]]],0,0,0,0,0,0,[0,[\"(?:321|7[1-8]\\\\d)\\\\d{5}\",[8]]]],\"BY\":[\"375\",\"810\",\"(?:[12]\\\\d|33|44|902)\\\\d{7}|8(?:0[0-79]\\\\d{5,7}|[1-7]\\\\d{9})|8(?:1[0-489]|[5-79]\\\\d)\\\\d{7}|8[1-79]\\\\d{6,7}|8[0-79]\\\\d{5}|8\\\\d{5}\",[6,7,8,9,10,11],[[\"(\\\\d{3})(\\\\d{3})\",\"$1 $2\",[\"800\"],\"8 $1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2,4})\",\"$1 $2 $3\",[\"800\"],\"8 $1\"],[\"(\\\\d{4})(\\\\d{2})(\\\\d{3})\",\"$1 $2-$3\",[\"1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])\",\"1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])\"],\"8 0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2-$3-$4\",[\"1(?:[56]|7[467])|2[1-3]\"],\"8 0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2-$3-$4\",[\"[1-4]\"],\"8 0$1\"],[\"(\\\\d{3})(\\\\d{3,4})(\\\\d{4})\",\"$1 $2 $3\",[\"[89]\"],\"8 $1\"]],\"8\",0,\"0|80?\",0,0,0,[0,[\"(?:2(?:5[5-79]|9[1-9])|(?:33|44)\\\\d)\\\\d{6}\",[9]]],\"8~10\"],\"BZ\":[\"501\",\"00\",\"(?:0800\\\\d|[2-8])\\\\d{6}\",[7,11],[[\"(\\\\d{3})(\\\\d{4})\",\"$1-$2\",[\"[2-8]\"]],[\"(\\\\d)(\\\\d{3})(\\\\d{4})(\\\\d{3})\",\"$1-$2-$3-$4\",[\"0\"]]],0,0,0,0,0,0,[0,[\"6[0-35-7]\\\\d{5}\",[7]]]],\"CA\":[\"1\",\"011\",\"[2-9]\\\\d{9}|3\\\\d{6}\",[7,10],0,\"1\",0,0,0,0,0,[0,[\"(?:2(?:04|[23]6|[48]9|50|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\\\d{6}\",[10]]]],\"CC\":[\"61\",\"001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011\",\"1(?:[0-79]\\\\d{8}(?:\\\\d{2})?|8[0-24-9]\\\\d{7})|[148]\\\\d{8}|1\\\\d{5,7}\",[6,7,8,9,10,12],0,\"0\",0,\"([59]\\\\d{7})$|0\",\"8$1\",0,0,[0,[\"4(?:79[01]|83[0-389]|94[0-4])\\\\d{5}|4(?:[0-36]\\\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\\\d{6}\",[9]]],\"0011\"],\"CD\":[\"243\",\"00\",\"(?:(?:[189]|5\\\\d)\\\\d|2)\\\\d{7}|[1-68]\\\\d{6}\",[7,8,9,10],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"88\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{5})\",\"$1 $2\",[\"[1-6]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3\",[\"2\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"1\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[89]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"5\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"88\\\\d{5}|(?:8[0-69]|9[017-9])\\\\d{7}\",[7,9]]]],\"CF\":[\"236\",\"00\",\"(?:[27]\\\\d{3}|8776)\\\\d{4}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[278]\"]]],0,0,0,0,0,0,[0,[\"7[024-7]\\\\d{6}\"]]],\"CG\":[\"242\",\"00\",\"222\\\\d{6}|(?:0\\\\d|80)\\\\d{7}\",[9],[[\"(\\\\d)(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"8\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[02]\"]]],0,0,0,0,0,0,[0,[\"026(?:1[0-5]|6[6-9])\\\\d{4}|0(?:[14-6]\\\\d\\\\d|2(?:40|5[5-8]|6[07-9]))\\\\d{5}\"]]],\"CH\":[\"41\",\"00\",\"8\\\\d{11}|[2-9]\\\\d{8}\",[9,12],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"8[047]|90\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[2-79]|81\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4 $5\",[\"8\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"(?:6[89]|7[235-9])\\\\d{7}\",[9]]]],\"CI\":[\"225\",\"00\",\"[02]\\\\d{9}\",[10],[[\"(\\\\d{2})(\\\\d{2})(\\\\d)(\\\\d{5})\",\"$1 $2 $3 $4\",[\"2\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3 $4\",[\"0\"]]],0,0,0,0,0,0,[0,[\"0[157]\\\\d{8}\"]]],\"CK\":[\"682\",\"00\",\"[2-578]\\\\d{4}\",[5],[[\"(\\\\d{2})(\\\\d{3})\",\"$1 $2\",[\"[2-578]\"]]],0,0,0,0,0,0,[0,[\"[578]\\\\d{4}\"]]],\"CL\":[\"56\",\"(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0\",\"12300\\\\d{6}|6\\\\d{9,10}|[2-9]\\\\d{8}\",[9,10,11],[[\"(\\\\d{5})(\\\\d{4})\",\"$1 $2\",[\"219\",\"2196\"],\"($1)\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"44\"]],[\"(\\\\d)(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"2[1-36]\"],\"($1)\"],[\"(\\\\d)(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"9[2-9]\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[1-9])\"],\"($1)\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"60|8\"]],[\"(\\\\d{4})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"1\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"60\"]]],0,0,0,0,0,0,[0,[\"2(?:1982[0-6]|3314[05-9])\\\\d{3}|(?:2(?:1(?:160|962)|3(?:2\\\\d\\\\d|3(?:[03467]\\\\d|1[0-35-9]|2[1-9]|5[0-24-9]|8[0-3])|600)|646[59])|80[1-9]\\\\d\\\\d|9(?:3(?:[0-57-9]\\\\d\\\\d|6(?:0[02-9]|[1-9]\\\\d))|6(?:[0-8]\\\\d\\\\d|9(?:[02-79]\\\\d|1[05-9]))|7[1-9]\\\\d\\\\d|9(?:[03-9]\\\\d\\\\d|1(?:[0235-9]\\\\d|4[0-24-9])|2(?:[0-79]\\\\d|8[0-46-9]))))\\\\d{4}|(?:22|3[2-5]|[47][1-35]|5[1-3578]|6[13-57]|8[1-9]|9[2458])\\\\d{7}\",[9]]]],\"CM\":[\"237\",\"00\",\"[26]\\\\d{8}|88\\\\d{6,7}\",[8,9],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"88\"]],[\"(\\\\d)(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4 $5\",[\"[26]|88\"]]],0,0,0,0,0,0,[0,[\"(?:24[23]|6(?:[25-9]\\\\d|40))\\\\d{6}\",[9]]]],\"CN\":[\"86\",\"00|1(?:[12]\\\\d|79)\\\\d\\\\d00\",\"(?:(?:1[03-689]|2\\\\d)\\\\d\\\\d|6)\\\\d{8}|1\\\\d{10}|[126]\\\\d{6}(?:\\\\d(?:\\\\d{2})?)?|86\\\\d{5,6}|(?:[3-579]\\\\d|8[0-57-9])\\\\d{5,9}\",[7,8,9,10,11,12],[[\"(\\\\d{2})(\\\\d{5,6})\",\"$1 $2\",[\"(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]\",\"(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\\\d|8[23])|5(?:[1357]\\\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1\",\"10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\\\d|8[23])|5(?:[1357]\\\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12\",\"10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\\\d|8[23])|5(?:[1357]\\\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123\",\"10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\\\d|8[23])|5(?:[1357]\\\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{5,6})\",\"$1 $2\",[\"3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]\",\"(?:3(?:[157]\\\\d|35|49|9[1-68])|4(?:[17]\\\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\\\d|4[13]|5[1-5]))[19]\",\"85[23](?:10|95)|(?:3(?:[157]\\\\d|35|49|9[1-68])|4(?:[17]\\\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\\\d|4[13]|5[1-5]))(?:10|9[56])\",\"85[23](?:100|95)|(?:3(?:[157]\\\\d|35|49|9[1-68])|4(?:[17]\\\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\\\d|4[13]|5[1-5]))(?:100|9[56])\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"(?:4|80)0\"]],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"10|2(?:[02-57-9]|1[1-9])\",\"10|2(?:[02-57-9]|1[1-9])\",\"10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])\"],\"0$1\",1],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]\"],\"0$1\",1],[\"(\\\\d{3})(\\\\d{7,8})\",\"$1 $2\",[\"9\"]],[\"(\\\\d{4})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"80\"],\"0$1\",1],[\"(\\\\d{3})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"[3-578]\"],\"0$1\",1],[\"(\\\\d{3})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"1[3-9]\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3 $4\",[\"[12]\"],\"0$1\",1]],\"0\",0,\"(1(?:[12]\\\\d|79)\\\\d\\\\d)|0\",0,0,0,[0,[\"1740[0-5]\\\\d{6}|1(?:[38]\\\\d|4[57]|[59][0-35-9]|6[25-7]|7[0-35-8])\\\\d{8}\",[11]]],\"00\"],\"CO\":[\"57\",\"00(?:4(?:[14]4|56)|[579])\",\"(?:46|60\\\\d\\\\d)\\\\d{6}|(?:1\\\\d|[39])\\\\d{9}\",[8,10,11],[[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"46\"]],[\"(\\\\d{3})(\\\\d{7})\",\"$1 $2\",[\"6|90\"],\"($1)\"],[\"(\\\\d{3})(\\\\d{7})\",\"$1 $2\",[\"3[0-357]|91\"]],[\"(\\\\d)(\\\\d{3})(\\\\d{7})\",\"$1-$2-$3\",[\"1\"],\"0$1\",0,\"$1 $2 $3\"]],\"0\",0,\"0([3579]|4(?:[14]4|56))?\",0,0,0,[0,[\"333301[0-5]\\\\d{3}|3333(?:00|2[5-9]|[3-9]\\\\d)\\\\d{4}|(?:3(?:24[1-9]|3(?:00|3[0-24-9]))|9101)\\\\d{6}|3(?:0[0-5]|1\\\\d|2[0-3]|5[01]|70)\\\\d{7}\",[10]]]],\"CR\":[\"506\",\"00\",\"(?:8\\\\d|90)\\\\d{8}|(?:[24-8]\\\\d{3}|3005)\\\\d{4}\",[8,10],[[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[2-7]|8[3-9]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1-$2-$3\",[\"[89]\"]]],0,0,\"(19(?:0[0-2468]|1[09]|20|66|77|99))\",0,0,0,[0,[\"(?:3005\\\\d|6500[01])\\\\d{3}|(?:5[07]|6[0-4]|7[0-3]|8[3-9])\\\\d{6}\",[8]]]],\"CU\":[\"53\",\"119\",\"(?:[2-7]|8\\\\d\\\\d)\\\\d{7}|[2-47]\\\\d{6}|[34]\\\\d{5}\",[6,7,8,10],[[\"(\\\\d{2})(\\\\d{4,6})\",\"$1 $2\",[\"2[1-4]|[34]\"],\"(0$1)\"],[\"(\\\\d)(\\\\d{6,7})\",\"$1 $2\",[\"7\"],\"(0$1)\"],[\"(\\\\d)(\\\\d{7})\",\"$1 $2\",[\"[56]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{7})\",\"$1 $2\",[\"8\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"(?:5\\\\d|6[2-4])\\\\d{6}\",[8]]]],\"CV\":[\"238\",\"0\",\"(?:[2-59]\\\\d\\\\d|800)\\\\d{4}\",[7],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3\",[\"[2-589]\"]]],0,0,0,0,0,0,[0,[\"(?:36|5[1-389]|9\\\\d)\\\\d{5}\"]]],\"CW\":[\"599\",\"00\",\"(?:[34]1|60|(?:7|9\\\\d)\\\\d)\\\\d{5}\",[7,8],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[3467]\"]],[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"9[4-8]\"]]],0,0,0,0,0,\"[69]\",[0,[\"953[01]\\\\d{4}|9(?:5[12467]|6[5-9])\\\\d{5}\"]]],\"CX\":[\"61\",\"001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011\",\"1(?:[0-79]\\\\d{8}(?:\\\\d{2})?|8[0-24-9]\\\\d{7})|[148]\\\\d{8}|1\\\\d{5,7}\",[6,7,8,9,10,12],0,\"0\",0,\"([59]\\\\d{7})$|0\",\"8$1\",0,0,[0,[\"4(?:79[01]|83[0-389]|94[0-4])\\\\d{5}|4(?:[0-36]\\\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\\\d{6}\",[9]]],\"0011\"],\"CY\":[\"357\",\"00\",\"(?:[279]\\\\d|[58]0)\\\\d{6}\",[8],[[\"(\\\\d{2})(\\\\d{6})\",\"$1 $2\",[\"[257-9]\"]]],0,0,0,0,0,0,[0,[\"9(?:10|[4-79]\\\\d)\\\\d{5}\"]]],\"CZ\":[\"420\",\"00\",\"(?:[2-578]\\\\d|60)\\\\d{7}|9\\\\d{8,11}\",[9,10,11,12],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[2-8]|9[015-7]\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"96\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"9\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"9\"]]],0,0,0,0,0,0,[0,[\"(?:60[1-8]\\\\d|7(?:0(?:[2-5]\\\\d|60)|19[0-2]|[2379]\\\\d\\\\d))\\\\d{5}\",[9]]]],\"DE\":[\"49\",\"00\",\"[2579]\\\\d{5,14}|49(?:[34]0|69|8\\\\d)\\\\d\\\\d?|49(?:37|49|60|7[089]|9\\\\d)\\\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\\\d{1,8}|(?:1|[368]\\\\d|4[0-8])\\\\d{3,13}|49(?:[015]\\\\d|2[13]|31|[46][1-8])\\\\d{1,9}\",[4,5,6,7,8,9,10,11,12,13,14,15],[[\"(\\\\d{2})(\\\\d{3,13})\",\"$1 $2\",[\"3[02]|40|[68]9\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3,12})\",\"$1 $2\",[\"2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1\",\"2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{2,11})\",\"$1 $2\",[\"[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]\",\"[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"138\"],\"0$1\"],[\"(\\\\d{5})(\\\\d{2,10})\",\"$1 $2\",[\"3\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{5,11})\",\"$1 $2\",[\"181\"],\"0$1\"],[\"(\\\\d{3})(\\\\d)(\\\\d{4,10})\",\"$1 $2 $3\",[\"1(?:3|80)|9\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{7,8})\",\"$1 $2\",[\"1[67]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{7,12})\",\"$1 $2\",[\"8\"],\"0$1\"],[\"(\\\\d{5})(\\\\d{6})\",\"$1 $2\",[\"185\",\"1850\",\"18500\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"7\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{7})\",\"$1 $2\",[\"18[68]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{7})\",\"$1 $2\",[\"15[1279]\"],\"0$1\"],[\"(\\\\d{5})(\\\\d{6})\",\"$1 $2\",[\"15[03568]\",\"15(?:[0568]|31)\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{8})\",\"$1 $2\",[\"18\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{7,8})\",\"$1 $2 $3\",[\"1(?:6[023]|7)\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{2})(\\\\d{7})\",\"$1 $2 $3\",[\"15[279]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{8})\",\"$1 $2 $3\",[\"15\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"1(?:(?:5(?:[0-25-9]\\\\d\\\\d|310)|76\\\\d\\\\d)\\\\d{6}|6[023]\\\\d{7,8})|17\\\\d{8}\",[10,11]]]],\"DJ\":[\"253\",\"00\",\"(?:2\\\\d|77)\\\\d{6}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[27]\"]]],0,0,0,0,0,0,[0,[\"77\\\\d{6}\"]]],\"DK\":[\"45\",\"00\",\"[2-9]\\\\d{7}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[2-9]\"]]],0,0,0,0,0,0,[0,[\"(?:2[6-8]|37|6[78]|96)\\\\d{6}|(?:2[0-59]|3[0-689]|[457]\\\\d|6[0-69]|8[126-9]|9[1-47-9])[1-9]\\\\d{5}\"]]],\"DM\":[\"1\",\"011\",\"(?:[58]\\\\d\\\\d|767|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-7]\\\\d{6})$|1\",\"767$1\",0,\"767\",[0,[\"767(?:2(?:[2-4689]5|7[5-7])|31[5-7]|61[1-8]|70[1-6])\\\\d{4}\"]]],\"DO\":[\"1\",\"011\",\"(?:[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,0,0,0,\"8001|8[024]9\",[0,[\"8[024]9[2-9]\\\\d{6}\"]]],\"DZ\":[\"213\",\"00\",\"(?:[1-4]|[5-79]\\\\d|80)\\\\d{7}\",[8,9],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[1-4]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"9\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[5-8]\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"(?:5(?:4[0-29]|5\\\\d|6[0-3])|6(?:[569]\\\\d|7[0-6])|7[7-9]\\\\d)\\\\d{6}\",[9]]]],\"EC\":[\"593\",\"00\",\"1\\\\d{9,10}|(?:[2-7]|9\\\\d)\\\\d{7}\",[8,9,10,11],[[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2-$3\",[\"[2-7]\"],\"(0$1)\",0,\"$1-$2-$3\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"9\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"1\"]]],\"0\",0,0,0,0,0,[0,[\"964[0-2]\\\\d{5}|9(?:39|[57][89]|6[0-36-9]|[89]\\\\d)\\\\d{6}\",[9]]]],\"EE\":[\"372\",\"00\",\"8\\\\d{9}|[4578]\\\\d{7}|(?:[3-8]\\\\d|90)\\\\d{5}\",[7,8,10],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88\",\"[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88\"]],[\"(\\\\d{4})(\\\\d{3,4})\",\"$1 $2\",[\"[45]|8(?:00|[1-49])\",\"[45]|8(?:00[1-9]|[1-49])\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3\",[\"7\"]],[\"(\\\\d{4})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"8\"]]],0,0,0,0,0,0,[0,[\"(?:5\\\\d{5}|8(?:1(?:0(?:0(?:00|[178]\\\\d)|[3-9]\\\\d\\\\d)|(?:1(?:0[2-6]|1\\\\d)|(?:2[0-59]|[3-79]\\\\d)\\\\d)\\\\d)|2(?:0(?:0(?:00|4\\\\d)|(?:19|[2-7]\\\\d)\\\\d)|(?:(?:[124-69]\\\\d|3[5-9])\\\\d|7(?:[0-79]\\\\d|8[13-9])|8(?:[2-6]\\\\d|7[01]))\\\\d)|[349]\\\\d{4}))\\\\d\\\\d|5(?:(?:[02]\\\\d|5[0-478])\\\\d|1(?:[0-8]\\\\d|95)|6(?:4[0-4]|5[1-589]))\\\\d{3}\",[7,8]]]],\"EG\":[\"20\",\"00\",\"[189]\\\\d{8,9}|[24-6]\\\\d{8}|[135]\\\\d{7}\",[8,9,10],[[\"(\\\\d)(\\\\d{7,8})\",\"$1 $2\",[\"[23]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{6,7})\",\"$1 $2\",[\"1[35]|[4-6]|8[2468]|9[235-7]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[89]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{8})\",\"$1 $2\",[\"1\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"1[0-25]\\\\d{8}\",[10]]]],\"EH\":[\"212\",\"00\",\"[5-8]\\\\d{8}\",[9],0,\"0\",0,0,0,0,\"528[89]\",[0,[\"(?:6(?:[0-79]\\\\d|8[0-247-9])|7(?:[0167]\\\\d|2[0-467]|5[0-3]|8[0-5]))\\\\d{6}\"]]],\"ER\":[\"291\",\"00\",\"[178]\\\\d{6}\",[7],[[\"(\\\\d)(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[178]\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"(?:17[1-3]|7\\\\d\\\\d)\\\\d{4}\"]]],\"ES\":[\"34\",\"00\",\"[5-9]\\\\d{8}\",[9],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[89]00\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[5-9]\"]]],0,0,0,0,0,0,[0,[\"(?:590[16]00\\\\d|9(?:6906(?:09|10)|7390\\\\d\\\\d))\\\\d\\\\d|(?:6\\\\d|7[1-48])\\\\d{7}\"]]],\"ET\":[\"251\",\"00\",\"(?:11|[2-579]\\\\d)\\\\d{7}\",[9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[1-579]\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"700[1-9]\\\\d{5}|(?:7(?:0[1-9]|1[0-8]|22|77|86|99)|9\\\\d\\\\d)\\\\d{6}\"]]],\"FI\":[\"358\",\"00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))\",\"[1-35689]\\\\d{4}|7\\\\d{10,11}|(?:[124-7]\\\\d|3[0-46-9])\\\\d{8}|[1-9]\\\\d{5,8}\",[5,6,7,8,9,10,11,12],[[\"(\\\\d{5})\",\"$1\",[\"20[2-59]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3,7})\",\"$1 $2\",[\"(?:[1-3]0|[68])0|70[07-9]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4,8})\",\"$1 $2\",[\"[14]|2[09]|50|7[135]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{6,10})\",\"$1 $2\",[\"7\"],\"0$1\"],[\"(\\\\d)(\\\\d{4,9})\",\"$1 $2\",[\"(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9\"],\"0$1\"]],\"0\",0,0,0,0,\"1[03-79]|[2-9]\",[0,[\"4946\\\\d{2,6}|(?:4[0-8]|50)\\\\d{4,8}\",[6,7,8,9,10]]],\"00\"],\"FJ\":[\"679\",\"0(?:0|52)\",\"45\\\\d{5}|(?:0800\\\\d|[235-9])\\\\d{6}\",[7,11],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[235-9]|45\"]],[\"(\\\\d{4})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"0\"]]],0,0,0,0,0,0,[0,[\"(?:[279]\\\\d|45|5[01568]|8[034679])\\\\d{5}\",[7]]],\"00\"],\"FK\":[\"500\",\"00\",\"[2-7]\\\\d{4}\",[5],0,0,0,0,0,0,0,[0,[\"[56]\\\\d{4}\"]]],\"FM\":[\"691\",\"00\",\"(?:[39]\\\\d\\\\d|820)\\\\d{4}\",[7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[389]\"]]],0,0,0,0,0,0,[0,[\"31(?:00[67]|208|309)\\\\d\\\\d|(?:3(?:[2357]0[1-9]|602|804|905)|(?:820|9[2-7]\\\\d)\\\\d)\\\\d{3}\"]]],\"FO\":[\"298\",\"00\",\"[2-9]\\\\d{5}\",[6],[[\"(\\\\d{6})\",\"$1\",[\"[2-9]\"]]],0,0,\"(10(?:01|[12]0|88))\",0,0,0,[0,[\"(?:[27][1-9]|5\\\\d|9[16])\\\\d{4}\"]]],\"FR\":[\"33\",\"00\",\"[1-9]\\\\d{8}\",[9],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"8\"],\"0 $1\"],[\"(\\\\d)(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4 $5\",[\"[1-79]\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"(?:6(?:[0-24-8]\\\\d|3[0-8]|9[589])|7[3-9]\\\\d)\\\\d{6}\"]]],\"GA\":[\"241\",\"00\",\"(?:[067]\\\\d|11)\\\\d{6}|[2-7]\\\\d{6}\",[7,8],[[\"(\\\\d)(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[2-7]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"0\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"11|[67]\"],\"0$1\"]],0,0,\"0(11\\\\d{6}|60\\\\d{6}|61\\\\d{6}|6[256]\\\\d{6}|7[467]\\\\d{6})\",\"$1\",0,0,[0,[\"(?:(?:0[2-7]|7[467])\\\\d|6(?:0[0-4]|10|[256]\\\\d))\\\\d{5}|[2-7]\\\\d{6}\"]]],\"GB\":[\"44\",\"00\",\"[1-357-9]\\\\d{9}|[18]\\\\d{8}|8\\\\d{6}\",[7,9,10],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"800\",\"8001\",\"80011\",\"800111\",\"8001111\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3\",[\"845\",\"8454\",\"84546\",\"845464\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{6})\",\"$1 $2\",[\"800\"],\"0$1\"],[\"(\\\\d{5})(\\\\d{4,5})\",\"$1 $2\",[\"1(?:38|5[23]|69|76|94)\",\"1(?:(?:38|69)7|5(?:24|39)|768|946)\",\"1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{5,6})\",\"$1 $2\",[\"1(?:[2-69][02-9]|[78])\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"[25]|7(?:0|6[02-9])\",\"[25]|7(?:0|6(?:[03-9]|2[356]))\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{6})\",\"$1 $2\",[\"7\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[1389]\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"7(?:457[0-57-9]|700[01]|911[028])\\\\d{5}|7(?:[1-3]\\\\d\\\\d|4(?:[0-46-9]\\\\d|5[0-689])|5(?:0[0-8]|[13-9]\\\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\\\d|8[02-9]|9[0-689])|8(?:[014-9]\\\\d|[23][0-8])|9(?:[024-9]\\\\d|1[02-9]|3[0-689]))\\\\d{6}\",[10]]],0,\" x\"],\"GD\":[\"1\",\"011\",\"(?:473|[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-9]\\\\d{6})$|1\",\"473$1\",0,\"473\",[0,[\"473(?:4(?:0[2-79]|1[04-9]|2[0-5]|49|5[68])|5(?:2[01]|3[3-8])|901)\\\\d{4}\"]]],\"GE\":[\"995\",\"00\",\"(?:[3-57]\\\\d\\\\d|800)\\\\d{6}\",[9],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"70\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"32\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[57]\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[348]\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"5(?:(?:(?:0555|1(?:[17]77|555))[5-9]|757(?:7[7-9]|8[01]))\\\\d|22252[0-4])\\\\d\\\\d|5(?:0(?:0[17]0|505)|1(?:0[01]0|1(?:07|33|51))|2(?:0[02]0|2[25]2)|3(?:0[03]0|3[35]3)|(?:40[04]|900)0|5222)[0-4]\\\\d{3}|(?:5(?:0(?:0(?:0\\\\d|11|22|3[0-6]|44|5[05]|77|88|9[09])|(?:[14]\\\\d|77)\\\\d|22[02])|1(?:1(?:[03][01]|[124]\\\\d|5[2-6]|7[0-4])|4\\\\d\\\\d)|[23]555|4(?:4\\\\d\\\\d|555)|5(?:[0157-9]\\\\d\\\\d|200|333|444)|6[89]\\\\d\\\\d|7(?:[0147-9]\\\\d\\\\d|5(?:00|[57]5))|8(?:0(?:[018]\\\\d|2[0-4])|5(?:55|8[89])|8(?:55|88))|9(?:090|[1-35-9]\\\\d\\\\d))|790\\\\d\\\\d)\\\\d{4}\"]]],\"GF\":[\"594\",\"00\",\"(?:[56]94\\\\d|7093)\\\\d{5}|(?:80|9\\\\d)\\\\d{7}\",[9],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[5-7]|9[47]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[89]\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"(?:694(?:[0-249]\\\\d|3[0-8])|7093[0-3])\\\\d{4}\"]]],\"GG\":[\"44\",\"00\",\"(?:1481|[357-9]\\\\d{3})\\\\d{6}|8\\\\d{6}(?:\\\\d{2})?\",[7,9,10],0,\"0\",0,\"([25-9]\\\\d{5})$|0\",\"1481$1\",0,0,[0,[\"7(?:(?:781|839)\\\\d|911[17])\\\\d{5}\",[10]]]],\"GH\":[\"233\",\"00\",\"(?:[235]\\\\d{3}|800)\\\\d{5}\",[8,9],[[\"(\\\\d{3})(\\\\d{5})\",\"$1 $2\",[\"8\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[235]\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"(?:2(?:[0346-9]\\\\d|5[67])|5(?:[03-7]\\\\d|9[1-9]))\\\\d{6}\",[9]]]],\"GI\":[\"350\",\"00\",\"(?:[25]\\\\d|60)\\\\d{6}\",[8],[[\"(\\\\d{3})(\\\\d{5})\",\"$1 $2\",[\"2\"]]],0,0,0,0,0,0,[0,[\"5251[0-4]\\\\d{3}|(?:5(?:[146-8]\\\\d\\\\d|250)|60(?:1[01]|6\\\\d))\\\\d{4}\"]]],\"GL\":[\"299\",\"00\",\"(?:19|[2-689]\\\\d|70)\\\\d{4}\",[6],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3\",[\"19|[2-9]\"]]],0,0,0,0,0,0,[0,[\"[245]\\\\d{5}\"]]],\"GM\":[\"220\",\"00\",\"[2-9]\\\\d{6}\",[7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[2-9]\"]]],0,0,0,0,0,0,[0,[\"(?:[23679]\\\\d|4[015]|5[0-489])\\\\d{5}\"]]],\"GN\":[\"224\",\"00\",\"722\\\\d{6}|(?:3|6\\\\d)\\\\d{7}\",[8,9],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"3\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[67]\"]]],0,0,0,0,0,0,[0,[\"6[0-356]\\\\d{7}\",[9]]]],\"GP\":[\"590\",\"00\",\"(?:590\\\\d|7090)\\\\d{5}|(?:69|80|9\\\\d)\\\\d{7}\",[9],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[5-79]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"8\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"(?:69(?:0\\\\d\\\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\\\d)|6(?:1[016-9]|5[0-4]|[67]\\\\d))|7090[0-4])\\\\d{4}\"]]],\"GQ\":[\"240\",\"00\",\"222\\\\d{6}|(?:3\\\\d|55|[89]0)\\\\d{7}\",[9],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[235]\"]],[\"(\\\\d{3})(\\\\d{6})\",\"$1 $2\",[\"[89]\"]]],0,0,0,0,0,0,[0,[\"(?:222|55\\\\d)\\\\d{6}\"]]],\"GR\":[\"30\",\"00\",\"5005000\\\\d{3}|8\\\\d{9,11}|(?:[269]\\\\d|70)\\\\d{8}\",[10,11,12],[[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"21|7\"]],[\"(\\\\d{4})(\\\\d{6})\",\"$1 $2\",[\"2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[2689]\"]],[\"(\\\\d{3})(\\\\d{3,4})(\\\\d{5})\",\"$1 $2 $3\",[\"8\"]]],0,0,0,0,0,0,[0,[\"68[57-9]\\\\d{7}|(?:69|94)\\\\d{8}\",[10]]]],\"GT\":[\"502\",\"00\",\"80\\\\d{6}|(?:1\\\\d{3}|[2-7])\\\\d{7}\",[8,11],[[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[2-8]\"]],[\"(\\\\d{4})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"1\"]]],0,0,0,0,0,0,[0,[\"(?:[3-5]\\\\d\\\\d|80[0-4])\\\\d{5}\",[8]]]],\"GU\":[\"1\",\"011\",\"(?:[58]\\\\d\\\\d|671|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-9]\\\\d{6})$|1\",\"671$1\",0,\"671\",[0,[\"671(?:2\\\\d\\\\d|3(?:00|3[39]|4[349]|55|6[26])|4(?:00|56|7[1-9]|8[02-9])|5(?:55|6[2-5]|88)|6(?:3[2-578]|4[24-9]|5[34]|78|8[235-9])|7(?:[0479]7|2[0167]|3[45]|8[7-9])|8(?:[2-57-9]8|6[478])|9(?:2[29]|6[79]|7[1279]|8[7-9]|9[78]))\\\\d{4}\"]]],\"GW\":[\"245\",\"00\",\"[49]\\\\d{8}|4\\\\d{6}\",[7,9],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"40\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[49]\"]]],0,0,0,0,0,0,[0,[\"9(?:5\\\\d|6[569]|77)\\\\d{6}\",[9]]]],\"GY\":[\"592\",\"001\",\"(?:[2-8]\\\\d{3}|9008)\\\\d{3}\",[7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[2-9]\"]]],0,0,0,0,0,0,[0,[\"510\\\\d{4}|(?:6\\\\d|7[0-5])\\\\d{5}\"]]],\"HK\":[\"852\",\"00(?:30|5[09]|[126-9]?)\",\"8[0-46-9]\\\\d{6,7}|9\\\\d{4,7}|(?:[2-7]|9\\\\d{3})\\\\d{7}\",[5,6,7,8,9,11],[[\"(\\\\d{3})(\\\\d{2,5})\",\"$1 $2\",[\"900\",\"9003\"]],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[2-7]|8[1-4]|9(?:0[1-9]|[1-8])\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"8\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"9\"]]],0,0,0,0,0,0,[0,[\"(?:4(?:44[0-25-9]|6(?:1[0-7]|4[0-57-9]|6[0-4])|7(?:4[0-2]|6[0-5]))|5(?:73[0-6]|95[0-8])|6(?:26[013-8]|66[0-3])|70(?:7[1-8]|8[0-4])|84(?:4[0-2]|8[0-35-9])|9(?:29[013-9]|39[014-9]|59[0-4]|899))\\\\d{4}|(?:4(?:4[0-35-9]|6[02357-9]|7[015])|5(?:[1-59][0-46-9]|6[0-4689]|7[0-246-9])|6(?:0[1-9]|[13-59]\\\\d|[268][0-57-9]|7[0-79])|70[1-59]|84[0-39]|9(?:0[1-9]|1[02-9]|[2358][0-8]|[467]\\\\d))\\\\d{5}\",[8]]],\"00\"],\"HN\":[\"504\",\"00\",\"8\\\\d{10}|[237-9]\\\\d{7}\",[8,11],[[\"(\\\\d{4})(\\\\d{4})\",\"$1-$2\",[\"[237-9]\"]]],0,0,0,0,0,0,[0,[\"[37-9]\\\\d{7}\",[8]]]],\"HR\":[\"385\",\"00\",\"(?:[24-69]\\\\d|3[0-79])\\\\d{7}|80\\\\d{5,7}|[1-79]\\\\d{7}|6\\\\d{5,6}\",[6,7,8,9],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2,3})\",\"$1 $2 $3\",[\"6[01]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2,3})\",\"$1 $2 $3\",[\"8\"],\"0$1\"],[\"(\\\\d)(\\\\d{4})(\\\\d{3})\",\"$1 $2 $3\",[\"1\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"6|7[245]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"9\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[2-57]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"8\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"9(?:(?:0[1-9]|[12589]\\\\d)\\\\d\\\\d|7(?:[0679]\\\\d\\\\d|5(?:[01]\\\\d|44|55|77|9[5-79])))\\\\d{4}|98\\\\d{6}\",[8,9]]]],\"HT\":[\"509\",\"00\",\"(?:[2-489]\\\\d|55)\\\\d{6}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3\",[\"[2-589]\"]]],0,0,0,0,0,0,[0,[\"(?:[34]\\\\d|55)\\\\d{6}\"]]],\"HU\":[\"36\",\"00\",\"[235-7]\\\\d{8}|[1-9]\\\\d{7}\",[8,9],[[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"1\"],\"(06 $1)\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]\"],\"(06 $1)\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[2-9]\"],\"06 $1\"]],\"06\",0,0,0,0,0,[0,[\"(?:[257]0|3[01])\\\\d{7}\",[9]]]],\"ID\":[\"62\",\"00[89]\",\"00[1-9]\\\\d{9,14}|(?:[1-36]|8\\\\d{5})\\\\d{6}|00\\\\d{9}|[1-9]\\\\d{8,10}|[2-9]\\\\d{7}\",[7,8,9,10,11,12,13,14,15,16,17],[[\"(\\\\d)(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"15\"]],[\"(\\\\d{2})(\\\\d{5,9})\",\"$1 $2\",[\"2[124]|[36]1\"],\"(0$1)\"],[\"(\\\\d{3})(\\\\d{5,7})\",\"$1 $2\",[\"800\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{5,8})\",\"$1 $2\",[\"[2-79]\"],\"(0$1)\"],[\"(\\\\d{3})(\\\\d{3,4})(\\\\d{3})\",\"$1-$2-$3\",[\"8[1-35-9]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{6,8})\",\"$1 $2\",[\"1\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"804\"],\"0$1\"],[\"(\\\\d{3})(\\\\d)(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"80\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{4})(\\\\d{4,5})\",\"$1-$2-$3\",[\"8\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"8[1-35-9]\\\\d{7,10}\",[9,10,11,12]]]],\"IE\":[\"353\",\"00\",\"(?:1\\\\d|[2569])\\\\d{6,8}|4\\\\d{6,9}|7\\\\d{8}|8\\\\d{8,9}\",[7,8,9,10],[[\"(\\\\d{2})(\\\\d{5})\",\"$1 $2\",[\"2[24-9]|47|58|6[237-9]|9[35-9]\"],\"(0$1)\"],[\"(\\\\d{3})(\\\\d{5})\",\"$1 $2\",[\"[45]0\"],\"(0$1)\"],[\"(\\\\d)(\\\\d{3,4})(\\\\d{4})\",\"$1 $2 $3\",[\"1\"],\"(0$1)\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[2569]|4[1-69]|7[14]\"],\"(0$1)\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"70\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"81\"],\"(0$1)\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[78]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"1\"]],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"4\"],\"(0$1)\"],[\"(\\\\d{2})(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3 $4\",[\"8\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"8(?:22|[35-9]\\\\d)\\\\d{6}\",[9]]]],\"IL\":[\"972\",\"0(?:0|1[2-9])\",\"1\\\\d{6}(?:\\\\d{3,5})?|[57]\\\\d{8}|[1-489]\\\\d{7}\",[7,8,9,10,11,12],[[\"(\\\\d{4})(\\\\d{3})\",\"$1-$2\",[\"125\"]],[\"(\\\\d{4})(\\\\d{2})(\\\\d{2})\",\"$1-$2-$3\",[\"121\"]],[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1-$2-$3\",[\"[2-489]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1-$2-$3\",[\"[57]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{3})(\\\\d{3})\",\"$1-$2-$3\",[\"12\"]],[\"(\\\\d{4})(\\\\d{6})\",\"$1-$2\",[\"159\"]],[\"(\\\\d)(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1-$2-$3-$4\",[\"1[7-9]\"]],[\"(\\\\d{3})(\\\\d{1,2})(\\\\d{3})(\\\\d{4})\",\"$1-$2 $3-$4\",[\"15\"]]],\"0\",0,0,0,0,0,[0,[\"55(?:4(?:[01]0|5[0-2])|57[0-289])\\\\d{4}|5(?:(?:[0-2][02-9]|[36]\\\\d|[49][2-9]|8[3-7])\\\\d|5(?:01|2\\\\d|3[0-3]|4[34]|5[0-25689]|6[6-8]|7[0-267]|8[7-9]|9[1-9]))\\\\d{5}\",[9]]]],\"IM\":[\"44\",\"00\",\"1624\\\\d{6}|(?:[3578]\\\\d|90)\\\\d{8}\",[10],0,\"0\",0,\"([25-8]\\\\d{5})$|0\",\"1624$1\",0,\"74576|(?:16|7[56])24\",[0,[\"76245[06]\\\\d{4}|7(?:4576|[59]24\\\\d|624[0-4689])\\\\d{5}\"]]],\"IN\":[\"91\",\"00\",\"(?:000800|[2-9]\\\\d\\\\d)\\\\d{7}|1\\\\d{7,12}\",[8,9,10,11,12,13],[[\"(\\\\d{8})\",\"$1\",[\"5(?:0|2[23]|3[03]|[67]1|88)\",\"5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)\",\"5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)\"],0,1],[\"(\\\\d{4})(\\\\d{4,5})\",\"$1 $2\",[\"180\",\"1800\"],0,1],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"140\"],0,1],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"11|2[02]|33|4[04]|79[1-7]|80[2-46]\",\"11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])\",\"11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])\"],\"0$1\",1],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]\",\"1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]\",\"1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]\"],\"0$1\",1],[\"(\\\\d{4})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807\",\"1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]\",\"1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\\\d|7(?:1(?:[013-8]\\\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\\\d|5[0-367])|70[13-7]))[2-7]\"],\"0$1\",1],[\"(\\\\d{5})(\\\\d{5})\",\"$1 $2\",[\"[6-9]\"],\"0$1\",1],[\"(\\\\d{4})(\\\\d{2,4})(\\\\d{4})\",\"$1 $2 $3\",[\"1(?:6|8[06])\",\"1(?:6|8[06]0)\"],0,1],[\"(\\\\d{4})(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"18\"],0,1]],\"0\",0,0,0,0,0,[0,[\"(?:61279|7(?:887[02-9]|9(?:313|79[07-9]))|8(?:079[04-9]|(?:84|91)7[02-8]))\\\\d{5}|(?:6(?:12|[2-47]1|5[17]|6[13]|80)[0189]|7(?:1(?:2[0189]|9[0-5])|2(?:[14][017-9]|8[0-59])|3(?:2[5-8]|[34][017-9]|9[016-9])|4(?:1[015-9]|[29][89]|39|8[389])|5(?:[15][017-9]|2[04-9]|9[7-9])|6(?:0[0-47]|1[0-257-9]|2[0-4]|3[19]|5[4589])|70[0289]|88[089]|97[02-8])|8(?:0(?:6[67]|7[02-8])|70[017-9]|84[01489]|91[0-289]))\\\\d{6}|(?:7(?:31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[0189]\\\\d|7[02-8])\\\\d{5}|(?:6(?:[09]\\\\d|1[04679]|2[03689]|3[05-9]|4[0489]|50|6[069]|7[07]|8[7-9])|7(?:0\\\\d|2[0235-79]|3[05-8]|40|5[0346-8]|6[6-9]|7[1-9]|8[0-79]|9[089])|8(?:0[01589]|1[0-57-9]|2[235-9]|3[03-57-9]|[45]\\\\d|6[02457-9]|7[1-69]|8[0-25-9]|9[02-9])|9\\\\d\\\\d)\\\\d{7}|(?:6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|8[124-6])\\\\d|7(?:[235689]\\\\d|4[0189]))|7(?:1(?:[013-8]\\\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-5])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\\\d|5[0-367])|70[13-7]|881))[0189]\\\\d{5}\",[10]]]],\"IO\":[\"246\",\"00\",\"3\\\\d{6}\",[7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"3\"]]],0,0,0,0,0,0,[0,[\"38\\\\d{5}\"]]],\"IQ\":[\"964\",\"00\",\"(?:1|7\\\\d\\\\d)\\\\d{7}|[2-6]\\\\d{7,8}\",[8,9,10],[[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"1\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[2-6]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"7\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"7[3-9]\\\\d{8}\",[10]]]],\"IR\":[\"98\",\"00\",\"[1-9]\\\\d{9}|(?:[1-8]\\\\d\\\\d|9)\\\\d{3,4}\",[4,5,6,7,10],[[\"(\\\\d{4,5})\",\"$1\",[\"96\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4,5})\",\"$1 $2\",[\"(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"9\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"[1-8]\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"9(?:(?:0(?:[0-35]\\\\d|4[4-6])|(?:[13]\\\\d|2[0-3])\\\\d)\\\\d|9(?:[0-46]\\\\d\\\\d|5[15]0|8(?:[12]\\\\d|88)|9(?:0[0-3]|[19]\\\\d|21|69|77|8[7-9])))\\\\d{5}\",[10]]]],\"IS\":[\"354\",\"00|1(?:0(?:01|[12]0)|100)\",\"(?:38\\\\d|[4-9])\\\\d{6}\",[7,9],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[4-9]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"3\"]]],0,0,0,0,0,0,[0,[\"(?:38[589]\\\\d\\\\d|6(?:1[1-8]|2[0-6]|3[026-9]|4[014679]|5[0159]|6[0-69]|70|8[06-8]|9\\\\d)|7(?:5[057]|[6-9]\\\\d)|8(?:2[0-59]|[3-69]\\\\d|8[238]))\\\\d{4}\"]],\"00\"],\"IT\":[\"39\",\"00\",\"0\\\\d{5,10}|1\\\\d{8,10}|3(?:[0-8]\\\\d{7,10}|9\\\\d{7,8})|(?:43|55|70)\\\\d{8}|8\\\\d{5}(?:\\\\d{2,4})?\",[6,7,8,9,10,11,12],[[\"(\\\\d{2})(\\\\d{4,6})\",\"$1 $2\",[\"0[26]\"]],[\"(\\\\d{3})(\\\\d{3,6})\",\"$1 $2\",[\"0[13-57-9][0159]|8(?:03|4[17]|9[2-5])\",\"0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))\"]],[\"(\\\\d{4})(\\\\d{2,6})\",\"$1 $2\",[\"0(?:[13-579][2-46-8]|8[236-8])\"]],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"894\"]],[\"(\\\\d{2})(\\\\d{3,4})(\\\\d{4})\",\"$1 $2 $3\",[\"0[26]|5\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"1(?:44|[679])|[378]|43\"]],[\"(\\\\d{3})(\\\\d{3,4})(\\\\d{4})\",\"$1 $2 $3\",[\"0[13-57-9][0159]|14\"]],[\"(\\\\d{2})(\\\\d{4})(\\\\d{5})\",\"$1 $2 $3\",[\"0[26]\"]],[\"(\\\\d{4})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"0\"]],[\"(\\\\d{3})(\\\\d{4})(\\\\d{4,5})\",\"$1 $2 $3\",[\"3\"]]],0,0,0,0,0,0,[0,[\"3[2-9]\\\\d{7,8}|(?:31|43)\\\\d{8}\",[9,10]]]],\"JE\":[\"44\",\"00\",\"1534\\\\d{6}|(?:[3578]\\\\d|90)\\\\d{8}\",[10],0,\"0\",0,\"([0-24-8]\\\\d{5})$|0\",\"1534$1\",0,0,[0,[\"7(?:(?:(?:50|82)9|937)\\\\d|7(?:00[378]|97\\\\d))\\\\d{5}\"]]],\"JM\":[\"1\",\"011\",\"(?:[58]\\\\d\\\\d|658|900)\\\\d{7}\",[10],0,\"1\",0,0,0,0,\"658|876\",[0,[\"(?:658295|876(?:2(?:0[1-9]|[13-9]\\\\d|2[013-9])|[348]\\\\d\\\\d|5(?:0[1-9]|[1-9]\\\\d)|6(?:4[89]|6[67])|7(?:0[07]|7\\\\d|8[1-47-9]|9[0-36-9])|9(?:[01]9|9[0579])))\\\\d{4}\"]]],\"JO\":[\"962\",\"00\",\"(?:(?:[2689]|7\\\\d)\\\\d|32|53)\\\\d{6}\",[8,9],[[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[2356]|87\"],\"(0$1)\"],[\"(\\\\d{3})(\\\\d{5,6})\",\"$1 $2\",[\"[89]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{7})\",\"$1 $2\",[\"70\"],\"0$1\"],[\"(\\\\d)(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"7\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"7(?:[78][0-25-9]|9\\\\d)\\\\d{6}\",[9]]]],\"JP\":[\"81\",\"010\",\"00[1-9]\\\\d{6,14}|[25-9]\\\\d{9}|(?:00|[1-9]\\\\d\\\\d)\\\\d{6}\",[8,9,10,11,12,13,14,15,16,17],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1-$2-$3\",[\"(?:12|57|99)0\"],\"0$1\"],[\"(\\\\d{4})(\\\\d)(\\\\d{4})\",\"$1-$2-$3\",[\"1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])\",\"1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]\",\"1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1-$2-$3\",[\"60\"],\"0$1\"],[\"(\\\\d)(\\\\d{4})(\\\\d{4})\",\"$1-$2-$3\",[\"3|4(?:2[09]|7[01])|6[1-9]\",\"3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1-$2-$3\",[\"1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])\",\"1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]\",\"1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{4})\",\"$1-$2-$3\",[\"[14]|[289][2-9]|5[3-9]|7[2-4679]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1-$2-$3\",[\"800\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1-$2-$3\",[\"[25-9]\"],\"0$1\"]],\"0\",0,\"(000[259]\\\\d{6})$|(?:(?:003768)0?)|0\",\"$1\",0,0,[0,[\"(?:60\\\\d|[7-9]0[1-9])\\\\d{7}\",[10]]]],\"KE\":[\"254\",\"000\",\"(?:[17]\\\\d\\\\d|900)\\\\d{6}|(?:2|80)0\\\\d{6,7}|[4-6]\\\\d{6,8}\",[7,8,9,10],[[\"(\\\\d{2})(\\\\d{5,7})\",\"$1 $2\",[\"[24-6]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{6})\",\"$1 $2\",[\"[17]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[89]\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"(?:1(?:0[0-8]|1[0-7]|2[014]|30)|7\\\\d\\\\d)\\\\d{6}\",[9]]]],\"KG\":[\"996\",\"00\",\"8\\\\d{9}|[235-9]\\\\d{8}\",[9,10],[[\"(\\\\d{4})(\\\\d{5})\",\"$1 $2\",[\"3(?:1[346]|[24-79])\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[235-79]|88\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d)(\\\\d{2,3})\",\"$1 $2 $3 $4\",[\"8\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"312(?:58\\\\d|973)\\\\d{3}|(?:2(?:0[0-35]|2\\\\d)|5[0-24-7]\\\\d|600|7(?:[07]\\\\d|55)|88[08]|9(?:12|9[05-9]))\\\\d{6}\",[9]]]],\"KH\":[\"855\",\"00[14-9]\",\"1\\\\d{9}|[1-9]\\\\d{7,8}\",[8,9,10],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[1-9]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"1\"]]],\"0\",0,0,0,0,0,[0,[\"(?:(?:1[28]|3[18]|9[67])\\\\d|6[016-9]|7(?:[07-9]|[16]\\\\d)|8(?:[013-79]|8\\\\d))\\\\d{6}|(?:1\\\\d|9[0-57-9])\\\\d{6}|(?:2[3-6]|3[2-6]|4[2-4]|[5-7][2-5])48\\\\d{5}\",[8,9]]]],\"KI\":[\"686\",\"00\",\"(?:[37]\\\\d|6[0-79])\\\\d{6}|(?:[2-48]\\\\d|50)\\\\d{3}\",[5,8],0,\"0\",0,0,0,0,0,[0,[\"(?:6200[01]|7(?:310[1-9]|5(?:02[03-9]|12[0-47-9]|22[0-7]|[34](?:0[1-9]|8[02-9])|50[1-9])))\\\\d{3}|(?:63\\\\d\\\\d|7(?:(?:[0146-9]\\\\d|2[0-689])\\\\d|3(?:[02-9]\\\\d|1[1-9])|5(?:[0-2][013-9]|[34][1-79]|5[1-9]|[6-9]\\\\d)))\\\\d{4}\",[8]]]],\"KM\":[\"269\",\"00\",\"[3478]\\\\d{6}\",[7],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3\",[\"[3478]\"]]],0,0,0,0,0,0,[0,[\"[34]\\\\d{6}\"]]],\"KN\":[\"1\",\"011\",\"(?:[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-7]\\\\d{6})$|1\",\"869$1\",0,\"869\",[0,[\"869(?:48[89]|55[6-8]|66\\\\d|76[02-7])\\\\d{4}\"]]],\"KP\":[\"850\",\"00|99\",\"85\\\\d{6}|(?:19\\\\d|[2-7])\\\\d{7}\",[8,10],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"8\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[2-7]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"1\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"19[1-3]\\\\d{7}\",[10]]]],\"KR\":[\"82\",\"00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))\",\"00[1-9]\\\\d{8,11}|(?:[12]|5\\\\d{3})\\\\d{7}|[13-6]\\\\d{9}|(?:[1-6]\\\\d|80)\\\\d{7}|[3-6]\\\\d{4,5}|(?:00|7)0\\\\d{8}\",[5,6,8,9,10,11,12,13,14],[[\"(\\\\d{2})(\\\\d{3,4})\",\"$1-$2\",[\"(?:3[1-3]|[46][1-4]|5[1-5])1\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{4})\",\"$1-$2\",[\"1\"]],[\"(\\\\d)(\\\\d{3,4})(\\\\d{4})\",\"$1-$2-$3\",[\"2\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1-$2-$3\",[\"[36]0|8\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3,4})(\\\\d{4})\",\"$1-$2-$3\",[\"[1346]|5[1-5]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1-$2-$3\",[\"[57]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{5})(\\\\d{4})\",\"$1-$2-$3\",[\"5\"],\"0$1\"]],\"0\",0,\"0(8(?:[1-46-8]|5\\\\d\\\\d))?\",0,0,0,[0,[\"1(?:05(?:[0-8]\\\\d|9[0-6])|22[13]\\\\d)\\\\d{4,5}|1(?:0[0-46-9]|[16-9]\\\\d|2[013-9])\\\\d{6,7}\",[9,10]]]],\"KW\":[\"965\",\"00\",\"18\\\\d{5}|(?:[2569]\\\\d|41)\\\\d{6}\",[7,8],[[\"(\\\\d{4})(\\\\d{3,4})\",\"$1 $2\",[\"[169]|2(?:[235]|4[1-35-9])|52\"]],[\"(\\\\d{3})(\\\\d{5})\",\"$1 $2\",[\"[245]\"]]],0,0,0,0,0,0,[0,[\"(?:41\\\\d\\\\d|5(?:(?:[05]\\\\d|1[0-7]|6[56])\\\\d|2(?:22|5[25])|7(?:55|77)|88[58])|6(?:(?:0[034679]|5[015-9]|6\\\\d)\\\\d|1(?:00|11|6[16])|2[26]2|3[36]3|4[46]4|7(?:0[013-9]|[67]\\\\d)|8[68]8|9(?:[069]\\\\d|3[039]))|9(?:(?:[04679]\\\\d|8[057-9])\\\\d|1(?:1[01]|99)|2(?:00|2\\\\d)|3(?:00|3[03])|5(?:00|5\\\\d)))\\\\d{4}\",[8]]]],\"KY\":[\"1\",\"011\",\"(?:345|[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-9]\\\\d{6})$|1\",\"345$1\",0,\"345\",[0,[\"345(?:32[1-9]|42[0-4]|5(?:1[67]|2[5-79]|4[6-9]|50|76)|649|82[56]|9(?:1[679]|2[2-9]|3[06-9]|90))\\\\d{4}\"]]],\"KZ\":[\"7\",\"810\",\"(?:33622|8\\\\d{8})\\\\d{5}|[78]\\\\d{9}\",[10,14],0,\"8\",0,0,0,0,\"33|7\",[0,[\"7(?:0[0-25-8]|47|6[0-4]|7[15-8]|85)\\\\d{7}\",[10]]],\"8~10\"],\"LA\":[\"856\",\"00\",\"[23]\\\\d{9}|3\\\\d{8}|(?:[235-8]\\\\d|41)\\\\d{6}\",[8,9,10],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"2[13]|3[14]|[4-8]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"30[0135-9]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"[23]\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"208[78]\\\\d{6}|(?:20[23579]|30[24])\\\\d{7}\",[10]]]],\"LB\":[\"961\",\"00\",\"[27-9]\\\\d{7}|[13-9]\\\\d{6}\",[7,8],[[\"(\\\\d)(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[13-69]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[27-9]\"]]],\"0\",0,0,0,0,0,[0,[\"793(?:[01]\\\\d|2[0-4])\\\\d{3}|(?:(?:3|81)\\\\d|7(?:[01]\\\\d|6[013-9]|8[89]|9[12]))\\\\d{5}\"]]],\"LC\":[\"1\",\"011\",\"(?:[58]\\\\d\\\\d|758|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-8]\\\\d{6})$|1\",\"758$1\",0,\"758\",[0,[\"758(?:28[4-7]|384|4(?:6[01]|8[4-9])|5(?:1[89]|20|84)|7(?:1[2-9]|2\\\\d|3[0-3])|812)\\\\d{4}\"]]],\"LI\":[\"423\",\"00\",\"[68]\\\\d{8}|(?:[2378]\\\\d|90)\\\\d{5}\",[7,9],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3\",[\"[2379]|8(?:0[09]|7)\",\"[2379]|8(?:0(?:02|9)|7)\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"8\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"69\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"6\"]]],\"0\",0,\"(1001)|0\",0,0,0,[0,[\"(?:6(?:(?:4[5-9]|5[0-469])\\\\d|6(?:[024-6]\\\\d|[17]0|3[7-9]))\\\\d|7(?:[37-9]\\\\d|42|56))\\\\d{4}\"]]],\"LK\":[\"94\",\"00\",\"[1-9]\\\\d{8}\",[9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"7\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[1-689]\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"7(?:[0-25-8]\\\\d|4[0-4])\\\\d{6}\"]]],\"LR\":[\"231\",\"00\",\"(?:[245]\\\\d|33|77|88)\\\\d{7}|(?:2\\\\d|[4-6])\\\\d{6}\",[7,8,9],[[\"(\\\\d)(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"4[67]|[56]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"2\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[2-578]\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"(?:(?:(?:22|33)0|555|(?:77|88)\\\\d)\\\\d|4(?:240|[67]))\\\\d{5}|[56]\\\\d{6}\",[7,9]]]],\"LS\":[\"266\",\"00\",\"(?:[256]\\\\d\\\\d|800)\\\\d{5}\",[8],[[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[2568]\"]]],0,0,0,0,0,0,[0,[\"[56]\\\\d{7}\"]]],\"LT\":[\"370\",\"00\",\"(?:[3469]\\\\d|52|[78]0)\\\\d{6}\",[8],[[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"52[0-7]\"],\"(0-$1)\",1],[\"(\\\\d{3})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"[7-9]\"],\"0 $1\",1],[\"(\\\\d{2})(\\\\d{6})\",\"$1 $2\",[\"37|4(?:[15]|6[1-8])\"],\"(0-$1)\",1],[\"(\\\\d{3})(\\\\d{5})\",\"$1 $2\",[\"[3-6]\"],\"(0-$1)\",1]],\"0\",0,\"[08]\",0,0,0,[0,[\"6\\\\d{7}\"]]],\"LU\":[\"352\",\"00\",\"35[013-9]\\\\d{4,8}|6\\\\d{8}|35\\\\d{2,4}|(?:[2457-9]\\\\d|3[0-46-9])\\\\d{2,9}\",[4,5,6,7,8,9,10,11],[[\"(\\\\d{2})(\\\\d{3})\",\"$1 $2\",[\"2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3\",[\"2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"20[2-689]\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{1,2})\",\"$1 $2 $3 $4\",[\"2(?:[0367]|4[3-8])\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"80[01]|90[015]\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"20\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"6\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{1,2})\",\"$1 $2 $3 $4 $5\",[\"2(?:[0367]|4[3-8])\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{1,5})\",\"$1 $2 $3 $4\",[\"[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]\"]]],0,0,\"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\\\d)\",0,0,0,[0,[\"6(?:[269][18]|5[1568]|7[189]|81)\\\\d{6}\",[9]]]],\"LV\":[\"371\",\"00\",\"(?:[268]\\\\d|90)\\\\d{6}\",[8],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[269]|8[01]\"]]],0,0,0,0,0,0,[0,[\"2333[0-8]\\\\d{3}|2(?:[0-24-9]\\\\d\\\\d|3(?:0[07]|[14-9]\\\\d|2[02-9]|3[0-24-9]))\\\\d{4}\"]]],\"LY\":[\"218\",\"00\",\"[2-9]\\\\d{8}\",[9],[[\"(\\\\d{2})(\\\\d{7})\",\"$1-$2\",[\"[2-9]\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"9[1-6]\\\\d{7}\"]]],\"MA\":[\"212\",\"00\",\"[5-8]\\\\d{8}\",[9],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"5[45]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{5})\",\"$1-$2\",[\"5(?:2[2-46-9]|3[3-9]|9)|8(?:0[89]|92)\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{7})\",\"$1-$2\",[\"8\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{6})\",\"$1-$2\",[\"[5-7]\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"(?:6(?:[0-79]\\\\d|8[0-247-9])|7(?:[0167]\\\\d|2[0-467]|5[0-3]|8[0-5]))\\\\d{6}\"]]],\"MC\":[\"377\",\"00\",\"(?:[3489]|6\\\\d)\\\\d{7}\",[8,9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"4\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[389]\"]],[\"(\\\\d)(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4 $5\",[\"6\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"4(?:[469]\\\\d|5[1-9])\\\\d{5}|(?:3|6\\\\d)\\\\d{7}\"]]],\"MD\":[\"373\",\"00\",\"(?:[235-7]\\\\d|[89]0)\\\\d{6}\",[8],[[\"(\\\\d{3})(\\\\d{5})\",\"$1 $2\",[\"[89]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"22|3\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"[25-7]\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"562\\\\d{5}|(?:6\\\\d|7[16-9])\\\\d{6}\"]]],\"ME\":[\"382\",\"00\",\"(?:20|[3-79]\\\\d)\\\\d{6}|80\\\\d{6,7}\",[8,9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[2-9]\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"6(?:[07-9]\\\\d|3[024]|6[0-25])\\\\d{5}\",[8]]]],\"MF\":[\"590\",\"00\",\"(?:590\\\\d|7090)\\\\d{5}|(?:69|80|9\\\\d)\\\\d{7}\",[9],0,\"0\",0,0,0,0,0,[0,[\"(?:69(?:0\\\\d\\\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\\\d)|6(?:1[016-9]|5[0-4]|[67]\\\\d))|7090[0-4])\\\\d{4}\"]]],\"MG\":[\"261\",\"00\",\"[23]\\\\d{8}\",[9],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{3})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[23]\"],\"0$1\"]],\"0\",0,\"([24-9]\\\\d{6})$|0\",\"20$1\",0,0,[0,[\"3[2-47-9]\\\\d{7}\"]]],\"MH\":[\"692\",\"011\",\"329\\\\d{4}|(?:[256]\\\\d|45)\\\\d{5}\",[7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1-$2\",[\"[2-6]\"]]],\"1\",0,0,0,0,0,[0,[\"(?:(?:23|54)5|329|45[35-8])\\\\d{4}\"]]],\"MK\":[\"389\",\"00\",\"[2-578]\\\\d{7}\",[8],[[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"2|34[47]|4(?:[37]7|5[47]|64)\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[347]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d)(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[58]\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"7(?:3555|(?:474|9[019]7)7)\\\\d{3}|7(?:[0-25-8]\\\\d\\\\d|3(?:[1-478]\\\\d|6[01])|4(?:2\\\\d|60|7[01578])|9(?:[2-4]\\\\d|5[01]|7[015]))\\\\d{4}\"]]],\"ML\":[\"223\",\"00\",\"[24-9]\\\\d{7}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[24-9]\"]]],0,0,0,0,0,0,[0,[\"2(?:0(?:01|79)|17\\\\d)\\\\d{4}|(?:5[01]|[679]\\\\d|8[2-59])\\\\d{6}\"]]],\"MM\":[\"95\",\"00\",\"1\\\\d{5,7}|95\\\\d{6}|(?:[4-7]|9[0-46-9])\\\\d{6,8}|(?:2|8\\\\d)\\\\d{5,8}\",[6,7,8,9,10],[[\"(\\\\d)(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"16|2\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[12]|452|678|86\",\"[12]|452|6788|86\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[4-7]|8[1-35]\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{4,6})\",\"$1 $2 $3\",[\"9(?:2[0-4]|[35-9]|4[137-9])\"],\"0$1\"],[\"(\\\\d)(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"2\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"8\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"92\"],\"0$1\"],[\"(\\\\d)(\\\\d{5})(\\\\d{4})\",\"$1 $2 $3\",[\"9\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"(?:17[01]|9(?:2(?:[0-4]|[56]\\\\d\\\\d)|(?:3(?:[0-36]|4\\\\d)|(?:6\\\\d|8[89]|9[4-8])\\\\d|7(?:3|40|[5-9]\\\\d))\\\\d|4(?:(?:[0245]\\\\d|[1379])\\\\d|88)|5[0-6])\\\\d)\\\\d{4}|9[69]1\\\\d{6}|9(?:[68]\\\\d|9[089])\\\\d{5}\",[7,8,9,10]]]],\"MN\":[\"976\",\"001\",\"[12]\\\\d{7,9}|[5-9]\\\\d{7}\",[8,9,10],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3\",[\"[12]1\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[5-9]\"]],[\"(\\\\d{3})(\\\\d{5,6})\",\"$1 $2\",[\"[12]2[1-3]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{5,6})\",\"$1 $2\",[\"[12](?:27|3[2-8]|4[2-68]|5[1-4689])\",\"[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]\"],\"0$1\"],[\"(\\\\d{5})(\\\\d{4,5})\",\"$1 $2\",[\"[12]\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"(?:83[01]|92[039])\\\\d{5}|(?:5[05]|6[069]|72|8[015689]|9[013-9])\\\\d{6}\",[8]]]],\"MO\":[\"853\",\"00\",\"0800\\\\d{3}|(?:28|[68]\\\\d)\\\\d{6}\",[7,8],[[\"(\\\\d{4})(\\\\d{3})\",\"$1 $2\",[\"0\"]],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[268]\"]]],0,0,0,0,0,0,[0,[\"6800[0-79]\\\\d{3}|6(?:[235]\\\\d\\\\d|6(?:0[0-5]|[1-9]\\\\d)|8(?:0[1-9]|[14-8]\\\\d|2[5-9]|[39][0-4]))\\\\d{4}\",[8]]]],\"MP\":[\"1\",\"011\",\"[58]\\\\d{9}|(?:67|90)0\\\\d{7}\",[10],0,\"1\",0,\"([2-9]\\\\d{6})$|1\",\"670$1\",0,\"670\",[0,[\"670(?:2(?:3[3-7]|56|8[4-8])|32[1-38]|4(?:33|8[348])|5(?:32|55|88)|6(?:64|70|82)|78[3589]|8[3-9]8|989)\\\\d{4}\"]]],\"MQ\":[\"596\",\"00\",\"(?:596\\\\d|7091)\\\\d{5}|(?:69|[89]\\\\d)\\\\d{7}\",[9],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[5-79]|8(?:0[6-9]|[36])\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"8\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"(?:69[67]\\\\d\\\\d|7091[0-3])\\\\d{4}\"]]],\"MR\":[\"222\",\"00\",\"(?:[2-4]\\\\d\\\\d|800)\\\\d{5}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[2-48]\"]]],0,0,0,0,0,0,[0,[\"[2-4][0-46-9]\\\\d{6}\"]]],\"MS\":[\"1\",\"011\",\"(?:[58]\\\\d\\\\d|664|900)\\\\d{7}\",[10],0,\"1\",0,\"([34]\\\\d{6})$|1\",\"664$1\",0,\"664\",[0,[\"664(?:3(?:49|9[1-6])|49[2-6])\\\\d{4}\"]]],\"MT\":[\"356\",\"00\",\"3550\\\\d{4}|(?:[2579]\\\\d\\\\d|800)\\\\d{5}\",[8],[[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[2357-9]\"]]],0,0,0,0,0,0,[0,[\"(?:7(?:210|[79]\\\\d\\\\d)|9(?:[29]\\\\d\\\\d|69[67]|8(?:1[1-3]|89|97)))\\\\d{4}\"]]],\"MU\":[\"230\",\"0(?:0|[24-7]0|3[03])\",\"(?:[57]|8\\\\d\\\\d)\\\\d{7}|[2-468]\\\\d{6}\",[7,8,10],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[2-46]|8[013]\"]],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[57]\"]],[\"(\\\\d{5})(\\\\d{5})\",\"$1 $2\",[\"8\"]]],0,0,0,0,0,0,[0,[\"5(?:4(?:2[1-389]|7[1-9])|87[15-8])\\\\d{4}|(?:5(?:2[5-9]|4[3-689]|[57]\\\\d|8[0-689]|9[0-8])|7(?:0[0-4]|3[013]))\\\\d{5}\",[8]]],\"020\"],\"MV\":[\"960\",\"0(?:0|19)\",\"(?:800|9[0-57-9]\\\\d)\\\\d{7}|[34679]\\\\d{6}\",[7,10],[[\"(\\\\d{3})(\\\\d{4})\",\"$1-$2\",[\"[34679]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[89]\"]]],0,0,0,0,0,0,[0,[\"(?:46[46]|[79]\\\\d\\\\d)\\\\d{4}\",[7]]],\"00\"],\"MW\":[\"265\",\"00\",\"(?:[1289]\\\\d|31|77)\\\\d{7}|1\\\\d{6}\",[7,9],[[\"(\\\\d)(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"1[2-9]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"2\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[137-9]\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"111\\\\d{6}|(?:31|77|[89][89])\\\\d{7}\",[9]]]],\"MX\":[\"52\",\"0[09]\",\"[2-9]\\\\d{9}\",[10],[[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"33|5[56]|81\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[2-9]\"]]],0,0,0,0,0,0,[0,[\"657[12]\\\\d{6}|(?:2(?:2\\\\d|3[1-35-8]|4[13-9]|7[1-689]|8[1-578]|9[467])|3(?:1[1-79]|[2458][1-9]|3\\\\d|7[1-8]|9[1-5])|4(?:1[1-57-9]|[267][1-9]|3[1-8]|[45]\\\\d|8[1-35-9]|9[2-689])|5(?:[56]\\\\d|88|9[1-79])|6(?:1[2-68]|[2-4][1-9]|5[1-3689]|6[0-57-9]|7[1-7]|8[67]|9[4-8])|7(?:[1346][1-9]|[27]\\\\d|5[13-9]|8[1-69]|9[17])|8(?:1\\\\d|2[13-689]|3[1-6]|4[124-6]|6[1246-9]|7[0-378]|9[12479])|9(?:1[346-9]|2[1-4]|3[2-46-8]|5[1348]|[69]\\\\d|7[12]|8[1-8]))\\\\d{7}\"]],\"00\"],\"MY\":[\"60\",\"00\",\"1\\\\d{8,9}|(?:3\\\\d|[4-9])\\\\d{7}\",[8,9,10],[[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1-$2 $3\",[\"[4-79]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1-$2 $3\",[\"1(?:[02469]|[378][1-9]|53)|8\",\"1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8\"],\"0$1\"],[\"(\\\\d)(\\\\d{4})(\\\\d{4})\",\"$1-$2 $3\",[\"3\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{2})(\\\\d{4})\",\"$1-$2-$3-$4\",[\"1(?:[367]|80)\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1-$2 $3\",[\"15\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1-$2 $3\",[\"1\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"1(?:1888[689]|4400|8(?:47|8[27])[0-4])\\\\d{4}|1(?:0(?:[23568]\\\\d|4[0-6]|7[016-9]|9[0-8])|1(?:[1-5]\\\\d\\\\d|6(?:0[5-9]|[1-9]\\\\d)|7(?:[0-4]\\\\d|5[0-7]))|(?:[269]\\\\d|[37][1-9]|4[235-9])\\\\d|5(?:31|9\\\\d\\\\d)|8(?:1[23]|[236]\\\\d|4[06]|5(?:46|[7-9])|7[016-9]|8[01]|9[0-8]))\\\\d{5}\",[9,10]]]],\"MZ\":[\"258\",\"00\",\"(?:2|8\\\\d)\\\\d{7}\",[8,9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"2|8[2-79]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"8\"]]],0,0,0,0,0,0,[0,[\"8[2-79]\\\\d{7}\",[9]]]],\"NA\":[\"264\",\"00\",\"[68]\\\\d{7,8}\",[8,9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"88\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"6\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"87\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"8\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"(?:60|8[1245])\\\\d{7}\",[9]]]],\"NC\":[\"687\",\"00\",\"(?:050|[2-57-9]\\\\d\\\\d)\\\\d{3}\",[6],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1.$2.$3\",[\"[02-57-9]\"]]],0,0,0,0,0,0,[0,[\"(?:[579]\\\\d|8[0-79])\\\\d{4}\"]]],\"NE\":[\"227\",\"00\",\"[027-9]\\\\d{7}\",[8],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"08\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[089]|2[013]|7[0467]\"]]],0,0,0,0,0,0,[0,[\"(?:23|7[0467]|[89]\\\\d)\\\\d{6}\"]]],\"NF\":[\"672\",\"00\",\"[13]\\\\d{5}\",[6],[[\"(\\\\d{2})(\\\\d{4})\",\"$1 $2\",[\"1[0-3]\"]],[\"(\\\\d)(\\\\d{5})\",\"$1 $2\",[\"[13]\"]]],0,0,\"([0-258]\\\\d{4})$\",\"3$1\",0,0,[0,[\"(?:14|3[58])\\\\d{4}\"]]],\"NG\":[\"234\",\"009\",\"38\\\\d{6}|[78]\\\\d{9,13}|(?:20|9\\\\d)\\\\d{8}\",[8,10,11,12,13,14],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{2,3})\",\"$1 $2 $3\",[\"3\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[7-9]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"20[129]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3\",[\"2\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{4})(\\\\d{4,5})\",\"$1 $2 $3\",[\"[78]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{5})(\\\\d{5,6})\",\"$1 $2 $3\",[\"[78]\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"(?:702[0-24-9]|819[01])\\\\d{6}|(?:7(?:0[13-9]|[12]\\\\d)|8(?:0[1-9]|1[0-8])|9(?:0[1-9]|1[1-6]))\\\\d{7}\",[10]]]],\"NI\":[\"505\",\"00\",\"(?:1800|[25-8]\\\\d{3})\\\\d{4}\",[8],[[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[125-8]\"]]],0,0,0,0,0,0,[0,[\"(?:5(?:5[0-7]|[78]\\\\d)|6(?:20|3[035]|4[045]|5[05]|77|8[1-9]|9[059])|(?:7[5-8]|8\\\\d)\\\\d)\\\\d{5}\"]]],\"NL\":[\"31\",\"00\",\"(?:[124-7]\\\\d\\\\d|3(?:[02-9]\\\\d|1[0-8]))\\\\d{6}|8\\\\d{6,9}|9\\\\d{6,10}|1\\\\d{4,5}\",[5,6,7,8,9,10,11],[[\"(\\\\d{3})(\\\\d{4,7})\",\"$1 $2\",[\"[89]0\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{7})\",\"$1 $2\",[\"66\"],\"0$1\"],[\"(\\\\d)(\\\\d{8})\",\"$1 $2\",[\"6\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"1[16-8]|2[259]|3[124]|4[17-9]|5[124679]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[1-578]|91\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{5})\",\"$1 $2 $3\",[\"9\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"(?:6[1-58]|970\\\\d)\\\\d{7}\",[9,11]]]],\"NO\":[\"47\",\"00\",\"(?:0|[2-9]\\\\d{3})\\\\d{4}\",[5,8],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"8\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[2-79]\"]]],0,0,0,0,0,\"[02-689]|7[0-8]\",[0,[\"(?:4[015-8]|9\\\\d)\\\\d{6}\",[8]]]],\"NP\":[\"977\",\"00\",\"(?:1\\\\d|9)\\\\d{9}|[1-9]\\\\d{7}\",[8,10,11],[[\"(\\\\d)(\\\\d{7})\",\"$1-$2\",[\"1[2-6]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{6})\",\"$1-$2\",[\"1[01]|[2-8]|9(?:[1-59]|[67][2-6])\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{7})\",\"$1-$2\",[\"9\"]]],\"0\",0,0,0,0,0,[0,[\"9(?:00|6[0-3]|7[024-6]|8[0-24-68])\\\\d{7}\",[10]]]],\"NR\":[\"674\",\"00\",\"(?:444|(?:55|8\\\\d)\\\\d|666)\\\\d{4}\",[7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[4-68]\"]]],0,0,0,0,0,0,[0,[\"(?:55[3-9]|666|8\\\\d\\\\d)\\\\d{4}\"]]],\"NU\":[\"683\",\"00\",\"(?:[4-7]|888\\\\d)\\\\d{3}\",[4,7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"8\"]]],0,0,0,0,0,0,[0,[\"(?:[56]|888[1-9])\\\\d{3}\"]]],\"NZ\":[\"64\",\"0(?:0|161)\",\"[1289]\\\\d{9}|50\\\\d{5}(?:\\\\d{2,3})?|[27-9]\\\\d{7,8}|(?:[34]\\\\d|6[0-35-9])\\\\d{6}|8\\\\d{4,6}\",[5,6,7,8,9,10],[[\"(\\\\d{2})(\\\\d{3,8})\",\"$1 $2\",[\"8[1-79]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2,3})\",\"$1 $2 $3\",[\"50[036-8]|8|90\",\"50(?:[0367]|88)|8|90\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"24|[346]|7[2-57-9]|9[2-9]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"2(?:10|74)|[589]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3,4})(\\\\d{4})\",\"$1 $2 $3\",[\"1|2[028]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,5})\",\"$1 $2 $3\",[\"2(?:[169]|7[0-35-9])|7\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"2(?:[0-27-9]\\\\d|6)\\\\d{6,7}|2(?:1\\\\d|75)\\\\d{5}\",[8,9,10]]],\"00\"],\"OM\":[\"968\",\"00\",\"(?:1505|[279]\\\\d{3}|500)\\\\d{4}|800\\\\d{5,6}\",[7,8,9],[[\"(\\\\d{3})(\\\\d{4,6})\",\"$1 $2\",[\"[58]\"]],[\"(\\\\d{2})(\\\\d{6})\",\"$1 $2\",[\"2\"]],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[179]\"]]],0,0,0,0,0,0,[0,[\"(?:1505|90[1-9]\\\\d)\\\\d{4}|(?:7[126-9]|9[1-9])\\\\d{6}\",[8]]]],\"PA\":[\"507\",\"00\",\"(?:00800|8\\\\d{3})\\\\d{6}|[68]\\\\d{7}|[1-57-9]\\\\d{6}\",[7,8,10,11],[[\"(\\\\d{3})(\\\\d{4})\",\"$1-$2\",[\"[1-57-9]\"]],[\"(\\\\d{4})(\\\\d{4})\",\"$1-$2\",[\"[68]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"8\"]]],0,0,0,0,0,0,[0,[\"(?:1[16]1|21[89]|6\\\\d{3}|8(?:1[01]|7[23]))\\\\d{4}\",[7,8]]]],\"PE\":[\"51\",\"00|19(?:1[124]|77|90)00\",\"(?:[14-8]|9\\\\d)\\\\d{7}\",[8,9],[[\"(\\\\d{3})(\\\\d{5})\",\"$1 $2\",[\"80\"],\"(0$1)\"],[\"(\\\\d)(\\\\d{7})\",\"$1 $2\",[\"1\"],\"(0$1)\"],[\"(\\\\d{2})(\\\\d{6})\",\"$1 $2\",[\"[4-8]\"],\"(0$1)\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"9\"]]],\"0\",0,0,0,0,0,[0,[\"9\\\\d{8}\",[9]]],\"00\",\" Anexo \"],\"PF\":[\"689\",\"00\",\"4\\\\d{5}(?:\\\\d{2})?|8\\\\d{7,8}\",[6,8,9],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3\",[\"44\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"4|8[7-9]\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"8\"]]],0,0,0,0,0,0,[0,[\"8[7-9]\\\\d{6}\",[8]]]],\"PG\":[\"675\",\"00|140[1-3]\",\"(?:180|[78]\\\\d{3})\\\\d{4}|(?:[2-589]\\\\d|64)\\\\d{5}\",[7,8],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"18|[2-69]|85\"]],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[78]\"]]],0,0,0,0,0,0,[0,[\"(?:7\\\\d|8[1-38])\\\\d{6}\",[8]]],\"00\"],\"PH\":[\"63\",\"00\",\"(?:[2-7]|9\\\\d)\\\\d{8}|2\\\\d{5}|(?:1800|8)\\\\d{7,9}\",[6,8,9,10,11,12,13],[[\"(\\\\d)(\\\\d{5})\",\"$1 $2\",[\"2\"],\"(0$1)\"],[\"(\\\\d{4})(\\\\d{4,6})\",\"$1 $2\",[\"3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2\",\"3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))\"],\"(0$1)\"],[\"(\\\\d{5})(\\\\d{4})\",\"$1 $2\",[\"346|4(?:27|9[35])|883\",\"3469|4(?:279|9(?:30|56))|8834\"],\"(0$1)\"],[\"(\\\\d)(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"2\"],\"(0$1)\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[3-7]|8[2-8]\"],\"(0$1)\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[89]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"1\"]],[\"(\\\\d{4})(\\\\d{1,2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3 $4\",[\"1\"]]],\"0\",0,0,0,0,0,[0,[\"(?:8(?:1[37]|9[5-8])|9(?:0[5-9]|1[0-24-9]|[235-7]\\\\d|4[2-9]|8[135-9]|9[1-9]))\\\\d{7}\",[10]]]],\"PK\":[\"92\",\"00\",\"122\\\\d{6}|[24-8]\\\\d{10,11}|9(?:[013-9]\\\\d{8,10}|2(?:[01]\\\\d\\\\d|2(?:[06-8]\\\\d|1[01]))\\\\d{7})|(?:[2-8]\\\\d{3}|92(?:[0-7]\\\\d|8[1-9]))\\\\d{6}|[24-9]\\\\d{8}|[89]\\\\d{7}\",[8,9,10,11,12],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{2,7})\",\"$1 $2 $3\",[\"[89]0\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{5})\",\"$1 $2\",[\"1\"]],[\"(\\\\d{3})(\\\\d{6,7})\",\"$1 $2\",[\"2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])\",\"9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]\"],\"(0$1)\"],[\"(\\\\d{2})(\\\\d{7,8})\",\"$1 $2\",[\"(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]\"],\"(0$1)\"],[\"(\\\\d{5})(\\\\d{5})\",\"$1 $2\",[\"58\"],\"(0$1)\"],[\"(\\\\d{3})(\\\\d{7})\",\"$1 $2\",[\"3\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91\"],\"(0$1)\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"[24-9]\"],\"(0$1)\"]],\"0\",0,0,0,0,0,[0,[\"3(?:[0-247]\\\\d|3[0-79]|55|64)\\\\d{7}\",[10]]]],\"PL\":[\"48\",\"00\",\"(?:6|8\\\\d\\\\d)\\\\d{7}|[1-9]\\\\d{6}(?:\\\\d{2})?|[26]\\\\d{5}\",[6,7,8,9,10],[[\"(\\\\d{5})\",\"$1\",[\"19\"]],[\"(\\\\d{3})(\\\\d{3})\",\"$1 $2\",[\"11|20|64\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1\",\"(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2,3})\",\"$1 $2 $3\",[\"64\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"1[2-8]|[2-7]|8[1-79]|9[145]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"8\"]]],0,0,0,0,0,0,[0,[\"2131[89]\\\\d{4}|21(?:1[013-5]|2\\\\d|3[2-9])\\\\d{5}|(?:45|5[0137]|6[069]|7[2389]|88)\\\\d{7}\",[9]]]],\"PM\":[\"508\",\"00\",\"[45]\\\\d{5}|(?:708|8\\\\d\\\\d)\\\\d{6}\",[6,9],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3\",[\"[45]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"7\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"8\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"(?:4[02-489]|5[02-9]|708(?:4[0-5]|5[0-6]))\\\\d{4}\"]]],\"PR\":[\"1\",\"011\",\"(?:[589]\\\\d\\\\d|787)\\\\d{7}\",[10],0,\"1\",0,0,0,0,\"787|939\",[0,[\"(?:787|939)[2-9]\\\\d{6}\"]]],\"PS\":[\"970\",\"00\",\"[2489]2\\\\d{6}|(?:1\\\\d|5)\\\\d{8}\",[8,9,10],[[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[2489]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"5\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"1\"]]],\"0\",0,0,0,0,0,[0,[\"5[69]\\\\d{7}\",[9]]]],\"PT\":[\"351\",\"00\",\"1693\\\\d{5}|(?:[26-9]\\\\d|30)\\\\d{7}\",[9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"2[12]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"16|[236-9]\"]]],0,0,0,0,0,0,[0,[\"6(?:[06]92(?:30|9\\\\d)|[35]92(?:[049]\\\\d|3[034]))\\\\d{3}|(?:(?:16|6[0356])93|9(?:[1-36]\\\\d\\\\d|480))\\\\d{5}\"]]],\"PW\":[\"680\",\"01[12]\",\"(?:[24-8]\\\\d\\\\d|345|900)\\\\d{4}\",[7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[2-9]\"]]],0,0,0,0,0,0,[0,[\"(?:(?:46|83)[0-5]|(?:6[2-4689]|78)0)\\\\d{4}|(?:45|77|88)\\\\d{5}\"]]],\"PY\":[\"595\",\"00\",\"59\\\\d{4,6}|9\\\\d{5,10}|(?:[2-46-8]\\\\d|5[0-8])\\\\d{4,7}\",[6,7,8,9,10,11],[[\"(\\\\d{3})(\\\\d{3,6})\",\"$1 $2\",[\"[2-9]0\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{5})\",\"$1 $2\",[\"[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]\"],\"(0$1)\"],[\"(\\\\d{3})(\\\\d{4,5})\",\"$1 $2\",[\"2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85\"],\"(0$1)\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]\"],\"(0$1)\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"87\"]],[\"(\\\\d{3})(\\\\d{6})\",\"$1 $2\",[\"9(?:[5-79]|8[1-7])\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[2-8]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"9\"]]],\"0\",0,0,0,0,0,[0,[\"9(?:51|6[129]|7[1-6]|8[1-7]|9[1-5])\\\\d{6}\",[9]]]],\"QA\":[\"974\",\"00\",\"800\\\\d{4}|(?:2|800)\\\\d{6}|(?:0080|[3-7])\\\\d{7}\",[7,8,9,11],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"2[16]|8\"]],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[3-7]\"]]],0,0,0,0,0,0,[0,[\"[35-7]\\\\d{7}\",[8]]]],\"RE\":[\"262\",\"00\",\"709\\\\d{6}|(?:26|[689]\\\\d)\\\\d{7}\",[9],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[26-9]\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"(?:69(?:2\\\\d\\\\d|3(?:[06][0-6]|1[013]|2[0-2]|3[0-39]|4\\\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\\\d{4}\"]]],\"RO\":[\"40\",\"00\",\"(?:[236-8]\\\\d|90)\\\\d{7}|[23]\\\\d{5}\",[6,9],[[\"(\\\\d{3})(\\\\d{3})\",\"$1 $2\",[\"2[3-6]\",\"2[3-6]\\\\d9\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4})\",\"$1 $2\",[\"219|31\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[23]1\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[236-9]\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"(?:630|702)0\\\\d{5}|(?:6(?:00|2\\\\d)|7(?:0[013-9]|1[0-3]|[2-7]\\\\d|8[03-8]|9[0-39]))\\\\d{6}\",[9]]],0,\" int \"],\"RS\":[\"381\",\"00\",\"38[02-9]\\\\d{6,9}|6\\\\d{7,9}|90\\\\d{4,8}|38\\\\d{5,6}|(?:7\\\\d\\\\d|800)\\\\d{3,9}|(?:[12]\\\\d|3[0-79])\\\\d{5,10}\",[6,7,8,9,10,11,12],[[\"(\\\\d{3})(\\\\d{3,9})\",\"$1 $2\",[\"(?:2[389]|39)0|[7-9]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{5,10})\",\"$1 $2\",[\"[1-36]\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"6(?:[0-689]|7\\\\d)\\\\d{6,7}\",[8,9,10]]]],\"RU\":[\"7\",\"810\",\"8\\\\d{13}|[347-9]\\\\d{9}\",[10,14],[[\"(\\\\d{4})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"7(?:1[0-8]|2[1-9])\",\"7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))\",\"7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2\"],\"8 ($1)\",1],[\"(\\\\d{5})(\\\\d)(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"7(?:1[0-68]|2[1-9])\",\"7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))\",\"7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]\"],\"8 ($1)\",1],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"7\"],\"8 ($1)\",1],[\"(\\\\d{3})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2-$3-$4\",[\"[349]|8(?:[02-7]|1[1-8])\"],\"8 ($1)\",1],[\"(\\\\d{4})(\\\\d{4})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"8\"],\"8 ($1)\"]],\"8\",0,0,0,0,\"3[04-689]|[489]\",[0,[\"9\\\\d{9}\",[10]]],\"8~10\"],\"RW\":[\"250\",\"00\",\"(?:06|[27]\\\\d\\\\d|[89]00)\\\\d{6}\",[8,9],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"0\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"2\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[7-9]\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"7[237-9]\\\\d{7}\",[9]]]],\"SA\":[\"966\",\"00\",\"92\\\\d{7}|(?:[15]|8\\\\d)\\\\d{8}\",[9,10],[[\"(\\\\d{4})(\\\\d{5})\",\"$1 $2\",[\"9\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"1\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"5\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"81\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"8\"]]],\"0\",0,0,0,0,0,[0,[\"579[01]\\\\d{5}|5(?:[013-689]\\\\d|7[0-8])\\\\d{6}\",[9]]]],\"SB\":[\"677\",\"0[01]\",\"[6-9]\\\\d{6}|[1-6]\\\\d{4}\",[5,7],[[\"(\\\\d{2})(\\\\d{5})\",\"$1 $2\",[\"6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])\"]]],0,0,0,0,0,0,[0,[\"48\\\\d{3}|(?:(?:6[89]|7[1-9]|8[4-9])\\\\d|9(?:1[2-9]|2[013-9]|3[0-2]|[46]\\\\d|5[0-46-9]|7[0-689]|8[0-79]|9[0-8]))\\\\d{4}\"]]],\"SC\":[\"248\",\"010|0[0-2]\",\"(?:[2489]\\\\d|64)\\\\d{5}\",[7],[[\"(\\\\d)(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[246]|9[57]\"]]],0,0,0,0,0,0,[0,[\"2[125-8]\\\\d{5}\"]],\"00\"],\"SD\":[\"249\",\"00\",\"[19]\\\\d{8}\",[9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[19]\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"(?:1[0-2]|9[0-3569])\\\\d{7}\"]]],\"SE\":[\"46\",\"00\",\"(?:[26]\\\\d\\\\d|9)\\\\d{9}|[1-9]\\\\d{8}|[1-689]\\\\d{7}|[1-4689]\\\\d{6}|2\\\\d{5}\",[6,7,8,9,10,12],[[\"(\\\\d{2})(\\\\d{2,3})(\\\\d{2})\",\"$1-$2 $3\",[\"20\"],\"0$1\",0,\"$1 $2 $3\"],[\"(\\\\d{3})(\\\\d{4})\",\"$1-$2\",[\"9(?:00|39|44|9)\"],\"0$1\",0,\"$1 $2\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})\",\"$1-$2 $3\",[\"[12][136]|3[356]|4[0246]|6[03]|90[1-9]\"],\"0$1\",0,\"$1 $2 $3\"],[\"(\\\\d)(\\\\d{2,3})(\\\\d{2})(\\\\d{2})\",\"$1-$2 $3 $4\",[\"8\"],\"0$1\",0,\"$1 $2 $3 $4\"],[\"(\\\\d{3})(\\\\d{2,3})(\\\\d{2})\",\"$1-$2 $3\",[\"1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])\"],\"0$1\",0,\"$1 $2 $3\"],[\"(\\\\d{3})(\\\\d{2,3})(\\\\d{3})\",\"$1-$2 $3\",[\"9(?:00|39|44)\"],\"0$1\",0,\"$1 $2 $3\"],[\"(\\\\d{2})(\\\\d{2,3})(\\\\d{2})(\\\\d{2})\",\"$1-$2 $3 $4\",[\"1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]\"],\"0$1\",0,\"$1 $2 $3 $4\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1-$2 $3 $4\",[\"10|7\"],\"0$1\",0,\"$1 $2 $3 $4\"],[\"(\\\\d)(\\\\d{3})(\\\\d{3})(\\\\d{2})\",\"$1-$2 $3 $4\",[\"8\"],\"0$1\",0,\"$1 $2 $3 $4\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1-$2 $3 $4\",[\"[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])\"],\"0$1\",0,\"$1 $2 $3 $4\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{3})\",\"$1-$2 $3 $4\",[\"9\"],\"0$1\",0,\"$1 $2 $3 $4\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1-$2 $3 $4 $5\",[\"[26]\"],\"0$1\",0,\"$1 $2 $3 $4 $5\"]],\"0\",0,0,0,0,0,[0,[\"7[02369]\\\\d{7}\",[9]]]],\"SG\":[\"65\",\"0[0-3]\\\\d\",\"(?:(?:1\\\\d|8)\\\\d\\\\d|7000)\\\\d{7}|[3689]\\\\d{7}\",[8,10,11],[[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[369]|8(?:0[1-9]|[1-9])\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"8\"]],[\"(\\\\d{4})(\\\\d{4})(\\\\d{3})\",\"$1 $2 $3\",[\"7\"]],[\"(\\\\d{4})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"1\"]]],0,0,0,0,0,0,[0,[\"896[0-4]\\\\d{4}|(?:8(?:0[1-9]|[1-8]\\\\d|9[0-5])|9[0-8]\\\\d)\\\\d{5}\",[8]]]],\"SH\":[\"290\",\"00\",\"(?:[256]\\\\d|8)\\\\d{3}\",[4,5],0,0,0,0,0,0,\"[256]\",[0,[\"[56]\\\\d{4}\",[5]]]],\"SI\":[\"386\",\"00|10(?:22|66|88|99)\",\"[1-7]\\\\d{7}|8\\\\d{4,7}|90\\\\d{4,6}\",[5,6,7,8],[[\"(\\\\d{2})(\\\\d{3,6})\",\"$1 $2\",[\"8[09]|9\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{5})\",\"$1 $2\",[\"59|8\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[37][01]|4[0139]|51|6\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[1-57]\"],\"(0$1)\"]],\"0\",0,0,0,0,0,[0,[\"65(?:[178]\\\\d|5[56]|6[01])\\\\d{4}|(?:[37][01]|4[0139]|51|6[489])\\\\d{6}\",[8]]],\"00\"],\"SJ\":[\"47\",\"00\",\"0\\\\d{4}|(?:[489]\\\\d|79)\\\\d{6}\",[5,8],0,0,0,0,0,0,\"79\",[0,[\"(?:4[015-8]|9\\\\d)\\\\d{6}\",[8]]]],\"SK\":[\"421\",\"00\",\"[2-689]\\\\d{8}|[2-59]\\\\d{6}|[2-5]\\\\d{5}\",[6,7,9],[[\"(\\\\d)(\\\\d{2})(\\\\d{3,4})\",\"$1 $2 $3\",[\"21\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2,3})\",\"$1 $2 $3\",[\"[3-5][1-8]1\",\"[3-5][1-8]1[67]\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{3})(\\\\d{2})\",\"$1/$2 $3 $4\",[\"2\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[689]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1/$2 $3 $4\",[\"[3-5]\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"909[1-9]\\\\d{5}|9(?:0[1-8]|1[0-24-9]|4[03-57-9]|5\\\\d)\\\\d{6}\",[9]]]],\"SL\":[\"232\",\"00\",\"(?:[237-9]\\\\d|66)\\\\d{6}\",[8],[[\"(\\\\d{2})(\\\\d{6})\",\"$1 $2\",[\"[236-9]\"],\"(0$1)\"]],\"0\",0,0,0,0,0,[0,[\"(?:25|3[0-5]|66|7[2-9]|8[08]|9[09])\\\\d{6}\"]]],\"SM\":[\"378\",\"00\",\"(?:0549|[5-7]\\\\d)\\\\d{6}\",[8,10],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[5-7]\"]],[\"(\\\\d{4})(\\\\d{6})\",\"$1 $2\",[\"0\"]]],0,0,\"([89]\\\\d{5})$\",\"0549$1\",0,0,[0,[\"6[16]\\\\d{6}\",[8]]]],\"SN\":[\"221\",\"00\",\"(?:[378]\\\\d|93)\\\\d{7}\",[9],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"8\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[379]\"]]],0,0,0,0,0,0,[0,[\"7(?:(?:[06-8]\\\\d|[19]0|21)\\\\d|5(?:0[01]|[19]0|2[25]|3[36]|[4-7]\\\\d|8[35]))\\\\d{5}\"]]],\"SO\":[\"252\",\"00\",\"[346-9]\\\\d{8}|[12679]\\\\d{7}|[1-5]\\\\d{6}|[1348]\\\\d{5}\",[6,7,8,9],[[\"(\\\\d{2})(\\\\d{4})\",\"$1 $2\",[\"8[125]\"]],[\"(\\\\d{6})\",\"$1\",[\"[134]\"]],[\"(\\\\d)(\\\\d{6})\",\"$1 $2\",[\"[15]|2[0-79]|3[0-46-8]|4[0-7]\"]],[\"(\\\\d)(\\\\d{7})\",\"$1 $2\",[\"(?:2|90)4|[67]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[348]|64|79|90\"]],[\"(\\\\d{2})(\\\\d{5,7})\",\"$1 $2\",[\"1|28|6[0-35-9]|7[67]|9[2-9]\"]]],\"0\",0,0,0,0,0,[0,[\"(?:(?:15|(?:3[59]|4[89]|6\\\\d|7[679]|8[08])\\\\d|9(?:0\\\\d|[2-9]))\\\\d|2(?:4\\\\d|8))\\\\d{5}|(?:[67]\\\\d\\\\d|904)\\\\d{5}\",[7,8,9]]]],\"SR\":[\"597\",\"00\",\"(?:[2-5]|68|[78]\\\\d)\\\\d{5}\",[6,7],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1-$2-$3\",[\"56\"]],[\"(\\\\d{3})(\\\\d{3})\",\"$1-$2\",[\"[2-5]\"]],[\"(\\\\d{3})(\\\\d{4})\",\"$1-$2\",[\"[6-8]\"]]],0,0,0,0,0,0,[0,[\"(?:7[124-7]|8[1-9])\\\\d{5}\",[7]]]],\"SS\":[\"211\",\"00\",\"[19]\\\\d{8}\",[9],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[19]\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"(?:12|9[1257-9])\\\\d{7}\"]]],\"ST\":[\"239\",\"00\",\"(?:22|9\\\\d)\\\\d{5}\",[7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[29]\"]]],0,0,0,0,0,0,[0,[\"900[5-9]\\\\d{3}|9(?:0[1-9]|[89]\\\\d)\\\\d{4}\"]]],\"SV\":[\"503\",\"00\",\"[267]\\\\d{7}|(?:80\\\\d|900)\\\\d{4}(?:\\\\d{4})?\",[7,8,11],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[89]\"]],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[267]\"]],[\"(\\\\d{3})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"[89]\"]]],0,0,0,0,0,0,[0,[\"[67]\\\\d{7}\",[8]]]],\"SX\":[\"1\",\"011\",\"7215\\\\d{6}|(?:[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"(5\\\\d{6})$|1\",\"721$1\",0,\"721\",[0,[\"7215(?:1[02]|2\\\\d|5[034679]|8[014-8])\\\\d{4}\"]]],\"SY\":[\"963\",\"00\",\"[1-359]\\\\d{8}|[1-5]\\\\d{7}\",[8,9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[1-4]|5[1-3]\"],\"0$1\",1],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[59]\"],\"0$1\",1]],\"0\",0,0,0,0,0,[0,[\"(?:50|9[1-689])\\\\d{7}\",[9]]]],\"SZ\":[\"268\",\"00\",\"0800\\\\d{4}|(?:[237]\\\\d|900)\\\\d{6}\",[8,9],[[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[0237]\"]],[\"(\\\\d{5})(\\\\d{4})\",\"$1 $2\",[\"9\"]]],0,0,0,0,0,0,[0,[\"7[6-9]\\\\d{6}\",[8]]]],\"TA\":[\"290\",\"00\",\"8\\\\d{3}\",[4],0,0,0,0,0,0,\"8\"],\"TC\":[\"1\",\"011\",\"(?:[58]\\\\d\\\\d|649|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-479]\\\\d{6})$|1\",\"649$1\",0,\"649\",[0,[\"649(?:2(?:3[129]|4[1-79])|3\\\\d\\\\d|4[34][1-3])\\\\d{4}\"]]],\"TD\":[\"235\",\"00|16\",\"(?:22|[689]\\\\d|77)\\\\d{6}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[26-9]\"]]],0,0,0,0,0,0,[0,[\"(?:[69]\\\\d|77|8[56])\\\\d{6}\"]],\"00\"],\"TG\":[\"228\",\"00\",\"[279]\\\\d{7}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[279]\"]]],0,0,0,0,0,0,[0,[\"(?:7[0-29]|9[0-36-9])\\\\d{6}\"]]],\"TH\":[\"66\",\"00[1-9]\",\"(?:001800|[2-57]|[689]\\\\d)\\\\d{7}|1\\\\d{7,9}\",[8,9,10,13],[[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"2\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[13-9]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"1\"]]],\"0\",0,0,0,0,0,[0,[\"67(?:1[0-8]|2[4-7])\\\\d{5}|(?:14|6[1-6]|[89]\\\\d)\\\\d{7}\",[9]]]],\"TJ\":[\"992\",\"810\",\"[0-57-9]\\\\d{8}\",[9],[[\"(\\\\d{6})(\\\\d)(\\\\d{2})\",\"$1 $2 $3\",[\"331\",\"3317\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3\",[\"44[02-479]|[34]7\"]],[\"(\\\\d{4})(\\\\d)(\\\\d{4})\",\"$1 $2 $3\",[\"3(?:[1245]|3[12])\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[0-57-9]\"]]],0,0,0,0,0,0,[0,[\"(?:33[03-9]|4(?:1[18]|4[02-479])|81[1-9])\\\\d{6}|(?:[09]\\\\d|1[0178]|2[02]|[34]0|5[05]|7[01578]|8[078])\\\\d{7}\"]],\"8~10\"],\"TK\":[\"690\",\"00\",\"[2-47]\\\\d{3,6}\",[4,5,6,7],0,0,0,0,0,0,0,[0,[\"7[2-4]\\\\d{2,5}\"]]],\"TL\":[\"670\",\"00\",\"7\\\\d{7}|(?:[2-47]\\\\d|[89]0)\\\\d{5}\",[7,8],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[2-489]|70\"]],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"7\"]]],0,0,0,0,0,0,[0,[\"7[2-8]\\\\d{6}\",[8]]]],\"TM\":[\"993\",\"810\",\"(?:[1-6]\\\\d|71)\\\\d{6}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2-$3-$4\",[\"12\"],\"(8 $1)\"],[\"(\\\\d{3})(\\\\d)(\\\\d{2})(\\\\d{2})\",\"$1 $2-$3-$4\",[\"[1-5]\"],\"(8 $1)\"],[\"(\\\\d{2})(\\\\d{6})\",\"$1 $2\",[\"[67]\"],\"8 $1\"]],\"8\",0,0,0,0,0,[0,[\"(?:6\\\\d|71)\\\\d{6}\"]],\"8~10\"],\"TN\":[\"216\",\"00\",\"[2-57-9]\\\\d{7}\",[8],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[2-57-9]\"]]],0,0,0,0,0,0,[0,[\"3(?:001|[12]40)\\\\d{4}|(?:(?:[259]\\\\d|4[0-8])\\\\d|3(?:1[1-35]|6[0-4]|91))\\\\d{5}\"]]],\"TO\":[\"676\",\"00\",\"(?:0800|(?:[5-8]\\\\d\\\\d|999)\\\\d)\\\\d{3}|[2-8]\\\\d{4}\",[5,7],[[\"(\\\\d{2})(\\\\d{3})\",\"$1-$2\",[\"[2-4]|50|6[09]|7[0-24-69]|8[05]\"]],[\"(\\\\d{4})(\\\\d{3})\",\"$1 $2\",[\"0\"]],[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[5-9]\"]]],0,0,0,0,0,0,[0,[\"(?:5(?:4[0-5]|5[4-6])|6(?:[09]\\\\d|3[02]|8[15-9])|(?:7\\\\d|8[46-9])\\\\d|999)\\\\d{4}\",[7]]]],\"TR\":[\"90\",\"00\",\"4\\\\d{6}|8\\\\d{11,12}|(?:[2-58]\\\\d\\\\d|900)\\\\d{7}\",[7,10,12,13],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"512|8[01589]|90\"],\"0$1\",1],[\"(\\\\d{3})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"5(?:[0-59]|61)\",\"5(?:[0-59]|61[06])\",\"5(?:[0-59]|61[06]1)\"],\"0$1\",1],[\"(\\\\d{3})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[24][1-8]|3[1-9]\"],\"(0$1)\",1],[\"(\\\\d{3})(\\\\d{3})(\\\\d{6,7})\",\"$1 $2 $3\",[\"80\"],\"0$1\",1]],\"0\",0,0,0,0,0,[0,[\"561(?:011|61\\\\d)\\\\d{4}|5(?:0[15-7]|1[06]|24|[34]\\\\d|5[1-59]|9[46])\\\\d{7}\",[10]]]],\"TT\":[\"1\",\"011\",\"(?:[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-46-8]\\\\d{6})$|1\",\"868$1\",0,\"868\",[0,[\"868(?:(?:2[5-9]|3\\\\d)\\\\d|4(?:3[0-6]|[6-9]\\\\d)|6(?:20|78|8\\\\d)|7(?:0[1-9]|1[02-9]|[2-9]\\\\d))\\\\d{4}\"]]],\"TV\":[\"688\",\"00\",\"(?:2|7\\\\d\\\\d|90)\\\\d{4}\",[5,6,7],[[\"(\\\\d{2})(\\\\d{3})\",\"$1 $2\",[\"2\"]],[\"(\\\\d{2})(\\\\d{4})\",\"$1 $2\",[\"90\"]],[\"(\\\\d{2})(\\\\d{5})\",\"$1 $2\",[\"7\"]]],0,0,0,0,0,0,[0,[\"(?:7[01]\\\\d|90)\\\\d{4}\",[6,7]]]],\"TW\":[\"886\",\"0(?:0[25-79]|19)\",\"[2-689]\\\\d{8}|7\\\\d{9,10}|[2-8]\\\\d{7}|2\\\\d{6}\",[7,8,9,10,11],[[\"(\\\\d{2})(\\\\d)(\\\\d{4})\",\"$1 $2 $3\",[\"202\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[258]0\"],\"0$1\"],[\"(\\\\d)(\\\\d{3,4})(\\\\d{4})\",\"$1 $2 $3\",[\"[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]\",\"[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[49]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4,5})\",\"$1 $2 $3\",[\"7\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"(?:40001[0-2]|9[0-8]\\\\d{4})\\\\d{3}\",[9]]],0,\"#\"],\"TZ\":[\"255\",\"00[056]\",\"(?:[25-8]\\\\d|41|90)\\\\d{7}\",[9],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3\",[\"[89]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[24]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{7})\",\"$1 $2\",[\"5\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[67]\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"(?:6[125-9]|7[13-9])\\\\d{7}\"]]],\"UA\":[\"380\",\"00\",\"[89]\\\\d{9}|[3-9]\\\\d{8}\",[9,10],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]\",\"6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{5})\",\"$1 $2\",[\"3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])\",\"3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[3-7]|89|9[1-9]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[89]\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"790\\\\d{6}|(?:39|50|6[36-8]|7[1-357]|9[1-9])\\\\d{7}\",[9]]],\"0~0\"],\"UG\":[\"256\",\"00[057]\",\"800\\\\d{6}|(?:[29]0|[347]\\\\d)\\\\d{7}\",[9],[[\"(\\\\d{4})(\\\\d{5})\",\"$1 $2\",[\"202\",\"2024\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{6})\",\"$1 $2\",[\"[27-9]|4(?:6[45]|[7-9])\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{7})\",\"$1 $2\",[\"[34]\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"72[48]0\\\\d{5}|7(?:[015-8]\\\\d|2[067]|36|4[0-7]|9[89])\\\\d{6}\"]]],\"US\":[\"1\",\"011\",\"[2-9]\\\\d{9}|3\\\\d{6}\",[10],[[\"(\\\\d{3})(\\\\d{4})\",\"$1-$2\",[\"310\"],0,1],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"($1) $2-$3\",[\"[2-9]\"],0,1,\"$1-$2-$3\"]],\"1\",0,0,0,0,0,[0,[\"(?:3052(?:0[0-8]|[1-9]\\\\d)|5056(?:[0-35-9]\\\\d|4[468]))\\\\d{4}|(?:2742|305[3-9]|472[247-9]|505[2-57-9]|983[2-47-9])\\\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-47-9]|1[02-9]|2[0135-79]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\\\d{6}\"]]],\"UY\":[\"598\",\"0(?:0|1[3-9]\\\\d)\",\"0004\\\\d{2,9}|[1249]\\\\d{7}|(?:[49]\\\\d|80)\\\\d{5}\",[6,7,8,9,10,11,12,13],[[\"(\\\\d{3})(\\\\d{3,4})\",\"$1 $2\",[\"0\"]],[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[49]0|8\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"9\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[124]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{2,4})\",\"$1 $2 $3\",[\"0\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})(\\\\d{2,4})\",\"$1 $2 $3 $4\",[\"0\"]]],\"0\",0,0,0,0,0,[0,[\"9[1-9]\\\\d{6}\",[8]]],\"00\",\" int. \"],\"UZ\":[\"998\",\"00\",\"(?:20|33|[5-9]\\\\d)\\\\d{7}\",[9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[235-9]\"]]],0,0,0,0,0,0,[0,[\"(?:(?:[25]0|33|8[78]|9[0-57-9])\\\\d{3}|6(?:1(?:2(?:2[01]|98)|35[0-4]|50\\\\d|61[23]|7(?:[01][017]|4\\\\d|55|9[5-9]))|2(?:(?:11|7\\\\d)\\\\d|2(?:[12]1|9[01379])|5(?:[126]\\\\d|3[0-4]))|5(?:19[01]|2(?:27|9[26])|(?:30|59|7\\\\d)\\\\d)|6(?:2(?:1[5-9]|2[0367]|38|41|52|60)|(?:3[79]|9[0-3])\\\\d|4(?:56|83)|7(?:[07]\\\\d|1[017]|3[07]|4[047]|5[057]|67|8[0178]|9[79]))|7(?:2(?:24|3[237]|4[5-9]|7[15-8])|5(?:7[12]|8[0589])|7(?:0\\\\d|[39][07])|9(?:0\\\\d|7[079])))|7(?:[07]\\\\d{3}|1(?:13[01]|6(?:0[47]|1[67]|66)|71[3-69]|98\\\\d)|2(?:2(?:2[79]|95)|3(?:2[5-9]|6[0-6])|57\\\\d|7(?:0\\\\d|1[17]|2[27]|3[37]|44|5[057]|66|88))|3(?:2(?:1[0-6]|21|3[469]|7[159])|(?:33|9[4-6])\\\\d|5(?:0[0-4]|5[579]|9\\\\d)|7(?:[0-3579]\\\\d|4[0467]|6[67]|8[078]))|4(?:2(?:29|5[0257]|6[0-7]|7[1-57])|5(?:1[0-4]|8\\\\d|9[5-9])|7(?:0\\\\d|1[024589]|2[0-27]|3[0137]|[46][07]|5[01]|7[5-9]|9[079])|9(?:7[015-9]|[89]\\\\d))|5(?:112|2(?:0\\\\d|2[29]|[49]4)|3[1568]\\\\d|52[6-9]|7(?:0[01578]|1[017]|[23]7|4[047]|[5-7]\\\\d|8[78]|9[079]))|9(?:22[128]|3(?:2[0-4]|7\\\\d)|57[02569]|7(?:2[05-9]|3[37]|4\\\\d|60|7[2579]|87|9[07]))))\\\\d{4}\"]]],\"VA\":[\"39\",\"00\",\"0\\\\d{5,10}|3[0-8]\\\\d{7,10}|55\\\\d{8}|8\\\\d{5}(?:\\\\d{2,4})?|(?:1\\\\d|39)\\\\d{7,8}\",[6,7,8,9,10,11,12],0,0,0,0,0,0,\"06698\",[0,[\"3[1-9]\\\\d{8}|3[2-9]\\\\d{7}\",[9,10]]]],\"VC\":[\"1\",\"011\",\"(?:[58]\\\\d\\\\d|784|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-7]\\\\d{6})$|1\",\"784$1\",0,\"784\",[0,[\"784(?:4(?:3[0-5]|5[45]|89|9[0-8])|5(?:2[6-9]|3[0-4])|720)\\\\d{4}\"]]],\"VE\":[\"58\",\"00\",\"[68]00\\\\d{7}|(?:[24]\\\\d|[59]0)\\\\d{8}\",[10],[[\"(\\\\d{3})(\\\\d{7})\",\"$1-$2\",[\"[24-689]\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"4(?:1[24-8]|2[46])\\\\d{7}\"]]],\"VG\":[\"1\",\"011\",\"(?:284|[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-578]\\\\d{6})$|1\",\"284$1\",0,\"284\",[0,[\"284(?:245|3(?:0[0-3]|4[0-7]|68|9[34])|4(?:4[0-6]|68|9[69])|5(?:4[0-7]|68|9[69]))\\\\d{4}\"]]],\"VI\":[\"1\",\"011\",\"[58]\\\\d{9}|(?:34|90)0\\\\d{7}\",[10],0,\"1\",0,\"([2-9]\\\\d{6})$|1\",\"340$1\",0,\"340\",[0,[\"340(?:2(?:0\\\\d|10|2[06-8]|4[49]|77)|3(?:32|44)|4(?:2[23]|44|7[34]|89)|5(?:1[34]|55)|6(?:2[56]|4[23]|77|9[023])|7(?:1[2-57-9]|2[57]|7\\\\d)|884|998)\\\\d{4}\"]]],\"VN\":[\"84\",\"00\",\"[12]\\\\d{9}|[135-9]\\\\d{8}|[16]\\\\d{7}|[16-8]\\\\d{6}\",[7,8,9,10],[[\"(\\\\d{2})(\\\\d{5})\",\"$1 $2\",[\"80\"],\"0$1\",1],[\"(\\\\d{4})(\\\\d{4,6})\",\"$1 $2\",[\"1\"],0,1],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"6\"],\"0$1\",1],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[357-9]\"],\"0$1\",1],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"2[48]\"],\"0$1\",1],[\"(\\\\d{3})(\\\\d{4})(\\\\d{3})\",\"$1 $2 $3\",[\"2\"],\"0$1\",1]],\"0\",0,0,0,0,0,[0,[\"(?:5(?:2[238]|59)|89[6-9]|99[013-9])\\\\d{6}|(?:3\\\\d|5[1689]|7[06-9]|8[1-8]|9[0-8])\\\\d{7}\",[9]]]],\"VU\":[\"678\",\"00\",\"[57-9]\\\\d{6}|(?:[238]\\\\d|48)\\\\d{3}\",[5,7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[57-9]\"]]],0,0,0,0,0,0,[0,[\"(?:[58]\\\\d|7[013-7])\\\\d{5}\",[7]]]],\"WF\":[\"681\",\"00\",\"(?:40|72|8\\\\d{4})\\\\d{4}|[89]\\\\d{5}\",[6,9],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3\",[\"[47-9]\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"8\"]]],0,0,0,0,0,0,[0,[\"(?:72|8[23])\\\\d{4}\",[6]]]],\"WS\":[\"685\",\"0\",\"(?:[2-6]|8\\\\d{5})\\\\d{4}|[78]\\\\d{6}|[68]\\\\d{5}\",[5,6,7,10],[[\"(\\\\d{5})\",\"$1\",[\"[2-5]|6[1-9]\"]],[\"(\\\\d{3})(\\\\d{3,7})\",\"$1 $2\",[\"[68]\"]],[\"(\\\\d{2})(\\\\d{5})\",\"$1 $2\",[\"7\"]]],0,0,0,0,0,0,[0,[\"(?:7[1-35-7]|8(?:[3-7]|9\\\\d{3}))\\\\d{5}\",[7,10]]]],\"XK\":[\"383\",\"00\",\"2\\\\d{7,8}|3\\\\d{7,11}|(?:4\\\\d\\\\d|[89]00)\\\\d{5}\",[8,9,10,11,12],[[\"(\\\\d{3})(\\\\d{5})\",\"$1 $2\",[\"[89]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[2-4]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"2|39\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{7,10})\",\"$1 $2\",[\"3\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"4[3-9]\\\\d{6}\",[8]]]],\"YE\":[\"967\",\"00\",\"(?:1|7\\\\d)\\\\d{7}|[1-7]\\\\d{6}\",[7,8,9],[[\"(\\\\d)(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[1-6]|7(?:[24-6]|8[0-7])\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"7\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"7[01378]\\\\d{7}\",[9]]]],\"YT\":[\"262\",\"00\",\"7093\\\\d{5}|(?:80|9\\\\d)\\\\d{7}|(?:26|63)9\\\\d{6}\",[9],0,\"0\",0,0,0,0,0,[0,[\"(?:639(?:0[0-79]|1[019]|[267]\\\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\\\d{4}\"]]],\"ZA\":[\"27\",\"00\",\"[1-79]\\\\d{8}|8\\\\d{4,9}\",[5,6,7,8,9,10],[[\"(\\\\d{2})(\\\\d{3,4})\",\"$1 $2\",[\"8[1-4]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2,3})\",\"$1 $2 $3\",[\"8[1-4]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"860\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[1-9]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"8\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"(?:1(?:3492[0-25]|4495[0235]|549(?:20|5[01]))|4[34]492[01])\\\\d{3}|8[1-4]\\\\d{3,7}|(?:2[27]|47|54)4950\\\\d{3}|(?:1(?:049[2-4]|9[12]\\\\d\\\\d)|(?:6\\\\d\\\\d|7(?:[0-46-9]\\\\d|5[0-4]))\\\\d\\\\d|8(?:5\\\\d{3}|7(?:08[67]|158|28[5-9]|310)))\\\\d{4}|(?:1[6-8]|28|3[2-69]|4[025689]|5[36-8])4920\\\\d{3}|(?:12|[2-5]1)492\\\\d{4}\",[5,6,7,8,9]]]],\"ZM\":[\"260\",\"00\",\"800\\\\d{6}|(?:21|63|[79]\\\\d)\\\\d{7}\",[9],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[28]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{7})\",\"$1 $2\",[\"[79]\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"(?:7[5-79]|9[5-8])\\\\d{7}\"]]],\"ZW\":[\"263\",\"00\",\"2(?:[0-57-9]\\\\d{6,8}|6[0-24-9]\\\\d{6,7})|[38]\\\\d{9}|[35-8]\\\\d{8}|[3-6]\\\\d{7}|[1-689]\\\\d{6}|[1-3569]\\\\d{5}|[1356]\\\\d{4}\",[5,6,7,8,9,10],[[\"(\\\\d{3})(\\\\d{3,5})\",\"$1 $2\",[\"2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{2,4})\",\"$1 $2 $3\",[\"[49]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"80\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{7})\",\"$1 $2\",[\"24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2\",\"2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]\"],\"(0$1)\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"7\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)\",\"2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{6})\",\"$1 $2\",[\"8\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3,5})\",\"$1 $2\",[\"1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"29[013-9]|39|54\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{3,5})\",\"$1 $2\",[\"(?:25|54)8\",\"258|5483\"],\"0$1\"]],\"0\",0,0,0,0,0,[0,[\"7(?:[1278]\\\\d|3[1-9])\\\\d{6}\",[9]]]]},\"nonGeographic\":{\"800\":[\"800\",0,\"(?:00|[1-9]\\\\d)\\\\d{6}\",[8],[[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"\\\\d\"]]],0,0,0,0,0,0,[0,0,[\"(?:00|[1-9]\\\\d)\\\\d{6}\"]]],\"808\":[\"808\",0,\"[1-9]\\\\d{7}\",[8],[[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[1-9]\"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,[\"[1-9]\\\\d{7}\"]]],\"870\":[\"870\",0,\"7\\\\d{11}|[235-7]\\\\d{8}\",[9,12],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[235-7]\"]]],0,0,0,0,0,0,[0,[\"(?:[356]|774[45])\\\\d{8}|7[6-8]\\\\d{7}\"],0,0,0,0,0,0,[\"2\\\\d{8}\",[9]]]],\"878\":[\"878\",0,\"10\\\\d{10}\",[12],[[\"(\\\\d{2})(\\\\d{5})(\\\\d{5})\",\"$1 $2 $3\",[\"1\"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,[\"10\\\\d{10}\"]]],\"881\":[\"881\",0,\"6\\\\d{9}|[0-36-9]\\\\d{8}\",[9,10],[[\"(\\\\d)(\\\\d{3})(\\\\d{5})\",\"$1 $2 $3\",[\"[0-37-9]\"]],[\"(\\\\d)(\\\\d{3})(\\\\d{5,6})\",\"$1 $2 $3\",[\"6\"]]],0,0,0,0,0,0,[0,[\"6\\\\d{9}|[0-36-9]\\\\d{8}\"]]],\"882\":[\"882\",0,\"[13]\\\\d{6}(?:\\\\d{2,5})?|[19]\\\\d{7}|(?:[25]\\\\d\\\\d|4)\\\\d{7}(?:\\\\d{2})?\",[7,8,9,10,11,12],[[\"(\\\\d{2})(\\\\d{5})\",\"$1 $2\",[\"16|342\"]],[\"(\\\\d{2})(\\\\d{6})\",\"$1 $2\",[\"49\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3\",[\"1[36]|9\"]],[\"(\\\\d{2})(\\\\d{4})(\\\\d{3})\",\"$1 $2 $3\",[\"3[23]\"]],[\"(\\\\d{2})(\\\\d{3,4})(\\\\d{4})\",\"$1 $2 $3\",[\"16\"]],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"10|23|3(?:[15]|4[57])|4|51\"]],[\"(\\\\d{3})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"34\"]],[\"(\\\\d{2})(\\\\d{4,5})(\\\\d{5})\",\"$1 $2 $3\",[\"[1-35]\"]]],0,0,0,0,0,0,[0,[\"342\\\\d{4}|(?:337|49)\\\\d{6}|(?:3(?:2|47|7\\\\d{3})|50\\\\d{3})\\\\d{7}\",[7,8,9,10,12]],0,0,0,[\"348[57]\\\\d{7}\",[11]],0,0,[\"1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\\\d{4}|6\\\\d{5,10})|(?:345\\\\d|9[89])\\\\d{6}|(?:10|2(?:3|85\\\\d)|3(?:[15]|[69]\\\\d\\\\d)|4[15-8]|51)\\\\d{8}\"]]],\"883\":[\"883\",0,\"(?:[1-4]\\\\d|51)\\\\d{6,10}\",[8,9,10,11,12],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{2,8})\",\"$1 $2 $3\",[\"[14]|2[24-689]|3[02-689]|51[24-9]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"510\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"21\"]],[\"(\\\\d{4})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"51[13]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"[235]\"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,[\"(?:2(?:00\\\\d\\\\d|10)|(?:370[1-9]|51\\\\d0)\\\\d)\\\\d{7}|51(?:00\\\\d{5}|[24-9]0\\\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\\\d{5,9}\"]]],\"888\":[\"888\",0,\"\\\\d{11}\",[11],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{5})\",\"$1 $2 $3\"]],0,0,0,0,0,0,[0,0,0,0,0,0,[\"\\\\d{11}\"]]],\"979\":[\"979\",0,\"[1359]\\\\d{8}\",[9],[[\"(\\\\d)(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"[1359]\"]]],0,0,0,0,0,0,[0,0,0,[\"[1359]\\\\d{8}\"]]]}}","var objectConstructor = {}.constructor;\nexport default function isObject(object) {\n return object !== undefined && object !== null && object.constructor === objectConstructor;\n}\n","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport isObject from './helpers/isObject.js'; // Extracts the following properties from function arguments:\n// * input `text`\n// * `options` object\n// * `metadata` JSON\n\nexport default function normalizeArguments(args) {\n var _Array$prototype$slic = Array.prototype.slice.call(args),\n _Array$prototype$slic2 = _slicedToArray(_Array$prototype$slic, 4),\n arg_1 = _Array$prototype$slic2[0],\n arg_2 = _Array$prototype$slic2[1],\n arg_3 = _Array$prototype$slic2[2],\n arg_4 = _Array$prototype$slic2[3];\n\n var text;\n var options;\n var metadata; // If the phone number is passed as a string.\n // `parsePhoneNumber('88005553535', ...)`.\n\n if (typeof arg_1 === 'string') {\n text = arg_1;\n } else throw new TypeError('A text for parsing must be a string.'); // If \"default country\" argument is being passed then move it to `options`.\n // `parsePhoneNumber('88005553535', 'RU', [options], metadata)`.\n\n\n if (!arg_2 || typeof arg_2 === 'string') {\n if (arg_4) {\n options = arg_3;\n metadata = arg_4;\n } else {\n options = undefined;\n metadata = arg_3;\n }\n\n if (arg_2) {\n options = _objectSpread({\n defaultCountry: arg_2\n }, options);\n }\n } // `defaultCountry` is not passed.\n // Example: `parsePhoneNumber('+78005553535', [options], metadata)`.\n else if (isObject(arg_2)) {\n if (arg_3) {\n options = arg_2;\n metadata = arg_3;\n } else {\n metadata = arg_2;\n }\n } else throw new Error(\"Invalid second argument: \".concat(arg_2));\n\n return {\n text: text,\n options: options,\n metadata: metadata\n };\n}\n","// The minimum length of the national significant number.\nexport var MIN_LENGTH_FOR_NSN = 2; // The ITU says the maximum length should be 15,\n// but one can find longer numbers in Germany.\n\nexport var MAX_LENGTH_FOR_NSN = 17; // The maximum length of the country calling code.\n\nexport var MAX_LENGTH_COUNTRY_CODE = 3; // Digits accepted in phone numbers\n// (ascii, fullwidth, arabic-indic, and eastern arabic digits).\n\nexport var VALID_DIGITS = \"0-9\\uFF10-\\uFF19\\u0660-\\u0669\\u06F0-\\u06F9\"; // `DASHES` will be right after the opening square bracket of the \"character class\"\n\nvar DASHES = \"-\\u2010-\\u2015\\u2212\\u30FC\\uFF0D\";\nvar SLASHES = \"\\uFF0F/\";\nvar DOTS = \"\\uFF0E.\";\nexport var WHITESPACE = \" \\xA0\\xAD\\u200B\\u2060\\u3000\";\nvar BRACKETS = \"()\\uFF08\\uFF09\\uFF3B\\uFF3D\\\\[\\\\]\"; // export const OPENING_BRACKETS = '(\\uFF08\\uFF3B\\\\\\['\n\nvar TILDES = \"~\\u2053\\u223C\\uFF5E\"; // Regular expression of acceptable punctuation found in phone numbers. This\n// excludes punctuation found as a leading character only. This consists of dash\n// characters, white space characters, full stops, slashes, square brackets,\n// parentheses and tildes. Full-width variants are also present.\n\nexport var VALID_PUNCTUATION = \"\".concat(DASHES).concat(SLASHES).concat(DOTS).concat(WHITESPACE).concat(BRACKETS).concat(TILDES);\nexport var PLUS_CHARS = \"+\\uFF0B\"; // const LEADING_PLUS_CHARS_PATTERN = new RegExp('^[' + PLUS_CHARS + ']+')\n","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _wrapNativeSuper(Class) { var _cache = typeof Map === \"function\" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== \"function\") { throw new TypeError(\"Super expression must either be null or a function\"); } if (typeof _cache !== \"undefined\") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }\n\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _isNativeFunction(fn) { return Function.toString.call(fn).indexOf(\"[native code]\") !== -1; }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n// https://stackoverflow.com/a/46971044/970769\n// \"Breaking changes in Typescript 2.1\"\n// \"Extending built-ins like Error, Array, and Map may no longer work.\"\n// \"As a recommendation, you can manually adjust the prototype immediately after any super(...) calls.\"\n// https://github.com/Microsoft/TypeScript-wiki/blob/main/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work\nvar ParseError = /*#__PURE__*/function (_Error) {\n _inherits(ParseError, _Error);\n\n var _super = _createSuper(ParseError);\n\n function ParseError(code) {\n var _this;\n\n _classCallCheck(this, ParseError);\n\n _this = _super.call(this, code); // Set the prototype explicitly.\n // Any subclass of FooError will have to manually set the prototype as well.\n\n Object.setPrototypeOf(_assertThisInitialized(_this), ParseError.prototype);\n _this.name = _this.constructor.name;\n return _this;\n }\n\n return _createClass(ParseError);\n}( /*#__PURE__*/_wrapNativeSuper(Error));\n\nexport { ParseError as default };\n","// Copy-pasted from:\n// https://github.com/substack/semver-compare/blob/master/index.js\n//\n// Inlining this function because some users reported issues with\n// importing from `semver-compare` in a browser with ES6 \"native\" modules.\n//\n// Fixes `semver-compare` not being able to compare versions with alpha/beta/etc \"tags\".\n// https://github.com/catamphetamine/libphonenumber-js/issues/381\nexport default function (a, b) {\n a = a.split('-');\n b = b.split('-');\n var pa = a[0].split('.');\n var pb = b[0].split('.');\n\n for (var i = 0; i < 3; i++) {\n var na = Number(pa[i]);\n var nb = Number(pb[i]);\n if (na > nb) return 1;\n if (nb > na) return -1;\n if (!isNaN(na) && isNaN(nb)) return 1;\n if (isNaN(na) && !isNaN(nb)) return -1;\n }\n\n if (a[1] && b[1]) {\n return a[1] > b[1] ? 1 : a[1] < b[1] ? -1 : 0;\n }\n\n return !a[1] && b[1] ? 1 : a[1] && !b[1] ? -1 : 0;\n}\n","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport compare from './tools/semver-compare.js';\nimport isObject from './helpers/isObject.js'; // Added \"possibleLengths\" and renamed\n// \"country_phone_code_to_countries\" to \"country_calling_codes\".\n\nvar V2 = '1.0.18'; // Added \"idd_prefix\" and \"default_idd_prefix\".\n\nvar V3 = '1.2.0'; // Moved `001` country code to \"nonGeographic\" section of metadata.\n\nvar V4 = '1.7.35';\nvar DEFAULT_EXT_PREFIX = ' ext. ';\nvar CALLING_CODE_REG_EXP = /^\\d+$/;\n/**\r\n * See: https://gitlab.com/catamphetamine/libphonenumber-js/blob/master/METADATA.md\r\n */\n\nvar Metadata = /*#__PURE__*/function () {\n function Metadata(metadata) {\n _classCallCheck(this, Metadata);\n\n validateMetadata(metadata);\n this.metadata = metadata;\n setVersion.call(this, metadata);\n }\n\n _createClass(Metadata, [{\n key: \"getCountries\",\n value: function getCountries() {\n return Object.keys(this.metadata.countries).filter(function (_) {\n return _ !== '001';\n });\n }\n }, {\n key: \"getCountryMetadata\",\n value: function getCountryMetadata(countryCode) {\n return this.metadata.countries[countryCode];\n }\n }, {\n key: \"nonGeographic\",\n value: function nonGeographic() {\n if (this.v1 || this.v2 || this.v3) return; // `nonGeographical` was a typo.\n // It's present in metadata generated from `1.7.35` to `1.7.37`.\n // The test case could be found by searching for \"nonGeographical\".\n\n return this.metadata.nonGeographic || this.metadata.nonGeographical;\n }\n }, {\n key: \"hasCountry\",\n value: function hasCountry(country) {\n return this.getCountryMetadata(country) !== undefined;\n }\n }, {\n key: \"hasCallingCode\",\n value: function hasCallingCode(callingCode) {\n if (this.getCountryCodesForCallingCode(callingCode)) {\n return true;\n }\n\n if (this.nonGeographic()) {\n if (this.nonGeographic()[callingCode]) {\n return true;\n }\n } else {\n // A hacky workaround for old custom metadata (generated before V4).\n var countryCodes = this.countryCallingCodes()[callingCode];\n\n if (countryCodes && countryCodes.length === 1 && countryCodes[0] === '001') {\n return true;\n }\n }\n }\n }, {\n key: \"isNonGeographicCallingCode\",\n value: function isNonGeographicCallingCode(callingCode) {\n if (this.nonGeographic()) {\n return this.nonGeographic()[callingCode] ? true : false;\n } else {\n return this.getCountryCodesForCallingCode(callingCode) ? false : true;\n }\n } // Deprecated.\n\n }, {\n key: \"country\",\n value: function country(countryCode) {\n return this.selectNumberingPlan(countryCode);\n }\n }, {\n key: \"selectNumberingPlan\",\n value: function selectNumberingPlan(countryCode, callingCode) {\n // Supports just passing `callingCode` as the first argument.\n if (countryCode && CALLING_CODE_REG_EXP.test(countryCode)) {\n callingCode = countryCode;\n countryCode = null;\n }\n\n if (countryCode && countryCode !== '001') {\n if (!this.hasCountry(countryCode)) {\n throw new Error(\"Unknown country: \".concat(countryCode));\n }\n\n this.numberingPlan = new NumberingPlan(this.getCountryMetadata(countryCode), this);\n } else if (callingCode) {\n if (!this.hasCallingCode(callingCode)) {\n throw new Error(\"Unknown calling code: \".concat(callingCode));\n }\n\n this.numberingPlan = new NumberingPlan(this.getNumberingPlanMetadata(callingCode), this);\n } else {\n this.numberingPlan = undefined;\n }\n\n return this;\n }\n }, {\n key: \"getCountryCodesForCallingCode\",\n value: function getCountryCodesForCallingCode(callingCode) {\n var countryCodes = this.countryCallingCodes()[callingCode];\n\n if (countryCodes) {\n // Metadata before V4 included \"non-geographic entity\" calling codes\n // inside `country_calling_codes` (for example, `\"881\":[\"001\"]`).\n // Now the semantics of `country_calling_codes` has changed:\n // it's specifically for \"countries\" now.\n // Older versions of custom metadata will simply skip parsing\n // \"non-geographic entity\" phone numbers with new versions\n // of this library: it's not considered a bug,\n // because such numbers are extremely rare,\n // and developers extremely rarely use custom metadata.\n if (countryCodes.length === 1 && countryCodes[0].length === 3) {\n return;\n }\n\n return countryCodes;\n }\n }\n }, {\n key: \"getCountryCodeForCallingCode\",\n value: function getCountryCodeForCallingCode(callingCode) {\n var countryCodes = this.getCountryCodesForCallingCode(callingCode);\n\n if (countryCodes) {\n return countryCodes[0];\n }\n }\n }, {\n key: \"getNumberingPlanMetadata\",\n value: function getNumberingPlanMetadata(callingCode) {\n var countryCode = this.getCountryCodeForCallingCode(callingCode);\n\n if (countryCode) {\n return this.getCountryMetadata(countryCode);\n }\n\n if (this.nonGeographic()) {\n var metadata = this.nonGeographic()[callingCode];\n\n if (metadata) {\n return metadata;\n }\n } else {\n // A hacky workaround for old custom metadata (generated before V4).\n // In that metadata, there was no concept of \"non-geographic\" metadata\n // so metadata for `001` country code was stored along with other countries.\n // The test case can be found by searching for:\n // \"should work around `nonGeographic` metadata not existing\".\n var countryCodes = this.countryCallingCodes()[callingCode];\n\n if (countryCodes && countryCodes.length === 1 && countryCodes[0] === '001') {\n return this.metadata.countries['001'];\n }\n }\n } // Deprecated.\n\n }, {\n key: \"countryCallingCode\",\n value: function countryCallingCode() {\n return this.numberingPlan.callingCode();\n } // Deprecated.\n\n }, {\n key: \"IDDPrefix\",\n value: function IDDPrefix() {\n return this.numberingPlan.IDDPrefix();\n } // Deprecated.\n\n }, {\n key: \"defaultIDDPrefix\",\n value: function defaultIDDPrefix() {\n return this.numberingPlan.defaultIDDPrefix();\n } // Deprecated.\n\n }, {\n key: \"nationalNumberPattern\",\n value: function nationalNumberPattern() {\n return this.numberingPlan.nationalNumberPattern();\n } // Deprecated.\n\n }, {\n key: \"possibleLengths\",\n value: function possibleLengths() {\n return this.numberingPlan.possibleLengths();\n } // Deprecated.\n\n }, {\n key: \"formats\",\n value: function formats() {\n return this.numberingPlan.formats();\n } // Deprecated.\n\n }, {\n key: \"nationalPrefixForParsing\",\n value: function nationalPrefixForParsing() {\n return this.numberingPlan.nationalPrefixForParsing();\n } // Deprecated.\n\n }, {\n key: \"nationalPrefixTransformRule\",\n value: function nationalPrefixTransformRule() {\n return this.numberingPlan.nationalPrefixTransformRule();\n } // Deprecated.\n\n }, {\n key: \"leadingDigits\",\n value: function leadingDigits() {\n return this.numberingPlan.leadingDigits();\n } // Deprecated.\n\n }, {\n key: \"hasTypes\",\n value: function hasTypes() {\n return this.numberingPlan.hasTypes();\n } // Deprecated.\n\n }, {\n key: \"type\",\n value: function type(_type) {\n return this.numberingPlan.type(_type);\n } // Deprecated.\n\n }, {\n key: \"ext\",\n value: function ext() {\n return this.numberingPlan.ext();\n }\n }, {\n key: \"countryCallingCodes\",\n value: function countryCallingCodes() {\n if (this.v1) return this.metadata.country_phone_code_to_countries;\n return this.metadata.country_calling_codes;\n } // Deprecated.\n\n }, {\n key: \"chooseCountryByCountryCallingCode\",\n value: function chooseCountryByCountryCallingCode(callingCode) {\n return this.selectNumberingPlan(callingCode);\n }\n }, {\n key: \"hasSelectedNumberingPlan\",\n value: function hasSelectedNumberingPlan() {\n return this.numberingPlan !== undefined;\n }\n }]);\n\n return Metadata;\n}();\n\nexport { Metadata as default };\n\nvar NumberingPlan = /*#__PURE__*/function () {\n function NumberingPlan(metadata, globalMetadataObject) {\n _classCallCheck(this, NumberingPlan);\n\n this.globalMetadataObject = globalMetadataObject;\n this.metadata = metadata;\n setVersion.call(this, globalMetadataObject.metadata);\n }\n\n _createClass(NumberingPlan, [{\n key: \"callingCode\",\n value: function callingCode() {\n return this.metadata[0];\n } // Formatting information for regions which share\n // a country calling code is contained by only one region\n // for performance reasons. For example, for NANPA region\n // (\"North American Numbering Plan Administration\",\n // which includes USA, Canada, Cayman Islands, Bahamas, etc)\n // it will be contained in the metadata for `US`.\n\n }, {\n key: \"getDefaultCountryMetadataForRegion\",\n value: function getDefaultCountryMetadataForRegion() {\n return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode());\n } // Is always present.\n\n }, {\n key: \"IDDPrefix\",\n value: function IDDPrefix() {\n if (this.v1 || this.v2) return;\n return this.metadata[1];\n } // Is only present when a country supports multiple IDD prefixes.\n\n }, {\n key: \"defaultIDDPrefix\",\n value: function defaultIDDPrefix() {\n if (this.v1 || this.v2) return;\n return this.metadata[12];\n }\n }, {\n key: \"nationalNumberPattern\",\n value: function nationalNumberPattern() {\n if (this.v1 || this.v2) return this.metadata[1];\n return this.metadata[2];\n } // \"possible length\" data is always present in Google's metadata.\n\n }, {\n key: \"possibleLengths\",\n value: function possibleLengths() {\n if (this.v1) return;\n return this.metadata[this.v2 ? 2 : 3];\n }\n }, {\n key: \"_getFormats\",\n value: function _getFormats(metadata) {\n return metadata[this.v1 ? 2 : this.v2 ? 3 : 4];\n } // For countries of the same region (e.g. NANPA)\n // formats are all stored in the \"main\" country for that region.\n // E.g. \"RU\" and \"KZ\", \"US\" and \"CA\".\n\n }, {\n key: \"formats\",\n value: function formats() {\n var _this = this;\n\n var formats = this._getFormats(this.metadata) || this._getFormats(this.getDefaultCountryMetadataForRegion()) || [];\n return formats.map(function (_) {\n return new Format(_, _this);\n });\n }\n }, {\n key: \"nationalPrefix\",\n value: function nationalPrefix() {\n return this.metadata[this.v1 ? 3 : this.v2 ? 4 : 5];\n }\n }, {\n key: \"_getNationalPrefixFormattingRule\",\n value: function _getNationalPrefixFormattingRule(metadata) {\n return metadata[this.v1 ? 4 : this.v2 ? 5 : 6];\n } // For countries of the same region (e.g. NANPA)\n // national prefix formatting rule is stored in the \"main\" country for that region.\n // E.g. \"RU\" and \"KZ\", \"US\" and \"CA\".\n\n }, {\n key: \"nationalPrefixFormattingRule\",\n value: function nationalPrefixFormattingRule() {\n return this._getNationalPrefixFormattingRule(this.metadata) || this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion());\n }\n }, {\n key: \"_nationalPrefixForParsing\",\n value: function _nationalPrefixForParsing() {\n return this.metadata[this.v1 ? 5 : this.v2 ? 6 : 7];\n }\n }, {\n key: \"nationalPrefixForParsing\",\n value: function nationalPrefixForParsing() {\n // If `national_prefix_for_parsing` is not set explicitly,\n // then infer it from `national_prefix` (if any)\n return this._nationalPrefixForParsing() || this.nationalPrefix();\n }\n }, {\n key: \"nationalPrefixTransformRule\",\n value: function nationalPrefixTransformRule() {\n return this.metadata[this.v1 ? 6 : this.v2 ? 7 : 8];\n }\n }, {\n key: \"_getNationalPrefixIsOptionalWhenFormatting\",\n value: function _getNationalPrefixIsOptionalWhenFormatting() {\n return !!this.metadata[this.v1 ? 7 : this.v2 ? 8 : 9];\n } // For countries of the same region (e.g. NANPA)\n // \"national prefix is optional when formatting\" flag is\n // stored in the \"main\" country for that region.\n // E.g. \"RU\" and \"KZ\", \"US\" and \"CA\".\n\n }, {\n key: \"nationalPrefixIsOptionalWhenFormattingInNationalFormat\",\n value: function nationalPrefixIsOptionalWhenFormattingInNationalFormat() {\n return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata) || this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion());\n }\n }, {\n key: \"leadingDigits\",\n value: function leadingDigits() {\n return this.metadata[this.v1 ? 8 : this.v2 ? 9 : 10];\n }\n }, {\n key: \"types\",\n value: function types() {\n return this.metadata[this.v1 ? 9 : this.v2 ? 10 : 11];\n }\n }, {\n key: \"hasTypes\",\n value: function hasTypes() {\n // Versions 1.2.0 - 1.2.4: can be `[]`.\n\n /* istanbul ignore next */\n if (this.types() && this.types().length === 0) {\n return false;\n } // Versions <= 1.2.4: can be `undefined`.\n // Version >= 1.2.5: can be `0`.\n\n\n return !!this.types();\n }\n }, {\n key: \"type\",\n value: function type(_type2) {\n if (this.hasTypes() && getType(this.types(), _type2)) {\n return new Type(getType(this.types(), _type2), this);\n }\n }\n }, {\n key: \"ext\",\n value: function ext() {\n if (this.v1 || this.v2) return DEFAULT_EXT_PREFIX;\n return this.metadata[13] || DEFAULT_EXT_PREFIX;\n }\n }]);\n\n return NumberingPlan;\n}();\n\nvar Format = /*#__PURE__*/function () {\n function Format(format, metadata) {\n _classCallCheck(this, Format);\n\n this._format = format;\n this.metadata = metadata;\n }\n\n _createClass(Format, [{\n key: \"pattern\",\n value: function pattern() {\n return this._format[0];\n }\n }, {\n key: \"format\",\n value: function format() {\n return this._format[1];\n }\n }, {\n key: \"leadingDigitsPatterns\",\n value: function leadingDigitsPatterns() {\n return this._format[2] || [];\n }\n }, {\n key: \"nationalPrefixFormattingRule\",\n value: function nationalPrefixFormattingRule() {\n return this._format[3] || this.metadata.nationalPrefixFormattingRule();\n }\n }, {\n key: \"nationalPrefixIsOptionalWhenFormattingInNationalFormat\",\n value: function nationalPrefixIsOptionalWhenFormattingInNationalFormat() {\n return !!this._format[4] || this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat();\n }\n }, {\n key: \"nationalPrefixIsMandatoryWhenFormattingInNationalFormat\",\n value: function nationalPrefixIsMandatoryWhenFormattingInNationalFormat() {\n // National prefix is omitted if there's no national prefix formatting rule\n // set for this country, or when the national prefix formatting rule\n // contains no national prefix itself, or when this rule is set but\n // national prefix is optional for this phone number format\n // (and it is not enforced explicitly)\n return this.usesNationalPrefix() && !this.nationalPrefixIsOptionalWhenFormattingInNationalFormat();\n } // Checks whether national prefix formatting rule contains national prefix.\n\n }, {\n key: \"usesNationalPrefix\",\n value: function usesNationalPrefix() {\n return this.nationalPrefixFormattingRule() && // Check that national prefix formatting rule is not a \"dummy\" one.\n !FIRST_GROUP_ONLY_PREFIX_PATTERN.test(this.nationalPrefixFormattingRule()) // In compressed metadata, `this.nationalPrefixFormattingRule()` is `0`\n // when `national_prefix_formatting_rule` is not present.\n // So, `true` or `false` are returned explicitly here, so that\n // `0` number isn't returned.\n ? true : false;\n }\n }, {\n key: \"internationalFormat\",\n value: function internationalFormat() {\n return this._format[5] || this.format();\n }\n }]);\n\n return Format;\n}();\n/**\r\n * A pattern that is used to determine if the national prefix formatting rule\r\n * has the first group only, i.e., does not start with the national prefix.\r\n * Note that the pattern explicitly allows for unbalanced parentheses.\r\n */\n\n\nvar FIRST_GROUP_ONLY_PREFIX_PATTERN = /^\\(?\\$1\\)?$/;\n\nvar Type = /*#__PURE__*/function () {\n function Type(type, metadata) {\n _classCallCheck(this, Type);\n\n this.type = type;\n this.metadata = metadata;\n }\n\n _createClass(Type, [{\n key: \"pattern\",\n value: function pattern() {\n if (this.metadata.v1) return this.type;\n return this.type[0];\n }\n }, {\n key: \"possibleLengths\",\n value: function possibleLengths() {\n if (this.metadata.v1) return;\n return this.type[1] || this.metadata.possibleLengths();\n }\n }]);\n\n return Type;\n}();\n\nfunction getType(types, type) {\n switch (type) {\n case 'FIXED_LINE':\n return types[0];\n\n case 'MOBILE':\n return types[1];\n\n case 'TOLL_FREE':\n return types[2];\n\n case 'PREMIUM_RATE':\n return types[3];\n\n case 'PERSONAL_NUMBER':\n return types[4];\n\n case 'VOICEMAIL':\n return types[5];\n\n case 'UAN':\n return types[6];\n\n case 'PAGER':\n return types[7];\n\n case 'VOIP':\n return types[8];\n\n case 'SHARED_COST':\n return types[9];\n }\n}\n\nexport function validateMetadata(metadata) {\n if (!metadata) {\n throw new Error('[libphonenumber-js] `metadata` argument not passed. Check your arguments.');\n } // `country_phone_code_to_countries` was renamed to\n // `country_calling_codes` in `1.0.18`.\n\n\n if (!isObject(metadata) || !isObject(metadata.countries)) {\n throw new Error(\"[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got \".concat(isObject(metadata) ? 'an object of shape: { ' + Object.keys(metadata).join(', ') + ' }' : 'a ' + typeOf(metadata) + ': ' + metadata, \".\"));\n }\n} // Babel transforms `typeof` into some \"branches\"\n// so istanbul will show this as \"branch not covered\".\n\n/* istanbul ignore next */\n\nvar typeOf = function typeOf(_) {\n return _typeof(_);\n};\n/**\r\n * Returns extension prefix for a country.\r\n * @param {string} country\r\n * @param {object} metadata\r\n * @return {string?}\r\n * @example\r\n * // Returns \" ext. \"\r\n * getExtPrefix(\"US\")\r\n */\n\n\nexport function getExtPrefix(country, metadata) {\n metadata = new Metadata(metadata);\n\n if (metadata.hasCountry(country)) {\n return metadata.country(country).ext();\n }\n\n return DEFAULT_EXT_PREFIX;\n}\n/**\r\n * Returns \"country calling code\" for a country.\r\n * Throws an error if the country doesn't exist or isn't supported by this library.\r\n * @param {string} country\r\n * @param {object} metadata\r\n * @return {string}\r\n * @example\r\n * // Returns \"44\"\r\n * getCountryCallingCode(\"GB\")\r\n */\n\nexport function getCountryCallingCode(country, metadata) {\n metadata = new Metadata(metadata);\n\n if (metadata.hasCountry(country)) {\n return metadata.country(country).countryCallingCode();\n }\n\n throw new Error(\"Unknown country: \".concat(country));\n}\nexport function isSupportedCountry(country, metadata) {\n // metadata = new Metadata(metadata)\n // return metadata.hasCountry(country)\n return metadata.countries.hasOwnProperty(country);\n}\n\nfunction setVersion(metadata) {\n var version = metadata.version;\n\n if (typeof version === 'number') {\n this.v1 = version === 1;\n this.v2 = version === 2;\n this.v3 = version === 3;\n this.v4 = version === 4;\n } else {\n if (!version) {\n this.v1 = true;\n } else if (compare(version, V3) === -1) {\n this.v2 = true;\n } else if (compare(version, V4) === -1) {\n this.v3 = true;\n } else {\n this.v4 = true;\n }\n }\n} // const ISO_COUNTRY_CODE = /^[A-Z]{2}$/\n// function isCountryCode(countryCode) {\n// \treturn ISO_COUNTRY_CODE.test(countryCodeOrCountryCallingCode)\n// }\n","import { VALID_DIGITS } from '../../constants.js'; // The RFC 3966 format for extensions.\n\nvar RFC3966_EXTN_PREFIX = ';ext=';\n/**\r\n * Helper method for constructing regular expressions for parsing. Creates\r\n * an expression that captures up to max_length digits.\r\n * @return {string} RegEx pattern to capture extension digits.\r\n */\n\nvar getExtensionDigitsPattern = function getExtensionDigitsPattern(maxLength) {\n return \"([\".concat(VALID_DIGITS, \"]{1,\").concat(maxLength, \"})\");\n};\n/**\r\n * Helper initialiser method to create the regular-expression pattern to match\r\n * extensions.\r\n * Copy-pasted from Google's `libphonenumber`:\r\n * https://github.com/google/libphonenumber/blob/55b2646ec9393f4d3d6661b9c82ef9e258e8b829/javascript/i18n/phonenumbers/phonenumberutil.js#L759-L766\r\n * @return {string} RegEx pattern to capture extensions.\r\n */\n\n\nexport default function createExtensionPattern(purpose) {\n // We cap the maximum length of an extension based on the ambiguity of the way\n // the extension is prefixed. As per ITU, the officially allowed length for\n // extensions is actually 40, but we don't support this since we haven't seen real\n // examples and this introduces many false interpretations as the extension labels\n // are not standardized.\n\n /** @type {string} */\n var extLimitAfterExplicitLabel = '20';\n /** @type {string} */\n\n var extLimitAfterLikelyLabel = '15';\n /** @type {string} */\n\n var extLimitAfterAmbiguousChar = '9';\n /** @type {string} */\n\n var extLimitWhenNotSure = '6';\n /** @type {string} */\n\n var possibleSeparatorsBetweenNumberAndExtLabel = \"[ \\xA0\\\\t,]*\"; // Optional full stop (.) or colon, followed by zero or more spaces/tabs/commas.\n\n /** @type {string} */\n\n var possibleCharsAfterExtLabel = \"[:\\\\.\\uFF0E]?[ \\xA0\\\\t,-]*\";\n /** @type {string} */\n\n var optionalExtnSuffix = \"#?\"; // Here the extension is called out in more explicit way, i.e mentioning it obvious\n // patterns like \"ext.\".\n\n /** @type {string} */\n\n var explicitExtLabels = \"(?:e?xt(?:ensi(?:o\\u0301?|\\xF3))?n?|\\uFF45?\\uFF58\\uFF54\\uFF4E?|\\u0434\\u043E\\u0431|anexo)\"; // One-character symbols that can be used to indicate an extension, and less\n // commonly used or more ambiguous extension labels.\n\n /** @type {string} */\n\n var ambiguousExtLabels = \"(?:[x\\uFF58#\\uFF03~\\uFF5E]|int|\\uFF49\\uFF4E\\uFF54)\"; // When extension is not separated clearly.\n\n /** @type {string} */\n\n var ambiguousSeparator = \"[- ]+\"; // This is the same as possibleSeparatorsBetweenNumberAndExtLabel, but not matching\n // comma as extension label may have it.\n\n /** @type {string} */\n\n var possibleSeparatorsNumberExtLabelNoComma = \"[ \\xA0\\\\t]*\"; // \",,\" is commonly used for auto dialling the extension when connected. First\n // comma is matched through possibleSeparatorsBetweenNumberAndExtLabel, so we do\n // not repeat it here. Semi-colon works in Iphone and Android also to pop up a\n // button with the extension number following.\n\n /** @type {string} */\n\n var autoDiallingAndExtLabelsFound = \"(?:,{2}|;)\";\n /** @type {string} */\n\n var rfcExtn = RFC3966_EXTN_PREFIX + getExtensionDigitsPattern(extLimitAfterExplicitLabel);\n /** @type {string} */\n\n var explicitExtn = possibleSeparatorsBetweenNumberAndExtLabel + explicitExtLabels + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterExplicitLabel) + optionalExtnSuffix;\n /** @type {string} */\n\n var ambiguousExtn = possibleSeparatorsBetweenNumberAndExtLabel + ambiguousExtLabels + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterAmbiguousChar) + optionalExtnSuffix;\n /** @type {string} */\n\n var americanStyleExtnWithSuffix = ambiguousSeparator + getExtensionDigitsPattern(extLimitWhenNotSure) + \"#\";\n /** @type {string} */\n\n var autoDiallingExtn = possibleSeparatorsNumberExtLabelNoComma + autoDiallingAndExtLabelsFound + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterLikelyLabel) + optionalExtnSuffix;\n /** @type {string} */\n\n var onlyCommasExtn = possibleSeparatorsNumberExtLabelNoComma + \"(?:,)+\" + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterAmbiguousChar) + optionalExtnSuffix; // The first regular expression covers RFC 3966 format, where the extension is added\n // using \";ext=\". The second more generic where extension is mentioned with explicit\n // labels like \"ext:\". In both the above cases we allow more numbers in extension than\n // any other extension labels. The third one captures when single character extension\n // labels or less commonly used labels are used. In such cases we capture fewer\n // extension digits in order to reduce the chance of falsely interpreting two\n // numbers beside each other as a number + extension. The fourth one covers the\n // special case of American numbers where the extension is written with a hash\n // at the end, such as \"- 503#\". The fifth one is exclusively for extension\n // autodialling formats which are used when dialling and in this case we accept longer\n // extensions. The last one is more liberal on the number of commas that acts as\n // extension labels, so we have a strict cap on the number of digits in such extensions.\n\n return rfcExtn + \"|\" + explicitExtn + \"|\" + ambiguousExtn + \"|\" + americanStyleExtnWithSuffix + \"|\" + autoDiallingExtn + \"|\" + onlyCommasExtn;\n}\n","import { MIN_LENGTH_FOR_NSN, VALID_DIGITS, VALID_PUNCTUATION, PLUS_CHARS } from '../constants.js';\nimport createExtensionPattern from './extension/createExtensionPattern.js'; // Regular expression of viable phone numbers. This is location independent.\n// Checks we have at least three leading digits, and only valid punctuation,\n// alpha characters and digits in the phone number. Does not include extension\n// data. The symbol 'x' is allowed here as valid punctuation since it is often\n// used as a placeholder for carrier codes, for example in Brazilian phone\n// numbers. We also allow multiple '+' characters at the start.\n//\n// Corresponds to the following:\n// [digits]{minLengthNsn}|\n// plus_sign*\n// (([punctuation]|[star])*[digits]){3,}([punctuation]|[star]|[digits]|[alpha])*\n//\n// The first reg-ex is to allow short numbers (two digits long) to be parsed if\n// they are entered as \"15\" etc, but only if there is no punctuation in them.\n// The second expression restricts the number of digits to three or more, but\n// then allows them to be in international form, and to have alpha-characters\n// and punctuation. We split up the two reg-exes here and combine them when\n// creating the reg-ex VALID_PHONE_NUMBER_PATTERN itself so we can prefix it\n// with ^ and append $ to each branch.\n//\n// \"Note VALID_PUNCTUATION starts with a -,\n// so must be the first in the range\" (c) Google devs.\n// (wtf did they mean by saying that; probably nothing)\n//\n\nvar MIN_LENGTH_PHONE_NUMBER_PATTERN = '[' + VALID_DIGITS + ']{' + MIN_LENGTH_FOR_NSN + '}'; //\n// And this is the second reg-exp:\n// (see MIN_LENGTH_PHONE_NUMBER_PATTERN for a full description of this reg-exp)\n//\n\nexport var VALID_PHONE_NUMBER = '[' + PLUS_CHARS + ']{0,1}' + '(?:' + '[' + VALID_PUNCTUATION + ']*' + '[' + VALID_DIGITS + ']' + '){3,}' + '[' + VALID_PUNCTUATION + VALID_DIGITS + ']*'; // This regular expression isn't present in Google's `libphonenumber`\n// and is only used to determine whether the phone number being input\n// is too short for it to even consider it a \"valid\" number.\n// This is just a way to differentiate between a really invalid phone\n// number like \"abcde\" and a valid phone number that a user has just\n// started inputting, like \"+1\" or \"1\": both these cases would be\n// considered `NOT_A_NUMBER` by Google's `libphonenumber`, but this\n// library can provide a more detailed error message — whether it's\n// really \"not a number\", or is it just a start of a valid phone number.\n\nvar VALID_PHONE_NUMBER_START_REG_EXP = new RegExp('^' + '[' + PLUS_CHARS + ']{0,1}' + '(?:' + '[' + VALID_PUNCTUATION + ']*' + '[' + VALID_DIGITS + ']' + '){1,2}' + '$', 'i');\nexport var VALID_PHONE_NUMBER_WITH_EXTENSION = VALID_PHONE_NUMBER + // Phone number extensions\n'(?:' + createExtensionPattern() + ')?'; // The combined regular expression for valid phone numbers:\n//\n\nvar VALID_PHONE_NUMBER_PATTERN = new RegExp( // Either a short two-digit-only phone number\n'^' + MIN_LENGTH_PHONE_NUMBER_PATTERN + '$' + '|' + // Or a longer fully parsed phone number (min 3 characters)\n'^' + VALID_PHONE_NUMBER_WITH_EXTENSION + '$', 'i'); // Checks to see if the string of characters could possibly be a phone number at\n// all. At the moment, checks to see that the string begins with at least 2\n// digits, ignoring any punctuation commonly found in phone numbers. This method\n// does not require the number to be normalized in advance - but does assume\n// that leading non-number symbols have been removed, such as by the method\n// `extract_possible_number`.\n//\n\nexport default function isViablePhoneNumber(number) {\n return number.length >= MIN_LENGTH_FOR_NSN && VALID_PHONE_NUMBER_PATTERN.test(number);\n} // This is just a way to differentiate between a really invalid phone\n// number like \"abcde\" and a valid phone number that a user has just\n// started inputting, like \"+1\" or \"1\": both these cases would be\n// considered `NOT_A_NUMBER` by Google's `libphonenumber`, but this\n// library can provide a more detailed error message — whether it's\n// really \"not a number\", or is it just a start of a valid phone number.\n\nexport function isViablePhoneNumberStart(number) {\n return VALID_PHONE_NUMBER_START_REG_EXP.test(number);\n}\n","import createExtensionPattern from './createExtensionPattern.js'; // Regexp of all known extension prefixes used by different regions followed by\n// 1 or more valid digits, for use when parsing.\n\nvar EXTN_PATTERN = new RegExp('(?:' + createExtensionPattern() + ')$', 'i'); // Strips any extension (as in, the part of the number dialled after the call is\n// connected, usually indicated with extn, ext, x or similar) from the end of\n// the number, and returns it.\n\nexport default function extractExtension(number) {\n var start = number.search(EXTN_PATTERN);\n\n if (start < 0) {\n return {};\n } // If we find a potential extension, and the number preceding this is a viable\n // number, we assume it is an extension.\n\n\n var numberWithoutExtension = number.slice(0, start);\n var matches = number.match(EXTN_PATTERN);\n var i = 1;\n\n while (i < matches.length) {\n if (matches[i]) {\n return {\n number: numberWithoutExtension,\n ext: matches[i]\n };\n }\n\n i++;\n }\n}\n","function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport { parseDigit } from './helpers/parseDigits.js';\n/**\r\n * Parses phone number characters from a string.\r\n * Drops all punctuation leaving only digits and the leading `+` sign (if any).\r\n * Also converts wide-ascii and arabic-indic numerals to conventional numerals.\r\n * E.g. in Iraq they don't write `+442323234` but rather `+٤٤٢٣٢٣٢٣٤`.\r\n * @param {string} string\r\n * @return {string}\r\n * @example\r\n * ```js\r\n * // Outputs '8800555'.\r\n * parseIncompletePhoneNumber('8 (800) 555')\r\n * // Outputs '+7800555'.\r\n * parseIncompletePhoneNumber('+7 800 555')\r\n * ```\r\n */\n\nexport default function parseIncompletePhoneNumber(string) {\n var result = ''; // Using `.split('')` here instead of normal `for ... of`\n // because the importing application doesn't neccessarily include an ES6 polyfill.\n // The `.split('')` approach discards \"exotic\" UTF-8 characters\n // (the ones consisting of four bytes) but digits\n // (including non-European ones) don't fall into that range\n // so such \"exotic\" characters would be discarded anyway.\n\n for (var _iterator = _createForOfIteratorHelperLoose(string.split('')), _step; !(_step = _iterator()).done;) {\n var character = _step.value;\n result += parsePhoneNumberCharacter(character, result) || '';\n }\n\n return result;\n}\n/**\r\n * Parses next character while parsing phone number digits (including a `+`)\r\n * from text: discards everything except `+` and digits, and `+` is only allowed\r\n * at the start of a phone number.\r\n * For example, is used in `react-phone-number-input` where it uses\r\n * [`input-format`](https://gitlab.com/catamphetamine/input-format).\r\n * @param {string} character - Yet another character from raw input string.\r\n * @param {string?} prevParsedCharacters - Previous parsed characters.\r\n * @param {function?} emitEvent - An optional \"emit event\" function.\r\n * @return {string?} The parsed character.\r\n */\n\nexport function parsePhoneNumberCharacter(character, prevParsedCharacters, emitEvent) {\n // Only allow a leading `+`.\n if (character === '+') {\n // If this `+` is not the first parsed character\n // then discard it.\n if (prevParsedCharacters) {\n // `emitEvent` argument was added to this `export`ed function on Dec 26th, 2023.\n // Any 3rd-party code that used to `import` and call this function before that\n // won't be passing any `emitEvent` argument.\n //\n // The addition of the `emitEvent` argument was to fix the slightly-weird behavior\n // of parsing an input string when the user inputs something like `\"2+7\"\n // https://github.com/catamphetamine/react-phone-number-input/issues/437\n //\n // If the parser encounters an unexpected `+` in a string being parsed\n // then it simply discards that out-of-place `+` and any following characters.\n //\n if (typeof emitEvent === 'function') {\n emitEvent('end');\n }\n\n return;\n }\n\n return '+';\n } // Allow digits.\n\n\n return parseDigit(character);\n}\n","function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n/**\r\n * Merges two arrays.\r\n * @param {*} a\r\n * @param {*} b\r\n * @return {*}\r\n */\nexport default function mergeArrays(a, b) {\n var merged = a.slice();\n\n for (var _iterator = _createForOfIteratorHelperLoose(b), _step; !(_step = _iterator()).done;) {\n var element = _step.value;\n\n if (a.indexOf(element) < 0) {\n merged.push(element);\n }\n }\n\n return merged.sort(function (a, b) {\n return a - b;\n }); // ES6 version, requires Set polyfill.\n // let merged = new Set(a)\n // for (const element of b) {\n // \tmerged.add(i)\n // }\n // return Array.from(merged).sort((a, b) => a - b)\n}\n","import mergeArrays from './mergeArrays.js';\nexport default function checkNumberLength(nationalNumber, metadata) {\n return checkNumberLengthForType(nationalNumber, undefined, metadata);\n} // Checks whether a number is possible for the country based on its length.\n// Should only be called for the \"new\" metadata which has \"possible lengths\".\n\nexport function checkNumberLengthForType(nationalNumber, type, metadata) {\n var type_info = metadata.type(type); // There should always be \"<possiblePengths/>\" set for every type element.\n // This is declared in the XML schema.\n // For size efficiency, where a sub-description (e.g. fixed-line)\n // has the same \"<possiblePengths/>\" as the \"general description\", this is missing,\n // so we fall back to the \"general description\". Where no numbers of the type\n // exist at all, there is one possible length (-1) which is guaranteed\n // not to match the length of any real phone number.\n\n var possible_lengths = type_info && type_info.possibleLengths() || metadata.possibleLengths(); // let local_lengths = type_info && type.possibleLengthsLocal() || metadata.possibleLengthsLocal()\n // Metadata before version `1.0.18` didn't contain `possible_lengths`.\n\n if (!possible_lengths) {\n return 'IS_POSSIBLE';\n }\n\n if (type === 'FIXED_LINE_OR_MOBILE') {\n // No such country in metadata.\n\n /* istanbul ignore next */\n if (!metadata.type('FIXED_LINE')) {\n // The rare case has been encountered where no fixedLine data is available\n // (true for some non-geographic entities), so we just check mobile.\n return checkNumberLengthForType(nationalNumber, 'MOBILE', metadata);\n }\n\n var mobile_type = metadata.type('MOBILE');\n\n if (mobile_type) {\n // Merge the mobile data in if there was any. \"Concat\" creates a new\n // array, it doesn't edit possible_lengths in place, so we don't need a copy.\n // Note that when adding the possible lengths from mobile, we have\n // to again check they aren't empty since if they are this indicates\n // they are the same as the general desc and should be obtained from there.\n possible_lengths = mergeArrays(possible_lengths, mobile_type.possibleLengths()); // The current list is sorted; we need to merge in the new list and\n // re-sort (duplicates are okay). Sorting isn't so expensive because\n // the lists are very small.\n // if (local_lengths) {\n // \tlocal_lengths = mergeArrays(local_lengths, mobile_type.possibleLengthsLocal())\n // } else {\n // \tlocal_lengths = mobile_type.possibleLengthsLocal()\n // }\n }\n } // If the type doesn't exist then return 'INVALID_LENGTH'.\n else if (type && !type_info) {\n return 'INVALID_LENGTH';\n }\n\n var actual_length = nationalNumber.length; // In `libphonenumber-js` all \"local-only\" formats are dropped for simplicity.\n // // This is safe because there is never an overlap beween the possible lengths\n // // and the local-only lengths; this is checked at build time.\n // if (local_lengths && local_lengths.indexOf(nationalNumber.length) >= 0)\n // {\n // \treturn 'IS_POSSIBLE_LOCAL_ONLY'\n // }\n\n var minimum_length = possible_lengths[0];\n\n if (minimum_length === actual_length) {\n return 'IS_POSSIBLE';\n }\n\n if (minimum_length > actual_length) {\n return 'TOO_SHORT';\n }\n\n if (possible_lengths[possible_lengths.length - 1] < actual_length) {\n return 'TOO_LONG';\n } // We skip the first element since we've already checked it.\n\n\n return possible_lengths.indexOf(actual_length, 1) >= 0 ? 'IS_POSSIBLE' : 'INVALID_LENGTH';\n}\n","import Metadata from './metadata.js';\nimport checkNumberLength from './helpers/checkNumberLength.js';\n/**\r\n * Checks if a phone number is \"possible\" (basically just checks its length).\r\n *\r\n * isPossible(phoneNumberInstance, { ..., v2: true }, metadata)\r\n *\r\n * isPossible({ phone: '8005553535', country: 'RU' }, { ... }, metadata)\r\n * isPossible({ phone: '8005553535', country: 'RU' }, undefined, metadata)\r\n *\r\n * @param {object|PhoneNumber} input — If `options.v2: true` flag is passed, the `input` should be a `PhoneNumber` instance. Otherwise, it should be an object of shape `{ phone: '...', country: '...' }`.\r\n * @param {object} [options]\r\n * @param {object} metadata\r\n * @return {string}\r\n */\n\nexport default function isPossiblePhoneNumber(input, options, metadata) {\n /* istanbul ignore if */\n if (options === undefined) {\n options = {};\n }\n\n metadata = new Metadata(metadata);\n\n if (options.v2) {\n if (!input.countryCallingCode) {\n throw new Error('Invalid phone number object passed');\n }\n\n metadata.selectNumberingPlan(input.countryCallingCode);\n } else {\n if (!input.phone) {\n return false;\n }\n\n if (input.country) {\n if (!metadata.hasCountry(input.country)) {\n throw new Error(\"Unknown country: \".concat(input.country));\n }\n\n metadata.country(input.country);\n } else {\n if (!input.countryCallingCode) {\n throw new Error('Invalid phone number object passed');\n }\n\n metadata.selectNumberingPlan(input.countryCallingCode);\n }\n } // Old metadata (< 1.0.18) had no \"possible length\" data.\n\n\n if (metadata.possibleLengths()) {\n return isPossibleNumber(input.phone || input.nationalNumber, metadata);\n } else {\n // There was a bug between `1.7.35` and `1.7.37` where \"possible_lengths\"\n // were missing for \"non-geographical\" numbering plans.\n // Just assume the number is possible in such cases:\n // it's unlikely that anyone generated their custom metadata\n // in that short period of time (one day).\n // This code can be removed in some future major version update.\n if (input.countryCallingCode && metadata.isNonGeographicCallingCode(input.countryCallingCode)) {\n // \"Non-geographic entities\" did't have `possibleLengths`\n // due to a bug in metadata generation process.\n return true;\n } else {\n throw new Error('Missing \"possibleLengths\" in metadata. Perhaps the metadata has been generated before v1.0.18.');\n }\n }\n}\nexport function isPossibleNumber(nationalNumber, metadata) {\n //, isInternational) {\n switch (checkNumberLength(nationalNumber, metadata)) {\n case 'IS_POSSIBLE':\n return true;\n // This library ignores \"local-only\" phone numbers (for simplicity).\n // See the readme for more info on what are \"local-only\" phone numbers.\n // case 'IS_POSSIBLE_LOCAL_ONLY':\n // \treturn !isInternational\n\n default:\n return false;\n }\n}\n","/**\r\n * Checks whether the entire input sequence can be matched\r\n * against the regular expression.\r\n * @return {boolean}\r\n */\nexport default function matchesEntirely(text, regular_expression) {\n // If assigning the `''` default value is moved to the arguments above,\n // code coverage would decrease for some weird reason.\n text = text || '';\n return new RegExp('^(?:' + regular_expression + ')$').test(text);\n}\n","function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport Metadata from '../metadata.js';\nimport matchesEntirely from './matchesEntirely.js';\nvar NON_FIXED_LINE_PHONE_TYPES = ['MOBILE', 'PREMIUM_RATE', 'TOLL_FREE', 'SHARED_COST', 'VOIP', 'PERSONAL_NUMBER', 'PAGER', 'UAN', 'VOICEMAIL']; // Finds out national phone number type (fixed line, mobile, etc)\n\nexport default function getNumberType(input, options, metadata) {\n // If assigning the `{}` default value is moved to the arguments above,\n // code coverage would decrease for some weird reason.\n options = options || {}; // When `parse()` returns an empty object — `{}` —\n // that means that the phone number is malformed,\n // so it can't possibly be valid.\n\n if (!input.country && !input.countryCallingCode) {\n return;\n }\n\n metadata = new Metadata(metadata);\n metadata.selectNumberingPlan(input.country, input.countryCallingCode);\n var nationalNumber = options.v2 ? input.nationalNumber : input.phone; // The following is copy-pasted from the original function:\n // https://github.com/googlei18n/libphonenumber/blob/3ea547d4fbaa2d0b67588904dfa5d3f2557c27ff/javascript/i18n/phonenumbers/phonenumberutil.js#L2835\n // Is this national number even valid for this country\n\n if (!matchesEntirely(nationalNumber, metadata.nationalNumberPattern())) {\n return;\n } // Is it fixed line number\n\n\n if (isNumberTypeEqualTo(nationalNumber, 'FIXED_LINE', metadata)) {\n // Because duplicate regular expressions are removed\n // to reduce metadata size, if \"mobile\" pattern is \"\"\n // then it means it was removed due to being a duplicate of the fixed-line pattern.\n //\n if (metadata.type('MOBILE') && metadata.type('MOBILE').pattern() === '') {\n return 'FIXED_LINE_OR_MOBILE';\n } // `MOBILE` type pattern isn't included if it matched `FIXED_LINE` one.\n // For example, for \"US\" country.\n // Old metadata (< `1.0.18`) had a specific \"types\" data structure\n // that happened to be `undefined` for `MOBILE` in that case.\n // Newer metadata (>= `1.0.18`) has another data structure that is\n // not `undefined` for `MOBILE` in that case (it's just an empty array).\n // So this `if` is just for backwards compatibility with old metadata.\n\n\n if (!metadata.type('MOBILE')) {\n return 'FIXED_LINE_OR_MOBILE';\n } // Check if the number happens to qualify as both fixed line and mobile.\n // (no such country in the minimal metadata set)\n\n /* istanbul ignore if */\n\n\n if (isNumberTypeEqualTo(nationalNumber, 'MOBILE', metadata)) {\n return 'FIXED_LINE_OR_MOBILE';\n }\n\n return 'FIXED_LINE';\n }\n\n for (var _iterator = _createForOfIteratorHelperLoose(NON_FIXED_LINE_PHONE_TYPES), _step; !(_step = _iterator()).done;) {\n var type = _step.value;\n\n if (isNumberTypeEqualTo(nationalNumber, type, metadata)) {\n return type;\n }\n }\n}\nexport function isNumberTypeEqualTo(nationalNumber, type, metadata) {\n type = metadata.type(type);\n\n if (!type || !type.pattern()) {\n return false;\n } // Check if any possible number lengths are present;\n // if so, we use them to avoid checking\n // the validation pattern if they don't match.\n // If they are absent, this means they match\n // the general description, which we have\n // already checked before a specific number type.\n\n\n if (type.possibleLengths() && type.possibleLengths().indexOf(nationalNumber.length) < 0) {\n return false;\n }\n\n return matchesEntirely(nationalNumber, type.pattern());\n}\n","import applyInternationalSeparatorStyle from './applyInternationalSeparatorStyle.js'; // This was originally set to $1 but there are some countries for which the\n// first group is not used in the national pattern (e.g. Argentina) so the $1\n// group does not match correctly. Therefore, we use `\\d`, so that the first\n// group actually used in the pattern will be matched.\n\nexport var FIRST_GROUP_PATTERN = /(\\$\\d)/;\nexport default function formatNationalNumberUsingFormat(number, format, _ref) {\n var useInternationalFormat = _ref.useInternationalFormat,\n withNationalPrefix = _ref.withNationalPrefix,\n carrierCode = _ref.carrierCode,\n metadata = _ref.metadata;\n var formattedNumber = number.replace(new RegExp(format.pattern()), useInternationalFormat ? format.internationalFormat() : // This library doesn't use `domestic_carrier_code_formatting_rule`,\n // because that one is only used when formatting phone numbers\n // for dialing from a mobile phone, and this is not a dialing library.\n // carrierCode && format.domesticCarrierCodeFormattingRule()\n // \t// First, replace the $CC in the formatting rule with the desired carrier code.\n // \t// Then, replace the $FG in the formatting rule with the first group\n // \t// and the carrier code combined in the appropriate way.\n // \t? format.format().replace(FIRST_GROUP_PATTERN, format.domesticCarrierCodeFormattingRule().replace('$CC', carrierCode))\n // \t: (\n // \t\twithNationalPrefix && format.nationalPrefixFormattingRule()\n // \t\t\t? format.format().replace(FIRST_GROUP_PATTERN, format.nationalPrefixFormattingRule())\n // \t\t\t: format.format()\n // \t)\n withNationalPrefix && format.nationalPrefixFormattingRule() ? format.format().replace(FIRST_GROUP_PATTERN, format.nationalPrefixFormattingRule()) : format.format());\n\n if (useInternationalFormat) {\n return applyInternationalSeparatorStyle(formattedNumber);\n }\n\n return formattedNumber;\n}\n","import Metadata from '../metadata.js';\n/**\r\n * Pattern that makes it easy to distinguish whether a region has a single\r\n * international dialing prefix or not. If a region has a single international\r\n * prefix (e.g. 011 in USA), it will be represented as a string that contains\r\n * a sequence of ASCII digits, and possibly a tilde, which signals waiting for\r\n * the tone. If there are multiple available international prefixes in a\r\n * region, they will be represented as a regex string that always contains one\r\n * or more characters that are not ASCII digits or a tilde.\r\n */\n\nvar SINGLE_IDD_PREFIX_REG_EXP = /^[\\d]+(?:[~\\u2053\\u223C\\uFF5E][\\d]+)?$/; // For regions that have multiple IDD prefixes\n// a preferred IDD prefix is returned.\n\nexport default function getIddPrefix(country, callingCode, metadata) {\n var countryMetadata = new Metadata(metadata);\n countryMetadata.selectNumberingPlan(country, callingCode);\n\n if (countryMetadata.defaultIDDPrefix()) {\n return countryMetadata.defaultIDDPrefix();\n }\n\n if (SINGLE_IDD_PREFIX_REG_EXP.test(countryMetadata.IDDPrefix())) {\n return countryMetadata.IDDPrefix();\n }\n}\n","function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n// This is a port of Google Android `libphonenumber`'s\n// `phonenumberutil.js` of December 31th, 2018.\n//\n// https://github.com/googlei18n/libphonenumber/commits/master/javascript/i18n/phonenumbers/phonenumberutil.js\nimport matchesEntirely from './helpers/matchesEntirely.js';\nimport formatNationalNumberUsingFormat from './helpers/formatNationalNumberUsingFormat.js';\nimport Metadata, { getCountryCallingCode } from './metadata.js';\nimport getIddPrefix from './helpers/getIddPrefix.js';\nimport { formatRFC3966 } from './helpers/RFC3966.js';\nvar DEFAULT_OPTIONS = {\n formatExtension: function formatExtension(formattedNumber, extension, metadata) {\n return \"\".concat(formattedNumber).concat(metadata.ext()).concat(extension);\n }\n};\n/**\r\n * Formats a phone number.\r\n *\r\n * format(phoneNumberInstance, 'INTERNATIONAL', { ..., v2: true }, metadata)\r\n * format(phoneNumberInstance, 'NATIONAL', { ..., v2: true }, metadata)\r\n *\r\n * format({ phone: '8005553535', country: 'RU' }, 'INTERNATIONAL', { ... }, metadata)\r\n * format({ phone: '8005553535', country: 'RU' }, 'NATIONAL', undefined, metadata)\r\n *\r\n * @param {object|PhoneNumber} input — If `options.v2: true` flag is passed, the `input` should be a `PhoneNumber` instance. Otherwise, it should be an object of shape `{ phone: '...', country: '...' }`.\r\n * @param {string} format\r\n * @param {object} [options]\r\n * @param {object} metadata\r\n * @return {string}\r\n */\n\nexport default function formatNumber(input, format, options, metadata) {\n // Apply default options.\n if (options) {\n options = _objectSpread(_objectSpread({}, DEFAULT_OPTIONS), options);\n } else {\n options = DEFAULT_OPTIONS;\n }\n\n metadata = new Metadata(metadata);\n\n if (input.country && input.country !== '001') {\n // Validate `input.country`.\n if (!metadata.hasCountry(input.country)) {\n throw new Error(\"Unknown country: \".concat(input.country));\n }\n\n metadata.country(input.country);\n } else if (input.countryCallingCode) {\n metadata.selectNumberingPlan(input.countryCallingCode);\n } else return input.phone || '';\n\n var countryCallingCode = metadata.countryCallingCode();\n var nationalNumber = options.v2 ? input.nationalNumber : input.phone; // This variable should have been declared inside `case`s\n // but Babel has a bug and it says \"duplicate variable declaration\".\n\n var number;\n\n switch (format) {\n case 'NATIONAL':\n // Legacy argument support.\n // (`{ country: ..., phone: '' }`)\n if (!nationalNumber) {\n return '';\n }\n\n number = formatNationalNumber(nationalNumber, input.carrierCode, 'NATIONAL', metadata, options);\n return addExtension(number, input.ext, metadata, options.formatExtension);\n\n case 'INTERNATIONAL':\n // Legacy argument support.\n // (`{ country: ..., phone: '' }`)\n if (!nationalNumber) {\n return \"+\".concat(countryCallingCode);\n }\n\n number = formatNationalNumber(nationalNumber, null, 'INTERNATIONAL', metadata, options);\n number = \"+\".concat(countryCallingCode, \" \").concat(number);\n return addExtension(number, input.ext, metadata, options.formatExtension);\n\n case 'E.164':\n // `E.164` doesn't define \"phone number extensions\".\n return \"+\".concat(countryCallingCode).concat(nationalNumber);\n\n case 'RFC3966':\n return formatRFC3966({\n number: \"+\".concat(countryCallingCode).concat(nationalNumber),\n ext: input.ext\n });\n // For reference, here's Google's IDD formatter:\n // https://github.com/google/libphonenumber/blob/32719cf74e68796788d1ca45abc85dcdc63ba5b9/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java#L1546\n // Not saying that this IDD formatter replicates it 1:1, but it seems to work.\n // Who would even need to format phone numbers in IDD format anyway?\n\n case 'IDD':\n if (!options.fromCountry) {\n return; // throw new Error('`fromCountry` option not passed for IDD-prefixed formatting.')\n }\n\n var formattedNumber = formatIDD(nationalNumber, input.carrierCode, countryCallingCode, options.fromCountry, metadata);\n return addExtension(formattedNumber, input.ext, metadata, options.formatExtension);\n\n default:\n throw new Error(\"Unknown \\\"format\\\" argument passed to \\\"formatNumber()\\\": \\\"\".concat(format, \"\\\"\"));\n }\n}\n\nfunction formatNationalNumber(number, carrierCode, formatAs, metadata, options) {\n var format = chooseFormatForNumber(metadata.formats(), number);\n\n if (!format) {\n return number;\n }\n\n return formatNationalNumberUsingFormat(number, format, {\n useInternationalFormat: formatAs === 'INTERNATIONAL',\n withNationalPrefix: format.nationalPrefixIsOptionalWhenFormattingInNationalFormat() && options && options.nationalPrefix === false ? false : true,\n carrierCode: carrierCode,\n metadata: metadata\n });\n}\n\nexport function chooseFormatForNumber(availableFormats, nationalNnumber) {\n for (var _iterator = _createForOfIteratorHelperLoose(availableFormats), _step; !(_step = _iterator()).done;) {\n var format = _step.value;\n\n // Validate leading digits.\n // The test case for \"else path\" could be found by searching for\n // \"format.leadingDigitsPatterns().length === 0\".\n if (format.leadingDigitsPatterns().length > 0) {\n // The last leading_digits_pattern is used here, as it is the most detailed\n var lastLeadingDigitsPattern = format.leadingDigitsPatterns()[format.leadingDigitsPatterns().length - 1]; // If leading digits don't match then move on to the next phone number format\n\n if (nationalNnumber.search(lastLeadingDigitsPattern) !== 0) {\n continue;\n }\n } // Check that the national number matches the phone number format regular expression\n\n\n if (matchesEntirely(nationalNnumber, format.pattern())) {\n return format;\n }\n }\n}\n\nfunction addExtension(formattedNumber, ext, metadata, formatExtension) {\n return ext ? formatExtension(formattedNumber, ext, metadata) : formattedNumber;\n}\n\nfunction formatIDD(nationalNumber, carrierCode, countryCallingCode, fromCountry, metadata) {\n var fromCountryCallingCode = getCountryCallingCode(fromCountry, metadata.metadata); // When calling within the same country calling code.\n\n if (fromCountryCallingCode === countryCallingCode) {\n var formattedNumber = formatNationalNumber(nationalNumber, carrierCode, 'NATIONAL', metadata); // For NANPA regions, return the national format for these regions\n // but prefix it with the country calling code.\n\n if (countryCallingCode === '1') {\n return countryCallingCode + ' ' + formattedNumber;\n } // If regions share a country calling code, the country calling code need\n // not be dialled. This also applies when dialling within a region, so this\n // if clause covers both these cases. Technically this is the case for\n // dialling from La Reunion to other overseas departments of France (French\n // Guiana, Martinique, Guadeloupe), but not vice versa - so we don't cover\n // this edge case for now and for those cases return the version including\n // country calling code. Details here:\n // http://www.petitfute.com/voyage/225-info-pratiques-reunion\n //\n\n\n return formattedNumber;\n }\n\n var iddPrefix = getIddPrefix(fromCountry, undefined, metadata.metadata);\n\n if (iddPrefix) {\n return \"\".concat(iddPrefix, \" \").concat(countryCallingCode, \" \").concat(formatNationalNumber(nationalNumber, null, 'INTERNATIONAL', metadata));\n }\n}\n","import { VALID_PUNCTUATION } from '../constants.js'; // Removes brackets and replaces dashes with spaces.\n//\n// E.g. \"(999) 111-22-33\" -> \"999 111 22 33\"\n//\n// For some reason Google's metadata contains `<intlFormat/>`s with brackets and dashes.\n// Meanwhile, there's no single opinion about using punctuation in international phone numbers.\n//\n// For example, Google's `<intlFormat/>` for USA is `+1 213-373-4253`.\n// And here's a quote from WikiPedia's \"North American Numbering Plan\" page:\n// https://en.wikipedia.org/wiki/North_American_Numbering_Plan\n//\n// \"The country calling code for all countries participating in the NANP is 1.\n// In international format, an NANP number should be listed as +1 301 555 01 00,\n// where 301 is an area code (Maryland).\"\n//\n// I personally prefer the international format without any punctuation.\n// For example, brackets are remnants of the old age, meaning that the\n// phone number part in brackets (so called \"area code\") can be omitted\n// if dialing within the same \"area\".\n// And hyphens were clearly introduced for splitting local numbers into memorizable groups.\n// For example, remembering \"5553535\" is difficult but \"555-35-35\" is much simpler.\n// Imagine a man taking a bus from home to work and seeing an ad with a phone number.\n// He has a couple of seconds to memorize that number until it passes by.\n// If it were spaces instead of hyphens the man wouldn't necessarily get it,\n// but with hyphens instead of spaces the grouping is more explicit.\n// I personally think that hyphens introduce visual clutter,\n// so I prefer replacing them with spaces in international numbers.\n// In the modern age all output is done on displays where spaces are clearly distinguishable\n// so hyphens can be safely replaced with spaces without losing any legibility.\n//\n\nexport default function applyInternationalSeparatorStyle(formattedNumber) {\n return formattedNumber.replace(new RegExp(\"[\".concat(VALID_PUNCTUATION, \"]+\"), 'g'), ' ').trim();\n}\n","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport Metadata from './metadata.js';\nimport isPossibleNumber from './isPossible.js';\nimport isValidNumber from './isValid.js'; // import checkNumberLength from './helpers/checkNumberLength.js'\n\nimport getNumberType from './helpers/getNumberType.js';\nimport getPossibleCountriesForNumber from './helpers/getPossibleCountriesForNumber.js';\nimport formatNumber from './format.js';\nvar USE_NON_GEOGRAPHIC_COUNTRY_CODE = false;\n\nvar PhoneNumber = /*#__PURE__*/function () {\n /**\r\n * @param {string} countryOrCountryCallingCode\r\n * @param {string} nationalNumber\r\n * @param {object} metadata — Metadata JSON\r\n * @return {PhoneNumber}\r\n */\n function PhoneNumber(countryOrCountryCallingCode, nationalNumber, metadata) {\n _classCallCheck(this, PhoneNumber);\n\n if (!countryOrCountryCallingCode) {\n throw new TypeError('`country` or `countryCallingCode` not passed');\n }\n\n if (!nationalNumber) {\n throw new TypeError('`nationalNumber` not passed');\n }\n\n if (!metadata) {\n throw new TypeError('`metadata` not passed');\n }\n\n var _getCountryAndCountry = getCountryAndCountryCallingCode(countryOrCountryCallingCode, metadata),\n country = _getCountryAndCountry.country,\n countryCallingCode = _getCountryAndCountry.countryCallingCode;\n\n this.country = country;\n this.countryCallingCode = countryCallingCode;\n this.nationalNumber = nationalNumber;\n this.number = '+' + this.countryCallingCode + this.nationalNumber; // Exclude `metadata` property output from `PhoneNumber.toString()`\n // so that it doesn't clutter the console output of Node.js.\n // Previously, when Node.js did `console.log(new PhoneNumber(...))`,\n // it would output the whole internal structure of the `metadata` object.\n\n this.getMetadata = function () {\n return metadata;\n };\n }\n\n _createClass(PhoneNumber, [{\n key: \"setExt\",\n value: function setExt(ext) {\n this.ext = ext;\n }\n }, {\n key: \"getPossibleCountries\",\n value: function getPossibleCountries() {\n if (this.country) {\n return [this.country];\n }\n\n return getPossibleCountriesForNumber(this.countryCallingCode, this.nationalNumber, this.getMetadata());\n }\n }, {\n key: \"isPossible\",\n value: function isPossible() {\n return isPossibleNumber(this, {\n v2: true\n }, this.getMetadata());\n }\n }, {\n key: \"isValid\",\n value: function isValid() {\n return isValidNumber(this, {\n v2: true\n }, this.getMetadata());\n }\n }, {\n key: \"isNonGeographic\",\n value: function isNonGeographic() {\n var metadata = new Metadata(this.getMetadata());\n return metadata.isNonGeographicCallingCode(this.countryCallingCode);\n }\n }, {\n key: \"isEqual\",\n value: function isEqual(phoneNumber) {\n return this.number === phoneNumber.number && this.ext === phoneNumber.ext;\n } // This function was originally meant to be an equivalent for `validatePhoneNumberLength()`,\n // but later it was found out that it doesn't include the possible `TOO_SHORT` result\n // returned from `parsePhoneNumberWithError()` in the original `validatePhoneNumberLength()`,\n // so eventually I simply commented out this method from the `PhoneNumber` class\n // and just left the `validatePhoneNumberLength()` function, even though that one would require\n // and additional step to also validate the actual country / calling code of the phone number.\n // validateLength() {\n // \tconst metadata = new Metadata(this.getMetadata())\n // \tmetadata.selectNumberingPlan(this.countryCallingCode)\n // \tconst result = checkNumberLength(this.nationalNumber, metadata)\n // \tif (result !== 'IS_POSSIBLE') {\n // \t\treturn result\n // \t}\n // }\n\n }, {\n key: \"getType\",\n value: function getType() {\n return getNumberType(this, {\n v2: true\n }, this.getMetadata());\n }\n }, {\n key: \"format\",\n value: function format(_format, options) {\n return formatNumber(this, _format, options ? _objectSpread(_objectSpread({}, options), {}, {\n v2: true\n }) : {\n v2: true\n }, this.getMetadata());\n }\n }, {\n key: \"formatNational\",\n value: function formatNational(options) {\n return this.format('NATIONAL', options);\n }\n }, {\n key: \"formatInternational\",\n value: function formatInternational(options) {\n return this.format('INTERNATIONAL', options);\n }\n }, {\n key: \"getURI\",\n value: function getURI(options) {\n return this.format('RFC3966', options);\n }\n }]);\n\n return PhoneNumber;\n}();\n\nexport { PhoneNumber as default };\n\nvar isCountryCode = function isCountryCode(value) {\n return /^[A-Z]{2}$/.test(value);\n};\n\nfunction getCountryAndCountryCallingCode(countryOrCountryCallingCode, metadataJson) {\n var country;\n var countryCallingCode;\n var metadata = new Metadata(metadataJson); // If country code is passed then derive `countryCallingCode` from it.\n // Also store the country code as `.country`.\n\n if (isCountryCode(countryOrCountryCallingCode)) {\n country = countryOrCountryCallingCode;\n metadata.selectNumberingPlan(country);\n countryCallingCode = metadata.countryCallingCode();\n } else {\n countryCallingCode = countryOrCountryCallingCode;\n /* istanbul ignore if */\n\n if (USE_NON_GEOGRAPHIC_COUNTRY_CODE) {\n if (metadata.isNonGeographicCallingCode(countryCallingCode)) {\n country = '001';\n }\n }\n }\n\n return {\n country: country,\n countryCallingCode: countryCallingCode\n };\n}\n","import Metadata from '../metadata.js';\n/**\r\n * Returns a list of countries that the phone number could potentially belong to.\r\n * @param {string} callingCode — Calling code.\r\n * @param {string} nationalNumber — National (significant) number.\r\n * @param {object} metadata — Metadata.\r\n * @return {string[]} A list of possible countries.\r\n */\n\nexport default function getPossibleCountriesForNumber(callingCode, nationalNumber, metadata) {\n var _metadata = new Metadata(metadata);\n\n var possibleCountries = _metadata.getCountryCodesForCallingCode(callingCode);\n\n if (!possibleCountries) {\n return [];\n }\n\n return possibleCountries.filter(function (country) {\n return couldNationalNumberBelongToCountry(nationalNumber, country, metadata);\n });\n}\n\nfunction couldNationalNumberBelongToCountry(nationalNumber, country, metadata) {\n var _metadata = new Metadata(metadata);\n\n _metadata.selectNumberingPlan(country);\n\n if (_metadata.numberingPlan.possibleLengths().indexOf(nationalNumber.length) >= 0) {\n return true;\n }\n\n return false;\n}\n","import Metadata from './metadata.js';\nimport matchesEntirely from './helpers/matchesEntirely.js';\nimport getNumberType from './helpers/getNumberType.js';\n/**\r\n * Checks if a given phone number is valid.\r\n *\r\n * isValid(phoneNumberInstance, { ..., v2: true }, metadata)\r\n *\r\n * isPossible({ phone: '8005553535', country: 'RU' }, { ... }, metadata)\r\n * isPossible({ phone: '8005553535', country: 'RU' }, undefined, metadata)\r\n *\r\n * If the `number` is a string, it will be parsed to an object,\r\n * but only if it contains only valid phone number characters (including punctuation).\r\n * If the `number` is an object, it is used as is.\r\n *\r\n * The optional `defaultCountry` argument is the default country.\r\n * I.e. it does not restrict to just that country,\r\n * e.g. in those cases where several countries share\r\n * the same phone numbering rules (NANPA, Britain, etc).\r\n * For example, even though the number `07624 369230`\r\n * belongs to the Isle of Man (\"IM\" country code)\r\n * calling `isValidNumber('07624369230', 'GB', metadata)`\r\n * still returns `true` because the country is not restricted to `GB`,\r\n * it's just that `GB` is the default one for the phone numbering rules.\r\n * For restricting the country see `isValidNumberForRegion()`\r\n * though restricting a country might not be a good idea.\r\n * https://github.com/googlei18n/libphonenumber/blob/master/FAQ.md#when-should-i-use-isvalidnumberforregion\r\n *\r\n * Examples:\r\n *\r\n * ```js\r\n * isValidNumber('+78005553535', metadata)\r\n * isValidNumber('8005553535', 'RU', metadata)\r\n * isValidNumber('88005553535', 'RU', metadata)\r\n * isValidNumber({ phone: '8005553535', country: 'RU' }, metadata)\r\n * ```\r\n */\n\nexport default function isValidNumber(input, options, metadata) {\n // If assigning the `{}` default value is moved to the arguments above,\n // code coverage would decrease for some weird reason.\n options = options || {};\n metadata = new Metadata(metadata);\n metadata.selectNumberingPlan(input.country, input.countryCallingCode); // By default, countries only have type regexps when it's required for\n // distinguishing different countries having the same `countryCallingCode`.\n\n if (metadata.hasTypes()) {\n return getNumberType(input, options, metadata.metadata) !== undefined;\n } // If there are no type regexps for this country in metadata then use\n // `nationalNumberPattern` as a \"better than nothing\" replacement.\n\n\n var nationalNumber = options.v2 ? input.nationalNumber : input.phone;\n return matchesEntirely(nationalNumber, metadata.nationalNumberPattern());\n}\n","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport isViablePhoneNumber from './isViablePhoneNumber.js'; // https://www.ietf.org/rfc/rfc3966.txt\n\n/**\r\n * @param {string} text - Phone URI (RFC 3966).\r\n * @return {object} `{ ?number, ?ext }`.\r\n */\n\nexport function parseRFC3966(text) {\n var number;\n var ext; // Replace \"tel:\" with \"tel=\" for parsing convenience.\n\n text = text.replace(/^tel:/, 'tel=');\n\n for (var _iterator = _createForOfIteratorHelperLoose(text.split(';')), _step; !(_step = _iterator()).done;) {\n var part = _step.value;\n\n var _part$split = part.split('='),\n _part$split2 = _slicedToArray(_part$split, 2),\n name = _part$split2[0],\n value = _part$split2[1];\n\n switch (name) {\n case 'tel':\n number = value;\n break;\n\n case 'ext':\n ext = value;\n break;\n\n case 'phone-context':\n // Only \"country contexts\" are supported.\n // \"Domain contexts\" are ignored.\n if (value[0] === '+') {\n number = value + number;\n }\n\n break;\n }\n } // If the phone number is not viable, then abort.\n\n\n if (!isViablePhoneNumber(number)) {\n return {};\n }\n\n var result = {\n number: number\n };\n\n if (ext) {\n result.ext = ext;\n }\n\n return result;\n}\n/**\r\n * @param {object} - `{ ?number, ?extension }`.\r\n * @return {string} Phone URI (RFC 3966).\r\n */\n\nexport function formatRFC3966(_ref) {\n var number = _ref.number,\n ext = _ref.ext;\n\n if (!number) {\n return '';\n }\n\n if (number[0] !== '+') {\n throw new Error(\"\\\"formatRFC3966()\\\" expects \\\"number\\\" to be in E.164 format.\");\n }\n\n return \"tel:\".concat(number).concat(ext ? ';ext=' + ext : '');\n}\n","import Metadata from '../metadata.js';\nimport { VALID_DIGITS } from '../constants.js';\nvar CAPTURING_DIGIT_PATTERN = new RegExp('([' + VALID_DIGITS + '])');\nexport default function stripIddPrefix(number, country, callingCode, metadata) {\n if (!country) {\n return;\n } // Check if the number is IDD-prefixed.\n\n\n var countryMetadata = new Metadata(metadata);\n countryMetadata.selectNumberingPlan(country, callingCode);\n var IDDPrefixPattern = new RegExp(countryMetadata.IDDPrefix());\n\n if (number.search(IDDPrefixPattern) !== 0) {\n return;\n } // Strip IDD prefix.\n\n\n number = number.slice(number.match(IDDPrefixPattern)[0].length); // If there're any digits after an IDD prefix,\n // then those digits are a country calling code.\n // Since no country code starts with a `0`,\n // the code below validates that the next digit (if present) is not `0`.\n\n var matchedGroups = number.match(CAPTURING_DIGIT_PATTERN);\n\n if (matchedGroups && matchedGroups[1] != null && matchedGroups[1].length > 0) {\n if (matchedGroups[1] === '0') {\n return;\n }\n }\n\n return number;\n}\n","import extractNationalNumberFromPossiblyIncompleteNumber from './extractNationalNumberFromPossiblyIncompleteNumber.js';\nimport matchesEntirely from './matchesEntirely.js';\nimport checkNumberLength from './checkNumberLength.js';\n/**\r\n * Strips national prefix and carrier code from a complete phone number.\r\n * The difference from the non-\"FromCompleteNumber\" function is that\r\n * it won't extract national prefix if the resultant number is too short\r\n * to be a complete number for the selected phone numbering plan.\r\n * @param {string} number — Complete phone number digits.\r\n * @param {Metadata} metadata — Metadata with a phone numbering plan selected.\r\n * @return {object} `{ nationalNumber: string, carrierCode: string? }`.\r\n */\n\nexport default function extractNationalNumber(number, metadata) {\n // Parsing national prefixes and carrier codes\n // is only required for local phone numbers\n // but some people don't understand that\n // and sometimes write international phone numbers\n // with national prefixes (or maybe even carrier codes).\n // http://ucken.blogspot.ru/2016/03/trunk-prefixes-in-skype4b.html\n // Google's original library forgives such mistakes\n // and so does this library, because it has been requested:\n // https://github.com/catamphetamine/libphonenumber-js/issues/127\n var _extractNationalNumbe = extractNationalNumberFromPossiblyIncompleteNumber(number, metadata),\n carrierCode = _extractNationalNumbe.carrierCode,\n nationalNumber = _extractNationalNumbe.nationalNumber;\n\n if (nationalNumber !== number) {\n if (!shouldHaveExtractedNationalPrefix(number, nationalNumber, metadata)) {\n // Don't strip the national prefix.\n return {\n nationalNumber: number\n };\n } // Check the national (significant) number length after extracting national prefix and carrier code.\n // Legacy generated metadata (before `1.0.18`) didn't support the \"possible lengths\" feature.\n\n\n if (metadata.possibleLengths()) {\n // The number remaining after stripping the national prefix and carrier code\n // should be long enough to have a possible length for the country.\n // Otherwise, don't strip the national prefix and carrier code,\n // since the original number could be a valid number.\n // This check has been copy-pasted \"as is\" from Google's original library:\n // https://github.com/google/libphonenumber/blob/876268eb1ad6cdc1b7b5bef17fc5e43052702d57/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java#L3236-L3250\n // It doesn't check for the \"possibility\" of the original `number`.\n // I guess it's fine not checking that one. It works as is anyway.\n if (!isPossibleIncompleteNationalNumber(nationalNumber, metadata)) {\n // Don't strip the national prefix.\n return {\n nationalNumber: number\n };\n }\n }\n }\n\n return {\n nationalNumber: nationalNumber,\n carrierCode: carrierCode\n };\n} // In some countries, the same digit could be a national prefix\n// or a leading digit of a valid phone number.\n// For example, in Russia, national prefix is `8`,\n// and also `800 555 35 35` is a valid number\n// in which `8` is not a national prefix, but the first digit\n// of a national (significant) number.\n// Same's with Belarus:\n// `82004910060` is a valid national (significant) number,\n// but `2004910060` is not.\n// To support such cases (to prevent the code from always stripping\n// national prefix), a condition is imposed: a national prefix\n// is not extracted when the original number is \"viable\" and the\n// resultant number is not, a \"viable\" national number being the one\n// that matches `national_number_pattern`.\n\nfunction shouldHaveExtractedNationalPrefix(nationalNumberBefore, nationalNumberAfter, metadata) {\n // The equivalent in Google's code is:\n // https://github.com/google/libphonenumber/blob/e326fa1fc4283bb05eb35cb3c15c18f98a31af33/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java#L2969-L3004\n if (matchesEntirely(nationalNumberBefore, metadata.nationalNumberPattern()) && !matchesEntirely(nationalNumberAfter, metadata.nationalNumberPattern())) {\n return false;\n } // This \"is possible\" national number (length) check has been commented out\n // because it's superceded by the (effectively) same check done in the\n // `extractNationalNumber()` function after it calls `shouldHaveExtractedNationalPrefix()`.\n // In other words, why run the same check twice if it could only be run once.\n // // Check the national (significant) number length after extracting national prefix and carrier code.\n // // Fixes a minor \"weird behavior\" bug: https://gitlab.com/catamphetamine/libphonenumber-js/-/issues/57\n // // (Legacy generated metadata (before `1.0.18`) didn't support the \"possible lengths\" feature).\n // if (metadata.possibleLengths()) {\n // \tif (isPossibleIncompleteNationalNumber(nationalNumberBefore, metadata) &&\n // \t\t!isPossibleIncompleteNationalNumber(nationalNumberAfter, metadata)) {\n // \t\treturn false\n // \t}\n // }\n\n\n return true;\n}\n\nfunction isPossibleIncompleteNationalNumber(nationalNumber, metadata) {\n switch (checkNumberLength(nationalNumber, metadata)) {\n case 'TOO_SHORT':\n case 'INVALID_LENGTH':\n // This library ignores \"local-only\" phone numbers (for simplicity).\n // See the readme for more info on what are \"local-only\" phone numbers.\n // case 'IS_POSSIBLE_LOCAL_ONLY':\n return false;\n\n default:\n return true;\n }\n}\n","/**\r\n * Strips any national prefix (such as 0, 1) present in a\r\n * (possibly incomplete) number provided.\r\n * \"Carrier codes\" are only used in Colombia and Brazil,\r\n * and only when dialing within those countries from a mobile phone to a fixed line number.\r\n * Sometimes it won't actually strip national prefix\r\n * and will instead prepend some digits to the `number`:\r\n * for example, when number `2345678` is passed with `VI` country selected,\r\n * it will return `{ number: \"3402345678\" }`, because `340` area code is prepended.\r\n * @param {string} number — National number digits.\r\n * @param {object} metadata — Metadata with country selected.\r\n * @return {object} `{ nationalNumber: string, nationalPrefix: string? carrierCode: string? }`. Even if a national prefix was extracted, it's not necessarily present in the returned object, so don't rely on its presence in the returned object in order to find out whether a national prefix has been extracted or not.\r\n */\nexport default function extractNationalNumberFromPossiblyIncompleteNumber(number, metadata) {\n if (number && metadata.numberingPlan.nationalPrefixForParsing()) {\n // See METADATA.md for the description of\n // `national_prefix_for_parsing` and `national_prefix_transform_rule`.\n // Attempt to parse the first digits as a national prefix.\n var prefixPattern = new RegExp('^(?:' + metadata.numberingPlan.nationalPrefixForParsing() + ')');\n var prefixMatch = prefixPattern.exec(number);\n\n if (prefixMatch) {\n var nationalNumber;\n var carrierCode; // https://gitlab.com/catamphetamine/libphonenumber-js/-/blob/master/METADATA.md#national_prefix_for_parsing--national_prefix_transform_rule\n // If a `national_prefix_for_parsing` has any \"capturing groups\"\n // then it means that the national (significant) number is equal to\n // those \"capturing groups\" transformed via `national_prefix_transform_rule`,\n // and nothing could be said about the actual national prefix:\n // what is it and was it even there.\n // If a `national_prefix_for_parsing` doesn't have any \"capturing groups\",\n // then everything it matches is a national prefix.\n // To determine whether `national_prefix_for_parsing` matched any\n // \"capturing groups\", the value of the result of calling `.exec()`\n // is looked at, and if it has non-undefined values where there're\n // \"capturing groups\" in the regular expression, then it means\n // that \"capturing groups\" have been matched.\n // It's not possible to tell whether there'll be any \"capturing gropus\"\n // before the matching process, because a `national_prefix_for_parsing`\n // could exhibit both behaviors.\n\n var capturedGroupsCount = prefixMatch.length - 1;\n var hasCapturedGroups = capturedGroupsCount > 0 && prefixMatch[capturedGroupsCount];\n\n if (metadata.nationalPrefixTransformRule() && hasCapturedGroups) {\n nationalNumber = number.replace(prefixPattern, metadata.nationalPrefixTransformRule()); // If there's more than one captured group,\n // then carrier code is the second one.\n\n if (capturedGroupsCount > 1) {\n carrierCode = prefixMatch[1];\n }\n } // If there're no \"capturing groups\",\n // or if there're \"capturing groups\" but no\n // `national_prefix_transform_rule`,\n // then just strip the national prefix from the number,\n // and possibly a carrier code.\n // Seems like there could be more.\n else {\n // `prefixBeforeNationalNumber` is the whole substring matched by\n // the `national_prefix_for_parsing` regular expression.\n // There seem to be no guarantees that it's just a national prefix.\n // For example, if there's a carrier code, it's gonna be a\n // part of `prefixBeforeNationalNumber` too.\n var prefixBeforeNationalNumber = prefixMatch[0];\n nationalNumber = number.slice(prefixBeforeNationalNumber.length); // If there's at least one captured group,\n // then carrier code is the first one.\n\n if (hasCapturedGroups) {\n carrierCode = prefixMatch[1];\n }\n } // Tries to guess whether a national prefix was present in the input.\n // This is not something copy-pasted from Google's library:\n // they don't seem to have an equivalent for that.\n // So this isn't an \"officially approved\" way of doing something like that.\n // But since there seems no other existing method, this library uses it.\n\n\n var nationalPrefix;\n\n if (hasCapturedGroups) {\n var possiblePositionOfTheFirstCapturedGroup = number.indexOf(prefixMatch[1]);\n var possibleNationalPrefix = number.slice(0, possiblePositionOfTheFirstCapturedGroup); // Example: an Argentinian (AR) phone number `0111523456789`.\n // `prefixMatch[0]` is `01115`, and `$1` is `11`,\n // and the rest of the phone number is `23456789`.\n // The national number is transformed via `9$1` to `91123456789`.\n // National prefix `0` is detected being present at the start.\n // if (possibleNationalPrefix.indexOf(metadata.numberingPlan.nationalPrefix()) === 0) {\n\n if (possibleNationalPrefix === metadata.numberingPlan.nationalPrefix()) {\n nationalPrefix = metadata.numberingPlan.nationalPrefix();\n }\n } else {\n nationalPrefix = prefixMatch[0];\n }\n\n return {\n nationalNumber: nationalNumber,\n nationalPrefix: nationalPrefix,\n carrierCode: carrierCode\n };\n }\n }\n\n return {\n nationalNumber: number\n };\n}\n","function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport Metadata from '../metadata.js';\nimport getNumberType from './getNumberType.js';\nexport default function getCountryByNationalNumber(nationalPhoneNumber, _ref) {\n var countries = _ref.countries,\n defaultCountry = _ref.defaultCountry,\n metadata = _ref.metadata;\n // Re-create `metadata` because it will be selecting a `country`.\n metadata = new Metadata(metadata); // const matchingCountries = []\n\n for (var _iterator = _createForOfIteratorHelperLoose(countries), _step; !(_step = _iterator()).done;) {\n var country = _step.value;\n metadata.country(country); // \"Leading digits\" patterns are only defined for about 20% of all countries.\n // By definition, matching \"leading digits\" is a sufficient but not a necessary\n // condition for a phone number to belong to a country.\n // The point of \"leading digits\" check is that it's the fastest one to get a match.\n // https://gitlab.com/catamphetamine/libphonenumber-js/blob/master/METADATA.md#leading_digits\n // I'd suppose that \"leading digits\" patterns are mutually exclusive for different countries\n // because of the intended use of that feature.\n\n if (metadata.leadingDigits()) {\n if (nationalPhoneNumber && nationalPhoneNumber.search(metadata.leadingDigits()) === 0) {\n return country;\n }\n } // Else perform full validation with all of those\n // fixed-line/mobile/etc regular expressions.\n else if (getNumberType({\n phone: nationalPhoneNumber,\n country: country\n }, undefined, metadata.metadata)) {\n // If both the `defaultCountry` and the \"main\" one match the phone number,\n // don't prefer the `defaultCountry` over the \"main\" one.\n // https://gitlab.com/catamphetamine/libphonenumber-js/-/issues/154\n return country; // // If the `defaultCountry` is among the `matchingCountries` then return it.\n // if (defaultCountry) {\n // \tif (country === defaultCountry) {\n // \t\treturn country\n // \t}\n // \tmatchingCountries.push(country)\n // } else {\n // \treturn country\n // }\n }\n } // // Return the first (\"main\") one of the `matchingCountries`.\n // if (matchingCountries.length > 0) {\n // \treturn matchingCountries[0]\n // }\n\n}\n","import getCountryByNationalNumber from './getCountryByNationalNumber.js';\nvar USE_NON_GEOGRAPHIC_COUNTRY_CODE = false;\nexport default function getCountryByCallingCode(callingCode, _ref) {\n var nationalPhoneNumber = _ref.nationalNumber,\n defaultCountry = _ref.defaultCountry,\n metadata = _ref.metadata;\n\n /* istanbul ignore if */\n if (USE_NON_GEOGRAPHIC_COUNTRY_CODE) {\n if (metadata.isNonGeographicCallingCode(callingCode)) {\n return '001';\n }\n }\n\n var possibleCountries = metadata.getCountryCodesForCallingCode(callingCode);\n\n if (!possibleCountries) {\n return;\n } // If there's just one country corresponding to the country code,\n // then just return it, without further phone number digits validation.\n\n\n if (possibleCountries.length === 1) {\n return possibleCountries[0];\n }\n\n return getCountryByNationalNumber(nationalPhoneNumber, {\n countries: possibleCountries,\n defaultCountry: defaultCountry,\n metadata: metadata.metadata\n });\n}\n","// When phone numbers are written in `RFC3966` format — `\"tel:+12133734253\"` —\n// they can have their \"calling code\" part written separately in a `phone-context` parameter.\n// Example: `\"tel:12133734253;phone-context=+1\"`.\n// This function parses the full phone number from the local number and the `phone-context`\n// when the `phone-context` contains a `+` sign.\nimport { VALID_DIGITS // PLUS_CHARS\n} from '../constants.js';\nexport var PLUS_SIGN = '+';\nvar RFC3966_VISUAL_SEPARATOR_ = '[\\\\-\\\\.\\\\(\\\\)]?';\nvar RFC3966_PHONE_DIGIT_ = '(' + '[' + VALID_DIGITS + ']' + '|' + RFC3966_VISUAL_SEPARATOR_ + ')';\nvar RFC3966_GLOBAL_NUMBER_DIGITS_ = '^' + '\\\\' + PLUS_SIGN + RFC3966_PHONE_DIGIT_ + '*' + '[' + VALID_DIGITS + ']' + RFC3966_PHONE_DIGIT_ + '*' + '$';\n/**\r\n * Regular expression of valid global-number-digits for the phone-context\r\n * parameter, following the syntax defined in RFC3966.\r\n */\n\nvar RFC3966_GLOBAL_NUMBER_DIGITS_PATTERN_ = new RegExp(RFC3966_GLOBAL_NUMBER_DIGITS_, 'g'); // In this port of Google's library, we don't accept alpha characters in phone numbers.\n// const ALPHANUM_ = VALID_ALPHA_ + VALID_DIGITS\n\nvar ALPHANUM_ = VALID_DIGITS;\nvar RFC3966_DOMAINLABEL_ = '[' + ALPHANUM_ + ']+((\\\\-)*[' + ALPHANUM_ + '])*';\nvar VALID_ALPHA_ = 'a-zA-Z';\nvar RFC3966_TOPLABEL_ = '[' + VALID_ALPHA_ + ']+((\\\\-)*[' + ALPHANUM_ + '])*';\nvar RFC3966_DOMAINNAME_ = '^(' + RFC3966_DOMAINLABEL_ + '\\\\.)*' + RFC3966_TOPLABEL_ + '\\\\.?$';\n/**\r\n * Regular expression of valid domainname for the phone-context parameter,\r\n * following the syntax defined in RFC3966.\r\n */\n\nvar RFC3966_DOMAINNAME_PATTERN_ = new RegExp(RFC3966_DOMAINNAME_, 'g');\nexport var RFC3966_PREFIX_ = 'tel:';\nexport var RFC3966_PHONE_CONTEXT_ = ';phone-context=';\nexport var RFC3966_ISDN_SUBADDRESS_ = ';isub=';\n/**\r\n * Extracts the value of the phone-context parameter of `numberToExtractFrom`,\r\n * following the syntax defined in RFC3966.\r\n *\r\n * @param {string} numberToExtractFrom\r\n * @return {string|null} the extracted string (possibly empty), or `null` if no phone-context parameter is found.\r\n */\n\nexport default function extractPhoneContext(numberToExtractFrom) {\n var indexOfPhoneContext = numberToExtractFrom.indexOf(RFC3966_PHONE_CONTEXT_); // If no phone-context parameter is present\n\n if (indexOfPhoneContext < 0) {\n return null;\n }\n\n var phoneContextStart = indexOfPhoneContext + RFC3966_PHONE_CONTEXT_.length; // If phone-context parameter is empty\n\n if (phoneContextStart >= numberToExtractFrom.length) {\n return '';\n }\n\n var phoneContextEnd = numberToExtractFrom.indexOf(';', phoneContextStart); // If phone-context is not the last parameter\n\n if (phoneContextEnd >= 0) {\n return numberToExtractFrom.substring(phoneContextStart, phoneContextEnd);\n } else {\n return numberToExtractFrom.substring(phoneContextStart);\n }\n}\n/**\r\n * Returns whether the value of phoneContext follows the syntax defined in RFC3966.\r\n *\r\n * @param {string|null} phoneContext\r\n * @return {boolean}\r\n */\n\nexport function isPhoneContextValid(phoneContext) {\n if (phoneContext === null) {\n return true;\n }\n\n if (phoneContext.length === 0) {\n return false;\n } // Does phone-context value match pattern of global-number-digits or domainname.\n\n\n return RFC3966_GLOBAL_NUMBER_DIGITS_PATTERN_.test(phoneContext) || RFC3966_DOMAINNAME_PATTERN_.test(phoneContext);\n}\n","// This is a port of Google Android `libphonenumber`'s\n// `phonenumberutil.js` of December 31th, 2018.\n//\n// https://github.com/googlei18n/libphonenumber/commits/master/javascript/i18n/phonenumbers/phonenumberutil.js\nimport { VALID_DIGITS, PLUS_CHARS, MIN_LENGTH_FOR_NSN, MAX_LENGTH_FOR_NSN } from './constants.js';\nimport ParseError from './ParseError.js';\nimport Metadata from './metadata.js';\nimport isViablePhoneNumber, { isViablePhoneNumberStart } from './helpers/isViablePhoneNumber.js';\nimport extractExtension from './helpers/extension/extractExtension.js';\nimport parseIncompletePhoneNumber from './parseIncompletePhoneNumber.js';\nimport getCountryCallingCode from './getCountryCallingCode.js';\nimport { isPossibleNumber } from './isPossible.js'; // import { parseRFC3966 } from './helpers/RFC3966.js'\n\nimport PhoneNumber from './PhoneNumber.js';\nimport matchesEntirely from './helpers/matchesEntirely.js';\nimport extractCountryCallingCode from './helpers/extractCountryCallingCode.js';\nimport extractNationalNumber from './helpers/extractNationalNumber.js';\nimport stripIddPrefix from './helpers/stripIddPrefix.js';\nimport getCountryByCallingCode from './helpers/getCountryByCallingCode.js';\nimport extractFormattedPhoneNumberFromPossibleRfc3966NumberUri from './helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js'; // We don't allow input strings for parsing to be longer than 250 chars.\n// This prevents malicious input from consuming CPU.\n\nvar MAX_INPUT_STRING_LENGTH = 250; // This consists of the plus symbol, digits, and arabic-indic digits.\n\nvar PHONE_NUMBER_START_PATTERN = new RegExp('[' + PLUS_CHARS + VALID_DIGITS + ']'); // Regular expression of trailing characters that we want to remove.\n// A trailing `#` is sometimes used when writing phone numbers with extensions in US.\n// Example: \"+1 (645) 123 1234-910#\" number has extension \"910\".\n\nvar AFTER_PHONE_NUMBER_END_PATTERN = new RegExp('[^' + VALID_DIGITS + '#' + ']+$');\nvar USE_NON_GEOGRAPHIC_COUNTRY_CODE = false; // Examples:\n//\n// ```js\n// parse('8 (800) 555-35-35', 'RU')\n// parse('8 (800) 555-35-35', 'RU', metadata)\n// parse('8 (800) 555-35-35', { country: { default: 'RU' } })\n// parse('8 (800) 555-35-35', { country: { default: 'RU' } }, metadata)\n// parse('+7 800 555 35 35')\n// parse('+7 800 555 35 35', metadata)\n// ```\n//\n\n/**\r\n * Parses a phone number.\r\n *\r\n * parse('123456789', { defaultCountry: 'RU', v2: true }, metadata)\r\n * parse('123456789', { defaultCountry: 'RU' }, metadata)\r\n * parse('123456789', undefined, metadata)\r\n *\r\n * @param {string} input\r\n * @param {object} [options]\r\n * @param {object} metadata\r\n * @return {object|PhoneNumber?} If `options.v2: true` flag is passed, it returns a `PhoneNumber?` instance. Otherwise, returns an object of shape `{ phone: '...', country: '...' }` (or just `{}` if no phone number was parsed).\r\n */\n\nexport default function parse(text, options, metadata) {\n // If assigning the `{}` default value is moved to the arguments above,\n // code coverage would decrease for some weird reason.\n options = options || {};\n metadata = new Metadata(metadata); // Validate `defaultCountry`.\n\n if (options.defaultCountry && !metadata.hasCountry(options.defaultCountry)) {\n if (options.v2) {\n throw new ParseError('INVALID_COUNTRY');\n }\n\n throw new Error(\"Unknown country: \".concat(options.defaultCountry));\n } // Parse the phone number.\n\n\n var _parseInput = parseInput(text, options.v2, options.extract),\n formattedPhoneNumber = _parseInput.number,\n ext = _parseInput.ext,\n error = _parseInput.error; // If the phone number is not viable then return nothing.\n\n\n if (!formattedPhoneNumber) {\n if (options.v2) {\n if (error === 'TOO_SHORT') {\n throw new ParseError('TOO_SHORT');\n }\n\n throw new ParseError('NOT_A_NUMBER');\n }\n\n return {};\n }\n\n var _parsePhoneNumber = parsePhoneNumber(formattedPhoneNumber, options.defaultCountry, options.defaultCallingCode, metadata),\n country = _parsePhoneNumber.country,\n nationalNumber = _parsePhoneNumber.nationalNumber,\n countryCallingCode = _parsePhoneNumber.countryCallingCode,\n countryCallingCodeSource = _parsePhoneNumber.countryCallingCodeSource,\n carrierCode = _parsePhoneNumber.carrierCode;\n\n if (!metadata.hasSelectedNumberingPlan()) {\n if (options.v2) {\n throw new ParseError('INVALID_COUNTRY');\n }\n\n return {};\n } // Validate national (significant) number length.\n\n\n if (!nationalNumber || nationalNumber.length < MIN_LENGTH_FOR_NSN) {\n // Won't throw here because the regexp already demands length > 1.\n\n /* istanbul ignore if */\n if (options.v2) {\n throw new ParseError('TOO_SHORT');\n } // Google's demo just throws an error in this case.\n\n\n return {};\n } // Validate national (significant) number length.\n //\n // A sidenote:\n //\n // They say that sometimes national (significant) numbers\n // can be longer than `MAX_LENGTH_FOR_NSN` (e.g. in Germany).\n // https://github.com/googlei18n/libphonenumber/blob/7e1748645552da39c4e1ba731e47969d97bdb539/resources/phonenumber.proto#L36\n // Such numbers will just be discarded.\n //\n\n\n if (nationalNumber.length > MAX_LENGTH_FOR_NSN) {\n if (options.v2) {\n throw new ParseError('TOO_LONG');\n } // Google's demo just throws an error in this case.\n\n\n return {};\n }\n\n if (options.v2) {\n var phoneNumber = new PhoneNumber(countryCallingCode, nationalNumber, metadata.metadata);\n\n if (country) {\n phoneNumber.country = country;\n }\n\n if (carrierCode) {\n phoneNumber.carrierCode = carrierCode;\n }\n\n if (ext) {\n phoneNumber.ext = ext;\n }\n\n phoneNumber.__countryCallingCodeSource = countryCallingCodeSource;\n return phoneNumber;\n } // Check if national phone number pattern matches the number.\n // National number pattern is different for each country,\n // even for those ones which are part of the \"NANPA\" group.\n\n\n var valid = (options.extended ? metadata.hasSelectedNumberingPlan() : country) ? matchesEntirely(nationalNumber, metadata.nationalNumberPattern()) : false;\n\n if (!options.extended) {\n return valid ? result(country, nationalNumber, ext) : {};\n } // isInternational: countryCallingCode !== undefined\n\n\n return {\n country: country,\n countryCallingCode: countryCallingCode,\n carrierCode: carrierCode,\n valid: valid,\n possible: valid ? true : options.extended === true && metadata.possibleLengths() && isPossibleNumber(nationalNumber, metadata) ? true : false,\n phone: nationalNumber,\n ext: ext\n };\n}\n/**\r\n * Extracts a formatted phone number from text.\r\n * Doesn't guarantee that the extracted phone number\r\n * is a valid phone number (for example, doesn't validate its length).\r\n * @param {string} text\r\n * @param {boolean} [extract] — If `false`, then will parse the entire `text` as a phone number.\r\n * @param {boolean} [throwOnError] — By default, it won't throw if the text is too long.\r\n * @return {string}\r\n * @example\r\n * // Returns \"(213) 373-4253\".\r\n * extractFormattedPhoneNumber(\"Call (213) 373-4253 for assistance.\")\r\n */\n\nfunction _extractFormattedPhoneNumber(text, extract, throwOnError) {\n if (!text) {\n return;\n }\n\n if (text.length > MAX_INPUT_STRING_LENGTH) {\n if (throwOnError) {\n throw new ParseError('TOO_LONG');\n }\n\n return;\n }\n\n if (extract === false) {\n return text;\n } // Attempt to extract a possible number from the string passed in\n\n\n var startsAt = text.search(PHONE_NUMBER_START_PATTERN);\n\n if (startsAt < 0) {\n return;\n }\n\n return text // Trim everything to the left of the phone number\n .slice(startsAt) // Remove trailing non-numerical characters\n .replace(AFTER_PHONE_NUMBER_END_PATTERN, '');\n}\n/**\r\n * @param {string} text - Input.\r\n * @param {boolean} v2 - Legacy API functions don't pass `v2: true` flag.\r\n * @param {boolean} [extract] - Whether to extract a phone number from `text`, or attempt to parse the entire text as a phone number.\r\n * @return {object} `{ ?number, ?ext }`.\r\n */\n\n\nfunction parseInput(text, v2, extract) {\n // // Parse RFC 3966 phone number URI.\n // if (text && text.indexOf('tel:') === 0) {\n // \treturn parseRFC3966(text)\n // }\n // let number = extractFormattedPhoneNumber(text, extract, v2)\n var number = extractFormattedPhoneNumberFromPossibleRfc3966NumberUri(text, {\n extractFormattedPhoneNumber: function extractFormattedPhoneNumber(text) {\n return _extractFormattedPhoneNumber(text, extract, v2);\n }\n }); // If the phone number is not viable, then abort.\n\n if (!number) {\n return {};\n }\n\n if (!isViablePhoneNumber(number)) {\n if (isViablePhoneNumberStart(number)) {\n return {\n error: 'TOO_SHORT'\n };\n }\n\n return {};\n } // Attempt to parse extension first, since it doesn't require region-specific\n // data and we want to have the non-normalised number here.\n\n\n var withExtensionStripped = extractExtension(number);\n\n if (withExtensionStripped.ext) {\n return withExtensionStripped;\n }\n\n return {\n number: number\n };\n}\n/**\r\n * Creates `parse()` result object.\r\n */\n\n\nfunction result(country, nationalNumber, ext) {\n var result = {\n country: country,\n phone: nationalNumber\n };\n\n if (ext) {\n result.ext = ext;\n }\n\n return result;\n}\n/**\r\n * Parses a viable phone number.\r\n * @param {string} formattedPhoneNumber — Example: \"(213) 373-4253\".\r\n * @param {string} [defaultCountry]\r\n * @param {string} [defaultCallingCode]\r\n * @param {Metadata} metadata\r\n * @return {object} Returns `{ country: string?, countryCallingCode: string?, nationalNumber: string? }`.\r\n */\n\n\nfunction parsePhoneNumber(formattedPhoneNumber, defaultCountry, defaultCallingCode, metadata) {\n // Extract calling code from phone number.\n var _extractCountryCallin = extractCountryCallingCode(parseIncompletePhoneNumber(formattedPhoneNumber), defaultCountry, defaultCallingCode, metadata.metadata),\n countryCallingCodeSource = _extractCountryCallin.countryCallingCodeSource,\n countryCallingCode = _extractCountryCallin.countryCallingCode,\n number = _extractCountryCallin.number; // Choose a country by `countryCallingCode`.\n\n\n var country;\n\n if (countryCallingCode) {\n metadata.selectNumberingPlan(countryCallingCode);\n } // If `formattedPhoneNumber` is passed in \"national\" format\n // then `number` is defined and `countryCallingCode` is `undefined`.\n else if (number && (defaultCountry || defaultCallingCode)) {\n metadata.selectNumberingPlan(defaultCountry, defaultCallingCode);\n\n if (defaultCountry) {\n country = defaultCountry;\n } else {\n /* istanbul ignore if */\n if (USE_NON_GEOGRAPHIC_COUNTRY_CODE) {\n if (metadata.isNonGeographicCallingCode(defaultCallingCode)) {\n country = '001';\n }\n }\n }\n\n countryCallingCode = defaultCallingCode || getCountryCallingCode(defaultCountry, metadata.metadata);\n } else return {};\n\n if (!number) {\n return {\n countryCallingCodeSource: countryCallingCodeSource,\n countryCallingCode: countryCallingCode\n };\n }\n\n var _extractNationalNumbe = extractNationalNumber(parseIncompletePhoneNumber(number), metadata),\n nationalNumber = _extractNationalNumbe.nationalNumber,\n carrierCode = _extractNationalNumbe.carrierCode; // Sometimes there are several countries\n // corresponding to the same country phone code\n // (e.g. NANPA countries all having `1` country phone code).\n // Therefore, to reliably determine the exact country,\n // national (significant) number should have been parsed first.\n //\n // When `metadata.json` is generated, all \"ambiguous\" country phone codes\n // get their countries populated with the full set of\n // \"phone number type\" regular expressions.\n //\n\n\n var exactCountry = getCountryByCallingCode(countryCallingCode, {\n nationalNumber: nationalNumber,\n defaultCountry: defaultCountry,\n metadata: metadata\n });\n\n if (exactCountry) {\n country = exactCountry;\n /* istanbul ignore if */\n\n if (exactCountry === '001') {// Can't happen with `USE_NON_GEOGRAPHIC_COUNTRY_CODE` being `false`.\n // If `USE_NON_GEOGRAPHIC_COUNTRY_CODE` is set to `true` for some reason,\n // then remove the \"istanbul ignore if\".\n } else {\n metadata.country(country);\n }\n }\n\n return {\n country: country,\n countryCallingCode: countryCallingCode,\n countryCallingCodeSource: countryCallingCodeSource,\n nationalNumber: nationalNumber,\n carrierCode: carrierCode\n };\n}\n","import extractPhoneContext, { isPhoneContextValid, PLUS_SIGN, RFC3966_PREFIX_, RFC3966_PHONE_CONTEXT_, RFC3966_ISDN_SUBADDRESS_ } from './extractPhoneContext.js';\nimport ParseError from '../ParseError.js';\n/**\r\n * @param {string} numberToParse\r\n * @param {string} nationalNumber\r\n * @return {}\r\n */\n\nexport default function extractFormattedPhoneNumberFromPossibleRfc3966NumberUri(numberToParse, _ref) {\n var extractFormattedPhoneNumber = _ref.extractFormattedPhoneNumber;\n var phoneContext = extractPhoneContext(numberToParse);\n\n if (!isPhoneContextValid(phoneContext)) {\n throw new ParseError('NOT_A_NUMBER');\n }\n\n var phoneNumberString;\n\n if (phoneContext === null) {\n // Extract a possible number from the string passed in.\n // (this strips leading characters that could not be the start of a phone number)\n phoneNumberString = extractFormattedPhoneNumber(numberToParse) || '';\n } else {\n phoneNumberString = ''; // If the phone context contains a phone number prefix, we need to capture\n // it, whereas domains will be ignored.\n\n if (phoneContext.charAt(0) === PLUS_SIGN) {\n phoneNumberString += phoneContext;\n } // Now append everything between the \"tel:\" prefix and the phone-context.\n // This should include the national number, an optional extension or\n // isdn-subaddress component. Note we also handle the case when \"tel:\" is\n // missing, as we have seen in some of the phone number inputs.\n // In that case, we append everything from the beginning.\n\n\n var indexOfRfc3966Prefix = numberToParse.indexOf(RFC3966_PREFIX_);\n var indexOfNationalNumber; // RFC 3966 \"tel:\" prefix is preset at this stage because\n // `isPhoneContextValid()` requires it to be present.\n\n /* istanbul ignore else */\n\n if (indexOfRfc3966Prefix >= 0) {\n indexOfNationalNumber = indexOfRfc3966Prefix + RFC3966_PREFIX_.length;\n } else {\n indexOfNationalNumber = 0;\n }\n\n var indexOfPhoneContext = numberToParse.indexOf(RFC3966_PHONE_CONTEXT_);\n phoneNumberString += numberToParse.substring(indexOfNationalNumber, indexOfPhoneContext);\n } // Delete the isdn-subaddress and everything after it if it is present.\n // Note extension won't appear at the same time with isdn-subaddress\n // according to paragraph 5.3 of the RFC3966 spec.\n\n\n var indexOfIsdn = phoneNumberString.indexOf(RFC3966_ISDN_SUBADDRESS_);\n\n if (indexOfIsdn > 0) {\n phoneNumberString = phoneNumberString.substring(0, indexOfIsdn);\n } // If both phone context and isdn-subaddress are absent but other\n // parameters are present, the parameters are left in nationalNumber.\n // This is because we are concerned about deleting content from a potential\n // number string when there is no strong evidence that the number is\n // actually written in RFC3966.\n\n\n if (phoneNumberString !== '') {\n return phoneNumberString;\n }\n}\n","import stripIddPrefix from './stripIddPrefix.js';\nimport extractCountryCallingCodeFromInternationalNumberWithoutPlusSign from './extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js';\nimport Metadata from '../metadata.js';\nimport { MAX_LENGTH_COUNTRY_CODE } from '../constants.js';\n/**\r\n * Converts a phone number digits (possibly with a `+`)\r\n * into a calling code and the rest phone number digits.\r\n * The \"rest phone number digits\" could include\r\n * a national prefix, carrier code, and national\r\n * (significant) number.\r\n * @param {string} number — Phone number digits (possibly with a `+`).\r\n * @param {string} [country] — Default country.\r\n * @param {string} [callingCode] — Default calling code (some phone numbering plans are non-geographic).\r\n * @param {object} metadata\r\n * @return {object} `{ countryCallingCodeSource: string?, countryCallingCode: string?, number: string }`\r\n * @example\r\n * // Returns `{ countryCallingCode: \"1\", number: \"2133734253\" }`.\r\n * extractCountryCallingCode('2133734253', 'US', null, metadata)\r\n * extractCountryCallingCode('2133734253', null, '1', metadata)\r\n * extractCountryCallingCode('+12133734253', null, null, metadata)\r\n * extractCountryCallingCode('+12133734253', 'RU', null, metadata)\r\n */\n\nexport default function extractCountryCallingCode(number, country, callingCode, metadata) {\n if (!number) {\n return {};\n }\n\n var isNumberWithIddPrefix; // If this is not an international phone number,\n // then either extract an \"IDD\" prefix, or extract a\n // country calling code from a number by autocorrecting it\n // by prepending a leading `+` in cases when it starts\n // with the country calling code.\n // https://wikitravel.org/en/International_dialling_prefix\n // https://github.com/catamphetamine/libphonenumber-js/issues/376\n\n if (number[0] !== '+') {\n // Convert an \"out-of-country\" dialing phone number\n // to a proper international phone number.\n var numberWithoutIDD = stripIddPrefix(number, country, callingCode, metadata); // If an IDD prefix was stripped then\n // convert the number to international one\n // for subsequent parsing.\n\n if (numberWithoutIDD && numberWithoutIDD !== number) {\n isNumberWithIddPrefix = true;\n number = '+' + numberWithoutIDD;\n } else {\n // Check to see if the number starts with the country calling code\n // for the default country. If so, we remove the country calling code,\n // and do some checks on the validity of the number before and after.\n // https://github.com/catamphetamine/libphonenumber-js/issues/376\n if (country || callingCode) {\n var _extractCountryCallin = extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(number, country, callingCode, metadata),\n countryCallingCode = _extractCountryCallin.countryCallingCode,\n shorterNumber = _extractCountryCallin.number;\n\n if (countryCallingCode) {\n return {\n countryCallingCodeSource: 'FROM_NUMBER_WITHOUT_PLUS_SIGN',\n countryCallingCode: countryCallingCode,\n number: shorterNumber\n };\n }\n }\n\n return {\n // No need to set it to `UNSPECIFIED`. It can be just `undefined`.\n // countryCallingCodeSource: 'UNSPECIFIED',\n number: number\n };\n }\n } // Fast abortion: country codes do not begin with a '0'\n\n\n if (number[1] === '0') {\n return {};\n }\n\n metadata = new Metadata(metadata); // The thing with country phone codes\n // is that they are orthogonal to each other\n // i.e. there's no such country phone code A\n // for which country phone code B exists\n // where B starts with A.\n // Therefore, while scanning digits,\n // if a valid country code is found,\n // that means that it is the country code.\n //\n\n var i = 2;\n\n while (i - 1 <= MAX_LENGTH_COUNTRY_CODE && i <= number.length) {\n var _countryCallingCode = number.slice(1, i);\n\n if (metadata.hasCallingCode(_countryCallingCode)) {\n metadata.selectNumberingPlan(_countryCallingCode);\n return {\n countryCallingCodeSource: isNumberWithIddPrefix ? 'FROM_NUMBER_WITH_IDD' : 'FROM_NUMBER_WITH_PLUS_SIGN',\n countryCallingCode: _countryCallingCode,\n number: number.slice(i)\n };\n }\n\n i++;\n }\n\n return {};\n} // The possible values for the returned `countryCallingCodeSource` are:\n//\n// Copy-pasted from:\n// https://github.com/google/libphonenumber/blob/master/resources/phonenumber.proto\n//\n// // The source from which the country_code is derived. This is not set in the\n// // general parsing method, but in the method that parses and keeps raw_input.\n// // New fields could be added upon request.\n// enum CountryCodeSource {\n// // Default value returned if this is not set, because the phone number was\n// // created using parse, not parseAndKeepRawInput. hasCountryCodeSource will\n// // return false if this is the case.\n// UNSPECIFIED = 0;\n//\n// // The country_code is derived based on a phone number with a leading \"+\",\n// // e.g. the French number \"+33 1 42 68 53 00\".\n// FROM_NUMBER_WITH_PLUS_SIGN = 1;\n//\n// // The country_code is derived based on a phone number with a leading IDD,\n// // e.g. the French number \"011 33 1 42 68 53 00\", as it is dialled from US.\n// FROM_NUMBER_WITH_IDD = 5;\n//\n// // The country_code is derived based on a phone number without a leading\n// // \"+\", e.g. the French number \"33 1 42 68 53 00\" when defaultCountry is\n// // supplied as France.\n// FROM_NUMBER_WITHOUT_PLUS_SIGN = 10;\n//\n// // The country_code is derived NOT based on the phone number itself, but\n// // from the defaultCountry parameter provided in the parsing function by the\n// // clients. This happens mostly for numbers written in the national format\n// // (without country code). For example, this would be set when parsing the\n// // French number \"01 42 68 53 00\", when defaultCountry is supplied as\n// // France.\n// FROM_DEFAULT_COUNTRY = 20;\n// }\n","import Metadata from '../metadata.js';\nimport matchesEntirely from './matchesEntirely.js';\nimport extractNationalNumber from './extractNationalNumber.js';\nimport checkNumberLength from './checkNumberLength.js';\nimport getCountryCallingCode from '../getCountryCallingCode.js';\n/**\r\n * Sometimes some people incorrectly input international phone numbers\r\n * without the leading `+`. This function corrects such input.\r\n * @param {string} number — Phone number digits.\r\n * @param {string?} country\r\n * @param {string?} callingCode\r\n * @param {object} metadata\r\n * @return {object} `{ countryCallingCode: string?, number: string }`.\r\n */\n\nexport default function extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(number, country, callingCode, metadata) {\n var countryCallingCode = country ? getCountryCallingCode(country, metadata) : callingCode;\n\n if (number.indexOf(countryCallingCode) === 0) {\n metadata = new Metadata(metadata);\n metadata.selectNumberingPlan(country, callingCode);\n var possibleShorterNumber = number.slice(countryCallingCode.length);\n\n var _extractNationalNumbe = extractNationalNumber(possibleShorterNumber, metadata),\n possibleShorterNationalNumber = _extractNationalNumbe.nationalNumber;\n\n var _extractNationalNumbe2 = extractNationalNumber(number, metadata),\n nationalNumber = _extractNationalNumbe2.nationalNumber; // If the number was not valid before but is valid now,\n // or if it was too long before, we consider the number\n // with the country calling code stripped to be a better result\n // and keep that instead.\n // For example, in Germany (+49), `49` is a valid area code,\n // so if a number starts with `49`, it could be both a valid\n // national German number or an international number without\n // a leading `+`.\n\n\n if (!matchesEntirely(nationalNumber, metadata.nationalNumberPattern()) && matchesEntirely(possibleShorterNationalNumber, metadata.nationalNumberPattern()) || checkNumberLength(nationalNumber, metadata) === 'TOO_LONG') {\n return {\n countryCallingCode: countryCallingCode,\n number: possibleShorterNumber\n };\n }\n }\n\n return {\n number: number\n };\n}\n","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport parse from './parse.js';\nexport default function parsePhoneNumberWithError(text, options, metadata) {\n return parse(text, _objectSpread(_objectSpread({}, options), {}, {\n v2: true\n }), metadata);\n}\n","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport parsePhoneNumberWithError from './parsePhoneNumberWithError_.js';\nimport ParseError from './ParseError.js';\nimport { isSupportedCountry } from './metadata.js';\nexport default function parsePhoneNumber(text, options, metadata) {\n // Validate `defaultCountry`.\n if (options && options.defaultCountry && !isSupportedCountry(options.defaultCountry, metadata)) {\n options = _objectSpread(_objectSpread({}, options), {}, {\n defaultCountry: undefined\n });\n } // Parse phone number.\n\n\n try {\n return parsePhoneNumberWithError(text, options, metadata);\n } catch (error) {\n /* istanbul ignore else */\n if (error instanceof ParseError) {//\n } else {\n throw error;\n }\n }\n}\n","import normalizeArguments from './normalizeArguments.js';\nimport parsePhoneNumber_ from './parsePhoneNumber_.js';\nexport default function parsePhoneNumber() {\n var _normalizeArguments = normalizeArguments(arguments),\n text = _normalizeArguments.text,\n options = _normalizeArguments.options,\n metadata = _normalizeArguments.metadata;\n\n return parsePhoneNumber_(text, options, metadata);\n}\n","<form [formGroup]=\"!fGroup ? phoneForm : fGroup\">\n <bw-input\n *ngIf=\"isProd\"\n [autoFocus]=\"autoFocus\"\n [label]=\"label\"\n [placeholder]=\"placeholder\"\n [formControlName]=\"fcName\"\n [disabled]='disabled'\n type=\"text\"\n inputMask=\"000-000-0000\"\n pattern=\"\\d{3}-\\d{3}-\\d{4}\"\n minlength=\"12\"\n maxlength=\"12\"\n [inputError]=\"inputError\"\n [inputErrorText]=\"inputErrorText\"\n >\n </bw-input>\n <bw-input\n *ngIf=\"!isProd\"\n [autoFocus]=\"autoFocus\"\n [label]=\"label\"\n [placeholder]=\"placeholder\"\n [formControlName]=\"fcName\"\n [disabled]='disabled'\n type=\"text\"\n inputMask=\"000-000-0000\"\n minlength=\"3\"\n maxlength=\"12\"\n [inputError]=\"inputError\"\n [inputErrorText]=\"inputErrorText\"\n >\n </bw-input>\n</form>\n","import { Component, Input, OnInit } from '@angular/core';\nimport { AbstractControl, FormControl, FormGroup, ValidatorFn, Validators } from '@angular/forms';\nimport { parsePhoneNumberFromString } from 'libphonenumber-js/mobile';\n\ndeclare global {\n interface Window {\n Cypress: any;\n }\n}\n\n@Component({\n selector: 'bw-phone-form',\n templateUrl: './phone-form.component.html',\n styleUrls: ['./phone-form.component.scss'],\n})\nexport class PhoneFormComponent implements OnInit {\n phoneForm: FormGroup;\n @Input() label: string;\n @Input() placeholder = '';\n @Input() fGroup: FormGroup;\n @Input() fcName = 'phone';\n /** Whether the input has an error in validation */\n @Input() inputError: boolean;\n /** Text that is shown below the input if there is a validation error */\n @Input() inputErrorText: string;\n @Input() autoFocus: boolean;\n @Input() disabled = false;\n @Input() isProd: boolean;\n\n prodPhoneControl = new FormControl('', [\n Validators.required,\n Validators.minLength(12),\n Validators.maxLength(12),\n Validators.pattern('\\\\d{3}-\\\\d{3}-\\\\d{4}'),\n phoneValidator(),\n ]);\n\n nonProdPhoneControl = new FormControl('', [\n Validators.required,\n Validators.minLength(3),\n Validators.maxLength(12),\n ]);\n\n constructor() {}\n\n ngOnInit() {\n if (this.isProd) {\n if (!this.fGroup) {\n this.phoneForm = new FormGroup({});\n this.phoneForm.addControl(\n this.fcName,\n this.prodPhoneControl\n );\n } else {\n this.fGroup.addControl(\n this.fcName,\n this.prodPhoneControl\n );\n }\n } else {\n if (!this.fGroup) {\n this.phoneForm = new FormGroup({});\n this.phoneForm.addControl(\n this.fcName,\n this.nonProdPhoneControl\n );\n } else {\n this.fGroup.addControl(\n this.fcName,\n this.nonProdPhoneControl\n );\n }\n }\n }\n}\n\n/**\n * right now this validates using US mobile # rules\n * if we need flexibility to validate a non-mobile # vs a mobile # we can add an input type and then import the proper parser\n * based on the type\n */\nexport const phoneValidator = (): ValidatorFn =>\n (control: AbstractControl): { [key: string]: any } | null => {\n //Check if we are during E2E testing\n if (window && window.Cypress) {\n return null;\n }\n\n const phone = parsePhoneNumberFromString(control.value, 'US');\n\n return phone && phone.isValid() ? null : { phoneFail: { value: control.value } };\n };\n\n","import withMetadataArgument from './withMetadataArgument.js'\r\nimport { default as _parsePhoneNumber } from '../../core/index.js'\r\n\r\nexport function parsePhoneNumber() {\r\n\treturn withMetadataArgument(_parsePhoneNumber, arguments)\r\n}","// Importing from a \".js\" file is a workaround for Node.js \"ES Modules\"\r\n// importing system which is even uncapable of importing \"*.json\" files.\r\nimport metadata from '../../metadata.mobile.json.js'\r\n\r\nexport default function withMetadataArgument(func, _arguments) {\r\n\tvar args = Array.prototype.slice.call(_arguments)\r\n\targs.push(metadata)\r\n\treturn func.apply(this, args)\r\n}","//! moment.js locale configuration\n//! locale : Spanish [es]\n//! author : Julio Napurí : https://github.com/julionc\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsShortDot =\n 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(\n '_'\n ),\n monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n monthsParse = [\n /^ene/i,\n /^feb/i,\n /^mar/i,\n /^abr/i,\n /^may/i,\n /^jun/i,\n /^jul/i,\n /^ago/i,\n /^sep/i,\n /^oct/i,\n /^nov/i,\n /^dic/i,\n ],\n monthsRegex =\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n var es = moment.defineLocale('es', {\n months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(\n '_'\n ),\n monthsShort: function (m, format) {\n if (!m) {\n return monthsShortDot;\n } else if (/-MMM-/.test(format)) {\n return monthsShort[m.month()];\n } else {\n return monthsShortDot[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex:\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n monthsShortStrictRegex:\n /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY H:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',\n },\n calendar: {\n sameDay: function () {\n return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextDay: function () {\n return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextWeek: function () {\n return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastDay: function () {\n return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastWeek: function () {\n return (\n '[el] dddd [pasado a la' +\n (this.hours() !== 1 ? 's' : '') +\n '] LT'\n );\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'en %s',\n past: 'hace %s',\n s: 'unos segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'una hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n w: 'una semana',\n ww: '%d semanas',\n M: 'un mes',\n MM: '%d meses',\n y: 'un año',\n yy: '%d años',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n invalidDate: 'Fecha inválida',\n });\n\n return es;\n\n})));\n","<bw-spinner *ngIf=\"loading\"></bw-spinner>\n<!-- forms intro-->\n<bw-action-article\n *ngIf=\"false\"\n [brightsideWebFb]=\"{event_name: 'verify_identity_intro'}\"\n [minHeight]=\"minHeight\">\n <bw-back header-actions [emit]=\"true\" (back)=\"handleMainBack();\"></bw-back>\n\n <div header-title *ngIf=\"!hideDefaults\">\n <div class=\"flex-row space-between full-width\">\n <typography title-medium class=\"mr-md\" >\n {{ 'VERIFY_IDENTITY_INTRO_TITLE' | translate }}\n </typography>\n <bw-icon\n iconName=\"check_badge\" color=\"var(--brand)\" size=\"52\"\n backgroundColor=\"var(--bg-blue)\"\n ></bw-icon>\n </div>\n </div>\n <div content-section>\n <ng-container *ngIf=\"!hideDefaults\">\n <bw-paragraph color=\"var(--secondary-text)\">\n {{ 'VERIFY_IDENTITY_INTRO_DESC' | translate }}\n </bw-paragraph>\n <typography headline-regular class=\"mb-sm story-title\" >\n {{ 'VERIFY_IDENTITY_INTRO_SUBHEADER' | translate }}\n </typography>\n </ng-container>\n <ol>\n <ng-container *ngFor=\"let field of requiredForms\">\n <li *ngIf=\"field.display\">\n <typography section-copy>{{ field.titleKey | translate }}</typography>\n </li>\n </ng-container>\n </ol>\n </div>\n <div footer-actions class=\"flex-row space-center full-width\">\n <div>\n <button\n bw-button\n [processing]=\"processing\"\n (click)=\"stepThroughForms(1)\"\n [brightsideWebFb]=\"{event_name: 'verify_identity_intro'}\"\n >{{ 'BUTTON_CONTINUE' | translate }}</button>\n </div>\n </div>\n</bw-action-article>\n<!-- forms summary-->\n<bw-action-article\n *ngIf=\"requiredForms.length > 0 && showSummary\"\n [brightsideWebFb]=\"{event_name: 'verify_identity'}\"\n [minHeight]=\"minHeight\">\n <div header-actions>\n <ui-nav-exit-back\n *ngIf=\"showBackbutton\"\n [trackingDetail]=\"{ event_name: 'verify_identity' }\"\n [skipActionEmit]=\"true\"\n ></ui-nav-exit-back>\n </div>\n <div header-title *ngIf=\"!hideDefaults\">\n <div class=\"flex-row space-between full-width\">\n <typography title-medium class=\"mr-md\" >\n {{ 'VERIFY_IDENTITY_TITLE' | translate }}\n </typography>\n <bw-icon\n iconName=\"check_badge\" color=\"var(--brand)\" size=\"52\"\n backgroundColor=\"var(--bg-blue)\"\n ></bw-icon>\n </div>\n </div>\n <div content-section>\n <ng-container *ngIf=\"!hideDefaults\">\n <bw-paragraph color=\"var(--secondary-text)\" [ngSwitch]=\"productCode\">\n <ng-container *ngSwitchCase=\"'registration'\">\n {{ 'VERIFY_IDENTITY_DATA_COLLECT_DESC' | translate }}\n </ng-container>\n <ng-container *ngSwitchDefault>\n {{ 'VERIFY_IDENTITY_DESC' | translate }}\n </ng-container>\n </bw-paragraph>\n </ng-container>\n <div *ngFor=\"let field of requiredForms\">\n <bw-cell (clicked)=\"showForm(field, true)\"\n labelLeft=\" {{ field.controlConfig | genCellValue }}\"\n labelSubLeft=\"{{ field.titleKey | translate }}\"\n [flipLeftLabels]=\"true\" iconNameRight=\"chevron_right\">\n\n </bw-cell>\n </div>\n </div>\n <div footer-top class=\"flex-row space-center\">\n <form [formGroup]=\"confirmDataForm\">\n <bw-checkbox [formControlName]=\"'confirmCheckbox'\">\n <typography text-medium color=\"var(--primary-text)\">\n {{ 'VERIFY_IDENTITY_CONFIRM' | translate }}\n </typography>\n </bw-checkbox>\n </form>\n </div>\n <div footer-actions class=\"flex-row space-center full-width\">\n <div>\n <button\n bw-button\n [processing]=\"processing\"\n [disabled]=\"confirmDataForm.invalid\"\n (click)=\"submitInfo()\"\n [brightsideWebFb]=\"{event_name: 'verify_identity'}\"\n >{{ 'BUTTON_CONTINUE' | translate }}</button>\n </div>\n </div>\n\n</bw-action-article>\n<!-- forms template-->\n<bw-action-article\n *ngIf=\"formIsReady\"\n [brightsideWebFb]=\"{event_name: pageCopy[activeFieldName].eventName}\"\n [minHeight]=\"minHeight\">\n <bw-back header-actions\n [emit]=\"true\"\n (back)=\"stepThroughForms(-1)\"></bw-back>\n <div header-title *ngIf=\"!hideDefaults\">\n <div class=\"flex-row space-between full-width\">\n <typography title-medium class=\"mr-md\" >\n {{ pageCopy[activeFieldName].titleKey | translate }}\n </typography>\n </div>\n </div>\n <div content-section>\n <bw-paragraph color=\"var(--secondary-text)\" *ngIf=\"!hideDefaults\">\n {{ pageCopy[activeFieldName].bodyKey | translate }}\n </bw-paragraph>\n <form [formGroup]=\"eligibilityForm\" (submit)=\"updateInfo();\">\n <div\n *ngFor=\"let controlConfig of formControls; let i = index;\">\n\n <ng-container [ngSwitch]=\"controlConfig.key\">\n <bw-input\n *ngSwitchCase=\"'annualSalary'\"\n [isCustomControl]=\"true\"\n [label]=\"controlConfig.labelKey | translate\"\n [inputError]=\"controlConfig.control.invalid &&\n (\n controlConfig.control[controlConfig.inputOptions?.beginValidationOn] ?\n controlConfig.control[controlConfig.inputOptions?.beginValidationOn] : controlConfig.control.touched\n ) &&\n controlConfig.errorTextKey !== ''\"\n [inputErrorText]=\"controlConfig.errorTextKey | translate\"\n [hasInfo]=\"controlConfig.showInfo\"\n (emitInfoClicked)=\"displayInfo(controlConfig)\"\n [isFocused]=\"controlConfig.hasFocus\"\n [inputHintText]=\"(controlConfig.inputOptions?.inputHintTextKey | translate) ?? ''\"\n [showSuffixIcon]=\"!!controlConfig.inputOptions?.suffixIconName\"\n [suffixIconName]=\"controlConfig.inputOptions?.suffixIconName ?? ''\"\n >\n <input\n [formControlName]=\"controlConfig.key\"\n inputmode=\"decimal\"\n currencyMask\n [options]=\"currencyOptions\"\n label=\"{{controlConfig.labelKey | translate}}\"\n [autofocus]=\"i===0\"\n (focus)=\"controlConfig.hasFocus = true;\"\n (blur)=\"controlConfig.hasFocus = false;\"\n />\n </bw-input>\n <bw-input\n *ngSwitchCase=\"'fullSSN'\"\n [label]=\"controlConfig.labelKey | translate\"\n placeholder=\"{{ 'SSN_HINT' | translate }}\"\n [formControlName]=\"controlConfig.key\"\n inputMask=\"000-00-0000\"\n [inputError]=\"controlConfig.control.invalid &&\n (\n controlConfig.control[controlConfig.inputOptions?.beginValidationOn] ?\n controlConfig.control[controlConfig.inputOptions?.beginValidationOn] : controlConfig.control.touched\n ) &&\n controlConfig.errorTextKey !== ''\"\n [inputErrorText]=\"controlConfig.errorTextKey | translate\"\n maxlength=\"11\"\n minlength=\"11\"\n [autoFocus]=\"true\"\n [inputHintText]=\"(controlConfig.inputOptions?.inputHintTextKey | translate) ?? ''\"\n [showSuffixIcon]=\"!!controlConfig.inputOptions?.suffixIconName\"\n [suffixIconName]=\"controlConfig.inputOptions?.suffixIconName ?? ''\"\n ></bw-input>\n <bw-input\n *ngSwitchDefault\n [isCustomControl]=\"true\"\n [label]=\"controlConfig.labelKey | translate\"\n [inputError]=\"controlConfig.control.invalid &&\n (\n controlConfig.control[controlConfig.inputOptions?.beginValidationOn] ?\n controlConfig.control[controlConfig.inputOptions?.beginValidationOn] : controlConfig.control.touched\n ) &&\n controlConfig.errorTextKey !== ''\"\n [inputErrorText]=\"controlConfig.errorTextKey | translate\"\n [hasInfo]=\"controlConfig.showInfo\"\n (emitInfoClicked)=\"displayInfo(controlConfig)\"\n [isFocused]=\"controlConfig.hasFocus\"\n [inputHintText]=\"(controlConfig.inputOptions?.inputHintTextKey | translate) ?? ''\"\n [showSuffixIcon]=\"!!controlConfig.inputOptions?.suffixIconName\"\n [suffixIconName]=\"controlConfig.inputOptions?.suffixIconName ?? ''\"\n >\n <input\n [formControlName]=\"controlConfig.key\"\n label=\"{{controlConfig.labelKey | translate}}\"\n pattern=\"{{controlConfig.inputOptions?.pattern}}\"\n minlength=\"{{controlConfig.inputOptions?.minlength}}\"\n maxlength=\"{{controlConfig.inputOptions?.maxlength}}\"\n type=\"{{controlConfig.type}}\"\n [autofocus]=\"i===0\"\n (focus)=\"controlConfig.hasFocus = true;\"\n (blur)=\"controlConfig.hasFocus = false;\"\n />\n </bw-input>\n </ng-container>\n\n </div>\n\n <button\n type=\"submit\"\n hidden\n [disabled]=\"eligibilityForm.invalid\"\n [brightsideWebFb]=\"{event_name: pageCopy[activeFieldName].eventName}\">\n </button>\n </form>\n </div>\n <div footer-actions class=\"flex-row space-center full-width\">\n <div>\n <button\n bw-button\n (click)=\"updateInfo()\"\n [disabled]=\"eligibilityForm.invalid\"\n [brightsideWebFb]=\"{event_name: pageCopy[activeFieldName].eventName}\"\n >{{ 'BUTTON_CONTINUE' | translate }}</button>\n </div>\n </div>\n</bw-action-article>\n\n\n<bw-modal\n *ngIf=\"showErrorModal\"\n (closeModal)=\"closeErrorModal();\"\n [brightsideWebFb]=\"{event_name: 'error_shown', custom: {'error id': displayedError.errorId }}\"\n [error_view]=\"true\">\n <typography title-medium color=\"var(--gray-70)\">\n {{ displayedError.errorTitleKey | translate }}\n </typography>\n <section class=\"body\">\n <bw-paragraph [textStyle]=\"'Body2'\" color=\"var(--gray-50)\">\n <div [innerHTML]=\"displayedError.errorDescKey | translate\"></div>\n </bw-paragraph>\n </section>\n <footer class=\"footer\">\n <div class=\"flex-row row-reverse\">\n <button\n bw-button\n (click)=\"closeErrorModal();\">\n {{ displayedError.ctaKey | translate }}\n </button>\n </div>\n </footer>\n</bw-modal>\n","import {Component, OnInit, Input, Output, EventEmitter} from '@angular/core';\nimport {Subscription} from \"rxjs\";\nimport {\n EligibilityFieldsObject,\n FirebaseService, ProdEligReqFieldsInterface,\n ProductEligibilityService,\n nonRequiredProductFields\n} from \"@brightside-web/desktop/data-access/shared\";\nimport {ActivatedRoute, Router} from \"@angular/router\";\nimport {\n CONTROL_ADDRESS_CITY,\n CONTROL_ADDRESS_STATE,\n CONTROL_DOB,\n CONTROL_FNAME,\n CONTROL_LNAME,\n CONTROL_MNAME,\n CONTROL_SALARY,\n CONTROL_SSN,\n CONTROL_STREET_ADDRESS_LINE_ONE,\n CONTROL_STREET_ADDRESS_LINE_TWO,\n CONTROL_ZIP,\n DisplayFormControlConfig,\n} from \"@brightside-web/shared/desktop\";\nimport {FormControl, FormGroup, NG_VALIDATORS, NG_VALUE_ACCESSOR, Validators} from \"@angular/forms\";\nimport { Title } from \"@angular/platform-browser\";\nimport {RegistrationService} from \"@brightside-web/desktop/data-access/onboarding\";\nimport {RoutingStateService} from \"@brightside/brightside-ui-services\";\nimport {ngxMaskOptions} from \"@brightside/brightside-ui\";\nimport {CurrencyMaskInputMode} from \"ngx-currency\";\n\ninterface RequiredFormsInterface {\n name: string;\n controlConfig: ConfigEligType[];\n itemOrder: FormItemOrderEnum;\n completed?: boolean;\n submitted?: boolean;\n titleKey?: string;\n display?: boolean;\n}\n\ninterface PageCopyInterface {\n full_ssn: PageCopyContentInterface;\n full_name: PageCopyContentInterface;\n date_of_birth: PageCopyContentInterface;\n auto_address: PageCopyContentInterface;\n self_reported_salary: PageCopyContentInterface;\n}\n\ninterface PageCopyContentInterface {\n titleKey: string;\n bodyKey: string;\n eventName: string;\n}\n\nenum FormItemOrderEnum {\n full_ssn = 1,\n full_name = 2,\n date_of_birth = 3,\n auto_address = 4,\n self_reported_salary = 5\n}\n\nenum TitleKeyEnum {\n full_ssn = 'SOCIAL_SECURITY_NUMBER',\n full_name = 'FULL_NAME',\n date_of_birth = 'DATE_OF_BIRTH',\n auto_address = 'HOME_ADDRESS',\n self_reported_salary = 'ANNUAL_INCOME'\n}\n\nexport type ConfigEligType = DisplayFormControlConfig & EligibilityFieldsObject;\n@Component({\n selector: 'brightside-web-product-eligibility',\n templateUrl: './product-eligibility.component.html',\n styleUrls: ['./product-eligibility.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n multi:true,\n useExisting: ProductEligibilityComponent\n },\n {\n provide: NG_VALIDATORS,\n multi: true,\n useExisting: ProductEligibilityComponent\n }\n ]\n})\nexport class ProductEligibilityComponent implements OnInit {\n\n @Input() productCode: string;\n @Input() showBackbutton = false;\n @Input() ignoreFields: string[] = [];\n @Input() hideDefaults = false;\n @Input() minHeight = 576;\n @Output() successfulSubmit: EventEmitter<string> = new EventEmitter<string>();\n currencyOptions = {\n ...ngxMaskOptions,\n }\n loading = true;\n\n sub = new Subscription();\n\n eligibilityFields: unknown[] = [];\n\n EligibilityToControls : { [key: string]: DisplayFormControlConfig }= {\n date_of_birth: CONTROL_DOB,\n full_ssn: CONTROL_SSN,\n address1: CONTROL_STREET_ADDRESS_LINE_ONE,\n address2: CONTROL_STREET_ADDRESS_LINE_TWO,\n city: CONTROL_ADDRESS_CITY,\n state: CONTROL_ADDRESS_STATE,\n zip_code: CONTROL_ZIP,\n first_name: CONTROL_FNAME,\n middle_name: CONTROL_MNAME,\n last_name: CONTROL_LNAME,\n self_reported_salary: CONTROL_SALARY\n };\n\n activeFieldName: string;\n\n pageCopy: PageCopyInterface = {\n full_ssn: {\n titleKey: 'SOCIAL_SECURITY_NUMBER',\n bodyKey: 'VERIFY_IDENTITY_DESC',\n eventName: 'social security collect'\n },\n full_name: {\n titleKey: 'FULL_NAME',\n bodyKey: 'FULL_NAME_COLLECT_DESC',\n eventName: 'full name collect'\n },\n date_of_birth: {\n titleKey: 'DATE_OF_BIRTH',\n bodyKey: 'DATE_OF_BIRTH_DESC',\n eventName: 'date of birth collect'\n },\n auto_address: {\n titleKey: 'HOME_ADDRESS',\n bodyKey: 'ADDRESS_SELECT_DESC',\n eventName: 'home address collect'\n },\n self_reported_salary: {\n titleKey: 'VERIFY_IDENTITY_SALARY_TITLE',\n bodyKey: '',\n eventName: 'self reported salary collect'\n }\n }\n\n requiredForms : RequiredFormsInterface[] = [];\n fieldsForDisplay : RequiredFormsInterface[];\n formControls: ConfigEligType[] = [];\n eligibilityFormControls: FormControl[] = [];\n eligibilityForm: FormGroup;\n\n showErrorModal: boolean;\n disableSubmit: boolean;\n formIsReady: boolean;\n processing = false;\n showIntro = false;\n showSummary: boolean;\n goingBackCalled = false;\n activeFormIndex = -1;\n numberOfFormsToDisplay = 0;\n hasAlreadyCompleted: boolean;\n\n processError = {\n errorId: 'identity',\n errorTitleKey: 'PROCESS_ERROR_TITLE',\n errorDescKey: 'ERROR_GENERAL_DESC',\n ctaKey: 'OK'\n }\n\n ssnMismatchError = {\n errorId: 'ssn mismatch',\n errorTitleKey: 'ERROR_SSN_MISMATCH_TITLE',\n errorDescKey: 'ERROR_SSN_MISMATCH_DESC',\n ctaKey: 'TRY_AGAIN'\n }\n\n displayedError = this.processError;\n\n confirmDataForm: FormGroup = new FormGroup({\n confirmCheckbox: new FormControl('', Validators.requiredTrue)\n });\n\n submissionObject: { [key: string]: string } = {}\n private displayedMissingForm: boolean;\n\n constructor(\n private prodElgSvc: ProductEligibilityService,\n private route: ActivatedRoute,\n private router: Router,\n private title: Title,\n private analytics: FirebaseService,\n private clientSvc: RegistrationService,\n private routingState:RoutingStateService) {}\n\n ngOnInit(): void {\n if (!this.productCode) {\n // we're assuming this is being used directly in a route\n this.sub.add(\n this.route.params.subscribe(\n params => {\n this.title.setTitle('Brightside | Identity Verification');\n this.productCode = params['product'];\n if (this.productCode) this.getProductEligibilityRequirements();\n }\n )\n );\n } else {\n this.getProductEligibilityRequirements();\n }\n\n this.currencyOptions = {\n ...ngxMaskOptions,\n precision: 2,\n prefix: '$',\n allowNegative: false,\n align: 'left',\n nullable: true,\n inputMode: CurrencyMaskInputMode.NATURAL, //Use '.FINANCIAL' for cash register type entry\n }\n\n }\n\n getProductEligibilityRequirements() {\n this.sub.add(\n this.prodElgSvc.getProductEligibility().subscribe(\n response => {\n if (response.products) {\n const productFields = response.products.find(product => product.name.toLowerCase() === this.productCode.toLowerCase());\n if (productFields) {\n const reqFields = productFields.required_fields;\n reqFields?.forEach(field => {\n this.handleRequiredFormCreation(field);\n });\n\n this.requiredForms = this.requiredForms.sort((a, b) => {\n if (a.itemOrder < b.itemOrder) {\n return -1;\n }\n if (a.itemOrder > b.itemOrder) {\n return 1;\n }\n return 0;\n });\n // summary is still reliant on the above finishing before display\n if (this.numberOfFormsToDisplay === 0){\n this.hasAlreadyCompleted = true;\n this.displaySummary();\n }\n this.setUpSubmissionForm();\n } else {\n this.router.navigate(['/']);\n }\n }\n }\n )\n )\n }\n\n handleRequiredFormCreation(field: ProdEligReqFieldsInterface) : void {\n const configArray: ConfigEligType[] = [];\n let tallyOfFieldsToDisplay = 0;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const itemOrderEnum = FormItemOrderEnum[field.name];\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const titleKey = TitleKeyEnum[field.name];\n const reqFieldObj = {\n name: field.name,\n controlConfig: configArray,\n itemOrder: itemOrderEnum,\n titleKey: titleKey\n };\n\n if (field.sub_fields) {\n field.sub_fields.forEach(subField => {\n const subFieldControl = this.EligibilityToControls[subField.name];\n if (subFieldControl && !subField.not_replayable) {\n reqFieldObj.controlConfig.push(Object.assign(subFieldControl, subField));\n if (this.prodElgSvc.testReqValueForEmpty(subField)) {\n tallyOfFieldsToDisplay++;\n }\n }\n })\n } else if (field.api_parameter_name) {\n const control = this.EligibilityToControls[field.name];\n if (control && !field.not_replayable) {\n reqFieldObj.controlConfig.push(Object.assign(control, field));\n if (this.prodElgSvc.testReqValueForEmpty(field)) {\n tallyOfFieldsToDisplay++;\n }\n }\n }\n\n if (reqFieldObj.controlConfig.length !== 0) {\n const newReqField = reqFieldObj as RequiredFormsInterface;\n if (!this.ignoreFields.includes(newReqField.name)) {\n newReqField['display'] = tallyOfFieldsToDisplay > 0 ? true : false;\n this.numberOfFormsToDisplay = tallyOfFieldsToDisplay > 0 ? this.numberOfFormsToDisplay + 1 : this.numberOfFormsToDisplay;\n this.requiredForms.push(newReqField);\n }\n }\n }\n\n showForm(field: RequiredFormsInterface, isSummary = false) {\n if (isSummary) {\n this.activeFormIndex = this.requiredForms.length + 1;\n this.showSummary = false;\n }\n this.activeFieldName = field.name;\n this.formControls = field.controlConfig;\n this.setUpForm();\n }\n\n setUpSubmissionForm() {\n this.requiredForms.forEach( (control, index) => {\n control.controlConfig.forEach( controlConfig => {\n const startingValue = controlConfig.value ? controlConfig.value : '';\n this.confirmDataForm.addControl(controlConfig.key, controlConfig.control);\n this.confirmDataForm.get(controlConfig.key)?.setValue(startingValue);\n });\n if (this.numberOfFormsToDisplay > 0 && control.display && !this.displayedMissingForm) {\n // display the first missing fields form\n this.displayedMissingForm = true;\n this.activeFormIndex = index;\n this.showForm(this.requiredForms[index]);\n }\n });\n }\n\n setUpForm() {\n\n const controls: { [key: string]: FormControl } = {};\n\n if (this.formControls) {\n const formCopy = [...this.formControls];\n formCopy.forEach((controlConfig: DisplayFormControlConfig, index) => {\n controls[controlConfig.key] = controlConfig.control;\n if (formCopy[index].value !== 'middle') {\n controls[controlConfig.key].setValue(formCopy[index].value);\n } else {\n controls[controlConfig.key].setValue('');\n }\n });\n\n this.eligibilityForm = new FormGroup(controls);\n\n this.formIsReady = true;\n this.loading = false;\n }\n }\n\n // todo: add support for info icon\n displayInfo(controlConfig: DisplayFormControlConfig) {\n if (controlConfig.inputInfo) {\n // this.displayModal = controlConfig.inputInfo;\n // this.showInfoModal = true;\n }\n }\n\n updateInfo() {\n for (const field of this.formControls.values()) {\n field.value = field.control.value;\n const subFormControl = this.confirmDataForm.get(field.key);\n if (subFormControl) {\n subFormControl.setValue(field.value);\n }\n }\n this.stepThroughForms(1);\n }\n\n submitInfo() {\n this.analytics.logEvent('verify identity tapped')\n this.submissionObject = {};\n this.processing = true;\n\n this.requiredForms.forEach( field => {\n field.controlConfig.forEach( control => {\n if (control.api_parameter_name === 'self_reported_salary' && control.value) {\n this.submissionObject[control.api_parameter_name] = control.value.toString();\n } else {\n this.submissionObject[control.api_parameter_name] = control.value ? control.value : '';\n }\n });\n });\n\n this.sub.add(\n this.clientSvc.submitClientUpdate(this.submissionObject).subscribe(\n response => {\n if (response.statusCode === 200) {\n this.successfulSubmit.emit(this.prodElgSvc.getProductCodeRedirect(this.productCode));\n } else {\n this.displayedError = this.processError;\n this.showErrorModal = true;\n }\n },\n error => {\n if (error.response.data.error.code === 'SSN_MISMATCH') {\n this.displayedError = this.ssnMismatchError;\n } else {\n this.displayedError = this.processError;\n }\n this.showErrorModal = true;\n }\n )\n )\n }\n\n closeErrorModal() {\n this.showErrorModal = false;\n this.processing = false;\n }\n\n stepThroughForms(direction: -1 | 1) {\n this.activeFormIndex = this.activeFormIndex + direction;\n if (this.activeFormIndex === -1) {\n this.routingState.goBack();\n } else if (this.activeFormIndex >= 0 && this.activeFormIndex < this.requiredForms.length) {\n const form = this.requiredForms[this.activeFormIndex];\n if (form.display) {\n this.showIntro = false;\n this.showSummary = false;\n this.showForm(this.requiredForms[this.activeFormIndex]);\n } else {\n this.stepThroughForms(direction);\n }\n } else if (this.activeFormIndex >= this.requiredForms.length) {\n this.displaySummary();\n }\n }\n\n displaySummary() {\n this.activeFormIndex = this.requiredForms.length;\n this.showIntro = false;\n this.formIsReady = false;\n this.showSummary = true;\n this.loading = false;\n }\n\n ngOnDestroy(): void {\n this.sub.unsubscribe();\n }\n\n handleMainBack() {\n if (this.routingState.history.includes('/onboarding')) {\n this.router.navigate(['/']);\n } else {\n this.routingState.goBack();\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { BsCacheService, AwsApiWrapperService } from '@brightside-web/desktop/data-access/core-services';\nimport { from, Observable, of, pipe, throwError } from 'rxjs';\nimport { catchError, retryWhen, take, delay, concatMap, tap } from 'rxjs/operators';\nimport * as Sentry from '@sentry/angular';\nimport * as moment from 'moment';\nimport { FirebaseService } from '@brightside-web/desktop/data-access/shared';\nimport { Environment } from '@micro-core/environment';\nimport { HttpErrorResponse } from '@angular/common/http';\n\nexport interface GenericResponseResult {\n result: GenericResponseResultItems;\n}\n\nexport interface GenericResponseResultItems {\n status: number;\n code: string;\n message: string;\n suggestion: string;\n suggestionCopyKey: string;\n docs: string;\n}\n\nexport enum GenericResponseCode {\n SERVICE_OK = 'SERVICE_OK',\n MISSING_REQ_FIELD = 'MISSING_REQ_FIELD',\n INVALID_FIELD = 'INVALID_FIELD',\n SERVICE_ERROR = 'SERVICE_ERROR',\n}\n\nexport interface APIOptionsInterface {\n errorCallback?(error: unknown): unknown;\n retryCount?: number;\n cache?: boolean;\n}\n\nabstract class APIWrapperClass {\n constructor(protected amplitude: FirebaseService, protected env: Environment, protected awsAPIWrapper: AwsApiWrapperService) {}\n\n defaultRetryCount = 3;\n\n protected _apiGet<T>(\n apiName: string,\n path: string,\n init: any,\n options?: APIOptionsInterface\n ): Observable<T & GenericResponseResult> {\n const initBody = init ? { body: { ...init } } : {};\n return from(this.awsAPIWrapper.get(apiName, path, initBody)).pipe(this._apiPipe<T>(apiName, path, init, 'get', options));\n }\n\n protected _apiPost<T>(\n apiName: string,\n path: string,\n init: any,\n options?: APIOptionsInterface\n ): Observable<T & GenericResponseResult> {\n const initBody = init ? { body: { ...init } } : {};\n return from(this.awsAPIWrapper.post(apiName, path, initBody)).pipe(this._apiPipe<T>(apiName, path, init, 'post', options));\n }\n\n protected _apiPatch<T>(\n apiName: string,\n path: string,\n init: any,\n options?: APIOptionsInterface\n ): Observable<T & GenericResponseResult> {\n const initBody = init ? { body: { ...init } } : {};\n return from(this.awsAPIWrapper.patch(apiName, path, initBody)).pipe(this._apiPipe<T>(apiName, path, init, 'patch', options));\n }\n\n protected _apiPut<T>(\n apiName: string,\n path: string,\n init: any,\n options?: APIOptionsInterface\n ): Observable<T & GenericResponseResult> {\n const initBody = init ? { body: { ...init } } : {};\n return from(this.awsAPIWrapper.put(apiName, path, initBody)).pipe(this._apiPipe<T>(apiName, path, init, 'put', options));\n }\n\n protected _apiDel<T>(\n apiName: string,\n path: string,\n init: any,\n options?: APIOptionsInterface\n ): Observable<T & GenericResponseResult> {\n const initBody = init ? { body: { ...init } } : {};\n return from(this.awsAPIWrapper.del(apiName, path, initBody)).pipe(this._apiPipe<T>(apiName, path, init, 'del', options));\n }\n\n _apiPipe<T>(apiName: string, path: string, init: any, callType: string, options?: APIOptionsInterface) {\n return pipe(\n retryWhen((errors) =>\n errors.pipe(\n delay(500),\n take(options?.retryCount ?? this.defaultRetryCount),\n concatMap((error) => throwError(error))\n )\n ),\n tap<T & GenericResponseResult>((response) => {\n const result = response.result;\n\n // catching status of 403 if the HttpResponse is still a 200\n if (result.status === 403 &&\n result.message === this.awsAPIWrapper.unauthMsg\n ) {\n this.awsAPIWrapper.forceLogout();\n }\n\n this.amplitude.logEvent(\n 'api call completed',\n {\n reason_code: result.code,\n message: result.message,\n status: result.status,\n type: callType,\n url: `${this.env.awsmobile.endpoints['api-mobile'].endpoint}${path}`,\n },\n true,\n 100\n );\n }),\n catchError((error) => this._APIErrorHandler(apiName, path, init, error, callType, options))\n );\n }\n\n _APIErrorHandler = (\n apiName: string,\n path: string,\n init: any,\n error: unknown,\n callType: string,\n options?: APIOptionsInterface | undefined,\n ): Observable<any> => {\n\n const errorAs = error as GenericResponseResult & HttpErrorResponse;\n\n if (path.includes('financialsnapshot')) {\n try {\n console.log('fs api call failed');\n this.amplitude.logEvent(\n 'fs api call failed',\n {\n error: JSON.stringify(error),\n type: callType,\n url: `${this.env.awsmobile.endpoints['api-mobile'].endpoint}${path}`,\n },\n true,\n 100\n );\n } catch (e) {}\n }\n\n // todo: update w/ core error logger when it is completed\n if (!this.env.production) console.log('APIErrorHandler: logging error');\n Sentry.withScope(function (scope) {\n scope.setFingerprint([`url: ${path}`, `request body: ${JSON.stringify(init)}`, `method: ${callType}`]);\n if (error instanceof Error) {\n Sentry.captureException(error);\n } else {\n try {\n // Convert or log non-Error objects\n const convertedError = new Error(JSON.stringify(error));\n Sentry.captureException(convertedError);\n } catch (er) {\n Sentry.captureException(er);\n }\n }\n });\n\n // unsure how the error is coming down from the service, catching for an HttpErrorResponse or our\n // own GenericResponseResult\n if (\n (errorAs.status &&\n errorAs.status === 403 &&\n errorAs.message === this.awsAPIWrapper.unauthMsg) ||\n (errorAs.result?.status === 403 &&\n errorAs.result?.message === this.awsAPIWrapper.unauthMsg)\n ) {\n this.awsAPIWrapper.forceLogout();\n }\n\n if (options?.errorCallback) {\n options.errorCallback(error);\n return of([]);\n } else {\n return throwError(error);\n }\n };\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class BsApiService extends APIWrapperClass {\n constructor(\n protected override amplitude: FirebaseService,\n protected override env: Environment,\n protected override awsAPIWrapper: AwsApiWrapperService,\n private bsCacheService: BsCacheService\n ) {\n super(amplitude, env, awsAPIWrapper);\n }\n\n get<T>(apiName: string, path: string, init?: any, options?: APIOptionsInterface): Observable<T & GenericResponseResult> {\n // if (options?.cache) {\n // const cached = this.bsCacheService.getItem(path);\n // if (cached) {\n // return of(cached);\n // } else {\n // return this._apiGet<T>(apiName, path, init, options).pipe(\n // tap((response) => {\n // Cache.setItem(path, response, {expires: moment().add(30, 'seconds').valueOf()})\n // })\n // );\n // }\n // } else {\n return this._apiGet<T>(apiName, path, init, options);\n // }\n }\n post<T>(apiName: string, path: string, init?: any, options?: APIOptionsInterface): Observable<T & GenericResponseResult> {\n return this._apiPost<T>(apiName, path, init, options);\n }\n patch<T>(apiName: string, path: string, init?: any, options?: APIOptionsInterface): Observable<T & GenericResponseResult> {\n return this._apiPatch<T>(apiName, path, init, options);\n }\n put<T>(apiName: string, path: string, init?: any, options?: APIOptionsInterface): Observable<T & GenericResponseResult> {\n return this._apiPut<T>(apiName, path, init, options);\n }\n del<T>(apiName: string, path: string, init?: any, options?: APIOptionsInterface): Observable<T & GenericResponseResult> {\n return this._apiDel<T>(apiName, path, init, options);\n }\n}\n","import { createErrorClass } from './createErrorClass';\nexport const EmptyError = createErrorClass((_super) => function EmptyErrorImpl() {\n _super(this);\n this.name = 'EmptyError';\n this.message = 'no elements in sequence';\n});\n","import { Injectable, ɵɵdefineInjectable, Pipe, EventEmitter, Component, forwardRef, ChangeDetectorRef, ElementRef, Input, Output, ViewChildren, HostListener, NgModule } from '@angular/core';\nimport { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\n\n/**\n * @fileoverview added by tsickle\n * Generated from: lib/ngx-select-dropdown.service.ts\n * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nimport * as ɵngcc0 from '@angular/core';\nimport * as ɵngcc1 from '@angular/common';\nimport * as ɵngcc2 from '@angular/forms';\n\nconst _c0 = [\"availableOption\"];\nconst _c1 = function (a0) { return { active: a0 }; };\nfunction NgxSelectDropdownComponent_div_5_div_1_Template(rf, ctx) { if (rf & 1) {\n const _r7 = ɵngcc0.ɵɵgetCurrentView();\n ɵngcc0.ɵɵelementStart(0, \"div\", 12)(1, \"input\", 13);\n ɵngcc0.ɵɵlistener(\"change\", function NgxSelectDropdownComponent_div_5_div_1_Template_input_change_1_listener($event) { ɵngcc0.ɵɵrestoreView(_r7); const ctx_r6 = ɵngcc0.ɵɵnextContext(2); return ɵngcc0.ɵɵresetView(ctx_r6.changeSearchText($event)); })(\"input\", function NgxSelectDropdownComponent_div_5_div_1_Template_input_input_1_listener() { ɵngcc0.ɵɵrestoreView(_r7); const ctx_r8 = ɵngcc0.ɵɵnextContext(2); return ɵngcc0.ɵɵresetView(ctx_r8.searchTextChanged()); })(\"ngModelChange\", function NgxSelectDropdownComponent_div_5_div_1_Template_input_ngModelChange_1_listener($event) { ɵngcc0.ɵɵrestoreView(_r7); const ctx_r9 = ɵngcc0.ɵɵnextContext(2); return ɵngcc0.ɵɵresetView(ctx_r9.searchText = $event); });\n ɵngcc0.ɵɵelementEnd();\n ɵngcc0.ɵɵelementStart(2, \"label\", 14);\n ɵngcc0.ɵɵelement(3, \"span\", 15);\n ɵngcc0.ɵɵtext(4);\n ɵngcc0.ɵɵelementEnd()();\n} if (rf & 2) {\n const ctx_r1 = ɵngcc0.ɵɵnextContext(2);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵstyleProp(\"direction\", ctx_r1.config.inputDirection);\n ɵngcc0.ɵɵproperty(\"ngModel\", ctx_r1.searchText);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngClass\", ɵngcc0.ɵɵpureFunction1(5, _c1, ctx_r1.searchText));\n ɵngcc0.ɵɵadvance(2);\n ɵngcc0.ɵɵtextInterpolate1(\" \", ctx_r1.config.searchPlaceholder, \"\");\n} }\nfunction NgxSelectDropdownComponent_div_5_li_3_Template(rf, ctx) { if (rf & 1) {\n const _r13 = ɵngcc0.ɵɵgetCurrentView();\n ɵngcc0.ɵɵelementStart(0, \"li\", 16);\n ɵngcc0.ɵɵlistener(\"click\", function NgxSelectDropdownComponent_div_5_li_3_Template_li_click_0_listener() { const restoredCtx = ɵngcc0.ɵɵrestoreView(_r13); const selected_r10 = restoredCtx.$implicit; const i_r11 = restoredCtx.index; const ctx_r12 = ɵngcc0.ɵɵnextContext(2); return ɵngcc0.ɵɵresetView(ctx_r12.deselectItem(selected_r10, i_r11)); });\n ɵngcc0.ɵɵelementStart(1, \"span\", 17);\n ɵngcc0.ɵɵtext(2, \"x\");\n ɵngcc0.ɵɵelementEnd();\n ɵngcc0.ɵɵelementStart(3, \"span\");\n ɵngcc0.ɵɵtext(4);\n ɵngcc0.ɵɵelementEnd()();\n} if (rf & 2) {\n const selected_r10 = ctx.$implicit;\n const ctx_r2 = ɵngcc0.ɵɵnextContext(2);\n ɵngcc0.ɵɵadvance(4);\n ɵngcc0.ɵɵtextInterpolate1(\" \", ctx_r2.config.displayFn ? ctx_r2.config.displayFn(selected_r10) : selected_r10[ctx_r2.config.displayKey] || selected_r10, \" \");\n} }\nfunction NgxSelectDropdownComponent_div_5_hr_4_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelement(0, \"hr\");\n} }\nconst _c2 = function (a0, a1) { return { active: a0, disabled: a1 }; };\nfunction NgxSelectDropdownComponent_div_5_li_6_Template(rf, ctx) { if (rf & 1) {\n const _r18 = ɵngcc0.ɵɵgetCurrentView();\n ɵngcc0.ɵɵelementStart(0, \"li\", 18, 19);\n ɵngcc0.ɵɵlistener(\"click\", function NgxSelectDropdownComponent_div_5_li_6_Template_li_click_0_listener() { const restoredCtx = ɵngcc0.ɵɵrestoreView(_r18); const item_r14 = restoredCtx.$implicit; const i_r15 = restoredCtx.index; const ctx_r17 = ɵngcc0.ɵɵnextContext(2); return ɵngcc0.ɵɵresetView(ctx_r17.selectItem(item_r14, i_r15)); });\n ɵngcc0.ɵɵtext(2);\n ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n const item_r14 = ctx.$implicit;\n const i_r15 = ctx.index;\n const ctx_r4 = ɵngcc0.ɵɵnextContext(2);\n ɵngcc0.ɵɵproperty(\"ngClass\", ɵngcc0.ɵɵpureFunction2(2, _c2, ctx_r4.focusedItemIndex == i_r15 && !item_r14.disabled, item_r14.disabled));\n ɵngcc0.ɵɵadvance(2);\n ɵngcc0.ɵɵtextInterpolate1(\" \", ctx_r4.config.displayFn ? ctx_r4.config.displayFn(item_r14) : item_r14[ctx_r4.config.displayKey] || item_r14, \" \");\n} }\nfunction NgxSelectDropdownComponent_div_5_li_9_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelementStart(0, \"li\");\n ɵngcc0.ɵɵtext(1);\n ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n const ctx_r5 = ɵngcc0.ɵɵnextContext(2);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵtextInterpolate(ctx_r5.config.noResultsFound);\n} }\nfunction NgxSelectDropdownComponent_div_5_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelementStart(0, \"div\", 5);\n ɵngcc0.ɵɵtemplate(1, NgxSelectDropdownComponent_div_5_div_1_Template, 5, 7, \"div\", 6);\n ɵngcc0.ɵɵelementStart(2, \"ul\", 7);\n ɵngcc0.ɵɵtemplate(3, NgxSelectDropdownComponent_div_5_li_3_Template, 5, 1, \"li\", 8);\n ɵngcc0.ɵɵelementEnd();\n ɵngcc0.ɵɵtemplate(4, NgxSelectDropdownComponent_div_5_hr_4_Template, 1, 0, \"hr\", 9);\n ɵngcc0.ɵɵelementStart(5, \"ul\", 10);\n ɵngcc0.ɵɵtemplate(6, NgxSelectDropdownComponent_div_5_li_6_Template, 3, 5, \"li\", 11);\n ɵngcc0.ɵɵpipe(7, \"limitTo\");\n ɵngcc0.ɵɵpipe(8, \"filterBy\");\n ɵngcc0.ɵɵtemplate(9, NgxSelectDropdownComponent_div_5_li_9_Template, 2, 1, \"li\", 9);\n ɵngcc0.ɵɵelementEnd()();\n} if (rf & 2) {\n const ctx_r0 = ɵngcc0.ɵɵnextContext();\n ɵngcc0.ɵɵstyleProp(\"max-height\", ctx_r0.config.height);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx_r0.config.search);\n ɵngcc0.ɵɵadvance(2);\n ɵngcc0.ɵɵproperty(\"ngForOf\", ctx_r0.selectedItems);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx_r0.selectedItems.length > 0 && ctx_r0.availableItems.length > 0);\n ɵngcc0.ɵɵadvance(2);\n ɵngcc0.ɵɵproperty(\"ngForOf\", ɵngcc0.ɵɵpipeBind2(7, 7, ɵngcc0.ɵɵpipeBind3(8, 10, ctx_r0.availableItems, ctx_r0.searchText, ctx_r0.config.searchOnKey), ctx_r0.config.limitTo));\n ɵngcc0.ɵɵadvance(3);\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx_r0.showNotFound);\n} }\nconst _c3 = function (a0) { return { \"ngx-disabled\": a0 }; };\nclass SelectDropDownService {\n constructor() {\n // constructor\n this._isOpen = false;\n }\n /**\n * @return {?}\n */\n get isOpen() {\n return this._isOpen;\n }\n}\nSelectDropDownService.ɵfac = function SelectDropDownService_Factory(t) { return new (t || SelectDropDownService)(); };\n/** @nocollapse */\nSelectDropDownService.ctorParameters = () => [];\n/** @nocollapse */ SelectDropDownService.ɵprov = ɵɵdefineInjectable({ factory: function SelectDropDownService_Factory() { return new SelectDropDownService(); }, token: SelectDropDownService, providedIn: \"root\" });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(SelectDropDownService, [{\n type: Injectable,\n args: [{\n providedIn: \"root\"\n }]\n }], function () { return []; }, null); })();\nif (false) {\n /**\n * @type {?}\n * @private\n */\n SelectDropDownService.prototype._isOpen;\n}\n\n/**\n * @fileoverview added by tsickle\n * Generated from: lib/pipes/filter-by.pipe.ts\n * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * filters an array based on searctext\n */\nclass FilterByPipe {\n /**\n * @param {?} array\n * @param {?=} searchText\n * @param {?=} keyName\n * @return {?}\n */\n transform(array, searchText, keyName) {\n if (!array || !searchText || !Array.isArray(array)) {\n return array;\n }\n if (typeof array[0] === 'string') {\n return array.filter((/**\n * @param {?} item\n * @return {?}\n */\n (item) => item.toLowerCase().indexOf(searchText.toLowerCase()) > -1));\n }\n // filter array, items which match and return true will be\n // kept, false will be filtered out\n if (!keyName) {\n return array.filter((/**\n * @param {?} item\n * @return {?}\n */\n (item) => {\n for (const key in item) {\n if (typeof item[key] !== 'object' && item[key].toString().toLowerCase().indexOf(searchText.toLowerCase()) > -1) {\n return true;\n }\n }\n return false;\n }));\n }\n else {\n return array.filter((/**\n * @param {?} item\n * @return {?}\n */\n (item) => {\n if (typeof item[keyName] !== 'object' && item[keyName].toString().toLowerCase().indexOf(searchText.toLowerCase()) > -1) {\n return true;\n }\n return false;\n }));\n }\n }\n}\nFilterByPipe.ɵfac = function FilterByPipe_Factory(t) { return new (t || FilterByPipe)(); };\nFilterByPipe.ɵpipe = /*@__PURE__*/ ɵngcc0.ɵɵdefinePipe({ name: \"filterBy\", type: FilterByPipe, pure: true });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(FilterByPipe, [{\n type: Pipe,\n args: [{\n name: 'filterBy'\n }]\n }], null, null); })();\n\n/**\n * @fileoverview added by tsickle\n * Generated from: lib/ngx-select-dropdown.component.ts\n * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nclass NgxSelectDropdownComponent {\n /**\n * @param {?} cdref\n * @param {?} _elementRef\n */\n constructor(cdref, _elementRef) {\n this.cdref = cdref;\n this._elementRef = _elementRef;\n /**\n * Get the required inputs\n */\n this.options = [];\n /**\n * configuration options\n */\n this.config = {};\n /**\n * Whether multiple selection or single selection allowed\n */\n this.multiple = false;\n /**\n * change event when value changes to provide user to handle things in change event\n */\n this.change = new EventEmitter();\n /**\n * The search text change event emitter emitted when user type in the search input\n */\n this.searchChange = new EventEmitter();\n /**\n * Event emitted when dropdown is open.\n */\n this.open = new EventEmitter();\n /**\n * Event emitted when dropdown is open.\n */\n this.close = new EventEmitter();\n /**\n * Toogle the dropdown list\n */\n this.toggleDropdown = false;\n /**\n * Available items for selection\n */\n this.availableItems = [];\n /**\n * Selected Items\n */\n this.selectedItems = [];\n /**\n * Selection text to be Displayed\n */\n this.selectedDisplayText = 'Select';\n /**\n * variable to track if clicked inside or outside of component\n */\n this.clickedInside = false;\n /**\n * variable to track keypress event inside and outsid of component\n */\n this.insideKeyPress = false;\n /**\n * variable to track the focused item whenuser uses arrow keys to select item\n */\n this.focusedItemIndex = null;\n /**\n * element to show not found text when not itmes match the search\n */\n this.showNotFound = false;\n this.onChange = (/**\n * @return {?}\n */\n () => {\n // empty\n });\n this.onTouched = (/**\n * @return {?}\n */\n () => {\n // empty\n });\n this.multiple = false;\n }\n /**\n * @return {?}\n */\n get value() {\n return this._value;\n }\n /**\n * @param {?} val\n * @return {?}\n */\n set value(val) {\n this._value = val;\n this.onChange(val);\n this.onTouched();\n }\n /**\n * click listener for host inside this component i.e\n * if many instances are there, this detects if clicked inside\n * this instance\n * @return {?}\n */\n clickInsideComponent() {\n this.clickedInside = true;\n }\n /**\n * @return {?}\n */\n blur() {\n this.toggleDropdown = false;\n }\n /**\n * @return {?}\n */\n focus() {\n /* istanbul ignore else */\n if (!this.disabled) {\n this.toggleSelectDropdown();\n }\n }\n /**\n * click handler on documnent to hide the open dropdown if clicked outside\n * @return {?}\n */\n clickOutsideComponent() {\n /* istanbul ignore else */\n if (!this.clickedInside) {\n this.toggleDropdown = false;\n this.resetArrowKeyActiveElement();\n // clear searh on close\n this.searchText = null;\n this.close.emit();\n }\n this.clickedInside = false;\n }\n /**\n * click handler on documnent to hide the open dropdown if clicked outside\n * @return {?}\n */\n KeyPressOutsideComponent() {\n /* istanbul ignore else */\n if (!this.insideKeyPress) {\n this.toggleDropdown = false;\n this.resetArrowKeyActiveElement();\n }\n this.insideKeyPress = false;\n }\n /**\n * Event handler for key up and down event and enter press for selecting element\n * @param {?} $event\n * @return {?}\n */\n handleKeyboardEvent($event) {\n this.insideKeyPress = true;\n /* istanbul ignore else */\n if ($event.keyCode === 27 || this.disabled) {\n this.toggleDropdown = false;\n this.insideKeyPress = false;\n return;\n }\n /** @type {?} */\n const avaOpts = this.availableOptions.toArray();\n /* istanbul ignore else */\n if ($event.keyCode !== 9 && avaOpts.length === 0 && !this.toggleDropdown) {\n this.toggleDropdown = true;\n }\n // Arrow Down\n /* istanbul ignore else */\n if ($event.keyCode === 40 && avaOpts.length > 0) {\n this.onArrowKeyDown();\n /* istanbul ignore else */\n if (this.focusedItemIndex >= avaOpts.length) {\n this.focusedItemIndex = 0;\n }\n avaOpts[this.focusedItemIndex].nativeElement.focus();\n $event.preventDefault();\n }\n // Arrow Up\n /* istanbul ignore else */\n if ($event.keyCode === 38 && avaOpts.length) {\n this.onArrowKeyUp();\n /* istanbul ignore else */\n if (this.focusedItemIndex >= avaOpts.length) {\n this.focusedItemIndex = avaOpts.length - 1;\n }\n avaOpts[this.focusedItemIndex].nativeElement.focus();\n $event.preventDefault();\n }\n // Enter\n /* istanbul ignore else */\n if ($event.keyCode === 13 && this.focusedItemIndex !== null) {\n /** @type {?} */\n const filteredItems = new FilterByPipe().transform(this.availableItems, this.searchText, this.config.searchOnKey);\n this.selectItem(filteredItems[this.focusedItemIndex], this.availableItems.indexOf(filteredItems[this.focusedItemIndex]));\n return false;\n }\n }\n /**\n * Component onInit\n * @return {?}\n */\n ngOnInit() {\n /* istanbul ignore else */\n if (typeof this.options !== 'undefined' && Array.isArray(this.options)) {\n this.availableItems = [\n ...this.options.sort(this.config.customComparator),\n ];\n this.initDropdownValuesAndOptions();\n }\n }\n /**\n * after view init to subscribe to available option changes\n * @return {?}\n */\n ngAfterViewInit() {\n this.availableOptions.changes.subscribe(this.setNotFoundState.bind(this));\n }\n /**\n * @param {?} fn\n * @return {?}\n */\n registerOnChange(fn) {\n this.onChange = fn;\n }\n /**\n * @param {?} fn\n * @return {?}\n */\n registerOnTouched(fn) {\n this.onTouched = fn;\n }\n /**\n * @param {?} isDisabled\n * @return {?}\n */\n setDisabledState(isDisabled) {\n this.disabled = isDisabled;\n }\n /**\n * @param {?} value\n * @param {?=} internal\n * @return {?}\n */\n writeValue(value, internal) {\n if (value) {\n if (Array.isArray(value)) {\n if (this.multiple) {\n this.value = value;\n }\n else if (value.length > 0) {\n this.value = value[0];\n }\n }\n else {\n this.value = value;\n }\n /* istanbul ignore else */\n if (this.selectedItems.length === 0) {\n if (Array.isArray(value)) {\n this.selectedItems = value;\n }\n else {\n this.selectedItems.push(value);\n }\n this.initDropdownValuesAndOptions();\n }\n }\n else {\n this.value = [];\n /* istanbul ignore else */\n if (!internal) {\n this.reset();\n }\n }\n /* istanbul ignore else */\n if (!internal) {\n this.reset();\n }\n }\n /**\n * @return {?}\n */\n reset() {\n this.selectedItems = [];\n this.availableItems = [...this.options.sort(this.config.customComparator)];\n this.initDropdownValuesAndOptions();\n }\n /**\n * function sets whether to show items not found text or not\n * @return {?}\n */\n setNotFoundState() {\n if (this.availableOptions.length === 0) {\n this.showNotFound = true;\n }\n else {\n this.showNotFound = false;\n }\n this.cdref.detectChanges();\n }\n /**\n * Component onchage i.e when any of the input properties change\n * @param {?} changes\n * @return {?}\n */\n ngOnChanges(changes) {\n this.selectedItems = [];\n // this.searchText = null;\n this.options = this.options || [];\n /* istanbul ignore else */\n if (changes.options) {\n this.availableItems = [\n ...this.options.sort(this.config.customComparator),\n ];\n }\n /* istanbul ignore else */\n if (changes.value) {\n /* istanbul ignore else */\n if (JSON.stringify(changes.value.currentValue) === JSON.stringify([]) ||\n changes.value.currentValue === '' ||\n changes.value.currentValue === null) {\n this.availableItems = [\n ...this.options.sort(this.config.customComparator),\n ];\n }\n }\n this.initDropdownValuesAndOptions();\n }\n /**\n * Deselct a selected items\n * @param {?} item\n * @param {?} index\n * @return {?}\n */\n deselectItem(item, index) {\n this.selectedItems.forEach((/**\n * @param {?} element\n * @param {?} i\n * @return {?}\n */\n (element, i) => {\n /* istanbul ignore else */\n if (item === element) {\n this.selectedItems.splice(i, 1);\n }\n }));\n /** @type {?} */\n let sortedItems = [...this.availableItems];\n /* istanbul ignore else */\n if (!this.availableItems.includes(item)) {\n this.availableItems.push(item);\n sortedItems = this.availableItems.sort(this.config.customComparator);\n }\n this.selectedItems = [...this.selectedItems];\n this.availableItems = [...sortedItems];\n /* istanbul ignore else */\n if (!Array.isArray(this.value)) {\n this.value = [];\n }\n this.valueChanged();\n this.resetArrowKeyActiveElement();\n }\n /**\n * Select an item\n * @param {?} item\n * @param {?=} index\n * @return {?}\n */\n selectItem(item, index) {\n /* istanbul ignore else */\n if (!this.multiple) {\n /* istanbul ignore else */\n if (this.selectedItems.length > 0) {\n this.availableItems.push(this.selectedItems[0]);\n }\n this.selectedItems = [];\n this.toggleDropdown = false;\n }\n this.availableItems.forEach((/**\n * @param {?} element\n * @param {?} i\n * @return {?}\n */\n (element, i) => {\n /* istanbul ignore else */\n if (item === element) {\n this.selectedItems.push(item);\n this.availableItems.splice(i, 1);\n }\n }));\n /* istanbul ignore else */\n if (this.config.clearOnSelection) {\n this.searchText = null;\n }\n this.selectedItems = [...this.selectedItems];\n this.availableItems = [...this.availableItems];\n this.selectedItems.sort(this.config.customComparator);\n this.availableItems.sort(this.config.customComparator);\n // this.searchText = null;\n this.valueChanged();\n this.resetArrowKeyActiveElement();\n }\n /**\n * When selected items changes trigger the chaange back to parent\n * @return {?}\n */\n valueChanged() {\n this.writeValue(this.selectedItems, true);\n // this.valueChange.emit(this.value);\n this.change.emit({ value: this.value });\n this.setSelectedDisplayText();\n }\n /**\n * Toggle the dropdownlist on/off\n * @return {?}\n */\n toggleSelectDropdown() {\n this.toggleDropdown = !this.toggleDropdown;\n if (this.toggleDropdown) {\n this.open.emit();\n }\n else {\n this.searchText = null;\n this.close.emit();\n }\n this.resetArrowKeyActiveElement();\n }\n /**\n * The change handler for search text\n * @return {?}\n */\n searchTextChanged() {\n this.searchChange.emit(this.searchText);\n }\n /**\n * @param {?} $event\n * @return {?}\n */\n changeSearchText($event) {\n $event.stopPropagation();\n }\n /**\n * initialize the config and other properties\n * @private\n * @return {?}\n */\n initDropdownValuesAndOptions() {\n /** @type {?} */\n const config = {\n displayKey: 'description',\n height: 'auto',\n search: false,\n placeholder: 'Select',\n searchPlaceholder: 'Search...',\n limitTo: 0,\n customComparator: undefined,\n noResultsFound: 'No results found!',\n moreText: 'more',\n searchOnKey: null,\n clearOnSelection: false,\n inputDirection: 'ltr',\n };\n /* istanbul ignore else */\n if (this.config === 'undefined' || Object.keys(this.config).length === 0) {\n this.config = Object.assign({}, config);\n }\n for (const key of Object.keys(config)) {\n this.config[key] = this.config[key] ? this.config[key] : config[key];\n }\n this.config = Object.assign({}, this.config);\n // Adding placeholder in config as default param\n this.selectedDisplayText = this.config['placeholder'];\n /* istanbul ignore else */\n if (this.value !== '' && typeof this.value !== 'undefined') {\n if (Array.isArray(this.value)) {\n this.selectedItems = this.value;\n }\n else if (this.value !== '' && this.value !== null) {\n this.selectedItems[0] = this.value;\n }\n else {\n this.selectedItems = [];\n this.value = [];\n }\n this.selectedItems.forEach((/**\n * @param {?} item\n * @return {?}\n */\n (item) => {\n /** @type {?} */\n const ind = this.availableItems.findIndex((/**\n * @param {?} aItem\n * @return {?}\n */\n (aItem) => JSON.stringify(item) === JSON.stringify(aItem)));\n if (ind !== -1) {\n this.availableItems.splice(ind, 1);\n }\n }));\n }\n this.setSelectedDisplayText();\n }\n /**\n * set the text to be displayed\n * @private\n * @return {?}\n */\n setSelectedDisplayText() {\n /** @type {?} */\n let text = this.selectedItems[0];\n /* istanbul ignore else */\n if (typeof this.selectedItems[0] === 'object') {\n text = this.config.displayFn\n ? this.config.displayFn(this.selectedItems[0])\n : this.selectedItems[0][this.config.displayKey];\n }\n if (this.multiple && this.selectedItems.length > 0) {\n this.selectedDisplayText =\n this.selectedItems.length === 1\n ? text\n : text +\n ` + ${this.selectedItems.length - 1} ${this.config.moreText}`;\n }\n else {\n this.selectedDisplayText =\n this.selectedItems.length === 0 ? this.config.placeholder : text;\n }\n }\n /**\n * Event handler for arrow key up event thats focuses on a item\n * @private\n * @return {?}\n */\n onArrowKeyUp() {\n /* istanbul ignore else */\n if (this.focusedItemIndex === 0) {\n this.focusedItemIndex = this.availableItems.length - 1;\n return;\n }\n /* istanbul ignore else */\n if (this.onArrowKey()) {\n this.focusedItemIndex--;\n }\n }\n /**\n * Event handler for arrow key down event thats focuses on a item\n * @private\n * @return {?}\n */\n onArrowKeyDown() {\n /* istanbul ignore else */\n if (this.focusedItemIndex === this.availableItems.length - 1) {\n this.focusedItemIndex = 0;\n return;\n }\n /* istanbul ignore else */\n if (this.onArrowKey()) {\n this.focusedItemIndex++;\n }\n }\n /**\n * @private\n * @return {?}\n */\n onArrowKey() {\n /* istanbul ignore else */\n if (this.focusedItemIndex === null) {\n this.focusedItemIndex = 0;\n return false;\n }\n return true;\n }\n /**\n * will reset the element that is marked active using arrow keys\n * @private\n * @return {?}\n */\n resetArrowKeyActiveElement() {\n this.focusedItemIndex = null;\n }\n}\nNgxSelectDropdownComponent.ɵfac = function NgxSelectDropdownComponent_Factory(t) { return new (t || NgxSelectDropdownComponent)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ChangeDetectorRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef)); };\nNgxSelectDropdownComponent.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: NgxSelectDropdownComponent, selectors: [[\"ngx-select-dropdown\"]], viewQuery: function NgxSelectDropdownComponent_Query(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵviewQuery(_c0, 5);\n } if (rf & 2) {\n let _t;\n ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.availableOptions = _t);\n } }, hostBindings: function NgxSelectDropdownComponent_HostBindings(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵlistener(\"click\", function NgxSelectDropdownComponent_click_HostBindingHandler() { return ctx.clickInsideComponent(); })(\"blur\", function NgxSelectDropdownComponent_blur_HostBindingHandler() { return ctx.blur(); })(\"focus\", function NgxSelectDropdownComponent_focus_HostBindingHandler() { return ctx.focus(); })(\"click\", function NgxSelectDropdownComponent_click_HostBindingHandler() { return ctx.clickOutsideComponent(); }, false, ɵngcc0.ɵɵresolveDocument)(\"keydown\", function NgxSelectDropdownComponent_keydown_HostBindingHandler() { return ctx.KeyPressOutsideComponent(); }, false, ɵngcc0.ɵɵresolveDocument)(\"keydown\", function NgxSelectDropdownComponent_keydown_HostBindingHandler($event) { return ctx.handleKeyboardEvent($event); });\n } }, inputs: { options: \"options\", config: \"config\", multiple: \"multiple\", _value: \"_value\", disabled: \"disabled\" }, outputs: { change: \"change\", searchChange: \"searchChange\", open: \"open\", close: \"close\" }, features: [ɵngcc0.ɵɵProvidersFeature([\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(( /**\n * @return {?}\n */() => NgxSelectDropdownComponent)),\n multi: true\n },\n ]), ɵngcc0.ɵɵNgOnChangesFeature], decls: 6, vars: 6, consts: [[\"tabindex\", \"0\", 1, \"ngx-dropdown-container\"], [\"type\", \"button\", \"tabindex\", \"-1\", 1, \"ngx-dropdown-button\", 3, \"ngClass\", \"disabled\", \"click\"], [1, \"display-text\"], [1, \"nsdicon-angle-down\"], [\"class\", \"ngx-dropdown-list-container\", 3, \"maxHeight\", 4, \"ngIf\"], [1, \"ngx-dropdown-list-container\"], [\"class\", \"search-container\", 4, \"ngIf\"], [1, \"selected-items\"], [\"tabindex\", \"-1\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [4, \"ngIf\"], [1, \"available-items\"], [\"tabindex\", \"-1\", 3, \"ngClass\", \"click\", 4, \"ngFor\", \"ngForOf\"], [1, \"search-container\"], [\"name\", \"search-text\", \"tabindex\", \"-1\", \"autocomplete\", \"off\", 3, \"ngModel\", \"change\", \"input\", \"ngModelChange\"], [3, \"ngClass\"], [1, \"nsdicon-search\"], [\"tabindex\", \"-1\", 3, \"click\"], [1, \"nsdicon-close\"], [\"tabindex\", \"-1\", 3, \"ngClass\", \"click\"], [\"availableOption\", \"\"]], template: function NgxSelectDropdownComponent_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelementStart(0, \"div\", 0)(1, \"button\", 1);\n ɵngcc0.ɵɵlistener(\"click\", function NgxSelectDropdownComponent_Template_button_click_1_listener() { return ctx.toggleSelectDropdown(); });\n ɵngcc0.ɵɵelementStart(2, \"span\", 2);\n ɵngcc0.ɵɵtext(3);\n ɵngcc0.ɵɵelementEnd();\n ɵngcc0.ɵɵelement(4, \"span\", 3);\n ɵngcc0.ɵɵelementEnd();\n ɵngcc0.ɵɵtemplate(5, NgxSelectDropdownComponent_div_5_Template, 10, 14, \"div\", 4);\n ɵngcc0.ɵɵelementEnd();\n } if (rf & 2) {\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngClass\", ɵngcc0.ɵɵpureFunction1(4, _c3, ctx.disabled))(\"disabled\", ctx.disabled);\n ɵngcc0.ɵɵadvance(2);\n ɵngcc0.ɵɵtextInterpolate1(\"\", ctx.selectedDisplayText, \" \");\n ɵngcc0.ɵɵadvance(2);\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx.toggleDropdown);\n } }, dependencies: function () { return [ɵngcc1.NgClass, ɵngcc1.NgForOf, ɵngcc1.NgIf, ɵngcc2.DefaultValueAccessor, ɵngcc2.NgControlStatus, ɵngcc2.NgModel, FilterByPipe, LimitToPipe]; }, styles: [\".ngx-dropdown-container[_ngcontent-%COMP%]{width:100%;position:relative}.ngx-dropdown-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{display:inline-block;margin-bottom:0;font-weight:400;line-height:1.42857143;vertical-align:middle;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid #ccc;border-radius:4px;color:#333;background-color:#fff;white-space:nowrap;overflow-x:hidden;text-overflow:ellipsis;text-align:left}.ngx-dropdown-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline;vertical-align:middle}.ngx-dropdown-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%] .nsdicon-angle-down[_ngcontent-%COMP%]{right:5px;position:relative;float:right}.ngx-dropdown-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%] .nsdicon-angle-down[_ngcontent-%COMP%]::before{border-style:solid;border-width:.1em .1em 0 0;content:\\\"\\\";display:inline-block;height:10px;position:relative;vertical-align:text-top;width:10px;top:0;transform:rotate(135deg)}.ngx-dropdown-container[_ngcontent-%COMP%] .ngx-dropdown-button[_ngcontent-%COMP%]{width:100%;min-height:30px;padding:5px 10px;background-color:#fff}.ngx-dropdown-container[_ngcontent-%COMP%] .ngx-dropdown-button[_ngcontent-%COMP%] .display-text[_ngcontent-%COMP%]{display:inline-block;width:calc(100% - 20px)}.ngx-dropdown-container[_ngcontent-%COMP%] .ngx-dropdown-list-container[_ngcontent-%COMP%]{box-sizing:border-box;border:1px solid rgba(0,0,0,.15);border-radius:4px;padding-left:10px;padding-right:10px;z-index:999999999;width:100%;background:#fff;position:absolute;box-shadow:5px 5px 5px 0 rgba(0,0,0,.21);overflow-y:auto}.ngx-dropdown-container[_ngcontent-%COMP%] .ngx-dropdown-list-container[_ngcontent-%COMP%] .search-container[_ngcontent-%COMP%]{position:relative;padding-top:10px;margin-top:5px}.ngx-dropdown-container[_ngcontent-%COMP%] .ngx-dropdown-list-container[_ngcontent-%COMP%] .search-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{background-color:transparent;border:none;border-bottom:1px solid #9e9e9e;border-radius:0;outline:0;height:2rem;width:100%;font-size:13px;margin:0;padding:0;box-shadow:none;box-sizing:content-box;transition:.3s}.ngx-dropdown-container[_ngcontent-%COMP%] .ngx-dropdown-list-container[_ngcontent-%COMP%] .search-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{border-bottom:1px solid #26a69a}.ngx-dropdown-container[_ngcontent-%COMP%] .ngx-dropdown-list-container[_ngcontent-%COMP%] .search-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus + label[_ngcontent-%COMP%]{transform:translateY(-2px) scale(.8);transform-origin:0 0}.ngx-dropdown-container[_ngcontent-%COMP%] .ngx-dropdown-list-container[_ngcontent-%COMP%] .search-container[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:#9e9e9e;position:absolute;top:0;left:0;height:100%;font-size:1rem;cursor:text;transition:transform .2s ease-out;transform-origin:0 100%;text-align:initial;transform:translateY(12px);pointer-events:none}.ngx-dropdown-container[_ngcontent-%COMP%] .ngx-dropdown-list-container[_ngcontent-%COMP%] .search-container[_ngcontent-%COMP%] label.active[_ngcontent-%COMP%]{transform:translateY(-2px) scale(.8);transform-origin:0 0}.ngx-dropdown-container[_ngcontent-%COMP%] .ngx-dropdown-list-container[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin-top:1rem;margin-bottom:1rem;list-style-type:none;padding-left:0}.ngx-dropdown-container[_ngcontent-%COMP%] .ngx-dropdown-list-container[_ngcontent-%COMP%] ul.selected-items[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{background-color:#337ab7;color:#fff;margin-bottom:2px}.ngx-dropdown-container[_ngcontent-%COMP%] .ngx-dropdown-list-container[_ngcontent-%COMP%] ul.selected-items[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nsdicon-close[_ngcontent-%COMP%]{font-weight:700;font-size:large}.ngx-dropdown-container[_ngcontent-%COMP%] .ngx-dropdown-list-container[_ngcontent-%COMP%] ul.available-items[_ngcontent-%COMP%] li.active[_ngcontent-%COMP%]{background-color:#337ab7;color:#ffff}.ngx-dropdown-container[_ngcontent-%COMP%] .ngx-dropdown-list-container[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{font-size:inherit;cursor:pointer;display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:normal}.ngx-dropdown-container[_ngcontent-%COMP%] .ngx-disabled[_ngcontent-%COMP%]{pointer-events:none;background-color:#e9ecef;opacity:1;cursor:no-drop}\"] });\n/** @nocollapse */\nNgxSelectDropdownComponent.ctorParameters = () => [\n { type: ChangeDetectorRef },\n { type: ElementRef }\n];\nNgxSelectDropdownComponent.propDecorators = {\n _value: [{ type: Input }],\n options: [{ type: Input }],\n config: [{ type: Input }],\n multiple: [{ type: Input }],\n disabled: [{ type: Input }],\n change: [{ type: Output }],\n searchChange: [{ type: Output }],\n open: [{ type: Output }],\n close: [{ type: Output }],\n availableOptions: [{ type: ViewChildren, args: ['availableOption',] }],\n clickInsideComponent: [{ type: HostListener, args: ['click',] }],\n blur: [{ type: HostListener, args: ['blur',] }],\n focus: [{ type: HostListener, args: ['focus',] }],\n clickOutsideComponent: [{ type: HostListener, args: ['document:click',] }],\n KeyPressOutsideComponent: [{ type: HostListener, args: ['document:keydown',] }],\n handleKeyboardEvent: [{ type: HostListener, args: ['keydown', ['$event'],] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgxSelectDropdownComponent, [{\n type: Component,\n args: [{ selector: 'ngx-select-dropdown', template: \"<div class=\\\"ngx-dropdown-container\\\" tabindex=\\\"0\\\">\\n <button type=\\\"button\\\" tabindex=\\\"-1\\\" class=\\\"ngx-dropdown-button\\\" [ngClass]=\\\"{ 'ngx-disabled': disabled }\\\"\\n [disabled]=\\\"disabled\\\" (click)=\\\"toggleSelectDropdown()\\\">\\n <span class=\\\"display-text\\\">{{ selectedDisplayText }} </span>\\n <span class=\\\"nsdicon-angle-down\\\"></span>\\n </button>\\n <div class=\\\"ngx-dropdown-list-container\\\" *ngIf=\\\"toggleDropdown\\\" [style.maxHeight]=\\\"config.height\\\">\\n <div class=\\\"search-container\\\" *ngIf=\\\"config.search\\\">\\n <input (change)=\\\"changeSearchText($event)\\\" [style.direction]=\\\"config.inputDirection\\\" name=\\\"search-text\\\"\\n (input)=\\\"searchTextChanged()\\\" [(ngModel)]=\\\"searchText\\\" tabindex=\\\"-1\\\" autocomplete=\\\"off\\\" />\\n <label [ngClass]=\\\"{ active: searchText }\\\">\\n <span class=\\\"nsdicon-search\\\"></span>\\n {{ config.searchPlaceholder }}</label>\\n </div>\\n <ul class=\\\"selected-items\\\">\\n <li tabindex=\\\"-1\\\" *ngFor=\\\"let selected of selectedItems; let i = index\\\" (click)=\\\"deselectItem(selected, i)\\\">\\n <span class=\\\"nsdicon-close\\\">x</span>\\n <span>\\n {{\\n config.displayFn\\n ? config.displayFn(selected)\\n : selected[config.displayKey] || selected\\n }}\\n </span>\\n </li>\\n </ul>\\n <hr *ngIf=\\\"selectedItems.length > 0 && availableItems.length > 0\\\" />\\n <ul class=\\\"available-items\\\">\\n <li #availableOption *ngFor=\\\"\\n let item of availableItems\\n | filterBy: searchText:config.searchOnKey\\n | limitTo: config.limitTo;\\n let i = index\\n \\\" tabindex=\\\"-1\\\" [ngClass]=\\\"{\\n active: focusedItemIndex == i && !item.disabled,\\n disabled: item.disabled\\n }\\\" (click)=\\\"selectItem(item, i)\\\">\\n {{\\n config.displayFn\\n ? config.displayFn(item)\\n : item[config.displayKey] || item\\n }}\\n </li>\\n <li *ngIf=\\\"showNotFound\\\">{{ config.noResultsFound }}</li>\\n </ul>\\n </div>\\n</div>\", providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(( /**\n * @return {?}\n */() => NgxSelectDropdownComponent)),\n multi: true\n },\n ], styles: [\".ngx-dropdown-container{width:100%;position:relative}.ngx-dropdown-container button{display:inline-block;margin-bottom:0;font-weight:400;line-height:1.42857143;vertical-align:middle;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid #ccc;border-radius:4px;color:#333;background-color:#fff;white-space:nowrap;overflow-x:hidden;text-overflow:ellipsis;text-align:left}.ngx-dropdown-container button span{display:inline;vertical-align:middle}.ngx-dropdown-container button .nsdicon-angle-down{right:5px;position:relative;float:right}.ngx-dropdown-container button .nsdicon-angle-down::before{border-style:solid;border-width:.1em .1em 0 0;content:\\\"\\\";display:inline-block;height:10px;position:relative;vertical-align:text-top;width:10px;top:0;transform:rotate(135deg)}.ngx-dropdown-container .ngx-dropdown-button{width:100%;min-height:30px;padding:5px 10px;background-color:#fff}.ngx-dropdown-container .ngx-dropdown-button .display-text{display:inline-block;width:calc(100% - 20px)}.ngx-dropdown-container .ngx-dropdown-list-container{box-sizing:border-box;border:1px solid rgba(0,0,0,.15);border-radius:4px;padding-left:10px;padding-right:10px;z-index:999999999;width:100%;background:#fff;position:absolute;box-shadow:5px 5px 5px 0 rgba(0,0,0,.21);overflow-y:auto}.ngx-dropdown-container .ngx-dropdown-list-container .search-container{position:relative;padding-top:10px;margin-top:5px}.ngx-dropdown-container .ngx-dropdown-list-container .search-container input{background-color:transparent;border:none;border-bottom:1px solid #9e9e9e;border-radius:0;outline:0;height:2rem;width:100%;font-size:13px;margin:0;padding:0;box-shadow:none;box-sizing:content-box;transition:.3s}.ngx-dropdown-container .ngx-dropdown-list-container .search-container input:focus{border-bottom:1px solid #26a69a}.ngx-dropdown-container .ngx-dropdown-list-container .search-container input:focus+label{transform:translateY(-2px) scale(.8);transform-origin:0 0}.ngx-dropdown-container .ngx-dropdown-list-container .search-container label{color:#9e9e9e;position:absolute;top:0;left:0;height:100%;font-size:1rem;cursor:text;transition:transform .2s ease-out;transform-origin:0 100%;text-align:initial;transform:translateY(12px);pointer-events:none}.ngx-dropdown-container .ngx-dropdown-list-container .search-container label.active{transform:translateY(-2px) scale(.8);transform-origin:0 0}.ngx-dropdown-container .ngx-dropdown-list-container ul{margin-top:1rem;margin-bottom:1rem;list-style-type:none;padding-left:0}.ngx-dropdown-container .ngx-dropdown-list-container ul.selected-items li{background-color:#337ab7;color:#fff;margin-bottom:2px}.ngx-dropdown-container .ngx-dropdown-list-container ul.selected-items li .nsdicon-close{font-weight:700;font-size:large}.ngx-dropdown-container .ngx-dropdown-list-container ul.available-items li.active{background-color:#337ab7;color:#ffff}.ngx-dropdown-container .ngx-dropdown-list-container ul li{font-size:inherit;cursor:pointer;display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:normal}.ngx-dropdown-container .ngx-disabled{pointer-events:none;background-color:#e9ecef;opacity:1;cursor:no-drop}\"] }]\n }], function () { return [{ type: ɵngcc0.ChangeDetectorRef }, { type: ɵngcc0.ElementRef }]; }, { options: [{\n type: Input\n }], config: [{\n type: Input\n }], multiple: [{\n type: Input\n }], change: [{\n type: Output\n }], searchChange: [{\n type: Output\n }], open: [{\n type: Output\n }], close: [{\n type: Output\n }], _value: [{\n type: Input\n }], \n /**\n * click listener for host inside this component i.e\n * if many instances are there, this detects if clicked inside\n * this instance\n * @return {?}\n */\n clickInsideComponent: [{\n type: HostListener,\n args: ['click']\n }], \n /**\n * @return {?}\n */\n blur: [{\n type: HostListener,\n args: ['blur']\n }], \n /**\n * @return {?}\n */\n focus: [{\n type: HostListener,\n args: ['focus']\n }], \n /**\n * click handler on documnent to hide the open dropdown if clicked outside\n * @return {?}\n */\n clickOutsideComponent: [{\n type: HostListener,\n args: ['document:click']\n }], \n /**\n * click handler on documnent to hide the open dropdown if clicked outside\n * @return {?}\n */\n KeyPressOutsideComponent: [{\n type: HostListener,\n args: ['document:keydown']\n }], \n /**\n * Event handler for key up and down event and enter press for selecting element\n * @param {?} $event\n * @return {?}\n */\n handleKeyboardEvent: [{\n type: HostListener,\n args: ['keydown', ['$event']]\n }], disabled: [{\n type: Input\n }], availableOptions: [{\n type: ViewChildren,\n args: ['availableOption']\n }] }); })();\nif (false) {\n /**\n * value of the dropdown\n * @type {?}\n */\n NgxSelectDropdownComponent.prototype._value;\n /**\n * Get the required inputs\n * @type {?}\n */\n NgxSelectDropdownComponent.prototype.options;\n /**\n * configuration options\n * @type {?}\n */\n NgxSelectDropdownComponent.prototype.config;\n /**\n * Whether multiple selection or single selection allowed\n * @type {?}\n */\n NgxSelectDropdownComponent.prototype.multiple;\n /**\n * Value\n * @type {?}\n */\n NgxSelectDropdownComponent.prototype.disabled;\n /**\n * change event when value changes to provide user to handle things in change event\n * @type {?}\n */\n NgxSelectDropdownComponent.prototype.change;\n /**\n * The search text change event emitter emitted when user type in the search input\n * @type {?}\n */\n NgxSelectDropdownComponent.prototype.searchChange;\n /**\n * Event emitted when dropdown is open.\n * @type {?}\n */\n NgxSelectDropdownComponent.prototype.open;\n /**\n * Event emitted when dropdown is open.\n * @type {?}\n */\n NgxSelectDropdownComponent.prototype.close;\n /**\n * Toogle the dropdown list\n * @type {?}\n */\n NgxSelectDropdownComponent.prototype.toggleDropdown;\n /**\n * Available items for selection\n * @type {?}\n */\n NgxSelectDropdownComponent.prototype.availableItems;\n /**\n * Selected Items\n * @type {?}\n */\n NgxSelectDropdownComponent.prototype.selectedItems;\n /**\n * Selection text to be Displayed\n * @type {?}\n */\n NgxSelectDropdownComponent.prototype.selectedDisplayText;\n /**\n * Search text\n * @type {?}\n */\n NgxSelectDropdownComponent.prototype.searchText;\n /**\n * variable to track if clicked inside or outside of component\n * @type {?}\n */\n NgxSelectDropdownComponent.prototype.clickedInside;\n /**\n * variable to track keypress event inside and outsid of component\n * @type {?}\n */\n NgxSelectDropdownComponent.prototype.insideKeyPress;\n /**\n * variable to track the focused item whenuser uses arrow keys to select item\n * @type {?}\n */\n NgxSelectDropdownComponent.prototype.focusedItemIndex;\n /**\n * element to show not found text when not itmes match the search\n * @type {?}\n */\n NgxSelectDropdownComponent.prototype.showNotFound;\n /**\n * Hold the reference to available items in the list to focus on the item when scrolling\n * @type {?}\n */\n NgxSelectDropdownComponent.prototype.availableOptions;\n /** @type {?} */\n NgxSelectDropdownComponent.prototype.onChange;\n /** @type {?} */\n NgxSelectDropdownComponent.prototype.onTouched;\n /**\n * @type {?}\n * @private\n */\n NgxSelectDropdownComponent.prototype.cdref;\n /** @type {?} */\n NgxSelectDropdownComponent.prototype._elementRef;\n}\n\n/**\n * @fileoverview added by tsickle\n * Generated from: lib/pipes/limit-to.pipe.ts\n * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nclass LimitToPipe {\n /**\n * @param {?} array\n * @param {?} itemsCount\n * @param {?=} startIndex\n * @return {?}\n */\n transform(array, itemsCount, startIndex = 0) {\n if (!Array.isArray(array) || itemsCount === 0) {\n return array;\n }\n return array.slice(startIndex, startIndex + itemsCount);\n }\n}\nLimitToPipe.ɵfac = function LimitToPipe_Factory(t) { return new (t || LimitToPipe)(); };\nLimitToPipe.ɵpipe = /*@__PURE__*/ ɵngcc0.ɵɵdefinePipe({ name: \"limitTo\", type: LimitToPipe, pure: true });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(LimitToPipe, [{\n type: Pipe,\n args: [{\n name: 'limitTo'\n }]\n }], null, null); })();\n\n/**\n * @fileoverview added by tsickle\n * Generated from: lib/ngx-select-dropdown.module.ts\n * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nclass SelectDropDownModule {\n}\nSelectDropDownModule.ɵfac = function SelectDropDownModule_Factory(t) { return new (t || SelectDropDownModule)(); };\nSelectDropDownModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: SelectDropDownModule });\nSelectDropDownModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ imports: [CommonModule, FormsModule] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(SelectDropDownModule, [{\n type: NgModule,\n args: [{\n declarations: [NgxSelectDropdownComponent, FilterByPipe, LimitToPipe],\n imports: [CommonModule, FormsModule],\n exports: [NgxSelectDropdownComponent, FilterByPipe, LimitToPipe]\n }]\n }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(SelectDropDownModule, { declarations: function () { return [NgxSelectDropdownComponent, FilterByPipe, LimitToPipe]; }, imports: function () { return [CommonModule, FormsModule]; }, exports: function () { return [NgxSelectDropdownComponent, FilterByPipe, LimitToPipe]; } }); })();\n\n/**\n * @fileoverview added by tsickle\n * Generated from: public-api.ts\n * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n\n/**\n * @fileoverview added by tsickle\n * Generated from: ngx-select-dropdown.ts\n * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n\nexport { FilterByPipe, LimitToPipe, NgxSelectDropdownComponent, SelectDropDownModule, SelectDropDownService };\n\n","//! moment.js locale configuration\n//! locale : Konkani Devanagari script [gom-deva]\n//! author : The Discoverer : https://github.com/WikiDiscoverer\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n s: ['थोडया सॅकंडांनी', 'थोडे सॅकंड'],\n ss: [number + ' सॅकंडांनी', number + ' सॅकंड'],\n m: ['एका मिणटान', 'एक मिनूट'],\n mm: [number + ' मिणटांनी', number + ' मिणटां'],\n h: ['एका वरान', 'एक वर'],\n hh: [number + ' वरांनी', number + ' वरां'],\n d: ['एका दिसान', 'एक दीस'],\n dd: [number + ' दिसांनी', number + ' दीस'],\n M: ['एका म्हयन्यान', 'एक म्हयनो'],\n MM: [number + ' म्हयन्यानी', number + ' म्हयने'],\n y: ['एका वर्सान', 'एक वर्स'],\n yy: [number + ' वर्सांनी', number + ' वर्सां'],\n };\n return isFuture ? format[key][0] : format[key][1];\n }\n\n var gomDeva = moment.defineLocale('gom-deva', {\n months: {\n standalone:\n 'जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(\n '_'\n ),\n format: 'जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या'.split(\n '_'\n ),\n isFormat: /MMMM(\\s)+D[oD]?/,\n },\n monthsShort:\n 'जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार'.split('_'),\n weekdaysShort: 'आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.'.split('_'),\n weekdaysMin: 'आ_सो_मं_बु_ब्रे_सु_शे'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'A h:mm [वाजतां]',\n LTS: 'A h:mm:ss [वाजतां]',\n L: 'DD-MM-YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY A h:mm [वाजतां]',\n LLLL: 'dddd, MMMM Do, YYYY, A h:mm [वाजतां]',\n llll: 'ddd, D MMM YYYY, A h:mm [वाजतां]',\n },\n calendar: {\n sameDay: '[आयज] LT',\n nextDay: '[फाल्यां] LT',\n nextWeek: '[फुडलो] dddd[,] LT',\n lastDay: '[काल] LT',\n lastWeek: '[फाटलो] dddd[,] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s',\n past: '%s आदीं',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(वेर)/,\n ordinal: function (number, period) {\n switch (period) {\n // the ordinal 'वेर' only applies to day of the month\n case 'D':\n return number + 'वेर';\n default:\n case 'M':\n case 'Q':\n case 'DDD':\n case 'd':\n case 'w':\n case 'W':\n return number;\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week\n doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)\n },\n meridiemParse: /राती|सकाळीं|दनपारां|सांजे/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'राती') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'सकाळीं') {\n return hour;\n } else if (meridiem === 'दनपारां') {\n return hour > 12 ? hour : hour + 12;\n } else if (meridiem === 'सांजे') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'राती';\n } else if (hour < 12) {\n return 'सकाळीं';\n } else if (hour < 16) {\n return 'दनपारां';\n } else if (hour < 20) {\n return 'सांजे';\n } else {\n return 'राती';\n }\n },\n });\n\n return gomDeva;\n\n})));\n","<form [formGroup]=\"surveyGroupForm\">\n <div class=\"survey-selector__container\">\n <ng-container *ngFor=\"let dataItem of data\"> \n <div\n *ngIf=\"!dataItem.hidden\"\n class=\"survey-selector\"\n [ngClass]=\"{ 'survey-selector--active': dataItem.checked }\"\n (click)=\"onSurveySelectorClick($event, dataItem, dataItem[valueKey])\"\n >\n <div\n *ngIf=\"dataItem.label\"\n class=\"survey-selector__label\"\n [attr.disabled]=\"dataItem.disabled || disabled\"\n [ngClass]=\"{ 'survey-selector__label--active': dataItem.checked }\"\n >\n {{ dataItem.label }}\n </div>\n <div class=\"survey-selector__header\">\n <div\n class=\"survey-selector__header-title\"\n [ngClass]=\"{ 'survey-selector__header-title--active': dataItem.checked }\"\n [attr.disabled]=\"dataItem.disabled || disabled\"\n >\n {{ dataItem.title }}\n </div>\n <ng-container [ngSwitch]=\"selectorType\">\n <bw-checkbox\n #checkboxElem\n *ngSwitchCase=\"SurveySelectorType.Checkbox\"\n [rounded]=\"true\"\n [disabled]=\"dataItem.disabled || disabled\"\n [singleMargin]=\"true\"\n [formControl]=\"dataItem.formControl\"\n [value]=\"dataItem[valueKey]\"\n ></bw-checkbox>\n <bw-radio\n #radioElem\n *ngSwitchCase=\"SurveySelectorType.Radio\"\n [disabled]=\"dataItem.disabled || disabled\"\n [name]=\"selectorName\"\n [singleMargin]=\"true\"\n [formControlName]=\"surveyGroupFormKey\"\n [value]=\"dataItem[valueKey]\"\n ></bw-radio>\n <div\n *ngSwitchCase=\"SurveySelectorType.Instant\"\n [attr.disabled]=\"dataItem.disabled || disabled\"\n >\n <bw-icon\n iconName=\"chevron_right\"\n size=\"24\"\n [color]=\"dataItem.checked ? 'var(--blue-50)' : 'var(--gray-50)'\"\n ></bw-icon>\n </div>\n </ng-container>\n </div>\n <typography\n *ngIf=\"dataItem.description\"\n text-small-regular\n class=\"secondary-text mt-sm survey-selector__body\"\n [attr.disabled]=\"dataItem.disabled || disabled\"\n >{{ dataItem.description }}\n </typography>\n </div>\n </ng-container>\n </div>\n</form>\n","import { Component, EventEmitter, Input, OnDestroy, OnInit, Output, QueryList, ViewChildren } from '@angular/core';\nimport { AbstractControl, FormControl, FormGroup } from '@angular/forms';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { SurveySelectorData, SurveySelectorType } from './survey-selector.model';\nimport { CheckboxComponent, RadioComponent } from '@brightside/brightside-ui';\n\n@Component({\n selector: 'bw-survey-selector',\n templateUrl: './survey-selector.component.html',\n styleUrls: ['./survey-selector.component.scss'],\n})\nexport class SurveySelectorComponent implements OnInit, OnDestroy {\n @Input() selectorType: SurveySelectorType = SurveySelectorType.Instant;\n @Input() data: SurveySelectorData[];\n @Input() selectorName: string;\n @Input() disabled: boolean = false;\n @Input() surveyGroupForm: FormGroup = new FormGroup({});\n @Input() surveyGroupFormKey: string;\n @Output() instantCtaClicked = new EventEmitter<any>();\n\n @ViewChildren('checkboxElem') checkboxElem: QueryList<CheckboxComponent>;\n @ViewChildren('radioElem') radioElem: QueryList<RadioComponent>;\n\n SurveySelectorType = SurveySelectorType;\n valueKey: string = 'value';\n private _unsub$ = new Subject<void>();\n\n constructor() {}\n\n ngOnInit(): void {\n const selectionControl = this.surveyGroupForm.get(this.surveyGroupFormKey);\n this.setUpAdditionalInfoOnData(selectionControl);\n\n if (selectionControl) {\n selectionControl.valueChanges.pipe(takeUntil(this._unsub$)).subscribe((valueSelected) => {\n if (this.selectorType === SurveySelectorType.Radio) {\n this.setRadioActive(valueSelected);\n }\n if (this.selectorType === SurveySelectorType.Checkbox) {\n this.setCheckboxActive(valueSelected);\n }\n });\n }\n }\n\n handleInstantClick(value: SurveySelectorData): void {\n const selectionControl = this.surveyGroupForm.get(this.surveyGroupFormKey);\n if (selectionControl) {\n selectionControl.setValue(value);\n this.setInstantActive(value);\n }\n\n this.instantCtaClicked.emit();\n }\n\n onSurveySelectorClick($event: MouseEvent, dataItem: SurveySelectorData, value: any) {\n if (dataItem.disabled || this.disabled) return;\n\n if (this.selectorType === SurveySelectorType.Radio) {\n this.radioElem.forEach((elem) => {\n if (elem.value === value) elem.handleClick($event, { focus: () => {} }, true);\n return;\n });\n }\n if (this.selectorType === SurveySelectorType.Checkbox) {\n this.checkboxElem.forEach((elem) => {\n if (elem.value === value) elem.onClick($event, null, true);\n return;\n });\n }\n if (this.selectorType === SurveySelectorType.Instant) {\n this.handleInstantClick(value);\n }\n }\n\n ngOnDestroy(): void {\n this._unsub$.next();\n }\n\n private setUpAdditionalInfoOnData(selectionControl: AbstractControl | null): void {\n if (selectionControl) {\n let additionalData: any;\n\n this.data = this.data.map((dataItem: any) => {\n if (this.selectorType === SurveySelectorType.Checkbox) {\n const selectionControlArray: FormGroup = selectionControl as FormGroup;\n const formControlItem = new FormControl(dataItem.checked);\n selectionControlArray.addControl(dataItem[this.valueKey], formControlItem);\n\n additionalData = {\n formControl: formControlItem,\n };\n }\n\n if ([SurveySelectorType.Radio, SurveySelectorType.Instant].includes(this.selectorType)) {\n additionalData = {\n checked: dataItem.checked,\n };\n }\n\n return {\n ...dataItem,\n ...additionalData,\n };\n });\n }\n }\n\n private setRadioActive(valueSelected: any): void {\n this.data.forEach((dataItem: SurveySelectorData) => {\n dataItem.checked = dataItem[this.valueKey as keyof SurveySelectorData] === valueSelected;\n });\n }\n\n private setCheckboxActive(valueSelected: any): void {\n this.data.forEach((dataItem: SurveySelectorData) => {\n const matchingKeyValue =\n Object.keys(valueSelected).find((keyValue) => keyValue === dataItem[this.valueKey as keyof SurveySelectorData]) || '';\n dataItem.checked = valueSelected[matchingKeyValue];\n });\n }\n\n private setInstantActive(valueSelected: any): void {\n this.data.forEach((dataItem: SurveySelectorData) => {\n dataItem.checked = dataItem[this.valueKey as keyof SurveySelectorData] === valueSelected;\n });\n }\n}\n","//! moment.js locale configuration\n//! locale : Macedonian [mk]\n//! author : Borislav Mickov : https://github.com/B0k0\n//! author : Sashko Todorov : https://github.com/bkyceh\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var mk = moment.defineLocale('mk', {\n months: 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split(\n '_'\n ),\n monthsShort: 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'),\n weekdays: 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split(\n '_'\n ),\n weekdaysShort: 'нед_пон_вто_сре_чет_пет_саб'.split('_'),\n weekdaysMin: 'нe_пo_вт_ср_че_пе_сa'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'D.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY H:mm',\n LLLL: 'dddd, D MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[Денес во] LT',\n nextDay: '[Утре во] LT',\n nextWeek: '[Во] dddd [во] LT',\n lastDay: '[Вчера во] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n case 3:\n case 6:\n return '[Изминатата] dddd [во] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[Изминатиот] dddd [во] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'за %s',\n past: 'пред %s',\n s: 'неколку секунди',\n ss: '%d секунди',\n m: 'една минута',\n mm: '%d минути',\n h: 'еден час',\n hh: '%d часа',\n d: 'еден ден',\n dd: '%d дена',\n M: 'еден месец',\n MM: '%d месеци',\n y: 'една година',\n yy: '%d години',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ев|ен|ти|ви|ри|ми)/,\n ordinal: function (number) {\n var lastDigit = number % 10,\n last2Digits = number % 100;\n if (number === 0) {\n return number + '-ев';\n } else if (last2Digits === 0) {\n return number + '-ен';\n } else if (last2Digits > 10 && last2Digits < 20) {\n return number + '-ти';\n } else if (lastDigit === 1) {\n return number + '-ви';\n } else if (lastDigit === 2) {\n return number + '-ри';\n } else if (lastDigit === 7 || lastDigit === 8) {\n return number + '-ми';\n } else {\n return number + '-ти';\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return mk;\n\n})));\n","// This is a magic string replaced by rollup\n\nconst SDK_VERSION = \"8.55.0\" ;\n\nexport { SDK_VERSION };\n","//! moment.js locale configuration\n//! locale : English (Singapore) [en-sg]\n//! author : Matthew Castrillon-Madrigal : https://github.com/techdimension\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enSg = moment.defineLocale('en-sg', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\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 relativeTime: {\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 M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((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 week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return enSg;\n\n})));\n","//! moment.js locale configuration\n//! locale : Vietnamese [vi]\n//! author : Bang Nguyen : https://github.com/bangnk\n//! author : Chien Kira : https://github.com/chienkira\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var vi = moment.defineLocale('vi', {\n months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split(\n '_'\n ),\n monthsShort:\n 'Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split(\n '_'\n ),\n weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),\n weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),\n weekdaysParseExact: true,\n meridiemParse: /sa|ch/i,\n isPM: function (input) {\n return /^ch$/i.test(input);\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours < 12) {\n return isLower ? 'sa' : 'SA';\n } else {\n return isLower ? 'ch' : 'CH';\n }\n },\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM [năm] YYYY',\n LLL: 'D MMMM [năm] YYYY HH:mm',\n LLLL: 'dddd, D MMMM [năm] YYYY HH:mm',\n l: 'DD/M/YYYY',\n ll: 'D MMM YYYY',\n lll: 'D MMM YYYY HH:mm',\n llll: 'ddd, D MMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Hôm nay lúc] LT',\n nextDay: '[Ngày mai lúc] LT',\n nextWeek: 'dddd [tuần tới lúc] LT',\n lastDay: '[Hôm qua lúc] LT',\n lastWeek: 'dddd [tuần trước lúc] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s tới',\n past: '%s trước',\n s: 'vài giây',\n ss: '%d giây',\n m: 'một phút',\n mm: '%d phút',\n h: 'một giờ',\n hh: '%d giờ',\n d: 'một ngày',\n dd: '%d ngày',\n w: 'một tuần',\n ww: '%d tuần',\n M: 'một tháng',\n MM: '%d tháng',\n y: 'một năm',\n yy: '%d năm',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}/,\n ordinal: function (number) {\n return number;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return vi;\n\n})));\n","import { Component, Input, OnInit } from '@angular/core';\nimport { ActivatedRoute, Params } from '@angular/router';\nimport { RoutingStateService } from '@brightside/brightside-ui-services';\nimport { isTemplateFullScreen, Settings } from '@brightside-web/desktop/data-access/shared';\n\n@Component({\n selector: 'brightside-web-display-loader',\n templateUrl: './display-loader.component.html',\n})\nexport class DisplayLoaderComponent implements OnInit {\n private filterOutTheseQueryParams = ['pageOnForwardCtaPath'];\n\n config: Settings = new Settings({\n fbPage: 'page',\n fbCategory: 'consents',\n\n pageTitle: '',\n pageSubTitle: '',\n pageCtaLabel: 'BUTTON_CONTINUE',\n pageSecondaryCtaLabel: '',\n\n pageOnForwardCtaPath: [],\n });\n\n pageIsFullScreen: boolean;\n\n constructor(private routingState: RoutingStateService, private activatedRoute: ActivatedRoute) {}\n\n ngOnInit(): void {\n this.checkForConfigViaData();\n this.checkForForwardPathInQuery();\n\n setTimeout(() => this.handleMoveForward(), 500);\n }\n\n private checkForConfigViaData() {\n if (isTemplateFullScreen(this.activatedRoute)) {\n this.pageIsFullScreen = true;\n }\n\n if (this.activatedRoute?.snapshot?.data?.pageConfig) {\n this.config = new Settings(this.activatedRoute.snapshot.data.pageConfig);\n }\n }\n\n /**\n * Method will check for a query param key for pageOnForwardCtaPath\n * this allows the loader to be more generic and have the caller of\n * the navigate to pass in the path to navigate to via params.\n *\n * ?pageOnForwardCtaPath=<routePath>\n *\n * Later the routePath will be converted to route array splitting on /\n */\n private checkForForwardPathInQuery() {\n if (this.activatedRoute.snapshot.queryParams['pageOnForwardCtaPath']) {\n if (this.config.pageOnForwardCtaPath?.length > 0) {\n console.warn(\n 'Loading route is NOT using the value for pageOnForwardCtaPath in the data since there is a query param key pageOnForwardCtaPath being passed.'\n );\n }\n\n this.config.pageOnForwardCtaPath = this.activatedRoute.snapshot.queryParams['pageOnForwardCtaPath'].split('/');\n }\n }\n\n /**\n * Call this to move any url params from the snapshot into the\n * ForwardCtaPath array. /route/:replace/test -> /route/taco/test\n *\n * Directly adjust config.pageOnForwardCtaPath as applicable\n */\n private checkAndReplaceFragmentParams() {\n //If the route snapshot has param information, see if it needs to be filled in\n if (this.activatedRoute.snapshot.params) {\n this.config.pageOnForwardCtaPath = this.config.pageOnForwardCtaPath.map((routeFragment: string) => {\n if (routeFragment.startsWith(':')) {\n const paramValue = this.activatedRoute.snapshot.params[routeFragment.slice(1)];\n\n if (!paramValue) {\n console.warn(`Your pageOnForwardCtaPath is expected params in the route with ${routeFragment} prefix.`);\n return routeFragment;\n }\n\n return paramValue;\n }\n\n return routeFragment;\n });\n }\n }\n\n /**\n * Will use filterOutTheseQueryParams string[] to filter out\n * keys that should not be passed along in the query params.\n *\n * @param queryParams Params\n * @returns Params\n */\n private filterQueryParams(queryParams: Params) {\n this.filterOutTheseQueryParams.forEach((key: string) => {\n if (queryParams[key]) {\n delete queryParams[key];\n }\n });\n\n return queryParams;\n }\n\n handleMoveForward() {\n const options = { queryParams: this.filterQueryParams({ ...this.activatedRoute?.snapshot?.queryParams }) };\n\n if (this.config.pageOnForwardCtaData && Object.keys(this.config.pageOnForwardCtaData || {}).length > 0) {\n options.queryParams = this.config.pageOnForwardCtaData;\n }\n\n this.checkAndReplaceFragmentParams();\n\n this.routingState.popAndNavigateTo(this.config.pageOnForwardCtaPath, options);\n }\n}\n","<bw-action-article [brightsideWebFb]=\"config.analyticsAttributes()\">\n <div content-section>\n <bw-spinner></bw-spinner>\n </div>\n <div footer-actions class=\"flex-row row-reverse\"></div>\n</bw-action-article>\n","<form class=\"currency-select__input\" [formGroup]=\"currencyForm\">\n <input\n [formControlName]=\"'amount'\"\n inputmode=\"decimal\"\n currencyMask\n [options]=\"currencyOptions\"\n (keydown)=\"deselectOptions()\"\n aria-label=\"Enter amount\"\n [attr.aria-invalid]=\"currencyForm.controls.amount.invalid ? 'true' : null\"\n >\n</form>\n<div\n class=\"currency-select__optional-text\"\n [ngClass]=\"{'more-space' : optionalContent.childNodes.length > 0}\">\n <typography text-small-regular color=\"var(--secondary-text)\">\n <div #optionalContent><ng-content></ng-content></div>\n </typography>\n</div>\n<div\n *ngIf=\"amountOptions\"\n class=\"currency-select__amount-options\">\n <ng-container *ngFor=\"let option of amountOptions\">\n <button\n class=\"currency-select__amount\"\n [ngClass]=\"{'selected': option.selected}\"\n (click)=\"selectOption(option)\"\n aria-label=\"Select ${{option.value}}\"\n role=\"button\">\n <typography text-small-regular>${{option.value}}</typography>\n </button>\n </ng-container>\n</div>\n\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output\n} from '@angular/core';\nimport {\n FormControl,\n FormGroup,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n Validators\n} from \"@angular/forms\";\nimport {ngxMaskOptions} from \"@brightside/brightside-ui\";\nimport {CurrencyMaskInputMode} from \"ngx-currency\";\nimport {debounceTime} from \"rxjs/operators\";\nimport {Subscription} from \"rxjs\";\n\nexport interface CurrencySelectAmountOption {\n value: number;\n selected: boolean;\n}\n\n@Component({\n selector: 'bw-new-currency-select',\n templateUrl: './new-currency-select.component.html',\n styleUrls: ['./new-currency-select.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n multi:true,\n useExisting: NewCurrencySelectComponent\n },\n {\n provide: NG_VALIDATORS,\n multi: true,\n useExisting: NewCurrencySelectComponent\n }\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class NewCurrencySelectComponent implements OnInit, OnDestroy {\n\n sub = new Subscription();\n private _keypressed: boolean;\n\n @Input() amountOptions: CurrencySelectAmountOption[];\n @Input() precision = 2;\n @Output() selectionChanged: EventEmitter<number> = new EventEmitter<number>();\n @Input() preselectedValue: number|null;\n @Input() forcedMaxValue: number|null;\n\n currencyForm: FormGroup = new FormGroup({\n amount: new FormControl('', Validators.required)\n });\n\n currencyOptions = {\n ...ngxMaskOptions,\n }\n\n constructor() {\n }\n\n ngOnInit(): void {\n this.currencyOptions = {\n ...ngxMaskOptions,\n precision: this.precision,\n prefix: '$',\n allowNegative: false,\n align: 'center',\n nullable: true,\n inputMode: CurrencyMaskInputMode.NATURAL, //Use '.FINANCIAL' for cash register type entry\n }\n this.sub.add(\n this.currencyForm.controls['amount'].valueChanges.pipe(\n debounceTime(250)\n ).subscribe(\n value => {\n if (value != null) {\n if (this.forcedMaxValue && (value > this.forcedMaxValue)) { \n this.currencyForm.controls['amount'].setValue(this.forcedMaxValue);\n } else { \n this.selectionChanged.emit(value);\n } \n }\n }\n )\n );\n this.setInitialValues();\n }\n\n setInitialValues() {\n if (this.preselectedValue) {\n this.currencyForm.controls['amount'].setValue(this.preselectedValue);\n } else if (this.amountOptions?.length > 0) {\n const selectedOption = this.amountOptions.find(option => option.selected);\n if (selectedOption) {\n this.currencyForm.controls['amount'].setValue(selectedOption.value);\n }\n }\n }\n\n selectOption(option: CurrencySelectAmountOption) {\n this.currencyForm.controls['amount'].setValue(option.value);\n const currentOption = this.amountOptions.find(opt => opt.selected);\n if (currentOption) currentOption.selected = false;\n option.selected = true;\n this._keypressed = false;\n }\n\n ngOnDestroy() {\n this.sub.unsubscribe();\n }\n\n deselectOptions() {\n if (this._keypressed) return;\n if (this.amountOptions?.length > 0) {\n const currentOption = this.amountOptions.find(opt => opt.selected);\n if (currentOption) currentOption.selected = false;\n }\n }\n}\n","//! moment.js locale configuration\n//! locale : Northern Sami [se]\n//! authors : Bård Rolstad Henriksen : https://github.com/karamell\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var se = moment.defineLocale('se', {\n months: 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split(\n '_'\n ),\n monthsShort:\n 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split('_'),\n weekdays:\n 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split(\n '_'\n ),\n weekdaysShort: 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'),\n weekdaysMin: 's_v_m_g_d_b_L'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'MMMM D. [b.] YYYY',\n LLL: 'MMMM D. [b.] YYYY [ti.] HH:mm',\n LLLL: 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm',\n },\n calendar: {\n sameDay: '[otne ti] LT',\n nextDay: '[ihttin ti] LT',\n nextWeek: 'dddd [ti] LT',\n lastDay: '[ikte ti] LT',\n lastWeek: '[ovddit] dddd [ti] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s geažes',\n past: 'maŋit %s',\n s: 'moadde sekunddat',\n ss: '%d sekunddat',\n m: 'okta minuhta',\n mm: '%d minuhtat',\n h: 'okta diimmu',\n hh: '%d diimmut',\n d: 'okta beaivi',\n dd: '%d beaivvit',\n M: 'okta mánnu',\n MM: '%d mánut',\n y: 'okta jahki',\n yy: '%d jagit',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return se;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic (Kuwait) [ar-kw]\n//! author : Nusret Parlak: https://github.com/nusretparlak\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var arKw = moment.defineLocale('ar-kw', {\n months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(\n '_'\n ),\n monthsShort:\n 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(\n '_'\n ),\n weekdays: 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات',\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return arKw;\n\n})));\n","import { Injectable, Injector } from '@angular/core';\nimport { CanActivate, CanActivateChild, ActivatedRouteSnapshot, RouterStateSnapshot, Data } from '@angular/router';\nimport { Observable, from } from 'rxjs';\nimport { BsCacheService } from \"@brightside-web/desktop/data-access/core-services\";\n\nexport enum SequentialGuardMode {\n OR = 'OR',\n AND = 'AND',\n}\n\n/**\n * https://github.com/AlexWalkerson/ng-master-guard/blob/master/master-guard.service.ts\n * Guard that makes it possible to use sequential chain of async guards\n * Example:\n *\n * import { Guard1, Guard2, Guard3 } from '@appRoot/guards';\n * ...\n * Single route\n * {\n * path: 'one',\n * canActivate: [MasterGuard],\n * data: { guards: [Guard1, Guard2, Guard3], guardsRelation: 'AND' },\n * },\n * Child Routes:\n * {\n * path: 'parent',\n * canActivateChild: [MasterGuard],\n * data: {guards: [Guard1, Guard2, Guard3]},\n * children: [\n * { path: 'child1', component: ChildComponent },\n * //override guards and their relation\n * { path: 'child2', component: ChildComponent, data: {guards: [Guard1, Guard2], guardsRelation: 'OR'} },\n * ]\n * },\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class SequentialGuard implements CanActivate, CanActivateChild {\n private route: ActivatedRouteSnapshot;\n private state: RouterStateSnapshot;\n private executor: 'canActivate' | 'canActivateChild';\n private relation: SequentialGuardMode = SequentialGuardMode.AND;\n\n constructor(\n private injector: Injector,\n private bsCacheService: BsCacheService\n ) {}\n\n public canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise<boolean> {\n this.executor = 'canActivate';\n this.route = route;\n this.state = state;\n\n return this.middleware();\n }\n\n public canActivateChild(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise<boolean> {\n this.executor = 'canActivateChild';\n this.route = route;\n this.state = state;\n return this.middleware();\n }\n\n private middleware(): Promise<boolean> {\n const data = this.findDataWithGuards(this.route);\n\n if (!data.guards || !data.guards.length) {\n return Promise.resolve(true);\n }\n\n this.relation = this.route.data.guardsRelation as SequentialGuardMode;\n\n return this.executeGuards(data.guards);\n }\n\n private findDataWithGuards(route: ActivatedRouteSnapshot | null): Data {\n if (route) {\n if (route.data.guards) {\n return route.data;\n }\n\n if (\n (route.routeConfig?.canActivateChild &&\n // eslint-disable-next-line no-bitwise\n ~route.routeConfig.canActivateChild.findIndex((guard) => this instanceof guard)) ||\n // eslint-disable-next-line no-bitwise\n (route.routeConfig?.canActivate && ~route.routeConfig.canActivate.findIndex((guard) => this instanceof guard))\n ) {\n return route.data;\n }\n\n return this.findDataWithGuards(route.parent);\n } else {\n return {};\n }\n }\n\n //Execute the guards sent in the route data\n private executeGuards(guards: Function[], guardIndex: number = 0): Promise<boolean> {\n this.logStart(guardIndex);\n\n return this.activateGuard(guards[guardIndex])\n .then((result) => {\n this.logStop(guardIndex);\n\n if (this.relation === SequentialGuardMode.AND && !result) return Promise.resolve(false);\n\n if (this.relation === SequentialGuardMode.OR && result) return Promise.resolve(true);\n\n if (guardIndex < guards.length - 1) {\n return this.executeGuards(guards, guardIndex + 1);\n } else {\n return Promise.resolve(result);\n }\n })\n .catch(() =>\n Promise.reject(false)\n );\n }\n\n private async activateGuard(token: Function): Promise<boolean> {\n const guard = this.injector.get(token);\n const onboardingFailed = await this.bsCacheService.getItem('onboardingError');\n\n let result: Observable<boolean> | Promise<boolean> | boolean;\n\n if (onboardingFailed) {\n result = true;\n } else if (['canActivate', 'canActivateChild'].includes(this.executor)) {\n result = guard[this.executor](this.route, this.state);\n } else {\n //Default to canActivate\n result = guard.canActivate(this.route, this.state);\n }\n\n if (typeof result === 'boolean') return Promise.resolve(result);\n\n return from(result).toPromise() as Promise<boolean>;\n }\n\n private logStart(index: number) {\n console.log('SequentialGuard - start guard', { guardIndex: index });\n }\n\n private logStop(index: number) {\n console.log('SequentialGuard - stop guard', { guardIndex: index });\n }\n}\n","import { Injectable, Injector } from '@angular/core';\nimport {\n ActivatedRouteSnapshot,\n CanActivate,\n CanLoad,\n Route, Router,\n RouterStateSnapshot,\n UrlSegment,\n UrlTree\n} from '@angular/router';\nimport { Observable, of } from 'rxjs';\nimport { AuthService, MobileStateService } from '@brightside-web/desktop/data-access/shared';\nimport { catchError, map, switchMap, tap } from 'rxjs/operators';\nimport { BsAuthService } from '@brightside-web/desktop/data-access/core-services';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AuthGuard implements CanLoad, CanActivate {\n\n constructor(\n private authService: AuthService,\n private router:Router,\n private _bsAuthService: BsAuthService,\n private _msSvc: MobileStateService\n ) {}\n canLoad(\n route: Route,\n segments: UrlSegment[]): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {\n\n return this.authService.hasCurrentUser().pipe(\n switchMap(hasUser => {\n if (!hasUser) {\n this.authService.redirectUrl = window.location.pathname;\n if (window.location.href.indexOf('signin=true') > -1) {\n return of(this.router.parseUrl('/sign_in'));\n } else {\n return of(this.router.parseUrl('/sign_up'));\n }\n }\n return this.checkMaintenance(route.path);\n })\n );\n }\n\n canActivate(\n route: ActivatedRouteSnapshot,\n state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {\n return this.authService.hasCurrentUser().pipe(\n switchMap(hasUser => {\n if (!hasUser) {\n this.authService.redirectUrl = state.url;\n if (window.location.href.indexOf('signin=true') > -1) {\n return of(this.router.parseUrl('/sign_in'));\n } else {\n return of(this.router.parseUrl('/sign_up'));\n }\n }\n return this.checkMaintenance(route.routeConfig?.path);\n })\n );\n }\n\n private checkMaintenance(routePath: string | undefined): Observable<boolean> {\n return this._bsAuthService.fetchUserAttributes().pipe(\n switchMap(attributes => {\n if (attributes.guid) {\n return this._msSvc.get().pipe(\n map(ms=> {\n const inMaintenance = ms.redirect === '/maintenance';\n if (inMaintenance && routePath !== '/maintenance') {\n this.router.navigate(['/maintenance']);\n return false;\n }\n return true\n }),\n catchError((error:unknown) => of(true))\n );\n }\n return of(true);\n })\n )\n }\n\n}\n","import { Injectable } from '@angular/core';\nimport {\n CanActivate,\n ActivatedRouteSnapshot,\n RouterStateSnapshot,\n UrlTree,\n Router,\n CanLoad,\n Route, UrlSegment\n} from '@angular/router';\nimport { Observable } from 'rxjs';\nimport { AuthService } from '@brightside-web/desktop/data-access/shared';\nimport { map, tap } from 'rxjs/operators';\nimport {BsAuthService} from \"@brightside-web/desktop/data-access/core-services\";\n\n@Injectable({\n providedIn: 'root'\n})\nexport class NoAuthGuard implements CanActivate, CanLoad {\n constructor(private authService: BsAuthService, private router:Router){}\n canActivate(\n next: ActivatedRouteSnapshot,\n state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {\n return this.authService.isAuthenticated().pipe(\n map(hasUser => {\n if (hasUser){\n this.router.navigate(['/home'])\n }\n return !hasUser;\n })\n );\n }\n canLoad(route: Route, segments: UrlSegment[]): Observable<boolean> | Promise<boolean> | boolean {\n return this.authService.isAuthenticated().pipe(\n map(hasUser => {\n if (hasUser){\n this.router.navigate(['/home'])\n }\n return !hasUser;\n })\n );\n }\n\n}\n","import {Injectable} from '@angular/core';\nimport {\n ActivatedRouteSnapshot,\n CanActivate,\n CanLoad,\n Route,\n Router,\n RouterStateSnapshot,\n UrlSegment, UrlTree\n} from '@angular/router';\n\nimport {\n BsCacheService\n} from '@brightside-web/desktop/data-access/core-services';\nimport {Observable, of, from} from 'rxjs';\nimport {\n MobileStateService,\n RequiredVerificationsEnums,\n RequiredVerificationService,\n VerificationStatus\n} from '@brightside-web/desktop/data-access/shared';\nimport {map, switchMap} from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class RequiredVerificationGuard implements CanActivate, CanLoad {\n verificationPathsPiece = [\n 'create-account','collect-email','employee-alias','home-address','home-address-auto', 'identity'\n ]\n\n knownEligibility = [\n 'unique_id',\n 'first_name',\n 'last_name',\n 'date_of_birth',\n 'last_four_ssn',\n 'home_zip_code',\n 'work_state'\n ]\n\n constructor(\n protected service: RequiredVerificationService,\n protected router: Router,\n private mobileStateService: MobileStateService,\n private bsCacheService: BsCacheService\n ) {}\n canActivate(\n next: ActivatedRouteSnapshot,\n state: RouterStateSnapshot): Observable<boolean | UrlTree> {\n return this.checkRequiredVerification(next.url.join('/'));\n }\n\n canLoad(route: Route, segments: UrlSegment[]): Observable<boolean | UrlTree> {\n return this.checkRequiredVerification(route.path || '');\n }\n\n private checkRequiredVerification(path: string): Observable<boolean | UrlTree> {\n return this.mobileStateService.get(true).pipe(\n switchMap(value => {\n if (value.onboardingComplete) {\n return of(true);\n } else {\n return this.service.getNextRequiredVerification().pipe(\n switchMap(resp => {\n const foundPath = this.verificationPathsPiece.some(element => path.includes(element));\n const foundEligibility = this.knownEligibility.some(element => resp.type.toLowerCase() === element.toLowerCase());\n\n if (resp.type === 'none' && foundPath) {\n return of(this.router.createUrlTree(['/']));\n }\n\n if (resp.type === 'account') {\n return of(this.router.createUrlTree(['/sso-setup/create-account']));\n } else if (resp.type === 'email') {\n return of(this.router.createUrlTree(['/sso-setup/collect-email']));\n } else if (resp.type === RequiredVerificationsEnums.HOMEADDRESS && !path.includes('home-address')) {\n return from(this.bsCacheService.getItem('useManualHomeAddressForm')).pipe(\n map(useManualHomeAddressForm => {\n const homeAddressRoute = useManualHomeAddressForm === true ? '/registration/home-address' : '/registration/home-address-auto';\n return this.router.createUrlTree([homeAddressRoute]);\n })\n );\n } else if (foundEligibility && !path.includes('identity') && !this.service.isIdentityCompleted) {\n return of(this.router.createUrlTree(['/registration/identity']));\n }\n\n return of(true);\n })\n );\n }\n })\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n CanActivate,\n CanActivateChild,\n CanLoad,\n Route,\n UrlSegment,\n ActivatedRouteSnapshot,\n RouterStateSnapshot,\n UrlTree, Router,\n} from '@angular/router';\nimport {Observable, of,} from 'rxjs';\nimport { BsHubService } from '@brightside-web/desktop/data-access/core-services';\nimport { map } from 'rxjs/operators';\nimport {MobileStateService} from \"@brightside-web/desktop/data-access/shared\";\n\n@Injectable({\n providedIn: 'root',\n})\nexport class OnboardingCompleteGuard implements CanActivate, CanActivateChild, CanLoad {\n\n hasOnboardingCompleted: boolean;\n\n constructor(\n private mobileStateService: MobileStateService,\n private router: Router,\n private bsHubService: BsHubService\n ) {}\n\n canActivate(next: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> {\n return this.getOnboardingCompleteFromMS(state);\n }\n\n canActivateChild(\n next: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {\n return this.getOnboardingCompleteFromMS();\n }\n\n canLoad(route: Route, segments: UrlSegment[]): Observable<boolean> | Promise<boolean> | boolean {\n return this.getOnboardingCompleteFromMS();\n }\n\n getOnboardingCompleteFromMS(state?:RouterStateSnapshot) : Observable<boolean> {\n\n let byPassRedirect = false;\n if (state && state.url.indexOf('creditScore') > -1) {\n byPassRedirect = true;\n }\n\n if (this.hasOnboardingCompleted) {\n this.bsHubService.dispatch('OnboardingChannel', { event: 'OnboardingComplete', message: 'cleared guard' });\n return of(true);\n }\n\n return this.mobileStateService.get().pipe(\n map( (value => {\n if (value.onboardingComplete) {\n this.hasOnboardingCompleted = true;\n this.bsHubService.dispatch('OnboardingChannel', { event: 'OnboardingComplete', message: 'cleared guard' });\n if (window.location.href.includes('/authenticating')) {\n this.router.navigate(['home']);\n }\n return true;\n } else if (value.redirect === \"onboarding\" && !byPassRedirect ) {\n this.router.navigate(['onboarding']);\n return false;\n }\n return true;\n }))\n );\n }\n\n}\n","import { Injectable } from '@angular/core';\nimport {ActivatedRouteSnapshot, NavigationEnd, Route, Router, RouterStateSnapshot, UrlSegment} from \"@angular/router\";\nimport {Observable, of, Subscription} from \"rxjs\";\nimport {\n MobileStateResponse,\n MobileStateService,\n ProdEligReqFieldsInterface,\n ProdEligResponseInterface,\n ProductEligibilityService, ProductPostIntroMapping,\n VerificationStatusService\n} from \"@brightside-web/desktop/data-access/shared\";\nimport {map, switchMap} from \"rxjs/operators\";\n\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ProductVerificationGuard {\n\n sub = new Subscription();\n productEligibilityResp: ProdEligResponseInterface;\n nonRequiredFields = ['middle_name', 'address2'];\n\n constructor(\n private verificationStatus: VerificationStatusService,\n private router: Router,\n private prodElgSvc: ProductEligibilityService,\n private mobileStateService: MobileStateService,\n ) {}\n\n canActivate(route: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): Observable<boolean> {\n return of(true)\n }\n\n canActivateChild(\n route: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): Observable<boolean> {\n return this.mobileStateService.get(true).pipe(\n switchMap( ms => {\n if (ms.spendingAccount || ms.savingsAccount || ms.externalSavings) {\n return of(true);\n } else if (this.productEligibilityResp) {\n return of(this.canClientActivate(route, state));\n } else {\n return this.prodElgSvc.getProductEligibility().pipe(\n map(response => {\n this.productEligibilityResp = response;\n return this.canClientActivate(route, state);\n })\n );\n }\n })\n );\n }\n\n\n canClientActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {\n if (Object.keys(ProductPostIntroMapping).includes(state.url) && !route.queryParams.fromFormSubmission) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const productType = ProductPostIntroMapping[state.url];\n const productFields = this.productEligibilityResp.products.find(product => product.name.toLowerCase() === productType.toLowerCase());\n if (productFields &&\n productFields.required_fields &&\n productFields.required_fields.length > 0) {\n const shouldContinueArray = [];\n productFields.required_fields.forEach(field => {\n if (!field.not_replayable) {\n if (this.prodElgSvc.testReqValueForEmpty(field)) {\n shouldContinueArray.push(field);\n }\n }\n if (field.sub_fields) {\n field.sub_fields.forEach( subField => {\n if (!subField.not_replayable) {\n if (this.prodElgSvc.testReqValueForEmpty(subField)) {\n shouldContinueArray.push(subField);\n }\n }\n })\n }\n });\n if (shouldContinueArray.length > 0) {\n this.router.navigate([`/verification/identity/${productType}`]);\n return false;\n }\n }\n }\n return true;\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n ActivatedRouteSnapshot,\n CanActivate,\n CanLoad,\n Route, Router,\n RouterStateSnapshot,\n UrlSegment,\n UrlTree\n} from '@angular/router';\nimport {from, Observable, of} from 'rxjs';\nimport { AuthService } from '@brightside-web/desktop/data-access/shared';\nimport {\n BsAuthService,\n BsCacheService\n} from \"@brightside-web/desktop/data-access/core-services\";\nimport {map, tap} from \"rxjs/operators\";\n\n@Injectable({\n providedIn: 'root'\n})\nexport class GuidGuard implements CanActivate {\n constructor(\n private authService: AuthService,\n private router:Router,\n private bsAuthService: BsAuthService,\n private bsCacheService: BsCacheService\n ) {}\n\n canActivate(\n route: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): Observable<boolean | UrlTree> {\n return from(this.bsAuthService.fetchUserAttributes()).pipe(\n map(attributes => {\n if (!attributes) {\n this.router.navigate(['registration/create-account']);\n return false;\n } else {\n if (state.url.includes('home')) {\n if (attributes['guid']) {\n return true;\n } else {\n this.router.navigate(['registration/select-employer']);\n return false;\n }\n } else {\n // else is meant to cover registration paths\n if (attributes['guid']) {\n this.router.navigate(['/home']);\n return false;\n } else {\n return true;\n }\n }\n }\n })\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n CanActivate,\n ActivatedRouteSnapshot,\n RouterStateSnapshot,\n UrlTree,\n Router, Params\n} from '@angular/router';\nimport { Observable, of } from 'rxjs';\nimport { AuthService } from '@brightside-web/desktop/data-access/shared';\n\nimport {RegistrationService} from \"@brightside-web/desktop/data-access/onboarding\";\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ReferralGuard implements CanActivate {\n\n referrerConfigs : { [p:string]: string[] } = {\n 'assistant' : ['referrerType', 'firstName', 'employmentType', 'company'],\n 'client' : ['referrerType', 'firstName']\n };\n\n constructor(\n private authService: AuthService,\n private router: Router,\n private regSvc: RegistrationService ){}\n\n canActivate(\n next: ActivatedRouteSnapshot,\n state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {\n\n const referrerType = this.whichReferrer(next.queryParams);\n const hasAllParams = this.allParamsPresent(next.queryParams, referrerType);\n if (hasAllParams && referrerType === 'assistant') {\n this.regSvc.storeReferralToSession();\n this.regSvc.skipAccountCreation = true;\n }\n\n switch (next.routeConfig?.path) {\n case 'create-account':\n if (hasAllParams) {\n this.router.navigate(['registration/referral'], {queryParams: next.queryParams});\n return of(false);\n } else {\n return of(true);\n }\n break;\n case 'referral':\n if (hasAllParams) {\n return of(true);\n } else {\n this.router.navigate(['home']);\n return of(false);\n }\n break;\n default:\n return of(true);\n }\n }\n\n whichReferrer(queryParams: Params) : string {\n if (queryParams.referrerType) {\n const configKeys = Object.keys(this.referrerConfigs);\n for (let i = 0; i < configKeys.length; i++) {\n if (queryParams.referrerType === configKeys[i]) {\n return configKeys[i];\n break;\n }\n }\n }\n return '';\n }\n\n allParamsPresent(params: Params, referrerType: string) {\n if (referrerType) {\n const referrerConfig = this.referrerConfigs[referrerType];\n let foundParams = 0;\n for (let i = 0; i < referrerConfig.length; i++) {\n if (params[referrerConfig[i]]) {\n foundParams++;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.regSvc.referralItems[referrerConfig[i]] = params[referrerConfig[i]];\n }\n }\n return foundParams >= referrerConfig.length;\n } else {\n return false;\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n CanActivate,\n ActivatedRouteSnapshot,\n RouterStateSnapshot,\n UrlTree,\n Router\n} from '@angular/router';\nimport {forkJoin, from, Observable, of} from 'rxjs';\nimport { AuthService } from '@brightside-web/desktop/data-access/shared';\nimport {RegistrationService} from \"@brightside-web/desktop/data-access/onboarding\";\nimport { BsCacheService } from \"@brightside-web/desktop/data-access/core-services\";\nimport {map} from \"rxjs/operators\";\n\n@Injectable({\n providedIn: 'root'\n})\nexport class IdentityGuard implements CanActivate {\n\n neededParams: string[]= ['referrerType', 'firstName', 'clientType', 'company'];\n\n constructor(\n private authService: AuthService,\n private router: Router,\n private regSvc: RegistrationService,\n private bsCacheService: BsCacheService){}\n\n canActivate(\n next: ActivatedRouteSnapshot,\n state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {\n if (this.regSvc.skipAccountCreation) {\n return of(true);\n }\n return forkJoin([\n from(this.bsCacheService.getItem('customerType')),\n from(this.bsCacheService.getItem('employmentType'))\n ]).pipe(\n map(([customerType,employmentType]) => {\n if (customerType && employmentType) {\n return true;\n } else {\n return this.router.createUrlTree(['registration/type']);\n }\n })\n );\n }\n\n}\n","import {ErrorHandler, Injectable, Injector} from '@angular/core';\nimport { ToastService } from '@brightside/brightside-ui-services';\nimport { AmplitudeService } from \"@brightside-web/desktop/data-access/shared\";\nimport { LocationStrategy, PathLocationStrategy } from \"@angular/common\";\nimport { HttpErrorResponse } from \"@angular/common/http\";\nimport * as StackTrace from \"stacktrace-js\";\nimport {TranslateService} from \"@ngx-translate/core\";\n\n@Injectable({\n providedIn: 'root',\n})\nexport class BsErrorHandler implements ErrorHandler {\n constructor(private toasty:ToastService, private amplitudeService: AmplitudeService, private injector: Injector, private translateSvc: TranslateService) {\n }\n // ideally we would fix the root cause of these issues so we don't have to ignore them\n ignoreErrors = [\"No current user\", \"ExpressionChangedAfterItHasBeenCheckedError\", \"Http failure during parsing for\"]\n async handleError(error: any): Promise<void> {\n\n //TODO: should the no current user redirect to some way to relogin/refresh the token?\n const contextInfo = await this.addContextInfo(error);\n\n const errMsg = this.translateSvc.instant('ERROR_TITLE_GENERAL') ?? 'Something went wrong';\n if (error.message && !this.ignoreErrors.find(ignore => error.message.includes(ignore))) {\n console.error(error);\n this.toasty.error(errMsg, {transient:false})\n this.amplitudeService.incrementErrorsViewed();\n this.amplitudeService.logEvent(`error_logged`, contextInfo as unknown as {[key:string]:string});\n }\n console.error(JSON.stringify(contextInfo));\n }\n async addContextInfo(error:any) {\n const name = error.name || null;\n const location = this.injector.get(LocationStrategy);\n const url = location instanceof PathLocationStrategy ? location.path() : \"\";\n const agent = navigator.userAgent;\n const message = error.message || error.toString();\n let stack = null;\n if (!(error instanceof HttpErrorResponse)) {\n try {\n // we have to do an await to get source mapping on the stack\n const frames = await StackTrace.fromError(error);\n if (frames && frames.length) {\n stack = frames[0];\n }\n } catch (e){}\n }\n return { name, url, agent, message, stack: JSON.stringify(stack) };\n }\n}\n","import {AbstractControl, ValidationErrors, ValidatorFn} from '@angular/forms';\n\nexport const AgeValidator = (): ValidatorFn =>\n (control: AbstractControl): { [key: string]: any } | null => {\n const currentYear = new Date().getFullYear();\n if (control.value) {\n const inputDate = control.value;\n const inputYear = inputDate.split('-')[0];\n const age = currentYear - inputYear;\n\n if (age < 18 || age > 120) {\n return { invalidAge: true };\n }\n }\n return null;\n };\n\n","import {\n AbstractControl,\n AsyncValidatorFn,\n FormControl,\n ValidationErrors,\n ValidatorFn,\n Validators\n} from '@angular/forms';\nimport { AgeValidator } from '../validators/validators';\n\n\nexport interface DisplayFormControlConfig {\n infoKey?: string;\n classes?: string;\n styles?: string;\n key: string;\n control: FormControl;\n label?: string;\n labelKey?: string;\n type: string;\n errorText?: string;\n errorTextKey?: string;\n showInfo?: boolean;\n inputInfo?: InputInfoInterface;\n hasFocus?: boolean;\n inputOptions?: {\n initialValue?: string | number;\n placeholder?: string;\n mask?: string;\n minlength?: number;\n maxlength?: number;\n pattern?: any;\n link?: { path: string[]; text: string; textKey?: string };\n\n beginValidationOn?: AngularFormControlValidationTypes;\n\n inputHintText?: string;\n inputHintTextKey?: string;\n suffixIconName?: string;\n togglePassword?: boolean;\n // select is using a 3rd party component that does not translate for us, selectOptions and selectConfig must be PRE-translated\n selectOptions?: {\n name: string;\n code: string;\n }[];\n selectConfig?: { [key: string]: unknown };\n };\n}\n\nexport interface InputInfoInterface {\n infoKey: string;\n titleKey: string;\n bodykey: string;\n ctaKey: string;\n eventName: string;\n}\n\nexport enum AngularFormControlValidationTypes {\n TOUCHED = 'touched',\n DIRTY = 'dirty'\n}\n\nexport const CONTROL_FNAME: DisplayFormControlConfig = {\n key: 'fName',\n labelKey: 'FIRST_NAME',\n control: new FormControl('', [Validators.required, Validators.minLength(2)]),\n type: 'text',\n errorTextKey: 'VERIFY_EMPLOYEES_FIRST_NAME_ERROR',\n inputOptions: {\n minlength: 2,\n },\n};\n\nexport const CONTROL_FNAME_PRIMARY: DisplayFormControlConfig = {\n key: 'fName',\n labelKey: 'FIRST_NAME',\n control: new FormControl('', [Validators.required, Validators.minLength(2)]),\n type: 'text',\n errorTextKey: 'VERIFY_EMPLOYEES_FIRST_NAME_ERROR',\n inputOptions: {\n minlength: 2,\n },\n classes: 'flex-item-half'\n};\n\nexport const CONTROL_MNAME: DisplayFormControlConfig = {\n key: 'mName',\n label: 'Middle Name(s)',\n labelKey: 'MIDDLE_NAME',\n control: new FormControl('', []),\n type: 'text',\n inputOptions: {\n minlength: 2,\n },\n};\n\nexport const CONTROL_LNAME: DisplayFormControlConfig = {\n key: 'lName',\n labelKey: 'LAST_NAME',\n control: new FormControl('', [Validators.required, Validators.minLength(2)]),\n type: 'text',\n errorTextKey: 'VERIFY_EMPLOYEES_LAST_NAME_ERROR',\n inputOptions: {\n minlength: 2,\n },\n};\n\nexport const CONTROL_LNAME_PRIMARY: DisplayFormControlConfig = {\n key: 'lName',\n labelKey: 'LAST_NAME',\n control: new FormControl('', [Validators.required, Validators.minLength(2)]),\n type: 'text',\n errorTextKey: 'VERIFY_EMPLOYEES_LAST_NAME_ERROR',\n inputOptions: {\n minlength: 2,\n },\n\n classes: 'flex-item-half'\n};\n\nexport const CONTROL_DOB: DisplayFormControlConfig = {\n key: 'dateOfBirth',\n label: 'Date of birth',\n labelKey: 'DATE_OF_BIRTH',\n control: new FormControl('', [\n Validators.required,\n //Validators.pattern('(0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])[- /.](19|20)\\\\d\\\\d'),\n Validators.minLength(10),\n Validators.maxLength(10),\n AgeValidator(),\n ]),\n type: 'date',\n errorTextKey: 'VERIFY_EMPLOYEES_DOB_ERROR',\n inputOptions: {\n //pattern: '(0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])[- /.](19|20)\\\\d\\\\d',\n },\n};\n\nexport const CONTROL_DOB_PRIMARY: DisplayFormControlConfig = {\n key: 'dateOfBirth',\n label: 'Date of birth',\n labelKey: 'DATE_OF_BIRTH',\n control: new FormControl('', [\n Validators.required,\n //Validators.pattern('(0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])[- /.](19|20)\\\\d\\\\d'),\n Validators.minLength(10),\n Validators.maxLength(10),\n AgeValidator(),\n ]),\n type: 'date',\n errorTextKey: 'VERIFY_EMPLOYEES_DOB_ERROR',\n inputOptions: {\n //pattern: '(0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])[- /.](19|20)\\\\d\\\\d',\n },\n classes: 'flex-item-flexible max-form-width'\n};\n\nexport const CONTROL_LAST_FOUR: DisplayFormControlConfig = {\n key: 'lastFourSSN',\n label: 'Last 4 SSN',\n labelKey: 'LAST_4_SSN',\n control: new FormControl('', [\n Validators.required,\n Validators.maxLength(4),\n Validators.minLength(4),\n Validators.pattern('(\\\\d{4})'),\n ]),\n type: 'text',\n errorText: 'Please enter last 4 digits of your recipient’s SSN.',\n errorTextKey: 'ERROR_EMPTY_SSN',\n inputOptions: {\n mask: 'XXXX',\n minlength: 4,\n maxlength: 4,\n //pattern: '(\\\\d{4})',\n },\n};\n\nexport const CONTROL_LAST_FOUR_PRIMARY: DisplayFormControlConfig = {\n key: 'lastFourSSN',\n label: 'Last 4 SSN',\n labelKey: 'LAST_4_SSN',\n control: new FormControl('', [\n Validators.required,\n Validators.maxLength(4),\n Validators.minLength(4),\n Validators.pattern('(\\\\d{4})'),\n ]),\n type: 'text',\n errorText: 'Please enter last 4 digits of your recipient’s SSN.',\n errorTextKey: 'ERROR_EMPTY_SSN',\n inputOptions: {\n mask: 'XXXX',\n minlength: 4,\n maxlength: 4,\n //pattern: '(\\\\d{4})',\n },\n classes: 'flex-item-flexible max-form-width'\n};\n\nexport const CONTROL_SSN: DisplayFormControlConfig = {\n key: 'fullSSN',\n label: 'Social Security Number',\n labelKey: 'SOCIAL_SECURITY_NUMBER',\n control: new FormControl('', [Validators.required, Validators.maxLength(11), Validators.minLength(11)]),\n type: 'text',\n errorText: 'Please enter a valid SSN.',\n errorTextKey: 'ERROR_INVALID_SSN',\n inputOptions: {\n placeholder: 'XXX-XX-XXXX',\n mask: '000-00-0000',\n minlength: 11,\n maxlength: 11,\n inputHintText: 'We use AES-256 encryption to secure your data',\n inputHintTextKey: 'ENCRYPTION_DESC',\n suffixIconName: 'lock',\n },\n};\n\nexport const CONTROL_EMAIL: DisplayFormControlConfig = {\n key: 'email',\n label: 'Email address',\n control: new FormControl('', [Validators.required, Validators.minLength(2)]),\n type: 'text',\n errorText: 'Please enter your recipient’s email.',\n inputOptions: {\n minlength: 2,\n },\n};\n\nexport const CONTROL_PHONE: DisplayFormControlConfig = {\n key: 'phoneNumber',\n label: 'Phone number',\n control: new FormControl('', [Validators.required, Validators.minLength(2)]),\n type: 'phone',\n errorText: 'Please enter your recipient’s phone number.',\n inputOptions: {\n minlength: 2,\n },\n};\n\nexport const CONTROL_ZIP: DisplayFormControlConfig = {\n key: 'zipCode',\n labelKey: 'ADDRESS_ZIP_CODE',\n control: new FormControl('', [\n Validators.required, Validators.maxLength(5),\n Validators.minLength(5)\n ]),\n type: 'text',\n errorTextKey: 'VERIFY_EMPLOYEES_ZIP_ERROR',\n inputOptions: {\n minlength: 5,\n maxlength: 5,\n pattern: '^[0-9]{5}?$'\n },\n};\n\nexport const CONTROL_ZIP_PRIMARY: DisplayFormControlConfig = {\n key: 'zipCode',\n labelKey: 'ADDRESS_ZIP_CODE',\n control: new FormControl('', [\n Validators.required, Validators.maxLength(5),\n Validators.minLength(5)\n ]),\n type: 'text',\n errorTextKey: 'VERIFY_EMPLOYEES_ZIP_ERROR',\n inputOptions: {\n minlength: 5,\n maxlength: 5,\n pattern: '^[0-9]{5}?$'\n },\n classes: 'flex-item-flexible max-form-width'\n};\n\nexport const CONTROL_STREET_ADDRESS_LINE_ONE: DisplayFormControlConfig = {\n key: 'streetAddressLineOne',\n label: 'Street address',\n labelKey: 'ADDRESS1_TITLE',\n control: new FormControl('', [Validators.required]),\n type: 'text',\n errorText: 'Please enter your address.',\n errorTextKey: 'Please enter your address.',\n};\n\nexport const CONTROL_STREET_ADDRESS_LINE_TWO: DisplayFormControlConfig = {\n key: 'streetAddressLineTwo',\n label: 'Street address 2 (Optional)',\n labelKey: 'ADDRESS2_TITLE',\n control: new FormControl(''),\n type: 'text',\n errorText: 'Please enter your address.',\n errorTextKey: 'Please enter your address.',\n};\n\nexport const CONTROL_ADDRESS_CITY: DisplayFormControlConfig = {\n key: 'addressCity',\n label: 'City',\n labelKey: 'CITY_TITLE',\n control: new FormControl('', [Validators.required]),\n type: 'text',\n errorText: 'Please enter your City.',\n errorTextKey: 'Please enter your City.',\n};\n\nexport const CONTROL_ADDRESS_STATE: DisplayFormControlConfig = {\n key: 'addressState',\n label: 'State',\n labelKey: 'STATE_TITLE',\n control: new FormControl('', [Validators.required, Validators.minLength(2), Validators.maxLength(2)]),\n type: 'text',\n errorText: 'Please enter your State.',\n errorTextKey: 'Please enter your State.',\n inputOptions: {\n minlength: 2,\n maxlength: 2,\n pattern:\n '^(([Aa][EeLlKkSsZzRr])|([Cc][AaOoTt])|([Dd][EeCc])|([Ff][MmLl])|([Gg][AaUu])|([Hh][Ii])|([Ii][DdLlNnAa])|([Kk][SsYy])|([Ll][Aa])|([Mm][EeHhDdAaIiNnSsOoTt])|([Nn][EeVvHhJjMmYyCcDd])|([Mm][Pp])|([Oo][HhKkRr])|([Pp][WwAaRr])|([Rr][Ii])|([Ss][CcDd])|([Tt][NnXx])|([Uu][Tt])|([Vv][TtIiAa])|([Ww][AaVvIiYy]))$',\n },\n};\n\n\nfunction fullStateValidator(): ValidatorFn {\n\n return (control: AbstractControl): ValidationErrors | null => {\n let statesArray = ['Alabama','Alaska','American Samoa','Arizona','Arkansas','California','Colorado','Connecticut','Delaware','District of Columbia','Federated States of Micronesia','Florida','Georgia','Guam','Hawaii','Idaho','Illinois','Indiana','Iowa','Kansas','Kentucky','Louisiana','Maine','Marshall Islands','Maryland','Massachusetts','Michigan','Minnesota','Mississippi','Missouri','Montana','Nebraska','Nevada','New Hampshire','New Jersey','New Mexico','New York','North Carolina','North Dakota','Northern Mariana Islands','Ohio','Oklahoma','Oregon','Palau','Pennsylvania','Puerto Rico','Rhode Island','South Carolina','South Dakota','Tennessee','Texas','Utah','Vermont','Virgin Island','Virginia','Washington','West Virginia','Wisconsin','Wyoming'];\n statesArray = statesArray.map(state => state.toLowerCase());\n let stateFound = false;\n if (statesArray.includes(control.value.toLowerCase())) stateFound = true;\n return !stateFound ? {stateNotFound: 'state not found'} : null;\n }\n}\n\nexport const CONTROL_ADDRESS_WORK_STATE: DisplayFormControlConfig = {\n key: 'workState',\n label: 'Work State',\n labelKey: 'WORK_STATE_TITLE',\n control: new FormControl('', [Validators.required, fullStateValidator()]),\n type: 'text',\n errorTextKey: 'Please enter your Work State.',\n inputOptions: {},\n};\n\n\n\nexport const CONTROL_ADDRESS_ZIP: DisplayFormControlConfig = {\n key: 'zipCode',\n label: 'Zip code',\n control: new FormControl('', [Validators.required, Validators.maxLength(5), Validators.minLength(5)]),\n type: 'text',\n errorText: \"Please enter the employees' zip code\",\n errorTextKey: \"VERIFY_EMPLOYEES_ZIP_ERROR\",\n inputOptions: {\n minlength: 5,\n maxlength: 5,\n pattern: '^[0-9]{5}?$',\n },\n};\n\nexport const CONTROL_SALARY: DisplayFormControlConfig = {\n key: 'annualSalary',\n labelKey: 'ANNUAL_INCOME',\n control: new FormControl('', [Validators.required, Validators.min(1)]),\n type: 'text',\n errorTextKey: 'VERIFY_IDENTITY_SALARY_ERROR',\n};\n","import {AbstractControl, FormControl, ValidationErrors, ValidatorFn, Validators} from \"@angular/forms\";\nimport {AngularFormControlValidationTypes, DisplayFormControlConfig} from \"@brightside-web/shared/desktop\";\nimport {FirebaseService, ClientConfirmationErrorCodes as errorCodes} from \"@brightside-web/desktop/data-access/shared\";\n\nexport interface EmployeeIdRules {\n company: string;\n rules: EmployeeIdRule[];\n allowAlreadyExists?: boolean;\n allowDoesNotExist?: boolean;\n consentsKey?: string;\n}\n\nexport interface EmployeeIdRule {\n regex: string;\n key?: string;\n match?: boolean;\n}\n\nexport class UniqueIDFormElement {\n aliasRulesArray: any[] = [];\n aliasValidatorRules: EmployeeIdRules;\n\n\n public CONTROL_UNIQUE_ID: DisplayFormControlConfig = {\n key: 'uniqueId',\n labelKey: 'ALIAS_TITLE',\n control: new FormControl('',\n [Validators.required]\n ),\n type: 'text',\n errorTextKey: '',\n inputOptions: {\n beginValidationOn: AngularFormControlValidationTypes.DIRTY\n },\n inputInfo: {\n infoKey: 'ALIAS_INFO_BUTTON',\n titleKey: 'BADGE_ID_HELP_HALFSHEET_TITLE',\n bodykey: 'BADGE_ID_HELP_HALFSHEET_DESC',\n ctaKey: 'GOT_IT',\n eventName: 'employee_id_moreinfo'\n }\n };\n\n constructor(private firebase: FirebaseService) {\n }\n\n private splitDotJoin(stringToMod: string) : string {\n return stringToMod.toLowerCase().split(' ').join('_');\n }\n\n public aliasValidator(company: string) : ValidatorFn {\n\n if (this.aliasRulesArray.length === 0) {\n this.aliasRulesArray = JSON.parse(this.firebase.getValueAsString('employeeIdRules'));\n }\n\n this.aliasValidatorRules = this.aliasRulesArray.find(ruleSet => this.splitDotJoin(ruleSet.company) === this.splitDotJoin(company));\n\n return (control: AbstractControl): ValidationErrors | null => {\n\n let rulesMatch;\n let errorTextKey = '';\n\n if (this.aliasValidatorRules) {\n const aliasRules = this.aliasValidatorRules as EmployeeIdRules\n rulesMatch = aliasRules.rules.find(rule => {\n if (rule.match) {\n return !control.value.match(rule.regex);\n } else {\n return control.value.match(rule.regex);\n }\n });\n } else {\n return null;\n };\n\n if (rulesMatch && rulesMatch.key) {\n errorTextKey = rulesMatch.key.toUpperCase();\n this.CONTROL_UNIQUE_ID.errorTextKey = errorTextKey;\n } else {\n this.CONTROL_UNIQUE_ID.errorTextKey = '';\n }\n\n return rulesMatch ? {forbiddenValue: {value: control.value}, errorTextKey:errorTextKey} : null;\n };\n }\n\n}\n","import { Injectable } from '@angular/core';\nimport {\n ActivatedRouteSnapshot,\n CanActivate,\n Router,\n RouterStateSnapshot,\n UrlTree\n} from '@angular/router';\nimport { Observable } from 'rxjs';\nimport { EligibleProduct, MobileStateService } from '@brightside-web/desktop/data-access/shared';\nimport { map } from 'rxjs/operators';\nimport { SimpleGlobalModalService } from '@brightside-web/desktop/data-access/core-services';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class HouseholdInviteGuard implements CanActivate {\n constructor(\n private _msService: MobileStateService,\n private _modalService: SimpleGlobalModalService,\n private _router: Router,\n ) {}\n\n canActivate(\n route: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {\n return this._canInviteHousehold();\n }\n\n private _canInviteHousehold(): Observable<boolean> {\n return this._msService.get().pipe(\n map((ms) => {\n if (ms.products?.includes(EligibleProduct.invite)) {\n return true;\n } else {\n this._modalService.createModal({\n eventName: 'household_invite_ineligible',\n title: 'HOUSEHOLD_INVITE_INELIGIBLE_TITLE',\n contentKey: 'HOUSEHOLD_INVITE_INELIGIBLE_DESC',\n displayCloseButton: true,\n isError: false,\n size: 'medium',\n ctaKey: 'CLOSE',\n ctaAction: () => {\n this._modalService.clearModal();\n this._router.navigate(['/home']);\n },\n closeAction:() => {\n this._modalService.clearModal();\n this._router.navigate(['/home']);\n }\n });\n return false;\n }\n })\n );\n }\n}\n","<bw-modal modalWidth=\"medium\">\n <typography title-medium>{{model.title}}</typography>\n <typography *ngFor=\"let text of model.bodyText\" class=\"body mb-md\" text-large-regular color=\"var(--secondary-text)\">\n {{text}}\n </typography>\n <div class=\"footer flex-row row-reverse\">\n <button bw-button (click)=\"primaryCtaClick($event);\">\n <typography text-large-semibold>{{model.primaryCta}}</typography></button>\n <button bw-link-button class=\"mr-xs\" (click)=\"secondaryCtaClick($event)\" *ngIf=\"model.secondaryCta\">{{model.secondaryCta}}</button>\n </div>\n</bw-modal>\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { ModalModel } from '@brightside-web/desktop/data-access/shared';\n\n@Component({\n selector: 'brightside-web-generic-modal',\n templateUrl: './generic-modal.component.html',\n styleUrls: ['./generic-modal.component.scss'],\n})\nexport class GenericModalComponent {\n @Input() fbPage: string;\n @Input() fbCategory: string;\n @Input() fbAction: string;\n @Input() model: ModalModel;\n @Output() primaryClick = new EventEmitter();\n @Output() secondaryClick = new EventEmitter();\n constructor() {}\n\n primaryCtaClick($event: MouseEvent) {\n this.primaryClick.emit($event);\n }\n\n secondaryCtaClick($event: MouseEvent) {\n this.secondaryClick.emit($event);\n }\n}\n","<div *ngIf=\"!hideCard\" class=\"card mb-md mr-md\">\n <ng-container [ngSwitch]=\"displayType\">\n <bw-card\n *ngSwitchCase=\"displayTypes.ACTIVE_DEFAULT\"\n cardType=\"promo\"\n [cardTextColor]=\"card.closeable ? 'var(--primary-text)' : 'var(--blue-70)'\"\n [title]=\"card.title | translate\"\n [bgImageSrc]=\"card.graphic\"\n [closeable]=\"card.closeable\"\n (closeCard)=\"completeCardHandler()\"\n >\n <bw-card-body>{{ card.subText | translate }}</bw-card-body>\n <bw-card-footer>\n <button *ngIf=\"card.cta && card.closeable\" bw-outlined-button (click)=\"ctaHandler($event)\">{{ card.cta | translate }}</button>\n <button\n *ngIf=\"card.cta && !card.closeable\"\n bw-button\n [processing]=\"card.processing\"\n (click)=\"ctaHandler($event); card.processing = true;\">\n {{ card.cta | translate }}\n </button>\n </bw-card-footer>\n </bw-card>\n\n <bw-card\n *ngSwitchCase=\"displayTypes.ACTIVE\"\n cardType=\"active-product\"\n [title]=\"card.title | translate\" (cardAction)=\"ctaHandler($event)\">\n <bw-card-header>\n <ng-container *ngFor=\"let segment of infoSegments\">\n <div class=\"flex-row pointer\" (click)=\"bannerHandler($event)\">\n <typography text-small-regular class=\"disabled-text mr-xs\">{{ segment.title | translate }}</typography>\n <!-- the icon is not stored in the segment anywhere so we will presume to show it when the cta is for a modal -->\n <bw-icon\n *ngIf=\"segment.ctaPath && segment.ctaPath.includes('modal:')\"\n size=\"16\"\n iconName=\"information\"\n color=\"var(--disabled-text)\"\n ></bw-icon>\n </div>\n </ng-container>\n </bw-card-header>\n <bw-card-body>\n <div class=\"flex-row space-between pointer\">\n <ng-container *ngFor=\"let segment of defaultSegments\">\n <div class=\"flex-row\">\n <bw-icon [iconName]=\"segment.icon\" horizontalSpace=\"mr-sm\" color=\"var(--brand)\"></bw-icon>\n <typography text-large-regular>{{ segment.title | translate }}</typography>\n </div>\n <typography *ngIf=\"segment.type === 'Cta'; else dynamicValueDisplay\" text-large-semibold>\n <a bw-anchor [routerLink]=\"segment.ctaPath\" class=\"bs-blue brand pr-xl\">View</a>\n </typography>\n\n <ng-template #dynamicValueDisplay>\n <typography text-large-regular>{{ segment.dynamicValue | translate }}</typography>\n </ng-template>\n </ng-container>\n </div>\n <div class=\"flex-row space-between pointer\">\n <ng-container *ngFor=\"let segment of ctaSegments\">\n <div class=\"flex-row\">\n <bw-icon\n size=\"32\"\n [iconName]=\"segment.icon\"\n horizontalSpace=\"mr-sm\"\n color=\"var(--brand)\"\n backgroundColor=\"var(--bg-gray)\"\n ></bw-icon>\n <div class=\"flex-column\">\n <typography text-small-semibold color=\"var(--brand)\">{{ segment.title | translate }}</typography>\n <typography text-small-regular>{{ segment.subText | translate }}</typography>\n </div>\n </div>\n </ng-container>\n </div>\n </bw-card-body>\n <bw-card-banner [cardBannerColor]=\"cardBannerColor\" *ngIf=\"errorFooter\" (click)=\"errorStateClickHandler($event)\">\n <div class=\"flex-row\" [ngClass]=\"{'pointer': errorFooter.ctaPath}\">\n <div class=\"flex-row\">\n <bw-icon iconName=\"alert\" size='16' color=\"var(--red-50)\" horizontalSpace=\"mr-xs\"></bw-icon>\n <typography text-small-regular class=\"primary-text\">{{ errorFooter.title | translate }}</typography>\n </div>\n </div>\n </bw-card-banner>\n </bw-card>\n\n <bw-card *ngSwitchCase=\"displayTypes.ACTIVE_LOCKED\" cardType=\"info\" [title]=\"card.title | translate\" (click)=\"clickHandler()\">\n <bw-card-body>\n <div class=\"flex-row\">\n <bw-icon iconName=\"lock\" horizontalSpace=\"mr-sm\"></bw-icon\n ><typography class=\"disabled-text\">{{ 'ONLY_ON_MOBILE' | translate }}</typography>\n </div>\n </bw-card-body>\n </bw-card>\n\n <bw-card cardType=\"action\" *ngSwitchDefault [title]=\"(card.titleKey ?? card.title) | translate\" (cardAction)=\"clickHandler()\">\n <bw-card-body>{{ (card.textKey ?? card.text) | translate }}</bw-card-body>\n<!-- <bw-card-body>{{ !card.textKey ? (card.text | translate) : card.textKey | translate }}</bw-card-body>-->\n </bw-card>\n </ng-container>\n</div>\n\n<bw-video\n *ngIf=\"displayType === displayTypes.ACTIVE_DEFAULT && showVideoModal\"\n [show]=\"showVideoModal\"\n [title]=\"card.title | translate\"\n [cdnBase]=\"cdnBase\"\n [path]=\"card.ctaPath\"\n (modalClosed)=\"showVideoModal = false\"\n></bw-video>\n<brightside-web-generic-modal\n *ngIf=\"bannerModalVisible\"\n [model]=\"modalModel\"\n fbPage=\"home\"\n fbCategory=\"home\"\n fbAction=\"view_card_banner_modal\"\n (primaryClick)=\"bannerModalVisible = false\"\n (secondaryClick)=\"bannerModalVisible = false\"\n></brightside-web-generic-modal>\n","import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';\nimport {Environment} from '@brightside-web/micro/core/environment';\nimport {\n DesktopCard,\n DesktopCardCaseType,\n DesktopCardFooter,\n DesktopCardSegment,\n DesktopCardType,\n DesktopSegmentType,\n FirebaseService,\n InternalLinkRoutingService, KnownFeatureFlags,\n ModalModel,\n ModalService,\n RemoteConfig_UnlockedCaseTypes\n} from '@brightside-web/desktop/data-access/shared';\nimport {Router} from '@angular/router';\nimport {ToastService} from '@brightside/brightside-ui-services';\n// tslint:disable-next-line:nx-enforce-module-boundaries\nimport {CardService} from '@brightside-web/desktop/data-access/cards';\n\nimport { BsCacheService } from \"@brightside-web/desktop/data-access/core-services\";\nimport {FeatureFlagService} from \"@brightside-web/desktop/data-access/core-services\";\n\nexport enum CardDisplayType {\n DEFAULT = 'Default',\n DEFAULT_INFO = 'DefaultInfo',\n ACTIVE = 'Active',\n ACTIVE_DEFAULT = 'ActiveDefault',\n ACTIVE_LOCKED = 'ActiveLocked',\n}\n\n@Component({\n selector: 'brightside-web-desktop-card',\n templateUrl: './desktop-card.component.html',\n styleUrls: ['./desktop-card.component.scss'],\n})\nexport class DesktopCardComponent implements OnInit {\n _card: DesktopCard;\n cardBannerColor: string;\n infoSegments: DesktopCardSegment[] = [];\n defaultSegments: DesktopCardSegment[] = [];\n ctaSegments: DesktopCardSegment[] = [];\n errorFooter: DesktopCardFooter;\n\n @Input() set card(value: DesktopCard) {\n this._card = value;\n\n if (value.footer && value.footer.style?.toLowerCase() === 'error') {\n this.cardBannerColor = 'var(--red-10)';\n this.errorFooter = value.footer;\n }\n\n //ToDo: need handling for the other types, example cashflow\n if (value.case_type === DesktopCardCaseType.CASH_FLOW && value.segments) {\n this.defaultSegments.push(value.segments[0]);\n return;\n }\n\n if ((value.case_type === DesktopCardCaseType.MPAP || value.case_type === DesktopCardCaseType.HELPING_HANDS) && value.segments) {\n this.ctaSegments.push(value.segments[0]);\n }\n\n //Need to check promo cards and ensure they have a BG image\n if (value.type === DesktopCardType.DEFAULT) {\n const defaultBgName = value.closeable ? 'card-bg' : 'credit-card-bg';\n\n value.graphic = `assets/${value.graphic || defaultBgName}.svg`;\n }\n\n value.segments?.forEach((segment) => {\n switch (segment.type.toLowerCase()) {\n case DesktopSegmentType.INFO.toLowerCase():\n this.infoSegments.push(segment);\n break;\n case DesktopSegmentType.DEFAULT.toLowerCase():\n this.defaultSegments.push(segment);\n break;\n }\n });\n }\n get card() {\n return this._card;\n }\n\n @Output() clicked = new EventEmitter();\n @Output() closed = new EventEmitter();\n\n displayType: CardDisplayType = CardDisplayType.DEFAULT_INFO;\n displayTypes = CardDisplayType;\n\n iconChevronRight = 'chevron_right';\n\n hideCard = false;\n showVideoModal = false;\n\n unlockedCaseTypes: string[];\n cdnBase: any;\n bannerModalVisible = false;\n modalModel: ModalModel;\n\n constructor(\n private env: Environment,\n private router: Router,\n private toastService: ToastService,\n private modalSvc: ModalService,\n private analytics: FirebaseService,\n private internalLinkRouting: InternalLinkRoutingService,\n private featureFlagSvc: FeatureFlagService,\n private bsCacheService: BsCacheService\n ) {\n this.unlockedCaseTypes = this.analytics.getValueAsString(RemoteConfig_UnlockedCaseTypes).split(',');\n this.cdnBase = this.env.cdnUrl;\n }\n\n ngOnInit(): void {\n this.determineDisplayType();\n }\n\n private determineDisplayType() {\n const determineNonProductDisplayType = () => {};\n const determineActiveDisplayType = () => {\n if (this.card.case_type === DesktopCardCaseType.SPENDING) {\n this.displayType = this.displayTypes.ACTIVE;\n return;\n }\n\n if (this.card.type === DesktopCardType.DEFAULT) {\n this.displayType = this.displayTypes.ACTIVE_DEFAULT;\n return;\n }\n\n // In environment vars we can manage the unlocked case types - If it's in the list, it's unlocked\n if (this.unlockedCaseTypes.indexOf(this.card.case_type || '') === -1) {\n // Locked until code is added\n this.displayType = this.displayTypes.ACTIVE_LOCKED;\n return;\n }\n\n this.displayType = this.displayTypes.ACTIVE;\n };\n\n this.displayType = this.displayTypes.DEFAULT;\n\n // See if it's a non-product card\n if (!this.card.case_type) {\n determineNonProductDisplayType();\n return;\n } else {\n // See if it's an active card\n determineActiveDisplayType();\n return;\n }\n }\n\n //TODO should card events be processed in this component or merely passed all the way back up to the feed component?\n //TODO time to create a navigation/routing service to abstract link types so these sort of paths are reusable everywhere\n //(my vote is to handle them here since they are card-specific events)\n ctaHandler(event: Event) {\n\n event.stopPropagation();\n if (this.card && this.card.analytics && this.card.analytics.tapped) {\n this.analytics.logEvent(this.card.analytics?.tapped);\n }\n if (this.card.ctaPath?.startsWith('video:')) {\n this.showVideoModal = true;\n } else if (this.card.ctaPath?.startsWith('toast:')) {\n this.toastService.info(CardService.getToastMessage(this.card.ctaPath.slice('toast:'.length)));\n } else if (this.card.ctaPath?.startsWith('gobrightside:')) {\n this.internalLinkRouting.routeToLink(this.card.ctaPath);\n } else if(\n (this.card.case_type === DesktopCardCaseType.MPAP || this.card.case_type === DesktopCardCaseType.HELPING_HANDS) && this.card.segments\n ) {\n this.router.navigateByUrl(this.card.segments[0].ctaPath);\n } else if (this.card.ctaPath) {\n if (this.card.case_type) {\n this.bsCacheService.setItem('activeCaseType', this.card.case_type);\n const loanCaseTypes = ['Emergency_Cash', 'Credit_Card_Refi'];\n if (this.card.vendor) {\n this.bsCacheService.setItem('loanVendorFromCard', this.card.vendor).then(()=>{\n this.card.ctaPath = 'accounts/loans';\n this.router.navigate(['accounts','loans']);\n });\n }\n }\n\n this.router.navigateByUrl(this.card.ctaPath);\n }\n\n this.completeCardHandler();\n }\n\n\n clickHandler() {\n if (this.card && this.card.analytics && this.card.analytics.tapped) {\n this.analytics.logEvent(this.card.analytics?.tapped);\n }\n if (this.card && this.card.ctaPath && this.card.ctaPath.indexOf('gobrightside:') !== -1) {\n this.internalLinkRouting.routeToLink(this.card.ctaPath);\n }\n this.clicked.emit(this.card);\n }\n\n completeCardHandler() {\n if (this.card.closeable) {\n this.hideCard = true;\n\n this.closed.emit(this.card.key || '');\n }\n }\n\n bannerHandler(event: MouseEvent) {\n event.stopPropagation();\n const infoSegment = this.card.segments?.find((seg) => seg.type === DesktopSegmentType.INFO);\n if (infoSegment) {\n if (infoSegment.ctaPath?.startsWith('modal:')) {\n this.modalModel = this.modalSvc.getModalModel(infoSegment.ctaPath.slice('modal:'.length));\n this.bannerModalVisible = true;\n }\n }\n }\n\n errorStateClickHandler(event: MouseEvent) {\n if (this.errorFooter && this.errorFooter.ctaPath) this.router.navigateByUrl(this.errorFooter.ctaPath);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport {ConfigEligType} from \"./product-eligibility/product-eligibility.component\";\nimport {Validators} from \"@angular/forms\";\nimport {CurrencyPipe, DatePipe} from \"@angular/common\";\n\n@Pipe({\n name: 'genCellValue'\n})\nexport class GenCellValuePipe implements PipeTransform {\n\n transform(value: ConfigEligType[]): string {\n const items: string[] = [];\n let missingRequired = false;\n let isSSN = false;\n let lastFour = '****';\n\n value.forEach( item => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n if (item.control.hasValidator(Validators.required) && !item.value) {\n missingRequired = true;\n return;\n }\n if (item.key === 'fullSSN') {\n isSSN = true;\n if (item.value) {\n const splitSSN = item.value.split('-');\n if (splitSSN.length > 0) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n lastFour = splitSSN.pop();\n }\n return;\n }\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const itemToWorkOn = item.value;\n if (itemToWorkOn && itemToWorkOn !== 'middle') {\n items.push(itemToWorkOn);\n }\n\n });\n\n if (value[0].type.toLowerCase() === 'date' && value[0].value ) {\n const datePipe: DatePipe = new DatePipe('en-US');\n return datePipe.transform(value[0].value, 'longDate') as string;\n\n }\n\n if (value[0].key === 'annualSalary') {\n const currencyPipe: CurrencyPipe = new CurrencyPipe('en-US');\n return currencyPipe.transform(value[0].value ?? 0) as string;\n }\n\n return missingRequired ? '-' : isSSN ? `***-**-${lastFour}` : items.join(' ');\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport {CommonModule, DatePipe} from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\n\nimport { MicroUiMoleculeModule } from '@micro-ui/molecule';\nimport { BrightsideUiModule, NgxMaskModule, ngxMaskOptions } from '@brightside/brightside-ui';\nimport { BrightsideUiServicesModule } from '@brightside/brightside-ui-services';\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\nimport { PhonePipe } from './phone.pipe';\nimport { FbDirective } from './fb.directive';\nimport { NestedFormGroupComponent } from './nested-form-group/nested-form-group.component';\nimport { SafePipe } from './safe.pipe';\nimport { CallFaComponent } from './call-fa/call-fa.component';\nimport { HrModalComponent } from './hr-modal/hr-modal.component';\nimport { SignUpPromptComponent } from './sign-up-prompt/sign-up-prompt.component';\nimport { HowWeHelpComponent } from './how-we-help/how-we-help.component';\nimport { DesktopCardComponent } from './desktop-card/desktop-card.component';\nimport { DesktopCardsComponent } from './desktop-cards/desktop-cards.component';\nimport { DisplayMessageComponent } from './display-message/display-message.component';\nimport { DisplayQuestionsComponent } from './display-questions/display-questions.component';\nimport { DisplayCardsComponent } from './display-cards/display-cards.component';\nimport { DisplayFormComponent } from './display-form/display-form.component';\nimport { DisplayLoaderComponent } from './display-loader/display-loader.component';\nimport { BadgeIdFormComponent } from \"./badge-id-form/badge-id-form.component\";\n\nimport { WaitingComponent } from './waiting/waiting.component';\nimport { GenericModalComponent } from './generic-modal/generic-modal.component';\nimport { CreditModalComponent } from './credit-modal/credit-modal.component';\nimport {TimeoutDirective} from \"./timeout.directive\";\n\nimport {TranslateModule, TranslatePipe} from \"@ngx-translate/core\";\nimport { EligibilityCheckComponent } from './forms/eligibility-check/eligibility-check.component';\nimport { GenCellValuePipe } from './gen-cell-value.pipe';\nimport { ProductEligibilityComponent } from './product-eligibility/product-eligibility.component';\nimport { MaskEmailPipe } from './mask-email.pipe';\nimport {FeatureFlagDirective} from \"./feature-flag.directive\";\nimport { NewFeatureFlagDirective } from \"./new-feature-flag.directive\";\nimport { GoToBrightsideDesktopComponent } from './go-to-brightside-desktop/go-to-brightside-desktop.component';\nimport { MonthNamePipe } from './month-name.pipe';\nimport {NgxCurrencyModule} from \"ngx-currency\";\n\nconst exported = [\n CallFaComponent,\n DesktopCardsComponent,\n DisplayMessageComponent,\n DisplayQuestionsComponent,\n CreditModalComponent,\n DisplayCardsComponent,\n DisplayFormComponent,\n HowWeHelpComponent,\n DisplayLoaderComponent,\n HrModalComponent,\n WaitingComponent,\n PhonePipe,\n FbDirective,\n TimeoutDirective,\n SafePipe,\n BadgeIdFormComponent,\n EligibilityCheckComponent,\n GenCellValuePipe,\n ProductEligibilityComponent,\n MaskEmailPipe,\n FeatureFlagDirective,\n NewFeatureFlagDirective,\n GoToBrightsideDesktopComponent,\n MonthNamePipe\n];\n\n@NgModule({\n imports: [\n BrightsideUiModule,\n BrightsideUiServicesModule,\n CommonModule,\n FormsModule,\n MicroUiMoleculeModule,\n NgxMaskModule.forRoot(ngxMaskOptions),\n ReactiveFormsModule,\n TranslateModule,\n NgxCurrencyModule\n ],\n declarations: [\n ...exported,\n DesktopCardComponent,\n GenericModalComponent,\n NestedFormGroupComponent,\n SignUpPromptComponent,\n EligibilityCheckComponent,\n GenCellValuePipe,\n ProductEligibilityComponent,\n MaskEmailPipe,\n MonthNamePipe,\n ],\n exports: exported,\n providers: [TranslatePipe, DatePipe],\n schemas: [],\n})\nexport class SharedDesktopModule {}\n\nexport const EMAIL_PATTERN = '^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\\\.[A-Za-z]{2,63}$';\n","<ng-container *ngIf=\"cards && cards.length > 0\">\n <div\n class=\"flex-row space-between\"\n [ngClass]=\"{ 'single-line': isSingleLineStyle }\"\n >\n <typography *ngIf=\"title\" [ngClass]=\"titleSize\" [ngStyle]=\"{ 'margin-top.px': verticalSpaceTopTitle, 'margin-bottom.px': verticalSpaceTitle }\">\n {{ title | translate }}\n </typography>\n\n <a *ngIf=\"isSingleLineStyle\" bw-anchor class=\"bs-blue brand\"\n (click)=\"clickedTitleLink()\"\n [ngStyle]=\"{ 'margin-top.px': verticalSpaceTopTitle, 'margin-bottom.px': verticalSpaceTitle }\">\n {{ 'VIEW_ALL' | translate }}\n </a>\n </div>\n\n <div class=\"cards flex-row flex-wrap\" [ngClass]=\"{ 'single-line': isSingleLineStyle }\">\n <ng-container *ngFor=\"let card of cards\">\n <bw-block\n *ngIf=\"isSingleLineStyle; else defaultStyle\"\n (blockAction)=\"clickedPassthrough(card)\"\n [secondaryStyle]=\"true\"\n >\n <bw-icon [iconName]=\"card.icon\" horizontalSpace=\"mb-sm\" color=\"var(--brand)\" size=\"40\"></bw-icon>\n <typography text-small-semibold>{{ card.title | translate }}</typography>\n </bw-block>\n\n <ng-template #defaultStyle>\n <brightside-web-desktop-card\n [card]=\"card\"\n (clicked)=\"clickedPassthrough($event)\"\n (closed)=\"closedPassthrough($event)\"\n ></brightside-web-desktop-card>\n </ng-template>\n </ng-container>\n </div>\n</ng-container>\n","import { Component, Input, Output, OnInit, AfterViewInit, EventEmitter } from '@angular/core';\nimport { DesktopCard } from '@brightside-web/desktop/data-access/shared';\n\n@Component({\n selector: 'brightside-web-desktop-cards',\n templateUrl: './desktop-cards.component.html',\n styleUrls: ['./desktop-cards.component.scss'],\n})\nexport class DesktopCardsComponent implements OnInit {\n @Input() title: string;\n @Input() titleSize = 'title-medium';\n\n @Input() cards: DesktopCard[];\n @Input() cardStyle = 'default'; // Either default or singleLine\n\n @Input() verticalSpaceTopTitle = '0';\n @Input() verticalSpaceTitle = '0';\n\n @Output() clicked = new EventEmitter();\n @Output() clickedTitleAction = new EventEmitter();\n @Output() closed = new EventEmitter();\n\n isSingleLineStyle = false;\n\n constructor() {}\n\n ngOnInit(): void {\n this.isSingleLineStyle = this.cardStyle === 'singleLine';\n }\n\n clickedTitleLink() {\n this.clickedTitleAction.emit();\n }\n\n clickedPassthrough(card: DesktopCard) {\n this.clicked.emit(card);\n }\n\n closedPassthrough(key: string) {\n this.closed.emit(key);\n }\n}\n","import { UiMoleculeIcon } from '../shared/shared.enum';\n\nexport enum UiNavigationExitType {\n NONE = 'none',\n BACK = 'back',\n CLOSE = 'close',\n}\n","<form [formGroup]=\"currencyInput\" [ngClass]=\"[verticalSpace ? verticalSpace : '', horizontalSpace ? horizontalSpace : '']\">\n <typography\n *ngIf=\"label\"\n text-small-semibold class=\"primary-text mb-xs\"\n [ngClass]=\"{'error-color': inputError}\"\n >\n {{ label }}\n </typography>\n <div class=\"input-field bw-input-simple\" [ngClass]=\"{ focused: isFocused }\">\n <input\n type=\"text\"\n (blur)=\"onBlur($event)\"\n (focus)=\"onFocus($event)\"\n inputmode=\"decimal\"\n [formControlName]=\"fcName\"\n currencyMask\n [options]=\"currencyOptions\"\n [attr.disabled]=\"disabled\"\n [attr.placeholder]=\"placeholder\" />\n <bw-icon [color]=\"isFocused ? 'var(--secondary-text)' : 'var(--disabled-text)'\" iconName=\"clear\" (click)=\"clearValue()\"></bw-icon>\n </div>\n <div *ngIf=\"inputErrorText\" [@enterAnimation]=\"inputError ? 'show' : 'hide'\" class=\"error\">{{ inputErrorText }}</div>\n <div *ngIf=\"hint\" class=\"hint\">{{ inputHintText }}</div>\n</form>\n","import { trigger, state, style, transition, animate } from '@angular/animations';\nimport {\n Component,\n ElementRef,\n Input,\n AfterViewInit,\n ViewChild,\n OnInit,\n OnDestroy,\n EventEmitter,\n Output,\n ChangeDetectionStrategy,\n} from '@angular/core';\nimport { FormGroup, FormControl, Validators } from '@angular/forms';\n\nimport { CurrencyMaskInputMode } from 'ngx-currency';\nimport { InputMaskOptions, ngxMaskOptions } from '../../brightside-ui.module';\n\nimport { Subscription } from 'rxjs';\n\n@Component({\n selector: 'bw-currency-input',\n animations: [\n trigger('enterAnimation', [\n state(\n 'show',\n style({\n minHeight: '16px',\n visibility: 'visible',\n opacity: 1,\n })\n ),\n state(\n 'hide',\n style({\n minHeight: '0px',\n visibility: 'hidden',\n opacity: 0,\n })\n ),\n transition('show => hide', [animate('0.05s')]),\n transition('hide => show', [animate('0.1s 0.2s')]),\n ]),\n ],\n templateUrl: './currency-input.component.html',\n styleUrls: ['./currency-input.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CurrencyInputComponent implements OnInit, OnDestroy, AfterViewInit {\n private sub = new Subscription();\n\n currencyInput: FormGroup;\n error = false;\n hint = true;\n isFocused: boolean;\n _value: any = '';\n get value() {\n return this._value;\n }\n /** The native input element value */\n @Input() set value(value:any) {\n this._value = value;\n if (!value) {\n this._value = '';\n if (this.currencyInput) this.currencyInput.controls[this.fcName].setValue('');\n }\n }\n\n @Input() fcName: string;\n\n /** The label string that will be renderend inside the label element */\n @Input() label: string;\n\n\n\n /** Whether the input is disabled */\n @Input() disabled: boolean;\n\n /** Whether the input element is required */\n @Input() required: boolean;\n\n /** Options to use for the currency mask from angular */\n @Input() currencyOptions: InputMaskOptions = {};\n\n /** Whether the input has an error in validation */\n @Input() inputError: boolean;\n\n /** Text that is shown below the input if there is a validation error */\n @Input() inputErrorText: string;\n\n /** Text that is shown below the input that serves as an input hint */\n @Input() inputHintText: string;\n\n @Input() verticalSpace = 'mb-xs';\n @Input() horizontalSpace = 'mr-null';\n\n @Input() autoFocus: boolean;\n\n @Input() onChange: Function;\n @Output() valueChanged: EventEmitter<any> = new EventEmitter<any>();\n @Input() placeholder = '';\n\n /** Event that signals a change in the input model */\n @Output() inputModelChange = new EventEmitter<string>();\n\n @ViewChild('elementRef') el: ElementRef;\n\n ngOnInit() {\n const DefaultMaskOptions = {\n ...ngxMaskOptions,\n precision: 2,\n prefix: '$',\n allowNegative: false,\n align: 'left',\n nullable: true,\n inputMode: CurrencyMaskInputMode.NATURAL, //Use '.FINANCIAL' for cash register type entry\n };\n const defaultValue = !this.value ? null : this.value;\n\n this.currencyInput = new FormGroup({});\n this.currencyInput.addControl(this.fcName, new FormControl(defaultValue, [Validators.required]));\n this.currencyOptions = { ...DefaultMaskOptions, ...this.currencyOptions };\n\n this.registerOnChange(this.onChange);\n }\n\n onTouched(e: any) {\n // console.log('touch', e);\n }\n\n onFocus(e: any) {\n // console.log('focus', e);\n this.isFocused = true;\n }\n\n onBlur(e: any) {\n // console.log('blur', e);\n this.isFocused = false;\n this.onTouched(e)\n }\n\n ngAfterViewInit(): void {\n if (this.autoFocus) {\n setTimeout(() => {\n this.el.nativeElement.focus();\n }, 1);\n }\n }\n\n clearValue() {\n this.currencyInput.reset();\n }\n\n ngOnDestroy(): void {\n this.sub.unsubscribe();\n }\n\n /**\n * Update form when DOM element value changes (view => model)\n */\n registerOnChange(fn: Function): void {\n this.sub.add(\n this.currencyInput.valueChanges.subscribe((valueChange: { [key: string]: number }) => {\n this.valueChanged.emit(valueChange);\n if (fn) fn(Object.values(valueChange)[0]);\n })\n );\n }\n}\n","export interface OAuthEnvironment {\n id: string;\n url: string;\n redirectBaseUrl: string;\n scope: string[];\n companies: string[];\n config: { [key: string]: OAuthCompanyConfig };\n}\n\nexport interface OAuthCompanyConfig {\n name: string;\n provider: string;\n}\n\nexport interface PerformanceSentryConfig {\n environment: string;\n dsn: string;\n}\n\ninterface LaunchDarklyInitInterface {\n clientSideId: string,\n}\n\n/**\n * PLEASE DO NOT ADD ANYTHING HERE THAT CAN BE FETCHED FROM FIREBASE REMOTE CONFIG\n * THIS SHOULD ONLY BE FOR INITIALIZING SERVICES THAT CANNOT DEPEND ON FRC BEING AVAILABLE YET\n */\nexport abstract class Environment {\n awsConnectWidgetId: string;\n awsConnectSnippetId: string;\n production: boolean;\n baseEnv: string;\n awsmobile: { [key: string]: any };\n amplitude: { [key: string]: any };\n performance: { sentry: PerformanceSentryConfig };\n firebase: { [key: string]: string };\n intercomAppId: string;\n crmUrl: string;\n cdnUrl: string;\n googleTagManagerId: string;\n googleTrackingId: string;\n hostedDomain: string;\n sprigId: string;\n featureFlags: { [key: string]: boolean };\n appVersion?: string;\n featureFlagApp: LaunchDarklyInitInterface;\n smfaDynamicLink: string;\n socure: string;\n auth0: Auth0Interface;\n chat?: { [key: string]: string };\n}\n\ninterface Auth0Interface {\n domain?: string;\n clientId?: string;\n audience?: string;\n clientSecret?: string;\n}\n\nexport class CacheKeys {\n static FeedToast = 'FEED_TOAST';\n static FeedSuccessToad = 'FEED_SUCCESS_TOAST';\n static Guid = 'GUID';\n}\n","<div id=\"uiHeaderEyebrow\" class=\"mt-smd\">\n <ng-container *ngTemplateOutlet=\"headerTemplate; context: { title: title | translate, subTitle: subTitle | translate }\"></ng-container>\n</div>\n\n<ng-template #headerTemplate let-title=\"title\" let-subTitle=\"subTitle\">\n <p *ngIf=\"title\" text-medium-regular class=\"mb-xs\" color=\"var(--secondary-text)\">{{ title }}</p>\n <typography *ngIf=\"subTitle\" title-medium>{{ subTitle }}</typography>\n</ng-template>\n","import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\n\nimport { UiHeaderType } from '../header.enum';\nimport { UiHeaderEyebrowInputs } from '../header.interface';\n\n@Component({\n selector: 'ui-header-eyebrow',\n templateUrl: './header-eyebrow.component.html',\n styleUrls: ['./header-eyebrow.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class UiHeaderEyebrowComponent implements UiHeaderEyebrowInputs {\n type: UiHeaderType = UiHeaderType.EYE_BROW;\n\n @Input() title: string;\n @Input() subTitle: string;\n}\n","//! moment.js locale configuration\n//! locale : Japanese [ja]\n//! author : LI Long : https://github.com/baryon\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ja = moment.defineLocale('ja', {\n eras: [\n {\n since: '2019-05-01',\n offset: 1,\n name: '令和',\n narrow: '㋿',\n abbr: 'R',\n },\n {\n since: '1989-01-08',\n until: '2019-04-30',\n offset: 1,\n name: '平成',\n narrow: '㍻',\n abbr: 'H',\n },\n {\n since: '1926-12-25',\n until: '1989-01-07',\n offset: 1,\n name: '昭和',\n narrow: '㍼',\n abbr: 'S',\n },\n {\n since: '1912-07-30',\n until: '1926-12-24',\n offset: 1,\n name: '大正',\n narrow: '㍽',\n abbr: 'T',\n },\n {\n since: '1873-01-01',\n until: '1912-07-29',\n offset: 6,\n name: '明治',\n narrow: '㍾',\n abbr: 'M',\n },\n {\n since: '0001-01-01',\n until: '1873-12-31',\n offset: 1,\n name: '西暦',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: '紀元前',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n eraYearOrdinalRegex: /(元|\\d+)年/,\n eraYearOrdinalParse: function (input, match) {\n return match[1] === '元' ? 1 : parseInt(match[1] || input, 10);\n },\n months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n '_'\n ),\n weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),\n weekdaysShort: '日_月_火_水_木_金_土'.split('_'),\n weekdaysMin: '日_月_火_水_木_金_土'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日 HH:mm',\n LLLL: 'YYYY年M月D日 dddd HH:mm',\n l: 'YYYY/MM/DD',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日(ddd) HH:mm',\n },\n meridiemParse: /午前|午後/i,\n isPM: function (input) {\n return input === '午後';\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return '午前';\n } else {\n return '午後';\n }\n },\n calendar: {\n sameDay: '[今日] LT',\n nextDay: '[明日] LT',\n nextWeek: function (now) {\n if (now.week() !== this.week()) {\n return '[来週]dddd LT';\n } else {\n return 'dddd LT';\n }\n },\n lastDay: '[昨日] LT',\n lastWeek: function (now) {\n if (this.week() !== now.week()) {\n return '[先週]dddd LT';\n } else {\n return 'dddd LT';\n }\n },\n sameElse: 'L',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}日/,\n ordinal: function (number, period) {\n switch (period) {\n case 'y':\n return number === 1 ? '元年' : number + '年';\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s後',\n past: '%s前',\n s: '数秒',\n ss: '%d秒',\n m: '1分',\n mm: '%d分',\n h: '1時間',\n hh: '%d時間',\n d: '1日',\n dd: '%d日',\n M: '1ヶ月',\n MM: '%dヶ月',\n y: '1年',\n yy: '%d年',\n },\n });\n\n return ja;\n\n})));\n","//! moment.js locale configuration\n//! locale : Portuguese [pt]\n//! author : Jefferson : https://github.com/jalex79\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var pt = moment.defineLocale('pt', {\n months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(\n '_'\n ),\n monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),\n weekdays:\n 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split(\n '_'\n ),\n weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),\n weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY HH:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Hoje às] LT',\n nextDay: '[Amanhã às] LT',\n nextWeek: 'dddd [às] LT',\n lastDay: '[Ontem às] LT',\n lastWeek: function () {\n return this.day() === 0 || this.day() === 6\n ? '[Último] dddd [às] LT' // Saturday + Sunday\n : '[Última] dddd [às] LT'; // Monday - Friday\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'em %s',\n past: 'há %s',\n s: 'segundos',\n ss: '%d segundos',\n m: 'um minuto',\n mm: '%d minutos',\n h: 'uma hora',\n hh: '%d horas',\n d: 'um dia',\n dd: '%d dias',\n w: 'uma semana',\n ww: '%d semanas',\n M: 'um mês',\n MM: '%d meses',\n y: 'um ano',\n yy: '%d anos',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return pt;\n\n})));\n","import { isFunction } from './isFunction';\nexport function isScheduler(value) {\n return value && isFunction(value.schedule);\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n imports: [CommonModule],\n providers: []\n})\nexport class DesktopDataAccessSharedModule {}\n","import {inject, Injectable, Injector} from '@angular/core';\nimport {from, Observable, of, switchMap} from 'rxjs';\nimport {\n AwsApiWrapperService,\n BsCacheService,\n} from '@brightside-web/desktop/data-access/core-services';\nimport { tap } from 'rxjs/operators';\nimport * as moment from 'moment';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ApiCacheService {\n\n awsApiWrapperService: AwsApiWrapperService;\n bsCacheService: BsCacheService;\n\n constructor(private injector: Injector) {}\n\n private getBsCacheService(): BsCacheService {\n if (!this.bsCacheService) {\n this.bsCacheService = this.injector.get(BsCacheService);\n }\n return this.bsCacheService;\n }\n\n private getAwsApiWrapperService(): AwsApiWrapperService {\n if (!this.awsApiWrapperService) {\n this.awsApiWrapperService = this.injector.get(AwsApiWrapperService);\n }\n return this.awsApiWrapperService;\n }\n\n get<T>(api: string, key: string, init?: { [key: string]: any }): Observable<T> {\n const bsCacheService = this.getBsCacheService();\n const awsApiWrapperService = this.getAwsApiWrapperService();\n return from(bsCacheService.getItem(key)).pipe(\n switchMap((cached: T) => {\n if (cached) {\n return of(cached);\n } else {\n return from(awsApiWrapperService.get(api, key, init)).pipe(\n tap((response) => {\n bsCacheService.setItem(key, response, {expires: moment().add(30, 'seconds').valueOf()})\n })\n );\n }\n })\n )\n }\n\n getForced<T>(api: string, key: string, init?: { [key: string]: any }): Observable<T> {\n const bsCacheService = this.getBsCacheService();\n bsCacheService.removeItem(key);\n return this.get<T>(api, key, init);\n }\n\n async getItem<T>(key: string): Promise<T> {\n const bsCacheService = this.getBsCacheService();\n return await bsCacheService.getItem(key);\n }\n\n setItem(key: string, value: any) {\n const bsCacheService = this.getBsCacheService();\n bsCacheService.setItem(key, value);\n }\n\n refreshItem(key: string) {\n const bsCacheService = this.getBsCacheService();\n bsCacheService.removeItem(key);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { from, Observable } from 'rxjs';\nimport { ApiCacheService } from './api-cache.service';\nimport { map } from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SupportService {\n\n constructor(private apiCache:ApiCacheService) { }\n\n support(company:string):Observable<string>{\n return from(this.apiCache.get<SupportResponse>('api-mobile-noauth',`/support/v2`)).pipe(\n map((response)=> {\n if (response[company]){\n return response[company];\n } else {\n return response['default'];\n }\n })\n );\n }\n\n}\n\nexport interface SupportResponse {\n [key:string]:string;\n}\n","import { Injectable } from '@angular/core';\nimport amplitude from 'amplitude-js';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AmplitudeService {\n _amplitudeInstance: any;\n\n get amplitudeInstance() {\n if (this._amplitudeInstance) return this._amplitudeInstance;\n this._amplitudeInstance = amplitude.getInstance();\n return this._amplitudeInstance;\n }\n\n logEvent(eventName: string, eventProperties?: { [key: string]: string }) {\n eventName = eventName.split('_').join(' ').toLowerCase();\n if (eventProperties && Object.keys(eventProperties).length > 0) {\n this.amplitudeInstance.logEvent(eventName, this.updateEventPropertiesKeys(eventProperties));\n } else {\n this.amplitudeInstance.logEvent(eventName);\n }\n }\n\n setUserId(userId: string) {\n this.amplitudeInstance.setUserId(userId);\n }\n\n clearProperties(): void {\n // this.amplitudeInstance.setUserId(null);\n // this clears previously stored user properties in Amplitude\n // this.amplitudeInstance.clearUserProperties();\n }\n\n setUserProperties(userProperties: { [key: string]: string }) {\n this.amplitudeInstance.setUserProperties(userProperties);\n }\n\n incrementErrorsViewed() {\n const identify = new amplitude.Identify().add('total errors viewed', 1);\n this.amplitudeInstance.identify(identify);\n }\n\n updateEventPropertiesKeys(eventProperties?: { [key: string]: string }): { [key: string]: string } | undefined {\n if (!eventProperties) {\n return undefined;\n }\n\n const updatedProperties: { [key: string]: string } = {};\n\n for (const [key, value] of Object.entries(eventProperties)) {\n const updatedKey = key.replace(/_/g, ' ');\n updatedProperties[updatedKey] = value;\n }\n\n return updatedProperties;\n }\n\n}\n\nexport const amplitudeWhitelist = [\n \"app_opened\",\n \"app_review\",\n \"app_update\",\n \"argyle\",\n \"biometrics\",\n \"change_username\",\n \"chat\",\n \"create_account\",\n \"credit\",\n \"email\",\n \"error\",\n \"external_savings\",\n \"full_ssn\",\n \"help\",\n \"help_topic_list\",\n \"home\",\n \"home_shown\",\n \"invite\",\n \"loading_timed_out\",\n \"loan\",\n \"notifications\",\n \"onboarding\",\n \"profile\",\n \"push\",\n \"savings\",\n \"select_employer\",\n \"settings\",\n \"sign_in\",\n \"sign_up\",\n \"verify\",\n \"home_address\",\n \"employee_id\",\n \"web_loaded\"\n];\n","import { AmplitudeService} from \"./amplitude.service\";\nimport {Environment} from \"@brightside-web/micro/core/environment\";\nimport {FirebaseApp} from \"firebase/app\";\nimport {Analytics as FbAnalytics} from \"firebase/analytics\";\nimport { RemoteConfig } from \"firebase/remote-config\";\n\nexport interface AnalyticsAttributesV4 {\n event_name: string;\n action?: string;\n custom?: { [key: string]: string }\n}\n\n/**\n * Available keys for RemoteConfig.\n * should match up with info at\n * https://healthydollar.atlassian.net/wiki/spaces/EN/pages/2371944477/Remote+Config#Desktop-specific-properties\n */\nexport const RemoteConfig_UnlockedCaseTypes = 'unlockedCaseTypes';\nexport const RemoteConfig_DesktopNativeMapping = 'desktop_native_mapping';\nexport const RemoteConfig_SupportNumber = 'supportNumber';\nexport const RemoteConfig_BankHolidays = 'bankHolidays';\nexport const RemoteConfig_Companies = 'companies';\nexport const RemoteConfig_Savings_Transfer_Reasons = 'microSavingsTransferReasons';\n\n\ninterface ThrottledEvent {\n lastCall: number;\n throttleTime: number;\n}\n\nexport abstract class FirebaseService {\n\n abstract events: { [p: string]: ThrottledEvent };\n\n abstract amplitudeService: AmplitudeService;\n abstract env: Environment;\n abstract lastPageShownEvent: string;\n abstract typeOveride: { [p: string]: Function };\n abstract typeOverRideKeys: string[];\n\n abstract firebaseApp: FirebaseApp;\n abstract fbRemoteConfig: RemoteConfig;\n abstract fbAnalytics: FbAnalytics;\n\n abstract isEventThrottled(\n eventName: string,\n throttleTime?: number\n ) : boolean;\n\n abstract logEvent(\n eventName: string,\n eventParams?: {\n [key: string]: any;\n },\n shouldThrottle?: boolean,\n throttleTime?: number\n ): void;\n\n abstract setUserId(id: string, options?: any): void;\n\n abstract clearProperties(): void;\n\n abstract setProperties(properties: { [key: string]: string }): void;\n // see https://firebase.google.com/docs/remote-config/get-started?platform=web#web-version-8\n abstract setupRemoteConfig(): void;\n\n abstract remoteConfig(): RemoteConfig;\n abstract initializeApp(): FirebaseApp;\n abstract getRemoteConfig(): RemoteConfig;\n abstract getAnalytics(): FbAnalytics;\n abstract getValueAsString(valueKey: string): string;\n abstract getValueAsBoolean(valueKey: string): boolean;\n abstract ensureInitialized(): Promise<void>;\n abstract fetchConfig(): Promise<void>\n abstract remoteConfigMapping(): { [key: string]: any };\n}\n","import {inject, Injectable} from '@angular/core';\nimport { from, Observable, of, Subject } from 'rxjs';\nimport {\n BsAuthService,\n BsCacheService,\n BsHubService,\n BsLoggerService,\n} from '@brightside-web/desktop/data-access/core-services';\nimport { ConsoleLogger } from 'aws-amplify/utils'\nimport { catchError, map } from 'rxjs/operators';\nimport { FirebaseService } from './firebase.service';\nimport { HubCapsule } from 'aws-amplify/utils';\n\nimport { AmplitudeService } from \"./amplitude.service\";\nimport * as Sentry from '@sentry/angular';\nimport {FeatureFlagService} from \"@brightside-web/desktop/data-access/core-services\";\nimport {Router} from \"@angular/router\";\ndeclare const Sprig:Function;\n@Injectable({\n providedIn: 'root',\n})\nexport class AuthService {\n private userLoggedIn = new Subject<boolean>();\n redirectUrl: string;\n logger: ConsoleLogger;\n username: string | undefined;\n password: string | undefined;\n company: string | undefined;\n\n setRedirectUrl(path: string) {\n this.redirectUrl = path;\n }\n\n constructor(\n private analytics: FirebaseService,\n private amplitudeService: AmplitudeService,\n private featureFlagSvc: FeatureFlagService,\n private bsAuthService: BsAuthService,\n private bsCacheService: BsCacheService,\n private bsHubService: BsHubService,\n private bsLoggerService: BsLoggerService,\n private router: Router) {\n this.bsAuthService.fetchUserAttributes().subscribe({\n next: (attributes) => {\n const userAtts = attributes;\n this.featureFlagSvc.initializeFeatureFlag(userAtts);\n this.userLoggedIn.next(true)\n },\n error: (err) => this.userLoggedIn.next(false)\n });\n\n this.logger = new ConsoleLogger('My-Logger');\n const listener = (data: HubCapsule<any, any>) => {\n switch (data.payload.event) {\n case 'signedIn':\n this.logger.info('user signed in');\n this.bsAuthService.fetchUserAttributes().subscribe(\n attributes => {\n this.bsHubService.dispatch('AuthChannel', {event: 'logged in', data: attributes});\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.handleSignIn(attributes['guid']);\n this.setFirebaseProperties(attributes as unknown as { [key:string]:string });\n this.setAmplitudeProperties(attributes as unknown as { [key:string]:string });\n this.setUserLoggedIn(true);\n Sentry.setUser({id:attributes['guid']});\n this.featureFlagSvc.initializeFeatureFlag(attributes);\n this.analytics.logEvent('sign_in_completed', { type: 'password' });\n if (window.location.href.includes('/authenticating')) {\n this.router.navigate(['home']);\n setTimeout(()=> {\n // sometimes angular isn't redirecting the first time\n if (window.location.href.includes('/authenticating')) {\n this.router.navigate(['home']);\n }\n }, 1000)\n }\n }\n )\n break;\n case 'signUp':\n this.logger.info('user signed up');\n break;\n case 'oAuthSignOut':\n case 'signedOut':\n if ( typeof Sprig !== 'undefined' ) {\n Sprig('logoutUser');\n }\n this.bsCacheService.removeItem(\"GUID\");\n this.logger.info(`user ${data.payload.event}` as any);\n this.analytics.clearProperties();\n this.amplitudeService.clearProperties();\n this.setUserLoggedIn(false);\n Sentry.setUser(null);\n this.bsHubService.dispatch('AuthChannel', {event: 'logged out'});\n this.featureFlagSvc.disableClient();\n break;\n case 'signIn_failure':\n this.logger.info('user sign in failed');\n break;\n case 'configured':\n this.logger.info('the Auth module is configured');\n break;\n default:\n this.logger.info(`unhandled Auth event: ${data.payload.event}`);\n }\n };\n\n this.bsHubService.listen('bsAuth', listener);\n }\n\n\n\n private handleSignIn(guid: string) {\n this.bsCacheService.setItem(\"GUID\",guid);\n\n const now = Date.now();\n\n const previousSignIn = window.localStorage[guid];\n\n this.bsCacheService.getItem(\"SIGN_IN_TIME\").then(\n signInTime => {\n if (!previousSignIn || previousSignIn === signInTime) {\n window.localStorage[guid] = now;\n this.bsCacheService.setItem(\"SIGN_IN_TIME\", now);\n this.bsCacheService.setItem(\"FIRST_SIGN_IN\",true);\n }\n else {\n this.bsCacheService.setItem(\"FIRST_SIGN_IN\",false);\n }\n }\n )\n\n }\n\n /**\n * want to set more than just guid.\n * @param properties\n */\n setFirebaseProperties(properties: { [key:string]:string }) {\n this.analytics.setUserId(properties['custom:guid']);\n const passThrough = {\n company: properties['custom:company']\n }\n this.analytics.setProperties(passThrough);\n\n this.analytics.setupRemoteConfig();\n }\n\n setAmplitudeProperties(properties: { [key:string]:string }) {\n this.amplitudeService.setUserId(properties['custom:guid']);\n const passThrough = {\n company: properties['custom:company']\n }\n this.amplitudeService.setUserProperties(passThrough);\n }\n\n setUserLoggedIn(userLoggedIn: boolean) {\n this.userLoggedIn.next(userLoggedIn);\n }\n\n getUserLoggedIn(): Observable<boolean> {\n return this.userLoggedIn.asObservable();\n }\n\n hasCurrentUser(): Observable<boolean> {\n return this.bsAuthService.isAuthenticated();\n }\n\n clearConfirmationState() {\n this.username = undefined;\n this.password = undefined;\n }\n}\n","/**\n * if api fields can only have a limited set of values, document them here\n */\nexport enum SurveyQuestionType {\n choice = 'choice',\n choiceMulti = 'choiceMulti',\n}\n\nexport enum SavingsSource {\n ach = 'ach',\n payroll = 'payroll',\n}\n\nexport enum SavingsScheduleType {\n biweekly = 'biweekly',\n monthly = 'monthly',\n everyPaycheck = 'everyPaycheck',\n alternatePaycheck = 'alternatePaycheck',\n}\n\nexport enum SavingsSetupStatus {\n canceled = 'canceled',\n accountCreated = 'account-created',\n payrollSetup = 'payroll-setup',\n errorFboCreation = 'error-fbo-creation',\n errorCustodialCreation = 'error-custodial-creation',\n}\n\nexport enum EligibleProduct {\n achSavings = 'achSavings',\n cashAdvance = 'cashAdvance',\n cashFlow = 'cashFlow',\n creditImprovement = 'creditImprovement',\n creditScore = 'creditScore',\n loan = 'loan',\n payrollSavings = 'payrollSavings',\n spending = 'spending',\n invite = 'invite',\n}\n\nexport enum DesktopCardCaseType {\n ASK_ME_ANYTHING = 'Ask_Me_Anything',\n CASH_FLOW = 'Cash_Flow',\n CONTEST = 'PLS_Promo',\n CREDIT_CARD_REFI = 'Credit_Card_Refi',\n CREDIT_CRUSHER = 'Credit_Crusher',\n CREDIT_SCORE = 'Credit_Score',\n EMERGENCY_CASH = 'Emergency_Cash',\n HELPING_HANDS = 'HELPING_HANDS',\n MPAP = 'MPAP',\n SAVINGS = 'Emergency_Savings',\n SELF_LENDER = 'Self_Lender',\n SPENDING = 'Direct_Deposit_Account',\n STUDENT_LOAN_REFI = 'Student_Loan_Refi',\n WELCOME_VIDEO = 'Welcome_To_Brightside',\n LOAN_DASHBOARD = 'Loan_Dashboard',\n LENDER_ALTERNATIVES = 'Lender_Alternatives'\n}\n\nexport enum DesktopCardType {\n DEFAULT = 'Default',\n INFO = 'Info',\n CTA = 'Cta',\n}\n\nexport enum DesktopSegmentType {\n DEFAULT = 'Default',\n INFO = 'Info',\n CTA = 'Cta',\n}\n\nexport enum DesktopCardStyle {\n FOCUSED = 'Focused',\n RIGHT = 'Right',\n}\n\nexport enum DesktopCardSegmentDynamicType {\n BASIC = 'basic',\n CURRENCY = 'currency',\n}\n\nexport enum DesktopCardCondition {\n DATA_PRESENT = 'DataPresent',\n NO_DATA_PRESENT = 'NoDataPresent',\n COMPLETE = 'Completed',\n}\n\nexport enum TransferAccountType {\n SAVINGS = 'Savings',\n SPENDING = 'Spending',\n ACH = 'ACH',\n}\n\n//MW finsol.service LinkedBankStatus\nexport enum LinkedBankStatus {\n ACTIVE = 'active',\n CREDENTIALS_LOCKED = 'credentials-locked',\n INVALID_ROUTING_CREDS = 'invalid-routing-creds',\n LINK_VERIFY_DEPOSIT = 'link-verify-deposit',\n LINKED = 'linked',\n LINKING = 'linking',\n}\n\nexport enum CardDisplayType {\n DEFAULT = 'Default',\n DEFAULT_INFO = 'DefaultInfo',\n ACTIVE = 'Active',\n ACTIVE_DEFAULT = 'ActiveDefault',\n ACTIVE_LOCKED = 'ActiveLocked',\n}\n\nexport enum LinkedAccountType {\n SAVINGS = 'SAVINGS',\n CHECKING = 'CHECKING',\n}\n\nexport enum AutosaveMode {\n DEFAULT = 'default',\n EDIT = 'edit',\n}\n\nexport enum CustodialAccountStatus {\n ERROR = 'error',\n CREATING = 'creating',\n CREATED = 'created',\n}\n\nexport enum SavingsSchedulePatchAction {\n UNPAUSE = 'unpause',\n PAUSE = 'pause',\n SKIP = 'skip',\n UPDATE = 'update',\n SKIP_PLANNED = 'skip_planned',\n UNSKIP_PLANNED = 'unskip_planned',\n UPDATE_PLANNED = 'update_planned',\n}\n\nexport enum CreditSetupStatus {\n NOT_STARTED = 'NOT_STARTED',\n TERMS_ACCEPTED = 'TERMS_ACCEPTED',\n VERIFY_OTP = 'VERIFY_OTP',\n VERIFY_KBA = 'VERIFY_KBA',\n ENROLLED = 'ENROLLED',\n VERIFIED = 'VERIFIED',\n VERIFICATION_FAILED = 'VERIFICATION_FAILED',\n FULFILLED = 'FULFILLED',\n VERIFY_SMFA_TIMEOUT = 'VERIFY_SMFA_TIMEOUT',\n VERIFY_SMFA = 'VERIFY_SMFA',\n VERIFY_DIT = 'VERIFY_DIT',\n}\n\nexport enum CreditSetupVerifyStatus {\n COMPLETE = 'COMPLETE',\n COMPLETE_UNCONFIRMED = 'COMPLETE_UNCONFIRMED',\n MORE_INFORMATION = \"MORE_INFORMATION\",\n ERROR_NO_RETRY = \"ERROR_NO_RETRY\",\n ERROR_ALLOW_RETRY = \"ERROR_ALLOW_RETRY\",\n ERROR_FATAL = \"ERROR_FATAL\"\n}\n\nexport enum RequiredVerificationsEnums {\n LOCALSTORAGE = 'requiredVerifications',\n EMPLOYEEALIAS = 'unique_id',\n ACCOUNT = 'account',\n EMAIL = 'email',\n HOMEADDRESS = 'auto_address',\n FULLSSN = 'full_ssn',\n HUBCHANNEL ='RequiredVerificationsChannel'\n}\n","import {\n CreditSetupStatus,\n CreditSetupVerifyStatus,\n DesktopCardCaseType,\n DesktopCardCondition,\n DesktopCardStyle,\n DesktopCardType,\n DesktopCardSegmentDynamicType,\n EligibleProduct,\n LinkedBankStatus,\n SavingsScheduleType,\n SavingsSetupStatus,\n SavingsSource,\n SurveyQuestionType,\n TransferAccountType,\n LinkedAccountType,\n AutosaveMode,\n CustodialAccountStatus,\n SavingsSchedulePatchAction,\n DesktopSegmentType,\n} from './api-enums';\nimport { AnalyticsAttributesV4 } from './firebase.service';\n\nexport interface ApiResponse {\n statusCode: number;\n message: string;\n requiredVerification?: RequiredVerification;\n}\n\nexport interface ApiErrorResponse {\n statusCode: number;\n message: string;\n errorMessage?: string;\n}\n\n\nexport interface AxiosResponse {\n status: number;\n}\n\n//https://healthydollar.atlassian.net/wiki/spaces/EN/pages/576323619/Mobile+State\n// if we ever fetch the survey/cards directly from a service instead of from mobile state, the interfaces can be moved out of here\n// see MW MobileState interface\nexport interface MobileStateResponse {\n baasProvider?: string;\n sf_record_type?: string;\n savingsAccount?: boolean;\n onboardingComplete?: number;\n survey?: Survey;\n supportNumber: string;\n customPassword?: boolean;\n requiredVerification?: RequiredVerification;\n requiredVerifications?: RequiredVerification[];\n chatProvider?: string;\n availability?: AvailabilityHours;\n externalSavings?: boolean;\n // account?: SavingsAccount; // DO NOT USE THIS\n savingsSetup?: SavingsSetup;\n products?: EligibleProduct[];\n activatedCards?: DesktopCard[];\n creditScore?: boolean;\n cards?: DesktopCard[];\n home?: MobileStateHome;\n explore?: MobileStateExplore;\n redirect?: string;\n flags?: { [key: string]: boolean };\n campaigns?: { [key: string]: MSCampaign };\n spendingAccount?: boolean;\n notifications?: unknown[];\n user_guid?: string;\n contests?: MsContest[];\n intercom_external_id?:string;\n}\n\nexport interface AnalyticsActions {\n tapped?: string;\n shown?: string;\n started?: string;\n completed?: string;\n skipped?: string;\n}\n\nexport interface MSCampaign extends Campaign {\n path?: string;\n}\n\nexport interface Campaign {\n cta?: string;\n ctaKey?: string;\n image: string;\n ctaPath: string;\n secondaryCtaPath?: string;\n secondaryCta?: string;\n secondaryCtaKey?: string;\n key: string;\n title?: string;\n titleKey?: string;\n textBody?: string;\n textBodyKey?: string;\n textBodyAlign?: 'center' | 'left' | 'right'\n textBodyNoWrap?: boolean;\n isCreditIntro?: boolean;\n}\n\nexport interface MsContest {\n drawingDate: string;\n id: number;\n isClientParticipating: boolean;\n didClientParticipate: boolean;\n name: string;\n resultsViewed: boolean;\n}\n\nexport interface SavingsSetup {\n status: SavingsSetupStatus;\n}\n\nexport interface SavingsStatementsResponse extends BaseSavingsAccount {\n first_statement_ts: string; // format: MM/YYYY;\n latest_statement_ts: string; // format: MM/YYYY;\n}\n\nexport interface MobileStateHome {\n waysWeCanHelp: DesktopCard[];\n financialTools: DesktopCard[];\n}\n\nexport interface MobileStateExplore {\n waysWeCanHelp: DesktopCard[];\n moreForYouToExplore: DesktopCard[];\n}\n\nexport interface MobileStateActionRequest {\n key: string;\n action: MobileStateAction;\n}\n\nexport interface AvailabilityHours {\n between: string;\n}\n\nexport interface RequiredVerification {\n type: string;\n fullSsn?: Last4Ssn;\n status?: VerificationStatus;\n eligibility_field?: EligibilityFieldsObject;\n}\n\nexport interface EligibilityFieldsInterface {\n elective_products?: string[];\n eligibility_fields: EligibilityFieldsObject[];\n}\n\nexport interface EligibilityFieldsObject {\n name: string;\n api_parameter_name: string;\n unique_identifier_flag?: boolean;\n value?: string;\n not_replayable?:boolean;\n sub_fields?: EligibilityFieldsObject[];\n}\n\nexport enum VerificationStatus {\n STARTED = 'started',\n COMPLETED = 'completed',\n}\n\nexport interface Last4Ssn {\n last4: string;\n}\n\nexport interface FullSsnRequest {\n ssn: string;\n}\n\nexport interface Survey {\n questions: SurveyQuestion[];\n}\n\nexport interface SurveyQuestion {\n questionOrder: number;\n id: string;\n choices: string[];\n field_type: SurveyQuestionType;\n field_label: string;\n instructions?: string;\n}\n\nexport enum MobileStateAction {\n CLOSED = 'closed',\n}\n\n//MW finsol.service LinkedBank\nexport interface LinkedBank {\n id: number;\n status: LinkedBankStatus;\n type: string; // we only support type of routing now TODO make enum\n bank_name: string;\n last_four: string;\n account_class: string; // TODO make enum\n create_ts: string;\n bank_code?: string;\n balance_verifiable: boolean;\n bank_logo?: string;\n micro_meta?: LinkedBankMicro | null;\n}\n\nexport interface LinkedBankMicro {\n is_resend_available: boolean;\n micro_deposit_initiated_ts: string;\n remaining_verification_attempts: number;\n sent_micro_deposit_attempts: number;\n}\n\nexport interface BaseSavingsAccount {\n balance: number;\n available_balance: number;\n // do NOT use the status field; mobile-state savingsSetup tells us the correct account statuses for account creation\n // unknown how API/UX handles locked accounts\n status: string; // TODO make enum\n // do NOT use the source field; not only is the data misleading but we ONLY support payroll autosavings at this time\n // need to use product eligibility (for new) and transfer_schedule.source (for existing)\n // if not eligible for payrollSavings product (dont allow create)\n // if transfer_schedule.source not payroll (dont allow edit)\n source?: SavingsSource;\n monthly_withdrawals_remaining: number | null;\n}\n\n// see MW finsol SavingsAccountResponse interface\nexport interface SavingsAccount extends BaseSavingsAccount {\n banks: LinkedBank[];\n total_rewards_balance: number;\n autoSaveMatchReward: any; // desktop doesnt support rewards yet\n pay_frequency: string; // this could be undefined but we don't yet support non-payroll/non-employee in desktop\n name: string;\n next_deposit_amount?: number | null;\n next_deposit_date?: string | null;\n schedule_type?: SavingsScheduleType | null;\n schedule_paused?: string | null; // this is a date field\n active_status: string; //this is deprecated do not use it\n linked_account_status?: string; // should not use this, use banks[] instead\n is_first_schedule?: boolean;\n last_four_accnum: string;\n}\n\n// see https://healthydollar.atlassian.net/wiki/spaces/EN/pages/727843066/Savings+API#GET-Savings-Transactions-[inlineExtension]\nexport enum SavingsTransactionCategory {\n WITHDRAWAL = 'withdrawal',\n DEPOSIT = 'deposit',\n REWARD = 'reward'\n}\n\n// see MW finsol SavingsTransaction interface\nexport interface SavingsTransaction {\n label?: string; // undefined for skipped, TODO enum\n id: number | string;\n amount: number;\n is_credit: boolean;\n is_skipped: boolean;\n source?: any;\n estimated_arrival_date?: string | null;\n transaction_date?: string;\n status: string; //TODO enum\n type: string; // TODO enum\n category: SavingsTransactionCategory;\n client_display?: string; // undefined for skipped TODO enum\n skip_planned?: boolean; // used for skipped\n cutoff_date?: string;\n next_transfer_date?: string;\n description?: string;\n}\n\nexport interface SavingsAch extends BaseSavingsAccount {\n routing_number: string;\n account_number: string;\n}\n\nexport interface SavingsScheduleCreateRequest {\n schedule_type: SavingsScheduleType;\n next_transfer_date: string;\n amount: number;\n source: SavingsSource;\n}\n\nexport interface SavingsSchedulePatchRequest extends SavingsScheduleCreateRequest {\n action: SavingsSchedulePatchAction;\n}\n\nexport interface SavingsScheduleResponse extends ApiResponse {\n linkedCompletely: boolean;\n errorMessage?: string;\n}\n\nexport interface SavingsPayrollScheduleResponse {\n schedule: string[];\n}\n\n// see https://healthydollar.atlassian.net/wiki/spaces/EN/pages/727843066/Savings+API#Get-Savings-Goal-Progress\nexport interface SavingsGoal {\n name: string;\n targetAmount: number;\n currentAmount: number;\n percentCompleted: number;\n status: string; // enum? unused\n id: number; // unused\n message: string; //unused\n}\n\nexport interface DesktopCard {\n vendor?: string;\n processing?: boolean;\n case_type?: DesktopCardCaseType;\n\n closeable?: boolean;\n expandable?: boolean;\n\n segments?: DesktopCardSegment[];\n\n key?: string;\n state?: string;\n\n type?: DesktopCardType;\n style?: DesktopCardStyle;\n\n cta?: string;\n ctaPath?: string;\n\n icon?: string;\n graphic?: string;\n\n title?: string;\n text?: string;\n titleKey?: string;\n textKey?: string;\n subText?: string;\n\n hidden?: boolean;\n\n analytics?: AnalyticsActions;\n footer?: DesktopCardFooter;\n}\n\nexport interface DesktopCardFooter {\n title: string;\n rightImage?: string;\n leftImage?: string;\n ctaPath?: string;\n style?: string;\n}\n\nexport interface DesktopCardSegment {\n icon: string;\n title: string;\n subText: string;\n ctaPath: string;\n\n type: DesktopSegmentType;\n style: DesktopCardStyle;\n condition: DesktopCardCondition;\n\n /* These don't come from service and our desktop only */\n dynamicValue?: string | number;\n dynamicType?: DesktopCardSegmentDynamicType;\n}\n\nexport interface DesktopCardAction {\n code?: string;\n label: string;\n route?: string;\n}\n\n//MW TransferParticipant\nexport interface TransferAccountBase {\n type: TransferAccountType;\n id?: number;\n}\n//MW TransferAccount\nexport interface TransferAccountDisplay extends TransferAccountBase{\n name: string;\n balance: number;\n //TODO logo?\n lastFour: string;\n}\n//MW Transfer\nexport interface TransferRequest {\n to: TransferAccountBase;\n from: TransferAccountBase;\n amount: number;\n transfer_date: string;\n transfer_reason?: string;\n transfer_reason_key?: string;\n}\n\nexport interface LinkedAccountRequestBody {\n account_class: LinkedAccountType;\n account_num: string;\n routing_num: string;\n}\n\nexport interface LinkedAccountResponse extends ApiResponse {\n linkedCompletely: boolean;\n errorMessage?: string;\n}\n\nexport interface LinkedAccountVerifyRequestBody {\n bankId: number;\n amounts: (string | null | undefined)[];\n}\n\nexport interface LinkedAccountVerifyResponse extends ApiResponse {\n linkedCompletely: boolean;\n errorMessage?: string;\n}\n\nexport interface Question {\n instructions_copy?: string;\n id: string;\n choices: any[];\n instructions?: string;\n field_label: string;\n field_type: QuestionType;\n questionOrder: number;\n style?: any;\n}\n\nexport enum QuestionType {\n CHOICE = 'choice',\n CHOICE_MULTI = 'choiceMulti',\n}\n//TODO move non-api-contracts to another place, for example shared-autosave module\n/**\n * This allows for a lot of helper methods and can reduce a lot of duplicated code.\n *\n */\nexport class BasicComponentConfig {\n constructor(config: any = {}) {\n this.fbPage = config.fbPage || '';\n this.fbSubCategory = config.fbSubCategory || '';\n this.fbCategory = config.fbCategory || '';\n this.fbEventName = config.fbEventName || '';\n this.pageTitle = config.pageTitle || '';\n this.pageTitleImage = config.pageTitleImage || '';\n this.pageSubTitle = config.pageSubTitle || '';\n this.pageTitleKey = config.pageTitleKey || '';\n this.pageTitle = config.pageTitle || '';\n this.pageSubTitle = config.pageSubTitle || '';\n this.pageSubTitleKey = config.pageSubTitleKey || '';\n this.pageBodyText = config.pageBodyText;\n this.pageBodyTextKey = config.pageBodyTextKey;\n this.pageCtaLabel = config.pageCtaLabel || '';\n this.pageCtaLabelKey = config.pageCtaLabelKey || '';\n this.pageCtaEventName = config.pageCtaEventName || '';\n this.pageSecondaryCtaLabel = config.pageSecondaryCtaLabel || '';\n this.pageSecondaryCtaLabelKey = config.pageSecondaryCtaLabelKey || '';\n this.pageStepperActiveIndex = config.pageStepperActiveIndex || 0;\n this.pageOnBackCtaPath = config.pageOnBackCtaPath || [];\n this.pageOnForwardCtaPath = config.pageOnForwardCtaPath || [];\n this.pageOnForwardSecondaryCtaPath = config.pageOnForwardSecondaryCtaPath || [];\n this.bridgeExitOverride = config.bridgeExitOverride || '';\n }\n\n fbPage: string;\n fbSubCategory: string;\n fbCategory: string;\n fbEventName?: string;\n\n pageTitle?: string;\n pageTitleImage?: string;\n pageTitleKey?: string;\n pageSubTitle?: string;\n pageSubTitleKey?: string;\n pageBodyText?: string;\n pageBodyTextKey?: string;\n pageCtaLabel?: string;\n pageCtaLabelKey?: string;\n pageCtaEventName?: string;\n pageSecondaryCtaLabel?: string;\n pageSecondaryCtaLabelKey?: string;\n\n pageStepperActiveIndex?: number;\n pageOnBackCtaPath: string[];\n pageOnForwardCtaPath: string[];\n pageOnForwardSecondaryCtaPath?: string[];\n bridgeExitOverride?: string;\n /**\n * this defaults to view details for the firebase analytics, but can be overridden and extended as needed.\n *\n * @param action the action to fire, defaults to \"\" if not provided. only needed for click events.h\n * @param merge any extra attributes to pass into the firebase event.\n */\n\n //TODO: convert to pipe config | analyticEventName:'shown' returns config.fbEventName + _'shown'\n\n analyticsAttributes(\n action: string = '',\n merge?: { [key: string]: string },\n useCtaEvent: boolean = false\n ): AnalyticsAttributesV4 {\n return <AnalyticsAttributesV4>{\n event_name: this.fbEventName,\n\n ...merge,\n };\n }\n}\n\nexport class Settings extends BasicComponentConfig {\n constructor(config: any = {}) {\n super(config);\n this.analytics = config.analytics || null;\n if (this.analytics != null) {\n console.log(`v4 analytic setup: [ shown: ${this.analytics.shown} ]`);\n }\n this.pageHideBackButton = config.pageHideBackButton || false;\n this.pageOnForwardCtaData = config.pageOnForwardCtaData || {};\n }\n\n analytics?: AnalyticsActions;\n pageOnForwardCtaData?: { [key: string]: any };\n pageHideBackButton?: boolean;\n}\n\nexport class QuestionsSettings extends Settings {\n constructor(config: any = {}) {\n super(config);\n this.surveyType = config.surveyType || '';\n this.questions = config.questions || [];\n }\n surveyType: string;\n questions: Question[];\n}\n\nexport class AutosaveComponentConfig extends BasicComponentConfig {\n constructor(config: any) {\n super(config);\n this.mode = config.mode || AutosaveMode.DEFAULT;\n this.pageAutosaveAmount = config.pageAutosaveAmount;\n this.pageStepperActiveIndexForSkipped = config.pageStepperActiveIndexForSkipped || -1;\n }\n\n mode: AutosaveMode;\n pageStepperActiveIndexForSkipped?: number;\n pageAutosaveAmount?: number;\n}\n\nexport interface PayrollAccountResponse {\n status: CustodialAccountStatus;\n}\nexport interface PayrollScheduleResponse {\n schedule: string[];\n}\n\nexport interface CreditSetupResponse extends ApiResponse {\n reasonCode?: string;\n status: CreditSetupStatus;\n kbaFailedAttempts?: number;\n remainingSMFAAttempts?: number;\n isKBAAllowed?: boolean;\n smfaTimeTimeoutInMinutes?: number;\n kbaQuiz?: CreditSetupKbaQuiz;\n features?: string[];\n\n}\n\nexport interface CreditSetupVerifyResponse {\n apiResponse: CreditSetupResponse | null;\n verifyStatus: CreditSetupVerifyStatus;\n}\n\nexport interface CreditSetupKbaRequest {\n type: string;\n answers: CreditSetupKbaQuestionAnswer[];\n}\n\nexport interface CreditSetupKbaQuiz {\n questions: CreditSetupKbaQuizQuestion[];\n}\n\nexport interface CreditSetupKbaQuizQuestion {\n field_label: string;\n field_type: string;\n id: string;\n questionOrder: number;\n choices: string[];\n answerIdMapping: any; //ToDo: give it correct type\n}\n\nexport interface CreditSetupKbaQuestionAnswer {\n questionId: number;\n answerId: number;\n}\n\nexport interface CreditSummary {\n creditScore: CreditScore;\n scoreHistory?: CreditScore[];\n factors: CreditFactor[];\n}\nexport interface CreditScore {\n score: number;\n reportDate: number;\n creditScoreChange: string;\n scoreRange: string;\n}\nexport interface CreditFactor {\n label: string;\n value: string;\n descriptionText: string;\n improvementText: string;\n}\n\nexport interface CreditSubscription {\n statusCode: number;\n status: string;\n}\n\nexport interface GooglePredictionsArray {\n predictions: GoogleAddressResult[];\n status: string;\n}\n\nexport interface GoogleAddressResult {\n structured_formatting: GoogleAddressResultObject;\n place_id: string;\n}\n\nexport interface GoogleAddressResultObject {\n main_text: string;\n secondary_text: string;\n place_id: string;\n}\n\nexport interface GooglePlaceDetails {\n result: GooglePlaceDetailsResults;\n status: string;\n}\n\nexport interface GooglePlaceDetailsResults {\n address_components: GooglePlaceAddressComponent[];\n}\n\nexport interface GooglePlaceAddressComponent {\n long_name: string;\n short_name: string;\n types: string[];\n}\n\nexport interface BadgeIDInterface {\n status: string;\n response: ApiResponse;\n}\n\nexport interface IPAPIComInterface {\n status: string;\n latitude: number;\n longitude: number;\n}\n\nexport interface NotificationInterface {\n icon?: string;\n desktopSupported?: boolean;\n action: {type:string};\n halfsheet: HalfsheetInterface;\n text: string;\n id?: string;\n}\n\nexport interface HalfsheetInterface {\n id: string;\n title: string;\n subText: string;\n}\n\nexport interface SpendingAccount {\n name: string;\n balance: number;\n dda_create_ts: string; // MM-DD-YYYY\n cards: string[];\n last_four_accnum: string;\n}\n\n","import { Injectable } from '@angular/core';\nimport { ApiCacheService } from './api-cache.service';\nimport { ApiResponse, AxiosResponse } from '@brightside-web/desktop/data-access/shared';\nimport {forkJoin, from, Observable, of, Subscription} from 'rxjs';\nimport {\n AwsApiWrapperService\n} from '@brightside-web/desktop/data-access/core-services';\nimport {map, tap} from 'rxjs/operators';\n\n\nexport interface TermsType {\n forHelix?: boolean;\n url?: any;\n key:string;\n label:string;\n path?:string;\n filter?:string;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class TermsService {\n sub = new Subscription();\n termTypes: TermsType[];\n\n constructor(\n private apiCache:ApiCacheService,\n private awsApiWrapperService: AwsApiWrapperService\n ) { }\n\n getTypes() : Observable<TermsType[]> {\n if (this.termTypes && this.termTypes.length !== 0) {\n return of(this.termTypes);\n } else {\n return from(this.awsApiWrapperService.get('api-mobile-noauth', '/cdn-resource/terms/types.json', {body: null})).pipe(\n tap(terms => {\n this.termTypes = terms;\n })\n );\n }\n }\n\n\n\n //MW terms.service\n acceptTerms(...keys:string[]): Observable<boolean>{\n return forkJoin(keys.map<Observable<ApiResponse>>(key => from(this.postTerms(key)))).pipe(\n map(responses => responses.every((response: ApiResponse) => response.statusCode === 200))\n );\n }\n\n acceptTermsFromConsentArray(consents: {key:string}[]): Observable<boolean>{\n const keys: string[] = consents.filter((consent) => !!consent.key).map((consentLine) => consentLine.key);\n return this.acceptTermsFromArray(keys);\n }\n\n acceptTermsFromArray(keys: string[]): Observable<boolean>{\n return forkJoin(keys.map<Observable<ApiResponse>>(key => from(this.postTerms(key)))).pipe(\n map(responses => responses.every((response: ApiResponse) => response.statusCode === 200))\n );\n }\n\n private postTerms(key:string):Promise<ApiResponse>{\n this.apiCache.refreshItem(`/terms/acceptance?type=${key}`);\n return this.awsApiWrapperService.post('api-mobile',`/terms/acceptance?type=${key}`, {headers:{\"Content-Type\":\"application/json\"}})\n }\n\n //MW terms.service\n fetchTerms(key: string): Observable<string> {\n return this.apiCache.get<string>('api-mobile-noauth', `/terms?deviceType=html&type=${key}`, {\n 'responseType': 'text'\n });\n }\n\n //MW terms.service fetchTermsAcceptance\n getTermsAcceptance(...keys:string[]): Observable<boolean>{\n return forkJoin(keys.map<Observable<AxiosResponse>>(key => from(this.getAcceptance(key)))).pipe(\n map(responses => responses.every((response: AxiosResponse) => response.status === 200))\n );\n }\n\n private getAcceptance(key:string): Observable<AxiosResponse>{\n return this.apiCache.get<AxiosResponse>('api-mobile',`/terms/acceptance?type=${key}`, {response: true});\n }\n\n}\n","import { Injectable } from '@angular/core';\nimport {forkJoin, from, Observable} from 'rxjs';\nimport { ApiResponse } from './api-contracts';\nimport {\n AwsApiWrapperService,\n BsCacheService,\n} from '@brightside-web/desktop/data-access/core-services';\nimport { HttpClient } from '@angular/common/http';\nimport {concatMap, map} from 'rxjs/operators';\nimport * as moment from \"moment\";\nimport { CompanyService } from \"@brightside-web/desktop/data-access/shared\";\n\nexport enum NotificationMessageTypeEnum {\n CHANGE_EMAIL = \"account-change-password-notify\"\n}\n\nexport enum NotificationMessageChannelEnum {\n EMAIL = 'email'\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class NotificationService {\n constructor(\n private http: HttpClient,\n private companyService: CompanyService,\n private awsApiWrapperService: AwsApiWrapperService,\n private bsCacheService: BsCacheService,) { }\n\n sendMessage(messageType: NotificationMessageTypeEnum, channel: NotificationMessageChannelEnum) : void {\n this.awsApiWrapperService.post('api-mobile', '/notification', {body:{\n messageType,\n channel\n }});\n }\n\n generateDynamicLink(route:string,cardName:string):Observable<ApiResponse>{\n return from(this.awsApiWrapperService.post('api-mobile','/notification',{body:{\n messageType:'desktopCardToMobile',\n channel:'sms',\n dynamicLink:route,\n cardName\n }}));\n }\n// TODO: ken check this\n sendGetTheAppMessage(phone_number:string, user_agent:string):Observable<ApiResponse>{\n\n return this.http.get<{ip:string}>('https://api.ipify.org/?format=json').pipe(\n concatMap( (ip) => from(this.bsCacheService.getItem('referrer')).pipe(\n map(referrer => {\n if(!referrer) {\n this.bsCacheService.setItem('referrer', this.companyService.getCompany(), { expires: moment().add(6000, 'seconds').valueOf() });\n referrer = this.companyService.getCompany()\n }\n return {ipInfo: ip, referrer}\n })\n )),\n concatMap( (resp: {ipInfo: {ip:string}, referrer:string}) => from(this.bsCacheService.getItem('referrerType')).pipe(\n map(referrerType => {\n if ( !referrerType ) {\n this.bsCacheService.setItem('referrerType', 'desktop', { expires: moment().add(6000, 'seconds').valueOf() });\n referrerType = 'desktop';\n }\n return {...resp, referrerType}\n })\n )),\n concatMap((final: {ipInfo: {ip:string}, referrer:string, referrerType:string}) => from(this.awsApiWrapperService.post('api-mobile-noauth','/landingpage',{body:{\n \"referrer\":final.referrer,\n \"referrerType\":final.referrerType,\n \"company\":'app',\n phone_number,\n user_agent,\n \"ip_address\":final.ipInfo.ip}})))\n )\n }\n}\n\n","import { Injectable, Injector} from '@angular/core';\nimport {BehaviorSubject, filter, from, Observable, of, switchMap, take} from 'rxjs';\nimport { ApiCacheService} from './api-cache.service';\nimport {\n ApiResponse,\n MobileStateResponse,\n MobileStateActionRequest,\n} from './api-contracts';\n\nimport {\n AwsApiWrapperService, BsCacheService\n} from '@brightside-web/desktop/data-access/core-services';\n\nimport {HttpErrorResponse} from \"@angular/common/http\";\nimport {catchError, map, tap} from \"rxjs/operators\";\nimport {EligibleProduct} from \"./api-enums\";\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MobileStateService {\n\n private apiCache: ApiCacheService;\n private awsApiWrapperService: AwsApiWrapperService;\n\n private _mobileState: BehaviorSubject<string> = new BehaviorSubject<string>('')\n public readonly mobileState: Observable<string> = this._mobileState.asObservable();\n\n private _mobileStateSubject$: BehaviorSubject<MobileStateResponse | null> = new BehaviorSubject<MobileStateResponse | null>(null);\n private _fetchingMobileState$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);\n\n constructor (\n private _injector: Injector,\n private _bsCacheService: BsCacheService,\n ) {}\n\n private getApiCacheService(): ApiCacheService {\n if (!this.apiCache) {\n this.apiCache = this._injector.get(ApiCacheService);\n }\n return this.apiCache;\n }\n\n private getAwsApiWrapperService(): AwsApiWrapperService {\n if (!this.awsApiWrapperService) {\n this.awsApiWrapperService = this._injector.get(AwsApiWrapperService);\n }\n return this.awsApiWrapperService;\n }\n\n getData() {\n const error = new HttpErrorResponse({status: 422});\n return of(error) as any;\n }\n\n get(force = false): Observable<MobileStateResponse> {\n // Check if another service is already fetching data\n if (this._fetchingMobileState$.value) {\n // Wait for the existing call to complete and return its result\n return this._mobileStateSubject$.pipe(\n switchMap(state => {\n if (state) {\n return of(state); // Return cached value if available\n } else {\n return this._mobileStateSubject$.asObservable(); // Otherwise, wait for next update\n }\n }),\n filter((state: any) => !!state), // Ensure non-null state is returned\n take(1) // Take only one emitted value\n );\n }\n\n // Set the fetching state to true to lock other requests\n this._fetchingMobileState$.next(true);\n\n const apiCache = this.getApiCacheService();\n\n if (force) {\n apiCache.refreshItem('/client/mobilestate');\n }\n\n // Make the API call\n return apiCache.get<MobileStateResponse>('api-mobile', '/client/mobilestate').pipe(\n tap(ms => {\n this._checkAndSendReferral();\n this._mobileStateSubject$.next(ms); // Cache the fetched state\n this._fetchingMobileState$.next(false); // Release the lock after successful fetch\n }),\n catchError(error => {\n console.error('Error fetching mobile state:', error);\n this._fetchingMobileState$.next(false); // Release the lock on error\n return of({\n supportNumber: '8559401507',\n home: defaultHome,\n });\n })\n );\n }\n\n put(requestBody: MobileStateActionRequest | {redirectCompleted:boolean}): Observable<ApiResponse> {\n const apiCache = this.getApiCacheService();\n const awsApiWrapperService = this.getAwsApiWrapperService();\n apiCache.refreshItem('/client/mobilestate');\n return from(awsApiWrapperService.put('api-mobile', `/client/mobilestate`, { body: requestBody }));\n }\n\n getProductOnboardingEligibility(product:EligibleProduct):Observable<boolean>{\n return this.get().pipe(\n map(mobileState => Boolean(mobileState.products?.includes(product)))\n )\n }\n\n private _checkAndSendReferral() {\n const awsApiWrapperService = this.getAwsApiWrapperService();\n this._bsCacheService.getItem('referralLink').then(\n referralLink => {\n if (referralLink) {\n awsApiWrapperService.post('api-mobile', '/referral-app-api', {\n body: {referralLink}\n }).then((result) => {\n if(result.result.status === 200) {\n this._bsCacheService.removeItem('referralLink');\n }\n });\n }\n }\n );\n }\n}\n\nconst defaultHome = {\n \"waysWeCanHelp\": [\n {\n \"title\": \"Credit score help\",\n \"toolText\": \"Connect your credit report for personalized insights\",\n \"text\": \"We'll help you understand and create a plan for your credit\",\n \"icon\": \"gauge\",\n \"ctaPath\": \"topic/topics/creditScore.html\",\n \"key\": \"creditScore\"\n },\n {\n \"title\": \"Money emergencies\",\n \"icon\": \"help_ring\",\n \"text\": \"We'll help you find the right solution for your emergency\",\n \"ctaPath\": \"topic/topics/emergencyMoney.html\",\n \"key\": \"emergencyMoney\"\n },\n {\n \"title\": \"Reducing debt\",\n \"text\": \"We'll help you make a plan to pay down your debt\",\n \"icon\": \"credit_card\",\n \"ctaPath\": \"topic/topics/debtReduction.html\",\n \"key\": \"debtReduction\"\n },\n {\n \"icon\": \"money_bag\",\n \"text\": \"We make it easy to start saving regularly and reach your goals\",\n \"toolText\": \"Get rewards for saving directly from your paycheck\",\n \"title\": \"Saving money\",\n \"ctaPath\": \"topic/topics/savings.html\",\n \"key\": \"savings\"\n }\n ],\n \"financialTools\": [\n {\n \"icon\": \"money_bag\",\n \"text\": \"Get rewards for saving directly from your paycheck\",\n \"title\": \"Saving money\",\n \"key\": \"savings\",\n \"ctaPath\": \"chat\"\n },\n {\n \"title\": \"Credit score help\",\n \"text\": \"Connect your credit report for personalized insights\",\n \"icon\": \"gauge\",\n \"key\": \"creditScore\",\n \"ctaPath\": \"chat\"\n },\n {\n \"title\": \"Spending account\",\n \"icon\": \"help_ring\",\n \"text\": \"Set up a spending account to get advances on your paycheck\",\n \"key\": \"spendingAccount\",\n \"ctaPath\": \"chat\"\n }\n ]\n};\n","// DO NOT IMPORT THIS FILE DIRECTLY\n// import FirebaseService into your constructors\n// otherwise your tests will fail\n\nimport { Injectable } from '@angular/core';\nimport { FirebaseService, RemoteConfig_DesktopNativeMapping } from './firebase.service';\nimport { AmplitudeService } from \"./amplitude.service\";\nimport {Environment} from \"@brightside-web/micro/core/environment\";\nimport { BsCacheService } from \"@brightside-web/desktop/data-access/core-services\";\n\nimport { initializeApp, FirebaseApp } from \"firebase/app\"\nimport {\n RemoteConfig,\n getRemoteConfig,\n fetchAndActivate,\n getValue,\n ensureInitialized,\n fetchConfig\n} from \"firebase/remote-config\";\nimport {\n Analytics as FbAnalytics,\n getAnalytics,\n setUserProperties,\n setUserId,\n logEvent\n} from \"firebase/analytics\";\nimport * as Sentry from \"@sentry/angular\";\n\n\n\nconst defaultMapping = {\n 'partner/Credit_Card_Refi': {\n path: 'partner/Credit_Card_Refi',\n },\n 'partner/Emergency_Cash': {\n path: 'partner/Emergency_Cash',\n },\n 'finsol/deep/savings/autosave/once': {\n path: 'home/deep/savings/intro',\n queryParamsType: 'auto',\n },\n home: {\n path: 'home',\n },\n onboarding: {\n path: 'onboarding',\n },\n setupcredit: {\n path: 'credit-setup/creation',\n },\n};\n\nconst pageShownAppend = ['video tapped', 'logo tapped'];\n\ninterface ThrottledEvent {\n lastCall: number;\n throttleTime: number;\n}\n\n/**\n * this class is poorly named, it sets up both Firebase Analytics AND Firebase Remote Config\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class FirebaseAnalyticsService implements FirebaseService {\n firebaseApp: FirebaseApp;\n fbRemoteConfig: RemoteConfig;\n fbAnalytics: FbAnalytics;\n\n events: { [p: string]: ThrottledEvent } = {};\n lastPageShownEvent: string;\n\n typeOveride: { [p: string]: () => Promise<string> } = {\n credit: async () => (await this.bsCacheService.getItem('ONBOARDING_FLOW_ACTIVE') ? 'onboarding' : 'standalone'),\n 'onboarding credit': async () => (await this.bsCacheService.getItem('ONBOARDING_FLOW_ACTIVE') ? 'onboarding' : 'standalone'),\n };\n\n typeOverRideKeys: string[];\n\n constructor(\n public amplitudeService: AmplitudeService,\n public env: Environment,\n protected bsCacheService: BsCacheService) {\n this.typeOverRideKeys = Object.keys(this.typeOveride);\n this.firebaseApp = this.initializeApp();\n this.fbRemoteConfig = this.getRemoteConfig();\n this.fbAnalytics = this.getAnalytics();\n }\n\n initializeApp() {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return initializeApp(this.env.firebase);\n }\n\n getRemoteConfig() {\n return getRemoteConfig(this.firebaseApp);\n }\n\n getAnalytics() {\n return getAnalytics(this.firebaseApp);\n }\n\n async logEvent(\n eventName: string,\n eventParams?: { custom: { [p: string]: any } | string; [p: string]: any },\n shouldThrottle: boolean = false,\n throttleTime?: number\n ): Promise<void> {\n if (eventName && eventName !== 'onboardingcredit shown') {\n if (eventName.includes('shown')) this.lastPageShownEvent = eventName.split('shown')[0].trim();\n if (pageShownAppend.includes(eventName)) eventName = `${this.lastPageShownEvent} ${eventName}`;\n\n const isEventThrottled = shouldThrottle === false ? false : this.isEventThrottled(eventName, throttleTime);\n\n if (!isEventThrottled) {\n let params = eventParams ?? {};\n\n if (eventParams?.custom && typeof eventParams?.custom === 'object') {\n eventParams.custom = JSON.stringify(eventParams?.custom);\n params = eventParams.custom;\n }\n\n for (let i = 0; i < this.typeOverRideKeys.length; i++) {\n if (eventName.startsWith(this.typeOverRideKeys[i])) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n params['type'] = await this.typeOveride[this.typeOverRideKeys[i]]();\n break;\n }\n }\n\n this.amplitudeService.logEvent(eventName.split('_').join(' '), params);\n\n logEvent(this.fbAnalytics, eventName, eventParams);\n if (!this.env.production) {\n console.log(`Analytics event fired: ${eventName.split('_').join(' ')} with `, params);\n }\n }\n }\n }\n\n isEventThrottled(eventName: string, throttleTime?: number): boolean {\n const event = this.events[eventName];\n const currentCall = Date.now();\n\n if (event) {\n if (currentCall - event.lastCall > event.throttleTime) {\n event.lastCall = currentCall;\n return false;\n } else {\n return true;\n }\n } else {\n this.events[eventName] = {\n lastCall: currentCall,\n throttleTime: throttleTime ? throttleTime : 1000,\n };\n return false;\n }\n }\n\n setUserId(id: string, options?: any): void {\n setUserId(this.fbAnalytics, id, options);\n this.amplitudeService.setUserId(id);\n }\n\n clearProperties(): void {\n setUserId(this.fbAnalytics, '');\n setUserProperties(this.fbAnalytics, {});\n }\n\n setProperties(properties: { [key: string]: string }) {\n setUserProperties(this.fbAnalytics, properties);\n }\n\n setupRemoteConfig() {\n fetchAndActivate(this.fbRemoteConfig)\n .then(() => {})\n .catch(error => {\n Sentry.captureException(error);\n });\n }\n\n remoteConfig(): RemoteConfig {\n return this.fbRemoteConfig;\n }\n\n getValueAsString(valueKey: string): string {\n return getValue(this.fbRemoteConfig, valueKey).asString();\n }\n\n getValueAsBoolean(valueKey: string): boolean {\n return getValue(this.fbRemoteConfig, valueKey).asBoolean();\n }\n\n ensureInitialized(): Promise<void> {\n return ensureInitialized(this.fbRemoteConfig);\n }\n\n fetchConfig(): Promise<void> {\n return fetchConfig(this.fbRemoteConfig);\n }\n\n remoteConfigMapping(): { [key: string]: any } {\n try {\n return JSON.parse(getValue(this.fbRemoteConfig, RemoteConfig_DesktopNativeMapping).asString()) as { [key: string]: any };\n } catch (e) {\n Sentry.captureException(e);\n return defaultMapping;\n }\n return defaultMapping;\n }\n}\n","import {Injectable, OnDestroy} from '@angular/core';\nimport {from, Observable, of, Subscription, switchMap} from 'rxjs';\nimport {map} from 'rxjs/operators';\nimport {\n BsHubService,\n AwsApiWrapperService,\n BsCacheService\n} from '@brightside-web/desktop/data-access/core-services';\nimport {\n RequiredVerification,\n RequiredVerificationsEnums,\n VerificationStatus,\n EligibilityFieldsObject,\n EligibilityFieldsInterface, ApiCacheService, VerificationStatusInterface, CompanyService\n} from '..';\nimport {MobileStateService} from './mobile-state.service';\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class RequiredVerificationService implements OnDestroy {\n private sub = new Subscription();\n\n requiredVerifications: RequiredVerification[] | undefined;\n overriddenNextVerification: RequiredVerification | undefined;\n isIdentityCompleted: boolean;\n hasBeenCleared: boolean;\n\n company: string;\n employmentType: string;\n\n apiVersion = '1.4';\n\n electiveProducts: string[] = [];\n\n constructor(\n private mobile:MobileStateService, private apiSvc: ApiCacheService,\n private companyService: CompanyService,\n private bsCacheService: BsCacheService,\n private awsApiWrapper: AwsApiWrapperService,\n private bsHubService: BsHubService\n ) {\n this.bsHubService.listen(RequiredVerificationsEnums.HUBCHANNEL, data => {\n if (data.payload.event === 'clear') {\n this.clearRequiredVerifications();\n }\n });\n }\n\n getDataToCollect(replay: boolean = false) : Observable<EligibilityFieldsInterface>{\n const params = {};\n let payload: any;\n const company = this.companyService.getCompany();\n\n return from(this.bsCacheService.getItem('employmentType')).pipe(\n switchMap(employmentType => {\n if (company) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n params['company'] = company;\n }\n if (employmentType) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n params['employment_type'] = employmentType;\n }\n if (params) {\n payload = Object.entries(params).map(([key, val]) => `${key}=${val}`).join('&');\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return from(this.awsApiWrapper.get('api-mobile', `/client/eligibility/data-collect?fieldVersion=${this.apiVersion}&replay=${replay}&${payload}`, {}));\n })\n )\n }\n\n ngOnDestroy() {\n this.sub.unsubscribe();\n }\n\n clearRequiredVerifications() {\n this.hasBeenCleared = true;\n this.requiredVerifications = undefined;\n window.localStorage.removeItem(RequiredVerificationsEnums.LOCALSTORAGE);\n }\n\n getRequiredVerifications(replay?: boolean, skipCreation?: boolean):Observable<RequiredVerification[] | null> {\n\n if (replay) {\n return this.getDataToCollect(true).pipe(\n map(response => {\n\n if (response.eligibility_fields && response.eligibility_fields.length > 0) {\n const newVerifications : RequiredVerification[] = [];\n response.eligibility_fields.forEach( value => {\n newVerifications.push({type: value.name, eligibility_field: value});\n });\n this.electiveProducts = response.elective_products ?? [];\n return newVerifications;\n } else {\n return [];\n }\n }\n )\n );\n }\n\n return this.getDataToCollect(false).pipe(\n map(response => {\n\n if (response.eligibility_fields && response.eligibility_fields.length > 0) {\n const newVerifications : RequiredVerification[] = [];\n this.requiredVerifications = [];\n\n response.eligibility_fields.forEach( value => {\n newVerifications.push({type: value.name, eligibility_field: value});\n });\n\n window.localStorage.setItem(RequiredVerificationsEnums.LOCALSTORAGE, JSON.stringify(newVerifications));\n this.requiredVerifications = newVerifications;\n\n this.electiveProducts = response.elective_products ?? [];\n\n return newVerifications;\n } else {\n this.requiredVerifications = [];\n return [];\n }\n }\n )\n )\n }\n\n getVerificationOfType(type: string): RequiredVerification | undefined {\n return this.requiredVerifications?.find(verification => verification.type === type);\n }\n\n setRequiredVerifications() {\n window.localStorage.setItem(RequiredVerificationsEnums.LOCALSTORAGE, JSON.stringify(this.requiredVerifications));\n }\n\n updateRequiredVerificationStatus(type: string, status: VerificationStatus) {\n if(this.requiredVerifications) {\n const updateVerification = this.getVerificationOfType(type);\n if (updateVerification) {\n updateVerification['status'] = status;\n } else {\n this.requiredVerifications.push({type: type, status: status});\n }\n } else {\n this.requiredVerifications = [{type: type, status: status}];\n }\n this.setRequiredVerifications();\n }\n\n getRequiredVerificationStatus(type: string): string | undefined {\n return this.getVerificationOfType(type)?.status;\n }\n\n getNextRequiredVerification():Observable<RequiredVerification> {\n\n return this.getRequiredVerifications(false).pipe(\n map( verifications => {\n if (verifications) {\n const nextVerification = verifications.find(verification => !verification.status || verification.status !== VerificationStatus.COMPLETED);\n return nextVerification ? nextVerification : {type: 'none'};\n } else {\n return {type: 'none'};\n }\n })\n );\n }\n\n setNextRequiredVerification(verification: RequiredVerification) {\n this.overriddenNextVerification = verification;\n }\n\n identityCompleted(isCompleted?:boolean) {\n this.isIdentityCompleted = true;\n }\n\n}\n\n","import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ModalService {\n constructor() {}\n\n getModalModel(key: string): ModalModel {\n return modalModelMap[key];\n }\n}\n\nexport interface ModalModel {\n primaryCta: string;\n secondaryCta?: string;\n title: string;\n bodyText: string[];\n}\nexport interface ModalModelMap {\n [key: string]: ModalModel;\n}\nconst modalModelMap: ModalModelMap = {\n equifaxBlurb: {\n primaryCta: 'OK',\n title: 'About VantageScore 3.0',\n bodyText: [\n 'VantageScore 3.0 is a credit scoring model that uses data from your Equifax credit report to calculate your credit score.',\n 'Third parties may use a different version of the VantageScore 3.0 model or a different credit scoring model altogether to assess your creditworthiness.',\n ],\n },\n};\n","import {Injectable, Injector} from '@angular/core';\nimport {Observable, of, ReplaySubject, shareReplay, catchError, switchMap, take} from 'rxjs';\nimport { ApiCacheService } from './api-cache.service';\nimport {tap} from \"rxjs/operators\";\nimport {BsApiService, BsAuthService, UserAttributesInterface} from \"@brightside-web/desktop/data-access/core-services\";\n\nexport interface ChatTokenResponse {\n chatToken: string;\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ProfileService {\n // private profileSubject$: ReplaySubject<UserAttributesInterface> | null = null;\n\n private profileSubject$: ReplaySubject<UserAttributesInterface> | null = null;\n private lastFetchTimestamp: number | null = null;\n private readonly cacheExpiration = 30 * 1000; // 30 seconds\n\n\n\n private bsAuthService: BsAuthService;\n private bsApiService: BsApiService;\n\n private readonly _defaultProfile: ProfileResponse = {\n guid: '',\n intercom_external_id: '',\n lastName: '',\n firstName: '',\n phoneNumber: '',\n email: '',\n locale: '',\n company: '',\n sfContactId: ''\n };\n\n constructor(\n private apiCache: ApiCacheService,\n private injector: Injector\n ) {}\n\n private getBsAuthService(): BsAuthService {\n if (!this.bsAuthService) {\n this.bsAuthService = this.injector.get(BsAuthService);\n }\n return this.bsAuthService;\n }\n\n private getBsApiService(): BsApiService {\n if (!this.bsApiService) {\n this.bsApiService = this.injector.get(BsApiService);\n }\n return this.bsApiService;\n }\n\n getProfile(force = false): Observable<UserAttributesInterface> {\n const authService = this.getBsAuthService();\n const apiService = this.getBsApiService();\n return authService.isAuthenticated().pipe(\n switchMap(authenticated => {\n if (!authenticated) {\n return of(this._convertAttributes({...this._defaultProfile}));\n } else {\n if (!this.profileSubject$ || force) {\n this.profileSubject$ = new ReplaySubject<UserAttributesInterface>(1);\n\n apiService.get<ProfilePayload>('api-mobile', '/client/profile-summary').pipe(\n tap(profile => {\n if (this.profileSubject$) {\n if (profile.payload) {\n this.profileSubject$.next(this._convertAttributes({...profile.payload}));\n } else {\n this.profileSubject$.next(this._convertAttributes({...this._defaultProfile}));\n }\n this.profileSubject$.complete();\n }\n }),\n catchError(error => {\n console.error('Error fetching profile:', error);\n if (this.profileSubject$) {\n this.profileSubject$.error(error);\n }\n return of(this._convertAttributes({...this._defaultProfile}));\n }),\n shareReplay({ bufferSize: 1, refCount: true })\n ).subscribe();\n }\n return this.profileSubject$.asObservable();\n }\n }),\n shareReplay({ bufferSize: 1, refCount: true }),\n take(1)\n );\n }\n\n getChatToken(): Observable<ChatTokenResponse> {\n return this.apiCache.get<ChatTokenResponse>('api-mobile','/chat/token');\n }\n\n private _convertAttributes(allResults: ProfileResponse): UserAttributesInterface {\n return {\n email: allResults.email ?? '',\n guid: allResults.guid ?? '',\n intercom_external_id: allResults.guid ?? '',\n last_name: allResults.lastName ?? '',\n first_name: allResults.firstName ?? '',\n phone_number: allResults.phoneNumber ?? '',\n locale: allResults.locale ?? '',\n company: allResults.company ?? '',\n sf_contact_id: allResults.sfContactId ?? ''\n };\n }\n}\n\nexport interface ProfilePayload {\n payload: ProfileResponse;\n}\n\nexport interface ProfileResponse {\n guid: string;\n intercom_external_id: string;\n lastName: string;\n firstName: string;\n phoneNumber: string;\n email: string;\n locale: string;\n company: string;\n sfContactId: string;\n}\n","import { ActivatedRoute } from '@angular/router';\n\nconst isTemplateFullScreen = (activatedRoute: ActivatedRoute) =>\n activatedRoute?.snapshot.data &&\n activatedRoute?.snapshot.data['appDisplayStyle'] &&\n activatedRoute?.snapshot.data['appDisplayStyle'] === 'fullScreen';\n\nconst convertBase64ToBlob = (base64String: string) => {\n const byteChars = atob(base64String); //To decrypt data\n const dataArray = new Array(byteChars.length);\n\n for (let i = 0; i < byteChars.length; i++) {\n dataArray[i] = byteChars.charCodeAt(i);\n }\n\n const byteArray = new Uint8Array(dataArray);\n\n return new Blob([byteArray], { type: 'application/pdf' });\n};\n\nexport { isTemplateFullScreen, convertBase64ToBlob };\n","import { Injectable } from '@angular/core';\nimport {from, Observable, switchMap} from 'rxjs';\nimport {\n AwsApiWrapperService,\n BsCacheService\n} from '@brightside-web/desktop/data-access/core-services';\n\nimport { CompanyService } from \"@brightside-web/desktop/data-access/shared\";\n\nexport interface InviteHouseholdCache {\n fName: string;\n lName: string;\n dateOfBirth: string;\n lastFourSSN: string;\n email?: string;\n employeeAlias?: string;\n homeAddressLine1?: string;\n homeAddressLine2?: string;\n homeAddressCity?: string;\n homeAddressState?: string;\n homeAddressZip?: string | number;\n}\n\nexport interface InviteHouseholdEmployeeCache {\n fName: string;\n lName: string;\n dateOfBirth: string;\n zipCode: string;\n}\n\nexport interface InviteRequest {\n referredClientName: string;\n type: InviteType;\n referralType: InviteReferralType;\n}\n\nexport interface InviteEmailRequest extends InviteRequest {\n email: string;\n}\n\nexport interface InvitePhoneRequest extends InviteRequest {\n sms: string;\n}\n\nexport enum InviteType {\n SMS = 'sms',\n EMAIL = 'email',\n}\n\nexport enum InviteReferralType {\n HOUSEHOLD = 'household',\n CLIENT = 'client',\n}\n\nconst HOUSEHOLD_CACHE_KEY = 'HOUSEHOLD_CACHE_KEY';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class InviteService {\n constructor(\n private companyService: CompanyService,\n private awsApiWrapperService: AwsApiWrapperService,\n private bsCacheService: BsCacheService\n ) {}\n\n static clearCacheHousehold() {\n BsCacheService.removeItemStatic(HOUSEHOLD_CACHE_KEY);\n }\n\n static preCacheHousehold(details: InviteHouseholdCache) {\n InviteService.clearCacheHousehold();\n BsCacheService.setItemStatic(HOUSEHOLD_CACHE_KEY, details);\n }\n\n static getPreCacheHousehold(): Promise<InviteHouseholdCache> {\n return BsCacheService.getItemStatic(HOUSEHOLD_CACHE_KEY);\n }\n\n saveDependent(details: InviteHouseholdCache): Observable<any> {\n InviteService.preCacheHousehold(details);\n\n return from(\n this.awsApiWrapperService.post('api-mobile', '/household?type=dependent', {\n body: {\n first_name: details.fName,\n last_name: details.lName,\n last_four_ssn: details.lastFourSSN,\n date_of_birth: details.dateOfBirth,\n },\n })\n );\n }\n\n verifyDependentEmployee(employeeDetails: InviteHouseholdEmployeeCache): Observable<any> {\n const company = this.companyService.getCompany();\n\n return from(InviteService.getPreCacheHousehold()).pipe(\n switchMap(dependentCache => {\n const dependent = {\n first_name: dependentCache.fName,\n last_name: dependentCache.lName,\n last_four_ssn: dependentCache.lastFourSSN,\n date_of_birth: dependentCache.dateOfBirth,\n company,\n };\n const employee = {\n primary_info: {\n first_name: employeeDetails.fName,\n last_name: employeeDetails.lName,\n zip_code: employeeDetails.zipCode,\n date_of_birth: employeeDetails.dateOfBirth,\n },\n };\n return from(\n this.awsApiWrapperService.post('api-mobile-noauth', '/client?source=self&type=dependent', {\n body: {\n ...dependent,\n ...employee,\n },\n })\n );\n })\n )\n }\n\n sendSMS(body: InvitePhoneRequest): Observable<any> {\n return from(this.awsApiWrapperService.post('api-mobile', '/client/invite', { body }));\n }\n\n sendEmail(body: InviteEmailRequest): Observable<any> {\n return from(this.awsApiWrapperService.post('api-mobile', '/client/invite', { body }));\n }\n}\n","import {Injectable, OnDestroy} from '@angular/core';\n\nimport {\n FirebaseService,\n MobileStateResponse,\n MappingDetail,\n RouteInfoInterface, MobileStateService\n} from \"@brightside-web/desktop/data-access/shared\";\nimport {Subscription} from \"rxjs\";\nimport {BsAuthService, BsHubService} from \"@brightside-web/desktop/data-access/core-services\";\nimport {HubCapsule} from \"@micro-core/message-bus\";\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CampaignRoutingService implements OnDestroy {\n nativeToDesktopMapping: any;\n mobileState: MobileStateResponse;\n currentlyWorking = false;\n sub = new Subscription();\n\n constructor(\n protected analytics: FirebaseService,\n private mobileStateService: MobileStateService,\n private bsHubService: BsHubService,\n private bsAuthService: BsAuthService,\n ) {\n\n const listener = (data: HubCapsule<any, any>) => {\n switch (data.payload.event) {\n case 'signedIn':\n this.bsAuthService.fetchUserAttributes().subscribe({\n next: attributes => {\n if (attributes.guid) {\n this.mobileStateService.get().subscribe(\n ms => {\n if (ms) {\n this.mobileState = ms;\n }\n }\n );\n }\n }\n });\n break;\n }\n }\n this.bsHubService.listen('bsAuth', listener);\n }\n\n\n campaignInMobileState(campaignKey: string) : MappingDetail | null {\n if (this.mobileState?.campaigns && campaignKey in this.mobileState.campaigns) {\n const ctaPath = this.mobileState.campaigns[campaignKey].path || '';\n return { path: ctaPath };\n }\n return null;\n }\n\n routeMappingInRemoteConfig(routeToString: string) : MappingDetail | null {\n this.nativeToDesktopMapping = this.nativeToDesktopMapping ?? this.analytics.remoteConfigMapping();\n if (routeToString in this.nativeToDesktopMapping) {\n return this.nativeToDesktopMapping[routeToString] || {path: ''};\n }\n return null;\n }\n\n /**\n * checks link against the campaigns in mobile state, then looks at a mapping property in Firebase Remote Config\n * @param campaignLink\n * @param errorEventName\n */\n navigateToCampaign(campaignLink: string, errorEventName?: string) : RouteInfoInterface | undefined {\n\n if (campaignLink && !this.currentlyWorking) {\n this.currentlyWorking = true;\n setTimeout(() => {this.currentlyWorking = false;}, 1000);\n // first we check if the gobrightside:// path matches to a campaign in mobile state\n const breakRoute = campaignLink.replace('gobrightside://', '').split('?');\n const msCampaignPath = this.campaignInMobileState(breakRoute[0]);\n\n if (msCampaignPath) {\n return {mappingDetail: msCampaignPath, queryString: breakRoute[1]};\n } else {\n // if we dont match to a campaign then we will try to match to a property in Remote Config for the mapping\n const routeMapping = this.routeMappingInRemoteConfig(breakRoute[0]);\n if (routeMapping) {\n\n if(routeMapping.path === 'loans') {\n routeMapping.path = 'loans/intro';\n }\n\n return {mappingDetail: routeMapping, queryString: breakRoute[1]};\n } else {\n if (errorEventName) this.analytics.logEvent(errorEventName);\n return undefined;\n }\n }\n } else {\n return undefined;\n }\n }\n\n ngOnDestroy() {\n this.sub.unsubscribe();\n }\n\n}\n","import {Injectable} from '@angular/core';\nimport {\n MappingDetail,\n RouteInfoInterface\n} from \"@brightside-web/desktop/data-access/shared\";\n\n@Injectable({\n providedIn: 'root'\n})\nexport class TopicRoutingService {\n\n constructor() { }\n\n navigateToTopic(topicLink: string) : RouteInfoInterface | undefined {\n const breakRoute = topicLink.replace('gobrightside://', '').replace('.html', '').split('?');\n\n const topic = breakRoute[0].split('/').pop();\n\n const route : MappingDetail = {\n path: `ways-we-can-help/topic/${topic}`\n }\n return {mappingDetail: route, queryString: breakRoute[1]};\n }\n}\n\n","import { Injectable } from '@angular/core';\nimport { MappingDetail, RouteInfoInterface } from '@brightside-web/desktop/data-access/shared';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class FindMoneyRoutingService {\n constructor() {}\n\n navigateToSurvey(surveyLink: string): RouteInfoInterface | undefined {\n const breakRoute = surveyLink.replace('gobrightside://', '').split('/');\n const partnerKey: string = breakRoute[2] || '';\n let path: string = '';\n if (partnerKey) {\n path = `find-money/intro/${partnerKey}`;\n } else {\n path = 'find-money/view';\n }\n \n\n const route: MappingDetail = {\n path,\n };\n return { mappingDetail: route, queryString: '' };\n }\n}\n","import { Injectable, NgZone } from '@angular/core';\nimport { BsHubService } from '@brightside-web/desktop/data-access/core-services';\nimport {\n FirebaseService,\n CampaignRoutingService,\n TopicRoutingService,\n SurveyRoutingService,\n} from '@brightside-web/desktop/data-access/shared';\nimport { Router } from '@angular/router';\nimport { ToastService } from '@brightside/brightside-ui-services';\nimport { FindMoneyRoutingService } from './find-money-routing.service';\n\nexport enum MappingParamType {\n AUTO = 'auto',\n DEFAULT = 'default',\n}\n\nexport interface MappingDetail {\n path: string;\n queryParams?: Record<string, string>;\n queryParamsType?: MappingParamType;\n}\n\nexport interface RouteInfoInterface {\n mappingDetail: MappingDetail;\n queryString: string;\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class InternalLinkRoutingService {\n constructor(\n protected analytics: FirebaseService,\n private _ngZone: NgZone,\n private router: Router,\n private campaignRouting: CampaignRoutingService,\n private topicRouting: TopicRoutingService,\n private toastSvc: ToastService,\n private bsHubService: BsHubService,\n private _surveyRouting: SurveyRoutingService,\n private _findMoneyRouting: FindMoneyRoutingService\n ) {}\n\n /**\n * these \"links\" can be received by the Desktop app in an intercom chat\n * on mobile the app would know how to handle them but for Desktop we have to define our own actions for each possible\n * gobrightside:// path\n * @param brightsideLink\n */\n public routeToLink(brightsideLink: string) {\n let routeInfo: RouteInfoInterface | undefined;\n\n if (brightsideLink.includes('gobrightside://topic')) {\n routeInfo = this.topicRouting.navigateToTopic(brightsideLink);\n } else if (brightsideLink.includes('gobrightside://survey')) {\n routeInfo = this._surveyRouting.navigateToSurvey(brightsideLink);\n } else if (brightsideLink.includes('gobrightside://find-money')) {\n routeInfo = this._findMoneyRouting.navigateToSurvey(brightsideLink);\n } else {\n // paths other than 'topic' are not necessarily campaigns, this code is misleading\n routeInfo = this.campaignRouting.navigateToCampaign(brightsideLink);\n }\n\n if (routeInfo) {\n this.routeMainAppTo(routeInfo.mappingDetail, routeInfo.queryString, brightsideLink);\n } else {\n this.toastError(brightsideLink);\n }\n }\n\n private toastError(brightsideLink: string) {\n // this.toastSvc.warn('Page could not be found',\n // {\n // key: \"internalLinkNotFound\"\n // }\n // );\n // this.analytics.logEvent('error_shown', { 'error id': brightsideLink })\n }\n\n private routeMainAppTo(routeToOptions: MappingDetail, routeQueryToString: string, brightsideLink: string) {\n const additionalOptions = { queryParams: {} };\n\n if (routeToOptions.queryParamsType === MappingParamType.AUTO && routeQueryToString) {\n const splitRouteQuery = routeQueryToString.split('&');\n\n additionalOptions.queryParams = splitRouteQuery.reduce((finalParams: { [key: string]: string }, paramValue: string) => {\n const brokenValue = paramValue.split('=');\n\n finalParams[brokenValue[0]] = brokenValue[1];\n\n return finalParams;\n }, {});\n }\n\n this._ngZone.run(() => {\n this.router\n .navigate(routeToOptions.path.split('/'), additionalOptions)\n .catch((reason) => {\n this.toastError(brightsideLink);\n })\n .finally(() => {\n this.bsHubService.dispatch('IntercomChannel', { event: 'close' });\n });\n });\n }\n}\n","import {inject, Injectable} from '@angular/core';\nimport {\n AwsApiWrapperService, BsAuthService\n} from \"@brightside-web/desktop/data-access/core-services\";\nimport * as moment from \"moment\";\nimport {Observable, Subscription, BehaviorSubject} from \"rxjs\";\nimport {\n CacheStorageService,\n ProfileService\n} from \"@brightside-web/desktop/data-access/shared\";\nimport {HttpClient} from \"@angular/common/http\";\nimport {Environment} from \"@brightside-web/micro/core/environment\";\nimport {TitleCasePipe} from \"@angular/common\";\n\ninterface CompanyObject {\n company: string;\n timeSet: number;\n}\n\ninterface CompanyConfig {\n supportNumber: string;\n}\n\ninterface RCCustomerInfo {\n code: string;\n displayName: string;\n supportNumber: string;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CompanyService {\n\n private bsAuthService: BsAuthService = inject(BsAuthService);\n\n private _company: BehaviorSubject<string> = new BehaviorSubject<string>('')\n private _supportNumber: BehaviorSubject<string> = new BehaviorSubject<string>('')\n private sub = new Subscription();\n\n public readonly company: Observable<string> = this._company.asObservable();\n public readonly supportNumber: Observable<string> = this._supportNumber.asObservable();\n\n constructor(\n private profileService: ProfileService,\n private http: HttpClient,\n public env: Environment,\n private cacheStorageSvc: CacheStorageService,\n private titleCasePipe: TitleCasePipe,\n private awsApiWrapperService: AwsApiWrapperService,\n ) {\n\n // wait a second for app to check/set company in cache from subdomain/company param\n // before we start trying to grab it from places\n setTimeout(() => {\n this.cacheStorageSvc.getItem('company').then(\n company => {\n if (company) this.setCompany(company);\n if (this._company.getValue() === '') {\n this.sub.add(\n this.bsAuthService.fetchUserAttributes().subscribe({\n next: (value) => {\n if (value && value.company) {\n this.setCompany(value.company);\n }\n }\n })\n );\n }\n }\n )\n }, 500);\n }\n\n setCompany(companyName: string) {\n if (companyName === '') {\n this._company.next('');\n this.cacheStorageSvc.removeItem('company');\n } else {\n this._company.next(companyName);\n const companyObj = { company: companyName};\n this.cacheStorageSvc.setItem('company', companyName, { expires: moment().add(6000, 'seconds').valueOf() });\n }\n\n this.updateSupportNumber();\n\n }\n\n getCompany() : string {\n return this._company.getValue();\n }\n\n // at this point supportNumber should just be 10 digits\n setSupportNumber(supportNumber: string) {\n supportNumber = this.phonePipeCopy(supportNumber);\n if (this._supportNumber.getValue() !== supportNumber && supportNumber !== '') {\n this._supportNumber.next(supportNumber);\n this.cacheStorageSvc.setItem('supportNumber', supportNumber, { expires: moment().add(6000, 'seconds').valueOf() });\n } else if (supportNumber === '') {\n this._supportNumber.next('');\n this.cacheStorageSvc.removeItem('supportNumber');\n }\n }\n\n getSupportNumber() : string {\n return this._supportNumber.getValue();\n }\n\n updateSupportNumber(file = ''): void {\n\n if (file === '') {\n if (this.getCompany()) {\n file = this.getCompany().toLowerCase();\n } else {\n file = 'app';\n }\n }\n\n this.awsApiWrapperService.get('api-mobile-noauth', `/cdn-resource/resources/configs/${file}.json`, {body: null})\n .then((data:any) => {\n this.setSupportNumber(data.supportNumber);\n })\n .catch((_:any) => {\n if (file !== 'app') {\n this.updateSupportNumber('app');\n } else {\n console.error(`Error, fallback failed~`);\n }\n });\n\n }\n\n private secondsSinceTime(startDate: number) {\n const millis = Date.now() - startDate;\n return Math.floor(millis/1000);\n }\n\n phonePipeCopy(value: string, mask = false) {\n if (value && value.length >= 10) {\n const normalized = value.replace(/[^0-9]/gi, '');\n\n // Ensure the phone number starts with \"1\"\n const withCountryCode = normalized.startsWith('1') ? normalized : `1${normalized}`;\n\n // Extract parts of the phone number\n const pt1 = withCountryCode.slice(1, 4); // Skip the first '1' for slicing\n const pt2 = withCountryCode.slice(4, 7);\n const pt3 = withCountryCode.slice(7, 11);\n\n if (mask) {\n const regex = /[0-9]/gi;\n return `1-${pt1.replace(regex, 'X')}-${pt2.replace(regex, 'X')}-${pt3}`;\n } else {\n return `1-${pt1}-${pt2}-${pt3}`;\n }\n }\n return '';\n }\n\n\n getCompanyDisplayName(value?: string): string {\n const companyKey = value ?? this.getCompany();\n try {\n if (companyKey.toLowerCase() === 'mckesson') {\n return 'McKesson';\n } else if (companyKey.toLowerCase() === 'airproducts') {\n return 'Air Products';\n } else if (companyKey.toLowerCase() === 'bigy') {\n return 'Big Y';\n } else {\n return this.titleCasePipe.transform(companyKey.toLowerCase());\n }\n } catch (e) {\n // if value and this._company are undefined/null/non-string\n return '';\n }\n }\n}\n","import {Inject, Injectable} from '@angular/core';\nimport {\n TranslateService,\n TranslateStore,\n TranslateLoader,\n TranslateCompiler,\n TranslateParser,\n MissingTranslationHandler,\n USE_DEFAULT_LANG,\n USE_STORE, USE_EXTEND,\n DEFAULT_LANGUAGE, MissingTranslationHandlerParams\n} from \"@ngx-translate/core\";\nimport {forkJoin, from, isObservable, Observable, of, Subscription} from \"rxjs\";\nimport {first, map} from \"rxjs/operators\";\nimport {\n BsAuthService,\n BsCacheService,\n BsHubService\n} from \"@brightside-web/desktop/data-access/core-services\";\nimport {CompanyService} from \"./company.service\";\nimport { TitleCasePipe } from \"@angular/common\";\nimport {FirebaseService} from \"./firebase.service\";\nimport {Environment} from \"@micro-core/environment\";\nimport * as Sentry from \"@sentry/angular\";\n\nclass TranslationError extends Error {\n constructor(msg:string) {\n super(msg);\n Object.setPrototypeOf(this, TranslationError.prototype);\n }\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class BrightsideTranslateService extends TranslateService implements TranslateService {\n\n private sub = new Subscription();\n\n _company: string;\n _companyDisplay: string;\n\n _hours: string;\n\n get hours(): string {\n return this._hours;\n }\n\n get companyDisplay(): string {\n return this._companyDisplay;\n }\n\n set companyDisplay(value: string) {\n if (value.toLowerCase() === 'mckesson') {\n this._companyDisplay = 'McKesson';\n } else if (value.toLowerCase() === 'airproducts') {\n this._companyDisplay = 'Air Products';\n } else if (value.toLowerCase() === 'amyskitchen') {\n this._companyDisplay = \"Amy's Kitchen\";\n } else if (value.toLowerCase() === 'bigy') {\n this._companyDisplay = \"Big Y\";\n } else if (value.toLowerCase() === 'schreiberfoods') {\n this._companyDisplay = \"Schreiber Foods\";\n } else {\n this._companyDisplay = this.titleCasePipe.transform(value.toLowerCase());\n }\n }\n\n get company(): string {\n return this._company;\n }\n\n set company(value: string) {\n this._company = value.toUpperCase().split(' ').join('_');\n this.companyDisplay = value;\n }\n\n _supportNumber: string;\n\n get supportNumber(): string {\n return this._supportNumber;\n }\n\n set supportNumber(value: string) {\n this._supportNumber = value;\n }\n\n firstName = '';\n lastName = '';\n\n get fullName() : string {\n return `${this.firstName} ${this.lastName}`;\n }\n\n constructor(\n public store: TranslateStore,\n public currentLoader: TranslateLoader,\n public compiler: TranslateCompiler,\n public parser: TranslateParser,\n public missingTranslationHandler: MissingTranslationHandler,\n private companyService: CompanyService,\n @Inject(USE_DEFAULT_LANG) useDefaultLang: boolean = true,\n @Inject(USE_STORE) isolate: boolean = false,\n @Inject(USE_EXTEND) extend: boolean = false,\n @Inject(DEFAULT_LANGUAGE) defaultLanguage: string = 'en',\n private analytics: FirebaseService,\n private titleCasePipe: TitleCasePipe,\n private env: Environment,\n private bsAuthService: BsAuthService,\n private bsCacheService: BsCacheService,\n private bsHubService: BsHubService\n ) {\n super(store, currentLoader, compiler, parser, missingTranslationHandler, useDefaultLang, isolate, extend, defaultLanguage);\n if (!this._hours) {\n this.bsCacheService.getItem('FAHOURS').then(\n fahours => {\n const cacheHours = fahours;\n this._hours = cacheHours ?? 'Weekdays, 8 a.m. to 9 p.m. ET';\n if (!cacheHours) this.bsCacheService.setItem('FAHOURS', this._hours);\n }\n )\n }\n this.sub.add(\n this.companyService.company.subscribe(\n value => {\n if (value) {\n this.company = value;\n }\n }\n )\n );\n this.sub.add(\n this.companyService.supportNumber.subscribe(\n value => {\n if (value) {\n this.supportNumber = value;\n }\n }\n )\n );\n this.bsHubService.listen('AuthChannel', (event: any) => {\n if (event.payload.event === 'logged out') {\n this.firstName = '';\n this.lastName = '';\n } else if (event.payload.event === 'logged in') {\n this.lastName = event.payload.data['family_name'];\n this.firstName = event.payload.data['given_name'];\n }\n });\n this.bsHubService.listen('OnboardingChannel', (data:any) => {\n if (data.payload.event === 'OnboardingComplete') {\n this.subscribeAndGetUserInfo();\n }\n\n });\n this.subscribeAndGetUserInfo();\n }\n\n public setLanguageAs(newLang: string) {\n //Only support en and es\n if (['en', 'es'].includes(newLang)) {\n this.use(newLang);\n }\n }\n\n private subscribeAndGetUserInfo() {\n this.sub.add(from(this.bsAuthService.fetchUserAttributes()).pipe(first()).subscribe(\n attributes => {\n if (attributes?.['last_name'] && attributes?.['first_name']) {\n this.lastName = attributes['last_name'];\n this.firstName = attributes['first_name'];\n }\n },\n err => {\n // no active session, catching error\n }\n ));\n }\n\n public getParsedResult(translations: any, key: any, interpolateParams?: Object): any {\n let res: string | Observable<string> | undefined;\n if (key instanceof Array) {\n let result: any = {},\n observables: boolean = false;\n for (let k of key) {\n result[k] = this.getParsedResult(translations, k, interpolateParams);\n if (isObservable(result[k])) {\n observables = true;\n }\n }\n if (observables) {\n const sources = key.map(k => isObservable(result[k]) ? result[k] : of(result[k] as string));\n return forkJoin(sources).pipe(\n map((arr: Array<unknown>) => {\n const obj: any = {};\n arr.forEach((value: unknown, index: unknown) => {\n obj[key[index as number]] = value;\n });\n return obj;\n })\n );\n }\n return result;\n }\n const tempUpperCaseKey = key.toUpperCase();\n // try company key first\n if (this.company) {\n\n const companyKey = `${tempUpperCaseKey}.${this.company}`;\n\n if (translations) {\n res = this.parser.interpolate(this.parser.getValue(translations, companyKey), interpolateParams);\n }\n\n if (typeof res === \"undefined\" && this.defaultLang != null && this.defaultLang !== this.currentLang && true) {\n res = this.parser.interpolate(this.parser.getValue(this.translations[this.defaultLang], companyKey), interpolateParams);\n if (typeof res !== \"undefined\" && typeof this.currentLang !== \"undefined\" && this.defaultLang !== this.currentLang) {\n this.logSentryTranslationNotFound(this.currentLang, companyKey);\n }\n }\n }\n if (typeof res === \"undefined\") {\n res = this.parser.interpolate(this.parser.getValue(translations, tempUpperCaseKey), interpolateParams);\n if (typeof res === \"undefined\" && typeof this.currentLang !== \"undefined\") {\n this.logSentryTranslationNotFound(this.currentLang, tempUpperCaseKey);\n }\n }\n if (typeof res === \"undefined\" && this.defaultLang != null && this.defaultLang !== this.currentLang && true) {\n res = this.parser.interpolate(this.parser.getValue(this.translations[this.defaultLang], tempUpperCaseKey), interpolateParams);\n }\n if (typeof res === \"undefined\") {\n const params: MissingTranslationHandlerParams = {key, translateService: this};\n if (typeof interpolateParams !== 'undefined') {\n params.interpolateParams = interpolateParams;\n }\n res = this.missingTranslationHandler.handle(params);\n }\n\n // res = res === \"undefined\" ?? this.globalsReplacement(res);\n\n return typeof res !== \"undefined\" ? this.globalsReplacement(res) : key;\n }\n\n logSentryTranslationNotFound(lang: string, key: string) {\n const _count = key.match(/_/g) || [];\n if (!this.env.production && _count.length >= 1 ) {\n const errorMsg = `Copy Error: Missing ${lang} translation - ${key}`;\n Sentry.withScope(scope => {\n scope.setFingerprint(['copy_error']);\n scope.setLevel(\"warning\");\n Sentry.captureException(new TranslationError(errorMsg));\n });\n }\n }\n\n globalsReplacement(parsedString: string | Observable<string>) {\n if (typeof parsedString === 'string') {\n let newResp = parsedString;\n newResp = newResp.replace(/\\$COMPANY/gm, this.companyDisplay);\n newResp = newResp.replace(/\\$HOURS/gm, this.hours);\n newResp = newResp.replace(/\\$PHONE/gm, this.supportNumber);\n if (this.firstName) {\n newResp = newResp.replace(/\\$FIRST_NAME/gm, this.firstName);\n newResp = newResp.replace(/\\$LAST_NAME/gm, this.lastName);\n newResp = newResp.replace(/\\$FULL_NAME/gm, this.fullName);\n }\n return newResp;\n } else {\n return parsedString;\n }\n }\n\n ngOnDestroy() {\n this.sub.unsubscribe();\n }\n}\n","import { Injectable } from '@angular/core';\nimport {forkJoin, from, Observable, of} from \"rxjs\";\nimport {ApiCacheService} from \"./api-cache.service\";\nimport {EligibilityFieldsObject} from \"./api-contracts\";\n\nimport {\n BsCacheService, SimpleGlobalModalService\n} from '@brightside-web/desktop/data-access/core-services';\nimport { map } from 'rxjs/operators';\n\n\nexport interface ProdEligResponseInterface {\n products: ProdEligObjInterface[]\n}\n\nexport interface ProdEligObjInterface {\n name: string;\n required_fields?: ProdEligReqFieldsInterface[]\n}\n\nexport interface ProdEligReqFieldsInterface {\n name: string;\n api_parameter_name: string;\n unique_identifier_flag?: boolean;\n sub_fields?: EligibilityFieldsObject[];\n not_replayable?: boolean;\n value?: string;\n}\n\nexport enum ProductPostIntroMapping {\n '/external-accounts/intro/launch' = 'cashFlow',\n '/home/savings/consents' = 'payrollSavings',\n '/credit-setup/consents' = 'creditScore',\n '/loans/consents' = 'loan'\n}\n\nexport enum ProductCodes {\n PayrollSavings = \"payrollSavings\",\n Loan = \"loan\",\n Spending = \"spending\",\n CreditScore = \"creditScore\",\n CashFlow = \"cashFlow\",\n CashAdvance = \"cashAdvance\",\n Invite = \"invite\",\n Registration = \"registration\"\n}\n\nexport const nonRequiredProductFields: string[] = ['middle_name', 'address2'];\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ProductEligibilityService {\n\n completedVerifications: string[] = [];\n apiPath = '/client/product/data-collect?fieldVersion=1.1';\n\n constructor(\n private apiCache: ApiCacheService,\n private bsCacheService: BsCacheService,\n private globalModalSvc: SimpleGlobalModalService) {\n const routeKeys = Object.keys(ProductPostIntroMapping);\n const routeKeyCache$: Observable<any>[] = [];\n\n routeKeys.forEach((cacheKey) => {\n routeKeyCache$.push(from(this.bsCacheService.getItem(cacheKey)));\n });\n\n }\n\n getProductEligibility(): Observable<ProdEligResponseInterface>;\n getProductEligibility(productCode: ProductCodes): Observable<ProdEligObjInterface | undefined>;\n getProductEligibility(productCode?: ProductCodes): Observable<ProdEligResponseInterface | ProdEligObjInterface | undefined> {\n return from(this.apiCache.get<ProdEligResponseInterface>('api-mobile', this.apiPath, {})).pipe(\n map((response) => {\n if (productCode) {\n return response.products.find((product) => product.name === productCode);\n } else {\n return response;\n }\n })\n );\n }\n\n getProductCodeRedirect(productCode: string): string {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const redirectPath = Object.keys(ProductPostIntroMapping)[Object.values(ProductPostIntroMapping).indexOf(productCode)];\n return redirectPath ? redirectPath : '/';\n }\n\n hasMissingFields(productCode: ProductCodes): Observable<boolean> {\n return this.getProductEligibility(productCode).pipe(\n map(fields => {\n if (fields?.required_fields) {\n return this.checkFieldsForEmpty(fields.required_fields);\n } else {\n throw Error('Product not found');\n }\n })\n )\n }\n\n showVerifyIntroModal(ctaActionFunc: Function) {\n this.globalModalSvc.createModal({\n title: 'VERIFY_IDENTITY_INTRO_TITLE',\n headerImagePath: './assets/data-verification.png',\n contentKey: 'VERIFY_IDENTITY_INTRO_DESC',\n displayCloseButton: false,\n eventName: 'identity_verification_halfsheet',\n isError: false,\n size: \"medium\",\n ctaKey: 'BUTTON_CONTINUE',\n ctaAction: () => {\n ctaActionFunc();\n }\n });\n }\n\n testReqValueForEmpty(field: ProdEligReqFieldsInterface): boolean {\n return field.value === null\n || (!field.value && !nonRequiredProductFields.includes(field.name))\n || (field.name === 'middle_name' && field.value === 'middle');\n }\n\n checkFieldsForEmpty(fields: ProdEligReqFieldsInterface[]): boolean {\n for (const field of fields) {\n if (field.sub_fields) {\n for (const subField of field.sub_fields) {\n if (!subField.not_replayable) {\n if (this.testReqValueForEmpty(subField)) {\n return true;\n }\n }\n }\n } else if (field.api_parameter_name) {\n if (!field.not_replayable) {\n if (this.testReqValueForEmpty(field)) {\n return true;\n }\n }\n }\n }\n return false;\n }\n\n\n}\n","import { Injectable } from '@angular/core';\nimport {BehaviorSubject, Observable, Subscription} from \"rxjs\";\n\nexport interface GlobalModalInterface {\n titleKey?: string;\n bodyKey?: string;\n ctaKey?: string;\n logEvent?: string;\n type: string;\n displayMe: boolean;\n id: string;\n bannerId?: string;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class GlobalModalService {\n\n defaultModal: GlobalModalInterface = {\n type: 'default',\n displayMe : false,\n id: ''\n }\n\n modalMemory: string[] = [];\n\n private _globalModal: BehaviorSubject<GlobalModalInterface> = new BehaviorSubject<GlobalModalInterface>(this.defaultModal);\n private sub = new Subscription();\n\n public readonly getModal: Observable<GlobalModalInterface> = this._globalModal.asObservable();\n constructor() { }\n\n setModal(modal: GlobalModalInterface) {\n this._globalModal.next(modal);\n }\n\n hideModal() {\n this._globalModal.next(this.defaultModal);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {from, Observable, of, Subscription} from \"rxjs\";\nimport {\n AwsApiWrapperService\n} from \"@brightside-web/desktop/data-access/core-services\";\n\nimport {map} from \"rxjs/operators\";\nimport {ApiCacheService} from \"./api-cache.service\";\nimport {CreditSummary} from \"./api-contracts\";\nimport {AuthService} from \"./auth.service\";\n\nexport interface VerificationStatusInterface {\n implementation_type: string;\n employment_data_verification_status: {status: VerificationStatusEnum};\n}\n\nexport enum VerificationStatusEnum {\n MANUAL = 'manual',\n PENDING = 'pending',\n VERIFIED = 'verified',\n FAILED = 'failed',\n TERMINATED = 'terminated'\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class VerificationStatusService {\n\n sub = new Subscription();\n\n verificationStatus: VerificationStatusInterface | null;\n tryAgain:boolean;\n constructor(\n private apiSvc: ApiCacheService,\n private authService: AuthService,\n private awsApiWrapperService: AwsApiWrapperService\n ) {\n this.sub.add(\n this.authService.getUserLoggedIn().subscribe(\n response => {\n // reset when user logs in/out\n this.verificationStatus = null;\n }\n )\n )\n }\n\n public getEmploymentVerificationStatusFromAPI():Observable<VerificationStatusInterface> {\n return from(this.awsApiWrapperService.get('api-mobile', '/client/status?type=employment_data_verification_status', {}));\n }\n\n public getEmploymentVerificationStatus(force = false):Observable<VerificationStatusInterface> {\n if (this.verificationStatus && !force) {\n return of(this.verificationStatus);\n } else {\n return this.getEmploymentVerificationStatusFromAPI().pipe(\n map( response => {\n if (!response.employment_data_verification_status || !Object.values(VerificationStatusEnum).includes(response.employment_data_verification_status.status)) {\n throw new Error();\n }\n this.verificationStatus = response;\n return this.verificationStatus;\n })\n )\n }\n }\n\n public resetStatus() {\n this.tryAgain = true;\n }\n}\n","import {Injectable, OnDestroy} from '@angular/core';\n\nimport {\n BsCacheService,\n BsHubService\n} from \"@brightside-web/desktop/data-access/core-services\";\n\nimport {\n FirebaseService,\n GlobalModalInterface,\n MobileStateResponse,\n NotificationInterface, VerificationStatusService\n} from \"@brightside-web/desktop/data-access/shared\";\nimport {TranslateService} from \"@ngx-translate/core\";\nimport {ToastService} from \"@brightside/brightside-ui-services\";\nimport {Subscription} from \"rxjs\";\nimport {HubPayload} from \"@aws-amplify/core\";\nimport {Router} from \"@angular/router\";\n\nexport interface StatusMapInterface {\n failed: StatusMapItemInterface;\n pending: StatusMapItemInterface;\n verified: StatusMapItemInterface;\n}\n\nexport interface StatusMapItemInterface {\n banner: StatusMapBannerInterface;\n stepper?: StatusMapStepperInterface;\n}\n\nexport interface StatusMapBannerInterface {\n id: string;\n text: string;\n action: {type: string, redirect?: string};\n}\n\nexport interface StatusMapStepperInterface {\n title: string;\n textBody: string;\n status?: string;\n steps?: stepsObjects[];\n}\n\ninterface stepsObjects {\n label: string;\n details?: string;\n status: string;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class StatusNotificationsService implements OnDestroy {\n\n sub = new Subscription();\n\n STATUSMAP: StatusMapInterface = {\n failed: {\n banner: {\n id: \"verification_failed\",\n text: \"verification_failed\",\n action: {\n \"type\": \"navigate\",\n \"redirect\": \"/verification/status\"\n }\n },\n stepper: {\n \"title\": \"verification_status_title\",\n \"textBody\": \"verification_error_desc\",\n \"status\": \"failed\",\n \"steps\": [\n {\n \"label\": \"verification_reverify\",\n \"details\": \"verification_reverify_desc\",\n \"status\": \"failed\"\n },\n {\n \"label\": \"verification_validating\",\n \"details\": \"verification_validating_desc\",\n \"status\": \"incomplete\"\n },\n {\n \"label\": \"verification_complete\",\n \"details\": \"verification_complete_desc\",\n \"status\": \"incomplete\"\n }\n ]\n }\n },\n pending: {\n banner: {\n \"id\": \"verification_pending\",\n \"text\": \"verification_pending\",\n \"action\": {\n \"type\": \"navigate\",\n \"redirect\": \"/verification/status\"\n }\n },\n stepper: {\n \"title\": \"verification_status_title\",\n \"textBody\": \"verification_status_desc\",\n \"status\": \"pending\",\n \"steps\": [\n {\n \"label\": \"verification_submitted\",\n \"details\": \"verification_submitted_desc\",\n \"status\": \"complete\"\n },\n {\n \"label\": \"verification_validating\",\n \"details\": \"verification_validating_desc\",\n \"status\": \"current\"\n },\n {\n \"label\": \"verification_complete\",\n \"details\": \"verification_complete_desc\",\n \"status\": \"incomplete\"\n }\n ]\n }\n },\n verified: {\n banner: {\n \"id\": \"verification_successful\",\n \"text\": \"verification_successful\",\n \"action\": {\n \"type\": \"dismiss\"\n }\n }\n }\n };\n verificationStatus: string;\n mobileState: MobileStateResponse;\n\n constructor(\n private translateService: TranslateService,\n private analytics: FirebaseService,\n private toastService: ToastService,\n private verificationStatusService: VerificationStatusService,\n private router: Router,\n private bsCacheService: BsCacheService,\n private bsHubService: BsHubService\n ) {\n\n this.bsCacheService.getItem('/client/mobilestate').then(\n mobileStateResp => {\n this.mobileState = mobileStateResp as MobileStateResponse;\n if (!this.mobileState?.sf_record_type || this.mobileState.sf_record_type === 'employee') {\n this.sub.add(\n this.verificationStatusService.getEmploymentVerificationStatusFromAPI().subscribe(\n response => {\n if (response.implementation_type !== 'full' && response.employment_data_verification_status && response.employment_data_verification_status.status) {\n this.verificationStatus = response.employment_data_verification_status.status;\n if (Object.keys(this.STATUSMAP).indexOf(this.verificationStatus) >= 0) {\n if (\n this.verificationStatus !== 'verified' ||\n (this.verificationStatus === 'verified' && !window.localStorage.getItem('VerifiedBannerSeen'))\n ) {\n this.handleVerificationToast();\n }\n }\n }\n }\n )\n )\n }\n }\n )\n\n this.bsHubService.listen('ToastChannel', (data) => {\n const { payload } = data;\n this.onToastEvent(payload);\n });\n }\n\n\n checkForNotifications() {\n const halfSheetNotifications: NotificationInterface[] = [];\n const desktopNotifications: NotificationInterface[] = [];\n\n if (this.mobileState && this.mobileState.notifications && this.mobileState.notifications.length > 0) {\n this.mobileState.notifications.forEach( notification => {\n const notificationItem = notification as NotificationInterface;\n if (notificationItem.halfsheet) halfSheetNotifications.push(notificationItem);\n if (notificationItem.desktopSupported) desktopNotifications.push(notificationItem);\n })\n if (halfSheetNotifications.length !== 0) {\n halfSheetNotifications.forEach( (banner, index) => {\n this.displayHalfSheetToast(banner);\n });\n }\n if (desktopNotifications.length !== 0) {\n desktopNotifications.forEach( (banner, index) => {\n this.displayPlainToast(banner);\n });\n }\n }\n }\n\n displayPlainToast(banner: NotificationInterface) {\n this.sub.add(\n this.translateService.get(banner.text).subscribe(\n () => {\n const bannerCopy = this.translateService.instant(banner.text);\n this.analytics.logEvent('banner shown', { id: banner.id, value: bannerCopy});\n if (banner.icon === 'warning') {\n this.toastService.warn(bannerCopy, {transient: false, id: banner.id, action: banner.action});\n } else {\n this.toastService.infoBlue(bannerCopy, {transient: false, id: banner.id});\n }\n }\n )\n );\n }\n\n displayHalfSheetToast(banner: NotificationInterface) {\n this.sub.add(\n this.translateService.get(banner.text).subscribe(\n () => {\n const modalObj : GlobalModalInterface = {\n titleKey: banner.halfsheet.title,\n bodyKey: banner.halfsheet.subText,\n displayMe: true,\n type: 'banner',\n id: banner.halfsheet.id,\n bannerId: banner.id\n };\n const bannerCopy = this.translateService.instant(banner.text);\n this.analytics.logEvent('banner shown', { id: banner.id, value: bannerCopy});\n this.toastService.warn(bannerCopy, {transient: false, id: banner.halfsheet.id,link: true, modal: modalObj});\n }\n )\n );\n }\n\n handleVerificationToast() {\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const activeBanner = this.STATUSMAP[this.verificationStatus];\n const bannerCopy = this.translateService.instant(activeBanner.banner.text.toUpperCase());\n this.analytics.logEvent('banner shown', { id: activeBanner.banner.id, value: bannerCopy});\n\n switch (this.verificationStatus) {\n case 'failed':\n this.toastService.warn(bannerCopy, {transient: false, id: activeBanner.banner.id, link: true});\n break;\n case 'pending':\n this.toastService.infoBlue(bannerCopy, {transient: false, id: activeBanner.banner.id, link: true});\n break;\n case 'verified':\n this.toastService.success(bannerCopy, {transient: false, id: activeBanner.banner.id});\n break;\n }\n }\n\n onToastEvent(payload: HubPayload) {\n let statusObj;\n const data = payload.data as any;\n if(!data.closing) {\n Object.keys(this.STATUSMAP).forEach(status => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const statusItem = this.STATUSMAP[status];\n if (statusItem.banner.id === data.id) {\n const bannerCopy = this.translateService.instant(statusItem.banner.text.toUpperCase());\n this.analytics.logEvent('banner tapped', {id: statusItem.banner.id, value: bannerCopy});\n statusObj = statusItem as StatusMapItemInterface;\n if (statusObj.banner.action.redirect) {\n this.router.navigate([statusObj.banner.action.redirect], {state: {stepperInfo: statusObj.stepper}});\n }\n if (status === 'verified') {\n window.localStorage.setItem('VerifiedBannerSeen', 'true');\n }\n }\n })\n if (data.action?.type && data.action?.type === 'navigate') {\n switch (data.action?.redirect) {\n case 'external':\n this.router.navigate(['accounts', 'external']);\n break;\n }\n }\n }\n }\n\n ngOnDestroy() {\n this.sub.unsubscribe();\n }\n}\n","import { Injectable } from '@angular/core';\nimport {from, Observable} from \"rxjs\";\nimport {\n AwsApiWrapperService\n} from '@brightside-web/desktop/data-access/core-services';\n\nexport interface ClientConfirmationSuccess {\n guid: string;\n}\n\nexport interface ClientConfirmationError {\n error: ClientConfirmationErrorItems;\n}\n\nexport interface ClientConfirmationErrorItems {\n code: ClientConfirmationErrorCodes;\n title?: string;\n message?: string;\n details?: { [key: string]: string }\n}\n\nexport enum ClientConfirmationErrorCodes {\n CLIENT_EXISTS_PII = \"CLIENT_EXISTS_PII\",\n CLIENT_EXISTS_UNIQUEID = \"CLIENT_EXISTS_UNIQUEID\",\n INVALID_UNIQUEID = \"INVALID_UNIQUEID\",\n CLIENT_NOT_FOUND = \"CLIENT_NOT_FOUND\",\n CLIENT_ALREADY_VERIFIED = \"CLIENT_ALREADY_VERIFIED\",\n CLIENT_NOT_IN_COHORT = \"CLIENT_NOT_IN_COHORT\",\n CLIENT_NOT_ELIGIBLE = \"CLIENT_NOT_ELIGIBLE\",\n HOUSEHOLD_CLIENT_NOT_FOUND = \"HOUSEHOLD_CLIENT_NOT_FOUND\",\n PRIMARY_EMPLOYEE_NOT_FOUND = \"PRIMARY_EMPLOYEE_NOT_FOUND\",\n PRIMARY_EMPLOYEE_NOT_ELIGIBLE = \"PRIMARY_EMPLOYEE_NOT_ELIGIBLE\",\n PRIMARY_EMPLOYEE_WRONG_COMPANY = \"PRIMARY_EMPLOYEE_WRONG_COMPANY\",\n INVALID_PII = 'INVALID_PII'\n}\n\nexport interface ClientConfirmationSubmissionInterface {\n employment_type: string;\n skip_precheck?: boolean;\n fa_referred?: boolean;\n error_code?: ClientConfirmationErrorCodes;\n [clientEligibilityFields: string]: any;\n}\n\nexport interface ClientConfirmationErrorCode {\n errorId: string;\n errorTitleKey: string;\n errorDescKey: string;\n ctaKey?: string;\n ctaPath?: string;\n ctaKey2?: string;\n ctaPath2?: string;\n errorCount?: number;\n maxRetry?: number;\n softCheckKey?: string;\n faqCount?: number;\n}\n\nexport const ClientConfirmationErrorCodesErrors: {[x:string]:ClientConfirmationErrorCode} = {\n [ClientConfirmationErrorCodes.INVALID_PII]: {\n errorId: 'pii_does_not_exist',\n errorTitleKey: 'ERROR_CLIENT_NOT_FOUND_PII_TITLE',\n errorDescKey: 'ERROR_CLIENT_NOT_FOUND_PII_DESC',\n maxRetry: 2,\n errorCount: 0,\n ctaKey: 'TRY_AGAIN',\n },\n [ClientConfirmationErrorCodes.INVALID_PII + '_max_retry']: {\n errorId: 'pii_max_attempts_blocked',\n errorTitleKey: 'ERROR_CLIENT_NOT_FOUND_MAX_ATTEMPTS_TITLE',\n errorDescKey: 'ERROR_CLIENT_NOT_FOUND_MAX_ATTEMPTS_DESC',\n ctaKey: 'CLOSE',\n ctaPath: 'registration/sign_up'\n },\n [ClientConfirmationErrorCodes.CLIENT_NOT_ELIGIBLE]: {\n errorId: 'not_eligible',\n errorTitleKey: 'ERROR_ID_INELIGIBLE_TITLE',\n errorDescKey: 'ERROR_ID_INELIGIBLE_DESC',\n ctaKey: 'CLOSE'\n },\n [ClientConfirmationErrorCodes.CLIENT_NOT_IN_COHORT]: {\n errorId: 'out_of_pilot',\n errorTitleKey: 'OUT_OF_PILOT_TITLE',\n errorDescKey: 'OUT_OF_PILOT_DESC',\n ctaKey: 'OUT_OF_PILOT_CTA',\n ctaKey2: 'OUT_OF_PILOT_CTA2',\n errorCount: 0,\n softCheckKey: ''\n },\n [ClientConfirmationErrorCodes.CLIENT_EXISTS_UNIQUEID]: {\n errorId: 'id_already_exists',\n errorTitleKey: 'ERROR_ID_ALREADY_EXISTS_TITLE',\n errorDescKey: 'ERROR_ID_ALREADY_EXISTS_DESC',\n ctaKey: 'TRY_AGAIN',\n errorCount: 0,\n softCheckKey: ''\n },\n [ClientConfirmationErrorCodes.CLIENT_NOT_FOUND]: {\n errorId: 'client_not_found',\n errorTitleKey: 'ERROR_CLIENT_NOT_FOUND_TITLE',\n errorDescKey: 'ERROR_CLIENT_NOT_FOUND_DESC',\n ctaKey: 'TRY_AGAIN',\n errorCount: 0,\n maxRetry: 2\n },\n [ClientConfirmationErrorCodes.CLIENT_NOT_FOUND + '_max_retry']: {\n errorId: 'client_not_found_max_attempts_blocked',\n errorTitleKey: 'ERROR_CLIENT_NOT_FOUND_MAX_ATTEMPTS_TITLE',\n errorDescKey: 'ERROR_CLIENT_NOT_FOUND_MAX_ATTEMPTS_DESC',\n ctaKey: 'CLOSE',\n ctaPath: 'registration/sign_up'\n },\n [ClientConfirmationErrorCodes.INVALID_UNIQUEID]: {\n errorId: 'id_does_not_exist',\n errorTitleKey: 'ERROR_ID_DOES_NOT_EXIST_TITLE',\n errorDescKey: 'ERROR_ID_DOES_NOT_EXIST_DESC',\n ctaKey: 'TRY_AGAIN',\n errorCount: 0,\n maxRetry: 3,\n softCheckKey: 'allowDoesNotExist'\n },\n [ClientConfirmationErrorCodes.HOUSEHOLD_CLIENT_NOT_FOUND]: {\n errorId: 'dependent_not_found_retry',\n errorTitleKey: 'ERROR_DEPENDENT_NOT_FOUND_RETRY_TITLE',\n errorDescKey: 'ERROR_DEPENDENT_NOT_FOUND_RETRY_DESC',\n ctaKey: 'TRY_AGAIN',\n errorCount: 0,\n maxRetry: 1\n },\n [ClientConfirmationErrorCodes.HOUSEHOLD_CLIENT_NOT_FOUND + '_get_primary']: {\n errorId: 'dependent_not_found',\n errorTitleKey: 'ERROR_DEPENDENT_NOT_FOUND_TITLE',\n errorDescKey: 'ERROR_DEPENDENT_NOT_FOUND_DESC',\n ctaKey: 'BUTTON_CONTINUE'\n },\n [ClientConfirmationErrorCodes.CLIENT_EXISTS_PII]: {\n errorId: 'client_already_exist',\n errorTitleKey: 'ERROR_CLIENT_ALREADY_EXISTS_TITLE',\n errorDescKey: 'ERROR_CLIENT_ALREADY_EXISTS_DESC',\n ctaKey: 'SIGN_IN',\n ctaPath: 'registration/sign_in'\n },\n [ClientConfirmationErrorCodes.PRIMARY_EMPLOYEE_NOT_ELIGIBLE] : {\n errorId: 'primary_ineligible',\n errorTitleKey: 'ERROR_CLIENT_INELIGIBLE_TITLE',\n errorDescKey: 'ERROR_CLIENT_INELIGIBLE',\n ctaKey: 'CLOSE',\n },\n [ClientConfirmationErrorCodes.PRIMARY_EMPLOYEE_NOT_FOUND] : {\n errorId: 'primary_invalid',\n errorTitleKey: 'ERROR_PRIMARY_TITLE',\n errorDescKey: 'ERROR_PRIMARY_DESC',\n ctaKey: 'CLOSE',\n },\n [ClientConfirmationErrorCodes.PRIMARY_EMPLOYEE_WRONG_COMPANY] : {\n errorId: 'primary_wrong_company',\n errorTitleKey: 'ERROR_PRIMARY_TITLE',\n errorDescKey: 'ERROR_PRIMARY_DESC',\n ctaKey: 'CLOSE',\n },\n max: {\n errorId: 'id_max_attempts',\n errorTitleKey: 'ERROR_ID_MAX_ATTEMPTS_TITLE',\n errorDescKey: 'ERROR_ID_MAX_ATTEMPTS_DESC',\n ctaKey: 'ERROR_ID_MAX_ATTEMPTS_CTA',\n ctaPath: 'registration/sign_in'\n },\n maxSoft: {\n errorId: 'id_max_attempts_soft',\n errorTitleKey: 'ERROR_ID_MAX_ATTEMPTS_SOFT_TITLE',\n errorDescKey: 'ERROR_ID_MAX_ATTEMPTS_SOFT_DESC',\n ctaKey: 'ERROR_ID_MAX_ATTEMPTS_CTA'\n },\n process: {\n errorId: 'employee_id_collect',\n errorTitleKey: 'ERROR_GENERAL_TITLE',\n errorDescKey: 'ERROR_GENERAL_DESC',\n ctaKey: 'OK'\n }\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ClientConfirmationService {\n\n fieldVersion = \"1.4\";\n constructor(\n private awsApiWrapperService: AwsApiWrapperService\n ) {};\n\n errors = {...ClientConfirmationErrorCodesErrors};\n\n public submitClientVerification(payload: ClientConfirmationSubmissionInterface)\n : Observable<ClientConfirmationSuccess | ClientConfirmationError>\n {\n return from(\n this.awsApiWrapperService.post('api-mobile', `/client/confirmation?fieldVersion=${this.fieldVersion}`, {body: {...payload, fieldVersion: this.fieldVersion}})\n );\n }\n\n}\n","import {Injectable, OnDestroy} from '@angular/core';\nimport { Subscription } from \"rxjs\";\n\nimport {\n BsAuthService,\n BsCacheService\n} from '@brightside-web/desktop/data-access/core-services';\nimport { CacheItemOptions } from '@aws-amplify/core/src/Cache/types/cache';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CacheStorageService implements OnDestroy {\n\n private sub = new Subscription();\n private _guid = '';\n\n constructor(\n private bsAuthService: BsAuthService,\n private bsCacheService: BsCacheService\n ) {\n this.getGuid();\n }\n\n getItem(key: string, withoutGuid = false): Promise<any> {\n const cacheKey = withoutGuid ? key : this.buildKey(key);\n return this.bsCacheService.getItem(cacheKey);\n }\n\n async setItem(key: string, value: any, options?: CacheItemOptions): Promise<void> {\n await this.bsCacheService.setItem(this.buildKey(key), value, options);\n }\n\n async removeItem(key: string): Promise<void> {\n await this.bsCacheService.removeItem(this.buildKey(key));\n }\n\n clear(): void {\n this._guid = '';\n this.bsCacheService.clear();\n }\n\n buildKey(key: string) {\n if (!this._guid) this.getGuid();\n const newKey = !this._guid ? key: `${key}_${this._guid}`;\n return newKey;\n }\n\n async getGuid(): Promise<void> {\n this._guid = await this.bsCacheService.getItem('GUID');\n if (!this._guid) {\n this.sub.add(\n this.bsAuthService.fetchUserAttributes().subscribe(\n attributes => {\n if (attributes.guid) {\n this._guid = attributes.guid;\n this.bsCacheService.setItem('GUID', this._guid);\n }\n }\n )\n );\n }\n }\n\n ngOnDestroy() {\n this.sub.unsubscribe();\n }\n\n}\n","export enum KnownFeatureFlags {\n HELIX1 = 'enable-helix-alpha-for-applications-pt-1',\n HELIX2 = 'enable-helix-alpha-for-applications-pt-2',\n HELIX3 = 'enable-helix-alpha-for-applications-pt-3',\n HELIXBETA1 = 'enable-helix-beta-for-applications-pt-1',\n HELIXBETA2 = 'enable-helix-beta-for-applications-pt-2',\n LEGALDOCSSYN = 'application-enable-legal-docs-ui-in-synapse-workflows',\n CREDITSETUP = 'enable-credit-setup-feature',\n DIGITALCARDACCESS = 'enable-digital-card-access',\n HELIXMIGRATION = 'helix-migration',\n FREEZETRANSFERPULL = 'helix-migration-freeze-ach-pull-transactions',\n FREEZETRANSFERS = 'helix-migration-freeze-all-ach-transactions',\n FREEZEDISPUTE = 'helix-migration-freeze-app-based-dispute-submissions',\n FREEZECASHADVANCE = 'helix-migration-freeze-cash-advance',\n ENABLESALESFORCEMESSAGING = 'enable-salesforce-messaging',\n ENABLESOCUREMANUALREVIEW = 'enable-socure-manual-review-enhancement',\n ENABLELENDERALTERNATIVES = 'enable-lender-alternatives',\n ENABLETAXSTATEMENTS = 'enable-tax-statements-in-apps'\n}\n","import { Injectable } from '@angular/core';\nimport { MappingDetail, RouteInfoInterface } from '@brightside-web/desktop/data-access/shared';\nimport { BsCacheService } from 'libs/desktop/data-access/core-services/src/lib/Cache/bs-cache.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SurveyRoutingService {\n constructor(private _bscacheService: BsCacheService) {}\n\n navigateToSurvey(surveyLink: string): RouteInfoInterface | undefined {\n const breakRoute = surveyLink.replace('gobrightside://', '').split('/');\n let surveyType: string = '';\n let surveyRoute: string = '';\n if (breakRoute.includes('chat')) {\n this._bscacheService.setItem('openChatAfterSurvey', true);\n surveyType = breakRoute[2];\n surveyRoute = breakRoute[3] || '';\n } else {\n surveyType = breakRoute[1];\n surveyRoute = breakRoute[2] || '';\n }\n\n const route: MappingDetail = {\n path: `survey/${surveyType}${surveyRoute ? '/' : ''}${surveyRoute}`,\n };\n return { mappingDetail: route, queryString: '' };\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Router } from '@angular/router';\n\nimport {\n RoutingService as BaseRoutingService,\n RoutingServiceDispatchEvent,\n LayoutStyle,\n} from '@brightside-web/micro/core/utility';\nimport { Environment } from '@brightside-web/micro/core/environment';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class RoutingService extends BaseRoutingService {\n constructor(protected environmentService: Environment, protected childRouter: Router) {\n super(childRouter, environmentService.production, environmentService.googleTagManagerId);\n }\n}\nexport { RoutingServiceDispatchEvent, LayoutStyle };\n","export class MicroUtilDebugLogger {\n /**\n * If you wish to have developer logging turn this on\n *\n * Default: true\n */\n protected allowVerboseDebugMode = true;\n\n /**\n * Override this if you want your template to log\n * with certain prefix string\n *\n * Default: ' - '\n */\n protected logPrefix = ' - ';\n\n protected logForDebugging(message?: any, ...optionalParams: any[]) {\n if (this.allowVerboseDebugMode) console.log(`debug: ${this.logPrefix || '<notSetUp>'}`, message, optionalParams);\n }\n}\n","import { Injectable } from '@angular/core';\nimport amplitude from 'amplitude-js';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AmplitudeService {\n _amplitudeInstance: any;\n\n get amplitudeInstance() {\n if (this._amplitudeInstance) return this._amplitudeInstance;\n this._amplitudeInstance = amplitude.getInstance();\n return this._amplitudeInstance;\n }\n\n logEvent(eventName: string, eventProperties?: { [key: string]: string }) {\n eventName = eventName.split('_').join(' ').toLowerCase();\n if (eventProperties && Object.keys(eventProperties).length > 0) {\n this.amplitudeInstance.logEvent(eventName, this.updateEventPropertiesKeys(eventProperties));\n } else {\n this.amplitudeInstance.logEvent(eventName);\n }\n }\n\n setUserId(userId: string) {\n this.amplitudeInstance.setUserId(userId);\n }\n\n clearProperties(): void {\n // this.amplitudeInstance.setUserId(null);\n // this clears previously stored user properties in Amplitude\n // this.amplitudeInstance.clearUserProperties();\n }\n\n setUserProperties(userProperties: { [key: string]: string }) {\n this.amplitudeInstance.setUserProperties(userProperties);\n }\n\n incrementErrorsViewed() {\n const identify = new amplitude.Identify().add('total errors viewed', 1);\n this.amplitudeInstance.identify(identify);\n }\n\n updateEventPropertiesKeys(eventProperties?: { [key: string]: string }): { [key: string]: string } | undefined {\n if (!eventProperties) {\n return undefined;\n }\n\n const updatedProperties: { [key: string]: string } = {};\n\n for (const [key, value] of Object.entries(eventProperties)) {\n const updatedKey = key.replace(/_/g, ' ');\n updatedProperties[updatedKey] = value;\n }\n\n return updatedProperties;\n }\n\n}\n\nexport const amplitudeWhitelist = [\n 'app_opened',\n 'app_review',\n 'app_update',\n 'argyle',\n 'biometrics',\n 'change_username',\n 'chat',\n 'create_account',\n 'credit',\n 'email',\n 'error',\n 'external_savings',\n 'full_ssn',\n 'help',\n 'help_topic_list',\n 'home',\n 'home_shown',\n 'invite',\n 'loading_timed_out',\n 'loan',\n 'notifications',\n 'onboarding',\n 'profile',\n 'push',\n 'savings',\n 'select_employer',\n 'settings',\n 'sign_in',\n 'sign_up',\n 'verify',\n 'home_address',\n 'employee_id',\n 'web_loaded',\n];\n","import { Injectable } from '@angular/core';\n\nimport { BsHubService } from '@brightside-web/desktop/data-access/core-services';\n\nimport { AmplitudeService } from './tracking/amplitude.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class LoggingClientService extends AmplitudeService {\n constructor(\n private bsHubService: BsHubService\n ) {\n super();\n }\n\n private logWithBridge(eventName: string, eventProperties?: { [key: string]: string }) {\n const data: { event: string; action: string; parameters?: { [key: string]: string } } = { event: eventName, action: '' };\n\n if (eventProperties) {\n data.parameters = eventProperties;\n }\n\n return {\n event: 'ANALYTICS',\n data,\n };\n }\n\n override logEvent(eventName: string, eventProperties?: { [key: string]: string }) {\n eventName = eventName.split('_').join(' ').toLowerCase();\n\n this.bsHubService.dispatch('MessageBusOutgoingChannel', this.logWithBridge(eventName, eventProperties));\n }\n}\n","import { Injectable } from '@angular/core';\nimport {forkJoin, from, map, Observable, of, switchMap} from 'rxjs';\nimport {\n AwsApiWrapperService,\n BsCacheService,\n} from '@brightside-web/desktop/data-access/core-services';\nimport { tap } from 'rxjs/operators';\nimport * as moment from 'moment';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MicroCoreApiCacheService {\n constructor(\n private awsApiWrapperService: AwsApiWrapperService,\n private bsCacheService: BsCacheService,\n ) {}\n\n get<T>(api: string, key: string, init?: { [key: string]: any }, extendCacheSecondsBy: number = 0): Observable<T> {\n return from(this.bsCacheService.getItem(key)).pipe(\n switchMap((cached: T) => {\n if (cached) {\n return of(cached);\n } else {\n return from(this.awsApiWrapperService.get(api, key, init)).pipe(\n tap((response) => {\n this.bsCacheService.setItem(key, response, {\n expires: moment()\n .add(30 + extendCacheSecondsBy, 'seconds')\n .valueOf(),\n });\n })\n );\n }\n })\n )\n }\n\n //Instead of adding an ambiguous boolean value, added new method. If we switch params to not be so static we should keep\n //it to one method though\n getForced<T>(api: string, key: string, init?: { [key: string]: any }): Observable<T> {\n //Remove cache before making API call\n this.bsCacheService.removeItem(key);\n\n return this.get<T>(api, key, init);\n }\n\n getItem<T>(key: string): Promise<T> {\n return this.bsCacheService.getItem(key);\n }\n\n setItem(key: string, value: any) {\n this.bsCacheService.setItem(key, value);\n }\n\n refreshItem(key: string) {\n this.bsCacheService.removeItem(key);\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { Observable } from 'rxjs';\nimport { take } from 'rxjs/operators';\n\nimport { FirebaseService } from '@brightside-web/desktop/data-access/shared';\nimport { MessageBusEventChannel, MessageBusInternalEventKey, MessageBusInternalService } from '@micro-core/message-bus';\n\ntype OpenValueType = string | boolean | number | any[];\n\ninterface SimpleKeyValueMapping {\n [key: string]: OpenValueType | unknown;\n}\n\nexport interface RemoteConfigMicroApp {\n config?: SimpleKeyValueMapping;\n development?: { [key: string]: { [key: string]: string } };\n queryParam?: { [key: string]: string };\n}\n\nexport interface RemoteConfigDomainRules {\n rules: RemoteConfigDomain[];\n}\n\nexport interface RemoteConfigDomain {\n regex: string;\n domain: string;\n product: string;\n}\n\n/**\n * Available keys for RemoteConfig.\n * should match up with info at\n * https://healthydollar.atlassian.net/wiki/spaces/EN/pages/2371944477/Remote+Config#Desktop-specific-properties\n */\nexport enum RemoteConfigKey {\n 'BANK_HOLIDAYS' = 'bankHolidays',\n 'COMPANIES' = 'companies',\n 'DESKTOP_NATIVE_MAPPING' = 'desktop_native_mapping',\n 'DOMAIN_MAPPING' = 'domainMappingPaths',\n 'MICRO_ACCOUNTS' = 'microAppAccounts',\n 'MICRO_CONTEST' = 'microAppContest',\n 'MICRO_HELPING_HANDS' = 'microAppHelpingHands',\n 'MICRO_MPAP' = 'microAppMpap',\n 'PRODUCT_CONFIG' = 'productConfig',\n 'SAVINGS_TRANSFER_REASONS' = 'microSavingsTransferReasons',\n 'SUPPORT_NUMBER' = 'supportNumber',\n 'SUPPORTED_LANGUAGES' = 'supportedLanguages',\n 'UNLOCKED_CASE_TYPES' = 'unlockedCaseTypes',\n}\n\nexport enum RemoteConfigFeatureFlagKey {\n 'USER_CREATION' = 'savingsCreationMicroApp_enabled' /* TODO remove this */,\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MicroCoreUtilRemoteConfigService {\n constructor(private firebaseService: FirebaseService) {\n console.log('debug: MicroCoreUtilRemoteConfigService loaded');\n this.getDomainMappingPaths();\n }\n\n private getDomainMappingPaths() {\n this.configAsObjectObservable<RemoteConfigDomainRules>(RemoteConfigKey.DOMAIN_MAPPING)\n .pipe(take(1))\n .subscribe(\n (result) => {\n console.log('debug: RemoteConfigDomainRules loaded');\n\n MessageBusInternalService.sendInternalHubEvent(\n {\n event: MessageBusInternalEventKey.DOMAIN_MAPPING_LOADED,\n data: { rules: result?.rules },\n },\n MessageBusEventChannel.INTERNAL\n );\n },\n () => console.log('debug: RemoteConfigDomainRules failed')\n );\n }\n\n getValueAsString(valueKey: string) {\n return this.firebaseService.getValueAsString(valueKey);\n }\n\n configAsObject<T>(configKey: RemoteConfigKey): T | undefined {\n try {\n return JSON.parse(this.getValueAsString(configKey)) as T;\n } catch (e) {\n //console.error(e);\n\n return undefined;\n }\n }\n\n configAsObjectObservable<T>(configKey: RemoteConfigKey): Observable<T | undefined> {\n return new Observable<T | undefined>((responseSubscriber) => {\n const runAttempt = () => {\n const result = this.configAsObject<T>(configKey);\n\n if (result !== undefined) {\n responseSubscriber.next(result);\n responseSubscriber.complete();\n } else {\n setTimeout(() => {\n runAttempt();\n }, 500);\n }\n };\n\n runAttempt();\n });\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { RemoteConfigKey, MicroCoreUtilRemoteConfigService } from './remote-config.service';\n\nexport interface RemoteProductsConfig {\n products: Record<RemoteProductType, RemoteProductConfig>;\n 'permission-scopes': Record<RemotePermissionScopeKey, RemotePermissionScopes>;\n}\n\nexport interface RemoteProductConfig {\n permissionScopes: RemotePermissionScopeKey[];\n permission_scope: string; //this will exactly match the GET user api permission_scope\n required_docs: string[]; //this will match to GET user api docs_uploaded\n}\n\nexport interface RemotePermissionScopes {\n dataToCollect: string[];\n successStatusList: string[];\n failureStatusList: string[];\n}\n\nexport enum RemoteProductType {\n INTERNAL_SPENDING = 'internalSpending',\n}\n\nexport enum RemotePermissionScopeKey {\n TIER_ONE = 'tier1',\n TIER_THREE = 'tier3',\n}\n\nexport const REMOTE_PERMISSION_SCOPE_BASE = 'SEND|RECEIVE|TIER|';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MicroCoreUtilPermissionProductService {\n async getPermissionsForProduct(productType: RemoteProductType): Promise<RemotePermissionScopes[] | undefined> {\n const fullProductConfigObject: RemoteProductsConfig | undefined = await this.microCoreUtilRemoteConfigService\n .configAsObjectObservable<RemoteProductsConfig>(RemoteConfigKey.PRODUCT_CONFIG)\n .toPromise();\n\n if (fullProductConfigObject !== undefined) {\n return fullProductConfigObject.products[productType].permissionScopes.map(\n (tierKey) => fullProductConfigObject['permission-scopes'][tierKey]\n );\n }\n\n return undefined;\n }\n\n async getConfigForProduct(productType: RemoteProductType): Promise<RemoteProductConfig | undefined> {\n const fullProductConfigObject: RemoteProductsConfig | undefined = await this.microCoreUtilRemoteConfigService\n .configAsObjectObservable<RemoteProductsConfig>(RemoteConfigKey.PRODUCT_CONFIG)\n .toPromise();\n\n if (fullProductConfigObject !== undefined) {\n return fullProductConfigObject.products[productType];\n }\n\n return undefined;\n }\n\n constructor(private microCoreUtilRemoteConfigService: MicroCoreUtilRemoteConfigService) {}\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { LoggingClientService } from './logging-client.service';\nimport { MicroCoreApiCacheService } from './api/api-cache.service';\nimport { MicroCoreUtilRemoteConfigService } from './remote-config.service';\nimport { MicroCoreUtilTrackingDirective } from './tracking/tracking.directive';\nimport { MicroCoreUtilPermissionProductService } from './permission-product.service';\n\n@NgModule({\n imports: [CommonModule],\n exports: [MicroCoreUtilTrackingDirective],\n declarations: [MicroCoreUtilTrackingDirective],\n providers: [\n LoggingClientService,\n MicroCoreApiCacheService,\n MicroCoreUtilRemoteConfigService,\n MicroCoreUtilPermissionProductService,\n ],\n})\nexport class MicroCoreUtilityModule {}\n","/**\n * This function will accept the two objects as arguments and return the object of deeply\n * merged with nested properties.\n * @param {object} targetObject objects containing the properties to be merged with source.\n * @param {object} sourceObject objects containing the properties you want to apply.\n * @return {object} return the deeply merged objects\n */\nfunction DeepMerge(targetObject = {}, sourceObject = {}) {\n // clone the source and target objects to avoid the mutation\n const copyTargetObject = JSON.parse(JSON.stringify(targetObject));\n const copySourceObject = JSON.parse(JSON.stringify(sourceObject));\n // Iterating through all the keys of source object\n Object.keys(copySourceObject).forEach((key) => {\n if (typeof copySourceObject[key] === 'object' && !Array.isArray(copySourceObject[key])) {\n // If property has nested object, call the function recursively\n copyTargetObject[key] = DeepMerge(copyTargetObject[key], copySourceObject[key]);\n } else {\n // else merge the object source to target\n copyTargetObject[key] = copySourceObject[key];\n }\n });\n\n return copyTargetObject;\n}\n\nexport default DeepMerge;\nexport { DeepMerge };\n","// TODO: KEN CHECK THIS\n/* eslint-disable @typescript-eslint/no-shadow */\nimport { Injectable } from '@angular/core';\nimport {\n ActivationEnd,\n ActivationStart,\n ChildActivationEnd,\n ChildActivationStart,\n GuardsCheckEnd,\n GuardsCheckStart,\n NavigationCancel,\n NavigationEnd,\n NavigationStart,\n ResolveEnd,\n ResolveStart,\n RouteConfigLoadEnd,\n RouteConfigLoadStart,\n Router,\n RoutesRecognized,\n Scroll,\n Event\n} from '@angular/router';\n\nimport { BsHubService } from '@brightside-web/desktop/data-access/core-services';\nimport { HubCapsule } from 'aws-amplify/utils';\n\n// eslint-disable-next-line @nrwl/nx/enforce-module-boundaries\nimport {\n MessageBusEventChannel,\n MessageBusEventUtil,\n MessageBusInternalEventKey,\n MessageBusInternalHubEvent,\n MessageBusInternalService,\n UseThisForEmbeddedOrThat,\n} from '@micro-core/message-bus';\nimport { MicroUtilDebugLogger, RemoteConfigDomain } from '@micro-core/utility';\nimport {EventDataMap} from \"@aws-amplify/core/src/Hub/types/HubTypes\";\n\ndeclare global {\n interface Window {\n gTag: Function;\n }\n}\n\ninterface TempRoutingDetail {\n routeURL: string;\n skipThesePaths: (string | null)[];\n}\n\ninterface LayoutDetail {\n style: LayoutStyle;\n lastPathKey: string;\n mapping: { [key: string]: LayoutStyle };\n}\n\nexport type RouteEvent =\n | NavigationStart\n | NavigationEnd\n | NavigationCancel\n | RouteConfigLoadStart\n | RouteConfigLoadEnd\n | RoutesRecognized\n | GuardsCheckStart\n | GuardsCheckEnd\n | ActivationStart\n | ActivationEnd\n | ChildActivationStart\n | ChildActivationEnd\n | ResolveStart\n | ResolveEnd\n | Scroll;\n\nexport enum EVENT_METHOD_NAME {\n UnKnown = 'onUnknown',\n NavigationStart = 'onNavigationStart',\n NavigationEnd = 'onNavigationEnd',\n NavigationCancel = 'onNavigationCancel',\n RouteConfigLoadStart = 'onRouteConfigLoadStart',\n RouteConfigLoadEnd = 'onRouteConfigLoadEnd',\n RoutesRecognized = 'onRoutesRecognized',\n GuardsCheckStart = 'onGuardsCheckStart',\n GuardsCheckEnd = 'onGuardsCheckEnd',\n ActivationStart = 'onActivationStart',\n ActivationEnd = 'onActivationEnd',\n ChildActivationStart = 'onChildActivationStart',\n ChildActivationEnd = 'onChildActivationEnd',\n ResolveStart = 'onResolveStart',\n ResolveEnd = 'onResolveEnd',\n Scroll = 'onScroll',\n}\n\nexport enum LayoutStyle {\n DEFAULT = 'default',\n FULL_SCREEN = 'fullScreen',\n PUBLIC_ACCESS = 'publicAccess',\n}\n\nexport enum RoutingServiceDispatchEvent {\n EXIT_PAGE = 'EXIT_PAGE',\n LAYOUT_CHANGE = 'LAYOUT_CHANGE',\n ROUTE_BY_URL = 'ROUTE_BY_URL',\n}\n\nclass RemoteConfigDomainRuleHandler extends MicroUtilDebugLogger {\n private _remoteConfigDomainRules: RemoteConfigDomain[] = [];\n private _ignoreRemoteDomainRules: boolean = UseThisForEmbeddedOrThat(true, false);\n\n constructor(\n private router: Router,\n private remoteConfigDomainRules: RemoteConfigDomain[]) {\n super();\n\n this._remoteConfigDomainRules = remoteConfigDomainRules;\n\n this.allowVerboseDebugMode = true;\n this.logPrefix = 'remoteDomainHandler';\n this.logForDebugging('Current remote domain rules', this._remoteConfigDomainRules);\n }\n\n private sendOriginalEvent(originalEvent: MessageBusInternalHubEvent) {\n //If there was an original event, we know we can handle. If there is\n //nothing then we just need to assume exiting is needed.\n if (originalEvent && originalEvent?.data) {\n originalEvent.data.forceBridgeFire = true;\n\n //Doing this allows the native applications to pick it up as needed\n MessageBusInternalService.sendOutgoingHubEvent(originalEvent);\n } else {\n this.routeInPlace('');\n }\n }\n\n private routeInPlace(routeToPath: string) {\n this.logForDebugging('Used angular routing navigateByUrl', { with: routeToPath });\n this.router.navigateByUrl(routeToPath);\n }\n\n private replaceFullHref(replaceHref: string) {\n this.logForDebugging('Replaced full location', { with: replaceHref });\n\n window.location.replace(replaceHref);\n }\n\n /**\n * Right now this method will do a simple check for exact matches or wild card\n * matches.\n *\n * Iterating the array will be stopped when a match is found, so first match will be sent back to caller\n * even if there are other matches.\n *\n * @param routeToPath <string> - The value of the route you are trying to go to\n * @returns\n * 1 - null = Means there was no matching information in the remote config.\n * 2 - RemoteConfigDomain = Means this is the first thing that matches your path.\n */\n private checkForMatchingRule(routeToPath: string): null | RemoteConfigDomain {\n let matchingRule: null | RemoteConfigDomain = null;\n\n const noMatchesFound = this._remoteConfigDomainRules.every((rule: RemoteConfigDomain) => {\n matchingRule = rule;\n\n //If there is not a DOMAIN - return true by default\n if (!rule.domain) {\n return true;\n }\n\n if (rule.regex.includes('.*') && routeToPath.startsWith(rule.regex.replace('.*', ''))) {\n return false;\n }\n\n return true;\n });\n\n //If we don't have matches return null\n if (noMatchesFound) {\n return null;\n }\n\n return matchingRule;\n }\n\n /**\n * This method should be called when you want to navigate checking for matching route paths\n * in the remote config file. Outcomes:\n *\n * 1 - Angular route done with navigateByUrl - Means the route was internal to the current application\n * 2 - window location replace used - Means the route was matched in remote config and needs to change base domain/app\n * 3 - Angular route sent to empty path - Means no rule was found and no original event was sent\n * 4 - Outgoing message sent to message bus - Means no rule was found BUT there is an original event. This usual means we are trying to navigate\n * to a route that is fully native and outside webviews\n *\n * @param routeToPath <string> - The value of the route you are trying to go to\n * @param originalEvent <MessageBusInternalHubEvent> - This should be a value if the message bus converted to internal route before sending to native\n * @returns void\n */\n public handleRouteByUrlEvent(routeToPath: string, originalEvent: MessageBusInternalHubEvent) {\n if (this._ignoreRemoteDomainRules) {\n this.logForDebugging('The flag told us to ignore remote domain rules, so we are navigating in-place');\n this.routeInPlace(routeToPath);\n return;\n }\n\n const ruleToUse = this.checkForMatchingRule(routeToPath);\n const isMatchingRuleToUse = ruleToUse && ruleToUse.domain.startsWith(window.location.origin);\n const isMatchingCurrentBasePath = !ruleToUse && window.location.href.split('/')[0] === routeToPath.split('/')[0];\n\n this.logForDebugging('Rule Located', { ruleToUse, isMatchingRuleToUse, isMatchingCurrentBasePath });\n /**\n * If we have match with current route or rule make sure we route in-place.\n * isMatchingRuleToUse or isMatchingCurrentBasePath\n */\n if (isMatchingRuleToUse || isMatchingCurrentBasePath) {\n this.routeInPlace(routeToPath);\n } else if (!ruleToUse) {\n this.sendOriginalEvent(originalEvent);\n } else {\n this.replaceFullHref(`${ruleToUse.domain}${routeToPath}`);\n }\n }\n}\n\nclass NavigationHelperHandler extends MicroUtilDebugLogger {\n private _historyStack: string[] = [];\n private _lastNavigationDetail = { fromUrl: '', toUrl: '', startTime: '', completeTime: '' };\n private _lastNavigationEventLog: { eventName: EVENT_METHOD_NAME; detail: Event }[] = [];\n\n private _StartTrackingEvents: EVENT_METHOD_NAME[] = [EVENT_METHOD_NAME.NavigationStart];\n private _StopTrackingEvents: EVENT_METHOD_NAME[] = [EVENT_METHOD_NAME.NavigationEnd, EVENT_METHOD_NAME.NavigationCancel];\n\n constructor(private _router: Router) {\n super();\n\n this.allowVerboseDebugMode = true;\n this.logPrefix = 'Navigation History';\n }\n\n /**\n * This will return the last url in the stack or \"\" meaning nothing is present\n */\n private get historyCurrentUrl() {\n return this._historyStack[this._historyStack.length - 1] || '';\n }\n\n /**\n * Be aware this WILL adjust the navigation stack. Please don't use it for logging\n * or any non-action function.\n *\n * Will pop the last two entries to get current page and the previous\n */\n private get historyPreviousPath() {\n const currentUrl: string = this._historyStack.pop() || '';\n const previousUrl: string = this._historyStack.pop() || '';\n\n this.logForDebugging('getPreviousPath', { currentUrl, previousUrl });\n\n return previousUrl.replace(window.location.origin, '');\n }\n //TODO is there a cleaner way to identify paths related to modals/iframes that should not go on the stack?\n private pathsExcludedFromHistory = [\"external-accounts/savings/launch\", \"modal:\"];\n private addHistory(url: string) {\n if (url !== this.historyCurrentUrl && !this.pathsExcludedFromHistory.some((path)=>url.includes(path))) {\n this._historyStack.push(url);\n this.logForDebugging(`Adding to history stack: ${url}`, this._historyStack);\n }\n }\n\n private routeInPlace(routeToPath: string) {\n this.logForDebugging('Used angular routing navigateByUrl', { with: routeToPath });\n this._router.navigateByUrl(routeToPath);\n }\n\n private replaceFullHref(replaceHref: string) {\n this.logForDebugging('Replaced full location', { with: replaceHref });\n\n window.location.replace(replaceHref);\n }\n\n private startSingleNavigationTrack() {\n this._lastNavigationDetail = {\n fromUrl: window.location.href,\n toUrl: '',\n startTime: new Date().toISOString(),\n completeTime: '',\n };\n this._lastNavigationEventLog = [];\n }\n\n /**\n * Stops the single navigation and finishes the details for debugging.\n * It will also normalize the history stack in-case navigation happened\n * outside the default handlers\n */\n private stopSingleNavigationTrack() {\n this.addHistory(window.location.href);\n\n this._lastNavigationDetail.toUrl = window.location.href;\n this._lastNavigationDetail.completeTime = new Date().toISOString();\n\n //This part is to normalize the back history in-case routing was done outside hub\n if (this._lastNavigationDetail.toUrl === this._historyStack[this._historyStack.length - 2]) {\n this._historyStack.pop();\n this.logForDebugging(`Adjusted history stack to pop off one`);\n }\n\n this.logForDebugging('navigation logs', { details: this._lastNavigationDetail, eventLog: this._lastNavigationEventLog });\n }\n\n /**\n * Logging this information to help debug if you are seeing issues.\n *\n * This will also look to start/stop tracking based on certain events\n *\n * @param eventName <EVENT_METHOD_NAME>\n * @param detail <RouteEvent>\n */\n public addEvent(eventName: EVENT_METHOD_NAME, detail: Event) {\n if (this._StartTrackingEvents.includes(eventName)) {\n this.startSingleNavigationTrack();\n } else if (this._StopTrackingEvents.includes(eventName)) {\n this.stopSingleNavigationTrack();\n }\n\n this._lastNavigationEventLog.push({ eventName, detail });\n }\n\n public routeBackwardOnce() {\n this.routeInPlace(this.historyPreviousPath);\n }\n}\n\n@Injectable()\nexport class RoutingService extends MicroUtilDebugLogger {\n static readonly DISPATCH_KEY = 'RoutingServiceChannel';\n\n protected googleTrackingId = '';\n protected isProduction = false;\n\n protected executeAllOnEvent: Function[] = [];\n\n protected lastEvent: Event;\n protected lastLayout: LayoutDetail = {\n style: LayoutStyle.DEFAULT,\n lastPathKey: '',\n mapping: {},\n };\n\n // This is used to make sure we don't send unneeded layout events\n protected lastBroadcastedLayoutStyle: LayoutStyle | null = null;\n\n protected remoteConfigDomainRuleHandler: RemoteConfigDomainRuleHandler;\n protected navigationHelperHandler: NavigationHelperHandler;\n\n protected tempRouteDetails: TempRoutingDetail = {\n routeURL: '',\n skipThesePaths: [null, '', 'registration'],\n };\n\n protected layoutLifeCycleEvents = {\n [EVENT_METHOD_NAME.ActivationStart]: (event: ActivationStart) => {\n const path = this.tempRouteDetails.routeURL;\n\n this.consoleLog('Path target at activation start', path);\n\n if (this.tempRouteDetails.skipThesePaths.includes(path)) {\n return;\n }\n\n if (event.snapshot?.data?.appDisplayStyle) {\n this.lastLayout.mapping[path] = event.snapshot?.data?.appDisplayStyle || LayoutStyle.DEFAULT;\n\n this.runLayoutCheck(this.lastLayout.mapping[path]);\n }\n },\n [EVENT_METHOD_NAME.ChildActivationStart]: (event: ChildActivationStart) => {\n const path = this.tempRouteDetails.routeURL;\n\n if (this.tempRouteDetails.skipThesePaths.includes(path)) {\n return;\n }\n\n //First check snapshot has data fallback towards array lookup\n if (event.snapshot.data?.appDisplayStyle) {\n this.lastLayout.mapping[path] = event.snapshot.data.appDisplayStyle;\n this.runLayoutCheck(this.lastLayout.mapping[path]);\n } else {\n this.lastLayout.lastPathKey = path;\n this.lastLayout.style =\n this.lastLayout.mapping[this.lastLayout.lastPathKey] || this.lastLayout.style || LayoutStyle.DEFAULT;\n }\n },\n [EVENT_METHOD_NAME.ResolveEnd]: (event: ResolveEnd) => {\n this.checkAndDispatchLayoutChange();\n },\n [EVENT_METHOD_NAME.ActivationEnd]: (\n event: ActivationEnd | ChildActivationEnd,\n styleFromSnapshotOverride?: LayoutStyle | null\n ) => {\n const styleFromSnapshot = styleFromSnapshotOverride || event.snapshot?.firstChild?.data?.appDisplayStyle;\n const styleFromPath = this.lastLayout.mapping[this.tempRouteDetails.routeURL];\n\n const styleArrays = [styleFromSnapshot, styleFromPath, this.lastLayout.style];\n const theOneTrueStyle = styleArrays.filter((style) => style && style !== 'default')[0] || 'default';\n\n //If we have anything left in the styles we should use it\n if (theOneTrueStyle) {\n this.lastLayout.style = theOneTrueStyle;\n }\n\n this.checkAndDispatchLayoutChange();\n },\n // Child activation should just flow to activation end with styleOverride from snapshot\n [EVENT_METHOD_NAME.ChildActivationEnd]: (event: ChildActivationEnd) =>\n this.layoutLifeCycleEvents[EVENT_METHOD_NAME.ActivationEnd](event, event.snapshot.data?.appDisplayStyle || null),\n };\n\n constructor(private router: Router, isProduction: boolean = false, googleTrackingId: string = '') {\n super();\n\n this.allowVerboseDebugMode = false;\n this.logPrefix = 'RoutingService - ';\n\n this.isProduction = isProduction;\n this.googleTrackingId = googleTrackingId;\n\n this.navigationHelperHandler = new NavigationHelperHandler(router);\n\n this.watchForRoutingEvents();\n this.watchForRemoteConfigLoadedEvent();\n this.listenForRouteByUrl();\n }\n\n protected consoleLog(...rest: any) {\n if (!this.isProduction) {\n this.logForDebugging({ ...rest });\n }\n }\n\n protected getMethodOrNoop(methodName: EVENT_METHOD_NAME = EVENT_METHOD_NAME.UnKnown) {\n if (RoutingService.prototype[methodName]) {\n return this[methodName].bind(this);\n }\n\n return () => false;\n }\n\n protected getEventMethod(event: Event): EVENT_METHOD_NAME {\n this.lastEvent = event;\n\n switch (true) {\n case event instanceof NavigationStart:\n return EVENT_METHOD_NAME.NavigationStart;\n case event instanceof NavigationEnd:\n return EVENT_METHOD_NAME.NavigationEnd;\n case event instanceof NavigationCancel:\n return EVENT_METHOD_NAME.NavigationCancel;\n case event instanceof RouteConfigLoadStart:\n return EVENT_METHOD_NAME.RouteConfigLoadStart;\n case event instanceof RouteConfigLoadEnd:\n return EVENT_METHOD_NAME.RouteConfigLoadEnd;\n case event instanceof RoutesRecognized:\n return EVENT_METHOD_NAME.RoutesRecognized;\n case event instanceof GuardsCheckStart:\n return EVENT_METHOD_NAME.GuardsCheckStart;\n case event instanceof GuardsCheckEnd:\n return EVENT_METHOD_NAME.GuardsCheckEnd;\n case event instanceof ActivationStart:\n return EVENT_METHOD_NAME.ActivationStart;\n case event instanceof ActivationEnd:\n return EVENT_METHOD_NAME.ActivationEnd;\n case event instanceof ChildActivationStart:\n return EVENT_METHOD_NAME.ChildActivationStart;\n case event instanceof ChildActivationEnd:\n return EVENT_METHOD_NAME.ChildActivationEnd;\n case event instanceof ResolveStart:\n return EVENT_METHOD_NAME.ResolveStart;\n case event instanceof ResolveEnd:\n return EVENT_METHOD_NAME.ResolveEnd;\n case event instanceof Scroll:\n return EVENT_METHOD_NAME.Scroll;\n\n default:\n return EVENT_METHOD_NAME.UnKnown;\n }\n }\n\n protected runAllOnEvents() {\n if (!this.executeAllOnEvent) {\n return;\n }\n\n this.executeAllOnEvent.forEach((fn) => fn());\n }\n\n protected runLayoutCheck(checkThisPath: string) {}\n\n protected watchForRemoteConfigLoadedEvent() {\n MessageBusInternalService.addHubListenerWithEventFilter({\n channel: MessageBusEventChannel.INTERNAL,\n filterByEvents: [MessageBusInternalEventKey.DOMAIN_MAPPING_LOADED],\n take: 1,\n callbackListener: (payload: MessageBusInternalHubEvent | EventDataMap) => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n if (payload.data?.rules && !this.remoteConfigDomainRuleHandler) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.remoteConfigDomainRuleHandler = new RemoteConfigDomainRuleHandler(this.router, payload.data.rules);\n }\n },\n });\n }\n\n protected watchForRoutingEvents() {\n this.router.events.subscribe((event) => {\n const routeMethod = this.getEventMethod(event);\n\n this.navigationHelperHandler.addEvent(routeMethod, event);\n\n this.getMethodOrNoop(routeMethod)(this.lastEvent as any);\n });\n }\n\n protected checkAndDispatchLayoutChange() {\n this.dispatchLayoutChange();\n }\n\n protected resetLastLayout() {\n //We need to reset the layout stuff after dispatch\n this.lastLayout.style = LayoutStyle.DEFAULT;\n this.lastLayout.lastPathKey = '';\n }\n\n protected updateLastBroadcastedAndTimer() {\n this.lastBroadcastedLayoutStyle = this.lastLayout.style;\n\n //Clear this.lastBroadcastedLayoutStyle so events that happen on further events still trigger\n setTimeout(() => {\n this.lastBroadcastedLayoutStyle = null;\n }, 500);\n }\n\n protected listenForRouteByUrl() {\n BsHubService.listenStatic(RoutingService.DISPATCH_KEY, (data: HubCapsule<any, any>) => {\n this.consoleLog(`event on channel ${RoutingService.DISPATCH_KEY} with payload of`, data.payload);\n\n if (data.payload.event === RoutingServiceDispatchEvent.ROUTE_BY_URL && data.payload.data) {\n this.routeByUrl(data);\n } else if (data.payload.event === RoutingServiceDispatchEvent.EXIT_PAGE) {\n this.routeExitPage();\n }\n });\n }\n\n protected routeExitPage() {\n this.navigationHelperHandler.routeBackwardOnce();\n }\n\n protected routeByUrl(data: HubCapsule<any, any>, retryAttempt = 0) {\n //We need to have the remote config loaded to move forward. If we\n //have also retried twice already we should allow default navigation\n if (!this.remoteConfigDomainRuleHandler) {\n this.consoleLog('Missing remoteConfigDomainRuleHandler retry attempt ' + retryAttempt);\n\n if (retryAttempt >= 2) {\n this.router.navigateByUrl(data.payload.data.routeToUrl || '');\n } else {\n setTimeout(() => {\n this.routeByUrl(data, retryAttempt + 1);\n }, 250);\n }\n\n return;\n }\n\n this.consoleLog('We have remoteConfigDomainRuleHandler', data);\n\n //If we have remote domain rules, handle it here\n this.remoteConfigDomainRuleHandler.handleRouteByUrlEvent(\n data.payload.data.routeToUrl || '',\n data.payload.data?.originalEvent\n );\n }\n\n protected dispatchLayoutChange() {\n if (this.lastBroadcastedLayoutStyle === this.lastLayout.style) {\n return;\n }\n\n BsHubService.dispatchStatic(RoutingService.DISPATCH_KEY, {\n event: RoutingServiceDispatchEvent.LAYOUT_CHANGE,\n message: this.lastLayout.style || LayoutStyle.DEFAULT,\n });\n\n this.consoleLog('Layout Change', this.lastLayout.style);\n this.updateLastBroadcastedAndTimer();\n this.resetLastLayout();\n }\n\n addOnEventFunction(fn: Function) {\n this.executeAllOnEvent.push(fn);\n }\n\n [EVENT_METHOD_NAME.UnKnown](event: RouteEvent) {\n this.consoleLog('Unknown routing event occurred', this.lastEvent, event);\n }\n\n [EVENT_METHOD_NAME.NavigationStart](event: NavigationStart) {\n this.runAllOnEvents();\n }\n [EVENT_METHOD_NAME.NavigationEnd](event: NavigationEnd) {\n if ((window as any).gTag) {\n window.gTag('config', this.googleTrackingId, {\n page_path: event.urlAfterRedirects,\n });\n }\n console.log(`FS ROUTING EVENT: ${EVENT_METHOD_NAME.NavigationEnd} called with ${JSON.stringify(event)}`);\n MessageBusInternalService.sendOutgoingHubEvent(MessageBusEventUtil.event.standard.hideLoadingSpinner, 100);\n MessageBusInternalService.sendInternalHubEvent({\n event: MessageBusInternalEventKey.NAVIGATION_END,\n data: {},\n });\n }\n [EVENT_METHOD_NAME.NavigationCancel](event: NavigationCancel) {\n this.dispatchLayoutChange();\n }\n [EVENT_METHOD_NAME.RouteConfigLoadStart](event: RouteConfigLoadStart) {\n this.tempRouteDetails.routeURL = event.route.path || '';\n }\n [EVENT_METHOD_NAME.RouteConfigLoadEnd](event: RouteConfigLoadEnd) {}\n [EVENT_METHOD_NAME.RoutesRecognized](event: RoutesRecognized) {}\n [EVENT_METHOD_NAME.GuardsCheckStart](event: GuardsCheckStart) {}\n [EVENT_METHOD_NAME.GuardsCheckEnd](event: GuardsCheckEnd) {\n this.consoleLog('GuardCheckEnd', event);\n }\n [EVENT_METHOD_NAME.ActivationStart](event: ActivationStart) {\n this.layoutLifeCycleEvents[EVENT_METHOD_NAME.ActivationStart](event);\n }\n [EVENT_METHOD_NAME.ActivationEnd](event: ActivationEnd) {\n this.layoutLifeCycleEvents[EVENT_METHOD_NAME.ActivationEnd](event);\n }\n [EVENT_METHOD_NAME.ChildActivationStart](event: ChildActivationStart) {\n this.layoutLifeCycleEvents[EVENT_METHOD_NAME.ChildActivationStart](event);\n }\n [EVENT_METHOD_NAME.ChildActivationEnd](event: ChildActivationEnd) {\n this.layoutLifeCycleEvents[EVENT_METHOD_NAME.ChildActivationEnd](event);\n }\n [EVENT_METHOD_NAME.ResolveStart](event: ResolveStart) {}\n [EVENT_METHOD_NAME.ResolveEnd](event: ResolveEnd) {\n this.layoutLifeCycleEvents[EVENT_METHOD_NAME.ResolveEnd](event);\n }\n [EVENT_METHOD_NAME.Scroll](event: Scroll) {}\n}\n","import { Injectable } from '@angular/core';\nimport { TranslateService } from '@ngx-translate/core';\n\ntype GenericObject = Record<string, any>;\n\n/**\n * This service is available as a util for micro application as a way\n * to add additional copy that is stored locally in the micro app library\n * asset folder.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class MicroUtilTranslationService extends TranslateService implements TranslateService {\n static Language = {\n English: { code: 'en', label: 'English' },\n Spanish: { code: 'es', label: 'Spanish' },\n Testing: { code: 'zz', label: 'Testing' },\n };\n static SupportedLanguages = [\n MicroUtilTranslationService.Language.English.code,\n MicroUtilTranslationService.Language.Spanish.code,\n MicroUtilTranslationService.Language.Testing.code,\n ];\n\n /**\n * If you wish to have developer logging turn this on\n *\n * Default: true\n */\n private allowVerboseDebugMode = true;\n\n /**\n * Override this if you want your template to log\n * with certain prefix string\n *\n * Default: 'MicroUtilTranslationService - '\n */\n private logPrefix = 'MicroUtilTranslationService - ';\n\n private logForDebugging(message?: any, ...optionalParams: any[]) {\n if (this.allowVerboseDebugMode) console.log(`debug: ${this.logPrefix || '<notSetUp>'}`, message, optionalParams);\n }\n\n /**\n * This is a passthrough to the underlying translation service that will return\n * the current (or if undefined the default) lang code\n */\n get currentCurrentLanguageCode(): string {\n return this.currentLang || this.defaultLang;\n }\n\n setLanguageAs(newLang: string) {\n this.logForDebugging('Setting language to ', newLang);\n\n if (MicroUtilTranslationService.SupportedLanguages.includes(newLang)) {\n this.use(newLang);\n }\n }\n\n /**\n * This will update (append) translation data to a specific\n * lang code.\n *\n * @param forLang <string>\n * @param translations <{ [key: string]: string }>\n *\n * @returns void\n */\n updateTranslationsWith(forLang: string, translations: { [key: string]: string }) {\n this.setTranslation(forLang, translations, true);\n }\n\n /**\n * Used by modules to pass in all there translation information on lazy loaded\n *\n * @param translationsByCode <{ [key: string]: { [key: string]: string } }>\n *\n * @returns void\n */\n updateTranslations(translationsByCode: { [key: string]: { [key: string]: string } }) {\n this.logForDebugging('appendCopy with', translationsByCode);\n\n Object.entries(translationsByCode).forEach(([code, translations]) => {\n this.updateTranslationsWith(code, translations);\n });\n }\n\n /**\n * This should be utilized from the module class for your micro application\n * only if you have local copy to add into the translation mapping.\n *\n * @param translations { [key: string]: string }\n */\n updateTranslate(translations: { [key: string]: string }): void {\n this.logForDebugging('updateTranslate with', { currentLang: this.currentLang, translations });\n\n this.setTranslation(this.currentLang, translations, true);\n this.setLanguageAs(this.currentLang);\n }\n\n /**\n * Utilize this to traverse a template object and look to replace\n * copyKeys with pre-rendered text. This can be used to replace dynamic\n * values in the copy string since the template will not have any data\n * to do this.\n *\n * @param processObject type GenericObject = Record<string, any>;\n * @param replaceMapping { [key: string]: string } - key (Should be the copyKey) : value (Should be the display copy you want shown)\n * @returns <any>\n */\n deepCopyKeySwapForDynamicValue(processObject: GenericObject, replaceMapping: { [key: string]: string }): any {\n if (!processObject || typeof processObject !== 'object') {\n return processObject;\n }\n\n const replaceKeys = Object.keys(replaceMapping);\n\n let rtnObj = {};\n\n Object.keys(processObject).map((key: string) => {\n let value = (processObject as any)[key];\n\n if (value) {\n if (Array.isArray(value)) {\n value = value.map((arryValue) => this.deepCopyKeySwapForDynamicValue(arryValue, replaceMapping));\n } else if (replaceKeys.includes(value)) {\n value = replaceMapping[value];\n } else if (typeof value === 'object') {\n value = this.deepCopyKeySwapForDynamicValue(value, replaceMapping);\n }\n }\n\n rtnObj = { ...rtnObj, [key]: value };\n });\n\n return rtnObj;\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport {\n BsCacheService\n} from '@brightside-web/desktop/data-access/core-services';\n\n// eslint-disable-next-line @nrwl/nx/enforce-module-boundaries\nimport { Environment } from '@micro-core/environment';\n\nimport { AmplitudeService } from './amplitude.service';\nimport { FirebaseService, RemoteConfig_DesktopNativeMapping } from './firebase-abstract.service';\nimport * as Sentry from \"@sentry/angular\";\n\nimport { initializeApp, FirebaseApp } from \"firebase/app\"\nimport {\n RemoteConfig,\n getRemoteConfig,\n fetchAndActivate,\n getValue,\n ensureInitialized,\n fetchConfig\n} from \"firebase/remote-config\";\nimport {\n Analytics as FbAnalytics,\n getAnalytics,\n setUserProperties,\n setUserId,\n logEvent\n} from \"firebase/analytics\";\nimport {forkJoin, Subscription} from \"rxjs\";\n\nconst defaultMapping = {\n 'partner/Credit_Card_Refi': {\n path: 'loans',\n },\n 'partner/Emergency_Cash': {\n path: 'loans',\n },\n 'finsol/deep/savings/autosave/once': {\n path: 'home/deep/savings/intro',\n queryParamsType: 'auto',\n },\n home: {\n path: 'home',\n },\n onboarding: {\n path: 'onboarding',\n },\n setupcredit: {\n path: 'credit-setup/creation',\n },\n};\n\nconst pageShownAppend = ['video tapped', 'logo tapped'];\n\ninterface ThrottledEvent {\n lastCall: number;\n throttleTime: number;\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class FirebaseAnalyticsService implements FirebaseService {\n\n sub = new Subscription();\n\n firebaseApp: FirebaseApp;\n fbRemoteConfig: RemoteConfig;\n fbAnalytics: FbAnalytics;\n\n events: { [p: string]: ThrottledEvent } = {};\n lastPageShownEvent: string;\n\n onboardingFlowActive: boolean;\n\n typeOveride: { [p: string]: () => Promise<string> } = {\n credit: async () => (await this.bsCacheService.getItem('ONBOARDING_FLOW_ACTIVE') ? 'onboarding' : 'standalone'),\n 'onboarding credit': async () => (await this.bsCacheService.getItem('ONBOARDING_FLOW_ACTIVE') ? 'onboarding' : 'standalone'),\n };\n\n typeOverRideKeys: string[];\n\n constructor(\n public amplitudeService: AmplitudeService,\n public env: Environment,\n protected bsCacheService: BsCacheService) {\n\n this.typeOverRideKeys = Object.keys(this.typeOveride);\n this.firebaseApp = this.initializeApp();\n this.fbRemoteConfig = this.getRemoteConfig();\n this.fbAnalytics = this.getAnalytics();\n }\n\n initializeApp() {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return initializeApp(this.env.firebase);\n }\n\n getRemoteConfig() {\n return getRemoteConfig(this.firebaseApp);\n }\n\n getAnalytics() {\n return getAnalytics(this.firebaseApp);\n }\n\n async logEvent(\n eventName: string,\n eventParams?: { custom: { [p: string]: any } | string; [p: string]: any },\n shouldThrottle: boolean = false,\n throttleTime?: number\n ): Promise<void> {\n if (eventName && eventName !== 'onboardingcredit shown') {\n if (eventName.includes('shown')) this.lastPageShownEvent = eventName.split('shown')[0].trim();\n if (pageShownAppend.includes(eventName)) eventName = `${this.lastPageShownEvent} ${eventName}`;\n\n const isEventThrottled = shouldThrottle === false ? false : this.isEventThrottled(eventName, throttleTime);\n\n if (!isEventThrottled) {\n let params = eventParams ?? {};\n\n if (eventParams?.custom && typeof eventParams?.custom === 'object') {\n eventParams.custom = JSON.stringify(eventParams?.custom);\n params = eventParams.custom;\n }\n // todo: KEN DOUBLE CHECK THIS\n for (let i = 0; i < this.typeOverRideKeys.length; i++) {\n if (eventName.startsWith(this.typeOverRideKeys[i])) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n params['type'] = await this.typeOveride[this.typeOverRideKeys[i]]();\n break;\n }\n }\n\n this.amplitudeService.logEvent(eventName.split('_').join(' '), params);\n\n logEvent(this.fbAnalytics, eventName, eventParams);\n if (!this.env.production) {\n console.log(`Analytics event fired: ${eventName.split('_').join(' ')} with `, params);\n }\n }\n }\n }\n\n isEventThrottled(eventName: string, throttleTime?: number): boolean {\n const event = this.events[eventName];\n const currentCall = Date.now();\n\n if (event) {\n if (currentCall - event.lastCall > event.throttleTime) {\n event.lastCall = currentCall;\n return false;\n } else {\n return true;\n }\n } else {\n this.events[eventName] = {\n lastCall: currentCall,\n throttleTime: throttleTime ? throttleTime : 1000,\n };\n return false;\n }\n }\n\n setUserId(id: string, options?: any): void {\n setUserId(this.fbAnalytics, id, options);\n this.amplitudeService.setUserId(id);\n }\n\n clearProperties(): void {\n setUserId(this.fbAnalytics, '');\n setUserProperties(this.fbAnalytics, {});\n }\n\n setProperties(properties: { [key: string]: string }) {\n setUserProperties(this.fbAnalytics, properties);\n }\n\n setupRemoteConfig() {\n fetchAndActivate(this.fbRemoteConfig)\n .then(() => {})\n .catch(error => {\n Sentry.captureException(error);\n });\n }\n\n remoteConfig(): RemoteConfig {\n return this.fbRemoteConfig;\n }\n\n getValueAsString(valueKey: string): string {\n return getValue(this.fbRemoteConfig, valueKey).asString();\n }\n\n getValueAsBoolean(valueKey: string): boolean {\n return getValue(this.fbRemoteConfig, valueKey).asBoolean();\n }\n\n ensureInitialized(): Promise<void> {\n return ensureInitialized(this.fbRemoteConfig);\n }\n\n fetchConfig(): Promise<void> {\n return fetchConfig(this.fbRemoteConfig);\n }\n\n remoteConfigMapping(): { [key: string]: any } {\n try {\n return JSON.parse(getValue(this.fbRemoteConfig, RemoteConfig_DesktopNativeMapping).asString()) as { [key: string]: any };\n } catch (e) {\n Sentry.captureException(e);\n return defaultMapping;\n }\n return defaultMapping;\n }\n}\n","//! moment.js locale configuration\n//! locale : Spanish (Dominican Republic) [es-do]\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsShortDot =\n 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(\n '_'\n ),\n monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n monthsParse = [\n /^ene/i,\n /^feb/i,\n /^mar/i,\n /^abr/i,\n /^may/i,\n /^jun/i,\n /^jul/i,\n /^ago/i,\n /^sep/i,\n /^oct/i,\n /^nov/i,\n /^dic/i,\n ],\n monthsRegex =\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n var esDo = moment.defineLocale('es-do', {\n months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(\n '_'\n ),\n monthsShort: function (m, format) {\n if (!m) {\n return monthsShortDot;\n } else if (/-MMM-/.test(format)) {\n return monthsShort[m.month()];\n } else {\n return monthsShortDot[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex:\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n monthsShortStrictRegex:\n /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY h:mm A',\n LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',\n },\n calendar: {\n sameDay: function () {\n return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextDay: function () {\n return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextWeek: function () {\n return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastDay: function () {\n return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastWeek: function () {\n return (\n '[el] dddd [pasado a la' +\n (this.hours() !== 1 ? 's' : '') +\n '] LT'\n );\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'en %s',\n past: 'hace %s',\n s: 'unos segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'una hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n w: 'una semana',\n ww: '%d semanas',\n M: 'un mes',\n MM: '%d meses',\n y: 'un año',\n yy: '%d años',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return esDo;\n\n})));\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2014 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\n\n/**\n * Determine whether mappingB is after mappingA with respect to generated\n * position.\n */\nfunction generatedPositionAfter(mappingA, mappingB) {\n // Optimized for most common case\n var lineA = mappingA.generatedLine;\n var lineB = mappingB.generatedLine;\n var columnA = mappingA.generatedColumn;\n var columnB = mappingB.generatedColumn;\n return lineB > lineA || lineB == lineA && columnB >= columnA ||\n util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n}\n\n/**\n * A data structure to provide a sorted view of accumulated mappings in a\n * performance conscious manner. It trades a neglibable overhead in general\n * case for a large speedup in case of mappings being added in order.\n */\nfunction MappingList() {\n this._array = [];\n this._sorted = true;\n // Serves as infimum\n this._last = {generatedLine: -1, generatedColumn: 0};\n}\n\n/**\n * Iterate through internal items. This method takes the same arguments that\n * `Array.prototype.forEach` takes.\n *\n * NOTE: The order of the mappings is NOT guaranteed.\n */\nMappingList.prototype.unsortedForEach =\n function MappingList_forEach(aCallback, aThisArg) {\n this._array.forEach(aCallback, aThisArg);\n };\n\n/**\n * Add the given source mapping.\n *\n * @param Object aMapping\n */\nMappingList.prototype.add = function MappingList_add(aMapping) {\n if (generatedPositionAfter(this._last, aMapping)) {\n this._last = aMapping;\n this._array.push(aMapping);\n } else {\n this._sorted = false;\n this._array.push(aMapping);\n }\n};\n\n/**\n * Returns the flat, sorted array of mappings. The mappings are sorted by\n * generated position.\n *\n * WARNING: This method returns internal data without copying, for\n * performance. The return value must NOT be mutated, and should be treated as\n * an immutable borrow. If you want to take ownership, you must make your own\n * copy.\n */\nMappingList.prototype.toArray = function MappingList_toArray() {\n if (!this._sorted) {\n this._array.sort(util.compareByGeneratedPositionsInflated);\n this._sorted = true;\n }\n return this._array;\n};\n\nexports.MappingList = MappingList;\n","//! moment.js locale configuration\n//! locale : Tibetan [bo]\n//! author : Thupten N. Chakrishar : https://github.com/vajradog\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '༡',\n 2: '༢',\n 3: '༣',\n 4: '༤',\n 5: '༥',\n 6: '༦',\n 7: '༧',\n 8: '༨',\n 9: '༩',\n 0: '༠',\n },\n numberMap = {\n '༡': '1',\n '༢': '2',\n '༣': '3',\n '༤': '4',\n '༥': '5',\n '༦': '6',\n '༧': '7',\n '༨': '8',\n '༩': '9',\n '༠': '0',\n };\n\n var bo = moment.defineLocale('bo', {\n months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split(\n '_'\n ),\n monthsShort:\n 'ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12'.split(\n '_'\n ),\n monthsShortRegex: /^(ཟླ་\\d{1,2})/,\n monthsParseExact: true,\n weekdays:\n 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split(\n '_'\n ),\n weekdaysShort: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split(\n '_'\n ),\n weekdaysMin: 'ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན'.split('_'),\n longDateFormat: {\n LT: 'A h:mm',\n LTS: 'A h:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm',\n LLLL: 'dddd, D MMMM YYYY, A h:mm',\n },\n calendar: {\n sameDay: '[དི་རིང] LT',\n nextDay: '[སང་ཉིན] LT',\n nextWeek: '[བདུན་ཕྲག་རྗེས་མ], LT',\n lastDay: '[ཁ་སང] LT',\n lastWeek: '[བདུན་ཕྲག་མཐའ་མ] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s ལ་',\n past: '%s སྔན་ལ',\n s: 'ལམ་སང',\n ss: '%d སྐར་ཆ།',\n m: 'སྐར་མ་གཅིག',\n mm: '%d སྐར་མ',\n h: 'ཆུ་ཚོད་གཅིག',\n hh: '%d ཆུ་ཚོད',\n d: 'ཉིན་གཅིག',\n dd: '%d ཉིན་',\n M: 'ཟླ་བ་གཅིག',\n MM: '%d ཟླ་བ',\n y: 'ལོ་གཅིག',\n yy: '%d ལོ',\n },\n preparse: function (string) {\n return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (\n (meridiem === 'མཚན་མོ' && hour >= 4) ||\n (meridiem === 'ཉིན་གུང' && hour < 5) ||\n meridiem === 'དགོང་དག'\n ) {\n return hour + 12;\n } else {\n return hour;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'མཚན་མོ';\n } else if (hour < 10) {\n return 'ཞོགས་ཀས';\n } else if (hour < 17) {\n return 'ཉིན་གུང';\n } else if (hour < 20) {\n return 'དགོང་དག';\n } else {\n return 'མཚན་མོ';\n }\n },\n week: {\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 });\n\n return bo;\n\n})));\n","import { PlatformNotSupportedError } from '../errors/PlatformNotSupportedError.mjs';\nimport '../errors/errorHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */\nclass KeyValueStorage {\n constructor(storage) {\n this.storage = storage;\n }\n /**\n * This is used to set a specific item in storage\n * @param {string} key - the key for the item\n * @param {object} value - the value\n * @returns {string} value that was set\n */\n async setItem(key, value) {\n if (!this.storage)\n throw new PlatformNotSupportedError();\n this.storage.setItem(key, value);\n }\n /**\n * This is used to get a specific key from storage\n * @param {string} key - the key for the item\n * This is used to clear the storage\n * @returns {string} the data item\n */\n async getItem(key) {\n if (!this.storage)\n throw new PlatformNotSupportedError();\n return this.storage.getItem(key);\n }\n /**\n * This is used to remove an item from storage\n * @param {string} key - the key being set\n * @returns {string} value - value that was deleted\n */\n async removeItem(key) {\n if (!this.storage)\n throw new PlatformNotSupportedError();\n this.storage.removeItem(key);\n }\n /**\n * This is used to clear the storage\n * @returns {string} nothing\n */\n async clear() {\n if (!this.storage)\n throw new PlatformNotSupportedError();\n this.storage.clear();\n }\n}\n\nexport { KeyValueStorage };\n","(typeof navigator !== \"undefined\") && (function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lottie = factory());\n})(this, (function () { 'use strict';\n\n var svgNS = 'http://www.w3.org/2000/svg';\n var locationHref = '';\n var _useWebWorker = false;\n var initialDefaultFrame = -999999;\n\n var setWebWorker = function setWebWorker(flag) {\n _useWebWorker = !!flag;\n };\n\n var getWebWorker = function getWebWorker() {\n return _useWebWorker;\n };\n\n var setLocationHref = function setLocationHref(value) {\n locationHref = value;\n };\n\n var getLocationHref = function getLocationHref() {\n return locationHref;\n };\n\n function createTag(type) {\n // return {appendChild:function(){},setAttribute:function(){},style:{}}\n return document.createElement(type);\n }\n\n function extendPrototype(sources, destination) {\n var i;\n var len = sources.length;\n var sourcePrototype;\n\n for (i = 0; i < len; i += 1) {\n sourcePrototype = sources[i].prototype;\n\n for (var attr in sourcePrototype) {\n if (Object.prototype.hasOwnProperty.call(sourcePrototype, attr)) destination.prototype[attr] = sourcePrototype[attr];\n }\n }\n }\n\n function getDescriptor(object, prop) {\n return Object.getOwnPropertyDescriptor(object, prop);\n }\n\n function createProxyFunction(prototype) {\n function ProxyFunction() {}\n\n ProxyFunction.prototype = prototype;\n return ProxyFunction;\n }\n\n // import Howl from '../../3rd_party/howler';\n var audioControllerFactory = function () {\n function AudioController(audioFactory) {\n this.audios = [];\n this.audioFactory = audioFactory;\n this._volume = 1;\n this._isMuted = false;\n }\n\n AudioController.prototype = {\n addAudio: function addAudio(audio) {\n this.audios.push(audio);\n },\n pause: function pause() {\n var i;\n var len = this.audios.length;\n\n for (i = 0; i < len; i += 1) {\n this.audios[i].pause();\n }\n },\n resume: function resume() {\n var i;\n var len = this.audios.length;\n\n for (i = 0; i < len; i += 1) {\n this.audios[i].resume();\n }\n },\n setRate: function setRate(rateValue) {\n var i;\n var len = this.audios.length;\n\n for (i = 0; i < len; i += 1) {\n this.audios[i].setRate(rateValue);\n }\n },\n createAudio: function createAudio(assetPath) {\n if (this.audioFactory) {\n return this.audioFactory(assetPath);\n }\n\n if (window.Howl) {\n return new window.Howl({\n src: [assetPath]\n });\n }\n\n return {\n isPlaying: false,\n play: function play() {\n this.isPlaying = true;\n },\n seek: function seek() {\n this.isPlaying = false;\n },\n playing: function playing() {},\n rate: function rate() {},\n setVolume: function setVolume() {}\n };\n },\n setAudioFactory: function setAudioFactory(audioFactory) {\n this.audioFactory = audioFactory;\n },\n setVolume: function setVolume(value) {\n this._volume = value;\n\n this._updateVolume();\n },\n mute: function mute() {\n this._isMuted = true;\n\n this._updateVolume();\n },\n unmute: function unmute() {\n this._isMuted = false;\n\n this._updateVolume();\n },\n getVolume: function getVolume() {\n return this._volume;\n },\n _updateVolume: function _updateVolume() {\n var i;\n var len = this.audios.length;\n\n for (i = 0; i < len; i += 1) {\n this.audios[i].volume(this._volume * (this._isMuted ? 0 : 1));\n }\n }\n };\n return function () {\n return new AudioController();\n };\n }();\n\n var createTypedArray = function () {\n function createRegularArray(type, len) {\n var i = 0;\n var arr = [];\n var value;\n\n switch (type) {\n case 'int16':\n case 'uint8c':\n value = 1;\n break;\n\n default:\n value = 1.1;\n break;\n }\n\n for (i = 0; i < len; i += 1) {\n arr.push(value);\n }\n\n return arr;\n }\n\n function createTypedArrayFactory(type, len) {\n if (type === 'float32') {\n return new Float32Array(len);\n }\n\n if (type === 'int16') {\n return new Int16Array(len);\n }\n\n if (type === 'uint8c') {\n return new Uint8ClampedArray(len);\n }\n\n return createRegularArray(type, len);\n }\n\n if (typeof Uint8ClampedArray === 'function' && typeof Float32Array === 'function') {\n return createTypedArrayFactory;\n }\n\n return createRegularArray;\n }();\n\n function createSizedArray(len) {\n return Array.apply(null, {\n length: len\n });\n }\n\n function _typeof$6(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$6 = function _typeof(obj) { return typeof obj; }; } else { _typeof$6 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$6(obj); }\n var subframeEnabled = true;\n var expressionsPlugin = null;\n var expressionsInterfaces = null;\n var idPrefix$1 = '';\n var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n var _shouldRoundValues = false;\n var bmPow = Math.pow;\n var bmSqrt = Math.sqrt;\n var bmFloor = Math.floor;\n var bmMax = Math.max;\n var bmMin = Math.min;\n var BMMath = {};\n\n (function () {\n var propertyNames = ['abs', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atanh', 'atan2', 'ceil', 'cbrt', 'expm1', 'clz32', 'cos', 'cosh', 'exp', 'floor', 'fround', 'hypot', 'imul', 'log', 'log1p', 'log2', 'log10', 'max', 'min', 'pow', 'random', 'round', 'sign', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'trunc', 'E', 'LN10', 'LN2', 'LOG10E', 'LOG2E', 'PI', 'SQRT1_2', 'SQRT2'];\n var i;\n var len = propertyNames.length;\n\n for (i = 0; i < len; i += 1) {\n BMMath[propertyNames[i]] = Math[propertyNames[i]];\n }\n })();\n\n function ProjectInterface$1() {\n return {};\n }\n\n BMMath.random = Math.random;\n\n BMMath.abs = function (val) {\n var tOfVal = _typeof$6(val);\n\n if (tOfVal === 'object' && val.length) {\n var absArr = createSizedArray(val.length);\n var i;\n var len = val.length;\n\n for (i = 0; i < len; i += 1) {\n absArr[i] = Math.abs(val[i]);\n }\n\n return absArr;\n }\n\n return Math.abs(val);\n };\n\n var defaultCurveSegments = 150;\n var degToRads = Math.PI / 180;\n var roundCorner = 0.5519;\n\n function roundValues(flag) {\n _shouldRoundValues = !!flag;\n }\n\n function bmRnd(value) {\n if (_shouldRoundValues) {\n return Math.round(value);\n }\n\n return value;\n }\n\n function styleDiv(element) {\n element.style.position = 'absolute';\n element.style.top = 0;\n element.style.left = 0;\n element.style.display = 'block';\n element.style.transformOrigin = '0 0';\n element.style.webkitTransformOrigin = '0 0';\n element.style.backfaceVisibility = 'visible';\n element.style.webkitBackfaceVisibility = 'visible';\n element.style.transformStyle = 'preserve-3d';\n element.style.webkitTransformStyle = 'preserve-3d';\n element.style.mozTransformStyle = 'preserve-3d';\n }\n\n function BMEnterFrameEvent(type, currentTime, totalTime, frameMultiplier) {\n this.type = type;\n this.currentTime = currentTime;\n this.totalTime = totalTime;\n this.direction = frameMultiplier < 0 ? -1 : 1;\n }\n\n function BMCompleteEvent(type, frameMultiplier) {\n this.type = type;\n this.direction = frameMultiplier < 0 ? -1 : 1;\n }\n\n function BMCompleteLoopEvent(type, totalLoops, currentLoop, frameMultiplier) {\n this.type = type;\n this.currentLoop = currentLoop;\n this.totalLoops = totalLoops;\n this.direction = frameMultiplier < 0 ? -1 : 1;\n }\n\n function BMSegmentStartEvent(type, firstFrame, totalFrames) {\n this.type = type;\n this.firstFrame = firstFrame;\n this.totalFrames = totalFrames;\n }\n\n function BMDestroyEvent(type, target) {\n this.type = type;\n this.target = target;\n }\n\n function BMRenderFrameErrorEvent(nativeError, currentTime) {\n this.type = 'renderFrameError';\n this.nativeError = nativeError;\n this.currentTime = currentTime;\n }\n\n function BMConfigErrorEvent(nativeError) {\n this.type = 'configError';\n this.nativeError = nativeError;\n }\n\n function BMAnimationConfigErrorEvent(type, nativeError) {\n this.type = type;\n this.nativeError = nativeError;\n }\n\n var createElementID = function () {\n var _count = 0;\n return function createID() {\n _count += 1;\n return idPrefix$1 + '__lottie_element_' + _count;\n };\n }();\n\n function HSVtoRGB(h, s, v) {\n var r;\n var g;\n var b;\n var i;\n var f;\n var p;\n var q;\n var t;\n i = Math.floor(h * 6);\n f = h * 6 - i;\n p = v * (1 - s);\n q = v * (1 - f * s);\n t = v * (1 - (1 - f) * s);\n\n switch (i % 6) {\n case 0:\n r = v;\n g = t;\n b = p;\n break;\n\n case 1:\n r = q;\n g = v;\n b = p;\n break;\n\n case 2:\n r = p;\n g = v;\n b = t;\n break;\n\n case 3:\n r = p;\n g = q;\n b = v;\n break;\n\n case 4:\n r = t;\n g = p;\n b = v;\n break;\n\n case 5:\n r = v;\n g = p;\n b = q;\n break;\n\n default:\n break;\n }\n\n return [r, g, b];\n }\n\n function RGBtoHSV(r, g, b) {\n var max = Math.max(r, g, b);\n var min = Math.min(r, g, b);\n var d = max - min;\n var h;\n var s = max === 0 ? 0 : d / max;\n var v = max / 255;\n\n switch (max) {\n case min:\n h = 0;\n break;\n\n case r:\n h = g - b + d * (g < b ? 6 : 0);\n h /= 6 * d;\n break;\n\n case g:\n h = b - r + d * 2;\n h /= 6 * d;\n break;\n\n case b:\n h = r - g + d * 4;\n h /= 6 * d;\n break;\n\n default:\n break;\n }\n\n return [h, s, v];\n }\n\n function addSaturationToRGB(color, offset) {\n var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);\n hsv[1] += offset;\n\n if (hsv[1] > 1) {\n hsv[1] = 1;\n } else if (hsv[1] <= 0) {\n hsv[1] = 0;\n }\n\n return HSVtoRGB(hsv[0], hsv[1], hsv[2]);\n }\n\n function addBrightnessToRGB(color, offset) {\n var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);\n hsv[2] += offset;\n\n if (hsv[2] > 1) {\n hsv[2] = 1;\n } else if (hsv[2] < 0) {\n hsv[2] = 0;\n }\n\n return HSVtoRGB(hsv[0], hsv[1], hsv[2]);\n }\n\n function addHueToRGB(color, offset) {\n var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);\n hsv[0] += offset / 360;\n\n if (hsv[0] > 1) {\n hsv[0] -= 1;\n } else if (hsv[0] < 0) {\n hsv[0] += 1;\n }\n\n return HSVtoRGB(hsv[0], hsv[1], hsv[2]);\n }\n\n var rgbToHex = function () {\n var colorMap = [];\n var i;\n var hex;\n\n for (i = 0; i < 256; i += 1) {\n hex = i.toString(16);\n colorMap[i] = hex.length === 1 ? '0' + hex : hex;\n }\n\n return function (r, g, b) {\n if (r < 0) {\n r = 0;\n }\n\n if (g < 0) {\n g = 0;\n }\n\n if (b < 0) {\n b = 0;\n }\n\n return '#' + colorMap[r] + colorMap[g] + colorMap[b];\n };\n }();\n\n var setSubframeEnabled = function setSubframeEnabled(flag) {\n subframeEnabled = !!flag;\n };\n\n var getSubframeEnabled = function getSubframeEnabled() {\n return subframeEnabled;\n };\n\n var setExpressionsPlugin = function setExpressionsPlugin(value) {\n expressionsPlugin = value;\n };\n\n var getExpressionsPlugin = function getExpressionsPlugin() {\n return expressionsPlugin;\n };\n\n var setExpressionInterfaces = function setExpressionInterfaces(value) {\n expressionsInterfaces = value;\n };\n\n var getExpressionInterfaces = function getExpressionInterfaces() {\n return expressionsInterfaces;\n };\n\n var setDefaultCurveSegments = function setDefaultCurveSegments(value) {\n defaultCurveSegments = value;\n };\n\n var getDefaultCurveSegments = function getDefaultCurveSegments() {\n return defaultCurveSegments;\n };\n\n var setIdPrefix = function setIdPrefix(value) {\n idPrefix$1 = value;\n };\n\n var getIdPrefix = function getIdPrefix() {\n return idPrefix$1;\n };\n\n function createNS(type) {\n // return {appendChild:function(){},setAttribute:function(){},style:{}}\n return document.createElementNS(svgNS, type);\n }\n\n function _typeof$5(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$5 = function _typeof(obj) { return typeof obj; }; } else { _typeof$5 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$5(obj); }\n\n var dataManager = function () {\n var _counterId = 1;\n var processes = [];\n var workerFn;\n var workerInstance;\n var workerProxy = {\n onmessage: function onmessage() {},\n postMessage: function postMessage(path) {\n workerFn({\n data: path\n });\n }\n };\n var _workerSelf = {\n postMessage: function postMessage(data) {\n workerProxy.onmessage({\n data: data\n });\n }\n };\n\n function createWorker(fn) {\n if (window.Worker && window.Blob && getWebWorker()) {\n var blob = new Blob(['var _workerSelf = self; self.onmessage = ', fn.toString()], {\n type: 'text/javascript'\n }); // var blob = new Blob(['self.onmessage = ', fn.toString()], { type: 'text/javascript' });\n\n var url = URL.createObjectURL(blob);\n return new Worker(url);\n }\n\n workerFn = fn;\n return workerProxy;\n }\n\n function setupWorker() {\n if (!workerInstance) {\n workerInstance = createWorker(function workerStart(e) {\n function dataFunctionManager() {\n function completeLayers(layers, comps) {\n var layerData;\n var i;\n var len = layers.length;\n var j;\n var jLen;\n var k;\n var kLen;\n\n for (i = 0; i < len; i += 1) {\n layerData = layers[i];\n\n if ('ks' in layerData && !layerData.completed) {\n layerData.completed = true;\n\n if (layerData.hasMask) {\n var maskProps = layerData.masksProperties;\n jLen = maskProps.length;\n\n for (j = 0; j < jLen; j += 1) {\n if (maskProps[j].pt.k.i) {\n convertPathsToAbsoluteValues(maskProps[j].pt.k);\n } else {\n kLen = maskProps[j].pt.k.length;\n\n for (k = 0; k < kLen; k += 1) {\n if (maskProps[j].pt.k[k].s) {\n convertPathsToAbsoluteValues(maskProps[j].pt.k[k].s[0]);\n }\n\n if (maskProps[j].pt.k[k].e) {\n convertPathsToAbsoluteValues(maskProps[j].pt.k[k].e[0]);\n }\n }\n }\n }\n }\n\n if (layerData.ty === 0) {\n layerData.layers = findCompLayers(layerData.refId, comps);\n completeLayers(layerData.layers, comps);\n } else if (layerData.ty === 4) {\n completeShapes(layerData.shapes);\n } else if (layerData.ty === 5) {\n completeText(layerData);\n }\n }\n }\n }\n\n function completeChars(chars, assets) {\n if (chars) {\n var i = 0;\n var len = chars.length;\n\n for (i = 0; i < len; i += 1) {\n if (chars[i].t === 1) {\n // var compData = findComp(chars[i].data.refId, assets);\n chars[i].data.layers = findCompLayers(chars[i].data.refId, assets); // chars[i].data.ip = 0;\n // chars[i].data.op = 99999;\n // chars[i].data.st = 0;\n // chars[i].data.sr = 1;\n // chars[i].w = compData.w;\n // chars[i].data.ks = {\n // a: { k: [0, 0, 0], a: 0 },\n // p: { k: [0, -compData.h, 0], a: 0 },\n // r: { k: 0, a: 0 },\n // s: { k: [100, 100], a: 0 },\n // o: { k: 100, a: 0 },\n // };\n\n completeLayers(chars[i].data.layers, assets);\n }\n }\n }\n }\n\n function findComp(id, comps) {\n var i = 0;\n var len = comps.length;\n\n while (i < len) {\n if (comps[i].id === id) {\n return comps[i];\n }\n\n i += 1;\n }\n\n return null;\n }\n\n function findCompLayers(id, comps) {\n var comp = findComp(id, comps);\n\n if (comp) {\n if (!comp.layers.__used) {\n comp.layers.__used = true;\n return comp.layers;\n }\n\n return JSON.parse(JSON.stringify(comp.layers));\n }\n\n return null;\n }\n\n function completeShapes(arr) {\n var i;\n var len = arr.length;\n var j;\n var jLen;\n\n for (i = len - 1; i >= 0; i -= 1) {\n if (arr[i].ty === 'sh') {\n if (arr[i].ks.k.i) {\n convertPathsToAbsoluteValues(arr[i].ks.k);\n } else {\n jLen = arr[i].ks.k.length;\n\n for (j = 0; j < jLen; j += 1) {\n if (arr[i].ks.k[j].s) {\n convertPathsToAbsoluteValues(arr[i].ks.k[j].s[0]);\n }\n\n if (arr[i].ks.k[j].e) {\n convertPathsToAbsoluteValues(arr[i].ks.k[j].e[0]);\n }\n }\n }\n } else if (arr[i].ty === 'gr') {\n completeShapes(arr[i].it);\n }\n }\n }\n\n function convertPathsToAbsoluteValues(path) {\n var i;\n var len = path.i.length;\n\n for (i = 0; i < len; i += 1) {\n path.i[i][0] += path.v[i][0];\n path.i[i][1] += path.v[i][1];\n path.o[i][0] += path.v[i][0];\n path.o[i][1] += path.v[i][1];\n }\n }\n\n function checkVersion(minimum, animVersionString) {\n var animVersion = animVersionString ? animVersionString.split('.') : [100, 100, 100];\n\n if (minimum[0] > animVersion[0]) {\n return true;\n }\n\n if (animVersion[0] > minimum[0]) {\n return false;\n }\n\n if (minimum[1] > animVersion[1]) {\n return true;\n }\n\n if (animVersion[1] > minimum[1]) {\n return false;\n }\n\n if (minimum[2] > animVersion[2]) {\n return true;\n }\n\n if (animVersion[2] > minimum[2]) {\n return false;\n }\n\n return null;\n }\n\n var checkText = function () {\n var minimumVersion = [4, 4, 14];\n\n function updateTextLayer(textLayer) {\n var documentData = textLayer.t.d;\n textLayer.t.d = {\n k: [{\n s: documentData,\n t: 0\n }]\n };\n }\n\n function iterateLayers(layers) {\n var i;\n var len = layers.length;\n\n for (i = 0; i < len; i += 1) {\n if (layers[i].ty === 5) {\n updateTextLayer(layers[i]);\n }\n }\n }\n\n return function (animationData) {\n if (checkVersion(minimumVersion, animationData.v)) {\n iterateLayers(animationData.layers);\n\n if (animationData.assets) {\n var i;\n var len = animationData.assets.length;\n\n for (i = 0; i < len; i += 1) {\n if (animationData.assets[i].layers) {\n iterateLayers(animationData.assets[i].layers);\n }\n }\n }\n }\n };\n }();\n\n var checkChars = function () {\n var minimumVersion = [4, 7, 99];\n return function (animationData) {\n if (animationData.chars && !checkVersion(minimumVersion, animationData.v)) {\n var i;\n var len = animationData.chars.length;\n\n for (i = 0; i < len; i += 1) {\n var charData = animationData.chars[i];\n\n if (charData.data && charData.data.shapes) {\n completeShapes(charData.data.shapes);\n charData.data.ip = 0;\n charData.data.op = 99999;\n charData.data.st = 0;\n charData.data.sr = 1;\n charData.data.ks = {\n p: {\n k: [0, 0],\n a: 0\n },\n s: {\n k: [100, 100],\n a: 0\n },\n a: {\n k: [0, 0],\n a: 0\n },\n r: {\n k: 0,\n a: 0\n },\n o: {\n k: 100,\n a: 0\n }\n };\n\n if (!animationData.chars[i].t) {\n charData.data.shapes.push({\n ty: 'no'\n });\n charData.data.shapes[0].it.push({\n p: {\n k: [0, 0],\n a: 0\n },\n s: {\n k: [100, 100],\n a: 0\n },\n a: {\n k: [0, 0],\n a: 0\n },\n r: {\n k: 0,\n a: 0\n },\n o: {\n k: 100,\n a: 0\n },\n sk: {\n k: 0,\n a: 0\n },\n sa: {\n k: 0,\n a: 0\n },\n ty: 'tr'\n });\n }\n }\n }\n }\n };\n }();\n\n var checkPathProperties = function () {\n var minimumVersion = [5, 7, 15];\n\n function updateTextLayer(textLayer) {\n var pathData = textLayer.t.p;\n\n if (typeof pathData.a === 'number') {\n pathData.a = {\n a: 0,\n k: pathData.a\n };\n }\n\n if (typeof pathData.p === 'number') {\n pathData.p = {\n a: 0,\n k: pathData.p\n };\n }\n\n if (typeof pathData.r === 'number') {\n pathData.r = {\n a: 0,\n k: pathData.r\n };\n }\n }\n\n function iterateLayers(layers) {\n var i;\n var len = layers.length;\n\n for (i = 0; i < len; i += 1) {\n if (layers[i].ty === 5) {\n updateTextLayer(layers[i]);\n }\n }\n }\n\n return function (animationData) {\n if (checkVersion(minimumVersion, animationData.v)) {\n iterateLayers(animationData.layers);\n\n if (animationData.assets) {\n var i;\n var len = animationData.assets.length;\n\n for (i = 0; i < len; i += 1) {\n if (animationData.assets[i].layers) {\n iterateLayers(animationData.assets[i].layers);\n }\n }\n }\n }\n };\n }();\n\n var checkColors = function () {\n var minimumVersion = [4, 1, 9];\n\n function iterateShapes(shapes) {\n var i;\n var len = shapes.length;\n var j;\n var jLen;\n\n for (i = 0; i < len; i += 1) {\n if (shapes[i].ty === 'gr') {\n iterateShapes(shapes[i].it);\n } else if (shapes[i].ty === 'fl' || shapes[i].ty === 'st') {\n if (shapes[i].c.k && shapes[i].c.k[0].i) {\n jLen = shapes[i].c.k.length;\n\n for (j = 0; j < jLen; j += 1) {\n if (shapes[i].c.k[j].s) {\n shapes[i].c.k[j].s[0] /= 255;\n shapes[i].c.k[j].s[1] /= 255;\n shapes[i].c.k[j].s[2] /= 255;\n shapes[i].c.k[j].s[3] /= 255;\n }\n\n if (shapes[i].c.k[j].e) {\n shapes[i].c.k[j].e[0] /= 255;\n shapes[i].c.k[j].e[1] /= 255;\n shapes[i].c.k[j].e[2] /= 255;\n shapes[i].c.k[j].e[3] /= 255;\n }\n }\n } else {\n shapes[i].c.k[0] /= 255;\n shapes[i].c.k[1] /= 255;\n shapes[i].c.k[2] /= 255;\n shapes[i].c.k[3] /= 255;\n }\n }\n }\n }\n\n function iterateLayers(layers) {\n var i;\n var len = layers.length;\n\n for (i = 0; i < len; i += 1) {\n if (layers[i].ty === 4) {\n iterateShapes(layers[i].shapes);\n }\n }\n }\n\n return function (animationData) {\n if (checkVersion(minimumVersion, animationData.v)) {\n iterateLayers(animationData.layers);\n\n if (animationData.assets) {\n var i;\n var len = animationData.assets.length;\n\n for (i = 0; i < len; i += 1) {\n if (animationData.assets[i].layers) {\n iterateLayers(animationData.assets[i].layers);\n }\n }\n }\n }\n };\n }();\n\n var checkShapes = function () {\n var minimumVersion = [4, 4, 18];\n\n function completeClosingShapes(arr) {\n var i;\n var len = arr.length;\n var j;\n var jLen;\n\n for (i = len - 1; i >= 0; i -= 1) {\n if (arr[i].ty === 'sh') {\n if (arr[i].ks.k.i) {\n arr[i].ks.k.c = arr[i].closed;\n } else {\n jLen = arr[i].ks.k.length;\n\n for (j = 0; j < jLen; j += 1) {\n if (arr[i].ks.k[j].s) {\n arr[i].ks.k[j].s[0].c = arr[i].closed;\n }\n\n if (arr[i].ks.k[j].e) {\n arr[i].ks.k[j].e[0].c = arr[i].closed;\n }\n }\n }\n } else if (arr[i].ty === 'gr') {\n completeClosingShapes(arr[i].it);\n }\n }\n }\n\n function iterateLayers(layers) {\n var layerData;\n var i;\n var len = layers.length;\n var j;\n var jLen;\n var k;\n var kLen;\n\n for (i = 0; i < len; i += 1) {\n layerData = layers[i];\n\n if (layerData.hasMask) {\n var maskProps = layerData.masksProperties;\n jLen = maskProps.length;\n\n for (j = 0; j < jLen; j += 1) {\n if (maskProps[j].pt.k.i) {\n maskProps[j].pt.k.c = maskProps[j].cl;\n } else {\n kLen = maskProps[j].pt.k.length;\n\n for (k = 0; k < kLen; k += 1) {\n if (maskProps[j].pt.k[k].s) {\n maskProps[j].pt.k[k].s[0].c = maskProps[j].cl;\n }\n\n if (maskProps[j].pt.k[k].e) {\n maskProps[j].pt.k[k].e[0].c = maskProps[j].cl;\n }\n }\n }\n }\n }\n\n if (layerData.ty === 4) {\n completeClosingShapes(layerData.shapes);\n }\n }\n }\n\n return function (animationData) {\n if (checkVersion(minimumVersion, animationData.v)) {\n iterateLayers(animationData.layers);\n\n if (animationData.assets) {\n var i;\n var len = animationData.assets.length;\n\n for (i = 0; i < len; i += 1) {\n if (animationData.assets[i].layers) {\n iterateLayers(animationData.assets[i].layers);\n }\n }\n }\n }\n };\n }();\n\n function completeData(animationData) {\n if (animationData.__complete) {\n return;\n }\n\n checkColors(animationData);\n checkText(animationData);\n checkChars(animationData);\n checkPathProperties(animationData);\n checkShapes(animationData);\n completeLayers(animationData.layers, animationData.assets);\n completeChars(animationData.chars, animationData.assets);\n animationData.__complete = true;\n }\n\n function completeText(data) {\n if (data.t.a.length === 0 && !('m' in data.t.p)) {// data.singleShape = true;\n }\n }\n\n var moduleOb = {};\n moduleOb.completeData = completeData;\n moduleOb.checkColors = checkColors;\n moduleOb.checkChars = checkChars;\n moduleOb.checkPathProperties = checkPathProperties;\n moduleOb.checkShapes = checkShapes;\n moduleOb.completeLayers = completeLayers;\n return moduleOb;\n }\n\n if (!_workerSelf.dataManager) {\n _workerSelf.dataManager = dataFunctionManager();\n }\n\n if (!_workerSelf.assetLoader) {\n _workerSelf.assetLoader = function () {\n function formatResponse(xhr) {\n // using typeof doubles the time of execution of this method,\n // so if available, it's better to use the header to validate the type\n var contentTypeHeader = xhr.getResponseHeader('content-type');\n\n if (contentTypeHeader && xhr.responseType === 'json' && contentTypeHeader.indexOf('json') !== -1) {\n return xhr.response;\n }\n\n if (xhr.response && _typeof$5(xhr.response) === 'object') {\n return xhr.response;\n }\n\n if (xhr.response && typeof xhr.response === 'string') {\n return JSON.parse(xhr.response);\n }\n\n if (xhr.responseText) {\n return JSON.parse(xhr.responseText);\n }\n\n return null;\n }\n\n function loadAsset(path, fullPath, callback, errorCallback) {\n var response;\n var xhr = new XMLHttpRequest(); // set responseType after calling open or IE will break.\n\n try {\n // This crashes on Android WebView prior to KitKat\n xhr.responseType = 'json';\n } catch (err) {} // eslint-disable-line no-empty\n\n\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n if (xhr.status === 200) {\n response = formatResponse(xhr);\n callback(response);\n } else {\n try {\n response = formatResponse(xhr);\n callback(response);\n } catch (err) {\n if (errorCallback) {\n errorCallback(err);\n }\n }\n }\n }\n };\n\n try {\n // Hack to workaround banner validation\n xhr.open(['G', 'E', 'T'].join(''), path, true);\n } catch (error) {\n // Hack to workaround banner validation\n xhr.open(['G', 'E', 'T'].join(''), fullPath + '/' + path, true);\n }\n\n xhr.send();\n }\n\n return {\n load: loadAsset\n };\n }();\n }\n\n if (e.data.type === 'loadAnimation') {\n _workerSelf.assetLoader.load(e.data.path, e.data.fullPath, function (data) {\n _workerSelf.dataManager.completeData(data);\n\n _workerSelf.postMessage({\n id: e.data.id,\n payload: data,\n status: 'success'\n });\n }, function () {\n _workerSelf.postMessage({\n id: e.data.id,\n status: 'error'\n });\n });\n } else if (e.data.type === 'complete') {\n var animation = e.data.animation;\n\n _workerSelf.dataManager.completeData(animation);\n\n _workerSelf.postMessage({\n id: e.data.id,\n payload: animation,\n status: 'success'\n });\n } else if (e.data.type === 'loadData') {\n _workerSelf.assetLoader.load(e.data.path, e.data.fullPath, function (data) {\n _workerSelf.postMessage({\n id: e.data.id,\n payload: data,\n status: 'success'\n });\n }, function () {\n _workerSelf.postMessage({\n id: e.data.id,\n status: 'error'\n });\n });\n }\n });\n\n workerInstance.onmessage = function (event) {\n var data = event.data;\n var id = data.id;\n var process = processes[id];\n processes[id] = null;\n\n if (data.status === 'success') {\n process.onComplete(data.payload);\n } else if (process.onError) {\n process.onError();\n }\n };\n }\n }\n\n function createProcess(onComplete, onError) {\n _counterId += 1;\n var id = 'processId_' + _counterId;\n processes[id] = {\n onComplete: onComplete,\n onError: onError\n };\n return id;\n }\n\n function loadAnimation(path, onComplete, onError) {\n setupWorker();\n var processId = createProcess(onComplete, onError);\n workerInstance.postMessage({\n type: 'loadAnimation',\n path: path,\n fullPath: window.location.origin + window.location.pathname,\n id: processId\n });\n }\n\n function loadData(path, onComplete, onError) {\n setupWorker();\n var processId = createProcess(onComplete, onError);\n workerInstance.postMessage({\n type: 'loadData',\n path: path,\n fullPath: window.location.origin + window.location.pathname,\n id: processId\n });\n }\n\n function completeAnimation(anim, onComplete, onError) {\n setupWorker();\n var processId = createProcess(onComplete, onError);\n workerInstance.postMessage({\n type: 'complete',\n animation: anim,\n id: processId\n });\n }\n\n return {\n loadAnimation: loadAnimation,\n loadData: loadData,\n completeAnimation: completeAnimation\n };\n }();\n\n var ImagePreloader = function () {\n var proxyImage = function () {\n var canvas = createTag('canvas');\n canvas.width = 1;\n canvas.height = 1;\n var ctx = canvas.getContext('2d');\n ctx.fillStyle = 'rgba(0,0,0,0)';\n ctx.fillRect(0, 0, 1, 1);\n return canvas;\n }();\n\n function imageLoaded() {\n this.loadedAssets += 1;\n\n if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {\n if (this.imagesLoadedCb) {\n this.imagesLoadedCb(null);\n }\n }\n }\n\n function footageLoaded() {\n this.loadedFootagesCount += 1;\n\n if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {\n if (this.imagesLoadedCb) {\n this.imagesLoadedCb(null);\n }\n }\n }\n\n function getAssetsPath(assetData, assetsPath, originalPath) {\n var path = '';\n\n if (assetData.e) {\n path = assetData.p;\n } else if (assetsPath) {\n var imagePath = assetData.p;\n\n if (imagePath.indexOf('images/') !== -1) {\n imagePath = imagePath.split('/')[1];\n }\n\n path = assetsPath + imagePath;\n } else {\n path = originalPath;\n path += assetData.u ? assetData.u : '';\n path += assetData.p;\n }\n\n return path;\n }\n\n function testImageLoaded(img) {\n var _count = 0;\n var intervalId = setInterval(function () {\n var box = img.getBBox();\n\n if (box.width || _count > 500) {\n this._imageLoaded();\n\n clearInterval(intervalId);\n }\n\n _count += 1;\n }.bind(this), 50);\n }\n\n function createImageData(assetData) {\n var path = getAssetsPath(assetData, this.assetsPath, this.path);\n var img = createNS('image');\n\n if (isSafari) {\n this.testImageLoaded(img);\n } else {\n img.addEventListener('load', this._imageLoaded, false);\n }\n\n img.addEventListener('error', function () {\n ob.img = proxyImage;\n\n this._imageLoaded();\n }.bind(this), false);\n img.setAttributeNS('http://www.w3.org/1999/xlink', 'href', path);\n\n if (this._elementHelper.append) {\n this._elementHelper.append(img);\n } else {\n this._elementHelper.appendChild(img);\n }\n\n var ob = {\n img: img,\n assetData: assetData\n };\n return ob;\n }\n\n function createImgData(assetData) {\n var path = getAssetsPath(assetData, this.assetsPath, this.path);\n var img = createTag('img');\n img.crossOrigin = 'anonymous';\n img.addEventListener('load', this._imageLoaded, false);\n img.addEventListener('error', function () {\n ob.img = proxyImage;\n\n this._imageLoaded();\n }.bind(this), false);\n img.src = path;\n var ob = {\n img: img,\n assetData: assetData\n };\n return ob;\n }\n\n function createFootageData(data) {\n var ob = {\n assetData: data\n };\n var path = getAssetsPath(data, this.assetsPath, this.path);\n dataManager.loadData(path, function (footageData) {\n ob.img = footageData;\n\n this._footageLoaded();\n }.bind(this), function () {\n ob.img = {};\n\n this._footageLoaded();\n }.bind(this));\n return ob;\n }\n\n function loadAssets(assets, cb) {\n this.imagesLoadedCb = cb;\n var i;\n var len = assets.length;\n\n for (i = 0; i < len; i += 1) {\n if (!assets[i].layers) {\n if (!assets[i].t || assets[i].t === 'seq') {\n this.totalImages += 1;\n this.images.push(this._createImageData(assets[i]));\n } else if (assets[i].t === 3) {\n this.totalFootages += 1;\n this.images.push(this.createFootageData(assets[i]));\n }\n }\n }\n }\n\n function setPath(path) {\n this.path = path || '';\n }\n\n function setAssetsPath(path) {\n this.assetsPath = path || '';\n }\n\n function getAsset(assetData) {\n var i = 0;\n var len = this.images.length;\n\n while (i < len) {\n if (this.images[i].assetData === assetData) {\n return this.images[i].img;\n }\n\n i += 1;\n }\n\n return null;\n }\n\n function destroy() {\n this.imagesLoadedCb = null;\n this.images.length = 0;\n }\n\n function loadedImages() {\n return this.totalImages === this.loadedAssets;\n }\n\n function loadedFootages() {\n return this.totalFootages === this.loadedFootagesCount;\n }\n\n function setCacheType(type, elementHelper) {\n if (type === 'svg') {\n this._elementHelper = elementHelper;\n this._createImageData = this.createImageData.bind(this);\n } else {\n this._createImageData = this.createImgData.bind(this);\n }\n }\n\n function ImagePreloaderFactory() {\n this._imageLoaded = imageLoaded.bind(this);\n this._footageLoaded = footageLoaded.bind(this);\n this.testImageLoaded = testImageLoaded.bind(this);\n this.createFootageData = createFootageData.bind(this);\n this.assetsPath = '';\n this.path = '';\n this.totalImages = 0;\n this.totalFootages = 0;\n this.loadedAssets = 0;\n this.loadedFootagesCount = 0;\n this.imagesLoadedCb = null;\n this.images = [];\n }\n\n ImagePreloaderFactory.prototype = {\n loadAssets: loadAssets,\n setAssetsPath: setAssetsPath,\n setPath: setPath,\n loadedImages: loadedImages,\n loadedFootages: loadedFootages,\n destroy: destroy,\n getAsset: getAsset,\n createImgData: createImgData,\n createImageData: createImageData,\n imageLoaded: imageLoaded,\n footageLoaded: footageLoaded,\n setCacheType: setCacheType\n };\n return ImagePreloaderFactory;\n }();\n\n function BaseEvent() {}\n\n BaseEvent.prototype = {\n triggerEvent: function triggerEvent(eventName, args) {\n if (this._cbs[eventName]) {\n var callbacks = this._cbs[eventName];\n\n for (var i = 0; i < callbacks.length; i += 1) {\n callbacks[i](args);\n }\n }\n },\n addEventListener: function addEventListener(eventName, callback) {\n if (!this._cbs[eventName]) {\n this._cbs[eventName] = [];\n }\n\n this._cbs[eventName].push(callback);\n\n return function () {\n this.removeEventListener(eventName, callback);\n }.bind(this);\n },\n removeEventListener: function removeEventListener(eventName, callback) {\n if (!callback) {\n this._cbs[eventName] = null;\n } else if (this._cbs[eventName]) {\n var i = 0;\n var len = this._cbs[eventName].length;\n\n while (i < len) {\n if (this._cbs[eventName][i] === callback) {\n this._cbs[eventName].splice(i, 1);\n\n i -= 1;\n len -= 1;\n }\n\n i += 1;\n }\n\n if (!this._cbs[eventName].length) {\n this._cbs[eventName] = null;\n }\n }\n }\n };\n\n var markerParser = function () {\n function parsePayloadLines(payload) {\n var lines = payload.split('\\r\\n');\n var keys = {};\n var line;\n var keysCount = 0;\n\n for (var i = 0; i < lines.length; i += 1) {\n line = lines[i].split(':');\n\n if (line.length === 2) {\n keys[line[0]] = line[1].trim();\n keysCount += 1;\n }\n }\n\n if (keysCount === 0) {\n throw new Error();\n }\n\n return keys;\n }\n\n return function (_markers) {\n var markers = [];\n\n for (var i = 0; i < _markers.length; i += 1) {\n var _marker = _markers[i];\n var markerData = {\n time: _marker.tm,\n duration: _marker.dr\n };\n\n try {\n markerData.payload = JSON.parse(_markers[i].cm);\n } catch (_) {\n try {\n markerData.payload = parsePayloadLines(_markers[i].cm);\n } catch (__) {\n markerData.payload = {\n name: _markers[i].cm\n };\n }\n }\n\n markers.push(markerData);\n }\n\n return markers;\n };\n }();\n\n var ProjectInterface = function () {\n function registerComposition(comp) {\n this.compositions.push(comp);\n }\n\n return function () {\n function _thisProjectFunction(name) {\n var i = 0;\n var len = this.compositions.length;\n\n while (i < len) {\n if (this.compositions[i].data && this.compositions[i].data.nm === name) {\n if (this.compositions[i].prepareFrame && this.compositions[i].data.xt) {\n this.compositions[i].prepareFrame(this.currentFrame);\n }\n\n return this.compositions[i].compInterface;\n }\n\n i += 1;\n }\n\n return null;\n }\n\n _thisProjectFunction.compositions = [];\n _thisProjectFunction.currentFrame = 0;\n _thisProjectFunction.registerComposition = registerComposition;\n return _thisProjectFunction;\n };\n }();\n\n var renderers = {};\n\n var registerRenderer = function registerRenderer(key, value) {\n renderers[key] = value;\n };\n\n function getRenderer(key) {\n return renderers[key];\n }\n\n function getRegisteredRenderer() {\n // Returns canvas by default for compatibility\n if (renderers.canvas) {\n return 'canvas';\n } // Returns any renderer that is registered\n\n\n for (var key in renderers) {\n if (renderers[key]) {\n return key;\n }\n }\n\n return '';\n }\n\n function _typeof$4(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$4 = function _typeof(obj) { return typeof obj; }; } else { _typeof$4 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$4(obj); }\n\n var AnimationItem = function AnimationItem() {\n this._cbs = [];\n this.name = '';\n this.path = '';\n this.isLoaded = false;\n this.currentFrame = 0;\n this.currentRawFrame = 0;\n this.firstFrame = 0;\n this.totalFrames = 0;\n this.frameRate = 0;\n this.frameMult = 0;\n this.playSpeed = 1;\n this.playDirection = 1;\n this.playCount = 0;\n this.animationData = {};\n this.assets = [];\n this.isPaused = true;\n this.autoplay = false;\n this.loop = true;\n this.renderer = null;\n this.animationID = createElementID();\n this.assetsPath = '';\n this.timeCompleted = 0;\n this.segmentPos = 0;\n this.isSubframeEnabled = getSubframeEnabled();\n this.segments = [];\n this._idle = true;\n this._completedLoop = false;\n this.projectInterface = ProjectInterface();\n this.imagePreloader = new ImagePreloader();\n this.audioController = audioControllerFactory();\n this.markers = [];\n this.configAnimation = this.configAnimation.bind(this);\n this.onSetupError = this.onSetupError.bind(this);\n this.onSegmentComplete = this.onSegmentComplete.bind(this);\n this.drawnFrameEvent = new BMEnterFrameEvent('drawnFrame', 0, 0, 0);\n this.expressionsPlugin = getExpressionsPlugin();\n };\n\n extendPrototype([BaseEvent], AnimationItem);\n\n AnimationItem.prototype.setParams = function (params) {\n if (params.wrapper || params.container) {\n this.wrapper = params.wrapper || params.container;\n }\n\n var animType = 'svg';\n\n if (params.animType) {\n animType = params.animType;\n } else if (params.renderer) {\n animType = params.renderer;\n }\n\n var RendererClass = getRenderer(animType);\n this.renderer = new RendererClass(this, params.rendererSettings);\n this.imagePreloader.setCacheType(animType, this.renderer.globalData.defs);\n this.renderer.setProjectInterface(this.projectInterface);\n this.animType = animType;\n\n if (params.loop === '' || params.loop === null || params.loop === undefined || params.loop === true) {\n this.loop = true;\n } else if (params.loop === false) {\n this.loop = false;\n } else {\n this.loop = parseInt(params.loop, 10);\n }\n\n this.autoplay = 'autoplay' in params ? params.autoplay : true;\n this.name = params.name ? params.name : '';\n this.autoloadSegments = Object.prototype.hasOwnProperty.call(params, 'autoloadSegments') ? params.autoloadSegments : true;\n this.assetsPath = params.assetsPath;\n this.initialSegment = params.initialSegment;\n\n if (params.audioFactory) {\n this.audioController.setAudioFactory(params.audioFactory);\n }\n\n if (params.animationData) {\n this.setupAnimation(params.animationData);\n } else if (params.path) {\n if (params.path.lastIndexOf('\\\\') !== -1) {\n this.path = params.path.substr(0, params.path.lastIndexOf('\\\\') + 1);\n } else {\n this.path = params.path.substr(0, params.path.lastIndexOf('/') + 1);\n }\n\n this.fileName = params.path.substr(params.path.lastIndexOf('/') + 1);\n this.fileName = this.fileName.substr(0, this.fileName.lastIndexOf('.json'));\n dataManager.loadAnimation(params.path, this.configAnimation, this.onSetupError);\n }\n };\n\n AnimationItem.prototype.onSetupError = function () {\n this.trigger('data_failed');\n };\n\n AnimationItem.prototype.setupAnimation = function (data) {\n dataManager.completeAnimation(data, this.configAnimation);\n };\n\n AnimationItem.prototype.setData = function (wrapper, animationData) {\n if (animationData) {\n if (_typeof$4(animationData) !== 'object') {\n animationData = JSON.parse(animationData);\n }\n }\n\n var params = {\n wrapper: wrapper,\n animationData: animationData\n };\n var wrapperAttributes = wrapper.attributes;\n params.path = wrapperAttributes.getNamedItem('data-animation-path') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-animation-path').value : wrapperAttributes.getNamedItem('data-bm-path') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-bm-path').value : wrapperAttributes.getNamedItem('bm-path') ? wrapperAttributes.getNamedItem('bm-path').value : '';\n params.animType = wrapperAttributes.getNamedItem('data-anim-type') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-anim-type').value : wrapperAttributes.getNamedItem('data-bm-type') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-bm-type').value : wrapperAttributes.getNamedItem('bm-type') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('bm-type').value : wrapperAttributes.getNamedItem('data-bm-renderer') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-bm-renderer').value : wrapperAttributes.getNamedItem('bm-renderer') ? wrapperAttributes.getNamedItem('bm-renderer').value : getRegisteredRenderer() || 'canvas';\n var loop = wrapperAttributes.getNamedItem('data-anim-loop') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-anim-loop').value : wrapperAttributes.getNamedItem('data-bm-loop') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-bm-loop').value : wrapperAttributes.getNamedItem('bm-loop') ? wrapperAttributes.getNamedItem('bm-loop').value : '';\n\n if (loop === 'false') {\n params.loop = false;\n } else if (loop === 'true') {\n params.loop = true;\n } else if (loop !== '') {\n params.loop = parseInt(loop, 10);\n }\n\n var autoplay = wrapperAttributes.getNamedItem('data-anim-autoplay') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-anim-autoplay').value : wrapperAttributes.getNamedItem('data-bm-autoplay') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-bm-autoplay').value : wrapperAttributes.getNamedItem('bm-autoplay') ? wrapperAttributes.getNamedItem('bm-autoplay').value : true;\n params.autoplay = autoplay !== 'false';\n params.name = wrapperAttributes.getNamedItem('data-name') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-name').value : wrapperAttributes.getNamedItem('data-bm-name') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-bm-name').value : wrapperAttributes.getNamedItem('bm-name') ? wrapperAttributes.getNamedItem('bm-name').value : '';\n var prerender = wrapperAttributes.getNamedItem('data-anim-prerender') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-anim-prerender').value : wrapperAttributes.getNamedItem('data-bm-prerender') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-bm-prerender').value : wrapperAttributes.getNamedItem('bm-prerender') ? wrapperAttributes.getNamedItem('bm-prerender').value : '';\n\n if (prerender === 'false') {\n params.prerender = false;\n }\n\n if (!params.path) {\n this.trigger('destroy');\n } else {\n this.setParams(params);\n }\n };\n\n AnimationItem.prototype.includeLayers = function (data) {\n if (data.op > this.animationData.op) {\n this.animationData.op = data.op;\n this.totalFrames = Math.floor(data.op - this.animationData.ip);\n }\n\n var layers = this.animationData.layers;\n var i;\n var len = layers.length;\n var newLayers = data.layers;\n var j;\n var jLen = newLayers.length;\n\n for (j = 0; j < jLen; j += 1) {\n i = 0;\n\n while (i < len) {\n if (layers[i].id === newLayers[j].id) {\n layers[i] = newLayers[j];\n break;\n }\n\n i += 1;\n }\n }\n\n if (data.chars || data.fonts) {\n this.renderer.globalData.fontManager.addChars(data.chars);\n this.renderer.globalData.fontManager.addFonts(data.fonts, this.renderer.globalData.defs);\n }\n\n if (data.assets) {\n len = data.assets.length;\n\n for (i = 0; i < len; i += 1) {\n this.animationData.assets.push(data.assets[i]);\n }\n }\n\n this.animationData.__complete = false;\n dataManager.completeAnimation(this.animationData, this.onSegmentComplete);\n };\n\n AnimationItem.prototype.onSegmentComplete = function (data) {\n this.animationData = data;\n var expressionsPlugin = getExpressionsPlugin();\n\n if (expressionsPlugin) {\n expressionsPlugin.initExpressions(this);\n }\n\n this.loadNextSegment();\n };\n\n AnimationItem.prototype.loadNextSegment = function () {\n var segments = this.animationData.segments;\n\n if (!segments || segments.length === 0 || !this.autoloadSegments) {\n this.trigger('data_ready');\n this.timeCompleted = this.totalFrames;\n return;\n }\n\n var segment = segments.shift();\n this.timeCompleted = segment.time * this.frameRate;\n var segmentPath = this.path + this.fileName + '_' + this.segmentPos + '.json';\n this.segmentPos += 1;\n dataManager.loadData(segmentPath, this.includeLayers.bind(this), function () {\n this.trigger('data_failed');\n }.bind(this));\n };\n\n AnimationItem.prototype.loadSegments = function () {\n var segments = this.animationData.segments;\n\n if (!segments) {\n this.timeCompleted = this.totalFrames;\n }\n\n this.loadNextSegment();\n };\n\n AnimationItem.prototype.imagesLoaded = function () {\n this.trigger('loaded_images');\n this.checkLoaded();\n };\n\n AnimationItem.prototype.preloadImages = function () {\n this.imagePreloader.setAssetsPath(this.assetsPath);\n this.imagePreloader.setPath(this.path);\n this.imagePreloader.loadAssets(this.animationData.assets, this.imagesLoaded.bind(this));\n };\n\n AnimationItem.prototype.configAnimation = function (animData) {\n if (!this.renderer) {\n return;\n }\n\n try {\n this.animationData = animData;\n\n if (this.initialSegment) {\n this.totalFrames = Math.floor(this.initialSegment[1] - this.initialSegment[0]);\n this.firstFrame = Math.round(this.initialSegment[0]);\n } else {\n this.totalFrames = Math.floor(this.animationData.op - this.animationData.ip);\n this.firstFrame = Math.round(this.animationData.ip);\n }\n\n this.renderer.configAnimation(animData);\n\n if (!animData.assets) {\n animData.assets = [];\n }\n\n this.assets = this.animationData.assets;\n this.frameRate = this.animationData.fr;\n this.frameMult = this.animationData.fr / 1000;\n this.renderer.searchExtraCompositions(animData.assets);\n this.markers = markerParser(animData.markers || []);\n this.trigger('config_ready');\n this.preloadImages();\n this.loadSegments();\n this.updaFrameModifier();\n this.waitForFontsLoaded();\n\n if (this.isPaused) {\n this.audioController.pause();\n }\n } catch (error) {\n this.triggerConfigError(error);\n }\n };\n\n AnimationItem.prototype.waitForFontsLoaded = function () {\n if (!this.renderer) {\n return;\n }\n\n if (this.renderer.globalData.fontManager.isLoaded) {\n this.checkLoaded();\n } else {\n setTimeout(this.waitForFontsLoaded.bind(this), 20);\n }\n };\n\n AnimationItem.prototype.checkLoaded = function () {\n if (!this.isLoaded && this.renderer.globalData.fontManager.isLoaded && (this.imagePreloader.loadedImages() || this.renderer.rendererType !== 'canvas') && this.imagePreloader.loadedFootages()) {\n this.isLoaded = true;\n var expressionsPlugin = getExpressionsPlugin();\n\n if (expressionsPlugin) {\n expressionsPlugin.initExpressions(this);\n }\n\n this.renderer.initItems();\n setTimeout(function () {\n this.trigger('DOMLoaded');\n }.bind(this), 0);\n this.gotoFrame();\n\n if (this.autoplay) {\n this.play();\n }\n }\n };\n\n AnimationItem.prototype.resize = function (width, height) {\n // Adding this validation for backwards compatibility in case an event object was being passed down\n var _width = typeof width === 'number' ? width : undefined;\n\n var _height = typeof height === 'number' ? height : undefined;\n\n this.renderer.updateContainerSize(_width, _height);\n };\n\n AnimationItem.prototype.setSubframe = function (flag) {\n this.isSubframeEnabled = !!flag;\n };\n\n AnimationItem.prototype.gotoFrame = function () {\n this.currentFrame = this.isSubframeEnabled ? this.currentRawFrame : ~~this.currentRawFrame; // eslint-disable-line no-bitwise\n\n if (this.timeCompleted !== this.totalFrames && this.currentFrame > this.timeCompleted) {\n this.currentFrame = this.timeCompleted;\n }\n\n this.trigger('enterFrame');\n this.renderFrame();\n this.trigger('drawnFrame');\n };\n\n AnimationItem.prototype.renderFrame = function () {\n if (this.isLoaded === false || !this.renderer) {\n return;\n }\n\n try {\n if (this.expressionsPlugin) {\n this.expressionsPlugin.resetFrame();\n }\n\n this.renderer.renderFrame(this.currentFrame + this.firstFrame);\n } catch (error) {\n this.triggerRenderFrameError(error);\n }\n };\n\n AnimationItem.prototype.play = function (name) {\n if (name && this.name !== name) {\n return;\n }\n\n if (this.isPaused === true) {\n this.isPaused = false;\n this.trigger('_play');\n this.audioController.resume();\n\n if (this._idle) {\n this._idle = false;\n this.trigger('_active');\n }\n }\n };\n\n AnimationItem.prototype.pause = function (name) {\n if (name && this.name !== name) {\n return;\n }\n\n if (this.isPaused === false) {\n this.isPaused = true;\n this.trigger('_pause');\n this._idle = true;\n this.trigger('_idle');\n this.audioController.pause();\n }\n };\n\n AnimationItem.prototype.togglePause = function (name) {\n if (name && this.name !== name) {\n return;\n }\n\n if (this.isPaused === true) {\n this.play();\n } else {\n this.pause();\n }\n };\n\n AnimationItem.prototype.stop = function (name) {\n if (name && this.name !== name) {\n return;\n }\n\n this.pause();\n this.playCount = 0;\n this._completedLoop = false;\n this.setCurrentRawFrameValue(0);\n };\n\n AnimationItem.prototype.getMarkerData = function (markerName) {\n var marker;\n\n for (var i = 0; i < this.markers.length; i += 1) {\n marker = this.markers[i];\n\n if (marker.payload && marker.payload.name === markerName) {\n return marker;\n }\n }\n\n return null;\n };\n\n AnimationItem.prototype.goToAndStop = function (value, isFrame, name) {\n if (name && this.name !== name) {\n return;\n }\n\n var numValue = Number(value);\n\n if (isNaN(numValue)) {\n var marker = this.getMarkerData(value);\n\n if (marker) {\n this.goToAndStop(marker.time, true);\n }\n } else if (isFrame) {\n this.setCurrentRawFrameValue(value);\n } else {\n this.setCurrentRawFrameValue(value * this.frameModifier);\n }\n\n this.pause();\n };\n\n AnimationItem.prototype.goToAndPlay = function (value, isFrame, name) {\n if (name && this.name !== name) {\n return;\n }\n\n var numValue = Number(value);\n\n if (isNaN(numValue)) {\n var marker = this.getMarkerData(value);\n\n if (marker) {\n if (!marker.duration) {\n this.goToAndStop(marker.time, true);\n } else {\n this.playSegments([marker.time, marker.time + marker.duration], true);\n }\n }\n } else {\n this.goToAndStop(numValue, isFrame, name);\n }\n\n this.play();\n };\n\n AnimationItem.prototype.advanceTime = function (value) {\n if (this.isPaused === true || this.isLoaded === false) {\n return;\n }\n\n var nextValue = this.currentRawFrame + value * this.frameModifier;\n var _isComplete = false; // Checking if nextValue > totalFrames - 1 for addressing non looping and looping animations.\n // If animation won't loop, it should stop at totalFrames - 1. If it will loop it should complete the last frame and then loop.\n\n if (nextValue >= this.totalFrames - 1 && this.frameModifier > 0) {\n if (!this.loop || this.playCount === this.loop) {\n if (!this.checkSegments(nextValue > this.totalFrames ? nextValue % this.totalFrames : 0)) {\n _isComplete = true;\n nextValue = this.totalFrames - 1;\n }\n } else if (nextValue >= this.totalFrames) {\n this.playCount += 1;\n\n if (!this.checkSegments(nextValue % this.totalFrames)) {\n this.setCurrentRawFrameValue(nextValue % this.totalFrames);\n this._completedLoop = true;\n this.trigger('loopComplete');\n }\n } else {\n this.setCurrentRawFrameValue(nextValue);\n }\n } else if (nextValue < 0) {\n if (!this.checkSegments(nextValue % this.totalFrames)) {\n if (this.loop && !(this.playCount-- <= 0 && this.loop !== true)) {\n // eslint-disable-line no-plusplus\n this.setCurrentRawFrameValue(this.totalFrames + nextValue % this.totalFrames);\n\n if (!this._completedLoop) {\n this._completedLoop = true;\n } else {\n this.trigger('loopComplete');\n }\n } else {\n _isComplete = true;\n nextValue = 0;\n }\n }\n } else {\n this.setCurrentRawFrameValue(nextValue);\n }\n\n if (_isComplete) {\n this.setCurrentRawFrameValue(nextValue);\n this.pause();\n this.trigger('complete');\n }\n };\n\n AnimationItem.prototype.adjustSegment = function (arr, offset) {\n this.playCount = 0;\n\n if (arr[1] < arr[0]) {\n if (this.frameModifier > 0) {\n if (this.playSpeed < 0) {\n this.setSpeed(-this.playSpeed);\n } else {\n this.setDirection(-1);\n }\n }\n\n this.totalFrames = arr[0] - arr[1];\n this.timeCompleted = this.totalFrames;\n this.firstFrame = arr[1];\n this.setCurrentRawFrameValue(this.totalFrames - 0.001 - offset);\n } else if (arr[1] > arr[0]) {\n if (this.frameModifier < 0) {\n if (this.playSpeed < 0) {\n this.setSpeed(-this.playSpeed);\n } else {\n this.setDirection(1);\n }\n }\n\n this.totalFrames = arr[1] - arr[0];\n this.timeCompleted = this.totalFrames;\n this.firstFrame = arr[0];\n this.setCurrentRawFrameValue(0.001 + offset);\n }\n\n this.trigger('segmentStart');\n };\n\n AnimationItem.prototype.setSegment = function (init, end) {\n var pendingFrame = -1;\n\n if (this.isPaused) {\n if (this.currentRawFrame + this.firstFrame < init) {\n pendingFrame = init;\n } else if (this.currentRawFrame + this.firstFrame > end) {\n pendingFrame = end - init;\n }\n }\n\n this.firstFrame = init;\n this.totalFrames = end - init;\n this.timeCompleted = this.totalFrames;\n\n if (pendingFrame !== -1) {\n this.goToAndStop(pendingFrame, true);\n }\n };\n\n AnimationItem.prototype.playSegments = function (arr, forceFlag) {\n if (forceFlag) {\n this.segments.length = 0;\n }\n\n if (_typeof$4(arr[0]) === 'object') {\n var i;\n var len = arr.length;\n\n for (i = 0; i < len; i += 1) {\n this.segments.push(arr[i]);\n }\n } else {\n this.segments.push(arr);\n }\n\n if (this.segments.length && forceFlag) {\n this.adjustSegment(this.segments.shift(), 0);\n }\n\n if (this.isPaused) {\n this.play();\n }\n };\n\n AnimationItem.prototype.resetSegments = function (forceFlag) {\n this.segments.length = 0;\n this.segments.push([this.animationData.ip, this.animationData.op]);\n\n if (forceFlag) {\n this.checkSegments(0);\n }\n };\n\n AnimationItem.prototype.checkSegments = function (offset) {\n if (this.segments.length) {\n this.adjustSegment(this.segments.shift(), offset);\n return true;\n }\n\n return false;\n };\n\n AnimationItem.prototype.destroy = function (name) {\n if (name && this.name !== name || !this.renderer) {\n return;\n }\n\n this.renderer.destroy();\n this.imagePreloader.destroy();\n this.trigger('destroy');\n this._cbs = null;\n this.onEnterFrame = null;\n this.onLoopComplete = null;\n this.onComplete = null;\n this.onSegmentStart = null;\n this.onDestroy = null;\n this.renderer = null;\n this.expressionsPlugin = null;\n this.imagePreloader = null;\n this.projectInterface = null;\n };\n\n AnimationItem.prototype.setCurrentRawFrameValue = function (value) {\n this.currentRawFrame = value;\n this.gotoFrame();\n };\n\n AnimationItem.prototype.setSpeed = function (val) {\n this.playSpeed = val;\n this.updaFrameModifier();\n };\n\n AnimationItem.prototype.setDirection = function (val) {\n this.playDirection = val < 0 ? -1 : 1;\n this.updaFrameModifier();\n };\n\n AnimationItem.prototype.setLoop = function (isLooping) {\n this.loop = isLooping;\n };\n\n AnimationItem.prototype.setVolume = function (val, name) {\n if (name && this.name !== name) {\n return;\n }\n\n this.audioController.setVolume(val);\n };\n\n AnimationItem.prototype.getVolume = function () {\n return this.audioController.getVolume();\n };\n\n AnimationItem.prototype.mute = function (name) {\n if (name && this.name !== name) {\n return;\n }\n\n this.audioController.mute();\n };\n\n AnimationItem.prototype.unmute = function (name) {\n if (name && this.name !== name) {\n return;\n }\n\n this.audioController.unmute();\n };\n\n AnimationItem.prototype.updaFrameModifier = function () {\n this.frameModifier = this.frameMult * this.playSpeed * this.playDirection;\n this.audioController.setRate(this.playSpeed * this.playDirection);\n };\n\n AnimationItem.prototype.getPath = function () {\n return this.path;\n };\n\n AnimationItem.prototype.getAssetsPath = function (assetData) {\n var path = '';\n\n if (assetData.e) {\n path = assetData.p;\n } else if (this.assetsPath) {\n var imagePath = assetData.p;\n\n if (imagePath.indexOf('images/') !== -1) {\n imagePath = imagePath.split('/')[1];\n }\n\n path = this.assetsPath + imagePath;\n } else {\n path = this.path;\n path += assetData.u ? assetData.u : '';\n path += assetData.p;\n }\n\n return path;\n };\n\n AnimationItem.prototype.getAssetData = function (id) {\n var i = 0;\n var len = this.assets.length;\n\n while (i < len) {\n if (id === this.assets[i].id) {\n return this.assets[i];\n }\n\n i += 1;\n }\n\n return null;\n };\n\n AnimationItem.prototype.hide = function () {\n this.renderer.hide();\n };\n\n AnimationItem.prototype.show = function () {\n this.renderer.show();\n };\n\n AnimationItem.prototype.getDuration = function (isFrame) {\n return isFrame ? this.totalFrames : this.totalFrames / this.frameRate;\n };\n\n AnimationItem.prototype.updateDocumentData = function (path, documentData, index) {\n try {\n var element = this.renderer.getElementByPath(path);\n element.updateDocumentData(documentData, index);\n } catch (error) {// TODO: decide how to handle catch case\n }\n };\n\n AnimationItem.prototype.trigger = function (name) {\n if (this._cbs && this._cbs[name]) {\n switch (name) {\n case 'enterFrame':\n this.triggerEvent(name, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameModifier));\n break;\n\n case 'drawnFrame':\n this.drawnFrameEvent.currentTime = this.currentFrame;\n this.drawnFrameEvent.totalTime = this.totalFrames;\n this.drawnFrameEvent.direction = this.frameModifier;\n this.triggerEvent(name, this.drawnFrameEvent);\n break;\n\n case 'loopComplete':\n this.triggerEvent(name, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));\n break;\n\n case 'complete':\n this.triggerEvent(name, new BMCompleteEvent(name, this.frameMult));\n break;\n\n case 'segmentStart':\n this.triggerEvent(name, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));\n break;\n\n case 'destroy':\n this.triggerEvent(name, new BMDestroyEvent(name, this));\n break;\n\n default:\n this.triggerEvent(name);\n }\n }\n\n if (name === 'enterFrame' && this.onEnterFrame) {\n this.onEnterFrame.call(this, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameMult));\n }\n\n if (name === 'loopComplete' && this.onLoopComplete) {\n this.onLoopComplete.call(this, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));\n }\n\n if (name === 'complete' && this.onComplete) {\n this.onComplete.call(this, new BMCompleteEvent(name, this.frameMult));\n }\n\n if (name === 'segmentStart' && this.onSegmentStart) {\n this.onSegmentStart.call(this, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));\n }\n\n if (name === 'destroy' && this.onDestroy) {\n this.onDestroy.call(this, new BMDestroyEvent(name, this));\n }\n };\n\n AnimationItem.prototype.triggerRenderFrameError = function (nativeError) {\n var error = new BMRenderFrameErrorEvent(nativeError, this.currentFrame);\n this.triggerEvent('error', error);\n\n if (this.onError) {\n this.onError.call(this, error);\n }\n };\n\n AnimationItem.prototype.triggerConfigError = function (nativeError) {\n var error = new BMConfigErrorEvent(nativeError, this.currentFrame);\n this.triggerEvent('error', error);\n\n if (this.onError) {\n this.onError.call(this, error);\n }\n };\n\n var animationManager = function () {\n var moduleOb = {};\n var registeredAnimations = [];\n var initTime = 0;\n var len = 0;\n var playingAnimationsNum = 0;\n var _stopped = true;\n var _isFrozen = false;\n\n function removeElement(ev) {\n var i = 0;\n var animItem = ev.target;\n\n while (i < len) {\n if (registeredAnimations[i].animation === animItem) {\n registeredAnimations.splice(i, 1);\n i -= 1;\n len -= 1;\n\n if (!animItem.isPaused) {\n subtractPlayingCount();\n }\n }\n\n i += 1;\n }\n }\n\n function registerAnimation(element, animationData) {\n if (!element) {\n return null;\n }\n\n var i = 0;\n\n while (i < len) {\n if (registeredAnimations[i].elem === element && registeredAnimations[i].elem !== null) {\n return registeredAnimations[i].animation;\n }\n\n i += 1;\n }\n\n var animItem = new AnimationItem();\n setupAnimation(animItem, element);\n animItem.setData(element, animationData);\n return animItem;\n }\n\n function getRegisteredAnimations() {\n var i;\n var lenAnims = registeredAnimations.length;\n var animations = [];\n\n for (i = 0; i < lenAnims; i += 1) {\n animations.push(registeredAnimations[i].animation);\n }\n\n return animations;\n }\n\n function addPlayingCount() {\n playingAnimationsNum += 1;\n activate();\n }\n\n function subtractPlayingCount() {\n playingAnimationsNum -= 1;\n }\n\n function setupAnimation(animItem, element) {\n animItem.addEventListener('destroy', removeElement);\n animItem.addEventListener('_active', addPlayingCount);\n animItem.addEventListener('_idle', subtractPlayingCount);\n registeredAnimations.push({\n elem: element,\n animation: animItem\n });\n len += 1;\n }\n\n function loadAnimation(params) {\n var animItem = new AnimationItem();\n setupAnimation(animItem, null);\n animItem.setParams(params);\n return animItem;\n }\n\n function setSpeed(val, animation) {\n var i;\n\n for (i = 0; i < len; i += 1) {\n registeredAnimations[i].animation.setSpeed(val, animation);\n }\n }\n\n function setDirection(val, animation) {\n var i;\n\n for (i = 0; i < len; i += 1) {\n registeredAnimations[i].animation.setDirection(val, animation);\n }\n }\n\n function play(animation) {\n var i;\n\n for (i = 0; i < len; i += 1) {\n registeredAnimations[i].animation.play(animation);\n }\n }\n\n function resume(nowTime) {\n var elapsedTime = nowTime - initTime;\n var i;\n\n for (i = 0; i < len; i += 1) {\n registeredAnimations[i].animation.advanceTime(elapsedTime);\n }\n\n initTime = nowTime;\n\n if (playingAnimationsNum && !_isFrozen) {\n window.requestAnimationFrame(resume);\n } else {\n _stopped = true;\n }\n }\n\n function first(nowTime) {\n initTime = nowTime;\n window.requestAnimationFrame(resume);\n }\n\n function pause(animation) {\n var i;\n\n for (i = 0; i < len; i += 1) {\n registeredAnimations[i].animation.pause(animation);\n }\n }\n\n function goToAndStop(value, isFrame, animation) {\n var i;\n\n for (i = 0; i < len; i += 1) {\n registeredAnimations[i].animation.goToAndStop(value, isFrame, animation);\n }\n }\n\n function stop(animation) {\n var i;\n\n for (i = 0; i < len; i += 1) {\n registeredAnimations[i].animation.stop(animation);\n }\n }\n\n function togglePause(animation) {\n var i;\n\n for (i = 0; i < len; i += 1) {\n registeredAnimations[i].animation.togglePause(animation);\n }\n }\n\n function destroy(animation) {\n var i;\n\n for (i = len - 1; i >= 0; i -= 1) {\n registeredAnimations[i].animation.destroy(animation);\n }\n }\n\n function searchAnimations(animationData, standalone, renderer) {\n var animElements = [].concat([].slice.call(document.getElementsByClassName('lottie')), [].slice.call(document.getElementsByClassName('bodymovin')));\n var i;\n var lenAnims = animElements.length;\n\n for (i = 0; i < lenAnims; i += 1) {\n if (renderer) {\n animElements[i].setAttribute('data-bm-type', renderer);\n }\n\n registerAnimation(animElements[i], animationData);\n }\n\n if (standalone && lenAnims === 0) {\n if (!renderer) {\n renderer = 'svg';\n }\n\n var body = document.getElementsByTagName('body')[0];\n body.innerText = '';\n var div = createTag('div');\n div.style.width = '100%';\n div.style.height = '100%';\n div.setAttribute('data-bm-type', renderer);\n body.appendChild(div);\n registerAnimation(div, animationData);\n }\n }\n\n function resize() {\n var i;\n\n for (i = 0; i < len; i += 1) {\n registeredAnimations[i].animation.resize();\n }\n }\n\n function activate() {\n if (!_isFrozen && playingAnimationsNum) {\n if (_stopped) {\n window.requestAnimationFrame(first);\n _stopped = false;\n }\n }\n }\n\n function freeze() {\n _isFrozen = true;\n }\n\n function unfreeze() {\n _isFrozen = false;\n activate();\n }\n\n function setVolume(val, animation) {\n var i;\n\n for (i = 0; i < len; i += 1) {\n registeredAnimations[i].animation.setVolume(val, animation);\n }\n }\n\n function mute(animation) {\n var i;\n\n for (i = 0; i < len; i += 1) {\n registeredAnimations[i].animation.mute(animation);\n }\n }\n\n function unmute(animation) {\n var i;\n\n for (i = 0; i < len; i += 1) {\n registeredAnimations[i].animation.unmute(animation);\n }\n }\n\n moduleOb.registerAnimation = registerAnimation;\n moduleOb.loadAnimation = loadAnimation;\n moduleOb.setSpeed = setSpeed;\n moduleOb.setDirection = setDirection;\n moduleOb.play = play;\n moduleOb.pause = pause;\n moduleOb.stop = stop;\n moduleOb.togglePause = togglePause;\n moduleOb.searchAnimations = searchAnimations;\n moduleOb.resize = resize; // moduleOb.start = start;\n\n moduleOb.goToAndStop = goToAndStop;\n moduleOb.destroy = destroy;\n moduleOb.freeze = freeze;\n moduleOb.unfreeze = unfreeze;\n moduleOb.setVolume = setVolume;\n moduleOb.mute = mute;\n moduleOb.unmute = unmute;\n moduleOb.getRegisteredAnimations = getRegisteredAnimations;\n return moduleOb;\n }();\n\n /* eslint-disable */\n var BezierFactory = function () {\n /**\r\n * BezierEasing - use bezier curve for transition easing function\r\n * by Gaëtan Renaudeau 2014 - 2015 – MIT License\r\n *\r\n * Credits: is based on Firefox's nsSMILKeySpline.cpp\r\n * Usage:\r\n * var spline = BezierEasing([ 0.25, 0.1, 0.25, 1.0 ])\r\n * spline.get(x) => returns the easing value | x must be in [0, 1] range\r\n *\r\n */\n var ob = {};\n ob.getBezierEasing = getBezierEasing;\n var beziers = {};\n\n function getBezierEasing(a, b, c, d, nm) {\n var str = nm || ('bez_' + a + '_' + b + '_' + c + '_' + d).replace(/\\./g, 'p');\n\n if (beziers[str]) {\n return beziers[str];\n }\n\n var bezEasing = new BezierEasing([a, b, c, d]);\n beziers[str] = bezEasing;\n return bezEasing;\n } // These values are established by empiricism with tests (tradeoff: performance VS precision)\n\n\n var NEWTON_ITERATIONS = 4;\n var NEWTON_MIN_SLOPE = 0.001;\n var SUBDIVISION_PRECISION = 0.0000001;\n var SUBDIVISION_MAX_ITERATIONS = 10;\n var kSplineTableSize = 11;\n var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);\n var float32ArraySupported = typeof Float32Array === 'function';\n\n function A(aA1, aA2) {\n return 1.0 - 3.0 * aA2 + 3.0 * aA1;\n }\n\n function B(aA1, aA2) {\n return 3.0 * aA2 - 6.0 * aA1;\n }\n\n function C(aA1) {\n return 3.0 * aA1;\n } // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\n\n\n function calcBezier(aT, aA1, aA2) {\n return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;\n } // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.\n\n\n function getSlope(aT, aA1, aA2) {\n return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\n }\n\n function binarySubdivide(aX, aA, aB, mX1, mX2) {\n var currentX,\n currentT,\n i = 0;\n\n do {\n currentT = aA + (aB - aA) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - aX;\n\n if (currentX > 0.0) {\n aB = currentT;\n } else {\n aA = currentT;\n }\n } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);\n\n return currentT;\n }\n\n function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {\n for (var i = 0; i < NEWTON_ITERATIONS; ++i) {\n var currentSlope = getSlope(aGuessT, mX1, mX2);\n if (currentSlope === 0.0) return aGuessT;\n var currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n aGuessT -= currentX / currentSlope;\n }\n\n return aGuessT;\n }\n /**\r\n * points is an array of [ mX1, mY1, mX2, mY2 ]\r\n */\n\n\n function BezierEasing(points) {\n this._p = points;\n this._mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);\n this._precomputed = false;\n this.get = this.get.bind(this);\n }\n\n BezierEasing.prototype = {\n get: function get(x) {\n var mX1 = this._p[0],\n mY1 = this._p[1],\n mX2 = this._p[2],\n mY2 = this._p[3];\n if (!this._precomputed) this._precompute();\n if (mX1 === mY1 && mX2 === mY2) return x; // linear\n // Because JavaScript number are imprecise, we should guarantee the extremes are right.\n\n if (x === 0) return 0;\n if (x === 1) return 1;\n return calcBezier(this._getTForX(x), mY1, mY2);\n },\n // Private part\n _precompute: function _precompute() {\n var mX1 = this._p[0],\n mY1 = this._p[1],\n mX2 = this._p[2],\n mY2 = this._p[3];\n this._precomputed = true;\n\n if (mX1 !== mY1 || mX2 !== mY2) {\n this._calcSampleValues();\n }\n },\n _calcSampleValues: function _calcSampleValues() {\n var mX1 = this._p[0],\n mX2 = this._p[2];\n\n for (var i = 0; i < kSplineTableSize; ++i) {\n this._mSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\n }\n },\n\n /**\r\n * getTForX chose the fastest heuristic to determine the percentage value precisely from a given X projection.\r\n */\n _getTForX: function _getTForX(aX) {\n var mX1 = this._p[0],\n mX2 = this._p[2],\n mSampleValues = this._mSampleValues;\n var intervalStart = 0.0;\n var currentSample = 1;\n var lastSample = kSplineTableSize - 1;\n\n for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) {\n intervalStart += kSampleStepSize;\n }\n\n --currentSample; // Interpolate to provide an initial guess for t\n\n var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]);\n var guessForT = intervalStart + dist * kSampleStepSize;\n var initialSlope = getSlope(guessForT, mX1, mX2);\n\n if (initialSlope >= NEWTON_MIN_SLOPE) {\n return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\n }\n\n if (initialSlope === 0.0) {\n return guessForT;\n }\n\n return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);\n }\n };\n return ob;\n }();\n\n var pooling = function () {\n function _double(arr) {\n return arr.concat(createSizedArray(arr.length));\n }\n\n return {\n \"double\": _double\n };\n }();\n\n var poolFactory = function () {\n return function (initialLength, _create, _release) {\n var _length = 0;\n var _maxLength = initialLength;\n var pool = createSizedArray(_maxLength);\n var ob = {\n newElement: newElement,\n release: release\n };\n\n function newElement() {\n var element;\n\n if (_length) {\n _length -= 1;\n element = pool[_length];\n } else {\n element = _create();\n }\n\n return element;\n }\n\n function release(element) {\n if (_length === _maxLength) {\n pool = pooling[\"double\"](pool);\n _maxLength *= 2;\n }\n\n if (_release) {\n _release(element);\n }\n\n pool[_length] = element;\n _length += 1;\n }\n\n return ob;\n };\n }();\n\n var bezierLengthPool = function () {\n function create() {\n return {\n addedLength: 0,\n percents: createTypedArray('float32', getDefaultCurveSegments()),\n lengths: createTypedArray('float32', getDefaultCurveSegments())\n };\n }\n\n return poolFactory(8, create);\n }();\n\n var segmentsLengthPool = function () {\n function create() {\n return {\n lengths: [],\n totalLength: 0\n };\n }\n\n function release(element) {\n var i;\n var len = element.lengths.length;\n\n for (i = 0; i < len; i += 1) {\n bezierLengthPool.release(element.lengths[i]);\n }\n\n element.lengths.length = 0;\n }\n\n return poolFactory(8, create, release);\n }();\n\n function bezFunction() {\n var math = Math;\n\n function pointOnLine2D(x1, y1, x2, y2, x3, y3) {\n var det1 = x1 * y2 + y1 * x3 + x2 * y3 - x3 * y2 - y3 * x1 - x2 * y1;\n return det1 > -0.001 && det1 < 0.001;\n }\n\n function pointOnLine3D(x1, y1, z1, x2, y2, z2, x3, y3, z3) {\n if (z1 === 0 && z2 === 0 && z3 === 0) {\n return pointOnLine2D(x1, y1, x2, y2, x3, y3);\n }\n\n var dist1 = math.sqrt(math.pow(x2 - x1, 2) + math.pow(y2 - y1, 2) + math.pow(z2 - z1, 2));\n var dist2 = math.sqrt(math.pow(x3 - x1, 2) + math.pow(y3 - y1, 2) + math.pow(z3 - z1, 2));\n var dist3 = math.sqrt(math.pow(x3 - x2, 2) + math.pow(y3 - y2, 2) + math.pow(z3 - z2, 2));\n var diffDist;\n\n if (dist1 > dist2) {\n if (dist1 > dist3) {\n diffDist = dist1 - dist2 - dist3;\n } else {\n diffDist = dist3 - dist2 - dist1;\n }\n } else if (dist3 > dist2) {\n diffDist = dist3 - dist2 - dist1;\n } else {\n diffDist = dist2 - dist1 - dist3;\n }\n\n return diffDist > -0.0001 && diffDist < 0.0001;\n }\n\n var getBezierLength = function () {\n return function (pt1, pt2, pt3, pt4) {\n var curveSegments = getDefaultCurveSegments();\n var k;\n var i;\n var len;\n var ptCoord;\n var perc;\n var addedLength = 0;\n var ptDistance;\n var point = [];\n var lastPoint = [];\n var lengthData = bezierLengthPool.newElement();\n len = pt3.length;\n\n for (k = 0; k < curveSegments; k += 1) {\n perc = k / (curveSegments - 1);\n ptDistance = 0;\n\n for (i = 0; i < len; i += 1) {\n ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * pt3[i] + 3 * (1 - perc) * bmPow(perc, 2) * pt4[i] + bmPow(perc, 3) * pt2[i];\n point[i] = ptCoord;\n\n if (lastPoint[i] !== null) {\n ptDistance += bmPow(point[i] - lastPoint[i], 2);\n }\n\n lastPoint[i] = point[i];\n }\n\n if (ptDistance) {\n ptDistance = bmSqrt(ptDistance);\n addedLength += ptDistance;\n }\n\n lengthData.percents[k] = perc;\n lengthData.lengths[k] = addedLength;\n }\n\n lengthData.addedLength = addedLength;\n return lengthData;\n };\n }();\n\n function getSegmentsLength(shapeData) {\n var segmentsLength = segmentsLengthPool.newElement();\n var closed = shapeData.c;\n var pathV = shapeData.v;\n var pathO = shapeData.o;\n var pathI = shapeData.i;\n var i;\n var len = shapeData._length;\n var lengths = segmentsLength.lengths;\n var totalLength = 0;\n\n for (i = 0; i < len - 1; i += 1) {\n lengths[i] = getBezierLength(pathV[i], pathV[i + 1], pathO[i], pathI[i + 1]);\n totalLength += lengths[i].addedLength;\n }\n\n if (closed && len) {\n lengths[i] = getBezierLength(pathV[i], pathV[0], pathO[i], pathI[0]);\n totalLength += lengths[i].addedLength;\n }\n\n segmentsLength.totalLength = totalLength;\n return segmentsLength;\n }\n\n function BezierData(length) {\n this.segmentLength = 0;\n this.points = new Array(length);\n }\n\n function PointData(partial, point) {\n this.partialLength = partial;\n this.point = point;\n }\n\n var buildBezierData = function () {\n var storedData = {};\n return function (pt1, pt2, pt3, pt4) {\n var bezierName = (pt1[0] + '_' + pt1[1] + '_' + pt2[0] + '_' + pt2[1] + '_' + pt3[0] + '_' + pt3[1] + '_' + pt4[0] + '_' + pt4[1]).replace(/\\./g, 'p');\n\n if (!storedData[bezierName]) {\n var curveSegments = getDefaultCurveSegments();\n var k;\n var i;\n var len;\n var ptCoord;\n var perc;\n var addedLength = 0;\n var ptDistance;\n var point;\n var lastPoint = null;\n\n if (pt1.length === 2 && (pt1[0] !== pt2[0] || pt1[1] !== pt2[1]) && pointOnLine2D(pt1[0], pt1[1], pt2[0], pt2[1], pt1[0] + pt3[0], pt1[1] + pt3[1]) && pointOnLine2D(pt1[0], pt1[1], pt2[0], pt2[1], pt2[0] + pt4[0], pt2[1] + pt4[1])) {\n curveSegments = 2;\n }\n\n var bezierData = new BezierData(curveSegments);\n len = pt3.length;\n\n for (k = 0; k < curveSegments; k += 1) {\n point = createSizedArray(len);\n perc = k / (curveSegments - 1);\n ptDistance = 0;\n\n for (i = 0; i < len; i += 1) {\n ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * (pt1[i] + pt3[i]) + 3 * (1 - perc) * bmPow(perc, 2) * (pt2[i] + pt4[i]) + bmPow(perc, 3) * pt2[i];\n point[i] = ptCoord;\n\n if (lastPoint !== null) {\n ptDistance += bmPow(point[i] - lastPoint[i], 2);\n }\n }\n\n ptDistance = bmSqrt(ptDistance);\n addedLength += ptDistance;\n bezierData.points[k] = new PointData(ptDistance, point);\n lastPoint = point;\n }\n\n bezierData.segmentLength = addedLength;\n storedData[bezierName] = bezierData;\n }\n\n return storedData[bezierName];\n };\n }();\n\n function getDistancePerc(perc, bezierData) {\n var percents = bezierData.percents;\n var lengths = bezierData.lengths;\n var len = percents.length;\n var initPos = bmFloor((len - 1) * perc);\n var lengthPos = perc * bezierData.addedLength;\n var lPerc = 0;\n\n if (initPos === len - 1 || initPos === 0 || lengthPos === lengths[initPos]) {\n return percents[initPos];\n }\n\n var dir = lengths[initPos] > lengthPos ? -1 : 1;\n var flag = true;\n\n while (flag) {\n if (lengths[initPos] <= lengthPos && lengths[initPos + 1] > lengthPos) {\n lPerc = (lengthPos - lengths[initPos]) / (lengths[initPos + 1] - lengths[initPos]);\n flag = false;\n } else {\n initPos += dir;\n }\n\n if (initPos < 0 || initPos >= len - 1) {\n // FIX for TypedArrays that don't store floating point values with enough accuracy\n if (initPos === len - 1) {\n return percents[initPos];\n }\n\n flag = false;\n }\n }\n\n return percents[initPos] + (percents[initPos + 1] - percents[initPos]) * lPerc;\n }\n\n function getPointInSegment(pt1, pt2, pt3, pt4, percent, bezierData) {\n var t1 = getDistancePerc(percent, bezierData);\n var u1 = 1 - t1;\n var ptX = math.round((u1 * u1 * u1 * pt1[0] + (t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1) * pt3[0] + (t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1) * pt4[0] + t1 * t1 * t1 * pt2[0]) * 1000) / 1000;\n var ptY = math.round((u1 * u1 * u1 * pt1[1] + (t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1) * pt3[1] + (t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1) * pt4[1] + t1 * t1 * t1 * pt2[1]) * 1000) / 1000;\n return [ptX, ptY];\n }\n\n var bezierSegmentPoints = createTypedArray('float32', 8);\n\n function getNewSegment(pt1, pt2, pt3, pt4, startPerc, endPerc, bezierData) {\n if (startPerc < 0) {\n startPerc = 0;\n } else if (startPerc > 1) {\n startPerc = 1;\n }\n\n var t0 = getDistancePerc(startPerc, bezierData);\n endPerc = endPerc > 1 ? 1 : endPerc;\n var t1 = getDistancePerc(endPerc, bezierData);\n var i;\n var len = pt1.length;\n var u0 = 1 - t0;\n var u1 = 1 - t1;\n var u0u0u0 = u0 * u0 * u0;\n var t0u0u0_3 = t0 * u0 * u0 * 3; // eslint-disable-line camelcase\n\n var t0t0u0_3 = t0 * t0 * u0 * 3; // eslint-disable-line camelcase\n\n var t0t0t0 = t0 * t0 * t0; //\n\n var u0u0u1 = u0 * u0 * u1;\n var t0u0u1_3 = t0 * u0 * u1 + u0 * t0 * u1 + u0 * u0 * t1; // eslint-disable-line camelcase\n\n var t0t0u1_3 = t0 * t0 * u1 + u0 * t0 * t1 + t0 * u0 * t1; // eslint-disable-line camelcase\n\n var t0t0t1 = t0 * t0 * t1; //\n\n var u0u1u1 = u0 * u1 * u1;\n var t0u1u1_3 = t0 * u1 * u1 + u0 * t1 * u1 + u0 * u1 * t1; // eslint-disable-line camelcase\n\n var t0t1u1_3 = t0 * t1 * u1 + u0 * t1 * t1 + t0 * u1 * t1; // eslint-disable-line camelcase\n\n var t0t1t1 = t0 * t1 * t1; //\n\n var u1u1u1 = u1 * u1 * u1;\n var t1u1u1_3 = t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1; // eslint-disable-line camelcase\n\n var t1t1u1_3 = t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1; // eslint-disable-line camelcase\n\n var t1t1t1 = t1 * t1 * t1;\n\n for (i = 0; i < len; i += 1) {\n bezierSegmentPoints[i * 4] = math.round((u0u0u0 * pt1[i] + t0u0u0_3 * pt3[i] + t0t0u0_3 * pt4[i] + t0t0t0 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase\n\n bezierSegmentPoints[i * 4 + 1] = math.round((u0u0u1 * pt1[i] + t0u0u1_3 * pt3[i] + t0t0u1_3 * pt4[i] + t0t0t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase\n\n bezierSegmentPoints[i * 4 + 2] = math.round((u0u1u1 * pt1[i] + t0u1u1_3 * pt3[i] + t0t1u1_3 * pt4[i] + t0t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase\n\n bezierSegmentPoints[i * 4 + 3] = math.round((u1u1u1 * pt1[i] + t1u1u1_3 * pt3[i] + t1t1u1_3 * pt4[i] + t1t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase\n }\n\n return bezierSegmentPoints;\n }\n\n return {\n getSegmentsLength: getSegmentsLength,\n getNewSegment: getNewSegment,\n getPointInSegment: getPointInSegment,\n buildBezierData: buildBezierData,\n pointOnLine2D: pointOnLine2D,\n pointOnLine3D: pointOnLine3D\n };\n }\n\n var bez = bezFunction();\n\n var initFrame = initialDefaultFrame;\n var mathAbs = Math.abs;\n\n function interpolateValue(frameNum, caching) {\n var offsetTime = this.offsetTime;\n var newValue;\n\n if (this.propType === 'multidimensional') {\n newValue = createTypedArray('float32', this.pv.length);\n }\n\n var iterationIndex = caching.lastIndex;\n var i = iterationIndex;\n var len = this.keyframes.length - 1;\n var flag = true;\n var keyData;\n var nextKeyData;\n var keyframeMetadata;\n\n while (flag) {\n keyData = this.keyframes[i];\n nextKeyData = this.keyframes[i + 1];\n\n if (i === len - 1 && frameNum >= nextKeyData.t - offsetTime) {\n if (keyData.h) {\n keyData = nextKeyData;\n }\n\n iterationIndex = 0;\n break;\n }\n\n if (nextKeyData.t - offsetTime > frameNum) {\n iterationIndex = i;\n break;\n }\n\n if (i < len - 1) {\n i += 1;\n } else {\n iterationIndex = 0;\n flag = false;\n }\n }\n\n keyframeMetadata = this.keyframesMetadata[i] || {};\n var k;\n var kLen;\n var perc;\n var jLen;\n var j;\n var fnc;\n var nextKeyTime = nextKeyData.t - offsetTime;\n var keyTime = keyData.t - offsetTime;\n var endValue;\n\n if (keyData.to) {\n if (!keyframeMetadata.bezierData) {\n keyframeMetadata.bezierData = bez.buildBezierData(keyData.s, nextKeyData.s || keyData.e, keyData.to, keyData.ti);\n }\n\n var bezierData = keyframeMetadata.bezierData;\n\n if (frameNum >= nextKeyTime || frameNum < keyTime) {\n var ind = frameNum >= nextKeyTime ? bezierData.points.length - 1 : 0;\n kLen = bezierData.points[ind].point.length;\n\n for (k = 0; k < kLen; k += 1) {\n newValue[k] = bezierData.points[ind].point[k];\n } // caching._lastKeyframeIndex = -1;\n\n } else {\n if (keyframeMetadata.__fnct) {\n fnc = keyframeMetadata.__fnct;\n } else {\n fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y, keyData.n).get;\n keyframeMetadata.__fnct = fnc;\n }\n\n perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));\n var distanceInLine = bezierData.segmentLength * perc;\n var segmentPerc;\n var addedLength = caching.lastFrame < frameNum && caching._lastKeyframeIndex === i ? caching._lastAddedLength : 0;\n j = caching.lastFrame < frameNum && caching._lastKeyframeIndex === i ? caching._lastPoint : 0;\n flag = true;\n jLen = bezierData.points.length;\n\n while (flag) {\n addedLength += bezierData.points[j].partialLength;\n\n if (distanceInLine === 0 || perc === 0 || j === bezierData.points.length - 1) {\n kLen = bezierData.points[j].point.length;\n\n for (k = 0; k < kLen; k += 1) {\n newValue[k] = bezierData.points[j].point[k];\n }\n\n break;\n } else if (distanceInLine >= addedLength && distanceInLine < addedLength + bezierData.points[j + 1].partialLength) {\n segmentPerc = (distanceInLine - addedLength) / bezierData.points[j + 1].partialLength;\n kLen = bezierData.points[j].point.length;\n\n for (k = 0; k < kLen; k += 1) {\n newValue[k] = bezierData.points[j].point[k] + (bezierData.points[j + 1].point[k] - bezierData.points[j].point[k]) * segmentPerc;\n }\n\n break;\n }\n\n if (j < jLen - 1) {\n j += 1;\n } else {\n flag = false;\n }\n }\n\n caching._lastPoint = j;\n caching._lastAddedLength = addedLength - bezierData.points[j].partialLength;\n caching._lastKeyframeIndex = i;\n }\n } else {\n var outX;\n var outY;\n var inX;\n var inY;\n var keyValue;\n len = keyData.s.length;\n endValue = nextKeyData.s || keyData.e;\n\n if (this.sh && keyData.h !== 1) {\n if (frameNum >= nextKeyTime) {\n newValue[0] = endValue[0];\n newValue[1] = endValue[1];\n newValue[2] = endValue[2];\n } else if (frameNum <= keyTime) {\n newValue[0] = keyData.s[0];\n newValue[1] = keyData.s[1];\n newValue[2] = keyData.s[2];\n } else {\n var quatStart = createQuaternion(keyData.s);\n var quatEnd = createQuaternion(endValue);\n var time = (frameNum - keyTime) / (nextKeyTime - keyTime);\n quaternionToEuler(newValue, slerp(quatStart, quatEnd, time));\n }\n } else {\n for (i = 0; i < len; i += 1) {\n if (keyData.h !== 1) {\n if (frameNum >= nextKeyTime) {\n perc = 1;\n } else if (frameNum < keyTime) {\n perc = 0;\n } else {\n if (keyData.o.x.constructor === Array) {\n if (!keyframeMetadata.__fnct) {\n keyframeMetadata.__fnct = [];\n }\n\n if (!keyframeMetadata.__fnct[i]) {\n outX = keyData.o.x[i] === undefined ? keyData.o.x[0] : keyData.o.x[i];\n outY = keyData.o.y[i] === undefined ? keyData.o.y[0] : keyData.o.y[i];\n inX = keyData.i.x[i] === undefined ? keyData.i.x[0] : keyData.i.x[i];\n inY = keyData.i.y[i] === undefined ? keyData.i.y[0] : keyData.i.y[i];\n fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;\n keyframeMetadata.__fnct[i] = fnc;\n } else {\n fnc = keyframeMetadata.__fnct[i];\n }\n } else if (!keyframeMetadata.__fnct) {\n outX = keyData.o.x;\n outY = keyData.o.y;\n inX = keyData.i.x;\n inY = keyData.i.y;\n fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;\n keyData.keyframeMetadata = fnc;\n } else {\n fnc = keyframeMetadata.__fnct;\n }\n\n perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));\n }\n }\n\n endValue = nextKeyData.s || keyData.e;\n keyValue = keyData.h === 1 ? keyData.s[i] : keyData.s[i] + (endValue[i] - keyData.s[i]) * perc;\n\n if (this.propType === 'multidimensional') {\n newValue[i] = keyValue;\n } else {\n newValue = keyValue;\n }\n }\n }\n }\n\n caching.lastIndex = iterationIndex;\n return newValue;\n } // based on @Toji's https://github.com/toji/gl-matrix/\n\n\n function slerp(a, b, t) {\n var out = [];\n var ax = a[0];\n var ay = a[1];\n var az = a[2];\n var aw = a[3];\n var bx = b[0];\n var by = b[1];\n var bz = b[2];\n var bw = b[3];\n var omega;\n var cosom;\n var sinom;\n var scale0;\n var scale1;\n cosom = ax * bx + ay * by + az * bz + aw * bw;\n\n if (cosom < 0.0) {\n cosom = -cosom;\n bx = -bx;\n by = -by;\n bz = -bz;\n bw = -bw;\n }\n\n if (1.0 - cosom > 0.000001) {\n omega = Math.acos(cosom);\n sinom = Math.sin(omega);\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\n scale1 = Math.sin(t * omega) / sinom;\n } else {\n scale0 = 1.0 - t;\n scale1 = t;\n }\n\n out[0] = scale0 * ax + scale1 * bx;\n out[1] = scale0 * ay + scale1 * by;\n out[2] = scale0 * az + scale1 * bz;\n out[3] = scale0 * aw + scale1 * bw;\n return out;\n }\n\n function quaternionToEuler(out, quat) {\n var qx = quat[0];\n var qy = quat[1];\n var qz = quat[2];\n var qw = quat[3];\n var heading = Math.atan2(2 * qy * qw - 2 * qx * qz, 1 - 2 * qy * qy - 2 * qz * qz);\n var attitude = Math.asin(2 * qx * qy + 2 * qz * qw);\n var bank = Math.atan2(2 * qx * qw - 2 * qy * qz, 1 - 2 * qx * qx - 2 * qz * qz);\n out[0] = heading / degToRads;\n out[1] = attitude / degToRads;\n out[2] = bank / degToRads;\n }\n\n function createQuaternion(values) {\n var heading = values[0] * degToRads;\n var attitude = values[1] * degToRads;\n var bank = values[2] * degToRads;\n var c1 = Math.cos(heading / 2);\n var c2 = Math.cos(attitude / 2);\n var c3 = Math.cos(bank / 2);\n var s1 = Math.sin(heading / 2);\n var s2 = Math.sin(attitude / 2);\n var s3 = Math.sin(bank / 2);\n var w = c1 * c2 * c3 - s1 * s2 * s3;\n var x = s1 * s2 * c3 + c1 * c2 * s3;\n var y = s1 * c2 * c3 + c1 * s2 * s3;\n var z = c1 * s2 * c3 - s1 * c2 * s3;\n return [x, y, z, w];\n }\n\n function getValueAtCurrentTime() {\n var frameNum = this.comp.renderedFrame - this.offsetTime;\n var initTime = this.keyframes[0].t - this.offsetTime;\n var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;\n\n if (!(frameNum === this._caching.lastFrame || this._caching.lastFrame !== initFrame && (this._caching.lastFrame >= endTime && frameNum >= endTime || this._caching.lastFrame < initTime && frameNum < initTime))) {\n if (this._caching.lastFrame >= frameNum) {\n this._caching._lastKeyframeIndex = -1;\n this._caching.lastIndex = 0;\n }\n\n var renderResult = this.interpolateValue(frameNum, this._caching);\n this.pv = renderResult;\n }\n\n this._caching.lastFrame = frameNum;\n return this.pv;\n }\n\n function setVValue(val) {\n var multipliedValue;\n\n if (this.propType === 'unidimensional') {\n multipliedValue = val * this.mult;\n\n if (mathAbs(this.v - multipliedValue) > 0.00001) {\n this.v = multipliedValue;\n this._mdf = true;\n }\n } else {\n var i = 0;\n var len = this.v.length;\n\n while (i < len) {\n multipliedValue = val[i] * this.mult;\n\n if (mathAbs(this.v[i] - multipliedValue) > 0.00001) {\n this.v[i] = multipliedValue;\n this._mdf = true;\n }\n\n i += 1;\n }\n }\n }\n\n function processEffectsSequence() {\n if (this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) {\n return;\n }\n\n if (this.lock) {\n this.setVValue(this.pv);\n return;\n }\n\n this.lock = true;\n this._mdf = this._isFirstFrame;\n var i;\n var len = this.effectsSequence.length;\n var finalValue = this.kf ? this.pv : this.data.k;\n\n for (i = 0; i < len; i += 1) {\n finalValue = this.effectsSequence[i](finalValue);\n }\n\n this.setVValue(finalValue);\n this._isFirstFrame = false;\n this.lock = false;\n this.frameId = this.elem.globalData.frameId;\n }\n\n function addEffect(effectFunction) {\n this.effectsSequence.push(effectFunction);\n this.container.addDynamicProperty(this);\n }\n\n function ValueProperty(elem, data, mult, container) {\n this.propType = 'unidimensional';\n this.mult = mult || 1;\n this.data = data;\n this.v = mult ? data.k * mult : data.k;\n this.pv = data.k;\n this._mdf = false;\n this.elem = elem;\n this.container = container;\n this.comp = elem.comp;\n this.k = false;\n this.kf = false;\n this.vel = 0;\n this.effectsSequence = [];\n this._isFirstFrame = true;\n this.getValue = processEffectsSequence;\n this.setVValue = setVValue;\n this.addEffect = addEffect;\n }\n\n function MultiDimensionalProperty(elem, data, mult, container) {\n this.propType = 'multidimensional';\n this.mult = mult || 1;\n this.data = data;\n this._mdf = false;\n this.elem = elem;\n this.container = container;\n this.comp = elem.comp;\n this.k = false;\n this.kf = false;\n this.frameId = -1;\n var i;\n var len = data.k.length;\n this.v = createTypedArray('float32', len);\n this.pv = createTypedArray('float32', len);\n this.vel = createTypedArray('float32', len);\n\n for (i = 0; i < len; i += 1) {\n this.v[i] = data.k[i] * this.mult;\n this.pv[i] = data.k[i];\n }\n\n this._isFirstFrame = true;\n this.effectsSequence = [];\n this.getValue = processEffectsSequence;\n this.setVValue = setVValue;\n this.addEffect = addEffect;\n }\n\n function KeyframedValueProperty(elem, data, mult, container) {\n this.propType = 'unidimensional';\n this.keyframes = data.k;\n this.keyframesMetadata = [];\n this.offsetTime = elem.data.st;\n this.frameId = -1;\n this._caching = {\n lastFrame: initFrame,\n lastIndex: 0,\n value: 0,\n _lastKeyframeIndex: -1\n };\n this.k = true;\n this.kf = true;\n this.data = data;\n this.mult = mult || 1;\n this.elem = elem;\n this.container = container;\n this.comp = elem.comp;\n this.v = initFrame;\n this.pv = initFrame;\n this._isFirstFrame = true;\n this.getValue = processEffectsSequence;\n this.setVValue = setVValue;\n this.interpolateValue = interpolateValue;\n this.effectsSequence = [getValueAtCurrentTime.bind(this)];\n this.addEffect = addEffect;\n }\n\n function KeyframedMultidimensionalProperty(elem, data, mult, container) {\n this.propType = 'multidimensional';\n var i;\n var len = data.k.length;\n var s;\n var e;\n var to;\n var ti;\n\n for (i = 0; i < len - 1; i += 1) {\n if (data.k[i].to && data.k[i].s && data.k[i + 1] && data.k[i + 1].s) {\n s = data.k[i].s;\n e = data.k[i + 1].s;\n to = data.k[i].to;\n ti = data.k[i].ti;\n\n if (s.length === 2 && !(s[0] === e[0] && s[1] === e[1]) && bez.pointOnLine2D(s[0], s[1], e[0], e[1], s[0] + to[0], s[1] + to[1]) && bez.pointOnLine2D(s[0], s[1], e[0], e[1], e[0] + ti[0], e[1] + ti[1]) || s.length === 3 && !(s[0] === e[0] && s[1] === e[1] && s[2] === e[2]) && bez.pointOnLine3D(s[0], s[1], s[2], e[0], e[1], e[2], s[0] + to[0], s[1] + to[1], s[2] + to[2]) && bez.pointOnLine3D(s[0], s[1], s[2], e[0], e[1], e[2], e[0] + ti[0], e[1] + ti[1], e[2] + ti[2])) {\n data.k[i].to = null;\n data.k[i].ti = null;\n }\n\n if (s[0] === e[0] && s[1] === e[1] && to[0] === 0 && to[1] === 0 && ti[0] === 0 && ti[1] === 0) {\n if (s.length === 2 || s[2] === e[2] && to[2] === 0 && ti[2] === 0) {\n data.k[i].to = null;\n data.k[i].ti = null;\n }\n }\n }\n }\n\n this.effectsSequence = [getValueAtCurrentTime.bind(this)];\n this.data = data;\n this.keyframes = data.k;\n this.keyframesMetadata = [];\n this.offsetTime = elem.data.st;\n this.k = true;\n this.kf = true;\n this._isFirstFrame = true;\n this.mult = mult || 1;\n this.elem = elem;\n this.container = container;\n this.comp = elem.comp;\n this.getValue = processEffectsSequence;\n this.setVValue = setVValue;\n this.interpolateValue = interpolateValue;\n this.frameId = -1;\n var arrLen = data.k[0].s.length;\n this.v = createTypedArray('float32', arrLen);\n this.pv = createTypedArray('float32', arrLen);\n\n for (i = 0; i < arrLen; i += 1) {\n this.v[i] = initFrame;\n this.pv[i] = initFrame;\n }\n\n this._caching = {\n lastFrame: initFrame,\n lastIndex: 0,\n value: createTypedArray('float32', arrLen)\n };\n this.addEffect = addEffect;\n }\n\n var PropertyFactory = function () {\n function getProp(elem, data, type, mult, container) {\n if (data.sid) {\n data = elem.globalData.slotManager.getProp(data);\n }\n\n var p;\n\n if (!data.k.length) {\n p = new ValueProperty(elem, data, mult, container);\n } else if (typeof data.k[0] === 'number') {\n p = new MultiDimensionalProperty(elem, data, mult, container);\n } else {\n switch (type) {\n case 0:\n p = new KeyframedValueProperty(elem, data, mult, container);\n break;\n\n case 1:\n p = new KeyframedMultidimensionalProperty(elem, data, mult, container);\n break;\n\n default:\n break;\n }\n }\n\n if (p.effectsSequence.length) {\n container.addDynamicProperty(p);\n }\n\n return p;\n }\n\n var ob = {\n getProp: getProp\n };\n return ob;\n }();\n\n function DynamicPropertyContainer() {}\n\n DynamicPropertyContainer.prototype = {\n addDynamicProperty: function addDynamicProperty(prop) {\n if (this.dynamicProperties.indexOf(prop) === -1) {\n this.dynamicProperties.push(prop);\n this.container.addDynamicProperty(this);\n this._isAnimated = true;\n }\n },\n iterateDynamicProperties: function iterateDynamicProperties() {\n this._mdf = false;\n var i;\n var len = this.dynamicProperties.length;\n\n for (i = 0; i < len; i += 1) {\n this.dynamicProperties[i].getValue();\n\n if (this.dynamicProperties[i]._mdf) {\n this._mdf = true;\n }\n }\n },\n initDynamicPropertyContainer: function initDynamicPropertyContainer(container) {\n this.container = container;\n this.dynamicProperties = [];\n this._mdf = false;\n this._isAnimated = false;\n }\n };\n\n var pointPool = function () {\n function create() {\n return createTypedArray('float32', 2);\n }\n\n return poolFactory(8, create);\n }();\n\n function ShapePath() {\n this.c = false;\n this._length = 0;\n this._maxLength = 8;\n this.v = createSizedArray(this._maxLength);\n this.o = createSizedArray(this._maxLength);\n this.i = createSizedArray(this._maxLength);\n }\n\n ShapePath.prototype.setPathData = function (closed, len) {\n this.c = closed;\n this.setLength(len);\n var i = 0;\n\n while (i < len) {\n this.v[i] = pointPool.newElement();\n this.o[i] = pointPool.newElement();\n this.i[i] = pointPool.newElement();\n i += 1;\n }\n };\n\n ShapePath.prototype.setLength = function (len) {\n while (this._maxLength < len) {\n this.doubleArrayLength();\n }\n\n this._length = len;\n };\n\n ShapePath.prototype.doubleArrayLength = function () {\n this.v = this.v.concat(createSizedArray(this._maxLength));\n this.i = this.i.concat(createSizedArray(this._maxLength));\n this.o = this.o.concat(createSizedArray(this._maxLength));\n this._maxLength *= 2;\n };\n\n ShapePath.prototype.setXYAt = function (x, y, type, pos, replace) {\n var arr;\n this._length = Math.max(this._length, pos + 1);\n\n if (this._length >= this._maxLength) {\n this.doubleArrayLength();\n }\n\n switch (type) {\n case 'v':\n arr = this.v;\n break;\n\n case 'i':\n arr = this.i;\n break;\n\n case 'o':\n arr = this.o;\n break;\n\n default:\n arr = [];\n break;\n }\n\n if (!arr[pos] || arr[pos] && !replace) {\n arr[pos] = pointPool.newElement();\n }\n\n arr[pos][0] = x;\n arr[pos][1] = y;\n };\n\n ShapePath.prototype.setTripleAt = function (vX, vY, oX, oY, iX, iY, pos, replace) {\n this.setXYAt(vX, vY, 'v', pos, replace);\n this.setXYAt(oX, oY, 'o', pos, replace);\n this.setXYAt(iX, iY, 'i', pos, replace);\n };\n\n ShapePath.prototype.reverse = function () {\n var newPath = new ShapePath();\n newPath.setPathData(this.c, this._length);\n var vertices = this.v;\n var outPoints = this.o;\n var inPoints = this.i;\n var init = 0;\n\n if (this.c) {\n newPath.setTripleAt(vertices[0][0], vertices[0][1], inPoints[0][0], inPoints[0][1], outPoints[0][0], outPoints[0][1], 0, false);\n init = 1;\n }\n\n var cnt = this._length - 1;\n var len = this._length;\n var i;\n\n for (i = init; i < len; i += 1) {\n newPath.setTripleAt(vertices[cnt][0], vertices[cnt][1], inPoints[cnt][0], inPoints[cnt][1], outPoints[cnt][0], outPoints[cnt][1], i, false);\n cnt -= 1;\n }\n\n return newPath;\n };\n\n ShapePath.prototype.length = function () {\n return this._length;\n };\n\n var shapePool = function () {\n function create() {\n return new ShapePath();\n }\n\n function release(shapePath) {\n var len = shapePath._length;\n var i;\n\n for (i = 0; i < len; i += 1) {\n pointPool.release(shapePath.v[i]);\n pointPool.release(shapePath.i[i]);\n pointPool.release(shapePath.o[i]);\n shapePath.v[i] = null;\n shapePath.i[i] = null;\n shapePath.o[i] = null;\n }\n\n shapePath._length = 0;\n shapePath.c = false;\n }\n\n function clone(shape) {\n var cloned = factory.newElement();\n var i;\n var len = shape._length === undefined ? shape.v.length : shape._length;\n cloned.setLength(len);\n cloned.c = shape.c;\n\n for (i = 0; i < len; i += 1) {\n cloned.setTripleAt(shape.v[i][0], shape.v[i][1], shape.o[i][0], shape.o[i][1], shape.i[i][0], shape.i[i][1], i);\n }\n\n return cloned;\n }\n\n var factory = poolFactory(4, create, release);\n factory.clone = clone;\n return factory;\n }();\n\n function ShapeCollection() {\n this._length = 0;\n this._maxLength = 4;\n this.shapes = createSizedArray(this._maxLength);\n }\n\n ShapeCollection.prototype.addShape = function (shapeData) {\n if (this._length === this._maxLength) {\n this.shapes = this.shapes.concat(createSizedArray(this._maxLength));\n this._maxLength *= 2;\n }\n\n this.shapes[this._length] = shapeData;\n this._length += 1;\n };\n\n ShapeCollection.prototype.releaseShapes = function () {\n var i;\n\n for (i = 0; i < this._length; i += 1) {\n shapePool.release(this.shapes[i]);\n }\n\n this._length = 0;\n };\n\n var shapeCollectionPool = function () {\n var ob = {\n newShapeCollection: newShapeCollection,\n release: release\n };\n var _length = 0;\n var _maxLength = 4;\n var pool = createSizedArray(_maxLength);\n\n function newShapeCollection() {\n var shapeCollection;\n\n if (_length) {\n _length -= 1;\n shapeCollection = pool[_length];\n } else {\n shapeCollection = new ShapeCollection();\n }\n\n return shapeCollection;\n }\n\n function release(shapeCollection) {\n var i;\n var len = shapeCollection._length;\n\n for (i = 0; i < len; i += 1) {\n shapePool.release(shapeCollection.shapes[i]);\n }\n\n shapeCollection._length = 0;\n\n if (_length === _maxLength) {\n pool = pooling[\"double\"](pool);\n _maxLength *= 2;\n }\n\n pool[_length] = shapeCollection;\n _length += 1;\n }\n\n return ob;\n }();\n\n var ShapePropertyFactory = function () {\n var initFrame = -999999;\n\n function interpolateShape(frameNum, previousValue, caching) {\n var iterationIndex = caching.lastIndex;\n var keyPropS;\n var keyPropE;\n var isHold;\n var j;\n var k;\n var jLen;\n var kLen;\n var perc;\n var vertexValue;\n var kf = this.keyframes;\n\n if (frameNum < kf[0].t - this.offsetTime) {\n keyPropS = kf[0].s[0];\n isHold = true;\n iterationIndex = 0;\n } else if (frameNum >= kf[kf.length - 1].t - this.offsetTime) {\n keyPropS = kf[kf.length - 1].s ? kf[kf.length - 1].s[0] : kf[kf.length - 2].e[0];\n /* if(kf[kf.length - 1].s){\r\n keyPropS = kf[kf.length - 1].s[0];\r\n }else{\r\n keyPropS = kf[kf.length - 2].e[0];\r\n } */\n\n isHold = true;\n } else {\n var i = iterationIndex;\n var len = kf.length - 1;\n var flag = true;\n var keyData;\n var nextKeyData;\n var keyframeMetadata;\n\n while (flag) {\n keyData = kf[i];\n nextKeyData = kf[i + 1];\n\n if (nextKeyData.t - this.offsetTime > frameNum) {\n break;\n }\n\n if (i < len - 1) {\n i += 1;\n } else {\n flag = false;\n }\n }\n\n keyframeMetadata = this.keyframesMetadata[i] || {};\n isHold = keyData.h === 1;\n iterationIndex = i;\n\n if (!isHold) {\n if (frameNum >= nextKeyData.t - this.offsetTime) {\n perc = 1;\n } else if (frameNum < keyData.t - this.offsetTime) {\n perc = 0;\n } else {\n var fnc;\n\n if (keyframeMetadata.__fnct) {\n fnc = keyframeMetadata.__fnct;\n } else {\n fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y).get;\n keyframeMetadata.__fnct = fnc;\n }\n\n perc = fnc((frameNum - (keyData.t - this.offsetTime)) / (nextKeyData.t - this.offsetTime - (keyData.t - this.offsetTime)));\n }\n\n keyPropE = nextKeyData.s ? nextKeyData.s[0] : keyData.e[0];\n }\n\n keyPropS = keyData.s[0];\n }\n\n jLen = previousValue._length;\n kLen = keyPropS.i[0].length;\n caching.lastIndex = iterationIndex;\n\n for (j = 0; j < jLen; j += 1) {\n for (k = 0; k < kLen; k += 1) {\n vertexValue = isHold ? keyPropS.i[j][k] : keyPropS.i[j][k] + (keyPropE.i[j][k] - keyPropS.i[j][k]) * perc;\n previousValue.i[j][k] = vertexValue;\n vertexValue = isHold ? keyPropS.o[j][k] : keyPropS.o[j][k] + (keyPropE.o[j][k] - keyPropS.o[j][k]) * perc;\n previousValue.o[j][k] = vertexValue;\n vertexValue = isHold ? keyPropS.v[j][k] : keyPropS.v[j][k] + (keyPropE.v[j][k] - keyPropS.v[j][k]) * perc;\n previousValue.v[j][k] = vertexValue;\n }\n }\n }\n\n function interpolateShapeCurrentTime() {\n var frameNum = this.comp.renderedFrame - this.offsetTime;\n var initTime = this.keyframes[0].t - this.offsetTime;\n var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;\n var lastFrame = this._caching.lastFrame;\n\n if (!(lastFrame !== initFrame && (lastFrame < initTime && frameNum < initTime || lastFrame > endTime && frameNum > endTime))) {\n /// /\n this._caching.lastIndex = lastFrame < frameNum ? this._caching.lastIndex : 0;\n this.interpolateShape(frameNum, this.pv, this._caching); /// /\n }\n\n this._caching.lastFrame = frameNum;\n return this.pv;\n }\n\n function resetShape() {\n this.paths = this.localShapeCollection;\n }\n\n function shapesEqual(shape1, shape2) {\n if (shape1._length !== shape2._length || shape1.c !== shape2.c) {\n return false;\n }\n\n var i;\n var len = shape1._length;\n\n for (i = 0; i < len; i += 1) {\n if (shape1.v[i][0] !== shape2.v[i][0] || shape1.v[i][1] !== shape2.v[i][1] || shape1.o[i][0] !== shape2.o[i][0] || shape1.o[i][1] !== shape2.o[i][1] || shape1.i[i][0] !== shape2.i[i][0] || shape1.i[i][1] !== shape2.i[i][1]) {\n return false;\n }\n }\n\n return true;\n }\n\n function setVValue(newPath) {\n if (!shapesEqual(this.v, newPath)) {\n this.v = shapePool.clone(newPath);\n this.localShapeCollection.releaseShapes();\n this.localShapeCollection.addShape(this.v);\n this._mdf = true;\n this.paths = this.localShapeCollection;\n }\n }\n\n function processEffectsSequence() {\n if (this.elem.globalData.frameId === this.frameId) {\n return;\n }\n\n if (!this.effectsSequence.length) {\n this._mdf = false;\n return;\n }\n\n if (this.lock) {\n this.setVValue(this.pv);\n return;\n }\n\n this.lock = true;\n this._mdf = false;\n var finalValue;\n\n if (this.kf) {\n finalValue = this.pv;\n } else if (this.data.ks) {\n finalValue = this.data.ks.k;\n } else {\n finalValue = this.data.pt.k;\n }\n\n var i;\n var len = this.effectsSequence.length;\n\n for (i = 0; i < len; i += 1) {\n finalValue = this.effectsSequence[i](finalValue);\n }\n\n this.setVValue(finalValue);\n this.lock = false;\n this.frameId = this.elem.globalData.frameId;\n }\n\n function ShapeProperty(elem, data, type) {\n this.propType = 'shape';\n this.comp = elem.comp;\n this.container = elem;\n this.elem = elem;\n this.data = data;\n this.k = false;\n this.kf = false;\n this._mdf = false;\n var pathData = type === 3 ? data.pt.k : data.ks.k;\n this.v = shapePool.clone(pathData);\n this.pv = shapePool.clone(this.v);\n this.localShapeCollection = shapeCollectionPool.newShapeCollection();\n this.paths = this.localShapeCollection;\n this.paths.addShape(this.v);\n this.reset = resetShape;\n this.effectsSequence = [];\n }\n\n function addEffect(effectFunction) {\n this.effectsSequence.push(effectFunction);\n this.container.addDynamicProperty(this);\n }\n\n ShapeProperty.prototype.interpolateShape = interpolateShape;\n ShapeProperty.prototype.getValue = processEffectsSequence;\n ShapeProperty.prototype.setVValue = setVValue;\n ShapeProperty.prototype.addEffect = addEffect;\n\n function KeyframedShapeProperty(elem, data, type) {\n this.propType = 'shape';\n this.comp = elem.comp;\n this.elem = elem;\n this.container = elem;\n this.offsetTime = elem.data.st;\n this.keyframes = type === 3 ? data.pt.k : data.ks.k;\n this.keyframesMetadata = [];\n this.k = true;\n this.kf = true;\n var len = this.keyframes[0].s[0].i.length;\n this.v = shapePool.newElement();\n this.v.setPathData(this.keyframes[0].s[0].c, len);\n this.pv = shapePool.clone(this.v);\n this.localShapeCollection = shapeCollectionPool.newShapeCollection();\n this.paths = this.localShapeCollection;\n this.paths.addShape(this.v);\n this.lastFrame = initFrame;\n this.reset = resetShape;\n this._caching = {\n lastFrame: initFrame,\n lastIndex: 0\n };\n this.effectsSequence = [interpolateShapeCurrentTime.bind(this)];\n }\n\n KeyframedShapeProperty.prototype.getValue = processEffectsSequence;\n KeyframedShapeProperty.prototype.interpolateShape = interpolateShape;\n KeyframedShapeProperty.prototype.setVValue = setVValue;\n KeyframedShapeProperty.prototype.addEffect = addEffect;\n\n var EllShapeProperty = function () {\n var cPoint = roundCorner;\n\n function EllShapePropertyFactory(elem, data) {\n this.v = shapePool.newElement();\n this.v.setPathData(true, 4);\n this.localShapeCollection = shapeCollectionPool.newShapeCollection();\n this.paths = this.localShapeCollection;\n this.localShapeCollection.addShape(this.v);\n this.d = data.d;\n this.elem = elem;\n this.comp = elem.comp;\n this.frameId = -1;\n this.initDynamicPropertyContainer(elem);\n this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);\n this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);\n\n if (this.dynamicProperties.length) {\n this.k = true;\n } else {\n this.k = false;\n this.convertEllToPath();\n }\n }\n\n EllShapePropertyFactory.prototype = {\n reset: resetShape,\n getValue: function getValue() {\n if (this.elem.globalData.frameId === this.frameId) {\n return;\n }\n\n this.frameId = this.elem.globalData.frameId;\n this.iterateDynamicProperties();\n\n if (this._mdf) {\n this.convertEllToPath();\n }\n },\n convertEllToPath: function convertEllToPath() {\n var p0 = this.p.v[0];\n var p1 = this.p.v[1];\n var s0 = this.s.v[0] / 2;\n var s1 = this.s.v[1] / 2;\n\n var _cw = this.d !== 3;\n\n var _v = this.v;\n _v.v[0][0] = p0;\n _v.v[0][1] = p1 - s1;\n _v.v[1][0] = _cw ? p0 + s0 : p0 - s0;\n _v.v[1][1] = p1;\n _v.v[2][0] = p0;\n _v.v[2][1] = p1 + s1;\n _v.v[3][0] = _cw ? p0 - s0 : p0 + s0;\n _v.v[3][1] = p1;\n _v.i[0][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;\n _v.i[0][1] = p1 - s1;\n _v.i[1][0] = _cw ? p0 + s0 : p0 - s0;\n _v.i[1][1] = p1 - s1 * cPoint;\n _v.i[2][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;\n _v.i[2][1] = p1 + s1;\n _v.i[3][0] = _cw ? p0 - s0 : p0 + s0;\n _v.i[3][1] = p1 + s1 * cPoint;\n _v.o[0][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;\n _v.o[0][1] = p1 - s1;\n _v.o[1][0] = _cw ? p0 + s0 : p0 - s0;\n _v.o[1][1] = p1 + s1 * cPoint;\n _v.o[2][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;\n _v.o[2][1] = p1 + s1;\n _v.o[3][0] = _cw ? p0 - s0 : p0 + s0;\n _v.o[3][1] = p1 - s1 * cPoint;\n }\n };\n extendPrototype([DynamicPropertyContainer], EllShapePropertyFactory);\n return EllShapePropertyFactory;\n }();\n\n var StarShapeProperty = function () {\n function StarShapePropertyFactory(elem, data) {\n this.v = shapePool.newElement();\n this.v.setPathData(true, 0);\n this.elem = elem;\n this.comp = elem.comp;\n this.data = data;\n this.frameId = -1;\n this.d = data.d;\n this.initDynamicPropertyContainer(elem);\n\n if (data.sy === 1) {\n this.ir = PropertyFactory.getProp(elem, data.ir, 0, 0, this);\n this.is = PropertyFactory.getProp(elem, data.is, 0, 0.01, this);\n this.convertToPath = this.convertStarToPath;\n } else {\n this.convertToPath = this.convertPolygonToPath;\n }\n\n this.pt = PropertyFactory.getProp(elem, data.pt, 0, 0, this);\n this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);\n this.r = PropertyFactory.getProp(elem, data.r, 0, degToRads, this);\n this.or = PropertyFactory.getProp(elem, data.or, 0, 0, this);\n this.os = PropertyFactory.getProp(elem, data.os, 0, 0.01, this);\n this.localShapeCollection = shapeCollectionPool.newShapeCollection();\n this.localShapeCollection.addShape(this.v);\n this.paths = this.localShapeCollection;\n\n if (this.dynamicProperties.length) {\n this.k = true;\n } else {\n this.k = false;\n this.convertToPath();\n }\n }\n\n StarShapePropertyFactory.prototype = {\n reset: resetShape,\n getValue: function getValue() {\n if (this.elem.globalData.frameId === this.frameId) {\n return;\n }\n\n this.frameId = this.elem.globalData.frameId;\n this.iterateDynamicProperties();\n\n if (this._mdf) {\n this.convertToPath();\n }\n },\n convertStarToPath: function convertStarToPath() {\n var numPts = Math.floor(this.pt.v) * 2;\n var angle = Math.PI * 2 / numPts;\n /* this.v.v.length = numPts;\r\n this.v.i.length = numPts;\r\n this.v.o.length = numPts; */\n\n var longFlag = true;\n var longRad = this.or.v;\n var shortRad = this.ir.v;\n var longRound = this.os.v;\n var shortRound = this.is.v;\n var longPerimSegment = 2 * Math.PI * longRad / (numPts * 2);\n var shortPerimSegment = 2 * Math.PI * shortRad / (numPts * 2);\n var i;\n var rad;\n var roundness;\n var perimSegment;\n var currentAng = -Math.PI / 2;\n currentAng += this.r.v;\n var dir = this.data.d === 3 ? -1 : 1;\n this.v._length = 0;\n\n for (i = 0; i < numPts; i += 1) {\n rad = longFlag ? longRad : shortRad;\n roundness = longFlag ? longRound : shortRound;\n perimSegment = longFlag ? longPerimSegment : shortPerimSegment;\n var x = rad * Math.cos(currentAng);\n var y = rad * Math.sin(currentAng);\n var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);\n var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);\n x += +this.p.v[0];\n y += +this.p.v[1];\n this.v.setTripleAt(x, y, x - ox * perimSegment * roundness * dir, y - oy * perimSegment * roundness * dir, x + ox * perimSegment * roundness * dir, y + oy * perimSegment * roundness * dir, i, true);\n /* this.v.v[i] = [x,y];\r\n this.v.i[i] = [x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir];\r\n this.v.o[i] = [x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir];\r\n this.v._length = numPts; */\n\n longFlag = !longFlag;\n currentAng += angle * dir;\n }\n },\n convertPolygonToPath: function convertPolygonToPath() {\n var numPts = Math.floor(this.pt.v);\n var angle = Math.PI * 2 / numPts;\n var rad = this.or.v;\n var roundness = this.os.v;\n var perimSegment = 2 * Math.PI * rad / (numPts * 4);\n var i;\n var currentAng = -Math.PI * 0.5;\n var dir = this.data.d === 3 ? -1 : 1;\n currentAng += this.r.v;\n this.v._length = 0;\n\n for (i = 0; i < numPts; i += 1) {\n var x = rad * Math.cos(currentAng);\n var y = rad * Math.sin(currentAng);\n var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);\n var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);\n x += +this.p.v[0];\n y += +this.p.v[1];\n this.v.setTripleAt(x, y, x - ox * perimSegment * roundness * dir, y - oy * perimSegment * roundness * dir, x + ox * perimSegment * roundness * dir, y + oy * perimSegment * roundness * dir, i, true);\n currentAng += angle * dir;\n }\n\n this.paths.length = 0;\n this.paths[0] = this.v;\n }\n };\n extendPrototype([DynamicPropertyContainer], StarShapePropertyFactory);\n return StarShapePropertyFactory;\n }();\n\n var RectShapeProperty = function () {\n function RectShapePropertyFactory(elem, data) {\n this.v = shapePool.newElement();\n this.v.c = true;\n this.localShapeCollection = shapeCollectionPool.newShapeCollection();\n this.localShapeCollection.addShape(this.v);\n this.paths = this.localShapeCollection;\n this.elem = elem;\n this.comp = elem.comp;\n this.frameId = -1;\n this.d = data.d;\n this.initDynamicPropertyContainer(elem);\n this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);\n this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);\n this.r = PropertyFactory.getProp(elem, data.r, 0, 0, this);\n\n if (this.dynamicProperties.length) {\n this.k = true;\n } else {\n this.k = false;\n this.convertRectToPath();\n }\n }\n\n RectShapePropertyFactory.prototype = {\n convertRectToPath: function convertRectToPath() {\n var p0 = this.p.v[0];\n var p1 = this.p.v[1];\n var v0 = this.s.v[0] / 2;\n var v1 = this.s.v[1] / 2;\n var round = bmMin(v0, v1, this.r.v);\n var cPoint = round * (1 - roundCorner);\n this.v._length = 0;\n\n if (this.d === 2 || this.d === 1) {\n this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, 0, true);\n this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, p0 + v0, p1 + v1 - round, 1, true);\n\n if (round !== 0) {\n this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, 2, true);\n this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0 + round, p1 + v1, 3, true);\n this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, 4, true);\n this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1 + round, 5, true);\n this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, 6, true);\n this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, p0 + v0 - round, p1 - v1, 7, true);\n } else {\n this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0, p1 + v1, 2);\n this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1, 3);\n }\n } else {\n this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, p0 + v0, p1 - v1 + round, 0, true);\n\n if (round !== 0) {\n this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, 1, true);\n this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0 + round, p1 - v1, 2, true);\n this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, 3, true);\n this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1 - round, 4, true);\n this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, 5, true);\n this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0 - round, p1 + v1, 6, true);\n this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, 7, true);\n } else {\n this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0, p1 - v1, 1, true);\n this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1, 2, true);\n this.v.setTripleAt(p0 + v0, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0, p1 + v1, 3, true);\n }\n }\n },\n getValue: function getValue() {\n if (this.elem.globalData.frameId === this.frameId) {\n return;\n }\n\n this.frameId = this.elem.globalData.frameId;\n this.iterateDynamicProperties();\n\n if (this._mdf) {\n this.convertRectToPath();\n }\n },\n reset: resetShape\n };\n extendPrototype([DynamicPropertyContainer], RectShapePropertyFactory);\n return RectShapePropertyFactory;\n }();\n\n function getShapeProp(elem, data, type) {\n var prop;\n\n if (type === 3 || type === 4) {\n var dataProp = type === 3 ? data.pt : data.ks;\n var keys = dataProp.k;\n\n if (keys.length) {\n prop = new KeyframedShapeProperty(elem, data, type);\n } else {\n prop = new ShapeProperty(elem, data, type);\n }\n } else if (type === 5) {\n prop = new RectShapeProperty(elem, data);\n } else if (type === 6) {\n prop = new EllShapeProperty(elem, data);\n } else if (type === 7) {\n prop = new StarShapeProperty(elem, data);\n }\n\n if (prop.k) {\n elem.addDynamicProperty(prop);\n }\n\n return prop;\n }\n\n function getConstructorFunction() {\n return ShapeProperty;\n }\n\n function getKeyframedConstructorFunction() {\n return KeyframedShapeProperty;\n }\n\n var ob = {};\n ob.getShapeProp = getShapeProp;\n ob.getConstructorFunction = getConstructorFunction;\n ob.getKeyframedConstructorFunction = getKeyframedConstructorFunction;\n return ob;\n }();\n\n /*!\r\n Transformation Matrix v2.0\r\n (c) Epistemex 2014-2015\r\n www.epistemex.com\r\n By Ken Fyrstenberg\r\n Contributions by leeoniya.\r\n License: MIT, header required.\r\n */\n\n /**\r\n * 2D transformation matrix object initialized with identity matrix.\r\n *\r\n * The matrix can synchronize a canvas context by supplying the context\r\n * as an argument, or later apply current absolute transform to an\r\n * existing context.\r\n *\r\n * All values are handled as floating point values.\r\n *\r\n * @param {CanvasRenderingContext2D} [context] - Optional context to sync with Matrix\r\n * @prop {number} a - scale x\r\n * @prop {number} b - shear y\r\n * @prop {number} c - shear x\r\n * @prop {number} d - scale y\r\n * @prop {number} e - translate x\r\n * @prop {number} f - translate y\r\n * @prop {CanvasRenderingContext2D|null} [context=null] - set or get current canvas context\r\n * @constructor\r\n */\n\n var Matrix = function () {\n var _cos = Math.cos;\n var _sin = Math.sin;\n var _tan = Math.tan;\n var _rnd = Math.round;\n\n function reset() {\n this.props[0] = 1;\n this.props[1] = 0;\n this.props[2] = 0;\n this.props[3] = 0;\n this.props[4] = 0;\n this.props[5] = 1;\n this.props[6] = 0;\n this.props[7] = 0;\n this.props[8] = 0;\n this.props[9] = 0;\n this.props[10] = 1;\n this.props[11] = 0;\n this.props[12] = 0;\n this.props[13] = 0;\n this.props[14] = 0;\n this.props[15] = 1;\n return this;\n }\n\n function rotate(angle) {\n if (angle === 0) {\n return this;\n }\n\n var mCos = _cos(angle);\n\n var mSin = _sin(angle);\n\n return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n\n function rotateX(angle) {\n if (angle === 0) {\n return this;\n }\n\n var mCos = _cos(angle);\n\n var mSin = _sin(angle);\n\n return this._t(1, 0, 0, 0, 0, mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1);\n }\n\n function rotateY(angle) {\n if (angle === 0) {\n return this;\n }\n\n var mCos = _cos(angle);\n\n var mSin = _sin(angle);\n\n return this._t(mCos, 0, mSin, 0, 0, 1, 0, 0, -mSin, 0, mCos, 0, 0, 0, 0, 1);\n }\n\n function rotateZ(angle) {\n if (angle === 0) {\n return this;\n }\n\n var mCos = _cos(angle);\n\n var mSin = _sin(angle);\n\n return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n\n function shear(sx, sy) {\n return this._t(1, sy, sx, 1, 0, 0);\n }\n\n function skew(ax, ay) {\n return this.shear(_tan(ax), _tan(ay));\n }\n\n function skewFromAxis(ax, angle) {\n var mCos = _cos(angle);\n\n var mSin = _sin(angle);\n\n return this._t(mCos, mSin, 0, 0, -mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(1, 0, 0, 0, _tan(ax), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); // return this._t(mCos, mSin, -mSin, mCos, 0, 0)._t(1, 0, _tan(ax), 1, 0, 0)._t(mCos, -mSin, mSin, mCos, 0, 0);\n }\n\n function scale(sx, sy, sz) {\n if (!sz && sz !== 0) {\n sz = 1;\n }\n\n if (sx === 1 && sy === 1 && sz === 1) {\n return this;\n }\n\n return this._t(sx, 0, 0, 0, 0, sy, 0, 0, 0, 0, sz, 0, 0, 0, 0, 1);\n }\n\n function setTransform(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {\n this.props[0] = a;\n this.props[1] = b;\n this.props[2] = c;\n this.props[3] = d;\n this.props[4] = e;\n this.props[5] = f;\n this.props[6] = g;\n this.props[7] = h;\n this.props[8] = i;\n this.props[9] = j;\n this.props[10] = k;\n this.props[11] = l;\n this.props[12] = m;\n this.props[13] = n;\n this.props[14] = o;\n this.props[15] = p;\n return this;\n }\n\n function translate(tx, ty, tz) {\n tz = tz || 0;\n\n if (tx !== 0 || ty !== 0 || tz !== 0) {\n return this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, tx, ty, tz, 1);\n }\n\n return this;\n }\n\n function transform(a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2) {\n var _p = this.props;\n\n if (a2 === 1 && b2 === 0 && c2 === 0 && d2 === 0 && e2 === 0 && f2 === 1 && g2 === 0 && h2 === 0 && i2 === 0 && j2 === 0 && k2 === 1 && l2 === 0) {\n // NOTE: commenting this condition because TurboFan deoptimizes code when present\n // if(m2 !== 0 || n2 !== 0 || o2 !== 0){\n _p[12] = _p[12] * a2 + _p[15] * m2;\n _p[13] = _p[13] * f2 + _p[15] * n2;\n _p[14] = _p[14] * k2 + _p[15] * o2;\n _p[15] *= p2; // }\n\n this._identityCalculated = false;\n return this;\n }\n\n var a1 = _p[0];\n var b1 = _p[1];\n var c1 = _p[2];\n var d1 = _p[3];\n var e1 = _p[4];\n var f1 = _p[5];\n var g1 = _p[6];\n var h1 = _p[7];\n var i1 = _p[8];\n var j1 = _p[9];\n var k1 = _p[10];\n var l1 = _p[11];\n var m1 = _p[12];\n var n1 = _p[13];\n var o1 = _p[14];\n var p1 = _p[15];\n /* matrix order (canvas compatible):\r\n * ace\r\n * bdf\r\n * 001\r\n */\n\n _p[0] = a1 * a2 + b1 * e2 + c1 * i2 + d1 * m2;\n _p[1] = a1 * b2 + b1 * f2 + c1 * j2 + d1 * n2;\n _p[2] = a1 * c2 + b1 * g2 + c1 * k2 + d1 * o2;\n _p[3] = a1 * d2 + b1 * h2 + c1 * l2 + d1 * p2;\n _p[4] = e1 * a2 + f1 * e2 + g1 * i2 + h1 * m2;\n _p[5] = e1 * b2 + f1 * f2 + g1 * j2 + h1 * n2;\n _p[6] = e1 * c2 + f1 * g2 + g1 * k2 + h1 * o2;\n _p[7] = e1 * d2 + f1 * h2 + g1 * l2 + h1 * p2;\n _p[8] = i1 * a2 + j1 * e2 + k1 * i2 + l1 * m2;\n _p[9] = i1 * b2 + j1 * f2 + k1 * j2 + l1 * n2;\n _p[10] = i1 * c2 + j1 * g2 + k1 * k2 + l1 * o2;\n _p[11] = i1 * d2 + j1 * h2 + k1 * l2 + l1 * p2;\n _p[12] = m1 * a2 + n1 * e2 + o1 * i2 + p1 * m2;\n _p[13] = m1 * b2 + n1 * f2 + o1 * j2 + p1 * n2;\n _p[14] = m1 * c2 + n1 * g2 + o1 * k2 + p1 * o2;\n _p[15] = m1 * d2 + n1 * h2 + o1 * l2 + p1 * p2;\n this._identityCalculated = false;\n return this;\n }\n\n function multiply(matrix) {\n var matrixProps = matrix.props;\n return this.transform(matrixProps[0], matrixProps[1], matrixProps[2], matrixProps[3], matrixProps[4], matrixProps[5], matrixProps[6], matrixProps[7], matrixProps[8], matrixProps[9], matrixProps[10], matrixProps[11], matrixProps[12], matrixProps[13], matrixProps[14], matrixProps[15]);\n }\n\n function isIdentity() {\n if (!this._identityCalculated) {\n this._identity = !(this.props[0] !== 1 || this.props[1] !== 0 || this.props[2] !== 0 || this.props[3] !== 0 || this.props[4] !== 0 || this.props[5] !== 1 || this.props[6] !== 0 || this.props[7] !== 0 || this.props[8] !== 0 || this.props[9] !== 0 || this.props[10] !== 1 || this.props[11] !== 0 || this.props[12] !== 0 || this.props[13] !== 0 || this.props[14] !== 0 || this.props[15] !== 1);\n this._identityCalculated = true;\n }\n\n return this._identity;\n }\n\n function equals(matr) {\n var i = 0;\n\n while (i < 16) {\n if (matr.props[i] !== this.props[i]) {\n return false;\n }\n\n i += 1;\n }\n\n return true;\n }\n\n function clone(matr) {\n var i;\n\n for (i = 0; i < 16; i += 1) {\n matr.props[i] = this.props[i];\n }\n\n return matr;\n }\n\n function cloneFromProps(props) {\n var i;\n\n for (i = 0; i < 16; i += 1) {\n this.props[i] = props[i];\n }\n }\n\n function applyToPoint(x, y, z) {\n return {\n x: x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12],\n y: x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13],\n z: x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14]\n };\n /* return {\r\n x: x * me.a + y * me.c + me.e,\r\n y: x * me.b + y * me.d + me.f\r\n }; */\n }\n\n function applyToX(x, y, z) {\n return x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12];\n }\n\n function applyToY(x, y, z) {\n return x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13];\n }\n\n function applyToZ(x, y, z) {\n return x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14];\n }\n\n function getInverseMatrix() {\n var determinant = this.props[0] * this.props[5] - this.props[1] * this.props[4];\n var a = this.props[5] / determinant;\n var b = -this.props[1] / determinant;\n var c = -this.props[4] / determinant;\n var d = this.props[0] / determinant;\n var e = (this.props[4] * this.props[13] - this.props[5] * this.props[12]) / determinant;\n var f = -(this.props[0] * this.props[13] - this.props[1] * this.props[12]) / determinant;\n var inverseMatrix = new Matrix();\n inverseMatrix.props[0] = a;\n inverseMatrix.props[1] = b;\n inverseMatrix.props[4] = c;\n inverseMatrix.props[5] = d;\n inverseMatrix.props[12] = e;\n inverseMatrix.props[13] = f;\n return inverseMatrix;\n }\n\n function inversePoint(pt) {\n var inverseMatrix = this.getInverseMatrix();\n return inverseMatrix.applyToPointArray(pt[0], pt[1], pt[2] || 0);\n }\n\n function inversePoints(pts) {\n var i;\n var len = pts.length;\n var retPts = [];\n\n for (i = 0; i < len; i += 1) {\n retPts[i] = inversePoint(pts[i]);\n }\n\n return retPts;\n }\n\n function applyToTriplePoints(pt1, pt2, pt3) {\n var arr = createTypedArray('float32', 6);\n\n if (this.isIdentity()) {\n arr[0] = pt1[0];\n arr[1] = pt1[1];\n arr[2] = pt2[0];\n arr[3] = pt2[1];\n arr[4] = pt3[0];\n arr[5] = pt3[1];\n } else {\n var p0 = this.props[0];\n var p1 = this.props[1];\n var p4 = this.props[4];\n var p5 = this.props[5];\n var p12 = this.props[12];\n var p13 = this.props[13];\n arr[0] = pt1[0] * p0 + pt1[1] * p4 + p12;\n arr[1] = pt1[0] * p1 + pt1[1] * p5 + p13;\n arr[2] = pt2[0] * p0 + pt2[1] * p4 + p12;\n arr[3] = pt2[0] * p1 + pt2[1] * p5 + p13;\n arr[4] = pt3[0] * p0 + pt3[1] * p4 + p12;\n arr[5] = pt3[0] * p1 + pt3[1] * p5 + p13;\n }\n\n return arr;\n }\n\n function applyToPointArray(x, y, z) {\n var arr;\n\n if (this.isIdentity()) {\n arr = [x, y, z];\n } else {\n arr = [x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12], x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13], x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14]];\n }\n\n return arr;\n }\n\n function applyToPointStringified(x, y) {\n if (this.isIdentity()) {\n return x + ',' + y;\n }\n\n var _p = this.props;\n return Math.round((x * _p[0] + y * _p[4] + _p[12]) * 100) / 100 + ',' + Math.round((x * _p[1] + y * _p[5] + _p[13]) * 100) / 100;\n }\n\n function toCSS() {\n // Doesn't make much sense to add this optimization. If it is an identity matrix, it's very likely this will get called only once since it won't be keyframed.\n\n /* if(this.isIdentity()) {\r\n return '';\r\n } */\n var i = 0;\n var props = this.props;\n var cssValue = 'matrix3d(';\n var v = 10000;\n\n while (i < 16) {\n cssValue += _rnd(props[i] * v) / v;\n cssValue += i === 15 ? ')' : ',';\n i += 1;\n }\n\n return cssValue;\n }\n\n function roundMatrixProperty(val) {\n var v = 10000;\n\n if (val < 0.000001 && val > 0 || val > -0.000001 && val < 0) {\n return _rnd(val * v) / v;\n }\n\n return val;\n }\n\n function to2dCSS() {\n // Doesn't make much sense to add this optimization. If it is an identity matrix, it's very likely this will get called only once since it won't be keyframed.\n\n /* if(this.isIdentity()) {\r\n return '';\r\n } */\n var props = this.props;\n\n var _a = roundMatrixProperty(props[0]);\n\n var _b = roundMatrixProperty(props[1]);\n\n var _c = roundMatrixProperty(props[4]);\n\n var _d = roundMatrixProperty(props[5]);\n\n var _e = roundMatrixProperty(props[12]);\n\n var _f = roundMatrixProperty(props[13]);\n\n return 'matrix(' + _a + ',' + _b + ',' + _c + ',' + _d + ',' + _e + ',' + _f + ')';\n }\n\n return function () {\n this.reset = reset;\n this.rotate = rotate;\n this.rotateX = rotateX;\n this.rotateY = rotateY;\n this.rotateZ = rotateZ;\n this.skew = skew;\n this.skewFromAxis = skewFromAxis;\n this.shear = shear;\n this.scale = scale;\n this.setTransform = setTransform;\n this.translate = translate;\n this.transform = transform;\n this.multiply = multiply;\n this.applyToPoint = applyToPoint;\n this.applyToX = applyToX;\n this.applyToY = applyToY;\n this.applyToZ = applyToZ;\n this.applyToPointArray = applyToPointArray;\n this.applyToTriplePoints = applyToTriplePoints;\n this.applyToPointStringified = applyToPointStringified;\n this.toCSS = toCSS;\n this.to2dCSS = to2dCSS;\n this.clone = clone;\n this.cloneFromProps = cloneFromProps;\n this.equals = equals;\n this.inversePoints = inversePoints;\n this.inversePoint = inversePoint;\n this.getInverseMatrix = getInverseMatrix;\n this._t = this.transform;\n this.isIdentity = isIdentity;\n this._identity = true;\n this._identityCalculated = false;\n this.props = createTypedArray('float32', 16);\n this.reset();\n };\n }();\n\n function _typeof$3(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$3 = function _typeof(obj) { return typeof obj; }; } else { _typeof$3 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$3(obj); }\n var lottie = {};\n var standalone = '__[STANDALONE]__';\n var animationData = '__[ANIMATIONDATA]__';\n var renderer = '';\n\n function setLocation(href) {\n setLocationHref(href);\n }\n\n function searchAnimations() {\n if (standalone === true) {\n animationManager.searchAnimations(animationData, standalone, renderer);\n } else {\n animationManager.searchAnimations();\n }\n }\n\n function setSubframeRendering(flag) {\n setSubframeEnabled(flag);\n }\n\n function setPrefix(prefix) {\n setIdPrefix(prefix);\n }\n\n function loadAnimation(params) {\n if (standalone === true) {\n params.animationData = JSON.parse(animationData);\n }\n\n return animationManager.loadAnimation(params);\n }\n\n function setQuality(value) {\n if (typeof value === 'string') {\n switch (value) {\n case 'high':\n setDefaultCurveSegments(200);\n break;\n\n default:\n case 'medium':\n setDefaultCurveSegments(50);\n break;\n\n case 'low':\n setDefaultCurveSegments(10);\n break;\n }\n } else if (!isNaN(value) && value > 1) {\n setDefaultCurveSegments(value);\n }\n\n if (getDefaultCurveSegments() >= 50) {\n roundValues(false);\n } else {\n roundValues(true);\n }\n }\n\n function inBrowser() {\n return typeof navigator !== 'undefined';\n }\n\n function installPlugin(type, plugin) {\n if (type === 'expressions') {\n setExpressionsPlugin(plugin);\n }\n }\n\n function getFactory(name) {\n switch (name) {\n case 'propertyFactory':\n return PropertyFactory;\n\n case 'shapePropertyFactory':\n return ShapePropertyFactory;\n\n case 'matrix':\n return Matrix;\n\n default:\n return null;\n }\n }\n\n lottie.play = animationManager.play;\n lottie.pause = animationManager.pause;\n lottie.setLocationHref = setLocation;\n lottie.togglePause = animationManager.togglePause;\n lottie.setSpeed = animationManager.setSpeed;\n lottie.setDirection = animationManager.setDirection;\n lottie.stop = animationManager.stop;\n lottie.searchAnimations = searchAnimations;\n lottie.registerAnimation = animationManager.registerAnimation;\n lottie.loadAnimation = loadAnimation;\n lottie.setSubframeRendering = setSubframeRendering;\n lottie.resize = animationManager.resize; // lottie.start = start;\n\n lottie.goToAndStop = animationManager.goToAndStop;\n lottie.destroy = animationManager.destroy;\n lottie.setQuality = setQuality;\n lottie.inBrowser = inBrowser;\n lottie.installPlugin = installPlugin;\n lottie.freeze = animationManager.freeze;\n lottie.unfreeze = animationManager.unfreeze;\n lottie.setVolume = animationManager.setVolume;\n lottie.mute = animationManager.mute;\n lottie.unmute = animationManager.unmute;\n lottie.getRegisteredAnimations = animationManager.getRegisteredAnimations;\n lottie.useWebWorker = setWebWorker;\n lottie.setIDPrefix = setPrefix;\n lottie.__getFactory = getFactory;\n lottie.version = '5.12.2';\n\n function checkReady() {\n if (document.readyState === 'complete') {\n clearInterval(readyStateCheckInterval);\n searchAnimations();\n }\n }\n\n function getQueryVariable(variable) {\n var vars = queryString.split('&');\n\n for (var i = 0; i < vars.length; i += 1) {\n var pair = vars[i].split('=');\n\n if (decodeURIComponent(pair[0]) == variable) {\n // eslint-disable-line eqeqeq\n return decodeURIComponent(pair[1]);\n }\n }\n\n return null;\n }\n\n var queryString = '';\n\n if (standalone) {\n var scripts = document.getElementsByTagName('script');\n var index = scripts.length - 1;\n var myScript = scripts[index] || {\n src: ''\n };\n queryString = myScript.src ? myScript.src.replace(/^[^\\?]+\\??/, '') : ''; // eslint-disable-line no-useless-escape\n\n renderer = getQueryVariable('renderer');\n }\n\n var readyStateCheckInterval = setInterval(checkReady, 100); // this adds bodymovin to the window object for backwards compatibility\n\n try {\n if (!((typeof exports === \"undefined\" ? \"undefined\" : _typeof$3(exports)) === 'object' && typeof module !== 'undefined') && !(typeof define === 'function' && define.amd) // eslint-disable-line no-undef\n ) {\n window.bodymovin = lottie;\n }\n } catch (err) {//\n }\n\n var ShapeModifiers = function () {\n var ob = {};\n var modifiers = {};\n ob.registerModifier = registerModifier;\n ob.getModifier = getModifier;\n\n function registerModifier(nm, factory) {\n if (!modifiers[nm]) {\n modifiers[nm] = factory;\n }\n }\n\n function getModifier(nm, elem, data) {\n return new modifiers[nm](elem, data);\n }\n\n return ob;\n }();\n\n function ShapeModifier() {}\n\n ShapeModifier.prototype.initModifierProperties = function () {};\n\n ShapeModifier.prototype.addShapeToModifier = function () {};\n\n ShapeModifier.prototype.addShape = function (data) {\n if (!this.closed) {\n // Adding shape to dynamic properties. It covers the case where a shape has no effects applied, to reset it's _mdf state on every tick.\n data.sh.container.addDynamicProperty(data.sh);\n var shapeData = {\n shape: data.sh,\n data: data,\n localShapeCollection: shapeCollectionPool.newShapeCollection()\n };\n this.shapes.push(shapeData);\n this.addShapeToModifier(shapeData);\n\n if (this._isAnimated) {\n data.setAsAnimated();\n }\n }\n };\n\n ShapeModifier.prototype.init = function (elem, data) {\n this.shapes = [];\n this.elem = elem;\n this.initDynamicPropertyContainer(elem);\n this.initModifierProperties(elem, data);\n this.frameId = initialDefaultFrame;\n this.closed = false;\n this.k = false;\n\n if (this.dynamicProperties.length) {\n this.k = true;\n } else {\n this.getValue(true);\n }\n };\n\n ShapeModifier.prototype.processKeys = function () {\n if (this.elem.globalData.frameId === this.frameId) {\n return;\n }\n\n this.frameId = this.elem.globalData.frameId;\n this.iterateDynamicProperties();\n };\n\n extendPrototype([DynamicPropertyContainer], ShapeModifier);\n\n function TrimModifier() {}\n\n extendPrototype([ShapeModifier], TrimModifier);\n\n TrimModifier.prototype.initModifierProperties = function (elem, data) {\n this.s = PropertyFactory.getProp(elem, data.s, 0, 0.01, this);\n this.e = PropertyFactory.getProp(elem, data.e, 0, 0.01, this);\n this.o = PropertyFactory.getProp(elem, data.o, 0, 0, this);\n this.sValue = 0;\n this.eValue = 0;\n this.getValue = this.processKeys;\n this.m = data.m;\n this._isAnimated = !!this.s.effectsSequence.length || !!this.e.effectsSequence.length || !!this.o.effectsSequence.length;\n };\n\n TrimModifier.prototype.addShapeToModifier = function (shapeData) {\n shapeData.pathsData = [];\n };\n\n TrimModifier.prototype.calculateShapeEdges = function (s, e, shapeLength, addedLength, totalModifierLength) {\n var segments = [];\n\n if (e <= 1) {\n segments.push({\n s: s,\n e: e\n });\n } else if (s >= 1) {\n segments.push({\n s: s - 1,\n e: e - 1\n });\n } else {\n segments.push({\n s: s,\n e: 1\n });\n segments.push({\n s: 0,\n e: e - 1\n });\n }\n\n var shapeSegments = [];\n var i;\n var len = segments.length;\n var segmentOb;\n\n for (i = 0; i < len; i += 1) {\n segmentOb = segments[i];\n\n if (!(segmentOb.e * totalModifierLength < addedLength || segmentOb.s * totalModifierLength > addedLength + shapeLength)) {\n var shapeS;\n var shapeE;\n\n if (segmentOb.s * totalModifierLength <= addedLength) {\n shapeS = 0;\n } else {\n shapeS = (segmentOb.s * totalModifierLength - addedLength) / shapeLength;\n }\n\n if (segmentOb.e * totalModifierLength >= addedLength + shapeLength) {\n shapeE = 1;\n } else {\n shapeE = (segmentOb.e * totalModifierLength - addedLength) / shapeLength;\n }\n\n shapeSegments.push([shapeS, shapeE]);\n }\n }\n\n if (!shapeSegments.length) {\n shapeSegments.push([0, 0]);\n }\n\n return shapeSegments;\n };\n\n TrimModifier.prototype.releasePathsData = function (pathsData) {\n var i;\n var len = pathsData.length;\n\n for (i = 0; i < len; i += 1) {\n segmentsLengthPool.release(pathsData[i]);\n }\n\n pathsData.length = 0;\n return pathsData;\n };\n\n TrimModifier.prototype.processShapes = function (_isFirstFrame) {\n var s;\n var e;\n\n if (this._mdf || _isFirstFrame) {\n var o = this.o.v % 360 / 360;\n\n if (o < 0) {\n o += 1;\n }\n\n if (this.s.v > 1) {\n s = 1 + o;\n } else if (this.s.v < 0) {\n s = 0 + o;\n } else {\n s = this.s.v + o;\n }\n\n if (this.e.v > 1) {\n e = 1 + o;\n } else if (this.e.v < 0) {\n e = 0 + o;\n } else {\n e = this.e.v + o;\n }\n\n if (s > e) {\n var _s = s;\n s = e;\n e = _s;\n }\n\n s = Math.round(s * 10000) * 0.0001;\n e = Math.round(e * 10000) * 0.0001;\n this.sValue = s;\n this.eValue = e;\n } else {\n s = this.sValue;\n e = this.eValue;\n }\n\n var shapePaths;\n var i;\n var len = this.shapes.length;\n var j;\n var jLen;\n var pathsData;\n var pathData;\n var totalShapeLength;\n var totalModifierLength = 0;\n\n if (e === s) {\n for (i = 0; i < len; i += 1) {\n this.shapes[i].localShapeCollection.releaseShapes();\n this.shapes[i].shape._mdf = true;\n this.shapes[i].shape.paths = this.shapes[i].localShapeCollection;\n\n if (this._mdf) {\n this.shapes[i].pathsData.length = 0;\n }\n }\n } else if (!(e === 1 && s === 0 || e === 0 && s === 1)) {\n var segments = [];\n var shapeData;\n var localShapeCollection;\n\n for (i = 0; i < len; i += 1) {\n shapeData = this.shapes[i]; // if shape hasn't changed and trim properties haven't changed, cached previous path can be used\n\n if (!shapeData.shape._mdf && !this._mdf && !_isFirstFrame && this.m !== 2) {\n shapeData.shape.paths = shapeData.localShapeCollection;\n } else {\n shapePaths = shapeData.shape.paths;\n jLen = shapePaths._length;\n totalShapeLength = 0;\n\n if (!shapeData.shape._mdf && shapeData.pathsData.length) {\n totalShapeLength = shapeData.totalShapeLength;\n } else {\n pathsData = this.releasePathsData(shapeData.pathsData);\n\n for (j = 0; j < jLen; j += 1) {\n pathData = bez.getSegmentsLength(shapePaths.shapes[j]);\n pathsData.push(pathData);\n totalShapeLength += pathData.totalLength;\n }\n\n shapeData.totalShapeLength = totalShapeLength;\n shapeData.pathsData = pathsData;\n }\n\n totalModifierLength += totalShapeLength;\n shapeData.shape._mdf = true;\n }\n }\n\n var shapeS = s;\n var shapeE = e;\n var addedLength = 0;\n var edges;\n\n for (i = len - 1; i >= 0; i -= 1) {\n shapeData = this.shapes[i];\n\n if (shapeData.shape._mdf) {\n localShapeCollection = shapeData.localShapeCollection;\n localShapeCollection.releaseShapes(); // if m === 2 means paths are trimmed individually so edges need to be found for this specific shape relative to whoel group\n\n if (this.m === 2 && len > 1) {\n edges = this.calculateShapeEdges(s, e, shapeData.totalShapeLength, addedLength, totalModifierLength);\n addedLength += shapeData.totalShapeLength;\n } else {\n edges = [[shapeS, shapeE]];\n }\n\n jLen = edges.length;\n\n for (j = 0; j < jLen; j += 1) {\n shapeS = edges[j][0];\n shapeE = edges[j][1];\n segments.length = 0;\n\n if (shapeE <= 1) {\n segments.push({\n s: shapeData.totalShapeLength * shapeS,\n e: shapeData.totalShapeLength * shapeE\n });\n } else if (shapeS >= 1) {\n segments.push({\n s: shapeData.totalShapeLength * (shapeS - 1),\n e: shapeData.totalShapeLength * (shapeE - 1)\n });\n } else {\n segments.push({\n s: shapeData.totalShapeLength * shapeS,\n e: shapeData.totalShapeLength\n });\n segments.push({\n s: 0,\n e: shapeData.totalShapeLength * (shapeE - 1)\n });\n }\n\n var newShapesData = this.addShapes(shapeData, segments[0]);\n\n if (segments[0].s !== segments[0].e) {\n if (segments.length > 1) {\n var lastShapeInCollection = shapeData.shape.paths.shapes[shapeData.shape.paths._length - 1];\n\n if (lastShapeInCollection.c) {\n var lastShape = newShapesData.pop();\n this.addPaths(newShapesData, localShapeCollection);\n newShapesData = this.addShapes(shapeData, segments[1], lastShape);\n } else {\n this.addPaths(newShapesData, localShapeCollection);\n newShapesData = this.addShapes(shapeData, segments[1]);\n }\n }\n\n this.addPaths(newShapesData, localShapeCollection);\n }\n }\n\n shapeData.shape.paths = localShapeCollection;\n }\n }\n } else if (this._mdf) {\n for (i = 0; i < len; i += 1) {\n // Releasign Trim Cached paths data when no trim applied in case shapes are modified inbetween.\n // Don't remove this even if it's losing cached info.\n this.shapes[i].pathsData.length = 0;\n this.shapes[i].shape._mdf = true;\n }\n }\n };\n\n TrimModifier.prototype.addPaths = function (newPaths, localShapeCollection) {\n var i;\n var len = newPaths.length;\n\n for (i = 0; i < len; i += 1) {\n localShapeCollection.addShape(newPaths[i]);\n }\n };\n\n TrimModifier.prototype.addSegment = function (pt1, pt2, pt3, pt4, shapePath, pos, newShape) {\n shapePath.setXYAt(pt2[0], pt2[1], 'o', pos);\n shapePath.setXYAt(pt3[0], pt3[1], 'i', pos + 1);\n\n if (newShape) {\n shapePath.setXYAt(pt1[0], pt1[1], 'v', pos);\n }\n\n shapePath.setXYAt(pt4[0], pt4[1], 'v', pos + 1);\n };\n\n TrimModifier.prototype.addSegmentFromArray = function (points, shapePath, pos, newShape) {\n shapePath.setXYAt(points[1], points[5], 'o', pos);\n shapePath.setXYAt(points[2], points[6], 'i', pos + 1);\n\n if (newShape) {\n shapePath.setXYAt(points[0], points[4], 'v', pos);\n }\n\n shapePath.setXYAt(points[3], points[7], 'v', pos + 1);\n };\n\n TrimModifier.prototype.addShapes = function (shapeData, shapeSegment, shapePath) {\n var pathsData = shapeData.pathsData;\n var shapePaths = shapeData.shape.paths.shapes;\n var i;\n var len = shapeData.shape.paths._length;\n var j;\n var jLen;\n var addedLength = 0;\n var currentLengthData;\n var segmentCount;\n var lengths;\n var segment;\n var shapes = [];\n var initPos;\n var newShape = true;\n\n if (!shapePath) {\n shapePath = shapePool.newElement();\n segmentCount = 0;\n initPos = 0;\n } else {\n segmentCount = shapePath._length;\n initPos = shapePath._length;\n }\n\n shapes.push(shapePath);\n\n for (i = 0; i < len; i += 1) {\n lengths = pathsData[i].lengths;\n shapePath.c = shapePaths[i].c;\n jLen = shapePaths[i].c ? lengths.length : lengths.length + 1;\n\n for (j = 1; j < jLen; j += 1) {\n currentLengthData = lengths[j - 1];\n\n if (addedLength + currentLengthData.addedLength < shapeSegment.s) {\n addedLength += currentLengthData.addedLength;\n shapePath.c = false;\n } else if (addedLength > shapeSegment.e) {\n shapePath.c = false;\n break;\n } else {\n if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + currentLengthData.addedLength) {\n this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[j], shapePaths[i].v[j], shapePath, segmentCount, newShape);\n newShape = false;\n } else {\n segment = bez.getNewSegment(shapePaths[i].v[j - 1], shapePaths[i].v[j], shapePaths[i].o[j - 1], shapePaths[i].i[j], (shapeSegment.s - addedLength) / currentLengthData.addedLength, (shapeSegment.e - addedLength) / currentLengthData.addedLength, lengths[j - 1]);\n this.addSegmentFromArray(segment, shapePath, segmentCount, newShape); // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);\n\n newShape = false;\n shapePath.c = false;\n }\n\n addedLength += currentLengthData.addedLength;\n segmentCount += 1;\n }\n }\n\n if (shapePaths[i].c && lengths.length) {\n currentLengthData = lengths[j - 1];\n\n if (addedLength <= shapeSegment.e) {\n var segmentLength = lengths[j - 1].addedLength;\n\n if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + segmentLength) {\n this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[0], shapePaths[i].v[0], shapePath, segmentCount, newShape);\n newShape = false;\n } else {\n segment = bez.getNewSegment(shapePaths[i].v[j - 1], shapePaths[i].v[0], shapePaths[i].o[j - 1], shapePaths[i].i[0], (shapeSegment.s - addedLength) / segmentLength, (shapeSegment.e - addedLength) / segmentLength, lengths[j - 1]);\n this.addSegmentFromArray(segment, shapePath, segmentCount, newShape); // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);\n\n newShape = false;\n shapePath.c = false;\n }\n } else {\n shapePath.c = false;\n }\n\n addedLength += currentLengthData.addedLength;\n segmentCount += 1;\n }\n\n if (shapePath._length) {\n shapePath.setXYAt(shapePath.v[initPos][0], shapePath.v[initPos][1], 'i', initPos);\n shapePath.setXYAt(shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1], 'o', shapePath._length - 1);\n }\n\n if (addedLength > shapeSegment.e) {\n break;\n }\n\n if (i < len - 1) {\n shapePath = shapePool.newElement();\n newShape = true;\n shapes.push(shapePath);\n segmentCount = 0;\n }\n }\n\n return shapes;\n };\n\n function PuckerAndBloatModifier() {}\n\n extendPrototype([ShapeModifier], PuckerAndBloatModifier);\n\n PuckerAndBloatModifier.prototype.initModifierProperties = function (elem, data) {\n this.getValue = this.processKeys;\n this.amount = PropertyFactory.getProp(elem, data.a, 0, null, this);\n this._isAnimated = !!this.amount.effectsSequence.length;\n };\n\n PuckerAndBloatModifier.prototype.processPath = function (path, amount) {\n var percent = amount / 100;\n var centerPoint = [0, 0];\n var pathLength = path._length;\n var i = 0;\n\n for (i = 0; i < pathLength; i += 1) {\n centerPoint[0] += path.v[i][0];\n centerPoint[1] += path.v[i][1];\n }\n\n centerPoint[0] /= pathLength;\n centerPoint[1] /= pathLength;\n var clonedPath = shapePool.newElement();\n clonedPath.c = path.c;\n var vX;\n var vY;\n var oX;\n var oY;\n var iX;\n var iY;\n\n for (i = 0; i < pathLength; i += 1) {\n vX = path.v[i][0] + (centerPoint[0] - path.v[i][0]) * percent;\n vY = path.v[i][1] + (centerPoint[1] - path.v[i][1]) * percent;\n oX = path.o[i][0] + (centerPoint[0] - path.o[i][0]) * -percent;\n oY = path.o[i][1] + (centerPoint[1] - path.o[i][1]) * -percent;\n iX = path.i[i][0] + (centerPoint[0] - path.i[i][0]) * -percent;\n iY = path.i[i][1] + (centerPoint[1] - path.i[i][1]) * -percent;\n clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, i);\n }\n\n return clonedPath;\n };\n\n PuckerAndBloatModifier.prototype.processShapes = function (_isFirstFrame) {\n var shapePaths;\n var i;\n var len = this.shapes.length;\n var j;\n var jLen;\n var amount = this.amount.v;\n\n if (amount !== 0) {\n var shapeData;\n var localShapeCollection;\n\n for (i = 0; i < len; i += 1) {\n shapeData = this.shapes[i];\n localShapeCollection = shapeData.localShapeCollection;\n\n if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {\n localShapeCollection.releaseShapes();\n shapeData.shape._mdf = true;\n shapePaths = shapeData.shape.paths.shapes;\n jLen = shapeData.shape.paths._length;\n\n for (j = 0; j < jLen; j += 1) {\n localShapeCollection.addShape(this.processPath(shapePaths[j], amount));\n }\n }\n\n shapeData.shape.paths = shapeData.localShapeCollection;\n }\n }\n\n if (!this.dynamicProperties.length) {\n this._mdf = false;\n }\n };\n\n var TransformPropertyFactory = function () {\n var defaultVector = [0, 0];\n\n function applyToMatrix(mat) {\n var _mdf = this._mdf;\n this.iterateDynamicProperties();\n this._mdf = this._mdf || _mdf;\n\n if (this.a) {\n mat.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);\n }\n\n if (this.s) {\n mat.scale(this.s.v[0], this.s.v[1], this.s.v[2]);\n }\n\n if (this.sk) {\n mat.skewFromAxis(-this.sk.v, this.sa.v);\n }\n\n if (this.r) {\n mat.rotate(-this.r.v);\n } else {\n mat.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]);\n }\n\n if (this.data.p.s) {\n if (this.data.p.z) {\n mat.translate(this.px.v, this.py.v, -this.pz.v);\n } else {\n mat.translate(this.px.v, this.py.v, 0);\n }\n } else {\n mat.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);\n }\n }\n\n function processKeys(forceRender) {\n if (this.elem.globalData.frameId === this.frameId) {\n return;\n }\n\n if (this._isDirty) {\n this.precalculateMatrix();\n this._isDirty = false;\n }\n\n this.iterateDynamicProperties();\n\n if (this._mdf || forceRender) {\n var frameRate;\n this.v.cloneFromProps(this.pre.props);\n\n if (this.appliedTransformations < 1) {\n this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);\n }\n\n if (this.appliedTransformations < 2) {\n this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]);\n }\n\n if (this.sk && this.appliedTransformations < 3) {\n this.v.skewFromAxis(-this.sk.v, this.sa.v);\n }\n\n if (this.r && this.appliedTransformations < 4) {\n this.v.rotate(-this.r.v);\n } else if (!this.r && this.appliedTransformations < 4) {\n this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]);\n }\n\n if (this.autoOriented) {\n var v1;\n var v2;\n frameRate = this.elem.globalData.frameRate;\n\n if (this.p && this.p.keyframes && this.p.getValueAtTime) {\n if (this.p._caching.lastFrame + this.p.offsetTime <= this.p.keyframes[0].t) {\n v1 = this.p.getValueAtTime((this.p.keyframes[0].t + 0.01) / frameRate, 0);\n v2 = this.p.getValueAtTime(this.p.keyframes[0].t / frameRate, 0);\n } else if (this.p._caching.lastFrame + this.p.offsetTime >= this.p.keyframes[this.p.keyframes.length - 1].t) {\n v1 = this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length - 1].t / frameRate, 0);\n v2 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t - 0.05) / frameRate, 0);\n } else {\n v1 = this.p.pv;\n v2 = this.p.getValueAtTime((this.p._caching.lastFrame + this.p.offsetTime - 0.01) / frameRate, this.p.offsetTime);\n }\n } else if (this.px && this.px.keyframes && this.py.keyframes && this.px.getValueAtTime && this.py.getValueAtTime) {\n v1 = [];\n v2 = [];\n var px = this.px;\n var py = this.py;\n\n if (px._caching.lastFrame + px.offsetTime <= px.keyframes[0].t) {\n v1[0] = px.getValueAtTime((px.keyframes[0].t + 0.01) / frameRate, 0);\n v1[1] = py.getValueAtTime((py.keyframes[0].t + 0.01) / frameRate, 0);\n v2[0] = px.getValueAtTime(px.keyframes[0].t / frameRate, 0);\n v2[1] = py.getValueAtTime(py.keyframes[0].t / frameRate, 0);\n } else if (px._caching.lastFrame + px.offsetTime >= px.keyframes[px.keyframes.length - 1].t) {\n v1[0] = px.getValueAtTime(px.keyframes[px.keyframes.length - 1].t / frameRate, 0);\n v1[1] = py.getValueAtTime(py.keyframes[py.keyframes.length - 1].t / frameRate, 0);\n v2[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t - 0.01) / frameRate, 0);\n v2[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t - 0.01) / frameRate, 0);\n } else {\n v1 = [px.pv, py.pv];\n v2[0] = px.getValueAtTime((px._caching.lastFrame + px.offsetTime - 0.01) / frameRate, px.offsetTime);\n v2[1] = py.getValueAtTime((py._caching.lastFrame + py.offsetTime - 0.01) / frameRate, py.offsetTime);\n }\n } else {\n v2 = defaultVector;\n v1 = v2;\n }\n\n this.v.rotate(-Math.atan2(v1[1] - v2[1], v1[0] - v2[0]));\n }\n\n if (this.data.p && this.data.p.s) {\n if (this.data.p.z) {\n this.v.translate(this.px.v, this.py.v, -this.pz.v);\n } else {\n this.v.translate(this.px.v, this.py.v, 0);\n }\n } else {\n this.v.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);\n }\n }\n\n this.frameId = this.elem.globalData.frameId;\n }\n\n function precalculateMatrix() {\n this.appliedTransformations = 0;\n this.pre.reset();\n\n if (!this.a.effectsSequence.length) {\n this.pre.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);\n this.appliedTransformations = 1;\n } else {\n return;\n }\n\n if (!this.s.effectsSequence.length) {\n this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]);\n this.appliedTransformations = 2;\n } else {\n return;\n }\n\n if (this.sk) {\n if (!this.sk.effectsSequence.length && !this.sa.effectsSequence.length) {\n this.pre.skewFromAxis(-this.sk.v, this.sa.v);\n this.appliedTransformations = 3;\n } else {\n return;\n }\n }\n\n if (this.r) {\n if (!this.r.effectsSequence.length) {\n this.pre.rotate(-this.r.v);\n this.appliedTransformations = 4;\n }\n } else if (!this.rz.effectsSequence.length && !this.ry.effectsSequence.length && !this.rx.effectsSequence.length && !this.or.effectsSequence.length) {\n this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]);\n this.appliedTransformations = 4;\n }\n }\n\n function autoOrient() {//\n // var prevP = this.getValueAtTime();\n }\n\n function addDynamicProperty(prop) {\n this._addDynamicProperty(prop);\n\n this.elem.addDynamicProperty(prop);\n this._isDirty = true;\n }\n\n function TransformProperty(elem, data, container) {\n this.elem = elem;\n this.frameId = -1;\n this.propType = 'transform';\n this.data = data;\n this.v = new Matrix(); // Precalculated matrix with non animated properties\n\n this.pre = new Matrix();\n this.appliedTransformations = 0;\n this.initDynamicPropertyContainer(container || elem);\n\n if (data.p && data.p.s) {\n this.px = PropertyFactory.getProp(elem, data.p.x, 0, 0, this);\n this.py = PropertyFactory.getProp(elem, data.p.y, 0, 0, this);\n\n if (data.p.z) {\n this.pz = PropertyFactory.getProp(elem, data.p.z, 0, 0, this);\n }\n } else {\n this.p = PropertyFactory.getProp(elem, data.p || {\n k: [0, 0, 0]\n }, 1, 0, this);\n }\n\n if (data.rx) {\n this.rx = PropertyFactory.getProp(elem, data.rx, 0, degToRads, this);\n this.ry = PropertyFactory.getProp(elem, data.ry, 0, degToRads, this);\n this.rz = PropertyFactory.getProp(elem, data.rz, 0, degToRads, this);\n\n if (data.or.k[0].ti) {\n var i;\n var len = data.or.k.length;\n\n for (i = 0; i < len; i += 1) {\n data.or.k[i].to = null;\n data.or.k[i].ti = null;\n }\n }\n\n this.or = PropertyFactory.getProp(elem, data.or, 1, degToRads, this); // sh Indicates it needs to be capped between -180 and 180\n\n this.or.sh = true;\n } else {\n this.r = PropertyFactory.getProp(elem, data.r || {\n k: 0\n }, 0, degToRads, this);\n }\n\n if (data.sk) {\n this.sk = PropertyFactory.getProp(elem, data.sk, 0, degToRads, this);\n this.sa = PropertyFactory.getProp(elem, data.sa, 0, degToRads, this);\n }\n\n this.a = PropertyFactory.getProp(elem, data.a || {\n k: [0, 0, 0]\n }, 1, 0, this);\n this.s = PropertyFactory.getProp(elem, data.s || {\n k: [100, 100, 100]\n }, 1, 0.01, this); // Opacity is not part of the transform properties, that's why it won't use this.dynamicProperties. That way transforms won't get updated if opacity changes.\n\n if (data.o) {\n this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, elem);\n } else {\n this.o = {\n _mdf: false,\n v: 1\n };\n }\n\n this._isDirty = true;\n\n if (!this.dynamicProperties.length) {\n this.getValue(true);\n }\n }\n\n TransformProperty.prototype = {\n applyToMatrix: applyToMatrix,\n getValue: processKeys,\n precalculateMatrix: precalculateMatrix,\n autoOrient: autoOrient\n };\n extendPrototype([DynamicPropertyContainer], TransformProperty);\n TransformProperty.prototype.addDynamicProperty = addDynamicProperty;\n TransformProperty.prototype._addDynamicProperty = DynamicPropertyContainer.prototype.addDynamicProperty;\n\n function getTransformProperty(elem, data, container) {\n return new TransformProperty(elem, data, container);\n }\n\n return {\n getTransformProperty: getTransformProperty\n };\n }();\n\n function RepeaterModifier() {}\n\n extendPrototype([ShapeModifier], RepeaterModifier);\n\n RepeaterModifier.prototype.initModifierProperties = function (elem, data) {\n this.getValue = this.processKeys;\n this.c = PropertyFactory.getProp(elem, data.c, 0, null, this);\n this.o = PropertyFactory.getProp(elem, data.o, 0, null, this);\n this.tr = TransformPropertyFactory.getTransformProperty(elem, data.tr, this);\n this.so = PropertyFactory.getProp(elem, data.tr.so, 0, 0.01, this);\n this.eo = PropertyFactory.getProp(elem, data.tr.eo, 0, 0.01, this);\n this.data = data;\n\n if (!this.dynamicProperties.length) {\n this.getValue(true);\n }\n\n this._isAnimated = !!this.dynamicProperties.length;\n this.pMatrix = new Matrix();\n this.rMatrix = new Matrix();\n this.sMatrix = new Matrix();\n this.tMatrix = new Matrix();\n this.matrix = new Matrix();\n };\n\n RepeaterModifier.prototype.applyTransforms = function (pMatrix, rMatrix, sMatrix, transform, perc, inv) {\n var dir = inv ? -1 : 1;\n var scaleX = transform.s.v[0] + (1 - transform.s.v[0]) * (1 - perc);\n var scaleY = transform.s.v[1] + (1 - transform.s.v[1]) * (1 - perc);\n pMatrix.translate(transform.p.v[0] * dir * perc, transform.p.v[1] * dir * perc, transform.p.v[2]);\n rMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);\n rMatrix.rotate(-transform.r.v * dir * perc);\n rMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);\n sMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);\n sMatrix.scale(inv ? 1 / scaleX : scaleX, inv ? 1 / scaleY : scaleY);\n sMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);\n };\n\n RepeaterModifier.prototype.init = function (elem, arr, pos, elemsData) {\n this.elem = elem;\n this.arr = arr;\n this.pos = pos;\n this.elemsData = elemsData;\n this._currentCopies = 0;\n this._elements = [];\n this._groups = [];\n this.frameId = -1;\n this.initDynamicPropertyContainer(elem);\n this.initModifierProperties(elem, arr[pos]);\n\n while (pos > 0) {\n pos -= 1; // this._elements.unshift(arr.splice(pos,1)[0]);\n\n this._elements.unshift(arr[pos]);\n }\n\n if (this.dynamicProperties.length) {\n this.k = true;\n } else {\n this.getValue(true);\n }\n };\n\n RepeaterModifier.prototype.resetElements = function (elements) {\n var i;\n var len = elements.length;\n\n for (i = 0; i < len; i += 1) {\n elements[i]._processed = false;\n\n if (elements[i].ty === 'gr') {\n this.resetElements(elements[i].it);\n }\n }\n };\n\n RepeaterModifier.prototype.cloneElements = function (elements) {\n var newElements = JSON.parse(JSON.stringify(elements));\n this.resetElements(newElements);\n return newElements;\n };\n\n RepeaterModifier.prototype.changeGroupRender = function (elements, renderFlag) {\n var i;\n var len = elements.length;\n\n for (i = 0; i < len; i += 1) {\n elements[i]._render = renderFlag;\n\n if (elements[i].ty === 'gr') {\n this.changeGroupRender(elements[i].it, renderFlag);\n }\n }\n };\n\n RepeaterModifier.prototype.processShapes = function (_isFirstFrame) {\n var items;\n var itemsTransform;\n var i;\n var dir;\n var cont;\n var hasReloaded = false;\n\n if (this._mdf || _isFirstFrame) {\n var copies = Math.ceil(this.c.v);\n\n if (this._groups.length < copies) {\n while (this._groups.length < copies) {\n var group = {\n it: this.cloneElements(this._elements),\n ty: 'gr'\n };\n group.it.push({\n a: {\n a: 0,\n ix: 1,\n k: [0, 0]\n },\n nm: 'Transform',\n o: {\n a: 0,\n ix: 7,\n k: 100\n },\n p: {\n a: 0,\n ix: 2,\n k: [0, 0]\n },\n r: {\n a: 1,\n ix: 6,\n k: [{\n s: 0,\n e: 0,\n t: 0\n }, {\n s: 0,\n e: 0,\n t: 1\n }]\n },\n s: {\n a: 0,\n ix: 3,\n k: [100, 100]\n },\n sa: {\n a: 0,\n ix: 5,\n k: 0\n },\n sk: {\n a: 0,\n ix: 4,\n k: 0\n },\n ty: 'tr'\n });\n this.arr.splice(0, 0, group);\n\n this._groups.splice(0, 0, group);\n\n this._currentCopies += 1;\n }\n\n this.elem.reloadShapes();\n hasReloaded = true;\n }\n\n cont = 0;\n var renderFlag;\n\n for (i = 0; i <= this._groups.length - 1; i += 1) {\n renderFlag = cont < copies;\n this._groups[i]._render = renderFlag;\n this.changeGroupRender(this._groups[i].it, renderFlag);\n\n if (!renderFlag) {\n var elems = this.elemsData[i].it;\n var transformData = elems[elems.length - 1];\n\n if (transformData.transform.op.v !== 0) {\n transformData.transform.op._mdf = true;\n transformData.transform.op.v = 0;\n } else {\n transformData.transform.op._mdf = false;\n }\n }\n\n cont += 1;\n }\n\n this._currentCopies = copies; /// /\n\n var offset = this.o.v;\n var offsetModulo = offset % 1;\n var roundOffset = offset > 0 ? Math.floor(offset) : Math.ceil(offset);\n var pProps = this.pMatrix.props;\n var rProps = this.rMatrix.props;\n var sProps = this.sMatrix.props;\n this.pMatrix.reset();\n this.rMatrix.reset();\n this.sMatrix.reset();\n this.tMatrix.reset();\n this.matrix.reset();\n var iteration = 0;\n\n if (offset > 0) {\n while (iteration < roundOffset) {\n this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);\n iteration += 1;\n }\n\n if (offsetModulo) {\n this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, offsetModulo, false);\n iteration += offsetModulo;\n }\n } else if (offset < 0) {\n while (iteration > roundOffset) {\n this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, true);\n iteration -= 1;\n }\n\n if (offsetModulo) {\n this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, -offsetModulo, true);\n iteration -= offsetModulo;\n }\n }\n\n i = this.data.m === 1 ? 0 : this._currentCopies - 1;\n dir = this.data.m === 1 ? 1 : -1;\n cont = this._currentCopies;\n var j;\n var jLen;\n\n while (cont) {\n items = this.elemsData[i].it;\n itemsTransform = items[items.length - 1].transform.mProps.v.props;\n jLen = itemsTransform.length;\n items[items.length - 1].transform.mProps._mdf = true;\n items[items.length - 1].transform.op._mdf = true;\n items[items.length - 1].transform.op.v = this._currentCopies === 1 ? this.so.v : this.so.v + (this.eo.v - this.so.v) * (i / (this._currentCopies - 1));\n\n if (iteration !== 0) {\n if (i !== 0 && dir === 1 || i !== this._currentCopies - 1 && dir === -1) {\n this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);\n }\n\n this.matrix.transform(rProps[0], rProps[1], rProps[2], rProps[3], rProps[4], rProps[5], rProps[6], rProps[7], rProps[8], rProps[9], rProps[10], rProps[11], rProps[12], rProps[13], rProps[14], rProps[15]);\n this.matrix.transform(sProps[0], sProps[1], sProps[2], sProps[3], sProps[4], sProps[5], sProps[6], sProps[7], sProps[8], sProps[9], sProps[10], sProps[11], sProps[12], sProps[13], sProps[14], sProps[15]);\n this.matrix.transform(pProps[0], pProps[1], pProps[2], pProps[3], pProps[4], pProps[5], pProps[6], pProps[7], pProps[8], pProps[9], pProps[10], pProps[11], pProps[12], pProps[13], pProps[14], pProps[15]);\n\n for (j = 0; j < jLen; j += 1) {\n itemsTransform[j] = this.matrix.props[j];\n }\n\n this.matrix.reset();\n } else {\n this.matrix.reset();\n\n for (j = 0; j < jLen; j += 1) {\n itemsTransform[j] = this.matrix.props[j];\n }\n }\n\n iteration += 1;\n cont -= 1;\n i += dir;\n }\n } else {\n cont = this._currentCopies;\n i = 0;\n dir = 1;\n\n while (cont) {\n items = this.elemsData[i].it;\n itemsTransform = items[items.length - 1].transform.mProps.v.props;\n items[items.length - 1].transform.mProps._mdf = false;\n items[items.length - 1].transform.op._mdf = false;\n cont -= 1;\n i += dir;\n }\n }\n\n return hasReloaded;\n };\n\n RepeaterModifier.prototype.addShape = function () {};\n\n function RoundCornersModifier() {}\n\n extendPrototype([ShapeModifier], RoundCornersModifier);\n\n RoundCornersModifier.prototype.initModifierProperties = function (elem, data) {\n this.getValue = this.processKeys;\n this.rd = PropertyFactory.getProp(elem, data.r, 0, null, this);\n this._isAnimated = !!this.rd.effectsSequence.length;\n };\n\n RoundCornersModifier.prototype.processPath = function (path, round) {\n var clonedPath = shapePool.newElement();\n clonedPath.c = path.c;\n var i;\n var len = path._length;\n var currentV;\n var currentI;\n var currentO;\n var closerV;\n var distance;\n var newPosPerc;\n var index = 0;\n var vX;\n var vY;\n var oX;\n var oY;\n var iX;\n var iY;\n\n for (i = 0; i < len; i += 1) {\n currentV = path.v[i];\n currentO = path.o[i];\n currentI = path.i[i];\n\n if (currentV[0] === currentO[0] && currentV[1] === currentO[1] && currentV[0] === currentI[0] && currentV[1] === currentI[1]) {\n if ((i === 0 || i === len - 1) && !path.c) {\n clonedPath.setTripleAt(currentV[0], currentV[1], currentO[0], currentO[1], currentI[0], currentI[1], index);\n /* clonedPath.v[index] = currentV;\r\n clonedPath.o[index] = currentO;\r\n clonedPath.i[index] = currentI; */\n\n index += 1;\n } else {\n if (i === 0) {\n closerV = path.v[len - 1];\n } else {\n closerV = path.v[i - 1];\n }\n\n distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));\n newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;\n iX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;\n vX = iX;\n iY = currentV[1] - (currentV[1] - closerV[1]) * newPosPerc;\n vY = iY;\n oX = vX - (vX - currentV[0]) * roundCorner;\n oY = vY - (vY - currentV[1]) * roundCorner;\n clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);\n index += 1;\n\n if (i === len - 1) {\n closerV = path.v[0];\n } else {\n closerV = path.v[i + 1];\n }\n\n distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));\n newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;\n oX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;\n vX = oX;\n oY = currentV[1] + (closerV[1] - currentV[1]) * newPosPerc;\n vY = oY;\n iX = vX - (vX - currentV[0]) * roundCorner;\n iY = vY - (vY - currentV[1]) * roundCorner;\n clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);\n index += 1;\n }\n } else {\n clonedPath.setTripleAt(path.v[i][0], path.v[i][1], path.o[i][0], path.o[i][1], path.i[i][0], path.i[i][1], index);\n index += 1;\n }\n }\n\n return clonedPath;\n };\n\n RoundCornersModifier.prototype.processShapes = function (_isFirstFrame) {\n var shapePaths;\n var i;\n var len = this.shapes.length;\n var j;\n var jLen;\n var rd = this.rd.v;\n\n if (rd !== 0) {\n var shapeData;\n var localShapeCollection;\n\n for (i = 0; i < len; i += 1) {\n shapeData = this.shapes[i];\n localShapeCollection = shapeData.localShapeCollection;\n\n if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {\n localShapeCollection.releaseShapes();\n shapeData.shape._mdf = true;\n shapePaths = shapeData.shape.paths.shapes;\n jLen = shapeData.shape.paths._length;\n\n for (j = 0; j < jLen; j += 1) {\n localShapeCollection.addShape(this.processPath(shapePaths[j], rd));\n }\n }\n\n shapeData.shape.paths = shapeData.localShapeCollection;\n }\n }\n\n if (!this.dynamicProperties.length) {\n this._mdf = false;\n }\n };\n\n function floatEqual(a, b) {\n return Math.abs(a - b) * 100000 <= Math.min(Math.abs(a), Math.abs(b));\n }\n\n function floatZero(f) {\n return Math.abs(f) <= 0.00001;\n }\n\n function lerp(p0, p1, amount) {\n return p0 * (1 - amount) + p1 * amount;\n }\n\n function lerpPoint(p0, p1, amount) {\n return [lerp(p0[0], p1[0], amount), lerp(p0[1], p1[1], amount)];\n }\n\n function quadRoots(a, b, c) {\n // no root\n if (a === 0) return [];\n var s = b * b - 4 * a * c; // Complex roots\n\n if (s < 0) return [];\n var singleRoot = -b / (2 * a); // 1 root\n\n if (s === 0) return [singleRoot];\n var delta = Math.sqrt(s) / (2 * a); // 2 roots\n\n return [singleRoot - delta, singleRoot + delta];\n }\n\n function polynomialCoefficients(p0, p1, p2, p3) {\n return [-p0 + 3 * p1 - 3 * p2 + p3, 3 * p0 - 6 * p1 + 3 * p2, -3 * p0 + 3 * p1, p0];\n }\n\n function singlePoint(p) {\n return new PolynomialBezier(p, p, p, p, false);\n }\n\n function PolynomialBezier(p0, p1, p2, p3, linearize) {\n if (linearize && pointEqual(p0, p1)) {\n p1 = lerpPoint(p0, p3, 1 / 3);\n }\n\n if (linearize && pointEqual(p2, p3)) {\n p2 = lerpPoint(p0, p3, 2 / 3);\n }\n\n var coeffx = polynomialCoefficients(p0[0], p1[0], p2[0], p3[0]);\n var coeffy = polynomialCoefficients(p0[1], p1[1], p2[1], p3[1]);\n this.a = [coeffx[0], coeffy[0]];\n this.b = [coeffx[1], coeffy[1]];\n this.c = [coeffx[2], coeffy[2]];\n this.d = [coeffx[3], coeffy[3]];\n this.points = [p0, p1, p2, p3];\n }\n\n PolynomialBezier.prototype.point = function (t) {\n return [((this.a[0] * t + this.b[0]) * t + this.c[0]) * t + this.d[0], ((this.a[1] * t + this.b[1]) * t + this.c[1]) * t + this.d[1]];\n };\n\n PolynomialBezier.prototype.derivative = function (t) {\n return [(3 * t * this.a[0] + 2 * this.b[0]) * t + this.c[0], (3 * t * this.a[1] + 2 * this.b[1]) * t + this.c[1]];\n };\n\n PolynomialBezier.prototype.tangentAngle = function (t) {\n var p = this.derivative(t);\n return Math.atan2(p[1], p[0]);\n };\n\n PolynomialBezier.prototype.normalAngle = function (t) {\n var p = this.derivative(t);\n return Math.atan2(p[0], p[1]);\n };\n\n PolynomialBezier.prototype.inflectionPoints = function () {\n var denom = this.a[1] * this.b[0] - this.a[0] * this.b[1];\n if (floatZero(denom)) return [];\n var tcusp = -0.5 * (this.a[1] * this.c[0] - this.a[0] * this.c[1]) / denom;\n var square = tcusp * tcusp - 1 / 3 * (this.b[1] * this.c[0] - this.b[0] * this.c[1]) / denom;\n if (square < 0) return [];\n var root = Math.sqrt(square);\n\n if (floatZero(root)) {\n if (root > 0 && root < 1) return [tcusp];\n return [];\n }\n\n return [tcusp - root, tcusp + root].filter(function (r) {\n return r > 0 && r < 1;\n });\n };\n\n PolynomialBezier.prototype.split = function (t) {\n if (t <= 0) return [singlePoint(this.points[0]), this];\n if (t >= 1) return [this, singlePoint(this.points[this.points.length - 1])];\n var p10 = lerpPoint(this.points[0], this.points[1], t);\n var p11 = lerpPoint(this.points[1], this.points[2], t);\n var p12 = lerpPoint(this.points[2], this.points[3], t);\n var p20 = lerpPoint(p10, p11, t);\n var p21 = lerpPoint(p11, p12, t);\n var p3 = lerpPoint(p20, p21, t);\n return [new PolynomialBezier(this.points[0], p10, p20, p3, true), new PolynomialBezier(p3, p21, p12, this.points[3], true)];\n };\n\n function extrema(bez, comp) {\n var min = bez.points[0][comp];\n var max = bez.points[bez.points.length - 1][comp];\n\n if (min > max) {\n var e = max;\n max = min;\n min = e;\n } // Derivative roots to find min/max\n\n\n var f = quadRoots(3 * bez.a[comp], 2 * bez.b[comp], bez.c[comp]);\n\n for (var i = 0; i < f.length; i += 1) {\n if (f[i] > 0 && f[i] < 1) {\n var val = bez.point(f[i])[comp];\n if (val < min) min = val;else if (val > max) max = val;\n }\n }\n\n return {\n min: min,\n max: max\n };\n }\n\n PolynomialBezier.prototype.bounds = function () {\n return {\n x: extrema(this, 0),\n y: extrema(this, 1)\n };\n };\n\n PolynomialBezier.prototype.boundingBox = function () {\n var bounds = this.bounds();\n return {\n left: bounds.x.min,\n right: bounds.x.max,\n top: bounds.y.min,\n bottom: bounds.y.max,\n width: bounds.x.max - bounds.x.min,\n height: bounds.y.max - bounds.y.min,\n cx: (bounds.x.max + bounds.x.min) / 2,\n cy: (bounds.y.max + bounds.y.min) / 2\n };\n };\n\n function intersectData(bez, t1, t2) {\n var box = bez.boundingBox();\n return {\n cx: box.cx,\n cy: box.cy,\n width: box.width,\n height: box.height,\n bez: bez,\n t: (t1 + t2) / 2,\n t1: t1,\n t2: t2\n };\n }\n\n function splitData(data) {\n var split = data.bez.split(0.5);\n return [intersectData(split[0], data.t1, data.t), intersectData(split[1], data.t, data.t2)];\n }\n\n function boxIntersect(b1, b2) {\n return Math.abs(b1.cx - b2.cx) * 2 < b1.width + b2.width && Math.abs(b1.cy - b2.cy) * 2 < b1.height + b2.height;\n }\n\n function intersectsImpl(d1, d2, depth, tolerance, intersections, maxRecursion) {\n if (!boxIntersect(d1, d2)) return;\n\n if (depth >= maxRecursion || d1.width <= tolerance && d1.height <= tolerance && d2.width <= tolerance && d2.height <= tolerance) {\n intersections.push([d1.t, d2.t]);\n return;\n }\n\n var d1s = splitData(d1);\n var d2s = splitData(d2);\n intersectsImpl(d1s[0], d2s[0], depth + 1, tolerance, intersections, maxRecursion);\n intersectsImpl(d1s[0], d2s[1], depth + 1, tolerance, intersections, maxRecursion);\n intersectsImpl(d1s[1], d2s[0], depth + 1, tolerance, intersections, maxRecursion);\n intersectsImpl(d1s[1], d2s[1], depth + 1, tolerance, intersections, maxRecursion);\n }\n\n PolynomialBezier.prototype.intersections = function (other, tolerance, maxRecursion) {\n if (tolerance === undefined) tolerance = 2;\n if (maxRecursion === undefined) maxRecursion = 7;\n var intersections = [];\n intersectsImpl(intersectData(this, 0, 1), intersectData(other, 0, 1), 0, tolerance, intersections, maxRecursion);\n return intersections;\n };\n\n PolynomialBezier.shapeSegment = function (shapePath, index) {\n var nextIndex = (index + 1) % shapePath.length();\n return new PolynomialBezier(shapePath.v[index], shapePath.o[index], shapePath.i[nextIndex], shapePath.v[nextIndex], true);\n };\n\n PolynomialBezier.shapeSegmentInverted = function (shapePath, index) {\n var nextIndex = (index + 1) % shapePath.length();\n return new PolynomialBezier(shapePath.v[nextIndex], shapePath.i[nextIndex], shapePath.o[index], shapePath.v[index], true);\n };\n\n function crossProduct(a, b) {\n return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];\n }\n\n function lineIntersection(start1, end1, start2, end2) {\n var v1 = [start1[0], start1[1], 1];\n var v2 = [end1[0], end1[1], 1];\n var v3 = [start2[0], start2[1], 1];\n var v4 = [end2[0], end2[1], 1];\n var r = crossProduct(crossProduct(v1, v2), crossProduct(v3, v4));\n if (floatZero(r[2])) return null;\n return [r[0] / r[2], r[1] / r[2]];\n }\n\n function polarOffset(p, angle, length) {\n return [p[0] + Math.cos(angle) * length, p[1] - Math.sin(angle) * length];\n }\n\n function pointDistance(p1, p2) {\n return Math.hypot(p1[0] - p2[0], p1[1] - p2[1]);\n }\n\n function pointEqual(p1, p2) {\n return floatEqual(p1[0], p2[0]) && floatEqual(p1[1], p2[1]);\n }\n\n function ZigZagModifier() {}\n\n extendPrototype([ShapeModifier], ZigZagModifier);\n\n ZigZagModifier.prototype.initModifierProperties = function (elem, data) {\n this.getValue = this.processKeys;\n this.amplitude = PropertyFactory.getProp(elem, data.s, 0, null, this);\n this.frequency = PropertyFactory.getProp(elem, data.r, 0, null, this);\n this.pointsType = PropertyFactory.getProp(elem, data.pt, 0, null, this);\n this._isAnimated = this.amplitude.effectsSequence.length !== 0 || this.frequency.effectsSequence.length !== 0 || this.pointsType.effectsSequence.length !== 0;\n };\n\n function setPoint(outputBezier, point, angle, direction, amplitude, outAmplitude, inAmplitude) {\n var angO = angle - Math.PI / 2;\n var angI = angle + Math.PI / 2;\n var px = point[0] + Math.cos(angle) * direction * amplitude;\n var py = point[1] - Math.sin(angle) * direction * amplitude;\n outputBezier.setTripleAt(px, py, px + Math.cos(angO) * outAmplitude, py - Math.sin(angO) * outAmplitude, px + Math.cos(angI) * inAmplitude, py - Math.sin(angI) * inAmplitude, outputBezier.length());\n }\n\n function getPerpendicularVector(pt1, pt2) {\n var vector = [pt2[0] - pt1[0], pt2[1] - pt1[1]];\n var rot = -Math.PI * 0.5;\n var rotatedVector = [Math.cos(rot) * vector[0] - Math.sin(rot) * vector[1], Math.sin(rot) * vector[0] + Math.cos(rot) * vector[1]];\n return rotatedVector;\n }\n\n function getProjectingAngle(path, cur) {\n var prevIndex = cur === 0 ? path.length() - 1 : cur - 1;\n var nextIndex = (cur + 1) % path.length();\n var prevPoint = path.v[prevIndex];\n var nextPoint = path.v[nextIndex];\n var pVector = getPerpendicularVector(prevPoint, nextPoint);\n return Math.atan2(0, 1) - Math.atan2(pVector[1], pVector[0]);\n }\n\n function zigZagCorner(outputBezier, path, cur, amplitude, frequency, pointType, direction) {\n var angle = getProjectingAngle(path, cur);\n var point = path.v[cur % path._length];\n var prevPoint = path.v[cur === 0 ? path._length - 1 : cur - 1];\n var nextPoint = path.v[(cur + 1) % path._length];\n var prevDist = pointType === 2 ? Math.sqrt(Math.pow(point[0] - prevPoint[0], 2) + Math.pow(point[1] - prevPoint[1], 2)) : 0;\n var nextDist = pointType === 2 ? Math.sqrt(Math.pow(point[0] - nextPoint[0], 2) + Math.pow(point[1] - nextPoint[1], 2)) : 0;\n setPoint(outputBezier, path.v[cur % path._length], angle, direction, amplitude, nextDist / ((frequency + 1) * 2), prevDist / ((frequency + 1) * 2), pointType);\n }\n\n function zigZagSegment(outputBezier, segment, amplitude, frequency, pointType, direction) {\n for (var i = 0; i < frequency; i += 1) {\n var t = (i + 1) / (frequency + 1);\n var dist = pointType === 2 ? Math.sqrt(Math.pow(segment.points[3][0] - segment.points[0][0], 2) + Math.pow(segment.points[3][1] - segment.points[0][1], 2)) : 0;\n var angle = segment.normalAngle(t);\n var point = segment.point(t);\n setPoint(outputBezier, point, angle, direction, amplitude, dist / ((frequency + 1) * 2), dist / ((frequency + 1) * 2), pointType);\n direction = -direction;\n }\n\n return direction;\n }\n\n ZigZagModifier.prototype.processPath = function (path, amplitude, frequency, pointType) {\n var count = path._length;\n var clonedPath = shapePool.newElement();\n clonedPath.c = path.c;\n\n if (!path.c) {\n count -= 1;\n }\n\n if (count === 0) return clonedPath;\n var direction = -1;\n var segment = PolynomialBezier.shapeSegment(path, 0);\n zigZagCorner(clonedPath, path, 0, amplitude, frequency, pointType, direction);\n\n for (var i = 0; i < count; i += 1) {\n direction = zigZagSegment(clonedPath, segment, amplitude, frequency, pointType, -direction);\n\n if (i === count - 1 && !path.c) {\n segment = null;\n } else {\n segment = PolynomialBezier.shapeSegment(path, (i + 1) % count);\n }\n\n zigZagCorner(clonedPath, path, i + 1, amplitude, frequency, pointType, direction);\n }\n\n return clonedPath;\n };\n\n ZigZagModifier.prototype.processShapes = function (_isFirstFrame) {\n var shapePaths;\n var i;\n var len = this.shapes.length;\n var j;\n var jLen;\n var amplitude = this.amplitude.v;\n var frequency = Math.max(0, Math.round(this.frequency.v));\n var pointType = this.pointsType.v;\n\n if (amplitude !== 0) {\n var shapeData;\n var localShapeCollection;\n\n for (i = 0; i < len; i += 1) {\n shapeData = this.shapes[i];\n localShapeCollection = shapeData.localShapeCollection;\n\n if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {\n localShapeCollection.releaseShapes();\n shapeData.shape._mdf = true;\n shapePaths = shapeData.shape.paths.shapes;\n jLen = shapeData.shape.paths._length;\n\n for (j = 0; j < jLen; j += 1) {\n localShapeCollection.addShape(this.processPath(shapePaths[j], amplitude, frequency, pointType));\n }\n }\n\n shapeData.shape.paths = shapeData.localShapeCollection;\n }\n }\n\n if (!this.dynamicProperties.length) {\n this._mdf = false;\n }\n };\n\n function linearOffset(p1, p2, amount) {\n var angle = Math.atan2(p2[0] - p1[0], p2[1] - p1[1]);\n return [polarOffset(p1, angle, amount), polarOffset(p2, angle, amount)];\n }\n\n function offsetSegment(segment, amount) {\n var p0;\n var p1a;\n var p1b;\n var p2b;\n var p2a;\n var p3;\n var e;\n e = linearOffset(segment.points[0], segment.points[1], amount);\n p0 = e[0];\n p1a = e[1];\n e = linearOffset(segment.points[1], segment.points[2], amount);\n p1b = e[0];\n p2b = e[1];\n e = linearOffset(segment.points[2], segment.points[3], amount);\n p2a = e[0];\n p3 = e[1];\n var p1 = lineIntersection(p0, p1a, p1b, p2b);\n if (p1 === null) p1 = p1a;\n var p2 = lineIntersection(p2a, p3, p1b, p2b);\n if (p2 === null) p2 = p2a;\n return new PolynomialBezier(p0, p1, p2, p3);\n }\n\n function joinLines(outputBezier, seg1, seg2, lineJoin, miterLimit) {\n var p0 = seg1.points[3];\n var p1 = seg2.points[0]; // Bevel\n\n if (lineJoin === 3) return p0; // Connected, they don't need a joint\n\n if (pointEqual(p0, p1)) return p0; // Round\n\n if (lineJoin === 2) {\n var angleOut = -seg1.tangentAngle(1);\n var angleIn = -seg2.tangentAngle(0) + Math.PI;\n var center = lineIntersection(p0, polarOffset(p0, angleOut + Math.PI / 2, 100), p1, polarOffset(p1, angleOut + Math.PI / 2, 100));\n var radius = center ? pointDistance(center, p0) : pointDistance(p0, p1) / 2;\n var tan = polarOffset(p0, angleOut, 2 * radius * roundCorner);\n outputBezier.setXYAt(tan[0], tan[1], 'o', outputBezier.length() - 1);\n tan = polarOffset(p1, angleIn, 2 * radius * roundCorner);\n outputBezier.setTripleAt(p1[0], p1[1], p1[0], p1[1], tan[0], tan[1], outputBezier.length());\n return p1;\n } // Miter\n\n\n var t0 = pointEqual(p0, seg1.points[2]) ? seg1.points[0] : seg1.points[2];\n var t1 = pointEqual(p1, seg2.points[1]) ? seg2.points[3] : seg2.points[1];\n var intersection = lineIntersection(t0, p0, p1, t1);\n\n if (intersection && pointDistance(intersection, p0) < miterLimit) {\n outputBezier.setTripleAt(intersection[0], intersection[1], intersection[0], intersection[1], intersection[0], intersection[1], outputBezier.length());\n return intersection;\n }\n\n return p0;\n }\n\n function getIntersection(a, b) {\n var intersect = a.intersections(b);\n if (intersect.length && floatEqual(intersect[0][0], 1)) intersect.shift();\n if (intersect.length) return intersect[0];\n return null;\n }\n\n function pruneSegmentIntersection(a, b) {\n var outa = a.slice();\n var outb = b.slice();\n var intersect = getIntersection(a[a.length - 1], b[0]);\n\n if (intersect) {\n outa[a.length - 1] = a[a.length - 1].split(intersect[0])[0];\n outb[0] = b[0].split(intersect[1])[1];\n }\n\n if (a.length > 1 && b.length > 1) {\n intersect = getIntersection(a[0], b[b.length - 1]);\n\n if (intersect) {\n return [[a[0].split(intersect[0])[0]], [b[b.length - 1].split(intersect[1])[1]]];\n }\n }\n\n return [outa, outb];\n }\n\n function pruneIntersections(segments) {\n var e;\n\n for (var i = 1; i < segments.length; i += 1) {\n e = pruneSegmentIntersection(segments[i - 1], segments[i]);\n segments[i - 1] = e[0];\n segments[i] = e[1];\n }\n\n if (segments.length > 1) {\n e = pruneSegmentIntersection(segments[segments.length - 1], segments[0]);\n segments[segments.length - 1] = e[0];\n segments[0] = e[1];\n }\n\n return segments;\n }\n\n function offsetSegmentSplit(segment, amount) {\n /*\r\n We split each bezier segment into smaller pieces based\r\n on inflection points, this ensures the control point\r\n polygon is convex.\r\n (A cubic bezier can have none, one, or two inflection points)\r\n */\n var flex = segment.inflectionPoints();\n var left;\n var right;\n var split;\n var mid;\n\n if (flex.length === 0) {\n return [offsetSegment(segment, amount)];\n }\n\n if (flex.length === 1 || floatEqual(flex[1], 1)) {\n split = segment.split(flex[0]);\n left = split[0];\n right = split[1];\n return [offsetSegment(left, amount), offsetSegment(right, amount)];\n }\n\n split = segment.split(flex[0]);\n left = split[0];\n var t = (flex[1] - flex[0]) / (1 - flex[0]);\n split = split[1].split(t);\n mid = split[0];\n right = split[1];\n return [offsetSegment(left, amount), offsetSegment(mid, amount), offsetSegment(right, amount)];\n }\n\n function OffsetPathModifier() {}\n\n extendPrototype([ShapeModifier], OffsetPathModifier);\n\n OffsetPathModifier.prototype.initModifierProperties = function (elem, data) {\n this.getValue = this.processKeys;\n this.amount = PropertyFactory.getProp(elem, data.a, 0, null, this);\n this.miterLimit = PropertyFactory.getProp(elem, data.ml, 0, null, this);\n this.lineJoin = data.lj;\n this._isAnimated = this.amount.effectsSequence.length !== 0;\n };\n\n OffsetPathModifier.prototype.processPath = function (inputBezier, amount, lineJoin, miterLimit) {\n var outputBezier = shapePool.newElement();\n outputBezier.c = inputBezier.c;\n var count = inputBezier.length();\n\n if (!inputBezier.c) {\n count -= 1;\n }\n\n var i;\n var j;\n var segment;\n var multiSegments = [];\n\n for (i = 0; i < count; i += 1) {\n segment = PolynomialBezier.shapeSegment(inputBezier, i);\n multiSegments.push(offsetSegmentSplit(segment, amount));\n }\n\n if (!inputBezier.c) {\n for (i = count - 1; i >= 0; i -= 1) {\n segment = PolynomialBezier.shapeSegmentInverted(inputBezier, i);\n multiSegments.push(offsetSegmentSplit(segment, amount));\n }\n }\n\n multiSegments = pruneIntersections(multiSegments); // Add bezier segments to the output and apply line joints\n\n var lastPoint = null;\n var lastSeg = null;\n\n for (i = 0; i < multiSegments.length; i += 1) {\n var multiSegment = multiSegments[i];\n if (lastSeg) lastPoint = joinLines(outputBezier, lastSeg, multiSegment[0], lineJoin, miterLimit);\n lastSeg = multiSegment[multiSegment.length - 1];\n\n for (j = 0; j < multiSegment.length; j += 1) {\n segment = multiSegment[j];\n\n if (lastPoint && pointEqual(segment.points[0], lastPoint)) {\n outputBezier.setXYAt(segment.points[1][0], segment.points[1][1], 'o', outputBezier.length() - 1);\n } else {\n outputBezier.setTripleAt(segment.points[0][0], segment.points[0][1], segment.points[1][0], segment.points[1][1], segment.points[0][0], segment.points[0][1], outputBezier.length());\n }\n\n outputBezier.setTripleAt(segment.points[3][0], segment.points[3][1], segment.points[3][0], segment.points[3][1], segment.points[2][0], segment.points[2][1], outputBezier.length());\n lastPoint = segment.points[3];\n }\n }\n\n if (multiSegments.length) joinLines(outputBezier, lastSeg, multiSegments[0][0], lineJoin, miterLimit);\n return outputBezier;\n };\n\n OffsetPathModifier.prototype.processShapes = function (_isFirstFrame) {\n var shapePaths;\n var i;\n var len = this.shapes.length;\n var j;\n var jLen;\n var amount = this.amount.v;\n var miterLimit = this.miterLimit.v;\n var lineJoin = this.lineJoin;\n\n if (amount !== 0) {\n var shapeData;\n var localShapeCollection;\n\n for (i = 0; i < len; i += 1) {\n shapeData = this.shapes[i];\n localShapeCollection = shapeData.localShapeCollection;\n\n if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {\n localShapeCollection.releaseShapes();\n shapeData.shape._mdf = true;\n shapePaths = shapeData.shape.paths.shapes;\n jLen = shapeData.shape.paths._length;\n\n for (j = 0; j < jLen; j += 1) {\n localShapeCollection.addShape(this.processPath(shapePaths[j], amount, lineJoin, miterLimit));\n }\n }\n\n shapeData.shape.paths = shapeData.localShapeCollection;\n }\n }\n\n if (!this.dynamicProperties.length) {\n this._mdf = false;\n }\n };\n\n function getFontProperties(fontData) {\n var styles = fontData.fStyle ? fontData.fStyle.split(' ') : [];\n var fWeight = 'normal';\n var fStyle = 'normal';\n var len = styles.length;\n var styleName;\n\n for (var i = 0; i < len; i += 1) {\n styleName = styles[i].toLowerCase();\n\n switch (styleName) {\n case 'italic':\n fStyle = 'italic';\n break;\n\n case 'bold':\n fWeight = '700';\n break;\n\n case 'black':\n fWeight = '900';\n break;\n\n case 'medium':\n fWeight = '500';\n break;\n\n case 'regular':\n case 'normal':\n fWeight = '400';\n break;\n\n case 'light':\n case 'thin':\n fWeight = '200';\n break;\n\n default:\n break;\n }\n }\n\n return {\n style: fStyle,\n weight: fontData.fWeight || fWeight\n };\n }\n\n var FontManager = function () {\n var maxWaitingTime = 5000;\n var emptyChar = {\n w: 0,\n size: 0,\n shapes: [],\n data: {\n shapes: []\n }\n };\n var combinedCharacters = []; // Hindi characters\n\n combinedCharacters = combinedCharacters.concat([2304, 2305, 2306, 2307, 2362, 2363, 2364, 2364, 2366, 2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 2380, 2381, 2382, 2383, 2387, 2388, 2389, 2390, 2391, 2402, 2403]);\n var BLACK_FLAG_CODE_POINT = 127988;\n var CANCEL_TAG_CODE_POINT = 917631;\n var A_TAG_CODE_POINT = 917601;\n var Z_TAG_CODE_POINT = 917626;\n var VARIATION_SELECTOR_16_CODE_POINT = 65039;\n var ZERO_WIDTH_JOINER_CODE_POINT = 8205;\n var REGIONAL_CHARACTER_A_CODE_POINT = 127462;\n var REGIONAL_CHARACTER_Z_CODE_POINT = 127487;\n var surrogateModifiers = ['d83cdffb', 'd83cdffc', 'd83cdffd', 'd83cdffe', 'd83cdfff'];\n\n function trimFontOptions(font) {\n var familyArray = font.split(',');\n var i;\n var len = familyArray.length;\n var enabledFamilies = [];\n\n for (i = 0; i < len; i += 1) {\n if (familyArray[i] !== 'sans-serif' && familyArray[i] !== 'monospace') {\n enabledFamilies.push(familyArray[i]);\n }\n }\n\n return enabledFamilies.join(',');\n }\n\n function setUpNode(font, family) {\n var parentNode = createTag('span'); // Node is invisible to screen readers.\n\n parentNode.setAttribute('aria-hidden', true);\n parentNode.style.fontFamily = family;\n var node = createTag('span'); // Characters that vary significantly among different fonts\n\n node.innerText = 'giItT1WQy@!-/#'; // Visible - so we can measure it - but not on the screen\n\n parentNode.style.position = 'absolute';\n parentNode.style.left = '-10000px';\n parentNode.style.top = '-10000px'; // Large font size makes even subtle changes obvious\n\n parentNode.style.fontSize = '300px'; // Reset any font properties\n\n parentNode.style.fontVariant = 'normal';\n parentNode.style.fontStyle = 'normal';\n parentNode.style.fontWeight = 'normal';\n parentNode.style.letterSpacing = '0';\n parentNode.appendChild(node);\n document.body.appendChild(parentNode); // Remember width with no applied web font\n\n var width = node.offsetWidth;\n node.style.fontFamily = trimFontOptions(font) + ', ' + family;\n return {\n node: node,\n w: width,\n parent: parentNode\n };\n }\n\n function checkLoadedFonts() {\n var i;\n var len = this.fonts.length;\n var node;\n var w;\n var loadedCount = len;\n\n for (i = 0; i < len; i += 1) {\n if (this.fonts[i].loaded) {\n loadedCount -= 1;\n } else if (this.fonts[i].fOrigin === 'n' || this.fonts[i].origin === 0) {\n this.fonts[i].loaded = true;\n } else {\n node = this.fonts[i].monoCase.node;\n w = this.fonts[i].monoCase.w;\n\n if (node.offsetWidth !== w) {\n loadedCount -= 1;\n this.fonts[i].loaded = true;\n } else {\n node = this.fonts[i].sansCase.node;\n w = this.fonts[i].sansCase.w;\n\n if (node.offsetWidth !== w) {\n loadedCount -= 1;\n this.fonts[i].loaded = true;\n }\n }\n\n if (this.fonts[i].loaded) {\n this.fonts[i].sansCase.parent.parentNode.removeChild(this.fonts[i].sansCase.parent);\n this.fonts[i].monoCase.parent.parentNode.removeChild(this.fonts[i].monoCase.parent);\n }\n }\n }\n\n if (loadedCount !== 0 && Date.now() - this.initTime < maxWaitingTime) {\n setTimeout(this.checkLoadedFontsBinded, 20);\n } else {\n setTimeout(this.setIsLoadedBinded, 10);\n }\n }\n\n function createHelper(fontData, def) {\n var engine = document.body && def ? 'svg' : 'canvas';\n var helper;\n var fontProps = getFontProperties(fontData);\n\n if (engine === 'svg') {\n var tHelper = createNS('text');\n tHelper.style.fontSize = '100px'; // tHelper.style.fontFamily = fontData.fFamily;\n\n tHelper.setAttribute('font-family', fontData.fFamily);\n tHelper.setAttribute('font-style', fontProps.style);\n tHelper.setAttribute('font-weight', fontProps.weight);\n tHelper.textContent = '1';\n\n if (fontData.fClass) {\n tHelper.style.fontFamily = 'inherit';\n tHelper.setAttribute('class', fontData.fClass);\n } else {\n tHelper.style.fontFamily = fontData.fFamily;\n }\n\n def.appendChild(tHelper);\n helper = tHelper;\n } else {\n var tCanvasHelper = new OffscreenCanvas(500, 500).getContext('2d');\n tCanvasHelper.font = fontProps.style + ' ' + fontProps.weight + ' 100px ' + fontData.fFamily;\n helper = tCanvasHelper;\n }\n\n function measure(text) {\n if (engine === 'svg') {\n helper.textContent = text;\n return helper.getComputedTextLength();\n }\n\n return helper.measureText(text).width;\n }\n\n return {\n measureText: measure\n };\n }\n\n function addFonts(fontData, defs) {\n if (!fontData) {\n this.isLoaded = true;\n return;\n }\n\n if (this.chars) {\n this.isLoaded = true;\n this.fonts = fontData.list;\n return;\n }\n\n if (!document.body) {\n this.isLoaded = true;\n fontData.list.forEach(function (data) {\n data.helper = createHelper(data);\n data.cache = {};\n });\n this.fonts = fontData.list;\n return;\n }\n\n var fontArr = fontData.list;\n var i;\n var len = fontArr.length;\n var _pendingFonts = len;\n\n for (i = 0; i < len; i += 1) {\n var shouldLoadFont = true;\n var loadedSelector;\n var j;\n fontArr[i].loaded = false;\n fontArr[i].monoCase = setUpNode(fontArr[i].fFamily, 'monospace');\n fontArr[i].sansCase = setUpNode(fontArr[i].fFamily, 'sans-serif');\n\n if (!fontArr[i].fPath) {\n fontArr[i].loaded = true;\n _pendingFonts -= 1;\n } else if (fontArr[i].fOrigin === 'p' || fontArr[i].origin === 3) {\n loadedSelector = document.querySelectorAll('style[f-forigin=\"p\"][f-family=\"' + fontArr[i].fFamily + '\"], style[f-origin=\"3\"][f-family=\"' + fontArr[i].fFamily + '\"]');\n\n if (loadedSelector.length > 0) {\n shouldLoadFont = false;\n }\n\n if (shouldLoadFont) {\n var s = createTag('style');\n s.setAttribute('f-forigin', fontArr[i].fOrigin);\n s.setAttribute('f-origin', fontArr[i].origin);\n s.setAttribute('f-family', fontArr[i].fFamily);\n s.type = 'text/css';\n s.innerText = '@font-face {font-family: ' + fontArr[i].fFamily + \"; font-style: normal; src: url('\" + fontArr[i].fPath + \"');}\";\n defs.appendChild(s);\n }\n } else if (fontArr[i].fOrigin === 'g' || fontArr[i].origin === 1) {\n loadedSelector = document.querySelectorAll('link[f-forigin=\"g\"], link[f-origin=\"1\"]');\n\n for (j = 0; j < loadedSelector.length; j += 1) {\n if (loadedSelector[j].href.indexOf(fontArr[i].fPath) !== -1) {\n // Font is already loaded\n shouldLoadFont = false;\n }\n }\n\n if (shouldLoadFont) {\n var l = createTag('link');\n l.setAttribute('f-forigin', fontArr[i].fOrigin);\n l.setAttribute('f-origin', fontArr[i].origin);\n l.type = 'text/css';\n l.rel = 'stylesheet';\n l.href = fontArr[i].fPath;\n document.body.appendChild(l);\n }\n } else if (fontArr[i].fOrigin === 't' || fontArr[i].origin === 2) {\n loadedSelector = document.querySelectorAll('script[f-forigin=\"t\"], script[f-origin=\"2\"]');\n\n for (j = 0; j < loadedSelector.length; j += 1) {\n if (fontArr[i].fPath === loadedSelector[j].src) {\n // Font is already loaded\n shouldLoadFont = false;\n }\n }\n\n if (shouldLoadFont) {\n var sc = createTag('link');\n sc.setAttribute('f-forigin', fontArr[i].fOrigin);\n sc.setAttribute('f-origin', fontArr[i].origin);\n sc.setAttribute('rel', 'stylesheet');\n sc.setAttribute('href', fontArr[i].fPath);\n defs.appendChild(sc);\n }\n }\n\n fontArr[i].helper = createHelper(fontArr[i], defs);\n fontArr[i].cache = {};\n this.fonts.push(fontArr[i]);\n }\n\n if (_pendingFonts === 0) {\n this.isLoaded = true;\n } else {\n // On some cases even if the font is loaded, it won't load correctly when measuring text on canvas.\n // Adding this timeout seems to fix it\n setTimeout(this.checkLoadedFonts.bind(this), 100);\n }\n }\n\n function addChars(chars) {\n if (!chars) {\n return;\n }\n\n if (!this.chars) {\n this.chars = [];\n }\n\n var i;\n var len = chars.length;\n var j;\n var jLen = this.chars.length;\n var found;\n\n for (i = 0; i < len; i += 1) {\n j = 0;\n found = false;\n\n while (j < jLen) {\n if (this.chars[j].style === chars[i].style && this.chars[j].fFamily === chars[i].fFamily && this.chars[j].ch === chars[i].ch) {\n found = true;\n }\n\n j += 1;\n }\n\n if (!found) {\n this.chars.push(chars[i]);\n jLen += 1;\n }\n }\n }\n\n function getCharData(_char, style, font) {\n var i = 0;\n var len = this.chars.length;\n\n while (i < len) {\n if (this.chars[i].ch === _char && this.chars[i].style === style && this.chars[i].fFamily === font) {\n return this.chars[i];\n }\n\n i += 1;\n }\n\n if ((typeof _char === 'string' && _char.charCodeAt(0) !== 13 || !_char) && console && console.warn // eslint-disable-line no-console\n && !this._warned) {\n this._warned = true;\n console.warn('Missing character from exported characters list: ', _char, style, font); // eslint-disable-line no-console\n }\n\n return emptyChar;\n }\n\n function measureText(_char2, fontName, size) {\n var fontData = this.getFontByName(fontName); // Using the char instead of char.charCodeAt(0)\n // to avoid collisions between equal chars\n\n var index = _char2;\n\n if (!fontData.cache[index]) {\n var tHelper = fontData.helper;\n\n if (_char2 === ' ') {\n var doubleSize = tHelper.measureText('|' + _char2 + '|');\n var singleSize = tHelper.measureText('||');\n fontData.cache[index] = (doubleSize - singleSize) / 100;\n } else {\n fontData.cache[index] = tHelper.measureText(_char2) / 100;\n }\n }\n\n return fontData.cache[index] * size;\n }\n\n function getFontByName(name) {\n var i = 0;\n var len = this.fonts.length;\n\n while (i < len) {\n if (this.fonts[i].fName === name) {\n return this.fonts[i];\n }\n\n i += 1;\n }\n\n return this.fonts[0];\n }\n\n function getCodePoint(string) {\n var codePoint = 0;\n var first = string.charCodeAt(0);\n\n if (first >= 0xD800 && first <= 0xDBFF) {\n var second = string.charCodeAt(1);\n\n if (second >= 0xDC00 && second <= 0xDFFF) {\n codePoint = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;\n }\n }\n\n return codePoint;\n } // Skin tone modifiers\n\n\n function isModifier(firstCharCode, secondCharCode) {\n var sum = firstCharCode.toString(16) + secondCharCode.toString(16);\n return surrogateModifiers.indexOf(sum) !== -1;\n }\n\n function isZeroWidthJoiner(charCode) {\n return charCode === ZERO_WIDTH_JOINER_CODE_POINT;\n } // This codepoint may change the appearance of the preceding character.\n // If that is a symbol, dingbat or emoji, U+FE0F forces it to be rendered\n // as a colorful image as compared to a monochrome text variant.\n\n\n function isVariationSelector(charCode) {\n return charCode === VARIATION_SELECTOR_16_CODE_POINT;\n } // The regional indicator symbols are a set of 26 alphabetic Unicode\n /// characters (A–Z) intended to be used to encode ISO 3166-1 alpha-2\n // two-letter country codes in a way that allows optional special treatment.\n\n\n function isRegionalCode(string) {\n var codePoint = getCodePoint(string);\n\n if (codePoint >= REGIONAL_CHARACTER_A_CODE_POINT && codePoint <= REGIONAL_CHARACTER_Z_CODE_POINT) {\n return true;\n }\n\n return false;\n } // Some Emoji implementations represent combinations of\n // two “regional indicator” letters as a single flag symbol.\n\n\n function isFlagEmoji(string) {\n return isRegionalCode(string.substr(0, 2)) && isRegionalCode(string.substr(2, 2));\n }\n\n function isCombinedCharacter(_char3) {\n return combinedCharacters.indexOf(_char3) !== -1;\n } // Regional flags start with a BLACK_FLAG_CODE_POINT\n // folowed by 5 chars in the TAG range\n // and end with a CANCEL_TAG_CODE_POINT\n\n\n function isRegionalFlag(text, index) {\n var codePoint = getCodePoint(text.substr(index, 2));\n\n if (codePoint !== BLACK_FLAG_CODE_POINT) {\n return false;\n }\n\n var count = 0;\n index += 2;\n\n while (count < 5) {\n codePoint = getCodePoint(text.substr(index, 2));\n\n if (codePoint < A_TAG_CODE_POINT || codePoint > Z_TAG_CODE_POINT) {\n return false;\n }\n\n count += 1;\n index += 2;\n }\n\n return getCodePoint(text.substr(index, 2)) === CANCEL_TAG_CODE_POINT;\n }\n\n function setIsLoaded() {\n this.isLoaded = true;\n }\n\n var Font = function Font() {\n this.fonts = [];\n this.chars = null;\n this.typekitLoaded = 0;\n this.isLoaded = false;\n this._warned = false;\n this.initTime = Date.now();\n this.setIsLoadedBinded = this.setIsLoaded.bind(this);\n this.checkLoadedFontsBinded = this.checkLoadedFonts.bind(this);\n };\n\n Font.isModifier = isModifier;\n Font.isZeroWidthJoiner = isZeroWidthJoiner;\n Font.isFlagEmoji = isFlagEmoji;\n Font.isRegionalCode = isRegionalCode;\n Font.isCombinedCharacter = isCombinedCharacter;\n Font.isRegionalFlag = isRegionalFlag;\n Font.isVariationSelector = isVariationSelector;\n Font.BLACK_FLAG_CODE_POINT = BLACK_FLAG_CODE_POINT;\n var fontPrototype = {\n addChars: addChars,\n addFonts: addFonts,\n getCharData: getCharData,\n getFontByName: getFontByName,\n measureText: measureText,\n checkLoadedFonts: checkLoadedFonts,\n setIsLoaded: setIsLoaded\n };\n Font.prototype = fontPrototype;\n return Font;\n }();\n\n function SlotManager(animationData) {\n this.animationData = animationData;\n }\n\n SlotManager.prototype.getProp = function (data) {\n if (this.animationData.slots && this.animationData.slots[data.sid]) {\n return Object.assign(data, this.animationData.slots[data.sid].p);\n }\n\n return data;\n };\n\n function slotFactory(animationData) {\n return new SlotManager(animationData);\n }\n\n function RenderableElement() {}\n\n RenderableElement.prototype = {\n initRenderable: function initRenderable() {\n // layer's visibility related to inpoint and outpoint. Rename isVisible to isInRange\n this.isInRange = false; // layer's display state\n\n this.hidden = false; // If layer's transparency equals 0, it can be hidden\n\n this.isTransparent = false; // list of animated components\n\n this.renderableComponents = [];\n },\n addRenderableComponent: function addRenderableComponent(component) {\n if (this.renderableComponents.indexOf(component) === -1) {\n this.renderableComponents.push(component);\n }\n },\n removeRenderableComponent: function removeRenderableComponent(component) {\n if (this.renderableComponents.indexOf(component) !== -1) {\n this.renderableComponents.splice(this.renderableComponents.indexOf(component), 1);\n }\n },\n prepareRenderableFrame: function prepareRenderableFrame(num) {\n this.checkLayerLimits(num);\n },\n checkTransparency: function checkTransparency() {\n if (this.finalTransform.mProp.o.v <= 0) {\n if (!this.isTransparent && this.globalData.renderConfig.hideOnTransparent) {\n this.isTransparent = true;\n this.hide();\n }\n } else if (this.isTransparent) {\n this.isTransparent = false;\n this.show();\n }\n },\n\n /**\r\n * @function\r\n * Initializes frame related properties.\r\n *\r\n * @param {number} num\r\n * current frame number in Layer's time\r\n *\r\n */\n checkLayerLimits: function checkLayerLimits(num) {\n if (this.data.ip - this.data.st <= num && this.data.op - this.data.st > num) {\n if (this.isInRange !== true) {\n this.globalData._mdf = true;\n this._mdf = true;\n this.isInRange = true;\n this.show();\n }\n } else if (this.isInRange !== false) {\n this.globalData._mdf = true;\n this.isInRange = false;\n this.hide();\n }\n },\n renderRenderable: function renderRenderable() {\n var i;\n var len = this.renderableComponents.length;\n\n for (i = 0; i < len; i += 1) {\n this.renderableComponents[i].renderFrame(this._isFirstFrame);\n }\n /* this.maskManager.renderFrame(this.finalTransform.mat);\r\n this.renderableEffectsManager.renderFrame(this._isFirstFrame); */\n\n },\n sourceRectAtTime: function sourceRectAtTime() {\n return {\n top: 0,\n left: 0,\n width: 100,\n height: 100\n };\n },\n getLayerSize: function getLayerSize() {\n if (this.data.ty === 5) {\n return {\n w: this.data.textData.width,\n h: this.data.textData.height\n };\n }\n\n return {\n w: this.data.width,\n h: this.data.height\n };\n }\n };\n\n var getBlendMode = function () {\n var blendModeEnums = {\n 0: 'source-over',\n 1: 'multiply',\n 2: 'screen',\n 3: 'overlay',\n 4: 'darken',\n 5: 'lighten',\n 6: 'color-dodge',\n 7: 'color-burn',\n 8: 'hard-light',\n 9: 'soft-light',\n 10: 'difference',\n 11: 'exclusion',\n 12: 'hue',\n 13: 'saturation',\n 14: 'color',\n 15: 'luminosity'\n };\n return function (mode) {\n return blendModeEnums[mode] || '';\n };\n }();\n\n function SliderEffect(data, elem, container) {\n this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);\n }\n\n function AngleEffect(data, elem, container) {\n this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);\n }\n\n function ColorEffect(data, elem, container) {\n this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);\n }\n\n function PointEffect(data, elem, container) {\n this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);\n }\n\n function LayerIndexEffect(data, elem, container) {\n this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);\n }\n\n function MaskIndexEffect(data, elem, container) {\n this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);\n }\n\n function CheckboxEffect(data, elem, container) {\n this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);\n }\n\n function NoValueEffect() {\n this.p = {};\n }\n\n function EffectsManager(data, element) {\n var effects = data.ef || [];\n this.effectElements = [];\n var i;\n var len = effects.length;\n var effectItem;\n\n for (i = 0; i < len; i += 1) {\n effectItem = new GroupEffect(effects[i], element);\n this.effectElements.push(effectItem);\n }\n }\n\n function GroupEffect(data, element) {\n this.init(data, element);\n }\n\n extendPrototype([DynamicPropertyContainer], GroupEffect);\n GroupEffect.prototype.getValue = GroupEffect.prototype.iterateDynamicProperties;\n\n GroupEffect.prototype.init = function (data, element) {\n this.data = data;\n this.effectElements = [];\n this.initDynamicPropertyContainer(element);\n var i;\n var len = this.data.ef.length;\n var eff;\n var effects = this.data.ef;\n\n for (i = 0; i < len; i += 1) {\n eff = null;\n\n switch (effects[i].ty) {\n case 0:\n eff = new SliderEffect(effects[i], element, this);\n break;\n\n case 1:\n eff = new AngleEffect(effects[i], element, this);\n break;\n\n case 2:\n eff = new ColorEffect(effects[i], element, this);\n break;\n\n case 3:\n eff = new PointEffect(effects[i], element, this);\n break;\n\n case 4:\n case 7:\n eff = new CheckboxEffect(effects[i], element, this);\n break;\n\n case 10:\n eff = new LayerIndexEffect(effects[i], element, this);\n break;\n\n case 11:\n eff = new MaskIndexEffect(effects[i], element, this);\n break;\n\n case 5:\n eff = new EffectsManager(effects[i], element, this);\n break;\n // case 6:\n\n default:\n eff = new NoValueEffect(effects[i], element, this);\n break;\n }\n\n if (eff) {\n this.effectElements.push(eff);\n }\n }\n };\n\n function BaseElement() {}\n\n BaseElement.prototype = {\n checkMasks: function checkMasks() {\n if (!this.data.hasMask) {\n return false;\n }\n\n var i = 0;\n var len = this.data.masksProperties.length;\n\n while (i < len) {\n if (this.data.masksProperties[i].mode !== 'n' && this.data.masksProperties[i].cl !== false) {\n return true;\n }\n\n i += 1;\n }\n\n return false;\n },\n initExpressions: function initExpressions() {\n var expressionsInterfaces = getExpressionInterfaces();\n\n if (!expressionsInterfaces) {\n return;\n }\n\n var LayerExpressionInterface = expressionsInterfaces('layer');\n var EffectsExpressionInterface = expressionsInterfaces('effects');\n var ShapeExpressionInterface = expressionsInterfaces('shape');\n var TextExpressionInterface = expressionsInterfaces('text');\n var CompExpressionInterface = expressionsInterfaces('comp');\n this.layerInterface = LayerExpressionInterface(this);\n\n if (this.data.hasMask && this.maskManager) {\n this.layerInterface.registerMaskInterface(this.maskManager);\n }\n\n var effectsInterface = EffectsExpressionInterface.createEffectsInterface(this, this.layerInterface);\n this.layerInterface.registerEffectsInterface(effectsInterface);\n\n if (this.data.ty === 0 || this.data.xt) {\n this.compInterface = CompExpressionInterface(this);\n } else if (this.data.ty === 4) {\n this.layerInterface.shapeInterface = ShapeExpressionInterface(this.shapesData, this.itemsData, this.layerInterface);\n this.layerInterface.content = this.layerInterface.shapeInterface;\n } else if (this.data.ty === 5) {\n this.layerInterface.textInterface = TextExpressionInterface(this);\n this.layerInterface.text = this.layerInterface.textInterface;\n }\n },\n setBlendMode: function setBlendMode() {\n var blendModeValue = getBlendMode(this.data.bm);\n var elem = this.baseElement || this.layerElement;\n elem.style['mix-blend-mode'] = blendModeValue;\n },\n initBaseData: function initBaseData(data, globalData, comp) {\n this.globalData = globalData;\n this.comp = comp;\n this.data = data;\n this.layerId = createElementID(); // Stretch factor for old animations missing this property.\n\n if (!this.data.sr) {\n this.data.sr = 1;\n } // effects manager\n\n\n this.effectsManager = new EffectsManager(this.data, this, this.dynamicProperties);\n },\n getType: function getType() {\n return this.type;\n },\n sourceRectAtTime: function sourceRectAtTime() {}\n };\n\n /**\r\n * @file\r\n * Handles element's layer frame update.\r\n * Checks layer in point and out point\r\n *\r\n */\n function FrameElement() {}\n\n FrameElement.prototype = {\n /**\r\n * @function\r\n * Initializes frame related properties.\r\n *\r\n */\n initFrame: function initFrame() {\n // set to true when inpoint is rendered\n this._isFirstFrame = false; // list of animated properties\n\n this.dynamicProperties = []; // If layer has been modified in current tick this will be true\n\n this._mdf = false;\n },\n\n /**\r\n * @function\r\n * Calculates all dynamic values\r\n *\r\n * @param {number} num\r\n * current frame number in Layer's time\r\n * @param {boolean} isVisible\r\n * if layers is currently in range\r\n *\r\n */\n prepareProperties: function prepareProperties(num, isVisible) {\n var i;\n var len = this.dynamicProperties.length;\n\n for (i = 0; i < len; i += 1) {\n if (isVisible || this._isParent && this.dynamicProperties[i].propType === 'transform') {\n this.dynamicProperties[i].getValue();\n\n if (this.dynamicProperties[i]._mdf) {\n this.globalData._mdf = true;\n this._mdf = true;\n }\n }\n }\n },\n addDynamicProperty: function addDynamicProperty(prop) {\n if (this.dynamicProperties.indexOf(prop) === -1) {\n this.dynamicProperties.push(prop);\n }\n }\n };\n\n function FootageElement(data, globalData, comp) {\n this.initFrame();\n this.initRenderable();\n this.assetData = globalData.getAssetData(data.refId);\n this.footageData = globalData.imageLoader.getAsset(this.assetData);\n this.initBaseData(data, globalData, comp);\n }\n\n FootageElement.prototype.prepareFrame = function () {};\n\n extendPrototype([RenderableElement, BaseElement, FrameElement], FootageElement);\n\n FootageElement.prototype.getBaseElement = function () {\n return null;\n };\n\n FootageElement.prototype.renderFrame = function () {};\n\n FootageElement.prototype.destroy = function () {};\n\n FootageElement.prototype.initExpressions = function () {\n var expressionsInterfaces = getExpressionInterfaces();\n\n if (!expressionsInterfaces) {\n return;\n }\n\n var FootageInterface = expressionsInterfaces('footage');\n this.layerInterface = FootageInterface(this);\n };\n\n FootageElement.prototype.getFootageData = function () {\n return this.footageData;\n };\n\n function AudioElement(data, globalData, comp) {\n this.initFrame();\n this.initRenderable();\n this.assetData = globalData.getAssetData(data.refId);\n this.initBaseData(data, globalData, comp);\n this._isPlaying = false;\n this._canPlay = false;\n var assetPath = this.globalData.getAssetsPath(this.assetData);\n this.audio = this.globalData.audioController.createAudio(assetPath);\n this._currentTime = 0;\n this.globalData.audioController.addAudio(this);\n this._volumeMultiplier = 1;\n this._volume = 1;\n this._previousVolume = null;\n this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {\n _placeholder: true\n };\n this.lv = PropertyFactory.getProp(this, data.au && data.au.lv ? data.au.lv : {\n k: [100]\n }, 1, 0.01, this);\n }\n\n AudioElement.prototype.prepareFrame = function (num) {\n this.prepareRenderableFrame(num, true);\n this.prepareProperties(num, true);\n\n if (!this.tm._placeholder) {\n var timeRemapped = this.tm.v;\n this._currentTime = timeRemapped;\n } else {\n this._currentTime = num / this.data.sr;\n }\n\n this._volume = this.lv.v[0];\n var totalVolume = this._volume * this._volumeMultiplier;\n\n if (this._previousVolume !== totalVolume) {\n this._previousVolume = totalVolume;\n this.audio.volume(totalVolume);\n }\n };\n\n extendPrototype([RenderableElement, BaseElement, FrameElement], AudioElement);\n\n AudioElement.prototype.renderFrame = function () {\n if (this.isInRange && this._canPlay) {\n if (!this._isPlaying) {\n this.audio.play();\n this.audio.seek(this._currentTime / this.globalData.frameRate);\n this._isPlaying = true;\n } else if (!this.audio.playing() || Math.abs(this._currentTime / this.globalData.frameRate - this.audio.seek()) > 0.1) {\n this.audio.seek(this._currentTime / this.globalData.frameRate);\n }\n }\n };\n\n AudioElement.prototype.show = function () {// this.audio.play()\n };\n\n AudioElement.prototype.hide = function () {\n this.audio.pause();\n this._isPlaying = false;\n };\n\n AudioElement.prototype.pause = function () {\n this.audio.pause();\n this._isPlaying = false;\n this._canPlay = false;\n };\n\n AudioElement.prototype.resume = function () {\n this._canPlay = true;\n };\n\n AudioElement.prototype.setRate = function (rateValue) {\n this.audio.rate(rateValue);\n };\n\n AudioElement.prototype.volume = function (volumeValue) {\n this._volumeMultiplier = volumeValue;\n this._previousVolume = volumeValue * this._volume;\n this.audio.volume(this._previousVolume);\n };\n\n AudioElement.prototype.getBaseElement = function () {\n return null;\n };\n\n AudioElement.prototype.destroy = function () {};\n\n AudioElement.prototype.sourceRectAtTime = function () {};\n\n AudioElement.prototype.initExpressions = function () {};\n\n function BaseRenderer() {}\n\n BaseRenderer.prototype.checkLayers = function (num) {\n var i;\n var len = this.layers.length;\n var data;\n this.completeLayers = true;\n\n for (i = len - 1; i >= 0; i -= 1) {\n if (!this.elements[i]) {\n data = this.layers[i];\n\n if (data.ip - data.st <= num - this.layers[i].st && data.op - data.st > num - this.layers[i].st) {\n this.buildItem(i);\n }\n }\n\n this.completeLayers = this.elements[i] ? this.completeLayers : false;\n }\n\n this.checkPendingElements();\n };\n\n BaseRenderer.prototype.createItem = function (layer) {\n switch (layer.ty) {\n case 2:\n return this.createImage(layer);\n\n case 0:\n return this.createComp(layer);\n\n case 1:\n return this.createSolid(layer);\n\n case 3:\n return this.createNull(layer);\n\n case 4:\n return this.createShape(layer);\n\n case 5:\n return this.createText(layer);\n\n case 6:\n return this.createAudio(layer);\n\n case 13:\n return this.createCamera(layer);\n\n case 15:\n return this.createFootage(layer);\n\n default:\n return this.createNull(layer);\n }\n };\n\n BaseRenderer.prototype.createCamera = function () {\n throw new Error('You\\'re using a 3d camera. Try the html renderer.');\n };\n\n BaseRenderer.prototype.createAudio = function (data) {\n return new AudioElement(data, this.globalData, this);\n };\n\n BaseRenderer.prototype.createFootage = function (data) {\n return new FootageElement(data, this.globalData, this);\n };\n\n BaseRenderer.prototype.buildAllItems = function () {\n var i;\n var len = this.layers.length;\n\n for (i = 0; i < len; i += 1) {\n this.buildItem(i);\n }\n\n this.checkPendingElements();\n };\n\n BaseRenderer.prototype.includeLayers = function (newLayers) {\n this.completeLayers = false;\n var i;\n var len = newLayers.length;\n var j;\n var jLen = this.layers.length;\n\n for (i = 0; i < len; i += 1) {\n j = 0;\n\n while (j < jLen) {\n if (this.layers[j].id === newLayers[i].id) {\n this.layers[j] = newLayers[i];\n break;\n }\n\n j += 1;\n }\n }\n };\n\n BaseRenderer.prototype.setProjectInterface = function (pInterface) {\n this.globalData.projectInterface = pInterface;\n };\n\n BaseRenderer.prototype.initItems = function () {\n if (!this.globalData.progressiveLoad) {\n this.buildAllItems();\n }\n };\n\n BaseRenderer.prototype.buildElementParenting = function (element, parentName, hierarchy) {\n var elements = this.elements;\n var layers = this.layers;\n var i = 0;\n var len = layers.length;\n\n while (i < len) {\n if (layers[i].ind == parentName) {\n // eslint-disable-line eqeqeq\n if (!elements[i] || elements[i] === true) {\n this.buildItem(i);\n this.addPendingElement(element);\n } else {\n hierarchy.push(elements[i]);\n elements[i].setAsParent();\n\n if (layers[i].parent !== undefined) {\n this.buildElementParenting(element, layers[i].parent, hierarchy);\n } else {\n element.setHierarchy(hierarchy);\n }\n }\n }\n\n i += 1;\n }\n };\n\n BaseRenderer.prototype.addPendingElement = function (element) {\n this.pendingElements.push(element);\n };\n\n BaseRenderer.prototype.searchExtraCompositions = function (assets) {\n var i;\n var len = assets.length;\n\n for (i = 0; i < len; i += 1) {\n if (assets[i].xt) {\n var comp = this.createComp(assets[i]);\n comp.initExpressions();\n this.globalData.projectInterface.registerComposition(comp);\n }\n }\n };\n\n BaseRenderer.prototype.getElementById = function (ind) {\n var i;\n var len = this.elements.length;\n\n for (i = 0; i < len; i += 1) {\n if (this.elements[i].data.ind === ind) {\n return this.elements[i];\n }\n }\n\n return null;\n };\n\n BaseRenderer.prototype.getElementByPath = function (path) {\n var pathValue = path.shift();\n var element;\n\n if (typeof pathValue === 'number') {\n element = this.elements[pathValue];\n } else {\n var i;\n var len = this.elements.length;\n\n for (i = 0; i < len; i += 1) {\n if (this.elements[i].data.nm === pathValue) {\n element = this.elements[i];\n break;\n }\n }\n }\n\n if (path.length === 0) {\n return element;\n }\n\n return element.getElementByPath(path);\n };\n\n BaseRenderer.prototype.setupGlobalData = function (animData, fontsContainer) {\n this.globalData.fontManager = new FontManager();\n this.globalData.slotManager = slotFactory(animData);\n this.globalData.fontManager.addChars(animData.chars);\n this.globalData.fontManager.addFonts(animData.fonts, fontsContainer);\n this.globalData.getAssetData = this.animationItem.getAssetData.bind(this.animationItem);\n this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem);\n this.globalData.imageLoader = this.animationItem.imagePreloader;\n this.globalData.audioController = this.animationItem.audioController;\n this.globalData.frameId = 0;\n this.globalData.frameRate = animData.fr;\n this.globalData.nm = animData.nm;\n this.globalData.compSize = {\n w: animData.w,\n h: animData.h\n };\n };\n\n var effectTypes = {\n TRANSFORM_EFFECT: 'transformEFfect'\n };\n\n function TransformElement() {}\n\n TransformElement.prototype = {\n initTransform: function initTransform() {\n var mat = new Matrix();\n this.finalTransform = {\n mProp: this.data.ks ? TransformPropertyFactory.getTransformProperty(this, this.data.ks, this) : {\n o: 0\n },\n _matMdf: false,\n _localMatMdf: false,\n _opMdf: false,\n mat: mat,\n localMat: mat,\n localOpacity: 1\n };\n\n if (this.data.ao) {\n this.finalTransform.mProp.autoOriented = true;\n } // TODO: check TYPE 11: Guided elements\n\n\n if (this.data.ty !== 11) {// this.createElements();\n }\n },\n renderTransform: function renderTransform() {\n this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame;\n this.finalTransform._matMdf = this.finalTransform.mProp._mdf || this._isFirstFrame;\n\n if (this.hierarchy) {\n var mat;\n var finalMat = this.finalTransform.mat;\n var i = 0;\n var len = this.hierarchy.length; // Checking if any of the transformation matrices in the hierarchy chain has changed.\n\n if (!this.finalTransform._matMdf) {\n while (i < len) {\n if (this.hierarchy[i].finalTransform.mProp._mdf) {\n this.finalTransform._matMdf = true;\n break;\n }\n\n i += 1;\n }\n }\n\n if (this.finalTransform._matMdf) {\n mat = this.finalTransform.mProp.v.props;\n finalMat.cloneFromProps(mat);\n\n for (i = 0; i < len; i += 1) {\n finalMat.multiply(this.hierarchy[i].finalTransform.mProp.v);\n }\n }\n }\n\n if (this.finalTransform._matMdf) {\n this.finalTransform._localMatMdf = this.finalTransform._matMdf;\n }\n\n if (this.finalTransform._opMdf) {\n this.finalTransform.localOpacity = this.finalTransform.mProp.o.v;\n }\n },\n renderLocalTransform: function renderLocalTransform() {\n if (this.localTransforms) {\n var i = 0;\n var len = this.localTransforms.length;\n this.finalTransform._localMatMdf = this.finalTransform._matMdf;\n\n if (!this.finalTransform._localMatMdf || !this.finalTransform._opMdf) {\n while (i < len) {\n if (this.localTransforms[i]._mdf) {\n this.finalTransform._localMatMdf = true;\n }\n\n if (this.localTransforms[i]._opMdf && !this.finalTransform._opMdf) {\n this.finalTransform.localOpacity = this.finalTransform.mProp.o.v;\n this.finalTransform._opMdf = true;\n }\n\n i += 1;\n }\n }\n\n if (this.finalTransform._localMatMdf) {\n var localMat = this.finalTransform.localMat;\n this.localTransforms[0].matrix.clone(localMat);\n\n for (i = 1; i < len; i += 1) {\n var lmat = this.localTransforms[i].matrix;\n localMat.multiply(lmat);\n }\n\n localMat.multiply(this.finalTransform.mat);\n }\n\n if (this.finalTransform._opMdf) {\n var localOp = this.finalTransform.localOpacity;\n\n for (i = 0; i < len; i += 1) {\n localOp *= this.localTransforms[i].opacity * 0.01;\n }\n\n this.finalTransform.localOpacity = localOp;\n }\n }\n },\n searchEffectTransforms: function searchEffectTransforms() {\n if (this.renderableEffectsManager) {\n var transformEffects = this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT);\n\n if (transformEffects.length) {\n this.localTransforms = [];\n this.finalTransform.localMat = new Matrix();\n var i = 0;\n var len = transformEffects.length;\n\n for (i = 0; i < len; i += 1) {\n this.localTransforms.push(transformEffects[i]);\n }\n }\n }\n },\n globalToLocal: function globalToLocal(pt) {\n var transforms = [];\n transforms.push(this.finalTransform);\n var flag = true;\n var comp = this.comp;\n\n while (flag) {\n if (comp.finalTransform) {\n if (comp.data.hasMask) {\n transforms.splice(0, 0, comp.finalTransform);\n }\n\n comp = comp.comp;\n } else {\n flag = false;\n }\n }\n\n var i;\n var len = transforms.length;\n var ptNew;\n\n for (i = 0; i < len; i += 1) {\n ptNew = transforms[i].mat.applyToPointArray(0, 0, 0); // ptNew = transforms[i].mat.applyToPointArray(pt[0],pt[1],pt[2]);\n\n pt = [pt[0] - ptNew[0], pt[1] - ptNew[1], 0];\n }\n\n return pt;\n },\n mHelper: new Matrix()\n };\n\n function MaskElement(data, element, globalData) {\n this.data = data;\n this.element = element;\n this.globalData = globalData;\n this.storedData = [];\n this.masksProperties = this.data.masksProperties || [];\n this.maskElement = null;\n var defs = this.globalData.defs;\n var i;\n var len = this.masksProperties ? this.masksProperties.length : 0;\n this.viewData = createSizedArray(len);\n this.solidPath = '';\n var path;\n var properties = this.masksProperties;\n var count = 0;\n var currentMasks = [];\n var j;\n var jLen;\n var layerId = createElementID();\n var rect;\n var expansor;\n var feMorph;\n var x;\n var maskType = 'clipPath';\n var maskRef = 'clip-path';\n\n for (i = 0; i < len; i += 1) {\n if (properties[i].mode !== 'a' && properties[i].mode !== 'n' || properties[i].inv || properties[i].o.k !== 100 || properties[i].o.x) {\n maskType = 'mask';\n maskRef = 'mask';\n }\n\n if ((properties[i].mode === 's' || properties[i].mode === 'i') && count === 0) {\n rect = createNS('rect');\n rect.setAttribute('fill', '#ffffff');\n rect.setAttribute('width', this.element.comp.data.w || 0);\n rect.setAttribute('height', this.element.comp.data.h || 0);\n currentMasks.push(rect);\n } else {\n rect = null;\n }\n\n path = createNS('path');\n\n if (properties[i].mode === 'n') {\n // TODO move this to a factory or to a constructor\n this.viewData[i] = {\n op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),\n prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),\n elem: path,\n lastPath: ''\n };\n defs.appendChild(path);\n } else {\n count += 1;\n path.setAttribute('fill', properties[i].mode === 's' ? '#000000' : '#ffffff');\n path.setAttribute('clip-rule', 'nonzero');\n var filterID;\n\n if (properties[i].x.k !== 0) {\n maskType = 'mask';\n maskRef = 'mask';\n x = PropertyFactory.getProp(this.element, properties[i].x, 0, null, this.element);\n filterID = createElementID();\n expansor = createNS('filter');\n expansor.setAttribute('id', filterID);\n feMorph = createNS('feMorphology');\n feMorph.setAttribute('operator', 'erode');\n feMorph.setAttribute('in', 'SourceGraphic');\n feMorph.setAttribute('radius', '0');\n expansor.appendChild(feMorph);\n defs.appendChild(expansor);\n path.setAttribute('stroke', properties[i].mode === 's' ? '#000000' : '#ffffff');\n } else {\n feMorph = null;\n x = null;\n } // TODO move this to a factory or to a constructor\n\n\n this.storedData[i] = {\n elem: path,\n x: x,\n expan: feMorph,\n lastPath: '',\n lastOperator: '',\n filterId: filterID,\n lastRadius: 0\n };\n\n if (properties[i].mode === 'i') {\n jLen = currentMasks.length;\n var g = createNS('g');\n\n for (j = 0; j < jLen; j += 1) {\n g.appendChild(currentMasks[j]);\n }\n\n var mask = createNS('mask');\n mask.setAttribute('mask-type', 'alpha');\n mask.setAttribute('id', layerId + '_' + count);\n mask.appendChild(path);\n defs.appendChild(mask);\n g.setAttribute('mask', 'url(' + getLocationHref() + '#' + layerId + '_' + count + ')');\n currentMasks.length = 0;\n currentMasks.push(g);\n } else {\n currentMasks.push(path);\n }\n\n if (properties[i].inv && !this.solidPath) {\n this.solidPath = this.createLayerSolidPath();\n } // TODO move this to a factory or to a constructor\n\n\n this.viewData[i] = {\n elem: path,\n lastPath: '',\n op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),\n prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),\n invRect: rect\n };\n\n if (!this.viewData[i].prop.k) {\n this.drawPath(properties[i], this.viewData[i].prop.v, this.viewData[i]);\n }\n }\n }\n\n this.maskElement = createNS(maskType);\n len = currentMasks.length;\n\n for (i = 0; i < len; i += 1) {\n this.maskElement.appendChild(currentMasks[i]);\n }\n\n if (count > 0) {\n this.maskElement.setAttribute('id', layerId);\n this.element.maskedElement.setAttribute(maskRef, 'url(' + getLocationHref() + '#' + layerId + ')');\n defs.appendChild(this.maskElement);\n }\n\n if (this.viewData.length) {\n this.element.addRenderableComponent(this);\n }\n }\n\n MaskElement.prototype.getMaskProperty = function (pos) {\n return this.viewData[pos].prop;\n };\n\n MaskElement.prototype.renderFrame = function (isFirstFrame) {\n var finalMat = this.element.finalTransform.mat;\n var i;\n var len = this.masksProperties.length;\n\n for (i = 0; i < len; i += 1) {\n if (this.viewData[i].prop._mdf || isFirstFrame) {\n this.drawPath(this.masksProperties[i], this.viewData[i].prop.v, this.viewData[i]);\n }\n\n if (this.viewData[i].op._mdf || isFirstFrame) {\n this.viewData[i].elem.setAttribute('fill-opacity', this.viewData[i].op.v);\n }\n\n if (this.masksProperties[i].mode !== 'n') {\n if (this.viewData[i].invRect && (this.element.finalTransform.mProp._mdf || isFirstFrame)) {\n this.viewData[i].invRect.setAttribute('transform', finalMat.getInverseMatrix().to2dCSS());\n }\n\n if (this.storedData[i].x && (this.storedData[i].x._mdf || isFirstFrame)) {\n var feMorph = this.storedData[i].expan;\n\n if (this.storedData[i].x.v < 0) {\n if (this.storedData[i].lastOperator !== 'erode') {\n this.storedData[i].lastOperator = 'erode';\n this.storedData[i].elem.setAttribute('filter', 'url(' + getLocationHref() + '#' + this.storedData[i].filterId + ')');\n }\n\n feMorph.setAttribute('radius', -this.storedData[i].x.v);\n } else {\n if (this.storedData[i].lastOperator !== 'dilate') {\n this.storedData[i].lastOperator = 'dilate';\n this.storedData[i].elem.setAttribute('filter', null);\n }\n\n this.storedData[i].elem.setAttribute('stroke-width', this.storedData[i].x.v * 2);\n }\n }\n }\n }\n };\n\n MaskElement.prototype.getMaskelement = function () {\n return this.maskElement;\n };\n\n MaskElement.prototype.createLayerSolidPath = function () {\n var path = 'M0,0 ';\n path += ' h' + this.globalData.compSize.w;\n path += ' v' + this.globalData.compSize.h;\n path += ' h-' + this.globalData.compSize.w;\n path += ' v-' + this.globalData.compSize.h + ' ';\n return path;\n };\n\n MaskElement.prototype.drawPath = function (pathData, pathNodes, viewData) {\n var pathString = ' M' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1];\n var i;\n var len;\n len = pathNodes._length;\n\n for (i = 1; i < len; i += 1) {\n // pathString += \" C\"+pathNodes.o[i-1][0]+','+pathNodes.o[i-1][1] + \" \"+pathNodes.i[i][0]+','+pathNodes.i[i][1] + \" \"+pathNodes.v[i][0]+','+pathNodes.v[i][1];\n pathString += ' C' + pathNodes.o[i - 1][0] + ',' + pathNodes.o[i - 1][1] + ' ' + pathNodes.i[i][0] + ',' + pathNodes.i[i][1] + ' ' + pathNodes.v[i][0] + ',' + pathNodes.v[i][1];\n } // pathString += \" C\"+pathNodes.o[i-1][0]+','+pathNodes.o[i-1][1] + \" \"+pathNodes.i[0][0]+','+pathNodes.i[0][1] + \" \"+pathNodes.v[0][0]+','+pathNodes.v[0][1];\n\n\n if (pathNodes.c && len > 1) {\n pathString += ' C' + pathNodes.o[i - 1][0] + ',' + pathNodes.o[i - 1][1] + ' ' + pathNodes.i[0][0] + ',' + pathNodes.i[0][1] + ' ' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1];\n } // pathNodes.__renderedString = pathString;\n\n\n if (viewData.lastPath !== pathString) {\n var pathShapeValue = '';\n\n if (viewData.elem) {\n if (pathNodes.c) {\n pathShapeValue = pathData.inv ? this.solidPath + pathString : pathString;\n }\n\n viewData.elem.setAttribute('d', pathShapeValue);\n }\n\n viewData.lastPath = pathString;\n }\n };\n\n MaskElement.prototype.destroy = function () {\n this.element = null;\n this.globalData = null;\n this.maskElement = null;\n this.data = null;\n this.masksProperties = null;\n };\n\n var filtersFactory = function () {\n var ob = {};\n ob.createFilter = createFilter;\n ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter;\n\n function createFilter(filId, skipCoordinates) {\n var fil = createNS('filter');\n fil.setAttribute('id', filId);\n\n if (skipCoordinates !== true) {\n fil.setAttribute('filterUnits', 'objectBoundingBox');\n fil.setAttribute('x', '0%');\n fil.setAttribute('y', '0%');\n fil.setAttribute('width', '100%');\n fil.setAttribute('height', '100%');\n }\n\n return fil;\n }\n\n function createAlphaToLuminanceFilter() {\n var feColorMatrix = createNS('feColorMatrix');\n feColorMatrix.setAttribute('type', 'matrix');\n feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');\n feColorMatrix.setAttribute('values', '0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1');\n return feColorMatrix;\n }\n\n return ob;\n }();\n\n var featureSupport = function () {\n var ob = {\n maskType: true,\n svgLumaHidden: true,\n offscreenCanvas: typeof OffscreenCanvas !== 'undefined'\n };\n\n if (/MSIE 10/i.test(navigator.userAgent) || /MSIE 9/i.test(navigator.userAgent) || /rv:11.0/i.test(navigator.userAgent) || /Edge\\/\\d./i.test(navigator.userAgent)) {\n ob.maskType = false;\n }\n\n if (/firefox/i.test(navigator.userAgent)) {\n ob.svgLumaHidden = false;\n }\n\n return ob;\n }();\n\n var registeredEffects$1 = {};\n var idPrefix = 'filter_result_';\n\n function SVGEffects(elem) {\n var i;\n var source = 'SourceGraphic';\n var len = elem.data.ef ? elem.data.ef.length : 0;\n var filId = createElementID();\n var fil = filtersFactory.createFilter(filId, true);\n var count = 0;\n this.filters = [];\n var filterManager;\n\n for (i = 0; i < len; i += 1) {\n filterManager = null;\n var type = elem.data.ef[i].ty;\n\n if (registeredEffects$1[type]) {\n var Effect = registeredEffects$1[type].effect;\n filterManager = new Effect(fil, elem.effectsManager.effectElements[i], elem, idPrefix + count, source);\n source = idPrefix + count;\n\n if (registeredEffects$1[type].countsAsEffect) {\n count += 1;\n }\n }\n\n if (filterManager) {\n this.filters.push(filterManager);\n }\n }\n\n if (count) {\n elem.globalData.defs.appendChild(fil);\n elem.layerElement.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');\n }\n\n if (this.filters.length) {\n elem.addRenderableComponent(this);\n }\n }\n\n SVGEffects.prototype.renderFrame = function (_isFirstFrame) {\n var i;\n var len = this.filters.length;\n\n for (i = 0; i < len; i += 1) {\n this.filters[i].renderFrame(_isFirstFrame);\n }\n };\n\n SVGEffects.prototype.getEffects = function (type) {\n var i;\n var len = this.filters.length;\n var effects = [];\n\n for (i = 0; i < len; i += 1) {\n if (this.filters[i].type === type) {\n effects.push(this.filters[i]);\n }\n }\n\n return effects;\n };\n\n function registerEffect$1(id, effect, countsAsEffect) {\n registeredEffects$1[id] = {\n effect: effect,\n countsAsEffect: countsAsEffect\n };\n }\n\n function SVGBaseElement() {}\n\n SVGBaseElement.prototype = {\n initRendererElement: function initRendererElement() {\n this.layerElement = createNS('g');\n },\n createContainerElements: function createContainerElements() {\n this.matteElement = createNS('g');\n this.transformedElement = this.layerElement;\n this.maskedElement = this.layerElement;\n this._sizeChanged = false;\n var layerElementParent = null; // If this layer acts as a mask for the following layer\n\n if (this.data.td) {\n this.matteMasks = {};\n var gg = createNS('g');\n gg.setAttribute('id', this.layerId);\n gg.appendChild(this.layerElement);\n layerElementParent = gg;\n this.globalData.defs.appendChild(gg);\n } else if (this.data.tt) {\n this.matteElement.appendChild(this.layerElement);\n layerElementParent = this.matteElement;\n this.baseElement = this.matteElement;\n } else {\n this.baseElement = this.layerElement;\n }\n\n if (this.data.ln) {\n this.layerElement.setAttribute('id', this.data.ln);\n }\n\n if (this.data.cl) {\n this.layerElement.setAttribute('class', this.data.cl);\n } // Clipping compositions to hide content that exceeds boundaries. If collapsed transformations is on, component should not be clipped\n\n\n if (this.data.ty === 0 && !this.data.hd) {\n var cp = createNS('clipPath');\n var pt = createNS('path');\n pt.setAttribute('d', 'M0,0 L' + this.data.w + ',0 L' + this.data.w + ',' + this.data.h + ' L0,' + this.data.h + 'z');\n var clipId = createElementID();\n cp.setAttribute('id', clipId);\n cp.appendChild(pt);\n this.globalData.defs.appendChild(cp);\n\n if (this.checkMasks()) {\n var cpGroup = createNS('g');\n cpGroup.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')');\n cpGroup.appendChild(this.layerElement);\n this.transformedElement = cpGroup;\n\n if (layerElementParent) {\n layerElementParent.appendChild(this.transformedElement);\n } else {\n this.baseElement = this.transformedElement;\n }\n } else {\n this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')');\n }\n }\n\n if (this.data.bm !== 0) {\n this.setBlendMode();\n }\n },\n renderElement: function renderElement() {\n if (this.finalTransform._localMatMdf) {\n this.transformedElement.setAttribute('transform', this.finalTransform.localMat.to2dCSS());\n }\n\n if (this.finalTransform._opMdf) {\n this.transformedElement.setAttribute('opacity', this.finalTransform.localOpacity);\n }\n },\n destroyBaseElement: function destroyBaseElement() {\n this.layerElement = null;\n this.matteElement = null;\n this.maskManager.destroy();\n },\n getBaseElement: function getBaseElement() {\n if (this.data.hd) {\n return null;\n }\n\n return this.baseElement;\n },\n createRenderableComponents: function createRenderableComponents() {\n this.maskManager = new MaskElement(this.data, this, this.globalData);\n this.renderableEffectsManager = new SVGEffects(this);\n this.searchEffectTransforms();\n },\n getMatte: function getMatte(matteType) {\n // This should not be a common case. But for backward compatibility, we'll create the matte object.\n // It solves animations that have two consecutive layers marked as matte masks.\n // Which is an undefined behavior in AE.\n if (!this.matteMasks) {\n this.matteMasks = {};\n }\n\n if (!this.matteMasks[matteType]) {\n var id = this.layerId + '_' + matteType;\n var filId;\n var fil;\n var useElement;\n var gg;\n\n if (matteType === 1 || matteType === 3) {\n var masker = createNS('mask');\n masker.setAttribute('id', id);\n masker.setAttribute('mask-type', matteType === 3 ? 'luminance' : 'alpha');\n useElement = createNS('use');\n useElement.setAttributeNS('http://www.w3.org/1999/xlink', 'href', '#' + this.layerId);\n masker.appendChild(useElement);\n this.globalData.defs.appendChild(masker);\n\n if (!featureSupport.maskType && matteType === 1) {\n masker.setAttribute('mask-type', 'luminance');\n filId = createElementID();\n fil = filtersFactory.createFilter(filId);\n this.globalData.defs.appendChild(fil);\n fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());\n gg = createNS('g');\n gg.appendChild(useElement);\n masker.appendChild(gg);\n gg.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');\n }\n } else if (matteType === 2) {\n var maskGroup = createNS('mask');\n maskGroup.setAttribute('id', id);\n maskGroup.setAttribute('mask-type', 'alpha');\n var maskGrouper = createNS('g');\n maskGroup.appendChild(maskGrouper);\n filId = createElementID();\n fil = filtersFactory.createFilter(filId); /// /\n\n var feCTr = createNS('feComponentTransfer');\n feCTr.setAttribute('in', 'SourceGraphic');\n fil.appendChild(feCTr);\n var feFunc = createNS('feFuncA');\n feFunc.setAttribute('type', 'table');\n feFunc.setAttribute('tableValues', '1.0 0.0');\n feCTr.appendChild(feFunc); /// /\n\n this.globalData.defs.appendChild(fil);\n var alphaRect = createNS('rect');\n alphaRect.setAttribute('width', this.comp.data.w);\n alphaRect.setAttribute('height', this.comp.data.h);\n alphaRect.setAttribute('x', '0');\n alphaRect.setAttribute('y', '0');\n alphaRect.setAttribute('fill', '#ffffff');\n alphaRect.setAttribute('opacity', '0');\n maskGrouper.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');\n maskGrouper.appendChild(alphaRect);\n useElement = createNS('use');\n useElement.setAttributeNS('http://www.w3.org/1999/xlink', 'href', '#' + this.layerId);\n maskGrouper.appendChild(useElement);\n\n if (!featureSupport.maskType) {\n maskGroup.setAttribute('mask-type', 'luminance');\n fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());\n gg = createNS('g');\n maskGrouper.appendChild(alphaRect);\n gg.appendChild(this.layerElement);\n maskGrouper.appendChild(gg);\n }\n\n this.globalData.defs.appendChild(maskGroup);\n }\n\n this.matteMasks[matteType] = id;\n }\n\n return this.matteMasks[matteType];\n },\n setMatte: function setMatte(id) {\n if (!this.matteElement) {\n return;\n }\n\n this.matteElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')');\n }\n };\n\n /**\r\n * @file\r\n * Handles AE's layer parenting property.\r\n *\r\n */\n function HierarchyElement() {}\n\n HierarchyElement.prototype = {\n /**\r\n * @function\r\n * Initializes hierarchy properties\r\n *\r\n */\n initHierarchy: function initHierarchy() {\n // element's parent list\n this.hierarchy = []; // if element is parent of another layer _isParent will be true\n\n this._isParent = false;\n this.checkParenting();\n },\n\n /**\r\n * @function\r\n * Sets layer's hierarchy.\r\n * @param {array} hierarch\r\n * layer's parent list\r\n *\r\n */\n setHierarchy: function setHierarchy(hierarchy) {\n this.hierarchy = hierarchy;\n },\n\n /**\r\n * @function\r\n * Sets layer as parent.\r\n *\r\n */\n setAsParent: function setAsParent() {\n this._isParent = true;\n },\n\n /**\r\n * @function\r\n * Searches layer's parenting chain\r\n *\r\n */\n checkParenting: function checkParenting() {\n if (this.data.parent !== undefined) {\n this.comp.buildElementParenting(this, this.data.parent, []);\n }\n }\n };\n\n function RenderableDOMElement() {}\n\n (function () {\n var _prototype = {\n initElement: function initElement(data, globalData, comp) {\n this.initFrame();\n this.initBaseData(data, globalData, comp);\n this.initTransform(data, globalData, comp);\n this.initHierarchy();\n this.initRenderable();\n this.initRendererElement();\n this.createContainerElements();\n this.createRenderableComponents();\n this.createContent();\n this.hide();\n },\n hide: function hide() {\n // console.log('HIDE', this);\n if (!this.hidden && (!this.isInRange || this.isTransparent)) {\n var elem = this.baseElement || this.layerElement;\n elem.style.display = 'none';\n this.hidden = true;\n }\n },\n show: function show() {\n // console.log('SHOW', this);\n if (this.isInRange && !this.isTransparent) {\n if (!this.data.hd) {\n var elem = this.baseElement || this.layerElement;\n elem.style.display = 'block';\n }\n\n this.hidden = false;\n this._isFirstFrame = true;\n }\n },\n renderFrame: function renderFrame() {\n // If it is exported as hidden (data.hd === true) no need to render\n // If it is not visible no need to render\n if (this.data.hd || this.hidden) {\n return;\n }\n\n this.renderTransform();\n this.renderRenderable();\n this.renderLocalTransform();\n this.renderElement();\n this.renderInnerContent();\n\n if (this._isFirstFrame) {\n this._isFirstFrame = false;\n }\n },\n renderInnerContent: function renderInnerContent() {},\n prepareFrame: function prepareFrame(num) {\n this._mdf = false;\n this.prepareRenderableFrame(num);\n this.prepareProperties(num, this.isInRange);\n this.checkTransparency();\n },\n destroy: function destroy() {\n this.innerElem = null;\n this.destroyBaseElement();\n }\n };\n extendPrototype([RenderableElement, createProxyFunction(_prototype)], RenderableDOMElement);\n })();\n\n function IImageElement(data, globalData, comp) {\n this.assetData = globalData.getAssetData(data.refId);\n\n if (this.assetData && this.assetData.sid) {\n this.assetData = globalData.slotManager.getProp(this.assetData);\n }\n\n this.initElement(data, globalData, comp);\n this.sourceRect = {\n top: 0,\n left: 0,\n width: this.assetData.w,\n height: this.assetData.h\n };\n }\n\n extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], IImageElement);\n\n IImageElement.prototype.createContent = function () {\n var assetPath = this.globalData.getAssetsPath(this.assetData);\n this.innerElem = createNS('image');\n this.innerElem.setAttribute('width', this.assetData.w + 'px');\n this.innerElem.setAttribute('height', this.assetData.h + 'px');\n this.innerElem.setAttribute('preserveAspectRatio', this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio);\n this.innerElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);\n this.layerElement.appendChild(this.innerElem);\n };\n\n IImageElement.prototype.sourceRectAtTime = function () {\n return this.sourceRect;\n };\n\n function ProcessedElement(element, position) {\n this.elem = element;\n this.pos = position;\n }\n\n function IShapeElement() {}\n\n IShapeElement.prototype = {\n addShapeToModifiers: function addShapeToModifiers(data) {\n var i;\n var len = this.shapeModifiers.length;\n\n for (i = 0; i < len; i += 1) {\n this.shapeModifiers[i].addShape(data);\n }\n },\n isShapeInAnimatedModifiers: function isShapeInAnimatedModifiers(data) {\n var i = 0;\n var len = this.shapeModifiers.length;\n\n while (i < len) {\n if (this.shapeModifiers[i].isAnimatedWithShape(data)) {\n return true;\n }\n }\n\n return false;\n },\n renderModifiers: function renderModifiers() {\n if (!this.shapeModifiers.length) {\n return;\n }\n\n var i;\n var len = this.shapes.length;\n\n for (i = 0; i < len; i += 1) {\n this.shapes[i].sh.reset();\n }\n\n len = this.shapeModifiers.length;\n var shouldBreakProcess;\n\n for (i = len - 1; i >= 0; i -= 1) {\n shouldBreakProcess = this.shapeModifiers[i].processShapes(this._isFirstFrame); // workaround to fix cases where a repeater resets the shape so the following processes get called twice\n // TODO: find a better solution for this\n\n if (shouldBreakProcess) {\n break;\n }\n }\n },\n searchProcessedElement: function searchProcessedElement(elem) {\n var elements = this.processedElements;\n var i = 0;\n var len = elements.length;\n\n while (i < len) {\n if (elements[i].elem === elem) {\n return elements[i].pos;\n }\n\n i += 1;\n }\n\n return 0;\n },\n addProcessedElement: function addProcessedElement(elem, pos) {\n var elements = this.processedElements;\n var i = elements.length;\n\n while (i) {\n i -= 1;\n\n if (elements[i].elem === elem) {\n elements[i].pos = pos;\n return;\n }\n }\n\n elements.push(new ProcessedElement(elem, pos));\n },\n prepareFrame: function prepareFrame(num) {\n this.prepareRenderableFrame(num);\n this.prepareProperties(num, this.isInRange);\n }\n };\n\n var lineCapEnum = {\n 1: 'butt',\n 2: 'round',\n 3: 'square'\n };\n var lineJoinEnum = {\n 1: 'miter',\n 2: 'round',\n 3: 'bevel'\n };\n\n function SVGShapeData(transformers, level, shape) {\n this.caches = [];\n this.styles = [];\n this.transformers = transformers;\n this.lStr = '';\n this.sh = shape;\n this.lvl = level; // TODO find if there are some cases where _isAnimated can be false.\n // For now, since shapes add up with other shapes. They have to be calculated every time.\n // One way of finding out is checking if all styles associated to this shape depend only of this shape\n\n this._isAnimated = !!shape.k; // TODO: commenting this for now since all shapes are animated\n\n var i = 0;\n var len = transformers.length;\n\n while (i < len) {\n if (transformers[i].mProps.dynamicProperties.length) {\n this._isAnimated = true;\n break;\n }\n\n i += 1;\n }\n }\n\n SVGShapeData.prototype.setAsAnimated = function () {\n this._isAnimated = true;\n };\n\n function SVGStyleData(data, level) {\n this.data = data;\n this.type = data.ty;\n this.d = '';\n this.lvl = level;\n this._mdf = false;\n this.closed = data.hd === true;\n this.pElem = createNS('path');\n this.msElem = null;\n }\n\n SVGStyleData.prototype.reset = function () {\n this.d = '';\n this._mdf = false;\n };\n\n function DashProperty(elem, data, renderer, container) {\n this.elem = elem;\n this.frameId = -1;\n this.dataProps = createSizedArray(data.length);\n this.renderer = renderer;\n this.k = false;\n this.dashStr = '';\n this.dashArray = createTypedArray('float32', data.length ? data.length - 1 : 0);\n this.dashoffset = createTypedArray('float32', 1);\n this.initDynamicPropertyContainer(container);\n var i;\n var len = data.length || 0;\n var prop;\n\n for (i = 0; i < len; i += 1) {\n prop = PropertyFactory.getProp(elem, data[i].v, 0, 0, this);\n this.k = prop.k || this.k;\n this.dataProps[i] = {\n n: data[i].n,\n p: prop\n };\n }\n\n if (!this.k) {\n this.getValue(true);\n }\n\n this._isAnimated = this.k;\n }\n\n DashProperty.prototype.getValue = function (forceRender) {\n if (this.elem.globalData.frameId === this.frameId && !forceRender) {\n return;\n }\n\n this.frameId = this.elem.globalData.frameId;\n this.iterateDynamicProperties();\n this._mdf = this._mdf || forceRender;\n\n if (this._mdf) {\n var i = 0;\n var len = this.dataProps.length;\n\n if (this.renderer === 'svg') {\n this.dashStr = '';\n }\n\n for (i = 0; i < len; i += 1) {\n if (this.dataProps[i].n !== 'o') {\n if (this.renderer === 'svg') {\n this.dashStr += ' ' + this.dataProps[i].p.v;\n } else {\n this.dashArray[i] = this.dataProps[i].p.v;\n }\n } else {\n this.dashoffset[0] = this.dataProps[i].p.v;\n }\n }\n }\n };\n\n extendPrototype([DynamicPropertyContainer], DashProperty);\n\n function SVGStrokeStyleData(elem, data, styleOb) {\n this.initDynamicPropertyContainer(elem);\n this.getValue = this.iterateDynamicProperties;\n this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);\n this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);\n this.d = new DashProperty(elem, data.d || {}, 'svg', this);\n this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);\n this.style = styleOb;\n this._isAnimated = !!this._isAnimated;\n }\n\n extendPrototype([DynamicPropertyContainer], SVGStrokeStyleData);\n\n function SVGFillStyleData(elem, data, styleOb) {\n this.initDynamicPropertyContainer(elem);\n this.getValue = this.iterateDynamicProperties;\n this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);\n this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);\n this.style = styleOb;\n }\n\n extendPrototype([DynamicPropertyContainer], SVGFillStyleData);\n\n function SVGNoStyleData(elem, data, styleOb) {\n this.initDynamicPropertyContainer(elem);\n this.getValue = this.iterateDynamicProperties;\n this.style = styleOb;\n }\n\n extendPrototype([DynamicPropertyContainer], SVGNoStyleData);\n\n function GradientProperty(elem, data, container) {\n this.data = data;\n this.c = createTypedArray('uint8c', data.p * 4);\n var cLength = data.k.k[0].s ? data.k.k[0].s.length - data.p * 4 : data.k.k.length - data.p * 4;\n this.o = createTypedArray('float32', cLength);\n this._cmdf = false;\n this._omdf = false;\n this._collapsable = this.checkCollapsable();\n this._hasOpacity = cLength;\n this.initDynamicPropertyContainer(container);\n this.prop = PropertyFactory.getProp(elem, data.k, 1, null, this);\n this.k = this.prop.k;\n this.getValue(true);\n }\n\n GradientProperty.prototype.comparePoints = function (values, points) {\n var i = 0;\n var len = this.o.length / 2;\n var diff;\n\n while (i < len) {\n diff = Math.abs(values[i * 4] - values[points * 4 + i * 2]);\n\n if (diff > 0.01) {\n return false;\n }\n\n i += 1;\n }\n\n return true;\n };\n\n GradientProperty.prototype.checkCollapsable = function () {\n if (this.o.length / 2 !== this.c.length / 4) {\n return false;\n }\n\n if (this.data.k.k[0].s) {\n var i = 0;\n var len = this.data.k.k.length;\n\n while (i < len) {\n if (!this.comparePoints(this.data.k.k[i].s, this.data.p)) {\n return false;\n }\n\n i += 1;\n }\n } else if (!this.comparePoints(this.data.k.k, this.data.p)) {\n return false;\n }\n\n return true;\n };\n\n GradientProperty.prototype.getValue = function (forceRender) {\n this.prop.getValue();\n this._mdf = false;\n this._cmdf = false;\n this._omdf = false;\n\n if (this.prop._mdf || forceRender) {\n var i;\n var len = this.data.p * 4;\n var mult;\n var val;\n\n for (i = 0; i < len; i += 1) {\n mult = i % 4 === 0 ? 100 : 255;\n val = Math.round(this.prop.v[i] * mult);\n\n if (this.c[i] !== val) {\n this.c[i] = val;\n this._cmdf = !forceRender;\n }\n }\n\n if (this.o.length) {\n len = this.prop.v.length;\n\n for (i = this.data.p * 4; i < len; i += 1) {\n mult = i % 2 === 0 ? 100 : 1;\n val = i % 2 === 0 ? Math.round(this.prop.v[i] * 100) : this.prop.v[i];\n\n if (this.o[i - this.data.p * 4] !== val) {\n this.o[i - this.data.p * 4] = val;\n this._omdf = !forceRender;\n }\n }\n }\n\n this._mdf = !forceRender;\n }\n };\n\n extendPrototype([DynamicPropertyContainer], GradientProperty);\n\n function SVGGradientFillStyleData(elem, data, styleOb) {\n this.initDynamicPropertyContainer(elem);\n this.getValue = this.iterateDynamicProperties;\n this.initGradientData(elem, data, styleOb);\n }\n\n SVGGradientFillStyleData.prototype.initGradientData = function (elem, data, styleOb) {\n this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);\n this.s = PropertyFactory.getProp(elem, data.s, 1, null, this);\n this.e = PropertyFactory.getProp(elem, data.e, 1, null, this);\n this.h = PropertyFactory.getProp(elem, data.h || {\n k: 0\n }, 0, 0.01, this);\n this.a = PropertyFactory.getProp(elem, data.a || {\n k: 0\n }, 0, degToRads, this);\n this.g = new GradientProperty(elem, data.g, this);\n this.style = styleOb;\n this.stops = [];\n this.setGradientData(styleOb.pElem, data);\n this.setGradientOpacity(data, styleOb);\n this._isAnimated = !!this._isAnimated;\n };\n\n SVGGradientFillStyleData.prototype.setGradientData = function (pathElement, data) {\n var gradientId = createElementID();\n var gfill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');\n gfill.setAttribute('id', gradientId);\n gfill.setAttribute('spreadMethod', 'pad');\n gfill.setAttribute('gradientUnits', 'userSpaceOnUse');\n var stops = [];\n var stop;\n var j;\n var jLen;\n jLen = data.g.p * 4;\n\n for (j = 0; j < jLen; j += 4) {\n stop = createNS('stop');\n gfill.appendChild(stop);\n stops.push(stop);\n }\n\n pathElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + gradientId + ')');\n this.gf = gfill;\n this.cst = stops;\n };\n\n SVGGradientFillStyleData.prototype.setGradientOpacity = function (data, styleOb) {\n if (this.g._hasOpacity && !this.g._collapsable) {\n var stop;\n var j;\n var jLen;\n var mask = createNS('mask');\n var maskElement = createNS('path');\n mask.appendChild(maskElement);\n var opacityId = createElementID();\n var maskId = createElementID();\n mask.setAttribute('id', maskId);\n var opFill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');\n opFill.setAttribute('id', opacityId);\n opFill.setAttribute('spreadMethod', 'pad');\n opFill.setAttribute('gradientUnits', 'userSpaceOnUse');\n jLen = data.g.k.k[0].s ? data.g.k.k[0].s.length : data.g.k.k.length;\n var stops = this.stops;\n\n for (j = data.g.p * 4; j < jLen; j += 2) {\n stop = createNS('stop');\n stop.setAttribute('stop-color', 'rgb(255,255,255)');\n opFill.appendChild(stop);\n stops.push(stop);\n }\n\n maskElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + opacityId + ')');\n\n if (data.ty === 'gs') {\n maskElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);\n maskElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);\n\n if (data.lj === 1) {\n maskElement.setAttribute('stroke-miterlimit', data.ml);\n }\n }\n\n this.of = opFill;\n this.ms = mask;\n this.ost = stops;\n this.maskId = maskId;\n styleOb.msElem = maskElement;\n }\n };\n\n extendPrototype([DynamicPropertyContainer], SVGGradientFillStyleData);\n\n function SVGGradientStrokeStyleData(elem, data, styleOb) {\n this.initDynamicPropertyContainer(elem);\n this.getValue = this.iterateDynamicProperties;\n this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);\n this.d = new DashProperty(elem, data.d || {}, 'svg', this);\n this.initGradientData(elem, data, styleOb);\n this._isAnimated = !!this._isAnimated;\n }\n\n extendPrototype([SVGGradientFillStyleData, DynamicPropertyContainer], SVGGradientStrokeStyleData);\n\n function ShapeGroupData() {\n this.it = [];\n this.prevViewData = [];\n this.gr = createNS('g');\n }\n\n function SVGTransformData(mProps, op, container) {\n this.transform = {\n mProps: mProps,\n op: op,\n container: container\n };\n this.elements = [];\n this._isAnimated = this.transform.mProps.dynamicProperties.length || this.transform.op.effectsSequence.length;\n }\n\n var buildShapeString = function buildShapeString(pathNodes, length, closed, mat) {\n if (length === 0) {\n return '';\n }\n\n var _o = pathNodes.o;\n var _i = pathNodes.i;\n var _v = pathNodes.v;\n var i;\n var shapeString = ' M' + mat.applyToPointStringified(_v[0][0], _v[0][1]);\n\n for (i = 1; i < length; i += 1) {\n shapeString += ' C' + mat.applyToPointStringified(_o[i - 1][0], _o[i - 1][1]) + ' ' + mat.applyToPointStringified(_i[i][0], _i[i][1]) + ' ' + mat.applyToPointStringified(_v[i][0], _v[i][1]);\n }\n\n if (closed && length) {\n shapeString += ' C' + mat.applyToPointStringified(_o[i - 1][0], _o[i - 1][1]) + ' ' + mat.applyToPointStringified(_i[0][0], _i[0][1]) + ' ' + mat.applyToPointStringified(_v[0][0], _v[0][1]);\n shapeString += 'z';\n }\n\n return shapeString;\n };\n\n var SVGElementsRenderer = function () {\n var _identityMatrix = new Matrix();\n\n var _matrixHelper = new Matrix();\n\n var ob = {\n createRenderFunction: createRenderFunction\n };\n\n function createRenderFunction(data) {\n switch (data.ty) {\n case 'fl':\n return renderFill;\n\n case 'gf':\n return renderGradient;\n\n case 'gs':\n return renderGradientStroke;\n\n case 'st':\n return renderStroke;\n\n case 'sh':\n case 'el':\n case 'rc':\n case 'sr':\n return renderPath;\n\n case 'tr':\n return renderContentTransform;\n\n case 'no':\n return renderNoop;\n\n default:\n return null;\n }\n }\n\n function renderContentTransform(styleData, itemData, isFirstFrame) {\n if (isFirstFrame || itemData.transform.op._mdf) {\n itemData.transform.container.setAttribute('opacity', itemData.transform.op.v);\n }\n\n if (isFirstFrame || itemData.transform.mProps._mdf) {\n itemData.transform.container.setAttribute('transform', itemData.transform.mProps.v.to2dCSS());\n }\n }\n\n function renderNoop() {}\n\n function renderPath(styleData, itemData, isFirstFrame) {\n var j;\n var jLen;\n var pathStringTransformed;\n var redraw;\n var pathNodes;\n var l;\n var lLen = itemData.styles.length;\n var lvl = itemData.lvl;\n var paths;\n var mat;\n var iterations;\n var k;\n\n for (l = 0; l < lLen; l += 1) {\n redraw = itemData.sh._mdf || isFirstFrame;\n\n if (itemData.styles[l].lvl < lvl) {\n mat = _matrixHelper.reset();\n iterations = lvl - itemData.styles[l].lvl;\n k = itemData.transformers.length - 1;\n\n while (!redraw && iterations > 0) {\n redraw = itemData.transformers[k].mProps._mdf || redraw;\n iterations -= 1;\n k -= 1;\n }\n\n if (redraw) {\n iterations = lvl - itemData.styles[l].lvl;\n k = itemData.transformers.length - 1;\n\n while (iterations > 0) {\n mat.multiply(itemData.transformers[k].mProps.v);\n iterations -= 1;\n k -= 1;\n }\n }\n } else {\n mat = _identityMatrix;\n }\n\n paths = itemData.sh.paths;\n jLen = paths._length;\n\n if (redraw) {\n pathStringTransformed = '';\n\n for (j = 0; j < jLen; j += 1) {\n pathNodes = paths.shapes[j];\n\n if (pathNodes && pathNodes._length) {\n pathStringTransformed += buildShapeString(pathNodes, pathNodes._length, pathNodes.c, mat);\n }\n }\n\n itemData.caches[l] = pathStringTransformed;\n } else {\n pathStringTransformed = itemData.caches[l];\n }\n\n itemData.styles[l].d += styleData.hd === true ? '' : pathStringTransformed;\n itemData.styles[l]._mdf = redraw || itemData.styles[l]._mdf;\n }\n }\n\n function renderFill(styleData, itemData, isFirstFrame) {\n var styleElem = itemData.style;\n\n if (itemData.c._mdf || isFirstFrame) {\n styleElem.pElem.setAttribute('fill', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');\n }\n\n if (itemData.o._mdf || isFirstFrame) {\n styleElem.pElem.setAttribute('fill-opacity', itemData.o.v);\n }\n }\n\n function renderGradientStroke(styleData, itemData, isFirstFrame) {\n renderGradient(styleData, itemData, isFirstFrame);\n renderStroke(styleData, itemData, isFirstFrame);\n }\n\n function renderGradient(styleData, itemData, isFirstFrame) {\n var gfill = itemData.gf;\n var hasOpacity = itemData.g._hasOpacity;\n var pt1 = itemData.s.v;\n var pt2 = itemData.e.v;\n\n if (itemData.o._mdf || isFirstFrame) {\n var attr = styleData.ty === 'gf' ? 'fill-opacity' : 'stroke-opacity';\n itemData.style.pElem.setAttribute(attr, itemData.o.v);\n }\n\n if (itemData.s._mdf || isFirstFrame) {\n var attr1 = styleData.t === 1 ? 'x1' : 'cx';\n var attr2 = attr1 === 'x1' ? 'y1' : 'cy';\n gfill.setAttribute(attr1, pt1[0]);\n gfill.setAttribute(attr2, pt1[1]);\n\n if (hasOpacity && !itemData.g._collapsable) {\n itemData.of.setAttribute(attr1, pt1[0]);\n itemData.of.setAttribute(attr2, pt1[1]);\n }\n }\n\n var stops;\n var i;\n var len;\n var stop;\n\n if (itemData.g._cmdf || isFirstFrame) {\n stops = itemData.cst;\n var cValues = itemData.g.c;\n len = stops.length;\n\n for (i = 0; i < len; i += 1) {\n stop = stops[i];\n stop.setAttribute('offset', cValues[i * 4] + '%');\n stop.setAttribute('stop-color', 'rgb(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ')');\n }\n }\n\n if (hasOpacity && (itemData.g._omdf || isFirstFrame)) {\n var oValues = itemData.g.o;\n\n if (itemData.g._collapsable) {\n stops = itemData.cst;\n } else {\n stops = itemData.ost;\n }\n\n len = stops.length;\n\n for (i = 0; i < len; i += 1) {\n stop = stops[i];\n\n if (!itemData.g._collapsable) {\n stop.setAttribute('offset', oValues[i * 2] + '%');\n }\n\n stop.setAttribute('stop-opacity', oValues[i * 2 + 1]);\n }\n }\n\n if (styleData.t === 1) {\n if (itemData.e._mdf || isFirstFrame) {\n gfill.setAttribute('x2', pt2[0]);\n gfill.setAttribute('y2', pt2[1]);\n\n if (hasOpacity && !itemData.g._collapsable) {\n itemData.of.setAttribute('x2', pt2[0]);\n itemData.of.setAttribute('y2', pt2[1]);\n }\n }\n } else {\n var rad;\n\n if (itemData.s._mdf || itemData.e._mdf || isFirstFrame) {\n rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));\n gfill.setAttribute('r', rad);\n\n if (hasOpacity && !itemData.g._collapsable) {\n itemData.of.setAttribute('r', rad);\n }\n }\n\n if (itemData.e._mdf || itemData.h._mdf || itemData.a._mdf || isFirstFrame) {\n if (!rad) {\n rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));\n }\n\n var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);\n var percent = itemData.h.v;\n\n if (percent >= 1) {\n percent = 0.99;\n } else if (percent <= -1) {\n percent = -0.99;\n }\n\n var dist = rad * percent;\n var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];\n var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];\n gfill.setAttribute('fx', x);\n gfill.setAttribute('fy', y);\n\n if (hasOpacity && !itemData.g._collapsable) {\n itemData.of.setAttribute('fx', x);\n itemData.of.setAttribute('fy', y);\n }\n } // gfill.setAttribute('fy','200');\n\n }\n }\n\n function renderStroke(styleData, itemData, isFirstFrame) {\n var styleElem = itemData.style;\n var d = itemData.d;\n\n if (d && (d._mdf || isFirstFrame) && d.dashStr) {\n styleElem.pElem.setAttribute('stroke-dasharray', d.dashStr);\n styleElem.pElem.setAttribute('stroke-dashoffset', d.dashoffset[0]);\n }\n\n if (itemData.c && (itemData.c._mdf || isFirstFrame)) {\n styleElem.pElem.setAttribute('stroke', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');\n }\n\n if (itemData.o._mdf || isFirstFrame) {\n styleElem.pElem.setAttribute('stroke-opacity', itemData.o.v);\n }\n\n if (itemData.w._mdf || isFirstFrame) {\n styleElem.pElem.setAttribute('stroke-width', itemData.w.v);\n\n if (styleElem.msElem) {\n styleElem.msElem.setAttribute('stroke-width', itemData.w.v);\n }\n }\n }\n\n return ob;\n }();\n\n function SVGShapeElement(data, globalData, comp) {\n // List of drawable elements\n this.shapes = []; // Full shape data\n\n this.shapesData = data.shapes; // List of styles that will be applied to shapes\n\n this.stylesList = []; // List of modifiers that will be applied to shapes\n\n this.shapeModifiers = []; // List of items in shape tree\n\n this.itemsData = []; // List of items in previous shape tree\n\n this.processedElements = []; // List of animated components\n\n this.animatedContents = [];\n this.initElement(data, globalData, comp); // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.\n // List of elements that have been created\n\n this.prevViewData = []; // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.\n }\n\n extendPrototype([BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableDOMElement], SVGShapeElement);\n\n SVGShapeElement.prototype.initSecondaryElement = function () {};\n\n SVGShapeElement.prototype.identityMatrix = new Matrix();\n\n SVGShapeElement.prototype.buildExpressionInterface = function () {};\n\n SVGShapeElement.prototype.createContent = function () {\n this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);\n this.filterUniqueShapes();\n };\n /*\r\n This method searches for multiple shapes that affect a single element and one of them is animated\r\n */\n\n\n SVGShapeElement.prototype.filterUniqueShapes = function () {\n var i;\n var len = this.shapes.length;\n var shape;\n var j;\n var jLen = this.stylesList.length;\n var style;\n var tempShapes = [];\n var areAnimated = false;\n\n for (j = 0; j < jLen; j += 1) {\n style = this.stylesList[j];\n areAnimated = false;\n tempShapes.length = 0;\n\n for (i = 0; i < len; i += 1) {\n shape = this.shapes[i];\n\n if (shape.styles.indexOf(style) !== -1) {\n tempShapes.push(shape);\n areAnimated = shape._isAnimated || areAnimated;\n }\n }\n\n if (tempShapes.length > 1 && areAnimated) {\n this.setShapesAsAnimated(tempShapes);\n }\n }\n };\n\n SVGShapeElement.prototype.setShapesAsAnimated = function (shapes) {\n var i;\n var len = shapes.length;\n\n for (i = 0; i < len; i += 1) {\n shapes[i].setAsAnimated();\n }\n };\n\n SVGShapeElement.prototype.createStyleElement = function (data, level) {\n // TODO: prevent drawing of hidden styles\n var elementData;\n var styleOb = new SVGStyleData(data, level);\n var pathElement = styleOb.pElem;\n\n if (data.ty === 'st') {\n elementData = new SVGStrokeStyleData(this, data, styleOb);\n } else if (data.ty === 'fl') {\n elementData = new SVGFillStyleData(this, data, styleOb);\n } else if (data.ty === 'gf' || data.ty === 'gs') {\n var GradientConstructor = data.ty === 'gf' ? SVGGradientFillStyleData : SVGGradientStrokeStyleData;\n elementData = new GradientConstructor(this, data, styleOb);\n this.globalData.defs.appendChild(elementData.gf);\n\n if (elementData.maskId) {\n this.globalData.defs.appendChild(elementData.ms);\n this.globalData.defs.appendChild(elementData.of);\n pathElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + elementData.maskId + ')');\n }\n } else if (data.ty === 'no') {\n elementData = new SVGNoStyleData(this, data, styleOb);\n }\n\n if (data.ty === 'st' || data.ty === 'gs') {\n pathElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);\n pathElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);\n pathElement.setAttribute('fill-opacity', '0');\n\n if (data.lj === 1) {\n pathElement.setAttribute('stroke-miterlimit', data.ml);\n }\n }\n\n if (data.r === 2) {\n pathElement.setAttribute('fill-rule', 'evenodd');\n }\n\n if (data.ln) {\n pathElement.setAttribute('id', data.ln);\n }\n\n if (data.cl) {\n pathElement.setAttribute('class', data.cl);\n }\n\n if (data.bm) {\n pathElement.style['mix-blend-mode'] = getBlendMode(data.bm);\n }\n\n this.stylesList.push(styleOb);\n this.addToAnimatedContents(data, elementData);\n return elementData;\n };\n\n SVGShapeElement.prototype.createGroupElement = function (data) {\n var elementData = new ShapeGroupData();\n\n if (data.ln) {\n elementData.gr.setAttribute('id', data.ln);\n }\n\n if (data.cl) {\n elementData.gr.setAttribute('class', data.cl);\n }\n\n if (data.bm) {\n elementData.gr.style['mix-blend-mode'] = getBlendMode(data.bm);\n }\n\n return elementData;\n };\n\n SVGShapeElement.prototype.createTransformElement = function (data, container) {\n var transformProperty = TransformPropertyFactory.getTransformProperty(this, data, this);\n var elementData = new SVGTransformData(transformProperty, transformProperty.o, container);\n this.addToAnimatedContents(data, elementData);\n return elementData;\n };\n\n SVGShapeElement.prototype.createShapeElement = function (data, ownTransformers, level) {\n var ty = 4;\n\n if (data.ty === 'rc') {\n ty = 5;\n } else if (data.ty === 'el') {\n ty = 6;\n } else if (data.ty === 'sr') {\n ty = 7;\n }\n\n var shapeProperty = ShapePropertyFactory.getShapeProp(this, data, ty, this);\n var elementData = new SVGShapeData(ownTransformers, level, shapeProperty);\n this.shapes.push(elementData);\n this.addShapeToModifiers(elementData);\n this.addToAnimatedContents(data, elementData);\n return elementData;\n };\n\n SVGShapeElement.prototype.addToAnimatedContents = function (data, element) {\n var i = 0;\n var len = this.animatedContents.length;\n\n while (i < len) {\n if (this.animatedContents[i].element === element) {\n return;\n }\n\n i += 1;\n }\n\n this.animatedContents.push({\n fn: SVGElementsRenderer.createRenderFunction(data),\n element: element,\n data: data\n });\n };\n\n SVGShapeElement.prototype.setElementStyles = function (elementData) {\n var arr = elementData.styles;\n var j;\n var jLen = this.stylesList.length;\n\n for (j = 0; j < jLen; j += 1) {\n if (!this.stylesList[j].closed) {\n arr.push(this.stylesList[j]);\n }\n }\n };\n\n SVGShapeElement.prototype.reloadShapes = function () {\n this._isFirstFrame = true;\n var i;\n var len = this.itemsData.length;\n\n for (i = 0; i < len; i += 1) {\n this.prevViewData[i] = this.itemsData[i];\n }\n\n this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);\n this.filterUniqueShapes();\n len = this.dynamicProperties.length;\n\n for (i = 0; i < len; i += 1) {\n this.dynamicProperties[i].getValue();\n }\n\n this.renderModifiers();\n };\n\n SVGShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, container, level, transformers, render) {\n var ownTransformers = [].concat(transformers);\n var i;\n var len = arr.length - 1;\n var j;\n var jLen;\n var ownStyles = [];\n var ownModifiers = [];\n var currentTransform;\n var modifier;\n var processedPos;\n\n for (i = len; i >= 0; i -= 1) {\n processedPos = this.searchProcessedElement(arr[i]);\n\n if (!processedPos) {\n arr[i]._render = render;\n } else {\n itemsData[i] = prevViewData[processedPos - 1];\n }\n\n if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs' || arr[i].ty === 'no') {\n if (!processedPos) {\n itemsData[i] = this.createStyleElement(arr[i], level);\n } else {\n itemsData[i].style.closed = false;\n }\n\n if (arr[i]._render) {\n if (itemsData[i].style.pElem.parentNode !== container) {\n container.appendChild(itemsData[i].style.pElem);\n }\n }\n\n ownStyles.push(itemsData[i].style);\n } else if (arr[i].ty === 'gr') {\n if (!processedPos) {\n itemsData[i] = this.createGroupElement(arr[i]);\n } else {\n jLen = itemsData[i].it.length;\n\n for (j = 0; j < jLen; j += 1) {\n itemsData[i].prevViewData[j] = itemsData[i].it[j];\n }\n }\n\n this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, itemsData[i].gr, level + 1, ownTransformers, render);\n\n if (arr[i]._render) {\n if (itemsData[i].gr.parentNode !== container) {\n container.appendChild(itemsData[i].gr);\n }\n }\n } else if (arr[i].ty === 'tr') {\n if (!processedPos) {\n itemsData[i] = this.createTransformElement(arr[i], container);\n }\n\n currentTransform = itemsData[i].transform;\n ownTransformers.push(currentTransform);\n } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {\n if (!processedPos) {\n itemsData[i] = this.createShapeElement(arr[i], ownTransformers, level);\n }\n\n this.setElementStyles(itemsData[i]);\n } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'ms' || arr[i].ty === 'pb' || arr[i].ty === 'zz' || arr[i].ty === 'op') {\n if (!processedPos) {\n modifier = ShapeModifiers.getModifier(arr[i].ty);\n modifier.init(this, arr[i]);\n itemsData[i] = modifier;\n this.shapeModifiers.push(modifier);\n } else {\n modifier = itemsData[i];\n modifier.closed = false;\n }\n\n ownModifiers.push(modifier);\n } else if (arr[i].ty === 'rp') {\n if (!processedPos) {\n modifier = ShapeModifiers.getModifier(arr[i].ty);\n itemsData[i] = modifier;\n modifier.init(this, arr, i, itemsData);\n this.shapeModifiers.push(modifier);\n render = false;\n } else {\n modifier = itemsData[i];\n modifier.closed = true;\n }\n\n ownModifiers.push(modifier);\n }\n\n this.addProcessedElement(arr[i], i + 1);\n }\n\n len = ownStyles.length;\n\n for (i = 0; i < len; i += 1) {\n ownStyles[i].closed = true;\n }\n\n len = ownModifiers.length;\n\n for (i = 0; i < len; i += 1) {\n ownModifiers[i].closed = true;\n }\n };\n\n SVGShapeElement.prototype.renderInnerContent = function () {\n this.renderModifiers();\n var i;\n var len = this.stylesList.length;\n\n for (i = 0; i < len; i += 1) {\n this.stylesList[i].reset();\n }\n\n this.renderShape();\n\n for (i = 0; i < len; i += 1) {\n if (this.stylesList[i]._mdf || this._isFirstFrame) {\n if (this.stylesList[i].msElem) {\n this.stylesList[i].msElem.setAttribute('d', this.stylesList[i].d); // Adding M0 0 fixes same mask bug on all browsers\n\n this.stylesList[i].d = 'M0 0' + this.stylesList[i].d;\n }\n\n this.stylesList[i].pElem.setAttribute('d', this.stylesList[i].d || 'M0 0');\n }\n }\n };\n\n SVGShapeElement.prototype.renderShape = function () {\n var i;\n var len = this.animatedContents.length;\n var animatedContent;\n\n for (i = 0; i < len; i += 1) {\n animatedContent = this.animatedContents[i];\n\n if ((this._isFirstFrame || animatedContent.element._isAnimated) && animatedContent.data !== true) {\n animatedContent.fn(animatedContent.data, animatedContent.element, this._isFirstFrame);\n }\n }\n };\n\n SVGShapeElement.prototype.destroy = function () {\n this.destroyBaseElement();\n this.shapesData = null;\n this.itemsData = null;\n };\n\n function LetterProps(o, sw, sc, fc, m, p) {\n this.o = o;\n this.sw = sw;\n this.sc = sc;\n this.fc = fc;\n this.m = m;\n this.p = p;\n this._mdf = {\n o: true,\n sw: !!sw,\n sc: !!sc,\n fc: !!fc,\n m: true,\n p: true\n };\n }\n\n LetterProps.prototype.update = function (o, sw, sc, fc, m, p) {\n this._mdf.o = false;\n this._mdf.sw = false;\n this._mdf.sc = false;\n this._mdf.fc = false;\n this._mdf.m = false;\n this._mdf.p = false;\n var updated = false;\n\n if (this.o !== o) {\n this.o = o;\n this._mdf.o = true;\n updated = true;\n }\n\n if (this.sw !== sw) {\n this.sw = sw;\n this._mdf.sw = true;\n updated = true;\n }\n\n if (this.sc !== sc) {\n this.sc = sc;\n this._mdf.sc = true;\n updated = true;\n }\n\n if (this.fc !== fc) {\n this.fc = fc;\n this._mdf.fc = true;\n updated = true;\n }\n\n if (this.m !== m) {\n this.m = m;\n this._mdf.m = true;\n updated = true;\n }\n\n if (p.length && (this.p[0] !== p[0] || this.p[1] !== p[1] || this.p[4] !== p[4] || this.p[5] !== p[5] || this.p[12] !== p[12] || this.p[13] !== p[13])) {\n this.p = p;\n this._mdf.p = true;\n updated = true;\n }\n\n return updated;\n };\n\n function TextProperty(elem, data) {\n this._frameId = initialDefaultFrame;\n this.pv = '';\n this.v = '';\n this.kf = false;\n this._isFirstFrame = true;\n this._mdf = false;\n\n if (data.d && data.d.sid) {\n data.d = elem.globalData.slotManager.getProp(data.d);\n }\n\n this.data = data;\n this.elem = elem;\n this.comp = this.elem.comp;\n this.keysIndex = 0;\n this.canResize = false;\n this.minimumFontSize = 1;\n this.effectsSequence = [];\n this.currentData = {\n ascent: 0,\n boxWidth: this.defaultBoxWidth,\n f: '',\n fStyle: '',\n fWeight: '',\n fc: '',\n j: '',\n justifyOffset: '',\n l: [],\n lh: 0,\n lineWidths: [],\n ls: '',\n of: '',\n s: '',\n sc: '',\n sw: 0,\n t: 0,\n tr: 0,\n sz: 0,\n ps: null,\n fillColorAnim: false,\n strokeColorAnim: false,\n strokeWidthAnim: false,\n yOffset: 0,\n finalSize: 0,\n finalText: [],\n finalLineHeight: 0,\n __complete: false\n };\n this.copyData(this.currentData, this.data.d.k[0].s);\n\n if (!this.searchProperty()) {\n this.completeTextData(this.currentData);\n }\n }\n\n TextProperty.prototype.defaultBoxWidth = [0, 0];\n\n TextProperty.prototype.copyData = function (obj, data) {\n for (var s in data) {\n if (Object.prototype.hasOwnProperty.call(data, s)) {\n obj[s] = data[s];\n }\n }\n\n return obj;\n };\n\n TextProperty.prototype.setCurrentData = function (data) {\n if (!data.__complete) {\n this.completeTextData(data);\n }\n\n this.currentData = data;\n this.currentData.boxWidth = this.currentData.boxWidth || this.defaultBoxWidth;\n this._mdf = true;\n };\n\n TextProperty.prototype.searchProperty = function () {\n return this.searchKeyframes();\n };\n\n TextProperty.prototype.searchKeyframes = function () {\n this.kf = this.data.d.k.length > 1;\n\n if (this.kf) {\n this.addEffect(this.getKeyframeValue.bind(this));\n }\n\n return this.kf;\n };\n\n TextProperty.prototype.addEffect = function (effectFunction) {\n this.effectsSequence.push(effectFunction);\n this.elem.addDynamicProperty(this);\n };\n\n TextProperty.prototype.getValue = function (_finalValue) {\n if ((this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) && !_finalValue) {\n return;\n }\n\n this.currentData.t = this.data.d.k[this.keysIndex].s.t;\n var currentValue = this.currentData;\n var currentIndex = this.keysIndex;\n\n if (this.lock) {\n this.setCurrentData(this.currentData);\n return;\n }\n\n this.lock = true;\n this._mdf = false;\n var i;\n var len = this.effectsSequence.length;\n var finalValue = _finalValue || this.data.d.k[this.keysIndex].s;\n\n for (i = 0; i < len; i += 1) {\n // Checking if index changed to prevent creating a new object every time the expression updates.\n if (currentIndex !== this.keysIndex) {\n finalValue = this.effectsSequence[i](finalValue, finalValue.t);\n } else {\n finalValue = this.effectsSequence[i](this.currentData, finalValue.t);\n }\n }\n\n if (currentValue !== finalValue) {\n this.setCurrentData(finalValue);\n }\n\n this.v = this.currentData;\n this.pv = this.v;\n this.lock = false;\n this.frameId = this.elem.globalData.frameId;\n };\n\n TextProperty.prototype.getKeyframeValue = function () {\n var textKeys = this.data.d.k;\n var frameNum = this.elem.comp.renderedFrame;\n var i = 0;\n var len = textKeys.length;\n\n while (i <= len - 1) {\n if (i === len - 1 || textKeys[i + 1].t > frameNum) {\n break;\n }\n\n i += 1;\n }\n\n if (this.keysIndex !== i) {\n this.keysIndex = i;\n }\n\n return this.data.d.k[this.keysIndex].s;\n };\n\n TextProperty.prototype.buildFinalText = function (text) {\n var charactersArray = [];\n var i = 0;\n var len = text.length;\n var charCode;\n var secondCharCode;\n var shouldCombine = false;\n var shouldCombineNext = false;\n var currentChars = '';\n\n while (i < len) {\n shouldCombine = shouldCombineNext;\n shouldCombineNext = false;\n charCode = text.charCodeAt(i);\n currentChars = text.charAt(i);\n\n if (FontManager.isCombinedCharacter(charCode)) {\n shouldCombine = true; // It's a potential surrogate pair (this is the High surrogate)\n } else if (charCode >= 0xD800 && charCode <= 0xDBFF) {\n if (FontManager.isRegionalFlag(text, i)) {\n currentChars = text.substr(i, 14);\n } else {\n secondCharCode = text.charCodeAt(i + 1); // It's a surrogate pair (this is the Low surrogate)\n\n if (secondCharCode >= 0xDC00 && secondCharCode <= 0xDFFF) {\n if (FontManager.isModifier(charCode, secondCharCode)) {\n currentChars = text.substr(i, 2);\n shouldCombine = true;\n } else if (FontManager.isFlagEmoji(text.substr(i, 4))) {\n currentChars = text.substr(i, 4);\n } else {\n currentChars = text.substr(i, 2);\n }\n }\n }\n } else if (charCode > 0xDBFF) {\n secondCharCode = text.charCodeAt(i + 1);\n\n if (FontManager.isVariationSelector(charCode)) {\n shouldCombine = true;\n }\n } else if (FontManager.isZeroWidthJoiner(charCode)) {\n shouldCombine = true;\n shouldCombineNext = true;\n }\n\n if (shouldCombine) {\n charactersArray[charactersArray.length - 1] += currentChars;\n shouldCombine = false;\n } else {\n charactersArray.push(currentChars);\n }\n\n i += currentChars.length;\n }\n\n return charactersArray;\n };\n\n TextProperty.prototype.completeTextData = function (documentData) {\n documentData.__complete = true;\n var fontManager = this.elem.globalData.fontManager;\n var data = this.data;\n var letters = [];\n var i;\n var len;\n var newLineFlag;\n var index = 0;\n var val;\n var anchorGrouping = data.m.g;\n var currentSize = 0;\n var currentPos = 0;\n var currentLine = 0;\n var lineWidths = [];\n var lineWidth = 0;\n var maxLineWidth = 0;\n var j;\n var jLen;\n var fontData = fontManager.getFontByName(documentData.f);\n var charData;\n var cLength = 0;\n var fontProps = getFontProperties(fontData);\n documentData.fWeight = fontProps.weight;\n documentData.fStyle = fontProps.style;\n documentData.finalSize = documentData.s;\n documentData.finalText = this.buildFinalText(documentData.t);\n len = documentData.finalText.length;\n documentData.finalLineHeight = documentData.lh;\n var trackingOffset = documentData.tr / 1000 * documentData.finalSize;\n var charCode;\n\n if (documentData.sz) {\n var flag = true;\n var boxWidth = documentData.sz[0];\n var boxHeight = documentData.sz[1];\n var currentHeight;\n var finalText;\n\n while (flag) {\n finalText = this.buildFinalText(documentData.t);\n currentHeight = 0;\n lineWidth = 0;\n len = finalText.length;\n trackingOffset = documentData.tr / 1000 * documentData.finalSize;\n var lastSpaceIndex = -1;\n\n for (i = 0; i < len; i += 1) {\n charCode = finalText[i].charCodeAt(0);\n newLineFlag = false;\n\n if (finalText[i] === ' ') {\n lastSpaceIndex = i;\n } else if (charCode === 13 || charCode === 3) {\n lineWidth = 0;\n newLineFlag = true;\n currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;\n }\n\n if (fontManager.chars) {\n charData = fontManager.getCharData(finalText[i], fontData.fStyle, fontData.fFamily);\n cLength = newLineFlag ? 0 : charData.w * documentData.finalSize / 100;\n } else {\n // tCanvasHelper.font = documentData.s + 'px '+ fontData.fFamily;\n cLength = fontManager.measureText(finalText[i], documentData.f, documentData.finalSize);\n }\n\n if (lineWidth + cLength > boxWidth && finalText[i] !== ' ') {\n if (lastSpaceIndex === -1) {\n len += 1;\n } else {\n i = lastSpaceIndex;\n }\n\n currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;\n finalText.splice(i, lastSpaceIndex === i ? 1 : 0, '\\r'); // finalText = finalText.substr(0,i) + \"\\r\" + finalText.substr(i === lastSpaceIndex ? i + 1 : i);\n\n lastSpaceIndex = -1;\n lineWidth = 0;\n } else {\n lineWidth += cLength;\n lineWidth += trackingOffset;\n }\n }\n\n currentHeight += fontData.ascent * documentData.finalSize / 100;\n\n if (this.canResize && documentData.finalSize > this.minimumFontSize && boxHeight < currentHeight) {\n documentData.finalSize -= 1;\n documentData.finalLineHeight = documentData.finalSize * documentData.lh / documentData.s;\n } else {\n documentData.finalText = finalText;\n len = documentData.finalText.length;\n flag = false;\n }\n }\n }\n\n lineWidth = -trackingOffset;\n cLength = 0;\n var uncollapsedSpaces = 0;\n var currentChar;\n\n for (i = 0; i < len; i += 1) {\n newLineFlag = false;\n currentChar = documentData.finalText[i];\n charCode = currentChar.charCodeAt(0);\n\n if (charCode === 13 || charCode === 3) {\n uncollapsedSpaces = 0;\n lineWidths.push(lineWidth);\n maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;\n lineWidth = -2 * trackingOffset;\n val = '';\n newLineFlag = true;\n currentLine += 1;\n } else {\n val = currentChar;\n }\n\n if (fontManager.chars) {\n charData = fontManager.getCharData(currentChar, fontData.fStyle, fontManager.getFontByName(documentData.f).fFamily);\n cLength = newLineFlag ? 0 : charData.w * documentData.finalSize / 100;\n } else {\n // var charWidth = fontManager.measureText(val, documentData.f, documentData.finalSize);\n // tCanvasHelper.font = documentData.finalSize + 'px '+ fontManager.getFontByName(documentData.f).fFamily;\n cLength = fontManager.measureText(val, documentData.f, documentData.finalSize);\n } //\n\n\n if (currentChar === ' ') {\n uncollapsedSpaces += cLength + trackingOffset;\n } else {\n lineWidth += cLength + trackingOffset + uncollapsedSpaces;\n uncollapsedSpaces = 0;\n }\n\n letters.push({\n l: cLength,\n an: cLength,\n add: currentSize,\n n: newLineFlag,\n anIndexes: [],\n val: val,\n line: currentLine,\n animatorJustifyOffset: 0\n });\n\n if (anchorGrouping == 2) {\n // eslint-disable-line eqeqeq\n currentSize += cLength;\n\n if (val === '' || val === ' ' || i === len - 1) {\n if (val === '' || val === ' ') {\n currentSize -= cLength;\n }\n\n while (currentPos <= i) {\n letters[currentPos].an = currentSize;\n letters[currentPos].ind = index;\n letters[currentPos].extra = cLength;\n currentPos += 1;\n }\n\n index += 1;\n currentSize = 0;\n }\n } else if (anchorGrouping == 3) {\n // eslint-disable-line eqeqeq\n currentSize += cLength;\n\n if (val === '' || i === len - 1) {\n if (val === '') {\n currentSize -= cLength;\n }\n\n while (currentPos <= i) {\n letters[currentPos].an = currentSize;\n letters[currentPos].ind = index;\n letters[currentPos].extra = cLength;\n currentPos += 1;\n }\n\n currentSize = 0;\n index += 1;\n }\n } else {\n letters[index].ind = index;\n letters[index].extra = 0;\n index += 1;\n }\n }\n\n documentData.l = letters;\n maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;\n lineWidths.push(lineWidth);\n\n if (documentData.sz) {\n documentData.boxWidth = documentData.sz[0];\n documentData.justifyOffset = 0;\n } else {\n documentData.boxWidth = maxLineWidth;\n\n switch (documentData.j) {\n case 1:\n documentData.justifyOffset = -documentData.boxWidth;\n break;\n\n case 2:\n documentData.justifyOffset = -documentData.boxWidth / 2;\n break;\n\n default:\n documentData.justifyOffset = 0;\n }\n }\n\n documentData.lineWidths = lineWidths;\n var animators = data.a;\n var animatorData;\n var letterData;\n jLen = animators.length;\n var based;\n var ind;\n var indexes = [];\n\n for (j = 0; j < jLen; j += 1) {\n animatorData = animators[j];\n\n if (animatorData.a.sc) {\n documentData.strokeColorAnim = true;\n }\n\n if (animatorData.a.sw) {\n documentData.strokeWidthAnim = true;\n }\n\n if (animatorData.a.fc || animatorData.a.fh || animatorData.a.fs || animatorData.a.fb) {\n documentData.fillColorAnim = true;\n }\n\n ind = 0;\n based = animatorData.s.b;\n\n for (i = 0; i < len; i += 1) {\n letterData = letters[i];\n letterData.anIndexes[j] = ind;\n\n if (based == 1 && letterData.val !== '' || based == 2 && letterData.val !== '' && letterData.val !== ' ' || based == 3 && (letterData.n || letterData.val == ' ' || i == len - 1) || based == 4 && (letterData.n || i == len - 1)) {\n // eslint-disable-line eqeqeq\n if (animatorData.s.rn === 1) {\n indexes.push(ind);\n }\n\n ind += 1;\n }\n }\n\n data.a[j].s.totalChars = ind;\n var currentInd = -1;\n var newInd;\n\n if (animatorData.s.rn === 1) {\n for (i = 0; i < len; i += 1) {\n letterData = letters[i];\n\n if (currentInd != letterData.anIndexes[j]) {\n // eslint-disable-line eqeqeq\n currentInd = letterData.anIndexes[j];\n newInd = indexes.splice(Math.floor(Math.random() * indexes.length), 1)[0];\n }\n\n letterData.anIndexes[j] = newInd;\n }\n }\n }\n\n documentData.yOffset = documentData.finalLineHeight || documentData.finalSize * 1.2;\n documentData.ls = documentData.ls || 0;\n documentData.ascent = fontData.ascent * documentData.finalSize / 100;\n };\n\n TextProperty.prototype.updateDocumentData = function (newData, index) {\n index = index === undefined ? this.keysIndex : index;\n var dData = this.copyData({}, this.data.d.k[index].s);\n dData = this.copyData(dData, newData);\n this.data.d.k[index].s = dData;\n this.recalculate(index);\n this.setCurrentData(dData);\n this.elem.addDynamicProperty(this);\n };\n\n TextProperty.prototype.recalculate = function (index) {\n var dData = this.data.d.k[index].s;\n dData.__complete = false;\n this.keysIndex = 0;\n this._isFirstFrame = true;\n this.getValue(dData);\n };\n\n TextProperty.prototype.canResizeFont = function (_canResize) {\n this.canResize = _canResize;\n this.recalculate(this.keysIndex);\n this.elem.addDynamicProperty(this);\n };\n\n TextProperty.prototype.setMinimumFontSize = function (_fontValue) {\n this.minimumFontSize = Math.floor(_fontValue) || 1;\n this.recalculate(this.keysIndex);\n this.elem.addDynamicProperty(this);\n };\n\n var TextSelectorProp = function () {\n var max = Math.max;\n var min = Math.min;\n var floor = Math.floor;\n\n function TextSelectorPropFactory(elem, data) {\n this._currentTextLength = -1;\n this.k = false;\n this.data = data;\n this.elem = elem;\n this.comp = elem.comp;\n this.finalS = 0;\n this.finalE = 0;\n this.initDynamicPropertyContainer(elem);\n this.s = PropertyFactory.getProp(elem, data.s || {\n k: 0\n }, 0, 0, this);\n\n if ('e' in data) {\n this.e = PropertyFactory.getProp(elem, data.e, 0, 0, this);\n } else {\n this.e = {\n v: 100\n };\n }\n\n this.o = PropertyFactory.getProp(elem, data.o || {\n k: 0\n }, 0, 0, this);\n this.xe = PropertyFactory.getProp(elem, data.xe || {\n k: 0\n }, 0, 0, this);\n this.ne = PropertyFactory.getProp(elem, data.ne || {\n k: 0\n }, 0, 0, this);\n this.sm = PropertyFactory.getProp(elem, data.sm || {\n k: 100\n }, 0, 0, this);\n this.a = PropertyFactory.getProp(elem, data.a, 0, 0.01, this);\n\n if (!this.dynamicProperties.length) {\n this.getValue();\n }\n }\n\n TextSelectorPropFactory.prototype = {\n getMult: function getMult(ind) {\n if (this._currentTextLength !== this.elem.textProperty.currentData.l.length) {\n this.getValue();\n }\n\n var x1 = 0;\n var y1 = 0;\n var x2 = 1;\n var y2 = 1;\n\n if (this.ne.v > 0) {\n x1 = this.ne.v / 100.0;\n } else {\n y1 = -this.ne.v / 100.0;\n }\n\n if (this.xe.v > 0) {\n x2 = 1.0 - this.xe.v / 100.0;\n } else {\n y2 = 1.0 + this.xe.v / 100.0;\n }\n\n var easer = BezierFactory.getBezierEasing(x1, y1, x2, y2).get;\n var mult = 0;\n var s = this.finalS;\n var e = this.finalE;\n var type = this.data.sh;\n\n if (type === 2) {\n if (e === s) {\n mult = ind >= e ? 1 : 0;\n } else {\n mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));\n }\n\n mult = easer(mult);\n } else if (type === 3) {\n if (e === s) {\n mult = ind >= e ? 0 : 1;\n } else {\n mult = 1 - max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));\n }\n\n mult = easer(mult);\n } else if (type === 4) {\n if (e === s) {\n mult = 0;\n } else {\n mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));\n\n if (mult < 0.5) {\n mult *= 2;\n } else {\n mult = 1 - 2 * (mult - 0.5);\n }\n }\n\n mult = easer(mult);\n } else if (type === 5) {\n if (e === s) {\n mult = 0;\n } else {\n var tot = e - s;\n /* ind += 0.5;\r\n mult = -4/(tot*tot)*(ind*ind)+(4/tot)*ind; */\n\n ind = min(max(0, ind + 0.5 - s), e - s);\n var x = -tot / 2 + ind;\n var a = tot / 2;\n mult = Math.sqrt(1 - x * x / (a * a));\n }\n\n mult = easer(mult);\n } else if (type === 6) {\n if (e === s) {\n mult = 0;\n } else {\n ind = min(max(0, ind + 0.5 - s), e - s);\n mult = (1 + Math.cos(Math.PI + Math.PI * 2 * ind / (e - s))) / 2; // eslint-disable-line\n }\n\n mult = easer(mult);\n } else {\n if (ind >= floor(s)) {\n if (ind - s < 0) {\n mult = max(0, min(min(e, 1) - (s - ind), 1));\n } else {\n mult = max(0, min(e - ind, 1));\n }\n }\n\n mult = easer(mult);\n } // Smoothness implementation.\n // The smoothness represents a reduced range of the original [0; 1] range.\n // if smoothness is 25%, the new range will be [0.375; 0.625]\n // Steps are:\n // - find the lower value of the new range (threshold)\n // - if multiplier is smaller than that value, floor it to 0\n // - if it is larger,\n // - subtract the threshold\n // - divide it by the smoothness (this will return the range to [0; 1])\n // Note: If it doesn't work on some scenarios, consider applying it before the easer.\n\n\n if (this.sm.v !== 100) {\n var smoothness = this.sm.v * 0.01;\n\n if (smoothness === 0) {\n smoothness = 0.00000001;\n }\n\n var threshold = 0.5 - smoothness * 0.5;\n\n if (mult < threshold) {\n mult = 0;\n } else {\n mult = (mult - threshold) / smoothness;\n\n if (mult > 1) {\n mult = 1;\n }\n }\n }\n\n return mult * this.a.v;\n },\n getValue: function getValue(newCharsFlag) {\n this.iterateDynamicProperties();\n this._mdf = newCharsFlag || this._mdf;\n this._currentTextLength = this.elem.textProperty.currentData.l.length || 0;\n\n if (newCharsFlag && this.data.r === 2) {\n this.e.v = this._currentTextLength;\n }\n\n var divisor = this.data.r === 2 ? 1 : 100 / this.data.totalChars;\n var o = this.o.v / divisor;\n var s = this.s.v / divisor + o;\n var e = this.e.v / divisor + o;\n\n if (s > e) {\n var _s = s;\n s = e;\n e = _s;\n }\n\n this.finalS = s;\n this.finalE = e;\n }\n };\n extendPrototype([DynamicPropertyContainer], TextSelectorPropFactory);\n\n function getTextSelectorProp(elem, data, arr) {\n return new TextSelectorPropFactory(elem, data, arr);\n }\n\n return {\n getTextSelectorProp: getTextSelectorProp\n };\n }();\n\n function TextAnimatorDataProperty(elem, animatorProps, container) {\n var defaultData = {\n propType: false\n };\n var getProp = PropertyFactory.getProp;\n var textAnimatorAnimatables = animatorProps.a;\n this.a = {\n r: textAnimatorAnimatables.r ? getProp(elem, textAnimatorAnimatables.r, 0, degToRads, container) : defaultData,\n rx: textAnimatorAnimatables.rx ? getProp(elem, textAnimatorAnimatables.rx, 0, degToRads, container) : defaultData,\n ry: textAnimatorAnimatables.ry ? getProp(elem, textAnimatorAnimatables.ry, 0, degToRads, container) : defaultData,\n sk: textAnimatorAnimatables.sk ? getProp(elem, textAnimatorAnimatables.sk, 0, degToRads, container) : defaultData,\n sa: textAnimatorAnimatables.sa ? getProp(elem, textAnimatorAnimatables.sa, 0, degToRads, container) : defaultData,\n s: textAnimatorAnimatables.s ? getProp(elem, textAnimatorAnimatables.s, 1, 0.01, container) : defaultData,\n a: textAnimatorAnimatables.a ? getProp(elem, textAnimatorAnimatables.a, 1, 0, container) : defaultData,\n o: textAnimatorAnimatables.o ? getProp(elem, textAnimatorAnimatables.o, 0, 0.01, container) : defaultData,\n p: textAnimatorAnimatables.p ? getProp(elem, textAnimatorAnimatables.p, 1, 0, container) : defaultData,\n sw: textAnimatorAnimatables.sw ? getProp(elem, textAnimatorAnimatables.sw, 0, 0, container) : defaultData,\n sc: textAnimatorAnimatables.sc ? getProp(elem, textAnimatorAnimatables.sc, 1, 0, container) : defaultData,\n fc: textAnimatorAnimatables.fc ? getProp(elem, textAnimatorAnimatables.fc, 1, 0, container) : defaultData,\n fh: textAnimatorAnimatables.fh ? getProp(elem, textAnimatorAnimatables.fh, 0, 0, container) : defaultData,\n fs: textAnimatorAnimatables.fs ? getProp(elem, textAnimatorAnimatables.fs, 0, 0.01, container) : defaultData,\n fb: textAnimatorAnimatables.fb ? getProp(elem, textAnimatorAnimatables.fb, 0, 0.01, container) : defaultData,\n t: textAnimatorAnimatables.t ? getProp(elem, textAnimatorAnimatables.t, 0, 0, container) : defaultData\n };\n this.s = TextSelectorProp.getTextSelectorProp(elem, animatorProps.s, container);\n this.s.t = animatorProps.s.t;\n }\n\n function TextAnimatorProperty(textData, renderType, elem) {\n this._isFirstFrame = true;\n this._hasMaskedPath = false;\n this._frameId = -1;\n this._textData = textData;\n this._renderType = renderType;\n this._elem = elem;\n this._animatorsData = createSizedArray(this._textData.a.length);\n this._pathData = {};\n this._moreOptions = {\n alignment: {}\n };\n this.renderedLetters = [];\n this.lettersChangedFlag = false;\n this.initDynamicPropertyContainer(elem);\n }\n\n TextAnimatorProperty.prototype.searchProperties = function () {\n var i;\n var len = this._textData.a.length;\n var animatorProps;\n var getProp = PropertyFactory.getProp;\n\n for (i = 0; i < len; i += 1) {\n animatorProps = this._textData.a[i];\n this._animatorsData[i] = new TextAnimatorDataProperty(this._elem, animatorProps, this);\n }\n\n if (this._textData.p && 'm' in this._textData.p) {\n this._pathData = {\n a: getProp(this._elem, this._textData.p.a, 0, 0, this),\n f: getProp(this._elem, this._textData.p.f, 0, 0, this),\n l: getProp(this._elem, this._textData.p.l, 0, 0, this),\n r: getProp(this._elem, this._textData.p.r, 0, 0, this),\n p: getProp(this._elem, this._textData.p.p, 0, 0, this),\n m: this._elem.maskManager.getMaskProperty(this._textData.p.m)\n };\n this._hasMaskedPath = true;\n } else {\n this._hasMaskedPath = false;\n }\n\n this._moreOptions.alignment = getProp(this._elem, this._textData.m.a, 1, 0, this);\n };\n\n TextAnimatorProperty.prototype.getMeasures = function (documentData, lettersChangedFlag) {\n this.lettersChangedFlag = lettersChangedFlag;\n\n if (!this._mdf && !this._isFirstFrame && !lettersChangedFlag && (!this._hasMaskedPath || !this._pathData.m._mdf)) {\n return;\n }\n\n this._isFirstFrame = false;\n var alignment = this._moreOptions.alignment.v;\n var animators = this._animatorsData;\n var textData = this._textData;\n var matrixHelper = this.mHelper;\n var renderType = this._renderType;\n var renderedLettersCount = this.renderedLetters.length;\n var xPos;\n var yPos;\n var i;\n var len;\n var letters = documentData.l;\n var pathInfo;\n var currentLength;\n var currentPoint;\n var segmentLength;\n var flag;\n var pointInd;\n var segmentInd;\n var prevPoint;\n var points;\n var segments;\n var partialLength;\n var totalLength;\n var perc;\n var tanAngle;\n var mask;\n\n if (this._hasMaskedPath) {\n mask = this._pathData.m;\n\n if (!this._pathData.n || this._pathData._mdf) {\n var paths = mask.v;\n\n if (this._pathData.r.v) {\n paths = paths.reverse();\n } // TODO: release bezier data cached from previous pathInfo: this._pathData.pi\n\n\n pathInfo = {\n tLength: 0,\n segments: []\n };\n len = paths._length - 1;\n var bezierData;\n totalLength = 0;\n\n for (i = 0; i < len; i += 1) {\n bezierData = bez.buildBezierData(paths.v[i], paths.v[i + 1], [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]], [paths.i[i + 1][0] - paths.v[i + 1][0], paths.i[i + 1][1] - paths.v[i + 1][1]]);\n pathInfo.tLength += bezierData.segmentLength;\n pathInfo.segments.push(bezierData);\n totalLength += bezierData.segmentLength;\n }\n\n i = len;\n\n if (mask.v.c) {\n bezierData = bez.buildBezierData(paths.v[i], paths.v[0], [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]], [paths.i[0][0] - paths.v[0][0], paths.i[0][1] - paths.v[0][1]]);\n pathInfo.tLength += bezierData.segmentLength;\n pathInfo.segments.push(bezierData);\n totalLength += bezierData.segmentLength;\n }\n\n this._pathData.pi = pathInfo;\n }\n\n pathInfo = this._pathData.pi;\n currentLength = this._pathData.f.v;\n segmentInd = 0;\n pointInd = 1;\n segmentLength = 0;\n flag = true;\n segments = pathInfo.segments;\n\n if (currentLength < 0 && mask.v.c) {\n if (pathInfo.tLength < Math.abs(currentLength)) {\n currentLength = -Math.abs(currentLength) % pathInfo.tLength;\n }\n\n segmentInd = segments.length - 1;\n points = segments[segmentInd].points;\n pointInd = points.length - 1;\n\n while (currentLength < 0) {\n currentLength += points[pointInd].partialLength;\n pointInd -= 1;\n\n if (pointInd < 0) {\n segmentInd -= 1;\n points = segments[segmentInd].points;\n pointInd = points.length - 1;\n }\n }\n }\n\n points = segments[segmentInd].points;\n prevPoint = points[pointInd - 1];\n currentPoint = points[pointInd];\n partialLength = currentPoint.partialLength;\n }\n\n len = letters.length;\n xPos = 0;\n yPos = 0;\n var yOff = documentData.finalSize * 1.2 * 0.714;\n var firstLine = true;\n var animatorProps;\n var animatorSelector;\n var j;\n var jLen;\n var letterValue;\n jLen = animators.length;\n var mult;\n var ind = -1;\n var offf;\n var xPathPos;\n var yPathPos;\n var initPathPos = currentLength;\n var initSegmentInd = segmentInd;\n var initPointInd = pointInd;\n var currentLine = -1;\n var elemOpacity;\n var sc;\n var sw;\n var fc;\n var k;\n var letterSw;\n var letterSc;\n var letterFc;\n var letterM = '';\n var letterP = this.defaultPropsArray;\n var letterO; //\n\n if (documentData.j === 2 || documentData.j === 1) {\n var animatorJustifyOffset = 0;\n var animatorFirstCharOffset = 0;\n var justifyOffsetMult = documentData.j === 2 ? -0.5 : -1;\n var lastIndex = 0;\n var isNewLine = true;\n\n for (i = 0; i < len; i += 1) {\n if (letters[i].n) {\n if (animatorJustifyOffset) {\n animatorJustifyOffset += animatorFirstCharOffset;\n }\n\n while (lastIndex < i) {\n letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;\n lastIndex += 1;\n }\n\n animatorJustifyOffset = 0;\n isNewLine = true;\n } else {\n for (j = 0; j < jLen; j += 1) {\n animatorProps = animators[j].a;\n\n if (animatorProps.t.propType) {\n if (isNewLine && documentData.j === 2) {\n animatorFirstCharOffset += animatorProps.t.v * justifyOffsetMult;\n }\n\n animatorSelector = animators[j].s;\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\n\n if (mult.length) {\n animatorJustifyOffset += animatorProps.t.v * mult[0] * justifyOffsetMult;\n } else {\n animatorJustifyOffset += animatorProps.t.v * mult * justifyOffsetMult;\n }\n }\n }\n\n isNewLine = false;\n }\n }\n\n if (animatorJustifyOffset) {\n animatorJustifyOffset += animatorFirstCharOffset;\n }\n\n while (lastIndex < i) {\n letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;\n lastIndex += 1;\n }\n } //\n\n\n for (i = 0; i < len; i += 1) {\n matrixHelper.reset();\n elemOpacity = 1;\n\n if (letters[i].n) {\n xPos = 0;\n yPos += documentData.yOffset;\n yPos += firstLine ? 1 : 0;\n currentLength = initPathPos;\n firstLine = false;\n\n if (this._hasMaskedPath) {\n segmentInd = initSegmentInd;\n pointInd = initPointInd;\n points = segments[segmentInd].points;\n prevPoint = points[pointInd - 1];\n currentPoint = points[pointInd];\n partialLength = currentPoint.partialLength;\n segmentLength = 0;\n }\n\n letterM = '';\n letterFc = '';\n letterSw = '';\n letterO = '';\n letterP = this.defaultPropsArray;\n } else {\n if (this._hasMaskedPath) {\n if (currentLine !== letters[i].line) {\n switch (documentData.j) {\n case 1:\n currentLength += totalLength - documentData.lineWidths[letters[i].line];\n break;\n\n case 2:\n currentLength += (totalLength - documentData.lineWidths[letters[i].line]) / 2;\n break;\n\n default:\n break;\n }\n\n currentLine = letters[i].line;\n }\n\n if (ind !== letters[i].ind) {\n if (letters[ind]) {\n currentLength += letters[ind].extra;\n }\n\n currentLength += letters[i].an / 2;\n ind = letters[i].ind;\n }\n\n currentLength += alignment[0] * letters[i].an * 0.005;\n var animatorOffset = 0;\n\n for (j = 0; j < jLen; j += 1) {\n animatorProps = animators[j].a;\n\n if (animatorProps.p.propType) {\n animatorSelector = animators[j].s;\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\n\n if (mult.length) {\n animatorOffset += animatorProps.p.v[0] * mult[0];\n } else {\n animatorOffset += animatorProps.p.v[0] * mult;\n }\n }\n\n if (animatorProps.a.propType) {\n animatorSelector = animators[j].s;\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\n\n if (mult.length) {\n animatorOffset += animatorProps.a.v[0] * mult[0];\n } else {\n animatorOffset += animatorProps.a.v[0] * mult;\n }\n }\n }\n\n flag = true; // Force alignment only works with a single line for now\n\n if (this._pathData.a.v) {\n currentLength = letters[0].an * 0.5 + (totalLength - this._pathData.f.v - letters[0].an * 0.5 - letters[letters.length - 1].an * 0.5) * ind / (len - 1);\n currentLength += this._pathData.f.v;\n }\n\n while (flag) {\n if (segmentLength + partialLength >= currentLength + animatorOffset || !points) {\n perc = (currentLength + animatorOffset - segmentLength) / currentPoint.partialLength;\n xPathPos = prevPoint.point[0] + (currentPoint.point[0] - prevPoint.point[0]) * perc;\n yPathPos = prevPoint.point[1] + (currentPoint.point[1] - prevPoint.point[1]) * perc;\n matrixHelper.translate(-alignment[0] * letters[i].an * 0.005, -(alignment[1] * yOff) * 0.01);\n flag = false;\n } else if (points) {\n segmentLength += currentPoint.partialLength;\n pointInd += 1;\n\n if (pointInd >= points.length) {\n pointInd = 0;\n segmentInd += 1;\n\n if (!segments[segmentInd]) {\n if (mask.v.c) {\n pointInd = 0;\n segmentInd = 0;\n points = segments[segmentInd].points;\n } else {\n segmentLength -= currentPoint.partialLength;\n points = null;\n }\n } else {\n points = segments[segmentInd].points;\n }\n }\n\n if (points) {\n prevPoint = currentPoint;\n currentPoint = points[pointInd];\n partialLength = currentPoint.partialLength;\n }\n }\n }\n\n offf = letters[i].an / 2 - letters[i].add;\n matrixHelper.translate(-offf, 0, 0);\n } else {\n offf = letters[i].an / 2 - letters[i].add;\n matrixHelper.translate(-offf, 0, 0); // Grouping alignment\n\n matrixHelper.translate(-alignment[0] * letters[i].an * 0.005, -alignment[1] * yOff * 0.01, 0);\n }\n\n for (j = 0; j < jLen; j += 1) {\n animatorProps = animators[j].a;\n\n if (animatorProps.t.propType) {\n animatorSelector = animators[j].s;\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); // This condition is to prevent applying tracking to first character in each line. Might be better to use a boolean \"isNewLine\"\n\n if (xPos !== 0 || documentData.j !== 0) {\n if (this._hasMaskedPath) {\n if (mult.length) {\n currentLength += animatorProps.t.v * mult[0];\n } else {\n currentLength += animatorProps.t.v * mult;\n }\n } else if (mult.length) {\n xPos += animatorProps.t.v * mult[0];\n } else {\n xPos += animatorProps.t.v * mult;\n }\n }\n }\n }\n\n if (documentData.strokeWidthAnim) {\n sw = documentData.sw || 0;\n }\n\n if (documentData.strokeColorAnim) {\n if (documentData.sc) {\n sc = [documentData.sc[0], documentData.sc[1], documentData.sc[2]];\n } else {\n sc = [0, 0, 0];\n }\n }\n\n if (documentData.fillColorAnim && documentData.fc) {\n fc = [documentData.fc[0], documentData.fc[1], documentData.fc[2]];\n }\n\n for (j = 0; j < jLen; j += 1) {\n animatorProps = animators[j].a;\n\n if (animatorProps.a.propType) {\n animatorSelector = animators[j].s;\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\n\n if (mult.length) {\n matrixHelper.translate(-animatorProps.a.v[0] * mult[0], -animatorProps.a.v[1] * mult[1], animatorProps.a.v[2] * mult[2]);\n } else {\n matrixHelper.translate(-animatorProps.a.v[0] * mult, -animatorProps.a.v[1] * mult, animatorProps.a.v[2] * mult);\n }\n }\n }\n\n for (j = 0; j < jLen; j += 1) {\n animatorProps = animators[j].a;\n\n if (animatorProps.s.propType) {\n animatorSelector = animators[j].s;\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\n\n if (mult.length) {\n matrixHelper.scale(1 + (animatorProps.s.v[0] - 1) * mult[0], 1 + (animatorProps.s.v[1] - 1) * mult[1], 1);\n } else {\n matrixHelper.scale(1 + (animatorProps.s.v[0] - 1) * mult, 1 + (animatorProps.s.v[1] - 1) * mult, 1);\n }\n }\n }\n\n for (j = 0; j < jLen; j += 1) {\n animatorProps = animators[j].a;\n animatorSelector = animators[j].s;\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\n\n if (animatorProps.sk.propType) {\n if (mult.length) {\n matrixHelper.skewFromAxis(-animatorProps.sk.v * mult[0], animatorProps.sa.v * mult[1]);\n } else {\n matrixHelper.skewFromAxis(-animatorProps.sk.v * mult, animatorProps.sa.v * mult);\n }\n }\n\n if (animatorProps.r.propType) {\n if (mult.length) {\n matrixHelper.rotateZ(-animatorProps.r.v * mult[2]);\n } else {\n matrixHelper.rotateZ(-animatorProps.r.v * mult);\n }\n }\n\n if (animatorProps.ry.propType) {\n if (mult.length) {\n matrixHelper.rotateY(animatorProps.ry.v * mult[1]);\n } else {\n matrixHelper.rotateY(animatorProps.ry.v * mult);\n }\n }\n\n if (animatorProps.rx.propType) {\n if (mult.length) {\n matrixHelper.rotateX(animatorProps.rx.v * mult[0]);\n } else {\n matrixHelper.rotateX(animatorProps.rx.v * mult);\n }\n }\n\n if (animatorProps.o.propType) {\n if (mult.length) {\n elemOpacity += (animatorProps.o.v * mult[0] - elemOpacity) * mult[0];\n } else {\n elemOpacity += (animatorProps.o.v * mult - elemOpacity) * mult;\n }\n }\n\n if (documentData.strokeWidthAnim && animatorProps.sw.propType) {\n if (mult.length) {\n sw += animatorProps.sw.v * mult[0];\n } else {\n sw += animatorProps.sw.v * mult;\n }\n }\n\n if (documentData.strokeColorAnim && animatorProps.sc.propType) {\n for (k = 0; k < 3; k += 1) {\n if (mult.length) {\n sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult[0];\n } else {\n sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult;\n }\n }\n }\n\n if (documentData.fillColorAnim && documentData.fc) {\n if (animatorProps.fc.propType) {\n for (k = 0; k < 3; k += 1) {\n if (mult.length) {\n fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult[0];\n } else {\n fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult;\n }\n }\n }\n\n if (animatorProps.fh.propType) {\n if (mult.length) {\n fc = addHueToRGB(fc, animatorProps.fh.v * mult[0]);\n } else {\n fc = addHueToRGB(fc, animatorProps.fh.v * mult);\n }\n }\n\n if (animatorProps.fs.propType) {\n if (mult.length) {\n fc = addSaturationToRGB(fc, animatorProps.fs.v * mult[0]);\n } else {\n fc = addSaturationToRGB(fc, animatorProps.fs.v * mult);\n }\n }\n\n if (animatorProps.fb.propType) {\n if (mult.length) {\n fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult[0]);\n } else {\n fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult);\n }\n }\n }\n }\n\n for (j = 0; j < jLen; j += 1) {\n animatorProps = animators[j].a;\n\n if (animatorProps.p.propType) {\n animatorSelector = animators[j].s;\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\n\n if (this._hasMaskedPath) {\n if (mult.length) {\n matrixHelper.translate(0, animatorProps.p.v[1] * mult[0], -animatorProps.p.v[2] * mult[1]);\n } else {\n matrixHelper.translate(0, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);\n }\n } else if (mult.length) {\n matrixHelper.translate(animatorProps.p.v[0] * mult[0], animatorProps.p.v[1] * mult[1], -animatorProps.p.v[2] * mult[2]);\n } else {\n matrixHelper.translate(animatorProps.p.v[0] * mult, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);\n }\n }\n }\n\n if (documentData.strokeWidthAnim) {\n letterSw = sw < 0 ? 0 : sw;\n }\n\n if (documentData.strokeColorAnim) {\n letterSc = 'rgb(' + Math.round(sc[0] * 255) + ',' + Math.round(sc[1] * 255) + ',' + Math.round(sc[2] * 255) + ')';\n }\n\n if (documentData.fillColorAnim && documentData.fc) {\n letterFc = 'rgb(' + Math.round(fc[0] * 255) + ',' + Math.round(fc[1] * 255) + ',' + Math.round(fc[2] * 255) + ')';\n }\n\n if (this._hasMaskedPath) {\n matrixHelper.translate(0, -documentData.ls);\n matrixHelper.translate(0, alignment[1] * yOff * 0.01 + yPos, 0);\n\n if (this._pathData.p.v) {\n tanAngle = (currentPoint.point[1] - prevPoint.point[1]) / (currentPoint.point[0] - prevPoint.point[0]);\n var rot = Math.atan(tanAngle) * 180 / Math.PI;\n\n if (currentPoint.point[0] < prevPoint.point[0]) {\n rot += 180;\n }\n\n matrixHelper.rotate(-rot * Math.PI / 180);\n }\n\n matrixHelper.translate(xPathPos, yPathPos, 0);\n currentLength -= alignment[0] * letters[i].an * 0.005;\n\n if (letters[i + 1] && ind !== letters[i + 1].ind) {\n currentLength += letters[i].an / 2;\n currentLength += documentData.tr * 0.001 * documentData.finalSize;\n }\n } else {\n matrixHelper.translate(xPos, yPos, 0);\n\n if (documentData.ps) {\n // matrixHelper.translate(documentData.ps[0],documentData.ps[1],0);\n matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);\n }\n\n switch (documentData.j) {\n case 1:\n matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]), 0, 0);\n break;\n\n case 2:\n matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]) / 2, 0, 0);\n break;\n\n default:\n break;\n }\n\n matrixHelper.translate(0, -documentData.ls);\n matrixHelper.translate(offf, 0, 0);\n matrixHelper.translate(alignment[0] * letters[i].an * 0.005, alignment[1] * yOff * 0.01, 0);\n xPos += letters[i].l + documentData.tr * 0.001 * documentData.finalSize;\n }\n\n if (renderType === 'html') {\n letterM = matrixHelper.toCSS();\n } else if (renderType === 'svg') {\n letterM = matrixHelper.to2dCSS();\n } else {\n letterP = [matrixHelper.props[0], matrixHelper.props[1], matrixHelper.props[2], matrixHelper.props[3], matrixHelper.props[4], matrixHelper.props[5], matrixHelper.props[6], matrixHelper.props[7], matrixHelper.props[8], matrixHelper.props[9], matrixHelper.props[10], matrixHelper.props[11], matrixHelper.props[12], matrixHelper.props[13], matrixHelper.props[14], matrixHelper.props[15]];\n }\n\n letterO = elemOpacity;\n }\n\n if (renderedLettersCount <= i) {\n letterValue = new LetterProps(letterO, letterSw, letterSc, letterFc, letterM, letterP);\n this.renderedLetters.push(letterValue);\n renderedLettersCount += 1;\n this.lettersChangedFlag = true;\n } else {\n letterValue = this.renderedLetters[i];\n this.lettersChangedFlag = letterValue.update(letterO, letterSw, letterSc, letterFc, letterM, letterP) || this.lettersChangedFlag;\n }\n }\n };\n\n TextAnimatorProperty.prototype.getValue = function () {\n if (this._elem.globalData.frameId === this._frameId) {\n return;\n }\n\n this._frameId = this._elem.globalData.frameId;\n this.iterateDynamicProperties();\n };\n\n TextAnimatorProperty.prototype.mHelper = new Matrix();\n TextAnimatorProperty.prototype.defaultPropsArray = [];\n extendPrototype([DynamicPropertyContainer], TextAnimatorProperty);\n\n function ITextElement() {}\n\n ITextElement.prototype.initElement = function (data, globalData, comp) {\n this.lettersChangedFlag = true;\n this.initFrame();\n this.initBaseData(data, globalData, comp);\n this.textProperty = new TextProperty(this, data.t, this.dynamicProperties);\n this.textAnimator = new TextAnimatorProperty(data.t, this.renderType, this);\n this.initTransform(data, globalData, comp);\n this.initHierarchy();\n this.initRenderable();\n this.initRendererElement();\n this.createContainerElements();\n this.createRenderableComponents();\n this.createContent();\n this.hide();\n this.textAnimator.searchProperties(this.dynamicProperties);\n };\n\n ITextElement.prototype.prepareFrame = function (num) {\n this._mdf = false;\n this.prepareRenderableFrame(num);\n this.prepareProperties(num, this.isInRange);\n };\n\n ITextElement.prototype.createPathShape = function (matrixHelper, shapes) {\n var j;\n var jLen = shapes.length;\n var pathNodes;\n var shapeStr = '';\n\n for (j = 0; j < jLen; j += 1) {\n if (shapes[j].ty === 'sh') {\n pathNodes = shapes[j].ks.k;\n shapeStr += buildShapeString(pathNodes, pathNodes.i.length, true, matrixHelper);\n }\n }\n\n return shapeStr;\n };\n\n ITextElement.prototype.updateDocumentData = function (newData, index) {\n this.textProperty.updateDocumentData(newData, index);\n };\n\n ITextElement.prototype.canResizeFont = function (_canResize) {\n this.textProperty.canResizeFont(_canResize);\n };\n\n ITextElement.prototype.setMinimumFontSize = function (_fontSize) {\n this.textProperty.setMinimumFontSize(_fontSize);\n };\n\n ITextElement.prototype.applyTextPropertiesToMatrix = function (documentData, matrixHelper, lineNumber, xPos, yPos) {\n if (documentData.ps) {\n matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);\n }\n\n matrixHelper.translate(0, -documentData.ls, 0);\n\n switch (documentData.j) {\n case 1:\n matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]), 0, 0);\n break;\n\n case 2:\n matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]) / 2, 0, 0);\n break;\n\n default:\n break;\n }\n\n matrixHelper.translate(xPos, yPos, 0);\n };\n\n ITextElement.prototype.buildColor = function (colorData) {\n return 'rgb(' + Math.round(colorData[0] * 255) + ',' + Math.round(colorData[1] * 255) + ',' + Math.round(colorData[2] * 255) + ')';\n };\n\n ITextElement.prototype.emptyProp = new LetterProps();\n\n ITextElement.prototype.destroy = function () {};\n\n ITextElement.prototype.validateText = function () {\n if (this.textProperty._mdf || this.textProperty._isFirstFrame) {\n this.buildNewText();\n this.textProperty._isFirstFrame = false;\n this.textProperty._mdf = false;\n }\n };\n\n var emptyShapeData = {\n shapes: []\n };\n\n function SVGTextLottieElement(data, globalData, comp) {\n this.textSpans = [];\n this.renderType = 'svg';\n this.initElement(data, globalData, comp);\n }\n\n extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], SVGTextLottieElement);\n\n SVGTextLottieElement.prototype.createContent = function () {\n if (this.data.singleShape && !this.globalData.fontManager.chars) {\n this.textContainer = createNS('text');\n }\n };\n\n SVGTextLottieElement.prototype.buildTextContents = function (textArray) {\n var i = 0;\n var len = textArray.length;\n var textContents = [];\n var currentTextContent = '';\n\n while (i < len) {\n if (textArray[i] === String.fromCharCode(13) || textArray[i] === String.fromCharCode(3)) {\n textContents.push(currentTextContent);\n currentTextContent = '';\n } else {\n currentTextContent += textArray[i];\n }\n\n i += 1;\n }\n\n textContents.push(currentTextContent);\n return textContents;\n };\n\n SVGTextLottieElement.prototype.buildShapeData = function (data, scale) {\n // data should probably be cloned to apply scale separately to each instance of a text on different layers\n // but since text internal content gets only rendered once and then it's never rerendered,\n // it's probably safe not to clone data and reuse always the same instance even if the object is mutated.\n // Avoiding cloning is preferred since cloning each character shape data is expensive\n if (data.shapes && data.shapes.length) {\n var shape = data.shapes[0];\n\n if (shape.it) {\n var shapeItem = shape.it[shape.it.length - 1];\n\n if (shapeItem.s) {\n shapeItem.s.k[0] = scale;\n shapeItem.s.k[1] = scale;\n }\n }\n }\n\n return data;\n };\n\n SVGTextLottieElement.prototype.buildNewText = function () {\n this.addDynamicProperty(this);\n var i;\n var len;\n var documentData = this.textProperty.currentData;\n this.renderedLetters = createSizedArray(documentData ? documentData.l.length : 0);\n\n if (documentData.fc) {\n this.layerElement.setAttribute('fill', this.buildColor(documentData.fc));\n } else {\n this.layerElement.setAttribute('fill', 'rgba(0,0,0,0)');\n }\n\n if (documentData.sc) {\n this.layerElement.setAttribute('stroke', this.buildColor(documentData.sc));\n this.layerElement.setAttribute('stroke-width', documentData.sw);\n }\n\n this.layerElement.setAttribute('font-size', documentData.finalSize);\n var fontData = this.globalData.fontManager.getFontByName(documentData.f);\n\n if (fontData.fClass) {\n this.layerElement.setAttribute('class', fontData.fClass);\n } else {\n this.layerElement.setAttribute('font-family', fontData.fFamily);\n var fWeight = documentData.fWeight;\n var fStyle = documentData.fStyle;\n this.layerElement.setAttribute('font-style', fStyle);\n this.layerElement.setAttribute('font-weight', fWeight);\n }\n\n this.layerElement.setAttribute('aria-label', documentData.t);\n var letters = documentData.l || [];\n var usesGlyphs = !!this.globalData.fontManager.chars;\n len = letters.length;\n var tSpan;\n var matrixHelper = this.mHelper;\n var shapeStr = '';\n var singleShape = this.data.singleShape;\n var xPos = 0;\n var yPos = 0;\n var firstLine = true;\n var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;\n\n if (singleShape && !usesGlyphs && !documentData.sz) {\n var tElement = this.textContainer;\n var justify = 'start';\n\n switch (documentData.j) {\n case 1:\n justify = 'end';\n break;\n\n case 2:\n justify = 'middle';\n break;\n\n default:\n justify = 'start';\n break;\n }\n\n tElement.setAttribute('text-anchor', justify);\n tElement.setAttribute('letter-spacing', trackingOffset);\n var textContent = this.buildTextContents(documentData.finalText);\n len = textContent.length;\n yPos = documentData.ps ? documentData.ps[1] + documentData.ascent : 0;\n\n for (i = 0; i < len; i += 1) {\n tSpan = this.textSpans[i].span || createNS('tspan');\n tSpan.textContent = textContent[i];\n tSpan.setAttribute('x', 0);\n tSpan.setAttribute('y', yPos);\n tSpan.style.display = 'inherit';\n tElement.appendChild(tSpan);\n\n if (!this.textSpans[i]) {\n this.textSpans[i] = {\n span: null,\n glyph: null\n };\n }\n\n this.textSpans[i].span = tSpan;\n yPos += documentData.finalLineHeight;\n }\n\n this.layerElement.appendChild(tElement);\n } else {\n var cachedSpansLength = this.textSpans.length;\n var charData;\n\n for (i = 0; i < len; i += 1) {\n if (!this.textSpans[i]) {\n this.textSpans[i] = {\n span: null,\n childSpan: null,\n glyph: null\n };\n }\n\n if (!usesGlyphs || !singleShape || i === 0) {\n tSpan = cachedSpansLength > i ? this.textSpans[i].span : createNS(usesGlyphs ? 'g' : 'text');\n\n if (cachedSpansLength <= i) {\n tSpan.setAttribute('stroke-linecap', 'butt');\n tSpan.setAttribute('stroke-linejoin', 'round');\n tSpan.setAttribute('stroke-miterlimit', '4');\n this.textSpans[i].span = tSpan;\n\n if (usesGlyphs) {\n var childSpan = createNS('g');\n tSpan.appendChild(childSpan);\n this.textSpans[i].childSpan = childSpan;\n }\n\n this.textSpans[i].span = tSpan;\n this.layerElement.appendChild(tSpan);\n }\n\n tSpan.style.display = 'inherit';\n }\n\n matrixHelper.reset();\n\n if (singleShape) {\n if (letters[i].n) {\n xPos = -trackingOffset;\n yPos += documentData.yOffset;\n yPos += firstLine ? 1 : 0;\n firstLine = false;\n }\n\n this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);\n xPos += letters[i].l || 0; // xPos += letters[i].val === ' ' ? 0 : trackingOffset;\n\n xPos += trackingOffset;\n }\n\n if (usesGlyphs) {\n charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);\n var glyphElement; // t === 1 means the character has been replaced with an animated shaped\n\n if (charData.t === 1) {\n glyphElement = new SVGCompElement(charData.data, this.globalData, this);\n } else {\n var data = emptyShapeData;\n\n if (charData.data && charData.data.shapes) {\n data = this.buildShapeData(charData.data, documentData.finalSize);\n }\n\n glyphElement = new SVGShapeElement(data, this.globalData, this);\n }\n\n if (this.textSpans[i].glyph) {\n var glyph = this.textSpans[i].glyph;\n this.textSpans[i].childSpan.removeChild(glyph.layerElement);\n glyph.destroy();\n }\n\n this.textSpans[i].glyph = glyphElement;\n glyphElement._debug = true;\n glyphElement.prepareFrame(0);\n glyphElement.renderFrame();\n this.textSpans[i].childSpan.appendChild(glyphElement.layerElement); // when using animated shapes, the layer will be scaled instead of replacing the internal scale\n // this might have issues with strokes and might need a different solution\n\n if (charData.t === 1) {\n this.textSpans[i].childSpan.setAttribute('transform', 'scale(' + documentData.finalSize / 100 + ',' + documentData.finalSize / 100 + ')');\n }\n } else {\n if (singleShape) {\n tSpan.setAttribute('transform', 'translate(' + matrixHelper.props[12] + ',' + matrixHelper.props[13] + ')');\n }\n\n tSpan.textContent = letters[i].val;\n tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n } //\n\n }\n\n if (singleShape && tSpan) {\n tSpan.setAttribute('d', shapeStr);\n }\n }\n\n while (i < this.textSpans.length) {\n this.textSpans[i].span.style.display = 'none';\n i += 1;\n }\n\n this._sizeChanged = true;\n };\n\n SVGTextLottieElement.prototype.sourceRectAtTime = function () {\n this.prepareFrame(this.comp.renderedFrame - this.data.st);\n this.renderInnerContent();\n\n if (this._sizeChanged) {\n this._sizeChanged = false;\n var textBox = this.layerElement.getBBox();\n this.bbox = {\n top: textBox.y,\n left: textBox.x,\n width: textBox.width,\n height: textBox.height\n };\n }\n\n return this.bbox;\n };\n\n SVGTextLottieElement.prototype.getValue = function () {\n var i;\n var len = this.textSpans.length;\n var glyphElement;\n this.renderedFrame = this.comp.renderedFrame;\n\n for (i = 0; i < len; i += 1) {\n glyphElement = this.textSpans[i].glyph;\n\n if (glyphElement) {\n glyphElement.prepareFrame(this.comp.renderedFrame - this.data.st);\n\n if (glyphElement._mdf) {\n this._mdf = true;\n }\n }\n }\n };\n\n SVGTextLottieElement.prototype.renderInnerContent = function () {\n this.validateText();\n\n if (!this.data.singleShape || this._mdf) {\n this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);\n\n if (this.lettersChangedFlag || this.textAnimator.lettersChangedFlag) {\n this._sizeChanged = true;\n var i;\n var len;\n var renderedLetters = this.textAnimator.renderedLetters;\n var letters = this.textProperty.currentData.l;\n len = letters.length;\n var renderedLetter;\n var textSpan;\n var glyphElement;\n\n for (i = 0; i < len; i += 1) {\n if (!letters[i].n) {\n renderedLetter = renderedLetters[i];\n textSpan = this.textSpans[i].span;\n glyphElement = this.textSpans[i].glyph;\n\n if (glyphElement) {\n glyphElement.renderFrame();\n }\n\n if (renderedLetter._mdf.m) {\n textSpan.setAttribute('transform', renderedLetter.m);\n }\n\n if (renderedLetter._mdf.o) {\n textSpan.setAttribute('opacity', renderedLetter.o);\n }\n\n if (renderedLetter._mdf.sw) {\n textSpan.setAttribute('stroke-width', renderedLetter.sw);\n }\n\n if (renderedLetter._mdf.sc) {\n textSpan.setAttribute('stroke', renderedLetter.sc);\n }\n\n if (renderedLetter._mdf.fc) {\n textSpan.setAttribute('fill', renderedLetter.fc);\n }\n }\n }\n }\n }\n };\n\n function ISolidElement(data, globalData, comp) {\n this.initElement(data, globalData, comp);\n }\n\n extendPrototype([IImageElement], ISolidElement);\n\n ISolidElement.prototype.createContent = function () {\n var rect = createNS('rect'); /// /rect.style.width = this.data.sw;\n /// /rect.style.height = this.data.sh;\n /// /rect.style.fill = this.data.sc;\n\n rect.setAttribute('width', this.data.sw);\n rect.setAttribute('height', this.data.sh);\n rect.setAttribute('fill', this.data.sc);\n this.layerElement.appendChild(rect);\n };\n\n function NullElement(data, globalData, comp) {\n this.initFrame();\n this.initBaseData(data, globalData, comp);\n this.initFrame();\n this.initTransform(data, globalData, comp);\n this.initHierarchy();\n }\n\n NullElement.prototype.prepareFrame = function (num) {\n this.prepareProperties(num, true);\n };\n\n NullElement.prototype.renderFrame = function () {};\n\n NullElement.prototype.getBaseElement = function () {\n return null;\n };\n\n NullElement.prototype.destroy = function () {};\n\n NullElement.prototype.sourceRectAtTime = function () {};\n\n NullElement.prototype.hide = function () {};\n\n extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement], NullElement);\n\n function SVGRendererBase() {}\n\n extendPrototype([BaseRenderer], SVGRendererBase);\n\n SVGRendererBase.prototype.createNull = function (data) {\n return new NullElement(data, this.globalData, this);\n };\n\n SVGRendererBase.prototype.createShape = function (data) {\n return new SVGShapeElement(data, this.globalData, this);\n };\n\n SVGRendererBase.prototype.createText = function (data) {\n return new SVGTextLottieElement(data, this.globalData, this);\n };\n\n SVGRendererBase.prototype.createImage = function (data) {\n return new IImageElement(data, this.globalData, this);\n };\n\n SVGRendererBase.prototype.createSolid = function (data) {\n return new ISolidElement(data, this.globalData, this);\n };\n\n SVGRendererBase.prototype.configAnimation = function (animData) {\n this.svgElement.setAttribute('xmlns', 'http://www.w3.org/2000/svg');\n this.svgElement.setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink');\n\n if (this.renderConfig.viewBoxSize) {\n this.svgElement.setAttribute('viewBox', this.renderConfig.viewBoxSize);\n } else {\n this.svgElement.setAttribute('viewBox', '0 0 ' + animData.w + ' ' + animData.h);\n }\n\n if (!this.renderConfig.viewBoxOnly) {\n this.svgElement.setAttribute('width', animData.w);\n this.svgElement.setAttribute('height', animData.h);\n this.svgElement.style.width = '100%';\n this.svgElement.style.height = '100%';\n this.svgElement.style.transform = 'translate3d(0,0,0)';\n this.svgElement.style.contentVisibility = this.renderConfig.contentVisibility;\n }\n\n if (this.renderConfig.width) {\n this.svgElement.setAttribute('width', this.renderConfig.width);\n }\n\n if (this.renderConfig.height) {\n this.svgElement.setAttribute('height', this.renderConfig.height);\n }\n\n if (this.renderConfig.className) {\n this.svgElement.setAttribute('class', this.renderConfig.className);\n }\n\n if (this.renderConfig.id) {\n this.svgElement.setAttribute('id', this.renderConfig.id);\n }\n\n if (this.renderConfig.focusable !== undefined) {\n this.svgElement.setAttribute('focusable', this.renderConfig.focusable);\n }\n\n this.svgElement.setAttribute('preserveAspectRatio', this.renderConfig.preserveAspectRatio); // this.layerElement.style.transform = 'translate3d(0,0,0)';\n // this.layerElement.style.transformOrigin = this.layerElement.style.mozTransformOrigin = this.layerElement.style.webkitTransformOrigin = this.layerElement.style['-webkit-transform'] = \"0px 0px 0px\";\n\n this.animationItem.wrapper.appendChild(this.svgElement); // Mask animation\n\n var defs = this.globalData.defs;\n this.setupGlobalData(animData, defs);\n this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;\n this.data = animData;\n var maskElement = createNS('clipPath');\n var rect = createNS('rect');\n rect.setAttribute('width', animData.w);\n rect.setAttribute('height', animData.h);\n rect.setAttribute('x', 0);\n rect.setAttribute('y', 0);\n var maskId = createElementID();\n maskElement.setAttribute('id', maskId);\n maskElement.appendChild(rect);\n this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + maskId + ')');\n defs.appendChild(maskElement);\n this.layers = animData.layers;\n this.elements = createSizedArray(animData.layers.length);\n };\n\n SVGRendererBase.prototype.destroy = function () {\n if (this.animationItem.wrapper) {\n this.animationItem.wrapper.innerText = '';\n }\n\n this.layerElement = null;\n this.globalData.defs = null;\n var i;\n var len = this.layers ? this.layers.length : 0;\n\n for (i = 0; i < len; i += 1) {\n if (this.elements[i] && this.elements[i].destroy) {\n this.elements[i].destroy();\n }\n }\n\n this.elements.length = 0;\n this.destroyed = true;\n this.animationItem = null;\n };\n\n SVGRendererBase.prototype.updateContainerSize = function () {};\n\n SVGRendererBase.prototype.findIndexByInd = function (ind) {\n var i = 0;\n var len = this.layers.length;\n\n for (i = 0; i < len; i += 1) {\n if (this.layers[i].ind === ind) {\n return i;\n }\n }\n\n return -1;\n };\n\n SVGRendererBase.prototype.buildItem = function (pos) {\n var elements = this.elements;\n\n if (elements[pos] || this.layers[pos].ty === 99) {\n return;\n }\n\n elements[pos] = true;\n var element = this.createItem(this.layers[pos]);\n elements[pos] = element;\n\n if (getExpressionsPlugin()) {\n if (this.layers[pos].ty === 0) {\n this.globalData.projectInterface.registerComposition(element);\n }\n\n element.initExpressions();\n }\n\n this.appendElementInPos(element, pos);\n\n if (this.layers[pos].tt) {\n var elementIndex = 'tp' in this.layers[pos] ? this.findIndexByInd(this.layers[pos].tp) : pos - 1;\n\n if (elementIndex === -1) {\n return;\n }\n\n if (!this.elements[elementIndex] || this.elements[elementIndex] === true) {\n this.buildItem(elementIndex);\n this.addPendingElement(element);\n } else {\n var matteElement = elements[elementIndex];\n var matteMask = matteElement.getMatte(this.layers[pos].tt);\n element.setMatte(matteMask);\n }\n }\n };\n\n SVGRendererBase.prototype.checkPendingElements = function () {\n while (this.pendingElements.length) {\n var element = this.pendingElements.pop();\n element.checkParenting();\n\n if (element.data.tt) {\n var i = 0;\n var len = this.elements.length;\n\n while (i < len) {\n if (this.elements[i] === element) {\n var elementIndex = 'tp' in element.data ? this.findIndexByInd(element.data.tp) : i - 1;\n var matteElement = this.elements[elementIndex];\n var matteMask = matteElement.getMatte(this.layers[i].tt);\n element.setMatte(matteMask);\n break;\n }\n\n i += 1;\n }\n }\n }\n };\n\n SVGRendererBase.prototype.renderFrame = function (num) {\n if (this.renderedFrame === num || this.destroyed) {\n return;\n }\n\n if (num === null) {\n num = this.renderedFrame;\n } else {\n this.renderedFrame = num;\n } // console.log('-------');\n // console.log('FRAME ',num);\n\n\n this.globalData.frameNum = num;\n this.globalData.frameId += 1;\n this.globalData.projectInterface.currentFrame = num;\n this.globalData._mdf = false;\n var i;\n var len = this.layers.length;\n\n if (!this.completeLayers) {\n this.checkLayers(num);\n }\n\n for (i = len - 1; i >= 0; i -= 1) {\n if (this.completeLayers || this.elements[i]) {\n this.elements[i].prepareFrame(num - this.layers[i].st);\n }\n }\n\n if (this.globalData._mdf) {\n for (i = 0; i < len; i += 1) {\n if (this.completeLayers || this.elements[i]) {\n this.elements[i].renderFrame();\n }\n }\n }\n };\n\n SVGRendererBase.prototype.appendElementInPos = function (element, pos) {\n var newElement = element.getBaseElement();\n\n if (!newElement) {\n return;\n }\n\n var i = 0;\n var nextElement;\n\n while (i < pos) {\n if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement()) {\n nextElement = this.elements[i].getBaseElement();\n }\n\n i += 1;\n }\n\n if (nextElement) {\n this.layerElement.insertBefore(newElement, nextElement);\n } else {\n this.layerElement.appendChild(newElement);\n }\n };\n\n SVGRendererBase.prototype.hide = function () {\n this.layerElement.style.display = 'none';\n };\n\n SVGRendererBase.prototype.show = function () {\n this.layerElement.style.display = 'block';\n };\n\n function ICompElement() {}\n\n extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement], ICompElement);\n\n ICompElement.prototype.initElement = function (data, globalData, comp) {\n this.initFrame();\n this.initBaseData(data, globalData, comp);\n this.initTransform(data, globalData, comp);\n this.initRenderable();\n this.initHierarchy();\n this.initRendererElement();\n this.createContainerElements();\n this.createRenderableComponents();\n\n if (this.data.xt || !globalData.progressiveLoad) {\n this.buildAllItems();\n }\n\n this.hide();\n };\n /* ICompElement.prototype.hide = function(){\r\n if(!this.hidden){\r\n this.hideElement();\r\n var i,len = this.elements.length;\r\n for( i = 0; i < len; i+=1 ){\r\n if(this.elements[i]){\r\n this.elements[i].hide();\r\n }\r\n }\r\n }\r\n }; */\n\n\n ICompElement.prototype.prepareFrame = function (num) {\n this._mdf = false;\n this.prepareRenderableFrame(num);\n this.prepareProperties(num, this.isInRange);\n\n if (!this.isInRange && !this.data.xt) {\n return;\n }\n\n if (!this.tm._placeholder) {\n var timeRemapped = this.tm.v;\n\n if (timeRemapped === this.data.op) {\n timeRemapped = this.data.op - 1;\n }\n\n this.renderedFrame = timeRemapped;\n } else {\n this.renderedFrame = num / this.data.sr;\n }\n\n var i;\n var len = this.elements.length;\n\n if (!this.completeLayers) {\n this.checkLayers(this.renderedFrame);\n } // This iteration needs to be backwards because of how expressions connect between each other\n\n\n for (i = len - 1; i >= 0; i -= 1) {\n if (this.completeLayers || this.elements[i]) {\n this.elements[i].prepareFrame(this.renderedFrame - this.layers[i].st);\n\n if (this.elements[i]._mdf) {\n this._mdf = true;\n }\n }\n }\n };\n\n ICompElement.prototype.renderInnerContent = function () {\n var i;\n var len = this.layers.length;\n\n for (i = 0; i < len; i += 1) {\n if (this.completeLayers || this.elements[i]) {\n this.elements[i].renderFrame();\n }\n }\n };\n\n ICompElement.prototype.setElements = function (elems) {\n this.elements = elems;\n };\n\n ICompElement.prototype.getElements = function () {\n return this.elements;\n };\n\n ICompElement.prototype.destroyElements = function () {\n var i;\n var len = this.layers.length;\n\n for (i = 0; i < len; i += 1) {\n if (this.elements[i]) {\n this.elements[i].destroy();\n }\n }\n };\n\n ICompElement.prototype.destroy = function () {\n this.destroyElements();\n this.destroyBaseElement();\n };\n\n function SVGCompElement(data, globalData, comp) {\n this.layers = data.layers;\n this.supports3d = true;\n this.completeLayers = false;\n this.pendingElements = [];\n this.elements = this.layers ? createSizedArray(this.layers.length) : [];\n this.initElement(data, globalData, comp);\n this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {\n _placeholder: true\n };\n }\n\n extendPrototype([SVGRendererBase, ICompElement, SVGBaseElement], SVGCompElement);\n\n SVGCompElement.prototype.createComp = function (data) {\n return new SVGCompElement(data, this.globalData, this);\n };\n\n function SVGRenderer(animationItem, config) {\n this.animationItem = animationItem;\n this.layers = null;\n this.renderedFrame = -1;\n this.svgElement = createNS('svg');\n var ariaLabel = '';\n\n if (config && config.title) {\n var titleElement = createNS('title');\n var titleId = createElementID();\n titleElement.setAttribute('id', titleId);\n titleElement.textContent = config.title;\n this.svgElement.appendChild(titleElement);\n ariaLabel += titleId;\n }\n\n if (config && config.description) {\n var descElement = createNS('desc');\n var descId = createElementID();\n descElement.setAttribute('id', descId);\n descElement.textContent = config.description;\n this.svgElement.appendChild(descElement);\n ariaLabel += ' ' + descId;\n }\n\n if (ariaLabel) {\n this.svgElement.setAttribute('aria-labelledby', ariaLabel);\n }\n\n var defs = createNS('defs');\n this.svgElement.appendChild(defs);\n var maskElement = createNS('g');\n this.svgElement.appendChild(maskElement);\n this.layerElement = maskElement;\n this.renderConfig = {\n preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet',\n imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',\n contentVisibility: config && config.contentVisibility || 'visible',\n progressiveLoad: config && config.progressiveLoad || false,\n hideOnTransparent: !(config && config.hideOnTransparent === false),\n viewBoxOnly: config && config.viewBoxOnly || false,\n viewBoxSize: config && config.viewBoxSize || false,\n className: config && config.className || '',\n id: config && config.id || '',\n focusable: config && config.focusable,\n filterSize: {\n width: config && config.filterSize && config.filterSize.width || '100%',\n height: config && config.filterSize && config.filterSize.height || '100%',\n x: config && config.filterSize && config.filterSize.x || '0%',\n y: config && config.filterSize && config.filterSize.y || '0%'\n },\n width: config && config.width,\n height: config && config.height,\n runExpressions: !config || config.runExpressions === undefined || config.runExpressions\n };\n this.globalData = {\n _mdf: false,\n frameNum: -1,\n defs: defs,\n renderConfig: this.renderConfig\n };\n this.elements = [];\n this.pendingElements = [];\n this.destroyed = false;\n this.rendererType = 'svg';\n }\n\n extendPrototype([SVGRendererBase], SVGRenderer);\n\n SVGRenderer.prototype.createComp = function (data) {\n return new SVGCompElement(data, this.globalData, this);\n };\n\n function ShapeTransformManager() {\n this.sequences = {};\n this.sequenceList = [];\n this.transform_key_count = 0;\n }\n\n ShapeTransformManager.prototype = {\n addTransformSequence: function addTransformSequence(transforms) {\n var i;\n var len = transforms.length;\n var key = '_';\n\n for (i = 0; i < len; i += 1) {\n key += transforms[i].transform.key + '_';\n }\n\n var sequence = this.sequences[key];\n\n if (!sequence) {\n sequence = {\n transforms: [].concat(transforms),\n finalTransform: new Matrix(),\n _mdf: false\n };\n this.sequences[key] = sequence;\n this.sequenceList.push(sequence);\n }\n\n return sequence;\n },\n processSequence: function processSequence(sequence, isFirstFrame) {\n var i = 0;\n var len = sequence.transforms.length;\n var _mdf = isFirstFrame;\n\n while (i < len && !isFirstFrame) {\n if (sequence.transforms[i].transform.mProps._mdf) {\n _mdf = true;\n break;\n }\n\n i += 1;\n }\n\n if (_mdf) {\n sequence.finalTransform.reset();\n\n for (i = len - 1; i >= 0; i -= 1) {\n sequence.finalTransform.multiply(sequence.transforms[i].transform.mProps.v);\n }\n }\n\n sequence._mdf = _mdf;\n },\n processSequences: function processSequences(isFirstFrame) {\n var i;\n var len = this.sequenceList.length;\n\n for (i = 0; i < len; i += 1) {\n this.processSequence(this.sequenceList[i], isFirstFrame);\n }\n },\n getNewKey: function getNewKey() {\n this.transform_key_count += 1;\n return '_' + this.transform_key_count;\n }\n };\n\n var lumaLoader = function lumaLoader() {\n var id = '__lottie_element_luma_buffer';\n var lumaBuffer = null;\n var lumaBufferCtx = null;\n var svg = null; // This alternate solution has a slight delay before the filter is applied, resulting in a flicker on the first frame.\n // Keeping this here for reference, and in the future, if offscreen canvas supports url filters, this can be used.\n // For now, neither of them work for offscreen canvas, so canvas workers can't support the luma track matte mask.\n // Naming it solution 2 to mark the extra comment lines.\n\n /*\r\n var svgString = [\r\n '<svg xmlns=\"http://www.w3.org/2000/svg\">',\r\n '<filter id=\"' + id + '\">',\r\n '<feColorMatrix type=\"matrix\" color-interpolation-filters=\"sRGB\" values=\"',\r\n '0.3, 0.3, 0.3, 0, 0, ',\r\n '0.3, 0.3, 0.3, 0, 0, ',\r\n '0.3, 0.3, 0.3, 0, 0, ',\r\n '0.3, 0.3, 0.3, 0, 0',\r\n '\"/>',\r\n '</filter>',\r\n '</svg>',\r\n ].join('');\r\n var blob = new Blob([svgString], { type: 'image/svg+xml' });\r\n var url = URL.createObjectURL(blob);\r\n */\n\n function createLumaSvgFilter() {\n var _svg = createNS('svg');\n\n var fil = createNS('filter');\n var matrix = createNS('feColorMatrix');\n fil.setAttribute('id', id);\n matrix.setAttribute('type', 'matrix');\n matrix.setAttribute('color-interpolation-filters', 'sRGB');\n matrix.setAttribute('values', '0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0');\n fil.appendChild(matrix);\n\n _svg.appendChild(fil);\n\n _svg.setAttribute('id', id + '_svg');\n\n if (featureSupport.svgLumaHidden) {\n _svg.style.display = 'none';\n }\n\n return _svg;\n }\n\n function loadLuma() {\n if (!lumaBuffer) {\n svg = createLumaSvgFilter();\n document.body.appendChild(svg);\n lumaBuffer = createTag('canvas');\n lumaBufferCtx = lumaBuffer.getContext('2d'); // lumaBufferCtx.filter = `url('${url}#__lottie_element_luma_buffer')`; // part of solution 2\n\n lumaBufferCtx.filter = 'url(#' + id + ')';\n lumaBufferCtx.fillStyle = 'rgba(0,0,0,0)';\n lumaBufferCtx.fillRect(0, 0, 1, 1);\n }\n }\n\n function getLuma(canvas) {\n if (!lumaBuffer) {\n loadLuma();\n }\n\n lumaBuffer.width = canvas.width;\n lumaBuffer.height = canvas.height; // lumaBufferCtx.filter = `url('${url}#__lottie_element_luma_buffer')`; // part of solution 2\n\n lumaBufferCtx.filter = 'url(#' + id + ')';\n return lumaBuffer;\n }\n\n return {\n load: loadLuma,\n get: getLuma\n };\n };\n\n function createCanvas(width, height) {\n if (featureSupport.offscreenCanvas) {\n return new OffscreenCanvas(width, height);\n }\n\n var canvas = createTag('canvas');\n canvas.width = width;\n canvas.height = height;\n return canvas;\n }\n\n var assetLoader = function () {\n return {\n loadLumaCanvas: lumaLoader.load,\n getLumaCanvas: lumaLoader.get,\n createCanvas: createCanvas\n };\n }();\n\n var registeredEffects = {};\n\n function CVEffects(elem) {\n var i;\n var len = elem.data.ef ? elem.data.ef.length : 0;\n this.filters = [];\n var filterManager;\n\n for (i = 0; i < len; i += 1) {\n filterManager = null;\n var type = elem.data.ef[i].ty;\n\n if (registeredEffects[type]) {\n var Effect = registeredEffects[type].effect;\n filterManager = new Effect(elem.effectsManager.effectElements[i], elem);\n }\n\n if (filterManager) {\n this.filters.push(filterManager);\n }\n }\n\n if (this.filters.length) {\n elem.addRenderableComponent(this);\n }\n }\n\n CVEffects.prototype.renderFrame = function (_isFirstFrame) {\n var i;\n var len = this.filters.length;\n\n for (i = 0; i < len; i += 1) {\n this.filters[i].renderFrame(_isFirstFrame);\n }\n };\n\n CVEffects.prototype.getEffects = function (type) {\n var i;\n var len = this.filters.length;\n var effects = [];\n\n for (i = 0; i < len; i += 1) {\n if (this.filters[i].type === type) {\n effects.push(this.filters[i]);\n }\n }\n\n return effects;\n };\n\n function registerEffect(id, effect) {\n registeredEffects[id] = {\n effect: effect\n };\n }\n\n function CVMaskElement(data, element) {\n this.data = data;\n this.element = element;\n this.masksProperties = this.data.masksProperties || [];\n this.viewData = createSizedArray(this.masksProperties.length);\n var i;\n var len = this.masksProperties.length;\n var hasMasks = false;\n\n for (i = 0; i < len; i += 1) {\n if (this.masksProperties[i].mode !== 'n') {\n hasMasks = true;\n }\n\n this.viewData[i] = ShapePropertyFactory.getShapeProp(this.element, this.masksProperties[i], 3);\n }\n\n this.hasMasks = hasMasks;\n\n if (hasMasks) {\n this.element.addRenderableComponent(this);\n }\n }\n\n CVMaskElement.prototype.renderFrame = function () {\n if (!this.hasMasks) {\n return;\n }\n\n var transform = this.element.finalTransform.mat;\n var ctx = this.element.canvasContext;\n var i;\n var len = this.masksProperties.length;\n var pt;\n var pts;\n var data;\n ctx.beginPath();\n\n for (i = 0; i < len; i += 1) {\n if (this.masksProperties[i].mode !== 'n') {\n if (this.masksProperties[i].inv) {\n ctx.moveTo(0, 0);\n ctx.lineTo(this.element.globalData.compSize.w, 0);\n ctx.lineTo(this.element.globalData.compSize.w, this.element.globalData.compSize.h);\n ctx.lineTo(0, this.element.globalData.compSize.h);\n ctx.lineTo(0, 0);\n }\n\n data = this.viewData[i].v;\n pt = transform.applyToPointArray(data.v[0][0], data.v[0][1], 0);\n ctx.moveTo(pt[0], pt[1]);\n var j;\n var jLen = data._length;\n\n for (j = 1; j < jLen; j += 1) {\n pts = transform.applyToTriplePoints(data.o[j - 1], data.i[j], data.v[j]);\n ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);\n }\n\n pts = transform.applyToTriplePoints(data.o[j - 1], data.i[0], data.v[0]);\n ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);\n }\n }\n\n this.element.globalData.renderer.save(true);\n ctx.clip();\n };\n\n CVMaskElement.prototype.getMaskProperty = MaskElement.prototype.getMaskProperty;\n\n CVMaskElement.prototype.destroy = function () {\n this.element = null;\n };\n\n function CVBaseElement() {}\n\n var operationsMap = {\n 1: 'source-in',\n 2: 'source-out',\n 3: 'source-in',\n 4: 'source-out'\n };\n CVBaseElement.prototype = {\n createElements: function createElements() {},\n initRendererElement: function initRendererElement() {},\n createContainerElements: function createContainerElements() {\n // If the layer is masked we will use two buffers to store each different states of the drawing\n // This solution is not ideal for several reason. But unfortunately, because of the recursive\n // nature of the render tree, it's the only simple way to make sure one inner mask doesn't override an outer mask.\n // TODO: try to reduce the size of these buffers to the size of the composition contaning the layer\n // It might be challenging because the layer most likely is transformed in some way\n if (this.data.tt >= 1) {\n this.buffers = [];\n var canvasContext = this.globalData.canvasContext;\n var bufferCanvas = assetLoader.createCanvas(canvasContext.canvas.width, canvasContext.canvas.height);\n this.buffers.push(bufferCanvas);\n var bufferCanvas2 = assetLoader.createCanvas(canvasContext.canvas.width, canvasContext.canvas.height);\n this.buffers.push(bufferCanvas2);\n\n if (this.data.tt >= 3 && !document._isProxy) {\n assetLoader.loadLumaCanvas();\n }\n }\n\n this.canvasContext = this.globalData.canvasContext;\n this.transformCanvas = this.globalData.transformCanvas;\n this.renderableEffectsManager = new CVEffects(this);\n this.searchEffectTransforms();\n },\n createContent: function createContent() {},\n setBlendMode: function setBlendMode() {\n var globalData = this.globalData;\n\n if (globalData.blendMode !== this.data.bm) {\n globalData.blendMode = this.data.bm;\n var blendModeValue = getBlendMode(this.data.bm);\n globalData.canvasContext.globalCompositeOperation = blendModeValue;\n }\n },\n createRenderableComponents: function createRenderableComponents() {\n this.maskManager = new CVMaskElement(this.data, this);\n this.transformEffects = this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT);\n },\n hideElement: function hideElement() {\n if (!this.hidden && (!this.isInRange || this.isTransparent)) {\n this.hidden = true;\n }\n },\n showElement: function showElement() {\n if (this.isInRange && !this.isTransparent) {\n this.hidden = false;\n this._isFirstFrame = true;\n this.maskManager._isFirstFrame = true;\n }\n },\n clearCanvas: function clearCanvas(canvasContext) {\n canvasContext.clearRect(this.transformCanvas.tx, this.transformCanvas.ty, this.transformCanvas.w * this.transformCanvas.sx, this.transformCanvas.h * this.transformCanvas.sy);\n },\n prepareLayer: function prepareLayer() {\n if (this.data.tt >= 1) {\n var buffer = this.buffers[0];\n var bufferCtx = buffer.getContext('2d');\n this.clearCanvas(bufferCtx); // on the first buffer we store the current state of the global drawing\n\n bufferCtx.drawImage(this.canvasContext.canvas, 0, 0); // The next four lines are to clear the canvas\n // TODO: Check if there is a way to clear the canvas without resetting the transform\n\n this.currentTransform = this.canvasContext.getTransform();\n this.canvasContext.setTransform(1, 0, 0, 1, 0, 0);\n this.clearCanvas(this.canvasContext);\n this.canvasContext.setTransform(this.currentTransform);\n }\n },\n exitLayer: function exitLayer() {\n if (this.data.tt >= 1) {\n var buffer = this.buffers[1]; // On the second buffer we store the current state of the global drawing\n // that only contains the content of this layer\n // (if it is a composition, it also includes the nested layers)\n\n var bufferCtx = buffer.getContext('2d');\n this.clearCanvas(bufferCtx);\n bufferCtx.drawImage(this.canvasContext.canvas, 0, 0); // We clear the canvas again\n\n this.canvasContext.setTransform(1, 0, 0, 1, 0, 0);\n this.clearCanvas(this.canvasContext);\n this.canvasContext.setTransform(this.currentTransform); // We draw the mask\n\n var mask = this.comp.getElementById('tp' in this.data ? this.data.tp : this.data.ind - 1);\n mask.renderFrame(true); // We draw the second buffer (that contains the content of this layer)\n\n this.canvasContext.setTransform(1, 0, 0, 1, 0, 0); // If the mask is a Luma matte, we need to do two extra painting operations\n // the _isProxy check is to avoid drawing a fake canvas in workers that will throw an error\n\n if (this.data.tt >= 3 && !document._isProxy) {\n // We copy the painted mask to a buffer that has a color matrix filter applied to it\n // that applies the rgb values to the alpha channel\n var lumaBuffer = assetLoader.getLumaCanvas(this.canvasContext.canvas);\n var lumaBufferCtx = lumaBuffer.getContext('2d');\n lumaBufferCtx.drawImage(this.canvasContext.canvas, 0, 0);\n this.clearCanvas(this.canvasContext); // we repaint the context with the mask applied to it\n\n this.canvasContext.drawImage(lumaBuffer, 0, 0);\n }\n\n this.canvasContext.globalCompositeOperation = operationsMap[this.data.tt];\n this.canvasContext.drawImage(buffer, 0, 0); // We finally draw the first buffer (that contains the content of the global drawing)\n // We use destination-over to draw the global drawing below the current layer\n\n this.canvasContext.globalCompositeOperation = 'destination-over';\n this.canvasContext.drawImage(this.buffers[0], 0, 0);\n this.canvasContext.setTransform(this.currentTransform); // We reset the globalCompositeOperation to source-over, the standard type of operation\n\n this.canvasContext.globalCompositeOperation = 'source-over';\n }\n },\n renderFrame: function renderFrame(forceRender) {\n if (this.hidden || this.data.hd) {\n return;\n }\n\n if (this.data.td === 1 && !forceRender) {\n return;\n }\n\n this.renderTransform();\n this.renderRenderable();\n this.renderLocalTransform();\n this.setBlendMode();\n var forceRealStack = this.data.ty === 0;\n this.prepareLayer();\n this.globalData.renderer.save(forceRealStack);\n this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props);\n this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity);\n this.renderInnerContent();\n this.globalData.renderer.restore(forceRealStack);\n this.exitLayer();\n\n if (this.maskManager.hasMasks) {\n this.globalData.renderer.restore(true);\n }\n\n if (this._isFirstFrame) {\n this._isFirstFrame = false;\n }\n },\n destroy: function destroy() {\n this.canvasContext = null;\n this.data = null;\n this.globalData = null;\n this.maskManager.destroy();\n },\n mHelper: new Matrix()\n };\n CVBaseElement.prototype.hide = CVBaseElement.prototype.hideElement;\n CVBaseElement.prototype.show = CVBaseElement.prototype.showElement;\n\n function CVShapeData(element, data, styles, transformsManager) {\n this.styledShapes = [];\n this.tr = [0, 0, 0, 0, 0, 0];\n var ty = 4;\n\n if (data.ty === 'rc') {\n ty = 5;\n } else if (data.ty === 'el') {\n ty = 6;\n } else if (data.ty === 'sr') {\n ty = 7;\n }\n\n this.sh = ShapePropertyFactory.getShapeProp(element, data, ty, element);\n var i;\n var len = styles.length;\n var styledShape;\n\n for (i = 0; i < len; i += 1) {\n if (!styles[i].closed) {\n styledShape = {\n transforms: transformsManager.addTransformSequence(styles[i].transforms),\n trNodes: []\n };\n this.styledShapes.push(styledShape);\n styles[i].elements.push(styledShape);\n }\n }\n }\n\n CVShapeData.prototype.setAsAnimated = SVGShapeData.prototype.setAsAnimated;\n\n function CVShapeElement(data, globalData, comp) {\n this.shapes = [];\n this.shapesData = data.shapes;\n this.stylesList = [];\n this.itemsData = [];\n this.prevViewData = [];\n this.shapeModifiers = [];\n this.processedElements = [];\n this.transformsManager = new ShapeTransformManager();\n this.initElement(data, globalData, comp);\n }\n\n extendPrototype([BaseElement, TransformElement, CVBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableElement], CVShapeElement);\n CVShapeElement.prototype.initElement = RenderableDOMElement.prototype.initElement;\n CVShapeElement.prototype.transformHelper = {\n opacity: 1,\n _opMdf: false\n };\n CVShapeElement.prototype.dashResetter = [];\n\n CVShapeElement.prototype.createContent = function () {\n this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []);\n };\n\n CVShapeElement.prototype.createStyleElement = function (data, transforms) {\n var styleElem = {\n data: data,\n type: data.ty,\n preTransforms: this.transformsManager.addTransformSequence(transforms),\n transforms: [],\n elements: [],\n closed: data.hd === true\n };\n var elementData = {};\n\n if (data.ty === 'fl' || data.ty === 'st') {\n elementData.c = PropertyFactory.getProp(this, data.c, 1, 255, this);\n\n if (!elementData.c.k) {\n styleElem.co = 'rgb(' + bmFloor(elementData.c.v[0]) + ',' + bmFloor(elementData.c.v[1]) + ',' + bmFloor(elementData.c.v[2]) + ')';\n }\n } else if (data.ty === 'gf' || data.ty === 'gs') {\n elementData.s = PropertyFactory.getProp(this, data.s, 1, null, this);\n elementData.e = PropertyFactory.getProp(this, data.e, 1, null, this);\n elementData.h = PropertyFactory.getProp(this, data.h || {\n k: 0\n }, 0, 0.01, this);\n elementData.a = PropertyFactory.getProp(this, data.a || {\n k: 0\n }, 0, degToRads, this);\n elementData.g = new GradientProperty(this, data.g, this);\n }\n\n elementData.o = PropertyFactory.getProp(this, data.o, 0, 0.01, this);\n\n if (data.ty === 'st' || data.ty === 'gs') {\n styleElem.lc = lineCapEnum[data.lc || 2];\n styleElem.lj = lineJoinEnum[data.lj || 2];\n\n if (data.lj == 1) {\n // eslint-disable-line eqeqeq\n styleElem.ml = data.ml;\n }\n\n elementData.w = PropertyFactory.getProp(this, data.w, 0, null, this);\n\n if (!elementData.w.k) {\n styleElem.wi = elementData.w.v;\n }\n\n if (data.d) {\n var d = new DashProperty(this, data.d, 'canvas', this);\n elementData.d = d;\n\n if (!elementData.d.k) {\n styleElem.da = elementData.d.dashArray;\n styleElem[\"do\"] = elementData.d.dashoffset[0];\n }\n }\n } else {\n styleElem.r = data.r === 2 ? 'evenodd' : 'nonzero';\n }\n\n this.stylesList.push(styleElem);\n elementData.style = styleElem;\n return elementData;\n };\n\n CVShapeElement.prototype.createGroupElement = function () {\n var elementData = {\n it: [],\n prevViewData: []\n };\n return elementData;\n };\n\n CVShapeElement.prototype.createTransformElement = function (data) {\n var elementData = {\n transform: {\n opacity: 1,\n _opMdf: false,\n key: this.transformsManager.getNewKey(),\n op: PropertyFactory.getProp(this, data.o, 0, 0.01, this),\n mProps: TransformPropertyFactory.getTransformProperty(this, data, this)\n }\n };\n return elementData;\n };\n\n CVShapeElement.prototype.createShapeElement = function (data) {\n var elementData = new CVShapeData(this, data, this.stylesList, this.transformsManager);\n this.shapes.push(elementData);\n this.addShapeToModifiers(elementData);\n return elementData;\n };\n\n CVShapeElement.prototype.reloadShapes = function () {\n this._isFirstFrame = true;\n var i;\n var len = this.itemsData.length;\n\n for (i = 0; i < len; i += 1) {\n this.prevViewData[i] = this.itemsData[i];\n }\n\n this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []);\n len = this.dynamicProperties.length;\n\n for (i = 0; i < len; i += 1) {\n this.dynamicProperties[i].getValue();\n }\n\n this.renderModifiers();\n this.transformsManager.processSequences(this._isFirstFrame);\n };\n\n CVShapeElement.prototype.addTransformToStyleList = function (transform) {\n var i;\n var len = this.stylesList.length;\n\n for (i = 0; i < len; i += 1) {\n if (!this.stylesList[i].closed) {\n this.stylesList[i].transforms.push(transform);\n }\n }\n };\n\n CVShapeElement.prototype.removeTransformFromStyleList = function () {\n var i;\n var len = this.stylesList.length;\n\n for (i = 0; i < len; i += 1) {\n if (!this.stylesList[i].closed) {\n this.stylesList[i].transforms.pop();\n }\n }\n };\n\n CVShapeElement.prototype.closeStyles = function (styles) {\n var i;\n var len = styles.length;\n\n for (i = 0; i < len; i += 1) {\n styles[i].closed = true;\n }\n };\n\n CVShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, shouldRender, transforms) {\n var i;\n var len = arr.length - 1;\n var j;\n var jLen;\n var ownStyles = [];\n var ownModifiers = [];\n var processedPos;\n var modifier;\n var currentTransform;\n var ownTransforms = [].concat(transforms);\n\n for (i = len; i >= 0; i -= 1) {\n processedPos = this.searchProcessedElement(arr[i]);\n\n if (!processedPos) {\n arr[i]._shouldRender = shouldRender;\n } else {\n itemsData[i] = prevViewData[processedPos - 1];\n }\n\n if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs') {\n if (!processedPos) {\n itemsData[i] = this.createStyleElement(arr[i], ownTransforms);\n } else {\n itemsData[i].style.closed = false;\n }\n\n ownStyles.push(itemsData[i].style);\n } else if (arr[i].ty === 'gr') {\n if (!processedPos) {\n itemsData[i] = this.createGroupElement(arr[i]);\n } else {\n jLen = itemsData[i].it.length;\n\n for (j = 0; j < jLen; j += 1) {\n itemsData[i].prevViewData[j] = itemsData[i].it[j];\n }\n }\n\n this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, shouldRender, ownTransforms);\n } else if (arr[i].ty === 'tr') {\n if (!processedPos) {\n currentTransform = this.createTransformElement(arr[i]);\n itemsData[i] = currentTransform;\n }\n\n ownTransforms.push(itemsData[i]);\n this.addTransformToStyleList(itemsData[i]);\n } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {\n if (!processedPos) {\n itemsData[i] = this.createShapeElement(arr[i]);\n }\n } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'pb' || arr[i].ty === 'zz' || arr[i].ty === 'op') {\n if (!processedPos) {\n modifier = ShapeModifiers.getModifier(arr[i].ty);\n modifier.init(this, arr[i]);\n itemsData[i] = modifier;\n this.shapeModifiers.push(modifier);\n } else {\n modifier = itemsData[i];\n modifier.closed = false;\n }\n\n ownModifiers.push(modifier);\n } else if (arr[i].ty === 'rp') {\n if (!processedPos) {\n modifier = ShapeModifiers.getModifier(arr[i].ty);\n itemsData[i] = modifier;\n modifier.init(this, arr, i, itemsData);\n this.shapeModifiers.push(modifier);\n shouldRender = false;\n } else {\n modifier = itemsData[i];\n modifier.closed = true;\n }\n\n ownModifiers.push(modifier);\n }\n\n this.addProcessedElement(arr[i], i + 1);\n }\n\n this.removeTransformFromStyleList();\n this.closeStyles(ownStyles);\n len = ownModifiers.length;\n\n for (i = 0; i < len; i += 1) {\n ownModifiers[i].closed = true;\n }\n };\n\n CVShapeElement.prototype.renderInnerContent = function () {\n this.transformHelper.opacity = 1;\n this.transformHelper._opMdf = false;\n this.renderModifiers();\n this.transformsManager.processSequences(this._isFirstFrame);\n this.renderShape(this.transformHelper, this.shapesData, this.itemsData, true);\n };\n\n CVShapeElement.prototype.renderShapeTransform = function (parentTransform, groupTransform) {\n if (parentTransform._opMdf || groupTransform.op._mdf || this._isFirstFrame) {\n groupTransform.opacity = parentTransform.opacity;\n groupTransform.opacity *= groupTransform.op.v;\n groupTransform._opMdf = true;\n }\n };\n\n CVShapeElement.prototype.drawLayer = function () {\n var i;\n var len = this.stylesList.length;\n var j;\n var jLen;\n var k;\n var kLen;\n var elems;\n var nodes;\n var renderer = this.globalData.renderer;\n var ctx = this.globalData.canvasContext;\n var type;\n var currentStyle;\n\n for (i = 0; i < len; i += 1) {\n currentStyle = this.stylesList[i];\n type = currentStyle.type; // Skipping style when\n // Stroke width equals 0\n // style should not be rendered (extra unused repeaters)\n // current opacity equals 0\n // global opacity equals 0\n\n if (!((type === 'st' || type === 'gs') && currentStyle.wi === 0 || !currentStyle.data._shouldRender || currentStyle.coOp === 0 || this.globalData.currentGlobalAlpha === 0)) {\n renderer.save();\n elems = currentStyle.elements;\n\n if (type === 'st' || type === 'gs') {\n renderer.ctxStrokeStyle(type === 'st' ? currentStyle.co : currentStyle.grd); // ctx.strokeStyle = type === 'st' ? currentStyle.co : currentStyle.grd;\n\n renderer.ctxLineWidth(currentStyle.wi); // ctx.lineWidth = currentStyle.wi;\n\n renderer.ctxLineCap(currentStyle.lc); // ctx.lineCap = currentStyle.lc;\n\n renderer.ctxLineJoin(currentStyle.lj); // ctx.lineJoin = currentStyle.lj;\n\n renderer.ctxMiterLimit(currentStyle.ml || 0); // ctx.miterLimit = currentStyle.ml || 0;\n } else {\n renderer.ctxFillStyle(type === 'fl' ? currentStyle.co : currentStyle.grd); // ctx.fillStyle = type === 'fl' ? currentStyle.co : currentStyle.grd;\n }\n\n renderer.ctxOpacity(currentStyle.coOp);\n\n if (type !== 'st' && type !== 'gs') {\n ctx.beginPath();\n }\n\n renderer.ctxTransform(currentStyle.preTransforms.finalTransform.props);\n jLen = elems.length;\n\n for (j = 0; j < jLen; j += 1) {\n if (type === 'st' || type === 'gs') {\n ctx.beginPath();\n\n if (currentStyle.da) {\n ctx.setLineDash(currentStyle.da);\n ctx.lineDashOffset = currentStyle[\"do\"];\n }\n }\n\n nodes = elems[j].trNodes;\n kLen = nodes.length;\n\n for (k = 0; k < kLen; k += 1) {\n if (nodes[k].t === 'm') {\n ctx.moveTo(nodes[k].p[0], nodes[k].p[1]);\n } else if (nodes[k].t === 'c') {\n ctx.bezierCurveTo(nodes[k].pts[0], nodes[k].pts[1], nodes[k].pts[2], nodes[k].pts[3], nodes[k].pts[4], nodes[k].pts[5]);\n } else {\n ctx.closePath();\n }\n }\n\n if (type === 'st' || type === 'gs') {\n // ctx.stroke();\n renderer.ctxStroke();\n\n if (currentStyle.da) {\n ctx.setLineDash(this.dashResetter);\n }\n }\n }\n\n if (type !== 'st' && type !== 'gs') {\n // ctx.fill(currentStyle.r);\n this.globalData.renderer.ctxFill(currentStyle.r);\n }\n\n renderer.restore();\n }\n }\n };\n\n CVShapeElement.prototype.renderShape = function (parentTransform, items, data, isMain) {\n var i;\n var len = items.length - 1;\n var groupTransform;\n groupTransform = parentTransform;\n\n for (i = len; i >= 0; i -= 1) {\n if (items[i].ty === 'tr') {\n groupTransform = data[i].transform;\n this.renderShapeTransform(parentTransform, groupTransform);\n } else if (items[i].ty === 'sh' || items[i].ty === 'el' || items[i].ty === 'rc' || items[i].ty === 'sr') {\n this.renderPath(items[i], data[i]);\n } else if (items[i].ty === 'fl') {\n this.renderFill(items[i], data[i], groupTransform);\n } else if (items[i].ty === 'st') {\n this.renderStroke(items[i], data[i], groupTransform);\n } else if (items[i].ty === 'gf' || items[i].ty === 'gs') {\n this.renderGradientFill(items[i], data[i], groupTransform);\n } else if (items[i].ty === 'gr') {\n this.renderShape(groupTransform, items[i].it, data[i].it);\n } else if (items[i].ty === 'tm') {//\n }\n }\n\n if (isMain) {\n this.drawLayer();\n }\n };\n\n CVShapeElement.prototype.renderStyledShape = function (styledShape, shape) {\n if (this._isFirstFrame || shape._mdf || styledShape.transforms._mdf) {\n var shapeNodes = styledShape.trNodes;\n var paths = shape.paths;\n var i;\n var len;\n var j;\n var jLen = paths._length;\n shapeNodes.length = 0;\n var groupTransformMat = styledShape.transforms.finalTransform;\n\n for (j = 0; j < jLen; j += 1) {\n var pathNodes = paths.shapes[j];\n\n if (pathNodes && pathNodes.v) {\n len = pathNodes._length;\n\n for (i = 1; i < len; i += 1) {\n if (i === 1) {\n shapeNodes.push({\n t: 'm',\n p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0)\n });\n }\n\n shapeNodes.push({\n t: 'c',\n pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[i], pathNodes.v[i])\n });\n }\n\n if (len === 1) {\n shapeNodes.push({\n t: 'm',\n p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0)\n });\n }\n\n if (pathNodes.c && len) {\n shapeNodes.push({\n t: 'c',\n pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[0], pathNodes.v[0])\n });\n shapeNodes.push({\n t: 'z'\n });\n }\n }\n }\n\n styledShape.trNodes = shapeNodes;\n }\n };\n\n CVShapeElement.prototype.renderPath = function (pathData, itemData) {\n if (pathData.hd !== true && pathData._shouldRender) {\n var i;\n var len = itemData.styledShapes.length;\n\n for (i = 0; i < len; i += 1) {\n this.renderStyledShape(itemData.styledShapes[i], itemData.sh);\n }\n }\n };\n\n CVShapeElement.prototype.renderFill = function (styleData, itemData, groupTransform) {\n var styleElem = itemData.style;\n\n if (itemData.c._mdf || this._isFirstFrame) {\n styleElem.co = 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')';\n }\n\n if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) {\n styleElem.coOp = itemData.o.v * groupTransform.opacity;\n }\n };\n\n CVShapeElement.prototype.renderGradientFill = function (styleData, itemData, groupTransform) {\n var styleElem = itemData.style;\n var grd;\n\n if (!styleElem.grd || itemData.g._mdf || itemData.s._mdf || itemData.e._mdf || styleData.t !== 1 && (itemData.h._mdf || itemData.a._mdf)) {\n var ctx = this.globalData.canvasContext;\n var pt1 = itemData.s.v;\n var pt2 = itemData.e.v;\n\n if (styleData.t === 1) {\n grd = ctx.createLinearGradient(pt1[0], pt1[1], pt2[0], pt2[1]);\n } else {\n var rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));\n var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);\n var percent = itemData.h.v;\n\n if (percent >= 1) {\n percent = 0.99;\n } else if (percent <= -1) {\n percent = -0.99;\n }\n\n var dist = rad * percent;\n var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];\n var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];\n grd = ctx.createRadialGradient(x, y, 0, pt1[0], pt1[1], rad);\n }\n\n var i;\n var len = styleData.g.p;\n var cValues = itemData.g.c;\n var opacity = 1;\n\n for (i = 0; i < len; i += 1) {\n if (itemData.g._hasOpacity && itemData.g._collapsable) {\n opacity = itemData.g.o[i * 2 + 1];\n }\n\n grd.addColorStop(cValues[i * 4] / 100, 'rgba(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ',' + opacity + ')');\n }\n\n styleElem.grd = grd;\n }\n\n styleElem.coOp = itemData.o.v * groupTransform.opacity;\n };\n\n CVShapeElement.prototype.renderStroke = function (styleData, itemData, groupTransform) {\n var styleElem = itemData.style;\n var d = itemData.d;\n\n if (d && (d._mdf || this._isFirstFrame)) {\n styleElem.da = d.dashArray;\n styleElem[\"do\"] = d.dashoffset[0];\n }\n\n if (itemData.c._mdf || this._isFirstFrame) {\n styleElem.co = 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')';\n }\n\n if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) {\n styleElem.coOp = itemData.o.v * groupTransform.opacity;\n }\n\n if (itemData.w._mdf || this._isFirstFrame) {\n styleElem.wi = itemData.w.v;\n }\n };\n\n CVShapeElement.prototype.destroy = function () {\n this.shapesData = null;\n this.globalData = null;\n this.canvasContext = null;\n this.stylesList.length = 0;\n this.itemsData.length = 0;\n };\n\n function CVTextElement(data, globalData, comp) {\n this.textSpans = [];\n this.yOffset = 0;\n this.fillColorAnim = false;\n this.strokeColorAnim = false;\n this.strokeWidthAnim = false;\n this.stroke = false;\n this.fill = false;\n this.justifyOffset = 0;\n this.currentRender = null;\n this.renderType = 'canvas';\n this.values = {\n fill: 'rgba(0,0,0,0)',\n stroke: 'rgba(0,0,0,0)',\n sWidth: 0,\n fValue: ''\n };\n this.initElement(data, globalData, comp);\n }\n\n extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement, ITextElement], CVTextElement);\n CVTextElement.prototype.tHelper = createTag('canvas').getContext('2d');\n\n CVTextElement.prototype.buildNewText = function () {\n var documentData = this.textProperty.currentData;\n this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0);\n var hasFill = false;\n\n if (documentData.fc) {\n hasFill = true;\n this.values.fill = this.buildColor(documentData.fc);\n } else {\n this.values.fill = 'rgba(0,0,0,0)';\n }\n\n this.fill = hasFill;\n var hasStroke = false;\n\n if (documentData.sc) {\n hasStroke = true;\n this.values.stroke = this.buildColor(documentData.sc);\n this.values.sWidth = documentData.sw;\n }\n\n var fontData = this.globalData.fontManager.getFontByName(documentData.f);\n var i;\n var len;\n var letters = documentData.l;\n var matrixHelper = this.mHelper;\n this.stroke = hasStroke;\n this.values.fValue = documentData.finalSize + 'px ' + this.globalData.fontManager.getFontByName(documentData.f).fFamily;\n len = documentData.finalText.length; // this.tHelper.font = this.values.fValue;\n\n var charData;\n var shapeData;\n var k;\n var kLen;\n var shapes;\n var j;\n var jLen;\n var pathNodes;\n var commands;\n var pathArr;\n var singleShape = this.data.singleShape;\n var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;\n var xPos = 0;\n var yPos = 0;\n var firstLine = true;\n var cnt = 0;\n\n for (i = 0; i < len; i += 1) {\n charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);\n shapeData = charData && charData.data || {};\n matrixHelper.reset();\n\n if (singleShape && letters[i].n) {\n xPos = -trackingOffset;\n yPos += documentData.yOffset;\n yPos += firstLine ? 1 : 0;\n firstLine = false;\n }\n\n shapes = shapeData.shapes ? shapeData.shapes[0].it : [];\n jLen = shapes.length;\n matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);\n\n if (singleShape) {\n this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);\n }\n\n commands = createSizedArray(jLen - 1);\n var commandsCounter = 0;\n\n for (j = 0; j < jLen; j += 1) {\n if (shapes[j].ty === 'sh') {\n kLen = shapes[j].ks.k.i.length;\n pathNodes = shapes[j].ks.k;\n pathArr = [];\n\n for (k = 1; k < kLen; k += 1) {\n if (k === 1) {\n pathArr.push(matrixHelper.applyToX(pathNodes.v[0][0], pathNodes.v[0][1], 0), matrixHelper.applyToY(pathNodes.v[0][0], pathNodes.v[0][1], 0));\n }\n\n pathArr.push(matrixHelper.applyToX(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToY(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToX(pathNodes.i[k][0], pathNodes.i[k][1], 0), matrixHelper.applyToY(pathNodes.i[k][0], pathNodes.i[k][1], 0), matrixHelper.applyToX(pathNodes.v[k][0], pathNodes.v[k][1], 0), matrixHelper.applyToY(pathNodes.v[k][0], pathNodes.v[k][1], 0));\n }\n\n pathArr.push(matrixHelper.applyToX(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToY(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToX(pathNodes.i[0][0], pathNodes.i[0][1], 0), matrixHelper.applyToY(pathNodes.i[0][0], pathNodes.i[0][1], 0), matrixHelper.applyToX(pathNodes.v[0][0], pathNodes.v[0][1], 0), matrixHelper.applyToY(pathNodes.v[0][0], pathNodes.v[0][1], 0));\n commands[commandsCounter] = pathArr;\n commandsCounter += 1;\n }\n }\n\n if (singleShape) {\n xPos += letters[i].l;\n xPos += trackingOffset;\n }\n\n if (this.textSpans[cnt]) {\n this.textSpans[cnt].elem = commands;\n } else {\n this.textSpans[cnt] = {\n elem: commands\n };\n }\n\n cnt += 1;\n }\n };\n\n CVTextElement.prototype.renderInnerContent = function () {\n this.validateText();\n var ctx = this.canvasContext;\n ctx.font = this.values.fValue;\n this.globalData.renderer.ctxLineCap('butt'); // ctx.lineCap = 'butt';\n\n this.globalData.renderer.ctxLineJoin('miter'); // ctx.lineJoin = 'miter';\n\n this.globalData.renderer.ctxMiterLimit(4); // ctx.miterLimit = 4;\n\n if (!this.data.singleShape) {\n this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);\n }\n\n var i;\n var len;\n var j;\n var jLen;\n var k;\n var kLen;\n var renderedLetters = this.textAnimator.renderedLetters;\n var letters = this.textProperty.currentData.l;\n len = letters.length;\n var renderedLetter;\n var lastFill = null;\n var lastStroke = null;\n var lastStrokeW = null;\n var commands;\n var pathArr;\n var renderer = this.globalData.renderer;\n\n for (i = 0; i < len; i += 1) {\n if (!letters[i].n) {\n renderedLetter = renderedLetters[i];\n\n if (renderedLetter) {\n renderer.save();\n renderer.ctxTransform(renderedLetter.p);\n renderer.ctxOpacity(renderedLetter.o);\n }\n\n if (this.fill) {\n if (renderedLetter && renderedLetter.fc) {\n if (lastFill !== renderedLetter.fc) {\n renderer.ctxFillStyle(renderedLetter.fc);\n lastFill = renderedLetter.fc; // ctx.fillStyle = renderedLetter.fc;\n }\n } else if (lastFill !== this.values.fill) {\n lastFill = this.values.fill;\n renderer.ctxFillStyle(this.values.fill); // ctx.fillStyle = this.values.fill;\n }\n\n commands = this.textSpans[i].elem;\n jLen = commands.length;\n this.globalData.canvasContext.beginPath();\n\n for (j = 0; j < jLen; j += 1) {\n pathArr = commands[j];\n kLen = pathArr.length;\n this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]);\n\n for (k = 2; k < kLen; k += 6) {\n this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]);\n }\n }\n\n this.globalData.canvasContext.closePath();\n renderer.ctxFill(); // this.globalData.canvasContext.fill();\n /// ctx.fillText(this.textSpans[i].val,0,0);\n }\n\n if (this.stroke) {\n if (renderedLetter && renderedLetter.sw) {\n if (lastStrokeW !== renderedLetter.sw) {\n lastStrokeW = renderedLetter.sw;\n renderer.ctxLineWidth(renderedLetter.sw); // ctx.lineWidth = renderedLetter.sw;\n }\n } else if (lastStrokeW !== this.values.sWidth) {\n lastStrokeW = this.values.sWidth;\n renderer.ctxLineWidth(this.values.sWidth); // ctx.lineWidth = this.values.sWidth;\n }\n\n if (renderedLetter && renderedLetter.sc) {\n if (lastStroke !== renderedLetter.sc) {\n lastStroke = renderedLetter.sc;\n renderer.ctxStrokeStyle(renderedLetter.sc); // ctx.strokeStyle = renderedLetter.sc;\n }\n } else if (lastStroke !== this.values.stroke) {\n lastStroke = this.values.stroke;\n renderer.ctxStrokeStyle(this.values.stroke); // ctx.strokeStyle = this.values.stroke;\n }\n\n commands = this.textSpans[i].elem;\n jLen = commands.length;\n this.globalData.canvasContext.beginPath();\n\n for (j = 0; j < jLen; j += 1) {\n pathArr = commands[j];\n kLen = pathArr.length;\n this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]);\n\n for (k = 2; k < kLen; k += 6) {\n this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]);\n }\n }\n\n this.globalData.canvasContext.closePath();\n renderer.ctxStroke(); // this.globalData.canvasContext.stroke();\n /// ctx.strokeText(letters[i].val,0,0);\n }\n\n if (renderedLetter) {\n this.globalData.renderer.restore();\n }\n }\n }\n };\n\n function CVImageElement(data, globalData, comp) {\n this.assetData = globalData.getAssetData(data.refId);\n this.img = globalData.imageLoader.getAsset(this.assetData);\n this.initElement(data, globalData, comp);\n }\n\n extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVImageElement);\n CVImageElement.prototype.initElement = SVGShapeElement.prototype.initElement;\n CVImageElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;\n\n CVImageElement.prototype.createContent = function () {\n if (this.img.width && (this.assetData.w !== this.img.width || this.assetData.h !== this.img.height)) {\n var canvas = createTag('canvas');\n canvas.width = this.assetData.w;\n canvas.height = this.assetData.h;\n var ctx = canvas.getContext('2d');\n var imgW = this.img.width;\n var imgH = this.img.height;\n var imgRel = imgW / imgH;\n var canvasRel = this.assetData.w / this.assetData.h;\n var widthCrop;\n var heightCrop;\n var par = this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio;\n\n if (imgRel > canvasRel && par === 'xMidYMid slice' || imgRel < canvasRel && par !== 'xMidYMid slice') {\n heightCrop = imgH;\n widthCrop = heightCrop * canvasRel;\n } else {\n widthCrop = imgW;\n heightCrop = widthCrop / canvasRel;\n }\n\n ctx.drawImage(this.img, (imgW - widthCrop) / 2, (imgH - heightCrop) / 2, widthCrop, heightCrop, 0, 0, this.assetData.w, this.assetData.h);\n this.img = canvas;\n }\n };\n\n CVImageElement.prototype.renderInnerContent = function () {\n this.canvasContext.drawImage(this.img, 0, 0);\n };\n\n CVImageElement.prototype.destroy = function () {\n this.img = null;\n };\n\n function CVSolidElement(data, globalData, comp) {\n this.initElement(data, globalData, comp);\n }\n\n extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVSolidElement);\n CVSolidElement.prototype.initElement = SVGShapeElement.prototype.initElement;\n CVSolidElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;\n\n CVSolidElement.prototype.renderInnerContent = function () {\n // var ctx = this.canvasContext;\n this.globalData.renderer.ctxFillStyle(this.data.sc); // ctx.fillStyle = this.data.sc;\n\n this.globalData.renderer.ctxFillRect(0, 0, this.data.sw, this.data.sh); // ctx.fillRect(0, 0, this.data.sw, this.data.sh);\n //\n };\n\n function CanvasRendererBase() {}\n\n extendPrototype([BaseRenderer], CanvasRendererBase);\n\n CanvasRendererBase.prototype.createShape = function (data) {\n return new CVShapeElement(data, this.globalData, this);\n };\n\n CanvasRendererBase.prototype.createText = function (data) {\n return new CVTextElement(data, this.globalData, this);\n };\n\n CanvasRendererBase.prototype.createImage = function (data) {\n return new CVImageElement(data, this.globalData, this);\n };\n\n CanvasRendererBase.prototype.createSolid = function (data) {\n return new CVSolidElement(data, this.globalData, this);\n };\n\n CanvasRendererBase.prototype.createNull = SVGRenderer.prototype.createNull;\n\n CanvasRendererBase.prototype.ctxTransform = function (props) {\n if (props[0] === 1 && props[1] === 0 && props[4] === 0 && props[5] === 1 && props[12] === 0 && props[13] === 0) {\n return;\n }\n\n this.canvasContext.transform(props[0], props[1], props[4], props[5], props[12], props[13]);\n };\n\n CanvasRendererBase.prototype.ctxOpacity = function (op) {\n this.canvasContext.globalAlpha *= op < 0 ? 0 : op;\n };\n\n CanvasRendererBase.prototype.ctxFillStyle = function (value) {\n this.canvasContext.fillStyle = value;\n };\n\n CanvasRendererBase.prototype.ctxStrokeStyle = function (value) {\n this.canvasContext.strokeStyle = value;\n };\n\n CanvasRendererBase.prototype.ctxLineWidth = function (value) {\n this.canvasContext.lineWidth = value;\n };\n\n CanvasRendererBase.prototype.ctxLineCap = function (value) {\n this.canvasContext.lineCap = value;\n };\n\n CanvasRendererBase.prototype.ctxLineJoin = function (value) {\n this.canvasContext.lineJoin = value;\n };\n\n CanvasRendererBase.prototype.ctxMiterLimit = function (value) {\n this.canvasContext.miterLimit = value;\n };\n\n CanvasRendererBase.prototype.ctxFill = function (rule) {\n this.canvasContext.fill(rule);\n };\n\n CanvasRendererBase.prototype.ctxFillRect = function (x, y, w, h) {\n this.canvasContext.fillRect(x, y, w, h);\n };\n\n CanvasRendererBase.prototype.ctxStroke = function () {\n this.canvasContext.stroke();\n };\n\n CanvasRendererBase.prototype.reset = function () {\n if (!this.renderConfig.clearCanvas) {\n this.canvasContext.restore();\n return;\n }\n\n this.contextData.reset();\n };\n\n CanvasRendererBase.prototype.save = function () {\n this.canvasContext.save();\n };\n\n CanvasRendererBase.prototype.restore = function (actionFlag) {\n if (!this.renderConfig.clearCanvas) {\n this.canvasContext.restore();\n return;\n }\n\n if (actionFlag) {\n this.globalData.blendMode = 'source-over';\n }\n\n this.contextData.restore(actionFlag);\n };\n\n CanvasRendererBase.prototype.configAnimation = function (animData) {\n if (this.animationItem.wrapper) {\n this.animationItem.container = createTag('canvas');\n var containerStyle = this.animationItem.container.style;\n containerStyle.width = '100%';\n containerStyle.height = '100%';\n var origin = '0px 0px 0px';\n containerStyle.transformOrigin = origin;\n containerStyle.mozTransformOrigin = origin;\n containerStyle.webkitTransformOrigin = origin;\n containerStyle['-webkit-transform'] = origin;\n containerStyle.contentVisibility = this.renderConfig.contentVisibility;\n this.animationItem.wrapper.appendChild(this.animationItem.container);\n this.canvasContext = this.animationItem.container.getContext('2d');\n\n if (this.renderConfig.className) {\n this.animationItem.container.setAttribute('class', this.renderConfig.className);\n }\n\n if (this.renderConfig.id) {\n this.animationItem.container.setAttribute('id', this.renderConfig.id);\n }\n } else {\n this.canvasContext = this.renderConfig.context;\n }\n\n this.contextData.setContext(this.canvasContext);\n this.data = animData;\n this.layers = animData.layers;\n this.transformCanvas = {\n w: animData.w,\n h: animData.h,\n sx: 0,\n sy: 0,\n tx: 0,\n ty: 0\n };\n this.setupGlobalData(animData, document.body);\n this.globalData.canvasContext = this.canvasContext;\n this.globalData.renderer = this;\n this.globalData.isDashed = false;\n this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;\n this.globalData.transformCanvas = this.transformCanvas;\n this.elements = createSizedArray(animData.layers.length);\n this.updateContainerSize();\n };\n\n CanvasRendererBase.prototype.updateContainerSize = function (width, height) {\n this.reset();\n var elementWidth;\n var elementHeight;\n\n if (width) {\n elementWidth = width;\n elementHeight = height;\n this.canvasContext.canvas.width = elementWidth;\n this.canvasContext.canvas.height = elementHeight;\n } else {\n if (this.animationItem.wrapper && this.animationItem.container) {\n elementWidth = this.animationItem.wrapper.offsetWidth;\n elementHeight = this.animationItem.wrapper.offsetHeight;\n } else {\n elementWidth = this.canvasContext.canvas.width;\n elementHeight = this.canvasContext.canvas.height;\n }\n\n this.canvasContext.canvas.width = elementWidth * this.renderConfig.dpr;\n this.canvasContext.canvas.height = elementHeight * this.renderConfig.dpr;\n }\n\n var elementRel;\n var animationRel;\n\n if (this.renderConfig.preserveAspectRatio.indexOf('meet') !== -1 || this.renderConfig.preserveAspectRatio.indexOf('slice') !== -1) {\n var par = this.renderConfig.preserveAspectRatio.split(' ');\n var fillType = par[1] || 'meet';\n var pos = par[0] || 'xMidYMid';\n var xPos = pos.substr(0, 4);\n var yPos = pos.substr(4);\n elementRel = elementWidth / elementHeight;\n animationRel = this.transformCanvas.w / this.transformCanvas.h;\n\n if (animationRel > elementRel && fillType === 'meet' || animationRel < elementRel && fillType === 'slice') {\n this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);\n this.transformCanvas.sy = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);\n } else {\n this.transformCanvas.sx = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);\n this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);\n }\n\n if (xPos === 'xMid' && (animationRel < elementRel && fillType === 'meet' || animationRel > elementRel && fillType === 'slice')) {\n this.transformCanvas.tx = (elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) / 2 * this.renderConfig.dpr;\n } else if (xPos === 'xMax' && (animationRel < elementRel && fillType === 'meet' || animationRel > elementRel && fillType === 'slice')) {\n this.transformCanvas.tx = (elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) * this.renderConfig.dpr;\n } else {\n this.transformCanvas.tx = 0;\n }\n\n if (yPos === 'YMid' && (animationRel > elementRel && fillType === 'meet' || animationRel < elementRel && fillType === 'slice')) {\n this.transformCanvas.ty = (elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w)) / 2 * this.renderConfig.dpr;\n } else if (yPos === 'YMax' && (animationRel > elementRel && fillType === 'meet' || animationRel < elementRel && fillType === 'slice')) {\n this.transformCanvas.ty = (elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w)) * this.renderConfig.dpr;\n } else {\n this.transformCanvas.ty = 0;\n }\n } else if (this.renderConfig.preserveAspectRatio === 'none') {\n this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);\n this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);\n this.transformCanvas.tx = 0;\n this.transformCanvas.ty = 0;\n } else {\n this.transformCanvas.sx = this.renderConfig.dpr;\n this.transformCanvas.sy = this.renderConfig.dpr;\n this.transformCanvas.tx = 0;\n this.transformCanvas.ty = 0;\n }\n\n this.transformCanvas.props = [this.transformCanvas.sx, 0, 0, 0, 0, this.transformCanvas.sy, 0, 0, 0, 0, 1, 0, this.transformCanvas.tx, this.transformCanvas.ty, 0, 1];\n /* var i, len = this.elements.length;\r\n for(i=0;i<len;i+=1){\r\n if(this.elements[i] && this.elements[i].data.ty === 0){\r\n this.elements[i].resize(this.globalData.transformCanvas);\r\n }\r\n } */\n\n this.ctxTransform(this.transformCanvas.props);\n this.canvasContext.beginPath();\n this.canvasContext.rect(0, 0, this.transformCanvas.w, this.transformCanvas.h);\n this.canvasContext.closePath();\n this.canvasContext.clip();\n this.renderFrame(this.renderedFrame, true);\n };\n\n CanvasRendererBase.prototype.destroy = function () {\n if (this.renderConfig.clearCanvas && this.animationItem.wrapper) {\n this.animationItem.wrapper.innerText = '';\n }\n\n var i;\n var len = this.layers ? this.layers.length : 0;\n\n for (i = len - 1; i >= 0; i -= 1) {\n if (this.elements[i] && this.elements[i].destroy) {\n this.elements[i].destroy();\n }\n }\n\n this.elements.length = 0;\n this.globalData.canvasContext = null;\n this.animationItem.container = null;\n this.destroyed = true;\n };\n\n CanvasRendererBase.prototype.renderFrame = function (num, forceRender) {\n if (this.renderedFrame === num && this.renderConfig.clearCanvas === true && !forceRender || this.destroyed || num === -1) {\n return;\n }\n\n this.renderedFrame = num;\n this.globalData.frameNum = num - this.animationItem._isFirstFrame;\n this.globalData.frameId += 1;\n this.globalData._mdf = !this.renderConfig.clearCanvas || forceRender;\n this.globalData.projectInterface.currentFrame = num; // console.log('--------');\n // console.log('NEW: ',num);\n\n var i;\n var len = this.layers.length;\n\n if (!this.completeLayers) {\n this.checkLayers(num);\n }\n\n for (i = len - 1; i >= 0; i -= 1) {\n if (this.completeLayers || this.elements[i]) {\n this.elements[i].prepareFrame(num - this.layers[i].st);\n }\n }\n\n if (this.globalData._mdf) {\n if (this.renderConfig.clearCanvas === true) {\n this.canvasContext.clearRect(0, 0, this.transformCanvas.w, this.transformCanvas.h);\n } else {\n this.save();\n }\n\n for (i = len - 1; i >= 0; i -= 1) {\n if (this.completeLayers || this.elements[i]) {\n this.elements[i].renderFrame();\n }\n }\n\n if (this.renderConfig.clearCanvas !== true) {\n this.restore();\n }\n }\n };\n\n CanvasRendererBase.prototype.buildItem = function (pos) {\n var elements = this.elements;\n\n if (elements[pos] || this.layers[pos].ty === 99) {\n return;\n }\n\n var element = this.createItem(this.layers[pos], this, this.globalData);\n elements[pos] = element;\n element.initExpressions();\n /* if(this.layers[pos].ty === 0){\r\n element.resize(this.globalData.transformCanvas);\r\n } */\n };\n\n CanvasRendererBase.prototype.checkPendingElements = function () {\n while (this.pendingElements.length) {\n var element = this.pendingElements.pop();\n element.checkParenting();\n }\n };\n\n CanvasRendererBase.prototype.hide = function () {\n this.animationItem.container.style.display = 'none';\n };\n\n CanvasRendererBase.prototype.show = function () {\n this.animationItem.container.style.display = 'block';\n };\n\n function CanvasContext() {\n this.opacity = -1;\n this.transform = createTypedArray('float32', 16);\n this.fillStyle = '';\n this.strokeStyle = '';\n this.lineWidth = '';\n this.lineCap = '';\n this.lineJoin = '';\n this.miterLimit = '';\n this.id = Math.random();\n }\n\n function CVContextData() {\n this.stack = [];\n this.cArrPos = 0;\n this.cTr = new Matrix();\n var i;\n var len = 15;\n\n for (i = 0; i < len; i += 1) {\n var canvasContext = new CanvasContext();\n this.stack[i] = canvasContext;\n }\n\n this._length = len;\n this.nativeContext = null;\n this.transformMat = new Matrix();\n this.currentOpacity = 1; //\n\n this.currentFillStyle = '';\n this.appliedFillStyle = ''; //\n\n this.currentStrokeStyle = '';\n this.appliedStrokeStyle = ''; //\n\n this.currentLineWidth = '';\n this.appliedLineWidth = ''; //\n\n this.currentLineCap = '';\n this.appliedLineCap = ''; //\n\n this.currentLineJoin = '';\n this.appliedLineJoin = ''; //\n\n this.appliedMiterLimit = '';\n this.currentMiterLimit = '';\n }\n\n CVContextData.prototype.duplicate = function () {\n var newLength = this._length * 2;\n var i = 0;\n\n for (i = this._length; i < newLength; i += 1) {\n this.stack[i] = new CanvasContext();\n }\n\n this._length = newLength;\n };\n\n CVContextData.prototype.reset = function () {\n this.cArrPos = 0;\n this.cTr.reset();\n this.stack[this.cArrPos].opacity = 1;\n };\n\n CVContextData.prototype.restore = function (forceRestore) {\n this.cArrPos -= 1;\n var currentContext = this.stack[this.cArrPos];\n var transform = currentContext.transform;\n var i;\n var arr = this.cTr.props;\n\n for (i = 0; i < 16; i += 1) {\n arr[i] = transform[i];\n }\n\n if (forceRestore) {\n this.nativeContext.restore();\n var prevStack = this.stack[this.cArrPos + 1];\n this.appliedFillStyle = prevStack.fillStyle;\n this.appliedStrokeStyle = prevStack.strokeStyle;\n this.appliedLineWidth = prevStack.lineWidth;\n this.appliedLineCap = prevStack.lineCap;\n this.appliedLineJoin = prevStack.lineJoin;\n this.appliedMiterLimit = prevStack.miterLimit;\n }\n\n this.nativeContext.setTransform(transform[0], transform[1], transform[4], transform[5], transform[12], transform[13]);\n\n if (forceRestore || currentContext.opacity !== -1 && this.currentOpacity !== currentContext.opacity) {\n this.nativeContext.globalAlpha = currentContext.opacity;\n this.currentOpacity = currentContext.opacity;\n }\n\n this.currentFillStyle = currentContext.fillStyle;\n this.currentStrokeStyle = currentContext.strokeStyle;\n this.currentLineWidth = currentContext.lineWidth;\n this.currentLineCap = currentContext.lineCap;\n this.currentLineJoin = currentContext.lineJoin;\n this.currentMiterLimit = currentContext.miterLimit;\n };\n\n CVContextData.prototype.save = function (saveOnNativeFlag) {\n if (saveOnNativeFlag) {\n this.nativeContext.save();\n }\n\n var props = this.cTr.props;\n\n if (this._length <= this.cArrPos) {\n this.duplicate();\n }\n\n var currentStack = this.stack[this.cArrPos];\n var i;\n\n for (i = 0; i < 16; i += 1) {\n currentStack.transform[i] = props[i];\n }\n\n this.cArrPos += 1;\n var newStack = this.stack[this.cArrPos];\n newStack.opacity = currentStack.opacity;\n newStack.fillStyle = currentStack.fillStyle;\n newStack.strokeStyle = currentStack.strokeStyle;\n newStack.lineWidth = currentStack.lineWidth;\n newStack.lineCap = currentStack.lineCap;\n newStack.lineJoin = currentStack.lineJoin;\n newStack.miterLimit = currentStack.miterLimit;\n };\n\n CVContextData.prototype.setOpacity = function (value) {\n this.stack[this.cArrPos].opacity = value;\n };\n\n CVContextData.prototype.setContext = function (value) {\n this.nativeContext = value;\n };\n\n CVContextData.prototype.fillStyle = function (value) {\n if (this.stack[this.cArrPos].fillStyle !== value) {\n this.currentFillStyle = value;\n this.stack[this.cArrPos].fillStyle = value;\n }\n };\n\n CVContextData.prototype.strokeStyle = function (value) {\n if (this.stack[this.cArrPos].strokeStyle !== value) {\n this.currentStrokeStyle = value;\n this.stack[this.cArrPos].strokeStyle = value;\n }\n };\n\n CVContextData.prototype.lineWidth = function (value) {\n if (this.stack[this.cArrPos].lineWidth !== value) {\n this.currentLineWidth = value;\n this.stack[this.cArrPos].lineWidth = value;\n }\n };\n\n CVContextData.prototype.lineCap = function (value) {\n if (this.stack[this.cArrPos].lineCap !== value) {\n this.currentLineCap = value;\n this.stack[this.cArrPos].lineCap = value;\n }\n };\n\n CVContextData.prototype.lineJoin = function (value) {\n if (this.stack[this.cArrPos].lineJoin !== value) {\n this.currentLineJoin = value;\n this.stack[this.cArrPos].lineJoin = value;\n }\n };\n\n CVContextData.prototype.miterLimit = function (value) {\n if (this.stack[this.cArrPos].miterLimit !== value) {\n this.currentMiterLimit = value;\n this.stack[this.cArrPos].miterLimit = value;\n }\n };\n\n CVContextData.prototype.transform = function (props) {\n this.transformMat.cloneFromProps(props); // Taking the last transform value from the stored stack of transforms\n\n var currentTransform = this.cTr; // Applying the last transform value after the new transform to respect the order of transformations\n\n this.transformMat.multiply(currentTransform); // Storing the new transformed value in the stored transform\n\n currentTransform.cloneFromProps(this.transformMat.props);\n var trProps = currentTransform.props; // Applying the new transform to the canvas\n\n this.nativeContext.setTransform(trProps[0], trProps[1], trProps[4], trProps[5], trProps[12], trProps[13]);\n };\n\n CVContextData.prototype.opacity = function (op) {\n var currentOpacity = this.stack[this.cArrPos].opacity;\n currentOpacity *= op < 0 ? 0 : op;\n\n if (this.stack[this.cArrPos].opacity !== currentOpacity) {\n if (this.currentOpacity !== op) {\n this.nativeContext.globalAlpha = op;\n this.currentOpacity = op;\n }\n\n this.stack[this.cArrPos].opacity = currentOpacity;\n }\n };\n\n CVContextData.prototype.fill = function (rule) {\n if (this.appliedFillStyle !== this.currentFillStyle) {\n this.appliedFillStyle = this.currentFillStyle;\n this.nativeContext.fillStyle = this.appliedFillStyle;\n }\n\n this.nativeContext.fill(rule);\n };\n\n CVContextData.prototype.fillRect = function (x, y, w, h) {\n if (this.appliedFillStyle !== this.currentFillStyle) {\n this.appliedFillStyle = this.currentFillStyle;\n this.nativeContext.fillStyle = this.appliedFillStyle;\n }\n\n this.nativeContext.fillRect(x, y, w, h);\n };\n\n CVContextData.prototype.stroke = function () {\n if (this.appliedStrokeStyle !== this.currentStrokeStyle) {\n this.appliedStrokeStyle = this.currentStrokeStyle;\n this.nativeContext.strokeStyle = this.appliedStrokeStyle;\n }\n\n if (this.appliedLineWidth !== this.currentLineWidth) {\n this.appliedLineWidth = this.currentLineWidth;\n this.nativeContext.lineWidth = this.appliedLineWidth;\n }\n\n if (this.appliedLineCap !== this.currentLineCap) {\n this.appliedLineCap = this.currentLineCap;\n this.nativeContext.lineCap = this.appliedLineCap;\n }\n\n if (this.appliedLineJoin !== this.currentLineJoin) {\n this.appliedLineJoin = this.currentLineJoin;\n this.nativeContext.lineJoin = this.appliedLineJoin;\n }\n\n if (this.appliedMiterLimit !== this.currentMiterLimit) {\n this.appliedMiterLimit = this.currentMiterLimit;\n this.nativeContext.miterLimit = this.appliedMiterLimit;\n }\n\n this.nativeContext.stroke();\n };\n\n function CVCompElement(data, globalData, comp) {\n this.completeLayers = false;\n this.layers = data.layers;\n this.pendingElements = [];\n this.elements = createSizedArray(this.layers.length);\n this.initElement(data, globalData, comp);\n this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {\n _placeholder: true\n };\n }\n\n extendPrototype([CanvasRendererBase, ICompElement, CVBaseElement], CVCompElement);\n\n CVCompElement.prototype.renderInnerContent = function () {\n var ctx = this.canvasContext;\n ctx.beginPath();\n ctx.moveTo(0, 0);\n ctx.lineTo(this.data.w, 0);\n ctx.lineTo(this.data.w, this.data.h);\n ctx.lineTo(0, this.data.h);\n ctx.lineTo(0, 0);\n ctx.clip();\n var i;\n var len = this.layers.length;\n\n for (i = len - 1; i >= 0; i -= 1) {\n if (this.completeLayers || this.elements[i]) {\n this.elements[i].renderFrame();\n }\n }\n };\n\n CVCompElement.prototype.destroy = function () {\n var i;\n var len = this.layers.length;\n\n for (i = len - 1; i >= 0; i -= 1) {\n if (this.elements[i]) {\n this.elements[i].destroy();\n }\n }\n\n this.layers = null;\n this.elements = null;\n };\n\n CVCompElement.prototype.createComp = function (data) {\n return new CVCompElement(data, this.globalData, this);\n };\n\n function CanvasRenderer(animationItem, config) {\n this.animationItem = animationItem;\n this.renderConfig = {\n clearCanvas: config && config.clearCanvas !== undefined ? config.clearCanvas : true,\n context: config && config.context || null,\n progressiveLoad: config && config.progressiveLoad || false,\n preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet',\n imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',\n contentVisibility: config && config.contentVisibility || 'visible',\n className: config && config.className || '',\n id: config && config.id || '',\n runExpressions: !config || config.runExpressions === undefined || config.runExpressions\n };\n this.renderConfig.dpr = config && config.dpr || 1;\n\n if (this.animationItem.wrapper) {\n this.renderConfig.dpr = config && config.dpr || window.devicePixelRatio || 1;\n }\n\n this.renderedFrame = -1;\n this.globalData = {\n frameNum: -1,\n _mdf: false,\n renderConfig: this.renderConfig,\n currentGlobalAlpha: -1\n };\n this.contextData = new CVContextData();\n this.elements = [];\n this.pendingElements = [];\n this.transformMat = new Matrix();\n this.completeLayers = false;\n this.rendererType = 'canvas';\n\n if (this.renderConfig.clearCanvas) {\n this.ctxTransform = this.contextData.transform.bind(this.contextData);\n this.ctxOpacity = this.contextData.opacity.bind(this.contextData);\n this.ctxFillStyle = this.contextData.fillStyle.bind(this.contextData);\n this.ctxStrokeStyle = this.contextData.strokeStyle.bind(this.contextData);\n this.ctxLineWidth = this.contextData.lineWidth.bind(this.contextData);\n this.ctxLineCap = this.contextData.lineCap.bind(this.contextData);\n this.ctxLineJoin = this.contextData.lineJoin.bind(this.contextData);\n this.ctxMiterLimit = this.contextData.miterLimit.bind(this.contextData);\n this.ctxFill = this.contextData.fill.bind(this.contextData);\n this.ctxFillRect = this.contextData.fillRect.bind(this.contextData);\n this.ctxStroke = this.contextData.stroke.bind(this.contextData);\n this.save = this.contextData.save.bind(this.contextData);\n }\n }\n\n extendPrototype([CanvasRendererBase], CanvasRenderer);\n\n CanvasRenderer.prototype.createComp = function (data) {\n return new CVCompElement(data, this.globalData, this);\n };\n\n function HBaseElement() {}\n\n HBaseElement.prototype = {\n checkBlendMode: function checkBlendMode() {},\n initRendererElement: function initRendererElement() {\n this.baseElement = createTag(this.data.tg || 'div');\n\n if (this.data.hasMask) {\n this.svgElement = createNS('svg');\n this.layerElement = createNS('g');\n this.maskedElement = this.layerElement;\n this.svgElement.appendChild(this.layerElement);\n this.baseElement.appendChild(this.svgElement);\n } else {\n this.layerElement = this.baseElement;\n }\n\n styleDiv(this.baseElement);\n },\n createContainerElements: function createContainerElements() {\n this.renderableEffectsManager = new CVEffects(this);\n this.transformedElement = this.baseElement;\n this.maskedElement = this.layerElement;\n\n if (this.data.ln) {\n this.layerElement.setAttribute('id', this.data.ln);\n }\n\n if (this.data.cl) {\n this.layerElement.setAttribute('class', this.data.cl);\n }\n\n if (this.data.bm !== 0) {\n this.setBlendMode();\n }\n },\n renderElement: function renderElement() {\n var transformedElementStyle = this.transformedElement ? this.transformedElement.style : {};\n\n if (this.finalTransform._matMdf) {\n var matrixValue = this.finalTransform.mat.toCSS();\n transformedElementStyle.transform = matrixValue;\n transformedElementStyle.webkitTransform = matrixValue;\n }\n\n if (this.finalTransform._opMdf) {\n transformedElementStyle.opacity = this.finalTransform.mProp.o.v;\n }\n },\n renderFrame: function renderFrame() {\n // If it is exported as hidden (data.hd === true) no need to render\n // If it is not visible no need to render\n if (this.data.hd || this.hidden) {\n return;\n }\n\n this.renderTransform();\n this.renderRenderable();\n this.renderElement();\n this.renderInnerContent();\n\n if (this._isFirstFrame) {\n this._isFirstFrame = false;\n }\n },\n destroy: function destroy() {\n this.layerElement = null;\n this.transformedElement = null;\n\n if (this.matteElement) {\n this.matteElement = null;\n }\n\n if (this.maskManager) {\n this.maskManager.destroy();\n this.maskManager = null;\n }\n },\n createRenderableComponents: function createRenderableComponents() {\n this.maskManager = new MaskElement(this.data, this, this.globalData);\n },\n addEffects: function addEffects() {},\n setMatte: function setMatte() {}\n };\n HBaseElement.prototype.getBaseElement = SVGBaseElement.prototype.getBaseElement;\n HBaseElement.prototype.destroyBaseElement = HBaseElement.prototype.destroy;\n HBaseElement.prototype.buildElementParenting = BaseRenderer.prototype.buildElementParenting;\n\n function HSolidElement(data, globalData, comp) {\n this.initElement(data, globalData, comp);\n }\n\n extendPrototype([BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], HSolidElement);\n\n HSolidElement.prototype.createContent = function () {\n var rect;\n\n if (this.data.hasMask) {\n rect = createNS('rect');\n rect.setAttribute('width', this.data.sw);\n rect.setAttribute('height', this.data.sh);\n rect.setAttribute('fill', this.data.sc);\n this.svgElement.setAttribute('width', this.data.sw);\n this.svgElement.setAttribute('height', this.data.sh);\n } else {\n rect = createTag('div');\n rect.style.width = this.data.sw + 'px';\n rect.style.height = this.data.sh + 'px';\n rect.style.backgroundColor = this.data.sc;\n }\n\n this.layerElement.appendChild(rect);\n };\n\n function HShapeElement(data, globalData, comp) {\n // List of drawable elements\n this.shapes = []; // Full shape data\n\n this.shapesData = data.shapes; // List of styles that will be applied to shapes\n\n this.stylesList = []; // List of modifiers that will be applied to shapes\n\n this.shapeModifiers = []; // List of items in shape tree\n\n this.itemsData = []; // List of items in previous shape tree\n\n this.processedElements = []; // List of animated components\n\n this.animatedContents = [];\n this.shapesContainer = createNS('g');\n this.initElement(data, globalData, comp); // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.\n // List of elements that have been created\n\n this.prevViewData = [];\n this.currentBBox = {\n x: 999999,\n y: -999999,\n h: 0,\n w: 0\n };\n }\n\n extendPrototype([BaseElement, TransformElement, HSolidElement, SVGShapeElement, HBaseElement, HierarchyElement, FrameElement, RenderableElement], HShapeElement);\n HShapeElement.prototype._renderShapeFrame = HShapeElement.prototype.renderInnerContent;\n\n HShapeElement.prototype.createContent = function () {\n var cont;\n this.baseElement.style.fontSize = 0;\n\n if (this.data.hasMask) {\n this.layerElement.appendChild(this.shapesContainer);\n cont = this.svgElement;\n } else {\n cont = createNS('svg');\n var size = this.comp.data ? this.comp.data : this.globalData.compSize;\n cont.setAttribute('width', size.w);\n cont.setAttribute('height', size.h);\n cont.appendChild(this.shapesContainer);\n this.layerElement.appendChild(cont);\n }\n\n this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.shapesContainer, 0, [], true);\n this.filterUniqueShapes();\n this.shapeCont = cont;\n };\n\n HShapeElement.prototype.getTransformedPoint = function (transformers, point) {\n var i;\n var len = transformers.length;\n\n for (i = 0; i < len; i += 1) {\n point = transformers[i].mProps.v.applyToPointArray(point[0], point[1], 0);\n }\n\n return point;\n };\n\n HShapeElement.prototype.calculateShapeBoundingBox = function (item, boundingBox) {\n var shape = item.sh.v;\n var transformers = item.transformers;\n var i;\n var len = shape._length;\n var vPoint;\n var oPoint;\n var nextIPoint;\n var nextVPoint;\n\n if (len <= 1) {\n return;\n }\n\n for (i = 0; i < len - 1; i += 1) {\n vPoint = this.getTransformedPoint(transformers, shape.v[i]);\n oPoint = this.getTransformedPoint(transformers, shape.o[i]);\n nextIPoint = this.getTransformedPoint(transformers, shape.i[i + 1]);\n nextVPoint = this.getTransformedPoint(transformers, shape.v[i + 1]);\n this.checkBounds(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox);\n }\n\n if (shape.c) {\n vPoint = this.getTransformedPoint(transformers, shape.v[i]);\n oPoint = this.getTransformedPoint(transformers, shape.o[i]);\n nextIPoint = this.getTransformedPoint(transformers, shape.i[0]);\n nextVPoint = this.getTransformedPoint(transformers, shape.v[0]);\n this.checkBounds(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox);\n }\n };\n\n HShapeElement.prototype.checkBounds = function (vPoint, oPoint, nextIPoint, nextVPoint, boundingBox) {\n this.getBoundsOfCurve(vPoint, oPoint, nextIPoint, nextVPoint);\n var bounds = this.shapeBoundingBox;\n boundingBox.x = bmMin(bounds.left, boundingBox.x);\n boundingBox.xMax = bmMax(bounds.right, boundingBox.xMax);\n boundingBox.y = bmMin(bounds.top, boundingBox.y);\n boundingBox.yMax = bmMax(bounds.bottom, boundingBox.yMax);\n };\n\n HShapeElement.prototype.shapeBoundingBox = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n };\n HShapeElement.prototype.tempBoundingBox = {\n x: 0,\n xMax: 0,\n y: 0,\n yMax: 0,\n width: 0,\n height: 0\n };\n\n HShapeElement.prototype.getBoundsOfCurve = function (p0, p1, p2, p3) {\n var bounds = [[p0[0], p3[0]], [p0[1], p3[1]]];\n\n for (var a, b, c, t, b2ac, t1, t2, i = 0; i < 2; ++i) {\n // eslint-disable-line no-plusplus\n b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i];\n a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i];\n c = 3 * p1[i] - 3 * p0[i];\n b |= 0; // eslint-disable-line no-bitwise\n\n a |= 0; // eslint-disable-line no-bitwise\n\n c |= 0; // eslint-disable-line no-bitwise\n\n if (a === 0 && b === 0) {//\n } else if (a === 0) {\n t = -c / b;\n\n if (t > 0 && t < 1) {\n bounds[i].push(this.calculateF(t, p0, p1, p2, p3, i));\n }\n } else {\n b2ac = b * b - 4 * c * a;\n\n if (b2ac >= 0) {\n t1 = (-b + bmSqrt(b2ac)) / (2 * a);\n if (t1 > 0 && t1 < 1) bounds[i].push(this.calculateF(t1, p0, p1, p2, p3, i));\n t2 = (-b - bmSqrt(b2ac)) / (2 * a);\n if (t2 > 0 && t2 < 1) bounds[i].push(this.calculateF(t2, p0, p1, p2, p3, i));\n }\n }\n }\n\n this.shapeBoundingBox.left = bmMin.apply(null, bounds[0]);\n this.shapeBoundingBox.top = bmMin.apply(null, bounds[1]);\n this.shapeBoundingBox.right = bmMax.apply(null, bounds[0]);\n this.shapeBoundingBox.bottom = bmMax.apply(null, bounds[1]);\n };\n\n HShapeElement.prototype.calculateF = function (t, p0, p1, p2, p3, i) {\n return bmPow(1 - t, 3) * p0[i] + 3 * bmPow(1 - t, 2) * t * p1[i] + 3 * (1 - t) * bmPow(t, 2) * p2[i] + bmPow(t, 3) * p3[i];\n };\n\n HShapeElement.prototype.calculateBoundingBox = function (itemsData, boundingBox) {\n var i;\n var len = itemsData.length;\n\n for (i = 0; i < len; i += 1) {\n if (itemsData[i] && itemsData[i].sh) {\n this.calculateShapeBoundingBox(itemsData[i], boundingBox);\n } else if (itemsData[i] && itemsData[i].it) {\n this.calculateBoundingBox(itemsData[i].it, boundingBox);\n } else if (itemsData[i] && itemsData[i].style && itemsData[i].w) {\n this.expandStrokeBoundingBox(itemsData[i].w, boundingBox);\n }\n }\n };\n\n HShapeElement.prototype.expandStrokeBoundingBox = function (widthProperty, boundingBox) {\n var width = 0;\n\n if (widthProperty.keyframes) {\n for (var i = 0; i < widthProperty.keyframes.length; i += 1) {\n var kfw = widthProperty.keyframes[i].s;\n\n if (kfw > width) {\n width = kfw;\n }\n }\n\n width *= widthProperty.mult;\n } else {\n width = widthProperty.v * widthProperty.mult;\n }\n\n boundingBox.x -= width;\n boundingBox.xMax += width;\n boundingBox.y -= width;\n boundingBox.yMax += width;\n };\n\n HShapeElement.prototype.currentBoxContains = function (box) {\n return this.currentBBox.x <= box.x && this.currentBBox.y <= box.y && this.currentBBox.width + this.currentBBox.x >= box.x + box.width && this.currentBBox.height + this.currentBBox.y >= box.y + box.height;\n };\n\n HShapeElement.prototype.renderInnerContent = function () {\n this._renderShapeFrame();\n\n if (!this.hidden && (this._isFirstFrame || this._mdf)) {\n var tempBoundingBox = this.tempBoundingBox;\n var max = 999999;\n tempBoundingBox.x = max;\n tempBoundingBox.xMax = -max;\n tempBoundingBox.y = max;\n tempBoundingBox.yMax = -max;\n this.calculateBoundingBox(this.itemsData, tempBoundingBox);\n tempBoundingBox.width = tempBoundingBox.xMax < tempBoundingBox.x ? 0 : tempBoundingBox.xMax - tempBoundingBox.x;\n tempBoundingBox.height = tempBoundingBox.yMax < tempBoundingBox.y ? 0 : tempBoundingBox.yMax - tempBoundingBox.y; // var tempBoundingBox = this.shapeCont.getBBox();\n\n if (this.currentBoxContains(tempBoundingBox)) {\n return;\n }\n\n var changed = false;\n\n if (this.currentBBox.w !== tempBoundingBox.width) {\n this.currentBBox.w = tempBoundingBox.width;\n this.shapeCont.setAttribute('width', tempBoundingBox.width);\n changed = true;\n }\n\n if (this.currentBBox.h !== tempBoundingBox.height) {\n this.currentBBox.h = tempBoundingBox.height;\n this.shapeCont.setAttribute('height', tempBoundingBox.height);\n changed = true;\n }\n\n if (changed || this.currentBBox.x !== tempBoundingBox.x || this.currentBBox.y !== tempBoundingBox.y) {\n this.currentBBox.w = tempBoundingBox.width;\n this.currentBBox.h = tempBoundingBox.height;\n this.currentBBox.x = tempBoundingBox.x;\n this.currentBBox.y = tempBoundingBox.y;\n this.shapeCont.setAttribute('viewBox', this.currentBBox.x + ' ' + this.currentBBox.y + ' ' + this.currentBBox.w + ' ' + this.currentBBox.h);\n var shapeStyle = this.shapeCont.style;\n var shapeTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)';\n shapeStyle.transform = shapeTransform;\n shapeStyle.webkitTransform = shapeTransform;\n }\n }\n };\n\n function HTextElement(data, globalData, comp) {\n this.textSpans = [];\n this.textPaths = [];\n this.currentBBox = {\n x: 999999,\n y: -999999,\n h: 0,\n w: 0\n };\n this.renderType = 'svg';\n this.isMasked = false;\n this.initElement(data, globalData, comp);\n }\n\n extendPrototype([BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], HTextElement);\n\n HTextElement.prototype.createContent = function () {\n this.isMasked = this.checkMasks();\n\n if (this.isMasked) {\n this.renderType = 'svg';\n this.compW = this.comp.data.w;\n this.compH = this.comp.data.h;\n this.svgElement.setAttribute('width', this.compW);\n this.svgElement.setAttribute('height', this.compH);\n var g = createNS('g');\n this.maskedElement.appendChild(g);\n this.innerElem = g;\n } else {\n this.renderType = 'html';\n this.innerElem = this.layerElement;\n }\n\n this.checkParenting();\n };\n\n HTextElement.prototype.buildNewText = function () {\n var documentData = this.textProperty.currentData;\n this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0);\n var innerElemStyle = this.innerElem.style;\n var textColor = documentData.fc ? this.buildColor(documentData.fc) : 'rgba(0,0,0,0)';\n innerElemStyle.fill = textColor;\n innerElemStyle.color = textColor;\n\n if (documentData.sc) {\n innerElemStyle.stroke = this.buildColor(documentData.sc);\n innerElemStyle.strokeWidth = documentData.sw + 'px';\n }\n\n var fontData = this.globalData.fontManager.getFontByName(documentData.f);\n\n if (!this.globalData.fontManager.chars) {\n innerElemStyle.fontSize = documentData.finalSize + 'px';\n innerElemStyle.lineHeight = documentData.finalSize + 'px';\n\n if (fontData.fClass) {\n this.innerElem.className = fontData.fClass;\n } else {\n innerElemStyle.fontFamily = fontData.fFamily;\n var fWeight = documentData.fWeight;\n var fStyle = documentData.fStyle;\n innerElemStyle.fontStyle = fStyle;\n innerElemStyle.fontWeight = fWeight;\n }\n }\n\n var i;\n var len;\n var letters = documentData.l;\n len = letters.length;\n var tSpan;\n var tParent;\n var tCont;\n var matrixHelper = this.mHelper;\n var shapes;\n var shapeStr = '';\n var cnt = 0;\n\n for (i = 0; i < len; i += 1) {\n if (this.globalData.fontManager.chars) {\n if (!this.textPaths[cnt]) {\n tSpan = createNS('path');\n tSpan.setAttribute('stroke-linecap', lineCapEnum[1]);\n tSpan.setAttribute('stroke-linejoin', lineJoinEnum[2]);\n tSpan.setAttribute('stroke-miterlimit', '4');\n } else {\n tSpan = this.textPaths[cnt];\n }\n\n if (!this.isMasked) {\n if (this.textSpans[cnt]) {\n tParent = this.textSpans[cnt];\n tCont = tParent.children[0];\n } else {\n tParent = createTag('div');\n tParent.style.lineHeight = 0;\n tCont = createNS('svg');\n tCont.appendChild(tSpan);\n styleDiv(tParent);\n }\n }\n } else if (!this.isMasked) {\n if (this.textSpans[cnt]) {\n tParent = this.textSpans[cnt];\n tSpan = this.textPaths[cnt];\n } else {\n tParent = createTag('span');\n styleDiv(tParent);\n tSpan = createTag('span');\n styleDiv(tSpan);\n tParent.appendChild(tSpan);\n }\n } else {\n tSpan = this.textPaths[cnt] ? this.textPaths[cnt] : createNS('text');\n } // tSpan.setAttribute('visibility', 'hidden');\n\n\n if (this.globalData.fontManager.chars) {\n var charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);\n var shapeData;\n\n if (charData) {\n shapeData = charData.data;\n } else {\n shapeData = null;\n }\n\n matrixHelper.reset();\n\n if (shapeData && shapeData.shapes && shapeData.shapes.length) {\n shapes = shapeData.shapes[0].it;\n matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);\n shapeStr = this.createPathShape(matrixHelper, shapes);\n tSpan.setAttribute('d', shapeStr);\n }\n\n if (!this.isMasked) {\n this.innerElem.appendChild(tParent);\n\n if (shapeData && shapeData.shapes) {\n // document.body.appendChild is needed to get exact measure of shape\n document.body.appendChild(tCont);\n var boundingBox = tCont.getBBox();\n tCont.setAttribute('width', boundingBox.width + 2);\n tCont.setAttribute('height', boundingBox.height + 2);\n tCont.setAttribute('viewBox', boundingBox.x - 1 + ' ' + (boundingBox.y - 1) + ' ' + (boundingBox.width + 2) + ' ' + (boundingBox.height + 2));\n var tContStyle = tCont.style;\n var tContTranslation = 'translate(' + (boundingBox.x - 1) + 'px,' + (boundingBox.y - 1) + 'px)';\n tContStyle.transform = tContTranslation;\n tContStyle.webkitTransform = tContTranslation;\n letters[i].yOffset = boundingBox.y - 1;\n } else {\n tCont.setAttribute('width', 1);\n tCont.setAttribute('height', 1);\n }\n\n tParent.appendChild(tCont);\n } else {\n this.innerElem.appendChild(tSpan);\n }\n } else {\n tSpan.textContent = letters[i].val;\n tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n\n if (!this.isMasked) {\n this.innerElem.appendChild(tParent); //\n\n var tStyle = tSpan.style;\n var tSpanTranslation = 'translate3d(0,' + -documentData.finalSize / 1.2 + 'px,0)';\n tStyle.transform = tSpanTranslation;\n tStyle.webkitTransform = tSpanTranslation;\n } else {\n this.innerElem.appendChild(tSpan);\n }\n } //\n\n\n if (!this.isMasked) {\n this.textSpans[cnt] = tParent;\n } else {\n this.textSpans[cnt] = tSpan;\n }\n\n this.textSpans[cnt].style.display = 'block';\n this.textPaths[cnt] = tSpan;\n cnt += 1;\n }\n\n while (cnt < this.textSpans.length) {\n this.textSpans[cnt].style.display = 'none';\n cnt += 1;\n }\n };\n\n HTextElement.prototype.renderInnerContent = function () {\n this.validateText();\n var svgStyle;\n\n if (this.data.singleShape) {\n if (!this._isFirstFrame && !this.lettersChangedFlag) {\n return;\n }\n\n if (this.isMasked && this.finalTransform._matMdf) {\n // Todo Benchmark if using this is better than getBBox\n this.svgElement.setAttribute('viewBox', -this.finalTransform.mProp.p.v[0] + ' ' + -this.finalTransform.mProp.p.v[1] + ' ' + this.compW + ' ' + this.compH);\n svgStyle = this.svgElement.style;\n var translation = 'translate(' + -this.finalTransform.mProp.p.v[0] + 'px,' + -this.finalTransform.mProp.p.v[1] + 'px)';\n svgStyle.transform = translation;\n svgStyle.webkitTransform = translation;\n }\n }\n\n this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);\n\n if (!this.lettersChangedFlag && !this.textAnimator.lettersChangedFlag) {\n return;\n }\n\n var i;\n var len;\n var count = 0;\n var renderedLetters = this.textAnimator.renderedLetters;\n var letters = this.textProperty.currentData.l;\n len = letters.length;\n var renderedLetter;\n var textSpan;\n var textPath;\n\n for (i = 0; i < len; i += 1) {\n if (letters[i].n) {\n count += 1;\n } else {\n textSpan = this.textSpans[i];\n textPath = this.textPaths[i];\n renderedLetter = renderedLetters[count];\n count += 1;\n\n if (renderedLetter._mdf.m) {\n if (!this.isMasked) {\n textSpan.style.webkitTransform = renderedLetter.m;\n textSpan.style.transform = renderedLetter.m;\n } else {\n textSpan.setAttribute('transform', renderedLetter.m);\n }\n } /// /textSpan.setAttribute('opacity',renderedLetter.o);\n\n\n textSpan.style.opacity = renderedLetter.o;\n\n if (renderedLetter.sw && renderedLetter._mdf.sw) {\n textPath.setAttribute('stroke-width', renderedLetter.sw);\n }\n\n if (renderedLetter.sc && renderedLetter._mdf.sc) {\n textPath.setAttribute('stroke', renderedLetter.sc);\n }\n\n if (renderedLetter.fc && renderedLetter._mdf.fc) {\n textPath.setAttribute('fill', renderedLetter.fc);\n textPath.style.color = renderedLetter.fc;\n }\n }\n }\n\n if (this.innerElem.getBBox && !this.hidden && (this._isFirstFrame || this._mdf)) {\n var boundingBox = this.innerElem.getBBox();\n\n if (this.currentBBox.w !== boundingBox.width) {\n this.currentBBox.w = boundingBox.width;\n this.svgElement.setAttribute('width', boundingBox.width);\n }\n\n if (this.currentBBox.h !== boundingBox.height) {\n this.currentBBox.h = boundingBox.height;\n this.svgElement.setAttribute('height', boundingBox.height);\n }\n\n var margin = 1;\n\n if (this.currentBBox.w !== boundingBox.width + margin * 2 || this.currentBBox.h !== boundingBox.height + margin * 2 || this.currentBBox.x !== boundingBox.x - margin || this.currentBBox.y !== boundingBox.y - margin) {\n this.currentBBox.w = boundingBox.width + margin * 2;\n this.currentBBox.h = boundingBox.height + margin * 2;\n this.currentBBox.x = boundingBox.x - margin;\n this.currentBBox.y = boundingBox.y - margin;\n this.svgElement.setAttribute('viewBox', this.currentBBox.x + ' ' + this.currentBBox.y + ' ' + this.currentBBox.w + ' ' + this.currentBBox.h);\n svgStyle = this.svgElement.style;\n var svgTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)';\n svgStyle.transform = svgTransform;\n svgStyle.webkitTransform = svgTransform;\n }\n }\n };\n\n function HCameraElement(data, globalData, comp) {\n this.initFrame();\n this.initBaseData(data, globalData, comp);\n this.initHierarchy();\n var getProp = PropertyFactory.getProp;\n this.pe = getProp(this, data.pe, 0, 0, this);\n\n if (data.ks.p.s) {\n this.px = getProp(this, data.ks.p.x, 1, 0, this);\n this.py = getProp(this, data.ks.p.y, 1, 0, this);\n this.pz = getProp(this, data.ks.p.z, 1, 0, this);\n } else {\n this.p = getProp(this, data.ks.p, 1, 0, this);\n }\n\n if (data.ks.a) {\n this.a = getProp(this, data.ks.a, 1, 0, this);\n }\n\n if (data.ks.or.k.length && data.ks.or.k[0].to) {\n var i;\n var len = data.ks.or.k.length;\n\n for (i = 0; i < len; i += 1) {\n data.ks.or.k[i].to = null;\n data.ks.or.k[i].ti = null;\n }\n }\n\n this.or = getProp(this, data.ks.or, 1, degToRads, this);\n this.or.sh = true;\n this.rx = getProp(this, data.ks.rx, 0, degToRads, this);\n this.ry = getProp(this, data.ks.ry, 0, degToRads, this);\n this.rz = getProp(this, data.ks.rz, 0, degToRads, this);\n this.mat = new Matrix();\n this._prevMat = new Matrix();\n this._isFirstFrame = true; // TODO: find a better way to make the HCamera element to be compatible with the LayerInterface and TransformInterface.\n\n this.finalTransform = {\n mProp: this\n };\n }\n\n extendPrototype([BaseElement, FrameElement, HierarchyElement], HCameraElement);\n\n HCameraElement.prototype.setup = function () {\n var i;\n var len = this.comp.threeDElements.length;\n var comp;\n var perspectiveStyle;\n var containerStyle;\n\n for (i = 0; i < len; i += 1) {\n // [perspectiveElem,container]\n comp = this.comp.threeDElements[i];\n\n if (comp.type === '3d') {\n perspectiveStyle = comp.perspectiveElem.style;\n containerStyle = comp.container.style;\n var perspective = this.pe.v + 'px';\n var origin = '0px 0px 0px';\n var matrix = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';\n perspectiveStyle.perspective = perspective;\n perspectiveStyle.webkitPerspective = perspective;\n containerStyle.transformOrigin = origin;\n containerStyle.mozTransformOrigin = origin;\n containerStyle.webkitTransformOrigin = origin;\n perspectiveStyle.transform = matrix;\n perspectiveStyle.webkitTransform = matrix;\n }\n }\n };\n\n HCameraElement.prototype.createElements = function () {};\n\n HCameraElement.prototype.hide = function () {};\n\n HCameraElement.prototype.renderFrame = function () {\n var _mdf = this._isFirstFrame;\n var i;\n var len;\n\n if (this.hierarchy) {\n len = this.hierarchy.length;\n\n for (i = 0; i < len; i += 1) {\n _mdf = this.hierarchy[i].finalTransform.mProp._mdf || _mdf;\n }\n }\n\n if (_mdf || this.pe._mdf || this.p && this.p._mdf || this.px && (this.px._mdf || this.py._mdf || this.pz._mdf) || this.rx._mdf || this.ry._mdf || this.rz._mdf || this.or._mdf || this.a && this.a._mdf) {\n this.mat.reset();\n\n if (this.hierarchy) {\n len = this.hierarchy.length - 1;\n\n for (i = len; i >= 0; i -= 1) {\n var mTransf = this.hierarchy[i].finalTransform.mProp;\n this.mat.translate(-mTransf.p.v[0], -mTransf.p.v[1], mTransf.p.v[2]);\n this.mat.rotateX(-mTransf.or.v[0]).rotateY(-mTransf.or.v[1]).rotateZ(mTransf.or.v[2]);\n this.mat.rotateX(-mTransf.rx.v).rotateY(-mTransf.ry.v).rotateZ(mTransf.rz.v);\n this.mat.scale(1 / mTransf.s.v[0], 1 / mTransf.s.v[1], 1 / mTransf.s.v[2]);\n this.mat.translate(mTransf.a.v[0], mTransf.a.v[1], mTransf.a.v[2]);\n }\n }\n\n if (this.p) {\n this.mat.translate(-this.p.v[0], -this.p.v[1], this.p.v[2]);\n } else {\n this.mat.translate(-this.px.v, -this.py.v, this.pz.v);\n }\n\n if (this.a) {\n var diffVector;\n\n if (this.p) {\n diffVector = [this.p.v[0] - this.a.v[0], this.p.v[1] - this.a.v[1], this.p.v[2] - this.a.v[2]];\n } else {\n diffVector = [this.px.v - this.a.v[0], this.py.v - this.a.v[1], this.pz.v - this.a.v[2]];\n }\n\n var mag = Math.sqrt(Math.pow(diffVector[0], 2) + Math.pow(diffVector[1], 2) + Math.pow(diffVector[2], 2)); // var lookDir = getNormalizedPoint(getDiffVector(this.a.v,this.p.v));\n\n var lookDir = [diffVector[0] / mag, diffVector[1] / mag, diffVector[2] / mag];\n var lookLengthOnXZ = Math.sqrt(lookDir[2] * lookDir[2] + lookDir[0] * lookDir[0]);\n var mRotationX = Math.atan2(lookDir[1], lookLengthOnXZ);\n var mRotationY = Math.atan2(lookDir[0], -lookDir[2]);\n this.mat.rotateY(mRotationY).rotateX(-mRotationX);\n }\n\n this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v);\n this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]);\n this.mat.translate(this.globalData.compSize.w / 2, this.globalData.compSize.h / 2, 0);\n this.mat.translate(0, 0, this.pe.v);\n var hasMatrixChanged = !this._prevMat.equals(this.mat);\n\n if ((hasMatrixChanged || this.pe._mdf) && this.comp.threeDElements) {\n len = this.comp.threeDElements.length;\n var comp;\n var perspectiveStyle;\n var containerStyle;\n\n for (i = 0; i < len; i += 1) {\n comp = this.comp.threeDElements[i];\n\n if (comp.type === '3d') {\n if (hasMatrixChanged) {\n var matValue = this.mat.toCSS();\n containerStyle = comp.container.style;\n containerStyle.transform = matValue;\n containerStyle.webkitTransform = matValue;\n }\n\n if (this.pe._mdf) {\n perspectiveStyle = comp.perspectiveElem.style;\n perspectiveStyle.perspective = this.pe.v + 'px';\n perspectiveStyle.webkitPerspective = this.pe.v + 'px';\n }\n }\n }\n\n this.mat.clone(this._prevMat);\n }\n }\n\n this._isFirstFrame = false;\n };\n\n HCameraElement.prototype.prepareFrame = function (num) {\n this.prepareProperties(num, true);\n };\n\n HCameraElement.prototype.destroy = function () {};\n\n HCameraElement.prototype.getBaseElement = function () {\n return null;\n };\n\n function HImageElement(data, globalData, comp) {\n this.assetData = globalData.getAssetData(data.refId);\n this.initElement(data, globalData, comp);\n }\n\n extendPrototype([BaseElement, TransformElement, HBaseElement, HSolidElement, HierarchyElement, FrameElement, RenderableElement], HImageElement);\n\n HImageElement.prototype.createContent = function () {\n var assetPath = this.globalData.getAssetsPath(this.assetData);\n var img = new Image();\n\n if (this.data.hasMask) {\n this.imageElem = createNS('image');\n this.imageElem.setAttribute('width', this.assetData.w + 'px');\n this.imageElem.setAttribute('height', this.assetData.h + 'px');\n this.imageElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);\n this.layerElement.appendChild(this.imageElem);\n this.baseElement.setAttribute('width', this.assetData.w);\n this.baseElement.setAttribute('height', this.assetData.h);\n } else {\n this.layerElement.appendChild(img);\n }\n\n img.crossOrigin = 'anonymous';\n img.src = assetPath;\n\n if (this.data.ln) {\n this.baseElement.setAttribute('id', this.data.ln);\n }\n };\n\n function HybridRendererBase(animationItem, config) {\n this.animationItem = animationItem;\n this.layers = null;\n this.renderedFrame = -1;\n this.renderConfig = {\n className: config && config.className || '',\n imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',\n hideOnTransparent: !(config && config.hideOnTransparent === false),\n filterSize: {\n width: config && config.filterSize && config.filterSize.width || '400%',\n height: config && config.filterSize && config.filterSize.height || '400%',\n x: config && config.filterSize && config.filterSize.x || '-100%',\n y: config && config.filterSize && config.filterSize.y || '-100%'\n }\n };\n this.globalData = {\n _mdf: false,\n frameNum: -1,\n renderConfig: this.renderConfig\n };\n this.pendingElements = [];\n this.elements = [];\n this.threeDElements = [];\n this.destroyed = false;\n this.camera = null;\n this.supports3d = true;\n this.rendererType = 'html';\n }\n\n extendPrototype([BaseRenderer], HybridRendererBase);\n HybridRendererBase.prototype.buildItem = SVGRenderer.prototype.buildItem;\n\n HybridRendererBase.prototype.checkPendingElements = function () {\n while (this.pendingElements.length) {\n var element = this.pendingElements.pop();\n element.checkParenting();\n }\n };\n\n HybridRendererBase.prototype.appendElementInPos = function (element, pos) {\n var newDOMElement = element.getBaseElement();\n\n if (!newDOMElement) {\n return;\n }\n\n var layer = this.layers[pos];\n\n if (!layer.ddd || !this.supports3d) {\n if (this.threeDElements) {\n this.addTo3dContainer(newDOMElement, pos);\n } else {\n var i = 0;\n var nextDOMElement;\n var nextLayer;\n var tmpDOMElement;\n\n while (i < pos) {\n if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement) {\n nextLayer = this.elements[i];\n tmpDOMElement = this.layers[i].ddd ? this.getThreeDContainerByPos(i) : nextLayer.getBaseElement();\n nextDOMElement = tmpDOMElement || nextDOMElement;\n }\n\n i += 1;\n }\n\n if (nextDOMElement) {\n if (!layer.ddd || !this.supports3d) {\n this.layerElement.insertBefore(newDOMElement, nextDOMElement);\n }\n } else if (!layer.ddd || !this.supports3d) {\n this.layerElement.appendChild(newDOMElement);\n }\n }\n } else {\n this.addTo3dContainer(newDOMElement, pos);\n }\n };\n\n HybridRendererBase.prototype.createShape = function (data) {\n if (!this.supports3d) {\n return new SVGShapeElement(data, this.globalData, this);\n }\n\n return new HShapeElement(data, this.globalData, this);\n };\n\n HybridRendererBase.prototype.createText = function (data) {\n if (!this.supports3d) {\n return new SVGTextLottieElement(data, this.globalData, this);\n }\n\n return new HTextElement(data, this.globalData, this);\n };\n\n HybridRendererBase.prototype.createCamera = function (data) {\n this.camera = new HCameraElement(data, this.globalData, this);\n return this.camera;\n };\n\n HybridRendererBase.prototype.createImage = function (data) {\n if (!this.supports3d) {\n return new IImageElement(data, this.globalData, this);\n }\n\n return new HImageElement(data, this.globalData, this);\n };\n\n HybridRendererBase.prototype.createSolid = function (data) {\n if (!this.supports3d) {\n return new ISolidElement(data, this.globalData, this);\n }\n\n return new HSolidElement(data, this.globalData, this);\n };\n\n HybridRendererBase.prototype.createNull = SVGRenderer.prototype.createNull;\n\n HybridRendererBase.prototype.getThreeDContainerByPos = function (pos) {\n var i = 0;\n var len = this.threeDElements.length;\n\n while (i < len) {\n if (this.threeDElements[i].startPos <= pos && this.threeDElements[i].endPos >= pos) {\n return this.threeDElements[i].perspectiveElem;\n }\n\n i += 1;\n }\n\n return null;\n };\n\n HybridRendererBase.prototype.createThreeDContainer = function (pos, type) {\n var perspectiveElem = createTag('div');\n var style;\n var containerStyle;\n styleDiv(perspectiveElem);\n var container = createTag('div');\n styleDiv(container);\n\n if (type === '3d') {\n style = perspectiveElem.style;\n style.width = this.globalData.compSize.w + 'px';\n style.height = this.globalData.compSize.h + 'px';\n var center = '50% 50%';\n style.webkitTransformOrigin = center;\n style.mozTransformOrigin = center;\n style.transformOrigin = center;\n containerStyle = container.style;\n var matrix = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';\n containerStyle.transform = matrix;\n containerStyle.webkitTransform = matrix;\n }\n\n perspectiveElem.appendChild(container); // this.resizerElem.appendChild(perspectiveElem);\n\n var threeDContainerData = {\n container: container,\n perspectiveElem: perspectiveElem,\n startPos: pos,\n endPos: pos,\n type: type\n };\n this.threeDElements.push(threeDContainerData);\n return threeDContainerData;\n };\n\n HybridRendererBase.prototype.build3dContainers = function () {\n var i;\n var len = this.layers.length;\n var lastThreeDContainerData;\n var currentContainer = '';\n\n for (i = 0; i < len; i += 1) {\n if (this.layers[i].ddd && this.layers[i].ty !== 3) {\n if (currentContainer !== '3d') {\n currentContainer = '3d';\n lastThreeDContainerData = this.createThreeDContainer(i, '3d');\n }\n\n lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i);\n } else {\n if (currentContainer !== '2d') {\n currentContainer = '2d';\n lastThreeDContainerData = this.createThreeDContainer(i, '2d');\n }\n\n lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i);\n }\n }\n\n len = this.threeDElements.length;\n\n for (i = len - 1; i >= 0; i -= 1) {\n this.resizerElem.appendChild(this.threeDElements[i].perspectiveElem);\n }\n };\n\n HybridRendererBase.prototype.addTo3dContainer = function (elem, pos) {\n var i = 0;\n var len = this.threeDElements.length;\n\n while (i < len) {\n if (pos <= this.threeDElements[i].endPos) {\n var j = this.threeDElements[i].startPos;\n var nextElement;\n\n while (j < pos) {\n if (this.elements[j] && this.elements[j].getBaseElement) {\n nextElement = this.elements[j].getBaseElement();\n }\n\n j += 1;\n }\n\n if (nextElement) {\n this.threeDElements[i].container.insertBefore(elem, nextElement);\n } else {\n this.threeDElements[i].container.appendChild(elem);\n }\n\n break;\n }\n\n i += 1;\n }\n };\n\n HybridRendererBase.prototype.configAnimation = function (animData) {\n var resizerElem = createTag('div');\n var wrapper = this.animationItem.wrapper;\n var style = resizerElem.style;\n style.width = animData.w + 'px';\n style.height = animData.h + 'px';\n this.resizerElem = resizerElem;\n styleDiv(resizerElem);\n style.transformStyle = 'flat';\n style.mozTransformStyle = 'flat';\n style.webkitTransformStyle = 'flat';\n\n if (this.renderConfig.className) {\n resizerElem.setAttribute('class', this.renderConfig.className);\n }\n\n wrapper.appendChild(resizerElem);\n style.overflow = 'hidden';\n var svg = createNS('svg');\n svg.setAttribute('width', '1');\n svg.setAttribute('height', '1');\n styleDiv(svg);\n this.resizerElem.appendChild(svg);\n var defs = createNS('defs');\n svg.appendChild(defs);\n this.data = animData; // Mask animation\n\n this.setupGlobalData(animData, svg);\n this.globalData.defs = defs;\n this.layers = animData.layers;\n this.layerElement = this.resizerElem;\n this.build3dContainers();\n this.updateContainerSize();\n };\n\n HybridRendererBase.prototype.destroy = function () {\n if (this.animationItem.wrapper) {\n this.animationItem.wrapper.innerText = '';\n }\n\n this.animationItem.container = null;\n this.globalData.defs = null;\n var i;\n var len = this.layers ? this.layers.length : 0;\n\n for (i = 0; i < len; i += 1) {\n if (this.elements[i] && this.elements[i].destroy) {\n this.elements[i].destroy();\n }\n }\n\n this.elements.length = 0;\n this.destroyed = true;\n this.animationItem = null;\n };\n\n HybridRendererBase.prototype.updateContainerSize = function () {\n var elementWidth = this.animationItem.wrapper.offsetWidth;\n var elementHeight = this.animationItem.wrapper.offsetHeight;\n var elementRel = elementWidth / elementHeight;\n var animationRel = this.globalData.compSize.w / this.globalData.compSize.h;\n var sx;\n var sy;\n var tx;\n var ty;\n\n if (animationRel > elementRel) {\n sx = elementWidth / this.globalData.compSize.w;\n sy = elementWidth / this.globalData.compSize.w;\n tx = 0;\n ty = (elementHeight - this.globalData.compSize.h * (elementWidth / this.globalData.compSize.w)) / 2;\n } else {\n sx = elementHeight / this.globalData.compSize.h;\n sy = elementHeight / this.globalData.compSize.h;\n tx = (elementWidth - this.globalData.compSize.w * (elementHeight / this.globalData.compSize.h)) / 2;\n ty = 0;\n }\n\n var style = this.resizerElem.style;\n style.webkitTransform = 'matrix3d(' + sx + ',0,0,0,0,' + sy + ',0,0,0,0,1,0,' + tx + ',' + ty + ',0,1)';\n style.transform = style.webkitTransform;\n };\n\n HybridRendererBase.prototype.renderFrame = SVGRenderer.prototype.renderFrame;\n\n HybridRendererBase.prototype.hide = function () {\n this.resizerElem.style.display = 'none';\n };\n\n HybridRendererBase.prototype.show = function () {\n this.resizerElem.style.display = 'block';\n };\n\n HybridRendererBase.prototype.initItems = function () {\n this.buildAllItems();\n\n if (this.camera) {\n this.camera.setup();\n } else {\n var cWidth = this.globalData.compSize.w;\n var cHeight = this.globalData.compSize.h;\n var i;\n var len = this.threeDElements.length;\n\n for (i = 0; i < len; i += 1) {\n var style = this.threeDElements[i].perspectiveElem.style;\n style.webkitPerspective = Math.sqrt(Math.pow(cWidth, 2) + Math.pow(cHeight, 2)) + 'px';\n style.perspective = style.webkitPerspective;\n }\n }\n };\n\n HybridRendererBase.prototype.searchExtraCompositions = function (assets) {\n var i;\n var len = assets.length;\n var floatingContainer = createTag('div');\n\n for (i = 0; i < len; i += 1) {\n if (assets[i].xt) {\n var comp = this.createComp(assets[i], floatingContainer, this.globalData.comp, null);\n comp.initExpressions();\n this.globalData.projectInterface.registerComposition(comp);\n }\n }\n };\n\n function HCompElement(data, globalData, comp) {\n this.layers = data.layers;\n this.supports3d = !data.hasMask;\n this.completeLayers = false;\n this.pendingElements = [];\n this.elements = this.layers ? createSizedArray(this.layers.length) : [];\n this.initElement(data, globalData, comp);\n this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {\n _placeholder: true\n };\n }\n\n extendPrototype([HybridRendererBase, ICompElement, HBaseElement], HCompElement);\n HCompElement.prototype._createBaseContainerElements = HCompElement.prototype.createContainerElements;\n\n HCompElement.prototype.createContainerElements = function () {\n this._createBaseContainerElements(); // divElement.style.clip = 'rect(0px, '+this.data.w+'px, '+this.data.h+'px, 0px)';\n\n\n if (this.data.hasMask) {\n this.svgElement.setAttribute('width', this.data.w);\n this.svgElement.setAttribute('height', this.data.h);\n this.transformedElement = this.baseElement;\n } else {\n this.transformedElement = this.layerElement;\n }\n };\n\n HCompElement.prototype.addTo3dContainer = function (elem, pos) {\n var j = 0;\n var nextElement;\n\n while (j < pos) {\n if (this.elements[j] && this.elements[j].getBaseElement) {\n nextElement = this.elements[j].getBaseElement();\n }\n\n j += 1;\n }\n\n if (nextElement) {\n this.layerElement.insertBefore(elem, nextElement);\n } else {\n this.layerElement.appendChild(elem);\n }\n };\n\n HCompElement.prototype.createComp = function (data) {\n if (!this.supports3d) {\n return new SVGCompElement(data, this.globalData, this);\n }\n\n return new HCompElement(data, this.globalData, this);\n };\n\n function HybridRenderer(animationItem, config) {\n this.animationItem = animationItem;\n this.layers = null;\n this.renderedFrame = -1;\n this.renderConfig = {\n className: config && config.className || '',\n imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',\n hideOnTransparent: !(config && config.hideOnTransparent === false),\n filterSize: {\n width: config && config.filterSize && config.filterSize.width || '400%',\n height: config && config.filterSize && config.filterSize.height || '400%',\n x: config && config.filterSize && config.filterSize.x || '-100%',\n y: config && config.filterSize && config.filterSize.y || '-100%'\n },\n runExpressions: !config || config.runExpressions === undefined || config.runExpressions\n };\n this.globalData = {\n _mdf: false,\n frameNum: -1,\n renderConfig: this.renderConfig\n };\n this.pendingElements = [];\n this.elements = [];\n this.threeDElements = [];\n this.destroyed = false;\n this.camera = null;\n this.supports3d = true;\n this.rendererType = 'html';\n }\n\n extendPrototype([HybridRendererBase], HybridRenderer);\n\n HybridRenderer.prototype.createComp = function (data) {\n if (!this.supports3d) {\n return new SVGCompElement(data, this.globalData, this);\n }\n\n return new HCompElement(data, this.globalData, this);\n };\n\n var CompExpressionInterface = function () {\n return function (comp) {\n function _thisLayerFunction(name) {\n var i = 0;\n var len = comp.layers.length;\n\n while (i < len) {\n if (comp.layers[i].nm === name || comp.layers[i].ind === name) {\n return comp.elements[i].layerInterface;\n }\n\n i += 1;\n }\n\n return null; // return {active:false};\n }\n\n Object.defineProperty(_thisLayerFunction, '_name', {\n value: comp.data.nm\n });\n _thisLayerFunction.layer = _thisLayerFunction;\n _thisLayerFunction.pixelAspect = 1;\n _thisLayerFunction.height = comp.data.h || comp.globalData.compSize.h;\n _thisLayerFunction.width = comp.data.w || comp.globalData.compSize.w;\n _thisLayerFunction.pixelAspect = 1;\n _thisLayerFunction.frameDuration = 1 / comp.globalData.frameRate;\n _thisLayerFunction.displayStartTime = 0;\n _thisLayerFunction.numLayers = comp.layers.length;\n return _thisLayerFunction;\n };\n }();\n\n function _typeof$2(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$2 = function _typeof(obj) { return typeof obj; }; } else { _typeof$2 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$2(obj); }\n\n /* eslint-disable */\n\n /*\r\n Copyright 2014 David Bau.\r\n\r\n Permission is hereby granted, free of charge, to any person obtaining\r\n a copy of this software and associated documentation files (the\r\n \"Software\"), to deal in the Software without restriction, including\r\n without limitation the rights to use, copy, modify, merge, publish,\r\n distribute, sublicense, and/or sell copies of the Software, and to\r\n permit persons to whom the Software is furnished to do so, subject to\r\n the following conditions:\r\n\r\n The above copyright notice and this permission notice shall be\r\n included in all copies or substantial portions of the Software.\r\n\r\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\r\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r\n IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r\n CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\n TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r\n SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n\r\n */\n function seedRandom(pool, math) {\n //\n // The following constants are related to IEEE 754 limits.\n //\n var global = this,\n width = 256,\n // each RC4 output is 0 <= x < 256\n chunks = 6,\n // at least six RC4 outputs for each double\n digits = 52,\n // there are 52 significant digits in a double\n rngname = 'random',\n // rngname: name for Math.random and Math.seedrandom\n startdenom = math.pow(width, chunks),\n significance = math.pow(2, digits),\n overflow = significance * 2,\n mask = width - 1,\n nodecrypto; // node.js crypto module, initialized at the bottom.\n //\n // seedrandom()\n // This is the seedrandom function described above.\n //\n\n function seedrandom(seed, options, callback) {\n var key = [];\n options = options === true ? {\n entropy: true\n } : options || {}; // Flatten the seed string or build one from local entropy if needed.\n\n var shortseed = mixkey(flatten(options.entropy ? [seed, tostring(pool)] : seed === null ? autoseed() : seed, 3), key); // Use the seed to initialize an ARC4 generator.\n\n var arc4 = new ARC4(key); // This function returns a random double in [0, 1) that contains\n // randomness in every bit of the mantissa of the IEEE 754 value.\n\n var prng = function prng() {\n var n = arc4.g(chunks),\n // Start with a numerator n < 2 ^ 48\n d = startdenom,\n // and denominator d = 2 ^ 48.\n x = 0; // and no 'extra last byte'.\n\n while (n < significance) {\n // Fill up all significant digits by\n n = (n + x) * width; // shifting numerator and\n\n d *= width; // denominator and generating a\n\n x = arc4.g(1); // new least-significant-byte.\n }\n\n while (n >= overflow) {\n // To avoid rounding up, before adding\n n /= 2; // last byte, shift everything\n\n d /= 2; // right using integer math until\n\n x >>>= 1; // we have exactly the desired bits.\n }\n\n return (n + x) / d; // Form the number within [0, 1).\n };\n\n prng.int32 = function () {\n return arc4.g(4) | 0;\n };\n\n prng.quick = function () {\n return arc4.g(4) / 0x100000000;\n };\n\n prng[\"double\"] = prng; // Mix the randomness into accumulated entropy.\n\n mixkey(tostring(arc4.S), pool); // Calling convention: what to return as a function of prng, seed, is_math.\n\n return (options.pass || callback || function (prng, seed, is_math_call, state) {\n if (state) {\n // Load the arc4 state from the given state if it has an S array.\n if (state.S) {\n copy(state, arc4);\n } // Only provide the .state method if requested via options.state.\n\n\n prng.state = function () {\n return copy(arc4, {});\n };\n } // If called as a method of Math (Math.seedrandom()), mutate\n // Math.random because that is how seedrandom.js has worked since v1.0.\n\n\n if (is_math_call) {\n math[rngname] = prng;\n return seed;\n } // Otherwise, it is a newer calling convention, so return the\n // prng directly.\n else return prng;\n })(prng, shortseed, 'global' in options ? options.global : this == math, options.state);\n }\n\n math['seed' + rngname] = seedrandom; //\n // ARC4\n //\n // An ARC4 implementation. The constructor takes a key in the form of\n // an array of at most (width) integers that should be 0 <= x < (width).\n //\n // The g(count) method returns a pseudorandom integer that concatenates\n // the next (count) outputs from ARC4. Its return value is a number x\n // that is in the range 0 <= x < (width ^ count).\n //\n\n function ARC4(key) {\n var t,\n keylen = key.length,\n me = this,\n i = 0,\n j = me.i = me.j = 0,\n s = me.S = []; // The empty key [] is treated as [0].\n\n if (!keylen) {\n key = [keylen++];\n } // Set up S using the standard key scheduling algorithm.\n\n\n while (i < width) {\n s[i] = i++;\n }\n\n for (i = 0; i < width; i++) {\n s[i] = s[j = mask & j + key[i % keylen] + (t = s[i])];\n s[j] = t;\n } // The \"g\" method returns the next (count) outputs as one number.\n\n\n me.g = function (count) {\n // Using instance members instead of closure state nearly doubles speed.\n var t,\n r = 0,\n i = me.i,\n j = me.j,\n s = me.S;\n\n while (count--) {\n t = s[i = mask & i + 1];\n r = r * width + s[mask & (s[i] = s[j = mask & j + t]) + (s[j] = t)];\n }\n\n me.i = i;\n me.j = j;\n return r; // For robust unpredictability, the function call below automatically\n // discards an initial batch of values. This is called RC4-drop[256].\n // See http://google.com/search?q=rsa+fluhrer+response&btnI\n };\n } //\n // copy()\n // Copies internal state of ARC4 to or from a plain object.\n //\n\n\n function copy(f, t) {\n t.i = f.i;\n t.j = f.j;\n t.S = f.S.slice();\n return t;\n } //\n // flatten()\n // Converts an object tree to nested arrays of strings.\n //\n\n\n function flatten(obj, depth) {\n var result = [],\n typ = _typeof$2(obj),\n prop;\n\n if (depth && typ == 'object') {\n for (prop in obj) {\n try {\n result.push(flatten(obj[prop], depth - 1));\n } catch (e) {}\n }\n }\n\n return result.length ? result : typ == 'string' ? obj : obj + '\\0';\n } //\n // mixkey()\n // Mixes a string seed into a key that is an array of integers, and\n // returns a shortened string seed that is equivalent to the result key.\n //\n\n\n function mixkey(seed, key) {\n var stringseed = seed + '',\n smear,\n j = 0;\n\n while (j < stringseed.length) {\n key[mask & j] = mask & (smear ^= key[mask & j] * 19) + stringseed.charCodeAt(j++);\n }\n\n return tostring(key);\n } //\n // autoseed()\n // Returns an object for autoseeding, using window.crypto and Node crypto\n // module if available.\n //\n\n\n function autoseed() {\n try {\n if (nodecrypto) {\n return tostring(nodecrypto.randomBytes(width));\n }\n\n var out = new Uint8Array(width);\n (global.crypto || global.msCrypto).getRandomValues(out);\n return tostring(out);\n } catch (e) {\n var browser = global.navigator,\n plugins = browser && browser.plugins;\n return [+new Date(), global, plugins, global.screen, tostring(pool)];\n }\n } //\n // tostring()\n // Converts an array of charcodes to a string\n //\n\n\n function tostring(a) {\n return String.fromCharCode.apply(0, a);\n } //\n // When seedrandom.js is loaded, we immediately mix a few bits\n // from the built-in RNG into the entropy pool. Because we do\n // not want to interfere with deterministic PRNG state later,\n // seedrandom will not call math.random on its own again after\n // initialization.\n //\n\n\n mixkey(math.random(), pool); //\n // Nodejs and AMD support: export the implementation as a module using\n // either convention.\n //\n // End anonymous scope, and pass initial values.\n }\n\n ;\n\n function initialize$2(BMMath) {\n seedRandom([], BMMath);\n }\n\n var propTypes = {\n SHAPE: 'shape'\n };\n\n function _typeof$1(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$1(obj); }\n\n var ExpressionManager = function () {\n 'use strict';\n\n var ob = {};\n var Math = BMMath;\n var window = null;\n var document = null;\n var XMLHttpRequest = null;\n var fetch = null;\n var frames = null;\n var _lottieGlobal = {};\n initialize$2(BMMath);\n\n function resetFrame() {\n _lottieGlobal = {};\n }\n\n function $bm_isInstanceOfArray(arr) {\n return arr.constructor === Array || arr.constructor === Float32Array;\n }\n\n function isNumerable(tOfV, v) {\n return tOfV === 'number' || v instanceof Number || tOfV === 'boolean' || tOfV === 'string';\n }\n\n function $bm_neg(a) {\n var tOfA = _typeof$1(a);\n\n if (tOfA === 'number' || a instanceof Number || tOfA === 'boolean') {\n return -a;\n }\n\n if ($bm_isInstanceOfArray(a)) {\n var i;\n var lenA = a.length;\n var retArr = [];\n\n for (i = 0; i < lenA; i += 1) {\n retArr[i] = -a[i];\n }\n\n return retArr;\n }\n\n if (a.propType) {\n return a.v;\n }\n\n return -a;\n }\n\n var easeInBez = BezierFactory.getBezierEasing(0.333, 0, 0.833, 0.833, 'easeIn').get;\n var easeOutBez = BezierFactory.getBezierEasing(0.167, 0.167, 0.667, 1, 'easeOut').get;\n var easeInOutBez = BezierFactory.getBezierEasing(0.33, 0, 0.667, 1, 'easeInOut').get;\n\n function sum(a, b) {\n var tOfA = _typeof$1(a);\n\n var tOfB = _typeof$1(b);\n\n if (isNumerable(tOfA, a) && isNumerable(tOfB, b) || tOfA === 'string' || tOfB === 'string') {\n return a + b;\n }\n\n if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {\n a = a.slice(0);\n a[0] += b;\n return a;\n }\n\n if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {\n b = b.slice(0);\n b[0] = a + b[0];\n return b;\n }\n\n if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {\n var i = 0;\n var lenA = a.length;\n var lenB = b.length;\n var retArr = [];\n\n while (i < lenA || i < lenB) {\n if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {\n retArr[i] = a[i] + b[i];\n } else {\n retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];\n }\n\n i += 1;\n }\n\n return retArr;\n }\n\n return 0;\n }\n\n var add = sum;\n\n function sub(a, b) {\n var tOfA = _typeof$1(a);\n\n var tOfB = _typeof$1(b);\n\n if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {\n if (tOfA === 'string') {\n a = parseInt(a, 10);\n }\n\n if (tOfB === 'string') {\n b = parseInt(b, 10);\n }\n\n return a - b;\n }\n\n if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {\n a = a.slice(0);\n a[0] -= b;\n return a;\n }\n\n if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {\n b = b.slice(0);\n b[0] = a - b[0];\n return b;\n }\n\n if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {\n var i = 0;\n var lenA = a.length;\n var lenB = b.length;\n var retArr = [];\n\n while (i < lenA || i < lenB) {\n if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {\n retArr[i] = a[i] - b[i];\n } else {\n retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];\n }\n\n i += 1;\n }\n\n return retArr;\n }\n\n return 0;\n }\n\n function mul(a, b) {\n var tOfA = _typeof$1(a);\n\n var tOfB = _typeof$1(b);\n\n var arr;\n\n if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {\n return a * b;\n }\n\n var i;\n var len;\n\n if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {\n len = a.length;\n arr = createTypedArray('float32', len);\n\n for (i = 0; i < len; i += 1) {\n arr[i] = a[i] * b;\n }\n\n return arr;\n }\n\n if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {\n len = b.length;\n arr = createTypedArray('float32', len);\n\n for (i = 0; i < len; i += 1) {\n arr[i] = a * b[i];\n }\n\n return arr;\n }\n\n return 0;\n }\n\n function div(a, b) {\n var tOfA = _typeof$1(a);\n\n var tOfB = _typeof$1(b);\n\n var arr;\n\n if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {\n return a / b;\n }\n\n var i;\n var len;\n\n if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {\n len = a.length;\n arr = createTypedArray('float32', len);\n\n for (i = 0; i < len; i += 1) {\n arr[i] = a[i] / b;\n }\n\n return arr;\n }\n\n if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {\n len = b.length;\n arr = createTypedArray('float32', len);\n\n for (i = 0; i < len; i += 1) {\n arr[i] = a / b[i];\n }\n\n return arr;\n }\n\n return 0;\n }\n\n function mod(a, b) {\n if (typeof a === 'string') {\n a = parseInt(a, 10);\n }\n\n if (typeof b === 'string') {\n b = parseInt(b, 10);\n }\n\n return a % b;\n }\n\n var $bm_sum = sum;\n var $bm_sub = sub;\n var $bm_mul = mul;\n var $bm_div = div;\n var $bm_mod = mod;\n\n function clamp(num, min, max) {\n if (min > max) {\n var mm = max;\n max = min;\n min = mm;\n }\n\n return Math.min(Math.max(num, min), max);\n }\n\n function radiansToDegrees(val) {\n return val / degToRads;\n }\n\n var radians_to_degrees = radiansToDegrees;\n\n function degreesToRadians(val) {\n return val * degToRads;\n }\n\n var degrees_to_radians = radiansToDegrees;\n var helperLengthArray = [0, 0, 0, 0, 0, 0];\n\n function length(arr1, arr2) {\n if (typeof arr1 === 'number' || arr1 instanceof Number) {\n arr2 = arr2 || 0;\n return Math.abs(arr1 - arr2);\n }\n\n if (!arr2) {\n arr2 = helperLengthArray;\n }\n\n var i;\n var len = Math.min(arr1.length, arr2.length);\n var addedLength = 0;\n\n for (i = 0; i < len; i += 1) {\n addedLength += Math.pow(arr2[i] - arr1[i], 2);\n }\n\n return Math.sqrt(addedLength);\n }\n\n function normalize(vec) {\n return div(vec, length(vec));\n }\n\n function rgbToHsl(val) {\n var r = val[0];\n var g = val[1];\n var b = val[2];\n var max = Math.max(r, g, b);\n var min = Math.min(r, g, b);\n var h;\n var s;\n var l = (max + min) / 2;\n\n if (max === min) {\n h = 0; // achromatic\n\n s = 0; // achromatic\n } else {\n var d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n\n case g:\n h = (b - r) / d + 2;\n break;\n\n case b:\n h = (r - g) / d + 4;\n break;\n\n default:\n break;\n }\n\n h /= 6;\n }\n\n return [h, s, l, val[3]];\n }\n\n function hue2rgb(p, q, t) {\n if (t < 0) t += 1;\n if (t > 1) t -= 1;\n if (t < 1 / 6) return p + (q - p) * 6 * t;\n if (t < 1 / 2) return q;\n if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n }\n\n function hslToRgb(val) {\n var h = val[0];\n var s = val[1];\n var l = val[2];\n var r;\n var g;\n var b;\n\n if (s === 0) {\n r = l; // achromatic\n\n b = l; // achromatic\n\n g = l; // achromatic\n } else {\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 1 / 3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1 / 3);\n }\n\n return [r, g, b, val[3]];\n }\n\n function linear(t, tMin, tMax, value1, value2) {\n if (value1 === undefined || value2 === undefined) {\n value1 = tMin;\n value2 = tMax;\n tMin = 0;\n tMax = 1;\n }\n\n if (tMax < tMin) {\n var _tMin = tMax;\n tMax = tMin;\n tMin = _tMin;\n }\n\n if (t <= tMin) {\n return value1;\n }\n\n if (t >= tMax) {\n return value2;\n }\n\n var perc = tMax === tMin ? 0 : (t - tMin) / (tMax - tMin);\n\n if (!value1.length) {\n return value1 + (value2 - value1) * perc;\n }\n\n var i;\n var len = value1.length;\n var arr = createTypedArray('float32', len);\n\n for (i = 0; i < len; i += 1) {\n arr[i] = value1[i] + (value2[i] - value1[i]) * perc;\n }\n\n return arr;\n }\n\n function random(min, max) {\n if (max === undefined) {\n if (min === undefined) {\n min = 0;\n max = 1;\n } else {\n max = min;\n min = undefined;\n }\n }\n\n if (max.length) {\n var i;\n var len = max.length;\n\n if (!min) {\n min = createTypedArray('float32', len);\n }\n\n var arr = createTypedArray('float32', len);\n var rnd = BMMath.random();\n\n for (i = 0; i < len; i += 1) {\n arr[i] = min[i] + rnd * (max[i] - min[i]);\n }\n\n return arr;\n }\n\n if (min === undefined) {\n min = 0;\n }\n\n var rndm = BMMath.random();\n return min + rndm * (max - min);\n }\n\n function createPath(points, inTangents, outTangents, closed) {\n var i;\n var len = points.length;\n var path = shapePool.newElement();\n path.setPathData(!!closed, len);\n var arrPlaceholder = [0, 0];\n var inVertexPoint;\n var outVertexPoint;\n\n for (i = 0; i < len; i += 1) {\n inVertexPoint = inTangents && inTangents[i] ? inTangents[i] : arrPlaceholder;\n outVertexPoint = outTangents && outTangents[i] ? outTangents[i] : arrPlaceholder;\n path.setTripleAt(points[i][0], points[i][1], outVertexPoint[0] + points[i][0], outVertexPoint[1] + points[i][1], inVertexPoint[0] + points[i][0], inVertexPoint[1] + points[i][1], i, true);\n }\n\n return path;\n }\n\n function initiateExpression(elem, data, property) {\n // Bail out if we don't want expressions\n function noOp(_value) {\n return _value;\n }\n\n if (!elem.globalData.renderConfig.runExpressions) {\n return noOp;\n }\n\n var val = data.x;\n var needsVelocity = /velocity(?![\\w\\d])/.test(val);\n\n var _needsRandom = val.indexOf('random') !== -1;\n\n var elemType = elem.data.ty;\n var transform;\n var $bm_transform;\n var content;\n var effect;\n var thisProperty = property;\n thisProperty.valueAtTime = thisProperty.getValueAtTime;\n Object.defineProperty(thisProperty, 'value', {\n get: function get() {\n return thisProperty.v;\n }\n });\n elem.comp.frameDuration = 1 / elem.comp.globalData.frameRate;\n elem.comp.displayStartTime = 0;\n var inPoint = elem.data.ip / elem.comp.globalData.frameRate;\n var outPoint = elem.data.op / elem.comp.globalData.frameRate;\n var width = elem.data.sw ? elem.data.sw : 0;\n var height = elem.data.sh ? elem.data.sh : 0;\n var name = elem.data.nm;\n var loopIn;\n var loop_in;\n var loopOut;\n var loop_out;\n var smooth;\n var toWorld;\n var fromWorld;\n var fromComp;\n var toComp;\n var fromCompToSurface;\n var position;\n var rotation;\n var anchorPoint;\n var scale;\n var thisLayer;\n var thisComp;\n var mask;\n var valueAtTime;\n var velocityAtTime;\n var scoped_bm_rt; // val = val.replace(/(\\\\?\"|')((http)(s)?(:\\/))?\\/.*?(\\\\?\"|')/g, \"\\\"\\\"\"); // deter potential network calls\n\n var expression_function = eval('[function _expression_function(){' + val + ';scoped_bm_rt=$bm_rt}]')[0]; // eslint-disable-line no-eval\n\n var numKeys = property.kf ? data.k.length : 0;\n var active = !this.data || this.data.hd !== true;\n\n var wiggle = function wiggle(freq, amp) {\n var iWiggle;\n var j;\n var lenWiggle = this.pv.length ? this.pv.length : 1;\n var addedAmps = createTypedArray('float32', lenWiggle);\n freq = 5;\n var iterations = Math.floor(time * freq);\n iWiggle = 0;\n j = 0;\n\n while (iWiggle < iterations) {\n // var rnd = BMMath.random();\n for (j = 0; j < lenWiggle; j += 1) {\n addedAmps[j] += -amp + amp * 2 * BMMath.random(); // addedAmps[j] += -amp + amp*2*rnd;\n }\n\n iWiggle += 1;\n } // var rnd2 = BMMath.random();\n\n\n var periods = time * freq;\n var perc = periods - Math.floor(periods);\n var arr = createTypedArray('float32', lenWiggle);\n\n if (lenWiggle > 1) {\n for (j = 0; j < lenWiggle; j += 1) {\n arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp * 2 * BMMath.random()) * perc; // arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp*2*rnd)*perc;\n // arr[i] = this.pv[i] + addedAmp + amp1*perc + amp2*(1-perc);\n }\n\n return arr;\n }\n\n return this.pv + addedAmps[0] + (-amp + amp * 2 * BMMath.random()) * perc;\n }.bind(this);\n\n if (thisProperty.loopIn) {\n loopIn = thisProperty.loopIn.bind(thisProperty);\n loop_in = loopIn;\n }\n\n if (thisProperty.loopOut) {\n loopOut = thisProperty.loopOut.bind(thisProperty);\n loop_out = loopOut;\n }\n\n if (thisProperty.smooth) {\n smooth = thisProperty.smooth.bind(thisProperty);\n }\n\n function loopInDuration(type, duration) {\n return loopIn(type, duration, true);\n }\n\n function loopOutDuration(type, duration) {\n return loopOut(type, duration, true);\n }\n\n if (this.getValueAtTime) {\n valueAtTime = this.getValueAtTime.bind(this);\n }\n\n if (this.getVelocityAtTime) {\n velocityAtTime = this.getVelocityAtTime.bind(this);\n }\n\n var comp = elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);\n\n function lookAt(elem1, elem2) {\n var fVec = [elem2[0] - elem1[0], elem2[1] - elem1[1], elem2[2] - elem1[2]];\n var pitch = Math.atan2(fVec[0], Math.sqrt(fVec[1] * fVec[1] + fVec[2] * fVec[2])) / degToRads;\n var yaw = -Math.atan2(fVec[1], fVec[2]) / degToRads;\n return [yaw, pitch, 0];\n }\n\n function easeOut(t, tMin, tMax, val1, val2) {\n return applyEase(easeOutBez, t, tMin, tMax, val1, val2);\n }\n\n function easeIn(t, tMin, tMax, val1, val2) {\n return applyEase(easeInBez, t, tMin, tMax, val1, val2);\n }\n\n function ease(t, tMin, tMax, val1, val2) {\n return applyEase(easeInOutBez, t, tMin, tMax, val1, val2);\n }\n\n function applyEase(fn, t, tMin, tMax, val1, val2) {\n if (val1 === undefined) {\n val1 = tMin;\n val2 = tMax;\n } else {\n t = (t - tMin) / (tMax - tMin);\n }\n\n if (t > 1) {\n t = 1;\n } else if (t < 0) {\n t = 0;\n }\n\n var mult = fn(t);\n\n if ($bm_isInstanceOfArray(val1)) {\n var iKey;\n var lenKey = val1.length;\n var arr = createTypedArray('float32', lenKey);\n\n for (iKey = 0; iKey < lenKey; iKey += 1) {\n arr[iKey] = (val2[iKey] - val1[iKey]) * mult + val1[iKey];\n }\n\n return arr;\n }\n\n return (val2 - val1) * mult + val1;\n }\n\n function nearestKey(time) {\n var iKey;\n var lenKey = data.k.length;\n var index;\n var keyTime;\n\n if (!data.k.length || typeof data.k[0] === 'number') {\n index = 0;\n keyTime = 0;\n } else {\n index = -1;\n time *= elem.comp.globalData.frameRate;\n\n if (time < data.k[0].t) {\n index = 1;\n keyTime = data.k[0].t;\n } else {\n for (iKey = 0; iKey < lenKey - 1; iKey += 1) {\n if (time === data.k[iKey].t) {\n index = iKey + 1;\n keyTime = data.k[iKey].t;\n break;\n } else if (time > data.k[iKey].t && time < data.k[iKey + 1].t) {\n if (time - data.k[iKey].t > data.k[iKey + 1].t - time) {\n index = iKey + 2;\n keyTime = data.k[iKey + 1].t;\n } else {\n index = iKey + 1;\n keyTime = data.k[iKey].t;\n }\n\n break;\n }\n }\n\n if (index === -1) {\n index = iKey + 1;\n keyTime = data.k[iKey].t;\n }\n }\n }\n\n var obKey = {};\n obKey.index = index;\n obKey.time = keyTime / elem.comp.globalData.frameRate;\n return obKey;\n }\n\n function key(ind) {\n var obKey;\n var iKey;\n var lenKey;\n\n if (!data.k.length || typeof data.k[0] === 'number') {\n throw new Error('The property has no keyframe at index ' + ind);\n }\n\n ind -= 1;\n obKey = {\n time: data.k[ind].t / elem.comp.globalData.frameRate,\n value: []\n };\n var arr = Object.prototype.hasOwnProperty.call(data.k[ind], 's') ? data.k[ind].s : data.k[ind - 1].e;\n lenKey = arr.length;\n\n for (iKey = 0; iKey < lenKey; iKey += 1) {\n obKey[iKey] = arr[iKey];\n obKey.value[iKey] = arr[iKey];\n }\n\n return obKey;\n }\n\n function framesToTime(fr, fps) {\n if (!fps) {\n fps = elem.comp.globalData.frameRate;\n }\n\n return fr / fps;\n }\n\n function timeToFrames(t, fps) {\n if (!t && t !== 0) {\n t = time;\n }\n\n if (!fps) {\n fps = elem.comp.globalData.frameRate;\n }\n\n return t * fps;\n }\n\n function seedRandom(seed) {\n BMMath.seedrandom(randSeed + seed);\n }\n\n function sourceRectAtTime() {\n return elem.sourceRectAtTime();\n }\n\n function substring(init, end) {\n if (typeof value === 'string') {\n if (end === undefined) {\n return value.substring(init);\n }\n\n return value.substring(init, end);\n }\n\n return '';\n }\n\n function substr(init, end) {\n if (typeof value === 'string') {\n if (end === undefined) {\n return value.substr(init);\n }\n\n return value.substr(init, end);\n }\n\n return '';\n }\n\n function posterizeTime(framesPerSecond) {\n time = framesPerSecond === 0 ? 0 : Math.floor(time * framesPerSecond) / framesPerSecond;\n value = valueAtTime(time);\n }\n\n var time;\n var velocity;\n var value;\n var text;\n var textIndex;\n var textTotal;\n var selectorValue;\n var index = elem.data.ind;\n var hasParent = !!(elem.hierarchy && elem.hierarchy.length);\n var parent;\n var randSeed = Math.floor(Math.random() * 1000000);\n var globalData = elem.globalData;\n\n function executeExpression(_value) {\n // globalData.pushExpression();\n value = _value;\n\n if (this.frameExpressionId === elem.globalData.frameId && this.propType !== 'textSelector') {\n return value;\n }\n\n if (this.propType === 'textSelector') {\n textIndex = this.textIndex;\n textTotal = this.textTotal;\n selectorValue = this.selectorValue;\n }\n\n if (!thisLayer) {\n text = elem.layerInterface.text;\n thisLayer = elem.layerInterface;\n thisComp = elem.comp.compInterface;\n toWorld = thisLayer.toWorld.bind(thisLayer);\n fromWorld = thisLayer.fromWorld.bind(thisLayer);\n fromComp = thisLayer.fromComp.bind(thisLayer);\n toComp = thisLayer.toComp.bind(thisLayer);\n mask = thisLayer.mask ? thisLayer.mask.bind(thisLayer) : null;\n fromCompToSurface = fromComp;\n }\n\n if (!transform) {\n transform = elem.layerInterface('ADBE Transform Group');\n $bm_transform = transform;\n\n if (transform) {\n anchorPoint = transform.anchorPoint;\n /* position = transform.position;\r\n rotation = transform.rotation;\r\n scale = transform.scale; */\n }\n }\n\n if (elemType === 4 && !content) {\n content = thisLayer('ADBE Root Vectors Group');\n }\n\n if (!effect) {\n effect = thisLayer(4);\n }\n\n hasParent = !!(elem.hierarchy && elem.hierarchy.length);\n\n if (hasParent && !parent) {\n parent = elem.hierarchy[0].layerInterface;\n }\n\n time = this.comp.renderedFrame / this.comp.globalData.frameRate;\n\n if (_needsRandom) {\n seedRandom(randSeed + time);\n }\n\n if (needsVelocity) {\n velocity = velocityAtTime(time);\n }\n\n expression_function();\n this.frameExpressionId = elem.globalData.frameId; // TODO: Check if it's possible to return on ShapeInterface the .v value\n // Changed this to a ternary operation because Rollup failed compiling it correctly\n\n scoped_bm_rt = scoped_bm_rt.propType === propTypes.SHAPE ? scoped_bm_rt.v : scoped_bm_rt;\n return scoped_bm_rt;\n } // Bundlers will see these as dead code and unless we reference them\n\n\n executeExpression.__preventDeadCodeRemoval = [$bm_transform, anchorPoint, time, velocity, inPoint, outPoint, width, height, name, loop_in, loop_out, smooth, toComp, fromCompToSurface, toWorld, fromWorld, mask, position, rotation, scale, thisComp, numKeys, active, wiggle, loopInDuration, loopOutDuration, comp, lookAt, easeOut, easeIn, ease, nearestKey, key, text, textIndex, textTotal, selectorValue, framesToTime, timeToFrames, sourceRectAtTime, substring, substr, posterizeTime, index, globalData];\n return executeExpression;\n }\n\n ob.initiateExpression = initiateExpression;\n ob.__preventDeadCodeRemoval = [window, document, XMLHttpRequest, fetch, frames, $bm_neg, add, $bm_sum, $bm_sub, $bm_mul, $bm_div, $bm_mod, clamp, radians_to_degrees, degreesToRadians, degrees_to_radians, normalize, rgbToHsl, hslToRgb, linear, random, createPath, _lottieGlobal];\n ob.resetFrame = resetFrame;\n return ob;\n }();\n\n var Expressions = function () {\n var ob = {};\n ob.initExpressions = initExpressions;\n ob.resetFrame = ExpressionManager.resetFrame;\n\n function initExpressions(animation) {\n var stackCount = 0;\n var registers = [];\n\n function pushExpression() {\n stackCount += 1;\n }\n\n function popExpression() {\n stackCount -= 1;\n\n if (stackCount === 0) {\n releaseInstances();\n }\n }\n\n function registerExpressionProperty(expression) {\n if (registers.indexOf(expression) === -1) {\n registers.push(expression);\n }\n }\n\n function releaseInstances() {\n var i;\n var len = registers.length;\n\n for (i = 0; i < len; i += 1) {\n registers[i].release();\n }\n\n registers.length = 0;\n }\n\n animation.renderer.compInterface = CompExpressionInterface(animation.renderer);\n animation.renderer.globalData.projectInterface.registerComposition(animation.renderer);\n animation.renderer.globalData.pushExpression = pushExpression;\n animation.renderer.globalData.popExpression = popExpression;\n animation.renderer.globalData.registerExpressionProperty = registerExpressionProperty;\n }\n\n return ob;\n }();\n\n var MaskManagerInterface = function () {\n function MaskInterface(mask, data) {\n this._mask = mask;\n this._data = data;\n }\n\n Object.defineProperty(MaskInterface.prototype, 'maskPath', {\n get: function get() {\n if (this._mask.prop.k) {\n this._mask.prop.getValue();\n }\n\n return this._mask.prop;\n }\n });\n Object.defineProperty(MaskInterface.prototype, 'maskOpacity', {\n get: function get() {\n if (this._mask.op.k) {\n this._mask.op.getValue();\n }\n\n return this._mask.op.v * 100;\n }\n });\n\n var MaskManager = function MaskManager(maskManager) {\n var _masksInterfaces = createSizedArray(maskManager.viewData.length);\n\n var i;\n var len = maskManager.viewData.length;\n\n for (i = 0; i < len; i += 1) {\n _masksInterfaces[i] = new MaskInterface(maskManager.viewData[i], maskManager.masksProperties[i]);\n }\n\n var maskFunction = function maskFunction(name) {\n i = 0;\n\n while (i < len) {\n if (maskManager.masksProperties[i].nm === name) {\n return _masksInterfaces[i];\n }\n\n i += 1;\n }\n\n return null;\n };\n\n return maskFunction;\n };\n\n return MaskManager;\n }();\n\n var ExpressionPropertyInterface = function () {\n var defaultUnidimensionalValue = {\n pv: 0,\n v: 0,\n mult: 1\n };\n var defaultMultidimensionalValue = {\n pv: [0, 0, 0],\n v: [0, 0, 0],\n mult: 1\n };\n\n function completeProperty(expressionValue, property, type) {\n Object.defineProperty(expressionValue, 'velocity', {\n get: function get() {\n return property.getVelocityAtTime(property.comp.currentFrame);\n }\n });\n expressionValue.numKeys = property.keyframes ? property.keyframes.length : 0;\n\n expressionValue.key = function (pos) {\n if (!expressionValue.numKeys) {\n return 0;\n }\n\n var value = '';\n\n if ('s' in property.keyframes[pos - 1]) {\n value = property.keyframes[pos - 1].s;\n } else if ('e' in property.keyframes[pos - 2]) {\n value = property.keyframes[pos - 2].e;\n } else {\n value = property.keyframes[pos - 2].s;\n }\n\n var valueProp = type === 'unidimensional' ? new Number(value) : Object.assign({}, value); // eslint-disable-line no-new-wrappers\n\n valueProp.time = property.keyframes[pos - 1].t / property.elem.comp.globalData.frameRate;\n valueProp.value = type === 'unidimensional' ? value[0] : value;\n return valueProp;\n };\n\n expressionValue.valueAtTime = property.getValueAtTime;\n expressionValue.speedAtTime = property.getSpeedAtTime;\n expressionValue.velocityAtTime = property.getVelocityAtTime;\n expressionValue.propertyGroup = property.propertyGroup;\n }\n\n function UnidimensionalPropertyInterface(property) {\n if (!property || !('pv' in property)) {\n property = defaultUnidimensionalValue;\n }\n\n var mult = 1 / property.mult;\n var val = property.pv * mult;\n var expressionValue = new Number(val); // eslint-disable-line no-new-wrappers\n\n expressionValue.value = val;\n completeProperty(expressionValue, property, 'unidimensional');\n return function () {\n if (property.k) {\n property.getValue();\n }\n\n val = property.v * mult;\n\n if (expressionValue.value !== val) {\n expressionValue = new Number(val); // eslint-disable-line no-new-wrappers\n\n expressionValue.value = val;\n completeProperty(expressionValue, property, 'unidimensional');\n }\n\n return expressionValue;\n };\n }\n\n function MultidimensionalPropertyInterface(property) {\n if (!property || !('pv' in property)) {\n property = defaultMultidimensionalValue;\n }\n\n var mult = 1 / property.mult;\n var len = property.data && property.data.l || property.pv.length;\n var expressionValue = createTypedArray('float32', len);\n var arrValue = createTypedArray('float32', len);\n expressionValue.value = arrValue;\n completeProperty(expressionValue, property, 'multidimensional');\n return function () {\n if (property.k) {\n property.getValue();\n }\n\n for (var i = 0; i < len; i += 1) {\n arrValue[i] = property.v[i] * mult;\n expressionValue[i] = arrValue[i];\n }\n\n return expressionValue;\n };\n } // TODO: try to avoid using this getter\n\n\n function defaultGetter() {\n return defaultUnidimensionalValue;\n }\n\n return function (property) {\n if (!property) {\n return defaultGetter;\n }\n\n if (property.propType === 'unidimensional') {\n return UnidimensionalPropertyInterface(property);\n }\n\n return MultidimensionalPropertyInterface(property);\n };\n }();\n\n var TransformExpressionInterface = function () {\n return function (transform) {\n function _thisFunction(name) {\n switch (name) {\n case 'scale':\n case 'Scale':\n case 'ADBE Scale':\n case 6:\n return _thisFunction.scale;\n\n case 'rotation':\n case 'Rotation':\n case 'ADBE Rotation':\n case 'ADBE Rotate Z':\n case 10:\n return _thisFunction.rotation;\n\n case 'ADBE Rotate X':\n return _thisFunction.xRotation;\n\n case 'ADBE Rotate Y':\n return _thisFunction.yRotation;\n\n case 'position':\n case 'Position':\n case 'ADBE Position':\n case 2:\n return _thisFunction.position;\n\n case 'ADBE Position_0':\n return _thisFunction.xPosition;\n\n case 'ADBE Position_1':\n return _thisFunction.yPosition;\n\n case 'ADBE Position_2':\n return _thisFunction.zPosition;\n\n case 'anchorPoint':\n case 'AnchorPoint':\n case 'Anchor Point':\n case 'ADBE AnchorPoint':\n case 1:\n return _thisFunction.anchorPoint;\n\n case 'opacity':\n case 'Opacity':\n case 11:\n return _thisFunction.opacity;\n\n default:\n return null;\n }\n }\n\n Object.defineProperty(_thisFunction, 'rotation', {\n get: ExpressionPropertyInterface(transform.r || transform.rz)\n });\n Object.defineProperty(_thisFunction, 'zRotation', {\n get: ExpressionPropertyInterface(transform.rz || transform.r)\n });\n Object.defineProperty(_thisFunction, 'xRotation', {\n get: ExpressionPropertyInterface(transform.rx)\n });\n Object.defineProperty(_thisFunction, 'yRotation', {\n get: ExpressionPropertyInterface(transform.ry)\n });\n Object.defineProperty(_thisFunction, 'scale', {\n get: ExpressionPropertyInterface(transform.s)\n });\n\n var _px;\n\n var _py;\n\n var _pz;\n\n var _transformFactory;\n\n if (transform.p) {\n _transformFactory = ExpressionPropertyInterface(transform.p);\n } else {\n _px = ExpressionPropertyInterface(transform.px);\n _py = ExpressionPropertyInterface(transform.py);\n\n if (transform.pz) {\n _pz = ExpressionPropertyInterface(transform.pz);\n }\n }\n\n Object.defineProperty(_thisFunction, 'position', {\n get: function get() {\n if (transform.p) {\n return _transformFactory();\n }\n\n return [_px(), _py(), _pz ? _pz() : 0];\n }\n });\n Object.defineProperty(_thisFunction, 'xPosition', {\n get: ExpressionPropertyInterface(transform.px)\n });\n Object.defineProperty(_thisFunction, 'yPosition', {\n get: ExpressionPropertyInterface(transform.py)\n });\n Object.defineProperty(_thisFunction, 'zPosition', {\n get: ExpressionPropertyInterface(transform.pz)\n });\n Object.defineProperty(_thisFunction, 'anchorPoint', {\n get: ExpressionPropertyInterface(transform.a)\n });\n Object.defineProperty(_thisFunction, 'opacity', {\n get: ExpressionPropertyInterface(transform.o)\n });\n Object.defineProperty(_thisFunction, 'skew', {\n get: ExpressionPropertyInterface(transform.sk)\n });\n Object.defineProperty(_thisFunction, 'skewAxis', {\n get: ExpressionPropertyInterface(transform.sa)\n });\n Object.defineProperty(_thisFunction, 'orientation', {\n get: ExpressionPropertyInterface(transform.or)\n });\n return _thisFunction;\n };\n }();\n\n var LayerExpressionInterface = function () {\n function getMatrix(time) {\n var toWorldMat = new Matrix();\n\n if (time !== undefined) {\n var propMatrix = this._elem.finalTransform.mProp.getValueAtTime(time);\n\n propMatrix.clone(toWorldMat);\n } else {\n var transformMat = this._elem.finalTransform.mProp;\n transformMat.applyToMatrix(toWorldMat);\n }\n\n return toWorldMat;\n }\n\n function toWorldVec(arr, time) {\n var toWorldMat = this.getMatrix(time);\n toWorldMat.props[12] = 0;\n toWorldMat.props[13] = 0;\n toWorldMat.props[14] = 0;\n return this.applyPoint(toWorldMat, arr);\n }\n\n function toWorld(arr, time) {\n var toWorldMat = this.getMatrix(time);\n return this.applyPoint(toWorldMat, arr);\n }\n\n function fromWorldVec(arr, time) {\n var toWorldMat = this.getMatrix(time);\n toWorldMat.props[12] = 0;\n toWorldMat.props[13] = 0;\n toWorldMat.props[14] = 0;\n return this.invertPoint(toWorldMat, arr);\n }\n\n function fromWorld(arr, time) {\n var toWorldMat = this.getMatrix(time);\n return this.invertPoint(toWorldMat, arr);\n }\n\n function applyPoint(matrix, arr) {\n if (this._elem.hierarchy && this._elem.hierarchy.length) {\n var i;\n var len = this._elem.hierarchy.length;\n\n for (i = 0; i < len; i += 1) {\n this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);\n }\n }\n\n return matrix.applyToPointArray(arr[0], arr[1], arr[2] || 0);\n }\n\n function invertPoint(matrix, arr) {\n if (this._elem.hierarchy && this._elem.hierarchy.length) {\n var i;\n var len = this._elem.hierarchy.length;\n\n for (i = 0; i < len; i += 1) {\n this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);\n }\n }\n\n return matrix.inversePoint(arr);\n }\n\n function fromComp(arr) {\n var toWorldMat = new Matrix();\n toWorldMat.reset();\n\n this._elem.finalTransform.mProp.applyToMatrix(toWorldMat);\n\n if (this._elem.hierarchy && this._elem.hierarchy.length) {\n var i;\n var len = this._elem.hierarchy.length;\n\n for (i = 0; i < len; i += 1) {\n this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(toWorldMat);\n }\n\n return toWorldMat.inversePoint(arr);\n }\n\n return toWorldMat.inversePoint(arr);\n }\n\n function sampleImage() {\n return [1, 1, 1, 1];\n }\n\n return function (elem) {\n var transformInterface;\n\n function _registerMaskInterface(maskManager) {\n _thisLayerFunction.mask = new MaskManagerInterface(maskManager, elem);\n }\n\n function _registerEffectsInterface(effects) {\n _thisLayerFunction.effect = effects;\n }\n\n function _thisLayerFunction(name) {\n switch (name) {\n case 'ADBE Root Vectors Group':\n case 'Contents':\n case 2:\n return _thisLayerFunction.shapeInterface;\n\n case 1:\n case 6:\n case 'Transform':\n case 'transform':\n case 'ADBE Transform Group':\n return transformInterface;\n\n case 4:\n case 'ADBE Effect Parade':\n case 'effects':\n case 'Effects':\n return _thisLayerFunction.effect;\n\n case 'ADBE Text Properties':\n return _thisLayerFunction.textInterface;\n\n default:\n return null;\n }\n }\n\n _thisLayerFunction.getMatrix = getMatrix;\n _thisLayerFunction.invertPoint = invertPoint;\n _thisLayerFunction.applyPoint = applyPoint;\n _thisLayerFunction.toWorld = toWorld;\n _thisLayerFunction.toWorldVec = toWorldVec;\n _thisLayerFunction.fromWorld = fromWorld;\n _thisLayerFunction.fromWorldVec = fromWorldVec;\n _thisLayerFunction.toComp = toWorld;\n _thisLayerFunction.fromComp = fromComp;\n _thisLayerFunction.sampleImage = sampleImage;\n _thisLayerFunction.sourceRectAtTime = elem.sourceRectAtTime.bind(elem);\n _thisLayerFunction._elem = elem;\n transformInterface = TransformExpressionInterface(elem.finalTransform.mProp);\n var anchorPointDescriptor = getDescriptor(transformInterface, 'anchorPoint');\n Object.defineProperties(_thisLayerFunction, {\n hasParent: {\n get: function get() {\n return elem.hierarchy.length;\n }\n },\n parent: {\n get: function get() {\n return elem.hierarchy[0].layerInterface;\n }\n },\n rotation: getDescriptor(transformInterface, 'rotation'),\n scale: getDescriptor(transformInterface, 'scale'),\n position: getDescriptor(transformInterface, 'position'),\n opacity: getDescriptor(transformInterface, 'opacity'),\n anchorPoint: anchorPointDescriptor,\n anchor_point: anchorPointDescriptor,\n transform: {\n get: function get() {\n return transformInterface;\n }\n },\n active: {\n get: function get() {\n return elem.isInRange;\n }\n }\n });\n _thisLayerFunction.startTime = elem.data.st;\n _thisLayerFunction.index = elem.data.ind;\n _thisLayerFunction.source = elem.data.refId;\n _thisLayerFunction.height = elem.data.ty === 0 ? elem.data.h : 100;\n _thisLayerFunction.width = elem.data.ty === 0 ? elem.data.w : 100;\n _thisLayerFunction.inPoint = elem.data.ip / elem.comp.globalData.frameRate;\n _thisLayerFunction.outPoint = elem.data.op / elem.comp.globalData.frameRate;\n _thisLayerFunction._name = elem.data.nm;\n _thisLayerFunction.registerMaskInterface = _registerMaskInterface;\n _thisLayerFunction.registerEffectsInterface = _registerEffectsInterface;\n return _thisLayerFunction;\n };\n }();\n\n var propertyGroupFactory = function () {\n return function (interfaceFunction, parentPropertyGroup) {\n return function (val) {\n val = val === undefined ? 1 : val;\n\n if (val <= 0) {\n return interfaceFunction;\n }\n\n return parentPropertyGroup(val - 1);\n };\n };\n }();\n\n var PropertyInterface = function () {\n return function (propertyName, propertyGroup) {\n var interfaceFunction = {\n _name: propertyName\n };\n\n function _propertyGroup(val) {\n val = val === undefined ? 1 : val;\n\n if (val <= 0) {\n return interfaceFunction;\n }\n\n return propertyGroup(val - 1);\n }\n\n return _propertyGroup;\n };\n }();\n\n var EffectsExpressionInterface = function () {\n var ob = {\n createEffectsInterface: createEffectsInterface\n };\n\n function createEffectsInterface(elem, propertyGroup) {\n if (elem.effectsManager) {\n var effectElements = [];\n var effectsData = elem.data.ef;\n var i;\n var len = elem.effectsManager.effectElements.length;\n\n for (i = 0; i < len; i += 1) {\n effectElements.push(createGroupInterface(effectsData[i], elem.effectsManager.effectElements[i], propertyGroup, elem));\n }\n\n var effects = elem.data.ef || [];\n\n var groupInterface = function groupInterface(name) {\n i = 0;\n len = effects.length;\n\n while (i < len) {\n if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {\n return effectElements[i];\n }\n\n i += 1;\n }\n\n return null;\n };\n\n Object.defineProperty(groupInterface, 'numProperties', {\n get: function get() {\n return effects.length;\n }\n });\n return groupInterface;\n }\n\n return null;\n }\n\n function createGroupInterface(data, elements, propertyGroup, elem) {\n function groupInterface(name) {\n var effects = data.ef;\n var i = 0;\n var len = effects.length;\n\n while (i < len) {\n if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {\n if (effects[i].ty === 5) {\n return effectElements[i];\n }\n\n return effectElements[i]();\n }\n\n i += 1;\n }\n\n throw new Error();\n }\n\n var _propertyGroup = propertyGroupFactory(groupInterface, propertyGroup);\n\n var effectElements = [];\n var i;\n var len = data.ef.length;\n\n for (i = 0; i < len; i += 1) {\n if (data.ef[i].ty === 5) {\n effectElements.push(createGroupInterface(data.ef[i], elements.effectElements[i], elements.effectElements[i].propertyGroup, elem));\n } else {\n effectElements.push(createValueInterface(elements.effectElements[i], data.ef[i].ty, elem, _propertyGroup));\n }\n }\n\n if (data.mn === 'ADBE Color Control') {\n Object.defineProperty(groupInterface, 'color', {\n get: function get() {\n return effectElements[0]();\n }\n });\n }\n\n Object.defineProperties(groupInterface, {\n numProperties: {\n get: function get() {\n return data.np;\n }\n },\n _name: {\n value: data.nm\n },\n propertyGroup: {\n value: _propertyGroup\n }\n });\n groupInterface.enabled = data.en !== 0;\n groupInterface.active = groupInterface.enabled;\n return groupInterface;\n }\n\n function createValueInterface(element, type, elem, propertyGroup) {\n var expressionProperty = ExpressionPropertyInterface(element.p);\n\n function interfaceFunction() {\n if (type === 10) {\n return elem.comp.compInterface(element.p.v);\n }\n\n return expressionProperty();\n }\n\n if (element.p.setGroupProperty) {\n element.p.setGroupProperty(PropertyInterface('', propertyGroup));\n }\n\n return interfaceFunction;\n }\n\n return ob;\n }();\n\n var ShapePathInterface = function () {\n return function pathInterfaceFactory(shape, view, propertyGroup) {\n var prop = view.sh;\n\n function interfaceFunction(val) {\n if (val === 'Shape' || val === 'shape' || val === 'Path' || val === 'path' || val === 'ADBE Vector Shape' || val === 2) {\n return interfaceFunction.path;\n }\n\n return null;\n }\n\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\n\n prop.setGroupProperty(PropertyInterface('Path', _propertyGroup));\n Object.defineProperties(interfaceFunction, {\n path: {\n get: function get() {\n if (prop.k) {\n prop.getValue();\n }\n\n return prop;\n }\n },\n shape: {\n get: function get() {\n if (prop.k) {\n prop.getValue();\n }\n\n return prop;\n }\n },\n _name: {\n value: shape.nm\n },\n ix: {\n value: shape.ix\n },\n propertyIndex: {\n value: shape.ix\n },\n mn: {\n value: shape.mn\n },\n propertyGroup: {\n value: propertyGroup\n }\n });\n return interfaceFunction;\n };\n }();\n\n var ShapeExpressionInterface = function () {\n function iterateElements(shapes, view, propertyGroup) {\n var arr = [];\n var i;\n var len = shapes ? shapes.length : 0;\n\n for (i = 0; i < len; i += 1) {\n if (shapes[i].ty === 'gr') {\n arr.push(groupInterfaceFactory(shapes[i], view[i], propertyGroup));\n } else if (shapes[i].ty === 'fl') {\n arr.push(fillInterfaceFactory(shapes[i], view[i], propertyGroup));\n } else if (shapes[i].ty === 'st') {\n arr.push(strokeInterfaceFactory(shapes[i], view[i], propertyGroup));\n } else if (shapes[i].ty === 'tm') {\n arr.push(trimInterfaceFactory(shapes[i], view[i], propertyGroup));\n } else if (shapes[i].ty === 'tr') {// arr.push(transformInterfaceFactory(shapes[i],view[i],propertyGroup));\n } else if (shapes[i].ty === 'el') {\n arr.push(ellipseInterfaceFactory(shapes[i], view[i], propertyGroup));\n } else if (shapes[i].ty === 'sr') {\n arr.push(starInterfaceFactory(shapes[i], view[i], propertyGroup));\n } else if (shapes[i].ty === 'sh') {\n arr.push(ShapePathInterface(shapes[i], view[i], propertyGroup));\n } else if (shapes[i].ty === 'rc') {\n arr.push(rectInterfaceFactory(shapes[i], view[i], propertyGroup));\n } else if (shapes[i].ty === 'rd') {\n arr.push(roundedInterfaceFactory(shapes[i], view[i], propertyGroup));\n } else if (shapes[i].ty === 'rp') {\n arr.push(repeaterInterfaceFactory(shapes[i], view[i], propertyGroup));\n } else if (shapes[i].ty === 'gf') {\n arr.push(gradientFillInterfaceFactory(shapes[i], view[i], propertyGroup));\n } else {\n arr.push(defaultInterfaceFactory(shapes[i], view[i], propertyGroup));\n }\n }\n\n return arr;\n }\n\n function contentsInterfaceFactory(shape, view, propertyGroup) {\n var interfaces;\n\n var interfaceFunction = function _interfaceFunction(value) {\n var i = 0;\n var len = interfaces.length;\n\n while (i < len) {\n if (interfaces[i]._name === value || interfaces[i].mn === value || interfaces[i].propertyIndex === value || interfaces[i].ix === value || interfaces[i].ind === value) {\n return interfaces[i];\n }\n\n i += 1;\n }\n\n if (typeof value === 'number') {\n return interfaces[value - 1];\n }\n\n return null;\n };\n\n interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\n interfaces = iterateElements(shape.it, view.it, interfaceFunction.propertyGroup);\n interfaceFunction.numProperties = interfaces.length;\n var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);\n interfaceFunction.transform = transformInterface;\n interfaceFunction.propertyIndex = shape.cix;\n interfaceFunction._name = shape.nm;\n return interfaceFunction;\n }\n\n function groupInterfaceFactory(shape, view, propertyGroup) {\n var interfaceFunction = function _interfaceFunction(value) {\n switch (value) {\n case 'ADBE Vectors Group':\n case 'Contents':\n case 2:\n return interfaceFunction.content;\n // Not necessary for now. Keeping them here in case a new case appears\n // case 'ADBE Vector Transform Group':\n // case 3:\n\n default:\n return interfaceFunction.transform;\n }\n };\n\n interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\n var content = contentsInterfaceFactory(shape, view, interfaceFunction.propertyGroup);\n var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);\n interfaceFunction.content = content;\n interfaceFunction.transform = transformInterface;\n Object.defineProperty(interfaceFunction, '_name', {\n get: function get() {\n return shape.nm;\n }\n }); // interfaceFunction.content = interfaceFunction;\n\n interfaceFunction.numProperties = shape.np;\n interfaceFunction.propertyIndex = shape.ix;\n interfaceFunction.nm = shape.nm;\n interfaceFunction.mn = shape.mn;\n return interfaceFunction;\n }\n\n function fillInterfaceFactory(shape, view, propertyGroup) {\n function interfaceFunction(val) {\n if (val === 'Color' || val === 'color') {\n return interfaceFunction.color;\n }\n\n if (val === 'Opacity' || val === 'opacity') {\n return interfaceFunction.opacity;\n }\n\n return null;\n }\n\n Object.defineProperties(interfaceFunction, {\n color: {\n get: ExpressionPropertyInterface(view.c)\n },\n opacity: {\n get: ExpressionPropertyInterface(view.o)\n },\n _name: {\n value: shape.nm\n },\n mn: {\n value: shape.mn\n }\n });\n view.c.setGroupProperty(PropertyInterface('Color', propertyGroup));\n view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));\n return interfaceFunction;\n }\n\n function gradientFillInterfaceFactory(shape, view, propertyGroup) {\n function interfaceFunction(val) {\n if (val === 'Start Point' || val === 'start point') {\n return interfaceFunction.startPoint;\n }\n\n if (val === 'End Point' || val === 'end point') {\n return interfaceFunction.endPoint;\n }\n\n if (val === 'Opacity' || val === 'opacity') {\n return interfaceFunction.opacity;\n }\n\n return null;\n }\n\n Object.defineProperties(interfaceFunction, {\n startPoint: {\n get: ExpressionPropertyInterface(view.s)\n },\n endPoint: {\n get: ExpressionPropertyInterface(view.e)\n },\n opacity: {\n get: ExpressionPropertyInterface(view.o)\n },\n type: {\n get: function get() {\n return 'a';\n }\n },\n _name: {\n value: shape.nm\n },\n mn: {\n value: shape.mn\n }\n });\n view.s.setGroupProperty(PropertyInterface('Start Point', propertyGroup));\n view.e.setGroupProperty(PropertyInterface('End Point', propertyGroup));\n view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));\n return interfaceFunction;\n }\n\n function defaultInterfaceFactory() {\n function interfaceFunction() {\n return null;\n }\n\n return interfaceFunction;\n }\n\n function strokeInterfaceFactory(shape, view, propertyGroup) {\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\n\n var _dashPropertyGroup = propertyGroupFactory(dashOb, _propertyGroup);\n\n function addPropertyToDashOb(i) {\n Object.defineProperty(dashOb, shape.d[i].nm, {\n get: ExpressionPropertyInterface(view.d.dataProps[i].p)\n });\n }\n\n var i;\n var len = shape.d ? shape.d.length : 0;\n var dashOb = {};\n\n for (i = 0; i < len; i += 1) {\n addPropertyToDashOb(i);\n view.d.dataProps[i].p.setGroupProperty(_dashPropertyGroup);\n }\n\n function interfaceFunction(val) {\n if (val === 'Color' || val === 'color') {\n return interfaceFunction.color;\n }\n\n if (val === 'Opacity' || val === 'opacity') {\n return interfaceFunction.opacity;\n }\n\n if (val === 'Stroke Width' || val === 'stroke width') {\n return interfaceFunction.strokeWidth;\n }\n\n return null;\n }\n\n Object.defineProperties(interfaceFunction, {\n color: {\n get: ExpressionPropertyInterface(view.c)\n },\n opacity: {\n get: ExpressionPropertyInterface(view.o)\n },\n strokeWidth: {\n get: ExpressionPropertyInterface(view.w)\n },\n dash: {\n get: function get() {\n return dashOb;\n }\n },\n _name: {\n value: shape.nm\n },\n mn: {\n value: shape.mn\n }\n });\n view.c.setGroupProperty(PropertyInterface('Color', _propertyGroup));\n view.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));\n view.w.setGroupProperty(PropertyInterface('Stroke Width', _propertyGroup));\n return interfaceFunction;\n }\n\n function trimInterfaceFactory(shape, view, propertyGroup) {\n function interfaceFunction(val) {\n if (val === shape.e.ix || val === 'End' || val === 'end') {\n return interfaceFunction.end;\n }\n\n if (val === shape.s.ix) {\n return interfaceFunction.start;\n }\n\n if (val === shape.o.ix) {\n return interfaceFunction.offset;\n }\n\n return null;\n }\n\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\n\n interfaceFunction.propertyIndex = shape.ix;\n view.s.setGroupProperty(PropertyInterface('Start', _propertyGroup));\n view.e.setGroupProperty(PropertyInterface('End', _propertyGroup));\n view.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));\n interfaceFunction.propertyIndex = shape.ix;\n interfaceFunction.propertyGroup = propertyGroup;\n Object.defineProperties(interfaceFunction, {\n start: {\n get: ExpressionPropertyInterface(view.s)\n },\n end: {\n get: ExpressionPropertyInterface(view.e)\n },\n offset: {\n get: ExpressionPropertyInterface(view.o)\n },\n _name: {\n value: shape.nm\n }\n });\n interfaceFunction.mn = shape.mn;\n return interfaceFunction;\n }\n\n function transformInterfaceFactory(shape, view, propertyGroup) {\n function interfaceFunction(value) {\n if (shape.a.ix === value || value === 'Anchor Point') {\n return interfaceFunction.anchorPoint;\n }\n\n if (shape.o.ix === value || value === 'Opacity') {\n return interfaceFunction.opacity;\n }\n\n if (shape.p.ix === value || value === 'Position') {\n return interfaceFunction.position;\n }\n\n if (shape.r.ix === value || value === 'Rotation' || value === 'ADBE Vector Rotation') {\n return interfaceFunction.rotation;\n }\n\n if (shape.s.ix === value || value === 'Scale') {\n return interfaceFunction.scale;\n }\n\n if (shape.sk && shape.sk.ix === value || value === 'Skew') {\n return interfaceFunction.skew;\n }\n\n if (shape.sa && shape.sa.ix === value || value === 'Skew Axis') {\n return interfaceFunction.skewAxis;\n }\n\n return null;\n }\n\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\n\n view.transform.mProps.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));\n view.transform.mProps.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));\n view.transform.mProps.a.setGroupProperty(PropertyInterface('Anchor Point', _propertyGroup));\n view.transform.mProps.s.setGroupProperty(PropertyInterface('Scale', _propertyGroup));\n view.transform.mProps.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));\n\n if (view.transform.mProps.sk) {\n view.transform.mProps.sk.setGroupProperty(PropertyInterface('Skew', _propertyGroup));\n view.transform.mProps.sa.setGroupProperty(PropertyInterface('Skew Angle', _propertyGroup));\n }\n\n view.transform.op.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));\n Object.defineProperties(interfaceFunction, {\n opacity: {\n get: ExpressionPropertyInterface(view.transform.mProps.o)\n },\n position: {\n get: ExpressionPropertyInterface(view.transform.mProps.p)\n },\n anchorPoint: {\n get: ExpressionPropertyInterface(view.transform.mProps.a)\n },\n scale: {\n get: ExpressionPropertyInterface(view.transform.mProps.s)\n },\n rotation: {\n get: ExpressionPropertyInterface(view.transform.mProps.r)\n },\n skew: {\n get: ExpressionPropertyInterface(view.transform.mProps.sk)\n },\n skewAxis: {\n get: ExpressionPropertyInterface(view.transform.mProps.sa)\n },\n _name: {\n value: shape.nm\n }\n });\n interfaceFunction.ty = 'tr';\n interfaceFunction.mn = shape.mn;\n interfaceFunction.propertyGroup = propertyGroup;\n return interfaceFunction;\n }\n\n function ellipseInterfaceFactory(shape, view, propertyGroup) {\n function interfaceFunction(value) {\n if (shape.p.ix === value) {\n return interfaceFunction.position;\n }\n\n if (shape.s.ix === value) {\n return interfaceFunction.size;\n }\n\n return null;\n }\n\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\n\n interfaceFunction.propertyIndex = shape.ix;\n var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;\n prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));\n prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));\n Object.defineProperties(interfaceFunction, {\n size: {\n get: ExpressionPropertyInterface(prop.s)\n },\n position: {\n get: ExpressionPropertyInterface(prop.p)\n },\n _name: {\n value: shape.nm\n }\n });\n interfaceFunction.mn = shape.mn;\n return interfaceFunction;\n }\n\n function starInterfaceFactory(shape, view, propertyGroup) {\n function interfaceFunction(value) {\n if (shape.p.ix === value) {\n return interfaceFunction.position;\n }\n\n if (shape.r.ix === value) {\n return interfaceFunction.rotation;\n }\n\n if (shape.pt.ix === value) {\n return interfaceFunction.points;\n }\n\n if (shape.or.ix === value || value === 'ADBE Vector Star Outer Radius') {\n return interfaceFunction.outerRadius;\n }\n\n if (shape.os.ix === value) {\n return interfaceFunction.outerRoundness;\n }\n\n if (shape.ir && (shape.ir.ix === value || value === 'ADBE Vector Star Inner Radius')) {\n return interfaceFunction.innerRadius;\n }\n\n if (shape.is && shape.is.ix === value) {\n return interfaceFunction.innerRoundness;\n }\n\n return null;\n }\n\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\n\n var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;\n interfaceFunction.propertyIndex = shape.ix;\n prop.or.setGroupProperty(PropertyInterface('Outer Radius', _propertyGroup));\n prop.os.setGroupProperty(PropertyInterface('Outer Roundness', _propertyGroup));\n prop.pt.setGroupProperty(PropertyInterface('Points', _propertyGroup));\n prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));\n prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));\n\n if (shape.ir) {\n prop.ir.setGroupProperty(PropertyInterface('Inner Radius', _propertyGroup));\n prop.is.setGroupProperty(PropertyInterface('Inner Roundness', _propertyGroup));\n }\n\n Object.defineProperties(interfaceFunction, {\n position: {\n get: ExpressionPropertyInterface(prop.p)\n },\n rotation: {\n get: ExpressionPropertyInterface(prop.r)\n },\n points: {\n get: ExpressionPropertyInterface(prop.pt)\n },\n outerRadius: {\n get: ExpressionPropertyInterface(prop.or)\n },\n outerRoundness: {\n get: ExpressionPropertyInterface(prop.os)\n },\n innerRadius: {\n get: ExpressionPropertyInterface(prop.ir)\n },\n innerRoundness: {\n get: ExpressionPropertyInterface(prop.is)\n },\n _name: {\n value: shape.nm\n }\n });\n interfaceFunction.mn = shape.mn;\n return interfaceFunction;\n }\n\n function rectInterfaceFactory(shape, view, propertyGroup) {\n function interfaceFunction(value) {\n if (shape.p.ix === value) {\n return interfaceFunction.position;\n }\n\n if (shape.r.ix === value) {\n return interfaceFunction.roundness;\n }\n\n if (shape.s.ix === value || value === 'Size' || value === 'ADBE Vector Rect Size') {\n return interfaceFunction.size;\n }\n\n return null;\n }\n\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\n\n var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;\n interfaceFunction.propertyIndex = shape.ix;\n prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));\n prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));\n prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));\n Object.defineProperties(interfaceFunction, {\n position: {\n get: ExpressionPropertyInterface(prop.p)\n },\n roundness: {\n get: ExpressionPropertyInterface(prop.r)\n },\n size: {\n get: ExpressionPropertyInterface(prop.s)\n },\n _name: {\n value: shape.nm\n }\n });\n interfaceFunction.mn = shape.mn;\n return interfaceFunction;\n }\n\n function roundedInterfaceFactory(shape, view, propertyGroup) {\n function interfaceFunction(value) {\n if (shape.r.ix === value || value === 'Round Corners 1') {\n return interfaceFunction.radius;\n }\n\n return null;\n }\n\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\n\n var prop = view;\n interfaceFunction.propertyIndex = shape.ix;\n prop.rd.setGroupProperty(PropertyInterface('Radius', _propertyGroup));\n Object.defineProperties(interfaceFunction, {\n radius: {\n get: ExpressionPropertyInterface(prop.rd)\n },\n _name: {\n value: shape.nm\n }\n });\n interfaceFunction.mn = shape.mn;\n return interfaceFunction;\n }\n\n function repeaterInterfaceFactory(shape, view, propertyGroup) {\n function interfaceFunction(value) {\n if (shape.c.ix === value || value === 'Copies') {\n return interfaceFunction.copies;\n }\n\n if (shape.o.ix === value || value === 'Offset') {\n return interfaceFunction.offset;\n }\n\n return null;\n }\n\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\n\n var prop = view;\n interfaceFunction.propertyIndex = shape.ix;\n prop.c.setGroupProperty(PropertyInterface('Copies', _propertyGroup));\n prop.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));\n Object.defineProperties(interfaceFunction, {\n copies: {\n get: ExpressionPropertyInterface(prop.c)\n },\n offset: {\n get: ExpressionPropertyInterface(prop.o)\n },\n _name: {\n value: shape.nm\n }\n });\n interfaceFunction.mn = shape.mn;\n return interfaceFunction;\n }\n\n return function (shapes, view, propertyGroup) {\n var interfaces;\n\n function _interfaceFunction(value) {\n if (typeof value === 'number') {\n value = value === undefined ? 1 : value;\n\n if (value === 0) {\n return propertyGroup;\n }\n\n return interfaces[value - 1];\n }\n\n var i = 0;\n var len = interfaces.length;\n\n while (i < len) {\n if (interfaces[i]._name === value) {\n return interfaces[i];\n }\n\n i += 1;\n }\n\n return null;\n }\n\n function parentGroupWrapper() {\n return propertyGroup;\n }\n\n _interfaceFunction.propertyGroup = propertyGroupFactory(_interfaceFunction, parentGroupWrapper);\n interfaces = iterateElements(shapes, view, _interfaceFunction.propertyGroup);\n _interfaceFunction.numProperties = interfaces.length;\n _interfaceFunction._name = 'Contents';\n return _interfaceFunction;\n };\n }();\n\n var TextExpressionInterface = function () {\n return function (elem) {\n var _sourceText;\n\n function _thisLayerFunction(name) {\n switch (name) {\n case 'ADBE Text Document':\n return _thisLayerFunction.sourceText;\n\n default:\n return null;\n }\n }\n\n Object.defineProperty(_thisLayerFunction, 'sourceText', {\n get: function get() {\n elem.textProperty.getValue();\n var stringValue = elem.textProperty.currentData.t;\n\n if (!_sourceText || stringValue !== _sourceText.value) {\n _sourceText = new String(stringValue); // eslint-disable-line no-new-wrappers\n // If stringValue is an empty string, eval returns undefined, so it has to be returned as a String primitive\n\n _sourceText.value = stringValue || new String(stringValue); // eslint-disable-line no-new-wrappers\n\n Object.defineProperty(_sourceText, 'style', {\n get: function get() {\n return {\n fillColor: elem.textProperty.currentData.fc\n };\n }\n });\n }\n\n return _sourceText;\n }\n });\n return _thisLayerFunction;\n };\n }();\n\n function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n var FootageInterface = function () {\n var outlineInterfaceFactory = function outlineInterfaceFactory(elem) {\n var currentPropertyName = '';\n var currentProperty = elem.getFootageData();\n\n function init() {\n currentPropertyName = '';\n currentProperty = elem.getFootageData();\n return searchProperty;\n }\n\n function searchProperty(value) {\n if (currentProperty[value]) {\n currentPropertyName = value;\n currentProperty = currentProperty[value];\n\n if (_typeof(currentProperty) === 'object') {\n return searchProperty;\n }\n\n return currentProperty;\n }\n\n var propertyNameIndex = value.indexOf(currentPropertyName);\n\n if (propertyNameIndex !== -1) {\n var index = parseInt(value.substr(propertyNameIndex + currentPropertyName.length), 10);\n currentProperty = currentProperty[index];\n\n if (_typeof(currentProperty) === 'object') {\n return searchProperty;\n }\n\n return currentProperty;\n }\n\n return '';\n }\n\n return init;\n };\n\n var dataInterfaceFactory = function dataInterfaceFactory(elem) {\n function interfaceFunction(value) {\n if (value === 'Outline') {\n return interfaceFunction.outlineInterface();\n }\n\n return null;\n }\n\n interfaceFunction._name = 'Outline';\n interfaceFunction.outlineInterface = outlineInterfaceFactory(elem);\n return interfaceFunction;\n };\n\n return function (elem) {\n function _interfaceFunction(value) {\n if (value === 'Data') {\n return _interfaceFunction.dataInterface;\n }\n\n return null;\n }\n\n _interfaceFunction._name = 'Data';\n _interfaceFunction.dataInterface = dataInterfaceFactory(elem);\n return _interfaceFunction;\n };\n }();\n\n var interfaces = {\n layer: LayerExpressionInterface,\n effects: EffectsExpressionInterface,\n comp: CompExpressionInterface,\n shape: ShapeExpressionInterface,\n text: TextExpressionInterface,\n footage: FootageInterface\n };\n\n function getInterface(type) {\n return interfaces[type] || null;\n }\n\n var expressionHelpers = function () {\n function searchExpressions(elem, data, prop) {\n if (data.x) {\n prop.k = true;\n prop.x = true;\n prop.initiateExpression = ExpressionManager.initiateExpression;\n prop.effectsSequence.push(prop.initiateExpression(elem, data, prop).bind(prop));\n }\n }\n\n function getValueAtTime(frameNum) {\n frameNum *= this.elem.globalData.frameRate;\n frameNum -= this.offsetTime;\n\n if (frameNum !== this._cachingAtTime.lastFrame) {\n this._cachingAtTime.lastIndex = this._cachingAtTime.lastFrame < frameNum ? this._cachingAtTime.lastIndex : 0;\n this._cachingAtTime.value = this.interpolateValue(frameNum, this._cachingAtTime);\n this._cachingAtTime.lastFrame = frameNum;\n }\n\n return this._cachingAtTime.value;\n }\n\n function getSpeedAtTime(frameNum) {\n var delta = -0.01;\n var v1 = this.getValueAtTime(frameNum);\n var v2 = this.getValueAtTime(frameNum + delta);\n var speed = 0;\n\n if (v1.length) {\n var i;\n\n for (i = 0; i < v1.length; i += 1) {\n speed += Math.pow(v2[i] - v1[i], 2);\n }\n\n speed = Math.sqrt(speed) * 100;\n } else {\n speed = 0;\n }\n\n return speed;\n }\n\n function getVelocityAtTime(frameNum) {\n if (this.vel !== undefined) {\n return this.vel;\n }\n\n var delta = -0.001; // frameNum += this.elem.data.st;\n\n var v1 = this.getValueAtTime(frameNum);\n var v2 = this.getValueAtTime(frameNum + delta);\n var velocity;\n\n if (v1.length) {\n velocity = createTypedArray('float32', v1.length);\n var i;\n\n for (i = 0; i < v1.length; i += 1) {\n // removing frameRate\n // if needed, don't add it here\n // velocity[i] = this.elem.globalData.frameRate*((v2[i] - v1[i])/delta);\n velocity[i] = (v2[i] - v1[i]) / delta;\n }\n } else {\n velocity = (v2 - v1) / delta;\n }\n\n return velocity;\n }\n\n function getStaticValueAtTime() {\n return this.pv;\n }\n\n function setGroupProperty(propertyGroup) {\n this.propertyGroup = propertyGroup;\n }\n\n return {\n searchExpressions: searchExpressions,\n getSpeedAtTime: getSpeedAtTime,\n getVelocityAtTime: getVelocityAtTime,\n getValueAtTime: getValueAtTime,\n getStaticValueAtTime: getStaticValueAtTime,\n setGroupProperty: setGroupProperty\n };\n }();\n\n function addPropertyDecorator() {\n function loopOut(type, duration, durationFlag) {\n if (!this.k || !this.keyframes) {\n return this.pv;\n }\n\n type = type ? type.toLowerCase() : '';\n var currentFrame = this.comp.renderedFrame;\n var keyframes = this.keyframes;\n var lastKeyFrame = keyframes[keyframes.length - 1].t;\n\n if (currentFrame <= lastKeyFrame) {\n return this.pv;\n }\n\n var cycleDuration;\n var firstKeyFrame;\n\n if (!durationFlag) {\n if (!duration || duration > keyframes.length - 1) {\n duration = keyframes.length - 1;\n }\n\n firstKeyFrame = keyframes[keyframes.length - 1 - duration].t;\n cycleDuration = lastKeyFrame - firstKeyFrame;\n } else {\n if (!duration) {\n cycleDuration = Math.max(0, lastKeyFrame - this.elem.data.ip);\n } else {\n cycleDuration = Math.abs(lastKeyFrame - this.elem.comp.globalData.frameRate * duration);\n }\n\n firstKeyFrame = lastKeyFrame - cycleDuration;\n }\n\n var i;\n var len;\n var ret;\n\n if (type === 'pingpong') {\n var iterations = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);\n\n if (iterations % 2 !== 0) {\n return this.getValueAtTime((cycleDuration - (currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line\n }\n } else if (type === 'offset') {\n var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);\n var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);\n var current = this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line\n\n var repeats = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);\n\n if (this.pv.length) {\n ret = new Array(initV.length);\n len = ret.length;\n\n for (i = 0; i < len; i += 1) {\n ret[i] = (endV[i] - initV[i]) * repeats + current[i];\n }\n\n return ret;\n }\n\n return (endV - initV) * repeats + current;\n } else if (type === 'continue') {\n var lastValue = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);\n var nextLastValue = this.getValueAtTime((lastKeyFrame - 0.001) / this.comp.globalData.frameRate, 0);\n\n if (this.pv.length) {\n ret = new Array(lastValue.length);\n len = ret.length;\n\n for (i = 0; i < len; i += 1) {\n ret[i] = lastValue[i] + (lastValue[i] - nextLastValue[i]) * ((currentFrame - lastKeyFrame) / this.comp.globalData.frameRate) / 0.0005; // eslint-disable-line\n }\n\n return ret;\n }\n\n return lastValue + (lastValue - nextLastValue) * ((currentFrame - lastKeyFrame) / 0.001);\n }\n\n return this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line\n }\n\n function loopIn(type, duration, durationFlag) {\n if (!this.k) {\n return this.pv;\n }\n\n type = type ? type.toLowerCase() : '';\n var currentFrame = this.comp.renderedFrame;\n var keyframes = this.keyframes;\n var firstKeyFrame = keyframes[0].t;\n\n if (currentFrame >= firstKeyFrame) {\n return this.pv;\n }\n\n var cycleDuration;\n var lastKeyFrame;\n\n if (!durationFlag) {\n if (!duration || duration > keyframes.length - 1) {\n duration = keyframes.length - 1;\n }\n\n lastKeyFrame = keyframes[duration].t;\n cycleDuration = lastKeyFrame - firstKeyFrame;\n } else {\n if (!duration) {\n cycleDuration = Math.max(0, this.elem.data.op - firstKeyFrame);\n } else {\n cycleDuration = Math.abs(this.elem.comp.globalData.frameRate * duration);\n }\n\n lastKeyFrame = firstKeyFrame + cycleDuration;\n }\n\n var i;\n var len;\n var ret;\n\n if (type === 'pingpong') {\n var iterations = Math.floor((firstKeyFrame - currentFrame) / cycleDuration);\n\n if (iterations % 2 === 0) {\n return this.getValueAtTime(((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line\n }\n } else if (type === 'offset') {\n var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);\n var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);\n var current = this.getValueAtTime((cycleDuration - (firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0);\n var repeats = Math.floor((firstKeyFrame - currentFrame) / cycleDuration) + 1;\n\n if (this.pv.length) {\n ret = new Array(initV.length);\n len = ret.length;\n\n for (i = 0; i < len; i += 1) {\n ret[i] = current[i] - (endV[i] - initV[i]) * repeats;\n }\n\n return ret;\n }\n\n return current - (endV - initV) * repeats;\n } else if (type === 'continue') {\n var firstValue = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);\n var nextFirstValue = this.getValueAtTime((firstKeyFrame + 0.001) / this.comp.globalData.frameRate, 0);\n\n if (this.pv.length) {\n ret = new Array(firstValue.length);\n len = ret.length;\n\n for (i = 0; i < len; i += 1) {\n ret[i] = firstValue[i] + (firstValue[i] - nextFirstValue[i]) * (firstKeyFrame - currentFrame) / 0.001;\n }\n\n return ret;\n }\n\n return firstValue + (firstValue - nextFirstValue) * (firstKeyFrame - currentFrame) / 0.001;\n }\n\n return this.getValueAtTime((cycleDuration - ((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line\n }\n\n function smooth(width, samples) {\n if (!this.k) {\n return this.pv;\n }\n\n width = (width || 0.4) * 0.5;\n samples = Math.floor(samples || 5);\n\n if (samples <= 1) {\n return this.pv;\n }\n\n var currentTime = this.comp.renderedFrame / this.comp.globalData.frameRate;\n var initFrame = currentTime - width;\n var endFrame = currentTime + width;\n var sampleFrequency = samples > 1 ? (endFrame - initFrame) / (samples - 1) : 1;\n var i = 0;\n var j = 0;\n var value;\n\n if (this.pv.length) {\n value = createTypedArray('float32', this.pv.length);\n } else {\n value = 0;\n }\n\n var sampleValue;\n\n while (i < samples) {\n sampleValue = this.getValueAtTime(initFrame + i * sampleFrequency);\n\n if (this.pv.length) {\n for (j = 0; j < this.pv.length; j += 1) {\n value[j] += sampleValue[j];\n }\n } else {\n value += sampleValue;\n }\n\n i += 1;\n }\n\n if (this.pv.length) {\n for (j = 0; j < this.pv.length; j += 1) {\n value[j] /= samples;\n }\n } else {\n value /= samples;\n }\n\n return value;\n }\n\n function getTransformValueAtTime(time) {\n if (!this._transformCachingAtTime) {\n this._transformCachingAtTime = {\n v: new Matrix()\n };\n } /// /\n\n\n var matrix = this._transformCachingAtTime.v;\n matrix.cloneFromProps(this.pre.props);\n\n if (this.appliedTransformations < 1) {\n var anchor = this.a.getValueAtTime(time);\n matrix.translate(-anchor[0] * this.a.mult, -anchor[1] * this.a.mult, anchor[2] * this.a.mult);\n }\n\n if (this.appliedTransformations < 2) {\n var scale = this.s.getValueAtTime(time);\n matrix.scale(scale[0] * this.s.mult, scale[1] * this.s.mult, scale[2] * this.s.mult);\n }\n\n if (this.sk && this.appliedTransformations < 3) {\n var skew = this.sk.getValueAtTime(time);\n var skewAxis = this.sa.getValueAtTime(time);\n matrix.skewFromAxis(-skew * this.sk.mult, skewAxis * this.sa.mult);\n }\n\n if (this.r && this.appliedTransformations < 4) {\n var rotation = this.r.getValueAtTime(time);\n matrix.rotate(-rotation * this.r.mult);\n } else if (!this.r && this.appliedTransformations < 4) {\n var rotationZ = this.rz.getValueAtTime(time);\n var rotationY = this.ry.getValueAtTime(time);\n var rotationX = this.rx.getValueAtTime(time);\n var orientation = this.or.getValueAtTime(time);\n matrix.rotateZ(-rotationZ * this.rz.mult).rotateY(rotationY * this.ry.mult).rotateX(rotationX * this.rx.mult).rotateZ(-orientation[2] * this.or.mult).rotateY(orientation[1] * this.or.mult).rotateX(orientation[0] * this.or.mult);\n }\n\n if (this.data.p && this.data.p.s) {\n var positionX = this.px.getValueAtTime(time);\n var positionY = this.py.getValueAtTime(time);\n\n if (this.data.p.z) {\n var positionZ = this.pz.getValueAtTime(time);\n matrix.translate(positionX * this.px.mult, positionY * this.py.mult, -positionZ * this.pz.mult);\n } else {\n matrix.translate(positionX * this.px.mult, positionY * this.py.mult, 0);\n }\n } else {\n var position = this.p.getValueAtTime(time);\n matrix.translate(position[0] * this.p.mult, position[1] * this.p.mult, -position[2] * this.p.mult);\n }\n\n return matrix; /// /\n }\n\n function getTransformStaticValueAtTime() {\n return this.v.clone(new Matrix());\n }\n\n var getTransformProperty = TransformPropertyFactory.getTransformProperty;\n\n TransformPropertyFactory.getTransformProperty = function (elem, data, container) {\n var prop = getTransformProperty(elem, data, container);\n\n if (prop.dynamicProperties.length) {\n prop.getValueAtTime = getTransformValueAtTime.bind(prop);\n } else {\n prop.getValueAtTime = getTransformStaticValueAtTime.bind(prop);\n }\n\n prop.setGroupProperty = expressionHelpers.setGroupProperty;\n return prop;\n };\n\n var propertyGetProp = PropertyFactory.getProp;\n\n PropertyFactory.getProp = function (elem, data, type, mult, container) {\n var prop = propertyGetProp(elem, data, type, mult, container); // prop.getVelocityAtTime = getVelocityAtTime;\n // prop.loopOut = loopOut;\n // prop.loopIn = loopIn;\n\n if (prop.kf) {\n prop.getValueAtTime = expressionHelpers.getValueAtTime.bind(prop);\n } else {\n prop.getValueAtTime = expressionHelpers.getStaticValueAtTime.bind(prop);\n }\n\n prop.setGroupProperty = expressionHelpers.setGroupProperty;\n prop.loopOut = loopOut;\n prop.loopIn = loopIn;\n prop.smooth = smooth;\n prop.getVelocityAtTime = expressionHelpers.getVelocityAtTime.bind(prop);\n prop.getSpeedAtTime = expressionHelpers.getSpeedAtTime.bind(prop);\n prop.numKeys = data.a === 1 ? data.k.length : 0;\n prop.propertyIndex = data.ix;\n var value = 0;\n\n if (type !== 0) {\n value = createTypedArray('float32', data.a === 1 ? data.k[0].s.length : data.k.length);\n }\n\n prop._cachingAtTime = {\n lastFrame: initialDefaultFrame,\n lastIndex: 0,\n value: value\n };\n expressionHelpers.searchExpressions(elem, data, prop);\n\n if (prop.k) {\n container.addDynamicProperty(prop);\n }\n\n return prop;\n };\n\n function getShapeValueAtTime(frameNum) {\n // For now this caching object is created only when needed instead of creating it when the shape is initialized.\n if (!this._cachingAtTime) {\n this._cachingAtTime = {\n shapeValue: shapePool.clone(this.pv),\n lastIndex: 0,\n lastTime: initialDefaultFrame\n };\n }\n\n frameNum *= this.elem.globalData.frameRate;\n frameNum -= this.offsetTime;\n\n if (frameNum !== this._cachingAtTime.lastTime) {\n this._cachingAtTime.lastIndex = this._cachingAtTime.lastTime < frameNum ? this._caching.lastIndex : 0;\n this._cachingAtTime.lastTime = frameNum;\n this.interpolateShape(frameNum, this._cachingAtTime.shapeValue, this._cachingAtTime);\n }\n\n return this._cachingAtTime.shapeValue;\n }\n\n var ShapePropertyConstructorFunction = ShapePropertyFactory.getConstructorFunction();\n var KeyframedShapePropertyConstructorFunction = ShapePropertyFactory.getKeyframedConstructorFunction();\n\n function ShapeExpressions() {}\n\n ShapeExpressions.prototype = {\n vertices: function vertices(prop, time) {\n if (this.k) {\n this.getValue();\n }\n\n var shapePath = this.v;\n\n if (time !== undefined) {\n shapePath = this.getValueAtTime(time, 0);\n }\n\n var i;\n var len = shapePath._length;\n var vertices = shapePath[prop];\n var points = shapePath.v;\n var arr = createSizedArray(len);\n\n for (i = 0; i < len; i += 1) {\n if (prop === 'i' || prop === 'o') {\n arr[i] = [vertices[i][0] - points[i][0], vertices[i][1] - points[i][1]];\n } else {\n arr[i] = [vertices[i][0], vertices[i][1]];\n }\n }\n\n return arr;\n },\n points: function points(time) {\n return this.vertices('v', time);\n },\n inTangents: function inTangents(time) {\n return this.vertices('i', time);\n },\n outTangents: function outTangents(time) {\n return this.vertices('o', time);\n },\n isClosed: function isClosed() {\n return this.v.c;\n },\n pointOnPath: function pointOnPath(perc, time) {\n var shapePath = this.v;\n\n if (time !== undefined) {\n shapePath = this.getValueAtTime(time, 0);\n }\n\n if (!this._segmentsLength) {\n this._segmentsLength = bez.getSegmentsLength(shapePath);\n }\n\n var segmentsLength = this._segmentsLength;\n var lengths = segmentsLength.lengths;\n var lengthPos = segmentsLength.totalLength * perc;\n var i = 0;\n var len = lengths.length;\n var accumulatedLength = 0;\n var pt;\n\n while (i < len) {\n if (accumulatedLength + lengths[i].addedLength > lengthPos) {\n var initIndex = i;\n var endIndex = shapePath.c && i === len - 1 ? 0 : i + 1;\n var segmentPerc = (lengthPos - accumulatedLength) / lengths[i].addedLength;\n pt = bez.getPointInSegment(shapePath.v[initIndex], shapePath.v[endIndex], shapePath.o[initIndex], shapePath.i[endIndex], segmentPerc, lengths[i]);\n break;\n } else {\n accumulatedLength += lengths[i].addedLength;\n }\n\n i += 1;\n }\n\n if (!pt) {\n pt = shapePath.c ? [shapePath.v[0][0], shapePath.v[0][1]] : [shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1]];\n }\n\n return pt;\n },\n vectorOnPath: function vectorOnPath(perc, time, vectorType) {\n // perc doesn't use triple equality because it can be a Number object as well as a primitive.\n if (perc == 1) {\n // eslint-disable-line eqeqeq\n perc = this.v.c;\n } else if (perc == 0) {\n // eslint-disable-line eqeqeq\n perc = 0.999;\n }\n\n var pt1 = this.pointOnPath(perc, time);\n var pt2 = this.pointOnPath(perc + 0.001, time);\n var xLength = pt2[0] - pt1[0];\n var yLength = pt2[1] - pt1[1];\n var magnitude = Math.sqrt(Math.pow(xLength, 2) + Math.pow(yLength, 2));\n\n if (magnitude === 0) {\n return [0, 0];\n }\n\n var unitVector = vectorType === 'tangent' ? [xLength / magnitude, yLength / magnitude] : [-yLength / magnitude, xLength / magnitude];\n return unitVector;\n },\n tangentOnPath: function tangentOnPath(perc, time) {\n return this.vectorOnPath(perc, time, 'tangent');\n },\n normalOnPath: function normalOnPath(perc, time) {\n return this.vectorOnPath(perc, time, 'normal');\n },\n setGroupProperty: expressionHelpers.setGroupProperty,\n getValueAtTime: expressionHelpers.getStaticValueAtTime\n };\n extendPrototype([ShapeExpressions], ShapePropertyConstructorFunction);\n extendPrototype([ShapeExpressions], KeyframedShapePropertyConstructorFunction);\n KeyframedShapePropertyConstructorFunction.prototype.getValueAtTime = getShapeValueAtTime;\n KeyframedShapePropertyConstructorFunction.prototype.initiateExpression = ExpressionManager.initiateExpression;\n var propertyGetShapeProp = ShapePropertyFactory.getShapeProp;\n\n ShapePropertyFactory.getShapeProp = function (elem, data, type, arr, trims) {\n var prop = propertyGetShapeProp(elem, data, type, arr, trims);\n prop.propertyIndex = data.ix;\n prop.lock = false;\n\n if (type === 3) {\n expressionHelpers.searchExpressions(elem, data.pt, prop);\n } else if (type === 4) {\n expressionHelpers.searchExpressions(elem, data.ks, prop);\n }\n\n if (prop.k) {\n elem.addDynamicProperty(prop);\n }\n\n return prop;\n };\n }\n\n function initialize$1() {\n addPropertyDecorator();\n }\n\n function addDecorator() {\n function searchExpressions() {\n if (this.data.d.x) {\n this.calculateExpression = ExpressionManager.initiateExpression.bind(this)(this.elem, this.data.d, this);\n this.addEffect(this.getExpressionValue.bind(this));\n return true;\n }\n\n return null;\n }\n\n TextProperty.prototype.getExpressionValue = function (currentValue, text) {\n var newValue = this.calculateExpression(text);\n\n if (currentValue.t !== newValue) {\n var newData = {};\n this.copyData(newData, currentValue);\n newData.t = newValue.toString();\n newData.__complete = false;\n return newData;\n }\n\n return currentValue;\n };\n\n TextProperty.prototype.searchProperty = function () {\n var isKeyframed = this.searchKeyframes();\n var hasExpressions = this.searchExpressions();\n this.kf = isKeyframed || hasExpressions;\n return this.kf;\n };\n\n TextProperty.prototype.searchExpressions = searchExpressions;\n }\n\n function initialize() {\n addDecorator();\n }\n\n function SVGComposableEffect() {}\n\n SVGComposableEffect.prototype = {\n createMergeNode: function createMergeNode(resultId, ins) {\n var feMerge = createNS('feMerge');\n feMerge.setAttribute('result', resultId);\n var feMergeNode;\n var i;\n\n for (i = 0; i < ins.length; i += 1) {\n feMergeNode = createNS('feMergeNode');\n feMergeNode.setAttribute('in', ins[i]);\n feMerge.appendChild(feMergeNode);\n feMerge.appendChild(feMergeNode);\n }\n\n return feMerge;\n }\n };\n\n var linearFilterValue = '0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0';\n\n function SVGTintFilter(filter, filterManager, elem, id, source) {\n this.filterManager = filterManager;\n var feColorMatrix = createNS('feColorMatrix');\n feColorMatrix.setAttribute('type', 'matrix');\n feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');\n feColorMatrix.setAttribute('values', linearFilterValue + ' 1 0');\n this.linearFilter = feColorMatrix;\n feColorMatrix.setAttribute('result', id + '_tint_1');\n filter.appendChild(feColorMatrix);\n feColorMatrix = createNS('feColorMatrix');\n feColorMatrix.setAttribute('type', 'matrix');\n feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');\n feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');\n feColorMatrix.setAttribute('result', id + '_tint_2');\n filter.appendChild(feColorMatrix);\n this.matrixFilter = feColorMatrix;\n var feMerge = this.createMergeNode(id, [source, id + '_tint_1', id + '_tint_2']);\n filter.appendChild(feMerge);\n }\n\n extendPrototype([SVGComposableEffect], SVGTintFilter);\n\n SVGTintFilter.prototype.renderFrame = function (forceRender) {\n if (forceRender || this.filterManager._mdf) {\n var colorBlack = this.filterManager.effectElements[0].p.v;\n var colorWhite = this.filterManager.effectElements[1].p.v;\n var opacity = this.filterManager.effectElements[2].p.v / 100;\n this.linearFilter.setAttribute('values', linearFilterValue + ' ' + opacity + ' 0');\n this.matrixFilter.setAttribute('values', colorWhite[0] - colorBlack[0] + ' 0 0 0 ' + colorBlack[0] + ' ' + (colorWhite[1] - colorBlack[1]) + ' 0 0 0 ' + colorBlack[1] + ' ' + (colorWhite[2] - colorBlack[2]) + ' 0 0 0 ' + colorBlack[2] + ' 0 0 0 1 0');\n }\n };\n\n function SVGFillFilter(filter, filterManager, elem, id) {\n this.filterManager = filterManager;\n var feColorMatrix = createNS('feColorMatrix');\n feColorMatrix.setAttribute('type', 'matrix');\n feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');\n feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');\n feColorMatrix.setAttribute('result', id);\n filter.appendChild(feColorMatrix);\n this.matrixFilter = feColorMatrix;\n }\n\n SVGFillFilter.prototype.renderFrame = function (forceRender) {\n if (forceRender || this.filterManager._mdf) {\n var color = this.filterManager.effectElements[2].p.v;\n var opacity = this.filterManager.effectElements[6].p.v;\n this.matrixFilter.setAttribute('values', '0 0 0 0 ' + color[0] + ' 0 0 0 0 ' + color[1] + ' 0 0 0 0 ' + color[2] + ' 0 0 0 ' + opacity + ' 0');\n }\n };\n\n function SVGStrokeEffect(fil, filterManager, elem) {\n this.initialized = false;\n this.filterManager = filterManager;\n this.elem = elem;\n this.paths = [];\n }\n\n SVGStrokeEffect.prototype.initialize = function () {\n var elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;\n var path;\n var groupPath;\n var i;\n var len;\n\n if (this.filterManager.effectElements[1].p.v === 1) {\n len = this.elem.maskManager.masksProperties.length;\n i = 0;\n } else {\n i = this.filterManager.effectElements[0].p.v - 1;\n len = i + 1;\n }\n\n groupPath = createNS('g');\n groupPath.setAttribute('fill', 'none');\n groupPath.setAttribute('stroke-linecap', 'round');\n groupPath.setAttribute('stroke-dashoffset', 1);\n\n for (i; i < len; i += 1) {\n path = createNS('path');\n groupPath.appendChild(path);\n this.paths.push({\n p: path,\n m: i\n });\n }\n\n if (this.filterManager.effectElements[10].p.v === 3) {\n var mask = createNS('mask');\n var id = createElementID();\n mask.setAttribute('id', id);\n mask.setAttribute('mask-type', 'alpha');\n mask.appendChild(groupPath);\n this.elem.globalData.defs.appendChild(mask);\n var g = createNS('g');\n g.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')');\n\n while (elemChildren[0]) {\n g.appendChild(elemChildren[0]);\n }\n\n this.elem.layerElement.appendChild(g);\n this.masker = mask;\n groupPath.setAttribute('stroke', '#fff');\n } else if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {\n if (this.filterManager.effectElements[10].p.v === 2) {\n elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;\n\n while (elemChildren.length) {\n this.elem.layerElement.removeChild(elemChildren[0]);\n }\n }\n\n this.elem.layerElement.appendChild(groupPath);\n this.elem.layerElement.removeAttribute('mask');\n groupPath.setAttribute('stroke', '#fff');\n }\n\n this.initialized = true;\n this.pathMasker = groupPath;\n };\n\n SVGStrokeEffect.prototype.renderFrame = function (forceRender) {\n if (!this.initialized) {\n this.initialize();\n }\n\n var i;\n var len = this.paths.length;\n var mask;\n var path;\n\n for (i = 0; i < len; i += 1) {\n if (this.paths[i].m !== -1) {\n mask = this.elem.maskManager.viewData[this.paths[i].m];\n path = this.paths[i].p;\n\n if (forceRender || this.filterManager._mdf || mask.prop._mdf) {\n path.setAttribute('d', mask.lastPath);\n }\n\n if (forceRender || this.filterManager.effectElements[9].p._mdf || this.filterManager.effectElements[4].p._mdf || this.filterManager.effectElements[7].p._mdf || this.filterManager.effectElements[8].p._mdf || mask.prop._mdf) {\n var dasharrayValue;\n\n if (this.filterManager.effectElements[7].p.v !== 0 || this.filterManager.effectElements[8].p.v !== 100) {\n var s = Math.min(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;\n var e = Math.max(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;\n var l = path.getTotalLength();\n dasharrayValue = '0 0 0 ' + l * s + ' ';\n var lineLength = l * (e - s);\n var segment = 1 + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;\n var units = Math.floor(lineLength / segment);\n var j;\n\n for (j = 0; j < units; j += 1) {\n dasharrayValue += '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01 + ' ';\n }\n\n dasharrayValue += '0 ' + l * 10 + ' 0 0';\n } else {\n dasharrayValue = '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;\n }\n\n path.setAttribute('stroke-dasharray', dasharrayValue);\n }\n }\n }\n\n if (forceRender || this.filterManager.effectElements[4].p._mdf) {\n this.pathMasker.setAttribute('stroke-width', this.filterManager.effectElements[4].p.v * 2);\n }\n\n if (forceRender || this.filterManager.effectElements[6].p._mdf) {\n this.pathMasker.setAttribute('opacity', this.filterManager.effectElements[6].p.v);\n }\n\n if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {\n if (forceRender || this.filterManager.effectElements[3].p._mdf) {\n var color = this.filterManager.effectElements[3].p.v;\n this.pathMasker.setAttribute('stroke', 'rgb(' + bmFloor(color[0] * 255) + ',' + bmFloor(color[1] * 255) + ',' + bmFloor(color[2] * 255) + ')');\n }\n }\n };\n\n function SVGTritoneFilter(filter, filterManager, elem, id) {\n this.filterManager = filterManager;\n var feColorMatrix = createNS('feColorMatrix');\n feColorMatrix.setAttribute('type', 'matrix');\n feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');\n feColorMatrix.setAttribute('values', '0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0');\n filter.appendChild(feColorMatrix);\n var feComponentTransfer = createNS('feComponentTransfer');\n feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');\n feComponentTransfer.setAttribute('result', id);\n this.matrixFilter = feComponentTransfer;\n var feFuncR = createNS('feFuncR');\n feFuncR.setAttribute('type', 'table');\n feComponentTransfer.appendChild(feFuncR);\n this.feFuncR = feFuncR;\n var feFuncG = createNS('feFuncG');\n feFuncG.setAttribute('type', 'table');\n feComponentTransfer.appendChild(feFuncG);\n this.feFuncG = feFuncG;\n var feFuncB = createNS('feFuncB');\n feFuncB.setAttribute('type', 'table');\n feComponentTransfer.appendChild(feFuncB);\n this.feFuncB = feFuncB;\n filter.appendChild(feComponentTransfer);\n }\n\n SVGTritoneFilter.prototype.renderFrame = function (forceRender) {\n if (forceRender || this.filterManager._mdf) {\n var color1 = this.filterManager.effectElements[0].p.v;\n var color2 = this.filterManager.effectElements[1].p.v;\n var color3 = this.filterManager.effectElements[2].p.v;\n var tableR = color3[0] + ' ' + color2[0] + ' ' + color1[0];\n var tableG = color3[1] + ' ' + color2[1] + ' ' + color1[1];\n var tableB = color3[2] + ' ' + color2[2] + ' ' + color1[2];\n this.feFuncR.setAttribute('tableValues', tableR);\n this.feFuncG.setAttribute('tableValues', tableG);\n this.feFuncB.setAttribute('tableValues', tableB);\n }\n };\n\n function SVGProLevelsFilter(filter, filterManager, elem, id) {\n this.filterManager = filterManager;\n var effectElements = this.filterManager.effectElements;\n var feComponentTransfer = createNS('feComponentTransfer'); // Red\n\n if (effectElements[10].p.k || effectElements[10].p.v !== 0 || effectElements[11].p.k || effectElements[11].p.v !== 1 || effectElements[12].p.k || effectElements[12].p.v !== 1 || effectElements[13].p.k || effectElements[13].p.v !== 0 || effectElements[14].p.k || effectElements[14].p.v !== 1) {\n this.feFuncR = this.createFeFunc('feFuncR', feComponentTransfer);\n } // Green\n\n\n if (effectElements[17].p.k || effectElements[17].p.v !== 0 || effectElements[18].p.k || effectElements[18].p.v !== 1 || effectElements[19].p.k || effectElements[19].p.v !== 1 || effectElements[20].p.k || effectElements[20].p.v !== 0 || effectElements[21].p.k || effectElements[21].p.v !== 1) {\n this.feFuncG = this.createFeFunc('feFuncG', feComponentTransfer);\n } // Blue\n\n\n if (effectElements[24].p.k || effectElements[24].p.v !== 0 || effectElements[25].p.k || effectElements[25].p.v !== 1 || effectElements[26].p.k || effectElements[26].p.v !== 1 || effectElements[27].p.k || effectElements[27].p.v !== 0 || effectElements[28].p.k || effectElements[28].p.v !== 1) {\n this.feFuncB = this.createFeFunc('feFuncB', feComponentTransfer);\n } // Alpha\n\n\n if (effectElements[31].p.k || effectElements[31].p.v !== 0 || effectElements[32].p.k || effectElements[32].p.v !== 1 || effectElements[33].p.k || effectElements[33].p.v !== 1 || effectElements[34].p.k || effectElements[34].p.v !== 0 || effectElements[35].p.k || effectElements[35].p.v !== 1) {\n this.feFuncA = this.createFeFunc('feFuncA', feComponentTransfer);\n } // RGB\n\n\n if (this.feFuncR || this.feFuncG || this.feFuncB || this.feFuncA) {\n feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');\n filter.appendChild(feComponentTransfer);\n }\n\n if (effectElements[3].p.k || effectElements[3].p.v !== 0 || effectElements[4].p.k || effectElements[4].p.v !== 1 || effectElements[5].p.k || effectElements[5].p.v !== 1 || effectElements[6].p.k || effectElements[6].p.v !== 0 || effectElements[7].p.k || effectElements[7].p.v !== 1) {\n feComponentTransfer = createNS('feComponentTransfer');\n feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');\n feComponentTransfer.setAttribute('result', id);\n filter.appendChild(feComponentTransfer);\n this.feFuncRComposed = this.createFeFunc('feFuncR', feComponentTransfer);\n this.feFuncGComposed = this.createFeFunc('feFuncG', feComponentTransfer);\n this.feFuncBComposed = this.createFeFunc('feFuncB', feComponentTransfer);\n }\n }\n\n SVGProLevelsFilter.prototype.createFeFunc = function (type, feComponentTransfer) {\n var feFunc = createNS(type);\n feFunc.setAttribute('type', 'table');\n feComponentTransfer.appendChild(feFunc);\n return feFunc;\n };\n\n SVGProLevelsFilter.prototype.getTableValue = function (inputBlack, inputWhite, gamma, outputBlack, outputWhite) {\n var cnt = 0;\n var segments = 256;\n var perc;\n var min = Math.min(inputBlack, inputWhite);\n var max = Math.max(inputBlack, inputWhite);\n var table = Array.call(null, {\n length: segments\n });\n var colorValue;\n var pos = 0;\n var outputDelta = outputWhite - outputBlack;\n var inputDelta = inputWhite - inputBlack;\n\n while (cnt <= 256) {\n perc = cnt / 256;\n\n if (perc <= min) {\n colorValue = inputDelta < 0 ? outputWhite : outputBlack;\n } else if (perc >= max) {\n colorValue = inputDelta < 0 ? outputBlack : outputWhite;\n } else {\n colorValue = outputBlack + outputDelta * Math.pow((perc - inputBlack) / inputDelta, 1 / gamma);\n }\n\n table[pos] = colorValue;\n pos += 1;\n cnt += 256 / (segments - 1);\n }\n\n return table.join(' ');\n };\n\n SVGProLevelsFilter.prototype.renderFrame = function (forceRender) {\n if (forceRender || this.filterManager._mdf) {\n var val;\n var effectElements = this.filterManager.effectElements;\n\n if (this.feFuncRComposed && (forceRender || effectElements[3].p._mdf || effectElements[4].p._mdf || effectElements[5].p._mdf || effectElements[6].p._mdf || effectElements[7].p._mdf)) {\n val = this.getTableValue(effectElements[3].p.v, effectElements[4].p.v, effectElements[5].p.v, effectElements[6].p.v, effectElements[7].p.v);\n this.feFuncRComposed.setAttribute('tableValues', val);\n this.feFuncGComposed.setAttribute('tableValues', val);\n this.feFuncBComposed.setAttribute('tableValues', val);\n }\n\n if (this.feFuncR && (forceRender || effectElements[10].p._mdf || effectElements[11].p._mdf || effectElements[12].p._mdf || effectElements[13].p._mdf || effectElements[14].p._mdf)) {\n val = this.getTableValue(effectElements[10].p.v, effectElements[11].p.v, effectElements[12].p.v, effectElements[13].p.v, effectElements[14].p.v);\n this.feFuncR.setAttribute('tableValues', val);\n }\n\n if (this.feFuncG && (forceRender || effectElements[17].p._mdf || effectElements[18].p._mdf || effectElements[19].p._mdf || effectElements[20].p._mdf || effectElements[21].p._mdf)) {\n val = this.getTableValue(effectElements[17].p.v, effectElements[18].p.v, effectElements[19].p.v, effectElements[20].p.v, effectElements[21].p.v);\n this.feFuncG.setAttribute('tableValues', val);\n }\n\n if (this.feFuncB && (forceRender || effectElements[24].p._mdf || effectElements[25].p._mdf || effectElements[26].p._mdf || effectElements[27].p._mdf || effectElements[28].p._mdf)) {\n val = this.getTableValue(effectElements[24].p.v, effectElements[25].p.v, effectElements[26].p.v, effectElements[27].p.v, effectElements[28].p.v);\n this.feFuncB.setAttribute('tableValues', val);\n }\n\n if (this.feFuncA && (forceRender || effectElements[31].p._mdf || effectElements[32].p._mdf || effectElements[33].p._mdf || effectElements[34].p._mdf || effectElements[35].p._mdf)) {\n val = this.getTableValue(effectElements[31].p.v, effectElements[32].p.v, effectElements[33].p.v, effectElements[34].p.v, effectElements[35].p.v);\n this.feFuncA.setAttribute('tableValues', val);\n }\n }\n };\n\n function SVGDropShadowEffect(filter, filterManager, elem, id, source) {\n var globalFilterSize = filterManager.container.globalData.renderConfig.filterSize;\n var filterSize = filterManager.data.fs || globalFilterSize;\n filter.setAttribute('x', filterSize.x || globalFilterSize.x);\n filter.setAttribute('y', filterSize.y || globalFilterSize.y);\n filter.setAttribute('width', filterSize.width || globalFilterSize.width);\n filter.setAttribute('height', filterSize.height || globalFilterSize.height);\n this.filterManager = filterManager;\n var feGaussianBlur = createNS('feGaussianBlur');\n feGaussianBlur.setAttribute('in', 'SourceAlpha');\n feGaussianBlur.setAttribute('result', id + '_drop_shadow_1');\n feGaussianBlur.setAttribute('stdDeviation', '0');\n this.feGaussianBlur = feGaussianBlur;\n filter.appendChild(feGaussianBlur);\n var feOffset = createNS('feOffset');\n feOffset.setAttribute('dx', '25');\n feOffset.setAttribute('dy', '0');\n feOffset.setAttribute('in', id + '_drop_shadow_1');\n feOffset.setAttribute('result', id + '_drop_shadow_2');\n this.feOffset = feOffset;\n filter.appendChild(feOffset);\n var feFlood = createNS('feFlood');\n feFlood.setAttribute('flood-color', '#00ff00');\n feFlood.setAttribute('flood-opacity', '1');\n feFlood.setAttribute('result', id + '_drop_shadow_3');\n this.feFlood = feFlood;\n filter.appendChild(feFlood);\n var feComposite = createNS('feComposite');\n feComposite.setAttribute('in', id + '_drop_shadow_3');\n feComposite.setAttribute('in2', id + '_drop_shadow_2');\n feComposite.setAttribute('operator', 'in');\n feComposite.setAttribute('result', id + '_drop_shadow_4');\n filter.appendChild(feComposite);\n var feMerge = this.createMergeNode(id, [id + '_drop_shadow_4', source]);\n filter.appendChild(feMerge); //\n }\n\n extendPrototype([SVGComposableEffect], SVGDropShadowEffect);\n\n SVGDropShadowEffect.prototype.renderFrame = function (forceRender) {\n if (forceRender || this.filterManager._mdf) {\n if (forceRender || this.filterManager.effectElements[4].p._mdf) {\n this.feGaussianBlur.setAttribute('stdDeviation', this.filterManager.effectElements[4].p.v / 4);\n }\n\n if (forceRender || this.filterManager.effectElements[0].p._mdf) {\n var col = this.filterManager.effectElements[0].p.v;\n this.feFlood.setAttribute('flood-color', rgbToHex(Math.round(col[0] * 255), Math.round(col[1] * 255), Math.round(col[2] * 255)));\n }\n\n if (forceRender || this.filterManager.effectElements[1].p._mdf) {\n this.feFlood.setAttribute('flood-opacity', this.filterManager.effectElements[1].p.v / 255);\n }\n\n if (forceRender || this.filterManager.effectElements[2].p._mdf || this.filterManager.effectElements[3].p._mdf) {\n var distance = this.filterManager.effectElements[3].p.v;\n var angle = (this.filterManager.effectElements[2].p.v - 90) * degToRads;\n var x = distance * Math.cos(angle);\n var y = distance * Math.sin(angle);\n this.feOffset.setAttribute('dx', x);\n this.feOffset.setAttribute('dy', y);\n }\n }\n };\n\n var _svgMatteSymbols = [];\n\n function SVGMatte3Effect(filterElem, filterManager, elem) {\n this.initialized = false;\n this.filterManager = filterManager;\n this.filterElem = filterElem;\n this.elem = elem;\n elem.matteElement = createNS('g');\n elem.matteElement.appendChild(elem.layerElement);\n elem.matteElement.appendChild(elem.transformedElement);\n elem.baseElement = elem.matteElement;\n }\n\n SVGMatte3Effect.prototype.findSymbol = function (mask) {\n var i = 0;\n var len = _svgMatteSymbols.length;\n\n while (i < len) {\n if (_svgMatteSymbols[i] === mask) {\n return _svgMatteSymbols[i];\n }\n\n i += 1;\n }\n\n return null;\n };\n\n SVGMatte3Effect.prototype.replaceInParent = function (mask, symbolId) {\n var parentNode = mask.layerElement.parentNode;\n\n if (!parentNode) {\n return;\n }\n\n var children = parentNode.children;\n var i = 0;\n var len = children.length;\n\n while (i < len) {\n if (children[i] === mask.layerElement) {\n break;\n }\n\n i += 1;\n }\n\n var nextChild;\n\n if (i <= len - 2) {\n nextChild = children[i + 1];\n }\n\n var useElem = createNS('use');\n useElem.setAttribute('href', '#' + symbolId);\n\n if (nextChild) {\n parentNode.insertBefore(useElem, nextChild);\n } else {\n parentNode.appendChild(useElem);\n }\n };\n\n SVGMatte3Effect.prototype.setElementAsMask = function (elem, mask) {\n if (!this.findSymbol(mask)) {\n var symbolId = createElementID();\n var masker = createNS('mask');\n masker.setAttribute('id', mask.layerId);\n masker.setAttribute('mask-type', 'alpha');\n\n _svgMatteSymbols.push(mask);\n\n var defs = elem.globalData.defs;\n defs.appendChild(masker);\n var symbol = createNS('symbol');\n symbol.setAttribute('id', symbolId);\n this.replaceInParent(mask, symbolId);\n symbol.appendChild(mask.layerElement);\n defs.appendChild(symbol);\n var useElem = createNS('use');\n useElem.setAttribute('href', '#' + symbolId);\n masker.appendChild(useElem);\n mask.data.hd = false;\n mask.show();\n }\n\n elem.setMatte(mask.layerId);\n };\n\n SVGMatte3Effect.prototype.initialize = function () {\n var ind = this.filterManager.effectElements[0].p.v;\n var elements = this.elem.comp.elements;\n var i = 0;\n var len = elements.length;\n\n while (i < len) {\n if (elements[i] && elements[i].data.ind === ind) {\n this.setElementAsMask(this.elem, elements[i]);\n }\n\n i += 1;\n }\n\n this.initialized = true;\n };\n\n SVGMatte3Effect.prototype.renderFrame = function () {\n if (!this.initialized) {\n this.initialize();\n }\n };\n\n function SVGGaussianBlurEffect(filter, filterManager, elem, id) {\n // Outset the filter region by 100% on all sides to accommodate blur expansion.\n filter.setAttribute('x', '-100%');\n filter.setAttribute('y', '-100%');\n filter.setAttribute('width', '300%');\n filter.setAttribute('height', '300%');\n this.filterManager = filterManager;\n var feGaussianBlur = createNS('feGaussianBlur');\n feGaussianBlur.setAttribute('result', id);\n filter.appendChild(feGaussianBlur);\n this.feGaussianBlur = feGaussianBlur;\n }\n\n SVGGaussianBlurEffect.prototype.renderFrame = function (forceRender) {\n if (forceRender || this.filterManager._mdf) {\n // Empirical value, matching AE's blur appearance.\n var kBlurrinessToSigma = 0.3;\n var sigma = this.filterManager.effectElements[0].p.v * kBlurrinessToSigma; // Dimensions mapping:\n //\n // 1 -> horizontal & vertical\n // 2 -> horizontal only\n // 3 -> vertical only\n //\n\n var dimensions = this.filterManager.effectElements[1].p.v;\n var sigmaX = dimensions == 3 ? 0 : sigma; // eslint-disable-line eqeqeq\n\n var sigmaY = dimensions == 2 ? 0 : sigma; // eslint-disable-line eqeqeq\n\n this.feGaussianBlur.setAttribute('stdDeviation', sigmaX + ' ' + sigmaY); // Repeat edges mapping:\n //\n // 0 -> off -> duplicate\n // 1 -> on -> wrap\n\n var edgeMode = this.filterManager.effectElements[2].p.v == 1 ? 'wrap' : 'duplicate'; // eslint-disable-line eqeqeq\n\n this.feGaussianBlur.setAttribute('edgeMode', edgeMode);\n }\n };\n\n function TransformEffect() {}\n\n TransformEffect.prototype.init = function (effectsManager) {\n this.effectsManager = effectsManager;\n this.type = effectTypes.TRANSFORM_EFFECT;\n this.matrix = new Matrix();\n this.opacity = -1;\n this._mdf = false;\n this._opMdf = false;\n };\n\n TransformEffect.prototype.renderFrame = function (forceFrame) {\n this._opMdf = false;\n this._mdf = false;\n\n if (forceFrame || this.effectsManager._mdf) {\n var effectElements = this.effectsManager.effectElements;\n var anchor = effectElements[0].p.v;\n var position = effectElements[1].p.v;\n var isUniformScale = effectElements[2].p.v === 1;\n var scaleHeight = effectElements[3].p.v;\n var scaleWidth = isUniformScale ? scaleHeight : effectElements[4].p.v;\n var skew = effectElements[5].p.v;\n var skewAxis = effectElements[6].p.v;\n var rotation = effectElements[7].p.v;\n this.matrix.reset();\n this.matrix.translate(-anchor[0], -anchor[1], anchor[2]);\n this.matrix.scale(scaleWidth * 0.01, scaleHeight * 0.01, 1);\n this.matrix.rotate(-rotation * degToRads);\n this.matrix.skewFromAxis(-skew * degToRads, (skewAxis + 90) * degToRads);\n this.matrix.translate(position[0], position[1], 0);\n this._mdf = true;\n\n if (this.opacity !== effectElements[8].p.v) {\n this.opacity = effectElements[8].p.v;\n this._opMdf = true;\n }\n }\n };\n\n function SVGTransformEffect(_, filterManager) {\n this.init(filterManager);\n }\n\n extendPrototype([TransformEffect], SVGTransformEffect);\n\n function CVTransformEffect(effectsManager) {\n this.init(effectsManager);\n }\n\n extendPrototype([TransformEffect], CVTransformEffect);\n\n registerRenderer('canvas', CanvasRenderer);\n registerRenderer('html', HybridRenderer);\n registerRenderer('svg', SVGRenderer); // Registering shape modifiers\n\n ShapeModifiers.registerModifier('tm', TrimModifier);\n ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier);\n ShapeModifiers.registerModifier('rp', RepeaterModifier);\n ShapeModifiers.registerModifier('rd', RoundCornersModifier);\n ShapeModifiers.registerModifier('zz', ZigZagModifier);\n ShapeModifiers.registerModifier('op', OffsetPathModifier); // Registering expression plugin\n\n setExpressionsPlugin(Expressions);\n setExpressionInterfaces(getInterface);\n initialize$1();\n initialize(); // Registering svg effects\n\n registerEffect$1(20, SVGTintFilter, true);\n registerEffect$1(21, SVGFillFilter, true);\n registerEffect$1(22, SVGStrokeEffect, false);\n registerEffect$1(23, SVGTritoneFilter, true);\n registerEffect$1(24, SVGProLevelsFilter, true);\n registerEffect$1(25, SVGDropShadowEffect, true);\n registerEffect$1(28, SVGMatte3Effect, false);\n registerEffect$1(29, SVGGaussianBlurEffect, true);\n registerEffect$1(35, SVGTransformEffect, false);\n registerEffect(35, CVTransformEffect);\n\n return lottie;\n\n}));\n","import { map } from \"../operators/map\";\nconst { isArray } = Array;\nfunction callOrApply(fn, args) {\n return isArray(args) ? fn(...args) : fn(args);\n}\nexport function mapOneOrManyArgs(fn) {\n return map(args => callOrApply(fn, args));\n}\n","import { registerVersion } from '@firebase/app';\nexport * from '@firebase/app';\n\nvar name = \"firebase\";\nvar version = \"11.3.1\";\n\n/**\n * @license\n * Copyright 2020 Google LLC\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 */\nregisterVersion(name, version, 'app');\n","//! moment.js locale configuration\n//! locale : Tetun Dili (East Timor) [tet]\n//! author : Joshua Brooks : https://github.com/joshbrooks\n//! author : Onorio De J. Afonso : https://github.com/marobo\n//! author : Sonia Simoes : https://github.com/soniasimoes\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var tet = moment.defineLocale('tet', {\n months: 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split(\n '_'\n ),\n monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),\n weekdays: 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'),\n weekdaysShort: 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'),\n weekdaysMin: 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Ohin iha] LT',\n nextDay: '[Aban iha] LT',\n nextWeek: 'dddd [iha] LT',\n lastDay: '[Horiseik iha] LT',\n lastWeek: 'dddd [semana kotuk] [iha] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'iha %s',\n past: '%s liuba',\n s: 'segundu balun',\n ss: 'segundu %d',\n m: 'minutu ida',\n mm: 'minutu %d',\n h: 'oras ida',\n hh: 'oras %d',\n d: 'loron ida',\n dd: 'loron %d',\n M: 'fulan ida',\n MM: 'fulan %d',\n y: 'tinan ida',\n yy: 'tinan %d',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((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 week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return tet;\n\n})));\n","import { Directive, ElementRef, Input, OnInit } from \"@angular/core\";\n\n@Directive({\n //TODO Matt Arnold change to bwTextColor\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: \"[mwTextColor]\"\n})\nexport class TextColorDirective implements OnInit {\n @Input(\"mwTextColor\") textColor: string;\n constructor(private el: ElementRef) {}\n ngOnInit() {\n this.el.nativeElement.style.color = this.textColor;\n }\n}\n","//! moment.js locale configuration\n//! locale : Indonesian [id]\n//! author : Mohammad Satrio Utomo : https://github.com/tyok\n//! reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var id = moment.defineLocale('id', {\n months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'),\n weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),\n weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),\n weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [pukul] HH.mm',\n LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',\n },\n meridiemParse: /pagi|siang|sore|malam/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'pagi') {\n return hour;\n } else if (meridiem === 'siang') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'sore' || meridiem === 'malam') {\n return hour + 12;\n }\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours < 11) {\n return 'pagi';\n } else if (hours < 15) {\n return 'siang';\n } else if (hours < 19) {\n return 'sore';\n } else {\n return 'malam';\n }\n },\n calendar: {\n sameDay: '[Hari ini pukul] LT',\n nextDay: '[Besok pukul] LT',\n nextWeek: 'dddd [pukul] LT',\n lastDay: '[Kemarin pukul] LT',\n lastWeek: 'dddd [lalu pukul] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'dalam %s',\n past: '%s yang lalu',\n s: 'beberapa detik',\n ss: '%d detik',\n m: 'semenit',\n mm: '%d menit',\n h: 'sejam',\n hh: '%d jam',\n d: 'sehari',\n dd: '%d hari',\n M: 'sebulan',\n MM: '%d bulan',\n y: 'setahun',\n yy: '%d tahun',\n },\n week: {\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 });\n\n return id;\n\n})));\n","import { Observable } from '../Observable';\nimport { async as asyncScheduler } from '../scheduler/async';\nimport { isScheduler } from '../util/isScheduler';\nimport { isValidDate } from '../util/isDate';\nexport function timer(dueTime = 0, intervalOrScheduler, scheduler = asyncScheduler) {\n let intervalDuration = -1;\n if (intervalOrScheduler != null) {\n if (isScheduler(intervalOrScheduler)) {\n scheduler = intervalOrScheduler;\n }\n else {\n intervalDuration = intervalOrScheduler;\n }\n }\n return new Observable((subscriber) => {\n let due = isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime;\n if (due < 0) {\n due = 0;\n }\n let n = 0;\n return scheduler.schedule(function () {\n if (!subscriber.closed) {\n subscriber.next(n++);\n if (0 <= intervalDuration) {\n this.schedule(undefined, intervalDuration);\n }\n else {\n subscriber.complete();\n }\n }\n }, due);\n });\n}\n","export function isValidDate(value) {\n return value instanceof Date && !isNaN(value);\n}\n","<bw-spinner *ngIf=\"!formIsReady\"></bw-spinner>\n<bw-action-article *ngIf=\"showElectiveProducts\" [brightsideWebFb]=\"{ event_name: 'program_select' }\">\n <ui-nav-exit-back\n *ngIf=\"showBackButton\"\n header-actions\n [trackingDetail]=\"{ event_name: 'program_select' }\"\n [skipActionEmit]=\"!emitBackButton\"\n (exitActionHandler)=\"backClicked()\"\n ></ui-nav-exit-back>\n\n <div header-title>\n <div class=\"flex-row\">\n <typography title-medium class=\"mr-md\">\n {{ 'PROGRAM_SELECT_TITLE' | translate }}\n </typography>\n <ng-container *ngIf=\"!skipAccountCreation\">\n <bw-icon\n *ngIf=\"employmentType === 'dependent'\"\n iconName=\"check_badge\"\n color=\"var(--brand)\"\n size=\"52\"\n backgroundColor=\"var(--bg-blue)\"\n ></bw-icon>\n <img\n *ngIf=\"!displayDefaultIcon && employmentType !== 'dependent'\"\n width=\"52\"\n src=\"{{ cdnUrl }}images/app/{{ company | lowercase }}.png\"\n (error)=\"displayDefaultIcon = true\"\n />\n </ng-container>\n </div>\n </div>\n <div content-section>\n <bw-paragraph>\n {{ 'PROGRAM_SELECT_DESC' | translate: { company: company | titlecase } }}\n </bw-paragraph>\n <section>\n <form [formGroup]=\"electiveProductsForm\" novalidate>\n <div *ngFor=\"let choice of electiveProductChoices; let i = index\">\n <ng-container>\n <bw-radio\n formControlName=\"selectedElectiveProduct\"\n [name]=\"'electiveProduct'\"\n [value]=\"choice.value\"\n [startSelected]=\"electiveProductsForm.value.selectedElectiveProduct.indexOf(choice.value) > -1\"\n [label]=\"'PROGRAM_SELECT_' + choice.value | translate\"\n (radioClick)=\"productRadioChanged($event, choice.value)\"\n >\n </bw-radio>\n </ng-container>\n </div>\n </form>\n </section>\n </div>\n <button\n bw-button\n footer-actions\n (click)=\"programContinue()\"\n [disabled]=\"electiveProductsForm.invalid\"\n [brightsideWebFb]=\"{ event_name: 'program_select', custom: { type: selectedProducts } }\"\n >\n {{ 'BUTTON_CONTINUE' | translate }}\n </button>\n</bw-action-article>\n\n<bw-action-article *ngIf=\"!showCollectPrimaryForm && !showElectiveProducts && formIsReady\" [brightsideWebFb]=\"mainAnalytics\">\n <ui-nav-exit-back\n *ngIf=\"showBackButton && !skipAccountCreation\"\n header-actions\n [trackingDetail]=\"{ event_name: analyticName }\"\n [skipActionEmit]=\"!emitBackButton\"\n (exitActionHandler)=\"backClicked()\"\n ></ui-nav-exit-back>\n\n <div header-title>\n <div class=\"flex-row\">\n <typography title-medium class=\"mr-md\"><ng-content select=\"[title-copy]\"></ng-content></typography>\n <ng-container *ngIf=\"!skipAccountCreation\">\n <bw-icon\n *ngIf=\"employmentType === 'dependent'\"\n iconName=\"check_badge\"\n color=\"var(--brand)\"\n size=\"52\"\n backgroundColor=\"var(--bg-blue)\"\n ></bw-icon>\n <img\n *ngIf=\"!displayDefaultIcon && employmentType !== 'dependent'\"\n width=\"52\"\n src=\"{{ cdnUrl }}images/app/{{ company | lowercase }}.png\"\n (error)=\"displayDefaultIcon = true\"\n />\n </ng-container>\n </div>\n </div>\n <div content-section>\n <ng-content select=\"[intro-paragraph]\"></ng-content>\n <ng-container>\n <bw-spinner *ngIf=\"!formIsReady\"></bw-spinner>\n <form *ngIf=\"formIsReady\" [formGroup]=\"eligibilityForm\" (submit)=\"onSubmit()\">\n <div class=\"flex-row flex-start flex-wrap mb-sm\">\n <div *ngFor=\"let controlConfig of formControls; let i = index\"\n class=\"mb-sm flex-item {{ controlConfig.classes }}\">\n <bw-input\n [isCustomControl]=\"true\"\n [label]=\"controlConfig.labelKey | translate\"\n [inputError]=\"\n controlConfig.control.invalid &&\n (controlConfig.control[controlConfig.inputOptions.beginValidationOn]\n ? controlConfig.control[controlConfig.inputOptions.beginValidationOn]\n : controlConfig.control.touched) &&\n controlConfig.errorTextKey !== ''\n \"\n [inputErrorText]=\"controlConfig.errorTextKey | translate\"\n [hasInfo]=\"controlConfig.showInfo\"\n (emitInfoClicked)=\"displayInfo(controlConfig)\"\n [isFocused]=\"controlConfig.hasFocus\"\n >\n <div infoCopy [innerHTML]=\"controlConfig.infoKey | translate\"></div>\n <input\n [formControlName]=\"controlConfig.key\"\n label=\"{{ controlConfig.labelKey | translate }}\"\n pattern=\"{{ controlConfig.inputOptions?.pattern }}\"\n minlength=\"{{ controlConfig.inputOptions?.minlength }}\"\n maxlength=\"{{ controlConfig.inputOptions?.maxlength }}\"\n type=\"{{ controlConfig.type }}\"\n (focus)=\"controlConfig.hasFocus = true\"\n (blur)=\"controlConfig.hasFocus = false\"\n />\n </bw-input>\n <ng-container\n *ngIf=\"controlConfig.key === 'workState'\"\n [ngTemplateOutlet]=\"statesDropdown\"\n [ngTemplateOutletContext]=\"{ controlConfig: controlConfig }\"\n >\n </ng-container>\n </div>\n <ng-container *ngIf=\"hasConsent\">\n <bw-checkbox formControlName=\"consentItem\">\n <typography text-medium-semibold color=\"var(--primary-text)\">\n {{ 'ALIAS_CONSENT_TITLE' | translate }}\n </typography>\n <typography\n text-medium-regular\n color=\"var(--secondary-text)\"\n [innerHTML]=\"'ALIAS_CONSENT_DESC' | translate: { linkPath: consentPath }\"\n ></typography>\n </bw-checkbox>\n </ng-container>\n <button\n hidden\n type=\"submit\"\n [brightsideWebFb]=\"{ event_name: analyticName }\"\n [disabled]=\"eligibilityForm.invalid\"\n ></button>\n </div>\n </form>\n </ng-container>\n </div>\n <button\n *ngIf=\"eligibilityForm\"\n bw-button\n footer-actions\n (click)=\"onSubmit()\"\n [disabled]=\"eligibilityForm.invalid\"\n [processing]=\"processing\"\n [brightsideWebFb]=\"{ event_name: analyticName }\"\n >\n {{ 'SUBMIT' | translate }}\n </button>\n</bw-action-article>\n\n<bw-action-article *ngIf=\"showCollectPrimaryForm\" [brightsideWebFb]=\"{ event_name: 'verify_primary' }\">\n <ui-nav-exit-back\n *ngIf=\"showBackButton\"\n header-actions\n [trackingDetail]=\"{ event_name: 'verify_primary' }\"\n (exitActionHandler)=\"showCollectPrimaryForm = false\"\n ></ui-nav-exit-back>\n\n <div header-title>\n <div class=\"flex-row\">\n <typography title-medium class=\"mr-md\">\n {{ 'PRIMARY_VERIFICATION_TITLE' | translate }}\n </typography>\n <bw-icon iconName=\"check_badge\" color=\"var(--brand)\" size=\"52\" backgroundColor=\"var(--bg-blue)\"></bw-icon>\n <!-- <img *ngIf=\"!displayDefaultIcon\" width=\"52\" src=\"{{ cdnUrl }}images/app/{{company|lowercase}}.png\" (error)=\"displayDefaultIcon = true\">-->\n </div>\n </div>\n <div content-section>\n <bw-paragraph>\n {{ 'PRIMARY_VERIFICATION_DESC' | translate: { company: company | titlecase } }}\n </bw-paragraph>\n <ng-container>\n <bw-spinner *ngIf=\"!formIsReady\"></bw-spinner>\n <form [formGroup]=\"primaryEmployeeForm\">\n <div class=\"flex-row flex-start flex-wrap mb-sm\">\n <div\n *ngFor=\"let controlConfig of primaryEmployeeFormControls; let i = index\"\n class=\"mb-sm flex-item {{ controlConfig.classes }}\"\n >\n <bw-input\n [isCustomControl]=\"true\"\n [label]=\"controlConfig.labelKey | translate\"\n [inputError]=\"\n controlConfig.control.invalid &&\n (controlConfig.control[controlConfig.inputOptions.beginValidationOn]\n ? controlConfig.control[controlConfig.inputOptions.beginValidationOn]\n : controlConfig.control.touched) &&\n controlConfig.errorTextKey !== ''\n \"\n [inputErrorText]=\"controlConfig.errorTextKey | translate\"\n [hasInfo]=\"controlConfig.showInfo\"\n (emitInfoClicked)=\"displayInfo(controlConfig)\"\n [isFocused]=\"controlConfig.hasFocus\"\n >\n <input\n [formControlName]=\"controlConfig.key\"\n label=\"{{ controlConfig.labelKey | translate }}\"\n pattern=\"{{ controlConfig.inputOptions?.pattern }}\"\n minlength=\"{{ controlConfig.inputOptions?.minlength }}\"\n maxlength=\"{{ controlConfig.inputOptions?.maxlength }}\"\n type=\"{{ controlConfig.type }}\"\n (focus)=\"controlConfig.hasFocus = true\"\n (blur)=\"controlConfig.hasFocus = false\"\n />\n </bw-input>\n </div>\n <button\n hidden\n type=\"submit\"\n (click)=\"onSubmit()\"\n [brightsideWebFb]=\"{ event_name: 'verify_primary' }\"\n [disabled]=\"primaryEmployeeForm.invalid\"\n ></button>\n </div>\n </form>\n </ng-container>\n </div>\n <button\n *ngIf=\"primaryEmployeeForm\"\n bw-button\n footer-actions\n (click)=\"onSubmit()\"\n [disabled]=\"primaryEmployeeForm.invalid\"\n [processing]=\"processing\"\n [brightsideWebFb]=\"{ event_name: 'verify_primary' }\"\n >\n {{ 'SUBMIT' | translate }}\n </button>\n</bw-action-article>\n\n<bw-modal\n *ngIf=\"showInfoModal\"\n (closeModal)=\"showInfoModal = false; analytics.logEvent(displayModal.eventName)\"\n [brightsideWebFb]=\"{ event_name: displayModal.eventName }\"\n>\n <typography title-medium color=\"var(--gray-70)\">{{ displayModal.titleKey | translate }}</typography>\n <section class=\"body\">\n <bw-paragraph [textStyle]=\"'Body2'\" color=\"var(--gray-50)\">\n {{ displayModal.bodykey | translate }}\n </bw-paragraph>\n </section>\n <footer class=\"footer\">\n <div class=\"flex-row row-reverse\">\n <button\n bw-button\n [autofocus]=\"true\"\n (click)=\"showInfoModal = false\"\n [brightsideWebFb]=\"{ event_name: displayModal.eventName }\"\n >\n {{ displayModal.ctaKey | translate }}\n </button>\n </div>\n </footer>\n</bw-modal>\n\n<bw-modal\n *ngIf=\"showErrorModal\"\n (closeModal)=\"closeErrorModal()\"\n [brightsideWebFb]=\"{ event_name: 'error_shown', custom: { 'error id': displayError.errorId } }\"\n [error_view]=\"true\"\n [showCloseButton]=\"showErrorModalCloseBtn\"\n>\n <typography title-medium color=\"var(--gray-70)\">\n <ng-container [ngSwitch]=\"displayError.errorId\">\n <ng-container *ngSwitchCase=\"'out_of_pilot'\">\n {{ displayError.errorTitleKey | translate: { state: selectedState } }}\n </ng-container>\n <ng-container *ngSwitchDefault>\n {{ displayError.errorTitleKey | translate }}\n </ng-container>\n </ng-container>\n </typography>\n <section class=\"body\">\n <typography text-medium-regular class=\"mb-sm\" color=\"var(--gray-50)\">\n <ng-container [ngSwitch]=\"displayError.errorId\">\n <ng-container *ngSwitchCase=\"'client_already_exist'\">\n <div [innerHTML]=\"displayError.errorDescKey | translate: { phone: userNumber }\"></div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'out_of_pilot'\">\n <div [innerHTML]=\"displayError.errorDescKey | translate\"></div>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <div\n [innerHTML]=\"\n displayError.errorDescKey\n | translate: { phone: supportNumber | phone, company: company | titlecase, hours: '(' + faHours + ')' }\n \"\n ></div>\n </ng-container>\n </ng-container>\n </typography>\n <ng-container *ngIf=\"displayError.faqCount\">\n <typography text-medium-regular class=\"mb-sm\" color=\"var(--gray-50)\">\n {{ 'FAQ' | translate }}\n </typography>\n <div class=\"mb-sm\" *ngFor=\"let _ of [].constructor(displayError.faqCount); let i = index\">\n <typography text-small-semibold color=\"var(--gray-50)\">\n {{ displayError.errorId.toUpperCase() + '_FAQ_' + (i + 1) | translate }}\n </typography>\n <typography text-small-regular color=\"var(--gray-50)\">\n {{ displayError.errorId.toUpperCase() + '_FAQ_' + (i + 1) + '_DESC' | translate }}\n </typography>\n </div>\n </ng-container>\n </section>\n <footer class=\"footer\">\n <div class=\"flex-row row-reverse\" *ngIf=\"displayError.errorId !== 'out_of_pilot'\">\n <button bw-button (click)=\"closeErrorModal(true)\" [brightsideWebFb]=\"{ event_name: displayError.errorId }\">\n {{ displayError.ctaKey | translate }}\n </button>\n <a *ngIf=\"displayError.ctaKey2\" class=\"mr-md\" href=\"\">\n {{ displayError.ctaKey2 | translate }}\n </a>\n </div>\n </footer>\n</bw-modal>\n\n<ng-template #statesDropdown let-controlConfig=\"controlConfig\">\n <div class=\"list-container state-list\">\n <div [@slideInOut]=\"controlConfig.hasFocus === true ? 'in' : 'out'\" class=\"list-display-container\">\n <ul>\n <li *ngFor=\"let state of statesToDisplayArray; let idx = index\" class=\"item\">\n <bw-cell\n class=\"address-cell\"\n [iconNameRight]=\"'chevron_right'\"\n [contentLeft]=\"true\"\n separatorType=\"full\"\n (clicked)=\"stateClicked(state, controlConfig)\"\n >\n <ng-container content-left>\n <typography text-medium-regular>\n <p>{{ state }}</p>\n </typography>\n </ng-container>\n </bw-cell>\n </li>\n <li *ngIf=\"statesToDisplayArray.length === 0\">\n <bw-cell class=\"address-cell\" [contentLeft]=\"true\" separatorType=\"none\">\n <ng-container content-left>\n <typography text-medium-regular>\n <p>{{ 'NO_STATES_FOUND' | translate }}</p>\n </typography>\n </ng-container>\n </bw-cell>\n </li>\n </ul>\n </div>\n </div>\n</ng-template>\n","import {Component, Input, OnInit, Output, EventEmitter, OnDestroy, HostListener, Directive} from '@angular/core';\n\n\nimport {\n AbstractControl,\n FormArray,\n FormControl,\n FormGroup,\n ValidationErrors,\n ValidatorFn,\n Validators\n} from \"@angular/forms\";\nimport {\n CONTROL_DOB,\n CONTROL_LAST_FOUR,\n CONTROL_ZIP,\n CONTROL_ADDRESS_WORK_STATE,\n DisplayFormControlConfig,\n InputInfoInterface,\n UniqueIDFormElement,\n CONTROL_FNAME,\n CONTROL_LNAME,\n CONTROL_FNAME_PRIMARY,\n CONTROL_LNAME_PRIMARY,\n CONTROL_DOB_PRIMARY,\n CONTROL_ZIP_PRIMARY, EmployeeIdRules\n} from \"@brightside-web/shared/desktop\";\nimport {\n CompanyService,\n EligibilityFieldsObject,\n FirebaseService, RequiredVerification,\n RequiredVerificationService,\n TermsService,\n ClientConfirmationErrorItems,\n ClientConfirmationErrorCodes as errorCodes,\n ClientConfirmationService,\n ClientConfirmationSubmissionInterface as submissionObject, CacheStorageService, ClientConfirmationErrorCode\n} from \"@brightside-web/desktop/data-access/shared\";\nimport {forkJoin, from, Subscription, tap} from \"rxjs\";\nimport {Environment} from \"@brightside-web/micro/core/environment\";\nimport {RegistrationService} from \"@brightside-web/desktop/data-access/onboarding\";\nimport {\n BsAuthService,\n BsCacheService\n} from \"@brightside-web/desktop/data-access/core-services\";\nimport * as moment from \"moment\";\nimport {Router} from \"@angular/router\";\nimport {\n animate,\n style,\n transition,\n trigger,\n state\n} from \"@angular/animations\";\n\n\n@Component({\n selector: 'brightside-web-eligibility-check',\n templateUrl: './eligibility-check.component.html',\n styleUrls: ['./eligibility-check.component.scss'],\n animations: [\n trigger('slideInOut', [\n state('in', style({\n maxHeight: '209px'\n })),\n state('out', style({\n maxHeight: '0px'\n })),\n transition('in => out', animate('400ms 100ms ease-in-out')),\n transition('out => in', animate('400ms ease-in-out'))\n ])\n ]\n})\nexport class EligibilityCheckComponent implements OnInit, OnDestroy {\n\n @Output() identitySubmitted: EventEmitter<boolean> = new EventEmitter<boolean>();\n @Input() analyticName: string;\n @Input() replay = false;\n @Input() showBackButton = false;\n @Input() emitBackButton = false;\n @Input() analyticEventProps: { [key: string]: string };\n\n faHours: string;\n\n mainAnalytics: unknown;\n\n homeZipControl = CONTROL_ZIP;\n\n statesArray = ['Alabama','Alaska','American Samoa','Arizona','Arkansas','California','Colorado','Connecticut','Delaware','District of Columbia','Federated States of Micronesia','Florida','Georgia','Guam','Hawaii','Idaho','Illinois','Indiana','Iowa','Kansas','Kentucky','Louisiana','Maine','Marshall Islands','Maryland','Massachusetts','Michigan','Minnesota','Mississippi','Missouri','Montana','Nebraska','Nevada','New Hampshire','New Jersey','New Mexico','New York','North Carolina','North Dakota','Northern Mariana Islands','Ohio','Oklahoma','Oregon','Palau','Pennsylvania','Puerto Rico','Rhode Island','South Carolina','South Dakota','Tennessee','Texas','Utah','Vermont','Virgin Island','Virginia','Washington','West Virginia','Wisconsin','Wyoming'];\n statesToDisplayArray = [...this.statesArray];\n selectedState: string;\n uniqueIdFormElement: UniqueIDFormElement;\n formControls: DisplayFormControlConfig[] = [];\n eligibilityFormControls: FormControl[] = [];\n eligibilityForm: FormGroup;\n electiveProductsForm: FormGroup;\n electiveProductChoices: {value: string}[] = [];\n showElectiveProducts = false;\n selectedProducts = 'none';\n EligibilityToControls = {\n unique_id: () => {\n this.uniqueIdFormElement = this.uniqueIdFormElement ? this.uniqueIdFormElement : new UniqueIDFormElement(this.analytics);\n this.uniqueIdFormElement.CONTROL_UNIQUE_ID.showInfo = true;\n this.uniqueIdFormElement.CONTROL_UNIQUE_ID.infoKey = this.uniqueIdFormElement.CONTROL_UNIQUE_ID.inputInfo?.infoKey;\n return this.uniqueIdFormElement.CONTROL_UNIQUE_ID;\n },\n first_name: CONTROL_FNAME,\n last_name: CONTROL_LNAME,\n date_of_birth: CONTROL_DOB,\n last_four_ssn: CONTROL_LAST_FOUR,\n home_zip_code: this.homeZipControl,\n work_state: CONTROL_ADDRESS_WORK_STATE\n };\n\n\n\n primaryEmployeeForm: FormGroup;\n primaryEmployeeFormControls: DisplayFormControlConfig[] = [\n CONTROL_FNAME_PRIMARY,\n CONTROL_LNAME_PRIMARY,\n CONTROL_ZIP_PRIMARY,\n CONTROL_DOB_PRIMARY,\n ]\n showCollectPrimaryForm = false;\n collectPrimary: boolean;\n\n ControlSubmissionMap: { [key: string]: EligibilityFieldsObject } = {};\n\n sub = new Subscription();\n supportNumber: string; //= Cache.getItem('supportNumber');\n employmentType: string;\n customerType: string;\n userNumber: string;\n cdnUrl: string;\n\n company: string;\n processing = false;\n aliasValidatorWithRules: ValidatorFn;\n\n showInfoModal: boolean;\n displayModal: InputInfoInterface;\n displayError: ClientConfirmationErrorCode;\n showErrorModalCloseBtn: boolean;\n showErrorModal: boolean;\n errorRedirectURL: string;\n maxRetriesExceeded: boolean;\n maxRetry = 3;\n canContinue: boolean;\n disableSubmit: boolean;\n\n formIsReady: boolean;\n\n lastName: string;\n\n processError = {\n errorId: 'identity',\n errorTitleKey: 'ERROR_GENERAL_TITLE',\n errorDescKey: 'ERROR_GENERAL_DESC',\n ctaKey: 'OK'\n }\n\n hasConsent: boolean;\n consentPath: string;\n\n displayDefaultIcon = false;\n\n @Output() backEmitted = new EventEmitter();\n\n skipAccountCreation: boolean;\n utmVal: any;\n\n @HostListener('click', ['$event'])\n onClick(event: Event) {\n const target = event.target as HTMLElement;\n if (target.nodeName === 'A' && target.classList.contains('track-me')) {\n const aTarget = target as HTMLAnchorElement;\n this.analytics.logEvent('link_tapped', {company: this.companyService.getCompany(), url: aTarget.href})\n }\n }\n\n constructor(\n private analytics: FirebaseService,\n private companyService: CompanyService,\n private registrationService: RegistrationService,\n private requiredVerificationService: RequiredVerificationService,\n private env: Environment,\n private termsService: TermsService,\n private router: Router,\n private clientConfirmationService: ClientConfirmationService,\n private cacheStorageSvc: CacheStorageService,\n private bsCacheService: BsCacheService,\n private bsAuthService: BsAuthService\n ) {\n }\n\n ngOnInit() {\n\n forkJoin([\n from(this.cacheStorageSvc.getItem('supportNumber')),\n from(this.bsCacheService.getItem('employmentType')),\n from(this.bsCacheService.getItem('utm_term')),\n from(this.bsCacheService.getItem('FAHOURS')),\n from(this.bsCacheService.getItem('customerType'))\n ])\n .subscribe( ([supportNumber,employmentType,utmVal,faHours,customerType]) => {\n this.supportNumber = supportNumber;\n this.employmentType = this.registrationService.referralItems?.employmentType ?? employmentType;\n this.utmVal = utmVal;\n this.faHours = faHours;\n this.customerType = customerType;\n this.skipAccountCreation = this.registrationService.skipAccountCreation;\n this.homeZipControl.labelKey = 'ZIP_CODE';\n this.sub.add(\n from(this.bsAuthService.fetchUserAttributes()).subscribe((attributes) => {\n if (!attributes) return;\n if (attributes && attributes.last_name) this.lastName = attributes.last_name;\n this.launchCheck();\n })\n );\n });\n }\n\n launchCheck() {\n\n if (this.analyticEventProps) {\n this.mainAnalytics = {event_name: this.analyticName, custom: this.analyticEventProps}\n } else {\n this.mainAnalytics = {event_name: this.analyticName};\n }\n this.cdnUrl = this.env.cdnUrl;\n this.sub.add(\n this.companyService.company.subscribe(\n value => {\n if (value && !this.company) {\n this.company = value;\n this.sub.add(\n this.requiredVerificationService.getRequiredVerifications(this.replay, this.skipAccountCreation).subscribe(\n response => {\n if (response && response.length > 0) {\n this.handleRequiredVerifications(response);\n } else {\n this.router.navigate(['/']);\n }\n }\n )\n );\n }\n }\n )\n )\n }\n\n handleRequiredVerifications(response: RequiredVerification[]) {\n\n response.forEach(required => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n let control = this.EligibilityToControls[required.eligibility_field.name];\n\n if (typeof control === \"function\") {\n control = control();\n }\n if(control && required.eligibility_field) {\n control['classes'] = 'flex-item-flexible max-form-width';\n this.formControls.push(control);\n this.ControlSubmissionMap[control.key] = required.eligibility_field;\n } else if (required.eligibility_field && required.eligibility_field.sub_fields) {\n required.eligibility_field.sub_fields.forEach( (value, index) => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const selectedControl = this.EligibilityToControls[value.name];\n if(selectedControl) {\n selectedControl['classes'] = 'flex-item-half';\n this.formControls.push(selectedControl);\n this.ControlSubmissionMap[selectedControl.key] = value;\n }\n })\n }\n\n });\n this.setUpForm();\n }\n\n setUpForm() {\n const controls: { [key: string]: FormControl | FormArray } = {};\n\n if (this.requiredVerificationService.electiveProducts && this.requiredVerificationService.electiveProducts.length > 0) {\n\n this.requiredVerificationService.electiveProducts.forEach(choice => {\n this.electiveProductChoices.push({value: choice});\n });\n this.electiveProductsForm = new FormGroup(\n {selectedElectiveProduct: new FormControl('', Validators.required)}\n );\n\n if (this.utmVal) {\n for (const electiveProd in this.requiredVerificationService.electiveProducts) {\n if (electiveProd) {\n const prodString = this.requiredVerificationService.electiveProducts[electiveProd];\n if (this.utmVal.toUpperCase() === prodString.toUpperCase()) {\n this.electiveProductsForm.setValue({'selectedElectiveProduct': prodString} )\n this.productRadioChanged(true, prodString);\n break;\n }\n }\n }\n }\n\n this.showElectiveProducts = true;\n }\n\n if (this.formControls) {\n this.formControls.forEach((controlConfig: DisplayFormControlConfig) => {\n controls[controlConfig.key] = controlConfig.control;\n if (controlConfig.key === 'uniqueId') {\n this.aliasValidatorWithRules = this.aliasValidatorWithRules ? this.aliasValidatorWithRules : this.uniqueIdFormElement.aliasValidator(this.company);\n controlConfig.control.addValidators(this.aliasValidatorWithRules);\n controlConfig.control.updateValueAndValidity();\n }\n\n if (controlConfig.key.toLowerCase() === 'workstate') {\n this.sub.add(\n controlConfig.control.valueChanges.subscribe(\n value => {\n this.statesToDisplayArray = this.statesArray.filter( pickedState => pickedState.toLowerCase().startsWith(value.toLowerCase()));\n }\n )\n )\n }\n\n if (this.replay && this.ControlSubmissionMap[controlConfig.key].value) {\n controls[controlConfig.key].setValue(this.ControlSubmissionMap[controlConfig.key].value);\n }\n });\n\n if (this.uniqueIdFormElement && this.uniqueIdFormElement.aliasValidatorRules.consentsKey) {\n this.hasConsent = true;\n controls['consentItem'] = new FormControl('', [Validators.requiredTrue]);\n this.consentPath = `${this.cdnUrl}terms/${this.uniqueIdFormElement.aliasValidatorRules.consentsKey}.pdf`;\n }\n\n this.eligibilityForm = new FormGroup(controls);\n this.formIsReady = true;\n\n } else {\n this.showProcessErrorMessage();\n }\n }\n\n onSubmit() {\n this.processing = true;\n const errorCount = this.clientConfirmationService.errors[errorCodes.CLIENT_NOT_FOUND].errorCount ?? 0;\n const maxRetry = this.clientConfirmationService.errors[errorCodes.CLIENT_NOT_FOUND].maxRetry ?? 0;\n if (errorCount > maxRetry) {\n this.displayError = this.clientConfirmationService.errors[errorCodes.CLIENT_NOT_FOUND + '_max_retry'];\n this.showErrorModal = true;\n } else {\n this.submitConsent();\n }\n\n }\n\n submitConsent(skipPrecheck = false) {\n const consent = this.eligibilityForm.get('consentItem');\n if (consent && consent.value && this.uniqueIdFormElement.aliasValidatorRules.consentsKey) {\n this.sub.add(\n this.termsService.acceptTerms(this.uniqueIdFormElement.aliasValidatorRules.consentsKey).subscribe(\n response => {\n this.completeSubmission(skipPrecheck);\n },\n error => {\n this.showProcessErrorMessage();\n }\n )\n )\n } else if(consent && !consent.value && this.uniqueIdFormElement.aliasValidatorRules.consentsKey) {\n this.showProcessErrorMessage()\n } else {\n this.completeSubmission(skipPrecheck);\n }\n }\n\n completeSubmission(skipPrecheck = false) {\n const submissionObj: submissionObject = {\n employment_type: this.employmentType\n };\n\n for (const k in this.eligibilityForm.value) {\n if (k) {\n const key = this.ControlSubmissionMap[k];\n if (key) submissionObj[this.ControlSubmissionMap[k].api_parameter_name] = this.eligibilityForm.value[k];\n }\n }\n\n submissionObj['company'] = this.company;\n submissionObj['skip_precheck'] = skipPrecheck;\n\n if (this.replay) {\n submissionObj[\"employee_data_verification_status\"] = \"Pending\";\n }\n\n if (this.skipAccountCreation) {\n submissionObj[\"fa_referred\"] = true;\n }\n\n if (this.electiveProductChoices.length > 0) {\n const selections = this.electiveProductsForm.get('selectedElectiveProduct') as FormControl;\n\n submissionObj['elective_products'] = selections.value ? [selections.value] : [''];\n }\n\n if (this.showCollectPrimaryForm && this.primaryEmployeeForm.valid) {\n const primaryKey = 'primary_info';\n submissionObj[primaryKey] = {};\n for (const k in this.primaryEmployeeForm.value) {\n if (k) {\n switch (k) {\n case 'fName':\n submissionObj[primaryKey]['first_name'] = this.primaryEmployeeForm.value[k];\n break;\n case 'lName':\n submissionObj[primaryKey]['last_name'] = this.primaryEmployeeForm.value[k];\n break;\n case 'zipCode':\n submissionObj[primaryKey]['zip_code'] = this.primaryEmployeeForm.value[k];\n break;\n case 'dateOfBirth':\n submissionObj[primaryKey]['date_of_birth'] = this.primaryEmployeeForm.value[k];\n break;\n }\n }\n\n }\n }\n\n this.sub.add(\n this.clientConfirmationService.submitClientVerification(submissionObj).subscribe(\n response => {\n this.resolveSubmissionCompleted();\n },\n error => {\n const validationError = error.error.error;\n this.failedSubmissionHandler(validationError);\n }\n )\n );\n }\n\n resolveSubmissionCompleted() {\n this.identitySubmitted.emit(true);\n }\n\n displayInfo(controlConfig: DisplayFormControlConfig) {\n if (controlConfig.inputInfo) {\n this.displayModal = controlConfig.inputInfo;\n this.showInfoModal = true;\n }\n }\n\n clearId() {\n if (this.uniqueIdFormElement) {\n const uniqueIdFormControl = this.eligibilityForm.get(this.uniqueIdFormElement.CONTROL_UNIQUE_ID.key);\n if (uniqueIdFormControl) {\n setTimeout(() => {\n uniqueIdFormControl.setValue('');\n }, 10);\n }\n }\n }\n\n setErrorModal(errorCode: string, incrementErrorCount = false) {\n this.displayError = this.clientConfirmationService.errors[errorCode];\n if (incrementErrorCount && typeof this.clientConfirmationService.errors[errorCode].errorCount === 'number') {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.clientConfirmationService.errors[errorCode].errorCount++;\n }\n }\n\n failedSubmissionHandler(error: ClientConfirmationErrorItems) {\n switch (error.code) {\n case errorCodes.CLIENT_NOT_FOUND: {\n this.setErrorModal(error.code, (this.customerType === 'full' || this.skipAccountCreation));\n const errorCount = this.clientConfirmationService.errors[errorCodes.CLIENT_NOT_FOUND].errorCount ?? 0;\n const maxRetry = this.clientConfirmationService.errors[errorCodes.CLIENT_NOT_FOUND].maxRetry ?? 0;\n if (errorCount > maxRetry) {\n this.displayError = this.clientConfirmationService.errors[errorCodes.CLIENT_NOT_FOUND + '_max_retry'];\n }\n this.showErrorModal = true;\n break;\n }\n case errorCodes.CLIENT_NOT_IN_COHORT:\n if (error.details && error.details.out_pilot_url) {\n this.errorRedirectURL = error.details.out_pilot_url;\n }\n this.showErrorModalCloseBtn = true;\n this.setErrorModal(errorCodes.CLIENT_NOT_IN_COHORT);\n this.showErrorModal = true;\n break;\n case errorCodes.CLIENT_NOT_ELIGIBLE:\n this.showErrorModalCloseBtn = true;\n this.setErrorModal(errorCodes.CLIENT_NOT_ELIGIBLE);\n this.showErrorModal = true;\n break;\n case errorCodes.CLIENT_EXISTS_UNIQUEID:\n this.setErrorModal(error.code);\n this.showErrorModal = true;\n this.clearId();\n break;\n case errorCodes.INVALID_UNIQUEID: {\n this.setErrorModal(errorCodes.INVALID_UNIQUEID, true);\n const errorCount = this.clientConfirmationService.errors[errorCodes.INVALID_UNIQUEID].errorCount ?? 0;\n const maxRetry = this.clientConfirmationService.errors[errorCodes.INVALID_UNIQUEID].maxRetry ?? 0;\n this.maxRetriesExceeded = errorCount >= maxRetry;\n this.canContinue = this.maxRetriesExceeded && this.uniqueIdFormElement.aliasValidatorRules.allowDoesNotExist ? true : false;\n if (this.maxRetriesExceeded) {\n this.showMaxRetriesModal();\n break;\n }\n this.showErrorModal = true;\n this.clearId();\n break;\n }\n case errorCodes.CLIENT_ALREADY_VERIFIED:\n this.resolveSubmissionCompleted();\n break;\n case errorCodes.CLIENT_EXISTS_PII:\n this.userNumber = error.details ? error.details.existing_phone_number : '';\n this.setErrorModal(errorCodes.CLIENT_EXISTS_PII);\n this.showErrorModal = true;\n break;\n case errorCodes.HOUSEHOLD_CLIENT_NOT_FOUND: {\n this.setErrorModal(errorCodes.HOUSEHOLD_CLIENT_NOT_FOUND, true);\n const errorCount = this.clientConfirmationService.errors[errorCodes.HOUSEHOLD_CLIENT_NOT_FOUND].errorCount ?? 0;\n const maxRetry = this.clientConfirmationService.errors[errorCodes.HOUSEHOLD_CLIENT_NOT_FOUND].maxRetry ?? 0;\n if (errorCount > maxRetry) {\n this.displayError = this.clientConfirmationService.errors[errorCodes.HOUSEHOLD_CLIENT_NOT_FOUND + '_get_primary'];\n this.collectPrimary = true;\n }\n this.showErrorModal = true;\n break;\n }\n case errorCodes.INVALID_PII: {\n this.setErrorModal(error.code, true);\n const errorCount = this.clientConfirmationService.errors[error.code].errorCount ?? 0;\n const maxRetry = this.clientConfirmationService.errors[error.code].maxRetry ?? 0;\n if (errorCount > maxRetry) {\n this.displayError = this.clientConfirmationService.errors[error.code + '_max_retry'];\n }\n this.showErrorModal = true;\n break;\n }\n case errorCodes.PRIMARY_EMPLOYEE_WRONG_COMPANY:\n case errorCodes.PRIMARY_EMPLOYEE_NOT_FOUND:\n case errorCodes.PRIMARY_EMPLOYEE_NOT_ELIGIBLE:\n this.setErrorModal(error.code);\n this.showErrorModal = true;\n break;\n default:\n this.showProcessErrorMessage();\n break;\n }\n }\n\n closeErrorModal(isCTA = false) {\n this.showErrorModalCloseBtn = false;\n if (this.displayError.ctaPath) {\n if (this.displayError.errorId==='client_not_found_max_attempts_blocked') {\n this.bsAuthService.logout().subscribe();\n return;\n }\n this.router.navigate([this.displayError.ctaPath]);\n return;\n }\n if (this.collectPrimary) {\n this.createCollectPrimaryForm();\n return;\n }\n if (this.canContinue) {\n this.submitConsent(true);\n } else {\n this.processing = false\n }\n\n if (isCTA && this.errorRedirectURL) {\n window.location.href = this.errorRedirectURL;\n }\n\n this.showErrorModal = false;\n }\n\n createCollectPrimaryForm() {\n const controls: { [key: string]: FormControl } = {};\n this.primaryEmployeeFormControls.forEach((controlConfig: DisplayFormControlConfig) => {\n controls[controlConfig.key] = controlConfig.control;\n });\n this.primaryEmployeeForm = new FormGroup(controls);\n this.showCollectPrimaryForm = true;\n this.showErrorModal = false;\n this.processing = false;\n }\n\n showMaxRetriesModal() {\n this.bsCacheService.setItem('uniqueIdRetriesExceeded', true, { expires: moment().add(6000, 'seconds').valueOf() });\n this.displayError = this.canContinue ? this.clientConfirmationService.errors['maxSoft'] : this.clientConfirmationService.errors['max'];\n this.disableSubmit = true;\n this.showErrorModal = true;\n }\n\n showProcessErrorMessage() {\n this.canContinue = false;\n this.processing = false;\n this.displayError = this.processError;\n this.showErrorModal = true;\n this.disableSubmit = false;\n }\n\n stateClicked(stateString: string, controlRef: DisplayFormControlConfig) {\n controlRef.hasFocus = false;\n const workingStateControl = this.eligibilityForm.get('workState');\n if (workingStateControl) {\n workingStateControl.setValue(stateString);\n this.selectedState = stateString;\n }\n }\n\n productRadioChanged(event: boolean, value: string) {\n const products: FormControl = this.electiveProductsForm.get('selectedElectiveProduct') as FormControl;\n this.selectedProducts = products.value.toString();\n }\n\n programContinue() {\n this.showElectiveProducts = false;\n }\n\n backClicked() {\n if (this.electiveProductChoices.length > 0 && !this.showElectiveProducts) {\n this.showElectiveProducts = true;\n } else {\n this.backEmitted.emit();\n }\n }\n\n ngOnDestroy() {\n this.sub.unsubscribe();\n }\n\n\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FeatureFlagPipe } from './FeatureFlag/feature-flag.pipe';\n\n@NgModule({\n imports: [\n CommonModule,\n ],\n declarations: [\n FeatureFlagPipe,\n ],\n exports: [\n\n ]\n})\nexport class DesktopDataAccessCoreServicesModule {}\n","import { Injectable } from '@angular/core';\nimport {\n ActivatedRouteSnapshot,\n CanActivate,\n Route,\n Router,\n RouterStateSnapshot,\n UrlSegment,\n UrlTree\n} from '@angular/router';\nimport {Observable, of} from 'rxjs';\nimport {FeatureFlagService} from \"@brightside-web/desktop/data-access/core-services\";\nimport {map} from \"rxjs/operators\";\ninterface FeatureFlagKillSwitchResolverInterface {\n flag: string | string[];\n flagDefault?:boolean;\n toOnTrue?: string[];\n toOnFalse?: string[];\n allowIfFalse?: boolean;\n}\n@Injectable({\n providedIn: 'root'\n})\nexport class FeatureFlagKillSwitchGuard implements CanActivate {\n\n constructor(\n private featureFlagSvc: FeatureFlagService,\n private router: Router\n ) {}\n\n\n canActivate(\n route: ActivatedRouteSnapshot,\n state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {\n return this.checkFeatureFlag(route);\n }\n\n canLoad(\n route: Route,\n segments: UrlSegment[]): Observable<boolean> | Promise<boolean> | boolean {\n return this.checkFeatureFlag(route);\n }\n\n canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {\n return this.checkFeatureFlag(childRoute);\n }\n\n checkFeatureFlag(route: Route|ActivatedRouteSnapshot): Observable<boolean> | boolean {\n if (route.data?.featureFlagInfo) {\n const flagInfo = route.data?.featureFlagInfo as FeatureFlagKillSwitchResolverInterface;\n const flagsArray: string[] = typeof flagInfo.flag === 'string' ? [flagInfo.flag] : flagInfo.flag;\n return this.featureFlagSvc.checkMultipleFlags(flagsArray).pipe(\n map((boolResult: boolean) => this.killSwitchLogic(boolResult, flagInfo))\n );\n } else {\n console.warn('This guard requires data.featureFlagInfo');\n return of(false);\n }\n }\n\n killSwitchLogic(boolResult:boolean, flagInfo:FeatureFlagKillSwitchResolverInterface) : boolean {\n if (boolResult) {\n if (flagInfo.toOnTrue) {\n this.router.navigate(flagInfo.toOnTrue);\n return false;\n } else {\n // this guy means that if the flag is true we shouldn't go there\n if (flagInfo.allowIfFalse) {\n return false;\n }\n return true;\n }\n } else {\n if (flagInfo.toOnFalse) {\n this.router.navigate(flagInfo.toOnFalse);\n return false;\n } else if (flagInfo.allowIfFalse) {\n return true;\n }\n this.router.navigate(['home']);\n return false;\n }\n }\n}\n","import {inject, Injectable} from '@angular/core';\n\nimport {AuthService as Auth0Service} from '@auth0/auth0-angular';\nimport {BehaviorSubject, Observable, of, switchMap} from 'rxjs';\nimport {catchError, map} from \"rxjs/operators\";\nimport {BsHubService} from \"../Hub/bs-hub.service\";\nimport {\n ProfileService\n} from \"@brightside-web/desktop/data-access/shared\";\n\nexport interface UserAttributesInterface {\n guid: string;\n intercom_external_id: string;\n last_name: string;\n first_name: string;\n phone_number: string;\n email: string;\n locale: string;\n company: string;\n sf_contact_id: string;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class BsAuthService {\n\n\n private _reloginErrors: string[] = ['Unknown or invalid refresh token.'];\n private _auth0Service: Auth0Service = inject(Auth0Service);\n private _bsHubService: BsHubService = inject(BsHubService);\n private _profileService: ProfileService = inject(ProfileService);\n\n private _userLoggedInSubject = new BehaviorSubject<boolean>(false);\n private _userLoggedOutSubject = new BehaviorSubject<boolean>(false);\n\n private _defaultScope= 'openid profile email phone_number read:current_user read:current_user_metadata offline_access'\n\n private storedAccessToken: string;\n private overrideIsAuthenticated: boolean | null = null;\n\n constructor() {\n this.isAuthenticated().subscribe(authenticated => {\n if (authenticated) {\n this.notifyUserLoggedIn();\n } else {\n this.notifyUserLoggedOut();\n }\n });\n this._auth0Service.error$.subscribe(\n errors => {\n if (this._reloginErrors.includes(errors.message)) {\n this.login();\n } else {\n /** errors logging in don't always result in the\n * Auth0 information clearing, so we log out.\n */\n this.logout().subscribe();\n }\n }\n )\n }\n\n getUserLoggedInEvent(): Observable<boolean> {\n return this._userLoggedInSubject.asObservable();\n }\n\n getUserLoggedOutEvent(): Observable<boolean> {\n return this._userLoggedOutSubject.asObservable();\n }\n\n notifyUserLoggedIn() {\n this._userLoggedInSubject.next(true);\n this._userLoggedOutSubject.next(false);\n this._bsHubService.dispatch('bsAuth', { event: 'signedIn' });\n }\n\n notifyUserLoggedOut() {\n this._userLoggedInSubject.next(false);\n this._userLoggedOutSubject.next(true);\n this._bsHubService.dispatch('bsAuth', { event: 'signedOut' });\n }\n\n login(prompt: 'login' | 'signup' | 'none' | string = 'login', additionalScope: string = '', redirectRoute?: string): void {\n this.overrideIsAuthenticated = null;\n this._auth0Service.loginWithRedirect({\n authorizationParams: {\n screen_hint: prompt,\n scope: this._defaultScope + ' ' + additionalScope,\n redirect_uri: window.location.origin + '/authenticating',\n },\n });\n }\n\n logout(): Observable<void> {\n\n const logoutOptions = {\n logoutParams: {\n returnTo: window.location.origin\n }\n };\n\n return new Observable<void>((observer) => {\n const logoutSubscription = this._auth0Service.logout(logoutOptions).subscribe({\n next: () => {\n this.overrideIsAuthenticated = null;\n observer.next();\n observer.complete();\n },\n error: (error: any) => {\n observer.error(error);\n console.error('Error logging out', error);\n }\n });\n return () => {\n logoutSubscription.unsubscribe();\n };\n });\n }\n\n isAuthenticated(): Observable<boolean> {\n if (typeof this.overrideIsAuthenticated === 'boolean') {\n return of(this.overrideIsAuthenticated);\n }\n return this._auth0Service.isAuthenticated$;\n }\n\n getToken(): Observable<string> {\n return this.isAuthenticated().pipe(\n switchMap(authenticated => {\n if (authenticated) {\n if (this.storedAccessToken) return of(this.storedAccessToken);\n return this._auth0Service.getAccessTokenSilently({\n authorizationParams: {\n scope: 'openid profile email phone_number read:current_user read:current_user_metadata offline_access'\n }\n }\n ).pipe(\n map(token => token ?? ''),\n catchError(error => {\n console.error('Error retrieving token:', error);\n return of('');\n })\n );\n } else {\n return of('');\n }\n })\n );\n }\n\n getIdTokenClaims() {\n return this._auth0Service.idTokenClaims$;\n }\n\n fetchUserAttributes(force = false): Observable<UserAttributesInterface> {\n return this._profileService.getProfile(force);\n }\n\n setAccessTokenForMicroApps(accessToken: string) {\n this.storedAccessToken = accessToken;\n this.overrideIsAuthenticated = true;\n this.notifyUserLoggedIn();\n }\n\n changePassword() {\n this.login('login', 'change_password', '');\n }\n\n changePhoneNumber() {\n this.login('login', 'change_phone_number', '');\n }\n\n changeEmailAddress() {\n this.login('login', 'change_email_address', '');\n }\n}\n","import { Injectable } from '@angular/core';\nimport { HttpClient, HttpErrorResponse } from '@angular/common/http';\n\nimport {InjectedInformation} from \"@brightside-web/micro/core/authorization\";\nimport {DocumentType} from \"@aws-amplify/core/dist/esm/libraryUtils\";\nimport {Environment} from \"@micro-core/environment\";\nimport {BsAuthService} from \"../Auth/bs-auth.service\";\nimport { firstValueFrom, throwError } from 'rxjs';\nimport { error } from 'ng-packagr/lib/utils/log';\nimport { catchError } from 'rxjs/operators';\n\n\ndeclare let Injected: InjectedInformation;\ndeclare global {\n interface Window {\n Injected: InjectedInformation;\n }\n}\n\nexport interface WrapperRestApiOptionsBase {\n headers?: any;\n params?: Record<string, string>;\n body?: DocumentType | FormData | any;\n withCredentials?: boolean;\n responseType?:string;\n}\n\nexport interface RestApiOptionsExtended extends WrapperRestApiOptionsBase {\n [key: string]: any;\n}\n@Injectable({\n providedIn: 'root'\n})\nexport class AwsApiWrapperService {\n\n unauthMsg = 'User is not authorized to access this resource with an explicit deny';\n\n constructor(\n private _http: HttpClient,\n private _env: Environment,\n private bsAuthService: BsAuthService\n ) { }\n\n handleError(err: HttpErrorResponse) {\n if (err.status === 403 && err.message === this.unauthMsg) {\n this.forceLogout()\n }\n return throwError(err);\n }\n\n async get(apiName: string, path: string, init?: RestApiOptionsExtended, responseType?:string): Promise<any> {\n const requestObj = await this._createRequestObj(apiName, init, responseType);\n if (!requestObj) {\n // if the user Auth is undefined then we don't have a user and can't call api-mobile\n // without throwing an error\n return false;\n }\n return this._http.get(\n `${this._env.awsmobile.endpoints[apiName].endpoint}${path}`,\n requestObj).pipe(catchError(this.handleError)).toPromise();\n }\n\n\n async put(apiName: string, path: string, init?: RestApiOptionsExtended): Promise<any> {\n const requestObj = await this._createRequestObj(apiName, init);\n if (!requestObj) {\n // if the user Auth is undefined then we don't have a user and can't call api-mobile\n // without throwing an error\n return false;\n }\n return this._http.put(\n `${this._env.awsmobile.endpoints[apiName].endpoint}${path}`,\n init?.body ?? {},\n requestObj).pipe(catchError(this.handleError)).toPromise();\n }\n\n async post(apiName: string, path: string, init?: RestApiOptionsExtended): Promise<any> {\n const requestObj = await this._createRequestObj(apiName, init);\n if (!requestObj) {\n // if the user Auth is undefined then we don't have a user and can't call api-mobile\n // without throwing an error\n return false;\n }\n return this._http.post(\n `${this._env.awsmobile.endpoints[apiName].endpoint}${path}`,\n init?.body ?? {},\n requestObj).pipe(catchError(this.handleError)).toPromise();\n }\n\n async patch(apiName: string, path: string, init?: RestApiOptionsExtended): Promise<any> {\n const requestObj = await this._createRequestObj(apiName, init);\n if (!requestObj) {\n // if the user Auth is undefined then we don't have a user and can't call api-mobile\n // without throwing an error\n return false;\n }\n return this._http.patch(\n `${this._env.awsmobile.endpoints[apiName].endpoint}${path}`,\n init?.body ?? {},\n requestObj).pipe(catchError(this.handleError)).toPromise();\n }\n\n async del(apiName: string, path: string, init?: RestApiOptionsExtended): Promise<any> {\n const requestObj = await this._createRequestObj(apiName, init);\n if (!requestObj) {\n // if the user Auth is undefined then we don't have a user and can't call api-mobile\n // without throwing an error\n return false;\n }\n return this._http.delete(\n `${this._env.awsmobile.endpoints[apiName].endpoint}${path}`,\n requestObj).pipe(catchError(this.handleError)).toPromise();\n }\n\n async _createRequestObj(apiName: string, init: RestApiOptionsExtended | undefined, responseType?:string): Promise<any> {\n if (!this._env.awsmobile.endpoints[apiName]) {\n throw Error('Api endpoint doesn\\'t exist');\n }\n const dynamicHeaders = await this._getHeaders(apiName);\n if (dynamicHeaders.Authorization === 'undefined' && apiName === 'api-mobile') {\n // if the user Auth is undefined then we don't have a user and can't call api-mobile\n // without throwing an error so let's stop here\n return false;\n }\n\n const finalOptions:WrapperRestApiOptionsBase = {headers: {...dynamicHeaders}};\n if (init?.queryParams) finalOptions['params'] = init.queryParams;\n if (init?.headers) finalOptions['headers'] = {...finalOptions['headers'], ...init.headers};\n if (responseType) finalOptions['responseType'] = responseType;\n\n return finalOptions;\n }\n\n async _getHeaders(apiName: string): Promise<any>{\n let headers = {}\n switch (apiName) {\n case 'api-mobile':\n headers = {\n Authorization: `Bearer ${await firstValueFrom(this.bsAuthService.getToken())}`,\n ...this.getStandardHeaders(),\n }\n break;\n case 'api-mobile-noauth':\n headers = {...this.getStandardHeaders()}\n break;\n }\n return headers;\n }\n\n getStandardHeaders = () => {\n const headers: { [key: string]: any } = {\n 'Accept': 'application/json, text/plain, application/pdf, */*',\n 'Content-Type': 'application/json',\n 'X-BS-OS-Name': 'Desktop',\n 'X-BS-Model': this.getBrowser(),\n 'X-BS-Timezone': this.getTimeZone(),\n 'X-BS-GmtOffset': `${new Date().getTimezoneOffset() / -60}`,\n 'X-BS-DeviceId': this.getDeviceId(),\n };\n\n return headers;\n };\n\n getDeviceId = () => {\n let deviceId = window.localStorage['DEVICE_ID'];\n if (!deviceId) {\n deviceId = this.generateUUID();\n window.localStorage['DEVICE_ID'] = deviceId;\n }\n return deviceId;\n };\n\n getBrowser = () => {\n const userAgent = navigator.userAgent;\n const browserMapping: { [key: string]: { validMatch: string[]; extraChecks?: Function[] } } = {\n Opera: {\n validMatch: ['Opera', 'OPR'],\n },\n Chrome: {\n validMatch: ['Chrome'],\n },\n Safari: {\n validMatch: ['Safari'],\n },\n Firefox: {\n validMatch: ['Firefox'],\n },\n IE: {\n validMatch: ['MSIE'],\n extraChecks: [() => Object.keys(document).includes('documentMode')],\n },\n };\n\n return (\n Object.keys(browserMapping).filter((key: string) => {\n const checkDetails = browserMapping[key];\n\n if (checkDetails.validMatch.some((browserName) => userAgent.includes(browserName))) {\n //If there are extra checks, make sure they all return true\n if (checkDetails.extraChecks && !checkDetails.extraChecks.every((checkFunc) => checkFunc())) {\n return false;\n }\n\n return true;\n }\n\n return false;\n })[0] || 'Unknown'\n );\n };\n\n getTimeZone = () => {\n const formatParts = Intl.DateTimeFormat('en', { timeZoneName: 'short' }).format().split(' ');\n\n return formatParts[formatParts.length - 1];\n };\n\n generateUUID = () => {\n let d = new Date().getTime(); //Timestamp\n let d2 = (typeof performance !== 'undefined' && performance.now && performance.now() * 1000) || 0; //Time in microseconds since page-load or 0 if unsupported\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n let r = Math.random() * 16; //random number between 0 and 16\n if (d > 0) {\n //Use timestamp until depleted\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line no-bitwise\n r = (d + r) % 16 | 0;\n d = Math.floor(d / 16);\n } else {\n //Use microseconds since page-load if supported\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line no-bitwise\n r = (d2 + r) % 16 | 0;\n d2 = Math.floor(d2 / 16);\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line no-bitwise\n return (c === 'x' ? r : (r & 0x3) | 0x8).toString(16);\n });\n };\n\n forceLogout() {\n this.bsAuthService.logout();\n }\n}\n\n\n//\n// const awsOptions = {\n// API : {\n// REST: {\n//\n// headers: async () => ({\n// Authorization: `${(await fetchAuthSession()).tokens?.idToken?.toString()}`,\n// ...getStandardHeaders(),\n// }),\n//\n// }\n// }\n// }\n","import { Injectable } from '@angular/core';\nimport { ConsoleLogger } from 'aws-amplify/utils'\n\n@Injectable({\n providedIn: 'root'\n})\nexport class BsLoggerService {\n constructor() {}\n log = ConsoleLogger;\n}\n","import { Injectable, Renderer2, Inject, RendererFactory2 } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport { Environment } from \"@micro-core/environment\";\nimport {BsAuthService} from \"../Auth/bs-auth.service\";\nimport { SalesforceModel } from \"./salesforce.model\";\nimport {Intercom} from \"ng-intercom\";\nimport { BehaviorSubject, filter, Observable, tap } from 'rxjs';\nimport {FeatureFlagService} from \"../FeatureFlag/feature-flag.service\";\nimport {FirebaseService, KnownFeatureFlags} from \"@brightside-web/desktop/data-access/shared\";\nimport {BsCacheService} from \"../Cache/bs-cache.service\";\nimport { Router } from '@angular/router';\nimport * as Sentry from '@sentry/angular';\nimport { take } from 'rxjs/operators';\n\ndeclare let embeddedservice_bootstrap: SalesforceModel;\n\ninterface SalesforceInterface {\n organizationId: string;\n developerName: string;\n url: string;\n scrt2URL: string;\n chatScript: string;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class BsChatService {\n\n private _chatLoaded = new BehaviorSubject<boolean>(false);\n public readonly chatLoaded: Observable<boolean> = this._chatLoaded.asObservable();\n\n private _chatConfig: SalesforceInterface;\n private _chatInitialized: boolean;\n private _chatScript: HTMLScriptElement;\n private renderer: Renderer2;\n alreadyLaunchedChat = false;\n private serviceLoaded: boolean;\n private _inMaintenance: boolean\n private _chatLoadingInProgress = false;\n\n private _rules: {rules:{ regex: string; product: string; inMaintenance: boolean }[]};\n private _productMaintenanceMap: { [product: string]: boolean } = {};\n private _guidAttempts = 0;\n\n constructor(\n private env: Environment,\n @Inject(DOCUMENT) private document: Document,\n private rendererFactory: RendererFactory2,\n private bsAuthService: BsAuthService,\n private intercom: Intercom,\n private featureFlagSvc: FeatureFlagService,\n private bsCacheService: BsCacheService,\n private analytics: FirebaseService,\n // Microapps don't like the MaintenanceService being imported into this service\n // private _maintenanceService: MaintenanceService,\n private _router: Router,\n ) {\n this.renderer = this.rendererFactory.createRenderer(null, null);\n this.analytics.ensureInitialized().then(() => {\n try {\n this._rules = JSON.parse(this.analytics.getValueAsString('domainMappingPaths'));\n this.reduceRulesToMaintenanceMap();\n } catch (e) {\n console.warn('Issue with JSON string');\n }\n });\n }\n\n loadChat() {\n if (this.env.chat && this.isSalesForceConfig(this.env.chat)) {\n this._chatConfig = this.env.chat;\n this._inMaintenance = this.isProductInMaintenance('chat');\n if (!this.alreadyLaunchedChat && !this._inMaintenance) this._initializeChat();\n } else {\n console.error('Invalid chat configuration');\n }\n }\n\n private _initializeChat() {\n this.alreadyLaunchedChat = true;\n this._chatScript = this._loadChatScript();\n this._chatScript.onload = () => {\n embeddedservice_bootstrap.settings.language = 'en_US';\n embeddedservice_bootstrap.init(\n this._chatConfig.organizationId,\n this._chatConfig.developerName,\n this._chatConfig.url,\n {\n scrt2URL: this._chatConfig.scrt2URL,\n }\n );\n\n this.serviceLoaded = true;\n window.addEventListener('onEmbeddedMessagingReady', () => {\n this._verifyUser();\n });\n\n };\n }\n\n private _verifyUser() {\n this.bsAuthService.getToken().subscribe({\n next: token => {\n if (token) {\n this.bsAuthService.fetchUserAttributes(true).subscribe({\n next: attributes => {\n if (attributes.guid) {\n // Send your identity token to Salesforce\n embeddedservice_bootstrap.userVerificationAPI.setIdentityToken({\n identityTokenType: 'JWT',\n identityToken: token\n });\n // Send data to Salesforce\n embeddedservice_bootstrap.prechatAPI.setHiddenPrechatFields({\n \"Guid\": attributes.guid,\n \"Language\": attributes.locale || \"en\",\n });\n\n // Remove any items from the previous list that you don't want to send\n embeddedservice_bootstrap.prechatAPI.removeHiddenPrechatFields();\n\n this._setUpOtherListeners();\n } else {\n if(this._guidAttempts <= 9) {\n setTimeout(() => {\n this._guidAttempts++;\n this._verifyUser();\n }, 100);\n } else {\n Sentry.withScope(scope => {\n scope.setFingerprint(['chat_guid_not_found']);\n scope.setLevel(\"warning\");\n Sentry.captureMessage('User\\'s GUID not found for chat initialization');\n });\n }\n }\n }\n })\n }\n }\n });\n }\n\n private _refreshToken() {\n this.bsAuthService.getToken().subscribe({\n next: token => {\n if (token && this.serviceLoaded) {\n this.bsAuthService.fetchUserAttributes().subscribe({\n next: () => {\n embeddedservice_bootstrap.userVerificationAPI.setIdentityToken({\n identityTokenType: 'JWT',\n identityToken: token\n });\n }\n })\n }\n }\n });\n }\n\n public showChat(): void {\n if (this._chatLoaded.value) {\n if (!this._inMaintenance) {\n this.featureFlagSvc.getFlag(KnownFeatureFlags.ENABLESALESFORCEMESSAGING)\n .pipe(\n tap(enableSalesforce => {\n if (enableSalesforce && this.serviceLoaded) {\n embeddedservice_bootstrap.utilAPI.launchChat();\n } else {\n this.intercom.show();\n }\n })\n )\n .subscribe();\n } else {\n this._router.navigate(['maintenance', 'feature']);\n }\n } else if (!this._chatLoadingInProgress) {\n this._chatLoadingInProgress = true;\n\n this.chatLoaded\n .pipe(\n filter(isLoaded => isLoaded),\n take(1)\n )\n .subscribe({\n next: () => {\n this._chatLoadingInProgress = false;\n this.showChat();\n },\n error: () => {\n this._chatLoadingInProgress = false;\n }\n });\n }\n }\n\n\n private _loadChatScript(): HTMLScriptElement {\n const script = this.renderer.createElement('script');\n script.type = 'text/javascript';\n script.src = this._chatConfig.chatScript;\n this.renderer.appendChild(this.document.body, script);\n return script;\n }\n\n clearSession() {\n if (!this._inMaintenance) {\n this.featureFlagSvc.getFlag(KnownFeatureFlags.ENABLESALESFORCEMESSAGING)\n .pipe(\n tap(enableSalesforce => {\n if (enableSalesforce && this.serviceLoaded) {\n embeddedservice_bootstrap.userVerificationAPI\n .clearSession()\n .finally(() => {\n });\n } else {\n this.intercom.shutdown();\n }\n })\n )\n .subscribe();\n }\n }\n\n private isSalesForceConfig(chat: any): chat is SalesforceInterface {\n return (\n chat &&\n typeof chat.organizationId === 'string' &&\n typeof chat.developerName === 'string' &&\n typeof chat.url === 'string' &&\n typeof chat.scrt2URL === 'string' &&\n typeof chat.chatScript === 'string'\n );\n }\n\n private _setUpOtherListeners() {\n this._chatLoaded.next(true);\n\n window.addEventListener('onEmbeddedMessagingConversationStarted', (data) => {\n // console.log('ken checking onEmbeddedMessagingConversationStarted', data);\n })\n\n window.addEventListener('onEmbeddedMessagingIdentityTokenExpired', () => {\n this._refreshToken();\n });\n\n window.addEventListener('onEmbeddedMessagingWindowMinimized',() => {\n this.analytics.logEvent('chat_dismissed', {}, true);\n });\n\n window.addEventListener('onEmbeddedMessagingWindowMaximized',() => {\n this._setUpClickWatcher();\n this.bsCacheService.getItem('fromOnboarding').then(\n fromOnboarding => {\n if (fromOnboarding === true) {\n this.analytics.logEvent('chat_shown', { source: 'onboarding' }, true);\n this.bsCacheService.removeItem('fromOnboarding');\n } else {\n this.analytics.logEvent('chat_shown', { source: 'client' }, true);\n }\n }\n )\n });\n }\n\n private _setUpClickWatcher() {\n window.addEventListener('message', (event) => {\n // console.log('ken is here listening to messages', event);\n\n // Handle the message as described above\n });\n // const maxRetryAttempts = 5;\n // let retriesCompleted = 0;\n // console.log('ken is in setUpClickWatcher');\n // const tryToConnectWatcher = () => {\n // console.log('ken is in tryToConnectWatcher');\n // setTimeout(() => {\n // try {\n // console.log('ken is in tryToConnectWatcher timeout try', retriesCompleted);\n // const embeddedMessenger = document.getElementById('embeddedMessagingFrame') as HTMLIFrameElement;\n // const contentWindow = embeddedMessenger.contentWindow;\n // if (contentWindow) {\n // contentWindow.removeEventListener(`click`, () => {});\n // contentWindow.addEventListener(`click`, (e: any) => {\n // const origin = e.target.closest('a') as HTMLAnchorElement;\n // if (origin && origin.href.includes('gobrightside://')) {\n // e.preventDefault();\n // console.log('ken has clicked');\n // // this.internalLinkRouting.routeToLink(origin.href);\n // }\n // });\n // }\n // console.log('ken here', embeddedMessenger, contentWindow);\n // } catch (e) {\n // console.log('ken is in tryToConnectWatcher timeout catch', e);\n // if (maxRetryAttempts > 0 && maxRetryAttempts < retriesCompleted) {\n // return;\n // }\n //\n // setTimeout(() => {\n // tryToConnectWatcher();\n // retriesCompleted++;\n // }, 1000);\n // }\n //\n // }, 1000);\n // }\n // tryToConnectWatcher();\n }\n\n // Microapps don't like the MaintenanceService being imported into this service\n private reduceRulesToMaintenanceMap() {\n this._rules.rules.forEach(rule => {\n const { product, inMaintenance } = rule;\n if (inMaintenance) {\n this._productMaintenanceMap[product] = true;\n } else if (!(product in this._productMaintenanceMap)) {\n this._productMaintenanceMap[product] = false;\n }\n });\n }\n\n public isProductInMaintenance(productType: string): boolean {\n return this._productMaintenanceMap[productType] || false;\n }\n}\n","//! moment.js locale configuration\n//! locale : Tamil [ta]\n//! author : Arjunkumar Krishnamoorthy : https://github.com/tk120404\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '௧',\n 2: '௨',\n 3: '௩',\n 4: '௪',\n 5: '௫',\n 6: '௬',\n 7: '௭',\n 8: '௮',\n 9: '௯',\n 0: '௦',\n },\n numberMap = {\n '௧': '1',\n '௨': '2',\n '௩': '3',\n '௪': '4',\n '௫': '5',\n '௬': '6',\n '௭': '7',\n '௮': '8',\n '௯': '9',\n '௦': '0',\n };\n\n var ta = moment.defineLocale('ta', {\n months: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(\n '_'\n ),\n monthsShort:\n 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(\n '_'\n ),\n weekdays:\n 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split(\n '_'\n ),\n weekdaysShort: 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split(\n '_'\n ),\n weekdaysMin: 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, HH:mm',\n LLLL: 'dddd, D MMMM YYYY, HH:mm',\n },\n calendar: {\n sameDay: '[இன்று] LT',\n nextDay: '[நாளை] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[நேற்று] LT',\n lastWeek: '[கடந்த வாரம்] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s இல்',\n past: '%s முன்',\n s: 'ஒரு சில விநாடிகள்',\n ss: '%d விநாடிகள்',\n m: 'ஒரு நிமிடம்',\n mm: '%d நிமிடங்கள்',\n h: 'ஒரு மணி நேரம்',\n hh: '%d மணி நேரம்',\n d: 'ஒரு நாள்',\n dd: '%d நாட்கள்',\n M: 'ஒரு மாதம்',\n MM: '%d மாதங்கள்',\n y: 'ஒரு வருடம்',\n yy: '%d ஆண்டுகள்',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}வது/,\n ordinal: function (number) {\n return number + 'வது';\n },\n preparse: function (string) {\n return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n // refer http://ta.wikipedia.org/s/1er1\n meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,\n meridiem: function (hour, minute, isLower) {\n if (hour < 2) {\n return ' யாமம்';\n } else if (hour < 6) {\n return ' வைகறை'; // வைகறை\n } else if (hour < 10) {\n return ' காலை'; // காலை\n } else if (hour < 14) {\n return ' நண்பகல்'; // நண்பகல்\n } else if (hour < 18) {\n return ' எற்பாடு'; // எற்பாடு\n } else if (hour < 22) {\n return ' மாலை'; // மாலை\n } else {\n return ' யாமம்';\n }\n },\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'யாமம்') {\n return hour < 2 ? hour : hour + 12;\n } else if (meridiem === 'வைகறை' || meridiem === 'காலை') {\n return hour;\n } else if (meridiem === 'நண்பகல்') {\n return hour >= 10 ? hour : hour + 12;\n } else {\n return hour + 12;\n }\n },\n week: {\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 });\n\n return ta;\n\n})));\n","import { Component, EventEmitter, OnDestroy, OnInit, Output } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { FirebaseService, NotificationService } from '@brightside-web/desktop/data-access/shared';\nimport { ToastService } from '@brightside/brightside-ui-services';\nimport { BsHubService } from '@brightside-web/desktop/data-access/core-services';\n\n@Component({\n selector: 'brightside-web-mobile-app-modal',\n templateUrl: './mobile-app-modal.component.html',\n styleUrls: ['./mobile-app-modal.component.scss'],\n})\nexport class MobileAppModalComponent implements OnInit, OnDestroy {\n private sub = new Subscription();\n constructor(\n private notificationService: NotificationService,\n private toastService: ToastService,\n private firebaseService: FirebaseService,\n private bsHubService: BsHubService\n ) {}\n @Output() ctaClick = new EventEmitter();\n processing: any;\n ngOnInit(): void {\n this.bsHubService.listen('ErrorChannel', () => {\n this.onRetryEvent();\n });\n }\n\n handleTextMobileLink() {\n this.processing = true;\n this.sub.add(\n this.notificationService.generateDynamicLink('Chat', 'chat').subscribe(\n () => {\n this.processing = false;\n this.ctaClick.emit('submit');\n },\n () => {\n this.processing = false;\n this.toastService.error('Looks like something went wrong with Text Me Link. ', { link: 'Retry', transient: false });\n this.firebaseService.logEvent('error_shown', { 'error id': 'text_mobile_link' });\n }\n )\n );\n }\n\n ngOnDestroy(): void {\n this.sub.unsubscribe();\n }\n\n private onRetryEvent() {\n this.toastService.success('Attempting retry of Text Me Link.');\n this.handleTextMobileLink();\n }\n}\n","<bw-modal\n (closeModal)=\"ctaClick.emit('close')\"\n [brightsideWebFb]=\"{ event_name: 'magic_link_modal_shown' }\"\n>\n <typography title-medium color=\"var(--gray-70)\">{{ 'NOT_AVAILABLE_ON_WEB_TITLE' | translate }}</typography>\n <section class=\"body\">\n <bw-paragraph [textStyle]=\"'Body2'\" color=\"var(--gray-50)\">\n {{ 'NOT_AVAILABLE_ON_WEB_DESC' | translate }}\n </bw-paragraph>\n <bw-paragraph [textStyle]=\"'Body2'\" color=\"var(--gray-50)\">\n {{ 'DONT_HAVE_APP' | translate }}\n </bw-paragraph>\n </section>\n <footer class=\"footer\">\n <div class=\"flex-row row-reverse\">\n <button\n bw-button\n (click)=\"handleTextMobileLink()\"\n [brightsideWebFb]=\"{ event_name: 'magic_link_modal_tapped', action: 'click' }\"\n [processing]=\"processing\"\n >\n {{ 'TEXT_ME' | translate }}\n </button>\n <a\n bw-anchor\n (click)=\"ctaClick.emit('cancel')\"\n style=\"margin: 0 16px;\"\n [brightsideWebFb]=\"{ event_name: 'magic_link_modal_dismissed', action: 'click' }\"\n [dismissedCta]=\"true\">\n {{ 'BUTTON_CANCEL' | translate }}</a>\n </div>\n </footer>\n</bw-modal>\n","import { mergeMap } from './mergeMap';\nimport { identity } from '../util/identity';\nexport function mergeAll(concurrent = Infinity) {\n return mergeMap(identity, concurrent);\n}\n","import { Deferred } from '@firebase/util';\n\n/**\n * Component for service name T, e.g. `auth`, `auth-internal`\n */\nclass Component {\n /**\n *\n * @param name The public service name, e.g. app, auth, firestore, database\n * @param instanceFactory Service factory responsible for creating the public interface\n * @param type whether the service provided by the component is public or private\n */\n constructor(name, instanceFactory, type) {\n this.name = name;\n this.instanceFactory = instanceFactory;\n this.type = type;\n this.multipleInstances = false;\n /**\n * Properties to be added to the service namespace\n */\n this.serviceProps = {};\n this.instantiationMode = \"LAZY\" /* InstantiationMode.LAZY */;\n this.onInstanceCreated = null;\n }\n setInstantiationMode(mode) {\n this.instantiationMode = mode;\n return this;\n }\n setMultipleInstances(multipleInstances) {\n this.multipleInstances = multipleInstances;\n return this;\n }\n setServiceProps(props) {\n this.serviceProps = props;\n return this;\n }\n setInstanceCreatedCallback(callback) {\n this.onInstanceCreated = callback;\n return this;\n }\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 */\nconst DEFAULT_ENTRY_NAME = '[DEFAULT]';\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 * Provider for instance for service name T, e.g. 'auth', 'auth-internal'\n * NameServiceMapping[T] is an alias for the type of the instance\n */\nclass Provider {\n constructor(name, container) {\n this.name = name;\n this.container = container;\n this.component = null;\n this.instances = new Map();\n this.instancesDeferred = new Map();\n this.instancesOptions = new Map();\n this.onInitCallbacks = new Map();\n }\n /**\n * @param identifier A provider can provide multiple instances of a service\n * if this.component.multipleInstances is true.\n */\n get(identifier) {\n // if multipleInstances is not supported, use the default name\n const normalizedIdentifier = this.normalizeInstanceIdentifier(identifier);\n if (!this.instancesDeferred.has(normalizedIdentifier)) {\n const deferred = new Deferred();\n this.instancesDeferred.set(normalizedIdentifier, deferred);\n if (this.isInitialized(normalizedIdentifier) ||\n this.shouldAutoInitialize()) {\n // initialize the service if it can be auto-initialized\n try {\n const instance = this.getOrInitializeService({\n instanceIdentifier: normalizedIdentifier\n });\n if (instance) {\n deferred.resolve(instance);\n }\n }\n catch (e) {\n // when the instance factory throws an exception during get(), it should not cause\n // a fatal error. We just return the unresolved promise in this case.\n }\n }\n }\n return this.instancesDeferred.get(normalizedIdentifier).promise;\n }\n getImmediate(options) {\n var _a;\n // if multipleInstances is not supported, use the default name\n const normalizedIdentifier = this.normalizeInstanceIdentifier(options === null || options === void 0 ? void 0 : options.identifier);\n const optional = (_a = options === null || options === void 0 ? void 0 : options.optional) !== null && _a !== void 0 ? _a : false;\n if (this.isInitialized(normalizedIdentifier) ||\n this.shouldAutoInitialize()) {\n try {\n return this.getOrInitializeService({\n instanceIdentifier: normalizedIdentifier\n });\n }\n catch (e) {\n if (optional) {\n return null;\n }\n else {\n throw e;\n }\n }\n }\n else {\n // In case a component is not initialized and should/cannot be auto-initialized at the moment, return null if the optional flag is set, or throw\n if (optional) {\n return null;\n }\n else {\n throw Error(`Service ${this.name} is not available`);\n }\n }\n }\n getComponent() {\n return this.component;\n }\n setComponent(component) {\n if (component.name !== this.name) {\n throw Error(`Mismatching Component ${component.name} for Provider ${this.name}.`);\n }\n if (this.component) {\n throw Error(`Component for ${this.name} has already been provided`);\n }\n this.component = component;\n // return early without attempting to initialize the component if the component requires explicit initialization (calling `Provider.initialize()`)\n if (!this.shouldAutoInitialize()) {\n return;\n }\n // if the service is eager, initialize the default instance\n if (isComponentEager(component)) {\n try {\n this.getOrInitializeService({ instanceIdentifier: DEFAULT_ENTRY_NAME });\n }\n catch (e) {\n // when the instance factory for an eager Component throws an exception during the eager\n // initialization, it should not cause a fatal error.\n // TODO: Investigate if we need to make it configurable, because some component may want to cause\n // a fatal error in this case?\n }\n }\n // Create service instances for the pending promises and resolve them\n // NOTE: if this.multipleInstances is false, only the default instance will be created\n // and all promises with resolve with it regardless of the identifier.\n for (const [instanceIdentifier, instanceDeferred] of this.instancesDeferred.entries()) {\n const normalizedIdentifier = this.normalizeInstanceIdentifier(instanceIdentifier);\n try {\n // `getOrInitializeService()` should always return a valid instance since a component is guaranteed. use ! to make typescript happy.\n const instance = this.getOrInitializeService({\n instanceIdentifier: normalizedIdentifier\n });\n instanceDeferred.resolve(instance);\n }\n catch (e) {\n // when the instance factory throws an exception, it should not cause\n // a fatal error. We just leave the promise unresolved.\n }\n }\n }\n clearInstance(identifier = DEFAULT_ENTRY_NAME) {\n this.instancesDeferred.delete(identifier);\n this.instancesOptions.delete(identifier);\n this.instances.delete(identifier);\n }\n // app.delete() will call this method on every provider to delete the services\n // TODO: should we mark the provider as deleted?\n async delete() {\n const services = Array.from(this.instances.values());\n await Promise.all([\n ...services\n .filter(service => 'INTERNAL' in service) // legacy services\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .map(service => service.INTERNAL.delete()),\n ...services\n .filter(service => '_delete' in service) // modularized services\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .map(service => service._delete())\n ]);\n }\n isComponentSet() {\n return this.component != null;\n }\n isInitialized(identifier = DEFAULT_ENTRY_NAME) {\n return this.instances.has(identifier);\n }\n getOptions(identifier = DEFAULT_ENTRY_NAME) {\n return this.instancesOptions.get(identifier) || {};\n }\n initialize(opts = {}) {\n const { options = {} } = opts;\n const normalizedIdentifier = this.normalizeInstanceIdentifier(opts.instanceIdentifier);\n if (this.isInitialized(normalizedIdentifier)) {\n throw Error(`${this.name}(${normalizedIdentifier}) has already been initialized`);\n }\n if (!this.isComponentSet()) {\n throw Error(`Component ${this.name} has not been registered yet`);\n }\n const instance = this.getOrInitializeService({\n instanceIdentifier: normalizedIdentifier,\n options\n });\n // resolve any pending promise waiting for the service instance\n for (const [instanceIdentifier, instanceDeferred] of this.instancesDeferred.entries()) {\n const normalizedDeferredIdentifier = this.normalizeInstanceIdentifier(instanceIdentifier);\n if (normalizedIdentifier === normalizedDeferredIdentifier) {\n instanceDeferred.resolve(instance);\n }\n }\n return instance;\n }\n /**\n *\n * @param callback - a function that will be invoked after the provider has been initialized by calling provider.initialize().\n * The function is invoked SYNCHRONOUSLY, so it should not execute any longrunning tasks in order to not block the program.\n *\n * @param identifier An optional instance identifier\n * @returns a function to unregister the callback\n */\n onInit(callback, identifier) {\n var _a;\n const normalizedIdentifier = this.normalizeInstanceIdentifier(identifier);\n const existingCallbacks = (_a = this.onInitCallbacks.get(normalizedIdentifier)) !== null && _a !== void 0 ? _a : new Set();\n existingCallbacks.add(callback);\n this.onInitCallbacks.set(normalizedIdentifier, existingCallbacks);\n const existingInstance = this.instances.get(normalizedIdentifier);\n if (existingInstance) {\n callback(existingInstance, normalizedIdentifier);\n }\n return () => {\n existingCallbacks.delete(callback);\n };\n }\n /**\n * Invoke onInit callbacks synchronously\n * @param instance the service instance`\n */\n invokeOnInitCallbacks(instance, identifier) {\n const callbacks = this.onInitCallbacks.get(identifier);\n if (!callbacks) {\n return;\n }\n for (const callback of callbacks) {\n try {\n callback(instance, identifier);\n }\n catch (_a) {\n // ignore errors in the onInit callback\n }\n }\n }\n getOrInitializeService({ instanceIdentifier, options = {} }) {\n let instance = this.instances.get(instanceIdentifier);\n if (!instance && this.component) {\n instance = this.component.instanceFactory(this.container, {\n instanceIdentifier: normalizeIdentifierForFactory(instanceIdentifier),\n options\n });\n this.instances.set(instanceIdentifier, instance);\n this.instancesOptions.set(instanceIdentifier, options);\n /**\n * Invoke onInit listeners.\n * Note this.component.onInstanceCreated is different, which is used by the component creator,\n * while onInit listeners are registered by consumers of the provider.\n */\n this.invokeOnInitCallbacks(instance, instanceIdentifier);\n /**\n * Order is important\n * onInstanceCreated() should be called after this.instances.set(instanceIdentifier, instance); which\n * makes `isInitialized()` return true.\n */\n if (this.component.onInstanceCreated) {\n try {\n this.component.onInstanceCreated(this.container, instanceIdentifier, instance);\n }\n catch (_a) {\n // ignore errors in the onInstanceCreatedCallback\n }\n }\n }\n return instance || null;\n }\n normalizeInstanceIdentifier(identifier = DEFAULT_ENTRY_NAME) {\n if (this.component) {\n return this.component.multipleInstances ? identifier : DEFAULT_ENTRY_NAME;\n }\n else {\n return identifier; // assume multiple instances are supported before the component is provided.\n }\n }\n shouldAutoInitialize() {\n return (!!this.component &&\n this.component.instantiationMode !== \"EXPLICIT\" /* InstantiationMode.EXPLICIT */);\n }\n}\n// undefined should be passed to the service factory for the default instance\nfunction normalizeIdentifierForFactory(identifier) {\n return identifier === DEFAULT_ENTRY_NAME ? undefined : identifier;\n}\nfunction isComponentEager(component) {\n return component.instantiationMode === \"EAGER\" /* InstantiationMode.EAGER */;\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 * ComponentContainer that provides Providers for service name T, e.g. `auth`, `auth-internal`\n */\nclass ComponentContainer {\n constructor(name) {\n this.name = name;\n this.providers = new Map();\n }\n /**\n *\n * @param component Component being added\n * @param overwrite When a component with the same name has already been registered,\n * if overwrite is true: overwrite the existing component with the new component and create a new\n * provider with the new component. It can be useful in tests where you want to use different mocks\n * for different tests.\n * if overwrite is false: throw an exception\n */\n addComponent(component) {\n const provider = this.getProvider(component.name);\n if (provider.isComponentSet()) {\n throw new Error(`Component ${component.name} has already been registered with ${this.name}`);\n }\n provider.setComponent(component);\n }\n addOrOverwriteComponent(component) {\n const provider = this.getProvider(component.name);\n if (provider.isComponentSet()) {\n // delete the existing provider from the container, so we can register the new component\n this.providers.delete(component.name);\n }\n this.addComponent(component);\n }\n /**\n * getProvider provides a type safe interface where it can only be called with a field name\n * present in NameServiceMapping interface.\n *\n * Firebase SDKs providing services should extend NameServiceMapping interface to register\n * themselves.\n */\n getProvider(name) {\n if (this.providers.has(name)) {\n return this.providers.get(name);\n }\n // create a Provider for a service that hasn't registered with Firebase\n const provider = new Provider(name, this);\n this.providers.set(name, provider);\n return provider;\n }\n getProviders() {\n return Array.from(this.providers.values());\n }\n}\n\nexport { Component, ComponentContainer, Provider };\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { noop } from '../util/noop';\nexport function takeUntil(notifier) {\n return operate((source, subscriber) => {\n innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, () => subscriber.complete(), noop));\n !subscriber.closed && source.subscribe(subscriber);\n });\n}\n","import { mergeAll } from '../operators/mergeAll';\nimport { innerFrom } from './innerFrom';\nimport { EMPTY } from './empty';\nimport { popNumber, popScheduler } from '../util/args';\nimport { from } from './from';\nexport function merge(...args) {\n const scheduler = popScheduler(args);\n const concurrent = popNumber(args, Infinity);\n const sources = args;\n return !sources.length\n ?\n EMPTY\n : sources.length === 1\n ?\n innerFrom(sources[0])\n :\n mergeAll(concurrent)(from(sources, scheduler));\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { Subject } from '../Subject';\nimport { SafeSubscriber } from '../Subscriber';\nimport { operate } from '../util/lift';\nexport function share(options = {}) {\n const { connector = () => new Subject(), resetOnError = true, resetOnComplete = true, resetOnRefCountZero = true } = options;\n return (wrapperSource) => {\n let connection;\n let resetConnection;\n let subject;\n let refCount = 0;\n let hasCompleted = false;\n let hasErrored = false;\n const cancelReset = () => {\n resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe();\n resetConnection = undefined;\n };\n const reset = () => {\n cancelReset();\n connection = subject = undefined;\n hasCompleted = hasErrored = false;\n };\n const resetAndUnsubscribe = () => {\n const conn = connection;\n reset();\n conn === null || conn === void 0 ? void 0 : conn.unsubscribe();\n };\n return operate((source, subscriber) => {\n refCount++;\n if (!hasErrored && !hasCompleted) {\n cancelReset();\n }\n const dest = (subject = subject !== null && subject !== void 0 ? subject : connector());\n subscriber.add(() => {\n refCount--;\n if (refCount === 0 && !hasErrored && !hasCompleted) {\n resetConnection = handleReset(resetAndUnsubscribe, resetOnRefCountZero);\n }\n });\n dest.subscribe(subscriber);\n if (!connection &&\n refCount > 0) {\n connection = new SafeSubscriber({\n next: (value) => dest.next(value),\n error: (err) => {\n hasErrored = true;\n cancelReset();\n resetConnection = handleReset(reset, resetOnError, err);\n dest.error(err);\n },\n complete: () => {\n hasCompleted = true;\n cancelReset();\n resetConnection = handleReset(reset, resetOnComplete);\n dest.complete();\n },\n });\n innerFrom(source).subscribe(connection);\n }\n })(wrapperSource);\n };\n}\nfunction handleReset(reset, on, ...args) {\n if (on === true) {\n reset();\n return;\n }\n if (on === false) {\n return;\n }\n const onSubscriber = new SafeSubscriber({\n next: () => {\n onSubscriber.unsubscribe();\n reset();\n },\n });\n return on(...args).subscribe(onSubscriber);\n}\n","const SPAN_STATUS_UNSET = 0;\nconst SPAN_STATUS_OK = 1;\nconst SPAN_STATUS_ERROR = 2;\n\n/**\n * Converts a HTTP status code into a sentry status with a message.\n *\n * @param httpStatus The HTTP response status code.\n * @returns The span status or unknown_error.\n */\n// https://develop.sentry.dev/sdk/event-payloads/span/\nfunction getSpanStatusFromHttpCode(httpStatus) {\n if (httpStatus < 400 && httpStatus >= 100) {\n return { code: SPAN_STATUS_OK };\n }\n\n if (httpStatus >= 400 && httpStatus < 500) {\n switch (httpStatus) {\n case 401:\n return { code: SPAN_STATUS_ERROR, message: 'unauthenticated' };\n case 403:\n return { code: SPAN_STATUS_ERROR, message: 'permission_denied' };\n case 404:\n return { code: SPAN_STATUS_ERROR, message: 'not_found' };\n case 409:\n return { code: SPAN_STATUS_ERROR, message: 'already_exists' };\n case 413:\n return { code: SPAN_STATUS_ERROR, message: 'failed_precondition' };\n case 429:\n return { code: SPAN_STATUS_ERROR, message: 'resource_exhausted' };\n case 499:\n return { code: SPAN_STATUS_ERROR, message: 'cancelled' };\n default:\n return { code: SPAN_STATUS_ERROR, message: 'invalid_argument' };\n }\n }\n\n if (httpStatus >= 500 && httpStatus < 600) {\n switch (httpStatus) {\n case 501:\n return { code: SPAN_STATUS_ERROR, message: 'unimplemented' };\n case 503:\n return { code: SPAN_STATUS_ERROR, message: 'unavailable' };\n case 504:\n return { code: SPAN_STATUS_ERROR, message: 'deadline_exceeded' };\n default:\n return { code: SPAN_STATUS_ERROR, message: 'internal_error' };\n }\n }\n\n return { code: SPAN_STATUS_ERROR, message: 'unknown_error' };\n}\n\n/**\n * Sets the Http status attributes on the current span based on the http code.\n * Additionally, the span's status is updated, depending on the http code.\n */\nfunction setHttpStatus(span, httpStatus) {\n span.setAttribute('http.response.status_code', httpStatus);\n\n const spanStatus = getSpanStatusFromHttpCode(httpStatus);\n if (spanStatus.message !== 'unknown_error') {\n span.setStatus(spanStatus);\n }\n}\n\nexport { SPAN_STATUS_ERROR, SPAN_STATUS_OK, SPAN_STATUS_UNSET, getSpanStatusFromHttpCode, setHttpStatus };\n","import { uuid4 } from './misc.js';\n\n/**\n * Returns a new minimal propagation context.\n *\n * @deprecated Use `generateTraceId` and `generateSpanId` instead.\n */\nfunction generatePropagationContext() {\n return {\n traceId: generateTraceId(),\n spanId: generateSpanId(),\n };\n}\n\n/**\n * Generate a random, valid trace ID.\n */\nfunction generateTraceId() {\n return uuid4();\n}\n\n/**\n * Generate a random, valid span ID.\n */\nfunction generateSpanId() {\n return uuid4().substring(16);\n}\n\nexport { generatePropagationContext, generateSpanId, generateTraceId };\n","//! moment.js locale configuration\n//! locale : French (Canada) [fr-ca]\n//! author : Jonathan Abourbih : https://github.com/jonbca\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var frCa = moment.defineLocale('fr-ca', {\n months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(\n '_'\n ),\n monthsShort:\n 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Aujourd’hui à] LT',\n nextDay: '[Demain à] LT',\n nextWeek: 'dddd [à] LT',\n lastDay: '[Hier à] LT',\n lastWeek: 'dddd [dernier à] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'dans %s',\n past: 'il y a %s',\n s: 'quelques secondes',\n ss: '%d secondes',\n m: 'une minute',\n mm: '%d minutes',\n h: 'une heure',\n hh: '%d heures',\n d: 'un jour',\n dd: '%d jours',\n M: 'un mois',\n MM: '%d mois',\n y: 'un an',\n yy: '%d ans',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(er|e)/,\n ordinal: function (number, period) {\n switch (period) {\n // Words with masculine grammatical gender: mois, trimestre, jour\n default:\n case 'M':\n case 'Q':\n case 'D':\n case 'DDD':\n case 'd':\n return number + (number === 1 ? 'er' : 'e');\n\n // Words with feminine grammatical gender: semaine\n case 'w':\n case 'W':\n return number + (number === 1 ? 're' : 'e');\n }\n },\n });\n\n return frCa;\n\n})));\n","//! moment.js locale configuration\n//! locale : Sinhalese [si]\n//! author : Sampath Sitinamaluwa : https://github.com/sampathsris\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n /*jshint -W100*/\n var si = moment.defineLocale('si', {\n months: 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split(\n '_'\n ),\n monthsShort: 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split(\n '_'\n ),\n weekdays:\n 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split(\n '_'\n ),\n weekdaysShort: 'ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන'.split('_'),\n weekdaysMin: 'ඉ_ස_අ_බ_බ්‍ර_සි_සෙ'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'a h:mm',\n LTS: 'a h:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY MMMM D',\n LLL: 'YYYY MMMM D, a h:mm',\n LLLL: 'YYYY MMMM D [වැනි] dddd, a h:mm:ss',\n },\n calendar: {\n sameDay: '[අද] LT[ට]',\n nextDay: '[හෙට] LT[ට]',\n nextWeek: 'dddd LT[ට]',\n lastDay: '[ඊයේ] LT[ට]',\n lastWeek: '[පසුගිය] dddd LT[ට]',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%sකින්',\n past: '%sකට පෙර',\n s: 'තත්පර කිහිපය',\n ss: 'තත්පර %d',\n m: 'මිනිත්තුව',\n mm: 'මිනිත්තු %d',\n h: 'පැය',\n hh: 'පැය %d',\n d: 'දිනය',\n dd: 'දින %d',\n M: 'මාසය',\n MM: 'මාස %d',\n y: 'වසර',\n yy: 'වසර %d',\n },\n dayOfMonthOrdinalParse: /\\d{1,2} වැනි/,\n ordinal: function (number) {\n return number + ' වැනි';\n },\n meridiemParse: /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,\n isPM: function (input) {\n return input === 'ප.ව.' || input === 'පස් වරු';\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'ප.ව.' : 'පස් වරු';\n } else {\n return isLower ? 'පෙ.ව.' : 'පෙර වරු';\n }\n },\n });\n\n return si;\n\n})));\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar has = Object.prototype.hasOwnProperty;\n\n/**\n * A data structure which is a combination of an array and a set. Adding a new\n * member is O(1), testing for membership is O(1), and finding the index of an\n * element is O(1). Removing elements from the set is not supported. Only\n * strings are supported for membership.\n */\nfunction ArraySet() {\n this._array = [];\n this._set = Object.create(null);\n}\n\n/**\n * Static method for creating ArraySet instances from an existing array.\n */\nArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n var set = new ArraySet();\n for (var i = 0, len = aArray.length; i < len; i++) {\n set.add(aArray[i], aAllowDuplicates);\n }\n return set;\n};\n\n/**\n * Return how many unique items are in this ArraySet. If duplicates have been\n * added, than those do not count towards the size.\n *\n * @returns Number\n */\nArraySet.prototype.size = function ArraySet_size() {\n return Object.getOwnPropertyNames(this._set).length;\n};\n\n/**\n * Add the given string to this set.\n *\n * @param String aStr\n */\nArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n var sStr = util.toSetString(aStr);\n var isDuplicate = has.call(this._set, sStr);\n var idx = this._array.length;\n if (!isDuplicate || aAllowDuplicates) {\n this._array.push(aStr);\n }\n if (!isDuplicate) {\n this._set[sStr] = idx;\n }\n};\n\n/**\n * Is the given string a member of this set?\n *\n * @param String aStr\n */\nArraySet.prototype.has = function ArraySet_has(aStr) {\n var sStr = util.toSetString(aStr);\n return has.call(this._set, sStr);\n};\n\n/**\n * What is the index of the given string in the array?\n *\n * @param String aStr\n */\nArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n var sStr = util.toSetString(aStr);\n if (has.call(this._set, sStr)) {\n return this._set[sStr];\n }\n throw new Error('\"' + aStr + '\" is not in the set.');\n};\n\n/**\n * What is the element at the given index?\n *\n * @param Number aIdx\n */\nArraySet.prototype.at = function ArraySet_at(aIdx) {\n if (aIdx >= 0 && aIdx < this._array.length) {\n return this._array[aIdx];\n }\n throw new Error('No element indexed by ' + aIdx);\n};\n\n/**\n * Returns the array representation of this set (which has the proper indices\n * indicated by indexOf). Note that this is a copy of the internal array used\n * for storing the members so that no one can mess with internal state.\n */\nArraySet.prototype.toArray = function ArraySet_toArray() {\n return this._array.slice();\n};\n\nexports.ArraySet = ArraySet;\n","export function createInvalidObservableTypeError(input) {\n return new TypeError(`You provided ${input !== null && typeof input === 'object' ? 'an invalid object' : `'${input}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`);\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer } from '@angular/platform-browser';\n\n@Pipe({\n name: 'safe'\n})\nexport class SafePipe implements PipeTransform {\n constructor(private sanitizer: DomSanitizer){}\n transform(value: any, ...args: any[]): any {\n return this.sanitizer.bypassSecurityTrustResourceUrl(value);\n }\n\n}\n","import { Injectable } from '@angular/core';\n\nexport interface UiTemplatePageTransitionAnimationLog {\n phase: string; //'start' | 'done'\n from: string;\n to: string;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class UiTemplatePageTransitionService {\n private _lastNavWasReverseExitAnimation = false;\n private _animationStackTrace: UiTemplatePageTransitionAnimationLog[][] = [];\n\n constructor() {\n (window as any).GetAnimationStack = () => this.animationStackTrace;\n }\n\n get needsReverseTransition(): boolean {\n return Boolean(this._lastNavWasReverseExitAnimation);\n }\n\n setNeedsReverseTransition(flag: boolean) {\n this._lastNavWasReverseExitAnimation = flag;\n }\n\n get animationStackTrace() {\n return this._animationStackTrace;\n }\n\n insertAnimationStackTrace(animationLogs: UiTemplatePageTransitionAnimationLog[]) {\n this.animationStackTrace.push(animationLogs);\n }\n}\n","import { EmptyError } from '../util/EmptyError';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function throwIfEmpty(errorFactory = defaultErrorFactory) {\n return operate((source, subscriber) => {\n let hasValue = false;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n hasValue = true;\n subscriber.next(value);\n }, () => (hasValue ? subscriber.complete() : subscriber.error(errorFactory()))));\n });\n}\nfunction defaultErrorFactory() {\n return new EmptyError();\n}\n","//! moment.js locale configuration\n//! locale : Romanian [ro]\n//! author : Vlad Gurdiga : https://github.com/gurdiga\n//! author : Valentin Agachi : https://github.com/avaly\n//! author : Emanuel Cepoi : https://github.com/cepem\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n ss: 'secunde',\n mm: 'minute',\n hh: 'ore',\n dd: 'zile',\n ww: 'săptămâni',\n MM: 'luni',\n yy: 'ani',\n },\n separator = ' ';\n if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) {\n separator = ' de ';\n }\n return number + separator + format[key];\n }\n\n var ro = moment.defineLocale('ro', {\n months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split(\n '_'\n ),\n monthsShort:\n 'ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),\n weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),\n weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY H:mm',\n LLLL: 'dddd, D MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[azi la] LT',\n nextDay: '[mâine la] LT',\n nextWeek: 'dddd [la] LT',\n lastDay: '[ieri la] LT',\n lastWeek: '[fosta] dddd [la] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'peste %s',\n past: '%s în urmă',\n s: 'câteva secunde',\n ss: relativeTimeWithPlural,\n m: 'un minut',\n mm: relativeTimeWithPlural,\n h: 'o oră',\n hh: relativeTimeWithPlural,\n d: 'o zi',\n dd: relativeTimeWithPlural,\n w: 'o săptămână',\n ww: relativeTimeWithPlural,\n M: 'o lună',\n MM: relativeTimeWithPlural,\n y: 'un an',\n yy: relativeTimeWithPlural,\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return ro;\n\n})));\n","export interface SurveySelectorData {\n value: string;\n label?: string;\n title: string;\n description?: string;\n checked?: boolean;\n disabled?: boolean;\n hidden?: boolean;\n}\n\nexport enum SurveySelectorType {\n Checkbox = 'checkbox',\n Radio = 'radio',\n Instant = 'instant',\n}","//! moment.js locale configuration\n//! locale : Breton [br]\n//! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function relativeTimeWithMutation(number, withoutSuffix, key) {\n var format = {\n mm: 'munutenn',\n MM: 'miz',\n dd: 'devezh',\n };\n return number + ' ' + mutation(format[key], number);\n }\n function specialMutationForYears(number) {\n switch (lastNumber(number)) {\n case 1:\n case 3:\n case 4:\n case 5:\n case 9:\n return number + ' bloaz';\n default:\n return number + ' vloaz';\n }\n }\n function lastNumber(number) {\n if (number > 9) {\n return lastNumber(number % 10);\n }\n return number;\n }\n function mutation(text, number) {\n if (number === 2) {\n return softMutation(text);\n }\n return text;\n }\n function softMutation(text) {\n var mutationTable = {\n m: 'v',\n b: 'v',\n d: 'z',\n };\n if (mutationTable[text.charAt(0)] === undefined) {\n return text;\n }\n return mutationTable[text.charAt(0)] + text.substring(1);\n }\n\n var monthsParse = [\n /^gen/i,\n /^c[ʼ\\']hwe/i,\n /^meu/i,\n /^ebr/i,\n /^mae/i,\n /^(mez|eve)/i,\n /^gou/i,\n /^eos/i,\n /^gwe/i,\n /^her/i,\n /^du/i,\n /^ker/i,\n ],\n monthsRegex =\n /^(genver|c[ʼ\\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,\n monthsStrictRegex =\n /^(genver|c[ʼ\\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,\n monthsShortStrictRegex =\n /^(gen|c[ʼ\\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,\n fullWeekdaysParse = [\n /^sul/i,\n /^lun/i,\n /^meurzh/i,\n /^merc[ʼ\\']her/i,\n /^yaou/i,\n /^gwener/i,\n /^sadorn/i,\n ],\n shortWeekdaysParse = [\n /^Sul/i,\n /^Lun/i,\n /^Meu/i,\n /^Mer/i,\n /^Yao/i,\n /^Gwe/i,\n /^Sad/i,\n ],\n minWeekdaysParse = [\n /^Su/i,\n /^Lu/i,\n /^Me([^r]|$)/i,\n /^Mer/i,\n /^Ya/i,\n /^Gw/i,\n /^Sa/i,\n ];\n\n var br = moment.defineLocale('br', {\n months: 'Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split(\n '_'\n ),\n monthsShort: 'Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'),\n weekdays: 'Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn'.split('_'),\n weekdaysShort: 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'),\n weekdaysMin: 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'),\n weekdaysParse: minWeekdaysParse,\n fullWeekdaysParse: fullWeekdaysParse,\n shortWeekdaysParse: shortWeekdaysParse,\n minWeekdaysParse: minWeekdaysParse,\n\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex: monthsStrictRegex,\n monthsShortStrictRegex: monthsShortStrictRegex,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [a viz] MMMM YYYY',\n LLL: 'D [a viz] MMMM YYYY HH:mm',\n LLLL: 'dddd, D [a viz] MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Hiziv da] LT',\n nextDay: '[Warcʼhoazh da] LT',\n nextWeek: 'dddd [da] LT',\n lastDay: '[Decʼh da] LT',\n lastWeek: 'dddd [paset da] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'a-benn %s',\n past: '%s ʼzo',\n s: 'un nebeud segondennoù',\n ss: '%d eilenn',\n m: 'ur vunutenn',\n mm: relativeTimeWithMutation,\n h: 'un eur',\n hh: '%d eur',\n d: 'un devezh',\n dd: relativeTimeWithMutation,\n M: 'ur miz',\n MM: relativeTimeWithMutation,\n y: 'ur bloaz',\n yy: specialMutationForYears,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(añ|vet)/,\n ordinal: function (number) {\n var output = number === 1 ? 'añ' : 'vet';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n meridiemParse: /a.m.|g.m./, // goude merenn | a-raok merenn\n isPM: function (token) {\n return token === 'g.m.';\n },\n meridiem: function (hour, minute, isLower) {\n return hour < 12 ? 'a.m.' : 'g.m.';\n },\n });\n\n return br;\n\n})));\n","//! moment.js locale configuration\n//! locale : Nynorsk [nn]\n//! authors : https://github.com/mechuwind\n//! Stephen Ramthun : https://github.com/stephenramthun\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var nn = moment.defineLocale('nn', {\n months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(\n '_'\n ),\n monthsShort:\n 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),\n monthsParseExact: true,\n weekdays: 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),\n weekdaysShort: 'su._må._ty._on._to._fr._lau.'.split('_'),\n weekdaysMin: 'su_må_ty_on_to_fr_la'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY [kl.] H:mm',\n LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',\n },\n calendar: {\n sameDay: '[I dag klokka] LT',\n nextDay: '[I morgon klokka] LT',\n nextWeek: 'dddd [klokka] LT',\n lastDay: '[I går klokka] LT',\n lastWeek: '[Føregåande] dddd [klokka] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'om %s',\n past: '%s sidan',\n s: 'nokre sekund',\n ss: '%d sekund',\n m: 'eit minutt',\n mm: '%d minutt',\n h: 'ein time',\n hh: '%d timar',\n d: 'ein dag',\n dd: '%d dagar',\n w: 'ei veke',\n ww: '%d veker',\n M: 'ein månad',\n MM: '%d månader',\n y: 'eit år',\n yy: '%d år',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return nn;\n\n})));\n","import { Observable } from '../Observable';\nimport { isFunction } from '../util/isFunction';\nexport function throwError(errorOrErrorFactory, scheduler) {\n const errorFactory = isFunction(errorOrErrorFactory) ? errorOrErrorFactory : () => errorOrErrorFactory;\n const init = (subscriber) => subscriber.error(errorFactory());\n return new Observable(scheduler ? (subscriber) => scheduler.schedule(init, 0, subscriber) : init);\n}\n","<bw-modal [showCloseButton]=\"true\" (closeModal)=\"onModalClose()\" modalWidth=\"large\">\n <typography title-medium>{{ title }}</typography>\n <div class=\"body\">\n <vg-player [ngSwitch]=\"isMp4\">\n\n <video *ngSwitchCase=\"false\" #myMedia [vgHls]=\"fullVideoPath\" id=\"my-video\" type=\"application/x-mpegURL\" controls></video>\n <video *ngSwitchCase=\"true\" #myMedia [src]=\"fullVideoPath\" id=\"my-video\" type=\"video/mp4\" controls></video>\n </vg-player>\n </div>\n</bw-modal>\n","import { Component, Input, Output, EventEmitter, ChangeDetectorRef, AfterViewInit, OnInit } from '@angular/core';\n\n@Component({\n selector: 'bw-video',\n templateUrl: './video.component.html',\n styleUrls: ['./video.component.scss'],\n})\nexport class VideoComponent implements OnInit, AfterViewInit {\n @Input() title = '';\n @Input() cdnBase = '';\n @Input() path = '';\n @Input() show = false;\n\n @Output() modalClosed = new EventEmitter();\n\n fullVideoPath = '';\n isMp4 = false;\n\n constructor(private cdRef: ChangeDetectorRef) {\n /* ToDo: need tracking on video playback */\n }\n\n ngOnInit() {\n if (this.path.includes('mp4')) this.isMp4 = true;\n this.fullVideoPath = `${this.cdnBase}${this.path.replace('video:', '')}`;\n }\n\n ngAfterViewInit() {\n this.cdRef.detectChanges();\n }\n\n onModalClose() {\n this.modalClosed.emit();\n }\n}\n","import { isString } from './is.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\nconst WINDOW = GLOBAL_OBJ ;\n\nconst DEFAULT_MAX_STRING_LENGTH = 80;\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction htmlTreeAsString(\n elem,\n options = {},\n) {\n if (!elem) {\n return '<unknown>';\n }\n\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n let currentElem = elem ;\n const MAX_TRAVERSE_HEIGHT = 5;\n const out = [];\n let height = 0;\n let len = 0;\n const separator = ' > ';\n const sepLength = separator.length;\n let nextStr;\n const keyAttrs = Array.isArray(options) ? options : options.keyAttrs;\n const maxStringLength = (!Array.isArray(options) && options.maxStringLength) || DEFAULT_MAX_STRING_LENGTH;\n\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem, keyAttrs);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds maxStringLength\n // (ignore this limit if we are on the first iteration)\n if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength)) {\n break;\n }\n\n out.push(nextStr);\n\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n\n return out.reverse().join(separator);\n } catch (_oO) {\n return '<unknown>';\n }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el, keyAttrs) {\n const elem = el\n\n;\n\n const out = [];\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n // @ts-expect-error WINDOW has HTMLElement\n if (WINDOW.HTMLElement) {\n // If using the component name annotation plugin, this value may be available on the DOM node\n if (elem instanceof HTMLElement && elem.dataset) {\n if (elem.dataset['sentryComponent']) {\n return elem.dataset['sentryComponent'];\n }\n if (elem.dataset['sentryElement']) {\n return elem.dataset['sentryElement'];\n }\n }\n }\n\n out.push(elem.tagName.toLowerCase());\n\n // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n const keyAttrPairs =\n keyAttrs && keyAttrs.length\n ? keyAttrs.filter(keyAttr => elem.getAttribute(keyAttr)).map(keyAttr => [keyAttr, elem.getAttribute(keyAttr)])\n : null;\n\n if (keyAttrPairs && keyAttrPairs.length) {\n keyAttrPairs.forEach(keyAttrPair => {\n out.push(`[${keyAttrPair[0]}=\"${keyAttrPair[1]}\"]`);\n });\n } else {\n if (elem.id) {\n out.push(`#${elem.id}`);\n }\n\n const className = elem.className;\n if (className && isString(className)) {\n const classes = className.split(/\\s+/);\n for (const c of classes) {\n out.push(`.${c}`);\n }\n }\n }\n const allowedAttrs = ['aria-label', 'type', 'name', 'title', 'alt'];\n for (const k of allowedAttrs) {\n const attr = elem.getAttribute(k);\n if (attr) {\n out.push(`[${k}=\"${attr}\"]`);\n }\n }\n\n return out.join('');\n}\n\n/**\n * A safe form of location.href\n */\nfunction getLocationHref() {\n try {\n return WINDOW.document.location.href;\n } catch (oO) {\n return '';\n }\n}\n\n/**\n * Gets a DOM element by using document.querySelector.\n *\n * This wrapper will first check for the existence of the function before\n * actually calling it so that we don't have to take care of this check,\n * every time we want to access the DOM.\n *\n * Reason: DOM/querySelector is not available in all environments.\n *\n * We have to cast to any because utils can be consumed by a variety of environments,\n * and we don't want to break TS users. If you know what element will be selected by\n * `document.querySelector`, specify it as part of the generic call. For example,\n * `const element = getDomElement<Element>('selector');`\n *\n * @param selector the selector string passed on to document.querySelector\n *\n * @deprecated This method is deprecated and will be removed in the next major version.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getDomElement(selector) {\n if (WINDOW.document && WINDOW.document.querySelector) {\n return WINDOW.document.querySelector(selector) ;\n }\n return null;\n}\n\n/**\n * Given a DOM element, traverses up the tree until it finds the first ancestor node\n * that has the `data-sentry-component` or `data-sentry-element` attribute with `data-sentry-component` taking\n * precedence. This attribute is added at build-time by projects that have the component name annotation plugin installed.\n *\n * @returns a string representation of the component for the provided DOM element, or `null` if not found\n */\nfunction getComponentName(elem) {\n // @ts-expect-error WINDOW has HTMLElement\n if (!WINDOW.HTMLElement) {\n return null;\n }\n\n let currentElem = elem ;\n const MAX_TRAVERSE_HEIGHT = 5;\n for (let i = 0; i < MAX_TRAVERSE_HEIGHT; i++) {\n if (!currentElem) {\n return null;\n }\n\n if (currentElem instanceof HTMLElement) {\n if (currentElem.dataset['sentryComponent']) {\n return currentElem.dataset['sentryComponent'];\n }\n if (currentElem.dataset['sentryElement']) {\n return currentElem.dataset['sentryElement'];\n }\n }\n\n currentElem = currentElem.parentNode;\n }\n\n return null;\n}\n\nexport { getComponentName, getDomElement, getLocationHref, htmlTreeAsString };\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","import { AmplitudeService} from \"./amplitude.service\";\nimport {Environment} from \"@brightside-web/micro/core/environment\";\nimport {FirebaseApp} from \"firebase/app\";\nimport {Analytics as FbAnalytics} from \"firebase/analytics\";\nimport { RemoteConfig } from \"firebase/remote-config\";\n\nexport interface AnalyticsAttributesV4 {\n event_name: string;\n action?: string;\n custom?: { [key: string]: string };\n}\n\n/**\n * Available keys for RemoteConfig.\n * should match up with info at\n * https://healthydollar.atlassian.net/wiki/spaces/EN/pages/2371944477/Remote+Config#Desktop-specific-properties\n */\nexport const RemoteConfig_UnlockedCaseTypes = 'unlockedCaseTypes';\nexport const RemoteConfig_DesktopNativeMapping = 'desktop_native_mapping';\nexport const RemoteConfig_SupportNumber = 'supportNumber';\nexport const RemoteConfig_BankHolidays = 'bankHolidays';\nexport const RemoteConfig_Companies = 'companies';\nexport const RemoteConfig_Savings_Transfer_Reasons = 'microSavingsTransferReasons';\n\ninterface ThrottledEvent {\n lastCall: number;\n throttleTime: number;\n}\n\nexport abstract class FirebaseService {\n abstract events: { [p: string]: ThrottledEvent };\n\n abstract amplitudeService: AmplitudeService;\n abstract env: Environment;\n abstract lastPageShownEvent: string;\n abstract typeOveride: { [p: string]: Function };\n abstract typeOverRideKeys: string[];\n\n abstract firebaseApp: FirebaseApp;\n abstract fbRemoteConfig: RemoteConfig;\n abstract fbAnalytics: FbAnalytics;\n\n abstract isEventThrottled(\n eventName: string,\n throttleTime?: number\n ) : boolean;\n\n abstract logEvent(\n eventName: string,\n eventParams?: {\n [key: string]: any;\n },\n shouldThrottle?: boolean,\n throttleTime?: number\n ): void;\n\n abstract setUserId(id: string, options?: any): void;\n\n abstract clearProperties(): void;\n\n abstract setProperties(properties: { [key: string]: string }): void;\n // see https://firebase.google.com/docs/remote-config/get-started?platform=web#web-version-8\n abstract setupRemoteConfig(): void;\n\n abstract remoteConfig(): RemoteConfig;\n abstract initializeApp(): FirebaseApp;\n abstract getRemoteConfig(): RemoteConfig;\n abstract getAnalytics(): FbAnalytics;\n abstract getValueAsString(valueKey: string): string;\n abstract getValueAsBoolean(valueKey: string): boolean;\n abstract ensureInitialized(): Promise<void>;\n abstract fetchConfig(): Promise<void>\n abstract remoteConfigMapping(): { [key: string]: any };\n}\n","import { InjectionToken, forwardRef, Optional, Inject, ElementRef, KeyValueDiffers, Directive, Input, HostListener, NgModule } from '@angular/core';\nimport { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\n\nimport * as ɵngcc0 from '@angular/core';\nvar CurrencyMaskInputMode;\n(function (CurrencyMaskInputMode) {\n CurrencyMaskInputMode[CurrencyMaskInputMode[\"FINANCIAL\"] = 0] = \"FINANCIAL\";\n CurrencyMaskInputMode[CurrencyMaskInputMode[\"NATURAL\"] = 1] = \"NATURAL\";\n})(CurrencyMaskInputMode || (CurrencyMaskInputMode = {}));\nlet CURRENCY_MASK_CONFIG = new InjectionToken(\"currency.mask.config\");\n\nclass InputManager {\n constructor(htmlInputElement) {\n this.htmlInputElement = htmlInputElement;\n }\n setCursorAt(position) {\n if (this.htmlInputElement.setSelectionRange) {\n this.htmlInputElement.focus();\n this.htmlInputElement.setSelectionRange(position, position);\n }\n else if (this.htmlInputElement.createTextRange) {\n let textRange = this.htmlInputElement.createTextRange();\n textRange.collapse(true);\n textRange.moveEnd(\"character\", position);\n textRange.moveStart(\"character\", position);\n textRange.select();\n }\n }\n updateValueAndCursor(newRawValue, oldLength, selectionStart) {\n this.rawValue = newRawValue;\n let newLength = newRawValue.length;\n selectionStart = selectionStart - (oldLength - newLength);\n this.setCursorAt(selectionStart);\n }\n get canInputMoreNumbers() {\n let onlyNumbers = this.rawValue.replace(/[^0-9\\u0660-\\u0669\\u06F0-\\u06F9]/g, \"\");\n let haventReachedMaxLength = !(onlyNumbers.length >= this.htmlInputElement.maxLength && this.htmlInputElement.maxLength >= 0);\n let selectionStart = this.inputSelection.selectionStart;\n let selectionEnd = this.inputSelection.selectionEnd;\n let haveNumberSelected = !!(selectionStart != selectionEnd &&\n this.htmlInputElement.value.substring(selectionStart, selectionEnd).match(/[^0-9\\u0660-\\u0669\\u06F0-\\u06F9]/));\n let startWithZero = (this.htmlInputElement.value.substring(0, 1) == \"0\");\n return haventReachedMaxLength || haveNumberSelected || startWithZero;\n }\n get inputSelection() {\n let selectionStart = 0;\n let selectionEnd = 0;\n if (typeof this.htmlInputElement.selectionStart == \"number\" && typeof this.htmlInputElement.selectionEnd == \"number\") {\n selectionStart = this.htmlInputElement.selectionStart;\n selectionEnd = this.htmlInputElement.selectionEnd;\n }\n else {\n let range = document.selection.createRange();\n if (range && range.parentElement() == this.htmlInputElement) {\n let lenght = this.htmlInputElement.value.length;\n let normalizedValue = this.htmlInputElement.value.replace(/\\r\\n/g, \"\\n\");\n let startRange = this.htmlInputElement.createTextRange();\n startRange.moveToBookmark(range.getBookmark());\n let endRange = this.htmlInputElement.createTextRange();\n endRange.collapse(false);\n if (startRange.compareEndPoints(\"StartToEnd\", endRange) > -1) {\n selectionStart = selectionEnd = lenght;\n }\n else {\n selectionStart = -startRange.moveStart(\"character\", -lenght);\n selectionStart += normalizedValue.slice(0, selectionStart).split(\"\\n\").length - 1;\n if (startRange.compareEndPoints(\"EndToEnd\", endRange) > -1) {\n selectionEnd = lenght;\n }\n else {\n selectionEnd = -startRange.moveEnd(\"character\", -lenght);\n selectionEnd += normalizedValue.slice(0, selectionEnd).split(\"\\n\").length - 1;\n }\n }\n }\n }\n return {\n selectionStart: selectionStart,\n selectionEnd: selectionEnd\n };\n }\n get rawValue() {\n return this.htmlInputElement && this.htmlInputElement.value;\n }\n set rawValue(value) {\n this._storedRawValue = value;\n if (this.htmlInputElement) {\n this.htmlInputElement.value = value;\n }\n }\n get storedRawValue() {\n return this._storedRawValue || '';\n }\n}\n\nclass InputService {\n constructor(htmlInputElement, options) {\n this.htmlInputElement = htmlInputElement;\n this.options = options;\n this.SINGLE_DIGIT_REGEX = new RegExp(/^[0-9\\u0660-\\u0669\\u06F0-\\u06F9]$/);\n this.ONLY_NUMBERS_REGEX = new RegExp(/[^0-9\\u0660-\\u0669\\u06F0-\\u06F9]/g);\n this.PER_AR_NUMBER = new Map();\n this.inputManager = new InputManager(htmlInputElement);\n this.initialize();\n }\n initialize() {\n this.PER_AR_NUMBER.set(\"\\u06F0\", \"0\");\n this.PER_AR_NUMBER.set(\"\\u06F1\", \"1\");\n this.PER_AR_NUMBER.set(\"\\u06F2\", \"2\");\n this.PER_AR_NUMBER.set(\"\\u06F3\", \"3\");\n this.PER_AR_NUMBER.set(\"\\u06F4\", \"4\");\n this.PER_AR_NUMBER.set(\"\\u06F5\", \"5\");\n this.PER_AR_NUMBER.set(\"\\u06F6\", \"6\");\n this.PER_AR_NUMBER.set(\"\\u06F7\", \"7\");\n this.PER_AR_NUMBER.set(\"\\u06F8\", \"8\");\n this.PER_AR_NUMBER.set(\"\\u06F9\", \"9\");\n this.PER_AR_NUMBER.set(\"\\u0660\", \"0\");\n this.PER_AR_NUMBER.set(\"\\u0661\", \"1\");\n this.PER_AR_NUMBER.set(\"\\u0662\", \"2\");\n this.PER_AR_NUMBER.set(\"\\u0663\", \"3\");\n this.PER_AR_NUMBER.set(\"\\u0664\", \"4\");\n this.PER_AR_NUMBER.set(\"\\u0665\", \"5\");\n this.PER_AR_NUMBER.set(\"\\u0666\", \"6\");\n this.PER_AR_NUMBER.set(\"\\u0667\", \"7\");\n this.PER_AR_NUMBER.set(\"\\u0668\", \"8\");\n this.PER_AR_NUMBER.set(\"\\u0669\", \"9\");\n }\n addNumber(keyCode) {\n const { decimal, precision, inputMode } = this.options;\n let keyChar = String.fromCharCode(keyCode);\n const isDecimalChar = keyChar === this.options.decimal;\n if (!this.rawValue) {\n this.rawValue = this.applyMask(false, keyChar);\n let selectionStart = undefined;\n if (inputMode === CurrencyMaskInputMode.NATURAL && precision > 0) {\n selectionStart = this.rawValue.indexOf(decimal);\n if (isDecimalChar) {\n selectionStart++;\n }\n }\n this.updateFieldValue(selectionStart);\n }\n else {\n let selectionStart = this.inputSelection.selectionStart;\n let selectionEnd = this.inputSelection.selectionEnd;\n const rawValueStart = this.rawValue.substring(0, selectionStart);\n let rawValueEnd = this.rawValue.substring(selectionEnd, this.rawValue.length);\n // In natural mode, replace decimals instead of shifting them.\n const inDecimalPortion = rawValueStart.indexOf(decimal) !== -1;\n if (inputMode === CurrencyMaskInputMode.NATURAL && inDecimalPortion && selectionStart === selectionEnd) {\n rawValueEnd = rawValueEnd.substring(1);\n }\n const newValue = rawValueStart + keyChar + rawValueEnd;\n let nextSelectionStart = selectionStart + 1;\n const isDecimalOrThousands = isDecimalChar || keyChar === this.options.thousands;\n if (isDecimalOrThousands && keyChar === rawValueEnd[0]) {\n // If the cursor is just before the decimal or thousands separator and the user types the\n // decimal or thousands separator, move the cursor past it.\n nextSelectionStart++;\n }\n else if (!this.SINGLE_DIGIT_REGEX.test(keyChar)) {\n // Ignore other non-numbers.\n return;\n }\n this.rawValue = newValue;\n this.updateFieldValue(nextSelectionStart);\n }\n }\n applyMask(isNumber, rawValue, disablePadAndTrim = false) {\n let { allowNegative, decimal, precision, prefix, suffix, thousands, min, max, inputMode } = this.options;\n rawValue = isNumber ? new Number(rawValue).toFixed(precision) : rawValue;\n let onlyNumbers = rawValue.replace(this.ONLY_NUMBERS_REGEX, \"\");\n if (!onlyNumbers && rawValue !== decimal) {\n return \"\";\n }\n if (inputMode === CurrencyMaskInputMode.NATURAL && !isNumber && !disablePadAndTrim) {\n rawValue = this.padOrTrimPrecision(rawValue);\n onlyNumbers = rawValue.replace(this.ONLY_NUMBERS_REGEX, \"\");\n }\n let integerPart = onlyNumbers.slice(0, onlyNumbers.length - precision)\n .replace(/^\\u0660*/g, \"\")\n .replace(/^\\u06F0*/g, \"\")\n .replace(/^0*/g, \"\");\n if (integerPart == \"\") {\n integerPart = \"0\";\n }\n let integerValue = parseInt(integerPart);\n integerPart = integerPart.replace(/\\B(?=([0-9\\u0660-\\u0669\\u06F0-\\u06F9]{3})+(?![0-9\\u0660-\\u0669\\u06F0-\\u06F9]))/g, thousands);\n if (thousands && integerPart.startsWith(thousands)) {\n integerPart = integerPart.substring(1);\n }\n let newRawValue = integerPart;\n let decimalPart = onlyNumbers.slice(onlyNumbers.length - precision);\n let decimalValue = parseInt(decimalPart) || 0;\n let isNegative = rawValue.indexOf(\"-\") > -1;\n // Ensure max is at least as large as min.\n max = (this.isNullOrUndefined(max) || this.isNullOrUndefined(min)) ? max : Math.max(max, min);\n // Ensure precision number works well with more than 2 digits\n // 23 / 100... 233 / 1000 and so on\n const divideBy = Number('1'.padEnd(precision + 1, '0'));\n // Restrict to the min and max values.\n let newValue = integerValue + (decimalValue / divideBy);\n newValue = isNegative ? -newValue : newValue;\n if (!this.isNullOrUndefined(max) && newValue > max) {\n return this.applyMask(true, max + '');\n }\n else if (!this.isNullOrUndefined(min) && newValue < min) {\n return this.applyMask(true, min + '');\n }\n if (precision > 0) {\n if (newRawValue == \"0\" && decimalPart.length < precision) {\n newRawValue += decimal + \"0\".repeat(precision - 1) + decimalPart;\n }\n else {\n newRawValue += decimal + decimalPart;\n }\n }\n let isZero = newValue == 0;\n let operator = (isNegative && allowNegative && !isZero) ? \"-\" : \"\";\n return operator + prefix + newRawValue + suffix;\n }\n padOrTrimPrecision(rawValue) {\n let { decimal, precision } = this.options;\n let decimalIndex = rawValue.lastIndexOf(decimal);\n if (decimalIndex === -1) {\n decimalIndex = rawValue.length;\n rawValue += decimal;\n }\n let decimalPortion = rawValue.substring(decimalIndex).replace(this.ONLY_NUMBERS_REGEX, \"\");\n const actualPrecision = decimalPortion.length;\n if (actualPrecision < precision) {\n for (let i = actualPrecision; i < precision; i++) {\n decimalPortion += '0';\n }\n }\n else if (actualPrecision > precision) {\n decimalPortion = decimalPortion.substring(0, decimalPortion.length + precision - actualPrecision);\n }\n return rawValue.substring(0, decimalIndex) + decimal + decimalPortion;\n }\n clearMask(rawValue) {\n if (this.isNullable() && rawValue === \"\")\n return null;\n let value = (rawValue || \"0\").replace(this.options.prefix, \"\").replace(this.options.suffix, \"\");\n if (this.options.thousands) {\n value = value.replace(new RegExp(\"\\\\\" + this.options.thousands, \"g\"), \"\");\n }\n if (this.options.decimal) {\n value = value.replace(this.options.decimal, \".\");\n }\n this.PER_AR_NUMBER.forEach((val, key) => {\n const re = new RegExp(key, \"g\");\n value = value.replace(re, val);\n });\n return parseFloat(value);\n }\n changeToNegative() {\n if (this.options.allowNegative && this.rawValue != \"\" && this.rawValue.charAt(0) != \"-\" && this.value != 0) {\n // Apply the mask to ensure the min and max values are enforced.\n this.rawValue = this.applyMask(false, \"-\" + this.rawValue);\n }\n }\n changeToPositive() {\n // Apply the mask to ensure the min and max values are enforced.\n this.rawValue = this.applyMask(false, this.rawValue.replace(\"-\", \"\"));\n }\n removeNumber(keyCode) {\n let { decimal, thousands, prefix, suffix, inputMode } = this.options;\n if (this.isNullable() && this.value == 0) {\n this.rawValue = null;\n return;\n }\n let selectionEnd = this.inputSelection.selectionEnd;\n let selectionStart = this.inputSelection.selectionStart;\n const suffixStart = this.rawValue.length - suffix.length;\n selectionEnd = Math.min(suffixStart, Math.max(selectionEnd, prefix.length));\n selectionStart = Math.min(suffixStart, Math.max(selectionStart, prefix.length));\n // Check if selection was entirely in the prefix or suffix. \n if (selectionStart === selectionEnd &&\n this.inputSelection.selectionStart !== this.inputSelection.selectionEnd) {\n this.updateFieldValue(selectionStart);\n return;\n }\n let decimalIndex = this.rawValue.indexOf(decimal);\n if (decimalIndex === -1) {\n decimalIndex = this.rawValue.length;\n }\n let shiftSelection = 0;\n let insertChars = '';\n const isCursorInDecimals = decimalIndex < selectionEnd;\n const isCursorImmediatelyAfterDecimalPoint = decimalIndex + 1 === selectionEnd;\n if (selectionEnd === selectionStart) {\n if (keyCode == 8) {\n if (selectionStart <= prefix.length) {\n return;\n }\n selectionStart--;\n // If previous char isn't a number, go back one more.\n if (!this.rawValue.substr(selectionStart, 1).match(/\\d/)) {\n selectionStart--;\n }\n // In natural mode, jump backwards when in decimal portion of number.\n if (inputMode === CurrencyMaskInputMode.NATURAL && isCursorInDecimals) {\n shiftSelection = -1;\n // when removing a single whole number, replace it with 0\n if (isCursorImmediatelyAfterDecimalPoint && this.value < 10 && this.value > -10) {\n insertChars += '0';\n }\n }\n }\n else if (keyCode == 46 || keyCode == 63272) {\n if (selectionStart === suffixStart) {\n return;\n }\n selectionEnd++;\n // If next char isn't a number, go one more.\n if (!this.rawValue.substr(selectionStart, 1).match(/\\d/)) {\n selectionStart++;\n selectionEnd++;\n }\n }\n }\n // In natural mode, replace decimals with 0s.\n if (inputMode === CurrencyMaskInputMode.NATURAL && selectionStart > decimalIndex) {\n const replacedDecimalCount = selectionEnd - selectionStart;\n for (let i = 0; i < replacedDecimalCount; i++) {\n insertChars += '0';\n }\n }\n let selectionFromEnd = this.rawValue.length - selectionEnd;\n this.rawValue = this.rawValue.substring(0, selectionStart) + insertChars + this.rawValue.substring(selectionEnd);\n // Remove leading thousand separator from raw value.\n const startChar = this.rawValue.substr(prefix.length, 1);\n if (startChar === thousands) {\n this.rawValue = this.rawValue.substring(0, prefix.length) + this.rawValue.substring(prefix.length + 1);\n selectionFromEnd = Math.min(selectionFromEnd, this.rawValue.length - prefix.length);\n }\n this.updateFieldValue(this.rawValue.length - selectionFromEnd + shiftSelection, true);\n }\n updateFieldValue(selectionStart, disablePadAndTrim = false) {\n let newRawValue = this.applyMask(false, this.rawValue || \"\", disablePadAndTrim);\n selectionStart = selectionStart == undefined ? this.rawValue.length : selectionStart;\n selectionStart = Math.max(this.options.prefix.length, Math.min(selectionStart, this.rawValue.length - this.options.suffix.length));\n this.inputManager.updateValueAndCursor(newRawValue, this.rawValue.length, selectionStart);\n }\n updateOptions(options) {\n let value = this.value;\n this.options = options;\n this.value = value;\n }\n prefixLength() {\n return this.options.prefix.length;\n }\n suffixLength() {\n return this.options.suffix.length;\n }\n isNullable() {\n return this.options.nullable;\n }\n get canInputMoreNumbers() {\n return this.inputManager.canInputMoreNumbers;\n }\n get inputSelection() {\n return this.inputManager.inputSelection;\n }\n get rawValue() {\n return this.inputManager.rawValue;\n }\n set rawValue(value) {\n this.inputManager.rawValue = value;\n }\n get storedRawValue() {\n return this.inputManager.storedRawValue;\n }\n get value() {\n return this.clearMask(this.rawValue);\n }\n set value(value) {\n this.rawValue = this.applyMask(true, \"\" + value);\n }\n isNullOrUndefined(value) {\n return value === null || value === undefined;\n }\n}\n\nclass InputHandler {\n constructor(htmlInputElement, options) {\n this.inputService = new InputService(htmlInputElement, options);\n }\n handleCut(event) {\n setTimeout(() => {\n this.inputService.updateFieldValue();\n this.setValue(this.inputService.value);\n this.onModelChange(this.inputService.value);\n }, 0);\n }\n handleInput(event) {\n let selectionStart = this.inputService.inputSelection.selectionStart;\n let keyCode = this.inputService.rawValue.charCodeAt(selectionStart - 1);\n let rawValueLength = this.inputService.rawValue.length;\n let storedRawValueLength = this.inputService.storedRawValue.length;\n if (Math.abs(rawValueLength - storedRawValueLength) != 1) {\n this.inputService.updateFieldValue(selectionStart);\n this.onModelChange(this.inputService.value);\n return;\n }\n // Restore the old value.\n this.inputService.rawValue = this.inputService.storedRawValue;\n if (rawValueLength < storedRawValueLength) {\n // Chrome Android seems to move the cursor in response to a backspace AFTER processing the\n // input event, so we need to wrap this in a timeout.\n this.timer(() => {\n // Move the cursor to just after the deleted value.\n this.inputService.updateFieldValue(selectionStart + 1);\n // Then backspace it.\n this.inputService.removeNumber(8);\n this.onModelChange(this.inputService.value);\n }, 0);\n }\n if (rawValueLength > storedRawValueLength) {\n // Move the cursor to just before the new value.\n this.inputService.updateFieldValue(selectionStart - 1);\n // Process the character like a keypress.\n this.handleKeypressImpl(keyCode);\n }\n }\n handleKeydown(event) {\n let keyCode = event.which || event.charCode || event.keyCode;\n if (keyCode == 8 || keyCode == 46 || keyCode == 63272) {\n event.preventDefault();\n if (this.inputService.inputSelection.selectionStart <= this.inputService.prefixLength() &&\n this.inputService.inputSelection.selectionEnd >= this.inputService.rawValue.length - this.inputService.suffixLength()) {\n this.clearValue();\n }\n else {\n this.inputService.removeNumber(keyCode);\n this.onModelChange(this.inputService.value);\n }\n }\n }\n clearValue() {\n this.setValue(this.inputService.isNullable() ? null : 0);\n this.onModelChange(this.inputService.value);\n }\n handleKeypress(event) {\n let keyCode = event.which || event.charCode || event.keyCode;\n event.preventDefault();\n if (keyCode === 97 && event.ctrlKey) {\n return;\n }\n this.handleKeypressImpl(keyCode);\n }\n handleKeypressImpl(keyCode) {\n switch (keyCode) {\n case undefined:\n case 9:\n case 13:\n return;\n case 43:\n this.inputService.changeToPositive();\n break;\n case 45:\n this.inputService.changeToNegative();\n break;\n default:\n if (this.inputService.canInputMoreNumbers) {\n let selectionRangeLength = Math.abs(this.inputService.inputSelection.selectionEnd - this.inputService.inputSelection.selectionStart);\n if (selectionRangeLength == this.inputService.rawValue.length) {\n this.setValue(null);\n }\n this.inputService.addNumber(keyCode);\n }\n break;\n }\n this.onModelChange(this.inputService.value);\n }\n handlePaste(event) {\n setTimeout(() => {\n this.inputService.updateFieldValue();\n this.setValue(this.inputService.value);\n this.onModelChange(this.inputService.value);\n }, 1);\n }\n updateOptions(options) {\n this.inputService.updateOptions(options);\n }\n getOnModelChange() {\n return this.onModelChange;\n }\n setOnModelChange(callbackFunction) {\n this.onModelChange = callbackFunction;\n }\n getOnModelTouched() {\n return this.onModelTouched;\n }\n setOnModelTouched(callbackFunction) {\n this.onModelTouched = callbackFunction;\n }\n setValue(value) {\n this.inputService.value = value;\n }\n /**\n * Passthrough to setTimeout that can be stubbed out in tests.\n */\n timer(callback, delayMillis) {\n setTimeout(callback, delayMillis);\n }\n}\n\nconst CURRENCYMASKDIRECTIVE_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => CurrencyMaskDirective),\n multi: true,\n};\nclass CurrencyMaskDirective {\n constructor(currencyMaskConfig, elementRef, keyValueDiffers) {\n this.currencyMaskConfig = currencyMaskConfig;\n this.elementRef = elementRef;\n this.keyValueDiffers = keyValueDiffers;\n this.options = {};\n this.optionsTemplate = {\n align: \"right\",\n allowNegative: true,\n allowZero: true,\n decimal: \".\",\n precision: 2,\n prefix: \"$ \",\n suffix: \"\",\n thousands: \",\",\n nullable: false,\n inputMode: CurrencyMaskInputMode.FINANCIAL\n };\n if (currencyMaskConfig) {\n this.optionsTemplate = currencyMaskConfig;\n }\n this.keyValueDiffer = keyValueDiffers.find({}).create();\n }\n ngAfterViewInit() {\n this.elementRef.nativeElement.style.textAlign = this.options && this.options.align ? this.options.align : this.optionsTemplate.align;\n }\n ngDoCheck() {\n if (this.keyValueDiffer.diff(this.options)) {\n this.elementRef.nativeElement.style.textAlign = this.options.align ? this.options.align : this.optionsTemplate.align;\n this.inputHandler.updateOptions(Object.assign({}, this.optionsTemplate, this.options));\n }\n }\n ngOnInit() {\n this.inputHandler = new InputHandler(this.elementRef.nativeElement, Object.assign({}, this.optionsTemplate, this.options));\n }\n handleBlur(event) {\n this.inputHandler.getOnModelTouched().apply(event);\n }\n handleCut(event) {\n if (!this.isChromeAndroid()) {\n !this.isReadOnly() && this.inputHandler.handleCut(event);\n }\n }\n handleInput(event) {\n if (this.isChromeAndroid()) {\n !this.isReadOnly() && this.inputHandler.handleInput(event);\n }\n }\n handleKeydown(event) {\n if (!this.isChromeAndroid()) {\n !this.isReadOnly() && this.inputHandler.handleKeydown(event);\n }\n }\n handleKeypress(event) {\n if (!this.isChromeAndroid()) {\n !this.isReadOnly() && this.inputHandler.handleKeypress(event);\n }\n }\n handlePaste(event) {\n if (!this.isChromeAndroid()) {\n !this.isReadOnly() && this.inputHandler.handlePaste(event);\n }\n }\n handleDrop(event) {\n if (!this.isChromeAndroid()) {\n event.preventDefault();\n }\n }\n isChromeAndroid() {\n return /chrome/i.test(navigator.userAgent) && /android/i.test(navigator.userAgent);\n }\n isReadOnly() {\n return this.elementRef.nativeElement.hasAttribute('readonly');\n }\n registerOnChange(callbackFunction) {\n this.inputHandler.setOnModelChange(callbackFunction);\n }\n registerOnTouched(callbackFunction) {\n this.inputHandler.setOnModelTouched(callbackFunction);\n }\n setDisabledState(value) {\n this.elementRef.nativeElement.disabled = value;\n }\n writeValue(value) {\n this.inputHandler.setValue(value);\n }\n}\nCurrencyMaskDirective.ɵfac = function CurrencyMaskDirective_Factory(t) { return new (t || CurrencyMaskDirective)(ɵngcc0.ɵɵdirectiveInject(CURRENCY_MASK_CONFIG, 8), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.KeyValueDiffers)); };\nCurrencyMaskDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: CurrencyMaskDirective, selectors: [[\"\", \"currencyMask\", \"\"]], hostBindings: function CurrencyMaskDirective_HostBindings(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵlistener(\"blur\", function CurrencyMaskDirective_blur_HostBindingHandler($event) { return ctx.handleBlur($event); })(\"cut\", function CurrencyMaskDirective_cut_HostBindingHandler($event) { return ctx.handleCut($event); })(\"input\", function CurrencyMaskDirective_input_HostBindingHandler($event) { return ctx.handleInput($event); })(\"keydown\", function CurrencyMaskDirective_keydown_HostBindingHandler($event) { return ctx.handleKeydown($event); })(\"keypress\", function CurrencyMaskDirective_keypress_HostBindingHandler($event) { return ctx.handleKeypress($event); })(\"paste\", function CurrencyMaskDirective_paste_HostBindingHandler($event) { return ctx.handlePaste($event); })(\"drop\", function CurrencyMaskDirective_drop_HostBindingHandler($event) { return ctx.handleDrop($event); });\n } }, inputs: { options: \"options\" }, features: [ɵngcc0.ɵɵProvidersFeature([CURRENCYMASKDIRECTIVE_VALUE_ACCESSOR])] });\nCurrencyMaskDirective.ctorParameters = () => [\n { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [CURRENCY_MASK_CONFIG,] }] },\n { type: ElementRef },\n { type: KeyValueDiffers }\n];\nCurrencyMaskDirective.ctorParameters = () => [\n { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [CURRENCY_MASK_CONFIG,] }] },\n { type: ElementRef },\n { type: KeyValueDiffers }\n];\nCurrencyMaskDirective.propDecorators = {\n options: [{ type: Input }],\n handleBlur: [{ type: HostListener, args: [\"blur\", [\"$event\"],] }],\n handleCut: [{ type: HostListener, args: [\"cut\", [\"$event\"],] }],\n handleInput: [{ type: HostListener, args: [\"input\", [\"$event\"],] }],\n handleKeydown: [{ type: HostListener, args: [\"keydown\", [\"$event\"],] }],\n handleKeypress: [{ type: HostListener, args: [\"keypress\", [\"$event\"],] }],\n handlePaste: [{ type: HostListener, args: [\"paste\", [\"$event\"],] }],\n handleDrop: [{ type: HostListener, args: [\"drop\", [\"$event\"],] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(CurrencyMaskDirective, [{\n type: Directive,\n args: [{\n selector: \"[currencyMask]\",\n providers: [CURRENCYMASKDIRECTIVE_VALUE_ACCESSOR]\n }]\n }], function () { return [{ type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [CURRENCY_MASK_CONFIG]\n }] }, { type: ɵngcc0.ElementRef }, { type: ɵngcc0.KeyValueDiffers }]; }, { options: [{\n type: Input\n }], handleBlur: [{\n type: HostListener,\n args: [\"blur\", [\"$event\"]]\n }], handleCut: [{\n type: HostListener,\n args: [\"cut\", [\"$event\"]]\n }], handleInput: [{\n type: HostListener,\n args: [\"input\", [\"$event\"]]\n }], handleKeydown: [{\n type: HostListener,\n args: [\"keydown\", [\"$event\"]]\n }], handleKeypress: [{\n type: HostListener,\n args: [\"keypress\", [\"$event\"]]\n }], handlePaste: [{\n type: HostListener,\n args: [\"paste\", [\"$event\"]]\n }], handleDrop: [{\n type: HostListener,\n args: [\"drop\", [\"$event\"]]\n }] }); })();\n\nclass NgxCurrencyModule {\n static forRoot(config) {\n return {\n ngModule: NgxCurrencyModule,\n providers: [{\n provide: CURRENCY_MASK_CONFIG,\n useValue: config,\n }]\n };\n }\n}\nNgxCurrencyModule.ɵfac = function NgxCurrencyModule_Factory(t) { return new (t || NgxCurrencyModule)(); };\nNgxCurrencyModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: NgxCurrencyModule });\nNgxCurrencyModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ imports: [CommonModule, FormsModule] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgxCurrencyModule, [{\n type: NgModule,\n args: [{\n imports: [CommonModule, FormsModule],\n declarations: [CurrencyMaskDirective],\n exports: [CurrencyMaskDirective]\n }]\n }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(NgxCurrencyModule, { declarations: function () { return [CurrencyMaskDirective]; }, imports: function () { return [CommonModule, FormsModule]; }, exports: function () { return [CurrencyMaskDirective]; } }); })();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { CURRENCYMASKDIRECTIVE_VALUE_ACCESSOR, CURRENCY_MASK_CONFIG, CurrencyMaskDirective, CurrencyMaskInputMode, NgxCurrencyModule };\n\n","//! moment.js locale configuration\n//! locale : Central Atlas Tamazight [tzm]\n//! author : Abdel Said : https://github.com/abdelsaid\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var tzm = moment.defineLocale('tzm', {\n months: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(\n '_'\n ),\n monthsShort:\n 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(\n '_'\n ),\n weekdays: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n weekdaysShort: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n weekdaysMin: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[ⴰⵙⴷⵅ ⴴ] LT',\n nextDay: '[ⴰⵙⴽⴰ ⴴ] LT',\n nextWeek: 'dddd [ⴴ] LT',\n lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',\n lastWeek: 'dddd [ⴴ] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s',\n past: 'ⵢⴰⵏ %s',\n s: 'ⵉⵎⵉⴽ',\n ss: '%d ⵉⵎⵉⴽ',\n m: 'ⵎⵉⵏⵓⴺ',\n mm: '%d ⵎⵉⵏⵓⴺ',\n h: 'ⵙⴰⵄⴰ',\n hh: '%d ⵜⴰⵙⵙⴰⵄⵉⵏ',\n d: 'ⴰⵙⵙ',\n dd: '%d oⵙⵙⴰⵏ',\n M: 'ⴰⵢoⵓⵔ',\n MM: '%d ⵉⵢⵢⵉⵔⵏ',\n y: 'ⴰⵙⴳⴰⵙ',\n yy: '%d ⵉⵙⴳⴰⵙⵏ',\n },\n week: {\n dow: 6, // Saturday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return tzm;\n\n})));\n","import { InjectionToken } from '@angular/core';\n\nexport interface IConfig {\n suffix: string;\n prefix: string;\n thousandSeparator: string;\n decimalMarker: '.' | ',';\n clearIfNotMatch: boolean;\n showTemplate: boolean;\n showMaskTyped: boolean;\n placeHolderCharacter: string;\n shownMaskExpression: string;\n dropSpecialCharacters: boolean | string[];\n specialCharacters: string[];\n hiddenInput: boolean | undefined;\n validation: boolean;\n separatorLimit: string;\n allowNegativeNumbers: boolean;\n patterns: {\n [character: string]: {\n pattern: RegExp;\n optional?: boolean;\n symbol?: string;\n };\n };\n}\n\nexport type optionsConfig = Partial<IConfig>;\nexport const config: InjectionToken<IConfig> = new InjectionToken('config');\nexport const NEW_CONFIG: InjectionToken<IConfig> = new InjectionToken('NEW_CONFIG');\nexport const INITIAL_CONFIG: InjectionToken<IConfig> = new InjectionToken('INITIAL_CONFIG');\n\nexport const initialConfig: IConfig = {\n suffix: '',\n prefix: '',\n thousandSeparator: ' ',\n decimalMarker: '.',\n clearIfNotMatch: false,\n showTemplate: false,\n showMaskTyped: false,\n placeHolderCharacter: '_',\n dropSpecialCharacters: true,\n hiddenInput: undefined,\n shownMaskExpression: '',\n separatorLimit: '',\n allowNegativeNumbers: false,\n validation: true,\n // tslint:disable-next-line: quotemark\n specialCharacters: ['-', '/', '(', ')', '.', ':', ' ', '+', ',', '@', '[', ']', '\"', \"'\"],\n patterns: {\n '0': {\n pattern: new RegExp('\\\\d'),\n },\n '9': {\n pattern: new RegExp('\\\\d'),\n optional: true,\n },\n X: {\n pattern: new RegExp('\\\\d'),\n symbol: '•',\n },\n A: {\n pattern: new RegExp('[a-zA-Z0-9]'),\n },\n S: {\n pattern: new RegExp('[a-zA-Z]'),\n },\n d: {\n pattern: new RegExp('\\\\d'),\n },\n m: {\n pattern: new RegExp('\\\\d'),\n },\n M: {\n pattern: new RegExp('\\\\d'),\n },\n H: {\n pattern: new RegExp('\\\\d'),\n },\n h: {\n pattern: new RegExp('\\\\d'),\n },\n s: {\n pattern: new RegExp('\\\\d'),\n },\n },\n};\n\nexport const timeMasks: string[] = ['Hh:m0:s0', 'Hh:m0', 'm0:s0'];\n\nexport const withoutValidation: string[] = [\n 'percent',\n 'Hh',\n 's0',\n 'm0',\n 'separator',\n 'd0/M0/0000',\n 'd0/M0',\n 'd0',\n 'M0',\n];\n","/*\n * Copyright 2009-2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE.txt or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\nexports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator;\nexports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;\nexports.SourceNode = require('./lib/source-node').SourceNode;\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nclass AmplifyError extends Error {\n /**\n * Constructs an AmplifyError.\n *\n * @param message text that describes the main problem.\n * @param underlyingError the underlying cause of the error.\n * @param recoverySuggestion suggestion to recover from the error.\n *\n */\n constructor({ message, name, recoverySuggestion, underlyingError, }) {\n super(message);\n this.name = name;\n this.underlyingError = underlyingError;\n this.recoverySuggestion = recoverySuggestion;\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = AmplifyError;\n Object.setPrototypeOf(this, AmplifyError.prototype);\n }\n}\n\nexport { AmplifyError };\n","//! moment.js locale configuration\n//! locale : Kyrgyz [ky]\n//! author : Chyngyz Arystan uulu : https://github.com/chyngyz\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var suffixes = {\n 0: '-чү',\n 1: '-чи',\n 2: '-чи',\n 3: '-чү',\n 4: '-чү',\n 5: '-чи',\n 6: '-чы',\n 7: '-чи',\n 8: '-чи',\n 9: '-чу',\n 10: '-чу',\n 20: '-чы',\n 30: '-чу',\n 40: '-чы',\n 50: '-чү',\n 60: '-чы',\n 70: '-чи',\n 80: '-чи',\n 90: '-чу',\n 100: '-чү',\n };\n\n var ky = moment.defineLocale('ky', {\n months: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(\n '_'\n ),\n monthsShort: 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split(\n '_'\n ),\n weekdays: 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split(\n '_'\n ),\n weekdaysShort: 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'),\n weekdaysMin: 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Бүгүн саат] LT',\n nextDay: '[Эртең саат] LT',\n nextWeek: 'dddd [саат] LT',\n lastDay: '[Кечээ саат] LT',\n lastWeek: '[Өткөн аптанын] dddd [күнү] [саат] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s ичинде',\n past: '%s мурун',\n s: 'бирнече секунд',\n ss: '%d секунд',\n m: 'бир мүнөт',\n mm: '%d мүнөт',\n h: 'бир саат',\n hh: '%d саат',\n d: 'бир күн',\n dd: '%d күн',\n M: 'бир ай',\n MM: '%d ай',\n y: 'бир жыл',\n yy: '%d жыл',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(чи|чы|чү|чу)/,\n ordinal: function (number) {\n var a = number % 10,\n b = number >= 100 ? 100 : null;\n return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return ky;\n\n})));\n","//! moment.js locale configuration\n//! locale : Turkish [tr]\n//! authors : Erhan Gundogan : https://github.com/erhangundogan,\n//! Burak Yiğit Kaya: https://github.com/BYK\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var suffixes = {\n 1: \"'inci\",\n 5: \"'inci\",\n 8: \"'inci\",\n 70: \"'inci\",\n 80: \"'inci\",\n 2: \"'nci\",\n 7: \"'nci\",\n 20: \"'nci\",\n 50: \"'nci\",\n 3: \"'üncü\",\n 4: \"'üncü\",\n 100: \"'üncü\",\n 6: \"'ncı\",\n 9: \"'uncu\",\n 10: \"'uncu\",\n 30: \"'uncu\",\n 60: \"'ıncı\",\n 90: \"'ıncı\",\n };\n\n var tr = moment.defineLocale('tr', {\n months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split(\n '_'\n ),\n monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),\n weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split(\n '_'\n ),\n weekdaysShort: 'Paz_Pzt_Sal_Çar_Per_Cum_Cmt'.split('_'),\n weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),\n meridiem: function (hours, minutes, isLower) {\n if (hours < 12) {\n return isLower ? 'öö' : 'ÖÖ';\n } else {\n return isLower ? 'ös' : 'ÖS';\n }\n },\n meridiemParse: /öö|ÖÖ|ös|ÖS/,\n isPM: function (input) {\n return input === 'ös' || input === 'ÖS';\n },\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[bugün saat] LT',\n nextDay: '[yarın saat] LT',\n nextWeek: '[gelecek] dddd [saat] LT',\n lastDay: '[dün] LT',\n lastWeek: '[geçen] dddd [saat] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s sonra',\n past: '%s önce',\n s: 'birkaç saniye',\n ss: '%d saniye',\n m: 'bir dakika',\n mm: '%d dakika',\n h: 'bir saat',\n hh: '%d saat',\n d: 'bir gün',\n dd: '%d gün',\n w: 'bir hafta',\n ww: '%d hafta',\n M: 'bir ay',\n MM: '%d ay',\n y: 'bir yıl',\n yy: '%d yıl',\n },\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'Do':\n case 'DD':\n return number;\n default:\n if (number === 0) {\n // special case for zero\n return number + \"'ıncı\";\n }\n var a = number % 10,\n b = (number % 100) - a,\n c = number >= 100 ? 100 : null;\n return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return tr;\n\n})));\n","import { executeSchedule } from '../util/executeSchedule';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function observeOn(scheduler, delay = 0) {\n return operate((source, subscriber) => {\n source.subscribe(createOperatorSubscriber(subscriber, (value) => executeSchedule(subscriber, scheduler, () => subscriber.next(value), delay), () => executeSchedule(subscriber, scheduler, () => subscriber.complete(), delay), (err) => executeSchedule(subscriber, scheduler, () => subscriber.error(err), delay)));\n });\n}\n","import { _getProvider, getApp, _registerComponent, registerVersion, SDK_VERSION } from '@firebase/app';\nimport { ErrorFactory, FirebaseError, getModularInstance, calculateBackoffMillis, isIndexedDBAvailable, validateIndexedDBOpenable } from '@firebase/util';\nimport { Component } from '@firebase/component';\nimport { LogLevel, Logger } from '@firebase/logger';\nimport '@firebase/installations';\n\nconst name = \"@firebase/remote-config\";\nconst version = \"0.5.0\";\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 * Shims a minimal AbortSignal.\n *\n * <p>AbortController's AbortSignal conveniently decouples fetch timeout logic from other aspects\n * of networking, such as retries. Firebase doesn't use AbortController enough to justify a\n * polyfill recommendation, like we do with the Fetch API, but this minimal shim can easily be\n * swapped out if/when we do.\n */\nclass RemoteConfigAbortSignal {\n constructor() {\n this.listeners = [];\n }\n addEventListener(listener) {\n this.listeners.push(listener);\n }\n abort() {\n this.listeners.forEach(listener => listener());\n }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\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 */\nconst RC_COMPONENT_NAME = 'remote-config';\nconst RC_CUSTOM_SIGNAL_MAX_ALLOWED_SIGNALS = 100;\nconst RC_CUSTOM_SIGNAL_KEY_MAX_LENGTH = 250;\nconst RC_CUSTOM_SIGNAL_VALUE_MAX_LENGTH = 500;\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 */\nconst ERROR_DESCRIPTION_MAP = {\n [\"registration-window\" /* ErrorCode.REGISTRATION_WINDOW */]: 'Undefined window object. This SDK only supports usage in a browser environment.',\n [\"registration-project-id\" /* ErrorCode.REGISTRATION_PROJECT_ID */]: 'Undefined project identifier. Check Firebase app initialization.',\n [\"registration-api-key\" /* ErrorCode.REGISTRATION_API_KEY */]: 'Undefined API key. Check Firebase app initialization.',\n [\"registration-app-id\" /* ErrorCode.REGISTRATION_APP_ID */]: 'Undefined app identifier. Check Firebase app initialization.',\n [\"storage-open\" /* ErrorCode.STORAGE_OPEN */]: 'Error thrown when opening storage. Original error: {$originalErrorMessage}.',\n [\"storage-get\" /* ErrorCode.STORAGE_GET */]: 'Error thrown when reading from storage. Original error: {$originalErrorMessage}.',\n [\"storage-set\" /* ErrorCode.STORAGE_SET */]: 'Error thrown when writing to storage. Original error: {$originalErrorMessage}.',\n [\"storage-delete\" /* ErrorCode.STORAGE_DELETE */]: 'Error thrown when deleting from storage. Original error: {$originalErrorMessage}.',\n [\"fetch-client-network\" /* ErrorCode.FETCH_NETWORK */]: 'Fetch client failed to connect to a network. Check Internet connection.' +\n ' Original error: {$originalErrorMessage}.',\n [\"fetch-timeout\" /* ErrorCode.FETCH_TIMEOUT */]: 'The config fetch request timed out. ' +\n ' Configure timeout using \"fetchTimeoutMillis\" SDK setting.',\n [\"fetch-throttle\" /* ErrorCode.FETCH_THROTTLE */]: 'The config fetch request timed out while in an exponential backoff state.' +\n ' Configure timeout using \"fetchTimeoutMillis\" SDK setting.' +\n ' Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.',\n [\"fetch-client-parse\" /* ErrorCode.FETCH_PARSE */]: 'Fetch client could not parse response.' +\n ' Original error: {$originalErrorMessage}.',\n [\"fetch-status\" /* ErrorCode.FETCH_STATUS */]: 'Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.',\n [\"indexed-db-unavailable\" /* ErrorCode.INDEXED_DB_UNAVAILABLE */]: 'Indexed DB is not supported by current browser',\n [\"custom-signal-max-allowed-signals\" /* ErrorCode.CUSTOM_SIGNAL_MAX_ALLOWED_SIGNALS */]: 'Setting more than {$maxSignals} custom signals is not supported.'\n};\nconst ERROR_FACTORY = new ErrorFactory('remoteconfig' /* service */, 'Remote Config' /* service name */, ERROR_DESCRIPTION_MAP);\n// Note how this is like typeof/instanceof, but for ErrorCode.\nfunction hasErrorCode(e, errorCode) {\n return e instanceof FirebaseError && e.code.indexOf(errorCode) !== -1;\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 */\nconst DEFAULT_VALUE_FOR_BOOLEAN = false;\nconst DEFAULT_VALUE_FOR_STRING = '';\nconst DEFAULT_VALUE_FOR_NUMBER = 0;\nconst BOOLEAN_TRUTHY_VALUES = ['1', 'true', 't', 'yes', 'y', 'on'];\nclass Value {\n constructor(_source, _value = DEFAULT_VALUE_FOR_STRING) {\n this._source = _source;\n this._value = _value;\n }\n asString() {\n return this._value;\n }\n asBoolean() {\n if (this._source === 'static') {\n return DEFAULT_VALUE_FOR_BOOLEAN;\n }\n return BOOLEAN_TRUTHY_VALUES.indexOf(this._value.toLowerCase()) >= 0;\n }\n asNumber() {\n if (this._source === 'static') {\n return DEFAULT_VALUE_FOR_NUMBER;\n }\n let num = Number(this._value);\n if (isNaN(num)) {\n num = DEFAULT_VALUE_FOR_NUMBER;\n }\n return num;\n }\n getSource() {\n return this._source;\n }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\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 *\n * @param app - The {@link @firebase/app#FirebaseApp} instance.\n * @returns A {@link RemoteConfig} instance.\n *\n * @public\n */\nfunction getRemoteConfig(app = getApp()) {\n app = getModularInstance(app);\n const rcProvider = _getProvider(app, RC_COMPONENT_NAME);\n return rcProvider.getImmediate();\n}\n/**\n * Makes the last fetched config available to the getters.\n * @param remoteConfig - The {@link RemoteConfig} instance.\n * @returns A `Promise` which resolves to true if the current call activated the fetched configs.\n * If the fetched configs were already activated, the `Promise` will resolve to false.\n *\n * @public\n */\nasync function activate(remoteConfig) {\n const rc = getModularInstance(remoteConfig);\n const [lastSuccessfulFetchResponse, activeConfigEtag] = await Promise.all([\n rc._storage.getLastSuccessfulFetchResponse(),\n rc._storage.getActiveConfigEtag()\n ]);\n if (!lastSuccessfulFetchResponse ||\n !lastSuccessfulFetchResponse.config ||\n !lastSuccessfulFetchResponse.eTag ||\n lastSuccessfulFetchResponse.eTag === activeConfigEtag) {\n // Either there is no successful fetched config, or is the same as current active\n // config.\n return false;\n }\n await Promise.all([\n rc._storageCache.setActiveConfig(lastSuccessfulFetchResponse.config),\n rc._storage.setActiveConfigEtag(lastSuccessfulFetchResponse.eTag)\n ]);\n return true;\n}\n/**\n * Ensures the last activated config are available to the getters.\n * @param remoteConfig - The {@link RemoteConfig} instance.\n *\n * @returns A `Promise` that resolves when the last activated config is available to the getters.\n * @public\n */\nfunction ensureInitialized(remoteConfig) {\n const rc = getModularInstance(remoteConfig);\n if (!rc._initializePromise) {\n rc._initializePromise = rc._storageCache.loadFromStorage().then(() => {\n rc._isInitializationComplete = true;\n });\n }\n return rc._initializePromise;\n}\n/**\n * Fetches and caches configuration from the Remote Config service.\n * @param remoteConfig - The {@link RemoteConfig} instance.\n * @public\n */\nasync function fetchConfig(remoteConfig) {\n const rc = getModularInstance(remoteConfig);\n // Aborts the request after the given timeout, causing the fetch call to\n // reject with an `AbortError`.\n //\n // <p>Aborting after the request completes is a no-op, so we don't need a\n // corresponding `clearTimeout`.\n //\n // Locating abort logic here because:\n // * it uses a developer setting (timeout)\n // * it applies to all retries (like curl's max-time arg)\n // * it is consistent with the Fetch API's signal input\n const abortSignal = new RemoteConfigAbortSignal();\n setTimeout(async () => {\n // Note a very low delay, eg < 10ms, can elapse before listeners are initialized.\n abortSignal.abort();\n }, rc.settings.fetchTimeoutMillis);\n const customSignals = rc._storageCache.getCustomSignals();\n if (customSignals) {\n rc._logger.debug(`Fetching config with custom signals: ${JSON.stringify(customSignals)}`);\n }\n // Catches *all* errors thrown by client so status can be set consistently.\n try {\n await rc._client.fetch({\n cacheMaxAgeMillis: rc.settings.minimumFetchIntervalMillis,\n signal: abortSignal,\n customSignals\n });\n await rc._storageCache.setLastFetchStatus('success');\n }\n catch (e) {\n const lastFetchStatus = hasErrorCode(e, \"fetch-throttle\" /* ErrorCode.FETCH_THROTTLE */)\n ? 'throttle'\n : 'failure';\n await rc._storageCache.setLastFetchStatus(lastFetchStatus);\n throw e;\n }\n}\n/**\n * Gets all config.\n *\n * @param remoteConfig - The {@link RemoteConfig} instance.\n * @returns All config.\n *\n * @public\n */\nfunction getAll(remoteConfig) {\n const rc = getModularInstance(remoteConfig);\n return getAllKeys(rc._storageCache.getActiveConfig(), rc.defaultConfig).reduce((allConfigs, key) => {\n allConfigs[key] = getValue(remoteConfig, key);\n return allConfigs;\n }, {});\n}\n/**\n * Gets the value for the given key as a boolean.\n *\n * Convenience method for calling <code>remoteConfig.getValue(key).asBoolean()</code>.\n *\n * @param remoteConfig - The {@link RemoteConfig} instance.\n * @param key - The name of the parameter.\n *\n * @returns The value for the given key as a boolean.\n * @public\n */\nfunction getBoolean(remoteConfig, key) {\n return getValue(getModularInstance(remoteConfig), key).asBoolean();\n}\n/**\n * Gets the value for the given key as a number.\n *\n * Convenience method for calling <code>remoteConfig.getValue(key).asNumber()</code>.\n *\n * @param remoteConfig - The {@link RemoteConfig} instance.\n * @param key - The name of the parameter.\n *\n * @returns The value for the given key as a number.\n *\n * @public\n */\nfunction getNumber(remoteConfig, key) {\n return getValue(getModularInstance(remoteConfig), key).asNumber();\n}\n/**\n * Gets the value for the given key as a string.\n * Convenience method for calling <code>remoteConfig.getValue(key).asString()</code>.\n *\n * @param remoteConfig - The {@link RemoteConfig} instance.\n * @param key - The name of the parameter.\n *\n * @returns The value for the given key as a string.\n *\n * @public\n */\nfunction getString(remoteConfig, key) {\n return getValue(getModularInstance(remoteConfig), key).asString();\n}\n/**\n * Gets the {@link Value} for the given key.\n *\n * @param remoteConfig - The {@link RemoteConfig} instance.\n * @param key - The name of the parameter.\n *\n * @returns The value for the given key.\n *\n * @public\n */\nfunction getValue(remoteConfig, key) {\n const rc = getModularInstance(remoteConfig);\n if (!rc._isInitializationComplete) {\n rc._logger.debug(`A value was requested for key \"${key}\" before SDK initialization completed.` +\n ' Await on ensureInitialized if the intent was to get a previously activated value.');\n }\n const activeConfig = rc._storageCache.getActiveConfig();\n if (activeConfig && activeConfig[key] !== undefined) {\n return new Value('remote', activeConfig[key]);\n }\n else if (rc.defaultConfig && rc.defaultConfig[key] !== undefined) {\n return new Value('default', String(rc.defaultConfig[key]));\n }\n rc._logger.debug(`Returning static value for key \"${key}\".` +\n ' Define a default or remote value if this is unintentional.');\n return new Value('static');\n}\n/**\n * Defines the log level to use.\n *\n * @param remoteConfig - The {@link RemoteConfig} instance.\n * @param logLevel - The log level to set.\n *\n * @public\n */\nfunction setLogLevel(remoteConfig, logLevel) {\n const rc = getModularInstance(remoteConfig);\n switch (logLevel) {\n case 'debug':\n rc._logger.logLevel = LogLevel.DEBUG;\n break;\n case 'silent':\n rc._logger.logLevel = LogLevel.SILENT;\n break;\n default:\n rc._logger.logLevel = LogLevel.ERROR;\n }\n}\n/**\n * Dedupes and returns an array of all the keys of the received objects.\n */\nfunction getAllKeys(obj1 = {}, obj2 = {}) {\n return Object.keys(Object.assign(Object.assign({}, obj1), obj2));\n}\n/**\n * Sets the custom signals for the app instance.\n *\n * @param remoteConfig - The {@link RemoteConfig} instance.\n * @param customSignals - Map (key, value) of the custom signals to be set for the app instance. If\n * a key already exists, the value is overwritten. Setting the value of a custom signal to null\n * unsets the signal. The signals will be persisted locally on the client.\n *\n * @public\n */\nasync function setCustomSignals(remoteConfig, customSignals) {\n const rc = getModularInstance(remoteConfig);\n if (Object.keys(customSignals).length === 0) {\n return;\n }\n // eslint-disable-next-line guard-for-in\n for (const key in customSignals) {\n if (key.length > RC_CUSTOM_SIGNAL_KEY_MAX_LENGTH) {\n rc._logger.error(`Custom signal key ${key} is too long, max allowed length is ${RC_CUSTOM_SIGNAL_KEY_MAX_LENGTH}.`);\n return;\n }\n const value = customSignals[key];\n if (typeof value === 'string' &&\n value.length > RC_CUSTOM_SIGNAL_VALUE_MAX_LENGTH) {\n rc._logger.error(`Value supplied for custom signal ${key} is too long, max allowed length is ${RC_CUSTOM_SIGNAL_VALUE_MAX_LENGTH}.`);\n return;\n }\n }\n try {\n await rc._storageCache.setCustomSignals(customSignals);\n }\n catch (error) {\n rc._logger.error(`Error encountered while setting custom signals: ${error}`);\n }\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 * Implements the {@link RemoteConfigClient} abstraction with success response caching.\n *\n * <p>Comparable to the browser's Cache API for responses, but the Cache API requires a Service\n * Worker, which requires HTTPS, which would significantly complicate SDK installation. Also, the\n * Cache API doesn't support matching entries by time.\n */\nclass CachingClient {\n constructor(client, storage, storageCache, logger) {\n this.client = client;\n this.storage = storage;\n this.storageCache = storageCache;\n this.logger = logger;\n }\n /**\n * Returns true if the age of the cached fetched configs is less than or equal to\n * {@link Settings#minimumFetchIntervalInSeconds}.\n *\n * <p>This is comparable to passing `headers = { 'Cache-Control': max-age <maxAge> }` to the\n * native Fetch API.\n *\n * <p>Visible for testing.\n */\n isCachedDataFresh(cacheMaxAgeMillis, lastSuccessfulFetchTimestampMillis) {\n // Cache can only be fresh if it's populated.\n if (!lastSuccessfulFetchTimestampMillis) {\n this.logger.debug('Config fetch cache check. Cache unpopulated.');\n return false;\n }\n // Calculates age of cache entry.\n const cacheAgeMillis = Date.now() - lastSuccessfulFetchTimestampMillis;\n const isCachedDataFresh = cacheAgeMillis <= cacheMaxAgeMillis;\n this.logger.debug('Config fetch cache check.' +\n ` Cache age millis: ${cacheAgeMillis}.` +\n ` Cache max age millis (minimumFetchIntervalMillis setting): ${cacheMaxAgeMillis}.` +\n ` Is cache hit: ${isCachedDataFresh}.`);\n return isCachedDataFresh;\n }\n async fetch(request) {\n // Reads from persisted storage to avoid cache miss if callers don't wait on initialization.\n const [lastSuccessfulFetchTimestampMillis, lastSuccessfulFetchResponse] = await Promise.all([\n this.storage.getLastSuccessfulFetchTimestampMillis(),\n this.storage.getLastSuccessfulFetchResponse()\n ]);\n // Exits early on cache hit.\n if (lastSuccessfulFetchResponse &&\n this.isCachedDataFresh(request.cacheMaxAgeMillis, lastSuccessfulFetchTimestampMillis)) {\n return lastSuccessfulFetchResponse;\n }\n // Deviates from pure decorator by not honoring a passed ETag since we don't have a public API\n // that allows the caller to pass an ETag.\n request.eTag =\n lastSuccessfulFetchResponse && lastSuccessfulFetchResponse.eTag;\n // Falls back to service on cache miss.\n const response = await this.client.fetch(request);\n // Fetch throws for non-success responses, so success is guaranteed here.\n const storageOperations = [\n // Uses write-through cache for consistency with synchronous public API.\n this.storageCache.setLastSuccessfulFetchTimestampMillis(Date.now())\n ];\n if (response.status === 200) {\n // Caches response only if it has changed, ie non-304 responses.\n storageOperations.push(this.storage.setLastSuccessfulFetchResponse(response));\n }\n await Promise.all(storageOperations);\n return response;\n }\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 * Attempts to get the most accurate browser language setting.\n *\n * <p>Adapted from getUserLanguage in packages/auth/src/utils.js for TypeScript.\n *\n * <p>Defers default language specification to server logic for consistency.\n *\n * @param navigatorLanguage Enables tests to override read-only {@link NavigatorLanguage}.\n */\nfunction getUserLanguage(navigatorLanguage = navigator) {\n return (\n // Most reliable, but only supported in Chrome/Firefox.\n (navigatorLanguage.languages && navigatorLanguage.languages[0]) ||\n // Supported in most browsers, but returns the language of the browser\n // UI, not the language set in browser settings.\n navigatorLanguage.language\n // Polyfill otherwise.\n );\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 * Implements the Client abstraction for the Remote Config REST API.\n */\nclass RestClient {\n constructor(firebaseInstallations, sdkVersion, namespace, projectId, apiKey, appId) {\n this.firebaseInstallations = firebaseInstallations;\n this.sdkVersion = sdkVersion;\n this.namespace = namespace;\n this.projectId = projectId;\n this.apiKey = apiKey;\n this.appId = appId;\n }\n /**\n * Fetches from the Remote Config REST API.\n *\n * @throws a {@link ErrorCode.FETCH_NETWORK} error if {@link GlobalFetch#fetch} can't\n * connect to the network.\n * @throws a {@link ErrorCode.FETCH_PARSE} error if {@link Response#json} can't parse the\n * fetch response.\n * @throws a {@link ErrorCode.FETCH_STATUS} error if the service returns an HTTP error status.\n */\n async fetch(request) {\n const [installationId, installationToken] = await Promise.all([\n this.firebaseInstallations.getId(),\n this.firebaseInstallations.getToken()\n ]);\n const urlBase = window.FIREBASE_REMOTE_CONFIG_URL_BASE ||\n 'https://firebaseremoteconfig.googleapis.com';\n const url = `${urlBase}/v1/projects/${this.projectId}/namespaces/${this.namespace}:fetch?key=${this.apiKey}`;\n const headers = {\n 'Content-Type': 'application/json',\n 'Content-Encoding': 'gzip',\n // Deviates from pure decorator by not passing max-age header since we don't currently have\n // service behavior using that header.\n 'If-None-Match': request.eTag || '*'\n };\n const requestBody = {\n /* eslint-disable camelcase */\n sdk_version: this.sdkVersion,\n app_instance_id: installationId,\n app_instance_id_token: installationToken,\n app_id: this.appId,\n language_code: getUserLanguage(),\n custom_signals: request.customSignals\n /* eslint-enable camelcase */\n };\n const options = {\n method: 'POST',\n headers,\n body: JSON.stringify(requestBody)\n };\n // This logic isn't REST-specific, but shimming abort logic isn't worth another decorator.\n const fetchPromise = fetch(url, options);\n const timeoutPromise = new Promise((_resolve, reject) => {\n // Maps async event listener to Promise API.\n request.signal.addEventListener(() => {\n // Emulates https://heycam.github.io/webidl/#aborterror\n const error = new Error('The operation was aborted.');\n error.name = 'AbortError';\n reject(error);\n });\n });\n let response;\n try {\n await Promise.race([fetchPromise, timeoutPromise]);\n response = await fetchPromise;\n }\n catch (originalError) {\n let errorCode = \"fetch-client-network\" /* ErrorCode.FETCH_NETWORK */;\n if ((originalError === null || originalError === void 0 ? void 0 : originalError.name) === 'AbortError') {\n errorCode = \"fetch-timeout\" /* ErrorCode.FETCH_TIMEOUT */;\n }\n throw ERROR_FACTORY.create(errorCode, {\n originalErrorMessage: originalError === null || originalError === void 0 ? void 0 : originalError.message\n });\n }\n let status = response.status;\n // Normalizes nullable header to optional.\n const responseEtag = response.headers.get('ETag') || undefined;\n let config;\n let state;\n // JSON parsing throws SyntaxError if the response body isn't a JSON string.\n // Requesting application/json and checking for a 200 ensures there's JSON data.\n if (response.status === 200) {\n let responseBody;\n try {\n responseBody = await response.json();\n }\n catch (originalError) {\n throw ERROR_FACTORY.create(\"fetch-client-parse\" /* ErrorCode.FETCH_PARSE */, {\n originalErrorMessage: originalError === null || originalError === void 0 ? void 0 : originalError.message\n });\n }\n config = responseBody['entries'];\n state = responseBody['state'];\n }\n // Normalizes based on legacy state.\n if (state === 'INSTANCE_STATE_UNSPECIFIED') {\n status = 500;\n }\n else if (state === 'NO_CHANGE') {\n status = 304;\n }\n else if (state === 'NO_TEMPLATE' || state === 'EMPTY_CONFIG') {\n // These cases can be fixed remotely, so normalize to safe value.\n config = {};\n }\n // Normalize to exception-based control flow for non-success cases.\n // Encapsulates HTTP specifics in this class as much as possible. Status is still the best for\n // differentiating success states (200 from 304; the state body param is undefined in a\n // standard 304).\n if (status !== 304 && status !== 200) {\n throw ERROR_FACTORY.create(\"fetch-status\" /* ErrorCode.FETCH_STATUS */, {\n httpStatus: status\n });\n }\n return { status, eTag: responseEtag, config };\n }\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 * Supports waiting on a backoff by:\n *\n * <ul>\n * <li>Promisifying setTimeout, so we can set a timeout in our Promise chain</li>\n * <li>Listening on a signal bus for abort events, just like the Fetch API</li>\n * <li>Failing in the same way the Fetch API fails, so timing out a live request and a throttled\n * request appear the same.</li>\n * </ul>\n *\n * <p>Visible for testing.\n */\nfunction setAbortableTimeout(signal, throttleEndTimeMillis) {\n return new Promise((resolve, reject) => {\n // Derives backoff from given end time, normalizing negative numbers to zero.\n const backoffMillis = Math.max(throttleEndTimeMillis - Date.now(), 0);\n const timeout = setTimeout(resolve, backoffMillis);\n // Adds listener, rather than sets onabort, because signal is a shared object.\n signal.addEventListener(() => {\n clearTimeout(timeout);\n // If the request completes before this timeout, the rejection has no effect.\n reject(ERROR_FACTORY.create(\"fetch-throttle\" /* ErrorCode.FETCH_THROTTLE */, {\n throttleEndTimeMillis\n }));\n });\n });\n}\n/**\n * Returns true if the {@link Error} indicates a fetch request may succeed later.\n */\nfunction isRetriableError(e) {\n if (!(e instanceof FirebaseError) || !e.customData) {\n return false;\n }\n // Uses string index defined by ErrorData, which FirebaseError implements.\n const httpStatus = Number(e.customData['httpStatus']);\n return (httpStatus === 429 ||\n httpStatus === 500 ||\n httpStatus === 503 ||\n httpStatus === 504);\n}\n/**\n * Decorates a Client with retry logic.\n *\n * <p>Comparable to CachingClient, but uses backoff logic instead of cache max age and doesn't cache\n * responses (because the SDK has no use for error responses).\n */\nclass RetryingClient {\n constructor(client, storage) {\n this.client = client;\n this.storage = storage;\n }\n async fetch(request) {\n const throttleMetadata = (await this.storage.getThrottleMetadata()) || {\n backoffCount: 0,\n throttleEndTimeMillis: Date.now()\n };\n return this.attemptFetch(request, throttleMetadata);\n }\n /**\n * A recursive helper for attempting a fetch request repeatedly.\n *\n * @throws any non-retriable errors.\n */\n async attemptFetch(request, { throttleEndTimeMillis, backoffCount }) {\n // Starts with a (potentially zero) timeout to support resumption from stored state.\n // Ensures the throttle end time is honored if the last attempt timed out.\n // Note the SDK will never make a request if the fetch timeout expires at this point.\n await setAbortableTimeout(request.signal, throttleEndTimeMillis);\n try {\n const response = await this.client.fetch(request);\n // Note the SDK only clears throttle state if response is success or non-retriable.\n await this.storage.deleteThrottleMetadata();\n return response;\n }\n catch (e) {\n if (!isRetriableError(e)) {\n throw e;\n }\n // Increments backoff state.\n const throttleMetadata = {\n throttleEndTimeMillis: Date.now() + calculateBackoffMillis(backoffCount),\n backoffCount: backoffCount + 1\n };\n // Persists state.\n await this.storage.setThrottleMetadata(throttleMetadata);\n return this.attemptFetch(request, throttleMetadata);\n }\n }\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 */\nconst DEFAULT_FETCH_TIMEOUT_MILLIS = 60 * 1000; // One minute\nconst DEFAULT_CACHE_MAX_AGE_MILLIS = 12 * 60 * 60 * 1000; // Twelve hours.\n/**\n * Encapsulates business logic mapping network and storage dependencies to the public SDK API.\n *\n * See {@link https://github.com/firebase/firebase-js-sdk/blob/main/packages/firebase/index.d.ts|interface documentation} for method descriptions.\n */\nclass RemoteConfig {\n get fetchTimeMillis() {\n return this._storageCache.getLastSuccessfulFetchTimestampMillis() || -1;\n }\n get lastFetchStatus() {\n return this._storageCache.getLastFetchStatus() || 'no-fetch-yet';\n }\n constructor(\n // Required by FirebaseServiceFactory interface.\n app, \n // JS doesn't support private yet\n // (https://github.com/tc39/proposal-class-fields#private-fields), so we hint using an\n // underscore prefix.\n /**\n * @internal\n */\n _client, \n /**\n * @internal\n */\n _storageCache, \n /**\n * @internal\n */\n _storage, \n /**\n * @internal\n */\n _logger) {\n this.app = app;\n this._client = _client;\n this._storageCache = _storageCache;\n this._storage = _storage;\n this._logger = _logger;\n /**\n * Tracks completion of initialization promise.\n * @internal\n */\n this._isInitializationComplete = false;\n this.settings = {\n fetchTimeoutMillis: DEFAULT_FETCH_TIMEOUT_MILLIS,\n minimumFetchIntervalMillis: DEFAULT_CACHE_MAX_AGE_MILLIS\n };\n this.defaultConfig = {};\n }\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 * Converts an error event associated with a {@link IDBRequest} to a {@link FirebaseError}.\n */\nfunction toFirebaseError(event, errorCode) {\n const originalError = event.target.error || undefined;\n return ERROR_FACTORY.create(errorCode, {\n originalErrorMessage: originalError && (originalError === null || originalError === void 0 ? void 0 : originalError.message)\n });\n}\n/**\n * A general-purpose store keyed by app + namespace + {@link\n * ProjectNamespaceKeyFieldValue}.\n *\n * <p>The Remote Config SDK can be used with multiple app installations, and each app can interact\n * with multiple namespaces, so this store uses app (ID + name) and namespace as common parent keys\n * for a set of key-value pairs. See {@link Storage#createCompositeKey}.\n *\n * <p>Visible for testing.\n */\nconst APP_NAMESPACE_STORE = 'app_namespace_store';\nconst DB_NAME = 'firebase_remote_config';\nconst DB_VERSION = 1;\n// Visible for testing.\nfunction openDatabase() {\n return new Promise((resolve, reject) => {\n try {\n const request = indexedDB.open(DB_NAME, DB_VERSION);\n request.onerror = event => {\n reject(toFirebaseError(event, \"storage-open\" /* ErrorCode.STORAGE_OPEN */));\n };\n request.onsuccess = event => {\n resolve(event.target.result);\n };\n request.onupgradeneeded = event => {\n const db = event.target.result;\n // We don't use 'break' in this switch statement, the fall-through\n // behavior is what we want, because if there are multiple versions between\n // the old version and the current version, we want ALL the migrations\n // that correspond to those versions to run, not only the last one.\n // eslint-disable-next-line default-case\n switch (event.oldVersion) {\n case 0:\n db.createObjectStore(APP_NAMESPACE_STORE, {\n keyPath: 'compositeKey'\n });\n }\n };\n }\n catch (error) {\n reject(ERROR_FACTORY.create(\"storage-open\" /* ErrorCode.STORAGE_OPEN */, {\n originalErrorMessage: error === null || error === void 0 ? void 0 : error.message\n }));\n }\n });\n}\n/**\n * Abstracts data persistence.\n */\nclass Storage {\n /**\n * @param appId enables storage segmentation by app (ID + name).\n * @param appName enables storage segmentation by app (ID + name).\n * @param namespace enables storage segmentation by namespace.\n */\n constructor(appId, appName, namespace, openDbPromise = openDatabase()) {\n this.appId = appId;\n this.appName = appName;\n this.namespace = namespace;\n this.openDbPromise = openDbPromise;\n }\n getLastFetchStatus() {\n return this.get('last_fetch_status');\n }\n setLastFetchStatus(status) {\n return this.set('last_fetch_status', status);\n }\n // This is comparable to a cache entry timestamp. If we need to expire other data, we could\n // consider adding timestamp to all storage records and an optional max age arg to getters.\n getLastSuccessfulFetchTimestampMillis() {\n return this.get('last_successful_fetch_timestamp_millis');\n }\n setLastSuccessfulFetchTimestampMillis(timestamp) {\n return this.set('last_successful_fetch_timestamp_millis', timestamp);\n }\n getLastSuccessfulFetchResponse() {\n return this.get('last_successful_fetch_response');\n }\n setLastSuccessfulFetchResponse(response) {\n return this.set('last_successful_fetch_response', response);\n }\n getActiveConfig() {\n return this.get('active_config');\n }\n setActiveConfig(config) {\n return this.set('active_config', config);\n }\n getActiveConfigEtag() {\n return this.get('active_config_etag');\n }\n setActiveConfigEtag(etag) {\n return this.set('active_config_etag', etag);\n }\n getThrottleMetadata() {\n return this.get('throttle_metadata');\n }\n setThrottleMetadata(metadata) {\n return this.set('throttle_metadata', metadata);\n }\n deleteThrottleMetadata() {\n return this.delete('throttle_metadata');\n }\n getCustomSignals() {\n return this.get('custom_signals');\n }\n async setCustomSignals(customSignals) {\n const db = await this.openDbPromise;\n const transaction = db.transaction([APP_NAMESPACE_STORE], 'readwrite');\n const storedSignals = await this.getWithTransaction('custom_signals', transaction);\n const combinedSignals = Object.assign(Object.assign({}, storedSignals), customSignals);\n // Filter out key-value assignments with null values since they are signals being unset\n const updatedSignals = Object.fromEntries(Object.entries(combinedSignals)\n .filter(([_, v]) => v !== null)\n .map(([k, v]) => {\n // Stringify numbers to store a map of string keys and values which can be sent\n // as-is in a fetch call.\n if (typeof v === 'number') {\n return [k, v.toString()];\n }\n return [k, v];\n }));\n // Throw an error if the number of custom signals to be stored exceeds the limit\n if (Object.keys(updatedSignals).length > RC_CUSTOM_SIGNAL_MAX_ALLOWED_SIGNALS) {\n throw ERROR_FACTORY.create(\"custom-signal-max-allowed-signals\" /* ErrorCode.CUSTOM_SIGNAL_MAX_ALLOWED_SIGNALS */, {\n maxSignals: RC_CUSTOM_SIGNAL_MAX_ALLOWED_SIGNALS\n });\n }\n await this.setWithTransaction('custom_signals', updatedSignals, transaction);\n return updatedSignals;\n }\n /**\n * Gets a value from the database using the provided transaction.\n *\n * @param key The key of the value to get.\n * @param transaction The transaction to use for the operation.\n * @returns The value associated with the key, or undefined if no such value exists.\n */\n async getWithTransaction(key, transaction) {\n return new Promise((resolve, reject) => {\n const objectStore = transaction.objectStore(APP_NAMESPACE_STORE);\n const compositeKey = this.createCompositeKey(key);\n try {\n const request = objectStore.get(compositeKey);\n request.onerror = event => {\n reject(toFirebaseError(event, \"storage-get\" /* ErrorCode.STORAGE_GET */));\n };\n request.onsuccess = event => {\n const result = event.target.result;\n if (result) {\n resolve(result.value);\n }\n else {\n resolve(undefined);\n }\n };\n }\n catch (e) {\n reject(ERROR_FACTORY.create(\"storage-get\" /* ErrorCode.STORAGE_GET */, {\n originalErrorMessage: e === null || e === void 0 ? void 0 : e.message\n }));\n }\n });\n }\n /**\n * Sets a value in the database using the provided transaction.\n *\n * @param key The key of the value to set.\n * @param value The value to set.\n * @param transaction The transaction to use for the operation.\n * @returns A promise that resolves when the operation is complete.\n */\n async setWithTransaction(key, value, transaction) {\n return new Promise((resolve, reject) => {\n const objectStore = transaction.objectStore(APP_NAMESPACE_STORE);\n const compositeKey = this.createCompositeKey(key);\n try {\n const request = objectStore.put({\n compositeKey,\n value\n });\n request.onerror = (event) => {\n reject(toFirebaseError(event, \"storage-set\" /* ErrorCode.STORAGE_SET */));\n };\n request.onsuccess = () => {\n resolve();\n };\n }\n catch (e) {\n reject(ERROR_FACTORY.create(\"storage-set\" /* ErrorCode.STORAGE_SET */, {\n originalErrorMessage: e === null || e === void 0 ? void 0 : e.message\n }));\n }\n });\n }\n async get(key) {\n const db = await this.openDbPromise;\n const transaction = db.transaction([APP_NAMESPACE_STORE], 'readonly');\n return this.getWithTransaction(key, transaction);\n }\n async set(key, value) {\n const db = await this.openDbPromise;\n const transaction = db.transaction([APP_NAMESPACE_STORE], 'readwrite');\n return this.setWithTransaction(key, value, transaction);\n }\n async delete(key) {\n const db = await this.openDbPromise;\n return new Promise((resolve, reject) => {\n const transaction = db.transaction([APP_NAMESPACE_STORE], 'readwrite');\n const objectStore = transaction.objectStore(APP_NAMESPACE_STORE);\n const compositeKey = this.createCompositeKey(key);\n try {\n const request = objectStore.delete(compositeKey);\n request.onerror = (event) => {\n reject(toFirebaseError(event, \"storage-delete\" /* ErrorCode.STORAGE_DELETE */));\n };\n request.onsuccess = () => {\n resolve();\n };\n }\n catch (e) {\n reject(ERROR_FACTORY.create(\"storage-delete\" /* ErrorCode.STORAGE_DELETE */, {\n originalErrorMessage: e === null || e === void 0 ? void 0 : e.message\n }));\n }\n });\n }\n // Facilitates composite key functionality (which is unsupported in IE).\n createCompositeKey(key) {\n return [this.appId, this.appName, this.namespace, key].join();\n }\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\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 * A memory cache layer over storage to support the SDK's synchronous read requirements.\n */\nclass StorageCache {\n constructor(storage) {\n this.storage = storage;\n }\n /**\n * Memory-only getters\n */\n getLastFetchStatus() {\n return this.lastFetchStatus;\n }\n getLastSuccessfulFetchTimestampMillis() {\n return this.lastSuccessfulFetchTimestampMillis;\n }\n getActiveConfig() {\n return this.activeConfig;\n }\n getCustomSignals() {\n return this.customSignals;\n }\n /**\n * Read-ahead getter\n */\n async loadFromStorage() {\n const lastFetchStatusPromise = this.storage.getLastFetchStatus();\n const lastSuccessfulFetchTimestampMillisPromise = this.storage.getLastSuccessfulFetchTimestampMillis();\n const activeConfigPromise = this.storage.getActiveConfig();\n const customSignalsPromise = this.storage.getCustomSignals();\n // Note:\n // 1. we consistently check for undefined to avoid clobbering defined values\n // in memory\n // 2. we defer awaiting to improve readability, as opposed to destructuring\n // a Promise.all result, for example\n const lastFetchStatus = await lastFetchStatusPromise;\n if (lastFetchStatus) {\n this.lastFetchStatus = lastFetchStatus;\n }\n const lastSuccessfulFetchTimestampMillis = await lastSuccessfulFetchTimestampMillisPromise;\n if (lastSuccessfulFetchTimestampMillis) {\n this.lastSuccessfulFetchTimestampMillis =\n lastSuccessfulFetchTimestampMillis;\n }\n const activeConfig = await activeConfigPromise;\n if (activeConfig) {\n this.activeConfig = activeConfig;\n }\n const customSignals = await customSignalsPromise;\n if (customSignals) {\n this.customSignals = customSignals;\n }\n }\n /**\n * Write-through setters\n */\n setLastFetchStatus(status) {\n this.lastFetchStatus = status;\n return this.storage.setLastFetchStatus(status);\n }\n setLastSuccessfulFetchTimestampMillis(timestampMillis) {\n this.lastSuccessfulFetchTimestampMillis = timestampMillis;\n return this.storage.setLastSuccessfulFetchTimestampMillis(timestampMillis);\n }\n setActiveConfig(activeConfig) {\n this.activeConfig = activeConfig;\n return this.storage.setActiveConfig(activeConfig);\n }\n async setCustomSignals(customSignals) {\n this.customSignals = await this.storage.setCustomSignals(customSignals);\n }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\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 */\nfunction registerRemoteConfig() {\n _registerComponent(new Component(RC_COMPONENT_NAME, remoteConfigFactory, \"PUBLIC\" /* ComponentType.PUBLIC */).setMultipleInstances(true));\n registerVersion(name, version);\n // BUILD_TARGET will be replaced by values like esm2017, cjs2017, etc during the compilation\n registerVersion(name, version, 'esm2017');\n function remoteConfigFactory(container, { instanceIdentifier: namespace }) {\n /* Dependencies */\n // getImmediate for FirebaseApp will always succeed\n const app = container.getProvider('app').getImmediate();\n // The following call will always succeed because rc has `import '@firebase/installations'`\n const installations = container\n .getProvider('installations-internal')\n .getImmediate();\n // Guards against the SDK being used in non-browser environments.\n if (typeof window === 'undefined') {\n throw ERROR_FACTORY.create(\"registration-window\" /* ErrorCode.REGISTRATION_WINDOW */);\n }\n // Guards against the SDK being used when indexedDB is not available.\n if (!isIndexedDBAvailable()) {\n throw ERROR_FACTORY.create(\"indexed-db-unavailable\" /* ErrorCode.INDEXED_DB_UNAVAILABLE */);\n }\n // Normalizes optional inputs.\n const { projectId, apiKey, appId } = app.options;\n if (!projectId) {\n throw ERROR_FACTORY.create(\"registration-project-id\" /* ErrorCode.REGISTRATION_PROJECT_ID */);\n }\n if (!apiKey) {\n throw ERROR_FACTORY.create(\"registration-api-key\" /* ErrorCode.REGISTRATION_API_KEY */);\n }\n if (!appId) {\n throw ERROR_FACTORY.create(\"registration-app-id\" /* ErrorCode.REGISTRATION_APP_ID */);\n }\n namespace = namespace || 'firebase';\n const storage = new Storage(appId, app.name, namespace);\n const storageCache = new StorageCache(storage);\n const logger = new Logger(name);\n // Sets ERROR as the default log level.\n // See RemoteConfig#setLogLevel for corresponding normalization to ERROR log level.\n logger.logLevel = LogLevel.ERROR;\n const restClient = new RestClient(installations, \n // Uses the JS SDK version, by which the RC package version can be deduced, if necessary.\n SDK_VERSION, namespace, projectId, apiKey, appId);\n const retryingClient = new RetryingClient(restClient, storage);\n const cachingClient = new CachingClient(retryingClient, storage, storageCache, logger);\n const remoteConfigInstance = new RemoteConfig(app, cachingClient, storageCache, storage, logger);\n // Starts warming cache.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n ensureInitialized(remoteConfigInstance);\n return remoteConfigInstance;\n }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\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// This API is put in a separate file, so we can stub fetchConfig and activate in tests.\n// It's not possible to stub standalone functions from the same module.\n/**\n *\n * Performs fetch and activate operations, as a convenience.\n *\n * @param remoteConfig - The {@link RemoteConfig} instance.\n *\n * @returns A `Promise` which resolves to true if the current call activated the fetched configs.\n * If the fetched configs were already activated, the `Promise` will resolve to false.\n *\n * @public\n */\nasync function fetchAndActivate(remoteConfig) {\n remoteConfig = getModularInstance(remoteConfig);\n await fetchConfig(remoteConfig);\n return activate(remoteConfig);\n}\n/**\n * This method provides two different checks:\n *\n * 1. Check if IndexedDB exists in the browser environment.\n * 2. Check if the current browser context allows IndexedDB `open()` calls.\n *\n * @returns A `Promise` which resolves to true if a {@link RemoteConfig} instance\n * can be initialized in this environment, or false if it cannot.\n * @public\n */\nasync function isSupported() {\n if (!isIndexedDBAvailable()) {\n return false;\n }\n try {\n const isDBOpenable = await validateIndexedDBOpenable();\n return isDBOpenable;\n }\n catch (error) {\n return false;\n }\n}\n\n/**\n * The Firebase Remote Config Web SDK.\n * This SDK does not work in a Node.js environment.\n *\n * @packageDocumentation\n */\n/** register component and version */\nregisterRemoteConfig();\n\nexport { activate, ensureInitialized, fetchAndActivate, fetchConfig, getAll, getBoolean, getNumber, getRemoteConfig, getString, getValue, isSupported, setCustomSignals, setLogLevel };\n","//! moment.js locale configuration\n//! locale : Swahili [sw]\n//! author : Fahad Kassim : https://github.com/fadsel\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var sw = moment.defineLocale('sw', {\n months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'),\n weekdays:\n 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split(\n '_'\n ),\n weekdaysShort: 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'),\n weekdaysMin: 'J2_J3_J4_J5_Al_Ij_J1'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'hh:mm A',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[leo saa] LT',\n nextDay: '[kesho saa] LT',\n nextWeek: '[wiki ijayo] dddd [saat] LT',\n lastDay: '[jana] LT',\n lastWeek: '[wiki iliyopita] dddd [saat] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s baadaye',\n past: 'tokea %s',\n s: 'hivi punde',\n ss: 'sekunde %d',\n m: 'dakika moja',\n mm: 'dakika %d',\n h: 'saa limoja',\n hh: 'masaa %d',\n d: 'siku moja',\n dd: 'siku %d',\n M: 'mwezi mmoja',\n MM: 'miezi %d',\n y: 'mwaka mmoja',\n yy: 'miaka %d',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return sw;\n\n})));\n","import { config } from '../config';\nimport { timeoutProvider } from '../scheduler/timeoutProvider';\nexport function reportUnhandledError(err) {\n timeoutProvider.setTimeout(() => {\n const { onUnhandledError } = config;\n if (onUnhandledError) {\n onUnhandledError(err);\n }\n else {\n throw err;\n }\n });\n}\n","<ng-container *ngTemplateOutlet=\"default\"></ng-container>\n\n<ng-template #default>\n <div class=\"action-card action-details-card flex-column space-between mb-lg\">\n <div class=\"flex-column action-card__content\">\n <ng-container *ngTemplateOutlet=\"title\"></ng-container>\n <ng-container *ngTemplateOutlet=\"details\"></ng-container>\n <typography text-small-regular color=\"var(--secondary-text)\" class=\"action-card__body\">{{ cardConfig.body }}</typography>\n <div class=\"flex-row space-between action-card_footer_action mt-sm\">\n <div class=\"flex-column\">\n <bw-icon *ngIf=\"cardConfig.optionalIcon\" [iconName]=\"cardConfig.optionalIcon\"></bw-icon>\n </div>\n <div class=\"flex-column\">\n <div tabindex=\"1\" class=\"action-card__cta_icon\" (click)=\"emitCtaClicked()\" (keyup.enter)=\"emitCtaClicked()\">\n {{ cardConfig.ctaString }}\n <bw-icon [iconName]=\"'chevron_right'\" color=\"var(--blue-50)\" [size]=\"24\"></bw-icon>\n </div>\n </div>\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #title>\n <div class=\"flex-row action-card__label mb-sm\">\n <img *ngIf=\"cardConfig.labelImg\" [src]=\"cardConfig.labelImg\" width=\"32\" class=\"mr-xs\" />\n <bw-icon *ngIf=\"cardConfig.labelIcon && !cardConfig.labelImg\" [iconName]=\"cardConfig.labelIcon\" [size]=\"32\" [horizontalSpace]=\"'mr-xs'\"></bw-icon>\n <div class=\"flex-item\">\n <typography *ngIf=\"cardConfig.title\" text-medium-semibold>{{ cardConfig.title }}</typography>\n <typography text-xsmall-regular color=\"var(--secondary-text)\">{{ cardConfig.label }}</typography>\n </div>\n </div>\n</ng-template>\n\n<ng-template #details>\n <div class=\"action-details-card__details mb-sm pb-sm\">\n <div *ngFor=\"let detail of cardConfig.details\" class=\"flex-row space-between mb-xs\">\n <typography text-xsmall-regular color=\"var(--secondary-text)\">{{detail.title}}</typography>\n <typography text-xsmall-semibold>{{detail.detail}}</typography>\n </div>\n </div>\n</ng-template>\n","import {ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output} from '@angular/core';\n\nexport interface ActionDetailsCardConfigInterface {\n labelImg?: string;\n title?: string;\n body?: string;\n bgColor?: string;\n selected?: boolean;\n label?: string;\n labelSub?: string;\n labelIcon?: string;\n iconButton?: string;\n iconButtonSize?: number;\n iconbuttonColor?: string;\n cta?: string;\n hideCta?: boolean;\n ctaString?: string;\n optionalIcon?: string;\n removeMinHeight?: boolean;\n removeMaxWidth?: boolean;\n marginBottom?: 'medium' | 'large';\n details?: ActionDetailsCardDetail[],\n data?: any\n}\n\nexport interface ActionDetailsCardDetail {\n title: string;\n detail: string;\n}\n\n@Component({\n selector: 'bw-action-details-card',\n templateUrl: './action-details-card.component.html',\n styleUrls: ['./action-details-card.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ActionDetailsCardComponent implements OnInit {\n\n @Input() cardConfig!: ActionDetailsCardConfigInterface;\n @Output() ctaClicked: EventEmitter<any> = new EventEmitter<any>();\n\n constructor() {}\n\n ngOnInit(): void { }\n\n emitCtaClicked() : void {\n this.ctaClicked.emit(true);\n }\n\n}\n","<bw-action-article maxWidth=\"516px\">\n <ui-nav-exit-back\n header-actions\n [trackingDetail]=\"{ event_name: 'lender_alternatives' }\"></ui-nav-exit-back>\n\n <div pre-title>\n <typography title-medium>{{ 'LENDER_ALTERNATIVE_TITLE' | translate }}</typography>\n </div>\n <div header-title>\n <typography class=\"mt-sm mb-sm\">{{ 'LENDER_ALTERNATIVE_DESC' | translate }}</typography>\n </div>\n <div content-section>\n <div *ngIf=\"(externalPartners$ | async) as partners; else loading\">\n <bw-action-details-card\n *ngFor=\"let partnerConfig of partners\"\n [cardConfig]=\"partnerConfig\"\n (ctaClicked)=\"onCtaClicked(partnerConfig.data)\"\n ></bw-action-details-card>\n </div>\n </div>\n <div footer-top>\n <typography\n text-xsmall-semibold\n color=\"var(--secondary-text)\"\n class=\"mt-sm\">{{ 'LENDER_ALTERNATIVE_DISCLAIMER_TITLE' | translate }}</typography>\n <typography text-xsmall-regular class=\"disclaimer\">\n {{ 'LENDER_ALTERNATIVE_DISCLAIMER_DESC' | translate }}\n </typography>\n </div>\n</bw-action-article>\n<ng-template #loading>\n <bw-spinner class=\"mb-md\"></bw-spinner>\n</ng-template>\n","import { Component, OnInit } from '@angular/core';\nimport { map, Observable } from 'rxjs';\nimport { ActionDetailsCardConfigInterface } from '@brightside/brightside-ui';\nimport { TranslateService } from '@ngx-translate/core';\nimport { Environment } from '@micro-core/environment';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport {\n ExternalPartnerService,\n ExternalPartnerType,\n FirebaseService,\n PartnerDetails,\n} from '@brightside-web/desktop/data-access/shared';\n\n@Component({\n selector: 'brightside-web-external-lenders-intro',\n templateUrl: './external-lenders-intro.component.html',\n styleUrls: ['./external-lenders-intro.component.scss'],\n})\nexport class ExternalLendersIntroComponent implements OnInit {\n externalPartners$: Observable<ActionDetailsCardConfigInterface[] | undefined>;\n cdnImgUrl: string;\n partnersArray: string[] = [];\n partnersString = '';\n\n constructor(\n private _externalPartnerService: ExternalPartnerService,\n private _translateSvc: TranslateService,\n private _env: Environment,\n private _router: Router,\n private _route: ActivatedRoute,\n private _analytics: FirebaseService\n ) {\n this.cdnImgUrl = this._env.cdnUrl + 'images/app/';\n this.externalPartners$ = this._externalPartnerService.externalPartners$.pipe(\n map((partners: PartnerDetails[] | undefined) => {\n if (partners) {\n const partnersMap = partners.map((partner) => this.mapToCardConfig(partner));\n this.partnersString = this.partnersArray.join(',');\n this._analytics.logEvent('lender_alternatives_shown', { value: this.partnersString });\n return partnersMap;\n } else {\n return undefined;\n }\n })\n );\n }\n\n ngOnInit() {\n this._externalPartnerService.getPartners(ExternalPartnerType.LenderAlernatives);\n this._externalPartnerService.resetExternalPartnerDetails();\n }\n\n private mapToCardConfig(partner: PartnerDetails): ActionDetailsCardConfigInterface {\n this.partnersArray.push(partner.key);\n return {\n title: this._translateSvc.instant(partner.name.toUpperCase()),\n labelImg: this.cdnImgUrl + partner.image + '.png',\n cta: partner.url,\n ctaString: this._translateSvc.instant('LEARN_MORE'),\n details: partner.details.map((detailGroup: string[]) => ({\n title: this._translateSvc.instant(detailGroup[0].toUpperCase()),\n detail: this._translateSvc.instant(detailGroup[1].toUpperCase()),\n })),\n data: partner,\n };\n }\n\n onCtaClicked(partnerData: PartnerDetails) {\n if (partnerData) {\n this._router.navigate([partnerData.key], { relativeTo: this._route });\n }\n }\n}\n","<bw-action-article\n *ngIf=\"partnerIntro$ | async as partnerIntro; else spinner\">\n <div header-actions>\n <ui-nav-exit-back\n [trackingDetail]=\"{ event_name: 'lender_alternatives_intro' }\"\n [skipActionEmit]=\"false\"\n (exitActionHandler)=\"goBackToPartnerList()\"\n ></ui-nav-exit-back>\n </div>\n <div pre-title>\n <div class=\"partner-logo\" [style.background-image]=\"'url(' + cdnImgUrl + partnerIntro.imagePartner + '.png)'\"></div>\n </div>\n <div header-title>\n <div class=\"flex mt-sm\">\n <typography title-medium color=\"var(--primary-text)\">\n <div [innerHTML]=\"partnerIntro.name | translate\"></div>\n </typography>\n </div>\n </div>\n <div content-section>\n <typography color=\"var(--secondary-text)\" style=\"max-width: 450px\">\n <div [innerHTML]=\"partnerIntro.summary | translate\"></div>\n </typography>\n\n <typography text-medium-semibold class=\"mb-sm mt-sm\">\n {{ 'SUMMARY' | translate }}\n </typography>\n <typography color=\"var(--secondary-text)\" style=\"max-width: 450px\">\n <div [innerHTML]=\"partnerIntro.desc | translate\"></div>\n </typography>\n </div>\n <div footer-actions class=\"mt-md\">\n <button bw-button\n (click)=\"goToPartnerRedirectUrl(partnerIntro)\">\n {{ 'CONTINUE_TO_CTA' | translate:{lenderName: partnerIntro.name|translate} }}\n </button>\n </div>\n</bw-action-article>\n\n<ng-template #spinner>\n <bw-spinner></bw-spinner>\n</ng-template>\n","import { Component } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { Observable, takeWhile, tap } from 'rxjs';\nimport { Environment } from '@micro-core/environment';\nimport {\n ExternalPartnerService,\n PartnerDetails,\n FirebaseService,\n ExternalPartnerType,\n} from '@brightside-web/desktop/data-access/shared';\n\n@Component({\n selector: 'brightside-web-external-lenders-partner',\n templateUrl: './external-lenders-partner.component.html',\n styleUrls: ['./external-lenders-partner.component.scss'],\n})\nexport class ExternalLendersPartnerComponent {\n partnerIntro$: Observable<PartnerDetails | undefined> = this._externalPartnerService.currentPartnerDetails$;\n cdnImgUrl: string;\n\n constructor(\n private _route: ActivatedRoute,\n private _router: Router,\n private _externalPartnerService: ExternalPartnerService,\n private _env: Environment,\n private _analytics: FirebaseService\n ) {\n this.cdnImgUrl = this._env.cdnUrl + 'images/desktop/';\n\n this.partnerIntro$\n .pipe(\n takeWhile((partner) => !partner, true),\n tap((partner) => {\n if (partner) {\n this._analytics.logEvent('lender_alternatives_intro_shown', {\n value: partner.key,\n url: partner.url,\n });\n }\n })\n )\n .subscribe();\n\n this._route.paramMap\n .pipe(\n tap((params) => {\n this._externalPartnerService.getPartnerDetails(ExternalPartnerType.LenderAlernatives, params.get('lenderKey') || '');\n })\n )\n .subscribe();\n }\n\n goToPartnerRedirectUrl(partner: PartnerDetails) {\n this._analytics.logEvent('lender_alternatives_intro_redirect', {\n value: partner.key,\n url: partner.url,\n });\n window.open(partner.url, '_blank');\n }\n\n goBackToPartnerList() {\n this._router.navigate(['/lender-alternatives']);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ExternalLendersIntroComponent } from './external-lenders-intro/external-lenders-intro.component';\nimport { ExternalLendersPartnerComponent } from './external-lenders-partner/external-lenders-partner.component';\nimport { RouterModule, Routes } from '@angular/router';\nimport { SharedDesktopModule } from '@brightside-web/shared/desktop';\nimport { BrightsideUiModule } from '@brightside/brightside-ui';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { MicroUiMoleculeModule } from '@micro-ui/molecule';\nimport { ExternalPartnerService } from '@brightside-web/desktop/data-access/shared';\n\nconst ROUTES: Routes = [\n {\n path: '',\n component: ExternalLendersIntroComponent,\n },\n {\n path: ':lenderKey',\n component: ExternalLendersPartnerComponent,\n }\n]\n\n@NgModule({\n imports: [\n CommonModule,\n RouterModule.forChild(ROUTES),\n SharedDesktopModule,\n BrightsideUiModule,\n TranslateModule,\n MicroUiMoleculeModule,\n ],\n declarations: [\n ExternalLendersIntroComponent,\n ExternalLendersPartnerComponent,\n ],\n providers: [ExternalPartnerService]\n})\nexport class DesktopFeatureExternalLendersModule {}\n","import { Injectable } from '@angular/core';\nimport {\n ActivatedRouteSnapshot,\n CanActivate,\n CanLoad,\n Route,\n Router,\n RouterStateSnapshot,\n UrlSegment,\n UrlTree,\n} from '@angular/router';\nimport { from, map, Observable, of } from 'rxjs';\nimport { DesktopCardCaseType, MobileStateService } from '@brightside-web/desktop/data-access/shared';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ExternalLendersGuard implements CanActivate, CanLoad {\n constructor(private _router: Router, private _mobileStateSvc: MobileStateService) {}\n\n canActivate(\n route: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {\n return this.hasLenderAlternativesCard();\n }\n\n canLoad(route: Route, segments: UrlSegment[]): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {\n return this.hasLenderAlternativesCard();\n }\n\n hasLenderAlternativesCard(): Observable<boolean> {\n return this._mobileStateSvc.get().pipe(\n map((mobileState) => {\n const activateCards = mobileState.activatedCards;\n const lenderAlternativeCard = activateCards?.find((card) => card.case_type === DesktopCardCaseType.LENDER_ALTERNATIVES);\n if (lenderAlternativeCard) {\n return true;\n } else {\n this._router.navigate(['home']);\n return false;\n }\n }),\n );\n }\n}\n","/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nexport { DEBUG_BUILD };\n","import {Injectable} from '@angular/core';\nimport {BsApiService} from \"@brightside-web/desktop/data-access/core-services\";\nimport {map, take} from \"rxjs/operators\";\nimport {BehaviorSubject, Observable, Subject, throwError} from \"rxjs\";\n\nexport enum DocumentsKeyEnum {\n SAVINGS_ACCOUNT = \"savings_account_creation\",\n SPENDING_ACCOUNT = \"spending_account_creation\",\n CASH_ADVANCE = \"cash_advance_creation\",\n Kashable = \"kashable_loan_creation\",\n SalaryFinance = \"salary_finance_loan_creation\",\n TrueConnect = \"true_connect_loan_creation\",\n CREDIT_LINKING = \"credit_linking\",\n}\n\nexport interface LegalDocsResponsePayloadItems {\n titleCopyKey: string;\n descriptionCopyKey: string;\n downloadUrlCopyKey: string;\n downloadUrl: string;\n documentVersionId: number;\n}\n\nexport interface LegalDocsResponsePayload {\n legalDocuments: LegalDocsResponsePayloadItems[];\n}\n\nexport interface LegalDocsResponse {\n payload?: LegalDocsResponsePayload;\n}\n\ninterface LegalDocsGetRequired {\n documentsKey: DocumentsKeyEnum;\n}\n\nenum LegalDocsAcceptActions {\n ACCEPTED= 'ACCEPTED',\n DECLINED = 'DECLINED'\n}\n\ninterface LegalDocsAccept {\n validateByDocumentsKey: DocumentsKeyEnum;\n documentVersionIds: number[];\n action: LegalDocsAcceptActions\n}\n\n@Injectable()\nexport class LegalDocumentsService {\n\n apiPath = '/legal-docs';\n apiName = 'api-mobile';\n activeDocumentsKey: DocumentsKeyEnum;\n activeRequiredDocuments: LegalDocsResponsePayloadItems[];\n\n private _requiredDocuments = new Subject<LegalDocsResponsePayloadItems[]>();\n public readonly requiredDocuments: Observable<LegalDocsResponsePayloadItems[]> = this._requiredDocuments.asObservable();\n\n private _processing = new BehaviorSubject<boolean>(false);\n public readonly processing: Observable<boolean> = this._processing.asObservable();\n\n private _displayGeneralError = new BehaviorSubject<boolean>(false);\n public readonly displayGeneralError: Observable<boolean> = this._displayGeneralError.asObservable();\n\n private _docsSubmitted = new Subject<boolean>();\n public readonly docsSubmitted: Observable<boolean> = this._docsSubmitted.asObservable();\n\n private _displayDocsRequiredModal = new BehaviorSubject<boolean>(false);\n public readonly displayDocsRequiredModal: Observable<boolean> = this._displayDocsRequiredModal.asObservable();\n\n constructor(\n private bsAPI: BsApiService\n ) { }\n\n getDocsByKey(documentsKey: DocumentsKeyEnum): Observable<LegalDocsResponse> {\n return this.bsAPI.get<LegalDocsResponse>(\n this.apiName,\n `${this.apiPath}/required?documentsKey=${documentsKey}`,\n {cache:true});\n }\n\n getRequiredDocuments(documentsKey: DocumentsKeyEnum) {\n this.hideAdditionalDocsModal();\n this._processing.next(false);\n\n this.getDocsByKey(documentsKey)\n .pipe(\n take(1),\n map(resp => {\n if (resp.payload?.legalDocuments && resp.payload.legalDocuments.length > 0) {\n resp.payload.legalDocuments = this._uppercaseCopyKeys(resp.payload.legalDocuments);\n }\n return resp;\n })\n )\n .subscribe((resp) => {\n\n if (resp.payload) {\n this.activeDocumentsKey = documentsKey;\n this.activeRequiredDocuments = resp.payload.legalDocuments;\n this._requiredDocuments.next(resp.payload.legalDocuments);\n }\n if (resp.payload?.legalDocuments.length === 0) {\n this._docsSubmitted.next(true);\n }\n });\n }\n\n acceptRequiredDocuments() {\n this._processing.next(true);\n\n this.bsAPI.post<LegalDocsResponse>(this.apiName, `${this.apiPath}/action`, <LegalDocsAccept>{\n validateByDocumentsKey: this.activeDocumentsKey,\n action: LegalDocsAcceptActions.ACCEPTED,\n documentVersionIds: this._getDocumentIdArray()\n }).pipe(take(1))\n .subscribe(resp => {\n switch (resp.result.code) {\n case 'ADDITIONAL_LEGAL_DOCS_REQUIRED':\n this._processing.next(false);\n this.showAdditionalDocsModal();\n break;\n case 'SERVICE_OK':\n this._processing.next(false);\n this._docsSubmitted.next(true);\n break;\n default:\n //todo replace w/ Sentry logging?\n throw new Error('Unhandled Response code');\n break;\n }\n },\n (error) => {\n this._processing.next(false);\n this._docsSubmitted.next(false);\n this.showGeneralError();\n });\n }\n\n /**\n * not yet fully implemented; meant for legal under profile/settings\n **/\n getAcceptedDocuments(): Observable<LegalDocsResponse> {\n return this.bsAPI.get<LegalDocsResponse>(this.apiName, `${this.apiPath}/accepted`);\n }\n\n private _getDocumentIdArray(): number[] {\n const documentIdArray: number[] = [];\n this.activeRequiredDocuments.forEach(doc => {\n documentIdArray.push(doc.documentVersionId);\n });\n return documentIdArray;\n }\n\n private _uppercaseCopyKeys(legalDocs: LegalDocsResponsePayloadItems[]): LegalDocsResponsePayloadItems[] {\n legalDocs.forEach(doc => {\n doc.titleCopyKey = doc.titleCopyKey ? doc.titleCopyKey.toUpperCase() : '';\n doc.descriptionCopyKey = doc.descriptionCopyKey ? doc.descriptionCopyKey.toUpperCase() : '';\n doc.downloadUrlCopyKey = doc.downloadUrlCopyKey ? doc.downloadUrlCopyKey.toUpperCase() : '';\n });\n return legalDocs;\n }\n\n showAdditionalDocsModal() {\n this._displayDocsRequiredModal.next(true);\n }\n hideAdditionalDocsModal() {\n this._displayDocsRequiredModal.next(false);\n }\n showGeneralError() {\n this._displayGeneralError.next(true);\n }\n hideGeneralError() {\n this._displayGeneralError.next(false);\n }\n}\n","//! moment.js locale configuration\n//! locale : Afrikaans [af]\n//! author : Werner Mollentze : https://github.com/wernerm\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var af = moment.defineLocale('af', {\n months: 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'),\n weekdays: 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split(\n '_'\n ),\n weekdaysShort: 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'),\n weekdaysMin: 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'),\n meridiemParse: /vm|nm/i,\n isPM: function (input) {\n return /^nm$/i.test(input);\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours < 12) {\n return isLower ? 'vm' : 'VM';\n } else {\n return isLower ? 'nm' : 'NM';\n }\n },\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Vandag om] LT',\n nextDay: '[Môre om] LT',\n nextWeek: 'dddd [om] LT',\n lastDay: '[Gister om] LT',\n lastWeek: '[Laas] dddd [om] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'oor %s',\n past: '%s gelede',\n s: \"'n paar sekondes\",\n ss: '%d sekondes',\n m: \"'n minuut\",\n mm: '%d minute',\n h: \"'n uur\",\n hh: '%d ure',\n d: \"'n dag\",\n dd: '%d dae',\n M: \"'n maand\",\n MM: '%d maande',\n y: \"'n jaar\",\n yy: '%d jaar',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal: function (number) {\n return (\n number +\n (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n ); // Thanks to Joris Röling : https://github.com/jjupiter\n },\n week: {\n dow: 1, // Maandag is die eerste dag van die week.\n doy: 4, // Die week wat die 4de Januarie bevat is die eerste week van die jaar.\n },\n });\n\n return af;\n\n})));\n","import { filter } from 'rxjs/operators';\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport { Router, NavigationEnd, RouterModule } from '@angular/router';\nimport { Injectable, Inject, PLATFORM_ID, Optional, isDevMode, RendererFactory2, ViewEncapsulation, Directive, HostListener, Input, NgModule } from '@angular/core';\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nimport * as ɵngcc0 from '@angular/core';\nimport * as ɵngcc1 from '@angular/router';\nclass IntercomConfig {\n}\nIntercomConfig.ɵfac = function IntercomConfig_Factory(t) { return new (t || IntercomConfig)(); };\nIntercomConfig.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: IntercomConfig, factory: IntercomConfig.ɵfac });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(IntercomConfig, [{\n type: Injectable\n }], null, null); })();\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * A provider with every Intercom.JS method\n */\nclass Intercom {\n /**\n * @param {?} config\n * @param {?} platformId\n * @param {?} router\n * @param {?} rendererFactory\n * @param {?} document\n */\n constructor(config, platformId, router, rendererFactory, document // Document\n ) {\n this.config = config;\n this.platformId = platformId;\n this.router = router;\n this.rendererFactory = rendererFactory;\n this.document = document;\n if (!isPlatformBrowser(this.platformId)) {\n return;\n }\n this.renderer2 = this.rendererFactory.createRenderer(this.document, {\n id: '-1',\n encapsulation: ViewEncapsulation.None,\n styles: [],\n data: {}\n });\n // Subscribe to router changes\n if (config && config.updateOnRouterChange) {\n this.router.events.pipe(filter((/**\n * @param {?} event\n * @return {?}\n */\n event => event instanceof NavigationEnd))).subscribe((/**\n * @param {?} event\n * @return {?}\n */\n event => {\n this.update();\n }));\n }\n else if (isDevMode()) {\n console.warn(`\n Common practice in single page applications is to update whenever the route changes.\n ng-intercom supports this functionality out of the box just set 'updateOnRouterChange' to true in your Intercom Module config.\n This warning will not appear in production, if you choose not to use router updating.\n `);\n }\n }\n /**\n * If you'd like to control when Intercom is loaded, you can use the 'boot' method.\n * This is useful in situations like a one-page Javascript based application where the user may not be logged in\n * when the page loads. You call this method with the standard intercomSettings object.\n * @param {?=} intercomData\n * @return {?}\n */\n boot(intercomData) {\n if (!isPlatformBrowser(this.platformId)) {\n return;\n }\n /** @type {?} */\n const app_id = intercomData.app_id ? intercomData.app_id : this.config.appId\n // Run load and attach to window\n ;\n // Run load and attach to window\n this.loadIntercom(this.config, (/**\n * @param {?=} event\n * @return {?}\n */\n (event) => {\n // then boot the intercom js\n /** @type {?} */\n const data = Object.assign({}, intercomData, { app_id });\n return this._callIntercom('boot', data);\n }));\n }\n /**\n * If you have the Respond product (combined with another product like Engage)\n * you should call the Intercom shutdown method to clear your users’ conversations anytime they logout\n * of your application. Otherwise, the cookie we use to track who was most recently logged in on a given device\n * or computer will keep these conversations in the Messenger for one week.\n * This method will effectively clear out any user data that you have been passing through the JS API.\n * @return {?}\n */\n shutdown() {\n return this._callIntercom('shutdown');\n }\n /**\n * Calling the update method without any other arguments will trigger the JavaScript to look for new messages\n * that should be displayed to the current user (the one whose details are in the window.intercomSettings variable)\n * and show them if they exist.\n *\n * Calling the update method with a JSON object of user details will update those fields on the current user\n * in addition to logging an impression at the current URL and looking for new messages for the user.\n * @param {?=} data\n * @return {?}\n */\n update(data) {\n return this._callIntercom('update', data);\n }\n /**\n * This will hide the main Messenger panel if it is open. It will not hide the Messenger Launcher.\n * @return {?}\n */\n hide() {\n return this._callIntercom('hide');\n }\n /**\n * This will show the Messenger. If there are no conversations it will open with the new message view,\n * if there are it will open with the message list.\n *\n * If a `message` parameter is supplied, it will automatically open a new message window, aliasing showNewMessage().\n *\n * @param {?=} message\n * @return {?}\n */\n show(message) {\n if (message) {\n return this.showNewMessage(message);\n }\n return this._callIntercom('show');\n }\n /**\n * To open the message window with the message list you can call `showMessages()`.\n * @return {?}\n */\n showMessages() {\n return this._callIntercom('showMessages');\n }\n /**\n * To open the message window with the new message view you can call showNewMessage().\n *\n * This function takes an optional parameter that can be used to pre-populate the message composer as shown below.\n * @param {?=} message\n * @return {?}\n */\n showNewMessage(message) {\n return this._callIntercom('showNewMessage', message);\n }\n /**\n * You can submit an event using the trackEvent method.\n * This will associate the event with the currently logged in user and send it to Intercom.\n * The final parameter is a map that can be used to send optional metadata about the event.\n *\n * You can also add custom information to events in the form of event metadata.\n * @param {?} eventName\n * @param {?=} metadata\n * @return {?}\n */\n trackEvent(eventName, metadata) {\n return this._callIntercom('trackEvent', eventName, metadata);\n }\n /**\n * A visitor is someone who goes to your site but does not use the messenger.\n * You can track these visitors via the visitor user_id.\n * This user_id can be used to retrieve the visitor or lead through the REST API.\n * @return {?}\n */\n getVisitorId() {\n return this._callIntercom('getVisitorId');\n }\n /**\n * Alias for getVisitorId()\n * \\@alias getVisitorId()\n * \\@readonly\n * @return {?}\n */\n get visitorId() {\n return this._callIntercom('getVisitorId');\n }\n /**\n * Gives you the ability to hook into the show event. Requires a function argument.\n * @param {?} handler\n * @return {?}\n */\n onShow(handler) {\n return this._callIntercom('onShow', handler);\n }\n /**\n * Gives you the ability to hook into the hide event. Requires a function argument.\n * @param {?} handler\n * @return {?}\n */\n onHide(handler) {\n return this._callIntercom('onHide', handler);\n }\n /**\n * This method allows you to register a function that will be called when the current number of unread messages changes.\n * @param {?} handler\n * @return {?}\n */\n onUnreadCountChange(handler) {\n return this._callIntercom('onUnreadCountChange', handler);\n }\n /**\n * If you would like to trigger a tour based on an action a user or visitor takes in your site or application,\n * ou can use this API method. You need to call this method with the id of the tour you wish to show. The id of\n * the tour can be found in the “Use tour everywhere” section of the tour editor.\n *\n * Please note that tours shown via this API must be published and the “Use tour everywhere” section must be\n * turned on. If you're calling this API using an invalid tour id, nothing will happen.\n * @param {?} tourId\n * @return {?}\n */\n startTour(tourId) {\n return this._callIntercom('startTour', tourId);\n }\n /**\n * Private handler to run Intercom methods safely\n * @private\n * @param {?} fn\n * @param {...?} args\n * @return {?}\n */\n _callIntercom(fn, ...args) {\n if (!isPlatformBrowser(this.platformId)) {\n return;\n }\n if (((/** @type {?} */ (window))).Intercom) {\n return ((/** @type {?} */ (window))).Intercom(fn, ...args);\n }\n return;\n }\n /**\n * @param {?} conf\n * @param {?} afterInjectCallback\n * @return {?}\n */\n injectIntercomScript(conf, afterInjectCallback) {\n if (!isPlatformBrowser(this.platformId)) {\n return;\n }\n // Set the window configuration to conf\n ((/** @type {?} */ (window))).intercomSettings = conf;\n // Create the intercom script in document\n /** @type {?} */\n const s = this.document.createElement('script');\n s.type = 'text/javascript';\n s.async = true;\n s.src = `https://widget.intercom.io/widget/${this.id}`;\n if (((/** @type {?} */ (s))).attachEvent) {\n ((/** @type {?} */ (s))).attachEvent('onload', afterInjectCallback);\n }\n else {\n s.addEventListener('load', afterInjectCallback, false);\n }\n if (this.renderer2 && this.renderer2.appendChild) {\n this.renderer2.appendChild(this.document.head, s);\n }\n ((/** @type {?} */ (window))).Intercom('update', conf);\n }\n /**\n * @param {?} config\n * @param {?} afterLoadCallback\n * @return {?}\n */\n loadIntercom(config, afterLoadCallback) {\n if (!isPlatformBrowser(this.platformId)) {\n return;\n }\n this.id = config.appId;\n /** @type {?} */\n const w = (/** @type {?} */ (window));\n /** @type {?} */\n const ic = w.Intercom\n // Set window config for Intercom\n ;\n // Set window config for Intercom\n w.intercomSettings = config;\n if (typeof ic === 'function') {\n ic('reattach_activator');\n ic('update', config);\n afterLoadCallback();\n }\n else {\n /** @type {?} */\n const i = (/**\n * @return {?}\n */\n function () {\n i.c(arguments);\n });\n i.q = [];\n i.c = (/**\n * @param {?} args\n * @return {?}\n */\n function (args) {\n i.q.push(args);\n });\n w.Intercom = i;\n this.injectIntercomScript(config, afterLoadCallback);\n }\n }\n}\nIntercom.ɵfac = function Intercom_Factory(t) { return new (t || Intercom)(ɵngcc0.ɵɵinject(IntercomConfig), ɵngcc0.ɵɵinject(PLATFORM_ID), ɵngcc0.ɵɵinject(Router, 8), ɵngcc0.ɵɵinject(ɵngcc0.RendererFactory2), ɵngcc0.ɵɵinject(DOCUMENT, 8)); };\nIntercom.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: Intercom, factory: Intercom.ɵfac });\n/** @nocollapse */\nIntercom.ctorParameters = () => [\n { type: IntercomConfig, decorators: [{ type: Inject, args: [IntercomConfig,] }] },\n { type: Object, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] },\n { type: Router, decorators: [{ type: Optional }, { type: Inject, args: [Router,] }] },\n { type: RendererFactory2 },\n { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [DOCUMENT,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(Intercom, [{\n type: Injectable\n }], function () { return [{ type: IntercomConfig, decorators: [{\n type: Inject,\n args: [IntercomConfig]\n }] }, { type: Object, decorators: [{\n type: Inject,\n args: [PLATFORM_ID]\n }] }, { type: ɵngcc1.Router, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [Router]\n }] }, { type: ɵngcc0.RendererFactory2 }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DOCUMENT]\n }] }]; }, null); })();\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/* tslint:disable:directive-selector */\nclass IntercomHideDirective {\n /**\n * @param {?} intercom\n */\n constructor(intercom) {\n this.intercom = intercom;\n }\n /**\n * @return {?}\n */\n onClick() {\n if (this.intercomHide !== false) {\n this.intercom.hide();\n }\n }\n}\nIntercomHideDirective.ɵfac = function IntercomHideDirective_Factory(t) { return new (t || IntercomHideDirective)(ɵngcc0.ɵɵdirectiveInject(Intercom)); };\nIntercomHideDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: IntercomHideDirective, selectors: [[\"\", \"intercomHide\", \"\"]], hostBindings: function IntercomHideDirective_HostBindings(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵlistener(\"click\", function IntercomHideDirective_click_HostBindingHandler() { return ctx.onClick(); });\n } }, inputs: { intercomHide: \"intercomHide\" } });\n/** @nocollapse */\nIntercomHideDirective.ctorParameters = () => [\n { type: Intercom }\n];\nIntercomHideDirective.propDecorators = {\n intercomHide: [{ type: Input }],\n onClick: [{ type: HostListener, args: ['click',] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(IntercomHideDirective, [{\n type: Directive,\n args: [{\n selector: '[intercomHide]'\n }]\n }], function () { return [{ type: Intercom }]; }, { \n /**\n * @return {?}\n */\n onClick: [{\n type: HostListener,\n args: ['click']\n }], intercomHide: [{\n type: Input\n }] }); })();\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/* tslint:disable:directive-selector */\nclass IntercomShowMessagesDirective {\n /**\n * @param {?} intercom\n */\n constructor(intercom) {\n this.intercom = intercom;\n }\n /**\n * @return {?}\n */\n onClick() {\n if (this.intercomShowMessages !== false) {\n this.intercom.showMessages();\n }\n }\n}\nIntercomShowMessagesDirective.ɵfac = function IntercomShowMessagesDirective_Factory(t) { return new (t || IntercomShowMessagesDirective)(ɵngcc0.ɵɵdirectiveInject(Intercom)); };\nIntercomShowMessagesDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: IntercomShowMessagesDirective, selectors: [[\"\", \"intercomShowMessages\", \"\"]], hostBindings: function IntercomShowMessagesDirective_HostBindings(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵlistener(\"click\", function IntercomShowMessagesDirective_click_HostBindingHandler() { return ctx.onClick(); });\n } }, inputs: { intercomShowMessages: \"intercomShowMessages\" } });\n/** @nocollapse */\nIntercomShowMessagesDirective.ctorParameters = () => [\n { type: Intercom }\n];\nIntercomShowMessagesDirective.propDecorators = {\n intercomShowMessages: [{ type: Input }],\n onClick: [{ type: HostListener, args: ['click',] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(IntercomShowMessagesDirective, [{\n type: Directive,\n args: [{\n selector: '[intercomShowMessages]'\n }]\n }], function () { return [{ type: Intercom }]; }, { \n /**\n * @return {?}\n */\n onClick: [{\n type: HostListener,\n args: ['click']\n }], intercomShowMessages: [{\n type: Input\n }] }); })();\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/* tslint:disable:directive-selector */\nclass IntercomShowNewMessageDirective {\n /**\n * @param {?} intercom\n */\n constructor(intercom) {\n this.intercom = intercom;\n }\n /**\n * @return {?}\n */\n onClick() {\n /** @type {?} */\n const msg = this.message ? this.message : this.intercomShowNewMessage;\n if (msg) {\n this.intercom.showNewMessage(this.message);\n }\n else {\n this.intercom.showNewMessage();\n }\n }\n}\nIntercomShowNewMessageDirective.ɵfac = function IntercomShowNewMessageDirective_Factory(t) { return new (t || IntercomShowNewMessageDirective)(ɵngcc0.ɵɵdirectiveInject(Intercom)); };\nIntercomShowNewMessageDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: IntercomShowNewMessageDirective, selectors: [[\"\", \"intercomShowNewMessage\", \"\"]], hostBindings: function IntercomShowNewMessageDirective_HostBindings(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵlistener(\"click\", function IntercomShowNewMessageDirective_click_HostBindingHandler() { return ctx.onClick(); });\n } }, inputs: { message: \"message\", intercomShowNewMessage: \"intercomShowNewMessage\" } });\n/** @nocollapse */\nIntercomShowNewMessageDirective.ctorParameters = () => [\n { type: Intercom }\n];\nIntercomShowNewMessageDirective.propDecorators = {\n message: [{ type: Input }],\n intercomShowNewMessage: [{ type: Input }],\n onClick: [{ type: HostListener, args: ['click',] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(IntercomShowNewMessageDirective, [{\n type: Directive,\n args: [{\n selector: '[intercomShowNewMessage]'\n }]\n }], function () { return [{ type: Intercom }]; }, { \n /**\n * @return {?}\n */\n onClick: [{\n type: HostListener,\n args: ['click']\n }], message: [{\n type: Input\n }], intercomShowNewMessage: [{\n type: Input\n }] }); })();\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/* tslint:disable:directive-selector */\nclass IntercomShowDirective {\n /**\n * @param {?} intercom\n */\n constructor(intercom) {\n this.intercom = intercom;\n }\n /**\n * @return {?}\n */\n onClick() {\n /** @type {?} */\n const msg = this.message ? this.message : this.intercomShow;\n if (msg) {\n this.intercom.showNewMessage(this.message);\n }\n else {\n this.intercom.show();\n }\n }\n}\nIntercomShowDirective.ɵfac = function IntercomShowDirective_Factory(t) { return new (t || IntercomShowDirective)(ɵngcc0.ɵɵdirectiveInject(Intercom)); };\nIntercomShowDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: IntercomShowDirective, selectors: [[\"\", \"intercomShow\", \"\"]], hostBindings: function IntercomShowDirective_HostBindings(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵlistener(\"click\", function IntercomShowDirective_click_HostBindingHandler() { return ctx.onClick(); });\n } }, inputs: { message: \"message\", intercomShow: \"intercomShow\" } });\n/** @nocollapse */\nIntercomShowDirective.ctorParameters = () => [\n { type: Intercom }\n];\nIntercomShowDirective.propDecorators = {\n message: [{ type: Input }],\n intercomShow: [{ type: Input }],\n onClick: [{ type: HostListener, args: ['click',] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(IntercomShowDirective, [{\n type: Directive,\n args: [{\n selector: '[intercomShow]'\n }]\n }], function () { return [{ type: Intercom }]; }, { \n /**\n * @return {?}\n */\n onClick: [{\n type: HostListener,\n args: ['click']\n }], message: [{\n type: Input\n }], intercomShow: [{\n type: Input\n }] }); })();\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/* tslint:disable:directive-selector */\nclass IntercomShutdownDirective {\n /**\n * @param {?} intercom\n */\n constructor(intercom) {\n this.intercom = intercom;\n }\n /**\n * @return {?}\n */\n onClick() {\n if (this.intercomShutdown !== false) {\n this.intercom.shutdown();\n }\n }\n}\nIntercomShutdownDirective.ɵfac = function IntercomShutdownDirective_Factory(t) { return new (t || IntercomShutdownDirective)(ɵngcc0.ɵɵdirectiveInject(Intercom)); };\nIntercomShutdownDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: IntercomShutdownDirective, selectors: [[\"\", \"intercomShutdown\", \"\"]], hostBindings: function IntercomShutdownDirective_HostBindings(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵlistener(\"click\", function IntercomShutdownDirective_click_HostBindingHandler() { return ctx.onClick(); });\n } }, inputs: { intercomShutdown: \"intercomShutdown\" } });\n/** @nocollapse */\nIntercomShutdownDirective.ctorParameters = () => [\n { type: Intercom }\n];\nIntercomShutdownDirective.propDecorators = {\n intercomShutdown: [{ type: Input }],\n onClick: [{ type: HostListener, args: ['click',] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(IntercomShutdownDirective, [{\n type: Directive,\n args: [{\n selector: '[intercomShutdown]'\n }]\n }], function () { return [{ type: Intercom }]; }, { \n /**\n * @return {?}\n */\n onClick: [{\n type: HostListener,\n args: ['click']\n }], intercomShutdown: [{\n type: Input\n }] }); })();\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/* tslint:disable:directive-selector */\nclass IntercomTrackEventDirective {\n /**\n * @param {?} intercom\n */\n constructor(intercom) {\n this.intercom = intercom;\n }\n /**\n * @return {?}\n */\n onClick() {\n /** @type {?} */\n const e = this.event ? this.event : this.intercomTrackEvent;\n if (e && this.metadata) {\n this.intercom.trackEvent(e, this.metadata);\n }\n else if (e && !this.metadata) {\n this.intercom.trackEvent(e);\n }\n else {\n throw new Error('Error in intercomTrackEvent directive: You must specify an event to track.');\n }\n }\n}\nIntercomTrackEventDirective.ɵfac = function IntercomTrackEventDirective_Factory(t) { return new (t || IntercomTrackEventDirective)(ɵngcc0.ɵɵdirectiveInject(Intercom)); };\nIntercomTrackEventDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: IntercomTrackEventDirective, selectors: [[\"\", \"intercomTrackEvent\", \"\"]], hostBindings: function IntercomTrackEventDirective_HostBindings(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵlistener(\"click\", function IntercomTrackEventDirective_click_HostBindingHandler() { return ctx.onClick(); });\n } }, inputs: { event: \"event\", intercomTrackEvent: \"intercomTrackEvent\", metadata: \"metadata\" } });\n/** @nocollapse */\nIntercomTrackEventDirective.ctorParameters = () => [\n { type: Intercom }\n];\nIntercomTrackEventDirective.propDecorators = {\n event: [{ type: Input }],\n intercomTrackEvent: [{ type: Input }],\n metadata: [{ type: Input }],\n onClick: [{ type: HostListener, args: ['click',] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(IntercomTrackEventDirective, [{\n type: Directive,\n args: [{\n selector: '[intercomTrackEvent]'\n }]\n }], function () { return [{ type: Intercom }]; }, { \n /**\n * @return {?}\n */\n onClick: [{\n type: HostListener,\n args: ['click']\n }], event: [{\n type: Input\n }], intercomTrackEvent: [{\n type: Input\n }], metadata: [{\n type: Input\n }] }); })();\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nclass IntercomModule {\n /**\n * @param {?} config\n * @return {?}\n */\n static forRoot(config) {\n return {\n ngModule: IntercomModule,\n providers: [\n Intercom,\n { provide: IntercomConfig, useValue: config },\n ]\n };\n }\n}\nIntercomModule.ɵfac = function IntercomModule_Factory(t) { return new (t || IntercomModule)(); };\nIntercomModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: IntercomModule });\nIntercomModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ providers: [\n Intercom,\n IntercomConfig\n ], imports: [RouterModule] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(IntercomModule, [{\n type: NgModule,\n args: [{\n imports: [\n RouterModule\n ],\n declarations: [\n IntercomHideDirective,\n IntercomShowMessagesDirective,\n IntercomShowNewMessageDirective,\n IntercomShowDirective,\n IntercomShutdownDirective,\n IntercomTrackEventDirective\n ],\n exports: [\n IntercomHideDirective,\n IntercomShowMessagesDirective,\n IntercomShowNewMessageDirective,\n IntercomShowDirective,\n IntercomShutdownDirective,\n IntercomTrackEventDirective\n ],\n providers: [\n Intercom,\n IntercomConfig\n ]\n }]\n }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(IntercomModule, { declarations: function () { return [IntercomHideDirective, IntercomShowMessagesDirective, IntercomShowNewMessageDirective, IntercomShowDirective, IntercomShutdownDirective, IntercomTrackEventDirective]; }, imports: function () { return [RouterModule]; }, exports: function () { return [IntercomHideDirective, IntercomShowMessagesDirective, IntercomShowNewMessageDirective, IntercomShowDirective, IntercomShutdownDirective, IntercomTrackEventDirective]; } }); })();\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n\nexport { Intercom, IntercomConfig, IntercomHideDirective, IntercomModule, IntercomShowDirective, IntercomShowMessagesDirective, IntercomShowNewMessageDirective, IntercomShutdownDirective, IntercomTrackEventDirective };\n\n","import { DEFAULT_ENVIRONMENT } from '../constants.js';\nimport { getClient } from '../currentScopes.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE } from '../semanticAttributes.js';\nimport { baggageHeaderToDynamicSamplingContext, dynamicSamplingContextToSentryBaggageHeader } from '../utils-hoist/baggage.js';\nimport { dropUndefinedKeys, addNonEnumerableProperty } from '../utils-hoist/object.js';\nimport { hasTracingEnabled } from '../utils/hasTracingEnabled.js';\nimport { getRootSpan, spanToJSON, spanIsSampled } from '../utils/spanUtils.js';\n\n/**\n * If you change this value, also update the terser plugin config to\n * avoid minification of the object property!\n */\nconst FROZEN_DSC_FIELD = '_frozenDsc';\n\n/**\n * Freeze the given DSC on the given span.\n */\nfunction freezeDscOnSpan(span, dsc) {\n const spanWithMaybeDsc = span ;\n addNonEnumerableProperty(spanWithMaybeDsc, FROZEN_DSC_FIELD, dsc);\n}\n\n/**\n * Creates a dynamic sampling context from a client.\n *\n * Dispatches the `createDsc` lifecycle hook as a side effect.\n */\nfunction getDynamicSamplingContextFromClient(trace_id, client) {\n const options = client.getOptions();\n\n const { publicKey: public_key } = client.getDsn() || {};\n\n const dsc = dropUndefinedKeys({\n environment: options.environment || DEFAULT_ENVIRONMENT,\n release: options.release,\n public_key,\n trace_id,\n }) ;\n\n client.emit('createDsc', dsc);\n\n return dsc;\n}\n\n/**\n * Get the dynamic sampling context for the currently active scopes.\n */\nfunction getDynamicSamplingContextFromScope(client, scope) {\n const propagationContext = scope.getPropagationContext();\n return propagationContext.dsc || getDynamicSamplingContextFromClient(propagationContext.traceId, client);\n}\n\n/**\n * Creates a dynamic sampling context from a span (and client and scope)\n *\n * @param span the span from which a few values like the root span name and sample rate are extracted.\n *\n * @returns a dynamic sampling context\n */\nfunction getDynamicSamplingContextFromSpan(span) {\n const client = getClient();\n if (!client) {\n return {};\n }\n\n const rootSpan = getRootSpan(span);\n\n // For core implementation, we freeze the DSC onto the span as a non-enumerable property\n const frozenDsc = (rootSpan )[FROZEN_DSC_FIELD];\n if (frozenDsc) {\n return frozenDsc;\n }\n\n // For OpenTelemetry, we freeze the DSC on the trace state\n const traceState = rootSpan.spanContext().traceState;\n const traceStateDsc = traceState && traceState.get('sentry.dsc');\n\n // If the span has a DSC, we want it to take precedence\n const dscOnTraceState = traceStateDsc && baggageHeaderToDynamicSamplingContext(traceStateDsc);\n\n if (dscOnTraceState) {\n return dscOnTraceState;\n }\n\n // Else, we generate it from the span\n const dsc = getDynamicSamplingContextFromClient(span.spanContext().traceId, client);\n const jsonSpan = spanToJSON(rootSpan);\n const attributes = jsonSpan.data || {};\n const maybeSampleRate = attributes[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE];\n\n if (maybeSampleRate != null) {\n dsc.sample_rate = `${maybeSampleRate}`;\n }\n\n // We don't want to have a transaction name in the DSC if the source is \"url\" because URLs might contain PII\n const source = attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];\n\n // after JSON conversion, txn.name becomes jsonSpan.description\n const name = jsonSpan.description;\n if (source !== 'url' && name) {\n dsc.transaction = name;\n }\n\n // How can we even land here with hasTracingEnabled() returning false?\n // Otel creates a Non-recording span in Tracing Without Performance mode when handling incoming requests\n // So we end up with an active span that is not sampled (neither positively nor negatively)\n if (hasTracingEnabled()) {\n dsc.sampled = String(spanIsSampled(rootSpan));\n }\n\n client.emit('createDsc', dsc, rootSpan);\n\n return dsc;\n}\n\n/**\n * Convert a Span to a baggage header.\n */\nfunction spanToBaggageHeader(span) {\n const dsc = getDynamicSamplingContextFromSpan(span);\n return dynamicSamplingContextToSentryBaggageHeader(dsc);\n}\n\nexport { freezeDscOnSpan, getDynamicSamplingContextFromClient, getDynamicSamplingContextFromScope, getDynamicSamplingContextFromSpan, spanToBaggageHeader };\n","import { Injectable } from '@angular/core';\nimport { Subject, Observable } from 'rxjs';\nimport { Toast, ToastType, ToastDelay } from './toast.model';\n\ninterface Debounce {\n message: string;\n toasted: number;\n}\n\n// slightly longer than the actual delay.\nconst toastFadeDelay = ToastDelay * 1.1;\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ToastService {\n private subject = new Subject<Toast>();\n private defaultId = 'default-toast';\n private toasts: Toast[] = [];\n\n private debouncing: Debounce[] = [];\n\n onShowToast(id = this.defaultId): Observable<Toast> {\n return this.subject.asObservable();\n }\n\n // green\n success(message: string, options?: any) {\n this.toast(new Toast({ ...options, type: ToastType.Success, message }));\n }\n\n // black\n info(message: string, options?: any) {\n this.toast(new Toast({ ...options, type: ToastType.Info, message }));\n }\n\n // blue\n infoBlue(message: string, options?: any) {\n this.toast(new Toast({ ...options, type: ToastType.InfoBlue, message }));\n }\n\n // yellow\n warn(message: string, options?: any) {\n this.toast(new Toast({ ...options, type: ToastType.Warning, message }));\n }\n\n // red\n error(message: string, options?: any) {\n this.toast(new Toast({ ...options, type: ToastType.Error, message }));\n }\n\n delete(id: string) {\n this.toasts = this.toasts.filter((oldtoast) => oldtoast.id !== id);\n this.subject.next({ id, message: 'delete', type: ToastType.Success });\n }\n\n deleteAll() {\n this.toasts.forEach((toast: Toast) => {\n this.subject.next({ id: toast.id, message: 'delete', type: ToastType.Success });\n });\n this.toasts = [];\n }\n\n /**\n * is there another transient still showing, if so, don't show a new one.\n * @param msg the string to show.\n */\n shouldDebounce(msg: string): boolean {\n const found = this.debouncing.find(({ message, toasted }) =>\n message === msg && toasted > Date.now() - toastFadeDelay\n );\n\n return found !== undefined;\n }\n\n /**\n * remove old toasts that are left over.\n */\n pruneDebouncing(): void {\n const removePriorTo = Date.now() - toastFadeDelay;\n this.debouncing = this.debouncing.filter(({ toasted }) => toasted > removePriorTo);\n }\n\n toast(toast: Toast) {\n toast.id = toast.id || this.defaultId;\n this.pruneDebouncing();\n\n //these fade after 3 seconds, see ToastDelay constant.\n if (toast.transient) {\n if (this.shouldDebounce(toast.message)) {\n return;\n }\n this.debouncing.push({ message: toast.message, toasted: Date.now() });\n\n this.subject.next(toast);\n } else {\n //these stick around till the client taps the \"X\" or does something else to remove them.\n if (!this.toasts.find((oldtoast) => oldtoast.id === toast.id)) {\n this.toasts.push(toast);\n this.subject.next(toast);\n }\n }\n }\n}\n","//! moment.js locale configuration\n//! locale : Uyghur (China) [ug-cn]\n//! author: boyaq : https://github.com/boyaq\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ugCn = moment.defineLocale('ug-cn', {\n months: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(\n '_'\n ),\n monthsShort:\n 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(\n '_'\n ),\n weekdays: 'يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە'.split(\n '_'\n ),\n weekdaysShort: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),\n weekdaysMin: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'YYYY-يىلىM-ئاينىڭD-كۈنى',\n LLL: 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',\n LLLL: 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',\n },\n meridiemParse: /يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (\n meridiem === 'يېرىم كېچە' ||\n meridiem === 'سەھەر' ||\n meridiem === 'چۈشتىن بۇرۇن'\n ) {\n return hour;\n } else if (meridiem === 'چۈشتىن كېيىن' || meridiem === 'كەچ') {\n return hour + 12;\n } else {\n return hour >= 11 ? hour : hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n var hm = hour * 100 + minute;\n if (hm < 600) {\n return 'يېرىم كېچە';\n } else if (hm < 900) {\n return 'سەھەر';\n } else if (hm < 1130) {\n return 'چۈشتىن بۇرۇن';\n } else if (hm < 1230) {\n return 'چۈش';\n } else if (hm < 1800) {\n return 'چۈشتىن كېيىن';\n } else {\n return 'كەچ';\n }\n },\n calendar: {\n sameDay: '[بۈگۈن سائەت] LT',\n nextDay: '[ئەتە سائەت] LT',\n nextWeek: '[كېلەركى] dddd [سائەت] LT',\n lastDay: '[تۆنۈگۈن] LT',\n lastWeek: '[ئالدىنقى] dddd [سائەت] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s كېيىن',\n past: '%s بۇرۇن',\n s: 'نەچچە سېكونت',\n ss: '%d سېكونت',\n m: 'بىر مىنۇت',\n mm: '%d مىنۇت',\n h: 'بىر سائەت',\n hh: '%d سائەت',\n d: 'بىر كۈن',\n dd: '%d كۈن',\n M: 'بىر ئاي',\n MM: '%d ئاي',\n y: 'بىر يىل',\n yy: '%d يىل',\n },\n\n dayOfMonthOrdinalParse: /\\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '-كۈنى';\n case 'w':\n case 'W':\n return number + '-ھەپتە';\n default:\n return number;\n }\n },\n preparse: function (string) {\n return string.replace(/،/g, ',');\n },\n postformat: function (string) {\n return string.replace(/,/g, '،');\n },\n week: {\n // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 1st is the first week of the year.\n },\n });\n\n return ugCn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic (Algeria) [ar-dz]\n//! author : Amine Roukh: https://github.com/Amine27\n//! author : Abdel Said: https://github.com/abdelsaid\n//! author : Ahmed Elkhatib\n//! author : forabi https://github.com/forabi\n//! author : Noureddine LOUAHEDJ : https://github.com/noureddinem\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var pluralForm = function (n) {\n return n === 0\n ? 0\n : n === 1\n ? 1\n : n === 2\n ? 2\n : n % 100 >= 3 && n % 100 <= 10\n ? 3\n : n % 100 >= 11\n ? 4\n : 5;\n },\n plurals = {\n s: [\n 'أقل من ثانية',\n 'ثانية واحدة',\n ['ثانيتان', 'ثانيتين'],\n '%d ثوان',\n '%d ثانية',\n '%d ثانية',\n ],\n m: [\n 'أقل من دقيقة',\n 'دقيقة واحدة',\n ['دقيقتان', 'دقيقتين'],\n '%d دقائق',\n '%d دقيقة',\n '%d دقيقة',\n ],\n h: [\n 'أقل من ساعة',\n 'ساعة واحدة',\n ['ساعتان', 'ساعتين'],\n '%d ساعات',\n '%d ساعة',\n '%d ساعة',\n ],\n d: [\n 'أقل من يوم',\n 'يوم واحد',\n ['يومان', 'يومين'],\n '%d أيام',\n '%d يومًا',\n '%d يوم',\n ],\n M: [\n 'أقل من شهر',\n 'شهر واحد',\n ['شهران', 'شهرين'],\n '%d أشهر',\n '%d شهرا',\n '%d شهر',\n ],\n y: [\n 'أقل من عام',\n 'عام واحد',\n ['عامان', 'عامين'],\n '%d أعوام',\n '%d عامًا',\n '%d عام',\n ],\n },\n pluralize = function (u) {\n return function (number, withoutSuffix, string, isFuture) {\n var f = pluralForm(number),\n str = plurals[u][pluralForm(number)];\n if (f === 2) {\n str = str[withoutSuffix ? 0 : 1];\n }\n return str.replace(/%d/i, number);\n };\n },\n months = [\n 'جانفي',\n 'فيفري',\n 'مارس',\n 'أفريل',\n 'ماي',\n 'جوان',\n 'جويلية',\n 'أوت',\n 'سبتمبر',\n 'أكتوبر',\n 'نوفمبر',\n 'ديسمبر',\n ];\n\n var arDz = moment.defineLocale('ar-dz', {\n months: months,\n monthsShort: months,\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'D/\\u200FM/\\u200FYYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n meridiemParse: /ص|م/,\n isPM: function (input) {\n return 'م' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar: {\n sameDay: '[اليوم عند الساعة] LT',\n nextDay: '[غدًا عند الساعة] LT',\n nextWeek: 'dddd [عند الساعة] LT',\n lastDay: '[أمس عند الساعة] LT',\n lastWeek: 'dddd [عند الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'بعد %s',\n past: 'منذ %s',\n s: pluralize('s'),\n ss: pluralize('s'),\n m: pluralize('m'),\n mm: pluralize('m'),\n h: pluralize('h'),\n hh: pluralize('h'),\n d: pluralize('d'),\n dd: pluralize('d'),\n M: pluralize('M'),\n MM: pluralize('M'),\n y: pluralize('y'),\n yy: pluralize('y'),\n },\n postformat: function (string) {\n return string.replace(/,/g, '،');\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return arDz;\n\n})));\n","import { Subscription } from '../Subscription';\nexport const animationFrameProvider = {\n schedule(callback) {\n let request = requestAnimationFrame;\n let cancel = cancelAnimationFrame;\n const { delegate } = animationFrameProvider;\n if (delegate) {\n request = delegate.requestAnimationFrame;\n cancel = delegate.cancelAnimationFrame;\n }\n const handle = request((timestamp) => {\n cancel = undefined;\n callback(timestamp);\n });\n return new Subscription(() => cancel === null || cancel === void 0 ? void 0 : cancel(handle));\n },\n requestAnimationFrame(...args) {\n const { delegate } = animationFrameProvider;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.requestAnimationFrame) || requestAnimationFrame)(...args);\n },\n cancelAnimationFrame(...args) {\n const { delegate } = animationFrameProvider;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.cancelAnimationFrame) || cancelAnimationFrame)(...args);\n },\n delegate: undefined,\n};\n","import { AnimationFrameAction } from './AnimationFrameAction';\nimport { AnimationFrameScheduler } from './AnimationFrameScheduler';\nexport const animationFrameScheduler = new AnimationFrameScheduler(AnimationFrameAction);\nexport const animationFrame = animationFrameScheduler;\n","import { AsyncScheduler } from './AsyncScheduler';\nexport class AnimationFrameScheduler extends AsyncScheduler {\n flush(action) {\n this._active = true;\n const flushId = this._scheduled;\n this._scheduled = undefined;\n const { actions } = this;\n let error;\n action = action || actions.shift();\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions[0]) && action.id === flushId && actions.shift());\n this._active = false;\n if (error) {\n while ((action = actions[0]) && action.id === flushId && actions.shift()) {\n action.unsubscribe();\n }\n throw error;\n }\n }\n}\n","import { AsyncAction } from './AsyncAction';\nimport { animationFrameProvider } from './animationFrameProvider';\nexport class AnimationFrameAction extends AsyncAction {\n constructor(scheduler, work) {\n super(scheduler, work);\n this.scheduler = scheduler;\n this.work = work;\n }\n requestAsyncId(scheduler, id, delay = 0) {\n if (delay !== null && delay > 0) {\n return super.requestAsyncId(scheduler, id, delay);\n }\n scheduler.actions.push(this);\n return scheduler._scheduled || (scheduler._scheduled = animationFrameProvider.requestAnimationFrame(() => scheduler.flush(undefined)));\n }\n recycleAsyncId(scheduler, id, delay = 0) {\n var _a;\n if (delay != null ? delay > 0 : this.delay > 0) {\n return super.recycleAsyncId(scheduler, id, delay);\n }\n const { actions } = scheduler;\n if (id != null && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) {\n animationFrameProvider.cancelAnimationFrame(id);\n scheduler._scheduled = undefined;\n }\n return undefined;\n }\n}\n","import * as i0 from '@angular/core';\nimport { InjectionToken, Injectable, Inject, PLATFORM_ID, Directive, Input, Output, Self, Component, ChangeDetectionStrategy, ViewChild, NgModule } from '@angular/core';\nimport * as i2 from '@angular/common';\nimport { isPlatformBrowser, CommonModule } from '@angular/common';\nimport { from, of, animationFrameScheduler, Subject, BehaviorSubject, defer, Observable } from 'rxjs';\nimport { map, tap, shareReplay, observeOn, filter, switchMap, takeUntil } from 'rxjs/operators';\nimport * as i1 from '@angular/platform-browser';\nimport { makeStateKey } from '@angular/platform-browser';\n\nconst LOTTIE_OPTIONS = new InjectionToken('LottieOptions');\n\nfunction convertPlayerOrLoaderToObservable(player, useWebWorker) {\n const playerOrLoader = player();\n const player$ = playerOrLoader instanceof Promise\n ? from(playerOrLoader).pipe(map(module => module.default || module))\n : of(playerOrLoader);\n return player$.pipe(tap(player => player.useWebWorker(useWebWorker)), shareReplay({ bufferSize: 1, refCount: true }));\n}\nclass AnimationLoader {\n constructor(ngZone, options) {\n this.ngZone = ngZone;\n this.options = options;\n this.player$ = convertPlayerOrLoaderToObservable(this.options.player, this.options.useWebWorker).pipe(observeOn(animationFrameScheduler));\n }\n loadAnimation(options) {\n return this.player$.pipe(map(player => this.createAnimationItem(player, options)));\n }\n resolveOptions(options, container) {\n return Object.assign({\n container,\n renderer: 'svg',\n loop: true,\n autoplay: true,\n }, options);\n }\n createAnimationItem(player, options) {\n return this.ngZone.runOutsideAngular(() => player.loadAnimation(options));\n }\n}\n/** @nocollapse */ AnimationLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.0\", ngImport: i0, type: AnimationLoader, deps: [{ token: i0.NgZone }, { token: LOTTIE_OPTIONS }], target: i0.ɵɵFactoryTarget.Injectable });\n/** @nocollapse */ AnimationLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.0\", ngImport: i0, type: AnimationLoader, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.0\", ngImport: i0, type: AnimationLoader, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: undefined, decorators: [{\n type: Inject,\n args: [LOTTIE_OPTIONS]\n }] }]; } });\n\nclass BaseDirective {\n constructor(ngZone, platformId, animationLoader) {\n this.ngZone = ngZone;\n this.platformId = platformId;\n this.animationLoader = animationLoader;\n this.options = null;\n this.containerClass = null;\n this.styles = null;\n /**\n * `animationCreated` is dispatched after calling `loadAnimation`.\n */\n this.animationCreated = this.getAnimationItem();\n /**\n * `complete` is dispatched after completing the last frame.\n */\n this.complete = this.awaitAnimationItemAndStartListening('complete');\n /**\n * `loopComplete` is dispatched after completing the frame loop.\n */\n this.loopComplete = this.awaitAnimationItemAndStartListening('loopComplete');\n /**\n * `enterFrame` is dispatched after entering the new frame.\n */\n this.enterFrame = this.awaitAnimationItemAndStartListening('enterFrame');\n /**\n * `segmentStart` is dispatched when the new segment is adjusted.\n */\n this.segmentStart = this.awaitAnimationItemAndStartListening('segmentStart');\n /**\n * Original event name is `config_ready`. `config_ready` is dispatched\n * after the needed renderer is configured.\n */\n this.configReady = this.awaitAnimationItemAndStartListening('config_ready');\n /**\n * Original event name is `data_ready`. `data_ready` is dispatched\n * when all parts of the animation have been loaded.\n */\n this.dataReady = this.awaitAnimationItemAndStartListening('data_ready');\n /**\n * Original event name is `DOMLoaded`. `DOMLoaded` is dispatched\n * when elements have been added to the DOM.\n */\n this.domLoaded = this.awaitAnimationItemAndStartListening('DOMLoaded');\n /**\n * `destroy` will be dispatched when the component gets destroyed,\n * it's handy for releasing resources.\n */\n this.destroy = this.awaitAnimationItemAndStartListening('destroy');\n /**\n * `error` will be dispatched if the Lottie player could not render\n * some frame or parse config.\n */\n this.error = this.awaitAnimationItemAndStartListening('error');\n this.destroy$ = new Subject();\n this.loadAnimation$ = new Subject();\n this.animationItem$ = new BehaviorSubject(null);\n this.setupLoadAnimationListener();\n }\n ngOnDestroy() {\n this.destroy$.next();\n this.destroyAnimation();\n }\n loadAnimation(changes, container) {\n // The `loadAnimation` may load `lottie-web` asynchronously and also pipes the player\n // with `animationFrameScheduler`, which schedules an animation task and triggers change\n // detection. We'll trigger change detection only once when the animation item is created.\n this.ngZone.runOutsideAngular(() => this.loadAnimation$.next([changes, container]));\n }\n getAnimationItem() {\n return defer(() => this.animationItem$).pipe(filter((animationItem) => animationItem !== null));\n }\n awaitAnimationItemAndStartListening(name) {\n return this.getAnimationItem().pipe(switchMap(animationItem => \n // `fromEvent` will try to call `removeEventListener` when `unsubscribe()` is invoked.\n // The problem is that `ngOnDestroy()` is called before Angular unsubscribes from\n // `@Output()` properties, thus `animationItem` will be `null` already, also `lottie-web`\n // removes event listeners when calling `destroy()`.\n new Observable(observer => {\n this.ngZone.runOutsideAngular(() => {\n animationItem.addEventListener(name, event => {\n this.ngZone.runOutsideAngular(() => {\n observer.next(event);\n });\n });\n });\n })));\n }\n setupLoadAnimationListener() {\n const loadAnimation$ = this.loadAnimation$.pipe(filter(([changes]) => isPlatformBrowser(this.platformId) && changes.options !== undefined));\n loadAnimation$\n .pipe(switchMap(([changes, container]) => {\n this.destroyAnimation();\n return this.animationLoader.loadAnimation(this.animationLoader.resolveOptions(changes.options.currentValue, container));\n }), takeUntil(this.destroy$))\n .subscribe(animationItem => {\n this.ngZone.run(() => this.animationItem$.next(animationItem));\n });\n }\n destroyAnimation() {\n const animationItem = this.animationItem$.getValue();\n // The `ng-lottie` component or the `lottie` directive can be destroyed\n // before the `animationItem` is set, thus it will fail with\n // `Cannot read property 'destroy' of null`.\n // Potentially it can happen if the directive gets destroyed before change\n // detection is run.\n if (animationItem === null) {\n return;\n }\n // `destroy()` will remove all events listeners.\n animationItem.destroy();\n this.animationItem$.next(null);\n }\n}\n/** @nocollapse */ BaseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.0\", ngImport: i0, type: BaseDirective, deps: [{ token: i0.NgZone }, { token: PLATFORM_ID }, { token: AnimationLoader }], target: i0.ɵɵFactoryTarget.Directive });\n/** @nocollapse */ BaseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.0\", type: BaseDirective, selector: \"[lottie]\", inputs: { options: \"options\", containerClass: \"containerClass\", styles: \"styles\" }, outputs: { animationCreated: \"animationCreated\", complete: \"complete\", loopComplete: \"loopComplete\", enterFrame: \"enterFrame\", segmentStart: \"segmentStart\", configReady: \"configReady\", dataReady: \"dataReady\", domLoaded: \"domLoaded\", destroy: \"destroy\", error: \"error\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.0\", ngImport: i0, type: BaseDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[lottie]' }]\n }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: undefined, decorators: [{\n type: Inject,\n args: [PLATFORM_ID]\n }] }, { type: AnimationLoader }]; }, propDecorators: { options: [{\n type: Input\n }], containerClass: [{\n type: Input\n }], styles: [{\n type: Input\n }], animationCreated: [{\n type: Output\n }], complete: [{\n type: Output\n }], loopComplete: [{\n type: Output\n }], enterFrame: [{\n type: Output\n }], segmentStart: [{\n type: Output\n }], configReady: [{\n type: Output\n }], dataReady: [{\n type: Output\n }], domLoaded: [{\n type: Output\n }], destroy: [{\n type: Output\n }], error: [{\n type: Output\n }] } });\n\nclass LottieDirective extends BaseDirective {\n constructor(ngZone, platformId, host, animationLoader) {\n super(ngZone, platformId, animationLoader);\n this.host = host;\n }\n ngOnChanges(changes) {\n super.loadAnimation(changes, this.host.nativeElement);\n }\n}\n/** @nocollapse */ LottieDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.0\", ngImport: i0, type: LottieDirective, deps: [{ token: i0.NgZone }, { token: PLATFORM_ID }, { token: i0.ElementRef, self: true }, { token: AnimationLoader }], target: i0.ɵɵFactoryTarget.Directive });\n/** @nocollapse */ LottieDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.0\", type: LottieDirective, isStandalone: true, selector: \"[lottie]\", usesInheritance: true, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.0\", ngImport: i0, type: LottieDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[lottie]', standalone: true }]\n }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: undefined, decorators: [{\n type: Inject,\n args: [PLATFORM_ID]\n }] }, { type: i0.ElementRef, decorators: [{\n type: Self\n }] }, { type: AnimationLoader }]; } });\n\nclass LottieComponent extends BaseDirective {\n constructor(ngZone, platformId, animationLoader) {\n super(ngZone, platformId, animationLoader);\n this.width = null;\n this.height = null;\n this.container = null;\n }\n ngOnChanges(changes) {\n super.loadAnimation(changes, this.container.nativeElement);\n }\n}\n/** @nocollapse */ LottieComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.0\", ngImport: i0, type: LottieComponent, deps: [{ token: i0.NgZone }, { token: PLATFORM_ID }, { token: AnimationLoader }], target: i0.ɵɵFactoryTarget.Component });\n/** @nocollapse */ LottieComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.0.0\", type: LottieComponent, isStandalone: true, selector: \"ng-lottie\", inputs: { width: \"width\", height: \"height\" }, viewQueries: [{ propertyName: \"container\", first: true, predicate: [\"container\"], descendants: true, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `\n <div\n #container\n [style.width]=\"width || '100%'\"\n [style.height]=\"height || '100%'\"\n [ngStyle]=\"styles\"\n [ngClass]=\"containerClass\"\n ></div>\n `, isInline: true, dependencies: [{ kind: \"ngmodule\", type: CommonModule }, { kind: \"directive\", type: i2.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"directive\", type: i2.NgStyle, selector: \"[ngStyle]\", inputs: [\"ngStyle\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.0\", ngImport: i0, type: LottieComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'ng-lottie',\n template: `\n <div\n #container\n [style.width]=\"width || '100%'\"\n [style.height]=\"height || '100%'\"\n [ngStyle]=\"styles\"\n [ngClass]=\"containerClass\"\n ></div>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [CommonModule],\n }]\n }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: undefined, decorators: [{\n type: Inject,\n args: [PLATFORM_ID]\n }] }, { type: AnimationLoader }]; }, propDecorators: { width: [{\n type: Input\n }], height: [{\n type: Input\n }], container: [{\n type: ViewChild,\n args: ['container', { static: true }]\n }] } });\n\nclass LottieModule {\n static forRoot(options) {\n return {\n ngModule: LottieModule,\n providers: [\n {\n provide: LOTTIE_OPTIONS,\n useValue: options,\n },\n ],\n };\n }\n}\n/** @nocollapse */ LottieModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.0\", ngImport: i0, type: LottieModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n/** @nocollapse */ LottieModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.0.0\", ngImport: i0, type: LottieModule, imports: [LottieDirective, LottieComponent], exports: [LottieDirective, LottieComponent] });\n/** @nocollapse */ LottieModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.0.0\", ngImport: i0, type: LottieModule, imports: [LottieComponent] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.0\", ngImport: i0, type: LottieModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [LottieDirective, LottieComponent],\n exports: [LottieDirective, LottieComponent],\n }]\n }] });\n\nclass CacheableAnimationLoader extends AnimationLoader {\n constructor() {\n super(...arguments);\n this.cache = new Map();\n }\n ngOnDestroy() {\n this.cache.clear();\n }\n loadAnimation(options) {\n return this.player$.pipe(map(player => {\n const animationItem = this.createAnimationItem(player, this.transformOptions(options));\n this.awaitConfigAndCache(options, animationItem);\n return animationItem;\n }));\n }\n awaitConfigAndCache(options, animationItem) {\n if (this.isAnimationConfigWithPath(options)) {\n // Don't wait for the `config_ready` event if it has been cached previously.\n if (this.cache.has(options.path)) {\n return;\n }\n animationItem.addEventListener('config_ready', () => {\n // See the comments below on why we're storing the animation data as a string.\n this.cache.set(options.path, JSON.stringify(animationItem['animationData']));\n });\n }\n }\n transformOptions(options) {\n if (this.isAnimationConfigWithPath(options) && this.cache.has(options.path)) {\n return {\n ...options,\n path: undefined,\n // Caretaker note: `lottie-web` cannot re-use the `animationData` object between animations, and we\n // have to retrieve a new object each time an animation is created.\n // https://github.com/airbnb/lottie-web#html\n // See comments for the `animationData` property.\n animationData: JSON.parse(this.cache.get(options.path)),\n };\n }\n else {\n return options;\n }\n }\n isAnimationConfigWithPath(options) {\n return typeof options.path === 'string';\n }\n}\n/** @nocollapse */ CacheableAnimationLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.0\", ngImport: i0, type: CacheableAnimationLoader, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\n/** @nocollapse */ CacheableAnimationLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.0\", ngImport: i0, type: CacheableAnimationLoader, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.0\", ngImport: i0, type: CacheableAnimationLoader, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n\nclass LottieCacheModule {\n static forRoot() {\n return {\n ngModule: LottieCacheModule,\n providers: [\n {\n provide: AnimationLoader,\n useExisting: CacheableAnimationLoader,\n },\n ],\n };\n }\n}\n/** @nocollapse */ LottieCacheModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.0\", ngImport: i0, type: LottieCacheModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n/** @nocollapse */ LottieCacheModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.0.0\", ngImport: i0, type: LottieCacheModule });\n/** @nocollapse */ LottieCacheModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.0.0\", ngImport: i0, type: LottieCacheModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.0\", ngImport: i0, type: LottieCacheModule, decorators: [{\n type: NgModule\n }] });\n\nfunction provideCacheableAnimationLoader() {\n return [\n {\n provide: AnimationLoader,\n useExisting: CacheableAnimationLoader,\n },\n ];\n}\nfunction provideLottieOptions(options) {\n return [\n {\n provide: LOTTIE_OPTIONS,\n useValue: options,\n },\n ];\n}\n\nfunction transformAnimationFilenameToKey(animation) {\n const [animationName] = animation.split('.json');\n return `animation-${animationName}`;\n}\n\nclass LottieTransferState {\n constructor(transferState) {\n this.transferState = transferState;\n }\n get(animation) {\n const animationKey = transformAnimationFilenameToKey(animation);\n const stateKey = makeStateKey(animationKey);\n return this.transferState.get(stateKey, null);\n }\n}\n/** @nocollapse */ LottieTransferState.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.0\", ngImport: i0, type: LottieTransferState, deps: [{ token: i1.TransferState }], target: i0.ɵɵFactoryTarget.Injectable });\n/** @nocollapse */ LottieTransferState.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.0\", ngImport: i0, type: LottieTransferState, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.0\", ngImport: i0, type: LottieTransferState, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: i1.TransferState }]; } });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AnimationLoader, BaseDirective, LottieCacheModule, LottieComponent, LottieDirective, LottieModule, LottieTransferState, provideCacheableAnimationLoader, provideLottieOptions, transformAnimationFilenameToKey, CacheableAnimationLoader as ɵCacheableAnimationLoader, LOTTIE_OPTIONS as ɵLOTTIE_OPTIONS };\n//# sourceMappingURL=ngx-lottie.mjs.map\n","export enum MessageBusChannelType {\n ERROR = 'ErrorChannel',\n TOAST = 'ToastChannel',\n}\n\nexport enum MessageBusEventChannel {\n INCOMING = 'MessageBusIncomingChannel',\n OUTGOING = 'MessageBusOutgoingChannel',\n INTERNAL = 'MessageBusInternalChannel',\n}\n\nexport enum MessageBusProductEventChannel {\n SAVINGS = 'SavingsAccountChannel',\n}\n\nexport enum MessageBusDetectedDeviceType {\n IOS = 'IOS',\n BROWSER = 'BROWSER',\n ANDROID = 'ANDROID',\n UNKNOWN = 'UNKNOWN',\n}\n\nexport enum MessageBusIncomingEventKey {\n AUTH = 'auth ',\n CAMERA_RESPONSE = 'data:image/png;base64,', // Needed for Android handling since it's returned via bridge\n CASHFLOW = 'cashflow-',\n FILE_RESPONSE = 'data:',\n FOREGROUND = 'foregrounded',\n HALF_SHEET = 'halfSheet ',\n NEW_TOKEN = 'NEWTOKEN',\n UNKNOWN = 'No matches found',\n}\n\nexport const MessageBusIncomingEventKeyList: {\n key: string;\n value: string;\n}[] = Object.entries(MessageBusIncomingEventKey).map(([key, value]) => ({ key, value }));\n\nexport const MessageBusIncomingEventKeyByValue = (keyString: string) =>\n MessageBusIncomingEventKey[keyString as keyof typeof MessageBusIncomingEventKey];\n\nexport enum MessageBusInternalEventKey {\n AUTH_UPDATED = 'authorize.updated',\n CHANGED_LANGUAGE = 'language.changed',\n DOMAIN_MAPPING_LOADED = 'remote.config.domain.mapping.loaded',\n NAVIGATION_END = 'navigation.end',\n SAVE_FILE = 'document.upload.save',\n SELECT_LANGUAGE = 'language.display.select',\n}\n\nexport const MessageBusInternalEventKeyList: {\n key: string;\n value: string;\n}[] = Object.entries(MessageBusInternalEventKey).map(([key, value]) => ({ key, value }));\n\nexport const MessageBusInternalEventKeyByValue = (keyString: string) =>\n MessageBusInternalEventKey[keyString as keyof typeof MessageBusInternalEventKey];\n\nexport enum MessageBusOutgoingEventKey {\n ANALYTICS = 'ANALYTICS',\n AUTH = 'AUTH',\n CALL = 'CALL',\n CASHFLOW_LINK = 'CASHFLOW_LINK',\n CHAT = 'CHAT',\n CREDENTIALS = 'CREDENTIALS',\n EXIT_VIEW = 'EXIT_VIEW',\n EXTERNAL_LINK = 'EXTERNAL_LINK',\n VIEW_FILE = 'VIEW_FILE',\n FIREBASE = 'FIREBASE',\n HIDE_ANIMATION = 'HIDE_ANIMATION',\n HIDE_LOADING = 'HIDE_LOADING',\n HIDE_NAV = 'HIDE_NAV',\n LOADED = 'LOADED',\n ROUTE = 'ROUTE',\n SHARE_FILE = 'SHARE_FILE',\n SHOW_ANIMATION = 'SHOW_ANIMATION',\n SHOW_CAMERA = 'SHOW_CAMERA',\n SHOW_FEED = 'SHOW_FEED',\n SHOW_HALFSHEET = 'SHOW_HALFSHEET',\n SHOW_LOADING = 'SHOW_LOADING',\n SHOW_NAV = 'SHOW_NAV',\n SHOW_PHOTO_PICKER = 'SHOW_PHOTO_PICKER',\n UPLOAD_FILE = 'UPLOAD_FILE',\n}\n\nexport const MessageBusOutgoingEventKeyList: {\n key: string;\n value: string;\n}[] = Object.entries(MessageBusOutgoingEventKey).map(([key, value]) => ({ key, value }));\n\nexport const MessageBusOutgoingEventKeyByValue = (keyString: string) =>\n MessageBusOutgoingEventKey[keyString as keyof typeof MessageBusOutgoingEventKey];\n","import { BsHubService } from '@brightside-web/desktop/data-access/core-services';\n\nimport { MessageBusEventChannel, MessageBusOutgoingEventKey } from '../../models/message-bus.enum';\nimport {\n MessageBusEventData,\n MessageBusInternalHubEvent,\n MessageBusOutgoingEvent,\n MessageBusOutgoingEventData,\n} from '../../models/message-bus.interface';\n\n//No other class should use this directly.\nexport class MessageBusPlatformNativeEventBody {\n event: MessageBusOutgoingEventKey;\n data: MessageBusEventData | MessageBusOutgoingEventData = {};\n\n constructor(\n event: MessageBusOutgoingEventKey,\n data: MessageBusEventData | MessageBusOutgoingEventData = {},\n moveBodyNode: boolean = false\n ) {\n this.event = event;\n this.data = data;\n\n if (moveBodyNode && data.body) {\n this.data = { ...(data as any).body };\n\n this.data = this.deepInstantHtmlCopySwap(this.data);\n }\n }\n\n\n private deepInstantHtmlCopySwap(processObject: Record<string, any>): any {\n if (!processObject || typeof processObject !== 'object') {\n return processObject;\n }\n\n let rtnObj = {};\n\n Object.keys(processObject).map((key: string) => {\n let value = (processObject as any)[key];\n\n if (value) {\n if (Array.isArray(value)) {\n value = value.map((arryValue) => this.deepInstantHtmlCopySwap(arryValue));\n } else if (key === 'code') {\n value = value;\n } else if (typeof value === 'object') {\n value = this.deepInstantHtmlCopySwap(value);\n } else if (typeof value === 'string') {\n value = value.replace(/<br>/g, '\\n');\n }\n }\n\n rtnObj = { ...rtnObj, [key]: value };\n });\n\n return rtnObj;\n }\n\n stringify(): string {\n return JSON.stringify(this as object);\n }\n\n toJson(): object {\n return this as object;\n }\n}\n\n/**\n * @description\n * This is the base class any new platform should extend to ensure coverage of\n * needed methods and values.\n */\nexport class MessageBusPlatformBaseMessageHandler {\n protected allowVerboseDebugMode = true;\n protected allowedBodyKeys = ['path', 'route'];\n\n constructor() {}\n\n protected logForDebugging(message?: any, ...optionalParams: any[]) {\n if (this.allowVerboseDebugMode) console.log('debug: MessageBusService Debugger', message, optionalParams);\n }\n\n protected blockedMessageReceiver(event: MessageBusOutgoingEvent) {\n this.logForDebugging('MessageReceiver was a noop and your message was not delivered');\n this.logForDebugging(event);\n }\n\n protected cleanDataBody(body: MessageBusOutgoingEventData = {}) {\n return this.allowedBodyKeys.reduce((cleanedResponse, bodyKey) => {\n if (!body[bodyKey]) return cleanedResponse;\n\n return { ...cleanedResponse, [bodyKey]: body[bodyKey] };\n }, {});\n }\n\n protected prepareNativeEvent(event: MessageBusOutgoingEvent, moveBodyNode: boolean = false) {\n if (event?.bridgeSetting?.data) {\n event.data = {\n body: event?.bridgeSetting?.data as MessageBusOutgoingEventData,\n };\n } else if (event?.data?.body) {\n event.data.body = this.cleanDataBody(event.data.body as MessageBusOutgoingEventData);\n }\n\n return new MessageBusPlatformNativeEventBody(event.key, event.data, moveBodyNode);\n }\n\n protected get messageReceiver() {\n return this.blockedMessageReceiver;\n }\n\n protected sendInternalHubEvent(channel: MessageBusEventChannel, eventData: MessageBusInternalHubEvent) {\n BsHubService.dispatchStatic(channel, eventData);\n }\n}\n","import { BsHubService } from '@brightside-web/desktop/data-access/core-services';\n\nimport { MessageBusIncomingEventKey, MessageBusOutgoingEventKey, MessageBusEventChannel } from '../../models/message-bus.enum';\nimport { MessageBusOutgoingEvent, HubPayload } from '../../models/message-bus.interface';\n\nimport { MessageBusInternalService } from '../../internal/message-bus-internal.service';\nimport { MessageBusPlatformBaseMessageHandler } from './platform-base.service';\n\n/**\n * jsHandler = How Android application can speak with this application when deployed inside their webview\n */\n// eslint-disable-next-line no-var\ndeclare var jsHandler: any;\n\nconst IsRunningAndroid = () => typeof jsHandler !== 'undefined';\n\n/**\n * @description\n * Android specific service\n */\nclass MessageBusPlatformAndroidMessageHandler extends MessageBusPlatformBaseMessageHandler {\n static TriggerCameraEvent() {\n BsHubService.dispatchStatic(MessageBusEventChannel.OUTGOING, {\n event: MessageBusOutgoingEventKey.SHOW_CAMERA,\n data: {\n body: {},\n },\n });\n }\n\n static SetupCameraEventWatcher(element: HTMLInputElement) {\n /**\n * This watcher will wait for events from the camera\n */\n MessageBusInternalService.addHubListenerWithEventFilter({\n channel: MessageBusEventChannel.INCOMING,\n filterByEvents: [MessageBusIncomingEventKey.CAMERA_RESPONSE],\n take: 1,\n callbackListener: (payload: HubPayload) => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const imageSrc = payload.data.body.rawMessage;\n\n (element.onchange as any)(new Event('fileChange'), imageSrc);\n },\n });\n }\n\n static TriggerPickerEvent() {\n BsHubService.dispatchStatic(MessageBusEventChannel.OUTGOING, {\n event: MessageBusOutgoingEventKey.SHOW_PHOTO_PICKER,\n data: {\n body: {},\n },\n });\n }\n\n static SetupPickerEventWatcher(element: HTMLInputElement) {\n /**\n * This watcher will wait for events from the camera\n */\n MessageBusInternalService.addHubListenerWithEventFilter({\n channel: MessageBusEventChannel.INCOMING,\n filterByEvents: [MessageBusIncomingEventKey.CAMERA_RESPONSE],\n take: 1,\n callbackListener: (payload: HubPayload) => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const imageSrc = payload.data.body.rawMessage;\n\n (element.onchange as any)(new Event('fileChange'), imageSrc);\n },\n });\n }\n\n constructor() {\n super();\n\n HTMLInputElement.prototype.click = new Proxy(HTMLInputElement.prototype.click, {\n apply: function (target, element: HTMLInputElement, receiver) {\n //If we are an input file type with camera set up, trigger show camera\n if (element.type === 'file') {\n if (element.getAttribute('capture') === 'camera') {\n MessageBusPlatformAndroidMessageHandler.TriggerCameraEvent();\n MessageBusPlatformAndroidMessageHandler.SetupCameraEventWatcher(element);\n } else {\n MessageBusPlatformAndroidMessageHandler.TriggerPickerEvent();\n MessageBusPlatformAndroidMessageHandler.SetupPickerEventWatcher(element);\n }\n } else {\n //This calls original click method\n Reflect.apply(target, element, receiver);\n }\n },\n });\n }\n\n override get messageReceiver() {\n return (event: MessageBusOutgoingEvent) => {\n if (event.key === MessageBusOutgoingEventKey.ROUTE && !event.data?.forceBridgeFire) {\n this.handlePreBridgeRouteEvent(event);\n return;\n }\n return jsHandler.postMessage(this.prepareNativeEvent(event, true).stringify());\n }\n }\n\n private handlePreBridgeRouteEvent(event: MessageBusOutgoingEvent) {\n let routeToUrl = '';\n\n if (event.fallbackSetting?.routeToUrl) {\n routeToUrl = event.fallbackSetting.routeToUrl as string;\n } else if (event?.data?.routeToUrl) {\n routeToUrl = event.data.routeToUrl as string;\n } else if (event.data?.body && ((event.data.body as any).route as string)) {\n routeToUrl = (event.data.body as any).route as string;\n }\n\n this.triggerRouteByUrlEvent(event, routeToUrl);\n }\n\n private triggerRouteByUrlEvent(event: MessageBusOutgoingEvent, routeToUrl: string = '') {\n BsHubService.dispatchStatic('RoutingServiceChannel', {\n event: 'ROUTE_BY_URL', //These hard coded values need to come from util but doing so breaks builds...\n data: {\n routeToUrl,\n originalEvent: event\n },\n });\n }\n}\n\nexport { IsRunningAndroid, MessageBusPlatformAndroidMessageHandler };\n","import { BsHubService } from '@brightside-web/desktop/data-access/core-services';\n\nimport { MessageBusOutgoingEventKey } from '../../models/message-bus.enum';\nimport { MessageBusOutgoingEvent } from '../../models/message-bus.interface';\nimport { MessageBusNativeWindowReference } from '../../native-window/message-bus-native-window.reference';\n\nimport { MessageBusPlatformBaseMessageHandler, MessageBusPlatformNativeEventBody } from './platform-base.service';\n\n/**\n * Window.nativeWindow.webkit.messageHandlers.buttonClicked.postMessage = For IOS and testing of injection into bus\n */\ndeclare global {\n interface Window {\n nativeWindow: {\n webkit: {\n messageHandlers: {\n buttonClicked: { postMessage: Function };\n };\n };\n };\n }\n}\n\nconst checkForUserAgentMatch = () =>\n !/safari/.test(window.navigator.userAgent.toLowerCase()) && /iphone|ipod|ipad/.test(window.navigator.userAgent.toLowerCase());\nconst checkForBridgeListener = () => typeof (window as any).webkit?.messageHandlers?.buttonClicked !== 'undefined';\n\nconst IsRunningIOS = () => checkForUserAgentMatch() || checkForBridgeListener();\n\n/**\n * @description\n * iOS specific service\n */\nclass MessageBusPlatformIosMessageHandler extends MessageBusPlatformBaseMessageHandler {\n constructor(private nativeWindowReference: MessageBusNativeWindowReference) {\n super();\n }\n\n private get webkit() {\n return this.nativeWindowReference?.nativeWindow?.webkit || {};\n }\n\n override get messageReceiver() {\n return (event: MessageBusOutgoingEvent) => {\n this.logForDebugging('messageReceiver event', event);\n\n if (event.key === MessageBusOutgoingEventKey.ROUTE && !event.data?.forceBridgeFire) {\n this.handlePreBridgeRouteEvent(event);\n return;\n }\n\n const generatedEventClass: MessageBusPlatformNativeEventBody = this.prepareNativeEvent(event, true);\n\n this.webkit.messageHandlers.buttonClicked.postMessage.bind(this.webkit.messageHandlers.buttonClicked)(generatedEventClass);\n };\n }\n\n private handlePreBridgeRouteEvent(event: MessageBusOutgoingEvent) {\n let routeToUrl = '';\n\n if (event.fallbackSetting?.routeToUrl) {\n routeToUrl = event.fallbackSetting.routeToUrl as string;\n } else if (event?.data?.routeToUrl) {\n routeToUrl = event.data.routeToUrl as string;\n } else if (event.data?.body && ((event.data.body as any).route as string)) {\n routeToUrl = (event.data.body as any).route as string;\n }\n\n this.logForDebugging('routeToUrl', routeToUrl);\n\n this.triggerRouteByUrlEvent(event, routeToUrl);\n }\n\n private triggerRouteByUrlEvent(event: MessageBusOutgoingEvent, routeToUrl: string = '') {\n BsHubService.dispatchStatic('RoutingServiceChannel', {\n event: 'ROUTE_BY_URL', //These hard coded values need to come from util but doing so breaks builds...\n data: {\n routeToUrl,\n originalEvent: event,\n },\n });\n }\n}\n\nexport { IsRunningIOS, MessageBusPlatformIosMessageHandler };\n","import { IsRunningAndroid, MessageBusPlatformAndroidMessageHandler } from './platform/platform-android.service';\nimport { IsRunningIOS, MessageBusPlatformIosMessageHandler } from './platform/platform-ios.service';\nimport { MessageBusPlatformBrowserMessageHandler } from './platform/platform-browser.service';\n\nconst getServiceByPlatform = () => {\n if (IsRunningAndroid()) {\n return MessageBusPlatformAndroidMessageHandler;\n } else if (IsRunningIOS()) {\n return MessageBusPlatformIosMessageHandler;\n } else {\n return MessageBusPlatformBrowserMessageHandler;\n }\n};\n\nconst MixinClass = (superclass: any) => class extends superclass {};\nconst extendsPlatformClass = (AnyClass: any) => class extends MixinClass(AnyClass) {};\n\nconst MessageBusBaseService = extendsPlatformClass(getServiceByPlatform());\n\nexport { MessageBusBaseService };\n","import { BsHubService } from '@brightside-web/desktop/data-access/core-services';\n\nimport { MessageBusOutgoingEvent } from '../../models/message-bus.interface';\n\nimport { MessageBusPlatformBaseMessageHandler } from './platform-base.service';\n\nimport { ChatService } from '@brightside-web/micro/core/chat';\nimport {\n MessageBusEventChannel,\n MessageBusInternalHubEvent,\n MessageBusInternalService,\n MessageBusOutgoingEventKey,\n} from '@micro-core/message-bus';\nimport { EventDataMap } from '@aws-amplify/core/src/Hub/types/HubTypes';\n\n/**\n * @description\n * Browser specific service\n */\nclass MessageBusPlatformBrowserMessageHandler extends MessageBusPlatformBaseMessageHandler {\n private hasExternalLink = false;\n\n constructor(private chatService: ChatService) {\n super();\n }\n\n private watchForExternalLinkEvents(event: MessageBusOutgoingEvent) {\n if (event.key !== MessageBusOutgoingEventKey.EXTERNAL_LINK) {\n return;\n }\n\n MessageBusInternalService.addHubListenerWithEventFilter({\n channel: MessageBusEventChannel.INTERNAL,\n filterByEvents: [MessageBusOutgoingEventKey.EXTERNAL_LINK],\n take: 1,\n callbackListener: (payload: MessageBusInternalHubEvent | EventDataMap) => {\n this.logForDebugging('External Link Event Received', payload);\n\n if ('bridgeSetting' in payload && payload.bridgeSetting?.data?.url) {\n window.open(`${payload.bridgeSetting.data.url}`, '_blank');\n }\n },\n });\n }\n\n private handleBridgeOutgoingMessage(event: MessageBusOutgoingEvent) {\n //Setup listeners one time to react if needed\n this.watchForExternalLinkEvents(event);\n\n //We have to convert the 'key' in the outgoing to the 'event' in the internal so\n //things like desktop can handle when no native layer is present\n MessageBusInternalService.sendInternalHubEvent({ ...event, event: event.key } as MessageBusInternalHubEvent);\n }\n\n private handleDataBodyMessage(event: MessageBusOutgoingEvent) {\n if (event?.data?.routeToUrl) {\n this.handleRouteMessage(event.data.routeToUrl as string);\n } else if (event.data?.body && ((event.data.body as any).route as string)) {\n this.handleRouteMessage((event.data.body as any).route as string);\n }\n }\n\n private handleDataFallbackMessage(event: MessageBusOutgoingEvent) {\n //The order of these checks will look for: routeToUrl, incomingEvent, then action\n if (event.fallbackSetting?.routeToUrl) {\n if (event.fallbackSetting?.action === MessageBusOutgoingEventKey.CHAT) {\n setTimeout(() => {\n this.chatService.openIntercomChat();\n }, 750);\n }\n this.handleRouteMessage(event.fallbackSetting.routeToUrl as string);\n } else if (event.fallbackSetting?.incomingEvent) {\n (window as any).BsCrossCom.publishMessage(event.fallbackSetting.incomingEvent.rawMessage || '');\n } else if (event.fallbackSetting?.action === MessageBusOutgoingEventKey.CHAT) {\n this.chatService.openIntercomChat();\n } else {\n this.blockedMessageReceiver(event);\n }\n }\n\n private handleRouteMessage(routeToUrl: string = '') {\n BsHubService.dispatchStatic('RoutingServiceChannel', {\n event: 'ROUTE_BY_URL', //These hard coded values need to come from util but doing so breaks builds...\n data: {\n routeToUrl,\n },\n });\n }\n\n protected get messageReceiver() {\n return (event: MessageBusOutgoingEvent) => {\n if (event?.fallbackSetting) {\n this.handleDataFallbackMessage(event);\n } else if (Object.keys(event?.bridgeSetting || {}).length > 0) {\n this.handleBridgeOutgoingMessage(event);\n } else if (Object.keys(event?.data || {}).length > 0) {\n this.handleDataBodyMessage(event);\n } else {\n this.blockedMessageReceiver(event);\n }\n };\n }\n}\n\nexport { MessageBusPlatformBrowserMessageHandler };\n","import { Injectable } from '@angular/core';\n\nimport { BsHubService } from '@brightside-web/desktop/data-access/core-services';\n\nimport { MessageBusEventChannel } from '../models/message-bus.enum';\nimport {\n HubCapsule,\n HubPayload,\n MessageBusHubListenerArgs,\n MessageBusHubListener,\n MessageBusInternalHubEvent,\n} from '../models/message-bus.interface';\nimport { MessageBusBaseService } from '../service/message-bus-base.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MessageBusInternalService extends MessageBusBaseService {\n static hubListeners: MessageBusHubListenerArgs[] = [];\n\n static addHubListener(details: MessageBusHubListenerArgs): MessageBusHubListener {\n const { channel, callbackListener } = details;\n\n //Let's wrap the incoming callback to abstract things like pulling out payload\n const wrappedCallbackListener = (data: HubCapsule<any, any>) => {\n const payload: HubPayload = data.payload;\n\n callbackListener(payload);\n };\n\n const listener = BsHubService.listenStatic(channel as string, wrappedCallbackListener);\n\n //Now we need to return the object so we can properly destroy later\n return {\n channel,\n callbackListener: wrappedCallbackListener,\n destroy: () => {\n listener();\n },\n };\n }\n\n static addHubListenerWithEventFilter(details: MessageBusHubListenerArgs): MessageBusHubListener {\n const { channel, filterByEvents, callbackListener } = details;\n let { take } = details;\n if (!filterByEvents) {\n throw new Error('This method does not support use without event filters. Please use addHubListener directly.');\n }\n\n //We are going to wrap here to be able to filter out bad events\n const wrappedCallbackListener = (payload: HubPayload | MessageBusInternalHubEvent) => {\n if (filterByEvents.includes(payload.event)) {\n callbackListener(payload);\n\n //This is the mech to destroy after x callbacks\n if (take) {\n take -= 1;\n\n if (take <= 0) {\n returnMessageBusHubListener.destroy();\n }\n }\n }\n };\n\n const returnMessageBusHubListener = this.addHubListener({ channel, callbackListener: wrappedCallbackListener });\n\n MessageBusInternalService.hubListeners.push(details);\n\n return returnMessageBusHubListener;\n }\n\n static sendOutgoingHubEvent(hubEvent: MessageBusInternalHubEvent, offSetDelay?: number) {\n\n if (!offSetDelay || offSetDelay <= 0) {\n BsHubService.dispatchStatic(MessageBusEventChannel.OUTGOING, hubEvent);\n return;\n }\n\n setTimeout(() => {\n BsHubService.dispatchStatic(MessageBusEventChannel.OUTGOING, hubEvent);\n }, offSetDelay);\n }\n\n static sendInternalHubEvent(\n hubEvent: MessageBusInternalHubEvent,\n channel: MessageBusEventChannel | string = MessageBusEventChannel.INTERNAL\n ) {\n BsHubService.dispatchStatic(channel, hubEvent);\n }\n\n constructor() {\n super();\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport {\n MessageBusEventChannel,\n MessageBusIncomingEventKey,\n MessageBusIncomingEventKeyList,\n MessageBusIncomingEventKeyByValue,\n} from '../models/message-bus.enum';\nimport { MessageBusBaseService } from '../service/message-bus-base.service';\n\ninterface SimpleUnknownObject {\n [key: string]: unknown;\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MessageBusIncomingService extends MessageBusBaseService {\n private readonly skipConvertingToObject = [MessageBusIncomingEventKey.CAMERA_RESPONSE];\n\n constructor() {\n super();\n }\n\n private extractEventKeys(rawMessageBusIncomingEventKey: string): MessageBusIncomingEventKey[] {\n return (\n MessageBusIncomingEventKeyList.filter(\n (eventKeyDetails: { key: string; value: string }) => rawMessageBusIncomingEventKey.indexOf(eventKeyDetails.value) === 0\n ).map((eventKeyDetails: { key: string; value: string }) => MessageBusIncomingEventKeyByValue(eventKeyDetails.key)) || [\n MessageBusIncomingEventKey.UNKNOWN,\n ]\n );\n }\n\n private extractEventBody(\n keys: MessageBusIncomingEventKey[] = [],\n rawMessageBusIncomingEventKey: string = ''\n ): SimpleUnknownObject {\n let cleanedMessageBody: SimpleUnknownObject = {};\n let cleanedMessageString = rawMessageBusIncomingEventKey;\n\n //Remove the values of the keys from the rawString\n keys.forEach((eventKey: MessageBusIncomingEventKey) => {\n cleanedMessageString = cleanedMessageString.replace(eventKey, '');\n });\n\n if (this.skipConvertingToObject.filter((skipKey) => keys.includes(skipKey)).length > 0) {\n cleanedMessageBody = { rawMessage: rawMessageBusIncomingEventKey }; //This should be the raw message that's sent into us and not the cleansed version\n } else if (cleanedMessageString.indexOf('{') > -1) {\n cleanedMessageString = cleanedMessageString.slice(cleanedMessageString.indexOf('{'));\n cleanedMessageBody = this.convertIncomingBodyToObject(cleanedMessageString);\n } else {\n cleanedMessageBody = { value: cleanedMessageString };\n }\n\n return cleanedMessageBody;\n }\n\n private convertIncomingBodyToObject(cleanedMessageString: string, convertToSingleQuotes = false): SimpleUnknownObject {\n //Let's try to convert to an object now\n try {\n return JSON.parse(convertToSingleQuotes ? cleanedMessageString.replace(/'/g, '\"') : cleanedMessageString);\n } catch (_) {\n if (!convertToSingleQuotes) return this.convertIncomingBodyToObject(cleanedMessageString, true);\n\n return { unknown: cleanedMessageString };\n }\n }\n\n private sendIncomingEvents(eventKeys: MessageBusIncomingEventKey[], eventBody: SimpleUnknownObject) {\n eventKeys.forEach((eventKey) => {\n this.sendInternalHubEvent(MessageBusEventChannel.INCOMING, {\n event: eventKey,\n data: { body: eventBody },\n });\n });\n }\n\n /**\n * ToDo: Do we need to have better checks here to make sure bad data can't be injected\n * @param rawMessageBusIncomingEventKey\n */\n handleIncoming(rawMessageBusIncomingEventKey: string) {\n this.logForDebugging('Incoming message bus event processing...');\n\n const extractedEventKeys = this.extractEventKeys(rawMessageBusIncomingEventKey);\n const extractedEventBody = this.extractEventBody(extractedEventKeys, rawMessageBusIncomingEventKey);\n\n this.logForDebugging('Event keys and body extracted', extractedEventKeys, extractedEventBody);\n\n this.sendIncomingEvents(extractedEventKeys, extractedEventBody);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Intercom } from 'ng-intercom';\nimport {BsChatService} from \"@brightside-web/desktop/data-access/core-services\";\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ChatService {\n /** note this class assumes that the desktop app module has already loaded in the Intercom module, it will not work otherwise **/\n constructor(private _bsChatService:BsChatService) {\n }\n\n openIntercomChat(){\n this._bsChatService.showChat();\n }\n}\n","import { Injectable } from '@angular/core';\n\nconst _window = (): any =>\n // return the global native browser window object\n window || {}\n;\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MessageBusNativeWindowReference {\n get nativeWindow(): any {\n return _window();\n }\n}\n","import {Injectable} from '@angular/core';\nimport {Router} from '@angular/router';\nimport {TranslateService} from '@ngx-translate/core';\n\nimport {\n BsHubService,\n} from '@brightside-web/desktop/data-access/core-services';\n\n\nimport {MessageBusInternalService} from '../internal/message-bus-internal.service';\n\nimport {\n MessageBusEventChannel,\n MessageBusOutgoingEventKey,\n MessageBusOutgoingEventKeyByValue,\n} from '../models/message-bus.enum';\nimport {\n HubPayload,\n MessageBusEventData,\n MessageBusOutgoingEvent,\n MessageBusOutgoingEventData,\n} from '../models/message-bus.interface';\nimport {MessageBusBaseService} from '../service/message-bus-base.service';\nimport {MessageBusNativeWindowReference} from '../native-window/message-bus-native-window.reference';\n\nimport {ChatService} from '@brightside-web/micro/core/chat';\n\ndeclare global {\n interface Window {\n GLOBAL_LOADER: unknown;\n }\n}\n\ntype GenericObject = Record<string, any>;\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MessageBusOutgoingService extends MessageBusBaseService {\n private outgoingEventKeyAsStrings: string[] = Object.entries(MessageBusOutgoingEventKey).map(([_, value]) => value);\n\n constructor(\n protected chatService: ChatService,\n protected nativeWindowReference: MessageBusNativeWindowReference,\n protected routerService: Router,\n protected translateService: TranslateService,\n protected bsHubService: BsHubService\n ) {\n super();\n\n this.setUpListenerForOutgoingEvents();\n\n //This will execute a side-affect on the micro app side to show the spinner on exit\n this.setUpListenerForOutgoingRoute();\n }\n\n /**\n * Utilized to groom the data and translate any keys into strings at time\n * of event being triggered.\n *\n * @param processObject <objectFromEvent>\n * @returns <objectFromEvent>\n */\n private deepInstantTranslationCopySwap(processObject: GenericObject): any {\n if (!processObject || typeof processObject !== 'object') {\n return processObject;\n }\n\n let rtnObj = {};\n\n Object.keys(processObject).map((key: string) => {\n let value = (processObject as any)[key];\n\n if (value) {\n if (Array.isArray(value)) {\n value = value.map((arryValue) => this.deepInstantTranslationCopySwap(arryValue));\n } else if (key === 'code') {\n value = value;\n } else if (typeof value === 'object') {\n value = this.deepInstantTranslationCopySwap(value);\n } else if (typeof value === 'string') {\n value = this.translateService.instant(value);\n }\n }\n\n rtnObj = { ...rtnObj, [key]: value };\n });\n\n return rtnObj;\n }\n\n /**\n * This method will establish an application wide listener for any outgoing (to native) calls\n * See MessageBusOutgoingEventKey enum and bridge documentation on Wiki\n * https://healthydollar.atlassian.net/wiki/spaces/EN/pages/762970140/Bridge+Events\n */\n private setUpListenerForOutgoingEvents() {\n this.logForDebugging('setUpListenerForOutgoingEvents');\n\n MessageBusInternalService.addHubListenerWithEventFilter({\n channel: MessageBusEventChannel.OUTGOING,\n filterByEvents: [...this.outgoingEventKeyAsStrings],\n callbackListener: (payload: HubPayload) => {\n this.logForDebugging('Internal hub event hit', JSON.stringify(payload));\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.sendOutgoingEvent({ ...payload, key: MessageBusOutgoingEventKeyByValue(payload.event) });\n },\n });\n }\n\n private setUpListenerForOutgoingRoute() {\n const windowObjAsAny = this.nativeWindowReference?.nativeWindow as any;\n\n //If we are exiting micro app view, we need to show loader\n if (windowObjAsAny.GLOBAL_LOADER) {\n MessageBusInternalService.addHubListenerWithEventFilter({\n channel: MessageBusEventChannel.OUTGOING,\n filterByEvents: ['ROUTE'],\n callbackListener: () => {\n windowObjAsAny.GLOBAL_LOADER.show();\n },\n });\n }\n }\n\n /**\n * This can serve as a place to modify data if the outbound receiver needs special treatment\n * @param outgoingEventData: MessageBusOutgoingEventData\n * @returns MessageBusOutgoingEventData\n */\n private groomMessageBody(\n outgoingEventData: MessageBusEventData | MessageBusOutgoingEventData = {}\n ): MessageBusOutgoingEventData {\n //Add conversation to the chain and make sure they return the copy\n return this.deepInstantTranslationCopySwap(outgoingEventData) as MessageBusOutgoingEventData;\n }\n\n private checkAndTriggerSideAffectFrom(eventKey: MessageBusOutgoingEventKey): void {\n //When we are using the ROUTE outgoing bridge this means we are going back to\n //container layer and having them redirect the webview. Which should likely be\n //another application.\n if (eventKey === MessageBusOutgoingEventKey.ROUTE || eventKey === MessageBusOutgoingEventKey.EXIT_VIEW) {\n this.bsHubService.dispatch('MessageBusOutgoingChannel', {\n event: MessageBusOutgoingEventKey.ANALYTICS,\n data: { event: \"web\", action: \"exited\", parameters: {url: window.location.hostname} },\n });\n }\n }\n\n /**\n * Direct trigger to send events\n * Internal application callers should utilize MessageBusInternalService.sendOutgoingHubEvent normally\n * @param outgoingEvent MessageBusOutgoingEvent\n */\n sendOutgoingEvent(outgoingEvent: MessageBusOutgoingEvent) {\n if (outgoingEvent.bridgeSetting?.data) {\n outgoingEvent.bridgeSetting.data = this.groomMessageBody(outgoingEvent.bridgeSetting?.data);\n } else {\n outgoingEvent.data = this.groomMessageBody(outgoingEvent.data);\n }\n\n this.checkAndTriggerSideAffectFrom(outgoingEvent.key);\n this.messageReceiver(outgoingEvent);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { MessageBusInternalService } from './internal/message-bus-internal.service';\nimport { MessageBusIncomingService } from './incoming/message-bus-incoming.service';\nimport { MessageBusOutgoingService } from './outgoing/message-bus-outgoing.service';\nimport {IntercomModule} from \"ng-intercom\";\n\n@NgModule({\n // I would rather not include Intercom here but it would mean that instead of routing hub messages through this module,\n // we would have to send them directly to the micro-core-chat module and have that module be a hub listener\n imports: [CommonModule, IntercomModule.forRoot({\n appId: \"\"\n })],\n providers: [MessageBusInternalService, MessageBusIncomingService, MessageBusOutgoingService],\n})\nexport class MicroMessageBusModule {\n constructor(\n private messageBusInternalService: MessageBusInternalService,\n private messageBusIncomingService: MessageBusIncomingService,\n private messageBusOutgoingService: MessageBusOutgoingService\n ) {}\n}\n","enum MessageBusHalfsheetStyle {\n DEFAULT = 'Default',\n PRIMARY = 'Primary',\n WARNING = 'Warning',\n LIST = 'List',\n}\nenum MessageBusHalfsheetType {\n TEXT = 'Text',\n CELL = 'Cell',\n}\n\nenum MessageBusHalfsheetCellStyle {\n DEFAULT = 'Default',\n INFO = 'InfoText',\n}\n\nexport { MessageBusHalfsheetCellStyle, MessageBusHalfsheetStyle, MessageBusHalfsheetType };\n","import { MessageBusOutgoingEventKey } from '../models/message-bus.enum';\nimport { MessageBusInternalHubEvent } from '../models/message-bus.interface';\n\nexport const StandardEvent_PageLoaded: MessageBusInternalHubEvent = {\n event: MessageBusOutgoingEventKey.LOADED,\n data: {\n body: {},\n },\n};\n\nexport const StandardEvent_ShowLoader: MessageBusInternalHubEvent = {\n event: MessageBusOutgoingEventKey.SHOW_LOADING,\n data: {\n body: {},\n },\n};\n\nexport const StandardEvent_HideLoader: MessageBusInternalHubEvent = {\n event: MessageBusOutgoingEventKey.HIDE_LOADING,\n data: {\n body: {},\n },\n};\n\nexport const StandardEvent_ExitFeature: MessageBusInternalHubEvent = {\n event: MessageBusOutgoingEventKey.EXIT_VIEW,\n bridgeSetting: {\n data: {},\n },\n fallbackSetting: {\n routeToUrl: '/home',\n },\n};\n\nexport const StandardEvent_ExitFeatureToChat: MessageBusInternalHubEvent = {\n event: MessageBusOutgoingEventKey.ROUTE,\n bridgeSetting: {\n data: {\n path: 'chat',\n },\n },\n fallbackSetting: {\n action: MessageBusOutgoingEventKey.CHAT,\n routeToUrl: '/home'\n },\n};\n\nexport const StandardEvent_EnterExternalAccountConnect: MessageBusInternalHubEvent = {\n event: MessageBusOutgoingEventKey.ROUTE,\n bridgeSetting: {\n data: {\n path: 'chat',\n },\n },\n fallbackSetting: {\n routeToUrl: '/external-accounts/intro/launch',\n },\n};\n","import { MessageBusOutgoingEventKey } from '../../models/message-bus.enum';\nimport { MessageBusInternalHubEvent } from '../../models/message-bus.interface';\n\n/**\n * @description\n * Use this to create an event that will navigate locally in desktop or trigger a native bridge event to route\n *\n * @param body:{ path: string; route: string }\n * path = The value that will be sent to the native bridge event to navigate to\n * route = Internal route event for anything outside of a native container\n * @returns MessageBusInternalHubEvent\n */\nexport const BuildForPathAndReturnStandardEvent = (body: { path: string; route: string }): MessageBusInternalHubEvent => ({\n event: MessageBusOutgoingEventKey.ROUTE,\n data: {\n body,\n },\n});\n","import { MessageBusIncomingEventKey, MessageBusOutgoingEventKey } from '../../models/message-bus.enum';\nimport { MessageBusInternalHubEvent } from '../../models/message-bus.interface';\n\nimport { MessageBusHalfsheetStyle, MessageBusHalfsheetType } from '../../models/event/halfsheet-event.enum';\nimport { MessageBusHalfsheetConfig } from '../../models/event/halfsheet-event.interface';\n\nconst DEFAULT_HALFSHEET_CONFIG = {\n analytics: {\n category: 'smartwallet',\n subCategory: 'transfer',\n },\n dismissable: true,\n id: '',\n style: MessageBusHalfsheetStyle.DEFAULT,\n title: null,\n subText: null,\n image: null,\n type: MessageBusHalfsheetType.TEXT,\n cells: [],\n};\n\nconst BuildFallback = (fallbackMessageCode: string) => ({\n incomingEvent: {\n key: MessageBusIncomingEventKey.HALF_SHEET,\n body: { code: fallbackMessageCode },\n rawMessage: `${MessageBusIncomingEventKey.HALF_SHEET}{\"code\":\"${fallbackMessageCode}\"}`,\n },\n});\n\n/**\n * @description\n * This will help you create a halfsheet bridge event\n *\n * @param config: MessageBusHalfsheetConfig\n * @returns MessageBusInternalHubEvent\n */\nexport const BuildHalfsheetConfigAndReturnStandardEvent = (\n config: Partial<MessageBusHalfsheetConfig>,\n fallbackMessageCode: string = ''\n): MessageBusInternalHubEvent => {\n const fallbackSetting = !fallbackMessageCode ? undefined : BuildFallback(fallbackMessageCode);\n\n return {\n event: MessageBusOutgoingEventKey.SHOW_HALFSHEET,\n bridgeSetting: {\n data: { ...DEFAULT_HALFSHEET_CONFIG, ...config },\n },\n fallbackSetting,\n };\n};\n","import { MessageBusInternalService } from '../internal/message-bus-internal.service';\n\nimport {\n StandardEvent_EnterExternalAccountConnect as enterExternalAccountConnect,\n StandardEvent_ExitFeature as exitFeature,\n StandardEvent_ExitFeatureToChat as exitFeatureToChat,\n StandardEvent_HideLoader as hideLoadingSpinner,\n StandardEvent_PageLoaded as pageLoaded,\n StandardEvent_ShowLoader as showLoadingSpinner,\n} from '../event/standard-events';\n\nimport { BuildForPathAndReturnStandardEvent as forPathAndReturnStandardEvent } from '../event/builder-events';\nimport { BuildHalfsheetConfigAndReturnStandardEvent as halfsheetConfigAndReturnStandardEvent } from '../event/builder/halfsheet-builder.event';\n\n/**\n * Use this to trigger a routing event that will be handled in this order:\n * Angular routing service /routing.service.ts\n * - This service will match the path against the remote config domain mapping\n * - This service will use angular router to navigate\n * Will fallback to bridge routing if routing found but no domain included\n *\n * @param path string value for the entire path you wish to go to\n * @returns void\n */\nconst routeToPath = (path: string) => {\n console.log('debug: routeToPath triggered', path);\n\n MessageBusInternalService.sendOutgoingHubEvent(\n forPathAndReturnStandardEvent({\n path: path,\n route: path,\n })\n );\n};\n\nconst standard = {\n enterExternalAccountConnect,\n exitFeature,\n exitFeatureToChat,\n exitFeatureToSavingsHome: forPathAndReturnStandardEvent({\n path: 'accounts/savings',\n route: 'accounts/savings',\n }),\n hideLoadingSpinner,\n pageLoaded,\n showLoadingSpinner,\n};\nconst builder = { forPathAndReturnStandardEvent, halfsheetConfigAndReturnStandardEvent };\n\n\n/**\n * MessageBusEventUtil contains pre-built events, builders for events, and reference to\n * the outgoing sender.\n *\n * event.standard - Pre-built events like exitFeature\n * events.builder - Builders like path navigation forPathAndReturnStandardEvent\n *\n * sendOutgoing(<MessageBusInternalHubEvent>) - Sends an event to the outgoing message bus\n */\nconst MessageBusEventUtil = {\n event: { standard, builder },\n sendOutgoing: MessageBusInternalService.sendOutgoingHubEvent,\n routeToPath,\n};\n\nexport { MessageBusEventUtil };\n","import { IsRunningAndroid } from '../service/platform/platform-android.service';\nimport { IsRunningIOS } from '../service/platform/platform-ios.service';\n\nconst UseThisForStandaloneOrThat = (valueForStandalone: any, valueForThat: any) =>\n IsRunningAndroid() || IsRunningIOS() ? valueForStandalone : valueForThat;\n\nconst UseThisForEmbeddedOrThat = (valueForEmbedded: any, valueForThat: any) =>\n !IsRunningAndroid() && !IsRunningIOS() ? valueForEmbedded : valueForThat;\n\nexport { UseThisForStandaloneOrThat, UseThisForEmbeddedOrThat };\n","//! moment.js locale configuration\n//! locale : Malay [ms-my]\n//! note : DEPRECATED, the correct one is [ms]\n//! author : Weldan Jamili : https://github.com/weldan\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var msMy = moment.defineLocale('ms-my', {\n months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),\n weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),\n weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),\n weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [pukul] HH.mm',\n LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',\n },\n meridiemParse: /pagi|tengahari|petang|malam/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'pagi') {\n return hour;\n } else if (meridiem === 'tengahari') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'petang' || meridiem === 'malam') {\n return hour + 12;\n }\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours < 11) {\n return 'pagi';\n } else if (hours < 15) {\n return 'tengahari';\n } else if (hours < 19) {\n return 'petang';\n } else {\n return 'malam';\n }\n },\n calendar: {\n sameDay: '[Hari ini pukul] LT',\n nextDay: '[Esok pukul] LT',\n nextWeek: 'dddd [pukul] LT',\n lastDay: '[Kelmarin pukul] LT',\n lastWeek: 'dddd [lepas pukul] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'dalam %s',\n past: '%s yang lepas',\n s: 'beberapa saat',\n ss: '%d saat',\n m: 'seminit',\n mm: '%d minit',\n h: 'sejam',\n hh: '%d jam',\n d: 'sehari',\n dd: '%d hari',\n M: 'sebulan',\n MM: '%d bulan',\n y: 'setahun',\n yy: '%d tahun',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return msMy;\n\n})));\n","<ng-container *ngIf=\"displayLangSelector\">\n <ng-container *ngIf=\"!displayDropdown else dropdownTemplate\">\n <a (click)=\"changeLangTo(displayedOption.locale)\">{{ displayedOption.displayName }}</a>\n </ng-container>\n</ng-container>\n\n<ng-template #dropdownTemplate>\n <bw-input\n *ngIf=\"displayLangSelector && displayedOption\"\n [label]=\"'PREFERRED_LANGUAGE' | translate\"\n isCustomControl=\"true\"\n [suffixIconName]=\"'pen'\"\n [showSuffixIcon]=\"true\"\n >\n <input\n (focus)=\"hasFocus = true;\"\n (blur)=\"hasFocus = false;\"\n [value]=\"displayedOption.displayName\"\n #langSelectInput\n />\n <div class=\"list-container\">\n <div [@slideInOut]=\"hasFocus === true ? 'in' : 'out'\"\n class=\"list-display-container\">\n <ul>\n <li *ngFor=\"let lang of langSelectSvc.supportedLanguages; let idx = index\" class=\"item\">\n <bw-cell class=\"address-cell\"\n [iconNameRight]=\"'chevron_right'\"\n [contentLeft]=\"true\"\n separatorType=\"full\"\n (clicked)=\"changeLangTo(lang.locale, true)\">\n <ng-container content-left>\n <typography text-medium-regular>\n <p>{{ lang.displayName }}</p>\n </typography>\n </ng-container>\n </bw-cell>\n </li>\n </ul>\n </div>\n </div>\n </bw-input>\n\n</ng-template>\n","import {Component, ElementRef, Input, ViewChild} from '@angular/core';\nimport {LanguageSelectorService, SupportedLangsInterface} from \"../language-selector.service\";\n\nimport {Subscription} from \"rxjs\";\nimport {animate, state, style, transition, trigger} from \"@angular/animations\";\n\n@Component({\n selector: 'brightside-web-language-selector',\n templateUrl: './language-selector.component.html',\n styleUrls: ['./language-selector.component.scss'],\n animations: [\n trigger('slideInOut', [\n state('in', style({\n maxHeight: '209px',\n opacity: '1'\n })),\n state('out', style({\n maxHeight: '0px',\n opacity: '0'\n })),\n transition('in => out', animate('400ms 100ms ease-in-out')),\n transition('out => in', animate('400ms ease-in-out'))\n ])\n ]\n})\nexport class LanguageSelectorComponent {\n private _displayDropdown: boolean\n\n @Input() bypassPut = false;\n\n @Input() set displayDropdown(val: boolean) {\n this.displaySelected = val;\n this._displayDropdown = val;\n }\n get displayDropdown(): boolean {\n return this._displayDropdown;\n }\n\n displaySelected: boolean;\n sub = new Subscription();\n displayedOption: SupportedLangsInterface | undefined;\n displayLangSelector: boolean;\n hasFocus: Boolean;\n\n @ViewChild('langSelectInput') langSelectInput: ElementRef;\n\n constructor(\n private langSelectSvc: LanguageSelectorService,\n ) {\n this.sub.add(\n this.langSelectSvc.ready.subscribe(isReady => {\n if (isReady) setTimeout(()=>{this.setUpSelector()}, 100);\n })\n )\n }\n\n setUpSelector() {\n if (!this.langSelectSvc.disableChangeLang) {\n this.displayedOption = this.langSelectSvc.supportedLanguages.find(lang => {\n if (this.displaySelected) return lang.locale === this.langSelectSvc.activeLang;\n return lang.locale !== this.langSelectSvc.activeLang;\n });\n if (!this.displayedOption && this.displayDropdown) {\n this.displayedOption = this.langSelectSvc.supportedLanguages.find(lang => {\n return lang.locale === 'en';\n });\n }\n this.displayLangSelector = true;\n }\n }\n\n changeLangTo(locale: string, defocus = false) {\n this.langSelectSvc.use(locale, this.bypassPut);\n setTimeout(()=>{\n if (defocus && this.langSelectInput) this.langSelectInput.nativeElement.blur();\n this.displayedOption = this.langSelectSvc.supportedLanguages.find(lang => {\n if (this.displaySelected) return lang.locale === this.langSelectSvc.activeLang;\n return lang.locale !== this.langSelectSvc.activeLang;\n });\n }, 10);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { DatePipe } from '@angular/common';\n\n@Pipe({\n name: 'monthName'\n})\nexport class MonthNamePipe implements PipeTransform {\n\n constructor(\n private datePipe: DatePipe,\n ) {}\n\n transform(value: number): string {\n value = value - 1;\n\n if (value < 0 || value > 11) {\n return 'Invalid month';\n }\n\n const date = new Date();\n date.setMonth(value);\n\n return this.datePipe.transform(date, 'MMMM', undefined) || '';\n }\n}\n","//! moment.js locale configuration\n//! locale : Armenian [hy-am]\n//! author : Armendarabyan : https://github.com/armendarabyan\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var hyAm = moment.defineLocale('hy-am', {\n months: {\n format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split(\n '_'\n ),\n standalone:\n 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split(\n '_'\n ),\n },\n monthsShort: 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'),\n weekdays:\n 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split(\n '_'\n ),\n weekdaysShort: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),\n weekdaysMin: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY թ.',\n LLL: 'D MMMM YYYY թ., HH:mm',\n LLLL: 'dddd, D MMMM YYYY թ., HH:mm',\n },\n calendar: {\n sameDay: '[այսօր] LT',\n nextDay: '[վաղը] LT',\n lastDay: '[երեկ] LT',\n nextWeek: function () {\n return 'dddd [օրը ժամը] LT';\n },\n lastWeek: function () {\n return '[անցած] dddd [օրը ժամը] LT';\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s հետո',\n past: '%s առաջ',\n s: 'մի քանի վայրկյան',\n ss: '%d վայրկյան',\n m: 'րոպե',\n mm: '%d րոպե',\n h: 'ժամ',\n hh: '%d ժամ',\n d: 'օր',\n dd: '%d օր',\n M: 'ամիս',\n MM: '%d ամիս',\n y: 'տարի',\n yy: '%d տարի',\n },\n meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,\n isPM: function (input) {\n return /^(ցերեկվա|երեկոյան)$/.test(input);\n },\n meridiem: function (hour) {\n if (hour < 4) {\n return 'գիշերվա';\n } else if (hour < 12) {\n return 'առավոտվա';\n } else if (hour < 17) {\n return 'ցերեկվա';\n } else {\n return 'երեկոյան';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}|\\d{1,2}-(ին|րդ)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'DDD':\n case 'w':\n case 'W':\n case 'DDDo':\n if (number === 1) {\n return number + '-ին';\n }\n return number + '-րդ';\n default:\n return number;\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return hyAm;\n\n})));\n","//! moment.js locale configuration\n//! locale : Luxembourgish [lb]\n//! author : mweimerskirch : https://github.com/mweimerskirch\n//! author : David Raison : https://github.com/kwisatz\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n m: ['eng Minutt', 'enger Minutt'],\n h: ['eng Stonn', 'enger Stonn'],\n d: ['een Dag', 'engem Dag'],\n M: ['ee Mount', 'engem Mount'],\n y: ['ee Joer', 'engem Joer'],\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n }\n function processFutureTime(string) {\n var number = string.substr(0, string.indexOf(' '));\n if (eifelerRegelAppliesToNumber(number)) {\n return 'a ' + string;\n }\n return 'an ' + string;\n }\n function processPastTime(string) {\n var number = string.substr(0, string.indexOf(' '));\n if (eifelerRegelAppliesToNumber(number)) {\n return 'viru ' + string;\n }\n return 'virun ' + string;\n }\n /**\n * Returns true if the word before the given number loses the '-n' ending.\n * e.g. 'an 10 Deeg' but 'a 5 Deeg'\n *\n * @param number {integer}\n * @returns {boolean}\n */\n function eifelerRegelAppliesToNumber(number) {\n number = parseInt(number, 10);\n if (isNaN(number)) {\n return false;\n }\n if (number < 0) {\n // Negative Number --> always true\n return true;\n } else if (number < 10) {\n // Only 1 digit\n if (4 <= number && number <= 7) {\n return true;\n }\n return false;\n } else if (number < 100) {\n // 2 digits\n var lastDigit = number % 10,\n firstDigit = number / 10;\n if (lastDigit === 0) {\n return eifelerRegelAppliesToNumber(firstDigit);\n }\n return eifelerRegelAppliesToNumber(lastDigit);\n } else if (number < 10000) {\n // 3 or 4 digits --> recursively check first digit\n while (number >= 10) {\n number = number / 10;\n }\n return eifelerRegelAppliesToNumber(number);\n } else {\n // Anything larger than 4 digits: recursively check first n-3 digits\n number = number / 1000;\n return eifelerRegelAppliesToNumber(number);\n }\n }\n\n var lb = moment.defineLocale('lb', {\n months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split(\n '_'\n ),\n monthsShort:\n 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays:\n 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split(\n '_'\n ),\n weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'),\n weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm [Auer]',\n LTS: 'H:mm:ss [Auer]',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm [Auer]',\n LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]',\n },\n calendar: {\n sameDay: '[Haut um] LT',\n sameElse: 'L',\n nextDay: '[Muer um] LT',\n nextWeek: 'dddd [um] LT',\n lastDay: '[Gëschter um] LT',\n lastWeek: function () {\n // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule\n switch (this.day()) {\n case 2:\n case 4:\n return '[Leschten] dddd [um] LT';\n default:\n return '[Leschte] dddd [um] LT';\n }\n },\n },\n relativeTime: {\n future: processFutureTime,\n past: processPastTime,\n s: 'e puer Sekonnen',\n ss: '%d Sekonnen',\n m: processRelativeTime,\n mm: '%d Minutten',\n h: processRelativeTime,\n hh: '%d Stonnen',\n d: processRelativeTime,\n dd: '%d Deeg',\n M: processRelativeTime,\n MM: '%d Méint',\n y: processRelativeTime,\n yy: '%d Joer',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return lb;\n\n})));\n","export function executeSchedule(parentSubscription, scheduler, work, delay = 0, repeat = false) {\n const scheduleSubscription = scheduler.schedule(function () {\n work();\n if (repeat) {\n parentSubscription.add(this.schedule(null, delay));\n }\n else {\n this.unsubscribe();\n }\n }, delay);\n parentSubscription.add(scheduleSubscription);\n if (!repeat) {\n return scheduleSubscription;\n }\n}\n","/**\n * Use this attribute to represent the source of a span.\n * Should be one of: custom, url, route, view, component, task, unknown\n *\n */\nconst SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = 'sentry.source';\n\n/**\n * Use this attribute to represent the sample rate used for a span.\n */\nconst SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = 'sentry.sample_rate';\n\n/**\n * Use this attribute to represent the operation of a span.\n */\nconst SEMANTIC_ATTRIBUTE_SENTRY_OP = 'sentry.op';\n\n/**\n * Use this attribute to represent the origin of a span.\n */\nconst SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = 'sentry.origin';\n\n/** The reason why an idle span finished. */\nconst SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON = 'sentry.idle_span_finish_reason';\n\n/** The unit of a measurement, which may be stored as a TimedEvent. */\nconst SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT = 'sentry.measurement_unit';\n\n/** The value of a measurement, which may be stored as a TimedEvent. */\nconst SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE = 'sentry.measurement_value';\n\n/**\n * A custom span name set by users guaranteed to be taken over any automatically\n * inferred name. This attribute is removed before the span is sent.\n *\n * @internal only meant for internal SDK usage\n * @hidden\n */\nconst SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME = 'sentry.custom_span_name';\n\n/**\n * The id of the profile that this span occurred in.\n */\nconst SEMANTIC_ATTRIBUTE_PROFILE_ID = 'sentry.profile_id';\n\nconst SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME = 'sentry.exclusive_time';\n\nconst SEMANTIC_ATTRIBUTE_CACHE_HIT = 'cache.hit';\n\nconst SEMANTIC_ATTRIBUTE_CACHE_KEY = 'cache.key';\n\nconst SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE = 'cache.item_size';\n\n/** TODO: Remove these once we update to latest semantic conventions */\nconst SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD = 'http.request.method';\nconst SEMANTIC_ATTRIBUTE_URL_FULL = 'url.full';\n\nexport { SEMANTIC_ATTRIBUTE_CACHE_HIT, SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE, SEMANTIC_ATTRIBUTE_CACHE_KEY, SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME, SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD, SEMANTIC_ATTRIBUTE_PROFILE_ID, SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME, SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_URL_FULL };\n","import { Component, ElementRef, Input, OnInit, ViewEncapsulation } from \"@angular/core\";\n\nenum TextStyle {\n Display = \"display\",\n TitleLarge = \"title-large\",\n TitleMedium = \"title-medium\",\n HeadlineSemibold = \"headline-semibold\",\n HeadlineRegular = \"headline-regular\",\n TextXXLargeSemibold = \"text-xxlarge-semibold\",\n TextLargeSemibold = \"text-large-semibold\",\n TextMediumSemibold = \"text-medium-semibold\",\n TextSmallSemibold = \"text-small-semibold\",\n TextXSmallSemibold = \"text-xsmall-semibold\",\n TextLargeRegular = \"text-large-regular\",\n TextMediumRegular = \"text-medium-regular\",\n TextSmallRegular = \"text-small-regular\",\n TextXSmallRegular = \"text-xsmall-regular\"\n}\n\n/**\n * Typography component:\n * `<typography title-large>Title large</typography>`\n * or\n * `<h1 title-large>Title large</h1>`\n * or\n * `<p text-medium-semibold>Text medium semibold</p>`\n */\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: `typography, typography[display], *[display], typography[title-large],\n *[title-large], typography[title-medium], *[title-medium], typography[headline-semibold],\n *[headline-semibold], typography[headline-regular], *[headline-regular],\n typography[text-large-semibold], p[text-large-semibold], typography[text-medium-semibold],\n p[text-medium-semibold], typography[text-small-semibold], p[text-small-semibold],\n typography[text-xxlarge-semibold], typography[text-large-regular], p[text-large-regular], typography[text-medium-regular],\n p[text-medium-regular], typography[text-small-regular], p[text-small-regular]],\n typography[text-xsmall-regular], typography[text-xsmall-semibold]`,\n templateUrl: \"./typography.component.html\",\n styleUrls: [\"./typography.component.scss\"],\n encapsulation: ViewEncapsulation.None\n})\nexport class TypographyComponent implements OnInit {\n @Input() color: string;\n\n constructor(public _elementRef: ElementRef) {}\n\n ngOnInit() {\n const hostEl = this._getHostElement() as HTMLElement;\n const hostElAttrs = hostEl.getAttributeNames();\n\n for (const value of this._styleKeys(TextStyle)) {\n if (hostElAttrs.includes(TextStyle[value])) {\n hostEl.classList.add(TextStyle[value]);\n }\n }\n\n if (this.color) {\n hostEl.style.setProperty(\"color\", this.color);\n }\n }\n\n private _getHostElement() {\n return this._elementRef.nativeElement;\n }\n\n // private _hasHostAttributes(...attributes: string[]) {\n // return attributes.some(attribute => this._getHostElement().hasAttribute(attribute));\n // }\n\n private _styleKeys<O extends object, K extends keyof O = keyof O>(obj: O): K[] {\n return Object.keys(obj).filter(k => Number.isNaN(+k)) as K[];\n }\n}\n","<ng-content></ng-content>\n","//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11\n ? forms[0]\n : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)\n ? forms[1]\n : forms[2];\n }\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',\n mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',\n hh: 'час_часа_часов',\n dd: 'день_дня_дней',\n ww: 'неделя_недели_недель',\n MM: 'месяц_месяца_месяцев',\n yy: 'год_года_лет',\n };\n if (key === 'm') {\n return withoutSuffix ? 'минута' : 'минуту';\n } else {\n return number + ' ' + plural(format[key], +number);\n }\n }\n var monthsParse = [\n /^янв/i,\n /^фев/i,\n /^мар/i,\n /^апр/i,\n /^ма[йя]/i,\n /^июн/i,\n /^июл/i,\n /^авг/i,\n /^сен/i,\n /^окт/i,\n /^ноя/i,\n /^дек/i,\n ];\n\n // http://new.gramota.ru/spravka/rules/139-prop : § 103\n // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637\n // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753\n var ru = moment.defineLocale('ru', {\n months: {\n format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split(\n '_'\n ),\n standalone:\n 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(\n '_'\n ),\n },\n monthsShort: {\n // по CLDR именно \"июл.\" и \"июн.\", но какой смысл менять букву на точку?\n format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split(\n '_'\n ),\n standalone:\n 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split(\n '_'\n ),\n },\n weekdays: {\n standalone:\n 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split(\n '_'\n ),\n format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split(\n '_'\n ),\n isFormat: /\\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/,\n },\n weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),\n weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n\n // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки\n monthsRegex:\n /^(январ[ья]|янв\\.?|феврал[ья]|февр?\\.?|марта?|мар\\.?|апрел[ья]|апр\\.?|ма[йя]|июн[ья]|июн\\.?|июл[ья]|июл\\.?|августа?|авг\\.?|сентябр[ья]|сент?\\.?|октябр[ья]|окт\\.?|ноябр[ья]|нояб?\\.?|декабр[ья]|дек\\.?)/i,\n\n // копия предыдущего\n monthsShortRegex:\n /^(январ[ья]|янв\\.?|феврал[ья]|февр?\\.?|марта?|мар\\.?|апрел[ья]|апр\\.?|ма[йя]|июн[ья]|июн\\.?|июл[ья]|июл\\.?|августа?|авг\\.?|сентябр[ья]|сент?\\.?|октябр[ья]|окт\\.?|ноябр[ья]|нояб?\\.?|декабр[ья]|дек\\.?)/i,\n\n // полные названия с падежами\n monthsStrictRegex:\n /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,\n\n // Выражение, которое соответствует только сокращённым формам\n monthsShortStrictRegex:\n /^(янв\\.|февр?\\.|мар[т.]|апр\\.|ма[яй]|июн[ья.]|июл[ья.]|авг\\.|сент?\\.|окт\\.|нояб?\\.|дек\\.)/i,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY г.',\n LLL: 'D MMMM YYYY г., H:mm',\n LLLL: 'dddd, D MMMM YYYY г., H:mm',\n },\n calendar: {\n sameDay: '[Сегодня, в] LT',\n nextDay: '[Завтра, в] LT',\n lastDay: '[Вчера, в] LT',\n nextWeek: function (now) {\n if (now.week() !== this.week()) {\n switch (this.day()) {\n case 0:\n return '[В следующее] dddd, [в] LT';\n case 1:\n case 2:\n case 4:\n return '[В следующий] dddd, [в] LT';\n case 3:\n case 5:\n case 6:\n return '[В следующую] dddd, [в] LT';\n }\n } else {\n if (this.day() === 2) {\n return '[Во] dddd, [в] LT';\n } else {\n return '[В] dddd, [в] LT';\n }\n }\n },\n lastWeek: function (now) {\n if (now.week() !== this.week()) {\n switch (this.day()) {\n case 0:\n return '[В прошлое] dddd, [в] LT';\n case 1:\n case 2:\n case 4:\n return '[В прошлый] dddd, [в] LT';\n case 3:\n case 5:\n case 6:\n return '[В прошлую] dddd, [в] LT';\n }\n } else {\n if (this.day() === 2) {\n return '[Во] dddd, [в] LT';\n } else {\n return '[В] dddd, [в] LT';\n }\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'через %s',\n past: '%s назад',\n s: 'несколько секунд',\n ss: relativeTimeWithPlural,\n m: relativeTimeWithPlural,\n mm: relativeTimeWithPlural,\n h: 'час',\n hh: relativeTimeWithPlural,\n d: 'день',\n dd: relativeTimeWithPlural,\n w: 'неделя',\n ww: relativeTimeWithPlural,\n M: 'месяц',\n MM: relativeTimeWithPlural,\n y: 'год',\n yy: relativeTimeWithPlural,\n },\n meridiemParse: /ночи|утра|дня|вечера/i,\n isPM: function (input) {\n return /^(дня|вечера)$/.test(input);\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'ночи';\n } else if (hour < 12) {\n return 'утра';\n } else if (hour < 17) {\n return 'дня';\n } else {\n return 'вечера';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(й|го|я)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'M':\n case 'd':\n case 'DDD':\n return number + '-й';\n case 'D':\n return number + '-го';\n case 'w':\n case 'W':\n return number + '-я';\n default:\n return number;\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return ru;\n\n})));\n","//! moment.js locale configuration\n//! locale : Norwegian Bokmål [nb]\n//! authors : Espen Hovlandsdal : https://github.com/rexxars\n//! Sigurd Gartmann : https://github.com/sigurdga\n//! Stephen Ramthun : https://github.com/stephenramthun\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var nb = moment.defineLocale('nb', {\n months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(\n '_'\n ),\n monthsShort:\n 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),\n monthsParseExact: true,\n weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),\n weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),\n weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY [kl.] HH:mm',\n LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',\n },\n calendar: {\n sameDay: '[i dag kl.] LT',\n nextDay: '[i morgen kl.] LT',\n nextWeek: 'dddd [kl.] LT',\n lastDay: '[i går kl.] LT',\n lastWeek: '[forrige] dddd [kl.] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'om %s',\n past: '%s siden',\n s: 'noen sekunder',\n ss: '%d sekunder',\n m: 'ett minutt',\n mm: '%d minutter',\n h: 'én time',\n hh: '%d timer',\n d: 'én dag',\n dd: '%d dager',\n w: 'én uke',\n ww: '%d uker',\n M: 'én måned',\n MM: '%d måneder',\n y: 'ett år',\n yy: '%d år',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return nb;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic (Tunisia) [ar-tn]\n//! author : Nader Toukabri : https://github.com/naderio\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var arTn = moment.defineLocale('ar-tn', {\n months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n '_'\n ),\n monthsShort:\n 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n '_'\n ),\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return arTn;\n\n})));\n","import { getAsyncContextStrategy } from './asyncContext/index.js';\nimport { getMainCarrier } from './carrier.js';\nimport { Scope } from './scope.js';\nimport { dropUndefinedKeys } from './utils-hoist/object.js';\nimport { getGlobalSingleton } from './utils-hoist/worldwide.js';\n\n/**\n * Get the currently active scope.\n */\nfunction getCurrentScope() {\n const carrier = getMainCarrier();\n const acs = getAsyncContextStrategy(carrier);\n return acs.getCurrentScope();\n}\n\n/**\n * Get the currently active isolation scope.\n * The isolation scope is active for the current execution context.\n */\nfunction getIsolationScope() {\n const carrier = getMainCarrier();\n const acs = getAsyncContextStrategy(carrier);\n return acs.getIsolationScope();\n}\n\n/**\n * Get the global scope.\n * This scope is applied to _all_ events.\n */\nfunction getGlobalScope() {\n return getGlobalSingleton('globalScope', () => new Scope());\n}\n\n/**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n */\n\n/**\n * Either creates a new active scope, or sets the given scope as active scope in the given callback.\n */\nfunction withScope(\n ...rest\n) {\n const carrier = getMainCarrier();\n const acs = getAsyncContextStrategy(carrier);\n\n // If a scope is defined, we want to make this the active scope instead of the default one\n if (rest.length === 2) {\n const [scope, callback] = rest;\n\n if (!scope) {\n return acs.withScope(callback);\n }\n\n return acs.withSetScope(scope, callback);\n }\n\n return acs.withScope(rest[0]);\n}\n\n/**\n * Attempts to fork the current isolation scope and the current scope based on the current async context strategy. If no\n * async context strategy is set, the isolation scope and the current scope will not be forked (this is currently the\n * case, for example, in the browser).\n *\n * Usage of this function in environments without async context strategy is discouraged and may lead to unexpected behaviour.\n *\n * This function is intended for Sentry SDK and SDK integration development. It is not recommended to be used in \"normal\"\n * applications directly because it comes with pitfalls. Use at your own risk!\n */\n\n/**\n * Either creates a new active isolation scope, or sets the given isolation scope as active scope in the given callback.\n */\nfunction withIsolationScope(\n ...rest\n\n) {\n const carrier = getMainCarrier();\n const acs = getAsyncContextStrategy(carrier);\n\n // If a scope is defined, we want to make this the active scope instead of the default one\n if (rest.length === 2) {\n const [isolationScope, callback] = rest;\n\n if (!isolationScope) {\n return acs.withIsolationScope(callback);\n }\n\n return acs.withSetIsolationScope(isolationScope, callback);\n }\n\n return acs.withIsolationScope(rest[0]);\n}\n\n/**\n * Get the currently active client.\n */\nfunction getClient() {\n return getCurrentScope().getClient();\n}\n\n/**\n * Get a trace context for the given scope.\n */\nfunction getTraceContextFromScope(scope) {\n const propagationContext = scope.getPropagationContext();\n\n // TODO(v9): Use generateSpanId() instead of spanId\n // eslint-disable-next-line deprecation/deprecation\n const { traceId, spanId, parentSpanId } = propagationContext;\n\n const traceContext = dropUndefinedKeys({\n trace_id: traceId,\n span_id: spanId,\n parent_span_id: parentSpanId,\n });\n\n return traceContext;\n}\n\nexport { getClient, getCurrentScope, getGlobalScope, getIsolationScope, getTraceContextFromScope, withIsolationScope, withScope };\n"],"x_google_ignoreList":[0,5,6,37,42,43,44,45,48,50,51,52,55,56,57,58,59,60,61,62,65,68,69,70,71,72,73,74,75,76,77,78,79,84,85,86,87,88,89,90,91,93,94,95,96,97,99,100,101,102,103,108,112,113,116,117,118,121,122,123,124,125,128,129,131,132,133,135,136,138,139,140,141,142,143,144,147,148,149,150,151,152,153,154,155,156,157,158,163,167,168,175,178,180,181,182,183,184,185,186,187,188,212,215,220,221,222,223,224,225,226,227,228,229,230,233,236,237,238,239,244,246,257,258,259,260,263,264,265,266,267,268,269,270,272,273,274,275,276,278,284,285,288,289,290,291,292,293,294,295,296,297,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,421,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,561,562,565,567,568,569,570,571,574,579,580,581,582,583,584,586,587,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,611,612,613,614,615,616,617,618,619,620,621,622,624,625,626,627,628,630,631,632,651,652,653,654,655,656,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,680,681,682,683,684,687,688,689,690,691,694,695,696,697,698,699,700,701,702,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,723,724,727,730,731,734,735,736,737,738,739,742,744,745,750,751,752,753,754,755,757,758,759,760,761,762,763,764,765,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,792,793,794,797,798,799,803,804,805,808,809,810,811,816,817,846,847,848,892,893,894,895,896,897,898,899,901,902,903,912,915,916,917,918,919,920,921,922,923,924,925,928,929,931,932,933,936,937,939,940,942,943,944,945,946,947,948,949,958,960,961,962,964,965,966,967,968,969,970,989,993,994,995,996,999,1000,1001,1002]}